diff --git a/.github/ISSUE_TEMPLATE/kubernetes_bump.md b/.github/ISSUE_TEMPLATE/kubernetes_bump.md
index 12ffe6062bff..e03b905e93ac 100644
--- a/.github/ISSUE_TEMPLATE/kubernetes_bump.md
+++ b/.github/ISSUE_TEMPLATE/kubernetes_bump.md
@@ -25,6 +25,8 @@ changes should be cherry-picked to all release series that will support the new
* [ ] Modify CAPD to use the new Kubernetes release after it is GA:
* Bump the Kubernetes version in `test/*` except for `test/infrastructure/kind/*`.
* Prior art: https://github.com/kubernetes-sigs/cluster-api/pull/11030
+* [ ] Start testing with next Kubernetes release on main by bumping `KUBERNETES_VERSION_LATEST_CI` in `docker.yaml`
+ * Prior art: https://github.com/kubernetes-sigs/cluster-api/pull/12709
* [ ] Ensure the jobs are adjusted to provide test coverage according to our [support policy](https://cluster-api.sigs.k8s.io/reference/versions.html#supported-kubernetes-versions):
* At the `.versions` section in the `cluster-api-prowjob-gen.yaml` file in [test-infra](https://github.com/kubernetes/test-infra/blob/master/config/jobs/kubernetes-sigs/cluster-api/):
diff --git a/.github/workflows/pr-gh-workflow-approve.yaml b/.github/workflows/pr-gh-workflow-approve.yaml
index f493fd40032d..28be4dac7151 100644
--- a/.github/workflows/pr-gh-workflow-approve.yaml
+++ b/.github/workflows/pr-gh-workflow-approve.yaml
@@ -19,7 +19,7 @@ jobs:
actions: write
steps:
- name: Update PR
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
+ uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
continue-on-error: true
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/pr-md-link-check.yaml b/.github/workflows/pr-md-link-check.yaml
index 36c64b54c11a..d5e4f43f1eb1 100644
--- a/.github/workflows/pr-md-link-check.yaml
+++ b/.github/workflows/pr-md-link-check.yaml
@@ -14,7 +14,7 @@ jobs:
name: Broken Links
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
+ - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # tag=v6.0.0
- uses: gaurav-nelson/github-action-markdown-link-check@3c3b66f1f7d0900e37b71eca45b63ea9eedfce31 # tag=1.0.17
with:
use-quiet-mode: 'yes'
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index d1a0e5041b08..cfde4a2efa38 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -17,12 +17,12 @@ jobs:
release_tag: ${{ steps.release-version.outputs.release_version }}
steps:
- name: Checkout code
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
+ uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # tag=v6.0.0
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
- uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # tag=v46.0.5
+ uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # tag=v47.0.0
- name: Get release version
id: release-version
run: |
@@ -88,14 +88,14 @@ jobs:
env:
RELEASE_TAG: ${{needs.push_release_tags.outputs.release_tag}}
- name: checkout code
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
+ uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # tag=v6.0.0
with:
fetch-depth: 0
ref: ${{ env.RELEASE_TAG }}
- name: Calculate go version
run: echo "go_version=$(make go-version)" >> $GITHUB_ENV
- name: Set up Go
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # tag=v5.5.0
+ uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # tag=v6.1.0
with:
go-version: ${{ env.go_version }}
- name: generate release artifacts
@@ -106,7 +106,7 @@ jobs:
curl -L "https://raw.githubusercontent.com/${{ github.repository }}/main/CHANGELOG/${{ env.RELEASE_TAG }}.md" \
-o "${{ env.RELEASE_TAG }}.md"
- name: Release
- uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # tag=v2.3.2
+ uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # tag=v2.5.0
with:
draft: true
files: out/*
diff --git a/.github/workflows/weekly-md-link-check.yaml b/.github/workflows/weekly-md-link-check.yaml
index 2a57872a0921..5ce68914de2a 100644
--- a/.github/workflows/weekly-md-link-check.yaml
+++ b/.github/workflows/weekly-md-link-check.yaml
@@ -14,10 +14,10 @@ jobs:
strategy:
fail-fast: false
matrix:
- branch: [ main, release-1.10, release-1.9, release-1.8 ]
+ branch: [ main, release-1.11, release-1.10, release-1.9 ]
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
+ - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # tag=v6.0.0
with:
ref: ${{ matrix.branch }}
- uses: gaurav-nelson/github-action-markdown-link-check@3c3b66f1f7d0900e37b71eca45b63ea9eedfce31 # tag=1.0.17
diff --git a/.github/workflows/weekly-security-scan.yaml b/.github/workflows/weekly-security-scan.yaml
index b2fbc9a88aaf..16d30b6a26e7 100644
--- a/.github/workflows/weekly-security-scan.yaml
+++ b/.github/workflows/weekly-security-scan.yaml
@@ -13,19 +13,19 @@ jobs:
strategy:
fail-fast: false
matrix:
- branch: [ main, release-1.10, release-1.9, release-1.8 ]
+ branch: [ main, release-1.11, release-1.10, release-1.9 ]
name: Trivy
runs-on: ubuntu-latest
steps:
- name: Check out code
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
+ uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # tag=v6.0.0
with:
ref: ${{ matrix.branch }}
- name: Calculate go version
id: vars
run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT
- name: Set up Go
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # tag=v5.5.0
+ uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # tag=v6.1.0
with:
go-version: ${{ steps.vars.outputs.go_version }}
- name: Run verify security target
diff --git a/.github/workflows/weekly-test-release.yaml b/.github/workflows/weekly-test-release.yaml
index 3ac6a6daf54d..7d02df535ad6 100644
--- a/.github/workflows/weekly-test-release.yaml
+++ b/.github/workflows/weekly-test-release.yaml
@@ -17,10 +17,10 @@ jobs:
strategy:
fail-fast: false
matrix:
- branch: [ main, release-1.10, release-1.9, release-1.8 ]
+ branch: [ main, release-1.11, release-1.10, release-1.9 ]
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
+ - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # tag=v6.0.0
with:
ref: ${{ matrix.branch }}
fetch-depth: 0
@@ -32,7 +32,7 @@ jobs:
- name: Calculate go version
run: echo "go_version=$(make go-version)" >> $GITHUB_ENV
- name: Set up Go
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # tag=v5.5.0
+ uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # tag=v6.1.0
with:
go-version: ${{ env.go_version }}
- name: Test release
diff --git a/.gitignore b/.gitignore
index eef96f2d5d1d..a3299e3e025d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,13 +12,13 @@ hack/tools/bin
# E2E test templates
test/e2e/data/infrastructure-docker/**/cluster-template*.yaml
-!test/e2e/data/infrastructure-docker/**/clusterclass-quick-start.yaml
!test/e2e/data/infrastructure-docker/**/clusterclass-quick-start-runtimesdk.yaml
!test/e2e/data/infrastructure-docker/**/clusterclass-quick-start-runtimesdk-v1beta1.yaml
!test/e2e/data/infrastructure-docker/**/cluster-template-in-memory.yaml
!test/e2e/data/infrastructure-docker/**/clusterclass-in-memory.yaml
test/e2e/data/infrastructure-docker/**/clusterclass-*.yaml
test/e2e/data/infrastructure-inmemory/**/cluster-template*.yaml
+!test/e2e/data/infrastructure-docker/**/clusterclass-quick-start.yaml
# Output of Makefile targets using sed on MacOS systems
*.yaml-e
diff --git a/.golangci-kal.yml b/.golangci-kal.yml
index bae5742288ea..eea02298655b 100644
--- a/.golangci-kal.yml
+++ b/.golangci-kal.yml
@@ -18,12 +18,15 @@ linters:
- "conditions" # Ensure conditions have the correct json tags and markers.
- "conflictingmarkers"
- "duplicatemarkers" # Ensure there are no exact duplicate markers. for types and fields.
+ - "forbiddenmarkers" # Ensure that types and fields do not contain any markers that are forbidden.
- "integers" # Ensure only int32 and int64 are used for integers.
- "jsontags" # Ensure every field has a json tag.
- "maxlength" # Ensure all strings and arrays have maximum lengths/maximum items.
- "nobools" # Bools do not evolve over time, should use enums instead.
+ - "nodurations" # Prevents usage of `Duration` types.
- "nofloats" # Ensure floats are not used.
- "nomaps" # Ensure maps are not used.
+ - "nonullable" # Ensure that types and fields do not have the nullable marker.
- "notimestamp" # Prevents usage of 'Timestamp' fields
- "optionalfields" # Ensure that all fields marked as optional adhere to being pointers and
# having the `omitempty` value in their `json` tag where appropriate.
@@ -50,6 +53,12 @@ linters:
- ["default", "kubebuilder:default"]
- ["required", "kubebuilder:validation:Required", "k8s:required"]
description: "A field with a default value cannot be required"
+ forbiddenmarkers:
+ markers:
+ # We don't want to do any defaulting (including OpenAPI) anymore on API fields because we prefer
+ # to have a clear signal on user intent. This also allows us to easily change the default behavior if necessary.
+ - identifier: "kubebuilder:default"
+ - identifier: "default"
conditions:
isFirstField: Warn # Require conditions to be the first field in the status struct.
usePatchStrategy: Forbid # Forbid patchStrategy markers on the Conditions field.
@@ -83,15 +92,15 @@ linters:
## Excludes for current apiVersions that can be removed once v1beta1 is removed.
# .status.deprecated.v1beta1.conditions fields are using v1beta1.Condition types.
- path: "api/addons/v1beta2|api/bootstrap/kubeadm/v1beta2|api/controlplane/kubeadm/v1beta2|api/core/v1beta2|api/ipam/v1beta2|api/runtime/v1beta2"
- text: "Conditions field must be a slice of metav1.Condition"
+ text: "Conditions field in .*V1Beta1DeprecatedStatus must be a slice of metav1.Condition"
linters:
- kubeapilinter
- path: "api/addons/v1beta2|api/bootstrap/kubeadm/v1beta2|api/controlplane/kubeadm/v1beta2|api/core/v1beta2|api/ipam/v1beta2|api/runtime/v1beta2"
- text: "ssatags: Conditions should have a listType marker for proper Server-Side Apply behavior"
+ text: "ssatags: .*Conditions should have a listType marker for proper Server-Side Apply behavior"
linters:
- kubeapilinter
- path: "api/core/v1beta2"
- text: "field Conditions type Conditions must have a maximum items, add kubebuilder:validation:MaxItems marker"
+ text: "field .*Conditions type Conditions must have a maximum items, add kubebuilder:validation:MaxItems marker"
linters:
- kubeapilinter
- path: "api/core/v1beta2/condition_types.go"
@@ -102,24 +111,18 @@ linters:
## Excludes for current clusterctl v1alpha3 and Runtime Hooks v1alpha1 apiVersions (can be fixed once we bump their apiVersion).
# Note: The types in api/runtime/hooks/v1alpha1 are not CRDs, so e.g. SSA markers don't make sense there.
- path: "cmd/clusterctl/api/v1alpha3|api/runtime/hooks/v1alpha1"
- text: "optionalfields|requiredfields|maxlength|ssatags"
+ text: "maxlength|ssatags"
linters:
- kubeapilinter
-
- ## Excludes for JSONSchemaProps
- # controller-gen does not allow to add MaxItems to Schemaless fields: https://github.com/kubernetes-sigs/kube-api-linter/issues/120
- - path: "api/core/v1beta2/clusterclass_types.go"
- text: "maxlength: field (AllOf|OneOf|AnyOf) must have a maximum items, add kubebuilder:validation:MaxItems marker"
- linters:
- - kubeapilinter
- # controller-gen does not allow to add listType to Schemaless fields: https://github.com/kubernetes-sigs/kube-api-linter/issues/120
- - path: "api/core/v1beta2/clusterclass_types.go"
- text: "ssatags: (AllOf|OneOf|AnyOf) should have a listType marker for proper Server-Side Apply behavior"
+ - path: "cmd/clusterctl/api/v1alpha3|api/runtime/hooks/v1alpha1/(common_types.go|discovery_types.go|lifecyclehooks_types.go|topologymutation_types.go|topologymutation_variable_types.go)"
+ text: "optionalfields|requiredfields"
linters:
- kubeapilinter
+
+ ## Excludes for JSONSchemaProps
# We want to align to the JSON tags of the CustomResourceDefinition fields.
- path: "api/core/v1beta2/clusterclass_types"
- text: "field (XPreserveUnknownFields|XPreserveUnknownFields|XValidations|XMetadata|XIntOrString) json tag does not match pattern"
+ text: "field JSONSchemaProps.(XPreserveUnknownFields|XPreserveUnknownFields|XValidations|XMetadata|XIntOrString) json tag does not match pattern"
linters:
- kubeapilinter
# We want to align Properties to the corresponding field in CustomResourceDefinitions.
@@ -142,7 +145,7 @@ linters:
## Excludes for kubeadm types
# We want to align the FeatureGates field to the FeatureGates field in kubeadm.
- path: "api/bootstrap/kubeadm/v1beta2/kubeadm_types.go"
- text: "nomaps: FeatureGates should not use a map type, use a list type with a unique name/identifier instead"
+ text: "nomaps: ClusterConfiguration.FeatureGates should not use a map type, use a list type with a unique name/identifier instead"
linters:
- kubeapilinter
@@ -161,6 +164,16 @@ linters:
linters:
- kubeapilinter
+ # Excludes for existing default markers
+ - path: "api/core/v1beta2/clusterclass_types.go"
+ text: 'forbiddenmarkers: field ValidationRule.Reason has forbidden marker "kubebuilder:default=FieldValueInvalid"'
+ linters:
+ - kubeapilinter
+ - path: "api/core/v1beta2/clusterclass_types.go"
+ text: 'forbiddenmarkers: field ValidationRule.Reason has forbidden marker "default=ref\(sigs.k8s.io/cluster-api/api/core/v1beta2.FieldValueInvalid\)"'
+ linters:
+ - kubeapilinter
+
# TODO: Excludes that should be removed once the corresponding issues in KAL are fixed
# KAL incorrectly reports that the Taints field doesn't have to be a pointer (it has to be to preserve []).
# See: https://github.com/kubernetes-sigs/kube-api-linter/issues/116
diff --git a/.golangci.yml b/.golangci.yml
index bc313cbadf91..4d7e78db2b8a 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -20,9 +20,11 @@ linters:
- durationcheck # multiplying two durations
- errcheck # unchecked errors
- errchkjson # invalid types passed to json encoder
+ - forbidigo # allows to block usage of funcs
- ginkgolinter # ginkgo and gomega
- gocritic # bugs, performance, style (we could add custom ones to this one)
- godot # checks that comments end in a period
+ - godox # block FIXMEs
- goprintffuncname # printft-like functions should be named with f at the end
- gosec # potential security problems
- govet # basically 'go vet'
@@ -51,6 +53,10 @@ linters:
# TODO: It will be dropped when the Go version migration is done.
- usetesting
settings:
+ forbidigo:
+ forbid:
+ - pattern: ctrl.NewControllerManagedBy
+ msg: Use capicontrollerutil.NewControllerManagedBy instead
ginkgolinter:
forbid-focus-container: true
gocritic:
@@ -83,6 +89,9 @@ linters:
- ^ \+.*
- ^ ANCHOR.*
- '^ (alpha|beta|GA): v.*'
+ godox:
+ keywords:
+ - FIXME # FIXME's should be removed before merging PRs
gosec:
excludes:
# integer overflow conversion int -> int32
@@ -174,6 +183,10 @@ linters:
alias: ""
- pkg: sigs.k8s.io/cluster-api/internal/topology/names
alias: topologynames
+ - pkg: sigs.k8s.io/cluster-api/internal/util/client
+ alias: "clientutil"
+ - pkg: sigs.k8s.io/cluster-api/internal/util/controller
+ alias: "capicontrollerutil"
# CAPD
- pkg: sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha3
alias: infrav1alpha3
@@ -257,19 +270,11 @@ linters:
- linters:
- staticcheck
text: 'SA1019: (clusterv1alpha3.*|clusterv1alpha4.*) is deprecated: This type will be removed in one of the next releases.'
- # Specific exclude rules for deprecated feature flags
- - linters:
- - staticcheck
- text: 'SA1019: feature.ClusterResourceSet is deprecated: ClusterResourceSet feature is now GA and the corresponding feature flag will be removed in 1.12 release.'
# v1Beta1 deprecated fields
- linters:
- staticcheck
text: 'SA1019: .*\.Deprecated\.V1Beta1.* is deprecated'
- # CR v0.21 deprecated Result.Requeue, will be fixed incrementally and tracked via https://github.com/kubernetes-sigs/cluster-api/issues/12272
- - linters:
- - staticcheck
- text: 'SA1019: .*(res|result|i|j)\.Requeue is deprecated: Use `RequeueAfter` instead'
- # TODO: var-naming: avoid meaningless package names by revive
+ # TODO: var-naming: avoid meaningless package names by revive
# * test/infrastructure/docker/internal/docker/types/
# * bootstrap/kubeadm/types/
# * internal/webhooks/util/
@@ -402,6 +407,22 @@ linters:
- staticcheck
path: (.+)\.go$
text: 'QF1008: could remove embedded field'
+ - linters:
+ - revive
+ path: errors/.*\.go$
+ text: 'var-naming: avoid package names that conflict with Go standard library package names'
+ - linters:
+ - revive
+ path: internal/util/hash/.*\.go$
+ text: 'var-naming: avoid package names that conflict with Go standard library package names'
+ - linters:
+ - revive
+ path: internal/controllers/topology/cluster/patches/api/.*\.go$
+ text: 'var-naming: avoid meaningless package names'
+ - linters:
+ - revive
+ path: test/infrastructure/inmemory/pkg/server/api/.*\.go$
+ text: 'var-naming: avoid meaningless package names'
issues:
max-issues-per-linter: 0
max-same-issues: 0
diff --git a/CHANGELOG/v1.10.5.md b/CHANGELOG/v1.10.5.md
new file mode 100644
index 000000000000..05c8fea9a6f0
--- /dev/null
+++ b/CHANGELOG/v1.10.5.md
@@ -0,0 +1,37 @@
+## 👌 Kubernetes version support
+
+- Management Cluster: v1.28.x -> v1.33.x
+- Workload Cluster: v1.26.x -> v1.33.x
+
+[More information about version support can be found here](https://cluster-api.sigs.k8s.io/reference/versions.html)
+
+## Changes since v1.10.4
+## :chart_with_upwards_trend: Overview
+- 6 new commits merged
+- 2 feature additions ✨
+- 1 bug fixed 🐛
+
+## :sparkles: New Features
+- KCP: Bump corefile-migration to v1.0.27 (#12637)
+- Runtime SDK: Add mTLS support to runtime extension server and client (#12519)
+
+## :bug: Bug Fixes
+- MachineDeployment: Fix second rolling update for MD rolloutAfter (#12555)
+
+## :seedling: Others
+- Dependency: Bump Go to v1.23.11 (#12530)
+- Dependency: Bump Go to v1.23.12 (#12612)
+- Testing: Skipping test that is failing because of infra issues (#12566)
+
+## Dependencies
+
+### Added
+_Nothing has changed._
+
+### Changed
+- github.com/coredns/corefile-migration: [v1.0.26 → v1.0.27](https://github.com/coredns/corefile-migration/compare/v1.0.26...v1.0.27)
+
+### Removed
+_Nothing has changed._
+
+_Thanks to all our contributors!_ 😊
diff --git a/CHANGELOG/v1.10.6.md b/CHANGELOG/v1.10.6.md
new file mode 100644
index 000000000000..452488e9a18d
--- /dev/null
+++ b/CHANGELOG/v1.10.6.md
@@ -0,0 +1,26 @@
+## 👌 Kubernetes version support
+
+- Management Cluster: v1.28.x -> v1.33.x
+- Workload Cluster: v1.26.x -> v1.33.x
+
+[More information about version support can be found here](https://cluster-api.sigs.k8s.io/reference/versions.html)
+
+## Changes since v1.10.5
+## :chart_with_upwards_trend: Overview
+- 1 new commit merged
+
+## :seedling: Others
+- Dependency: Bump github.com/go-viper/mapstructure/v2 to fix CVE (#12681)
+
+## Dependencies
+
+### Added
+_Nothing has changed._
+
+### Changed
+- github.com/go-viper/mapstructure/v2: [v2.3.0 → v2.4.0](https://github.com/go-viper/mapstructure/compare/v2.3.0...v2.4.0)
+
+### Removed
+_Nothing has changed._
+
+_Thanks to all our contributors!_ 😊
diff --git a/CHANGELOG/v1.10.7.md b/CHANGELOG/v1.10.7.md
new file mode 100644
index 000000000000..195ff7e07034
--- /dev/null
+++ b/CHANGELOG/v1.10.7.md
@@ -0,0 +1,30 @@
+## 👌 Kubernetes version support
+
+- Management Cluster: v1.28.x -> v1.33.x
+- Workload Cluster: v1.26.x -> v1.33.x
+
+[More information about version support can be found here](https://cluster-api.sigs.k8s.io/reference/versions.html)
+
+## Changes since v1.10.6
+## :chart_with_upwards_trend: Overview
+- 2 new commits merged
+- 1 feature addition ✨
+
+## :sparkles: New Features
+- KCP: Bump coredns/corefile-migration to v1.0.28 (#12749)
+
+## :seedling: Others
+- e2e: Fix flaky test in extensionconfig_controller_test.go (#12783)
+
+## Dependencies
+
+### Added
+_Nothing has changed._
+
+### Changed
+- github.com/coredns/corefile-migration: [v1.0.27 → v1.0.28](https://github.com/coredns/corefile-migration/compare/v1.0.27...v1.0.28)
+
+### Removed
+_Nothing has changed._
+
+_Thanks to all our contributors!_ 😊
diff --git a/CHANGELOG/v1.10.8.md b/CHANGELOG/v1.10.8.md
new file mode 100644
index 000000000000..7d4dd6df5cc3
--- /dev/null
+++ b/CHANGELOG/v1.10.8.md
@@ -0,0 +1,33 @@
+## 👌 Kubernetes version support
+
+- Management Cluster: v1.28.x -> v1.33.x
+- Workload Cluster: v1.26.x -> v1.33.x
+
+[More information about version support can be found here](https://cluster-api.sigs.k8s.io/reference/versions.html)
+
+## Changes since v1.10.7
+## :chart_with_upwards_trend: Overview
+- 4 new commits merged
+- 1 feature addition ✨
+
+## :sparkles: New Features
+- KCP: Bump coredns/corefile-migration to v1.0.29 (#12864)
+
+## :seedling: Others
+- clusterctl: Bump cert-manager to v1.19.1 (#12876)
+- clusterctl: Bump cert-manager version to v1.19.0 (#12834)
+
+:book: Additionally, there has been 1 contribution to our documentation and book. (#12838)
+
+## Dependencies
+
+### Added
+_Nothing has changed._
+
+### Changed
+- github.com/coredns/corefile-migration: [v1.0.28 → v1.0.29](https://github.com/coredns/corefile-migration/compare/v1.0.28...v1.0.29)
+
+### Removed
+_Nothing has changed._
+
+_Thanks to all our contributors!_ 😊
diff --git a/CHANGELOG/v1.11.0-rc.1.md b/CHANGELOG/v1.11.0-rc.1.md
new file mode 100644
index 000000000000..6b7756cafe76
--- /dev/null
+++ b/CHANGELOG/v1.11.0-rc.1.md
@@ -0,0 +1,515 @@
+🚨 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/issues/new).
+
+## Highlights
+
+- Bumped to Go 1.24, controller-runtime v0.21, k8s.io/* v0.33, controller-gen v0.18 (also moved to `sigs.k8s.io/randfill`) (#12191)
+- v1beta2 API version has been introduced and considering the awesome amount of improvements it marks an important
+ step in the journey towards graduating our API to v1.
+ - Accordingly there is now a new v1beta2 version of our contract for providers.
+ - Improve status:
+ - The transition to the new K8s aligned conditions using `metav1.Conditions` types and the new condition semantic
+ has been completed.
+ - Replica counters are now consistent with new conditions and across all resources; new replica counters have been added at cluster level.
+ - Semantic of contract fields in status have been improved and are now consistent across all resources.
+ - The confusing `FailureReason` and `FailureMessage` fields have been dropped.
+ - Support CC across namespaces: API changes planned for this feature have been implemented.
+ - Improve object references:
+ - Unnecessary fields have been dropped from object reference.
+ - Object references are now GitOps friendly (API version is not overwritten anymore by controllers).
+ - KubeadmConfig and KubeadmControlPlane APIs have been aligned with kubeadm v1beta4 API.
+ - Additionally, fields inferred from top level objects have been removed, thus getting rid of a common source of confusion/issues.
+- Compliance with K8s API guidelines:
+ - Thanks to the adoption of the [KAL linter](https://github.com/kubernetes-sigs/kube-api-linter) compliance with K8s API guidelines has been greatly improved.
+ - All Duration fields are now represented as `*int32` fields with units being part of the field name.
+ - All `bool` fields have been changed to `*bool` to preserve user intent.
+ - Extensive work has been done to ensure `required` and `optional` is explicitly set in the API, and that
+ both serialization and validation works accordingly:
+ - Stop rendering empty structs (review of all occurrences of `omitempty` and introduction of `omitzero`)
+ - Do not allow `""` when it is not semantically different from value not set (either you have to provide a non-empty string value or not set the field at all).
+ - Do not allow `0` when it is not semantically different from value not set (either you have to provide a non-0 int value or not set the field at all).
+ - Do not allow `{}` when it is not semantically different from value not set (either you have to set at least one property in the object or not set the field at all).
+ - Do not allow `[]` when it is not semantically different from value not set (either you have to set at least one item in the list or not set the field at all).
+ - Ensure validation for all enum types.
+ - Missing list markers have been added for SSA.
+ - Drop unnecessary pointers:
+ - After fixing `required` and `optional` according to K8s API guidelines, extensive work has been done to
+ drop unnecessary pointers thus improving the usability of the API's Go structs.
+ - Avoid embedding structs: Coupling between API types has been reduced by reducing the usage of embedded structs.
+ - Extensive work has been done to improve consistency across all resources, e.g.:
+ - Fields for Machine deletion are under a new `deletion` struct in all resources.
+ - Settings about `rollout` have been logically grouped in all resources.
+ - Settings about health checks and `remediation` have been logically grouped in all resources.
+ - Missing validations have been added where required.
+ - Tech debt has been reduced by dropping deprecated fields.
+* ClusterClass: Fix continuous reconciles because of apiVersion differences in Cluster topology controller (#12341)
+* KCP/CABPK: Add CertificateValidityPeriod and CACertificateValidityPeriod to KubeadmConfig (#12335)
+* KCP: Fix timeout handling in GetAPIServerCertificateExpiry and DialContext (#12554)
+* Machine: fallback to InfraMachine providerID during deletion if Machine providerID is not set (#11985)
+* Runtime SDK:
+ * Optimize size of Runtime Hook requests (#12462)
+ * Add mTLS support to Runtime Extension server and client (#12517)
+* Improved e2e test coverage, e.g.:
+ * additional checks that resourceVersion stays stable after tests and that conditions are healthy (#12546 #12111)
+ * test coverage for scaling from/to 0 with CAPD & cluster-autoscaler (#12572)
+* New providers in clusterctl: Scaleway (#12357), cdk8s (#12332)
+
+See [Cluster API v1.10 compared to v1.11](https://main.cluster-api.sigs.k8s.io/developer/providers/migrations/v1.10-to-v1.11) for more details
+
+## Notes for workload cluster upgrade to Kubernetes v1.34 with KCP
+
+* Context: Kubernetes/kubeadm <=> etcd compatibility:
+ * kubeadm v1.33 only supports etcd v3.5 for Kubernetes v1.33
+ * kubeadm v1.34 only supports etcd v3.6 for Kubernetes v1.34
+* The upgrade to etcd v3.6 requires etcd >= v3.5.20 (https://etcd.io/blog/2025/upgrade_from_3.5_to_3.6_issue/)
+* Accordingly, when upgrading from Kubernetes v1.33 to v1.34:
+ * ensure etcd >= v3.5.20 is used with Kubernetes v1.33 before the upgrade
+ * upgrade to Kubernetes v1.34 and etcd v3.6 at the same time
+
+## Deprecation and Removals Warning
+
+- Cluster: Remove deprecated index ByClusterClassName, ClusterByClusterClassClassName and ClusterClassNameField (#12269)
+- ClusterClass: Remove deprecated ClusterVariable.definitionFrom field (#12202)
+- ClusterClass: Remove deprecated Cluster.spec.topology.rolloutAfter field (#12268)
+- ClusterClass: Remove deprecated ClusterCacheTracker and corresponding types (#12270)
+- clusterctl: Remove deprecated `clusterctl alpha topology plan` command (#12283)
+- ClusterResourceSet: Remove deprecated ClusterResourceSetBinding.DeleteBinding method (#12267)
+- MachineDeployment: Removed deprecated revisionHistory (#12274)
+- MachineDeployment: Remove deprecated spec.progressDeadlineSeconds (#12232)
+- KCP/CABPK: Remove deprecated KubeadmConfig useExperimentalRetryJoin (#12234)
+- API: Deprecate v1alpha1 & v1beta1 API packages (#12254)
+
+:warning: **RELEASE CANDIDATE NOTES** :warning:
+## 👌 Kubernetes version support
+
+- Management Cluster: v1.30.x -> v1.33.x
+- Workload Cluster: v1.28.x -> v1.33.x
+
+[More information about version support can be found here](https://cluster-api.sigs.k8s.io/reference/versions.html)
+
+## Changes since v1.11.0-rc.0
+## :chart_with_upwards_trend: Overview
+- 21 new commits merged
+- 3 feature additions ✨
+- 9 bugs fixed 🐛
+
+## :sparkles: New Features
+- CAPD: Add scale from/to 0 support for CAPD (#12591)
+- e2e: Bump Kubernetes version used for testing to v1.34.0-rc.1 (#12625)
+- KCP/CABPK/CI: Bump KAL to pick up latest requiredfields linter, add Min/MaxLength to BootstrapToken (#12604)
+
+## :bug: Bug Fixes
+- CAPD: Run CAPD conversion tests in CI (#12588)
+- e2e: Fix autoscaler e2e test flake (#12627)
+- KCP: Fix ControlPlaneComponentHealthCheckSeconds validation in KubeadmConfigSpec.Validate (#12624)
+- KCP: Fix conversion issue in KubeadmControlPlaneTemplate with rolloutStrategy.type (#12622)
+- ClusterClass/MachinePool: Fix MP error in desired state calculation during Cluster creation (#12621)
+- Runtime SDK: Export ExtensionConfig webhook (#12599)
+- Testing: Fix flaky TestFuzzyConversion (Cluster) test (#12630)
+- Testing: Fix flaky TestReconcileMachinePhases unit test (#12632)
+- Testing: Fix flaky TestReconcileState unit test (#12633)
+
+## :seedling: Others
+- Dependency: Bump Go to v1.24.6 (#12615)
+- e2e: Add quickstart e2e test with v1beta1 with ClusterClass and RuntimeSDK (#12590)
+- e2e: Improve check for Cluster Available condition in e2e tests (#12596)
+- Logging: Reduce noisy logs (#12626)
+- KCP/CABPK: Stop using unsafe for EnvVar conversion (#12631)
+
+## Dependencies
+
+### Added
+_Nothing has changed._
+
+### Changed
+_Nothing has changed._
+
+### Removed
+_Nothing has changed._
+
+
+More details about the release
+
+## Changes since v1.10.0
+## :chart_with_upwards_trend: Overview
+- 359 new commits merged
+- 88 breaking changes :warning:
+- 28 feature additions ✨
+- 50 bugs fixed 🐛
+
+## :memo: Proposals
+- Core: Update autoscaling from zero enhancement proposal with support for platform-aware autoscale from zero (#11962)
+
+## :warning: Breaking Changes
+- API: Add additional MinProperties & MinItems validation across multiple APIs (#12538)
+- API: Add CAPD v1beta2 types (#12226)
+- API: Add Minimum=0 marker to all MinReadySeconds fields (#12474)
+- API: Add omitempty to required string without zero value (#12548)
+- API: Add omitzero on struct without zero value (#12550)
+- API: Add v1beta2 types (#12037)
+- API: Align Spec fields to optionalfields API conventions (#12431)
+- API: Align Status fields to optionalfields API conventions (#12435)
+- API: Change .status.replicas fields to pointer + omitempty (#12250)
+- API: Change all *metav1.Time fields to metav1.Time (#12518)
+- API: Change bool to *bool for all API types (#12436)
+- API: Change type of *string fields with invalid zero value to string (#12429)
+- API: Change type of int32 fields with valid zero value to *int32 (#12424)
+- API/Conditions: add V1Beta1 suffix and remove V1Beta2 suffix from condition types and reasons in v1beta2 packages (#12091)
+- API: Drop unnecessary fields from contract-versioned object references (#12356)
+- API: Fix required fields linter findings (#12558)
+- API: Improve Cluster CRD Go type (#12489)
+- API: Migrate API to use *Seconds instead of metav1.Duration fields (#12327)
+- API: Move APIs to ./api (#12262)
+- API/Partially revert: Remove DefaulterRemoveUnknownOrOmitableFields mutating webhook option (#12290)
+- API: Promote v1beta2 conditions (#12066)
+- API: Remove DefaulterRemoveUnknownOrOmitableFields mutating webhook option (#12231)
+- API: Remove IPFamily from public APIs (move to CAPD/kind util) (#12215)
+- API: Remove pointers from ClusterClass and Cluster healthCheck fields (#12525)
+- API: Remove pointers from remaining pointer struct fields (#12545)
+- API: Rename namingStrategy => naming, machineNamingStrategy => machineNaming (#12524)
+- API: Restructure strategy fields (#12506)
+- CABPK: Align KubeadmConfig to kubeadm v1beta4 types (#12282)
+- CAPD: Align CAPD conversion to conversion of other providers (#12481)
+- CAPD/Conditions: add V1Beta1 suffix and remove V1Beta2 suffix from condition types and reasons in CAPD v1beta2 packages (#12393)
+- CAPD: Implement v1beta2 contract in CAPD (#12409)
+- CAPD: Keep using v1beta1 condition in CAPD Docker backend (#12450)
+- CAPD: Promote v1beta2 condition in CAPD (#12362)
+- CAPD: Stop using v1beta1 status in CAPD controllers (#12438)
+- CAPD: Update example manifests (#12480)
+- Cluster: Remove deprecated index ByClusterClassName, ClusterByClusterClassClassName and ClusterClassNameField (#12269)
+- ClusterClass: Drop unnecessary fields from ClusterClass template references (#12358)
+- ClusterClass: Move infrastructure namingStrategy field in ClusterClass (#12216)
+- ClusterClass: Remove ClusterVariable.DefinitionFrom field (#12202)
+- ClusterClass: Remove DefaulterRemoveUnknownOrOmitableFields mutating webhook option (again) (#12404)
+- ClusterClass: Remove deprecated Cluster.spec.topology.rolloutAfter field (#12268)
+- ClusterClass: Remove deprecated ClusterCacheTracker and corresponding types (#12270)
+- ClusterClass: Rename deprecated ClusterClass Metadata fields to DeprecatedV1Beta1Metadata (#12273)
+- ClusterClass: Rename runtime extension fields in ClusterClass ExternalPatchDefinition (#12281)
+- ClusterClass: Restructure classRef field in Cluster.spec.topology (#12235)
+- clusterctl: Clusterctl describe defaults to v1beta2 (#12369)
+- clusterctl: Remove clusterctl alpha topology plan (#12283)
+- ClusterResourceSet: Change ClusterResourceSetBinding Bindings field from []*ResourceSetBinding to []ResourceSetBinding (#12476)
+- ClusterResourceSet: Make clusterName field in ClusterResourceSetBinding required (#12276)
+- ClusterResourceSet: Remove deprecated ClusterResourceSetBinding.DeleteBinding method (#12267)
+- Conditions: Swap condition packages (#12086)
+- Dependency: Bump to controller-runtime v0.21 / controller-tools v0.18 / k8s.io/* v0.33 / move to randfill (#12191)
+- e2e: Migrate E2E tests to v1beta2 (#12451)
+- e2e/Test: default to strict field validation & fix unknown field in ClusterClass YAML (#12501)
+- IPAM: Refactor reference types for IPAM (#12365)
+- KCP: KCP tolerates diff not leading to changes on machines (#12402)
+- KCP: Rename LastRemediationStatus.Timestamp to Time in KCP (#12452)
+- Machine: Drop unnecessary fields from Machine status.nodeRef (#12352)
+- MachineDeployment: Drop revisionHistory in MachineDeployment (#12274)
+- MachineDeployment: Remove MD spec.progressDeadlineSeconds (#12232)
+- MachineHealthCheck: Drop unnecessary fields from remediationTemplate references (#12368)
+- MachineHealthCheck: Rename MHC unhealthyConditions to unhealthyNodeConditions (#12245)
+- MachineSet: Make Template in MachineSet & Spec in MachineTemplateSpec required (#12420)
+- API/CAPD: Update ControlPlaneEndpoint InfraCluster contract, align CAPD to infra contracts (#12465)
+- API/Cluster: Add initialization to Cluster status (#12098)
+- API/Control-plane/Bootstrap/KCP/CABPK/Cluster: Implement v1beta2 contract in cluster controller, KCP, CABPK (#12094)
+- API/KCP/CABPK/CI: Enable nomaps linter, Remove unused kubeadm ClusterStatus struct, Migrate Cluster.status.failureDomains to array (#12083)
+- API/Machine: Add initialization to Machine Status (#12101)
+- API/Machine: Move Machine deletion timeout fields into deletion group, move KCP machineTemplate spec fields to machineTemplate.spec (#12499)
+- API/MachinePool: Add initialization to MachinePool Status (#12102)
+- ClusterClass/MachineHealthCheck/Cluster: Restructure MHC fields in MHC, Cluster and ClusterClass CRDs (#12504)
+- clusterctl/Documentation: Remove reference and configurations for Packet (Equinix Metal) (#12143)
+- KCP/CABPK: Change BootstrapToken.Token from *BootstrapTokenString to BootstrapTokenString (#12565)
+- KCP/CABPK: Change envVars fields from []EnvVar to *[]EnvVar (#12539)
+- KCP/CABPK: Change User.PasswdFrom from *PasswdSource to PasswdSource + add omitzero, extend SSA patch helper to handle arrays (#12560)
+- KCP/CABPK: Inline ControlPlaneComponent struct in APIServer / ControllerManager / Scheduler in CABPK (#12446)
+- KCP/CABPK: Remove KubeadmConfig UseExperimentalRetryJoin (#12234)
+- KCP/CABPK: Remove more defaulting from KubeadmConfig/KubeadmConfigTemplate/KCP/KCPTemplate (#12495)
+- KCP/CABPK: Remove redundant fields from CABPK / KCP ClusterConfiguration (#12319)
+- KCP/CABPK: Remove TypeMeta from KubeadmConfigSpec (#12350)
+- KCP/MachineSet/CABPK/CAPD/e2e/Cluster: Cleanup version handling of unsupported Kubernetes releases (#12303)
+- Machine/Cluster: Stop using FailureReason and FailureMessage in controllers (#12148)
+- Machine/MachinePool/MachineSet/MachineDeployment: Add MinReadySeconds to Machine and remove it from MachineDeployment, MachineSet, MachinePool. (#12153)
+- Machine/MachineSet/MachineDeployment/Cluster: Stop using deprecated replica counters in controllers (#12149)
+- MachineSet/MachineDeployment: Use MachineSetDeletePolicy enum in MD & MS API (#12419)
+- Runtime SDK/MachineDeployment: Make DeletePolicy & FailurePolicy enum fields non-pointers (#12453)
+- Runtime SDK: Add v1beta2 API for ExtensionConfig (#12197)
+- Runtime SDK: Change ExtensionConfig handler timeoutSeconds from *int32 to int32 & add Minimum=1 (#12475)
+
+## :sparkles: New Features
+- API: Block imports to internal packages in our API + restructure import restrictions (#12302)
+- API: Deprecate v1alpha1 & v1beta1 API packages (#12254)
+- API: Remove pointer, add omitzero & MinProperties for initialization fields/structs (#12482)
+- CAPD: Add scale from/to 0 support for CAPD (#12591)
+- CI: Add conflicting markers linter (#12569)
+- CI: Bump KAL & add the notimestamps linter (#12520)
+- clusterctl: Add Scaleway infrastructure provider to clusterctl (#12357)
+- clusterctl: Adding Addon Provider for cdk8s (CAAPC) to cluster-api (#12332)
+- clusterctl: Clearer diagnostics when provider metadata is missing or repo URL is stale (#12238)
+- clusterctl: Validate provider metadata (#12242)
+- Dependency: Bump controller-tools v0.17.3, conversion-gen v0.33.0 (#12129)
+- Dependency: Complete bump to Kubernetes v1.33 (#12206)
+- Dependency: Update KUBEBUILDER_ENVTEST_KUBERNETES_VERSION (#12130)
+- e2e: Bump Kubernetes version used for testing to v1.34.0-beta.0 (#12516)
+- e2e: Bump Kubernetes version used for testing to v1.34.0-rc.1 (#12625)
+- e2e: From 1.10 use GetStableReleaseOfMinor instead of GetLatestReleaseOfMinor (#12118)
+- Machine: Implement v1beta2 contract in Machine controller (#12038)
+- MachinePool/Feat: set new replica fields for machine pools (#12528)
+- API/CI: Enable ssatags KAL linter (#12470)
+- KCP/CABPK/CI: Bump KAL to pick up latest requiredfields linter, add Min/MaxLength to BootstrapToken (#12604)
+- KCP/CABPK: Add CertificateValidityPeriod and CACertificateValidityPeriod to KubeadmConfig (#12335)
+- KCP/CABPK: Reintroduce KCP/CABPK ClusterConfiguration controlPlaneEndpoint (#12423)
+- KCP/CABPK: Stop requiring init or cluster configuration for first CP machine (#12540)
+- Runtime SDK/ClusterClass: Extend Cluster builtin to include metadata (#12014)
+- Runtime SDK/ClusterClass: Optimize size of runtime hook requests (#12462)
+- Runtime SDK: Add mTLS support to runtime extension server and client (#12517)
+- Runtime SDK: Extend cluster builtin to include classNamespace (#12050)
+- Testing: Bump Kubernetes in tests to v1.33.0 and claim support for v1.33 (#12104)
+
+## :bug: Bug Fixes
+- API: Ensure all pointer status fields are dereferenced correctly (#12412)
+- Bootstrap: Make joinConfiguration.discovery.bootstrapToken.token optional (#12107)
+- Bootstrap: Relax minLength for bootstrap.dataSecretName to 0 (#12164)
+- CABPK: Fix rendering of .Append = false in CABPK (#12437)
+- CABPK: Fix rendering of ntp.enabled & users.inactive *bool values in cloud init (#12394)
+- CABPK: Increase ignition additionalConfig maxSize from 10 to 32 KB (#12222)
+- CABPK: Make KubeadmConfig FileSystem.Label optional (#12019)
+- CAPD: Fix IPv6 CAPD e2e test (#12488)
+- CAPD: Fix worker machine count in CAPD template (#12028)
+- CAPD: Run CAPD conversion tests in CI (#12588)
+- CAPIM: Fix CAPD in-memory templates (#12013)
+- CAPIM/Mux: fix error check (#12230)
+- CI: Fix conversion-verifier and fix findings (#12349)
+- CI: Fixing failed to install kind for e2e tests (#12361)
+- ClusterClass: Fix continuous reconciles because of apiVersion differences in Cluster topology controller (#12341)
+- clusterctl: Accept upper case version (#12237)
+- clusterctl: Add missing API version to NS object (#12200)
+- clusterctl: Clusterctl upgrade hangs for a time on CRD migration when new version contains a number of new CRDs (#11984)
+- ClusterResourceSet: Fix potential panic if ClusterResourceSetStrategy is not defined or incorrect (#12096)
+- Conditions: Fix condition handling during controller start (#12536)
+- e2e: Bump cluster-autoscaler to v1.33, adjust RBAC, pin apiVersion to v1beta1 (#12502)
+- e2e: Fix autoscaler e2e test flake (#12627)
+- e2e: Fix Available/Ready checks on E2E test (#12549)
+- e2e: Fix e2e tests by fixing the etcd tag (#12523)
+- e2e: Stop overwriting ExtraPortMappings if WithDockerSockMount option is used (#12012)
+- IPAM: Enable conversion in CRDs (#12198)
+- IPAM: Revert condition func changes for IPAddressClaim v1beta1 (#12223)
+- KCP: Allow transition of KubeadmControlPlaneTemplate from defaulted rolloutStrategy to unset (#12467)
+- KCP: Fix ControlPlaneComponentHealthCheckSeconds validation in KubeadmConfigSpec.Validate (#12624)
+- KCP: Fix conversion issue in KubeadmControlPlaneTemplate with rolloutStrategy.type (#12622)
+- KCP: Fix nil pointer in conversion (#12292)
+- KCP: Fix rollout when init configuration in KCP is empty (#12344)
+- KCP: Fix timeout handling in GetAPIServerCertificateExpiry and DialContext (#12554)
+- Machine/Machine deletion: fallback to InfraMachine providerID if Machine providerID is not set (#11985)
+- MachineDeployment: Bug fix to set machinedeployment AvailableReplicas (#12410)
+- MachineDeployment: Fix second rolling update for MD rolloutAfter (#12261)
+- MachineSet: Fix v1beta1 MachinesReady condition on MachineSet (#12535)
+- API/ClusterClass: Fix MaxLength of worker topology Name fields (#12072)
+- ClusterClass/MachinePool: Fix MP error in desired state calculation during Cluster creation (#12621)
+- Dependency/CI: Upgrade golangci-lint to v2.1.0 (#12170)
+- Testing/CI: Fix the condition to check whether cluster has v1beta2 conditions (#12100)
+- Runtime SDK: Export ExtensionConfig webhook (#12599)
+- Testing: Fix flakes in TestAPIAndWebhookChanges unit test (#12526)
+- Testing: Fix flaky TestFuzzyConversion (Cluster) test (#12630)
+- Testing: Fix flaky TestReconcileMachinePhases unit test (#12632)
+- Testing: Fix flaky TestReconcileState unit test (#12633)
+- Testing: Fix race condition in InMemoryMachine controller tests (#12347)
+- Testing: Fix Test_ValidateCluster unit tests for mink8s (#12564)
+- util/CRD migration: Fix cases where update validation fails (#11991)
+- util: Fix typo for WithOwnedV1beta1Conditions to WithOwnedV1Beta1Conditions (#12218)
+
+## :seedling: Others
+- API: Drop hardcoded v1beta1 references (#12027)
+- API: Enable optionalfields linter and fix remaining findings (#12299)
+- API: Move internal/apis to internal/api (#12296)
+- API: Remove old godoc comment, remove unnecessary cast in KCP (#12479)
+- API: Remove unused List conversion funcs (#12054)
+- API: Set minimum=1 on ObservedGeneration and KubeadmConfig APIEndpoint bindPort (#12417)
+- API: Set print columns for v1beta2 types (#12534)
+- CAPD: Ensure CAPD v1beta1 API package only imports core v1beta1 (#12405)
+- CAPIM/Mux: Ignore net.ErrClosed error during listener close & server shutdown (#12212)
+- CI: Add govulncheck to ensure vulnerability (#12108)
+- CI: Bump E2E to Kubernetes v1.33.0-rc.1 (#12099)
+- CI: Bump golangci-lint v2 (#12088)
+- CI: Bump KAL and remove enum exclude (#12500)
+- CI: Bump KAL to 20250605073038, cleanup excludes, fix IPAM prefix field, add MaxItems to Machine.status.addresses (#12326)
+- CI: Bump KAL to 20250626 + enable uniquemarkers linter (#12427)
+- CI/Chore: Update golangci-lint to v2.3.0 (#12573)
+- CI: Enable duplicatemarkers linter (#12228)
+- CI: Enable statusoptional linter (#12229)
+- CI: Fix `make generate-go-openapi` if parent directory name does not equal `cluster-api` (#12461)
+- CI: Remove govulncheck from the verify target (#12348)
+- CI: Restructure excludes in KAL linter config (#12445)
+- CI: Switch plugin to kube-api-linter (#12089)
+- CI: Update version matrix for github workflows for release-1.10 (#11992)
+- CI: Use release artifacts for CAPI v1.10 (#12147)
+- Cluster: Add validation for Cluster spec.controlPlaneRef, spec.infrastructureRef and spec.topology (#12454)
+- Cluster: Ensure Cluster.status.failureDomains are alphabetically sorted (#12416)
+- Cluster: Improve error message if rebase fails because target ClusterClass is not reconciled (#12415)
+- ClusterClass: Add DropEmptyStruct to ssa patch helper (#12442)
+- ClusterClass/Extend topology upgrade test: add bool removal test case (#12484)
+- ClusterClass: Improve CC RefVersionsUpToDate condition message (#12472)
+- ClusterClass: Improve validation of worker topology names in Cluster resource (#12561)
+- ClusterClass: Improve webhook output to include the names of the clusters blocking a deletion (#12060)
+- ClusterClass: Make infrastructure and controlPlane required in ClusterClass (#12444)
+- clusterctl: Add filename to clusterctl error about bad YAML (#12189)
+- clusterctl: Add support for compatible contracts to clusterctl (#12018)
+- clusterctl: Bump cert-manager to v1.17.1 (#12044)
+- clusterctl: Bump cert-manager to v1.17.2 (#12210)
+- clusterctl: Bump cert-manager to v1.18.0 (#12342)
+- clusterctl: Bump cert-manager to v1.18.1 (#12378)
+- clusterctl: Bump cert-manager to v1.18.2 (#12478)
+- clusterctl: Change k0smotron repo location (#12225)
+- clusterctl: Cleanup clusterctl tests assets (#12510)
+- clusterctl: Enforce skip upgrade policy in clusterctl (#12017)
+- Community meeting: Add JoelSpeed to approvers (#12204)
+- Conditions: Cleanup v1beta1 updateStatus functions (#12190)
+- Conditions: Drop usage of v1beta1 conditions (#12109)
+- Control-plane: Avoid large number of connection error traces in kubeadm controlplane controller (#12106)
+- Dependency: Bump Go 1.24 (#12128)
+- Dependency: Bump go to v1.23.8 (#12052)
+- Dependency: Bump Go to v1.24.5 (#12509)
+- Dependency: Bump Go to v1.24.6 (#12615)
+- Dependency: Bump kustomize to v5.7.0 (#12432)
+- Dependency: Bump several tool versions in Makefile (#12433)
+- Dependency: Bump sigs.k8s.io/kind to v0.28.0 (#12243)
+- Dependency: Bump sigs.k8s.io/kind to v0.29.0 (#12257)
+- Dependency: Bump to Go v1.24.4, github.com/cloudflare/circl v1.6.1 (#12351)
+- Dependency: Fix CVE-2025-54388 (#12574)
+- Dependency: Update github.com/go-viper/mapstructure/v2 to v2.3.0 (#12421)
+- Devtools: Add KubeVirt support to Tilt dev workflow (#11697)
+- Devtools: Fix Tiltfile (#12541)
+- Devtools/Metrics: use v1beta2 for condition metrics and add metrics for dockercluster devcluster dockermachine devmachine extensionconfig ipaddressclaim and crs (#12006)
+- e2e: Add an option to override custom node image name for kind cluster (#12186)
+- e2e: Add quickstart e2e test with v1beta1 with ClusterClass and RuntimeSDK (#12590)
+- e2e: Add resource version check to clusterctl upgrade tests (#12546)
+- e2e: Add retry for SSA requests against Kubernetes < v1.29 in clusterctl upgrade tests (#12067)
+- e2e: Bump clusterctl_upgrade_test.go main and 1.10 tests to k8s v1.33.0 (#12193)
+- e2e: Bump Kubernetes version used for testing to v1.33.0-rc.0 (#12073)
+- e2e: Fix ResourceVersion flake for MachinePools (#12552)
+- e2e: Improve check for Cluster Available condition in e2e tests (#12596)
+- e2e: Only run DescribeCluster if v1beta2 Cluster CRD is there (#12279)
+- e2e: Print the entire object diff if resource versions are not stable in e2e tests (#12527)
+- e2e: Remove redundant check in verifyV1Beta2ConditionsTrueV1Beta1 (#12477)
+- e2e: Set extraArgs in test extension (#12557)
+- e2e: Skipping test that is failing because of infra issues (#12496)
+- KCP: Add --etcd-client-log-level flag to KCP (#12271)
+- KCP: Allow unsetting etcd.local, etcd.external and dns (#12065)
+- KCP: Bump corefile-migration library to v1.0.26 (#12058)
+- KCP: Fix typo in forward etcd leadership error message (#12056)
+- Logging: Reduce noisy logs (#12626)
+- Misc: Remove jackfrancis from reviewers (#12134)
+- KCP/CABPK/KCP: Set MinItems=1 on ExternalEtcd.Endpoints (#12411)
+- KCP/CABPK: Remove unused updateClusterStatus (#12295)
+- KCP/CABPK: Stop using unsafe for EnvVar conversion (#12631)
+- KCP/MachineSet/MachineHealthCheck: Remove explicit defaulting of MS deletePolicy, MHC maxUnhealthy, KCPTemplate rolloutStrategy (#12464)
+- MachinePool/MachineSet/MachineDeployment: Add validation to ensure ClusterName fields are equal in MD/MS/MP (#12447)
+- Testing/CI/e2e: Add checker to validate conditions for v1beta2 (#12111)
+- Testing/CI: Fix e2e test capi-e2e-release-1.8 (#12379)
+- Testing/CI: Fix flaky test in extensionconfig_controller_test.go (#12386)
+- Release: Add validation for PREVIOUS_RELEASE_TAG in release-notes-tool (#12380)
+- Release: Postpone v1.11 code freeze by one week (#12498)
+- Release: Prepare main for v1.11 development (#12000)
+- Release: Use github.base_ref in markdown-link-check (#12034)
+- Runtime SDK: Block dependencies to internal packages for the RX implementation (#12297)
+- Runtime SDK: Fix lifecycle hooks conversions (#12507)
+- Runtime SDK: Stop registering API types in the runtime extension scheme (#12042)
+- Testing: Add test/framework/* tests in CI (#12469)
+- Testing/Framework: Watch logs from init containers (#12208)
+- Testing: Release Notes Generator - Test cases for main.go and ref.go (#11882)
+- Testing: Test changes planned to comply optionalrequired linter (#12414)
+- util: Move contract version & GetCompatibleVersions to contract package (#12032)
+- util: Recover v1.10 util packages for conditions, patch and paused to util/deprecated/v1beta1 for provider migrations (#12224)
+
+:book: Additionally, there have been 51 contributions to our documentation and book. (#11029, #11998, #12004, #12057, #12074, #12093, #12117, #12120, #12122, #12125, #12126, #12131, #12139, #12140, #12145, #12150, #12163, #12165, #12188, #12201, #12205, #12236, #12246, #12266, #12284, #12287, #12306, #12309, #12328, #12333, #12377, #12382, #12403, #12418, #12428, #12439, #12443, #12455, #12483, #12491, #12503, #12521, #12532, #12543, #12571, #12575, #12576, #12587, #12589, #12595, #12602)
+
+## Dependencies
+
+### Added
+- github.com/envoyproxy/go-control-plane/envoy: [v1.32.4](https://github.com/envoyproxy/go-control-plane/tree/envoy/v1.32.4)
+- github.com/envoyproxy/go-control-plane/ratelimit: [v0.1.0](https://github.com/envoyproxy/go-control-plane/tree/ratelimit/v0.1.0)
+- github.com/klauspost/compress: [v1.18.0](https://github.com/klauspost/compress/tree/v1.18.0)
+- github.com/kylelemons/godebug: [v1.1.0](https://github.com/kylelemons/godebug/tree/v1.1.0)
+- github.com/prashantv/gostub: [v1.1.0](https://github.com/prashantv/gostub/tree/v1.1.0)
+- go.opentelemetry.io/auto/sdk: v1.1.0
+- go.uber.org/automaxprocs: v1.6.0
+- go.yaml.in/yaml/v2: v2.4.2
+- go.yaml.in/yaml/v3: v3.0.3
+- gopkg.in/go-jose/go-jose.v2: v2.6.3
+- sigs.k8s.io/randfill: v1.0.0
+
+### Changed
+- cel.dev/expr: v0.18.0 → v0.19.1
+- github.com/cloudflare/circl: [v1.3.7 → v1.6.1](https://github.com/cloudflare/circl/compare/v1.3.7...v1.6.1)
+- github.com/cncf/xds/go: [b4127c9 → cff3c89](https://github.com/cncf/xds/compare/b4127c9...cff3c89)
+- github.com/coreos/go-oidc: [v2.2.1+incompatible → v2.3.0+incompatible](https://github.com/coreos/go-oidc/compare/v2.2.1...v2.3.0)
+- github.com/envoyproxy/go-control-plane: [v0.13.1 → v0.13.4](https://github.com/envoyproxy/go-control-plane/compare/v0.13.1...v0.13.4)
+- github.com/envoyproxy/protoc-gen-validate: [v1.1.0 → v1.2.1](https://github.com/envoyproxy/protoc-gen-validate/compare/v1.1.0...v1.2.1)
+- github.com/go-logr/logr: [v1.4.2 → v1.4.3](https://github.com/go-logr/logr/compare/v1.4.2...v1.4.3)
+- github.com/go-viper/mapstructure/v2: [v2.2.1 → v2.3.0](https://github.com/go-viper/mapstructure/compare/v2.2.1...v2.3.0)
+- github.com/golang-jwt/jwt/v4: [v4.5.0 → v4.5.2](https://github.com/golang-jwt/jwt/compare/v4.5.0...v4.5.2)
+- github.com/golang/glog: [v1.2.2 → v1.2.4](https://github.com/golang/glog/compare/v1.2.2...v1.2.4)
+- github.com/google/cel-go: [v0.22.0 → v0.23.2](https://github.com/google/cel-go/compare/v0.22.0...v0.23.2)
+- github.com/google/gnostic-models: [v0.6.8 → v0.6.9](https://github.com/google/gnostic-models/compare/v0.6.8...v0.6.9)
+- github.com/google/pprof: [40e02aa → 27863c8](https://github.com/google/pprof/compare/40e02aa...27863c8)
+- github.com/gorilla/websocket: [v1.5.3 → e064f32](https://github.com/gorilla/websocket/compare/v1.5.3...e064f32)
+- github.com/grpc-ecosystem/grpc-gateway/v2: [v2.20.0 → v2.24.0](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.20.0...v2.24.0)
+- github.com/onsi/ginkgo/v2: [v2.23.3 → v2.23.4](https://github.com/onsi/ginkgo/compare/v2.23.3...v2.23.4)
+- github.com/onsi/gomega: [v1.36.3 → v1.38.0](https://github.com/onsi/gomega/compare/v1.36.3...v1.38.0)
+- github.com/pmezard/go-difflib: [5d4384e → v1.0.0](https://github.com/pmezard/go-difflib/compare/5d4384e...v1.0.0)
+- github.com/prometheus/client_golang: [v1.19.1 → v1.22.0](https://github.com/prometheus/client_golang/compare/v1.19.1...v1.22.0)
+- github.com/prometheus/common: [v0.55.0 → v0.62.0](https://github.com/prometheus/common/compare/v0.55.0...v0.62.0)
+- 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.6 → v1.0.7](https://github.com/spf13/pflag/compare/v1.0.6...v1.0.7)
+- github.com/spf13/viper: [v1.20.0 → v1.20.1](https://github.com/spf13/viper/compare/v1.20.0...v1.20.1)
+- github.com/stretchr/objx: [v0.5.0 → v0.5.2](https://github.com/stretchr/objx/compare/v0.5.0...v0.5.2)
+- go.etcd.io/etcd/api/v3: v3.5.20 → v3.5.22
+- go.etcd.io/etcd/client/pkg/v3: v3.5.20 → v3.5.22
+- go.etcd.io/etcd/client/v2: v2.305.16 → v2.305.21
+- go.etcd.io/etcd/client/v3: v3.5.20 → v3.5.22
+- go.etcd.io/etcd/pkg/v3: v3.5.16 → v3.5.21
+- go.etcd.io/etcd/raft/v3: v3.5.16 → v3.5.21
+- go.etcd.io/etcd/server/v3: v3.5.16 → v3.5.21
+- go.opentelemetry.io/contrib/detectors/gcp: v1.29.0 → v1.34.0
+- go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc: v0.54.0 → v0.58.0
+- go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp: v0.54.0 → v0.58.0
+- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc: v1.27.0 → v1.33.0
+- go.opentelemetry.io/otel/exporters/otlp/otlptrace: v1.28.0 → v1.33.0
+- go.opentelemetry.io/otel/metric: v1.29.0 → v1.34.0
+- go.opentelemetry.io/otel/sdk/metric: v1.29.0 → v1.34.0
+- go.opentelemetry.io/otel/sdk: v1.29.0 → v1.34.0
+- go.opentelemetry.io/otel/trace: v1.29.0 → v1.34.0
+- go.opentelemetry.io/otel: v1.29.0 → v1.34.0
+- go.opentelemetry.io/proto/otlp: v1.3.1 → v1.4.0
+- golang.org/x/crypto: v0.36.0 → v0.40.0
+- golang.org/x/mod: v0.23.0 → v0.25.0
+- golang.org/x/net: v0.37.0 → v0.42.0
+- golang.org/x/oauth2: v0.28.0 → v0.30.0
+- golang.org/x/sync: v0.12.0 → v0.16.0
+- golang.org/x/sys: v0.31.0 → v0.34.0
+- golang.org/x/term: v0.30.0 → v0.33.0
+- golang.org/x/text: v0.23.0 → v0.27.0
+- golang.org/x/time: v0.8.0 → v0.9.0
+- golang.org/x/tools: v0.30.0 → v0.34.0
+- google.golang.org/genproto/googleapis/api: e6fa225 → 5f5ef82
+- google.golang.org/genproto/googleapis/rpc: 3abc09e → 1a7da9e
+- google.golang.org/grpc: v1.67.3 → v1.71.3
+- google.golang.org/protobuf: v1.36.5 → v1.36.6
+- k8s.io/api: v0.32.3 → v0.33.3
+- k8s.io/apiextensions-apiserver: v0.32.3 → v0.33.3
+- k8s.io/apimachinery: v0.32.3 → v0.33.3
+- k8s.io/apiserver: v0.32.3 → v0.33.3
+- k8s.io/client-go: v0.32.3 → v0.33.3
+- k8s.io/cluster-bootstrap: v0.32.3 → v0.33.3
+- k8s.io/code-generator: v0.32.3 → v0.33.3
+- k8s.io/component-base: v0.32.3 → v0.33.3
+- k8s.io/gengo/v2: 2b36238 → 1244d31
+- k8s.io/kms: v0.32.3 → v0.33.3
+- k8s.io/kube-openapi: 32ad38e → c8a335a
+- sigs.k8s.io/apiserver-network-proxy/konnectivity-client: v0.31.0 → v0.31.2
+- sigs.k8s.io/controller-runtime: v0.20.4 → v0.21.0
+- sigs.k8s.io/structured-merge-diff/v4: v4.4.2 → v4.6.0
+- sigs.k8s.io/yaml: v1.4.0 → v1.6.0
+
+### Removed
+- github.com/asaskevich/govalidator: [f61b66f](https://github.com/asaskevich/govalidator/tree/f61b66f)
+- github.com/go-kit/log: [v0.2.1](https://github.com/go-kit/log/tree/v0.2.1)
+- github.com/go-logfmt/logfmt: [v0.5.1](https://github.com/go-logfmt/logfmt/tree/v0.5.1)
+- gopkg.in/square/go-jose.v2: v2.6.0
+
+
+
+_Thanks to all our contributors!_ 😊
diff --git a/CHANGELOG/v1.11.0.md b/CHANGELOG/v1.11.0.md
new file mode 100644
index 000000000000..cfe13edb494b
--- /dev/null
+++ b/CHANGELOG/v1.11.0.md
@@ -0,0 +1,469 @@
+## 👌 Kubernetes version support
+
+- Management Cluster: v1.30.x -> v1.33.x
+- Workload Cluster: v1.28.x -> v1.33.x
+
+[More information about version support can be found here](https://cluster-api.sigs.k8s.io/reference/versions.html)
+
+## Highlights
+
+- Bumped to Go 1.24, controller-runtime v0.21, k8s.io/* v0.33, controller-gen v0.18 (also moved to `sigs.k8s.io/randfill`) (#12191)
+- v1beta2 API version has been introduced and considering the awesome amount of improvements it marks an important
+ step in the journey towards graduating our API to v1.
+ - Accordingly there is now a new v1beta2 version of our contract for providers.
+ - Improve status:
+ - The transition to the new K8s aligned conditions using `metav1.Conditions` types and the new condition semantic
+ has been completed.
+ - Replica counters are now consistent with new conditions and across all resources; new replica counters have been added at cluster level.
+ - Semantic of contract fields in status have been improved and are now consistent across all resources.
+ - The confusing `FailureReason` and `FailureMessage` fields have been dropped.
+ - Support CC across namespaces: API changes planned for this feature have been implemented.
+ - Improve object references:
+ - Unnecessary fields have been dropped from object reference.
+ - Object references are now GitOps friendly (API version is not overwritten anymore by controllers).
+ - KubeadmConfig and KubeadmControlPlane APIs have been aligned with kubeadm v1beta4 API.
+ - Additionally, fields inferred from top level objects have been removed, thus getting rid of a common source of confusion/issues.
+- Compliance with K8s API guidelines:
+ - Thanks to the adoption of the [KAL linter](https://github.com/kubernetes-sigs/kube-api-linter) compliance with K8s API guidelines has been greatly improved.
+ - All Duration fields are now represented as `*int32` fields with units being part of the field name.
+ - All `bool` fields have been changed to `*bool` to preserve user intent.
+ - Extensive work has been done to ensure `required` and `optional` is explicitly set in the API, and that
+ both serialization and validation works accordingly:
+ - Stop rendering empty structs (review of all occurrences of `omitempty` and introduction of `omitzero`)
+ - Do not allow `""` when it is not semantically different from value not set (either you have to provide a non-empty string value or not set the field at all).
+ - Do not allow `0` when it is not semantically different from value not set (either you have to provide a non-0 int value or not set the field at all).
+ - Do not allow `{}` when it is not semantically different from value not set (either you have to set at least one property in the object or not set the field at all).
+ - Do not allow `[]` when it is not semantically different from value not set (either you have to set at least one item in the list or not set the field at all).
+ - Ensure validation for all enum types.
+ - Missing list markers have been added for SSA.
+ - Drop unnecessary pointers:
+ - After fixing `required` and `optional` according to K8s API guidelines, extensive work has been done to
+ drop unnecessary pointers thus improving the usability of the API's Go structs.
+ - Avoid embedding structs: Coupling between API types has been reduced by reducing the usage of embedded structs.
+ - Extensive work has been done to improve consistency across all resources, e.g.:
+ - Fields for Machine deletion are under a new `deletion` struct in all resources.
+ - Settings about `rollout` have been logically grouped in all resources.
+ - Settings about health checks and `remediation` have been logically grouped in all resources.
+ - Missing validations have been added where required.
+ - Tech debt has been reduced by dropping deprecated fields.
+* ClusterClass: Fix continuous reconciles because of apiVersion differences in Cluster topology controller (#12341)
+* KCP/CABPK: Add CertificateValidityPeriod and CACertificateValidityPeriod to KubeadmConfig (#12335)
+* KCP: Fix timeout handling in GetAPIServerCertificateExpiry and DialContext (#12554)
+* Machine: fallback to InfraMachine providerID during deletion if Machine providerID is not set (#11985)
+* Runtime SDK:
+ * Optimize size of Runtime Hook requests (#12462)
+ * Add mTLS support to Runtime Extension server and client (#12517)
+* Improved e2e test coverage, e.g.:
+ * additional checks that resourceVersion stays stable after tests and that conditions are healthy (#12546 #12111)
+ * test coverage for scaling from/to 0 with CAPD & cluster-autoscaler (#12572)
+* New providers in clusterctl: Scaleway (#12357), cdk8s (#12332)
+
+See [Cluster API v1.10 compared to v1.11](https://main.cluster-api.sigs.k8s.io/developer/providers/migrations/v1.10-to-v1.11) for more details
+
+## Notes for workload cluster upgrade to Kubernetes v1.34 with KCP
+
+* Context: Kubernetes/kubeadm <=> etcd compatibility:
+ * kubeadm v1.33 only supports etcd v3.5 for Kubernetes v1.33
+ * kubeadm v1.34 only supports etcd v3.6 for Kubernetes v1.34
+* The upgrade to etcd v3.6 requires etcd >= v3.5.20 (https://etcd.io/blog/2025/upgrade_from_3.5_to_3.6_issue/)
+* Accordingly, when upgrading from Kubernetes v1.33 to v1.34:
+ * ensure etcd >= v3.5.20 is used with Kubernetes v1.33 before the upgrade
+ * upgrade to Kubernetes v1.34 and etcd v3.6 at the same time
+
+## Deprecation and Removals Warning
+
+- Cluster: Remove deprecated index ByClusterClassName, ClusterByClusterClassClassName and ClusterClassNameField (#12269)
+- ClusterClass: Remove deprecated ClusterVariable.definitionFrom field (#12202)
+- ClusterClass: Remove deprecated Cluster.spec.topology.rolloutAfter field (#12268)
+- ClusterClass: Remove deprecated ClusterCacheTracker and corresponding types (#12270)
+- clusterctl: Remove deprecated `clusterctl alpha topology plan` command (#12283)
+- ClusterResourceSet: Remove deprecated ClusterResourceSetBinding.DeleteBinding method (#12267)
+- MachineDeployment: Removed deprecated revisionHistory (#12274)
+- MachineDeployment: Remove deprecated spec.progressDeadlineSeconds (#12232)
+- KCP/CABPK: Remove deprecated KubeadmConfig useExperimentalRetryJoin (#12234)
+- API: Deprecate v1alpha1 & v1beta1 API packages (#12254)
+
+## Changes since v1.10.0
+## :chart_with_upwards_trend: Overview
+- 360 new commits merged
+- 88 breaking changes :warning:
+- 29 feature additions ✨
+- 50 bugs fixed 🐛
+
+## :memo: Proposals
+- Core: Update autoscaling from zero enhancement proposal with support for platform-aware autoscale from zero (#11962)
+
+## :warning: Breaking Changes
+- API: Add additional MinProperties & MinItems validation across multiple APIs (#12538)
+- API: Add CAPD v1beta2 types (#12226)
+- API: Add Minimum=0 marker to all MinReadySeconds fields (#12474)
+- API: Add omitempty to required string without zero value (#12548)
+- API: Add omitzero on struct without zero value (#12550)
+- API: Add v1beta2 types (#12037)
+- API: Align Spec fields to optionalfields API conventions (#12431)
+- API: Align Status fields to optionalfields API conventions (#12435)
+- API: Change .status.replicas fields to pointer + omitempty (#12250)
+- API: Change all *metav1.Time fields to metav1.Time (#12518)
+- API: Change bool to *bool for all API types (#12436)
+- API: Change type of *string fields with invalid zero value to string (#12429)
+- API: Change type of int32 fields with valid zero value to *int32 (#12424)
+- API/Conditions: add V1Beta1 suffix and remove V1Beta2 suffix from condition types and reasons in v1beta2 packages (#12091)
+- API: Drop unnecessary fields from contract-versioned object references (#12356)
+- API: Fix required fields linter findings (#12558)
+- API: Improve Cluster CRD Go type (#12489)
+- API: Migrate API to use *Seconds instead of metav1.Duration fields (#12327)
+- API: Move APIs to ./api (#12262)
+- API/Partially revert: Remove DefaulterRemoveUnknownOrOmitableFields mutating webhook option (#12290)
+- API: Promote v1beta2 conditions (#12066)
+- API: Remove DefaulterRemoveUnknownOrOmitableFields mutating webhook option (#12231)
+- API: Remove IPFamily from public APIs (move to CAPD/kind util) (#12215)
+- API: Remove pointers from ClusterClass and Cluster healthCheck fields (#12525)
+- API: Remove pointers from remaining pointer struct fields (#12545)
+- API: Rename namingStrategy => naming, machineNamingStrategy => machineNaming (#12524)
+- API: Restructure strategy fields (#12506)
+- CABPK: Align KubeadmConfig to kubeadm v1beta4 types (#12282)
+- CAPD: Align CAPD conversion to conversion of other providers (#12481)
+- CAPD/Conditions: add V1Beta1 suffix and remove V1Beta2 suffix from condition types and reasons in CAPD v1beta2 packages (#12393)
+- CAPD: Implement v1beta2 contract in CAPD (#12409)
+- CAPD: Keep using v1beta1 condition in CAPD Docker backend (#12450)
+- CAPD: Promote v1beta2 condition in CAPD (#12362)
+- CAPD: Stop using v1beta1 status in CAPD controllers (#12438)
+- CAPD: Update example manifests (#12480)
+- Cluster: Remove deprecated index ByClusterClassName, ClusterByClusterClassClassName and ClusterClassNameField (#12269)
+- ClusterClass: Drop unnecessary fields from ClusterClass template references (#12358)
+- ClusterClass: Move infrastructure namingStrategy field in ClusterClass (#12216)
+- ClusterClass: Remove ClusterVariable.DefinitionFrom field (#12202)
+- ClusterClass: Remove DefaulterRemoveUnknownOrOmitableFields mutating webhook option (again) (#12404)
+- ClusterClass: Remove deprecated Cluster.spec.topology.rolloutAfter field (#12268)
+- ClusterClass: Remove deprecated ClusterCacheTracker and corresponding types (#12270)
+- ClusterClass: Rename deprecated ClusterClass Metadata fields to DeprecatedV1Beta1Metadata (#12273)
+- ClusterClass: Rename runtime extension fields in ClusterClass ExternalPatchDefinition (#12281)
+- ClusterClass: Restructure classRef field in Cluster.spec.topology (#12235)
+- clusterctl: Clusterctl describe defaults to v1beta2 (#12369)
+- clusterctl: Remove clusterctl alpha topology plan (#12283)
+- ClusterResourceSet: Change ClusterResourceSetBinding Bindings field from []*ResourceSetBinding to []ResourceSetBinding (#12476)
+- ClusterResourceSet: Make clusterName field in ClusterResourceSetBinding required (#12276)
+- ClusterResourceSet: Remove deprecated ClusterResourceSetBinding.DeleteBinding method (#12267)
+- Conditions: Swap condition packages (#12086)
+- Dependency: Bump to controller-runtime v0.21 / controller-tools v0.18 / k8s.io/* v0.33 / move to randfill (#12191)
+- e2e: Migrate E2E tests to v1beta2 (#12451)
+- e2e/Test/e2e: default to strict field validation & fix unknown field in ClusterClass YAML (#12501)
+- IPAM: Refactor reference types for IPAM (#12365)
+- KCP: KCP tolerates diff not leading to changes on machines (#12402)
+- KCP: Rename LastRemediationStatus.Timestamp to Time in KCP (#12452)
+- Machine: Drop unnecessary fields from Machine status.nodeRef (#12352)
+- MachineDeployment: Drop revisionHistory in MachineDeployment (#12274)
+- MachineDeployment: Remove MD spec.progressDeadlineSeconds (#12232)
+- MachineHealthCheck: Drop unnecessary fields from remediationTemplate references (#12368)
+- MachineHealthCheck: Rename MHC unhealthyConditions to unhealthyNodeConditions (#12245)
+- MachineSet: Make Template in MachineSet & Spec in MachineTemplateSpec required (#12420)
+- API/CAPD: Update ControlPlaneEndpoint InfraCluster contract, align CAPD to infra contracts (#12465)
+- API/Cluster: Add initialization to Cluster status (#12098)
+- API/Control-plane/Bootstrap/KCP/CABPK/Cluster: Implement v1beta2 contract in cluster controller, KCP, CABPK (#12094)
+- API/KCP/CABPK/CI: Enable nomaps linter, Remove unused kubeadm ClusterStatus struct, Migrate Cluster.status.failureDomains to array (#12083)
+- API/Machine: Add initialization to Machine Status (#12101)
+- API/Machine: Move Machine deletion timeout fields into deletion group, move KCP machineTemplate spec fields to machineTemplate.spec (#12499)
+- API/MachinePool: Add initialization to MachinePool Status (#12102)
+- ClusterClass/MachineHealthCheck/Cluster: Restructure MHC fields in MHC, Cluster and ClusterClass CRDs (#12504)
+- clusterctl/Documentation: Remove reference and configurations for Packet (Equinix Metal) (#12143)
+- KCP/CABPK: Change BootstrapToken.Token from *BootstrapTokenString to BootstrapTokenString (#12565)
+- KCP/CABPK: Change envVars fields from []EnvVar to *[]EnvVar (#12539)
+- KCP/CABPK: Change User.PasswdFrom from *PasswdSource to PasswdSource + add omitzero, extend SSA patch helper to handle arrays (#12560)
+- KCP/CABPK: Inline ControlPlaneComponent struct in APIServer / ControllerManager / Scheduler in CABPK (#12446)
+- KCP/CABPK: Remove KubeadmConfig UseExperimentalRetryJoin (#12234)
+- KCP/CABPK: Remove more defaulting from KubeadmConfig/KubeadmConfigTemplate/KCP/KCPTemplate (#12495)
+- KCP/CABPK: Remove redundant fields from CABPK / KCP ClusterConfiguration (#12319)
+- KCP/CABPK: Remove TypeMeta from KubeadmConfigSpec (#12350)
+- KCP/MachineSet/CABPK/CAPD/e2e/Cluster: Cleanup version handling of unsupported Kubernetes releases (#12303)
+- Machine/Cluster: Stop using FailureReason and FailureMessage in controllers (#12148)
+- Machine/MachinePool/MachineSet/MachineDeployment: Add MinReadySeconds to Machine and remove it from MachineDeployment, MachineSet, MachinePool. (#12153)
+- Machine/MachineSet/MachineDeployment/Cluster: Stop using deprecated replica counters in controllers (#12149)
+- MachineSet/MachineDeployment: Use MachineSetDeletePolicy enum in MD & MS API (#12419)
+- Runtime SDK/MachineDeployment: Make DeletePolicy & FailurePolicy enum fields non-pointers (#12453)
+- Runtime SDK: Add v1beta2 API for ExtensionConfig (#12197)
+- Runtime SDK: Change ExtensionConfig handler timeoutSeconds from *int32 to int32 & add Minimum=1 (#12475)
+
+## :sparkles: New Features
+- API: Block imports to internal packages in our API + restructure import restrictions (#12302)
+- API: Deprecate v1alpha1 & v1beta1 API packages (#12254)
+- API: Remove pointer, add omitzero & MinProperties for initialization fields/structs (#12482)
+- CAPD: Add scale from/to 0 support for CAPD (#12591)
+- CI: Add conflicting markers linter (#12569)
+- CI: Bump KAL & add the notimestamps linter (#12520)
+- clusterctl: Add Scaleway infrastructure provider to clusterctl (#12357)
+- clusterctl: Adding Addon Provider for cdk8s (CAAPC) to cluster-api (#12332)
+- clusterctl: Clearer diagnostics when provider metadata is missing or repo URL is stale (#12238)
+- clusterctl: Validate provider metadata (#12242)
+- Dependency: Bump controller-tools v0.17.3, conversion-gen v0.33.0 (#12129)
+- Dependency: Complete bump to Kubernetes v1.33 (#12206)
+- Dependency: Update KUBEBUILDER_ENVTEST_KUBERNETES_VERSION (#12130)
+- e2e: Bump Kubernetes version used for testing to v1.34.0-beta.0 (#12516)
+- e2e: Bump Kubernetes version used for testing to v1.34.0-rc.1 (#12625)
+- e2e: From 1.10 use GetStableReleaseOfMinor instead of GetLatestReleaseOfMinor (#12118)
+- KCP: Bump corefile-migration to v1.0.27 (#12639)
+- Machine: Implement v1beta2 contract in Machine controller (#12038)
+- MachinePool/Feat: set new replica fields for machine pools (#12528)
+- API/CI: Enable ssatags KAL linter (#12470)
+- KCP/CABPK/CI: Bump KAL to pick up latest requiredfields linter, add Min/MaxLength to BootstrapToken (#12604)
+- KCP/CABPK: Add CertificateValidityPeriod and CACertificateValidityPeriod to KubeadmConfig (#12335)
+- KCP/CABPK: Reintroduce KCP/CABPK ClusterConfiguration controlPlaneEndpoint (#12423)
+- KCP/CABPK: Stop requiring init or cluster configuration for first CP machine (#12540)
+- Runtime SDK/ClusterClass: Extend Cluster builtin to include metadata (#12014)
+- Runtime SDK/ClusterClass: Optimize size of runtime hook requests (#12462)
+- Runtime SDK: Add mTLS support to runtime extension server and client (#12517)
+- Runtime SDK: Extend cluster builtin to include classNamespace (#12050)
+- Testing: Bump Kubernetes in tests to v1.33.0 and claim support for v1.33 (#12104)
+
+## :bug: Bug Fixes
+- API: Ensure all pointer status fields are dereferenced correctly (#12412)
+- Bootstrap: Make joinConfiguration.discovery.bootstrapToken.token optional (#12107)
+- Bootstrap: Relax minLength for bootstrap.dataSecretName to 0 (#12164)
+- CABPK: Fix rendering of .Append = false in CABPK (#12437)
+- CABPK: Fix rendering of ntp.enabled & users.inactive *bool values in cloud init (#12394)
+- CABPK: Increase ignition additionalConfig maxSize from 10 to 32 KB (#12222)
+- CABPK: Make KubeadmConfig FileSystem.Label optional (#12019)
+- CAPD: Fix IPv6 CAPD e2e test (#12488)
+- CAPD: Fix worker machine count in CAPD template (#12028)
+- CAPD: Run CAPD conversion tests in CI (#12588)
+- CAPIM: Fix CAPD in-memory templates (#12013)
+- CAPIM/Mux: fix error check (#12230)
+- CI: Fix conversion-verifier and fix findings (#12349)
+- CI: Fixing failed to install kind for e2e tests (#12361)
+- ClusterClass: Fix continuous reconciles because of apiVersion differences in Cluster topology controller (#12341)
+- clusterctl: Accept upper case version (#12237)
+- clusterctl: Add missing API version to NS object (#12200)
+- clusterctl: Clusterctl upgrade hangs for a time on CRD migration when new version contains a number of new CRDs (#11984)
+- ClusterResourceSet: Fix potential panic if ClusterResourceSetStrategy is not defined or incorrect (#12096)
+- Conditions: Fix condition handling during controller start (#12536)
+- e2e: Bump cluster-autoscaler to v1.33, adjust RBAC, pin apiVersion to v1beta1 (#12502)
+- e2e: Fix autoscaler e2e test flake (#12627)
+- e2e: Fix Available/Ready checks on E2E test (#12549)
+- e2e: Fix e2e tests by fixing the etcd tag (#12523)
+- e2e: Stop overwriting ExtraPortMappings if WithDockerSockMount option is used (#12012)
+- IPAM: Enable conversion in CRDs (#12198)
+- IPAM: Revert condition func changes for IPAddressClaim v1beta1 (#12223)
+- KCP: Allow transition of KubeadmControlPlaneTemplate from defaulted rolloutStrategy to unset (#12467)
+- KCP: Fix ControlPlaneComponentHealthCheckSeconds validation in KubeadmConfigSpec.Validate (#12624)
+- KCP: Fix conversion issue in KubeadmControlPlaneTemplate with rolloutStrategy.type (#12622)
+- KCP: Fix nil pointer in conversion (#12292)
+- KCP: Fix rollout when init configuration in KCP is empty (#12344)
+- KCP: Fix timeout handling in GetAPIServerCertificateExpiry and DialContext (#12554)
+- Machine/Machine deletion: fallback to InfraMachine providerID if Machine providerID is not set (#11985)
+- MachineDeployment: Bug fix to set machinedeployment AvailableReplicas (#12410)
+- MachineDeployment: Fix second rolling update for MD rolloutAfter (#12261)
+- MachineSet: Fix v1beta1 MachinesReady condition on MachineSet (#12535)
+- API/ClusterClass: Fix MaxLength of worker topology Name fields (#12072)
+- ClusterClass/MachinePool: Fix MP error in desired state calculation during Cluster creation (#12621)
+- Dependency/CI: Upgrade golangci-lint to v2.1.0 (#12170)
+- Testing/CI: Fix the condition to check whether cluster has v1beta2 conditions (#12100)
+- Runtime SDK: Export ExtensionConfig webhook (#12599)
+- Testing: Fix flakes in TestAPIAndWebhookChanges unit test (#12526)
+- Testing: Fix flaky TestFuzzyConversion (Cluster) test (#12630)
+- Testing: Fix flaky TestReconcileMachinePhases unit test (#12632)
+- Testing: Fix flaky TestReconcileState unit test (#12633)
+- Testing: Fix race condition in InMemoryMachine controller tests (#12347)
+- Testing: Fix Test_ValidateCluster unit tests for mink8s (#12564)
+- util/CRD migration: Fix cases where update validation fails (#11991)
+- util: Fix typo for WithOwnedV1beta1Conditions to WithOwnedV1Beta1Conditions (#12218)
+
+## :seedling: Others
+- API: Drop hardcoded v1beta1 references (#12027)
+- API: Enable optionalfields linter and fix remaining findings (#12299)
+- API: Move internal/apis to internal/api (#12296)
+- API: Remove old godoc comment, remove unnecessary cast in KCP (#12479)
+- API: Remove unused List conversion funcs (#12054)
+- API: Set minimum=1 on ObservedGeneration and KubeadmConfig APIEndpoint bindPort (#12417)
+- API: Set print columns for v1beta2 types (#12534)
+- CAPD: Ensure CAPD v1beta1 API package only imports core v1beta1 (#12405)
+- CAPIM/Mux: Ignore net.ErrClosed error during listener close & server shutdown (#12212)
+- CI: Add govulncheck to ensure vulnerability (#12108)
+- CI: Bump E2E to Kubernetes v1.33.0-rc.1 (#12099)
+- CI: Bump golangci-lint v2 (#12088)
+- CI: Bump KAL and remove enum exclude (#12500)
+- CI: Bump KAL to 20250605073038, cleanup excludes, fix IPAM prefix field, add MaxItems to Machine.status.addresses (#12326)
+- CI: Bump KAL to 20250626 + enable uniquemarkers linter (#12427)
+- CI/Chore: Update golangci-lint to v2.3.0 (#12573)
+- CI: Enable duplicatemarkers linter (#12228)
+- CI: Enable statusoptional linter (#12229)
+- CI: Fix `make generate-go-openapi` if parent directory name does not equal `cluster-api` (#12461)
+- CI: Remove govulncheck from the verify target (#12348)
+- CI: Restructure excludes in KAL linter config (#12445)
+- CI: Switch plugin to kube-api-linter (#12089)
+- CI: Update version matrix for github workflows for release-1.10 (#11992)
+- CI: Use release artifacts for CAPI v1.10 (#12147)
+- Cluster: Add validation for Cluster spec.controlPlaneRef, spec.infrastructureRef and spec.topology (#12454)
+- Cluster: Ensure Cluster.status.failureDomains are alphabetically sorted (#12416)
+- Cluster: Improve error message if rebase fails because target ClusterClass is not reconciled (#12415)
+- ClusterClass: Add DropEmptyStruct to ssa patch helper (#12442)
+- ClusterClass: Extend topology upgrade test: add bool removal test case (#12484)
+- ClusterClass: Improve CC RefVersionsUpToDate condition message (#12472)
+- ClusterClass: Improve validation of worker topology names in Cluster resource (#12561)
+- ClusterClass: Improve webhook output to include the names of the clusters blocking a deletion (#12060)
+- ClusterClass: Make infrastructure and controlPlane required in ClusterClass (#12444)
+- clusterctl: Add filename to clusterctl error about bad YAML (#12189)
+- clusterctl: Add support for compatible contracts to clusterctl (#12018)
+- clusterctl: Bump cert-manager to v1.17.1 (#12044)
+- clusterctl: Bump cert-manager to v1.17.2 (#12210)
+- clusterctl: Bump cert-manager to v1.18.0 (#12342)
+- clusterctl: Bump cert-manager to v1.18.1 (#12378)
+- clusterctl: Bump cert-manager to v1.18.2 (#12478)
+- clusterctl: Change k0smotron repo location (#12225)
+- clusterctl: Cleanup clusterctl tests assets (#12510)
+- clusterctl: Enforce skip upgrade policy in clusterctl (#12017)
+- Community meeting: Add JoelSpeed to approvers (#12204)
+- Conditions: Cleanup v1beta1 updateStatus functions (#12190)
+- Conditions: Drop usage of v1beta1 conditions (#12109)
+- Control-plane: Avoid large number of connection error traces in kubeadm controlplane controller (#12106)
+- Dependency: Bump Go 1.24 (#12128)
+- Dependency: Bump go to v1.23.8 (#12052)
+- Dependency: Bump Go to v1.24.5 (#12509)
+- Dependency: Bump Go to v1.24.6 (#12615)
+- Dependency: Bump kustomize to v5.7.0 (#12432)
+- Dependency: Bump several tool versions in Makefile (#12433)
+- Dependency: Bump sigs.k8s.io/kind to v0.28.0 (#12243)
+- Dependency: Bump sigs.k8s.io/kind to v0.29.0 (#12257)
+- Dependency: Bump to Go v1.24.4, github.com/cloudflare/circl v1.6.1 (#12351)
+- Dependency: Fix CVE-2025-54388 (#12574)
+- Dependency: Update github.com/go-viper/mapstructure/v2 to v2.3.0 (#12421)
+- Devtools: Add KubeVirt support to Tilt dev workflow (#11697)
+- Devtools: Fix Tiltfile (#12541)
+- Devtools/Metrics: use v1beta2 for condition metrics and add metrics for dockercluster devcluster dockermachine devmachine extensionconfig ipaddressclaim and crs (#12006)
+- e2e: Add an option to override custom node image name for kind cluster (#12186)
+- e2e: Add quickstart e2e test with v1beta1 with ClusterClass and RuntimeSDK (#12590)
+- e2e: Add resource version check to clusterctl upgrade tests (#12546)
+- e2e: Add retry for SSA requests against Kubernetes < v1.29 in clusterctl upgrade tests (#12067)
+- e2e: Bump clusterctl_upgrade_test.go main and 1.10 tests to k8s v1.33.0 (#12193)
+- e2e: Bump Kubernetes version used for testing to v1.33.0-rc.0 (#12073)
+- e2e: Fix ResourceVersion flake for MachinePools (#12552)
+- e2e: Improve check for Cluster Available condition in e2e tests (#12596)
+- e2e: Only run DescribeCluster if v1beta2 Cluster CRD is there (#12279)
+- e2e: Print the entire object diff if resource versions are not stable in e2e tests (#12527)
+- e2e: Remove redundant check in verifyV1Beta2ConditionsTrueV1Beta1 (#12477)
+- e2e: Set extraArgs in test extension (#12557)
+- e2e: Skipping test that is failing because of infra issues (#12496)
+- KCP: Add --etcd-client-log-level flag to KCP (#12271)
+- KCP: Allow unsetting etcd.local, etcd.external and dns (#12065)
+- KCP: Bump corefile-migration library to v1.0.26 (#12058)
+- KCP: Fix typo in forward etcd leadership error message (#12056)
+- Logging: Reduce noisy logs (#12626)
+- Misc: Remove jackfrancis from reviewers (#12134)
+- KCP/CABPK/KCP: Set MinItems=1 on ExternalEtcd.Endpoints (#12411)
+- KCP/CABPK: Remove unused updateClusterStatus (#12295)
+- KCP/CABPK: Stop using unsafe for EnvVar conversion (#12631)
+- KCP/MachineSet/MachineHealthCheck: Remove explicit defaulting of MS deletePolicy, MHC maxUnhealthy, KCPTemplate rolloutStrategy (#12464)
+- MachinePool/MachineSet/MachineDeployment: Add validation to ensure ClusterName fields are equal in MD/MS/MP (#12447)
+- Testing/CI/e2e: Add checker to validate conditions for v1beta2 (#12111)
+- Testing/CI: Fix e2e test capi-e2e-release-1.8 (#12379)
+- Testing/CI: Fix flaky test in extensionconfig_controller_test.go (#12386)
+- Release: Add validation for PREVIOUS_RELEASE_TAG in release-notes-tool (#12380)
+- Release: Postpone v1.11 code freeze by one week (#12498)
+- Release: Prepare main for v1.11 development (#12000)
+- Release: Use github.base_ref in markdown-link-check (#12034)
+- Runtime SDK: Block dependencies to internal packages for the RX implementation (#12297)
+- Runtime SDK: Fix lifecycle hooks conversions (#12507)
+- Runtime SDK: Stop registering API types in the runtime extension scheme (#12042)
+- Testing: Add test/framework/* tests in CI (#12469)
+- Testing/Framework: Watch logs from init containers (#12208)
+- Testing: Release Notes Generator - Test cases for main.go and ref.go (#11882)
+- Testing: Test changes planned to comply optionalrequired linter (#12414)
+- util: Move contract version & GetCompatibleVersions to contract package (#12032)
+- util: Recover v1.10 util packages for conditions, patch and paused to util/deprecated/v1beta1 for provider migrations (#12224)
+
+:book: Additionally, there have been 51 contributions to our documentation and book. (#11029, #11998, #12004, #12057, #12074, #12093, #12117, #12120, #12122, #12125, #12126, #12131, #12139, #12140, #12145, #12150, #12163, #12165, #12188, #12201, #12205, #12236, #12246, #12266, #12284, #12287, #12306, #12309, #12328, #12333, #12377, #12382, #12403, #12418, #12428, #12439, #12443, #12455, #12483, #12491, #12503, #12521, #12532, #12543, #12571, #12575, #12576, #12587, #12589, #12595, #12602)
+
+## Dependencies
+
+### Added
+- github.com/envoyproxy/go-control-plane/envoy: [v1.32.4](https://github.com/envoyproxy/go-control-plane/tree/envoy/v1.32.4)
+- github.com/envoyproxy/go-control-plane/ratelimit: [v0.1.0](https://github.com/envoyproxy/go-control-plane/tree/ratelimit/v0.1.0)
+- github.com/klauspost/compress: [v1.18.0](https://github.com/klauspost/compress/tree/v1.18.0)
+- github.com/kylelemons/godebug: [v1.1.0](https://github.com/kylelemons/godebug/tree/v1.1.0)
+- github.com/prashantv/gostub: [v1.1.0](https://github.com/prashantv/gostub/tree/v1.1.0)
+- go.opentelemetry.io/auto/sdk: v1.1.0
+- go.uber.org/automaxprocs: v1.6.0
+- go.yaml.in/yaml/v2: v2.4.2
+- go.yaml.in/yaml/v3: v3.0.3
+- gopkg.in/go-jose/go-jose.v2: v2.6.3
+- sigs.k8s.io/randfill: v1.0.0
+
+### Changed
+- cel.dev/expr: v0.18.0 → v0.19.1
+- github.com/cloudflare/circl: [v1.3.7 → v1.6.1](https://github.com/cloudflare/circl/compare/v1.3.7...v1.6.1)
+- github.com/cncf/xds/go: [b4127c9 → cff3c89](https://github.com/cncf/xds/compare/b4127c9...cff3c89)
+- github.com/coredns/corefile-migration: [v1.0.26 → v1.0.27](https://github.com/coredns/corefile-migration/compare/v1.0.26...v1.0.27)
+- github.com/coreos/go-oidc: [v2.2.1+incompatible → v2.3.0+incompatible](https://github.com/coreos/go-oidc/compare/v2.2.1...v2.3.0)
+- github.com/envoyproxy/go-control-plane: [v0.13.1 → v0.13.4](https://github.com/envoyproxy/go-control-plane/compare/v0.13.1...v0.13.4)
+- github.com/envoyproxy/protoc-gen-validate: [v1.1.0 → v1.2.1](https://github.com/envoyproxy/protoc-gen-validate/compare/v1.1.0...v1.2.1)
+- github.com/go-logr/logr: [v1.4.2 → v1.4.3](https://github.com/go-logr/logr/compare/v1.4.2...v1.4.3)
+- github.com/go-viper/mapstructure/v2: [v2.2.1 → v2.3.0](https://github.com/go-viper/mapstructure/compare/v2.2.1...v2.3.0)
+- github.com/golang-jwt/jwt/v4: [v4.5.0 → v4.5.2](https://github.com/golang-jwt/jwt/compare/v4.5.0...v4.5.2)
+- github.com/golang/glog: [v1.2.2 → v1.2.4](https://github.com/golang/glog/compare/v1.2.2...v1.2.4)
+- github.com/google/cel-go: [v0.22.0 → v0.23.2](https://github.com/google/cel-go/compare/v0.22.0...v0.23.2)
+- github.com/google/gnostic-models: [v0.6.8 → v0.6.9](https://github.com/google/gnostic-models/compare/v0.6.8...v0.6.9)
+- github.com/google/pprof: [40e02aa → 27863c8](https://github.com/google/pprof/compare/40e02aa...27863c8)
+- github.com/gorilla/websocket: [v1.5.3 → e064f32](https://github.com/gorilla/websocket/compare/v1.5.3...e064f32)
+- github.com/grpc-ecosystem/grpc-gateway/v2: [v2.20.0 → v2.24.0](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.20.0...v2.24.0)
+- github.com/onsi/ginkgo/v2: [v2.23.3 → v2.23.4](https://github.com/onsi/ginkgo/compare/v2.23.3...v2.23.4)
+- github.com/onsi/gomega: [v1.36.3 → v1.38.0](https://github.com/onsi/gomega/compare/v1.36.3...v1.38.0)
+- github.com/pmezard/go-difflib: [5d4384e → v1.0.0](https://github.com/pmezard/go-difflib/compare/5d4384e...v1.0.0)
+- github.com/prometheus/client_golang: [v1.19.1 → v1.22.0](https://github.com/prometheus/client_golang/compare/v1.19.1...v1.22.0)
+- github.com/prometheus/common: [v0.55.0 → v0.62.0](https://github.com/prometheus/common/compare/v0.55.0...v0.62.0)
+- 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.6 → v1.0.7](https://github.com/spf13/pflag/compare/v1.0.6...v1.0.7)
+- github.com/spf13/viper: [v1.20.0 → v1.20.1](https://github.com/spf13/viper/compare/v1.20.0...v1.20.1)
+- github.com/stretchr/objx: [v0.5.0 → v0.5.2](https://github.com/stretchr/objx/compare/v0.5.0...v0.5.2)
+- go.etcd.io/etcd/api/v3: v3.5.20 → v3.5.22
+- go.etcd.io/etcd/client/pkg/v3: v3.5.20 → v3.5.22
+- go.etcd.io/etcd/client/v2: v2.305.16 → v2.305.21
+- go.etcd.io/etcd/client/v3: v3.5.20 → v3.5.22
+- go.etcd.io/etcd/pkg/v3: v3.5.16 → v3.5.21
+- go.etcd.io/etcd/raft/v3: v3.5.16 → v3.5.21
+- go.etcd.io/etcd/server/v3: v3.5.16 → v3.5.21
+- go.opentelemetry.io/contrib/detectors/gcp: v1.29.0 → v1.34.0
+- go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc: v0.54.0 → v0.58.0
+- go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp: v0.54.0 → v0.58.0
+- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc: v1.27.0 → v1.33.0
+- go.opentelemetry.io/otel/exporters/otlp/otlptrace: v1.28.0 → v1.33.0
+- go.opentelemetry.io/otel/metric: v1.29.0 → v1.34.0
+- go.opentelemetry.io/otel/sdk/metric: v1.29.0 → v1.34.0
+- go.opentelemetry.io/otel/sdk: v1.29.0 → v1.34.0
+- go.opentelemetry.io/otel/trace: v1.29.0 → v1.34.0
+- go.opentelemetry.io/otel: v1.29.0 → v1.34.0
+- go.opentelemetry.io/proto/otlp: v1.3.1 → v1.4.0
+- golang.org/x/crypto: v0.36.0 → v0.40.0
+- golang.org/x/mod: v0.23.0 → v0.25.0
+- golang.org/x/net: v0.37.0 → v0.42.0
+- golang.org/x/oauth2: v0.28.0 → v0.30.0
+- golang.org/x/sync: v0.12.0 → v0.16.0
+- golang.org/x/sys: v0.31.0 → v0.34.0
+- golang.org/x/term: v0.30.0 → v0.33.0
+- golang.org/x/text: v0.23.0 → v0.27.0
+- golang.org/x/time: v0.8.0 → v0.9.0
+- golang.org/x/tools: v0.30.0 → v0.34.0
+- google.golang.org/genproto/googleapis/api: e6fa225 → 5f5ef82
+- google.golang.org/genproto/googleapis/rpc: 3abc09e → 1a7da9e
+- google.golang.org/grpc: v1.67.3 → v1.71.3
+- google.golang.org/protobuf: v1.36.5 → v1.36.6
+- k8s.io/api: v0.32.3 → v0.33.3
+- k8s.io/apiextensions-apiserver: v0.32.3 → v0.33.3
+- k8s.io/apimachinery: v0.32.3 → v0.33.3
+- k8s.io/apiserver: v0.32.3 → v0.33.3
+- k8s.io/client-go: v0.32.3 → v0.33.3
+- k8s.io/cluster-bootstrap: v0.32.3 → v0.33.3
+- k8s.io/code-generator: v0.32.3 → v0.33.3
+- k8s.io/component-base: v0.32.3 → v0.33.3
+- k8s.io/gengo/v2: 2b36238 → 1244d31
+- k8s.io/kms: v0.32.3 → v0.33.3
+- k8s.io/kube-openapi: 32ad38e → c8a335a
+- sigs.k8s.io/apiserver-network-proxy/konnectivity-client: v0.31.0 → v0.31.2
+- sigs.k8s.io/controller-runtime: v0.20.4 → v0.21.0
+- sigs.k8s.io/structured-merge-diff/v4: v4.4.2 → v4.6.0
+- sigs.k8s.io/yaml: v1.4.0 → v1.6.0
+
+### Removed
+- github.com/asaskevich/govalidator: [f61b66f](https://github.com/asaskevich/govalidator/tree/f61b66f)
+- github.com/go-kit/log: [v0.2.1](https://github.com/go-kit/log/tree/v0.2.1)
+- github.com/go-logfmt/logfmt: [v0.5.1](https://github.com/go-logfmt/logfmt/tree/v0.5.1)
+- gopkg.in/square/go-jose.v2: v2.6.0
+
+_Thanks to all our contributors!_ 😊
diff --git a/CHANGELOG/v1.11.1.md b/CHANGELOG/v1.11.1.md
new file mode 100644
index 000000000000..3daea6a4298c
--- /dev/null
+++ b/CHANGELOG/v1.11.1.md
@@ -0,0 +1,51 @@
+## 👌 Kubernetes version support
+
+- Management Cluster: v1.30.x -> v1.34.x
+- Workload Cluster: v1.28.x -> v1.34.x
+
+[More information about version support can be found here](https://cluster-api.sigs.k8s.io/reference/versions.html)
+
+## Changes since v1.11.0
+## :chart_with_upwards_trend: Overview
+- 22 new commits merged
+- 3 feature additions ✨
+- 8 bugs fixed 🐛
+
+## :sparkles: New Features
+- CI: Bump autoscaler to a9cb59fdd (#12707)
+- CI: Bump Kubernetes in tests to v1.34.0 and claim support for v1.34 (#12705)
+- e2e: Bump Kubernetes version used for testing to v1.34.0-rc.2 (#12659)
+
+## :bug: Bug Fixes
+- API: Only try to convert infraRefs if they are set (#12693)
+- API: Register conversion funcs in schemes (#12697)
+- CABPK: Always use latest apiVersion when getting owner of KubeadmConfig in CABPK (#12689)
+- ClusterClass: Ensure holder field path in GeneratePatchRequest is set based on contract (#12691)
+- ClusterClass: Fix field paths in ClusterClass compatibility validation errors (#12670)
+- ClusterClass: Stop adding conversion-data annotation to Cluster object (#12721)
+- e2e/CAPD: Remove finalizers during deletion if ownerRef was never set (#12678)
+- Testing: Fix KubeadmConfig fuzz test flake (#12682)
+
+## :seedling: Others
+- clusterctl: Allow metadata.yaml's Kind to be empty (#12715)
+- Dependency: Bump github.com/go-viper/mapstructure/v2 to fix CVE (#12680)
+- Dependency: Bump to envtest v1.34.0 (#12706)
+- e2e: Bump to kind v0.30.0 (#12708)
+- e2e: Get kind mgmt cluster logs in clusterctl upgrade test (#12688)
+- Misc: Log version and git commit on controller start (#12696)
+- Release/clusterctl: Add CAPRKE2 to release tool’s issue-opening providers list (#12717)
+
+:book: Additionally, there have been 4 contributions to our documentation and book. (#12667, #12668, #12671, #12674)
+
+## Dependencies
+
+### Added
+_Nothing has changed._
+
+### Changed
+- github.com/go-viper/mapstructure/v2: [v2.3.0 → v2.4.0](https://github.com/go-viper/mapstructure/compare/v2.3.0...v2.4.0)
+
+### Removed
+_Nothing has changed._
+
+_Thanks to all our contributors!_ 😊
diff --git a/CHANGELOG/v1.11.2.md b/CHANGELOG/v1.11.2.md
new file mode 100644
index 000000000000..e422c0a134b4
--- /dev/null
+++ b/CHANGELOG/v1.11.2.md
@@ -0,0 +1,38 @@
+## 👌 Kubernetes version support
+
+- Management Cluster: v1.30.x -> v1.34.x
+- Workload Cluster: v1.28.x -> v1.34.x
+
+[More information about version support can be found here](https://cluster-api.sigs.k8s.io/reference/versions.html)
+
+## Changes since v1.11.1
+## :chart_with_upwards_trend: Overview
+- 6 new commits merged
+- 1 feature addition ✨
+- 1 bug fixed 🐛
+
+## :sparkles: New Features
+- KCP: Bump coredns/corefile-migration to v1.0.28 (#12750)
+
+## :bug: Bug Fixes
+- clusterctl: Verify providers need upgrade before applying (#12768)
+
+## :seedling: Others
+- Autoscaling: Bump autoscaler in e2e tests to v1.33.1 (#12792)
+- clusterctl: Add Metal3 as an IPAMProvider (#12760)
+- Dependency: Bump go to v1.24.7 (#12735)
+
+:book: Additionally, there has been 1 contribution to our documentation and book. (#12780)
+
+## Dependencies
+
+### Added
+_Nothing has changed._
+
+### Changed
+- github.com/coredns/corefile-migration: [v1.0.27 → v1.0.28](https://github.com/coredns/corefile-migration/compare/v1.0.27...v1.0.28)
+
+### Removed
+_Nothing has changed._
+
+_Thanks to all our contributors!_ 😊
diff --git a/CHANGELOG/v1.11.3.md b/CHANGELOG/v1.11.3.md
new file mode 100644
index 000000000000..74df98d4ebe5
--- /dev/null
+++ b/CHANGELOG/v1.11.3.md
@@ -0,0 +1,38 @@
+## 👌 Kubernetes version support
+
+- Management Cluster: v1.30.x -> v1.34.x
+- Workload Cluster: v1.28.x -> v1.34.x
+
+[More information about version support can be found here](https://cluster-api.sigs.k8s.io/reference/versions.html)
+
+## Changes since v1.11.2
+## :chart_with_upwards_trend: Overview
+- 13 new commits merged
+- 1 feature addition ✨
+
+## :sparkles: New Features
+- KCP: Bump coredns/corefile-migration to v1.0.29 (#12863)
+
+## :seedling: Others
+- CAPD: Recreate container if we re-enter reconciliation and it exists but is not running (#12933)
+- clusterctl: Bump cert-manager to v1.19.0 (#12832)
+- clusterctl: Bump cert-manager to v1.19.1 (#12875)
+- Dependency: Bump Go to v1.24.8 (#12829)
+- Dependency: Bump Go to v1.24.9 (#12868)
+- e2e: Fix self-hosted to actually read DOCKER_PRELOAD_IMAGES from the e2e config (#12932)
+- Runtime SDK: Add hint to look into controller logs to runtime client error response (#12850)
+
+:book: Additionally, there have been 5 contributions to our documentation and book. (#12837, #12839, #12887, #12894, #12916)
+
+## Dependencies
+
+### Added
+_Nothing has changed._
+
+### Changed
+- github.com/coredns/corefile-migration: [v1.0.28 → v1.0.29](https://github.com/coredns/corefile-migration/compare/v1.0.28...v1.0.29)
+
+### Removed
+_Nothing has changed._
+
+_Thanks to all our contributors!_ 😊
diff --git a/CHANGELOG/v1.12.0-beta.0.md b/CHANGELOG/v1.12.0-beta.0.md
new file mode 100644
index 000000000000..4568babdf52b
--- /dev/null
+++ b/CHANGELOG/v1.12.0-beta.0.md
@@ -0,0 +1,298 @@
+🚨 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/issues/new).
+
+More details about the release
+
+:warning: **BETA RELEASE NOTES** :warning:
+
+## Changes since v1.11.0
+## :chart_with_upwards_trend: Overview
+- 197 new commits merged
+- 3 breaking changes :warning:
+- 34 feature additions ✨
+- 26 bugs fixed 🐛
+
+## :warning: Breaking Changes
+- CI: Improve KAL config docs for forbidding OpenAPI defaulting (#12869)
+- clusterctl/Feat(clusterctl): block move when Cluster or ClusterClass is paused (#12786)
+- Dependency: Bump to controller-runtime v0.22 & controller-tools v0.19 (#12634)
+
+## :sparkles: New Features
+- CABPK: Add EncryptionAlgorithm to Kubeadmconfig (#12859)
+- CAPD: Add scale from/to 0 support for CAPD (#12572)
+- CI: Bump autoscaler to a9cb59fdd (#12643)
+- CI: Bump Kubernetes in tests to v1.34.0 and claim support for v1.34 (#12699)
+- ClusterCache: Add GetUncachedClient() (#12803)
+- ClusterClass: Add .spec.upgrade.external.generateUpgradePlanExtension field to ClusterClass (#12809)
+- ClusterClass: Add types and hook for GenerateUpgradePlan (#12823)
+- ClusterClass: Additional validation in Cluster/ClusterClass webhook for chained upgrades (#12816)
+- ClusterClass: Call GenerateUpgradePlanRequest Runtime Extension (#12903)
+- ClusterClass: Implement core logic for chained upgrades (#12726)
+- Control-plane: Add new control-plane provider HCP (#12800)
+- e2e: Bump Kubernetes version used for testing to v1.34.0-rc.1 (#12623)
+- e2e: Bump Kubernetes version used for testing to v1.34.0-rc.2 (#12658)
+- e2e: Implement e2e test for in-place updates (#12938)
+- KCP: Bump coredns/corefile-migration to v1.0.28 (#12748)
+- KCP: Bump coredns/corefile-migration to v1.0.29 (#12862)
+- KCP: Bump corefile-migration to v1.0.27 (#12636)
+- KCP: Compare ClusterConfiguration via KubeadmConfig instead of annotation on Machine (#12758)
+- KCP: Extend rollout logic for in-place updates (#12840)
+- KCP: Implement CanUpdateMachine (#12857)
+- KCP: Implement trigger in-place update (#12897)
+- Machine: Add in-place updates support for machine controller (#12831)
+- MachineDeployment: Add in-place to rollout planner (#12865)
+- MachineHealthCheck: Add support for checking Machine conditions in MachineHealthCheck (#12827)
+- Misc: Add inplace updates featuregate (#12755)
+- ClusterCache/KCP: Deprecate GetClientCertificatePrivateKey and stop using it in KCP (#12846)
+- KCP/CABPK/CI: Bump KAL to pick up latest requiredfields linter, add Min/MaxLength to BootstrapToken (#12563)
+- KCP/MachineSet/MS: Refactor BootstrapConfig/InfraMachine managedFields for in-place (#12890)
+- Runtime SDK/IPAM/MachinePool: Cleanup exp packages (#12651)
+- Runtime SDK: Add in-place update hooks to API (#12343)
+- Runtime SDK: Add lifecycle hooks for chained-upgrade (#12878)
+- Runtime SDK: Call new lifecycle hooks for chained-upgrades (#12891)
+- Runtime SDK: Ensure ExtensionConfig controller can be used outside of the core provider (#12754)
+- Runtime SDK: Implement GenerateUpgradePlan handler (#12927)
+
+## :bug: Bug Fixes
+- API: Only try to convert infraRefs if they are set (#12686)
+- API: Register conversion funcs in schemes (#12687)
+- CABPK: Always use latest apiVersion when getting owner of KubeadmConfig in CABPK (#12685)
+- CAPD: Fix the format error of healthCheck in test templates (#12787)
+- CAPD: Remove finalizers during deletion if ownerRef was never set (#12675)
+- CAPD: Run CAPD conversion tests in CI (#12583)
+- CAPIM/Fix(proxy): eliminate data race in DialContext (#12778)
+- ClusterClass: Ensure holder field path in GeneratePatchRequest is set based on contract (#12684)
+- ClusterClass: Fix field paths in ClusterClass compatibility validation errors (#12660)
+- ClusterClass: Stop adding conversion-data annotation to Cluster object (#12719)
+- clusterctl: Removing Ready/Available prefix from STATUS Column (#12729)
+- clusterctl: Verify providers need upgrade before applying (#12753)
+- e2e: Fix autoscaler e2e test flake (#12613)
+- e2e: Fix e2e test issues introduced by chained upgrades (#12766)
+- e2e: Fix objects with Changed Resource Versions flake (#12848)
+- e2e: Fix upgrade runtimesdk test (#12833)
+- KCP: Fix ControlPlaneComponentHealthCheckSeconds validation in KubeadmConfigSpec.Validate (#12609)
+- KCP: Fix conversion issue in KubeadmControlPlaneTemplate with rolloutStrategy.type (#12608)
+- MachineDeployment: Fix race conditions ScaleDownOldMS (#12812)
+- MachineDeployment: Fix race conditions ScaleDownOldMS OnDelete (#12830)
+- ClusterClass/MachinePool: Fix MP error in desired state calculation during Cluster creation (#12607)
+- Runtime SDK: Export ExtensionConfig webhook (#12598)
+- Testing: Fix flaky TestFuzzyConversion (Cluster) test (#12618)
+- Testing: Fix flaky TestReconcileMachinePhases unit test (#12616)
+- Testing: Fix flaky TestReconcileState unit test (#12617)
+- Testing: Fix KubeadmConfig fuzz test flake (#12679)
+
+## :seedling: Others
+- Autoscaling: Bump autoscaler in e2e tests to v1.33.1 (#12790)
+- CAPD: Cleanup CAPD exp packages (#12672)
+- CAPD: Recreate container if we re-enter reconciliation and it exists but is not running (#12923)
+- CI: Add OpenAPI defaulting detection for KubeadmConfig by using forbiddenmarkers (#12851)
+- CI: Block FIXME comments (#12772)
+- CI: Bump KAL & add nodurations linter (#12743)
+- CI: Bump KAL & add nonullable and forbiddenmarkers linter (#12724)
+- CI: Bump KAL & drop schemaless excludes (#12646)
+- CI: Bump KAL, adjust excludes (#12650)
+- CI: Bump to golangci-linter version to v2.4.0 (#12703)
+- CI: Update metrics configuration to v1beta2 (#12642)
+- ClusterClass: Add input validations for desired state generator function (#12655)
+- clusterctl: Add Metal3 as an IPAMProvider (#12756)
+- clusterctl: Allow metadata.yaml's Kind to be empty (#12714)
+- clusterctl: Bump cert-manager to v1.19.0 (#12828)
+- clusterctl: Bump cert-manager to v1.19.1 (#12873)
+- clusterctl: Bumping tablewriter to v1.0.9 - latest (#12781)
+- clusterctl: Show Available condition for CP (#12759)
+- Dependency: Bump github.com/go-viper/mapstructure/v2 to fix CVE (#12677)
+- Dependency: Bump Go to v1.24.6 (#12611)
+- Dependency: Bump go to v1.24.7 (#12733)
+- Dependency: Bump Go to v1.24.8 (#12826)
+- Dependency: Bump Go to v1.24.9 (#12867)
+- Dependency: Bump to envtest v1.34.0 (#12702)
+- Devtools: Promtail to alloy migration (#11945)
+- e2e: Add quickstart e2e test with v1beta1 with ClusterClass and RuntimeSDK (#12577)
+- e2e: Bump autoscaler in e2e tests to v1.34.0 (#12806)
+- e2e: Bump pause image in e2e tests to 3.10.1 (default for Kubernetes v1.34) (#12731)
+- e2e: Bump to kind v0.30.0 (#12701)
+- e2e: Enable IPv6 test again (#12597)
+- e2e: Fix self-hosted to actually read DOCKER_PRELOAD_IMAGES from the e2e config (#12907)
+- e2e: Get kind mgmt cluster logs in clusterctl upgrade test (#12676)
+- e2e: Improve check for Cluster Available condition in e2e tests (#12594)
+- e2e/Scripts: fix kind build git commit setting (#12858)
+- e2e: Set startup taint for autoscaler in e2e tests (#12736)
+- e2e: Start testing against Kubernetes v1.35 (#12709)
+- KCP: Add current/desired objects to NotUpToDateResult & refactor object creation (#12817)
+- KCP: Check for error before checking reconcile result (#12935)
+- KCP/Cleanup KCP code: variable/func renames, func order (#12793)
+- KCP: Enable websocket dialer with fallback to spdy (#12902)
+- KCP: Simplify cleanupConfigFields in KCP (#12776)
+- KCP: Simplify KCP matchesKubeadmConfig (#12813)
+- Logging: Reduce noisy logs (#12606)
+- Machine: Add DisableCertPrivateKey function for clustercache for test flake (#12921)
+- Machine: Consider updating condition when computing Machine's ready condition (#12939)
+- Machine: Fix TestReconcileMachinePhases flake (#12818)
+- Machine: Implement Updating Machine phase (#12940)
+- Machine/TestReconcileMachinePhases: use apireader to directly talk to apiserver (#12819)
+- MachineDeployment: Add in-place to machineset controller (#12906)
+- MachineDeployment: Add rollout planner (#12804)
+- MachineDeployment: Cleanup getMachinesSucceeded flag from MD controller (#12882)
+- MachineDeployment: Fix misleading log statements and optimize logic (#12871)
+- MachineDeployment: Move compute and create ms to rollout planner (#12841)
+- MachineDeployment: Refactor MachineTemplateUpToDate (#12811)
+- MachineDeployment: Simplify rollout planner (#12899)
+- MachineHealthCheck: No longer requeue when remediation is not allowed (#12924)
+- MachineSet: Fix flakes in syncMachines unit test (#12918)
+- MachineSet: Fix race conditions with global scheme in TestMachineSetReconciler_reconcileUnhealthyMachines (#12919)
+- MachineSet: Refactor BootstrapConfig/InfraMachine creation in MachineSet controller (#12881)
+- Misc: Avoid using deprecated client.Patch method (#12737)
+- Misc: Consistent webhook file/folder structure (#12791)
+- Misc/Feat(Tiltfile): Add Proxy Support to Docker Build-Args (#12669)
+- Misc: Log version and git commit on controller start (#12694)
+- Misc: Stop setting and relying on TypeMeta in typed objects (#12533)
+- Misc: Use errors package of Go (#10875)
+- KCP/CABPK: Stop using unsafe for EnvVar conversion (#12619)
+- KCP/MachineSet/MachineDeployment: Remove unused CleanUpManagedFieldsForSSAAdoption code (#12788)
+- Release/clusterctl: Add CAPRKE2 to release tool’s issue-opening providers list (#12713)
+- Release/Testing: Added test cases for list.go and github.go (#11937)
+- Release: Prepare main branch for v1.12 development (#12723)
+- Runtime SDK: Add defensive response status checking in runtime client (#12898)
+- Runtime SDK: Add hint to look into controller logs to runtime client error response (#12849)
+- Runtime SDK: Deduplicate extension filtering and response validation logic (#12905)
+- Testing: Add clusterapi crd groups to audit logs for envtest (#12883)
+- Testing: Enable audit logs for envtest-based unit tests if ARTIFACTS env var is set (#12847)
+- Testing: Implement unit-tests for desired state generator (#12656)
+- Testing: Update version matrix for GitHub workflows for release 1.11 (#12586)
+- util: Add items to cache immediately after apply (#12877)
+
+:book: Additionally, there have been 30 contributions to our documentation and book. (#12085, #12199, #12562, #12581, #12582, #12593, #12600, #12601, #12647, #12662, #12663, #12673, #12710, #12741, #12761, #12777, #12779, #12797, #12814, #12835, #12836, #12854, #12866, #12880, #12885, #12892, #12893, #12896, #12917, #12942)
+
+## 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/go-jose/go-jose/v4: [v4.0.4](https://github.com/go-jose/go-jose/tree/v4.0.4)
+- github.com/goccy/go-yaml: [v1.18.0](https://github.com/goccy/go-yaml/tree/v1.18.0)
+- 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/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/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/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)
+- 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
+- cloud.google.com/go/storage: v1.49.0 → v1.5.0
+- cloud.google.com/go: v0.116.0 → v0.53.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/Masterminds/semver/v3: [v3.3.0 → v3.4.0](https://github.com/Masterminds/semver/compare/v3.3.0...v3.4.0)
+- github.com/census-instrumentation/opencensus-proto: [v0.4.1 → v0.2.1](https://github.com/census-instrumentation/opencensus-proto/compare/v0.4.1...v0.2.1)
+- github.com/cncf/xds/go: [cff3c89 → 2f00578](https://github.com/cncf/xds/compare/cff3c89...2f00578)
+- 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/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/go-viper/mapstructure/v2: [v2.3.0 → v2.4.0](https://github.com/go-viper/mapstructure/compare/v2.3.0...v2.4.0)
+- github.com/golang/groupcache: [41bb18b → 8c9f03a](https://github.com/golang/groupcache/compare/41bb18b...8c9f03a)
+- 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/googleapis/gax-go/v2: [v2.14.1 → v2.0.5](https://github.com/googleapis/gax-go/compare/v2.14.1...v2.0.5)
+- 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/onsi/ginkgo/v2: [v2.23.4 → v2.27.2](https://github.com/onsi/ginkgo/compare/v2.23.4...v2.27.2)
+- github.com/onsi/gomega: [v1.38.0 → v1.38.2](https://github.com/onsi/gomega/compare/v1.38.0...v1.38.2)
+- 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/pflag: [v1.0.7 → v1.0.10](https://github.com/spf13/pflag/compare/v1.0.7...v1.0.10)
+- github.com/spf13/viper: [v1.20.1 → v1.21.0](https://github.com/spf13/viper/compare/v1.20.1...v1.21.0)
+- github.com/stretchr/testify: [v1.10.0 → v1.11.1](https://github.com/stretchr/testify/compare/v1.10.0...v1.11.1)
+- go.etcd.io/bbolt: v1.3.11 → v1.4.2
+- go.etcd.io/etcd/api/v3: v3.5.22 → v3.6.5
+- go.etcd.io/etcd/client/pkg/v3: v3.5.22 → v3.6.5
+- go.etcd.io/etcd/client/v3: v3.5.22 → v3.6.5
+- 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.opencensus.io: v0.24.0 → v0.22.3
+- 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.yaml.in/yaml/v3: v3.0.3 → v3.0.4
+- golang.org/x/crypto: v0.40.0 → v0.43.0
+- golang.org/x/mod: v0.25.0 → v0.28.0
+- golang.org/x/net: v0.42.0 → v0.46.0
+- golang.org/x/oauth2: v0.30.0 → v0.32.0
+- golang.org/x/sync: v0.16.0 → v0.17.0
+- golang.org/x/sys: v0.34.0 → v0.37.0
+- golang.org/x/telemetry: bda5523 → aef8a43
+- golang.org/x/term: v0.33.0 → v0.36.0
+- golang.org/x/text: v0.27.0 → v0.30.0
+- golang.org/x/tools: v0.34.0 → v0.37.0
+- google.golang.org/api: v0.215.0 → v0.17.0
+- google.golang.org/genproto/googleapis/api: 5f5ef82 → a0af3ef
+- google.golang.org/genproto/googleapis/rpc: 1a7da9e → a0af3ef
+- google.golang.org/genproto: e639e21 → 66ed5ce
+- google.golang.org/grpc: v1.71.3 → v1.72.3
+- google.golang.org/protobuf: v1.36.6 → v1.36.7
+- k8s.io/api: v0.33.3 → v0.34.1
+- k8s.io/apiextensions-apiserver: v0.33.3 → v0.34.1
+- k8s.io/apimachinery: v0.33.3 → v0.34.1
+- k8s.io/apiserver: v0.33.3 → v0.34.1
+- k8s.io/client-go: v0.33.3 → v0.34.1
+- k8s.io/cluster-bootstrap: v0.33.3 → v0.34.1
+- k8s.io/code-generator: v0.33.3 → v0.34.1
+- k8s.io/component-base: v0.33.3 → v0.34.1
+- k8s.io/gengo/v2: 1244d31 → 85fd79d
+- k8s.io/kms: v0.33.3 → v0.34.1
+- k8s.io/kube-openapi: c8a335a → f3f2b99
+- k8s.io/utils: 3ea5e8c → 4c0f3b2
+- 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
+- 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/golang-jwt/jwt/v4: [v4.5.2](https://github.com/golang-jwt/jwt/tree/v4.5.2)
+- 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/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)
+- github.com/prashantv/gostub: [v1.1.0](https://github.com/prashantv/gostub/tree/v1.1.0)
+- go.etcd.io/etcd/client/v2: v2.305.21
+- go.etcd.io/etcd/raft/v3: v3.5.21
+- go.uber.org/atomic: v1.9.0
+- sigs.k8s.io/structured-merge-diff/v4: v4.6.0
+
+
+
+_Thanks to all our contributors!_ 😊
diff --git a/CHANGELOG/v1.12.0-beta.1.md b/CHANGELOG/v1.12.0-beta.1.md
new file mode 100644
index 000000000000..b86ad2267049
--- /dev/null
+++ b/CHANGELOG/v1.12.0-beta.1.md
@@ -0,0 +1,418 @@
+🚨 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/issues/new).
+
+## Changes since v1.12.0-beta.0
+## :chart_with_upwards_trend: Overview
+- 48 new commits merged
+- 2 breaking changes :warning:
+- 6 feature additions ✨
+- 5 bugs fixed 🐛
+
+## :warning: Breaking Changes
+- Runtime SDK: Improve chained upgrade observability (#12973)
+- Runtime SDK: Make the AfterClusterUpgrade hook blocking (#12984)
+
+## :sparkles: New Features
+- clusterctl: Add conditions filter for clusterctl describe (#12991)
+- e2e: Change RuntimeSDK e2e test ClusterClass to use GenerateUpgradePlan extension (#12955)
+- MachineDeployment: MD: Implement CanUpdateMachineSet (#12965)
+- Misc: Improve logs, errors and conditions (#12992)
+- Misc: Introduce & use wait for cache utils (#12957)
+- API/Machine/MachineSet/MachineDeployment: Taint propagation: machine related API changes, conversion and feature gate (#12936)
+
+## :bug: Bug Fixes
+- CAPD: Fix: CAPD on rootless podman (#12941)
+- ClusterClass: Stop writing zero values for spec.controlPlaneEndpoint to ControlPlane objects (#12958)
+- e2e: Do not require kubetest configration if not needed (#12948)
+- e2e: Propagate clusterctl variables for cluster upgrades (#12949)
+- Machine/MachinePool: Fix MachinePool nodeRef UID mismatch after K8s upgrade (#12392)
+
+## :seedling: Others
+- CABPK: Migrate from Requeue to RequeueAfter in CABPK (#12988)
+- Cluster: Allow >1 minor version upgrades if generateUpgradePlan extension is defined (#12979)
+- Cluster: Simplify Cluster webhook (#12895)
+- ClusterClass: Improve topology reconciled condition (#13002)
+- clusterctl: CAPMS: Add metal-stack infrastructure provider (#12925)
+- ClusterResourceSet: Remove deprecated ClusterResourceSet feature gate (#12950)
+- Dependency: Bump Go to v1.24.10 (#12962)
+- Devtools: Drop ALL groups in tilt (#13001)
+- e2e: Fix autoscaler test (#12978)
+- e2e: Taint propagation: e2e coverage via md rollout test (#12966)
+- e2e: Wait for cluster deletion in runtime sdk test (#12956)
+- KCP: Fix race condition on KCP initialized condition (#12980)
+- KCP: Improve KCP etcd client crt/key caching (#12977)
+- Machine: Requeue for Machine Available condition (#12953)
+- MachineDeployment: Add more info to logs for rollout changes (#12997)
+- MachineDeployment: Rollout-planner improve checks for scalingOrInPlaceUpdateInProgress (#12954)
+- MachineHealthCheck: Improve MHC reporting: add reason to condition, add reason+message to log (#12987)
+- Misc: Cleanup TestReconcileMachinePhases (#12976)
+- Misc: Improve mark hook utils (#12994)
+- Misc: Improve wait for cache (#12993)
+- Machine/MachineSet/MachineDeployment: Adjust UpToDate condition to consider Updating, move UpToDate condition to Machine ctrl for workers (#12959)
+- Release: Release notes: clarify semantic of --previous-release-version (#12995)
+- util: Feat: add check version against metadata utility (#12529)
+
+## Dependencies
+
+### Added
+_Nothing has changed._
+
+### Changed
+- go.etcd.io/etcd/api/v3: v3.6.5 → v3.6.6
+- go.etcd.io/etcd/client/pkg/v3: v3.6.5 → v3.6.6
+- go.etcd.io/etcd/client/v3: v3.6.5 → v3.6.6
+- golang.org/x/crypto: v0.43.0 → v0.44.0
+- golang.org/x/mod: v0.28.0 → v0.29.0
+- golang.org/x/net: v0.46.0 → v0.47.0
+- golang.org/x/oauth2: v0.32.0 → v0.33.0
+- golang.org/x/sync: v0.17.0 → v0.18.0
+- golang.org/x/sys: v0.37.0 → v0.38.0
+- golang.org/x/telemetry: aef8a43 → 078029d
+- golang.org/x/term: v0.36.0 → v0.37.0
+- golang.org/x/text: v0.30.0 → v0.31.0
+- golang.org/x/tools: v0.37.0 → v0.38.0
+- k8s.io/api: v0.34.1 → v0.34.2
+- k8s.io/apiextensions-apiserver: v0.34.1 → v0.34.2
+- k8s.io/apimachinery: v0.34.1 → v0.34.2
+- k8s.io/apiserver: v0.34.1 → v0.34.2
+- k8s.io/client-go: v0.34.1 → v0.34.2
+- k8s.io/cluster-bootstrap: v0.34.1 → v0.34.2
+- k8s.io/code-generator: v0.34.1 → v0.34.2
+- k8s.io/component-base: v0.34.1 → v0.34.2
+- k8s.io/kms: v0.34.1 → v0.34.2
+
+### Removed
+_Nothing has changed._
+
+
+More details about the release
+
+:warning: **BETA RELEASE NOTES** :warning:
+
+## Changes since v1.11.0
+## :chart_with_upwards_trend: Overview
+- 248 new commits merged
+- 5 breaking changes :warning:
+- 40 feature additions ✨
+- 31 bugs fixed 🐛
+
+## :warning: Breaking Changes
+- CI: Improve KAL config docs for forbidding OpenAPI defaulting (#12869)
+- clusterctl: Feat(clusterctl): block move when Cluster or ClusterClass is paused (#12786)
+- Dependency: Bump to controller-runtime v0.22 & controller-tools v0.19 (#12634)
+- Runtime SDK: Improve chained upgrade observability (#12973)
+- Runtime SDK: Make the AfterClusterUpgrade hook blocking (#12984)
+
+## :sparkles: New Features
+- CABPK: Add EncryptionAlgorithm to Kubeadmconfig (#12859)
+- CAPD: Add scale from/to 0 support for CAPD (#12572)
+- CI: Bump autoscaler to a9cb59fdd (#12643)
+- CI: Bump Kubernetes in tests to v1.34.0 and claim support for v1.34 (#12699)
+- ClusterCache: Add GetUncachedClient() (#12803)
+- ClusterClass: Add .spec.upgrade.external.generateUpgradePlanExtension field to ClusterClass (#12809)
+- ClusterClass: Add types and hook for GenerateUpgradePlan (#12823)
+- ClusterClass: Additional validation in Cluster/ClusterClass webhook for chained upgrades (#12816)
+- ClusterClass: Call GenerateUpgradePlanRequest Runtime Extension (#12903)
+- ClusterClass: Implement core logic for chained upgrades (#12726)
+- clusterctl: Add conditions filter for clusterctl describe (#12991)
+- Control-plane: Add new control-plane provider HCP (#12800)
+- e2e: Bump Kubernetes version used for testing to v1.34.0-rc.1 (#12623)
+- e2e: Bump Kubernetes version used for testing to v1.34.0-rc.2 (#12658)
+- e2e: Change RuntimeSDK e2e test ClusterClass to use GenerateUpgradePlan extension (#12955)
+- e2e: Implement e2e test for in-place updates (#12938)
+- KCP: Bump coredns/corefile-migration to v1.0.28 (#12748)
+- KCP: Bump coredns/corefile-migration to v1.0.29 (#12862)
+- KCP: Bump corefile-migration to v1.0.27 (#12636)
+- KCP: Compare ClusterConfiguration via KubeadmConfig instead of annotation on Machine (#12758)
+- KCP: Extend rollout logic for in-place updates (#12840)
+- KCP: Implement CanUpdateMachine (#12857)
+- KCP: Implement trigger in-place update (#12897)
+- Machine: Add in-place updates support for machine controller (#12831)
+- MachineDeployment: Add in-place to rollout planner (#12865)
+- MachineDeployment: MD: Implement CanUpdateMachineSet (#12965)
+- MachineHealthCheck: Add support for checking Machine conditions in MachineHealthCheck (#12827)
+- Misc: Add inplace updates featuregate (#12755)
+- Misc: Improve logs, errors and conditions (#12992)
+- Misc: Introduce & use wait for cache utils (#12957)
+- API/Machine/MachineSet/MachineDeployment: Taint propagation: machine related API changes, conversion and feature gate (#12936)
+- ClusterCache/KCP: ClusterCache: Deprecate GetClientCertificatePrivateKey and stop using it in KCP (#12846)
+- KCP/CABPK/CI: Bump KAL to pick up latest requiredfields linter, add Min/MaxLength to BootstrapToken (#12563)
+- KCP/MachineSet: KCP/MS: Refactor BootstrapConfig/InfraMachine managedFields for in-place (#12890)
+- Runtime SDK/IPAM/MachinePool: Cleanup exp packages (#12651)
+- Runtime SDK: Add in-place update hooks to API (#12343)
+- Runtime SDK: Add lifecycle hooks for chained-upgrade (#12878)
+- Runtime SDK: Call new lifecycle hooks for chained-upgrades (#12891)
+- Runtime SDK: Ensure ExtensionConfig controller can be used outside of the core provider (#12754)
+- Runtime SDK: Implement GenerateUpgradePlan handler (#12927)
+
+## :bug: Bug Fixes
+- API: Only try to convert infraRefs if they are set (#12686)
+- API: Register conversion funcs in schemes (#12687)
+- CABPK: Always use latest apiVersion when getting owner of KubeadmConfig in CABPK (#12685)
+- CAPD: Fix the format error of healthCheck in test templates (#12787)
+- CAPD: Fix: CAPD on rootless podman (#12941)
+- CAPD: Remove finalizers during deletion if ownerRef was never set (#12675)
+- CAPD: Run CAPD conversion tests in CI (#12583)
+- CAPIM: Fix(proxy): eliminate data race in DialContext (#12778)
+- ClusterClass: Ensure holder field path in GeneratePatchRequest is set based on contract (#12684)
+- ClusterClass: Fix field paths in ClusterClass compatibility validation errors (#12660)
+- ClusterClass: Stop adding conversion-data annotation to Cluster object (#12719)
+- ClusterClass: Stop writing zero values for spec.controlPlaneEndpoint to ControlPlane objects (#12958)
+- clusterctl: Removing Ready/Available prefix from STATUS Column (#12729)
+- clusterctl: Verify providers need upgrade before applying (#12753)
+- e2e: Do not require kubetest configration if not needed (#12948)
+- e2e: Fix autoscaler e2e test flake (#12613)
+- e2e: Fix e2e test issues introduced by chained upgrades (#12766)
+- e2e: Fix objects with Changed Resource Versions flake (#12848)
+- e2e: Fix upgrade runtimesdk test (#12833)
+- e2e: Propagate clusterctl variables for cluster upgrades (#12949)
+- KCP: Fix ControlPlaneComponentHealthCheckSeconds validation in KubeadmConfigSpec.Validate (#12609)
+- KCP: Fix conversion issue in KubeadmControlPlaneTemplate with rolloutStrategy.type (#12608)
+- MachineDeployment: Fix race conditions ScaleDownOldMS (#12812)
+- MachineDeployment: Fix race conditions ScaleDownOldMS OnDelete (#12830)
+- ClusterClass/MachinePool: Fix MP error in desired state calculation during Cluster creation (#12607)
+- Machine/MachinePool: Fix MachinePool nodeRef UID mismatch after K8s upgrade (#12392)
+- Runtime SDK: Export ExtensionConfig webhook (#12598)
+- Testing: Fix flaky TestFuzzyConversion (Cluster) test (#12618)
+- Testing: Fix flaky TestReconcileMachinePhases unit test (#12616)
+- Testing: Fix flaky TestReconcileState unit test (#12617)
+- Testing: Fix KubeadmConfig fuzz test flake (#12679)
+
+## :seedling: Others
+- Autoscaling: Bump autoscaler in e2e tests to v1.33.1 (#12790)
+- CABPK: Migrate from Requeue to RequeueAfter in CABPK (#12988)
+- CAPD: Cleanup CAPD exp packages (#12672)
+- CAPD: Recreate container if we re-enter reconciliation and it exists but is not running (#12923)
+- CI: Add OpenAPI defaulting detection for KubeadmConfig by using forbiddenmarkers (#12851)
+- CI: Block FIXME comments (#12772)
+- CI: Bump KAL & add nodurations linter (#12743)
+- CI: Bump KAL & add nonullable and forbiddenmarkers linter (#12724)
+- CI: Bump KAL & drop schemaless excludes (#12646)
+- CI: Bump KAL, adjust excludes (#12650)
+- CI: Bump to golangci-linter version to v2.4.0 (#12703)
+- CI: Update metrics configuration to v1beta2 (#12642)
+- Cluster: Allow >1 minor version upgrades if generateUpgradePlan extension is defined (#12979)
+- Cluster: Simplify Cluster webhook (#12895)
+- ClusterClass: Add input validations for desired state generator function (#12655)
+- ClusterClass: Improve topology reconciled condition (#13002)
+- clusterctl: Add Metal3 as an IPAMProvider (#12756)
+- clusterctl: Allow metadata.yaml's Kind to be empty (#12714)
+- clusterctl: Bump cert-manager to v1.19.0 (#12828)
+- clusterctl: Bump cert-manager to v1.19.1 (#12873)
+- clusterctl: Bumping tablewriter to v1.0.9 - latest (#12781)
+- clusterctl: CAPMS: Add metal-stack infrastructure provider (#12925)
+- clusterctl: Show Available condition for CP (#12759)
+- ClusterResourceSet: Remove deprecated ClusterResourceSet feature gate (#12950)
+- Dependency: Bump github.com/go-viper/mapstructure/v2 to fix CVE (#12677)
+- Dependency: Bump Go to v1.24.10 (#12962)
+- Dependency: Bump Go to v1.24.6 (#12611)
+- Dependency: Bump go to v1.24.7 (#12733)
+- Dependency: Bump Go to v1.24.8 (#12826)
+- Dependency: Bump Go to v1.24.9 (#12867)
+- Dependency: Bump to envtest v1.34.0 (#12702)
+- Devtools: Drop ALL groups in tilt (#13001)
+- Devtools: Promtail to alloy migration (#11945)
+- e2e: Add quickstart e2e test with v1beta1 with ClusterClass and RuntimeSDK (#12577)
+- e2e: Bump autoscaler in e2e tests to v1.34.0 (#12806)
+- e2e: Bump pause image in e2e tests to 3.10.1 (default for Kubernetes v1.34) (#12731)
+- e2e: Bump to kind v0.30.0 (#12701)
+- e2e: Enable IPv6 test again (#12597)
+- e2e: Fix autoscaler test (#12978)
+- e2e: Fix self-hosted to actually read DOCKER_PRELOAD_IMAGES from the e2e config (#12907)
+- e2e: Get kind mgmt cluster logs in clusterctl upgrade test (#12676)
+- e2e: Improve check for Cluster Available condition in e2e tests (#12594)
+- e2e: Scripts: fix kind build git commit setting (#12858)
+- e2e: Set startup taint for autoscaler in e2e tests (#12736)
+- e2e: Start testing against Kubernetes v1.35 (#12709)
+- e2e: Taint propagation: e2e coverage via md rollout test (#12966)
+- e2e: Wait for cluster deletion in runtime sdk test (#12956)
+- KCP: Add current/desired objects to NotUpToDateResult & refactor object creation (#12817)
+- KCP: Check for error before checking reconcile result (#12935)
+- KCP: Cleanup KCP code: variable/func renames, func order (#12793)
+- KCP: Enable websocket dialer with fallback to spdy (#12902)
+- KCP: Fix race condition on KCP initialized condition (#12980)
+- KCP: Improve KCP etcd client crt/key caching (#12977)
+- KCP: Simplify cleanupConfigFields in KCP (#12776)
+- KCP: Simplify KCP matchesKubeadmConfig (#12813)
+- Logging: Reduce noisy logs (#12606)
+- Machine: Add DisableCertPrivateKey function for clustercache for test flake (#12921)
+- Machine: Consider updating condition when computing Machine's ready condition (#12939)
+- Machine: Fix TestReconcileMachinePhases flake (#12818)
+- Machine: Implement Updating Machine phase (#12940)
+- Machine: Requeue for Machine Available condition (#12953)
+- Machine: TestReconcileMachinePhases: use apireader to directly talk to apiserver (#12819)
+- MachineDeployment: Add in-place to machineset controller (#12906)
+- MachineDeployment: Add more info to logs for rollout changes (#12997)
+- MachineDeployment: Add rollout planner (#12804)
+- MachineDeployment: Cleanup getMachinesSucceeded flag from MD controller (#12882)
+- MachineDeployment: Fix misleading log statements and optimize logic (#12871)
+- MachineDeployment: Move compute and create ms to rollout planner (#12841)
+- MachineDeployment: Refactor MachineTemplateUpToDate (#12811)
+- MachineDeployment: Rollout-planner improve checks for scalingOrInPlaceUpdateInProgress (#12954)
+- MachineDeployment: Simplify rollout planner (#12899)
+- MachineHealthCheck: Improve MHC reporting: add reason to condition, add reason+message to log (#12987)
+- MachineHealthCheck: No longer requeue when remediation is not allowed (#12924)
+- MachineSet: Fix flakes in syncMachines unit test (#12918)
+- MachineSet: Fix race conditions with global scheme in TestMachineSetReconciler_reconcileUnhealthyMachines (#12919)
+- MachineSet: Refactor BootstrapConfig/InfraMachine creation in MachineSet controller (#12881)
+- Misc: Avoid using deprecated client.Patch method (#12737)
+- Misc: Cleanup TestReconcileMachinePhases (#12976)
+- Misc: Consistent webhook file/folder structure (#12791)
+- Misc: Feat(Tiltfile): Add Proxy Support to Docker Build-Args (#12669)
+- Misc: Improve mark hook utils (#12994)
+- Misc: Improve wait for cache (#12993)
+- Misc: Log version and git commit on controller start (#12694)
+- Misc: Stop setting and relying on TypeMeta in typed objects (#12533)
+- Misc: Use errors package of Go (#10875)
+- KCP/CABPK: Stop using unsafe for EnvVar conversion (#12619)
+- KCP/MachineSet/MachineDeployment: Remove unused CleanUpManagedFieldsForSSAAdoption code (#12788)
+- Machine/MachineSet/MachineDeployment: Adjust UpToDate condition to consider Updating, move UpToDate condition to Machine ctrl for workers (#12959)
+- Release/clusterctl: Add CAPRKE2 to release tool’s issue-opening providers list (#12713)
+- Release/Testing: Added test cases for list.go and github.go (#11937)
+- Release: Prepare main branch for v1.12 development (#12723)
+- Release: Release notes: clarify semantic of --previous-release-version (#12995)
+- Runtime SDK: Add defensive response status checking in runtime client (#12898)
+- Runtime SDK: Add hint to look into controller logs to runtime client error response (#12849)
+- Runtime SDK: Deduplicate extension filtering and response validation logic (#12905)
+- Testing: Add clusterapi crd groups to audit logs for envtest (#12883)
+- Testing: Enable audit logs for envtest-based unit tests if ARTIFACTS env var is set (#12847)
+- Testing: Implement unit-tests for desired state generator (#12656)
+- Testing: Update version matrix for GitHub workflows for release 1.11 (#12586)
+- util: Add items to cache immediately after apply (#12877)
+- util: Feat: add check version against metadata utility (#12529)
+
+:book: Additionally, there have been 38 contributions to our documentation and book. (#12085, #12199, #12329, #12562, #12581, #12582, #12593, #12600, #12601, #12647, #12662, #12663, #12673, #12710, #12741, #12761, #12777, #12779, #12797, #12810, #12814, #12835, #12836, #12854, #12866, #12880, #12885, #12892, #12893, #12896, #12917, #12934, #12942, #12944, #12951, #12961, #12970, #12998)
+
+## 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/go-jose/go-jose/v4: [v4.0.4](https://github.com/go-jose/go-jose/tree/v4.0.4)
+- github.com/goccy/go-yaml: [v1.18.0](https://github.com/goccy/go-yaml/tree/v1.18.0)
+- 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/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/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/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)
+- 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
+- cloud.google.com/go/storage: v1.49.0 → v1.5.0
+- cloud.google.com/go: v0.116.0 → v0.53.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/Masterminds/semver/v3: [v3.3.0 → v3.4.0](https://github.com/Masterminds/semver/compare/v3.3.0...v3.4.0)
+- github.com/census-instrumentation/opencensus-proto: [v0.4.1 → v0.2.1](https://github.com/census-instrumentation/opencensus-proto/compare/v0.4.1...v0.2.1)
+- github.com/cncf/xds/go: [cff3c89 → 2f00578](https://github.com/cncf/xds/compare/cff3c89...2f00578)
+- 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/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/go-viper/mapstructure/v2: [v2.3.0 → v2.4.0](https://github.com/go-viper/mapstructure/compare/v2.3.0...v2.4.0)
+- github.com/golang/groupcache: [41bb18b → 8c9f03a](https://github.com/golang/groupcache/compare/41bb18b...8c9f03a)
+- 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/googleapis/gax-go/v2: [v2.14.1 → v2.0.5](https://github.com/googleapis/gax-go/compare/v2.14.1...v2.0.5)
+- 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/onsi/ginkgo/v2: [v2.23.4 → v2.27.2](https://github.com/onsi/ginkgo/compare/v2.23.4...v2.27.2)
+- github.com/onsi/gomega: [v1.38.0 → v1.38.2](https://github.com/onsi/gomega/compare/v1.38.0...v1.38.2)
+- 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/pflag: [v1.0.7 → v1.0.10](https://github.com/spf13/pflag/compare/v1.0.7...v1.0.10)
+- github.com/spf13/viper: [v1.20.1 → v1.21.0](https://github.com/spf13/viper/compare/v1.20.1...v1.21.0)
+- github.com/stretchr/testify: [v1.10.0 → v1.11.1](https://github.com/stretchr/testify/compare/v1.10.0...v1.11.1)
+- 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.opencensus.io: v0.24.0 → v0.22.3
+- 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.yaml.in/yaml/v3: v3.0.3 → v3.0.4
+- golang.org/x/crypto: v0.40.0 → v0.44.0
+- golang.org/x/mod: v0.25.0 → v0.29.0
+- golang.org/x/net: v0.42.0 → v0.47.0
+- golang.org/x/oauth2: v0.30.0 → v0.33.0
+- golang.org/x/sync: v0.16.0 → v0.18.0
+- golang.org/x/sys: v0.34.0 → v0.38.0
+- golang.org/x/telemetry: bda5523 → 078029d
+- golang.org/x/term: v0.33.0 → v0.37.0
+- golang.org/x/text: v0.27.0 → v0.31.0
+- golang.org/x/tools: v0.34.0 → v0.38.0
+- google.golang.org/api: v0.215.0 → v0.17.0
+- google.golang.org/genproto/googleapis/api: 5f5ef82 → a0af3ef
+- google.golang.org/genproto/googleapis/rpc: 1a7da9e → a0af3ef
+- google.golang.org/genproto: e639e21 → 66ed5ce
+- google.golang.org/grpc: v1.71.3 → v1.72.3
+- google.golang.org/protobuf: v1.36.6 → v1.36.7
+- k8s.io/api: v0.33.3 → v0.34.2
+- k8s.io/apiextensions-apiserver: v0.33.3 → v0.34.2
+- k8s.io/apimachinery: v0.33.3 → v0.34.2
+- k8s.io/apiserver: v0.33.3 → v0.34.2
+- k8s.io/client-go: v0.33.3 → v0.34.2
+- k8s.io/cluster-bootstrap: v0.33.3 → v0.34.2
+- k8s.io/code-generator: v0.33.3 → v0.34.2
+- k8s.io/component-base: v0.33.3 → v0.34.2
+- k8s.io/gengo/v2: 1244d31 → 85fd79d
+- k8s.io/kms: v0.33.3 → v0.34.2
+- k8s.io/kube-openapi: c8a335a → f3f2b99
+- k8s.io/utils: 3ea5e8c → 4c0f3b2
+- 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
+- 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/golang-jwt/jwt/v4: [v4.5.2](https://github.com/golang-jwt/jwt/tree/v4.5.2)
+- 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/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)
+- github.com/prashantv/gostub: [v1.1.0](https://github.com/prashantv/gostub/tree/v1.1.0)
+- go.etcd.io/etcd/client/v2: v2.305.21
+- go.etcd.io/etcd/raft/v3: v3.5.21
+- go.uber.org/atomic: v1.9.0
+- sigs.k8s.io/structured-merge-diff/v4: v4.6.0
+
+
+
+_Thanks to all our contributors!_ 😊
diff --git a/CHANGELOG/v1.12.0-rc.0.md b/CHANGELOG/v1.12.0-rc.0.md
new file mode 100644
index 000000000000..d1d43e3ab1a6
--- /dev/null
+++ b/CHANGELOG/v1.12.0-rc.0.md
@@ -0,0 +1,400 @@
+🚨 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/issues/new).
+
+
+:warning: **RELEASE CANDIDATE NOTES** :warning:
+## 👌 Kubernetes version support
+
+- Management Cluster: v1.31.x -> v1.34.x
+- Workload Cluster: v1.29.x -> v1.34.x
+
+[More information about version support can be found here](https://cluster-api.sigs.k8s.io/reference/versions.html)
+
+## Highlights
+
+- Bumped to Go 1.24, controller-runtime v0.22, k8s.io/* v0.34, controller-gen v0.19
+- In-place updates
+ - Can be enabled with the new `InPlaceUpdates` feature gate
+ - More details can be found in the [proposal](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240807-in-place-updates.md)
+- Chained upgrades
+ - More details can be found in the [proposal](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20250513-chained-and-efficient-upgrades-for-clusters-with-managed-topologies.md)
+ - Runtime SDK: Make the AfterClusterUpgrade hook blocking (#12984)
+- MachineHealthCheck: Add support for checking Machine conditions (#12827)
+- Machine: First part of the [Taint propagation proposal](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20250513-propogate-taints.md) (Machine/MachineSet/MachineDeployment) (#12936, #12966)
+ - [Feature tracking issue](https://github.com/kubernetes-sigs/cluster-api/issues/12972)
+ - Can be enabled with the new `MachineTaintPropagation` feature gate
+- KCP/CABPK: Add EncryptionAlgorithm field to Kubeadmconfig to support keys generated with `RSA-3072`, `RSA-4096`, `ECDSA-P256`, `ECDSA-P384` (#12859)
+- Introduce ReconcilerRateLimiting feature (#13006)
+ - Can be enabled with the new `ReconcilerRateLimiting` feature gate
+ - Rate-limits all reconcilers to at most 1 request per second
+
+Note: Cluster API is only supported on conformant Kubernetes Clusters and contract-relevant provider resources (e.g. InfraCluster) have to be implemented as CRDs (i.e. not via an aggregated apiserver).
+
+## Other changes
+
+- clusterctl: Add conditions filter for clusterctl describe (#12991)
+- clusterctl: `clusterctl move` blocks when Cluster or ClusterClass is paused (#12786)
+- KCP: Enable websocket dialer with fallback to spdy (for communication with etcd) (#12902)
+- Runtime SDK: Add defensive response status checking in runtime client (#12898)
+- Improved logging across several controllers
+- Improved e2e test coverage, e.g.: CAPD: Add scale from/to 0 support for CAPD (#12572)
+- New providers in clusterctl: HCP (#12800) control plane provider, Metal3 IPAM provider (#12756), metal-stack infrastructure provider (#12925)
+
+## Deprecation and Removals Warning
+
+- ClusterResourceSet: Remove deprecated ClusterResourceSet feature gate (#12950)
+- Reminder: [v1alpha3 & v1alpha4 will be removed in CAPI v1.13](https://github.com/kubernetes-sigs/cluster-api/issues/11919) (they are already not served since a while)
+- Reminder: [v1beta1 is on track to be unserved in CAPI v1.14](https://github.com/kubernetes-sigs/cluster-api/issues/11920)
+ - Reminder: Provider should start implementing the v1beta2 contract ASAP.
+
+For additional details for providers, please take a look at [Cluster API v1.11 compared to v1.12](https://main.cluster-api.sigs.k8s.io/developer/providers/migrations/v1.11-to-v1.12).
+
+
+More details about the release
+
+## Changes since v1.11.0
+## :chart_with_upwards_trend: Overview
+- 272 new commits merged
+- 5 breaking changes :warning:
+- 42 feature additions ✨
+- 35 bugs fixed 🐛
+
+## :warning: Breaking Changes
+- CI: Improve KAL config docs for forbidding OpenAPI defaulting (#12869)
+- clusterctl: Block move when Cluster or ClusterClass is paused (#12786)
+- Dependency: Bump to controller-runtime v0.22 & controller-tools v0.19 (#12634)
+- Runtime SDK: Improve chained upgrade observability (#12973)
+- Runtime SDK: Make the AfterClusterUpgrade hook blocking (#12984)
+
+## :sparkles: New Features
+- API/Machine/MachineSet/MachineDeployment: Machine related API changes, conversion and feature gate (#12936)
+- CABPK: Add EncryptionAlgorithm to Kubeadmconfig (#12859)
+- CAPD: Add scale from/to 0 support for CAPD (#12572)
+- CI: Bump autoscaler to a9cb59fdd (#12643)
+- CI: Bump Kubernetes in tests to v1.34.0 and claim support for v1.34 (#12699)
+- ClusterCache/KCP: Deprecate GetClientCertificatePrivateKey and stop using it in KCP (#12846)
+- ClusterCache: Add GetUncachedClient() (#12803)
+- ClusterClass: Add .spec.upgrade.external.generateUpgradePlanExtension field to ClusterClass (#12809)
+- ClusterClass: Add types and hook for GenerateUpgradePlan (#12823)
+- ClusterClass: Additional validation in Cluster/ClusterClass webhook for chained upgrades (#12816)
+- ClusterClass: Call GenerateUpgradePlanRequest Runtime Extension (#12903)
+- ClusterClass: Implement core logic for chained upgrades (#12726)
+- clusterctl: Add conditions filter for clusterctl describe (#12991)
+- Control-plane: Add new control-plane provider HCP (#12800)
+- e2e: Bump Kubernetes version used for testing to v1.34.0-rc.1 (#12623)
+- e2e: Bump Kubernetes version used for testing to v1.34.0-rc.2 (#12658)
+- e2e: Bump Kubernetes version used for testing to v1.35.0-beta.0 (#13029)
+- e2e: Change RuntimeSDK e2e test ClusterClass to use GenerateUpgradePlan extension (#12955)
+- e2e: Implement e2e test for in-place updates (#12938)
+- KCP/CABPK/CI: Bump KAL to pick up latest requiredfields linter, add Min/MaxLength to BootstrapToken (#12563)
+- KCP/MachineSet: Refactor BootstrapConfig/InfraMachine managedFields for in-place (#12890)
+- KCP: Bump coredns/corefile-migration to v1.0.28 (#12748)
+- KCP: Bump coredns/corefile-migration to v1.0.29 (#12862)
+- KCP: Bump corefile-migration to v1.0.27 (#12636)
+- KCP: Compare ClusterConfiguration via KubeadmConfig instead of annotation on Machine (#12758)
+- KCP: Extend rollout logic for in-place updates (#12840)
+- KCP: Implement CanUpdateMachine (#12857)
+- KCP: Implement trigger in-place update (#12897)
+- Machine: Add in-place updates support for machine controller (#12831)
+- MachineDeployment: Add in-place to rollout planner (#12865)
+- MachineDeployment: Implement CanUpdateMachineSet (#12965)
+- MachineHealthCheck: Add support for checking Machine conditions in MachineHealthCheck (#12827)
+- Misc: Add inplace updates featuregate (#12755)
+- Misc: Improve logs, errors and conditions (#12992)
+- Misc: Introduce & use wait for cache utils (#12957)
+- Misc: Introduce reconciler rate-limiting and hook caching (#13006)
+- Runtime SDK/IPAM/MachinePool: Cleanup exp packages (#12651)
+- Runtime SDK: Add in-place update hooks to API (#12343)
+- Runtime SDK: Add lifecycle hooks for chained-upgrade (#12878)
+- Runtime SDK: Call new lifecycle hooks for chained-upgrades (#12891)
+- Runtime SDK: Ensure ExtensionConfig controller can be used outside of the core provider (#12754)
+- Runtime SDK: Implement GenerateUpgradePlan handler (#12927)
+
+## :bug: Bug Fixes
+- API: Only try to convert infraRefs if they are set (#12686)
+- API: Register conversion funcs in schemes (#12687)
+- CABPK: Always use latest apiVersion when getting owner of KubeadmConfig in CABPK (#12685)
+- CAPD: CAPD on rootless podman (#12941)
+- CAPD: Fix the format error of healthCheck in test templates (#12787)
+- CAPD: Remove finalizers during deletion if ownerRef was never set (#12675)
+- CAPD: Run CAPD conversion tests in CI (#12583)
+- CAPIM: Eliminate data race in DialContext (#12778)
+- ClusterClass/MachinePool: Fix MP error in desired state calculation during Cluster creation (#12607)
+- ClusterClass: Ensure holder field path in GeneratePatchRequest is set based on contract (#12684)
+- ClusterClass: Fix field paths in ClusterClass compatibility validation errors (#12660)
+- ClusterClass: Fix wait for cache in reconcile_state.go (#13032)
+- ClusterClass: Stop adding conversion-data annotation to Cluster object (#12719)
+- ClusterClass: Stop writing zero values for spec.controlPlaneEndpoint to ControlPlane objects (#12958)
+- clusterctl: Removing Ready/Available prefix from STATUS Column (#12729)
+- clusterctl: Verify providers need upgrade before applying (#12753)
+- Devtools: Fix kube-state-metrics deployment (#13024)
+- e2e: Do not require kubetest configration if not needed (#12948)
+- e2e: Fix autoscaler e2e test flake (#12613)
+- e2e: Fix e2e test issues introduced by chained upgrades (#12766)
+- e2e: Fix objects with Changed Resource Versions flake (#12848)
+- e2e: Fix upgrade runtimesdk test (#12833)
+- e2e: Propagate clusterctl variables for cluster upgrades (#12949)
+- KCP: Fix ControlPlaneComponentHealthCheckSeconds validation in KubeadmConfigSpec.Validate (#12609)
+- KCP: Fix conversion issue in KubeadmControlPlaneTemplate with rolloutStrategy.type (#12608)
+- KCP: Fix KCP KubeadmConfig isJoin detection (#13035)
+- Machine/MachinePool: Fix MachinePool nodeRef UID mismatch after K8s upgrade (#12392)
+- MachineDeployment: Fix race conditions ScaleDownOldMS (#12812)
+- MachineDeployment: Fix race conditions ScaleDownOldMS OnDelete (#12830)
+- MachineDeployment: Fix rollout with unavailable machines (#13020)
+- Runtime SDK: Export ExtensionConfig webhook (#12598)
+- Testing: Fix flaky TestFuzzyConversion (Cluster) test (#12618)
+- Testing: Fix flaky TestReconcileMachinePhases unit test (#12616)
+- Testing: Fix flaky TestReconcileState unit test (#12617)
+- Testing: Fix KubeadmConfig fuzz test flake (#12679)
+
+## :seedling: Others
+- Autoscaling: Bump autoscaler in e2e tests to v1.33.1 (#12790)
+- CABPK: Migrate from Requeue to RequeueAfter in CABPK (#12988)
+- CAPD: Cleanup CAPD exp packages (#12672)
+- CAPD: Recreate container if we re-enter reconciliation and it exists but is not running (#12923)
+- CI: Add OpenAPI defaulting detection for KubeadmConfig by using forbiddenmarkers (#12851)
+- CI: Block FIXME comments (#12772)
+- CI: Bump KAL & add nodurations linter (#12743)
+- CI: Bump KAL & add nonullable and forbiddenmarkers linter (#12724)
+- CI: Bump KAL & drop schemaless excludes (#12646)
+- CI: Bump KAL, adjust excludes (#12650)
+- CI: Bump Kube API Linter version (#12974)
+- CI: Bump to golangci-linter version to v2.4.0 (#12703)
+- CI: Update metrics configuration to v1beta2 (#12642)
+- Cluster: Allow >1 minor version upgrades if generateUpgradePlan extension is defined (#12979)
+- Cluster: Simplify Cluster webhook (#12895)
+- ClusterClass: Add input validations for desired state generator function (#12655)
+- ClusterClass: Improve topology reconciled condition (#13002)
+- clusterctl: Add metal-stack infrastructure provider (#12925)
+- clusterctl: Add Metal3 as an IPAMProvider (#12756)
+- clusterctl: Allow metadata.yaml's Kind to be empty (#12714)
+- clusterctl: Bump cert-manager to v1.19.0 (#12828)
+- clusterctl: Bump cert-manager to v1.19.1 (#12873)
+- clusterctl: Bumping tablewriter to v1.0.9 - latest (#12781)
+- clusterctl: Show Available condition for CP (#12759)
+- ClusterResourceSet: Remove deprecated ClusterResourceSet feature gate (#12950)
+- Dependency: Bump github.com/go-viper/mapstructure/v2 to fix CVE (#12677)
+- Dependency: Bump Go to v1.24.10 (#12962)
+- Dependency: Bump Go to v1.24.6 (#12611)
+- Dependency: Bump go to v1.24.7 (#12733)
+- Dependency: Bump Go to v1.24.8 (#12826)
+- Dependency: Bump Go to v1.24.9 (#12867)
+- Dependency: Bump golang.org/x/crypto to v0.45 to fix CVE (#13036)
+- Dependency: Bump to envtest v1.34.0 (#12702)
+- Devtools: Drop ALL groups in tilt (#13001)
+- Devtools: Extend CR dashboard to handle capi_reconcile metrics (#13040)
+- Devtools: Promtail to alloy migration (#11945)
+- Documentation/MachinePool: Add structure for area/machinepool ownership in OWNERS files (#13018)
+- e2e: Add quickstart e2e test with v1beta1 with ClusterClass and RuntimeSDK (#12577)
+- e2e: Bump autoscaler in e2e tests to v1.34.0 (#12806)
+- e2e: Bump pause image in e2e tests to 3.10.1 (default for Kubernetes v1.34) (#12731)
+- e2e: Bump to kind v0.30.0 (#12701)
+- e2e: E2e coverage via md rollout test (#12966)
+- e2e: Enable IPv6 test again (#12597)
+- e2e: Fix autoscaler test (#12978)
+- e2e: Fix kind build git commit setting (#12858)
+- e2e: Fix md-rollout test to test in-place taint changes before doing the rollout change (#13031)
+- e2e: Fix self-hosted to actually read DOCKER_PRELOAD_IMAGES from the e2e config (#12907)
+- e2e: Get kind mgmt cluster logs in clusterctl upgrade test (#12676)
+- e2e: Improve check for Cluster Available condition in e2e tests (#12594)
+- e2e: Set startup taint for autoscaler in e2e tests (#12736)
+- e2e: Start testing against Kubernetes v1.35 (#12709)
+- e2e: Use wait-machine-upgrade timeout in ClusterClassChanges tests to wait for machines to be ready (#13013)
+- e2e: Wait for cluster deletion in runtime sdk test (#12956)
+- KCP/CABPK: Stop using unsafe for EnvVar conversion (#12619)
+- KCP/MachineSet/MachineDeployment: Remove unused CleanUpManagedFieldsForSSAAdoption code (#12788)
+- KCP: Add current/desired objects to NotUpToDateResult & refactor object creation (#12817)
+- KCP: Avoid KCP rollouts if only ControlPlaneComponentHealthCheckSeconds is changed (#13026)
+- KCP: Check for error before checking reconcile result (#12935)
+- KCP: Enable websocket dialer with fallback to spdy (#12902)
+- KCP: Fix race condition on KCP initialized condition (#12980)
+- KCP: Improve KCP etcd client crt/key caching (#12977)
+- KCP: Simplify cleanupConfigFields in KCP (#12776)
+- KCP: Simplify KCP matchesKubeadmConfig (#12813)
+- KCP: Variable/func renames, func order (#12793)
+- Logging: Reduce noisy logs (#12606)
+- Machine/MachineSet/MachineDeployment: Adjust UpToDate condition to consider Updating, move UpToDate condition to Machine ctrl for workers (#12959)
+- Machine: Add DisableCertPrivateKey function for clustercache for test flake (#12921)
+- Machine: Consider updating condition when computing Machine's ready condition (#12939)
+- Machine: Fix TestReconcileMachinePhases flake (#12818)
+- Machine: Implement Updating Machine phase (#12940)
+- Machine: Requeue for Machine Available condition (#12953)
+- Machine: Use apireader to directly talk to apiserver (#12819)
+- MachineDeployment: Add in-place to machineset controller (#12906)
+- MachineDeployment: Add more info to logs for rollout changes (#12997)
+- MachineDeployment: Add rollout planner (#12804)
+- MachineDeployment: Cleanup getMachinesSucceeded flag from MD controller (#12882)
+- MachineDeployment: Defer in-place updates for machines not yet provisioned (#13007)
+- MachineDeployment: Fix misleading log statements and optimize logic (#12871)
+- MachineDeployment: Move compute and create ms to rollout planner (#12841)
+- MachineDeployment: Refactor MachineTemplateUpToDate (#12811)
+- MachineDeployment: Rollout-planner improve checks for scalingOrInPlaceUpdateInProgress (#12954)
+- MachineDeployment: Simplify rollout planner (#12899)
+- MachineHealthCheck: Add reason to condition, add reason+message to log (#12987)
+- MachineHealthCheck: No longer requeue when remediation is not allowed (#12924)
+- MachinePool: Migrate from Requeue to RequeueAfter in MachinePool tests (#13027)
+- MachineSet: Fix flakes in syncMachines unit test (#12918)
+- MachineSet: Fix race conditions with global scheme in TestMachineSetReconciler_reconcileUnhealthyMachines (#12919)
+- MachineSet: Refactor BootstrapConfig/InfraMachine creation in MachineSet controller (#12881)
+- Misc: Add Proxy Support to Docker Build-Args (#12669)
+- Misc: Avoid using deprecated client.Patch method (#12737)
+- Misc: Cleanup TestReconcileMachinePhases (#12976)
+- Misc: Consistent webhook file/folder structure (#12791)
+- Misc: Improve mark hook utils (#12994)
+- Misc: Improve wait for cache (#12993)
+- Misc: Log version and git commit on controller start (#12694)
+- Misc: Stop setting and relying on TypeMeta in typed objects (#12533)
+- Misc: Use errors package of Go (#10875)
+- Release/clusterctl: Add CAPRKE2 to release tool’s issue-opening providers list (#12713)
+- Release/Testing: Added test cases for list.go and github.go (#11937)
+- Release: Clarify semantic of --previous-release-version (#12995)
+- Release: Prepare main branch for v1.12 development (#12723)
+- Release: Update release notes tool to handle multiples_areas and colons (#12738)
+- Runtime SDK: Add defensive response status checking in runtime client (#12898)
+- Runtime SDK: Add hint to look into controller logs to runtime client error response (#12849)
+- Runtime SDK: Deduplicate extension filtering and response validation logic (#12905)
+- Runtime SDK: Migrate from Requeue to RequeueAfter in extensionconfig (#13000)
+- Testing: Add clusterapi crd groups to audit logs for envtest (#12883)
+- Testing: Enable audit logs for envtest-based unit tests if ARTIFACTS env var is set (#12847)
+- Testing: Implement unit-tests for desired state generator (#12656)
+- Testing: Update version matrix for GitHub workflows for release 1.11 (#12586)
+- util: Add check version against metadata utility (#12529)
+- util: Add items to cache immediately after apply (#12877)
+
+:book: Additionally, there have been 42 contributions to our documentation and book. (#12085, #12199, #12329, #12562, #12581, #12582, #12593, #12600, #12601, #12647, #12662, #12663, #12673, #12710, #12741, #12761, #12777, #12779, #12797, #12810, #12814, #12835, #12836, #12854, #12866, #12880, #12885, #12892, #12893, #12896, #12917, #12934, #12942, #12944, #12951, #12961, #12970, #12998, #13010, #13011, #13012, #13021)
+
+## 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/go-jose/go-jose/v4: [v4.0.4](https://github.com/go-jose/go-jose/tree/v4.0.4)
+- github.com/goccy/go-yaml: [v1.18.0](https://github.com/goccy/go-yaml/tree/v1.18.0)
+- 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/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/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/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)
+- 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
+- cloud.google.com/go/storage: v1.49.0 → v1.5.0
+- cloud.google.com/go: v0.116.0 → v0.53.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/Masterminds/semver/v3: [v3.3.0 → v3.4.0](https://github.com/Masterminds/semver/compare/v3.3.0...v3.4.0)
+- github.com/census-instrumentation/opencensus-proto: [v0.4.1 → v0.2.1](https://github.com/census-instrumentation/opencensus-proto/compare/v0.4.1...v0.2.1)
+- github.com/cncf/xds/go: [cff3c89 → 2f00578](https://github.com/cncf/xds/compare/cff3c89...2f00578)
+- 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/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/go-viper/mapstructure/v2: [v2.3.0 → v2.4.0](https://github.com/go-viper/mapstructure/compare/v2.3.0...v2.4.0)
+- github.com/golang/groupcache: [41bb18b → 8c9f03a](https://github.com/golang/groupcache/compare/41bb18b...8c9f03a)
+- 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/googleapis/gax-go/v2: [v2.14.1 → v2.0.5](https://github.com/googleapis/gax-go/compare/v2.14.1...v2.0.5)
+- 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/onsi/ginkgo/v2: [v2.23.4 → v2.27.2](https://github.com/onsi/ginkgo/compare/v2.23.4...v2.27.2)
+- github.com/onsi/gomega: [v1.38.0 → v1.38.2](https://github.com/onsi/gomega/compare/v1.38.0...v1.38.2)
+- 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/prometheus/client_model: [v0.6.1 → v0.6.2](https://github.com/prometheus/client_model/compare/v0.6.1...v0.6.2)
+- 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/pflag: [v1.0.7 → v1.0.10](https://github.com/spf13/pflag/compare/v1.0.7...v1.0.10)
+- github.com/spf13/viper: [v1.20.1 → v1.21.0](https://github.com/spf13/viper/compare/v1.20.1...v1.21.0)
+- github.com/stretchr/testify: [v1.10.0 → v1.11.1](https://github.com/stretchr/testify/compare/v1.10.0...v1.11.1)
+- 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.opencensus.io: v0.24.0 → v0.22.3
+- 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
+- go.yaml.in/yaml/v3: v3.0.3 → v3.0.4
+- golang.org/x/crypto: v0.40.0 → v0.45.0
+- golang.org/x/mod: v0.25.0 → v0.29.0
+- golang.org/x/net: v0.42.0 → v0.47.0
+- golang.org/x/oauth2: v0.30.0 → v0.33.0
+- golang.org/x/sync: v0.16.0 → v0.18.0
+- golang.org/x/sys: v0.34.0 → v0.38.0
+- golang.org/x/telemetry: bda5523 → 078029d
+- golang.org/x/term: v0.33.0 → v0.37.0
+- golang.org/x/text: v0.27.0 → v0.31.0
+- golang.org/x/tools: v0.34.0 → v0.38.0
+- google.golang.org/api: v0.215.0 → v0.17.0
+- google.golang.org/genproto/googleapis/api: 5f5ef82 → a0af3ef
+- google.golang.org/genproto/googleapis/rpc: 1a7da9e → a0af3ef
+- google.golang.org/genproto: e639e21 → 66ed5ce
+- google.golang.org/grpc: v1.71.3 → v1.72.3
+- google.golang.org/protobuf: v1.36.6 → v1.36.7
+- k8s.io/api: v0.33.3 → v0.34.2
+- k8s.io/apiextensions-apiserver: v0.33.3 → v0.34.2
+- k8s.io/apimachinery: v0.33.3 → v0.34.2
+- k8s.io/apiserver: v0.33.3 → v0.34.2
+- k8s.io/client-go: v0.33.3 → v0.34.2
+- k8s.io/cluster-bootstrap: v0.33.3 → v0.34.2
+- k8s.io/code-generator: v0.33.3 → v0.34.2
+- k8s.io/component-base: v0.33.3 → v0.34.2
+- k8s.io/gengo/v2: 1244d31 → 85fd79d
+- k8s.io/kms: v0.33.3 → v0.34.2
+- k8s.io/kube-openapi: c8a335a → f3f2b99
+- k8s.io/utils: 3ea5e8c → 4c0f3b2
+- 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
+- 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/golang-jwt/jwt/v4: [v4.5.2](https://github.com/golang-jwt/jwt/tree/v4.5.2)
+- 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/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)
+- github.com/prashantv/gostub: [v1.1.0](https://github.com/prashantv/gostub/tree/v1.1.0)
+- go.etcd.io/etcd/client/v2: v2.305.21
+- go.etcd.io/etcd/raft/v3: v3.5.21
+- go.uber.org/atomic: v1.9.0
+- sigs.k8s.io/structured-merge-diff/v4: v4.6.0
+
+
+
+_Thanks to all our contributors!_ 😊
diff --git a/CHANGELOG/v1.9.11.md b/CHANGELOG/v1.9.11.md
new file mode 100644
index 000000000000..fe92ca013399
--- /dev/null
+++ b/CHANGELOG/v1.9.11.md
@@ -0,0 +1,38 @@
+## 👌 Kubernetes version support
+
+- Management Cluster: v1.28.x -> v1.32.x
+- Workload Cluster: v1.26.x -> v1.32.x
+
+[More information about version support can be found here](https://cluster-api.sigs.k8s.io/reference/versions.html)
+
+## Changes since v1.9.10
+## :chart_with_upwards_trend: Overview
+- 7 new commits merged
+- 1 feature addition ✨
+- 1 bug fixed 🐛
+
+## :sparkles: New Features
+- KCP: Bump corefile-migration to v1.0.27 (#12638)
+
+## :bug: Bug Fixes
+- MachineDeployment: Fix second rolling update for MD rolloutAfter (#12556)
+
+## :seedling: Others
+- Dependency: Bump github.com/docker/docker to v28.0.2+incompatible to fix CVE (#12645)
+- Dependency: Bump Go to v1.23.11 (#12531)
+- Dependency: Bump Go to v1.23.12 (#12620)
+- Dependency/Security: Add CVE-2025-22868 to Trivy ignore file (#12508)
+- Testing: Skipping test that is failing because of infra issues (#12567)
+
+## Dependencies
+
+### Added
+_Nothing has changed._
+
+### Changed
+- github.com/coredns/corefile-migration: [v1.0.26 → v1.0.27](https://github.com/coredns/corefile-migration/compare/v1.0.26...v1.0.27)
+
+### Removed
+_Nothing has changed._
+
+_Thanks to all our contributors!_ 😊
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 636f40a3845f..bce312ea26a4 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -75,10 +75,8 @@ Cluster API follows upstream Kubernetes semantic versioning. With the v1 release
- A (*patch*) release SHOULD only include backwards compatible set of bugfixes.
-These guarantees extend to all code exposed in our Go Module, including
-*types from dependencies in public APIs*.
-Types and functions not in public APIs are not considered part of the guarantee.
-The test module, clusterctl, and experiments do not provide any backward compatible guarantees.
+see [Cluster API release support](https://cluster-api.sigs.k8s.io/reference/versions.html#cluster-api-release-support)) for
+more details about supported releases and for considerations that might apply if you are importing Cluster API go modules as a dependency.
#### Backporting a patch
@@ -88,7 +86,7 @@ Any backport MUST NOT be breaking for API or behavioral changes.
We usually backport critical bugs or security fixes, changes to support new Kubernetes minor versions (see [supported Kubernetes versions](https://cluster-api.sigs.k8s.io/reference/versions.html#supported-kubernetes-versions)), documentation and test signal improvements. Everything else is considered case by case.
Release branches outside of the [standard support period](https://github.com/kubernetes-sigs/cluster-api/blob/main/CONTRIBUTING.md#cluster-api-release-support) are usually frozen,
-although maintainers may allow backports to releases in [maintenance mode](https://github.com/kubernetes-sigs/cluster-api/blob/main/CONTRIBUTING.md#cluster-api-release-support) in specific situations
+although maintainers may allow backports to releases in [maintenance mode](https://github.com/kubernetes-sigs/cluster-api/blob/main/CONTRIBUTING.md#cluster-api-release-support) in specific situations
like CVEs, security, and other critical bug fixes.
### APIs
@@ -379,7 +377,7 @@ licenses dependencies and other artifacts use. For go dependencies only dependen
This project follows the [Kubernetes API conventions](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md).
We enforce the API conventions via [kube-api-linter](https://github.com/kubernetes-sigs/kube-api-linter).
-The corresponding configuration field can be found [here](https://github.com/kubernetes-sigs/cluster-api/blob/main/.golangci-kal.yml).
+The corresponding configuration field can be found [here](https://github.com/kubernetes-sigs/cluster-api/blob/main/.golangci-kal.yml).
Minor additions to the conventions are listed below.
@@ -460,3 +458,5 @@ As of today there are following OWNERS files/Owner groups defining sub areas:
- [Test](https://github.com/kubernetes-sigs/cluster-api/tree/main/test)
- [Test Framework](https://github.com/kubernetes-sigs/cluster-api/tree/main/test/framework)
- [Docs](https://github.com/kubernetes-sigs/cluster-api/tree/main/docs)
+- [Machine pools](https://github.com/kubernetes-sigs/cluster-api/tree/main/internal/controllers/machinepool)
+- Ignition support [in kubeadm Bootstrap Provider](https://github.com/kubernetes-sigs/cluster-api/tree/main/bootstrap/kubeadm/internal/ignition) and [in CAPD](https://github.com/kubernetes-sigs/cluster-api/tree/main/test/infrastructure/docker/internal/provisioning/ignition)
diff --git a/Makefile b/Makefile
index 83270cd4a22d..117aa9356d92 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ SHELL:=/usr/bin/env bash
#
# Go.
#
-GO_VERSION ?= 1.24.9
+GO_VERSION ?= 1.24.11
GO_DIRECTIVE_VERSION ?= 1.24.0
GO_CONTAINER_IMAGE ?= docker.io/library/golang:$(GO_VERSION)
@@ -31,6 +31,10 @@ GO_CONTAINER_IMAGE ?= docker.io/library/golang:$(GO_VERSION)
GOTOOLCHAIN = go$(GO_VERSION)
export GOTOOLCHAIN
+# Required with Go 1.24 to enable usage of synctest in unit tests
+# Can be removed after we bumped to Go 1.25.
+export GOEXPERIMENT=synctest
+
# Use GOPROXY environment variable if set
GOPROXY := $(shell go env GOPROXY)
ifeq ($(GOPROXY),)
@@ -106,12 +110,12 @@ KUSTOMIZE_BIN := kustomize
KUSTOMIZE := $(abspath $(TOOLS_BIN_DIR)/$(KUSTOMIZE_BIN)-$(KUSTOMIZE_VER))
KUSTOMIZE_PKG := sigs.k8s.io/kustomize/kustomize/v5
-SETUP_ENVTEST_VER := release-0.21
+SETUP_ENVTEST_VER := release-0.22
SETUP_ENVTEST_BIN := setup-envtest
SETUP_ENVTEST := $(abspath $(TOOLS_BIN_DIR)/$(SETUP_ENVTEST_BIN)-$(SETUP_ENVTEST_VER))
SETUP_ENVTEST_PKG := sigs.k8s.io/controller-runtime/tools/setup-envtest
-CONTROLLER_GEN_VER := v0.18.0
+CONTROLLER_GEN_VER := v0.19.0
CONTROLLER_GEN_BIN := controller-gen
CONTROLLER_GEN := $(abspath $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER))
CONTROLLER_GEN_PKG := sigs.k8s.io/controller-tools/cmd/controller-gen
@@ -121,7 +125,7 @@ GOTESTSUM_BIN := gotestsum
GOTESTSUM := $(abspath $(TOOLS_BIN_DIR)/$(GOTESTSUM_BIN)-$(GOTESTSUM_VER))
GOTESTSUM_PKG := gotest.tools/gotestsum
-CONVERSION_GEN_VER := v0.33.0
+CONVERSION_GEN_VER := v0.34.0
CONVERSION_GEN_BIN := conversion-gen
# We are intentionally using the binary without version suffix, to avoid the version
# in generated files.
@@ -172,6 +176,11 @@ GOVULNCHECK_VER := v1.1.4
GOVULNCHECK := $(abspath $(TOOLS_BIN_DIR)/$(GOVULNCHECK_BIN)-$(GOVULNCHECK_VER))
GOVULNCHECK_PKG := golang.org/x/vuln/cmd/govulncheck
+CRANE_BIN := crane
+CRANE_VER := v0.20.7
+CRANE := $(abspath $(TOOLS_BIN_DIR)/$(CRANE_BIN)-$(CRANE_VER))
+CRANE_PKG := github.com/google/go-containerregistry/cmd/crane
+
IMPORT_BOSS_BIN := import-boss
IMPORT_BOSS_VER := v0.28.1
IMPORT_BOSS := $(abspath $(TOOLS_BIN_DIR)/$(IMPORT_BOSS_BIN))
@@ -289,10 +298,6 @@ generate-manifests-core: $(CONTROLLER_GEN) $(KUSTOMIZE) ## Generate manifests e.
paths=./internal/controllers/... \
paths=./internal/webhooks/... \
paths=./internal/api/addons/... \
- paths=./exp/internal/controllers/... \
- paths=./exp/internal/webhooks/... \
- paths=./exp/ipam/internal/webhooks/... \
- paths=./exp/runtime/internal/controllers/... \
crd:crdVersions=v1 \
rbac:roleName=manager-role \
output:crd:dir=./config/crd/bases \
@@ -374,9 +379,6 @@ generate-manifests-docker-infrastructure: $(CONTROLLER_GEN) ## Generate manifest
cd $(CAPD_DIR); $(CONTROLLER_GEN) \
paths=./ \
paths=./api/... \
- paths=./exp/api/... \
- paths=./exp/internal/controllers/... \
- paths=./exp/internal/webhooks/... \
paths=./internal/controllers/... \
paths=./internal/webhooks/... \
crd:crdVersions=v1 \
@@ -434,11 +436,10 @@ generate-go-deepcopy-kubeadm-control-plane: $(CONTROLLER_GEN) ## Generate deepco
.PHONY: generate-go-deepcopy-docker-infrastructure
generate-go-deepcopy-docker-infrastructure: $(CONTROLLER_GEN) generate-go-deepcopy-in-memory-infrastructure ## Generate deepcopy go code for docker infrastructure provider
- $(MAKE) clean-generated-deepcopy SRC_DIRS="$(CAPD_DIR)/api,$(CAPD_DIR)/exp/api"
+ $(MAKE) clean-generated-deepcopy SRC_DIRS="$(CAPD_DIR)/api"
cd $(CAPD_DIR); $(CONTROLLER_GEN) \
object:headerFile=../../../hack/boilerplate/boilerplate.generatego.txt \
- paths=./api/... \
- paths=./exp/api/...
+ paths=./api/...
.PHONY: generate-go-deepcopy-in-memory-infrastructure
generate-go-deepcopy-in-memory-infrastructure: $(CONTROLLER_GEN) ## Generate deepcopy go code for in-memory cloud resources
@@ -483,7 +484,7 @@ generate-go-conversions-addons-api: $(CONVERSION_GEN) ## Generate conversions go
./api/addons/v1beta1
.PHONY: generate-go-conversions-core-ipam
-generate-go-conversions-core-ipam: $(CONVERSION_GEN) ## Generate conversions go code for core exp IPAM
+generate-go-conversions-core-ipam: $(CONVERSION_GEN) ## Generate conversions go code for IPAM
$(MAKE) clean-generated-conversions SRC_DIRS="./api/ipam/v1beta1,./api/ipam/v1alpha1"
$(CONVERSION_GEN) \
--output-file=zz_generated.conversion.go \
@@ -538,10 +539,7 @@ generate-go-conversions-docker-infrastructure: $(CONVERSION_GEN) ## Generate con
--go-header-file=../../../hack/boilerplate/boilerplate.generatego.txt \
./api/v1alpha3 \
./api/v1alpha4 \
- ./api/v1beta1 \
- ./exp/api/v1alpha3 \
- ./exp/api/v1alpha4 \
- ./exp/api/v1beta1
+ ./api/v1beta1
.PHONY: generate-go-conversions-test-extension
generate-go-conversions-test-extension: $(CONVERSION_GEN) ## Generate conversions go code for test runtime extension provider
@@ -573,7 +571,7 @@ generate-doctoc:
TRACE=$(TRACE) ./hack/generate-doctoc.sh
.PHONY: generate-e2e-templates
-generate-e2e-templates: $(KUSTOMIZE) $(addprefix generate-e2e-templates-, v0.3 v0.4 v1.5 v1.6 v1.8 v1.9 v1.10 main) ## Generate cluster templates for all versions
+generate-e2e-templates: $(KUSTOMIZE) $(addprefix generate-e2e-templates-, v0.3 v0.4 v1.5 v1.6 v1.9 v1.10 v1.11 main) ## Generate cluster templates for all versions
DOCKER_TEMPLATES := test/e2e/data/infrastructure-docker
@@ -595,11 +593,6 @@ generate-e2e-templates-v1.6: $(KUSTOMIZE)
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1.6/cluster-template --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1.6/cluster-template.yaml
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1.6/cluster-template-topology --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1.6/cluster-template-topology.yaml
-.PHONY: generate-e2e-templates-v1.8
-generate-e2e-templates-v1.8: $(KUSTOMIZE)
- $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1.8/cluster-template --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1.8/cluster-template.yaml
- $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1.8/cluster-template-topology --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1.8/cluster-template-topology.yaml
-
.PHONY: generate-e2e-templates-v1.9
generate-e2e-templates-v1.9: $(KUSTOMIZE)
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1.9/cluster-template --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1.9/cluster-template.yaml
@@ -610,10 +603,16 @@ generate-e2e-templates-v1.10: $(KUSTOMIZE)
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1.10/cluster-template --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1.10/cluster-template.yaml
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1.10/cluster-template-topology --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1.10/cluster-template-topology.yaml
+.PHONY: generate-e2e-templates-v1.11
+generate-e2e-templates-v1.11: $(KUSTOMIZE)
+ $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1.11/cluster-template --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1.11/cluster-template.yaml
+ $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1.11/cluster-template-topology --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1.11/cluster-template-topology.yaml
+
.PHONY: generate-e2e-templates-main
generate-e2e-templates-main: $(KUSTOMIZE)
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/cluster-template --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/cluster-template.yaml
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/cluster-template-md-remediation --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/cluster-template-md-remediation.yaml
+ $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/cluster-template-md-taints --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/cluster-template-md-taints.yaml
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/cluster-template-kcp-remediation --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/cluster-template-kcp-remediation.yaml
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/cluster-template-kcp-adoption/step1 --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/cluster-template-kcp-adoption.yaml
echo "---" >> $(DOCKER_TEMPLATES)/main/cluster-template-kcp-adoption.yaml
@@ -626,6 +625,7 @@ generate-e2e-templates-main: $(KUSTOMIZE)
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/cluster-template-ipv6 --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/cluster-template-ipv6.yaml
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/cluster-template-topology-dualstack-ipv6-primary --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/cluster-template-topology-dualstack-ipv6-primary.yaml
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/cluster-template-topology-dualstack-ipv4-primary --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/cluster-template-topology-dualstack-ipv4-primary.yaml
+ $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/cluster-template-topology-in-place --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/cluster-template-topology-in-place.yaml
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/cluster-template-topology-no-workers --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/cluster-template-topology-no-workers.yaml
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/cluster-template-topology-runtimesdk-v1beta1 --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/cluster-template-topology-runtimesdk-v1beta1.yaml
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/cluster-template-topology-kcp-only --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/cluster-template-topology-kcp-only.yaml
@@ -733,7 +733,6 @@ verify-conversions: $(CONVERSION_VERIFIER) ## Verifies expected API conversion
./api/... \
./internal/api/... \
./test/infrastructure/docker/api/... \
- ./test/infrastructure/docker/exp/api/...
.PHONY: verify-doctoc
verify-doctoc: generate-doctoc
@@ -950,30 +949,38 @@ test-cover: ## Run unit and integration tests and generate a coverage report
go tool cover -func=out/coverage.out -o out/coverage.txt
go tool cover -html=out/coverage.out -o out/coverage.html
-.PHONY: test-docker-infrastructure
-test-docker-infrastructure: $(SETUP_ENVTEST) ## Run unit and integration tests with race detector for docker infrastructure provider
+.PHONY: test-infrastructure
+test-infrastructure: $(SETUP_ENVTEST) ## Run unit and integration tests with race detector for docker infrastructure provider
+ # Note: Fuzz tests are not executed with race detector because they would just time out.
+ # To achieve that, all files with fuzz tests have the "!race" build tag, to still run fuzz tests
+ # we have an additional `go test` run that focuses on "TestFuzzyConversion".
+ cd test/infrastructure; KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test -race ./... $(TEST_ARGS)
+ $(MAKE) test-infrastructure-conversions TEST_ARGS="$(TEST_ARGS)"
+
+.PHONY: test-infrastructure-no-race
+test-infrastructure-no-race: $(SETUP_ENVTEST) ## Run unit and integration tests with no race detector for docker infrastructure provider
# Note: Fuzz tests are not executed with race detector because they would just time out.
# To achieve that, all files with fuzz tests have the "!race" build tag, to still run fuzz tests
# we have an additional `go test` run that focuses on "TestFuzzyConversion".
- cd $(CAPD_DIR); KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test -race ./... $(TEST_ARGS)
- $(MAKE) test-docker-infrastructure-conversions TEST_ARGS="$(TEST_ARGS)"
+ cd test/infrastructure; KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test ./... $(TEST_ARGS)
-.PHONY: test-docker-infrastructure-conversions
-test-docker-infrastructure-conversions: $(SETUP_ENVTEST) ## Run conversions test for docker infrastructure provider
- cd $(CAPD_DIR); KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test -run "^TestFuzzyConversion$$" ./... $(TEST_ARGS)
+.PHONY: test-infrastructure-conversions
+test-infrastructure-conversions: $(SETUP_ENVTEST) ## Run conversions test for docker infrastructure provider
+ cd test/infrastructure; KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test -run "^TestFuzzyConversion$$" ./... $(TEST_ARGS)
-.PHONY: test-docker-infrastructure-verbose
-test-docker-infrastructure-verbose: ## Run unit and integration tests with race detector and with verbose flag for docker infrastructure provider
- $(MAKE) test-docker-infrastructure TEST_ARGS="$(TEST_ARGS) -v"
+.PHONY: test-infrastructure-verbose
+test-infrastructure-verbose: ## Run unit and integration tests with race detector and with verbose flag for docker infrastructure provider
+ $(MAKE) test-infrastructure TEST_ARGS="$(TEST_ARGS) -v"
-.PHONY: test-docker-infrastructure-junit
-test-docker-infrastructure-junit: $(SETUP_ENVTEST) $(GOTESTSUM) ## Run unit and integration tests with race detector and generate a junit report for docker infrastructure provider
- cd $(CAPD_DIR); set +o errexit; (KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test -race -json ./... $(TEST_ARGS); echo $$? > $(ARTIFACTS)/junit.infra_docker.exitcode) | tee $(ARTIFACTS)/junit.infra_docker.stdout
+.PHONY: test-infrastructure-junit
+test-infrastructure-junit: $(SETUP_ENVTEST) $(GOTESTSUM) ## Run unit and integration tests with race detector and generate a junit report for docker infrastructure provider
+ cd test/infrastructure; set +o errexit; (KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test -race -json ./... $(TEST_ARGS); echo $$? > $(ARTIFACTS)/junit.infra_docker.exitcode) | tee $(ARTIFACTS)/junit.infra_docker.stdout
$(GOTESTSUM) --junitfile $(ARTIFACTS)/junit.infra_docker.xml --raw-command cat $(ARTIFACTS)/junit.infra_docker.stdout
exit $$(cat $(ARTIFACTS)/junit.infra_docker.exitcode)
- cd $(CAPD_DIR); set +o errexit; (KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test -run "^TestFuzzyConversion$$" -json ./... $(TEST_ARGS); echo $$? > $(ARTIFACTS)/junit-fuzz.infra_docker.exitcode) | tee $(ARTIFACTS)/junit-fuzz.infra_docker.stdout
+ cd test/infrastructure; set +o errexit; (KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test -run "^TestFuzzyConversion$$" -json ./... $(TEST_ARGS); echo $$? > $(ARTIFACTS)/junit-fuzz.infra_docker.exitcode) | tee $(ARTIFACTS)/junit-fuzz.infra_docker.stdout
$(GOTESTSUM) --junitfile $(ARTIFACTS)/junit-fuzz.infra_docker.xml --raw-command cat $(ARTIFACTS)/junit-fuzz.infra_docker.stdout
exit $$(cat $(ARTIFACTS)/junit-fuzz.infra_docker.exitcode)
+
.PHONY: test-test-extension
test-test-extension: $(SETUP_ENVTEST) ## Run unit and integration tests for the test extension
cd $(TEST_EXTENSION_DIR); KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test -race ./... $(TEST_ARGS)
@@ -1443,6 +1450,9 @@ $(GOLANGCI_LINT_BIN): $(GOLANGCI_LINT) ## Build a local copy of golangci-lint.
.PHONY: $(GOVULNCHECK_BIN)
$(GOVULNCHECK_BIN): $(GOVULNCHECK) ## Build a local copy of govulncheck.
+.PHONY: $(CRANE_BIN)
+$(CRANE_BIN): $(CRANE) ## Build a local copy of crane.
+
.PHONY: $(IMPORT_BOSS_BIN)
$(IMPORT_BOSS_BIN): $(IMPORT_BOSS)
@@ -1504,6 +1514,9 @@ $(GOLANGCI_LINT_KAL): $(GOLANGCI_LINT) # Build golangci-lint-kal from custom con
$(GOVULNCHECK): # Build govulncheck.
GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL) $(GOVULNCHECK_PKG) $(GOVULNCHECK_BIN) $(GOVULNCHECK_VER)
+$(CRANE): # Build crane.
+ GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL) $(CRANE_PKG) $(CRANE_BIN) $(CRANE_VER)
+
$(IMPORT_BOSS): # Build import-boss
GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL) $(IMPORT_BOSS_PKG) $(IMPORT_BOSS_BIN) $(IMPORT_BOSS_VER)
diff --git a/Tiltfile b/Tiltfile
index f9d62e2be08f..2c16eaa73392 100644
--- a/Tiltfile
+++ b/Tiltfile
@@ -172,7 +172,7 @@ def load_provider_tilt_files():
tilt_helper_dockerfile_header = """
# Tilt image
-FROM golang:1.24.9 as tilt-helper
+FROM golang:1.24.11 as tilt-helper
# Install delve. Note this should be kept in step with the Go release minor version.
RUN go install github.com/go-delve/delve/cmd/dlv@v1.24
# Support live reloading with Tilt
@@ -183,7 +183,7 @@ RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com
"""
tilt_dockerfile_header = """
-FROM golang:1.24.9 as tilt
+FROM golang:1.24.11 as tilt
WORKDIR /
COPY --from=tilt-helper /process.txt .
COPY --from=tilt-helper /start.sh .
@@ -249,7 +249,7 @@ def build_go_binary(context, reload_deps, debug, go_main, binary_name, label):
build_cmd = build_cmd,
),
deps = live_reload_deps,
- labels = [label, "ALL.binaries"],
+ labels = [label],
)
def build_docker_image(image, context, binary_name, additional_docker_build_commands, additional_docker_helper_commands, port_forwards):
@@ -290,7 +290,12 @@ def build_docker_image(image, context, binary_name, additional_docker_build_comm
ref = image,
context = context + "/.tiltbuild/bin/",
dockerfile_contents = dockerfile_contents,
- build_args = {"binary_name": binary_name},
+ build_args = {
+ "binary_name": binary_name,
+ "http_proxy": os.getenv("http_proxy", ""),
+ "https_proxy": os.getenv("https_proxy", ""),
+ "no_proxy": os.getenv("no_proxy", ""),
+ },
target = "tilt",
only = binary_name,
live_update = [
@@ -363,7 +368,7 @@ def enable_provider(name, debug):
workload = find_object_name(objs, "Deployment"),
objects = [find_object_qualified_name(objs, "Provider")] + find_all_objects_names(additional_objs),
new_name = label.lower() + "_controller",
- labels = [label, "ALL.controllers"],
+ labels = [label],
port_forwards = port_forwards,
links = links,
resource_deps = ["provider_crd"] + p.get("resource_deps", []),
@@ -420,9 +425,9 @@ def deploy_provider_crds():
)
def deploy_observability():
- if "promtail" in settings.get("deploy_observability", []):
- k8s_yaml(read_file("./.tiltbuild/yaml/promtail.observability.yaml"), allow_duplicates = True)
- k8s_resource(workload = "promtail", extra_pod_selectors = [{"app": "promtail"}], labels = ["observability"], resource_deps = ["loki"], objects = ["promtail:serviceaccount"])
+ if "alloy" in settings.get("deploy_observability", []):
+ k8s_yaml(read_file("./.tiltbuild/yaml/alloy.observability.yaml"), allow_duplicates = True)
+ k8s_resource(workload = "alloy", extra_pod_selectors = [{"app": "alloy"}], labels = ["observability"], resource_deps = ["loki"], objects = ["alloy:serviceaccount"])
if "loki" in settings.get("deploy_observability", []):
k8s_yaml(read_file("./.tiltbuild/yaml/loki.observability.yaml"), allow_duplicates = True)
diff --git a/api/bootstrap/kubeadm/v1beta1/conversion.go b/api/bootstrap/kubeadm/v1beta1/conversion.go
index 3f6bf3eeb155..8c5d7c57f410 100644
--- a/api/bootstrap/kubeadm/v1beta1/conversion.go
+++ b/api/bootstrap/kubeadm/v1beta1/conversion.go
@@ -81,6 +81,9 @@ func RestoreKubeadmConfigSpec(restored *bootstrapv1.KubeadmConfigSpec, dst *boot
dst.ClusterConfiguration.CACertificateValidityPeriodDays = restored.ClusterConfiguration.CACertificateValidityPeriodDays
}
}
+ if restored.ClusterConfiguration.EncryptionAlgorithm != "" {
+ dst.ClusterConfiguration.EncryptionAlgorithm = restored.ClusterConfiguration.EncryptionAlgorithm
+ }
}
func RestoreBoolIntentKubeadmConfigSpec(src *KubeadmConfigSpec, dst *bootstrapv1.KubeadmConfigSpec, hasRestored bool, restored *bootstrapv1.KubeadmConfigSpec) error {
diff --git a/api/bootstrap/kubeadm/v1beta1/zz_generated.conversion.go b/api/bootstrap/kubeadm/v1beta1/zz_generated.conversion.go
index bae21feb41fd..16b20da9ed1e 100644
--- a/api/bootstrap/kubeadm/v1beta1/zz_generated.conversion.go
+++ b/api/bootstrap/kubeadm/v1beta1/zz_generated.conversion.go
@@ -691,6 +691,7 @@ func autoConvert_v1beta2_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in
out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates))
// WARNING: in.CertificateValidityPeriodDays requires manual conversion: does not exist in peer-type
// WARNING: in.CACertificateValidityPeriodDays requires manual conversion: does not exist in peer-type
+ // WARNING: in.EncryptionAlgorithm requires manual conversion: does not exist in peer-type
return nil
}
diff --git a/api/bootstrap/kubeadm/v1beta2/kubeadm_types.go b/api/bootstrap/kubeadm/v1beta2/kubeadm_types.go
index e9f17e19a28b..17e3bfc7840f 100644
--- a/api/bootstrap/kubeadm/v1beta2/kubeadm_types.go
+++ b/api/bootstrap/kubeadm/v1beta2/kubeadm_types.go
@@ -72,6 +72,23 @@ const (
KubeadmConfigDataSecretNotAvailableReason = clusterv1.NotAvailableReason
)
+// EncryptionAlgorithmType can define an asymmetric encryption algorithm type.
+// +kubebuilder:validation:Enum=ECDSA-P256;ECDSA-P384;RSA-2048;RSA-3072;RSA-4096
+type EncryptionAlgorithmType string
+
+const (
+ // EncryptionAlgorithmECDSAP256 defines the ECDSA encryption algorithm type with curve P256.
+ EncryptionAlgorithmECDSAP256 EncryptionAlgorithmType = "ECDSA-P256"
+ // EncryptionAlgorithmECDSAP384 defines the ECDSA encryption algorithm type with curve P384.
+ EncryptionAlgorithmECDSAP384 EncryptionAlgorithmType = "ECDSA-P384"
+ // EncryptionAlgorithmRSA2048 defines the RSA encryption algorithm type with key size 2048 bits.
+ EncryptionAlgorithmRSA2048 EncryptionAlgorithmType = "RSA-2048"
+ // EncryptionAlgorithmRSA3072 defines the RSA encryption algorithm type with key size 3072 bits.
+ EncryptionAlgorithmRSA3072 EncryptionAlgorithmType = "RSA-3072"
+ // EncryptionAlgorithmRSA4096 defines the RSA encryption algorithm type with key size 4096 bits.
+ EncryptionAlgorithmRSA4096 EncryptionAlgorithmType = "RSA-4096"
+)
+
// InitConfiguration contains a list of elements that is specific "kubeadm init"-only runtime
// information.
// +kubebuilder:validation:MinProperties=1
@@ -174,16 +191,7 @@ type ClusterConfiguration struct {
CertificatesDir string `json:"certificatesDir,omitempty"`
// imageRepository sets the container registry to pull images from.
- // * If not set, the default registry of kubeadm will be used, i.e.
- // * registry.k8s.io (new registry): >= v1.22.17, >= v1.23.15, >= v1.24.9, >= v1.25.0
- // * k8s.gcr.io (old registry): all older versions
- // Please note that when imageRepository is not set we don't allow upgrades to
- // versions >= v1.22.0 which use the old registry (k8s.gcr.io). Please use
- // a newer patch version with the new registry instead (i.e. >= v1.22.17,
- // >= v1.23.15, >= v1.24.9, >= v1.25.0).
- // * If the version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`)
- // `gcr.io/k8s-staging-ci-images` will be used as a default for control plane components
- // and for kube-proxy, while `registry.k8s.io` will be used for all the other images.
+ // If not set, the default registry of kubeadm will be used (registry.k8s.io).
// +optional
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=512
@@ -208,6 +216,16 @@ type ClusterConfiguration struct {
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=36500
CACertificateValidityPeriodDays int32 `json:"caCertificateValidityPeriodDays,omitempty"`
+
+ // encryptionAlgorithm holds the type of asymmetric encryption algorithm used for keys and certificates.
+ // Can be one of "RSA-2048", "RSA-3072", "RSA-4096", "ECDSA-P256" or "ECDSA-P384".
+ // For Kubernetes 1.34 or above, "ECDSA-P384" is supported.
+ // If not specified, Cluster API will use RSA-2048 as default.
+ // When this field is modified every certificate generated afterward will use the new
+ // encryptionAlgorithm. Existing CA certificates and service account keys are not rotated.
+ // This field is only supported with Kubernetes v1.31 or above.
+ // +optional
+ EncryptionAlgorithm EncryptionAlgorithmType `json:"encryptionAlgorithm,omitempty"`
}
// IsDefined returns true if the ClusterConfiguration is defined.
@@ -356,6 +374,11 @@ type APIEndpoint struct {
BindPort int32 `json:"bindPort,omitempty"`
}
+// IsDefined returns true if the APIEndpoint is defined.
+func (r *APIEndpoint) IsDefined() bool {
+ return r.AdvertiseAddress != "" || r.BindPort != 0
+}
+
// NodeRegistrationOptions holds fields that relate to registering a new control-plane or node to the cluster, either via "kubeadm init" or "kubeadm join".
// Note: The NodeRegistrationOptions struct has to be kept in sync with the structs in MarshalJSON.
// +kubebuilder:validation:MinProperties=1
diff --git a/api/controlplane/kubeadm/v1beta2/kubeadm_control_plane_types.go b/api/controlplane/kubeadm/v1beta2/kubeadm_control_plane_types.go
index 95aeb6a5fb88..e3622270b490 100644
--- a/api/controlplane/kubeadm/v1beta2/kubeadm_control_plane_types.go
+++ b/api/controlplane/kubeadm/v1beta2/kubeadm_control_plane_types.go
@@ -46,10 +46,6 @@ const (
// SkipKubeProxyAnnotation annotation explicitly skips reconciling kube-proxy if set.
SkipKubeProxyAnnotation = "controlplane.cluster.x-k8s.io/skip-kube-proxy"
- // KubeadmClusterConfigurationAnnotation is a machine annotation that stores the json-marshalled string of KCP ClusterConfiguration.
- // This annotation is used to detect any changes in ClusterConfiguration and trigger machine rollout in KCP.
- KubeadmClusterConfigurationAnnotation = "controlplane.cluster.x-k8s.io/kubeadm-cluster-configuration"
-
// RemediationInProgressAnnotation is used to keep track that a KCP remediation is in progress, and more
// specifically it tracks that the system is in between having deleted an unhealthy machine and recreating its replacement.
// NOTE: if something external to CAPI removes this annotation the system cannot detect the above situation; this can lead to
@@ -424,11 +420,6 @@ type KubeadmControlPlaneSpec struct {
Replicas *int32 `json:"replicas,omitempty"`
// version defines the desired Kubernetes version.
- // Please note that if kubeadmConfigSpec.ClusterConfiguration.imageRepository is not set
- // we don't allow upgrades to versions >= v1.22.0 for which kubeadm uses the old registry (k8s.gcr.io).
- // Please use a newer patch version with the new registry instead. The default registries of kubeadm are:
- // * registry.k8s.io (new registry): >= v1.22.17, >= v1.23.15, >= v1.24.9, >= v1.25.0
- // * k8s.gcr.io (old registry): all older versions
// +required
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=256
diff --git a/api/core/v1beta1/cluster_types.go b/api/core/v1beta1/cluster_types.go
index c6ff0853b180..5d6d69a9b36d 100644
--- a/api/core/v1beta1/cluster_types.go
+++ b/api/core/v1beta1/cluster_types.go
@@ -1092,12 +1092,12 @@ func (c *ClusterStatus) GetTypedPhase() ClusterPhase {
type APIEndpoint struct {
// host is the hostname on which the API server is serving.
// TODO: Can't set MinLength=1 for now, because this struct is not always used in pointer fields so today we have cases where host is set to an empty string.
- // +required
+ // +optional
// +kubebuilder:validation:MaxLength=512
Host string `json:"host"`
// port is the port on which the API server is serving.
- // +required
+ // +optional
Port int32 `json:"port"`
}
diff --git a/api/core/v1beta1/conversion.go b/api/core/v1beta1/conversion.go
index 03d7a7a9ad8e..a240707da77a 100644
--- a/api/core/v1beta1/conversion.go
+++ b/api/core/v1beta1/conversion.go
@@ -73,6 +73,11 @@ func (src *Cluster) ConvertTo(dstRaw conversion.Hub) error {
return err
}
+ dst.Spec.Topology.ControlPlane.HealthCheck.Checks.UnhealthyMachineConditions = restored.Spec.Topology.ControlPlane.HealthCheck.Checks.UnhealthyMachineConditions
+ for i, md := range restored.Spec.Topology.Workers.MachineDeployments {
+ dst.Spec.Topology.Workers.MachineDeployments[i].HealthCheck.Checks.UnhealthyMachineConditions = md.HealthCheck.Checks.UnhealthyMachineConditions
+ }
+
// Recover intent for bool values converted to *bool.
clusterv1.Convert_bool_To_Pointer_bool(src.Spec.Paused, ok, restored.Spec.Paused, &dst.Spec.Paused)
@@ -145,6 +150,11 @@ func (src *ClusterClass) ConvertTo(dstRaw conversion.Hub) error {
return err
}
+ dst.Spec.ControlPlane.HealthCheck.Checks.UnhealthyMachineConditions = restored.Spec.ControlPlane.HealthCheck.Checks.UnhealthyMachineConditions
+ for i, md := range restored.Spec.Workers.MachineDeployments {
+ dst.Spec.Workers.MachineDeployments[i].HealthCheck.Checks.UnhealthyMachineConditions = md.HealthCheck.Checks.UnhealthyMachineConditions
+ }
+
// Recover intent for bool values converted to *bool.
for i, patch := range dst.Spec.Patches {
for j, definition := range patch.Definitions {
@@ -248,6 +258,10 @@ func (src *ClusterClass) ConvertTo(dstRaw conversion.Hub) error {
dst.Status.Variables[i] = variable
}
+ dst.Spec.KubernetesVersions = restored.Spec.KubernetesVersions
+
+ dst.Spec.Upgrade.External.GenerateUpgradePlanExtension = restored.Spec.Upgrade.External.GenerateUpgradePlanExtension
+
return nil
}
@@ -394,6 +408,11 @@ func (src *Machine) ConvertTo(dstRaw conversion.Hub) error {
// Recover other values.
if ok {
dst.Spec.MinReadySeconds = restored.Spec.MinReadySeconds
+ dst.Spec.Taints = restored.Spec.Taints
+ // Restore the phase, this also means that any client using v1beta1 during a round-trip
+ // won't be able to write the Phase field. But that's okay as the only client writing the Phase
+ // field should be the Machine controller.
+ dst.Status.Phase = restored.Status.Phase
}
return nil
@@ -432,6 +451,17 @@ func (src *MachineSet) ConvertTo(dstRaw conversion.Hub) error {
dst.Spec.Template.Spec.MinReadySeconds = &src.Spec.MinReadySeconds
}
+ restored := &clusterv1.MachineSet{}
+ ok, err := utilconversion.UnmarshalData(src, restored)
+ if err != nil {
+ return err
+ }
+
+ // Recover other values
+ if ok {
+ dst.Spec.Template.Spec.Taints = restored.Spec.Template.Spec.Taints
+ }
+
return nil
}
@@ -449,7 +479,8 @@ func (dst *MachineSet) ConvertFrom(srcRaw conversion.Hub) error {
dst.Spec.MinReadySeconds = ptr.Deref(src.Spec.Template.Spec.MinReadySeconds, 0)
dropEmptyStringsMachineSpec(&dst.Spec.Template.Spec)
- return nil
+
+ return utilconversion.MarshalData(src, dst)
}
func (src *MachineDeployment) ConvertTo(dstRaw conversion.Hub) error {
@@ -474,6 +505,11 @@ func (src *MachineDeployment) ConvertTo(dstRaw conversion.Hub) error {
// Recover intent for bool values converted to *bool.
clusterv1.Convert_bool_To_Pointer_bool(src.Spec.Paused, ok, restored.Spec.Paused, &dst.Spec.Paused)
+ // Recover other values
+ if ok {
+ dst.Spec.Template.Spec.Taints = restored.Spec.Template.Spec.Taints
+ }
+
return nil
}
@@ -509,6 +545,8 @@ func (src *MachineHealthCheck) ConvertTo(dstRaw conversion.Hub) error {
return err
}
+ dst.Spec.Checks.UnhealthyMachineConditions = restored.Spec.Checks.UnhealthyMachineConditions
+
clusterv1.Convert_int32_To_Pointer_int32(src.Status.ExpectedMachines, ok, restored.Status.ExpectedMachines, &dst.Status.ExpectedMachines)
clusterv1.Convert_int32_To_Pointer_int32(src.Status.CurrentHealthy, ok, restored.Status.CurrentHealthy, &dst.Status.CurrentHealthy)
clusterv1.Convert_int32_To_Pointer_int32(src.Status.RemediationsAllowed, ok, restored.Status.RemediationsAllowed, &dst.Status.RemediationsAllowed)
@@ -558,6 +596,11 @@ func (src *MachinePool) ConvertTo(dstRaw conversion.Hub) error {
dst.Status.Initialization = initialization
}
+ // Recover other values
+ if ok {
+ dst.Spec.Template.Spec.Taints = restored.Spec.Template.Spec.Taints
+ }
+
return nil
}
@@ -1637,6 +1680,13 @@ func Convert_v1beta2_MachineStatus_To_v1beta1_MachineStatus(in *clusterv1.Machin
if err := autoConvert_v1beta2_MachineStatus_To_v1beta1_MachineStatus(in, out, s); err != nil {
return err
}
+
+ // Convert v1beta2 Updating phase to v1beta1 Running as Updating did not exist in v1beta1.
+ // We don't have to support a round-trip as only the core CAPI controller should write the Phase field.
+ if out.Phase == "Updating" {
+ out.Phase = "Running"
+ }
+
if !reflect.DeepEqual(in.LastUpdated, metav1.Time{}) {
out.LastUpdated = ptr.To(in.LastUpdated)
}
@@ -2285,8 +2335,6 @@ func convertToObjectReference(ref clusterv1.ContractVersionedObjectReference, na
}
func Convert_v1beta1_JSONSchemaProps_To_v1beta2_JSONSchemaProps(in *JSONSchemaProps, out *clusterv1.JSONSchemaProps, s apimachineryconversion.Scope) error {
- // This conversion func is also required due to a bug in conversion gen that does not recognize the changes for converting bool to *bool.
- // By implementing this func, autoConvert_v1beta1_JSONSchemaProps_To_v1beta2_JSONSchemaProps is generated properly.
if err := autoConvert_v1beta1_JSONSchemaProps_To_v1beta2_JSONSchemaProps(in, out, s); err != nil {
return err
}
diff --git a/api/core/v1beta1/conversion_test.go b/api/core/v1beta1/conversion_test.go
index 10d557048460..172f76e186fb 100644
--- a/api/core/v1beta1/conversion_test.go
+++ b/api/core/v1beta1/conversion_test.go
@@ -514,6 +514,9 @@ func hubMachineSpec(in *clusterv1.MachineSpec, c randfill.Continue) {
func hubMachineStatus(in *clusterv1.MachineStatus, c randfill.Continue) {
c.FillNoCustom(in)
+
+ in.Phase = []string{"Updating", "Running"}[c.Intn(2)]
+
// Drop empty structs with only omit empty fields.
if in.Deprecated != nil {
if in.Deprecated.V1Beta1 == nil || reflect.DeepEqual(in.Deprecated.V1Beta1, &clusterv1.MachineV1Beta1DeprecatedStatus{}) {
diff --git a/api/core/v1beta1/zz_generated.conversion.go b/api/core/v1beta1/zz_generated.conversion.go
index eb54f254dd5a..c0514e67d223 100644
--- a/api/core/v1beta1/zz_generated.conversion.go
+++ b/api/core/v1beta1/zz_generated.conversion.go
@@ -1207,6 +1207,8 @@ func autoConvert_v1beta2_ClusterClassSpec_To_v1beta1_ClusterClassSpec(in *v1beta
} else {
out.Patches = nil
}
+ // WARNING: in.Upgrade requires manual conversion: does not exist in peer-type
+ // WARNING: in.KubernetesVersions requires manual conversion: does not exist in peer-type
return nil
}
@@ -3165,6 +3167,7 @@ func autoConvert_v1beta2_MachineSpec_To_v1beta1_MachineSpec(in *v1beta2.MachineS
// WARNING: in.MinReadySeconds requires manual conversion: does not exist in peer-type
out.ReadinessGates = *(*[]MachineReadinessGate)(unsafe.Pointer(&in.ReadinessGates))
// WARNING: in.Deletion requires manual conversion: does not exist in peer-type
+ // WARNING: in.Taints requires manual conversion: does not exist in peer-type
return nil
}
diff --git a/api/core/v1beta1/zz_generated.openapi.go b/api/core/v1beta1/zz_generated.openapi.go
index 13a78b23719c..723cf5a90c93 100644
--- a/api/core/v1beta1/zz_generated.openapi.go
+++ b/api/core/v1beta1/zz_generated.openapi.go
@@ -154,7 +154,6 @@ func schema_cluster_api_api_core_v1beta1_APIEndpoint(ref common.ReferenceCallbac
},
},
},
- Required: []string{"host", "port"},
},
},
}
diff --git a/api/core/v1beta2/cluster_types.go b/api/core/v1beta2/cluster_types.go
index af0969853155..9666455e9035 100644
--- a/api/core/v1beta2/cluster_types.go
+++ b/api/core/v1beta2/cluster_types.go
@@ -80,17 +80,27 @@ const (
// failing due to an error.
ClusterTopologyReconciledFailedReason = "ReconcileFailed"
+ // ClusterTopologyReconciledClusterCreatingReason documents reconciliation of a Cluster topology
+ // not yet created because the BeforeClusterCreate hook is blocking.
+ ClusterTopologyReconciledClusterCreatingReason = "ClusterCreating"
+
// ClusterTopologyReconciledControlPlaneUpgradePendingReason documents reconciliation of a Cluster topology
// not yet completed because Control Plane is not yet updated to match the desired topology spec.
+ //
+ // Deprecated: please use ClusterUpgrading instead.
ClusterTopologyReconciledControlPlaneUpgradePendingReason = "ControlPlaneUpgradePending"
// ClusterTopologyReconciledMachineDeploymentsCreatePendingReason documents reconciliation of a Cluster topology
// not yet completed because at least one of the MachineDeployments is yet to be created.
// This generally happens because new MachineDeployment creations are held off while the ControlPlane is not stable.
+ //
+ // Deprecated: please use ClusterUpgrading instead.
ClusterTopologyReconciledMachineDeploymentsCreatePendingReason = "MachineDeploymentsCreatePending"
// ClusterTopologyReconciledMachineDeploymentsUpgradePendingReason documents reconciliation of a Cluster topology
// not yet completed because at least one of the MachineDeployments is not yet updated to match the desired topology spec.
+ //
+ // Deprecated: please use ClusterUpgrading instead.
ClusterTopologyReconciledMachineDeploymentsUpgradePendingReason = "MachineDeploymentsUpgradePending"
// ClusterTopologyReconciledMachineDeploymentsUpgradeDeferredReason documents reconciliation of a Cluster topology
@@ -99,11 +109,15 @@ const (
// ClusterTopologyReconciledMachinePoolsUpgradePendingReason documents reconciliation of a Cluster topology
// not yet completed because at least one of the MachinePools is not yet updated to match the desired topology spec.
+ //
+ // Deprecated: please use ClusterUpgrading instead.
ClusterTopologyReconciledMachinePoolsUpgradePendingReason = "MachinePoolsUpgradePending"
// ClusterTopologyReconciledMachinePoolsCreatePendingReason documents reconciliation of a Cluster topology
// not yet completed because at least one of the MachinePools is yet to be created.
// This generally happens because new MachinePool creations are held off while the ControlPlane is not stable.
+ //
+ // Deprecated: please use ClusterUpgrading instead.
ClusterTopologyReconciledMachinePoolsCreatePendingReason = "MachinePoolsCreatePending"
// ClusterTopologyReconciledMachinePoolsUpgradeDeferredReason documents reconciliation of a Cluster topology
@@ -112,8 +126,13 @@ const (
// ClusterTopologyReconciledHookBlockingReason documents reconciliation of a Cluster topology
// not yet completed because at least one of the lifecycle hooks is blocking.
+ //
+ // Deprecated: please use ClusterUpgrading instead.
ClusterTopologyReconciledHookBlockingReason = "LifecycleHookBlocking"
+ // ClusterTopologyReconciledClusterUpgradingReason documents reconciliation of a Cluster topology
+ // not yet completed because a cluster upgrade is still in progress.
+ ClusterTopologyReconciledClusterUpgradingReason = "ClusterUpgrading"
// ClusterTopologyReconciledClusterClassNotReconciledReason documents reconciliation of a Cluster topology not
// yet completed because the ClusterClass has not reconciled yet. If this condition persists there may be an issue
// with the ClusterClass surfaced in the ClusterClass status or controller logs.
@@ -725,6 +744,16 @@ type ControlPlaneTopologyHealthCheckChecks struct {
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=100
UnhealthyNodeConditions []UnhealthyNodeCondition `json:"unhealthyNodeConditions,omitempty"`
+
+ // 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.
+ //
+ // +optional
+ // +listType=atomic
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=100
+ UnhealthyMachineConditions []UnhealthyMachineCondition `json:"unhealthyMachineConditions,omitempty"`
}
// ControlPlaneTopologyHealthCheckRemediation configures if and how remediations are triggered if a control plane Machine is unhealthy.
@@ -975,6 +1004,16 @@ type MachineDeploymentTopologyHealthCheckChecks struct {
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=100
UnhealthyNodeConditions []UnhealthyNodeCondition `json:"unhealthyNodeConditions,omitempty"`
+
+ // 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.
+ //
+ // +optional
+ // +listType=atomic
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=100
+ UnhealthyMachineConditions []UnhealthyMachineCondition `json:"unhealthyMachineConditions,omitempty"`
}
// MachineDeploymentTopologyHealthCheckRemediation configures if and how remediations are triggered if a MachineDeployment Machine is unhealthy.
diff --git a/api/core/v1beta2/clusterclass_types.go b/api/core/v1beta2/clusterclass_types.go
index 80d78f358553..12e8cc19c5d4 100644
--- a/api/core/v1beta2/clusterclass_types.go
+++ b/api/core/v1beta2/clusterclass_types.go
@@ -135,6 +135,22 @@ type ClusterClassSpec struct {
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=1000
Patches []ClusterClassPatch `json:"patches,omitempty"`
+
+ // upgrade defines the upgrade configuration for clusters using this ClusterClass.
+ // +optional
+ Upgrade ClusterClassUpgrade `json:"upgrade,omitempty,omitzero"`
+
+ // 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.
+ // +optional
+ // +listType=atomic
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=100
+ // +kubebuilder:validation:items:MinLength=1
+ // +kubebuilder:validation:items:MaxLength=256
+ KubernetesVersions []string `json:"kubernetesVersions,omitempty"`
}
// InfrastructureClass defines the class for the infrastructure cluster.
@@ -265,6 +281,16 @@ type ControlPlaneClassHealthCheckChecks struct {
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=100
UnhealthyNodeConditions []UnhealthyNodeCondition `json:"unhealthyNodeConditions,omitempty"`
+
+ // 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.
+ //
+ // +optional
+ // +listType=atomic
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=100
+ UnhealthyMachineConditions []UnhealthyMachineCondition `json:"unhealthyMachineConditions,omitempty"`
}
// ControlPlaneClassHealthCheckRemediation configures if and how remediations are triggered if a control plane Machine is unhealthy.
@@ -526,6 +552,16 @@ type MachineDeploymentClassHealthCheckChecks struct {
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=100
UnhealthyNodeConditions []UnhealthyNodeCondition `json:"unhealthyNodeConditions,omitempty"`
+
+ // 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.
+ //
+ // +optional
+ // +listType=atomic
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=100
+ UnhealthyMachineConditions []UnhealthyMachineCondition `json:"unhealthyMachineConditions,omitempty"`
}
// MachineDeploymentClassHealthCheckRemediation configures if and how remediations are triggered if a MachineDeployment Machine is unhealthy.
@@ -1240,6 +1276,24 @@ type ClusterClassPatch struct {
External *ExternalPatchDefinition `json:"external,omitempty"`
}
+// ClusterClassUpgrade defines the upgrade configuration for clusters using the ClusterClass.
+// +kubebuilder:validation:MinProperties=1
+type ClusterClassUpgrade struct {
+ // external defines external runtime extensions for upgrade operations.
+ // +optional
+ External ClusterClassUpgradeExternal `json:"external,omitempty,omitzero"`
+}
+
+// ClusterClassUpgradeExternal defines external runtime extensions for upgrade operations.
+// +kubebuilder:validation:MinProperties=1
+type ClusterClassUpgradeExternal struct {
+ // generateUpgradePlanExtension references an extension which is called to generate upgrade plan.
+ // +optional
+ // +kubebuilder:validation:MinLength=1
+ // +kubebuilder:validation:MaxLength=512
+ GenerateUpgradePlanExtension string `json:"generateUpgradePlanExtension,omitempty"`
+}
+
// PatchDefinition defines a patch which is applied to customize the referenced templates.
type PatchDefinition struct {
// selector defines on which templates the patch should be applied.
diff --git a/api/core/v1beta2/common_types.go b/api/core/v1beta2/common_types.go
index 55c37a288bde..78b064afb12c 100644
--- a/api/core/v1beta2/common_types.go
+++ b/api/core/v1beta2/common_types.go
@@ -36,6 +36,10 @@ const (
// to track the name of the MachineDeployment topology it represents.
ClusterTopologyMachineDeploymentNameLabel = "topology.cluster.x-k8s.io/deployment-name"
+ // ClusterTopologyUpgradeStepAnnotation tracks the version of the current upgrade step.
+ // It is only set when an upgrade is in progress, and it contains the control plane version computed by topology controller.
+ ClusterTopologyUpgradeStepAnnotation = "topology.internal.cluster.x-k8s.io/upgrade-step"
+
// ClusterTopologyHoldUpgradeSequenceAnnotation can be used to hold the entire MachineDeployment upgrade sequence.
// If the annotation is set on a MachineDeployment topology in Cluster.spec.topology.workers, the Kubernetes upgrade
// for this MachineDeployment topology and all subsequent ones is deferred.
@@ -95,6 +99,9 @@ const (
// AnnotationsFromMachineAnnotation is the annotation set on nodes to track the annotations that originated from machines.
AnnotationsFromMachineAnnotation = "cluster.x-k8s.io/annotations-from-machine"
+ // TaintsFromMachineAnnotation is the annotation set on nodes to track the taints that originated from machines.
+ TaintsFromMachineAnnotation = "cluster.x-k8s.io/taints-from-machine"
+
// OwnerNameAnnotation is the annotation set on nodes identifying the owner name.
OwnerNameAnnotation = "cluster.x-k8s.io/owner-name"
@@ -302,7 +309,7 @@ type MachineAddress struct {
}
// MachineAddresses is a slice of MachineAddress items to be used by infrastructure providers.
-// +kubebuilder:validation:MaxItems=32
+// +kubebuilder:validation:MaxItems=128
// +listType=atomic
type MachineAddresses []MachineAddress
@@ -401,3 +408,58 @@ func (r *ContractVersionedObjectReference) GroupKind() schema.GroupKind {
Kind: r.Kind,
}
}
+
+// MachineTaint defines a taint equivalent to corev1.Taint, but additionally having a propagation field.
+type MachineTaint struct {
+ // 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 `/`.
+ // +required
+ // +kubebuilder:validation:MinLength=1
+ // +kubebuilder:validation:MaxLength=317
+ // +kubebuilder:validation: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]$
+ // +kubebuilder:validation:XValidation:rule="self.contains('/') ? ( self.split('/') [0].size() <= 253 && self.split('/') [1].size() <= 63 && self.split('/').size() == 2 ) : self.size() <= 63",message="key must be a valid qualified name of max size 63 characters with an optional subdomain prefix of max size 253 characters"
+ Key string `json:"key,omitempty"`
+
+ // value is the taint value corresponding to the taint key.
+ // It must be a valid label value of maximum size 63 characters.
+ // +optional
+ // +kubebuilder:validation:MinLength=1
+ // +kubebuilder:validation:MaxLength=63
+ // +kubebuilder:validation:Pattern=^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
+ Value string `json:"value,omitempty"`
+
+ // effect is the effect for the taint. Valid values are NoSchedule, PreferNoSchedule and NoExecute.
+ // +required
+ // +kubebuilder:validation:Enum=NoSchedule;PreferNoSchedule;NoExecute
+ Effect corev1.TaintEffect `json:"effect,omitempty"`
+
+ // 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.
+ // +required
+ Propagation MachineTaintPropagation `json:"propagation,omitempty"`
+}
+
+// MachineTaintPropagation defines when a taint should be propagated to nodes.
+// +kubebuilder:validation:Enum=Always;OnInitialization
+type MachineTaintPropagation string
+
+const (
+ // MachineTaintPropagationAlways means the taint should be continuously reconciled and kept on the node.
+ // - If an Always taint is added to the Machine, the taint will be added to the node.
+ // - If an Always taint is removed from the Machine, the taint will be removed from the node.
+ // - If an OnInitialization taint is changed to Always, the Machine controller will ensure the taint is set on the node.
+ // - If an Always taint is removed from the node, it will be re-added during reconciliation.
+ MachineTaintPropagationAlways MachineTaintPropagation = "Always"
+
+ // MachineTaintPropagationOnInitialization means the taint should be set once during initialization and then
+ // left alone.
+ // - If an OnInitialization taint is added to the Machine, the taint will only be added to the node on initialization.
+ // - If an OnInitialization taint is removed from the Machine nothing will be changed on the node.
+ // - If an Always taint is changed to OnInitialization, the taint will only be added to the node on initialization.
+ // - If an OnInitialization taint is removed from the node, it will not be re-added during reconciliation.
+ MachineTaintPropagationOnInitialization MachineTaintPropagation = "OnInitialization"
+)
diff --git a/api/core/v1beta2/machine_phase_types.go b/api/core/v1beta2/machine_phase_types.go
index 1ca955156444..b849ea61d654 100644
--- a/api/core/v1beta2/machine_phase_types.go
+++ b/api/core/v1beta2/machine_phase_types.go
@@ -45,6 +45,10 @@ const (
// become a Kubernetes Node in a Ready state.
MachinePhaseRunning = MachinePhase("Running")
+ // MachinePhaseUpdating is the Machine state when the Machine
+ // is updating.
+ MachinePhaseUpdating = MachinePhase("Updating")
+
// MachinePhaseDeleting is the Machine state when a delete
// request has been sent to the API Server,
// but its infrastructure has not yet been fully deleted.
diff --git a/api/core/v1beta2/machine_types.go b/api/core/v1beta2/machine_types.go
index a60f736ba21c..399d3971ce2d 100644
--- a/api/core/v1beta2/machine_types.go
+++ b/api/core/v1beta2/machine_types.go
@@ -87,6 +87,17 @@ const (
// ManagedNodeAnnotationDomain is one of the CAPI managed Node annotation domains.
ManagedNodeAnnotationDomain = "node.cluster.x-k8s.io"
+
+ // PendingAcknowledgeMoveAnnotation is an internal annotation added by the MS controller to a machine when being
+ // moved from the oldMS to the newMS. The annotation is removed as soon as the MS controller get the acknowledgment about the
+ // replica being accounted from the corresponding MD.
+ // Note: The annotation is added when reconciling the oldMS, and it is removed when reconciling the newMS.
+ // Note: This annotation is used in pair with AcknowledgedMoveAnnotation on MachineSets.
+ PendingAcknowledgeMoveAnnotation = "in-place-updates.internal.cluster.x-k8s.io/pending-acknowledge-move"
+
+ // UpdateInProgressAnnotation is an internal annotation added to machines by the controller owning the Machine when in-place update
+ // is started, e.g. by the MachineSet controller; the annotation will be removed by the Machine controller when in-place update is completed.
+ UpdateInProgressAnnotation = "in-place-updates.internal.cluster.x-k8s.io/update-in-progress"
)
// Machine's Available condition and corresponding reasons.
@@ -109,7 +120,7 @@ const (
// Machine's Ready condition and corresponding reasons.
const (
// MachineReadyCondition is true if the Machine's deletionTimestamp is not set, Machine's BootstrapConfigReady, InfrastructureReady,
- // NodeHealthy and HealthCheckSucceeded (if present) conditions are true; if other conditions are defined in spec.readinessGates,
+ // NodeHealthy and HealthCheckSucceeded (if present) conditions are true, Updating condition is false; if other conditions are defined in spec.readinessGates,
// these conditions must be true as well.
// Note:
// - When summarizing the Deleting condition:
@@ -151,6 +162,28 @@ const (
// MachineNotUpToDateReason surface when a Machine spec does not match the spec of the Machine's owner resource, e.g. KubeadmControlPlane or MachineDeployment.
MachineNotUpToDateReason = "NotUpToDate"
+
+ // MachineUpToDateUpdatingReason surface when a Machine spec matches the spec of the Machine's owner resource,
+ // but the Machine is still updating in-place.
+ MachineUpToDateUpdatingReason = "Updating"
+)
+
+// Machine's Updating condition and corresponding reasons.
+// Note: Updating condition is set by the Machine controller during in-place updates.
+const (
+ // MachineUpdatingCondition is true while an in-place update is in progress on the Machine.
+ // The condition is owned by the Machine controller and is used to track the progress of in-place updates.
+ // This condition is considered when computing the UpToDate condition.
+ MachineUpdatingCondition = "Updating"
+
+ // MachineNotUpdatingReason surfaces when the Machine is not performing an in-place update.
+ MachineNotUpdatingReason = "NotUpdating"
+
+ // MachineInPlaceUpdatingReason surfaces when the Machine is waiting for in-place update to complete.
+ MachineInPlaceUpdatingReason = "InPlaceUpdating"
+
+ // MachineInPlaceUpdateFailedReason surfaces when the in-place update has failed.
+ MachineInPlaceUpdateFailedReason = "InPlaceUpdateFailed"
)
// Machine's BootstrapConfigReady condition and corresponding reasons.
@@ -276,6 +309,10 @@ const (
// defined by a MachineHealthCheck object.
MachineHealthCheckUnhealthyNodeReason = "UnhealthyNode"
+ // MachineHealthCheckUnhealthyMachineReason surfaces when the machine does not pass the health checks
+ // defined by a MachineHealthCheck object.
+ MachineHealthCheckUnhealthyMachineReason = "UnhealthyMachine"
+
// MachineHealthCheckNodeStartupTimeoutReason surfaces when the node hosted on the machine does not appear within
// the timeout defined by a MachineHealthCheck object.
MachineHealthCheckNodeStartupTimeoutReason = "NodeStartupTimeout"
@@ -451,6 +488,23 @@ type MachineSpec struct {
// deletion contains configuration options for Machine deletion.
// +optional
Deletion MachineDeletionSpec `json:"deletion,omitempty,omitzero"`
+
+ // taints are the node taints that Cluster API will manage.
+ // This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes,
+ // e.g. the node controller might add the node.kubernetes.io/not-ready taint.
+ // Only those taints defined in this list will be added or removed by core Cluster API controllers.
+ //
+ // There can be at most 64 taints.
+ // A pod would have to tolerate all existing taints to run on the corresponding node.
+ //
+ // NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners.
+ // +optional
+ // +listType=map
+ // +listMapKey=key
+ // +listMapKey=effect
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=64
+ Taints []MachineTaint `json:"taints,omitempty"`
}
// MachineDeletionSpec contains configuration options for Machine deletion.
@@ -502,7 +556,7 @@ type MachineReadinessGate struct {
type MachineStatus struct {
// conditions represents the observations of a Machine's current state.
// Known condition types are Available, Ready, UpToDate, BootstrapConfigReady, InfrastructureReady, NodeReady,
- // NodeHealthy, Deleting, Paused.
+ // 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.
@@ -537,7 +591,7 @@ type MachineStatus struct {
// phase represents the current phase of machine actuation.
// +optional
- // +kubebuilder:validation:Enum=Pending;Provisioning;Provisioned;Running;Deleting;Deleted;Failed;Unknown
+ // +kubebuilder:validation:Enum=Pending;Provisioning;Provisioned;Running;Updating;Deleting;Deleted;Failed;Unknown
Phase string `json:"phase,omitempty"`
// certificatesExpiryDate is the expiry date of the machine certificates.
@@ -695,6 +749,7 @@ func (m *MachineStatus) GetTypedPhase() MachinePhase {
MachinePhaseProvisioning,
MachinePhaseProvisioned,
MachinePhaseRunning,
+ MachinePhaseUpdating,
MachinePhaseDeleting,
MachinePhaseDeleted,
MachinePhaseFailed:
diff --git a/api/core/v1beta2/machinehealthcheck_types.go b/api/core/v1beta2/machinehealthcheck_types.go
index 9a7e31cae44d..9a1f66bc8b07 100644
--- a/api/core/v1beta2/machinehealthcheck_types.go
+++ b/api/core/v1beta2/machinehealthcheck_types.go
@@ -111,6 +111,16 @@ type MachineHealthCheckChecks struct {
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=100
UnhealthyNodeConditions []UnhealthyNodeCondition `json:"unhealthyNodeConditions,omitempty"`
+
+ // 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.
+ //
+ // +optional
+ // +listType=atomic
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=100
+ UnhealthyMachineConditions []UnhealthyMachineCondition `json:"unhealthyMachineConditions,omitempty"`
}
// MachineHealthCheckRemediation configures if and how remediations are triggered if a Machine is unhealthy.
@@ -227,7 +237,33 @@ type UnhealthyNodeCondition struct {
// 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 example, with a value of "3600", the node must match the status
+ // for at least 1 hour before being considered unhealthy.
+ // +required
+ // +kubebuilder:validation:Minimum=0
+ TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"`
+}
+
+// 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 UnhealthyMachineCondition struct {
+ // type of Machine condition
+ // +kubebuilder:validation: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])$`
+ // +kubebuilder:validation:MinLength=1
+ // +kubebuilder:validation:MaxLength=316
+ // +kubebuilder:validation:XValidation:rule="!(self in ['Ready','Available','HealthCheckSucceeded','OwnerRemediated','ExternallyRemediated'])",message="type must not be one of: Ready, Available, HealthCheckSucceeded, OwnerRemediated, ExternallyRemediated"
+ // +required
+ Type string `json:"type,omitempty"`
+
+ // status of the condition, one of True, False, Unknown.
+ // +required
+ // +kubebuilder:validation:Enum=True;False;Unknown
+ Status metav1.ConditionStatus `json:"status,omitempty"`
+
+ // 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.
// +required
// +kubebuilder:validation:Minimum=0
diff --git a/api/core/v1beta2/machineset_types.go b/api/core/v1beta2/machineset_types.go
index 8a5a92db7d1b..80cb19d36256 100644
--- a/api/core/v1beta2/machineset_types.go
+++ b/api/core/v1beta2/machineset_types.go
@@ -33,6 +33,29 @@ const (
// MachineSetFinalizer is the finalizer used by the MachineSet controller to
// ensure ordered cleanup of corresponding Machines when a Machineset is being deleted.
MachineSetFinalizer = "cluster.x-k8s.io/machineset"
+
+ // MachineSetMoveMachinesToMachineSetAnnotation is an internal annotation added by the MD controller to the oldMS
+ // when it should scale down by moving machines that can be updated in-place to the newMS instead of deleting them.
+ // The annotation value is the newMS name.
+ // Note: This annotation is used in pair with MachineSetReceiveMachinesFromMachineSetsAnnotation to perform a two-ways check before moving a machine from oldMS to newMS:
+ //
+ // "oldMS must have: move to newMS" and "newMS must have: receive replicas from oldMS"
+ MachineSetMoveMachinesToMachineSetAnnotation = "in-place-updates.internal.cluster.x-k8s.io/move-machines-to-machineset"
+
+ // MachineSetReceiveMachinesFromMachineSetsAnnotation is an internal annotation added by the MD controller to the newMS
+ // when it should receive replicas from oldMSs as a first step of an in-place update operation
+ // The annotation value is a comma separated list of oldMSs.
+ // Note: This annotation is used in pair with MachineSetMoveMachinesToMachineSetAnnotation to perform a two-ways check before moving a machine from oldMS to newMS:
+ //
+ // "oldMS must have: move to newMS" and "newMS must have: receive replicas from oldMS"
+ MachineSetReceiveMachinesFromMachineSetsAnnotation = "in-place-updates.internal.cluster.x-k8s.io/receive-machines-from-machinesets"
+
+ // AcknowledgedMoveAnnotation is an internal annotation with a list of machines added by the MD controller
+ // to a MachineSet when it acknowledges a machine pending acknowledge after being moved from an oldMS.
+ // The annotation value is a comma separated list of Machines already acknowledged; a machine is dropped
+ // from this annotation as soon as pending-acknowledge-move is removed from the machine; the annotation is dropped when empty.
+ // Note: This annotation is used in pair with PendingAcknowledgeMoveAnnotation on Machines.
+ AcknowledgedMoveAnnotation = "in-place-updates.internal.cluster.x-k8s.io/acknowledged-move"
)
// MachineSetSpec defines the desired state of MachineSet.
diff --git a/api/core/v1beta2/v1beta1_condition_consts.go b/api/core/v1beta2/v1beta1_condition_consts.go
index aef565c0aa2f..b619c6e0d7f2 100644
--- a/api/core/v1beta2/v1beta1_condition_consts.go
+++ b/api/core/v1beta2/v1beta1_condition_consts.go
@@ -157,6 +157,11 @@ const (
// UnhealthyNodeConditionV1Beta1Reason is the reason used when a machine's node has one of the MachineHealthCheck's unhealthy conditions.
UnhealthyNodeConditionV1Beta1Reason = "UnhealthyNode"
+
+ // UnhealthyMachineConditionV1Beta1Reason is the reason used when a machine has one of the MachineHealthCheck's unhealthy conditions.
+ // When both machine and node issues are detected, this reason takes precedence over node-related reasons
+ // (NodeNotFoundV1Beta1Reason, NodeStartupTimeoutV1Beta1Reason, UnhealthyNodeConditionV1Beta1Reason).
+ UnhealthyMachineConditionV1Beta1Reason = "UnhealthyMachine"
)
const (
@@ -295,17 +300,27 @@ const (
// failing due to an error.
TopologyReconcileFailedV1Beta1Reason = "TopologyReconcileFailed"
+ // TopologyReconciledClusterCreatingV1Beta1Reason documents reconciliation of a Cluster topology
+ // not yet created because the BeforeClusterCreate hook is blocking.
+ TopologyReconciledClusterCreatingV1Beta1Reason = "ClusterCreating"
+
// TopologyReconciledControlPlaneUpgradePendingV1Beta1Reason (Severity=Info) documents reconciliation of a Cluster topology
// not yet completed because Control Plane is not yet updated to match the desired topology spec.
+ //
+ // Deprecated: please use ClusterUpgrading instead.
TopologyReconciledControlPlaneUpgradePendingV1Beta1Reason = "ControlPlaneUpgradePending"
// TopologyReconciledMachineDeploymentsCreatePendingV1Beta1Reason (Severity=Info) documents reconciliation of a Cluster topology
// not yet completed because at least one of the MachineDeployments is yet to be created.
// This generally happens because new MachineDeployment creations are held off while the ControlPlane is not stable.
+ //
+ // Deprecated: please use ClusterUpgrading instead.
TopologyReconciledMachineDeploymentsCreatePendingV1Beta1Reason = "MachineDeploymentsCreatePending"
// TopologyReconciledMachineDeploymentsUpgradePendingV1Beta1Reason (Severity=Info) documents reconciliation of a Cluster topology
// not yet completed because at least one of the MachineDeployments is not yet updated to match the desired topology spec.
+ //
+ // Deprecated: please use ClusterUpgrading instead.
TopologyReconciledMachineDeploymentsUpgradePendingV1Beta1Reason = "MachineDeploymentsUpgradePending"
// TopologyReconciledMachineDeploymentsUpgradeDeferredV1Beta1Reason (Severity=Info) documents reconciliation of a Cluster topology
@@ -314,11 +329,15 @@ const (
// TopologyReconciledMachinePoolsUpgradePendingV1Beta1Reason (Severity=Info) documents reconciliation of a Cluster topology
// not yet completed because at least one of the MachinePools is not yet updated to match the desired topology spec.
+ //
+ // Deprecated: please use ClusterUpgrading instead.
TopologyReconciledMachinePoolsUpgradePendingV1Beta1Reason = "MachinePoolsUpgradePending"
// TopologyReconciledMachinePoolsCreatePendingV1Beta1Reason (Severity=Info) documents reconciliation of a Cluster topology
// not yet completed because at least one of the MachinePools is yet to be created.
// This generally happens because new MachinePool creations are held off while the ControlPlane is not stable.
+ //
+ // Deprecated: please use ClusterUpgrading instead.
TopologyReconciledMachinePoolsCreatePendingV1Beta1Reason = "MachinePoolsCreatePending"
// TopologyReconciledMachinePoolsUpgradeDeferredV1Beta1Reason (Severity=Info) documents reconciliation of a Cluster topology
@@ -327,8 +346,14 @@ const (
// TopologyReconciledHookBlockingV1Beta1Reason (Severity=Info) documents reconciliation of a Cluster topology
// not yet completed because at least one of the lifecycle hooks is blocking.
+ //
+ // Deprecated: please use ClusterUpgrading instead.
TopologyReconciledHookBlockingV1Beta1Reason = "LifecycleHookBlocking"
+ // TopologyReconciledClusterUpgradingV1Beta1Reason documents reconciliation of a Cluster topology
+ // not yet completed because a cluster upgrade is still in progress.
+ TopologyReconciledClusterUpgradingV1Beta1Reason = "ClusterUpgrading"
+
// TopologyReconciledClusterClassNotReconciledV1Beta1Reason (Severity=Info) documents reconciliation of a Cluster topology not
// yet completed because the ClusterClass has not reconciled yet. If this condition persists there may be an issue
// with the ClusterClass surfaced in the ClusterClass status or controller logs.
diff --git a/api/core/v1beta2/zz_generated.deepcopy.go b/api/core/v1beta2/zz_generated.deepcopy.go
index 49d1f6655253..5adb8a56c456 100644
--- a/api/core/v1beta2/zz_generated.deepcopy.go
+++ b/api/core/v1beta2/zz_generated.deepcopy.go
@@ -253,6 +253,12 @@ func (in *ClusterClassSpec) DeepCopyInto(out *ClusterClassSpec) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
+ out.Upgrade = in.Upgrade
+ if in.KubernetesVersions != nil {
+ in, out := &in.KubernetesVersions, &out.KubernetesVersions
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterClassSpec.
@@ -363,6 +369,37 @@ func (in *ClusterClassTemplateReference) DeepCopy() *ClusterClassTemplateReferen
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ClusterClassUpgrade) DeepCopyInto(out *ClusterClassUpgrade) {
+ *out = *in
+ out.External = in.External
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterClassUpgrade.
+func (in *ClusterClassUpgrade) DeepCopy() *ClusterClassUpgrade {
+ if in == nil {
+ return nil
+ }
+ out := new(ClusterClassUpgrade)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ClusterClassUpgradeExternal) DeepCopyInto(out *ClusterClassUpgradeExternal) {
+ *out = *in
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterClassUpgradeExternal.
+func (in *ClusterClassUpgradeExternal) DeepCopy() *ClusterClassUpgradeExternal {
+ if in == nil {
+ return nil
+ }
+ out := new(ClusterClassUpgradeExternal)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterClassV1Beta1DeprecatedStatus) DeepCopyInto(out *ClusterClassV1Beta1DeprecatedStatus) {
*out = *in
@@ -803,6 +840,13 @@ func (in *ControlPlaneClassHealthCheckChecks) DeepCopyInto(out *ControlPlaneClas
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
+ if in.UnhealthyMachineConditions != nil {
+ in, out := &in.UnhealthyMachineConditions, &out.UnhealthyMachineConditions
+ *out = make([]UnhealthyMachineCondition, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneClassHealthCheckChecks.
@@ -979,6 +1023,13 @@ func (in *ControlPlaneTopologyHealthCheckChecks) DeepCopyInto(out *ControlPlaneT
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
+ if in.UnhealthyMachineConditions != nil {
+ in, out := &in.UnhealthyMachineConditions, &out.UnhealthyMachineConditions
+ *out = make([]UnhealthyMachineCondition, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneTopologyHealthCheckChecks.
@@ -1567,6 +1618,13 @@ func (in *MachineDeploymentClassHealthCheckChecks) DeepCopyInto(out *MachineDepl
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
+ if in.UnhealthyMachineConditions != nil {
+ in, out := &in.UnhealthyMachineConditions, &out.UnhealthyMachineConditions
+ *out = make([]UnhealthyMachineCondition, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDeploymentClassHealthCheckChecks.
@@ -2034,6 +2092,13 @@ func (in *MachineDeploymentTopologyHealthCheckChecks) DeepCopyInto(out *MachineD
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
+ if in.UnhealthyMachineConditions != nil {
+ in, out := &in.UnhealthyMachineConditions, &out.UnhealthyMachineConditions
+ *out = make([]UnhealthyMachineCondition, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDeploymentTopologyHealthCheckChecks.
@@ -2439,6 +2504,13 @@ func (in *MachineHealthCheckChecks) DeepCopyInto(out *MachineHealthCheckChecks)
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
+ if in.UnhealthyMachineConditions != nil {
+ in, out := &in.UnhealthyMachineConditions, &out.UnhealthyMachineConditions
+ *out = make([]UnhealthyMachineCondition, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineHealthCheckChecks.
@@ -3369,6 +3441,11 @@ func (in *MachineSpec) DeepCopyInto(out *MachineSpec) {
copy(*out, *in)
}
in.Deletion.DeepCopyInto(&out.Deletion)
+ if in.Taints != nil {
+ in, out := &in.Taints, &out.Taints
+ *out = make([]MachineTaint, len(*in))
+ copy(*out, *in)
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSpec.
@@ -3427,6 +3504,21 @@ func (in *MachineStatus) DeepCopy() *MachineStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *MachineTaint) DeepCopyInto(out *MachineTaint) {
+ *out = *in
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineTaint.
+func (in *MachineTaint) DeepCopy() *MachineTaint {
+ if in == nil {
+ return nil
+ }
+ out := new(MachineTaint)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MachineTemplateSpec) DeepCopyInto(out *MachineTemplateSpec) {
*out = *in
@@ -3664,6 +3756,26 @@ func (in *Topology) DeepCopy() *Topology {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *UnhealthyMachineCondition) DeepCopyInto(out *UnhealthyMachineCondition) {
+ *out = *in
+ if in.TimeoutSeconds != nil {
+ in, out := &in.TimeoutSeconds, &out.TimeoutSeconds
+ *out = new(int32)
+ **out = **in
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnhealthyMachineCondition.
+func (in *UnhealthyMachineCondition) DeepCopy() *UnhealthyMachineCondition {
+ if in == nil {
+ return nil
+ }
+ out := new(UnhealthyMachineCondition)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *UnhealthyNodeCondition) DeepCopyInto(out *UnhealthyNodeCondition) {
*out = *in
diff --git a/api/core/v1beta2/zz_generated.openapi.go b/api/core/v1beta2/zz_generated.openapi.go
index 6ada26c78cd5..6eecc0d326c7 100644
--- a/api/core/v1beta2/zz_generated.openapi.go
+++ b/api/core/v1beta2/zz_generated.openapi.go
@@ -42,6 +42,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),
@@ -161,6 +163,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),
@@ -171,6 +174,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),
@@ -617,12 +621,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"},
}
}
@@ -823,6 +854,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{
@@ -1616,11 +1689,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"},
}
}
@@ -1899,11 +1991,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"},
}
}
@@ -2920,11 +3031,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"},
}
}
@@ -3700,11 +3830,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"},
}
}
@@ -4332,11 +4481,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"},
}
}
@@ -5996,12 +6164,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"},
}
}
@@ -6022,7 +6213,7 @@ 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{
@@ -6114,6 +6305,48 @@ func schema_cluster_api_api_core_v1beta2_MachineStatus(ref common.ReferenceCallb
}
}
+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.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "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"},
+ },
+ },
+ }
+}
+
func schema_cluster_api_api_core_v1beta2_MachineTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
@@ -6518,6 +6751,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{
@@ -6541,7 +6809,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/api/runtime/hooks/v1alpha1/common_types.go b/api/runtime/hooks/v1alpha1/common_types.go
index 8838dfaa6ac0..f184c9c7f953 100644
--- a/api/runtime/hooks/v1alpha1/common_types.go
+++ b/api/runtime/hooks/v1alpha1/common_types.go
@@ -134,3 +134,15 @@ func (r *CommonRetryResponse) GetRetryAfterSeconds() int32 {
func (r *CommonRetryResponse) SetRetryAfterSeconds(retryAfterSeconds int32) {
r.RetryAfterSeconds = retryAfterSeconds
}
+
+// PatchType defines the supported patch types.
+// +kubebuilder:validation:Enum=JSONPatch;JSONMergePatch
+type PatchType string
+
+const (
+ // JSONPatchType identifies a https://datatracker.ietf.org/doc/html/rfc6902 JSON patch.
+ JSONPatchType PatchType = "JSONPatch"
+
+ // JSONMergePatchType identifies a https://datatracker.ietf.org/doc/html/rfc7386 JSON merge patch.
+ JSONMergePatchType PatchType = "JSONMergePatch"
+)
diff --git a/api/runtime/hooks/v1alpha1/inplaceupdate_types.go b/api/runtime/hooks/v1alpha1/inplaceupdate_types.go
new file mode 100644
index 000000000000..a301c39e9aa6
--- /dev/null
+++ b/api/runtime/hooks/v1alpha1/inplaceupdate_types.go
@@ -0,0 +1,254 @@
+/*
+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 v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+
+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog"
+)
+
+// CanUpdateMachineRequest is the request of the CanUpdateMachine hook.
+// +kubebuilder:object:root=true
+type CanUpdateMachineRequest struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // CommonRequest contains fields common to all request types.
+ CommonRequest `json:",inline"`
+
+ // current contains the current state of the Machine and related objects.
+ // +required
+ Current CanUpdateMachineRequestObjects `json:"current,omitempty,omitzero"`
+
+ // desired contains the desired state of the Machine and related objects.
+ // +required
+ Desired CanUpdateMachineRequestObjects `json:"desired,omitempty,omitzero"`
+}
+
+// CanUpdateMachineRequestObjects groups objects for CanUpdateMachineRequest.
+type CanUpdateMachineRequestObjects struct {
+ // machine is the full Machine object.
+ // +required
+ Machine clusterv1.Machine `json:"machine,omitempty,omitzero"`
+
+ // infrastructureMachine is the infra Machine object.
+ // +required
+ InfrastructureMachine runtime.RawExtension `json:"infrastructureMachine,omitempty,omitzero"`
+
+ // bootstrapConfig is the bootstrap config object.
+ // +optional
+ BootstrapConfig runtime.RawExtension `json:"bootstrapConfig,omitempty,omitzero"`
+}
+
+var _ ResponseObject = &CanUpdateMachineResponse{}
+
+// CanUpdateMachineResponse is the response of the CanUpdateMachine hook.
+// +kubebuilder:object:root=true
+type CanUpdateMachineResponse struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // CommonResponse contains Status and Message fields common to all response types.
+ CommonResponse `json:",inline"`
+
+ // machinePatch when applied to the current Machine spec, indicates changes handled in-place.
+ // Only fields in spec have to be covered by the patch.
+ // +optional
+ MachinePatch Patch `json:"machinePatch,omitempty,omitzero"`
+
+ // infrastructureMachinePatch indicates infra Machine spec changes handled in-place.
+ // Only fields in spec have to be covered by the patch.
+ // +optional
+ InfrastructureMachinePatch Patch `json:"infrastructureMachinePatch,omitempty,omitzero"`
+
+ // bootstrapConfigPatch indicates bootstrap config spec changes handled in-place.
+ // Only fields in spec have to be covered by the patch.
+ // +optional
+ BootstrapConfigPatch Patch `json:"bootstrapConfigPatch,omitempty,omitzero"`
+}
+
+// Patch is a single patch (JSONPatch or JSONMergePatch) which can include multiple operations.
+type Patch struct {
+ // patchType JSONPatch or JSONMergePatch.
+ // +required
+ PatchType PatchType `json:"patchType,omitempty"`
+
+ // patch data for the target object.
+ // +required
+ Patch []byte `json:"patch,omitempty"`
+}
+
+// IsDefined returns true if one of the fields of Patch is set.
+func (p *Patch) IsDefined() bool {
+ return p.PatchType != "" || len(p.Patch) > 0
+}
+
+// CanUpdateMachine is the hook that will be called to determine if an extension
+// can handle specific machine changes for in-place updates.
+func CanUpdateMachine(*CanUpdateMachineRequest, *CanUpdateMachineResponse) {}
+
+// CanUpdateMachineSetRequest is the request of the CanUpdateMachineSet hook.
+// +kubebuilder:object:root=true
+type CanUpdateMachineSetRequest struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // CommonRequest contains fields common to all request types.
+ CommonRequest `json:",inline"`
+
+ // current contains the current state of the MachineSet and related objects.
+ // +required
+ Current CanUpdateMachineSetRequestObjects `json:"current,omitempty,omitzero"`
+
+ // desired contains the desired state of the MachineSet and related objects.
+ // +required
+ Desired CanUpdateMachineSetRequestObjects `json:"desired,omitempty,omitzero"`
+}
+
+// CanUpdateMachineSetRequestObjects groups objects for CanUpdateMachineSetRequest.
+type CanUpdateMachineSetRequestObjects struct {
+ // machineSet is the full MachineSet object.
+ // Only fields in spec.template.spec have to be covered by the patch.
+ // +required
+ MachineSet clusterv1.MachineSet `json:"machineSet,omitempty,omitzero"`
+
+ // infrastructureMachineTemplate is the provider-specific InfrastructureMachineTemplate object.
+ // Only fields in spec.template.spec have to be covered by the patch.
+ // +required
+ InfrastructureMachineTemplate runtime.RawExtension `json:"infrastructureMachineTemplate,omitempty,omitzero"`
+
+ // bootstrapConfigTemplate is the provider-specific BootstrapConfigTemplate object.
+ // Only fields in spec.template.spec have to be covered by the patch.
+ // +optional
+ BootstrapConfigTemplate runtime.RawExtension `json:"bootstrapConfigTemplate,omitempty,omitzero"`
+}
+
+var _ ResponseObject = &CanUpdateMachineSetResponse{}
+
+// CanUpdateMachineSetResponse is the response of the CanUpdateMachineSet hook.
+// +kubebuilder:object:root=true
+type CanUpdateMachineSetResponse struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // CommonResponse contains Status and Message fields common to all response types.
+ CommonResponse `json:",inline"`
+
+ // machineSetPatch when applied to the current MachineSet spec, indicates changes handled in-place.
+ // +optional
+ MachineSetPatch Patch `json:"machineSetPatch,omitempty,omitzero"`
+
+ // infrastructureMachineTemplatePatch indicates infra template spec changes handled in-place.
+ // +optional
+ InfrastructureMachineTemplatePatch Patch `json:"infrastructureMachineTemplatePatch,omitempty,omitzero"`
+
+ // bootstrapConfigTemplatePatch indicates bootstrap template spec changes handled in-place.
+ // +optional
+ BootstrapConfigTemplatePatch Patch `json:"bootstrapConfigTemplatePatch,omitempty,omitzero"`
+}
+
+// CanUpdateMachineSet is the hook that will be called to determine if an extension
+// can handle specific MachineSet changes for in-place updates.
+func CanUpdateMachineSet(*CanUpdateMachineSetRequest, *CanUpdateMachineSetResponse) {}
+
+// UpdateMachineRequest is the request of the UpdateMachine hook.
+// +kubebuilder:object:root=true
+type UpdateMachineRequest struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // CommonRequest contains fields common to all request types.
+ CommonRequest `json:",inline"`
+
+ // desired contains the desired state of the Machine and related objects.
+ // +required
+ Desired UpdateMachineRequestObjects `json:"desired,omitempty,omitzero"`
+}
+
+// UpdateMachineRequestObjects groups objects for UpdateMachineRequest.
+type UpdateMachineRequestObjects struct {
+ // machine is the full Machine object.
+ // +required
+ Machine clusterv1.Machine `json:"machine,omitempty,omitzero"`
+
+ // infrastructureMachine is the infra Machine object.
+ // +required
+ InfrastructureMachine runtime.RawExtension `json:"infrastructureMachine,omitempty,omitzero"`
+
+ // bootstrapConfig is the bootstrap config object.
+ // +optional
+ BootstrapConfig runtime.RawExtension `json:"bootstrapConfig,omitempty,omitzero"`
+}
+
+var _ RetryResponseObject = &UpdateMachineResponse{}
+
+// UpdateMachineResponse is the response of the UpdateMachine hook.
+// The status of the update operation is determined by the CommonRetryResponse fields:
+// - Status=Success + RetryAfterSeconds > 0: update is in progress
+// - Status=Success + RetryAfterSeconds = 0: update completed successfully
+// - Status=Failure: update failed
+// +kubebuilder:object:root=true
+type UpdateMachineResponse struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // CommonRetryResponse contains Status, Message and RetryAfterSeconds fields.
+ CommonRetryResponse `json:",inline"`
+}
+
+// UpdateMachine is the hook that will be called to perform in-place updates on a machine.
+// This hook should be idempotent and can be called multiple times for the same machine
+// until it reports Done or Failed status.
+func UpdateMachine(*UpdateMachineRequest, *UpdateMachineResponse) {}
+
+func init() {
+ catalogBuilder.RegisterHook(CanUpdateMachine, &runtimecatalog.HookMeta{
+ Tags: []string{"In-Place Update Hooks"},
+ Summary: "Cluster API Runtime will call this hook to determine if an extension can handle specific Machine changes",
+ Description: "Called during update planning to determine if an extension can handle Machine changes. " +
+ "The request contains current and desired state for Machine, InfraMachine and optionally BootstrapConfig. " +
+ "Extensions should return per-object patches to be applied on current objects to indicate which changes they can handle in-place.\n" +
+ "\n" +
+ "Notes:\n" +
+ "- This hook is called during the planning phase of updates\n" +
+ "- Only spec is provided, status fields are not included\n" +
+ "- If no extension can cover the required changes, CAPI will fallback to rolling updates\n" +
+ "- Only fields in Machine/InfraMachine/BootstrapConfig spec have to be covered by patches\n",
+ })
+
+ catalogBuilder.RegisterHook(CanUpdateMachineSet, &runtimecatalog.HookMeta{
+ Tags: []string{"In-Place Update Hooks"},
+ Summary: "Cluster API Runtime will call this hook to determine if an extension can handle specific MachineSet changes",
+ Description: "Called during update planning to determine if an extension can handle MachineSet changes. " +
+ "The request contains current and desired state for MachineSet, InfraMachineTemplate and optionally BootstrapConfigTemplate. " +
+ "Extensions should return per-object patches to be applied on current objects to indicate which changes they can handle in-place.\n" +
+ "\n" +
+ "Notes:\n" +
+ "- This hook is called during the planning phase of updates\n" +
+ "- Only spec is provided, status fields are not included\n" +
+ "- If no extension can cover the required changes, CAPI will fallback to rolling updates\n" +
+ "- Only fields in MachineSet/InfraMachineTemplate/BootstrapConfigTemplate spec.template.spec have to be covered by patches\n",
+ })
+
+ catalogBuilder.RegisterHook(UpdateMachine, &runtimecatalog.HookMeta{
+ Tags: []string{"In-Place Update Hooks"},
+ Summary: "Cluster API Runtime will call this hook to perform in-place updates on a Machine",
+ Description: "Cluster API Runtime will call this hook to perform the actual in-place update on a Machine. " +
+ "The request contains the desired state for Machine, InfraMachine and optionally BootstrapConfig. " +
+ "The hook will be called repeatedly until it reports Done or Failed status.\n" +
+ "\n" +
+ "Notes:\n" +
+ "- This hook must be idempotent - it can be called multiple times for the same Machine\n",
+ })
+}
diff --git a/api/runtime/hooks/v1alpha1/lifecyclehooks_types.go b/api/runtime/hooks/v1alpha1/lifecyclehooks_types.go
index bf0b8e15384b..71c6455a0fa9 100644
--- a/api/runtime/hooks/v1alpha1/lifecyclehooks_types.go
+++ b/api/runtime/hooks/v1alpha1/lifecyclehooks_types.go
@@ -97,6 +97,22 @@ type BeforeClusterUpgradeRequest struct {
// toKubernetesVersion is the target Kubernetes version of the upgrade.
// +required
ToKubernetesVersion string `json:"toKubernetesVersion"`
+
+ // controlPlaneUpgrades is the list of version upgrade steps for the control plane.
+ // +optional
+ ControlPlaneUpgrades []UpgradeStepInfo `json:"controlPlaneUpgrades,omitempty"`
+
+ // workersUpgrades is the list of version upgrade steps for the workers.
+ // +optional
+ WorkersUpgrades []UpgradeStepInfo `json:"workersUpgrades,omitempty"`
+}
+
+// UpgradeStepInfo provide info about a single version upgrade step.
+type UpgradeStepInfo struct {
+ // version is the Kubernetes version for this upgrade step.
+ // +required
+ // +kubebuilder:validation:MinLength=1
+ Version string `json:"version,omitempty"`
}
var _ RetryResponseObject = &BeforeClusterUpgradeResponse{}
@@ -114,6 +130,50 @@ type BeforeClusterUpgradeResponse struct {
// before the updated version is propagated to the underlying objects.
func BeforeClusterUpgrade(*BeforeClusterUpgradeRequest, *BeforeClusterUpgradeResponse) {}
+// BeforeControlPlaneUpgradeRequest is the request of the BeforeControlPlane hook.
+// +kubebuilder:object:root=true
+type BeforeControlPlaneUpgradeRequest struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // CommonRequest contains fields common to all request types.
+ CommonRequest `json:",inline"`
+
+ // cluster is the cluster object the lifecycle hook corresponds to.
+ // +required
+ Cluster clusterv1beta1.Cluster `json:"cluster"`
+
+ // fromKubernetesVersion is the current Kubernetes version of the control plane for the next upgrade step.
+ // +required
+ FromKubernetesVersion string `json:"fromKubernetesVersion"`
+
+ // toKubernetesVersion is the target Kubernetes version of the control plane for the next upgrade step.
+ // +required
+ ToKubernetesVersion string `json:"toKubernetesVersion"`
+
+ // controlPlaneUpgrades is the list of the remaining version upgrade steps for the control plane, if any.
+ // +optional
+ ControlPlaneUpgrades []UpgradeStepInfo `json:"controlPlaneUpgrades,omitempty"`
+
+ // workersUpgrades is the list of the remaining version upgrade steps for workers, if any.
+ // +optional
+ WorkersUpgrades []UpgradeStepInfo `json:"workersUpgrades,omitempty"`
+}
+
+var _ RetryResponseObject = &BeforeControlPlaneUpgradeResponse{}
+
+// BeforeControlPlaneUpgradeResponse is the response of the BeforeControlPlaneUpgrade hook.
+// +kubebuilder:object:root=true
+type BeforeControlPlaneUpgradeResponse struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // CommonRetryResponse contains Status, Message and RetryAfterSeconds fields.
+ CommonRetryResponse `json:",inline"`
+}
+
+// BeforeControlPlaneUpgrade is the hook that will be called before a new version is propagated to the control plane object.
+func BeforeControlPlaneUpgrade(*BeforeControlPlaneUpgradeRequest, *BeforeControlPlaneUpgradeResponse) {
+}
+
// AfterControlPlaneUpgradeRequest is the request of the AfterControlPlaneUpgrade hook.
// +kubebuilder:object:root=true
type AfterControlPlaneUpgradeRequest struct {
@@ -126,9 +186,17 @@ type AfterControlPlaneUpgradeRequest struct {
// +required
Cluster clusterv1beta1.Cluster `json:"cluster"`
- // kubernetesVersion is the Kubernetes version of the Control Plane after the upgrade.
+ // kubernetesVersion is the Kubernetes version of the control plane after an upgrade step.
// +required
KubernetesVersion string `json:"kubernetesVersion"`
+
+ // controlPlaneUpgrades is the list of the remaining version upgrade steps for the control plane, if any.
+ // +optional
+ ControlPlaneUpgrades []UpgradeStepInfo `json:"controlPlaneUpgrades,omitempty"`
+
+ // workersUpgrades is the list of the remaining version upgrade steps for workers, if any.
+ // +optional
+ WorkersUpgrades []UpgradeStepInfo `json:"workersUpgrades,omitempty"`
}
var _ RetryResponseObject = &AfterControlPlaneUpgradeResponse{}
@@ -146,6 +214,90 @@ type AfterControlPlaneUpgradeResponse struct {
// Kubernetes version and before the target version is propagated to the workload machines.
func AfterControlPlaneUpgrade(*AfterControlPlaneUpgradeRequest, *AfterControlPlaneUpgradeResponse) {}
+// BeforeWorkersUpgradeRequest is the request of the BeforeWorkersUpgrade hook.
+// +kubebuilder:object:root=true
+type BeforeWorkersUpgradeRequest struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // CommonRequest contains fields common to all request types.
+ CommonRequest `json:",inline"`
+
+ // cluster is the cluster object the lifecycle hook corresponds to.
+ // +required
+ Cluster clusterv1beta1.Cluster `json:"cluster"`
+
+ // fromKubernetesVersion is the current Kubernetes version of the workers for the next upgrade step.
+ // +required
+ FromKubernetesVersion string `json:"fromKubernetesVersion"`
+
+ // toKubernetesVersion is the target Kubernetes version of the workers for the next upgrade step.
+ // +required
+ ToKubernetesVersion string `json:"toKubernetesVersion"`
+
+ // controlPlaneUpgrades is the list of the remaining version upgrade steps for the control plane, if any.
+ // +optional
+ ControlPlaneUpgrades []UpgradeStepInfo `json:"controlPlaneUpgrades,omitempty"`
+
+ // workersUpgrades is the list of the remaining version upgrade steps for workers, if any.
+ // +optional
+ WorkersUpgrades []UpgradeStepInfo `json:"workersUpgrades,omitempty"`
+}
+
+var _ RetryResponseObject = &BeforeWorkersUpgradeResponse{}
+
+// BeforeWorkersUpgradeResponse is the response of the BeforeWorkersUpgrade hook.
+// +kubebuilder:object:root=true
+type BeforeWorkersUpgradeResponse struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // CommonRetryResponse contains Status, Message and RetryAfterSeconds fields.
+ CommonRetryResponse `json:",inline"`
+}
+
+// BeforeWorkersUpgrade is the hook that will be called before a new version is propagated to workers.
+func BeforeWorkersUpgrade(*BeforeWorkersUpgradeRequest, *BeforeWorkersUpgradeResponse) {
+}
+
+// AfterWorkersUpgradeRequest is the request of the AfterWorkersUpgrade hook.
+// +kubebuilder:object:root=true
+type AfterWorkersUpgradeRequest struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // CommonRequest contains fields common to all request types.
+ CommonRequest `json:",inline"`
+
+ // cluster is the cluster object the lifecycle hook corresponds to.
+ // +required
+ Cluster clusterv1beta1.Cluster `json:"cluster"`
+
+ // kubernetesVersion is the Kubernetes version of the workers after an upgrade step.
+ // +required
+ KubernetesVersion string `json:"kubernetesVersion"`
+
+ // controlPlaneUpgrades is the list of the remaining version upgrade steps for the control plane, if any.
+ // +optional
+ ControlPlaneUpgrades []UpgradeStepInfo `json:"controlPlaneUpgrades,omitempty"`
+
+ // workersUpgrades is the list of the remaining version upgrade steps for workers, if any.
+ // +optional
+ WorkersUpgrades []UpgradeStepInfo `json:"workersUpgrades,omitempty"`
+}
+
+var _ RetryResponseObject = &AfterWorkersUpgradeResponse{}
+
+// AfterWorkersUpgradeResponse is the response of the AfterWorkersUpgrade hook.
+// +kubebuilder:object:root=true
+type AfterWorkersUpgradeResponse struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // CommonRetryResponse contains Status, Message and RetryAfterSeconds fields.
+ CommonRetryResponse `json:",inline"`
+}
+
+// AfterWorkersUpgrade is the hook called after the control plane is successfully upgraded to the target
+// Kubernetes version and before the target version is propagated to the workload machines.
+func AfterWorkersUpgrade(*AfterWorkersUpgradeRequest, *AfterWorkersUpgradeResponse) {}
+
// AfterClusterUpgradeRequest is the request of the AfterClusterUpgrade hook.
// +kubebuilder:object:root=true
type AfterClusterUpgradeRequest struct {
@@ -170,8 +322,8 @@ var _ ResponseObject = &AfterClusterUpgradeResponse{}
type AfterClusterUpgradeResponse struct {
metav1.TypeMeta `json:",inline"`
- // CommonResponse contains Status and Message fields common to all response types.
- CommonResponse `json:",inline"`
+ // CommonRetryResponse contains Status, Message and RetryAfterSeconds fields.
+ CommonRetryResponse `json:",inline"`
}
// AfterClusterUpgrade is the hook that is called after the entire cluster is updated
@@ -243,18 +395,58 @@ func init() {
"tasks before the new version is propagated to the control plane",
})
+ catalogBuilder.RegisterHook(BeforeControlPlaneUpgrade, &runtimecatalog.HookMeta{
+ Tags: []string{"Lifecycle Hooks"},
+ Summary: "Cluster API Runtime will call this hook before the control plane is upgraded",
+ Description: "This hook is called before a new version is propagated to the control plane object.\n" +
+ "\n" +
+ "Notes:\n" +
+ "- This hook will be called only for Clusters with a managed topology\n" +
+ "- When an upgrade is starting, BeforeControlPlaneUpgrade will be called after BeforeClusterUpgrade is completed\n" +
+ "- When an upgrade is in progress BeforeControlPlaneUpgrade will be called for each intermediate version that will be applied " +
+ "to the control plane (instead BeforeClusterUpgrade will be called only once at the beginning of the upgrade)" +
+ "- This is a blocking hook; Runtime Extension implementers can use this hook to execute " +
+ "tasks before the new version is propagated to the control plane",
+ })
+
catalogBuilder.RegisterHook(AfterControlPlaneUpgrade, &runtimecatalog.HookMeta{
Tags: []string{"Lifecycle Hooks"},
Summary: "Cluster API Runtime will call this hook after the control plane is upgraded",
Description: "Cluster API Runtime will call this hook after the a cluster's control plane has been upgraded to the version specified " +
- "in spec.topology.version, and immediately before the new version is going to be propagated to the MachineDeployments. " +
+ "in spec.topology.version or to an intermediate version in the upgrade plan." +
"A control plane upgrade is completed when all the machines in the control plane have been upgraded.\n" +
"\n" +
"Notes:\n" +
"- This hook will be called only for Clusters with a managed topology\n" +
"- The call's request contains the Cluster object and the Kubernetes version we upgraded to\n" +
"- This is a blocking hook; Runtime Extension implementers can use this hook to execute " +
- "tasks before the new version is propagated to the MachineDeployments",
+ "tasks before the new version is propagated to the MachineDeployments and Machine Pools",
+ })
+
+ catalogBuilder.RegisterHook(BeforeWorkersUpgrade, &runtimecatalog.HookMeta{
+ Tags: []string{"Lifecycle Hooks"},
+ Summary: "Cluster API Runtime will call this hook before the workers are upgraded",
+ Description: "This hook is called before a new version is propagated to workers.\n" +
+ "\n" +
+ "Notes:\n" +
+ "- This hook will be called only for Clusters with a managed topology\n" +
+ "- This hook will be called only if workers upgrade must be performed for an intermediate version of " +
+ "a chained upgrade or when upgrading to the target spec.topology.version.\n" +
+ "- This is a blocking hook; Runtime Extension implementers can use this hook to execute " +
+ "tasks before the new version is propagated to the MachineDeployments and Machine Pools",
+ })
+
+ catalogBuilder.RegisterHook(AfterWorkersUpgrade, &runtimecatalog.HookMeta{
+ Tags: []string{"Lifecycle Hooks"},
+ Summary: "Cluster API Runtime will call this hook after workers are upgraded",
+ Description: "This hook is called after all the workers have been upgraded to the version specified in spec.topology.version " +
+ "or to an intermediate version in the upgrade plan.\n" +
+ "\n" +
+ "Notes:\n" +
+ "- This hook will be called only for Clusters with a managed topology\n" +
+ "- The call's request contains the Cluster object, the current Kubernetes version and the Kubernetes version we are upgrading to\n" +
+ "- This is a blocking hook; Runtime Extension implementers can use this hook to execute " +
+ "tasks before the upgrade plan continues, or when already at the target spec.topology.version, before AfterClusterUpgrade is called.\n",
})
catalogBuilder.RegisterHook(AfterClusterUpgrade, &runtimecatalog.HookMeta{
@@ -266,7 +458,7 @@ func init() {
"Notes:\n" +
"- This hook will be called only for Clusters with a managed topology\n" +
"- The call's request contains the Cluster object and the Kubernetes version we upgraded to \n" +
- "- This is a non-blocking hook",
+ "- This is a blocking hook; Runtime Extension implementers can use this hook to prevent the next upgrade to start.\n",
})
catalogBuilder.RegisterHook(BeforeClusterDelete, &runtimecatalog.HookMeta{
diff --git a/api/runtime/hooks/v1alpha1/topologymutation_types.go b/api/runtime/hooks/v1alpha1/topologymutation_types.go
index 4efa2742084f..3ea71eae4357 100644
--- a/api/runtime/hooks/v1alpha1/topologymutation_types.go
+++ b/api/runtime/hooks/v1alpha1/topologymutation_types.go
@@ -101,18 +101,6 @@ type GeneratePatchesResponseItem struct {
Patch []byte `json:"patch"`
}
-// PatchType defines the supported patch types.
-// +enum
-type PatchType string
-
-const (
- // JSONPatchType identifies a https://datatracker.ietf.org/doc/html/rfc6902 JSON patch.
- JSONPatchType PatchType = "JSONPatch"
-
- // JSONMergePatchType identifies a https://datatracker.ietf.org/doc/html/rfc7386 JSON merge patch.
- JSONMergePatchType PatchType = "JSONMergePatch"
-)
-
// GeneratePatches generates patches during topology reconciliation for the entire Cluster topology.
func GeneratePatches(*GeneratePatchesRequest, *GeneratePatchesResponse) {}
diff --git a/api/runtime/hooks/v1alpha1/upgrade_plan_types.go b/api/runtime/hooks/v1alpha1/upgrade_plan_types.go
new file mode 100644
index 000000000000..660e2434aa3a
--- /dev/null
+++ b/api/runtime/hooks/v1alpha1/upgrade_plan_types.go
@@ -0,0 +1,129 @@
+/*
+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 v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog"
+)
+
+// GenerateUpgradePlanRequest is the request of the GenerateUpgradePlan hook.
+// +kubebuilder:object:root=true
+type GenerateUpgradePlanRequest struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // CommonRequest contains fields common to all request types.
+ CommonRequest `json:",inline"`
+
+ // cluster is the cluster object the GenerateUpgradePlan request corresponds to.
+ // +required
+ Cluster clusterv1.Cluster `json:"cluster,omitempty,omitzero"`
+
+ // fromControlPlaneKubernetesVersion is the current Kubernetes version of the control plane.
+ // +required
+ // +kubebuilder:validation:MinLength=1
+ FromControlPlaneKubernetesVersion string `json:"fromControlPlaneKubernetesVersion,omitempty"`
+
+ // fromWorkersKubernetesVersion is the min current Kubernetes version of the workers.
+ // +optional
+ // +kubebuilder:validation:MinLength=1
+ FromWorkersKubernetesVersion string `json:"fromWorkersKubernetesVersion,omitempty"`
+
+ // toKubernetesVersion is the target Kubernetes version for the upgrade.
+ // +required
+ // +kubebuilder:validation:MinLength=1
+ ToKubernetesVersion string `json:"toKubernetesVersion,omitempty"`
+}
+
+var _ ResponseObject = &GenerateUpgradePlanResponse{}
+
+// GenerateUpgradePlanResponse is the response of the GenerateUpgradePlan hook.
+// +kubebuilder:object:root=true
+type GenerateUpgradePlanResponse struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // CommonResponse contains Status and Message fields common to all response types.
+ CommonResponse `json:",inline"`
+
+ // controlPlaneUpgrades is the list of version upgrade steps for the control plane.
+ // Each entry represents an intermediate version that must be applied in sequence.
+ // The following rules apply:
+ // - there should be at least one version for every minor between fromControlPlaneKubernetesVersion (excluded) and ToKubernetesVersion (included).
+ // - each version must be:
+ // - greater than fromControlPlaneKubernetesVersion (or with a different build number)
+ // - greater than the previous version in the list (or with a different build number)
+ // - less or equal to ToKubernetesVersion (or with a different build number)
+ // - the last version in the plan must be equal to ToKubernetesVersion
+ // +optional
+ ControlPlaneUpgrades []UpgradeStep `json:"controlPlaneUpgrades,omitempty"`
+
+ // workersUpgrades is the list of version upgrade steps for the workers.
+ // Each entry represents an intermediate version that must be applied in sequence.
+ //
+ // In case the upgrade plan for workers will be left to empty, the system will automatically
+ // determine the minimal number of workers upgrade steps, thus minimizing impact on workloads and reducing
+ // the overall upgrade time.
+ //
+ // If instead for any reason a custom upgrade path for workers is required, the following rules apply:
+ // - each version must be:
+ // - equal to FromControlPlaneKubernetesVersion or to one of the versions in the control plane upgrade plan.
+ // - greater than FromWorkersKubernetesVersion (or with a different build number)
+ // - greater than the previous version in the list (or with a different build number)
+ // - less or equal to the ToKubernetesVersion (or with a different build number)
+ // - in case of versions with the same major/minor/patch version but different build number, also the order
+ // of those versions must be the same for control plane and worker upgrade plan.
+ // - the last version in the plan must be equal to ToKubernetesVersion
+ // - the upgrade plane must have all the intermediate version which workers must go through to avoid breaking rules
+ // defining the max version skew between control plane and workers.
+ // +optional
+ WorkersUpgrades []UpgradeStep `json:"workersUpgrades,omitempty"`
+}
+
+// UpgradeStep represents a single version upgrade step.
+type UpgradeStep struct {
+ // version is the Kubernetes version for this upgrade step.
+ // +required
+ // +kubebuilder:validation:MinLength=1
+ Version string `json:"version,omitempty"`
+}
+
+// GenerateUpgradePlan is the hook that will be called to generate an upgrade plan
+// for a cluster. This hook allows runtime extensions to specify intermediate
+// Kubernetes versions that must be applied during an upgrade from the current
+// version to the target version.
+func GenerateUpgradePlan(*GenerateUpgradePlanRequest, *GenerateUpgradePlanResponse) {}
+
+func init() {
+ catalogBuilder.RegisterHook(GenerateUpgradePlan, &runtimecatalog.HookMeta{
+ Tags: []string{"Chained Upgrade Hook"},
+ Summary: "Cluster API Runtime will call this hook to generate an upgrade plan for a cluster",
+ Description: "Cluster API Runtime will call this hook to generate an upgrade plan for a cluster. " +
+ "Runtime Extension implementers can use this hook to specify intermediate Kubernetes versions " +
+ "that must be applied during an upgrade from the current version to the target version.\n" +
+ "\n" +
+ "For example, if upgrading from v1.29.0 to v1.33.0 requires intermediate versions v1.30.0, " +
+ "v1.31.0, and v1.32.0, the hook should return these intermediate versions in the response.\n" +
+ "\n" +
+ "Notes:\n" +
+ "- The response may include separate upgrade paths for control plane and workers\n" +
+ "- The upgrade plan for workers is optional; if missing the system will automatically\n\"" +
+ " determine the minimal number of workers upgrade steps according to Kubernetes version skew rules.\n" +
+ "- Each upgrade step represents a version that must be applied in sequence",
+ })
+}
diff --git a/api/runtime/hooks/v1alpha1/zz_generated.deepcopy.go b/api/runtime/hooks/v1alpha1/zz_generated.deepcopy.go
index ce59d1aedec7..fb8d4012d7dd 100644
--- a/api/runtime/hooks/v1alpha1/zz_generated.deepcopy.go
+++ b/api/runtime/hooks/v1alpha1/zz_generated.deepcopy.go
@@ -55,7 +55,7 @@ func (in *AfterClusterUpgradeRequest) DeepCopyObject() runtime.Object {
func (in *AfterClusterUpgradeResponse) DeepCopyInto(out *AfterClusterUpgradeResponse) {
*out = *in
out.TypeMeta = in.TypeMeta
- out.CommonResponse = in.CommonResponse
+ out.CommonRetryResponse = in.CommonRetryResponse
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AfterClusterUpgradeResponse.
@@ -133,6 +133,16 @@ func (in *AfterControlPlaneUpgradeRequest) DeepCopyInto(out *AfterControlPlaneUp
out.TypeMeta = in.TypeMeta
in.CommonRequest.DeepCopyInto(&out.CommonRequest)
in.Cluster.DeepCopyInto(&out.Cluster)
+ if in.ControlPlaneUpgrades != nil {
+ in, out := &in.ControlPlaneUpgrades, &out.ControlPlaneUpgrades
+ *out = make([]UpgradeStepInfo, len(*in))
+ copy(*out, *in)
+ }
+ if in.WorkersUpgrades != nil {
+ in, out := &in.WorkersUpgrades, &out.WorkersUpgrades
+ *out = make([]UpgradeStepInfo, len(*in))
+ copy(*out, *in)
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AfterControlPlaneUpgradeRequest.
@@ -178,6 +188,67 @@ func (in *AfterControlPlaneUpgradeResponse) DeepCopyObject() runtime.Object {
return nil
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *AfterWorkersUpgradeRequest) DeepCopyInto(out *AfterWorkersUpgradeRequest) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.CommonRequest.DeepCopyInto(&out.CommonRequest)
+ in.Cluster.DeepCopyInto(&out.Cluster)
+ if in.ControlPlaneUpgrades != nil {
+ in, out := &in.ControlPlaneUpgrades, &out.ControlPlaneUpgrades
+ *out = make([]UpgradeStepInfo, len(*in))
+ copy(*out, *in)
+ }
+ if in.WorkersUpgrades != nil {
+ in, out := &in.WorkersUpgrades, &out.WorkersUpgrades
+ *out = make([]UpgradeStepInfo, len(*in))
+ copy(*out, *in)
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AfterWorkersUpgradeRequest.
+func (in *AfterWorkersUpgradeRequest) DeepCopy() *AfterWorkersUpgradeRequest {
+ if in == nil {
+ return nil
+ }
+ out := new(AfterWorkersUpgradeRequest)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *AfterWorkersUpgradeRequest) 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 *AfterWorkersUpgradeResponse) DeepCopyInto(out *AfterWorkersUpgradeResponse) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ out.CommonRetryResponse = in.CommonRetryResponse
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AfterWorkersUpgradeResponse.
+func (in *AfterWorkersUpgradeResponse) DeepCopy() *AfterWorkersUpgradeResponse {
+ if in == nil {
+ return nil
+ }
+ out := new(AfterWorkersUpgradeResponse)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *AfterWorkersUpgradeResponse) 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 *BeforeClusterCreateRequest) DeepCopyInto(out *BeforeClusterCreateRequest) {
*out = *in
@@ -286,6 +357,16 @@ func (in *BeforeClusterUpgradeRequest) DeepCopyInto(out *BeforeClusterUpgradeReq
out.TypeMeta = in.TypeMeta
in.CommonRequest.DeepCopyInto(&out.CommonRequest)
in.Cluster.DeepCopyInto(&out.Cluster)
+ if in.ControlPlaneUpgrades != nil {
+ in, out := &in.ControlPlaneUpgrades, &out.ControlPlaneUpgrades
+ *out = make([]UpgradeStepInfo, len(*in))
+ copy(*out, *in)
+ }
+ if in.WorkersUpgrades != nil {
+ in, out := &in.WorkersUpgrades, &out.WorkersUpgrades
+ *out = make([]UpgradeStepInfo, len(*in))
+ copy(*out, *in)
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BeforeClusterUpgradeRequest.
@@ -331,6 +412,128 @@ func (in *BeforeClusterUpgradeResponse) DeepCopyObject() runtime.Object {
return nil
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *BeforeControlPlaneUpgradeRequest) DeepCopyInto(out *BeforeControlPlaneUpgradeRequest) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.CommonRequest.DeepCopyInto(&out.CommonRequest)
+ in.Cluster.DeepCopyInto(&out.Cluster)
+ if in.ControlPlaneUpgrades != nil {
+ in, out := &in.ControlPlaneUpgrades, &out.ControlPlaneUpgrades
+ *out = make([]UpgradeStepInfo, len(*in))
+ copy(*out, *in)
+ }
+ if in.WorkersUpgrades != nil {
+ in, out := &in.WorkersUpgrades, &out.WorkersUpgrades
+ *out = make([]UpgradeStepInfo, len(*in))
+ copy(*out, *in)
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BeforeControlPlaneUpgradeRequest.
+func (in *BeforeControlPlaneUpgradeRequest) DeepCopy() *BeforeControlPlaneUpgradeRequest {
+ if in == nil {
+ return nil
+ }
+ out := new(BeforeControlPlaneUpgradeRequest)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *BeforeControlPlaneUpgradeRequest) 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 *BeforeControlPlaneUpgradeResponse) DeepCopyInto(out *BeforeControlPlaneUpgradeResponse) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ out.CommonRetryResponse = in.CommonRetryResponse
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BeforeControlPlaneUpgradeResponse.
+func (in *BeforeControlPlaneUpgradeResponse) DeepCopy() *BeforeControlPlaneUpgradeResponse {
+ if in == nil {
+ return nil
+ }
+ out := new(BeforeControlPlaneUpgradeResponse)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *BeforeControlPlaneUpgradeResponse) 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 *BeforeWorkersUpgradeRequest) DeepCopyInto(out *BeforeWorkersUpgradeRequest) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.CommonRequest.DeepCopyInto(&out.CommonRequest)
+ in.Cluster.DeepCopyInto(&out.Cluster)
+ if in.ControlPlaneUpgrades != nil {
+ in, out := &in.ControlPlaneUpgrades, &out.ControlPlaneUpgrades
+ *out = make([]UpgradeStepInfo, len(*in))
+ copy(*out, *in)
+ }
+ if in.WorkersUpgrades != nil {
+ in, out := &in.WorkersUpgrades, &out.WorkersUpgrades
+ *out = make([]UpgradeStepInfo, len(*in))
+ copy(*out, *in)
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BeforeWorkersUpgradeRequest.
+func (in *BeforeWorkersUpgradeRequest) DeepCopy() *BeforeWorkersUpgradeRequest {
+ if in == nil {
+ return nil
+ }
+ out := new(BeforeWorkersUpgradeRequest)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *BeforeWorkersUpgradeRequest) 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 *BeforeWorkersUpgradeResponse) DeepCopyInto(out *BeforeWorkersUpgradeResponse) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ out.CommonRetryResponse = in.CommonRetryResponse
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BeforeWorkersUpgradeResponse.
+func (in *BeforeWorkersUpgradeResponse) DeepCopy() *BeforeWorkersUpgradeResponse {
+ if in == nil {
+ return nil
+ }
+ out := new(BeforeWorkersUpgradeResponse)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *BeforeWorkersUpgradeResponse) 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 *Builtins) DeepCopyInto(out *Builtins) {
*out = *in
@@ -366,6 +569,152 @@ func (in *Builtins) DeepCopy() *Builtins {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *CanUpdateMachineRequest) DeepCopyInto(out *CanUpdateMachineRequest) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.CommonRequest.DeepCopyInto(&out.CommonRequest)
+ in.Current.DeepCopyInto(&out.Current)
+ in.Desired.DeepCopyInto(&out.Desired)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanUpdateMachineRequest.
+func (in *CanUpdateMachineRequest) DeepCopy() *CanUpdateMachineRequest {
+ if in == nil {
+ return nil
+ }
+ out := new(CanUpdateMachineRequest)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *CanUpdateMachineRequest) 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 *CanUpdateMachineRequestObjects) DeepCopyInto(out *CanUpdateMachineRequestObjects) {
+ *out = *in
+ in.Machine.DeepCopyInto(&out.Machine)
+ in.InfrastructureMachine.DeepCopyInto(&out.InfrastructureMachine)
+ in.BootstrapConfig.DeepCopyInto(&out.BootstrapConfig)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanUpdateMachineRequestObjects.
+func (in *CanUpdateMachineRequestObjects) DeepCopy() *CanUpdateMachineRequestObjects {
+ if in == nil {
+ return nil
+ }
+ out := new(CanUpdateMachineRequestObjects)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *CanUpdateMachineResponse) DeepCopyInto(out *CanUpdateMachineResponse) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ out.CommonResponse = in.CommonResponse
+ in.MachinePatch.DeepCopyInto(&out.MachinePatch)
+ in.InfrastructureMachinePatch.DeepCopyInto(&out.InfrastructureMachinePatch)
+ in.BootstrapConfigPatch.DeepCopyInto(&out.BootstrapConfigPatch)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanUpdateMachineResponse.
+func (in *CanUpdateMachineResponse) DeepCopy() *CanUpdateMachineResponse {
+ if in == nil {
+ return nil
+ }
+ out := new(CanUpdateMachineResponse)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *CanUpdateMachineResponse) 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 *CanUpdateMachineSetRequest) DeepCopyInto(out *CanUpdateMachineSetRequest) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.CommonRequest.DeepCopyInto(&out.CommonRequest)
+ in.Current.DeepCopyInto(&out.Current)
+ in.Desired.DeepCopyInto(&out.Desired)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanUpdateMachineSetRequest.
+func (in *CanUpdateMachineSetRequest) DeepCopy() *CanUpdateMachineSetRequest {
+ if in == nil {
+ return nil
+ }
+ out := new(CanUpdateMachineSetRequest)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *CanUpdateMachineSetRequest) 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 *CanUpdateMachineSetRequestObjects) DeepCopyInto(out *CanUpdateMachineSetRequestObjects) {
+ *out = *in
+ in.MachineSet.DeepCopyInto(&out.MachineSet)
+ in.InfrastructureMachineTemplate.DeepCopyInto(&out.InfrastructureMachineTemplate)
+ in.BootstrapConfigTemplate.DeepCopyInto(&out.BootstrapConfigTemplate)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanUpdateMachineSetRequestObjects.
+func (in *CanUpdateMachineSetRequestObjects) DeepCopy() *CanUpdateMachineSetRequestObjects {
+ if in == nil {
+ return nil
+ }
+ out := new(CanUpdateMachineSetRequestObjects)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *CanUpdateMachineSetResponse) DeepCopyInto(out *CanUpdateMachineSetResponse) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ out.CommonResponse = in.CommonResponse
+ in.MachineSetPatch.DeepCopyInto(&out.MachineSetPatch)
+ in.InfrastructureMachineTemplatePatch.DeepCopyInto(&out.InfrastructureMachineTemplatePatch)
+ in.BootstrapConfigTemplatePatch.DeepCopyInto(&out.BootstrapConfigTemplatePatch)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanUpdateMachineSetResponse.
+func (in *CanUpdateMachineSetResponse) DeepCopy() *CanUpdateMachineSetResponse {
+ if in == nil {
+ return nil
+ }
+ out := new(CanUpdateMachineSetResponse)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *CanUpdateMachineSetResponse) 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 *ClusterBuiltins) DeepCopyInto(out *ClusterBuiltins) {
*out = *in
@@ -825,6 +1174,67 @@ func (in *GeneratePatchesResponseItem) DeepCopy() *GeneratePatchesResponseItem {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *GenerateUpgradePlanRequest) DeepCopyInto(out *GenerateUpgradePlanRequest) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.CommonRequest.DeepCopyInto(&out.CommonRequest)
+ in.Cluster.DeepCopyInto(&out.Cluster)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenerateUpgradePlanRequest.
+func (in *GenerateUpgradePlanRequest) DeepCopy() *GenerateUpgradePlanRequest {
+ if in == nil {
+ return nil
+ }
+ out := new(GenerateUpgradePlanRequest)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *GenerateUpgradePlanRequest) 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 *GenerateUpgradePlanResponse) DeepCopyInto(out *GenerateUpgradePlanResponse) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ out.CommonResponse = in.CommonResponse
+ if in.ControlPlaneUpgrades != nil {
+ in, out := &in.ControlPlaneUpgrades, &out.ControlPlaneUpgrades
+ *out = make([]UpgradeStep, len(*in))
+ copy(*out, *in)
+ }
+ if in.WorkersUpgrades != nil {
+ in, out := &in.WorkersUpgrades, &out.WorkersUpgrades
+ *out = make([]UpgradeStep, len(*in))
+ copy(*out, *in)
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenerateUpgradePlanResponse.
+func (in *GenerateUpgradePlanResponse) DeepCopy() *GenerateUpgradePlanResponse {
+ if in == nil {
+ return nil
+ }
+ out := new(GenerateUpgradePlanResponse)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *GenerateUpgradePlanResponse) 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 *GroupVersionHook) DeepCopyInto(out *GroupVersionHook) {
*out = *in
@@ -975,6 +1385,125 @@ func (in *MachinePoolBuiltins) DeepCopy() *MachinePoolBuiltins {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Patch) DeepCopyInto(out *Patch) {
+ *out = *in
+ if in.Patch != nil {
+ in, out := &in.Patch, &out.Patch
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Patch.
+func (in *Patch) DeepCopy() *Patch {
+ if in == nil {
+ return nil
+ }
+ out := new(Patch)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *UpdateMachineRequest) DeepCopyInto(out *UpdateMachineRequest) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.CommonRequest.DeepCopyInto(&out.CommonRequest)
+ in.Desired.DeepCopyInto(&out.Desired)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateMachineRequest.
+func (in *UpdateMachineRequest) DeepCopy() *UpdateMachineRequest {
+ if in == nil {
+ return nil
+ }
+ out := new(UpdateMachineRequest)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *UpdateMachineRequest) 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 *UpdateMachineRequestObjects) DeepCopyInto(out *UpdateMachineRequestObjects) {
+ *out = *in
+ in.Machine.DeepCopyInto(&out.Machine)
+ in.InfrastructureMachine.DeepCopyInto(&out.InfrastructureMachine)
+ in.BootstrapConfig.DeepCopyInto(&out.BootstrapConfig)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateMachineRequestObjects.
+func (in *UpdateMachineRequestObjects) DeepCopy() *UpdateMachineRequestObjects {
+ if in == nil {
+ return nil
+ }
+ out := new(UpdateMachineRequestObjects)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *UpdateMachineResponse) DeepCopyInto(out *UpdateMachineResponse) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ out.CommonRetryResponse = in.CommonRetryResponse
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateMachineResponse.
+func (in *UpdateMachineResponse) DeepCopy() *UpdateMachineResponse {
+ if in == nil {
+ return nil
+ }
+ out := new(UpdateMachineResponse)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *UpdateMachineResponse) 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 *UpgradeStep) DeepCopyInto(out *UpgradeStep) {
+ *out = *in
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeStep.
+func (in *UpgradeStep) DeepCopy() *UpgradeStep {
+ if in == nil {
+ return nil
+ }
+ out := new(UpgradeStep)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *UpgradeStepInfo) DeepCopyInto(out *UpgradeStepInfo) {
+ *out = *in
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeStepInfo.
+func (in *UpgradeStepInfo) DeepCopy() *UpgradeStepInfo {
+ if in == nil {
+ return nil
+ }
+ out := new(UpgradeStepInfo)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ValidateTopologyRequest) DeepCopyInto(out *ValidateTopologyRequest) {
*out = *in
diff --git a/api/runtime/hooks/v1alpha1/zz_generated.openapi.go b/api/runtime/hooks/v1alpha1/zz_generated.openapi.go
index e72d12416126..787689d73a00 100644
--- a/api/runtime/hooks/v1alpha1/zz_generated.openapi.go
+++ b/api/runtime/hooks/v1alpha1/zz_generated.openapi.go
@@ -34,13 +34,25 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.AfterControlPlaneInitializedResponse": schema_api_runtime_hooks_v1alpha1_AfterControlPlaneInitializedResponse(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.AfterControlPlaneUpgradeRequest": schema_api_runtime_hooks_v1alpha1_AfterControlPlaneUpgradeRequest(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.AfterControlPlaneUpgradeResponse": schema_api_runtime_hooks_v1alpha1_AfterControlPlaneUpgradeResponse(ref),
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.AfterWorkersUpgradeRequest": schema_api_runtime_hooks_v1alpha1_AfterWorkersUpgradeRequest(ref),
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.AfterWorkersUpgradeResponse": schema_api_runtime_hooks_v1alpha1_AfterWorkersUpgradeResponse(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.BeforeClusterCreateRequest": schema_api_runtime_hooks_v1alpha1_BeforeClusterCreateRequest(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.BeforeClusterCreateResponse": schema_api_runtime_hooks_v1alpha1_BeforeClusterCreateResponse(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.BeforeClusterDeleteRequest": schema_api_runtime_hooks_v1alpha1_BeforeClusterDeleteRequest(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.BeforeClusterDeleteResponse": schema_api_runtime_hooks_v1alpha1_BeforeClusterDeleteResponse(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.BeforeClusterUpgradeRequest": schema_api_runtime_hooks_v1alpha1_BeforeClusterUpgradeRequest(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.BeforeClusterUpgradeResponse": schema_api_runtime_hooks_v1alpha1_BeforeClusterUpgradeResponse(ref),
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.BeforeControlPlaneUpgradeRequest": schema_api_runtime_hooks_v1alpha1_BeforeControlPlaneUpgradeRequest(ref),
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.BeforeControlPlaneUpgradeResponse": schema_api_runtime_hooks_v1alpha1_BeforeControlPlaneUpgradeResponse(ref),
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.BeforeWorkersUpgradeRequest": schema_api_runtime_hooks_v1alpha1_BeforeWorkersUpgradeRequest(ref),
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.BeforeWorkersUpgradeResponse": schema_api_runtime_hooks_v1alpha1_BeforeWorkersUpgradeResponse(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Builtins": schema_api_runtime_hooks_v1alpha1_Builtins(ref),
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.CanUpdateMachineRequest": schema_api_runtime_hooks_v1alpha1_CanUpdateMachineRequest(ref),
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.CanUpdateMachineRequestObjects": schema_api_runtime_hooks_v1alpha1_CanUpdateMachineRequestObjects(ref),
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.CanUpdateMachineResponse": schema_api_runtime_hooks_v1alpha1_CanUpdateMachineResponse(ref),
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.CanUpdateMachineSetRequest": schema_api_runtime_hooks_v1alpha1_CanUpdateMachineSetRequest(ref),
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.CanUpdateMachineSetRequestObjects": schema_api_runtime_hooks_v1alpha1_CanUpdateMachineSetRequestObjects(ref),
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.CanUpdateMachineSetResponse": schema_api_runtime_hooks_v1alpha1_CanUpdateMachineSetResponse(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterBuiltins": schema_api_runtime_hooks_v1alpha1_ClusterBuiltins(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterNetworkBuiltins": schema_api_runtime_hooks_v1alpha1_ClusterNetworkBuiltins(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterTopologyBuiltins": schema_api_runtime_hooks_v1alpha1_ClusterTopologyBuiltins(ref),
@@ -60,6 +72,8 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.GeneratePatchesRequestItem": schema_api_runtime_hooks_v1alpha1_GeneratePatchesRequestItem(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.GeneratePatchesResponse": schema_api_runtime_hooks_v1alpha1_GeneratePatchesResponse(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.GeneratePatchesResponseItem": schema_api_runtime_hooks_v1alpha1_GeneratePatchesResponseItem(ref),
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.GenerateUpgradePlanRequest": schema_api_runtime_hooks_v1alpha1_GenerateUpgradePlanRequest(ref),
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.GenerateUpgradePlanResponse": schema_api_runtime_hooks_v1alpha1_GenerateUpgradePlanResponse(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.GroupVersionHook": schema_api_runtime_hooks_v1alpha1_GroupVersionHook(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.HolderReference": schema_api_runtime_hooks_v1alpha1_HolderReference(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineBootstrapBuiltins": schema_api_runtime_hooks_v1alpha1_MachineBootstrapBuiltins(ref),
@@ -67,6 +81,12 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineDeploymentBuiltins": schema_api_runtime_hooks_v1alpha1_MachineDeploymentBuiltins(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineInfrastructureRefBuiltins": schema_api_runtime_hooks_v1alpha1_MachineInfrastructureRefBuiltins(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachinePoolBuiltins": schema_api_runtime_hooks_v1alpha1_MachinePoolBuiltins(ref),
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Patch": schema_api_runtime_hooks_v1alpha1_Patch(ref),
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpdateMachineRequest": schema_api_runtime_hooks_v1alpha1_UpdateMachineRequest(ref),
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpdateMachineRequestObjects": schema_api_runtime_hooks_v1alpha1_UpdateMachineRequestObjects(ref),
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpdateMachineResponse": schema_api_runtime_hooks_v1alpha1_UpdateMachineResponse(ref),
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpgradeStep": schema_api_runtime_hooks_v1alpha1_UpgradeStep(ref),
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpgradeStepInfo": schema_api_runtime_hooks_v1alpha1_UpgradeStepInfo(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ValidateTopologyRequest": schema_api_runtime_hooks_v1alpha1_ValidateTopologyRequest(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ValidateTopologyRequestItem": schema_api_runtime_hooks_v1alpha1_ValidateTopologyRequestItem(ref),
"sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ValidateTopologyResponse": schema_api_runtime_hooks_v1alpha1_ValidateTopologyResponse(ref),
@@ -172,8 +192,16 @@ func schema_api_runtime_hooks_v1alpha1_AfterClusterUpgradeResponse(ref common.Re
Format: "",
},
},
+ "retryAfterSeconds": {
+ SchemaProps: spec.SchemaProps{
+ Description: "retryAfterSeconds when set to a non-zero value signifies that the hook will be called again at a future time.",
+ Default: 0,
+ Type: []string{"integer"},
+ Format: "int32",
+ },
+ },
},
- Required: []string{"status"},
+ Required: []string{"status", "retryAfterSeconds"},
},
},
}
@@ -322,18 +350,46 @@ func schema_api_runtime_hooks_v1alpha1_AfterControlPlaneUpgradeRequest(ref commo
},
"kubernetesVersion": {
SchemaProps: spec.SchemaProps{
- Description: "kubernetesVersion is the Kubernetes version of the Control Plane after the upgrade.",
+ Description: "kubernetesVersion is the Kubernetes version of the control plane after an upgrade step.",
Default: "",
Type: []string{"string"},
Format: "",
},
},
+ "controlPlaneUpgrades": {
+ SchemaProps: spec.SchemaProps{
+ Description: "controlPlaneUpgrades is the list of the remaining version upgrade steps for the control plane, if any.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpgradeStepInfo"),
+ },
+ },
+ },
+ },
+ },
+ "workersUpgrades": {
+ SchemaProps: spec.SchemaProps{
+ Description: "workersUpgrades is the list of the remaining version upgrade steps for workers, if any.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpgradeStepInfo"),
+ },
+ },
+ },
+ },
+ },
},
Required: []string{"cluster", "kubernetesVersion"},
},
},
Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"},
+ "sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpgradeStepInfo"},
}
}
@@ -389,11 +445,11 @@ func schema_api_runtime_hooks_v1alpha1_AfterControlPlaneUpgradeResponse(ref comm
}
}
-func schema_api_runtime_hooks_v1alpha1_BeforeClusterCreateRequest(ref common.ReferenceCallback) common.OpenAPIDefinition {
+func schema_api_runtime_hooks_v1alpha1_AfterWorkersUpgradeRequest(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "BeforeClusterCreateRequest is the request of the BeforeClusterCreate hook.",
+ Description: "AfterWorkersUpgradeRequest is the request of the AfterWorkersUpgrade hook.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"kind": {
@@ -433,20 +489,56 @@ func schema_api_runtime_hooks_v1alpha1_BeforeClusterCreateRequest(ref common.Ref
Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"),
},
},
+ "kubernetesVersion": {
+ SchemaProps: spec.SchemaProps{
+ Description: "kubernetesVersion is the Kubernetes version of the workers after an upgrade step.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "controlPlaneUpgrades": {
+ SchemaProps: spec.SchemaProps{
+ Description: "controlPlaneUpgrades is the list of the remaining version upgrade steps for the control plane, if any.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpgradeStepInfo"),
+ },
+ },
+ },
+ },
+ },
+ "workersUpgrades": {
+ SchemaProps: spec.SchemaProps{
+ Description: "workersUpgrades is the list of the remaining version upgrade steps for workers, if any.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpgradeStepInfo"),
+ },
+ },
+ },
+ },
+ },
},
- Required: []string{"cluster"},
+ Required: []string{"cluster", "kubernetesVersion"},
},
},
Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"},
+ "sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpgradeStepInfo"},
}
}
-func schema_api_runtime_hooks_v1alpha1_BeforeClusterCreateResponse(ref common.ReferenceCallback) common.OpenAPIDefinition {
+func schema_api_runtime_hooks_v1alpha1_AfterWorkersUpgradeResponse(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "BeforeClusterCreateResponse is the response of the BeforeClusterCreate hook.",
+ Description: "AfterWorkersUpgradeResponse is the response of the AfterWorkersUpgrade hook.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"kind": {
@@ -494,11 +586,11 @@ func schema_api_runtime_hooks_v1alpha1_BeforeClusterCreateResponse(ref common.Re
}
}
-func schema_api_runtime_hooks_v1alpha1_BeforeClusterDeleteRequest(ref common.ReferenceCallback) common.OpenAPIDefinition {
+func schema_api_runtime_hooks_v1alpha1_BeforeClusterCreateRequest(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "BeforeClusterDeleteRequest is the request of the BeforeClusterDelete hook.",
+ Description: "BeforeClusterCreateRequest is the request of the BeforeClusterCreate hook.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"kind": {
@@ -547,11 +639,11 @@ func schema_api_runtime_hooks_v1alpha1_BeforeClusterDeleteRequest(ref common.Ref
}
}
-func schema_api_runtime_hooks_v1alpha1_BeforeClusterDeleteResponse(ref common.ReferenceCallback) common.OpenAPIDefinition {
+func schema_api_runtime_hooks_v1alpha1_BeforeClusterCreateResponse(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "BeforeClusterDeleteResponse is the response of the BeforeClusterDelete hook.",
+ Description: "BeforeClusterCreateResponse is the response of the BeforeClusterCreate hook.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"kind": {
@@ -599,11 +691,11 @@ func schema_api_runtime_hooks_v1alpha1_BeforeClusterDeleteResponse(ref common.Re
}
}
-func schema_api_runtime_hooks_v1alpha1_BeforeClusterUpgradeRequest(ref common.ReferenceCallback) common.OpenAPIDefinition {
+func schema_api_runtime_hooks_v1alpha1_BeforeClusterDeleteRequest(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "BeforeClusterUpgradeRequest is the request of the BeforeClusterUpgrade hook.",
+ Description: "BeforeClusterDeleteRequest is the request of the BeforeClusterDelete hook.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"kind": {
@@ -643,24 +735,8 @@ func schema_api_runtime_hooks_v1alpha1_BeforeClusterUpgradeRequest(ref common.Re
Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"),
},
},
- "fromKubernetesVersion": {
- SchemaProps: spec.SchemaProps{
- Description: "fromKubernetesVersion is the current Kubernetes version of the cluster.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "toKubernetesVersion": {
- SchemaProps: spec.SchemaProps{
- Description: "toKubernetesVersion is the target Kubernetes version of the upgrade.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
},
- Required: []string{"cluster", "fromKubernetesVersion", "toKubernetesVersion"},
+ Required: []string{"cluster"},
},
},
Dependencies: []string{
@@ -668,11 +744,11 @@ func schema_api_runtime_hooks_v1alpha1_BeforeClusterUpgradeRequest(ref common.Re
}
}
-func schema_api_runtime_hooks_v1alpha1_BeforeClusterUpgradeResponse(ref common.ReferenceCallback) common.OpenAPIDefinition {
+func schema_api_runtime_hooks_v1alpha1_BeforeClusterDeleteResponse(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "BeforeClusterUpgradeResponse is the response of the BeforeClusterUpgrade hook.",
+ Description: "BeforeClusterDeleteResponse is the response of the BeforeClusterDelete hook.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"kind": {
@@ -720,133 +796,182 @@ func schema_api_runtime_hooks_v1alpha1_BeforeClusterUpgradeResponse(ref common.R
}
}
-func schema_api_runtime_hooks_v1alpha1_Builtins(ref common.ReferenceCallback) common.OpenAPIDefinition {
+func schema_api_runtime_hooks_v1alpha1_BeforeClusterUpgradeRequest(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "Builtins represents builtin variables exposed through patches.",
+ Description: "BeforeClusterUpgradeRequest is the request of the BeforeClusterUpgrade hook.",
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: "",
+ },
+ },
+ "settings": {
+ SchemaProps: spec.SchemaProps{
+ Description: "settings defines key value pairs to be passed to the call.",
+ Type: []string{"object"},
+ AdditionalProperties: &spec.SchemaOrBool{
+ Allows: true,
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ },
+ },
"cluster": {
SchemaProps: spec.SchemaProps{
- Description: "cluster represents builtin cluster variables.",
- Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterBuiltins"),
+ Description: "cluster is the cluster object the lifecycle hook corresponds to.",
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"),
},
},
- "controlPlane": {
+ "fromKubernetesVersion": {
SchemaProps: spec.SchemaProps{
- Description: "controlPlane represents builtin ControlPlane variables.",
- Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ControlPlaneBuiltins"),
+ Description: "fromKubernetesVersion is the current Kubernetes version of the cluster.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
},
},
- "machineDeployment": {
+ "toKubernetesVersion": {
SchemaProps: spec.SchemaProps{
- Description: "machineDeployment represents builtin MachineDeployment variables.",
- Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineDeploymentBuiltins"),
+ Description: "toKubernetesVersion is the target Kubernetes version of the upgrade.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
},
},
- "machinePool": {
+ "controlPlaneUpgrades": {
SchemaProps: spec.SchemaProps{
- Description: "machinePool represents builtin MachinePool variables.",
- Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachinePoolBuiltins"),
+ Description: "controlPlaneUpgrades is the list of version upgrade steps for the control plane.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpgradeStepInfo"),
+ },
+ },
+ },
+ },
+ },
+ "workersUpgrades": {
+ SchemaProps: spec.SchemaProps{
+ Description: "workersUpgrades is the list of version upgrade steps for the workers.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpgradeStepInfo"),
+ },
+ },
+ },
},
},
},
+ Required: []string{"cluster", "fromKubernetesVersion", "toKubernetesVersion"},
},
},
Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterBuiltins", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ControlPlaneBuiltins", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineDeploymentBuiltins", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachinePoolBuiltins"},
+ "sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpgradeStepInfo"},
}
}
-func schema_api_runtime_hooks_v1alpha1_ClusterBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition {
+func schema_api_runtime_hooks_v1alpha1_BeforeClusterUpgradeResponse(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "ClusterBuiltins represents builtin cluster variables.",
+ Description: "BeforeClusterUpgradeResponse is the response of the BeforeClusterUpgrade hook.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
- "name": {
+ "kind": {
SchemaProps: spec.SchemaProps{
- Description: "name is the name of the cluster.",
+ 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: "",
},
},
- "namespace": {
+ "apiVersion": {
SchemaProps: spec.SchemaProps{
- Description: "namespace is the namespace of the cluster.",
+ 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: "",
},
},
- "uid": {
+ "status": {
SchemaProps: spec.SchemaProps{
- Description: "uid is the unqiue identifier of the cluster.",
+ Description: "status of the call. One of \"Success\" or \"Failure\".\n\nPossible enum values:\n - `\"Failure\"` represents a failure response.\n - `\"Success\"` represents a success response.",
+ Default: "",
Type: []string{"string"},
Format: "",
+ Enum: []interface{}{"Failure", "Success"},
},
},
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the metadata set on the Cluster object.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"),
- },
- },
- "topology": {
+ "message": {
SchemaProps: spec.SchemaProps{
- Description: "topology represents the cluster topology variables.",
- Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterTopologyBuiltins"),
+ Description: "message is a human-readable description of the status of the call.",
+ Type: []string{"string"},
+ Format: "",
},
},
- "network": {
+ "retryAfterSeconds": {
SchemaProps: spec.SchemaProps{
- Description: "network represents the cluster network variables.",
- Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterNetworkBuiltins"),
+ Description: "retryAfterSeconds when set to a non-zero value signifies that the hook will be called again at a future time.",
+ Default: 0,
+ Type: []string{"integer"},
+ Format: "int32",
},
},
},
+ Required: []string{"status", "retryAfterSeconds"},
},
},
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterNetworkBuiltins", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterTopologyBuiltins"},
}
}
-func schema_api_runtime_hooks_v1alpha1_ClusterNetworkBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition {
+func schema_api_runtime_hooks_v1alpha1_BeforeControlPlaneUpgradeRequest(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "ClusterNetworkBuiltins represents builtin cluster network variables.",
+ Description: "BeforeControlPlaneUpgradeRequest is the request of the BeforeControlPlane hook.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
- "serviceDomain": {
+ "kind": {
SchemaProps: spec.SchemaProps{
- Description: "serviceDomain is the domain name for services.",
+ 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: "",
},
},
- "services": {
+ "apiVersion": {
SchemaProps: spec.SchemaProps{
- Description: "services is the network ranges from which service VIPs are allocated.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
+ 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: "",
},
},
- "pods": {
+ "settings": {
SchemaProps: spec.SchemaProps{
- Description: "pods is the network ranges from which Pod networks are allocated.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
+ Description: "settings defines key value pairs to be passed to the call.",
+ Type: []string{"object"},
+ AdditionalProperties: &spec.SchemaOrBool{
+ Allows: true,
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: "",
@@ -857,7 +982,729 @@ func schema_api_runtime_hooks_v1alpha1_ClusterNetworkBuiltins(ref common.Referen
},
},
},
- },
+ "cluster": {
+ SchemaProps: spec.SchemaProps{
+ Description: "cluster is the cluster object the lifecycle hook corresponds to.",
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"),
+ },
+ },
+ "fromKubernetesVersion": {
+ SchemaProps: spec.SchemaProps{
+ Description: "fromKubernetesVersion is the current Kubernetes version of the control plane for the next upgrade step.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "toKubernetesVersion": {
+ SchemaProps: spec.SchemaProps{
+ Description: "toKubernetesVersion is the target Kubernetes version of the control plane for the next upgrade step.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "controlPlaneUpgrades": {
+ SchemaProps: spec.SchemaProps{
+ Description: "controlPlaneUpgrades is the list of the remaining version upgrade steps for the control plane, if any.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpgradeStepInfo"),
+ },
+ },
+ },
+ },
+ },
+ "workersUpgrades": {
+ SchemaProps: spec.SchemaProps{
+ Description: "workersUpgrades is the list of the remaining version upgrade steps for workers, if any.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpgradeStepInfo"),
+ },
+ },
+ },
+ },
+ },
+ },
+ Required: []string{"cluster", "fromKubernetesVersion", "toKubernetesVersion"},
+ },
+ },
+ Dependencies: []string{
+ "sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpgradeStepInfo"},
+ }
+}
+
+func schema_api_runtime_hooks_v1alpha1_BeforeControlPlaneUpgradeResponse(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "BeforeControlPlaneUpgradeResponse is the response of the BeforeControlPlaneUpgrade hook.",
+ 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: "",
+ },
+ },
+ "status": {
+ SchemaProps: spec.SchemaProps{
+ Description: "status of the call. One of \"Success\" or \"Failure\".\n\nPossible enum values:\n - `\"Failure\"` represents a failure response.\n - `\"Success\"` represents a success response.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ Enum: []interface{}{"Failure", "Success"},
+ },
+ },
+ "message": {
+ SchemaProps: spec.SchemaProps{
+ Description: "message is a human-readable description of the status of the call.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "retryAfterSeconds": {
+ SchemaProps: spec.SchemaProps{
+ Description: "retryAfterSeconds when set to a non-zero value signifies that the hook will be called again at a future time.",
+ Default: 0,
+ Type: []string{"integer"},
+ Format: "int32",
+ },
+ },
+ },
+ Required: []string{"status", "retryAfterSeconds"},
+ },
+ },
+ }
+}
+
+func schema_api_runtime_hooks_v1alpha1_BeforeWorkersUpgradeRequest(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "BeforeWorkersUpgradeRequest is the request of the BeforeWorkersUpgrade hook.",
+ 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: "",
+ },
+ },
+ "settings": {
+ SchemaProps: spec.SchemaProps{
+ Description: "settings defines key value pairs to be passed to the call.",
+ Type: []string{"object"},
+ AdditionalProperties: &spec.SchemaOrBool{
+ Allows: true,
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ },
+ },
+ "cluster": {
+ SchemaProps: spec.SchemaProps{
+ Description: "cluster is the cluster object the lifecycle hook corresponds to.",
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"),
+ },
+ },
+ "fromKubernetesVersion": {
+ SchemaProps: spec.SchemaProps{
+ Description: "fromKubernetesVersion is the current Kubernetes version of the workers for the next upgrade step.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "toKubernetesVersion": {
+ SchemaProps: spec.SchemaProps{
+ Description: "toKubernetesVersion is the target Kubernetes version of the workers for the next upgrade step.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "controlPlaneUpgrades": {
+ SchemaProps: spec.SchemaProps{
+ Description: "controlPlaneUpgrades is the list of the remaining version upgrade steps for the control plane, if any.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpgradeStepInfo"),
+ },
+ },
+ },
+ },
+ },
+ "workersUpgrades": {
+ SchemaProps: spec.SchemaProps{
+ Description: "workersUpgrades is the list of the remaining version upgrade steps for workers, if any.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpgradeStepInfo"),
+ },
+ },
+ },
+ },
+ },
+ },
+ Required: []string{"cluster", "fromKubernetesVersion", "toKubernetesVersion"},
+ },
+ },
+ Dependencies: []string{
+ "sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpgradeStepInfo"},
+ }
+}
+
+func schema_api_runtime_hooks_v1alpha1_BeforeWorkersUpgradeResponse(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "BeforeWorkersUpgradeResponse is the response of the BeforeWorkersUpgrade hook.",
+ 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: "",
+ },
+ },
+ "status": {
+ SchemaProps: spec.SchemaProps{
+ Description: "status of the call. One of \"Success\" or \"Failure\".\n\nPossible enum values:\n - `\"Failure\"` represents a failure response.\n - `\"Success\"` represents a success response.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ Enum: []interface{}{"Failure", "Success"},
+ },
+ },
+ "message": {
+ SchemaProps: spec.SchemaProps{
+ Description: "message is a human-readable description of the status of the call.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "retryAfterSeconds": {
+ SchemaProps: spec.SchemaProps{
+ Description: "retryAfterSeconds when set to a non-zero value signifies that the hook will be called again at a future time.",
+ Default: 0,
+ Type: []string{"integer"},
+ Format: "int32",
+ },
+ },
+ },
+ Required: []string{"status", "retryAfterSeconds"},
+ },
+ },
+ }
+}
+
+func schema_api_runtime_hooks_v1alpha1_Builtins(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "Builtins represents builtin variables exposed through patches.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "cluster": {
+ SchemaProps: spec.SchemaProps{
+ Description: "cluster represents builtin cluster variables.",
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterBuiltins"),
+ },
+ },
+ "controlPlane": {
+ SchemaProps: spec.SchemaProps{
+ Description: "controlPlane represents builtin ControlPlane variables.",
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ControlPlaneBuiltins"),
+ },
+ },
+ "machineDeployment": {
+ SchemaProps: spec.SchemaProps{
+ Description: "machineDeployment represents builtin MachineDeployment variables.",
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineDeploymentBuiltins"),
+ },
+ },
+ "machinePool": {
+ SchemaProps: spec.SchemaProps{
+ Description: "machinePool represents builtin MachinePool variables.",
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachinePoolBuiltins"),
+ },
+ },
+ },
+ },
+ },
+ Dependencies: []string{
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterBuiltins", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ControlPlaneBuiltins", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineDeploymentBuiltins", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachinePoolBuiltins"},
+ }
+}
+
+func schema_api_runtime_hooks_v1alpha1_CanUpdateMachineRequest(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "CanUpdateMachineRequest is the request of the CanUpdateMachine hook.",
+ 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: "",
+ },
+ },
+ "settings": {
+ SchemaProps: spec.SchemaProps{
+ Description: "settings defines key value pairs to be passed to the call.",
+ Type: []string{"object"},
+ AdditionalProperties: &spec.SchemaOrBool{
+ Allows: true,
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ },
+ },
+ "current": {
+ SchemaProps: spec.SchemaProps{
+ Description: "current contains the current state of the Machine and related objects.",
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.CanUpdateMachineRequestObjects"),
+ },
+ },
+ "desired": {
+ SchemaProps: spec.SchemaProps{
+ Description: "desired contains the desired state of the Machine and related objects.",
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.CanUpdateMachineRequestObjects"),
+ },
+ },
+ },
+ Required: []string{"current", "desired"},
+ },
+ },
+ Dependencies: []string{
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.CanUpdateMachineRequestObjects"},
+ }
+}
+
+func schema_api_runtime_hooks_v1alpha1_CanUpdateMachineRequestObjects(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "CanUpdateMachineRequestObjects groups objects for CanUpdateMachineRequest.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "machine": {
+ SchemaProps: spec.SchemaProps{
+ Description: "machine is the full Machine object.",
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.Machine"),
+ },
+ },
+ "infrastructureMachine": {
+ SchemaProps: spec.SchemaProps{
+ Description: "infrastructureMachine is the infra Machine object.",
+ Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"),
+ },
+ },
+ "bootstrapConfig": {
+ SchemaProps: spec.SchemaProps{
+ Description: "bootstrapConfig is the bootstrap config object.",
+ Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"),
+ },
+ },
+ },
+ Required: []string{"machine", "infrastructureMachine"},
+ },
+ },
+ Dependencies: []string{
+ "k8s.io/apimachinery/pkg/runtime.RawExtension", "sigs.k8s.io/cluster-api/api/core/v1beta2.Machine"},
+ }
+}
+
+func schema_api_runtime_hooks_v1alpha1_CanUpdateMachineResponse(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "CanUpdateMachineResponse is the response of the CanUpdateMachine hook.",
+ 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: "",
+ },
+ },
+ "status": {
+ SchemaProps: spec.SchemaProps{
+ Description: "status of the call. One of \"Success\" or \"Failure\".\n\nPossible enum values:\n - `\"Failure\"` represents a failure response.\n - `\"Success\"` represents a success response.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ Enum: []interface{}{"Failure", "Success"},
+ },
+ },
+ "message": {
+ SchemaProps: spec.SchemaProps{
+ Description: "message is a human-readable description of the status of the call.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "machinePatch": {
+ SchemaProps: spec.SchemaProps{
+ Description: "machinePatch when applied to the current Machine spec, indicates changes handled in-place. Only fields in spec have to be covered by the patch.",
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Patch"),
+ },
+ },
+ "infrastructureMachinePatch": {
+ SchemaProps: spec.SchemaProps{
+ Description: "infrastructureMachinePatch indicates infra Machine spec changes handled in-place. Only fields in spec have to be covered by the patch.",
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Patch"),
+ },
+ },
+ "bootstrapConfigPatch": {
+ SchemaProps: spec.SchemaProps{
+ Description: "bootstrapConfigPatch indicates bootstrap config spec changes handled in-place. Only fields in spec have to be covered by the patch.",
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Patch"),
+ },
+ },
+ },
+ Required: []string{"status"},
+ },
+ },
+ Dependencies: []string{
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Patch"},
+ }
+}
+
+func schema_api_runtime_hooks_v1alpha1_CanUpdateMachineSetRequest(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "CanUpdateMachineSetRequest is the request of the CanUpdateMachineSet hook.",
+ 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: "",
+ },
+ },
+ "settings": {
+ SchemaProps: spec.SchemaProps{
+ Description: "settings defines key value pairs to be passed to the call.",
+ Type: []string{"object"},
+ AdditionalProperties: &spec.SchemaOrBool{
+ Allows: true,
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ },
+ },
+ "current": {
+ SchemaProps: spec.SchemaProps{
+ Description: "current contains the current state of the MachineSet and related objects.",
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.CanUpdateMachineSetRequestObjects"),
+ },
+ },
+ "desired": {
+ SchemaProps: spec.SchemaProps{
+ Description: "desired contains the desired state of the MachineSet and related objects.",
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.CanUpdateMachineSetRequestObjects"),
+ },
+ },
+ },
+ Required: []string{"current", "desired"},
+ },
+ },
+ Dependencies: []string{
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.CanUpdateMachineSetRequestObjects"},
+ }
+}
+
+func schema_api_runtime_hooks_v1alpha1_CanUpdateMachineSetRequestObjects(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "CanUpdateMachineSetRequestObjects groups objects for CanUpdateMachineSetRequest.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "machineSet": {
+ SchemaProps: spec.SchemaProps{
+ Description: "machineSet is the full MachineSet object. Only fields in spec.template.spec have to be covered by the patch.",
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSet"),
+ },
+ },
+ "infrastructureMachineTemplate": {
+ SchemaProps: spec.SchemaProps{
+ Description: "infrastructureMachineTemplate is the provider-specific InfrastructureMachineTemplate object. Only fields in spec.template.spec have to be covered by the patch.",
+ Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"),
+ },
+ },
+ "bootstrapConfigTemplate": {
+ SchemaProps: spec.SchemaProps{
+ Description: "bootstrapConfigTemplate is the provider-specific BootstrapConfigTemplate object. Only fields in spec.template.spec have to be covered by the patch.",
+ Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"),
+ },
+ },
+ },
+ Required: []string{"machineSet", "infrastructureMachineTemplate"},
+ },
+ },
+ Dependencies: []string{
+ "k8s.io/apimachinery/pkg/runtime.RawExtension", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSet"},
+ }
+}
+
+func schema_api_runtime_hooks_v1alpha1_CanUpdateMachineSetResponse(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "CanUpdateMachineSetResponse is the response of the CanUpdateMachineSet hook.",
+ 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: "",
+ },
+ },
+ "status": {
+ SchemaProps: spec.SchemaProps{
+ Description: "status of the call. One of \"Success\" or \"Failure\".\n\nPossible enum values:\n - `\"Failure\"` represents a failure response.\n - `\"Success\"` represents a success response.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ Enum: []interface{}{"Failure", "Success"},
+ },
+ },
+ "message": {
+ SchemaProps: spec.SchemaProps{
+ Description: "message is a human-readable description of the status of the call.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "machineSetPatch": {
+ SchemaProps: spec.SchemaProps{
+ Description: "machineSetPatch when applied to the current MachineSet spec, indicates changes handled in-place.",
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Patch"),
+ },
+ },
+ "infrastructureMachineTemplatePatch": {
+ SchemaProps: spec.SchemaProps{
+ Description: "infrastructureMachineTemplatePatch indicates infra template spec changes handled in-place.",
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Patch"),
+ },
+ },
+ "bootstrapConfigTemplatePatch": {
+ SchemaProps: spec.SchemaProps{
+ Description: "bootstrapConfigTemplatePatch indicates bootstrap template spec changes handled in-place.",
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Patch"),
+ },
+ },
+ },
+ Required: []string{"status"},
+ },
+ },
+ Dependencies: []string{
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Patch"},
+ }
+}
+
+func schema_api_runtime_hooks_v1alpha1_ClusterBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "ClusterBuiltins represents builtin cluster variables.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "name": {
+ SchemaProps: spec.SchemaProps{
+ Description: "name is the name of the cluster.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "namespace": {
+ SchemaProps: spec.SchemaProps{
+ Description: "namespace is the namespace of the cluster.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "uid": {
+ SchemaProps: spec.SchemaProps{
+ Description: "uid is the unqiue identifier of the cluster.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "metadata": {
+ SchemaProps: spec.SchemaProps{
+ Description: "metadata is the metadata set on the Cluster object.",
+ Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"),
+ },
+ },
+ "topology": {
+ SchemaProps: spec.SchemaProps{
+ Description: "topology represents the cluster topology variables.",
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterTopologyBuiltins"),
+ },
+ },
+ "network": {
+ SchemaProps: spec.SchemaProps{
+ Description: "network represents the cluster network variables.",
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterNetworkBuiltins"),
+ },
+ },
+ },
+ },
+ },
+ Dependencies: []string{
+ "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterNetworkBuiltins", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterTopologyBuiltins"},
+ }
+}
+
+func schema_api_runtime_hooks_v1alpha1_ClusterNetworkBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "ClusterNetworkBuiltins represents builtin cluster network variables.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "serviceDomain": {
+ SchemaProps: spec.SchemaProps{
+ Description: "serviceDomain is the domain name for services.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "services": {
+ SchemaProps: spec.SchemaProps{
+ Description: "services is the network ranges from which service VIPs are allocated.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ },
+ },
+ "pods": {
+ SchemaProps: spec.SchemaProps{
+ Description: "pods is the network ranges from which Pod networks are allocated.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ },
+ },
+ },
},
},
}
@@ -1456,47 +2303,218 @@ func schema_api_runtime_hooks_v1alpha1_GeneratePatchesRequestItem(ref common.Ref
Format: "",
},
},
- "holderReference": {
+ "holderReference": {
+ SchemaProps: spec.SchemaProps{
+ Description: "holderReference is a reference to the object where the template is used.",
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.HolderReference"),
+ },
+ },
+ "object": {
+ SchemaProps: spec.SchemaProps{
+ Description: "object contains the template as a raw object.",
+ Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"),
+ },
+ },
+ "variables": {
+ SchemaProps: spec.SchemaProps{
+ Description: "variables are variables specific for the current template. For example some builtin variables like MachineDeployment replicas and version are context-sensitive and thus are only added to templates for MachineDeployments and with values which correspond to the current MachineDeployment.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Variable"),
+ },
+ },
+ },
+ },
+ },
+ },
+ Required: []string{"uid", "holderReference", "object"},
+ },
+ },
+ Dependencies: []string{
+ "k8s.io/apimachinery/pkg/runtime.RawExtension", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.HolderReference", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Variable"},
+ }
+}
+
+func schema_api_runtime_hooks_v1alpha1_GeneratePatchesResponse(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "GeneratePatchesResponse is the response of the GeneratePatches hook. NOTE: The patches in GeneratePatchesResponse will be applied in the order in which they are defined to the templates of the request. Thus applying changes consecutively when iterating through internal and external patches.",
+ 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: "",
+ },
+ },
+ "status": {
+ SchemaProps: spec.SchemaProps{
+ Description: "status of the call. One of \"Success\" or \"Failure\".\n\nPossible enum values:\n - `\"Failure\"` represents a failure response.\n - `\"Success\"` represents a success response.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ Enum: []interface{}{"Failure", "Success"},
+ },
+ },
+ "message": {
+ SchemaProps: spec.SchemaProps{
+ Description: "message is a human-readable description of the status of the call.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "items": {
+ SchemaProps: spec.SchemaProps{
+ Description: "items is the list of generated patches.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.GeneratePatchesResponseItem"),
+ },
+ },
+ },
+ },
+ },
+ },
+ Required: []string{"status"},
+ },
+ },
+ Dependencies: []string{
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.GeneratePatchesResponseItem"},
+ }
+}
+
+func schema_api_runtime_hooks_v1alpha1_GeneratePatchesResponseItem(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "GeneratePatchesResponseItem is a generated patch.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "uid": {
+ SchemaProps: spec.SchemaProps{
+ Description: "uid identifies the corresponding template in the request on which the patch should be applied.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "patchType": {
+ SchemaProps: spec.SchemaProps{
+ Description: "patchType defines the type of the patch. One of: \"JSONPatch\" or \"JSONMergePatch\".",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "patch": {
+ SchemaProps: spec.SchemaProps{
+ Description: "patch contains the patch which should be applied to the template. It must be of the corresponding PatchType.",
+ Type: []string{"string"},
+ Format: "byte",
+ },
+ },
+ },
+ Required: []string{"uid", "patchType", "patch"},
+ },
+ },
+ }
+}
+
+func schema_api_runtime_hooks_v1alpha1_GenerateUpgradePlanRequest(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "GenerateUpgradePlanRequest is the request of the GenerateUpgradePlan hook.",
+ 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: "",
+ },
+ },
+ "settings": {
+ SchemaProps: spec.SchemaProps{
+ Description: "settings defines key value pairs to be passed to the call.",
+ Type: []string{"object"},
+ AdditionalProperties: &spec.SchemaOrBool{
+ Allows: true,
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ },
+ },
+ "cluster": {
+ SchemaProps: spec.SchemaProps{
+ Description: "cluster is the cluster object the GenerateUpgradePlan request corresponds to.",
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.Cluster"),
+ },
+ },
+ "fromControlPlaneKubernetesVersion": {
SchemaProps: spec.SchemaProps{
- Description: "holderReference is a reference to the object where the template is used.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.HolderReference"),
+ Description: "fromControlPlaneKubernetesVersion is the current Kubernetes version of the control plane.",
+ Type: []string{"string"},
+ Format: "",
},
},
- "object": {
+ "fromWorkersKubernetesVersion": {
SchemaProps: spec.SchemaProps{
- Description: "object contains the template as a raw object.",
- Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"),
+ Description: "fromWorkersKubernetesVersion is the min current Kubernetes version of the workers.",
+ Type: []string{"string"},
+ Format: "",
},
},
- "variables": {
+ "toKubernetesVersion": {
SchemaProps: spec.SchemaProps{
- Description: "variables are variables specific for the current template. For example some builtin variables like MachineDeployment replicas and version are context-sensitive and thus are only added to templates for MachineDeployments and with values which correspond to the current MachineDeployment.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Variable"),
- },
- },
- },
+ Description: "toKubernetesVersion is the target Kubernetes version for the upgrade.",
+ Type: []string{"string"},
+ Format: "",
},
},
},
- Required: []string{"uid", "holderReference", "object"},
+ Required: []string{"cluster", "fromControlPlaneKubernetesVersion", "toKubernetesVersion"},
},
},
Dependencies: []string{
- "k8s.io/apimachinery/pkg/runtime.RawExtension", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.HolderReference", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Variable"},
+ "sigs.k8s.io/cluster-api/api/core/v1beta2.Cluster"},
}
}
-func schema_api_runtime_hooks_v1alpha1_GeneratePatchesResponse(ref common.ReferenceCallback) common.OpenAPIDefinition {
+func schema_api_runtime_hooks_v1alpha1_GenerateUpgradePlanResponse(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "GeneratePatchesResponse is the response of the GeneratePatches hook. NOTE: The patches in GeneratePatchesResponse will be applied in the order in which they are defined to the templates of the request. Thus applying changes consecutively when iterating through internal and external patches.",
+ Description: "GenerateUpgradePlanResponse is the response of the GenerateUpgradePlan hook.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"kind": {
@@ -1529,64 +2547,40 @@ func schema_api_runtime_hooks_v1alpha1_GeneratePatchesResponse(ref common.Refere
Format: "",
},
},
- "items": {
+ "controlPlaneUpgrades": {
SchemaProps: spec.SchemaProps{
- Description: "items is the list of generated patches.",
+ Description: "controlPlaneUpgrades is the list of version upgrade steps for the control plane. Each entry represents an intermediate version that must be applied in sequence. The following rules apply: - there should be at least one version for every minor between \t\tfromControlPlaneKubernetesVersion (excluded) and ToKubernetesVersion (included). - each version must be:\n - greater than fromControlPlaneKubernetesVersion (or with a different build \tnumber)\n - greater than the previous version in the list (or with a different build number)\n - less or equal to ToKubernetesVersion (or with a different build number)\n - the last version in the plan must be equal to ToKubernetesVersion",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.GeneratePatchesResponseItem"),
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpgradeStep"),
},
},
},
},
},
- },
- Required: []string{"status"},
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.GeneratePatchesResponseItem"},
- }
-}
-
-func schema_api_runtime_hooks_v1alpha1_GeneratePatchesResponseItem(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "GeneratePatchesResponseItem is a generated patch.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "uid": {
- SchemaProps: spec.SchemaProps{
- Description: "uid identifies the corresponding template in the request on which the patch should be applied.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "patchType": {
- SchemaProps: spec.SchemaProps{
- Description: "patchType defines the type of the patch. One of: \"JSONPatch\" or \"JSONMergePatch\".\n\nPossible enum values:\n - `\"JSONMergePatch\"` identifies a https://datatracker.ietf.org/doc/html/rfc7386 JSON merge patch.\n - `\"JSONPatch\"` identifies a https://datatracker.ietf.org/doc/html/rfc6902 JSON patch.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- Enum: []interface{}{"JSONMergePatch", "JSONPatch"},
- },
- },
- "patch": {
+ "workersUpgrades": {
SchemaProps: spec.SchemaProps{
- Description: "patch contains the patch which should be applied to the template. It must be of the corresponding PatchType.",
- Type: []string{"string"},
- Format: "byte",
+ Description: "workersUpgrades is the list of version upgrade steps for the workers. Each entry represents an intermediate version that must be applied in sequence.\n\nIn case the upgrade plan for workers will be left to empty, the system will automatically determine the minimal number of workers upgrade steps, thus minimizing impact on workloads and reducing the overall upgrade time.\n\nIf instead for any reason a custom upgrade path for workers is required, the following rules apply: - each version must be:\n - equal to FromControlPlaneKubernetesVersion or to one of the versions in the control plane upgrade plan.\n - greater than FromWorkersKubernetesVersion (or with a different build number)\n - greater than the previous version in the list (or with a different build number)\n - less or equal to the ToKubernetesVersion (or with a different build number)\n - in case of versions with the same major/minor/patch version but different build number, also the order\n of those versions must be the same for control plane and worker upgrade plan.\n - the last version in the plan must be equal to ToKubernetesVersion\n - the upgrade plane must have all the intermediate version which workers must go through to avoid breaking rules\n defining the max version skew between control plane and workers.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpgradeStep"),
+ },
+ },
+ },
},
},
},
- Required: []string{"uid", "patchType", "patch"},
+ Required: []string{"status"},
},
},
+ Dependencies: []string{
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpgradeStep"},
}
}
@@ -1871,6 +2865,216 @@ func schema_api_runtime_hooks_v1alpha1_MachinePoolBuiltins(ref common.ReferenceC
}
}
+func schema_api_runtime_hooks_v1alpha1_Patch(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "Patch is a single patch (JSONPatch or JSONMergePatch) which can include multiple operations.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "patchType": {
+ SchemaProps: spec.SchemaProps{
+ Description: "patchType JSONPatch or JSONMergePatch.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "patch": {
+ SchemaProps: spec.SchemaProps{
+ Description: "patch data for the target object.",
+ Type: []string{"string"},
+ Format: "byte",
+ },
+ },
+ },
+ Required: []string{"patchType", "patch"},
+ },
+ },
+ }
+}
+
+func schema_api_runtime_hooks_v1alpha1_UpdateMachineRequest(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "UpdateMachineRequest is the request of the UpdateMachine hook.",
+ 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: "",
+ },
+ },
+ "settings": {
+ SchemaProps: spec.SchemaProps{
+ Description: "settings defines key value pairs to be passed to the call.",
+ Type: []string{"object"},
+ AdditionalProperties: &spec.SchemaOrBool{
+ Allows: true,
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ },
+ },
+ "desired": {
+ SchemaProps: spec.SchemaProps{
+ Description: "desired contains the desired state of the Machine and related objects.",
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpdateMachineRequestObjects"),
+ },
+ },
+ },
+ Required: []string{"desired"},
+ },
+ },
+ Dependencies: []string{
+ "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.UpdateMachineRequestObjects"},
+ }
+}
+
+func schema_api_runtime_hooks_v1alpha1_UpdateMachineRequestObjects(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "UpdateMachineRequestObjects groups objects for UpdateMachineRequest.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "machine": {
+ SchemaProps: spec.SchemaProps{
+ Description: "machine is the full Machine object.",
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.Machine"),
+ },
+ },
+ "infrastructureMachine": {
+ SchemaProps: spec.SchemaProps{
+ Description: "infrastructureMachine is the infra Machine object.",
+ Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"),
+ },
+ },
+ "bootstrapConfig": {
+ SchemaProps: spec.SchemaProps{
+ Description: "bootstrapConfig is the bootstrap config object.",
+ Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"),
+ },
+ },
+ },
+ Required: []string{"machine", "infrastructureMachine"},
+ },
+ },
+ Dependencies: []string{
+ "k8s.io/apimachinery/pkg/runtime.RawExtension", "sigs.k8s.io/cluster-api/api/core/v1beta2.Machine"},
+ }
+}
+
+func schema_api_runtime_hooks_v1alpha1_UpdateMachineResponse(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "UpdateMachineResponse is the response of the UpdateMachine hook. The status of the update operation is determined by the CommonRetryResponse fields: - Status=Success + RetryAfterSeconds > 0: update is in progress - Status=Success + RetryAfterSeconds = 0: update completed successfully - Status=Failure: update failed",
+ 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: "",
+ },
+ },
+ "status": {
+ SchemaProps: spec.SchemaProps{
+ Description: "status of the call. One of \"Success\" or \"Failure\".\n\nPossible enum values:\n - `\"Failure\"` represents a failure response.\n - `\"Success\"` represents a success response.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ Enum: []interface{}{"Failure", "Success"},
+ },
+ },
+ "message": {
+ SchemaProps: spec.SchemaProps{
+ Description: "message is a human-readable description of the status of the call.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "retryAfterSeconds": {
+ SchemaProps: spec.SchemaProps{
+ Description: "retryAfterSeconds when set to a non-zero value signifies that the hook will be called again at a future time.",
+ Default: 0,
+ Type: []string{"integer"},
+ Format: "int32",
+ },
+ },
+ },
+ Required: []string{"status", "retryAfterSeconds"},
+ },
+ },
+ }
+}
+
+func schema_api_runtime_hooks_v1alpha1_UpgradeStep(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "UpgradeStep represents a single version upgrade step.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "version": {
+ SchemaProps: spec.SchemaProps{
+ Description: "version is the Kubernetes version for this upgrade step.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ Required: []string{"version"},
+ },
+ },
+ }
+}
+
+func schema_api_runtime_hooks_v1alpha1_UpgradeStepInfo(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "UpgradeStepInfo provide info about a single version upgrade step.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "version": {
+ SchemaProps: spec.SchemaProps{
+ Description: "version is the Kubernetes version for this upgrade step.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ Required: []string{"version"},
+ },
+ },
+ }
+}
+
func schema_api_runtime_hooks_v1alpha1_ValidateTopologyRequest(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml
index 13c7c3dfd2c4..2902ef5f8e90 100644
--- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml
+++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: kubeadmconfigs.bootstrap.cluster.x-k8s.io
spec:
group: bootstrap.cluster.x-k8s.io
@@ -641,9 +641,8 @@ spec:
a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -816,9 +815,8 @@ spec:
a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -1638,9 +1636,8 @@ spec:
a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -1815,9 +1812,8 @@ spec:
a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -2084,8 +2080,9 @@ spec:
in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2143,6 +2140,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount containing
+ the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -2298,8 +2332,9 @@ spec:
in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2357,6 +2392,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount containing
+ the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -2545,8 +2617,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2604,6 +2677,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount
+ containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -2778,8 +2888,9 @@ spec:
in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2837,6 +2948,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount containing
+ the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -3305,9 +3453,8 @@ spec:
a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -3706,9 +3853,8 @@ spec:
a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -4205,8 +4351,9 @@ spec:
in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -4264,6 +4411,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount containing
+ the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -4453,8 +4637,9 @@ spec:
in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -4512,6 +4697,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount containing
+ the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -4631,6 +4853,22 @@ spec:
minLength: 1
type: string
type: object
+ encryptionAlgorithm:
+ description: |-
+ encryptionAlgorithm holds the type of asymmetric encryption algorithm used for keys and certificates.
+ Can be one of "RSA-2048", "RSA-3072", "RSA-4096", "ECDSA-P256" or "ECDSA-P384".
+ For Kubernetes 1.34 or above, "ECDSA-P384" is supported.
+ If not specified, Cluster API will use RSA-2048 as default.
+ When this field is modified every certificate generated afterward will use the new
+ encryptionAlgorithm. Existing CA certificates and service account keys are not rotated.
+ This field is only supported with Kubernetes v1.31 or above.
+ enum:
+ - ECDSA-P256
+ - ECDSA-P384
+ - RSA-2048
+ - RSA-3072
+ - RSA-4096
+ type: string
etcd:
description: |-
etcd holds configuration for etcd.
@@ -4735,8 +4973,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -4794,6 +5033,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount
+ containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -4898,16 +5174,7 @@ spec:
imageRepository:
description: |-
imageRepository sets the container registry to pull images from.
- * If not set, the default registry of kubeadm will be used, i.e.
- * registry.k8s.io (new registry): >= v1.22.17, >= v1.23.15, >= v1.24.9, >= v1.25.0
- * k8s.gcr.io (old registry): all older versions
- Please note that when imageRepository is not set we don't allow upgrades to
- versions >= v1.22.0 which use the old registry (k8s.gcr.io). Please use
- a newer patch version with the new registry instead (i.e. >= v1.22.17,
- >= v1.23.15, >= v1.24.9, >= v1.25.0).
- * If the version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`)
- `gcr.io/k8s-staging-ci-images` will be used as a default for control plane components
- and for kube-proxy, while `registry.k8s.io` will be used for all the other images.
+ If not set, the default registry of kubeadm will be used (registry.k8s.io).
maxLength: 512
minLength: 1
type: string
@@ -4959,8 +5226,9 @@ spec:
in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -5018,6 +5286,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount containing
+ the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -5526,9 +5831,8 @@ spec:
a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -6008,9 +6312,8 @@ spec:
a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml
index 0c742aa7913a..6a458e6de99a 100644
--- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml
+++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: kubeadmconfigtemplates.bootstrap.cluster.x-k8s.io
spec:
group: bootstrap.cluster.x-k8s.io
@@ -661,9 +661,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at
+ which the taint was added.
format: date-time
type: string
value:
@@ -838,9 +837,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at
+ which the taint was added.
format: date-time
type: string
value:
@@ -1614,9 +1612,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at
+ which the taint was added.
format: date-time
type: string
value:
@@ -1794,9 +1791,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at
+ which the taint was added.
format: date-time
type: string
value:
@@ -2031,8 +2027,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2091,6 +2088,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -2251,8 +2285,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2311,6 +2346,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -2505,8 +2577,9 @@ spec:
variable present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2566,6 +2639,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -2744,8 +2854,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2804,6 +2915,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -3286,9 +3434,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at
+ which the taint was added.
format: date-time
type: string
value:
@@ -3695,9 +3842,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at
+ which the taint was added.
format: date-time
type: string
value:
@@ -4074,8 +4220,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -4134,6 +4281,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -4328,8 +4512,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -4388,6 +4573,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -4512,6 +4734,22 @@ spec:
minLength: 1
type: string
type: object
+ encryptionAlgorithm:
+ description: |-
+ encryptionAlgorithm holds the type of asymmetric encryption algorithm used for keys and certificates.
+ Can be one of "RSA-2048", "RSA-3072", "RSA-4096", "ECDSA-P256" or "ECDSA-P384".
+ For Kubernetes 1.34 or above, "ECDSA-P384" is supported.
+ If not specified, Cluster API will use RSA-2048 as default.
+ When this field is modified every certificate generated afterward will use the new
+ encryptionAlgorithm. Existing CA certificates and service account keys are not rotated.
+ This field is only supported with Kubernetes v1.31 or above.
+ enum:
+ - ECDSA-P256
+ - ECDSA-P384
+ - RSA-2048
+ - RSA-3072
+ - RSA-4096
+ type: string
etcd:
description: |-
etcd holds configuration for etcd.
@@ -4618,8 +4856,9 @@ spec:
variable present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -4679,6 +4918,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -4787,16 +5063,7 @@ spec:
imageRepository:
description: |-
imageRepository sets the container registry to pull images from.
- * If not set, the default registry of kubeadm will be used, i.e.
- * registry.k8s.io (new registry): >= v1.22.17, >= v1.23.15, >= v1.24.9, >= v1.25.0
- * k8s.gcr.io (old registry): all older versions
- Please note that when imageRepository is not set we don't allow upgrades to
- versions >= v1.22.0 which use the old registry (k8s.gcr.io). Please use
- a newer patch version with the new registry instead (i.e. >= v1.22.17,
- >= v1.23.15, >= v1.24.9, >= v1.25.0).
- * If the version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`)
- `gcr.io/k8s-staging-ci-images` will be used as a default for control plane components
- and for kube-proxy, while `registry.k8s.io` will be used for all the other images.
+ If not set, the default registry of kubeadm will be used (registry.k8s.io).
maxLength: 512
minLength: 1
type: string
@@ -4848,8 +5115,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -4908,6 +5176,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -5428,9 +5733,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at
+ which the taint was added.
format: date-time
type: string
value:
@@ -5917,9 +6221,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at
+ which the taint was added.
format: date-time
type: string
value:
diff --git a/bootstrap/kubeadm/config/manager/manager.yaml b/bootstrap/kubeadm/config/manager/manager.yaml
index d3bc3688efdb..e874de005b08 100644
--- a/bootstrap/kubeadm/config/manager/manager.yaml
+++ b/bootstrap/kubeadm/config/manager/manager.yaml
@@ -22,7 +22,7 @@ spec:
- "--leader-elect"
- "--diagnostics-address=${CAPI_DIAGNOSTICS_ADDRESS:=:8443}"
- "--insecure-diagnostics=${CAPI_INSECURE_DIAGNOSTICS:=false}"
- - "--feature-gates=MachinePool=${EXP_MACHINE_POOL:=true},KubeadmBootstrapFormatIgnition=${EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION:=false},PriorityQueue=${EXP_PRIORITY_QUEUE:=false}"
+ - "--feature-gates=MachinePool=${EXP_MACHINE_POOL:=true},KubeadmBootstrapFormatIgnition=${EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION:=false},PriorityQueue=${EXP_PRIORITY_QUEUE:=false},ReconcilerRateLimiting=${EXP_RECONCILER_RATE_LIMITING:=false}"
- "--bootstrap-token-ttl=${KUBEADM_BOOTSTRAP_TOKEN_TTL:=15m}"
image: controller:latest
name: manager
diff --git a/bootstrap/kubeadm/internal/builder/builders.go b/bootstrap/kubeadm/internal/builder/builders.go
index f123a69f57b2..7502538a4a88 100644
--- a/bootstrap/kubeadm/internal/builder/builders.go
+++ b/bootstrap/kubeadm/internal/builder/builders.go
@@ -67,16 +67,14 @@ func (k *KubeadmConfigBuilder) Unstructured() *unstructured.Unstructured {
if err != nil {
panic(err)
}
- return &unstructured.Unstructured{Object: rawMap}
+ u := &unstructured.Unstructured{Object: rawMap}
+ u.SetGroupVersionKind(bootstrapv1.GroupVersion.WithKind("KubeadmConfig"))
+ return u
}
// Build produces a KubeadmConfig from the variable in the KubeadmConfigBuilder.
func (k *KubeadmConfigBuilder) Build() *bootstrapv1.KubeadmConfig {
config := &bootstrapv1.KubeadmConfig{
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmConfig",
- APIVersion: bootstrapv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: k.namespace,
Name: k.name,
diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go
index 837e80b93ee1..d01545898b27 100644
--- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go
+++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go
@@ -37,7 +37,6 @@ import (
"k8s.io/klog/v2"
"k8s.io/utils/ptr"
ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/builder"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller"
"sigs.k8s.io/controller-runtime/pkg/handler"
@@ -53,6 +52,7 @@ import (
bsutil "sigs.k8s.io/cluster-api/bootstrap/util"
"sigs.k8s.io/cluster-api/controllers/clustercache"
"sigs.k8s.io/cluster-api/feature"
+ capicontrollerutil "sigs.k8s.io/cluster-api/internal/util/controller"
"sigs.k8s.io/cluster-api/internal/util/taints"
"sigs.k8s.io/cluster-api/util"
"sigs.k8s.io/cluster-api/util/conditions"
@@ -116,33 +116,26 @@ func (r *KubeadmConfigReconciler) SetupWithManager(ctx context.Context, mgr ctrl
}
predicateLog := ctrl.LoggerFrom(ctx).WithValues("controller", "kubeadmconfig")
- b := ctrl.NewControllerManagedBy(mgr).
+ b := capicontrollerutil.NewControllerManagedBy(mgr, predicateLog).
For(&bootstrapv1.KubeadmConfig{}).
WithOptions(options).
Watches(
&clusterv1.Machine{},
handler.EnqueueRequestsFromMapFunc(r.MachineToBootstrapMapFunc),
- builder.WithPredicates(predicates.ResourceIsChanged(mgr.GetScheme(), predicateLog)),
).WithEventFilter(predicates.ResourceHasFilterLabel(mgr.GetScheme(), predicateLog, r.WatchFilterValue))
if feature.Gates.Enabled(feature.MachinePool) {
b = b.Watches(
&clusterv1.MachinePool{},
handler.EnqueueRequestsFromMapFunc(r.MachinePoolToBootstrapMapFunc),
- builder.WithPredicates(predicates.ResourceIsChanged(mgr.GetScheme(), predicateLog)),
)
}
b = b.Watches(
&clusterv1.Cluster{},
handler.EnqueueRequestsFromMapFunc(r.ClusterToKubeadmConfigs),
- builder.WithPredicates(
- predicates.All(mgr.GetScheme(), predicateLog,
- predicates.ResourceIsChanged(mgr.GetScheme(), predicateLog),
- predicates.ClusterPausedTransitionsOrInfrastructureProvisioned(mgr.GetScheme(), predicateLog),
- predicates.ResourceHasFilterLabel(mgr.GetScheme(), predicateLog, r.WatchFilterValue),
- ),
- ),
+ predicates.ClusterPausedTransitionsOrInfrastructureProvisioned(mgr.GetScheme(), predicateLog),
+ predicates.ResourceHasFilterLabel(mgr.GetScheme(), predicateLog, r.WatchFilterValue),
).WatchesRawSource(r.ClusterCache.GetClusterSource("kubeadmconfig", r.ClusterToKubeadmConfigs))
if err := b.Complete(r); err != nil {
@@ -194,11 +187,6 @@ func (r *KubeadmConfigReconciler) Reconcile(ctx context.Context, req ctrl.Reques
// Lookup the cluster the config owner is associated with
cluster, err := util.GetClusterByName(ctx, r.Client, configOwner.GetNamespace(), configOwner.ClusterName())
if err != nil {
- if errors.Cause(err) == util.ErrNoCluster {
- log.Info(fmt.Sprintf("%s does not belong to a cluster yet, waiting until it's part of a cluster", configOwner.GetKind()))
- return ctrl.Result{}, nil
- }
-
if apierrors.IsNotFound(err) {
log.Info("Cluster does not exist yet, waiting until it is created")
return ctrl.Result{}, nil
@@ -273,12 +261,6 @@ func (r *KubeadmConfigReconciler) Reconcile(ctx context.Context, req ctrl.Reques
if err := patchHelper.Patch(ctx, config, patchOpts...); err != nil {
rerr = kerrors.NewAggregate([]error{rerr, err})
}
-
- // Note: controller-runtime logs a warning that non-empty result is ignored
- // if error is not nil, so setting result here to empty to avoid noisy warnings.
- if rerr != nil {
- retRes = ctrl.Result{}
- }
}()
// Ignore deleted KubeadmConfigs.
diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_reconciler_test.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_reconciler_test.go
index 8a39706461e8..d95517ab0260 100644
--- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_reconciler_test.go
+++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_reconciler_test.go
@@ -18,6 +18,7 @@ package controllers
import (
"testing"
+ "time"
. "github.com/onsi/gomega"
ctrl "sigs.k8s.io/controller-runtime"
@@ -61,7 +62,7 @@ func TestKubeadmConfigReconciler(t *testing.T) {
},
})
g.Expect(err).To(Succeed())
- g.Expect(result.Requeue).To(BeFalse())
+ g.Expect(result.RequeueAfter).To(Equal(time.Duration(0)))
})
})
}
diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_test.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_test.go
index 50c708c77b26..ca514f47cea6 100644
--- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_test.go
+++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_test.go
@@ -124,7 +124,6 @@ func TestKubeadmConfigReconciler_Reconcile_ReturnEarlyIfKubeadmConfigIsReady(t *
}
result, err := k.Reconcile(ctx, request)
g.Expect(err).ToNot(HaveOccurred())
- g.Expect(result.Requeue).To(BeFalse())
g.Expect(result.RequeueAfter).To(Equal(time.Duration(0)))
}
@@ -188,7 +187,7 @@ func TestKubeadmConfigReconciler_TestSecretOwnerReferenceReconciliation(t *testi
controllerOwner := metav1.GetControllerOf(actual)
g.Expect(controllerOwner).To(Not(BeNil()))
- g.Expect(controllerOwner.Kind).To(Equal(config.Kind))
+ g.Expect(controllerOwner.Kind).To(Equal("KubeadmConfig"))
g.Expect(controllerOwner.Name).To(Equal(config.Name))
})
@@ -200,7 +199,7 @@ func TestKubeadmConfigReconciler_TestSecretOwnerReferenceReconciliation(t *testi
controllerOwner := metav1.GetControllerOf(actual)
g.Expect(controllerOwner).To(Not(BeNil()))
- g.Expect(controllerOwner.Kind).To(Equal(config.Kind))
+ g.Expect(controllerOwner.Kind).To(Equal("KubeadmConfig"))
g.Expect(controllerOwner.Name).To(Equal(config.Name))
})
t.Run("non-KubeadmConfig controller OwnerReference is replaced", func(*testing.T) {
@@ -224,7 +223,7 @@ func TestKubeadmConfigReconciler_TestSecretOwnerReferenceReconciliation(t *testi
controllerOwner := metav1.GetControllerOf(actual)
g.Expect(controllerOwner).To(Not(BeNil()))
- g.Expect(controllerOwner.Kind).To(Equal(config.Kind))
+ g.Expect(controllerOwner.Kind).To(Equal("KubeadmConfig"))
g.Expect(controllerOwner.Name).To(Equal(config.Name))
})
}
@@ -297,7 +296,6 @@ func TestKubeadmConfigReconciler_Reconcile_ReturnEarlyIfMachineHasDataSecretName
actual := &bootstrapv1.KubeadmConfig{}
g.Expect(myclient.Get(ctx, client.ObjectKey{Namespace: config.Namespace, Name: config.Name}, actual)).To(Succeed())
g.Expect(err).ToNot(HaveOccurred())
- g.Expect(result.Requeue).To(BeFalse())
g.Expect(result.RequeueAfter).To(Equal(time.Duration(0)))
assertHasTrueCondition(g, myclient, request, bootstrapv1.KubeadmConfigDataSecretAvailableCondition)
}
@@ -476,7 +474,6 @@ func TestKubeadmConfigReconciler_Reconcile_RequeueJoiningNodesIfControlPlaneNotI
result, err := k.Reconcile(ctx, tc.request)
g.Expect(err).ToNot(HaveOccurred())
- g.Expect(result.Requeue).To(BeFalse())
g.Expect(result.RequeueAfter).To(Equal(30 * time.Second))
assertHasFalseCondition(g, myclient, tc.request, bootstrapv1.KubeadmConfigDataSecretAvailableCondition, bootstrapv1.KubeadmConfigDataSecretNotAvailableReason)
})
@@ -528,7 +525,6 @@ func TestKubeadmConfigReconciler_Reconcile_GenerateCloudConfigData(t *testing.T)
result, err := k.Reconcile(ctx, request)
g.Expect(err).ToNot(HaveOccurred())
- g.Expect(result.Requeue).To(BeFalse())
g.Expect(result.RequeueAfter).To(Equal(time.Duration(0)))
cfg, err := getKubeadmConfig(myclient, "control-plane-init-cfg", metav1.NamespaceDefault)
@@ -631,7 +627,6 @@ func TestKubeadmConfigReconciler_Reconcile_RequeueIfControlPlaneIsMissingAPIEndp
}
result, err := k.Reconcile(ctx, request)
g.Expect(err).ToNot(HaveOccurred())
- g.Expect(result.Requeue).To(BeFalse())
g.Expect(result.RequeueAfter).To(Equal(10 * time.Second))
actualConfig := &bootstrapv1.KubeadmConfig{}
@@ -709,7 +704,6 @@ func TestReconcileIfJoinCertificatesAvailableConditioninNodesAndControlPlaneIsRe
}
result, err := k.Reconcile(ctx, request)
g.Expect(err).ToNot(HaveOccurred())
- g.Expect(result.Requeue).To(BeFalse())
g.Expect(result.RequeueAfter).To(Equal(time.Duration(0)))
cfg, err := getKubeadmConfig(myclient, rt.configName, metav1.NamespaceDefault)
@@ -786,7 +780,6 @@ func TestReconcileIfJoinNodePoolsAndControlPlaneIsReady(t *testing.T) {
}
result, err := k.Reconcile(ctx, request)
g.Expect(err).ToNot(HaveOccurred())
- g.Expect(result.Requeue).To(BeFalse())
g.Expect(result.RequeueAfter).To(Equal(time.Duration(0)))
cfg, err := getKubeadmConfig(myclient, rt.configName, metav1.NamespaceDefault)
@@ -993,7 +986,6 @@ func TestKubeadmConfigSecretCreatedStatusNotPatched(t *testing.T) {
g.Expect(err).ToNot(HaveOccurred())
result, err := k.Reconcile(ctx, request)
g.Expect(err).ToNot(HaveOccurred())
- g.Expect(result.Requeue).To(BeFalse())
g.Expect(result.RequeueAfter).To(Equal(time.Duration(0)))
cfg, err := getKubeadmConfig(myclient, "worker-join-cfg", metav1.NamespaceDefault)
@@ -1236,7 +1228,6 @@ func TestBootstrapTokenTTLExtension(t *testing.T) {
} {
result, err := k.Reconcile(ctx, req)
g.Expect(err).ToNot(HaveOccurred())
- g.Expect(result.Requeue).To(BeFalse())
g.Expect(result.RequeueAfter).To(Equal(time.Duration(0)))
}
@@ -2085,7 +2076,6 @@ func TestKubeadmConfigReconciler_Reconcile_ExactlyOneControlPlaneMachineInitiali
}
result, err := k.Reconcile(ctx, request)
g.Expect(err).ToNot(HaveOccurred())
- g.Expect(result.Requeue).To(BeFalse())
g.Expect(result.RequeueAfter).To(Equal(time.Duration(0)))
request = ctrl.Request{
@@ -2096,7 +2086,6 @@ func TestKubeadmConfigReconciler_Reconcile_ExactlyOneControlPlaneMachineInitiali
}
result, err = k.Reconcile(ctx, request)
g.Expect(err).ToNot(HaveOccurred())
- g.Expect(result.Requeue).To(BeFalse())
g.Expect(result.RequeueAfter).To(Equal(30 * time.Second))
confList := &bootstrapv1.KubeadmConfigList{}
g.Expect(myclient.List(ctx, confList)).To(Succeed())
@@ -2151,7 +2140,6 @@ func TestKubeadmConfigReconciler_Reconcile_PatchWhenErrorOccurred(t *testing.T)
result, err := k.Reconcile(ctx, request)
g.Expect(err).To(HaveOccurred())
- g.Expect(result.Requeue).To(BeFalse())
g.Expect(result.RequeueAfter).To(Equal(time.Duration(0)))
cfg, err := getKubeadmConfig(myclient, "control-plane-init-cfg", metav1.NamespaceDefault)
@@ -2347,7 +2335,6 @@ contexts:
user: default
name: default
current-context: default
-preferences: {}
users:
- name: default
user:
diff --git a/bootstrap/kubeadm/types/upstreamv1beta3/conversion_test.go b/bootstrap/kubeadm/types/upstreamv1beta3/conversion_test.go
index c4fe0aba558b..ae1032b0254d 100644
--- a/bootstrap/kubeadm/types/upstreamv1beta3/conversion_test.go
+++ b/bootstrap/kubeadm/types/upstreamv1beta3/conversion_test.go
@@ -276,6 +276,7 @@ func hubClusterConfigurationFuzzer(obj *bootstrapv1.ClusterConfiguration, c rand
obj.CertificateValidityPeriodDays = 0
obj.CACertificateValidityPeriodDays = 0
+ obj.EncryptionAlgorithm = ""
for i, arg := range obj.APIServer.ExtraArgs {
if arg.Value == nil {
diff --git a/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go b/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go
index ea1aee4b6f8b..a0dadb029f93 100644
--- a/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go
+++ b/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go
@@ -399,6 +399,7 @@ func autoConvert_v1beta2_ClusterConfiguration_To_upstreamv1beta3_ClusterConfigur
out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates))
// WARNING: in.CertificateValidityPeriodDays requires manual conversion: does not exist in peer-type
// WARNING: in.CACertificateValidityPeriodDays requires manual conversion: does not exist in peer-type
+ // WARNING: in.EncryptionAlgorithm requires manual conversion: does not exist in peer-type
return nil
}
diff --git a/bootstrap/kubeadm/types/upstreamv1beta4/conversion.go b/bootstrap/kubeadm/types/upstreamv1beta4/conversion.go
index e730dac72b11..410d87c8e871 100644
--- a/bootstrap/kubeadm/types/upstreamv1beta4/conversion.go
+++ b/bootstrap/kubeadm/types/upstreamv1beta4/conversion.go
@@ -67,7 +67,6 @@ func (dst *JoinConfiguration) ConvertFrom(srcRaw conversion.Hub) error {
func Convert_upstreamv1beta4_ClusterConfiguration_To_v1beta2_ClusterConfiguration(in *ClusterConfiguration, out *bootstrapv1.ClusterConfiguration, s apimachineryconversion.Scope) error {
// Following fields do not exist in CABPK v1beta1 version:
// - Proxy (Not supported yet)
- // - EncryptionAlgorithm (Not supported yet)
if err := autoConvert_upstreamv1beta4_ClusterConfiguration_To_v1beta2_ClusterConfiguration(in, out, s); err != nil {
return err
}
diff --git a/bootstrap/kubeadm/types/upstreamv1beta4/conversion_test.go b/bootstrap/kubeadm/types/upstreamv1beta4/conversion_test.go
index 89e2143b8ff0..631d0af42c76 100644
--- a/bootstrap/kubeadm/types/upstreamv1beta4/conversion_test.go
+++ b/bootstrap/kubeadm/types/upstreamv1beta4/conversion_test.go
@@ -107,7 +107,6 @@ func spokeClusterConfigurationFuzzer(obj *ClusterConfiguration, c randfill.Conti
c.FillNoCustom(obj)
obj.Proxy = Proxy{}
- obj.EncryptionAlgorithm = ""
obj.CertificateValidityPeriod = ptr.To[metav1.Duration](metav1.Duration{Duration: time.Duration(c.Int31n(3*365)+1) * time.Hour * 24})
obj.CACertificateValidityPeriod = ptr.To[metav1.Duration](metav1.Duration{Duration: time.Duration(c.Int31n(100*365)+1) * time.Hour * 24})
diff --git a/bootstrap/kubeadm/types/upstreamv1beta4/zz_generated.conversion.go b/bootstrap/kubeadm/types/upstreamv1beta4/zz_generated.conversion.go
index b2f95bf2569f..5bb43af374a6 100644
--- a/bootstrap/kubeadm/types/upstreamv1beta4/zz_generated.conversion.go
+++ b/bootstrap/kubeadm/types/upstreamv1beta4/zz_generated.conversion.go
@@ -430,7 +430,7 @@ func autoConvert_upstreamv1beta4_ClusterConfiguration_To_v1beta2_ClusterConfigur
out.ImageRepository = in.ImageRepository
out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates))
// WARNING: in.ClusterName requires manual conversion: does not exist in peer-type
- // WARNING: in.EncryptionAlgorithm requires manual conversion: does not exist in peer-type
+ out.EncryptionAlgorithm = v1beta2.EncryptionAlgorithmType(in.EncryptionAlgorithm)
// WARNING: in.CertificateValidityPeriod requires manual conversion: does not exist in peer-type
// WARNING: in.CACertificateValidityPeriod requires manual conversion: does not exist in peer-type
return nil
@@ -458,6 +458,7 @@ func autoConvert_v1beta2_ClusterConfiguration_To_upstreamv1beta4_ClusterConfigur
out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates))
// WARNING: in.CertificateValidityPeriodDays requires manual conversion: does not exist in peer-type
// WARNING: in.CACertificateValidityPeriodDays requires manual conversion: does not exist in peer-type
+ out.EncryptionAlgorithm = EncryptionAlgorithmType(in.EncryptionAlgorithm)
return nil
}
diff --git a/bootstrap/util/configowner_test.go b/bootstrap/util/configowner_test.go
index a2dc6eaae90e..c2d157ed9ef2 100644
--- a/bootstrap/util/configowner_test.go
+++ b/bootstrap/util/configowner_test.go
@@ -187,10 +187,6 @@ func TestHasNodeRefs(t *testing.T) {
t.Run("should return false if there is no nodeRef", func(t *testing.T) {
g := NewWithT(t)
machine := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- APIVersion: clusterv1.GroupVersion.String(),
- Kind: "Machine",
- },
ObjectMeta: metav1.ObjectMeta{
Name: "machine-name",
Namespace: metav1.NamespaceDefault,
@@ -209,10 +205,6 @@ func TestHasNodeRefs(t *testing.T) {
t.Run("should return true if there is a nodeRef for Machine", func(t *testing.T) {
g := NewWithT(t)
machine := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- APIVersion: clusterv1.GroupVersion.String(),
- Kind: "Machine",
- },
ObjectMeta: metav1.ObjectMeta{
Name: "machine-name",
Namespace: metav1.NamespaceDefault,
@@ -242,10 +234,6 @@ func TestHasNodeRefs(t *testing.T) {
machinePools := []clusterv1.MachinePool{
{
// No replicas specified (default is 1). No nodeRefs either.
- TypeMeta: metav1.TypeMeta{
- APIVersion: clusterv1.GroupVersion.String(),
- Kind: "MachinePool",
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: metav1.NamespaceDefault,
Name: "machine-pool-name",
@@ -253,10 +241,6 @@ func TestHasNodeRefs(t *testing.T) {
},
{
// 1 replica but no nodeRefs
- TypeMeta: metav1.TypeMeta{
- APIVersion: clusterv1.GroupVersion.String(),
- Kind: "MachinePool",
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: metav1.NamespaceDefault,
Name: "machine-pool-name",
@@ -267,10 +251,6 @@ func TestHasNodeRefs(t *testing.T) {
},
{
// 2 replicas but only 1 nodeRef
- TypeMeta: metav1.TypeMeta{
- APIVersion: clusterv1.GroupVersion.String(),
- Kind: "MachinePool",
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: metav1.NamespaceDefault,
Name: "machine-pool-name",
@@ -308,10 +288,6 @@ func TestHasNodeRefs(t *testing.T) {
machinePools := []clusterv1.MachinePool{
{
// 1 replica (default) and 1 nodeRef
- TypeMeta: metav1.TypeMeta{
- APIVersion: clusterv1.GroupVersion.String(),
- Kind: "MachinePool",
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: metav1.NamespaceDefault,
Name: "machine-pool-name",
@@ -328,10 +304,6 @@ func TestHasNodeRefs(t *testing.T) {
},
{
// 2 replicas and nodeRefs
- TypeMeta: metav1.TypeMeta{
- APIVersion: clusterv1.GroupVersion.String(),
- Kind: "MachinePool",
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: metav1.NamespaceDefault,
Name: "machine-pool-name",
@@ -356,10 +328,6 @@ func TestHasNodeRefs(t *testing.T) {
},
{
// 0 replicas and 0 nodeRef
- TypeMeta: metav1.TypeMeta{
- APIVersion: clusterv1.GroupVersion.String(),
- Kind: "MachinePool",
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: metav1.NamespaceDefault,
Name: "machine-pool-name",
@@ -372,12 +340,11 @@ func TestHasNodeRefs(t *testing.T) {
for i := range machinePools {
content, err := runtime.DefaultUnstructuredConverter.ToUnstructured(&machinePools[i])
- if err != nil {
- g.Fail(err.Error())
- }
- unstructuredOwner := unstructured.Unstructured{}
+ g.Expect(err).ToNot(HaveOccurred())
+ unstructuredOwner := &unstructured.Unstructured{}
unstructuredOwner.SetUnstructuredContent(content)
- co := ConfigOwner{&unstructuredOwner}
+ unstructuredOwner.SetGroupVersionKind(clusterv1.GroupVersion.WithKind("MachinePool"))
+ co := ConfigOwner{unstructuredOwner}
result := co.HasNodeRefs()
g.Expect(result).To(BeTrue())
diff --git a/cmd/clusterctl/client/cluster/mover.go b/cmd/clusterctl/client/cluster/mover.go
index 08bf16d5a76b..51e42d86c487 100644
--- a/cmd/clusterctl/client/cluster/mover.go
+++ b/cmd/clusterctl/client/cluster/mover.go
@@ -21,6 +21,7 @@ import (
"fmt"
"os"
"path/filepath"
+ "strings"
"time"
"github.com/pkg/errors"
@@ -41,6 +42,7 @@ import (
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3"
logf "sigs.k8s.io/cluster-api/cmd/clusterctl/log"
+ "sigs.k8s.io/cluster-api/util/annotations"
"sigs.k8s.io/cluster-api/util/conditions"
"sigs.k8s.io/cluster-api/util/patch"
"sigs.k8s.io/cluster-api/util/yaml"
@@ -232,8 +234,7 @@ func (o *objectMover) checkProvisioningCompleted(ctx context.Context, graph *obj
// Checking all the clusters have infrastructure is ready
readClusterBackoff := newReadBackoff()
clusters := graph.getClusters()
- for i := range clusters {
- cluster := clusters[i]
+ for _, cluster := range clusters {
clusterObj := &clusterv1.Cluster{}
if err := retryWithExponentialBackoff(ctx, readClusterBackoff, func(ctx context.Context) error {
return getClusterObj(ctx, o.fromProxy, cluster, clusterObj)
@@ -297,6 +298,25 @@ func getClusterObj(ctx context.Context, proxy Proxy, cluster *node, clusterObj *
return nil
}
+// getClusterClassObj retrieves the clusterClassObj corresponding to a node with type ClusterClass.
+func getClusterClassObj(ctx context.Context, proxy Proxy, clusterClass *node, clusterClassObj *clusterv1.ClusterClass) error {
+ c, err := proxy.NewClient(ctx)
+ if err != nil {
+ return err
+ }
+
+ clusterClassObjKey := client.ObjectKey{
+ Namespace: clusterClass.identity.Namespace,
+ Name: clusterClass.identity.Name,
+ }
+
+ if err := c.Get(ctx, clusterClassObjKey, clusterClassObj); err != nil {
+ return errors.Wrapf(err, "error reading ClusterClass %s/%s",
+ clusterClass.identity.Namespace, clusterClass.identity.Name)
+ }
+ return nil
+}
+
// getMachineObj retrieves the machineObj corresponding to a node with type Machine.
func getMachineObj(ctx context.Context, proxy Proxy, machine *node, machineObj *clusterv1.Machine) error {
c, err := proxy.NewClient(ctx)
@@ -320,9 +340,17 @@ func (o *objectMover) move(ctx context.Context, graph *objectGraph, toProxy Prox
log := logf.Log
clusters := graph.getClusters()
+ if err := checkClustersNotPaused(ctx, o.fromProxy, clusters); err != nil {
+ return err
+ }
+
log.Info("Moving Cluster API objects", "Clusters", len(clusters))
clusterClasses := graph.getClusterClasses()
+ if err := checkClusterClassesNotPaused(ctx, o.fromProxy, clusterClasses); err != nil {
+ return err
+ }
+
log.Info("Moving Cluster API objects", "ClusterClasses", len(clusterClasses))
// Sets the pause field on the Cluster object in the source management cluster, so the controllers stop reconciling it.
@@ -395,9 +423,17 @@ func (o *objectMover) toDirectory(ctx context.Context, graph *objectGraph, direc
log := logf.Log
clusters := graph.getClusters()
+ if err := checkClustersNotPaused(ctx, o.fromProxy, clusters); err != nil {
+ return err
+ }
+
log.Info("Starting move of Cluster API objects", "Clusters", len(clusters))
clusterClasses := graph.getClusterClasses()
+ if err := checkClusterClassesNotPaused(ctx, o.fromProxy, clusterClasses); err != nil {
+ return err
+ }
+
log.Info("Moving Cluster API objects", "ClusterClasses", len(clusterClasses))
// Sets the pause field on the Cluster object in the source management cluster, so the controllers stop reconciling it.
@@ -570,8 +606,7 @@ func setClusterPause(ctx context.Context, proxy Proxy, clusters []*node, value b
patch := client.RawPatch(types.MergePatchType, []byte(fmt.Sprintf("{\"spec\":{\"paused\":%s}}", patchValue)))
setClusterPauseBackoff := newWriteBackoff()
- for i := range clusters {
- cluster := clusters[i]
+ for _, cluster := range clusters {
log.V(5).Info("Set Cluster.Spec.Paused", "paused", value, "Cluster", klog.KRef(cluster.identity.Namespace, cluster.identity.Name))
// Nb. The operation is wrapped in a retry loop to make setClusterPause more resilient to unexpected conditions.
@@ -593,8 +628,7 @@ func setClusterClassPause(ctx context.Context, proxy Proxy, clusterclasses []*no
log := logf.Log
setClusterClassPauseBackoff := newWriteBackoff()
- for i := range clusterclasses {
- clusterclass := clusterclasses[i]
+ for _, clusterclass := range clusterclasses {
if pause {
log.V(5).Info("Set Paused annotation", "ClusterClass", clusterclass.identity.Name, "Namespace", clusterclass.identity.Namespace)
} else {
@@ -611,6 +645,44 @@ func setClusterClassPause(ctx context.Context, proxy Proxy, clusterclasses []*no
return nil
}
+// checkClustersNotPaused checks that no cluster in the graph is paused before proceeding.
+func checkClustersNotPaused(ctx context.Context, proxy Proxy, clusters []*node) error {
+ paused := []string{}
+ for _, cluster := range clusters {
+ clusterObj := &clusterv1.Cluster{}
+ if err := getClusterObj(ctx, proxy, cluster, clusterObj); err != nil {
+ return err
+ }
+
+ if ptr.Deref(clusterObj.Spec.Paused, false) || annotations.HasPaused(clusterObj) {
+ paused = append(paused, fmt.Sprintf("%s/%s", clusterObj.Namespace, clusterObj.Name))
+ }
+ }
+ if len(paused) > 0 {
+ return errors.Errorf("cannot start operation while the following Clusters are paused: %s", strings.Join(paused, ", "))
+ }
+ return nil
+}
+
+// checkClusterClassesNotPaused checks that no clusterClass in the graph is paused before proceeding.
+func checkClusterClassesNotPaused(ctx context.Context, proxy Proxy, clusterClasses []*node) error {
+ paused := []string{}
+ for _, clusterClass := range clusterClasses {
+ clusterClassObj := &clusterv1.ClusterClass{}
+ if err := getClusterClassObj(ctx, proxy, clusterClass, clusterClassObj); err != nil {
+ return err
+ }
+
+ if annotations.HasPaused(clusterClassObj) {
+ paused = append(paused, fmt.Sprintf("%s/%s", clusterClassObj.Namespace, clusterClassObj.Name))
+ }
+ }
+ if len(paused) > 0 {
+ return errors.Errorf("cannot start operation while the following ClusterClasses are paused: %s", strings.Join(paused, ", "))
+ }
+ return nil
+}
+
func waitReadyForMove(ctx context.Context, proxy Proxy, nodes []*node, dryRun bool, backoff wait.Backoff) error {
if dryRun {
return nil
@@ -723,7 +795,8 @@ func pauseClusterClass(ctx context.Context, proxy Proxy, n *node, pause bool, mu
ObjectMeta: metav1.ObjectMeta{
Name: n.identity.Name,
Namespace: n.identity.Namespace,
- }}, mutators...)
+ },
+ }, mutators...)
if err != nil {
return err
}
@@ -1072,7 +1145,7 @@ func (o *objectMover) backupTargetObject(ctx context.Context, nodeToCreate *node
}
}
- err = os.WriteFile(objectFile, byObj, 0600)
+ err = os.WriteFile(objectFile, byObj, 0o600)
if err != nil {
return err
}
@@ -1173,7 +1246,6 @@ func (o *objectMover) deleteGroup(ctx context.Context, group moveGroup) error {
err := retryWithExponentialBackoff(ctx, deleteSourceObjectBackoff, func(ctx context.Context) error {
return o.deleteSourceObject(ctx, nodeToDelete)
})
-
if err != nil {
errList = append(errList, err)
}
diff --git a/cmd/clusterctl/client/cluster/mover_test.go b/cmd/clusterctl/client/cluster/mover_test.go
index e72793011c32..a7f48f29e2db 100644
--- a/cmd/clusterctl/client/cluster/mover_test.go
+++ b/cmd/clusterctl/client/cluster/mover_test.go
@@ -98,6 +98,40 @@ var moveTests = []struct {
},
wantErr: false,
},
+ {
+ name: "Paused Cluster",
+ fields: moveTestsFields{
+ objs: test.NewFakeCluster("ns1", "foo").WithPaused().Objs(),
+ },
+ wantMoveGroups: [][]string{
+ { // group 1
+ clusterv1.GroupVersion.String() + ", Kind=Cluster, ns1/foo",
+ },
+ { // group 2 (objects with ownerReferences in group 1)
+ // owned by Clusters
+ "/v1, Kind=Secret, ns1/foo-ca",
+ "/v1, Kind=Secret, ns1/foo-kubeconfig",
+ clusterv1.GroupVersionInfrastructure.String() + ", Kind=GenericInfrastructureCluster, ns1/foo",
+ },
+ },
+ wantErr: true,
+ },
+ {
+ name: "Paused ClusterClass",
+ fields: moveTestsFields{
+ objs: test.NewFakeClusterClass("ns1", "class1").WithPaused().Objs(),
+ },
+ wantMoveGroups: [][]string{
+ { // group 1
+ clusterv1.GroupVersion.String() + ", Kind=ClusterClass, ns1/class1",
+ },
+ { // group 2
+ clusterv1.GroupVersionInfrastructure.String() + ", Kind=GenericInfrastructureClusterTemplate, ns1/class1",
+ clusterv1.GroupVersionControlPlane.String() + ", Kind=GenericControlPlaneTemplate, ns1/class1",
+ },
+ },
+ wantErr: true,
+ },
{
name: "Cluster with cloud config secret with the force move label",
fields: moveTestsFields{
@@ -693,10 +727,10 @@ var backupRestoreTests = []struct {
objs: test.NewFakeCluster("ns1", "foo").Objs(),
},
files: map[string]string{
- "Cluster_ns1_foo.yaml": `{"apiVersion":"$CAPI","kind":"Cluster","metadata":{"creationTimestamp":null,"name":"foo","namespace":"ns1","resourceVersion":"999","uid":"$CAPI, Kind=Cluster, ns1/foo"},"spec":{"infrastructureRef":{"apiGroup":"$INFRA_GROUP","kind":"GenericInfrastructureCluster","name":"foo"}}}` + "\n",
- "Secret_ns1_foo-kubeconfig.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"foo-kubeconfig","namespace":"ns1","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"foo","uid":"$CAPI, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-kubeconfig"}}` + "\n",
- "Secret_ns1_foo-ca.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"foo-ca","namespace":"ns1","resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-ca"}}` + "\n",
- "GenericInfrastructureCluster_ns1_foo.yaml": `{"apiVersion":"$INFRA","kind":"GenericInfrastructureCluster","metadata":{"creationTimestamp":null,"labels":{"cluster.x-k8s.io/cluster-name":"foo"},"name":"foo","namespace":"ns1","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"foo","uid":"$CAPI, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"$INFRA, Kind=GenericInfrastructureCluster, ns1/foo"}}` + "\n",
+ "Cluster_ns1_foo.yaml": `{"apiVersion":"$CAPI","kind":"Cluster","metadata":{"name":"foo","namespace":"ns1","resourceVersion":"999","uid":"$CAPI, Kind=Cluster, ns1/foo"},"spec":{"infrastructureRef":{"apiGroup":"$INFRA_GROUP","kind":"GenericInfrastructureCluster","name":"foo"}}}` + "\n",
+ "Secret_ns1_foo-kubeconfig.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"name":"foo-kubeconfig","namespace":"ns1","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"foo","uid":"$CAPI, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-kubeconfig"}}` + "\n",
+ "Secret_ns1_foo-ca.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"name":"foo-ca","namespace":"ns1","resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-ca"}}` + "\n",
+ "GenericInfrastructureCluster_ns1_foo.yaml": `{"apiVersion":"$INFRA","kind":"GenericInfrastructureCluster","metadata":{"labels":{"cluster.x-k8s.io/cluster-name":"foo"},"name":"foo","namespace":"ns1","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"foo","uid":"$CAPI, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"$INFRA, Kind=GenericInfrastructureCluster, ns1/foo"}}` + "\n",
},
wantErr: false,
},
@@ -711,14 +745,14 @@ var backupRestoreTests = []struct {
}(),
},
files: map[string]string{
- "Cluster_ns1_foo.yaml": `{"apiVersion":"$CAPI","kind":"Cluster","metadata":{"creationTimestamp":null,"name":"foo","namespace":"ns1","resourceVersion":"999","uid":"$CAPI, Kind=Cluster, ns1/foo"},"spec":{"infrastructureRef":{"apiGroup":"$INFRA_GROUP","kind":"GenericInfrastructureCluster","name":"foo"}}}` + "\n",
- "Secret_ns1_foo-kubeconfig.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"foo-kubeconfig","namespace":"ns1","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"foo","uid":"$CAPI, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-kubeconfig"}}` + "\n",
- "Secret_ns1_foo-ca.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"foo-ca","namespace":"ns1","resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-ca"}}` + "\n",
- "GenericInfrastructureCluster_ns1_foo.yaml": `{"apiVersion":"$INFRA","kind":"GenericInfrastructureCluster","metadata":{"creationTimestamp":null,"labels":{"cluster.x-k8s.io/cluster-name":"foo"},"name":"foo","namespace":"ns1","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"foo","uid":"$CAPI, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"$INFRA, Kind=GenericInfrastructureCluster, ns1/foo"}}` + "\n",
- "Cluster_ns2_bar.yaml": `{"apiVersion":"$CAPI","kind":"Cluster","metadata":{"creationTimestamp":null,"name":"bar","namespace":"ns2","resourceVersion":"999","uid":"$CAPI, Kind=Cluster, ns2/bar"},"spec":{"infrastructureRef":{"apiGroup":"$INFRA_GROUP","kind":"GenericInfrastructureCluster","name":"bar"}}}` + "\n",
- "Secret_ns2_bar-kubeconfig.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"bar-kubeconfig","namespace":"ns2","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"bar","uid":"$CAPI, Kind=Cluster, ns2/bar"}],"resourceVersion":"999","uid":"/v1, Kind=Secret, ns2/bar-kubeconfig"}}` + "\n",
- "Secret_ns2_bar-ca.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"bar-ca","namespace":"ns2","resourceVersion":"999","uid":"/v1, Kind=Secret, ns2/bar-ca"}}` + "\n",
- "GenericInfrastructureCluster_ns2_bar.yaml": `{"apiVersion":"$INFRA","kind":"GenericInfrastructureCluster","metadata":{"creationTimestamp":null,"labels":{"cluster.x-k8s.io/cluster-name":"bar"},"name":"bar","namespace":"ns2","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"bar","uid":"$CAPI, Kind=Cluster, ns2/bar"}],"resourceVersion":"999","uid":"$INFRA, Kind=GenericInfrastructureCluster, ns2/bar"}}` + "\n",
+ "Cluster_ns1_foo.yaml": `{"apiVersion":"$CAPI","kind":"Cluster","metadata":{"name":"foo","namespace":"ns1","resourceVersion":"999","uid":"$CAPI, Kind=Cluster, ns1/foo"},"spec":{"infrastructureRef":{"apiGroup":"$INFRA_GROUP","kind":"GenericInfrastructureCluster","name":"foo"}}}` + "\n",
+ "Secret_ns1_foo-kubeconfig.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"name":"foo-kubeconfig","namespace":"ns1","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"foo","uid":"$CAPI, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-kubeconfig"}}` + "\n",
+ "Secret_ns1_foo-ca.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"name":"foo-ca","namespace":"ns1","resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-ca"}}` + "\n",
+ "GenericInfrastructureCluster_ns1_foo.yaml": `{"apiVersion":"$INFRA","kind":"GenericInfrastructureCluster","metadata":{"labels":{"cluster.x-k8s.io/cluster-name":"foo"},"name":"foo","namespace":"ns1","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"foo","uid":"$CAPI, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"$INFRA, Kind=GenericInfrastructureCluster, ns1/foo"}}` + "\n",
+ "Cluster_ns2_bar.yaml": `{"apiVersion":"$CAPI","kind":"Cluster","metadata":{"name":"bar","namespace":"ns2","resourceVersion":"999","uid":"$CAPI, Kind=Cluster, ns2/bar"},"spec":{"infrastructureRef":{"apiGroup":"$INFRA_GROUP","kind":"GenericInfrastructureCluster","name":"bar"}}}` + "\n",
+ "Secret_ns2_bar-kubeconfig.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"name":"bar-kubeconfig","namespace":"ns2","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"bar","uid":"$CAPI, Kind=Cluster, ns2/bar"}],"resourceVersion":"999","uid":"/v1, Kind=Secret, ns2/bar-kubeconfig"}}` + "\n",
+ "Secret_ns2_bar-ca.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"name":"bar-ca","namespace":"ns2","resourceVersion":"999","uid":"/v1, Kind=Secret, ns2/bar-ca"}}` + "\n",
+ "GenericInfrastructureCluster_ns2_bar.yaml": `{"apiVersion":"$INFRA","kind":"GenericInfrastructureCluster","metadata":{"labels":{"cluster.x-k8s.io/cluster-name":"bar"},"name":"bar","namespace":"ns2","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"bar","uid":"$CAPI, Kind=Cluster, ns2/bar"}],"resourceVersion":"999","uid":"$INFRA, Kind=GenericInfrastructureCluster, ns2/bar"}}` + "\n",
},
wantErr: false,
},
@@ -923,8 +957,29 @@ func Test_objectMover_restoreTargetObject(t *testing.T) {
}
func Test_objectMover_toDirectory(t *testing.T) {
- // NB. we are testing the move and move sequence using the same set of moveTests, but checking the results at different stages of the move process
- for _, tt := range backupRestoreTests {
+ tests := []struct {
+ name string
+ fields moveTestsFields
+ files map[string]string
+ wantErr bool
+ }{
+ {
+ name: "Cluster is paused",
+ fields: moveTestsFields{
+ objs: test.NewFakeCluster("ns1", "foo").WithPaused().Objs(),
+ },
+ wantErr: true,
+ },
+ {
+ name: "ClusterClass is paused",
+ fields: moveTestsFields{
+ objs: test.NewFakeClusterClass("ns1", "foo").WithPaused().Objs(),
+ },
+ wantErr: true,
+ },
+ }
+ tests = append(tests, backupRestoreTests...)
+ for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
g := NewWithT(t)
diff --git a/cmd/clusterctl/client/cluster/template.go b/cmd/clusterctl/client/cluster/template.go
index 872fd4eed6c2..1e4e32da9aa7 100644
--- a/cmd/clusterctl/client/cluster/template.go
+++ b/cmd/clusterctl/client/cluster/template.go
@@ -303,10 +303,12 @@ func getGitHubClient(ctx context.Context, configVariablesClient config.Variables
return github.NewClient(authenticatingHTTPClient), nil
}
+var errRateLimit = errors.New("rate limit for github api has been reached. Please wait one hour or get a personal API token and assign it to the GITHUB_TOKEN environment variable")
+
// handleGithubErr wraps error messages.
func handleGithubErr(err error, message string, args ...interface{}) error {
if _, ok := err.(*github.RateLimitError); ok {
- return errors.New("rate limit for github api has been reached. Please wait one hour or get a personal API token and assign it to the GITHUB_TOKEN environment variable")
+ return errRateLimit
}
return errors.Wrapf(err, message, args...)
}
diff --git a/cmd/clusterctl/client/cluster/template_test.go b/cmd/clusterctl/client/cluster/template_test.go
index c1042fafa9c5..fbeb6857b02e 100644
--- a/cmd/clusterctl/client/cluster/template_test.go
+++ b/cmd/clusterctl/client/cluster/template_test.go
@@ -29,6 +29,7 @@ import (
"github.com/google/go-github/v53/github"
. "github.com/onsi/gomega"
+ "github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -513,6 +514,43 @@ func Test_templateClient_GetFromURL(t *testing.T) {
}
}
+func Test_handleGithubErr(t *testing.T) {
+ tests := []struct {
+ name string
+ err error
+ message string
+ args []any
+ want error
+ }{
+ {
+ name: "Return error",
+ err: errors.New("error"),
+ message: "message %s and %s",
+ args: []any{"arg1", "arg2"},
+ want: fmt.Errorf("message arg1 and arg2: %w", errors.New("error")),
+ },
+ {
+ name: "Return RateLimitError",
+ err: &github.RateLimitError{
+ Response: &http.Response{
+ StatusCode: http.StatusForbidden,
+ },
+ },
+ message: "",
+ args: nil,
+ want: errRateLimit,
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+
+ got := handleGithubErr(tt.err, tt.message, tt.args...)
+ g.Expect(got.Error()).To(Equal(tt.want.Error()))
+ })
+ }
+}
+
func mustParseURL(rawURL string) *url.URL {
rURL, err := url.Parse(rawURL)
if err != nil {
diff --git a/cmd/clusterctl/client/cluster/upgrader_info_test.go b/cmd/clusterctl/client/cluster/upgrader_info_test.go
index d13138ae3111..9397a1b6d98a 100644
--- a/cmd/clusterctl/client/cluster/upgrader_info_test.go
+++ b/cmd/clusterctl/client/cluster/upgrader_info_test.go
@@ -491,10 +491,6 @@ func toSemanticVersions(versions []string) []version.Version {
func fakeProvider(name string, providerType clusterctlv1.ProviderType, version, targetNamespace string) clusterctlv1.Provider {
return clusterctlv1.Provider{
- TypeMeta: metav1.TypeMeta{
- APIVersion: clusterctlv1.GroupVersion.String(),
- Kind: "Provider",
- },
ObjectMeta: metav1.ObjectMeta{
ResourceVersion: "999",
Namespace: targetNamespace,
diff --git a/cmd/clusterctl/client/config/providers_client.go b/cmd/clusterctl/client/config/providers_client.go
index 4de55ec40454..8c4d00c243fe 100644
--- a/cmd/clusterctl/client/config/providers_client.go
+++ b/cmd/clusterctl/client/config/providers_client.go
@@ -73,6 +73,7 @@ const (
VultrProviderName = "vultr-vultr"
OpenNebulaProviderName = "opennebula"
ScalewayProviderName = "scaleway"
+ MetalStackProviderName = "metal-stack"
)
// Bootstrap providers.
@@ -97,6 +98,7 @@ const (
RKE2ControlPlaneProviderName = "rke2"
K0smotronControlPlaneProviderName = "k0sproject-k0smotron"
CanonicalKubernetesControlPlaneProviderName = "canonical-kubernetes"
+ HCPControlPlaneProviderName = "hosted-control-plane"
)
// IPAM providers.
@@ -341,6 +343,11 @@ func (p *providersClient) defaults() []Provider {
url: "https://github.com/scaleway/cluster-api-provider-scaleway/releases/latest/infrastructure-components.yaml",
providerType: clusterctlv1.InfrastructureProviderType,
},
+ &provider{
+ name: MetalStackProviderName,
+ url: "https://github.com/metal-stack/cluster-api-provider-metal-stack/releases/latest/infrastructure-components.yaml",
+ providerType: clusterctlv1.InfrastructureProviderType,
+ },
// Bootstrap providers
&provider{
@@ -425,6 +432,11 @@ func (p *providersClient) defaults() []Provider {
url: "https://github.com/canonical/cluster-api-k8s/releases/latest/control-plane-components.yaml",
providerType: clusterctlv1.ControlPlaneProviderType,
},
+ &provider{
+ name: HCPControlPlaneProviderName,
+ url: "https://github.com/teutonet/cluster-api-provider-hosted-control-plane/releases/latest/control-plane-components.yaml",
+ providerType: clusterctlv1.ControlPlaneProviderType,
+ },
// IPAM providers
&provider{
diff --git a/cmd/clusterctl/client/config_test.go b/cmd/clusterctl/client/config_test.go
index 1236c19f2efe..557271af405c 100644
--- a/cmd/clusterctl/client/config_test.go
+++ b/cmd/clusterctl/client/config_test.go
@@ -64,6 +64,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
config.RKE2BootstrapProviderName,
config.TalosBootstrapProviderName,
config.CanonicalKubernetesControlPlaneProviderName,
+ config.HCPControlPlaneProviderName,
config.K0smotronControlPlaneProviderName,
config.KamajiControlPlaneProviderName,
config.KubeadmControlPlaneProviderName,
@@ -91,6 +92,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
config.KubevirtProviderName,
config.LinodeProviderName,
config.MAASProviderName,
+ config.MetalStackProviderName,
config.Metal3ProviderName,
config.NestedProviderName,
config.NutanixProviderName,
@@ -134,6 +136,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
config.RKE2BootstrapProviderName,
config.TalosBootstrapProviderName,
config.CanonicalKubernetesControlPlaneProviderName,
+ config.HCPControlPlaneProviderName,
config.K0smotronControlPlaneProviderName,
config.KamajiControlPlaneProviderName,
config.KubeadmControlPlaneProviderName,
@@ -161,6 +164,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
config.KubevirtProviderName,
config.LinodeProviderName,
config.MAASProviderName,
+ config.MetalStackProviderName,
config.Metal3ProviderName,
config.NestedProviderName,
config.NutanixProviderName,
diff --git a/cmd/clusterctl/client/describe.go b/cmd/clusterctl/client/describe.go
index 03c77a287088..96b91d2102b1 100644
--- a/cmd/clusterctl/client/describe.go
+++ b/cmd/clusterctl/client/describe.go
@@ -35,7 +35,7 @@ type DescribeClusterOptions struct {
ClusterName string
// ShowOtherConditions is a list of comma separated kind or kind/name for which we should add the ShowObjectConditionsAnnotation
- // to signal to the presentation layer to show all the conditions for the objects.
+ // to signal to the presentation layer to show conditions for the objects.
ShowOtherConditions string
// ShowMachineSets instructs the discovery process to include machine sets in the ObjectTree.
diff --git a/cmd/clusterctl/client/repository/components_test.go b/cmd/clusterctl/client/repository/components_test.go
index 0035cbac1619..f86c70e58ce3 100644
--- a/cmd/clusterctl/client/repository/components_test.go
+++ b/cmd/clusterctl/client/repository/components_test.go
@@ -241,8 +241,7 @@ func Test_fixTargetNamespace(t *testing.T) {
"annotations": map[string]interface{}{
"cert-manager.io/inject-ca-from": "bar/capm3-serving-cert",
},
- "creationTimestamp": nil,
- "name": "capm3-mutating-webhook-configuration",
+ "name": "capm3-mutating-webhook-configuration",
},
"webhooks": []interface{}{
map[string]interface{}{
@@ -329,8 +328,7 @@ func Test_fixTargetNamespace(t *testing.T) {
"annotations": map[string]interface{}{
"cert-manager.io/inject-ca-from": "bar/capm3-serving-cert",
},
- "creationTimestamp": nil,
- "name": "capm3-mutating-webhook-configuration",
+ "name": "capm3-mutating-webhook-configuration",
},
"webhooks": []interface{}{
map[string]interface{}{
@@ -390,8 +388,7 @@ func Test_fixTargetNamespace(t *testing.T) {
"annotations": map[string]interface{}{
"cert-manager.io/inject-ca-from": "bar/capm3-serving-cert",
},
- "creationTimestamp": nil,
- "name": "aCoolName",
+ "name": "aCoolName",
},
"spec": map[string]interface{}{
"group": "",
@@ -491,8 +488,7 @@ func Test_fixTargetNamespace(t *testing.T) {
"annotations": map[string]interface{}{
"cert-manager.io/inject-ca-from": "bar/capm3-serving-cert",
},
- "creationTimestamp": nil,
- "name": "aCoolName",
+ "name": "aCoolName",
},
"spec": map[string]interface{}{
"group": "",
diff --git a/cmd/clusterctl/client/repository/repository_github.go b/cmd/clusterctl/client/repository/repository_github.go
index 16b828ef34ed..c44d92170028 100644
--- a/cmd/clusterctl/client/repository/repository_github.go
+++ b/cmd/clusterctl/client/repository/repository_github.go
@@ -50,7 +50,8 @@ const (
)
var (
- errNotFound = errors.New("404 Not Found")
+ errNotFound = errors.New("404 Not Found")
+ errRateLimit = errors.New("rate limit for github api has been reached. Please wait one hour or get a personal API token and assign it to the GITHUB_TOKEN environment variable")
// Caches used to limit the number of GitHub API calls.
@@ -319,7 +320,7 @@ func (g *gitHubRepository) getVersions(ctx context.Context) ([]string, error) {
if listReleasesErr != nil {
retryError = g.handleGithubErr(listReleasesErr, "failed to get the list of releases")
// Return immediately if we are rate limited.
- if _, ok := listReleasesErr.(*github.RateLimitError); ok {
+ if errors.Is(retryError, errRateLimit) {
return false, retryError
}
return false, nil
@@ -334,7 +335,7 @@ func (g *gitHubRepository) getVersions(ctx context.Context) ([]string, error) {
if listReleasesErr != nil {
retryError = g.handleGithubErr(listReleasesErr, "failed to get the list of releases")
// Return immediately if we are rate limited.
- if _, ok := listReleasesErr.(*github.RateLimitError); ok {
+ if errors.Is(retryError, errRateLimit) {
return false, retryError
}
return false, nil
@@ -384,7 +385,7 @@ func (g *gitHubRepository) getReleaseByTag(ctx context.Context, tag string) (*gi
return false, retryError
}
// Return immediately if we are rate limited.
- if _, ok := getReleasesErr.(*github.RateLimitError); ok {
+ if errors.Is(retryError, errRateLimit) {
return false, retryError
}
return false, nil
@@ -466,7 +467,7 @@ func (g *gitHubRepository) downloadFilesFromRelease(ctx context.Context, release
if downloadReleaseError != nil {
retryError = g.handleGithubErr(downloadReleaseError, "failed to download file %q from %q release", *release.TagName, fileName)
// Return immediately if we are rate limited.
- if _, ok := downloadReleaseError.(*github.RateLimitError); ok {
+ if errors.Is(retryError, errRateLimit) {
return false, retryError
}
return false, nil
@@ -500,12 +501,13 @@ func (g *gitHubRepository) downloadFilesFromRelease(ctx context.Context, release
// handleGithubErr wraps error messages.
func (g *gitHubRepository) handleGithubErr(err error, message string, args ...interface{}) error {
if _, ok := err.(*github.RateLimitError); ok {
- return errors.New("rate limit for github api has been reached. Please wait one hour or get a personal API token and assign it to the GITHUB_TOKEN environment variable")
+ return errRateLimit
}
- if ghErr, ok := err.(*github.ErrorResponse); ok {
- if ghErr.Response.StatusCode == http.StatusNotFound {
- return errNotFound
- }
+
+ var ghErr *github.ErrorResponse
+ if errors.As(err, &ghErr) && ghErr.Response.StatusCode == http.StatusNotFound {
+ return errNotFound
}
- return errors.Wrapf(err, message, args...)
+
+ return fmt.Errorf("%s: %w", fmt.Sprintf(message, args...), err)
}
diff --git a/cmd/clusterctl/client/repository/repository_github_test.go b/cmd/clusterctl/client/repository/repository_github_test.go
index 07eed06cc85e..ed689e9a8d4e 100644
--- a/cmd/clusterctl/client/repository/repository_github_test.go
+++ b/cmd/clusterctl/client/repository/repository_github_test.go
@@ -26,6 +26,7 @@ import (
"github.com/google/go-github/v53/github"
. "github.com/onsi/gomega"
+ "github.com/pkg/errors"
"k8s.io/utils/ptr"
clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3"
@@ -1108,3 +1109,54 @@ func Test_gitHubRepository_releaseNotFound(t *testing.T) {
})
}
}
+
+func Test_handleGithubErr(t *testing.T) {
+ tests := []struct {
+ name string
+ err error
+ message string
+ args []any
+ want error
+ }{
+ {
+ name: "Return error",
+ err: errors.New("error"),
+ message: "message %s and %s",
+ args: []any{"arg1", "arg2"},
+ want: fmt.Errorf("message arg1 and arg2: %w", errors.New("error")),
+ },
+ {
+ name: "Return RateLimitError",
+ err: &github.RateLimitError{
+ Response: &http.Response{
+ StatusCode: http.StatusForbidden,
+ },
+ },
+ message: "",
+ args: nil,
+ want: errRateLimit,
+ },
+ {
+ name: "Return ErrorResponse",
+ err: &github.ErrorResponse{
+ Response: &http.Response{
+ StatusCode: http.StatusNotFound,
+ },
+ },
+ message: "",
+ args: nil,
+ want: errNotFound,
+ },
+ }
+
+ gRepo := &gitHubRepository{}
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+
+ got := gRepo.handleGithubErr(tt.err, tt.message, tt.args...)
+ g.Expect(got.Error()).To(Equal(tt.want.Error()))
+ })
+ }
+}
diff --git a/cmd/clusterctl/client/tree/annotations.go b/cmd/clusterctl/client/tree/annotations.go
index b8c2fa88bc1c..b287a52156c4 100644
--- a/cmd/clusterctl/client/tree/annotations.go
+++ b/cmd/clusterctl/client/tree/annotations.go
@@ -23,7 +23,8 @@ import (
)
const (
- // ShowObjectConditionsAnnotation documents that the presentation layer should show all the conditions for the object.
+ // ShowObjectConditionsAnnotation documents that the presentation layer should show conditions for the object
+ // and the filter to select those conditions.
ShowObjectConditionsAnnotation = "tree.cluster.x-k8s.io.io/show-conditions"
// ObjectMetaNameAnnotation contains the meta name that should be used for the object in the presentation layer,
@@ -73,6 +74,26 @@ const (
ObjectZOrderAnnotation = "tree.cluster.x-k8s.io.io/z-order"
)
+// ConditionFilterType defines the type for condition filters.
+type ConditionFilterType string
+
+const (
+ // ShownNoConditions should be used when no conditions must be used for an object.
+ ShownNoConditions ConditionFilterType = ""
+
+ // ShowAllConditions should be used when all the conditions for an object must be shown.
+ ShowAllConditions ConditionFilterType = "All"
+
+ // ShowNonZeroConditions should be used when only non-zero conditions for an object must be shown.
+ // Non-zero conditions are conditions with a message set or with status different from the normal state
+ // for a given condition polarity (e.g. for positive polarity normal state is True, so the non-zero
+ // status are Unknown and False).
+ ShowNonZeroConditions ConditionFilterType = "NonZero"
+)
+
+// ShowNonZeroConditionsSuffix defines the suffix to be used when the ShowNonZeroConditions filter should be applied.
+const ShowNonZeroConditionsSuffix = "+"
+
// GetMetaName returns the object meta name that should be used for the object in the presentation layer, if defined.
func GetMetaName(obj client.Object) string {
if val, ok := getAnnotation(obj, ObjectMetaNameAnnotation); ok {
@@ -181,12 +202,22 @@ func IsVirtualObject(obj client.Object) bool {
return false
}
-// IsShowConditionsObject returns true if the presentation layer should show all the conditions for the object.
-func IsShowConditionsObject(obj client.Object) bool {
- if val, ok := getBoolAnnotation(obj, ShowObjectConditionsAnnotation); ok {
- return val
+// ShowConditionsFilter returns the filter to be used by the presentation layer when showing conditions
+// for an object.
+func ShowConditionsFilter(obj client.Object) ConditionFilterType {
+ switch val, _ := getAnnotation(obj, ShowObjectConditionsAnnotation); val {
+ case "All":
+ return ShowAllConditions
+ case "NonZero":
+ return ShowNonZeroConditions
}
- return false
+ return ShownNoConditions
+}
+
+// IsShowConditionsObject returns true if the presentation layer should show all the conditions for the object
+// or a subset of them.
+func IsShowConditionsObject(obj client.Object) bool {
+ return ShowConditionsFilter(obj) != ShownNoConditions
}
func getAnnotation(obj client.Object, annotation string) (string, bool) {
diff --git a/cmd/clusterctl/client/tree/discovery.go b/cmd/clusterctl/client/tree/discovery.go
index d8ae0aaf6b71..bc49f4df225f 100644
--- a/cmd/clusterctl/client/tree/discovery.go
+++ b/cmd/clusterctl/client/tree/discovery.go
@@ -19,9 +19,11 @@ package tree
import (
"context"
+ "github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+ "k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/client"
addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2"
@@ -34,7 +36,7 @@ import (
// DiscoverOptions define options for the discovery process.
type DiscoverOptions struct {
// ShowOtherConditions is a list of comma separated kind or kind/name for which we should add the ShowObjectConditionsAnnotation
- // to signal to the presentation layer to show all the conditions for the objects.
+ // to signal to the presentation layer to show conditions for the objects.
ShowOtherConditions string
// ShowMachineSets instructs the discovery process to include machine sets in the ObjectTree.
@@ -110,7 +112,9 @@ func Discovery(ctx context.Context, c client.Client, namespace, name string, opt
addAnnotation(controlPlane, ObjectContractAnnotation, "ControlPlane")
addAnnotation(controlPlane, ObjectContractVersionAnnotation, contractVersion)
- addControlPlane(cluster, controlPlane, tree, options)
+ if err := addControlPlane(ctx, c, cluster, controlPlane, tree, options); err != nil {
+ return nil, err
+ }
}
// Adds control plane machines.
@@ -120,7 +124,7 @@ func Discovery(ctx context.Context, c client.Client, namespace, name string, opt
}
machineMap := map[string]bool{}
addMachineFunc := func(parent client.Object, m *clusterv1.Machine) {
- _, visible := tree.Add(parent, m)
+ _, visible := tree.Add(parent, m, GroupVersionKind(clusterv1.GroupVersion.WithKind("Machine")))
machineMap[m.Name] = true
if visible {
@@ -204,30 +208,51 @@ func addClusterResourceSetsToObjectTree(ctx context.Context, c client.Client, cl
}
}
-func addControlPlane(cluster *clusterv1.Cluster, controlPlane *unstructured.Unstructured, tree *ObjectTree, options DiscoverOptions) {
+func addControlPlane(ctx context.Context, c client.Client, cluster *clusterv1.Cluster, controlPlane *unstructured.Unstructured, tree *ObjectTree, options DiscoverOptions) error {
tree.Add(cluster, controlPlane, ObjectMetaName("ControlPlane"), GroupingObject(true))
if options.ShowTemplates {
// Add control plane infrastructure ref using spec fields guaranteed in contract
- infrastructureRef, found, err := unstructured.NestedMap(controlPlane.UnstructuredContent(), "spec", "machineTemplate", "infrastructureRef")
- if err == nil && found {
- infrastructureObjectRef := &corev1.ObjectReference{
- Kind: infrastructureRef["kind"].(string),
- Namespace: infrastructureRef["namespace"].(string),
- Name: infrastructureRef["name"].(string),
- APIVersion: infrastructureRef["apiVersion"].(string),
- }
+ contractVersion, err := contract.GetContractVersionForVersion(ctx, c, controlPlane.GroupVersionKind().GroupKind(), controlPlane.GroupVersionKind().Version)
+ if err != nil {
+ return errors.Wrapf(err, "failed to get contract version for the ControlPlane object")
+ }
- machineTemplateRefObject := ObjectReferenceObject(infrastructureObjectRef)
- var templateParent client.Object
- if options.AddTemplateVirtualNode {
- templateParent = addTemplateVirtualNode(tree, controlPlane, cluster.Namespace)
- } else {
- templateParent = controlPlane
+ var infrastructureObjectRef *corev1.ObjectReference
+ if contractVersion == "v1beta1" {
+ currentRef, err := contract.ControlPlane().MachineTemplate().InfrastructureV1Beta1Ref().Get(controlPlane)
+ if err != nil {
+ return nil //nolint:nilerr // intentionally ignoring the error here because infraRef in CP is optional
}
- tree.Add(templateParent, machineTemplateRefObject, ObjectMetaName("MachineInfrastructureTemplate"))
+ infrastructureObjectRef = currentRef
+ } else {
+ currentRef, err := contract.ControlPlane().MachineTemplate().InfrastructureRef().Get(controlPlane)
+ if err != nil {
+ return nil //nolint:nilerr // intentionally ignoring the error here because infraRef in CP is optional
+ }
+ apiVersion, err := contract.GetAPIVersion(ctx, c, currentRef.GroupKind())
+ if err != nil {
+ return err
+ }
+ infrastructureObjectRef = &corev1.ObjectReference{
+ APIVersion: apiVersion,
+ Kind: currentRef.Kind,
+ Namespace: controlPlane.GetNamespace(),
+ Name: currentRef.Name,
+ }
+ }
+
+ machineTemplateRefObject := ObjectReferenceObject(infrastructureObjectRef)
+ var templateParent client.Object
+ if options.AddTemplateVirtualNode {
+ templateParent = addTemplateVirtualNode(tree, controlPlane, cluster.Namespace)
+ } else {
+ templateParent = controlPlane
}
+ tree.Add(templateParent, machineTemplateRefObject, ObjectMetaName("MachineInfrastructureTemplate"))
}
+
+ return nil
}
func addMachineDeploymentToObjectTree(ctx context.Context, c client.Client, cluster *clusterv1.Cluster, workers *NodeObject, machinesList *clusterv1.MachineList, tree *ObjectTree, options DiscoverOptions, addMachineFunc func(parent client.Object, m *clusterv1.Machine)) error {
@@ -248,6 +273,7 @@ func addMachineDeploymentToObjectTree(ctx context.Context, c client.Client, clus
if !options.ShowMachineSets {
addOpts = append(addOpts, GroupingObject(true))
}
+ addOpts = append(addOpts, GroupVersionKind(clusterv1.GroupVersion.WithKind("MachineDeployment")))
tree.Add(workers, md, addOpts...)
if options.ShowTemplates {
@@ -286,17 +312,17 @@ func addMachineDeploymentToObjectTree(ctx context.Context, c client.Client, clus
tree.Add(templateParent, machineTemplateRefObject, ObjectMetaName("MachineInfrastructureTemplate"))
}
- machineSets := selectMachinesSetsControlledBy(machineSetList, md)
+ machineSets := selectMachinesSetsControlledBy(machineSetList, md, clusterv1.GroupVersion.WithKind("MachineDeployment").GroupKind())
for i := range machineSets {
ms := machineSets[i]
var parent client.Object = md
if options.ShowMachineSets {
- tree.Add(md, ms, GroupingObject(true))
+ tree.Add(md, ms, GroupingObject(true), GroupVersionKind(clusterv1.GroupVersion.WithKind("MachineSet")))
parent = ms
}
- machines := selectMachinesControlledBy(machinesList, ms)
+ machines := selectMachinesControlledBy(machinesList, ms, clusterv1.GroupVersion.WithKind("MachineSet").GroupKind())
for _, w := range machines {
addMachineFunc(parent, w)
}
@@ -309,7 +335,7 @@ func addMachineDeploymentToObjectTree(ctx context.Context, c client.Client, clus
func addMachinePoolsToObjectTree(ctx context.Context, c client.Client, workers *NodeObject, machinePoolList *clusterv1.MachinePoolList, machinesList *clusterv1.MachineList, tree *ObjectTree, addMachineFunc func(parent client.Object, m *clusterv1.Machine)) {
for i := range machinePoolList.Items {
mp := &machinePoolList.Items[i]
- _, visible := tree.Add(workers, mp, GroupingObject(true))
+ _, visible := tree.Add(workers, mp, GroupingObject(true), GroupVersionKind(clusterv1.GroupVersion.WithKind("MachinePool")))
if visible {
if machinePoolBootstrap, err := external.GetObjectFromContractVersionedRef(ctx, c, mp.Spec.Template.Spec.Bootstrap.ConfigRef, mp.Namespace); err == nil {
@@ -321,7 +347,7 @@ func addMachinePoolsToObjectTree(ctx context.Context, c client.Client, workers *
}
}
- machines := selectMachinesControlledBy(machinesList, mp)
+ machines := selectMachinesControlledBy(machinesList, mp, clusterv1.GroupVersion.WithKind("MachinePool").GroupKind())
for _, m := range machines {
addMachineFunc(mp, m)
}
@@ -417,22 +443,22 @@ func selectControlPlaneMachines(machineList *clusterv1.MachineList) []*clusterv1
return machines
}
-func selectMachinesSetsControlledBy(machineSetList *clusterv1.MachineSetList, controller client.Object) []*clusterv1.MachineSet {
+func selectMachinesSetsControlledBy(machineSetList *clusterv1.MachineSetList, controller client.Object, controllerGK schema.GroupKind) []*clusterv1.MachineSet {
machineSets := []*clusterv1.MachineSet{}
for i := range machineSetList.Items {
m := &machineSetList.Items[i]
- if util.IsControlledBy(m, controller) {
+ if util.IsControlledBy(m, controller, controllerGK) {
machineSets = append(machineSets, m)
}
}
return machineSets
}
-func selectMachinesControlledBy(machineList *clusterv1.MachineList, controller client.Object) []*clusterv1.Machine {
+func selectMachinesControlledBy(machineList *clusterv1.MachineList, controller client.Object, controllerGK schema.GroupKind) []*clusterv1.Machine {
machines := []*clusterv1.Machine{}
for i := range machineList.Items {
m := &machineList.Items[i]
- if util.IsControlledBy(m, controller) {
+ if util.IsControlledBy(m, controller, controllerGK) {
machines = append(machines, m)
}
}
diff --git a/cmd/clusterctl/client/tree/options.go b/cmd/clusterctl/client/tree/options.go
index cb52a426d2b3..7e898d6329f6 100644
--- a/cmd/clusterctl/client/tree/options.go
+++ b/cmd/clusterctl/client/tree/options.go
@@ -16,16 +16,22 @@ limitations under the License.
package tree
+import (
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/utils/ptr"
+)
+
// AddObjectOption define an option for the ObjectTree Add operation.
type AddObjectOption interface {
ApplyToAdd(*addObjectOptions)
}
type addObjectOptions struct {
- MetaName string
- GroupingObject bool
- NoEcho bool
- ZOrder int
+ GroupVersionKind *schema.GroupVersionKind
+ MetaName string
+ GroupingObject bool
+ NoEcho bool
+ ZOrder int
}
func (o *addObjectOptions) ApplyOptions(opts []AddObjectOption) *addObjectOptions {
@@ -35,6 +41,16 @@ func (o *addObjectOptions) ApplyOptions(opts []AddObjectOption) *addObjectOption
return o
}
+// GroupVersionKind is the gvk to set on the passed in obj.
+// This option has to be used if obj is a typed object and
+// it cannot be guaranteed that gvk is set.
+type GroupVersionKind schema.GroupVersionKind
+
+// ApplyToAdd applies the given options.
+func (n GroupVersionKind) ApplyToAdd(options *addObjectOptions) {
+ options.GroupVersionKind = ptr.To(schema.GroupVersionKind(n))
+}
+
// The ObjectMetaName option defines the meta name that should be used for the object in the presentation layer,
// e.g. control plane for KCP.
type ObjectMetaName string
diff --git a/cmd/clusterctl/client/tree/tree.go b/cmd/clusterctl/client/tree/tree.go
index 13cbc3140b64..4de695c1bf08 100644
--- a/cmd/clusterctl/client/tree/tree.go
+++ b/cmd/clusterctl/client/tree/tree.go
@@ -34,7 +34,7 @@ import (
// ObjectTreeOptions defines the options for an ObjectTree.
type ObjectTreeOptions struct {
// ShowOtherConditions is a list of comma separated kind or kind/name for which we should add the ShowObjectConditionsAnnotation
- // to signal to the presentation layer to show all the conditions for the objects.
+ // to signal to the presentation layer to show the conditions for the objects and also which filter to apply.
ShowOtherConditions string
// ShowMachineSets instructs the discovery process to include machine sets in the ObjectTree.
@@ -74,11 +74,9 @@ type ObjectTree struct {
// NewObjectTree creates a new object tree with the given root and options.
func NewObjectTree(root client.Object, options ObjectTreeOptions) *ObjectTree {
- // If it is requested to show all the conditions for the root, add
+ // If it is requested to show conditions for the root, add
// the ShowObjectConditionsAnnotation to signal this to the presentation layer.
- if isObjDebug(root, options.ShowOtherConditions) {
- addAnnotation(root, ShowObjectConditionsAnnotation, "True")
- }
+ addAnnotation(root, ShowObjectConditionsAnnotation, string(showConditions(root, options.ShowOtherConditions)))
return &ObjectTree{
root: root,
@@ -97,6 +95,10 @@ func (od ObjectTree) Add(parent, obj client.Object, opts ...AddObjectOption) (ad
addOpts := &addObjectOptions{}
addOpts.ApplyOptions(opts)
+ if addOpts.GroupVersionKind != nil {
+ obj.GetObjectKind().SetGroupVersionKind(*addOpts.GroupVersionKind)
+ }
+
// Get a small set of conditions that will be used to determine e.g. when grouping or when an object is just an echo of
// its parent.
var objReadyV1Beta1, parentReadyV1Beta1 *clusterv1.Condition
@@ -112,11 +114,9 @@ func (od ObjectTree) Add(parent, obj client.Object, opts ...AddObjectOption) (ad
parentReady = GetReadyCondition(parent)
}
- // If it is requested to show all the conditions for the object, add
+ // If it is requested to show conditions for the object, add
// the ShowObjectConditionsAnnotation to signal this to the presentation layer.
- if isObjDebug(obj, od.options.ShowOtherConditions) {
- addAnnotation(obj, ShowObjectConditionsAnnotation, "True")
- }
+ addAnnotation(obj, ShowObjectConditionsAnnotation, string(showConditions(obj, od.options.ShowOtherConditions)))
// If echo should be dropped from the ObjectTree, return if the object's ready condition is true, and it is the same it has of parent's object ready condition (it is an echo).
// Note: the Echo option applies only for infrastructure machine or bootstrap config objects, and for those objects only Ready condition makes sense.
@@ -493,28 +493,36 @@ func updateV1Beta1GroupNode(groupObj client.Object, groupReady *clusterv1.Condit
}
}
-func isObjDebug(obj client.Object, debugFilter string) bool {
- if debugFilter == "" {
- return false
+func showConditions(obj client.Object, showOtherConditions string) ConditionFilterType {
+ if showOtherConditions == "" {
+ return ShownNoConditions
}
- for _, filter := range strings.Split(strings.ToLower(debugFilter), ",") {
- filter = strings.TrimSpace(filter)
+ for _, filter := range strings.Split(showOtherConditions, ",") {
if filter == "" {
continue
}
- if strings.EqualFold(filter, "all") {
- return true
+ if strings.EqualFold("all", strings.TrimSuffix(filter, ShowNonZeroConditionsSuffix)) {
+ if strings.HasSuffix(filter, ShowNonZeroConditionsSuffix) {
+ return ShowNonZeroConditions
+ }
+ return ShowAllConditions
}
kn := strings.Split(filter, "/")
if len(kn) == 2 {
- if strings.ToLower(obj.GetObjectKind().GroupVersionKind().Kind) == kn[0] && obj.GetName() == kn[1] {
- return true
+ if strings.EqualFold(obj.GetObjectKind().GroupVersionKind().Kind, kn[0]) && strings.EqualFold(obj.GetName(), strings.TrimSuffix(kn[1], ShowNonZeroConditionsSuffix)) {
+ if strings.HasSuffix(kn[1], ShowNonZeroConditionsSuffix) {
+ return ShowNonZeroConditions
+ }
+ return ShowAllConditions
}
continue
}
- if strings.ToLower(obj.GetObjectKind().GroupVersionKind().Kind) == kn[0] {
- return true
+ if strings.EqualFold(obj.GetObjectKind().GroupVersionKind().Kind, strings.TrimSuffix(kn[0], ShowNonZeroConditionsSuffix)) {
+ if strings.HasSuffix(kn[0], ShowNonZeroConditionsSuffix) {
+ return ShowNonZeroConditions
+ }
+ return ShowAllConditions
}
}
- return false
+ return ShownNoConditions
}
diff --git a/cmd/clusterctl/client/tree/tree_test.go b/cmd/clusterctl/client/tree/tree_test.go
index c9195e4155bc..f58f82683766 100644
--- a/cmd/clusterctl/client/tree/tree_test.go
+++ b/cmd/clusterctl/client/tree/tree_test.go
@@ -438,7 +438,7 @@ func Test_minLastTransitionTimeV1Beta1(t *testing.T) {
}
}
-func Test_isObjDebug(t *testing.T) {
+func Test_showConditions(t *testing.T) {
obj := fakeMachine("my-machine")
type args struct {
filter string
@@ -446,56 +446,77 @@ func Test_isObjDebug(t *testing.T) {
tests := []struct {
name string
args args
- want bool
+ want ConditionFilterType
}{
{
- name: "empty filter should return false",
+ name: "empty filter should return empty string",
args: args{
filter: "",
},
- want: false,
+ want: ShownNoConditions,
},
{
- name: "all filter should return true",
+ name: "all filter should return All",
args: args{
filter: "all",
},
- want: true,
+ want: ShowAllConditions,
},
{
- name: "kind filter should return true",
+ name: "kind filter should return All",
args: args{
filter: "Machine",
},
- want: true,
+ want: ShowAllConditions,
},
{
- name: "another kind filter should return false",
+ name: "another kind filter should return empty string",
args: args{
filter: "AnotherKind",
},
- want: false,
+ want: ShownNoConditions,
},
{
- name: "kind/name filter should return true",
+ name: "kind/name filter should return All",
args: args{
filter: "Machine/my-machine",
},
- want: true,
+ want: ShowAllConditions,
},
{
- name: "kind/wrong name filter should return false",
+ name: "kind/wrong name filter should return empty string",
args: args{
filter: "Cluster/another-cluster",
},
- want: false,
+ want: ShownNoConditions,
+ },
+ {
+ name: "all! filter should return NonZero",
+ args: args{
+ filter: "all" + ShowNonZeroConditionsSuffix,
+ },
+ want: ShowNonZeroConditions,
+ },
+ {
+ name: "kind! filter should return NonZero",
+ args: args{
+ filter: "Machine" + ShowNonZeroConditionsSuffix,
+ },
+ want: ShowNonZeroConditions,
+ },
+ {
+ name: "kind/name filter should return NonZero",
+ args: args{
+ filter: "Machine/my-machine" + ShowNonZeroConditionsSuffix,
+ },
+ want: ShowNonZeroConditions,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
g := NewWithT(t)
- got := isObjDebug(obj, tt.args.filter)
+ got := showConditions(obj, tt.args.filter)
g.Expect(got).To(Equal(tt.want))
})
}
@@ -842,21 +863,28 @@ func Test_Add_setsShowObjectConditionsAnnotation(t *testing.T) {
tests := []struct {
name string
args args
- want bool
+ want string
}{
{
- name: "filter selecting my machine should not add the annotation",
+ name: "filter selecting my machine should add the annotation with All",
args: args{
treeOptions: ObjectTreeOptions{ShowOtherConditions: "all"},
},
- want: true,
+ want: "All",
},
{
- name: "filter not selecting my machine should not add the annotation",
+ name: "filter selecting my machine should add the annotation with NonZero",
+ args: args{
+ treeOptions: ObjectTreeOptions{ShowOtherConditions: "all" + ShowNonZeroConditionsSuffix},
+ },
+ want: "NonZero",
+ },
+ {
+ name: "filter not selecting my machine should add the annotation with empty value",
args: args{
treeOptions: ObjectTreeOptions{ShowOtherConditions: ""},
},
- want: false,
+ want: "",
},
}
for _, tt := range tests {
@@ -874,13 +902,7 @@ func Test_Add_setsShowObjectConditionsAnnotation(t *testing.T) {
gotObj := tree.GetObject("my-machine")
g.Expect(gotObj).ToNot(BeNil())
- switch tt.want {
- case true:
- g.Expect(gotObj.GetAnnotations()).To(HaveKey(ShowObjectConditionsAnnotation))
- g.Expect(gotObj.GetAnnotations()[ShowObjectConditionsAnnotation]).To(Equal("True"))
- case false:
- g.Expect(gotObj.GetAnnotations()).ToNot(HaveKey(ShowObjectConditionsAnnotation))
- }
+ g.Expect(gotObj.GetAnnotations()).To(HaveKeyWithValue(ShowObjectConditionsAnnotation, tt.want))
})
}
}
diff --git a/cmd/clusterctl/client/upgrade_test.go b/cmd/clusterctl/client/upgrade_test.go
index d5df8f6e1862..bf633f021d0e 100644
--- a/cmd/clusterctl/client/upgrade_test.go
+++ b/cmd/clusterctl/client/upgrade_test.go
@@ -365,10 +365,6 @@ func fakeClientForUpgrade() *fakeClient {
func fakeProvider(name string, providerType clusterctlv1.ProviderType, version, targetNamespace string) clusterctlv1.Provider {
return clusterctlv1.Provider{
- TypeMeta: metav1.TypeMeta{
- APIVersion: clusterctlv1.GroupVersion.String(),
- Kind: "Provider",
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: targetNamespace,
Name: clusterctlv1.ManifestLabel(name, providerType),
diff --git a/cmd/clusterctl/cmd/config_repositories_test.go b/cmd/clusterctl/cmd/config_repositories_test.go
index 3edd6dc88c1b..cd504714d0b7 100644
--- a/cmd/clusterctl/cmd/config_repositories_test.go
+++ b/cmd/clusterctl/cmd/config_repositories_test.go
@@ -109,6 +109,7 @@ microk8s BootstrapProvider https://github.com/canonical/
rke2 BootstrapProvider https://github.com/rancher/cluster-api-provider-rke2/releases/latest/ bootstrap-components.yaml
talos BootstrapProvider https://github.com/siderolabs/cluster-api-bootstrap-provider-talos/releases/latest/ bootstrap-components.yaml
canonical-kubernetes ControlPlaneProvider https://github.com/canonical/cluster-api-k8s/releases/latest/ control-plane-components.yaml
+hosted-control-plane ControlPlaneProvider https://github.com/teutonet/cluster-api-provider-hosted-control-plane/releases/latest/ control-plane-components.yaml
k0sproject-k0smotron ControlPlaneProvider https://github.com/k0sproject/k0smotron/releases/latest/ control-plane-components.yaml
kamaji ControlPlaneProvider https://github.com/clastix/cluster-api-control-plane-provider-kamaji/releases/latest/ control-plane-components.yaml
kubeadm ControlPlaneProvider https://github.com/kubernetes-sigs/cluster-api/releases/latest/ control-plane-components.yaml
@@ -136,6 +137,7 @@ kubekey InfrastructureProvider https://github.com/kubesphere
kubevirt InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api-provider-kubevirt/releases/latest/ infrastructure-components.yaml
linode-linode InfrastructureProvider https://github.com/linode/cluster-api-provider-linode/releases/latest/ infrastructure-components.yaml
maas InfrastructureProvider https://github.com/spectrocloud/cluster-api-provider-maas/releases/latest/ infrastructure-components.yaml
+metal-stack InfrastructureProvider https://github.com/metal-stack/cluster-api-provider-metal-stack/releases/latest/ infrastructure-components.yaml
metal3 InfrastructureProvider https://github.com/metal3-io/cluster-api-provider-metal3/releases/latest/ infrastructure-components.yaml
my-infra-provider InfrastructureProvider /home/.config/cluster-api/overrides/infrastructure-docker/latest/ infrastructure-components.yaml
nested InfrastructureProvider https://github.com/kubernetes-sigs/cluster-api-provider-nested/releases/latest/ infrastructure-components.yaml
@@ -202,6 +204,10 @@ var expectedOutputYaml = `- File: core_components.yaml
Name: canonical-kubernetes
ProviderType: ControlPlaneProvider
URL: https://github.com/canonical/cluster-api-k8s/releases/latest/
+- File: control-plane-components.yaml
+ Name: hosted-control-plane
+ ProviderType: ControlPlaneProvider
+ URL: https://github.com/teutonet/cluster-api-provider-hosted-control-plane/releases/latest/
- File: control-plane-components.yaml
Name: k0sproject-k0smotron
ProviderType: ControlPlaneProvider
@@ -310,6 +316,10 @@ var expectedOutputYaml = `- File: core_components.yaml
Name: maas
ProviderType: InfrastructureProvider
URL: https://github.com/spectrocloud/cluster-api-provider-maas/releases/latest/
+- File: infrastructure-components.yaml
+ Name: metal-stack
+ ProviderType: InfrastructureProvider
+ URL: https://github.com/metal-stack/cluster-api-provider-metal-stack/releases/latest/
- File: infrastructure-components.yaml
Name: metal3
ProviderType: InfrastructureProvider
diff --git a/cmd/clusterctl/cmd/describe_cluster.go b/cmd/clusterctl/cmd/describe_cluster.go
index 626339d6bdc7..0ef994dafc5c 100644
--- a/cmd/clusterctl/cmd/describe_cluster.go
+++ b/cmd/clusterctl/cmd/describe_cluster.go
@@ -18,6 +18,7 @@ package cmd
import (
"context"
+ "fmt"
"os"
"github.com/fatih/color"
@@ -26,6 +27,7 @@ import (
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
"sigs.k8s.io/cluster-api/cmd/clusterctl/client"
+ "sigs.k8s.io/cluster-api/cmd/clusterctl/client/tree"
"sigs.k8s.io/cluster-api/cmd/clusterctl/cmd/internal/templates"
cmdtree "sigs.k8s.io/cluster-api/internal/util/tree"
)
@@ -93,7 +95,7 @@ func init() {
"The namespace where the workload cluster is located. If unspecified, the current namespace will be used.")
describeClusterClusterCmd.Flags().StringVar(&dc.showOtherConditions, "show-conditions", "",
- "list of comma separated kind or kind/name for which the command should show all the object's conditions (use 'all' to show conditions for everything).")
+ fmt.Sprintf("list of comma separated kind or kind/name for which the command should show all the object's conditions (use 'all' to show conditions for everything, use the %s suffix to show only non-zero conditions).", tree.ShowNonZeroConditionsSuffix))
describeClusterClusterCmd.Flags().BoolVar(&dc.showMachineSets, "show-machinesets", false,
"Show MachineSet objects.")
describeClusterClusterCmd.Flags().BoolVar(&dc.showClusterResourceSets, "show-resourcesets", false,
@@ -158,9 +160,13 @@ func runDescribeCluster(cmd *cobra.Command, name string) error {
switch dc.v1beta2 {
case true:
- cmdtree.PrintObjectTree(tree, os.Stdout)
+ if err := cmdtree.PrintObjectTree(tree, os.Stdout); err != nil {
+ return errors.Wrap(err, "failed to print object tree")
+ }
default:
- cmdtree.PrintObjectTreeV1Beta1(tree)
+ if err := cmdtree.PrintObjectTreeV1Beta1(tree); err != nil {
+ return errors.Wrap(err, "failed to print object tree v1beta1")
+ }
}
return nil
diff --git a/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_metadata.yaml b/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_metadata.yaml
index 1eeae9cb934b..7ca550194471 100644
--- a/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_metadata.yaml
+++ b/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_metadata.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: metadata.clusterctl.cluster.x-k8s.io
spec:
group: clusterctl.cluster.x-k8s.io
diff --git a/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_providers.yaml b/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_providers.yaml
index 8d7e2cc0f02a..4e9f47ffd652 100644
--- a/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_providers.yaml
+++ b/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_providers.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: providers.clusterctl.cluster.x-k8s.io
spec:
group: clusterctl.cluster.x-k8s.io
diff --git a/cmd/clusterctl/config/manifest/clusterctl-api.yaml b/cmd/clusterctl/config/manifest/clusterctl-api.yaml
index 9f3f6ab67262..e906a9fe4aa4 100644
--- a/cmd/clusterctl/config/manifest/clusterctl-api.yaml
+++ b/cmd/clusterctl/config/manifest/clusterctl-api.yaml
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: providers.clusterctl.cluster.x-k8s.io
spec:
group: clusterctl.cluster.x-k8s.io
diff --git a/cmd/clusterctl/hack/create-local-repository.py b/cmd/clusterctl/hack/create-local-repository.py
index 4c00ce651321..69eefcbf5966 100755
--- a/cmd/clusterctl/hack/create-local-repository.py
+++ b/cmd/clusterctl/hack/create-local-repository.py
@@ -54,30 +54,30 @@
providers = {
'cluster-api': {
'componentsFile': 'core-components.yaml',
- 'nextVersion': 'v1.11.99',
+ 'nextVersion': 'v1.12.99',
'type': 'CoreProvider',
},
'bootstrap-kubeadm': {
'componentsFile': 'bootstrap-components.yaml',
- 'nextVersion': 'v1.11.99',
+ 'nextVersion': 'v1.12.99',
'type': 'BootstrapProvider',
'configFolder': 'bootstrap/kubeadm/config/default',
},
'control-plane-kubeadm': {
'componentsFile': 'control-plane-components.yaml',
- 'nextVersion': 'v1.11.99',
+ 'nextVersion': 'v1.12.99',
'type': 'ControlPlaneProvider',
'configFolder': 'controlplane/kubeadm/config/default',
},
'infrastructure-docker': {
'componentsFile': 'infrastructure-components-development.yaml',
- 'nextVersion': 'v1.11.99',
+ 'nextVersion': 'v1.12.99',
'type': 'InfrastructureProvider',
'configFolder': 'test/infrastructure/docker/config/default',
},
'runtime-extension-test': {
'componentsFile': 'runtime-extension-components-development.yaml',
- 'nextVersion': 'v1.11.99',
+ 'nextVersion': 'v1.12.99',
'type': 'RuntimeExtensionProvider',
'configFolder': 'test/extension/config/default',
},
diff --git a/cmd/clusterctl/internal/test/fake_objects.go b/cmd/clusterctl/internal/test/fake_objects.go
index c91ee9bcf40c..2799fa4ebf9c 100644
--- a/cmd/clusterctl/internal/test/fake_objects.go
+++ b/cmd/clusterctl/internal/test/fake_objects.go
@@ -25,6 +25,7 @@ import (
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+ "k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/types"
"k8s.io/klog/v2"
"k8s.io/utils/ptr"
@@ -47,6 +48,7 @@ import (
type FakeCluster struct {
namespace string
name string
+ paused bool
controlPlane *FakeControlPlane
machinePools []*FakeMachinePool
machineDeployments []*FakeMachineDeployment
@@ -116,6 +118,11 @@ func (f *FakeCluster) WithTopologyClassNamespace(namespace string) *FakeCluster
return f
}
+func (f *FakeCluster) WithPaused() *FakeCluster {
+ f.paused = true
+ return f
+}
+
func (f *FakeCluster) Objs() []client.Object {
clusterInfrastructure := &fakeinfrastructure.GenericInfrastructureCluster{
TypeMeta: metav1.TypeMeta{
@@ -160,6 +167,10 @@ func (f *FakeCluster) Objs() []client.Object {
}
}
+ if f.paused {
+ cluster.Spec.Paused = ptr.To(true)
+ }
+
// Ensure the cluster gets a UID to be used by dependant objects for creating OwnerReferences.
setUID(cluster)
@@ -358,11 +369,12 @@ func (f *FakeControlPlane) Objs(cluster *clusterv1.Cluster) []client.Object {
},
Spec: fakecontrolplane.GenericControlPlaneSpec{
MachineTemplate: fakecontrolplane.GenericMachineTemplate{
- InfrastructureRef: corev1.ObjectReference{
- APIVersion: controlPlaneInfrastructure.APIVersion,
- Kind: controlPlaneInfrastructure.Kind,
- Namespace: controlPlaneInfrastructure.Namespace,
- Name: controlPlaneInfrastructure.Name,
+ Spec: fakecontrolplane.GenericMachineTemplateSpec{
+ InfrastructureRef: clusterv1.ContractVersionedObjectReference{
+ APIGroup: fakeinfrastructure.GroupVersion.Group,
+ Kind: controlPlaneInfrastructure.Kind,
+ Name: controlPlaneInfrastructure.Name,
+ },
},
},
},
@@ -1484,6 +1496,7 @@ func FakeCRDList() []*apiextensionsv1.CustomResourceDefinition {
type FakeClusterClass struct {
namespace string
name string
+ paused bool
infrastructureClusterTemplate *unstructured.Unstructured
controlPlaneTemplate *unstructured.Unstructured
controlPlaneInfrastructureMachineTemplate *unstructured.Unstructured
@@ -1517,6 +1530,11 @@ func (f *FakeClusterClass) WithWorkerMachineDeploymentClasses(classes []*FakeMac
return f
}
+func (f *FakeClusterClass) WithPaused() *FakeClusterClass {
+ f.paused = true
+ return f
+}
+
func (f *FakeClusterClass) Objs() []client.Object {
// objMap map where the key is the object to which the owner reference to the cluster class should be added
// and the value dictates if the onwner ref needs to be added.
@@ -1544,6 +1562,10 @@ func (f *FakeClusterClass) Objs() []client.Object {
objMap[f.controlPlaneInfrastructureMachineTemplate] = true
}
+ if f.paused {
+ clusterClassBuilder.WithAnnotations(map[string]string{clusterv1.PausedAnnotation: "true"})
+ }
+
if len(f.workerMachineDeploymentClasses) > 0 {
mdClasses := []clusterv1.MachineDeploymentClass{}
for _, fakeMDClass := range f.workerMachineDeploymentClasses {
@@ -1555,11 +1577,15 @@ func (f *FakeClusterClass) Objs() []client.Object {
}
clusterClass := clusterClassBuilder.Build()
+ clusterClass.SetGroupVersionKind(clusterv1.GroupVersion.WithKind("ClusterClass"))
objMap[clusterClass] = false
for o := range objMap {
setUID(o)
}
+ // GVK should be only set for setUID to avoid the wrong assumption that GVK is set on a
+ // ClusterClass in other parts of the code.
+ clusterClass.SetGroupVersionKind(schema.GroupVersionKind{})
for o, setOwnerReference := range objMap {
if setOwnerReference {
diff --git a/cmd/clusterctl/internal/test/providers/controlplane/generic_types.go b/cmd/clusterctl/internal/test/providers/controlplane/generic_types.go
index b4a130942c87..4dd0bac89056 100644
--- a/cmd/clusterctl/internal/test/providers/controlplane/generic_types.go
+++ b/cmd/clusterctl/internal/test/providers/controlplane/generic_types.go
@@ -17,13 +17,19 @@ limitations under the License.
package controlplane
import (
- corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
)
// GenericMachineTemplate contains a generic control plane spec.
type GenericMachineTemplate struct {
- InfrastructureRef corev1.ObjectReference `json:"infrastructureRef"`
+ Spec GenericMachineTemplateSpec `json:"spec"`
+}
+
+// GenericMachineTemplateSpec contains a generic control plane spec.
+type GenericMachineTemplateSpec struct {
+ InfrastructureRef clusterv1.ContractVersionedObjectReference `json:"infrastructureRef"`
}
// GenericControlPlaneSpec contains a generic control plane spec.
diff --git a/cmd/clusterctl/internal/test/providers/controlplane/zz_generated.deepcopy.go b/cmd/clusterctl/internal/test/providers/controlplane/zz_generated.deepcopy.go
index aacc2ef45d3d..06b3473ff854 100644
--- a/cmd/clusterctl/internal/test/providers/controlplane/zz_generated.deepcopy.go
+++ b/cmd/clusterctl/internal/test/providers/controlplane/zz_generated.deepcopy.go
@@ -101,7 +101,7 @@ func (in *GenericControlPlaneSpec) DeepCopy() *GenericControlPlaneSpec {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GenericMachineTemplate) DeepCopyInto(out *GenericMachineTemplate) {
*out = *in
- out.InfrastructureRef = in.InfrastructureRef
+ out.Spec = in.Spec
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericMachineTemplate.
@@ -113,3 +113,19 @@ func (in *GenericMachineTemplate) DeepCopy() *GenericMachineTemplate {
in.DeepCopyInto(out)
return out
}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *GenericMachineTemplateSpec) DeepCopyInto(out *GenericMachineTemplateSpec) {
+ *out = *in
+ out.InfrastructureRef = in.InfrastructureRef
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericMachineTemplateSpec.
+func (in *GenericMachineTemplateSpec) DeepCopy() *GenericMachineTemplateSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(GenericMachineTemplateSpec)
+ in.DeepCopyInto(out)
+ return out
+}
diff --git a/cmd/clusterctl/internal/util/doc.go b/cmd/clusterctl/internal/util/doc.go
index 7bda1e336e87..3325276e7904 100644
--- a/cmd/clusterctl/internal/util/doc.go
+++ b/cmd/clusterctl/internal/util/doc.go
@@ -14,5 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-// Package util implements clusterctl utilty functions.
+// Package util implements clusterctl utility functions.
package util
diff --git a/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesetbindings.yaml b/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesetbindings.yaml
index aaada266bed9..22c512caa66b 100644
--- a/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesetbindings.yaml
+++ b/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesetbindings.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: clusterresourcesetbindings.addons.cluster.x-k8s.io
spec:
group: addons.cluster.x-k8s.io
diff --git a/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesets.yaml b/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesets.yaml
index e566096811dd..7cd655dd2853 100644
--- a/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesets.yaml
+++ b/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesets.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: clusterresourcesets.addons.cluster.x-k8s.io
spec:
group: addons.cluster.x-k8s.io
diff --git a/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml b/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml
index dd3ca76f608e..b9dab0c42ba8 100644
--- a/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml
+++ b/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: clusterclasses.cluster.x-k8s.io
spec:
group: cluster.x-k8s.io
@@ -2969,6 +2969,53 @@ spec:
format: int32
minimum: 0
type: integer
+ unhealthyMachineConditions:
+ description: |-
+ unhealthyMachineConditions contains a list of the machine conditions that determine
+ whether a machine is considered unhealthy. The conditions are combined in a
+ logical OR, i.e. if any of the conditions is met, the machine is unhealthy.
+ items:
+ description: |-
+ UnhealthyMachineCondition represents a Machine condition type and value with a timeout
+ specified as a duration. When the named condition has been in the given
+ status for at least the timeout value, a machine is considered unhealthy.
+ properties:
+ status:
+ description: status of the condition, one of True,
+ False, Unknown.
+ enum:
+ - "True"
+ - "False"
+ - Unknown
+ type: string
+ timeoutSeconds:
+ description: |-
+ timeoutSeconds is the duration that a machine must be in a given status for,
+ after which the machine is considered unhealthy.
+ For example, with a value of "3600", the machine must match the status
+ for at least 1 hour before being considered unhealthy.
+ format: int32
+ minimum: 0
+ type: integer
+ type:
+ description: type of Machine condition
+ maxLength: 316
+ minLength: 1
+ pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
+ type: string
+ x-kubernetes-validations:
+ - message: 'type must not be one of: Ready, Available,
+ HealthCheckSucceeded, OwnerRemediated, ExternallyRemediated'
+ rule: '!(self in [''Ready'',''Available'',''HealthCheckSucceeded'',''OwnerRemediated'',''ExternallyRemediated''])'
+ required:
+ - status
+ - timeoutSeconds
+ - type
+ type: object
+ maxItems: 100
+ minItems: 1
+ type: array
+ x-kubernetes-list-type: atomic
unhealthyNodeConditions:
description: |-
unhealthyNodeConditions contains a list of conditions that determine
@@ -2989,7 +3036,7 @@ spec:
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 example, with a value of "3600", the node must match the status
for at least 1 hour before being considered unhealthy.
format: int32
minimum: 0
@@ -3320,6 +3367,20 @@ spec:
required:
- templateRef
type: object
+ kubernetesVersions:
+ description: |-
+ kubernetesVersions is the list of Kubernetes versions that can be
+ used for clusters using this ClusterClass.
+ The list of version must be ordered from the older to the newer version, and there should be
+ at least one version for every minor in between the first and the last version.
+ items:
+ maxLength: 256
+ minLength: 1
+ type: string
+ maxItems: 100
+ minItems: 1
+ type: array
+ x-kubernetes-list-type: atomic
patches:
description: |-
patches defines the patches which are applied to customize
@@ -3545,6 +3606,24 @@ spec:
minItems: 1
type: array
x-kubernetes-list-type: atomic
+ upgrade:
+ description: upgrade defines the upgrade configuration for clusters
+ using this ClusterClass.
+ minProperties: 1
+ properties:
+ external:
+ description: external defines external runtime extensions for
+ upgrade operations.
+ minProperties: 1
+ properties:
+ generateUpgradePlanExtension:
+ description: generateUpgradePlanExtension references an extension
+ which is called to generate upgrade plan.
+ maxLength: 512
+ minLength: 1
+ type: string
+ type: object
+ type: object
variables:
description: |-
variables defines the variables which can be configured
@@ -4114,6 +4193,54 @@ spec:
format: int32
minimum: 0
type: integer
+ unhealthyMachineConditions:
+ description: |-
+ unhealthyMachineConditions contains a list of the machine conditions that determine
+ whether a machine is considered unhealthy. The conditions are combined in a
+ logical OR, i.e. if any of the conditions is met, the machine is unhealthy.
+ items:
+ description: |-
+ UnhealthyMachineCondition represents a Machine condition type and value with a timeout
+ specified as a duration. When the named condition has been in the given
+ status for at least the timeout value, a machine is considered unhealthy.
+ properties:
+ status:
+ description: status of the condition, one
+ of True, False, Unknown.
+ enum:
+ - "True"
+ - "False"
+ - Unknown
+ type: string
+ timeoutSeconds:
+ description: |-
+ timeoutSeconds is the duration that a machine must be in a given status for,
+ after which the machine is considered unhealthy.
+ For example, with a value of "3600", the machine must match the status
+ for at least 1 hour before being considered unhealthy.
+ format: int32
+ minimum: 0
+ type: integer
+ type:
+ description: type of Machine condition
+ maxLength: 316
+ minLength: 1
+ pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
+ type: string
+ x-kubernetes-validations:
+ - message: 'type must not be one of: Ready,
+ Available, HealthCheckSucceeded, OwnerRemediated,
+ ExternallyRemediated'
+ rule: '!(self in [''Ready'',''Available'',''HealthCheckSucceeded'',''OwnerRemediated'',''ExternallyRemediated''])'
+ required:
+ - status
+ - timeoutSeconds
+ - type
+ type: object
+ maxItems: 100
+ minItems: 1
+ type: array
+ x-kubernetes-list-type: atomic
unhealthyNodeConditions:
description: |-
unhealthyNodeConditions contains a list of conditions that determine
@@ -4134,7 +4261,7 @@ spec:
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 example, with a value of "3600", the node must match the status
for at least 1 hour before being considered unhealthy.
format: int32
minimum: 0
diff --git a/config/crd/bases/cluster.x-k8s.io_clusters.yaml b/config/crd/bases/cluster.x-k8s.io_clusters.yaml
index 6bae359e86fa..2fc0166c8643 100644
--- a/config/crd/bases/cluster.x-k8s.io_clusters.yaml
+++ b/config/crd/bases/cluster.x-k8s.io_clusters.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: clusters.cluster.x-k8s.io
spec:
group: cluster.x-k8s.io
@@ -855,9 +855,6 @@ spec:
description: port is the port on which the API server is serving.
format: int32
type: integer
- required:
- - host
- - port
type: object
controlPlaneRef:
description: |-
@@ -2534,6 +2531,54 @@ spec:
format: int32
minimum: 0
type: integer
+ unhealthyMachineConditions:
+ description: |-
+ unhealthyMachineConditions contains a list of the machine conditions that determine
+ whether a machine is considered unhealthy. The conditions are combined in a
+ logical OR, i.e. if any of the conditions is met, the machine is unhealthy.
+ items:
+ description: |-
+ UnhealthyMachineCondition represents a Machine condition type and value with a timeout
+ specified as a duration. When the named condition has been in the given
+ status for at least the timeout value, a machine is considered unhealthy.
+ properties:
+ status:
+ description: status of the condition, one of
+ True, False, Unknown.
+ enum:
+ - "True"
+ - "False"
+ - Unknown
+ type: string
+ timeoutSeconds:
+ description: |-
+ timeoutSeconds is the duration that a machine must be in a given status for,
+ after which the machine is considered unhealthy.
+ For example, with a value of "3600", the machine must match the status
+ for at least 1 hour before being considered unhealthy.
+ format: int32
+ minimum: 0
+ type: integer
+ type:
+ description: type of Machine condition
+ maxLength: 316
+ minLength: 1
+ pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
+ type: string
+ x-kubernetes-validations:
+ - message: 'type must not be one of: Ready,
+ Available, HealthCheckSucceeded, OwnerRemediated,
+ ExternallyRemediated'
+ rule: '!(self in [''Ready'',''Available'',''HealthCheckSucceeded'',''OwnerRemediated'',''ExternallyRemediated''])'
+ required:
+ - status
+ - timeoutSeconds
+ - type
+ type: object
+ maxItems: 100
+ minItems: 1
+ type: array
+ x-kubernetes-list-type: atomic
unhealthyNodeConditions:
description: |-
unhealthyNodeConditions contains a list of conditions that determine
@@ -2554,7 +2599,7 @@ spec:
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 example, with a value of "3600", the node must match the status
for at least 1 hour before being considered unhealthy.
format: int32
minimum: 0
@@ -2935,6 +2980,54 @@ spec:
format: int32
minimum: 0
type: integer
+ unhealthyMachineConditions:
+ description: |-
+ unhealthyMachineConditions contains a list of the machine conditions that determine
+ whether a machine is considered unhealthy. The conditions are combined in a
+ logical OR, i.e. if any of the conditions is met, the machine is unhealthy.
+ items:
+ description: |-
+ UnhealthyMachineCondition represents a Machine condition type and value with a timeout
+ specified as a duration. When the named condition has been in the given
+ status for at least the timeout value, a machine is considered unhealthy.
+ properties:
+ status:
+ description: status of the condition,
+ one of True, False, Unknown.
+ enum:
+ - "True"
+ - "False"
+ - Unknown
+ type: string
+ timeoutSeconds:
+ description: |-
+ timeoutSeconds is the duration that a machine must be in a given status for,
+ after which the machine is considered unhealthy.
+ For example, with a value of "3600", the machine must match the status
+ for at least 1 hour before being considered unhealthy.
+ format: int32
+ minimum: 0
+ type: integer
+ type:
+ description: type of Machine condition
+ maxLength: 316
+ minLength: 1
+ pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
+ type: string
+ x-kubernetes-validations:
+ - message: 'type must not be one of: Ready,
+ Available, HealthCheckSucceeded, OwnerRemediated,
+ ExternallyRemediated'
+ rule: '!(self in [''Ready'',''Available'',''HealthCheckSucceeded'',''OwnerRemediated'',''ExternallyRemediated''])'
+ required:
+ - status
+ - timeoutSeconds
+ - type
+ type: object
+ maxItems: 100
+ minItems: 1
+ type: array
+ x-kubernetes-list-type: atomic
unhealthyNodeConditions:
description: |-
unhealthyNodeConditions contains a list of conditions that determine
@@ -2955,7 +3048,7 @@ spec:
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 example, with a value of "3600", the node must match the status
for at least 1 hour before being considered unhealthy.
format: int32
minimum: 0
diff --git a/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml b/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml
index db9491037f84..58cba176177b 100644
--- a/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml
+++ b/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: machinedeployments.cluster.x-k8s.io
spec:
group: cluster.x-k8s.io
@@ -2340,6 +2340,77 @@ spec:
x-kubernetes-list-map-keys:
- conditionType
x-kubernetes-list-type: map
+ taints:
+ description: |-
+ taints are the node taints that Cluster API will manage.
+ This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes,
+ e.g. the node controller might add the node.kubernetes.io/not-ready taint.
+ Only those taints defined in this list will be added or removed by core Cluster API controllers.
+
+ There can be at most 64 taints.
+ A pod would have to tolerate all existing taints to run on the corresponding node.
+
+ NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners.
+ items:
+ description: MachineTaint defines a taint equivalent to
+ corev1.Taint, but additionally having a propagation field.
+ properties:
+ effect:
+ description: effect is the effect for the taint. Valid
+ values are NoSchedule, PreferNoSchedule and NoExecute.
+ enum:
+ - NoSchedule
+ - PreferNoSchedule
+ - NoExecute
+ type: string
+ key:
+ description: |-
+ key is the taint key to be applied to a node.
+ Must be a valid qualified name of maximum size 63 characters
+ with an optional subdomain prefix of maximum size 253 characters,
+ separated by a `/`.
+ maxLength: 317
+ minLength: 1
+ pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$
+ type: string
+ x-kubernetes-validations:
+ - message: key must be a valid qualified name of max
+ size 63 characters with an optional subdomain prefix
+ of max size 253 characters
+ rule: 'self.contains(''/'') ? ( self.split(''/'')
+ [0].size() <= 253 && self.split(''/'') [1].size()
+ <= 63 && self.split(''/'').size() == 2 ) : self.size()
+ <= 63'
+ propagation:
+ description: |-
+ propagation defines how this taint should be propagated to nodes.
+ Valid values are 'Always' and 'OnInitialization'.
+ Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation.
+ OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again.
+ enum:
+ - Always
+ - OnInitialization
+ type: string
+ value:
+ description: |-
+ value is the taint value corresponding to the taint key.
+ It must be a valid label value of maximum size 63 characters.
+ maxLength: 63
+ minLength: 1
+ pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
+ type: string
+ required:
+ - effect
+ - key
+ - propagation
+ type: object
+ maxItems: 64
+ minItems: 1
+ type: array
+ x-kubernetes-list-map-keys:
+ - key
+ - effect
+ x-kubernetes-list-type: map
version:
description: |-
version defines the desired Kubernetes version.
diff --git a/config/crd/bases/cluster.x-k8s.io_machinedrainrules.yaml b/config/crd/bases/cluster.x-k8s.io_machinedrainrules.yaml
index 927182c1b857..4e9f1f649529 100644
--- a/config/crd/bases/cluster.x-k8s.io_machinedrainrules.yaml
+++ b/config/crd/bases/cluster.x-k8s.io_machinedrainrules.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: machinedrainrules.cluster.x-k8s.io
spec:
group: cluster.x-k8s.io
diff --git a/config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml b/config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml
index db99e6286fd6..908a50fa4c74 100644
--- a/config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml
+++ b/config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: machinehealthchecks.cluster.x-k8s.io
spec:
group: cluster.x-k8s.io
@@ -1065,6 +1065,53 @@ spec:
format: int32
minimum: 0
type: integer
+ unhealthyMachineConditions:
+ description: |-
+ unhealthyMachineConditions contains a list of the machine conditions that determine
+ whether a machine is considered unhealthy. The conditions are combined in a
+ logical OR, i.e. if any of the conditions is met, the machine is unhealthy.
+ items:
+ description: |-
+ UnhealthyMachineCondition represents a Machine condition type and value with a timeout
+ specified as a duration. When the named condition has been in the given
+ status for at least the timeout value, a machine is considered unhealthy.
+ properties:
+ status:
+ description: status of the condition, one of True, False,
+ Unknown.
+ enum:
+ - "True"
+ - "False"
+ - Unknown
+ type: string
+ timeoutSeconds:
+ description: |-
+ timeoutSeconds is the duration that a machine must be in a given status for,
+ after which the machine is considered unhealthy.
+ For example, with a value of "3600", the machine must match the status
+ for at least 1 hour before being considered unhealthy.
+ format: int32
+ minimum: 0
+ type: integer
+ type:
+ description: type of Machine condition
+ maxLength: 316
+ minLength: 1
+ pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
+ type: string
+ x-kubernetes-validations:
+ - message: 'type must not be one of: Ready, Available, HealthCheckSucceeded,
+ OwnerRemediated, ExternallyRemediated'
+ rule: '!(self in [''Ready'',''Available'',''HealthCheckSucceeded'',''OwnerRemediated'',''ExternallyRemediated''])'
+ required:
+ - status
+ - timeoutSeconds
+ - type
+ type: object
+ maxItems: 100
+ minItems: 1
+ type: array
+ x-kubernetes-list-type: atomic
unhealthyNodeConditions:
description: |-
unhealthyNodeConditions contains a list of conditions that determine
@@ -1085,7 +1132,7 @@ spec:
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 example, with a value of "3600", the node must match the status
for at least 1 hour before being considered unhealthy.
format: int32
minimum: 0
diff --git a/config/crd/bases/cluster.x-k8s.io_machinepools.yaml b/config/crd/bases/cluster.x-k8s.io_machinepools.yaml
index d8094cc1053a..e968bc6d1524 100644
--- a/config/crd/bases/cluster.x-k8s.io_machinepools.yaml
+++ b/config/crd/bases/cluster.x-k8s.io_machinepools.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: machinepools.cluster.x-k8s.io
spec:
group: cluster.x-k8s.io
@@ -1944,6 +1944,77 @@ spec:
x-kubernetes-list-map-keys:
- conditionType
x-kubernetes-list-type: map
+ taints:
+ description: |-
+ taints are the node taints that Cluster API will manage.
+ This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes,
+ e.g. the node controller might add the node.kubernetes.io/not-ready taint.
+ Only those taints defined in this list will be added or removed by core Cluster API controllers.
+
+ There can be at most 64 taints.
+ A pod would have to tolerate all existing taints to run on the corresponding node.
+
+ NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners.
+ items:
+ description: MachineTaint defines a taint equivalent to
+ corev1.Taint, but additionally having a propagation field.
+ properties:
+ effect:
+ description: effect is the effect for the taint. Valid
+ values are NoSchedule, PreferNoSchedule and NoExecute.
+ enum:
+ - NoSchedule
+ - PreferNoSchedule
+ - NoExecute
+ type: string
+ key:
+ description: |-
+ key is the taint key to be applied to a node.
+ Must be a valid qualified name of maximum size 63 characters
+ with an optional subdomain prefix of maximum size 253 characters,
+ separated by a `/`.
+ maxLength: 317
+ minLength: 1
+ pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$
+ type: string
+ x-kubernetes-validations:
+ - message: key must be a valid qualified name of max
+ size 63 characters with an optional subdomain prefix
+ of max size 253 characters
+ rule: 'self.contains(''/'') ? ( self.split(''/'')
+ [0].size() <= 253 && self.split(''/'') [1].size()
+ <= 63 && self.split(''/'').size() == 2 ) : self.size()
+ <= 63'
+ propagation:
+ description: |-
+ propagation defines how this taint should be propagated to nodes.
+ Valid values are 'Always' and 'OnInitialization'.
+ Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation.
+ OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again.
+ enum:
+ - Always
+ - OnInitialization
+ type: string
+ value:
+ description: |-
+ value is the taint value corresponding to the taint key.
+ It must be a valid label value of maximum size 63 characters.
+ maxLength: 63
+ minLength: 1
+ pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
+ type: string
+ required:
+ - effect
+ - key
+ - propagation
+ type: object
+ maxItems: 64
+ minItems: 1
+ type: array
+ x-kubernetes-list-map-keys:
+ - key
+ - effect
+ x-kubernetes-list-type: map
version:
description: |-
version defines the desired Kubernetes version.
diff --git a/config/crd/bases/cluster.x-k8s.io_machines.yaml b/config/crd/bases/cluster.x-k8s.io_machines.yaml
index 7de8401c07e7..d2df0cd5d44c 100644
--- a/config/crd/bases/cluster.x-k8s.io_machines.yaml
+++ b/config/crd/bases/cluster.x-k8s.io_machines.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: machines.cluster.x-k8s.io
spec:
group: cluster.x-k8s.io
@@ -1754,6 +1754,76 @@ spec:
x-kubernetes-list-map-keys:
- conditionType
x-kubernetes-list-type: map
+ taints:
+ description: |-
+ taints are the node taints that Cluster API will manage.
+ This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes,
+ e.g. the node controller might add the node.kubernetes.io/not-ready taint.
+ Only those taints defined in this list will be added or removed by core Cluster API controllers.
+
+ There can be at most 64 taints.
+ A pod would have to tolerate all existing taints to run on the corresponding node.
+
+ NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners.
+ items:
+ description: MachineTaint defines a taint equivalent to corev1.Taint,
+ but additionally having a propagation field.
+ properties:
+ effect:
+ description: effect is the effect for the taint. Valid values
+ are NoSchedule, PreferNoSchedule and NoExecute.
+ enum:
+ - NoSchedule
+ - PreferNoSchedule
+ - NoExecute
+ type: string
+ key:
+ description: |-
+ key is the taint key to be applied to a node.
+ Must be a valid qualified name of maximum size 63 characters
+ with an optional subdomain prefix of maximum size 253 characters,
+ separated by a `/`.
+ maxLength: 317
+ minLength: 1
+ pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$
+ type: string
+ x-kubernetes-validations:
+ - message: key must be a valid qualified name of max size 63
+ characters with an optional subdomain prefix of max size
+ 253 characters
+ rule: 'self.contains(''/'') ? ( self.split(''/'') [0].size()
+ <= 253 && self.split(''/'') [1].size() <= 63 && self.split(''/'').size()
+ == 2 ) : self.size() <= 63'
+ propagation:
+ description: |-
+ propagation defines how this taint should be propagated to nodes.
+ Valid values are 'Always' and 'OnInitialization'.
+ Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation.
+ OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again.
+ enum:
+ - Always
+ - OnInitialization
+ type: string
+ value:
+ description: |-
+ value is the taint value corresponding to the taint key.
+ It must be a valid label value of maximum size 63 characters.
+ maxLength: 63
+ minLength: 1
+ pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
+ type: string
+ required:
+ - effect
+ - key
+ - propagation
+ type: object
+ maxItems: 64
+ minItems: 1
+ type: array
+ x-kubernetes-list-map-keys:
+ - key
+ - effect
+ x-kubernetes-list-type: map
version:
description: |-
version defines the desired Kubernetes version.
@@ -1797,7 +1867,7 @@ spec:
- address
- type
type: object
- maxItems: 32
+ maxItems: 128
type: array
x-kubernetes-list-type: atomic
certificatesExpiryDate:
@@ -1810,7 +1880,7 @@ spec:
description: |-
conditions represents the observations of a Machine's current state.
Known condition types are Available, Ready, UpToDate, BootstrapConfigReady, InfrastructureReady, NodeReady,
- NodeHealthy, Deleting, Paused.
+ 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.
@@ -2122,6 +2192,7 @@ spec:
- Provisioning
- Provisioned
- Running
+ - Updating
- Deleting
- Deleted
- Failed
diff --git a/config/crd/bases/cluster.x-k8s.io_machinesets.yaml b/config/crd/bases/cluster.x-k8s.io_machinesets.yaml
index c3ecdaa0ac3c..6f7e928372ee 100644
--- a/config/crd/bases/cluster.x-k8s.io_machinesets.yaml
+++ b/config/crd/bases/cluster.x-k8s.io_machinesets.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: machinesets.cluster.x-k8s.io
spec:
group: cluster.x-k8s.io
@@ -1996,6 +1996,77 @@ spec:
x-kubernetes-list-map-keys:
- conditionType
x-kubernetes-list-type: map
+ taints:
+ description: |-
+ taints are the node taints that Cluster API will manage.
+ This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes,
+ e.g. the node controller might add the node.kubernetes.io/not-ready taint.
+ Only those taints defined in this list will be added or removed by core Cluster API controllers.
+
+ There can be at most 64 taints.
+ A pod would have to tolerate all existing taints to run on the corresponding node.
+
+ NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners.
+ items:
+ description: MachineTaint defines a taint equivalent to
+ corev1.Taint, but additionally having a propagation field.
+ properties:
+ effect:
+ description: effect is the effect for the taint. Valid
+ values are NoSchedule, PreferNoSchedule and NoExecute.
+ enum:
+ - NoSchedule
+ - PreferNoSchedule
+ - NoExecute
+ type: string
+ key:
+ description: |-
+ key is the taint key to be applied to a node.
+ Must be a valid qualified name of maximum size 63 characters
+ with an optional subdomain prefix of maximum size 253 characters,
+ separated by a `/`.
+ maxLength: 317
+ minLength: 1
+ pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$
+ type: string
+ x-kubernetes-validations:
+ - message: key must be a valid qualified name of max
+ size 63 characters with an optional subdomain prefix
+ of max size 253 characters
+ rule: 'self.contains(''/'') ? ( self.split(''/'')
+ [0].size() <= 253 && self.split(''/'') [1].size()
+ <= 63 && self.split(''/'').size() == 2 ) : self.size()
+ <= 63'
+ propagation:
+ description: |-
+ propagation defines how this taint should be propagated to nodes.
+ Valid values are 'Always' and 'OnInitialization'.
+ Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation.
+ OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again.
+ enum:
+ - Always
+ - OnInitialization
+ type: string
+ value:
+ description: |-
+ value is the taint value corresponding to the taint key.
+ It must be a valid label value of maximum size 63 characters.
+ maxLength: 63
+ minLength: 1
+ pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
+ type: string
+ required:
+ - effect
+ - key
+ - propagation
+ type: object
+ maxItems: 64
+ minItems: 1
+ type: array
+ x-kubernetes-list-map-keys:
+ - key
+ - effect
+ x-kubernetes-list-type: map
version:
description: |-
version defines the desired Kubernetes version.
diff --git a/config/crd/bases/ipam.cluster.x-k8s.io_ipaddressclaims.yaml b/config/crd/bases/ipam.cluster.x-k8s.io_ipaddressclaims.yaml
index ed03b07b3c72..467cd4147a22 100644
--- a/config/crd/bases/ipam.cluster.x-k8s.io_ipaddressclaims.yaml
+++ b/config/crd/bases/ipam.cluster.x-k8s.io_ipaddressclaims.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: ipaddressclaims.ipam.cluster.x-k8s.io
spec:
group: ipam.cluster.x-k8s.io
diff --git a/config/crd/bases/ipam.cluster.x-k8s.io_ipaddresses.yaml b/config/crd/bases/ipam.cluster.x-k8s.io_ipaddresses.yaml
index 6f4cf9e248a8..1dd4002f3717 100644
--- a/config/crd/bases/ipam.cluster.x-k8s.io_ipaddresses.yaml
+++ b/config/crd/bases/ipam.cluster.x-k8s.io_ipaddresses.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: ipaddresses.ipam.cluster.x-k8s.io
spec:
group: ipam.cluster.x-k8s.io
diff --git a/config/crd/bases/runtime.cluster.x-k8s.io_extensionconfigs.yaml b/config/crd/bases/runtime.cluster.x-k8s.io_extensionconfigs.yaml
index 65ff45142e2b..666b2c3b1836 100644
--- a/config/crd/bases/runtime.cluster.x-k8s.io_extensionconfigs.yaml
+++ b/config/crd/bases/runtime.cluster.x-k8s.io_extensionconfigs.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: extensionconfigs.runtime.cluster.x-k8s.io
spec:
group: runtime.cluster.x-k8s.io
diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml
index 54acf21d0444..f14cbd505132 100644
--- a/config/manager/manager.yaml
+++ b/config/manager/manager.yaml
@@ -23,7 +23,7 @@ spec:
- "--leader-elect"
- "--diagnostics-address=${CAPI_DIAGNOSTICS_ADDRESS:=:8443}"
- "--insecure-diagnostics=${CAPI_INSECURE_DIAGNOSTICS:=false}"
- - "--feature-gates=MachinePool=${EXP_MACHINE_POOL:=true},ClusterResourceSet=${EXP_CLUSTER_RESOURCE_SET:=true},ClusterTopology=${CLUSTER_TOPOLOGY:=false},RuntimeSDK=${EXP_RUNTIME_SDK:=false},MachineSetPreflightChecks=${EXP_MACHINE_SET_PREFLIGHT_CHECKS:=true},MachineWaitForVolumeDetachConsiderVolumeAttachments=${EXP_MACHINE_WAITFORVOLUMEDETACH_CONSIDER_VOLUMEATTACHMENTS:=true},PriorityQueue=${EXP_PRIORITY_QUEUE:=false}"
+ - "--feature-gates=MachinePool=${EXP_MACHINE_POOL:=true},ClusterTopology=${CLUSTER_TOPOLOGY:=false},RuntimeSDK=${EXP_RUNTIME_SDK:=false},MachineSetPreflightChecks=${EXP_MACHINE_SET_PREFLIGHT_CHECKS:=true},MachineWaitForVolumeDetachConsiderVolumeAttachments=${EXP_MACHINE_WAITFORVOLUMEDETACH_CONSIDER_VOLUMEATTACHMENTS:=true},PriorityQueue=${EXP_PRIORITY_QUEUE:=false},ReconcilerRateLimiting=${EXP_RECONCILER_RATE_LIMITING:=false},InPlaceUpdates=${EXP_IN_PLACE_UPDATES:=false},MachineTaintPropagation=${EXP_MACHINE_TAINT_PROPAGATION:=false}"
image: controller:latest
name: manager
env:
diff --git a/config/metrics/crd-clusterrole.yaml b/config/metrics/crd-clusterrole.yaml
index 52ca08243e28..f24506732b06 100644
--- a/config/metrics/crd-clusterrole.yaml
+++ b/config/metrics/crd-clusterrole.yaml
@@ -2,9 +2,9 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
- name: kube-state-metrics-custom-resource-capi
labels:
kube-state-metrics/aggregate-to-manager: "true"
+ name: manager-metrics-role
rules:
- apiGroups:
- addons.cluster.x-k8s.io
diff --git a/config/metrics/crd-metrics-config.yaml b/config/metrics/crd-metrics-config.yaml
index 6ace01c4711d..a3fb0750306c 100644
--- a/config/metrics/crd-metrics-config.yaml
+++ b/config/metrics/crd-metrics-config.yaml
@@ -8,7 +8,7 @@ spec:
groupVersionKind:
group: addons.cluster.x-k8s.io
kind: ClusterResourceSet
- version: v1beta1
+ version: v1beta2
labelsFromPath:
name:
- metadata
@@ -33,7 +33,6 @@ spec:
- Unknown
path:
- status
- - v1beta2
- conditions
valueFrom:
- status
@@ -50,7 +49,6 @@ spec:
nilIsZero: false
path:
- status
- - v1beta2
- conditions
valueFrom:
- lastTransitionTime
@@ -62,7 +60,7 @@ spec:
groupVersionKind:
group: bootstrap.cluster.x-k8s.io
kind: KubeadmConfig
- version: v1beta1
+ version: v1beta2
labelsFromPath:
cluster_name:
- metadata
@@ -140,7 +138,6 @@ spec:
- Unknown
path:
- status
- - v1beta2
- conditions
valueFrom:
- status
@@ -157,7 +154,6 @@ spec:
nilIsZero: false
path:
- status
- - v1beta2
- conditions
valueFrom:
- lastTransitionTime
@@ -169,7 +165,7 @@ spec:
groupVersionKind:
group: cluster.x-k8s.io
kind: Cluster
- version: v1beta1
+ version: v1beta2
labelsFromPath:
name:
- metadata
@@ -231,10 +227,16 @@ spec:
- spec
- infrastructureRef
- name
- topology_class:
+ topology_classref_name:
- spec
- topology
- - class
+ - classRef
+ - name
+ topology_classref_namespace:
+ - spec
+ - topology
+ - classRef
+ - namespace
topology_version:
- spec
- topology
@@ -266,7 +268,6 @@ spec:
- Unknown
path:
- status
- - v1beta2
- conditions
valueFrom:
- status
@@ -283,7 +284,6 @@ spec:
nilIsZero: false
path:
- status
- - v1beta2
- conditions
valueFrom:
- lastTransitionTime
@@ -312,7 +312,7 @@ spec:
groupVersionKind:
group: cluster.x-k8s.io
kind: ClusterClass
- version: v1beta1
+ version: v1beta2
labelsFromPath:
name:
- metadata
@@ -386,7 +386,6 @@ spec:
- Unknown
path:
- status
- - v1beta2
- conditions
valueFrom:
- status
@@ -403,7 +402,6 @@ spec:
nilIsZero: false
path:
- status
- - v1beta2
- conditions
valueFrom:
- lastTransitionTime
@@ -415,7 +413,7 @@ spec:
groupVersionKind:
group: cluster.x-k8s.io
kind: Machine
- version: v1beta1
+ version: v1beta2
labelsFromPath:
cluster_name:
- spec
@@ -563,7 +561,6 @@ spec:
- Unknown
path:
- status
- - v1beta2
- conditions
valueFrom:
- status
@@ -580,7 +577,6 @@ spec:
nilIsZero: false
path:
- status
- - v1beta2
- conditions
valueFrom:
- lastTransitionTime
@@ -592,8 +588,6 @@ spec:
labelsFromPath:
node_name:
- name
- node_uid:
- - uid
path:
- status
- nodeRef
@@ -624,7 +618,7 @@ spec:
groupVersionKind:
group: cluster.x-k8s.io
kind: MachineDeployment
- version: v1beta1
+ version: v1beta2
labelsFromPath:
cluster_name:
- spec
@@ -743,6 +737,7 @@ spec:
nilIsZero: false
path:
- spec
+ - rollout
- strategy
- rollingUpdate
- maxSurge
@@ -756,6 +751,7 @@ spec:
nilIsZero: false
path:
- spec
+ - rollout
- strategy
- rollingUpdate
- maxUnavailable
@@ -775,7 +771,6 @@ spec:
- Unknown
path:
- status
- - v1beta2
- conditions
valueFrom:
- status
@@ -792,7 +787,6 @@ spec:
nilIsZero: false
path:
- status
- - v1beta2
- conditions
valueFrom:
- lastTransitionTime
@@ -850,27 +844,17 @@ spec:
nilIsZero: true
path:
- status
- - unavailableReplicas
- valueFrom: null
- type: Gauge
- help: The number of unavailable replicas per machinedeployment.
- name: status_replicas_unavailable
- - each:
- gauge:
- nilIsZero: true
- path:
- - status
- - updatedReplicas
+ - upToDateReplicas
valueFrom: null
type: Gauge
- help: The number of updated replicas per machinedeployment.
- name: status_replicas_updated
+ help: The number of up-to-date replicas per machinedeployment.
+ name: status_replicas_uptodate
resourcePlural: ""
- errorLogV: 0
groupVersionKind:
group: cluster.x-k8s.io
kind: MachineHealthCheck
- version: v1beta1
+ version: v1beta2
labelsFromPath:
cluster_name:
- spec
@@ -911,9 +895,16 @@ spec:
- each:
info:
labelsFromPath:
- maxUnhealthy:
+ remediation_triggerif_unhealthyinrange:
- spec
- - maxUnhealthy
+ - remediation
+ - triggerIf
+ - unhealthyInRange
+ remediation_triggerif_unhealthylessthanorequalto:
+ - spec
+ - remediation
+ - triggerIf
+ - unhealthyLessThanOrEqualTo
path: null
type: Info
help: Information about a machinehealthcheck.
@@ -947,7 +938,6 @@ spec:
- Unknown
path:
- status
- - v1beta2
- conditions
valueFrom:
- status
@@ -964,7 +954,6 @@ spec:
nilIsZero: false
path:
- status
- - v1beta2
- conditions
valueFrom:
- lastTransitionTime
@@ -1006,7 +995,7 @@ spec:
groupVersionKind:
group: cluster.x-k8s.io
kind: MachinePool
- version: v1beta1
+ version: v1beta2
labelsFromPath:
cluster_name:
- spec
@@ -1126,7 +1115,6 @@ spec:
- Unknown
path:
- status
- - v1beta2
- conditions
valueFrom:
- status
@@ -1143,7 +1131,6 @@ spec:
nilIsZero: false
path:
- status
- - v1beta2
- conditions
valueFrom:
- lastTransitionTime
@@ -1201,17 +1188,17 @@ spec:
nilIsZero: true
path:
- status
- - unavailableReplicas
+ - upToDateReplicas
valueFrom: null
type: Gauge
- help: The number of unavailable replicas per machinepool.
- name: status_replicas_unavailable
+ help: The number of up-to-date replicas per machinepool.
+ name: status_replicas_uptodate
resourcePlural: ""
- errorLogV: 0
groupVersionKind:
group: cluster.x-k8s.io
kind: MachineSet
- version: v1beta1
+ version: v1beta2
labelsFromPath:
cluster_name:
- spec
@@ -1326,7 +1313,6 @@ spec:
- Unknown
path:
- status
- - v1beta2
- conditions
valueFrom:
- status
@@ -1343,7 +1329,6 @@ spec:
nilIsZero: false
path:
- status
- - v1beta2
- conditions
valueFrom:
- lastTransitionTime
@@ -1375,27 +1360,27 @@ spec:
nilIsZero: true
path:
- status
- - fullyLabeledReplicas
+ - readyReplicas
valueFrom: null
type: Gauge
- help: The number of fully labeled replicas per machineset.
- name: status_replicas_fully_labeled
+ help: The number of ready replicas per machineset.
+ name: status_replicas_ready
- each:
gauge:
nilIsZero: true
path:
- status
- - readyReplicas
+ - upToDateReplicas
valueFrom: null
type: Gauge
- help: The number of ready replicas per machineset.
- name: status_replicas_ready
+ help: The number of up-to-date replicas per machineset.
+ name: status_replicas_uptodate
resourcePlural: ""
- errorLogV: 0
groupVersionKind:
group: controlplane.cluster.x-k8s.io
kind: KubeadmControlPlane
- version: v1beta1
+ version: v1beta2
labelsFromPath:
cluster_name:
- metadata
@@ -1477,7 +1462,8 @@ spec:
nilIsZero: false
path:
- spec
- - rolloutStrategy
+ - rollout
+ - strategy
- rollingUpdate
- maxSurge
valueFrom: null
@@ -1497,7 +1483,6 @@ spec:
- Unknown
path:
- status
- - v1beta2
- conditions
valueFrom:
- status
@@ -1514,7 +1499,6 @@ spec:
nilIsZero: false
path:
- status
- - v1beta2
- conditions
valueFrom:
- lastTransitionTime
@@ -1536,37 +1520,37 @@ spec:
nilIsZero: true
path:
- status
- - readyReplicas
+ - availableReplicas
valueFrom: null
type: Gauge
- help: The number of ready replicas per kubeadmcontrolplane.
- name: status_replicas_ready
+ help: The number of available replicas per kubeadmcontrolplane.
+ name: status_replicas_available
- each:
gauge:
nilIsZero: true
path:
- status
- - unavailableReplicas
+ - readyReplicas
valueFrom: null
type: Gauge
- help: The number of unavailable replicas per kubeadmcontrolplane.
- name: status_replicas_unavailable
+ help: The number of ready replicas per kubeadmcontrolplane.
+ name: status_replicas_ready
- each:
gauge:
nilIsZero: true
path:
- status
- - updatedReplicas
+ - upToDateReplicas
valueFrom: null
type: Gauge
- help: The number of updated replicas per kubeadmcontrolplane.
- name: status_replicas_updated
+ help: The number of up-to-date replicas per kubeadmcontrolplane.
+ name: status_replicas_uptodate
resourcePlural: ""
- errorLogV: 0
groupVersionKind:
group: infrastructure.cluster.x-k8s.io
kind: DevCluster
- version: v1beta1
+ version: v1beta2
labelsFromPath:
cluster_name:
- metadata
@@ -1595,7 +1579,6 @@ spec:
- Unknown
path:
- status
- - v1beta2
- conditions
valueFrom:
- status
@@ -1612,7 +1595,6 @@ spec:
nilIsZero: false
path:
- status
- - v1beta2
- conditions
valueFrom:
- lastTransitionTime
@@ -1624,7 +1606,7 @@ spec:
groupVersionKind:
group: infrastructure.cluster.x-k8s.io
kind: DevMachine
- version: v1beta1
+ version: v1beta2
labelsFromPath:
cluster_name:
- metadata
@@ -1653,7 +1635,6 @@ spec:
- Unknown
path:
- status
- - v1beta2
- conditions
valueFrom:
- status
@@ -1670,7 +1651,6 @@ spec:
nilIsZero: false
path:
- status
- - v1beta2
- conditions
valueFrom:
- lastTransitionTime
@@ -1682,7 +1662,7 @@ spec:
groupVersionKind:
group: infrastructure.cluster.x-k8s.io
kind: DockerCluster
- version: v1beta1
+ version: v1beta2
labelsFromPath:
cluster_name:
- metadata
@@ -1711,7 +1691,6 @@ spec:
- Unknown
path:
- status
- - v1beta2
- conditions
valueFrom:
- status
@@ -1728,7 +1707,6 @@ spec:
nilIsZero: false
path:
- status
- - v1beta2
- conditions
valueFrom:
- lastTransitionTime
@@ -1740,7 +1718,7 @@ spec:
groupVersionKind:
group: infrastructure.cluster.x-k8s.io
kind: DockerMachine
- version: v1beta1
+ version: v1beta2
labelsFromPath:
cluster_name:
- metadata
@@ -1769,7 +1747,6 @@ spec:
- Unknown
path:
- status
- - v1beta2
- conditions
valueFrom:
- status
@@ -1786,7 +1763,6 @@ spec:
nilIsZero: false
path:
- status
- - v1beta2
- conditions
valueFrom:
- lastTransitionTime
@@ -1798,7 +1774,7 @@ spec:
groupVersionKind:
group: ipam.cluster.x-k8s.io
kind: IPAddressClaim
- version: v1beta1
+ version: v1beta2
labelsFromPath:
cluster_name:
- metadata
@@ -1827,7 +1803,6 @@ spec:
- Unknown
path:
- status
- - v1beta2
- conditions
valueFrom:
- status
@@ -1844,7 +1819,6 @@ spec:
nilIsZero: false
path:
- status
- - v1beta2
- conditions
valueFrom:
- lastTransitionTime
@@ -1856,7 +1830,7 @@ spec:
groupVersionKind:
group: runtime.cluster.x-k8s.io
kind: ExtensionConfig
- version: v1alpha1
+ version: v1beta2
labelsFromPath:
name:
- metadata
@@ -1881,7 +1855,6 @@ spec:
- Unknown
path:
- status
- - v1beta2
- conditions
valueFrom:
- status
@@ -1898,7 +1871,6 @@ spec:
nilIsZero: false
path:
- status
- - v1beta2
- conditions
valueFrom:
- lastTransitionTime
diff --git a/config/metrics/kustomization.yaml b/config/metrics/kustomization.yaml
index 3955c8d0d945..dafde062ccd5 100644
--- a/config/metrics/kustomization.yaml
+++ b/config/metrics/kustomization.yaml
@@ -2,9 +2,10 @@ resources:
- ./crd-clusterrole.yaml
namespace: observability
+namePrefix: kube-state-metrics-
configMapGenerator:
-- name: kube-state-metrics-crd-config-capi
+- name: crd-config-capi
files:
- capi.yaml=crd-metrics-config.yaml
options:
diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml
index ede44f1b35e0..dc6e7c20c0da 100644
--- a/config/webhook/manifests.yaml
+++ b/config/webhook/manifests.yaml
@@ -55,20 +55,20 @@ webhooks:
service:
name: webhook-service
namespace: system
- path: /mutate-cluster-x-k8s-io-v1beta2-machine
+ path: /mutate-runtime-cluster-x-k8s-io-v1beta2-extensionconfig
failurePolicy: Fail
matchPolicy: Equivalent
- name: default.machine.cluster.x-k8s.io
+ name: default.extensionconfig.runtime.addons.cluster.x-k8s.io
rules:
- apiGroups:
- - cluster.x-k8s.io
+ - runtime.cluster.x-k8s.io
apiVersions:
- v1beta2
operations:
- CREATE
- UPDATE
resources:
- - machines
+ - extensionconfigs
sideEffects: None
- admissionReviewVersions:
- v1
@@ -77,10 +77,10 @@ webhooks:
service:
name: webhook-service
namespace: system
- path: /mutate-cluster-x-k8s-io-v1beta2-machinedeployment
+ path: /mutate-cluster-x-k8s-io-v1beta2-machine
failurePolicy: Fail
matchPolicy: Equivalent
- name: default.machinedeployment.cluster.x-k8s.io
+ name: default.machine.cluster.x-k8s.io
rules:
- apiGroups:
- cluster.x-k8s.io
@@ -90,7 +90,7 @@ webhooks:
- CREATE
- UPDATE
resources:
- - machinedeployments
+ - machines
sideEffects: None
- admissionReviewVersions:
- v1
@@ -99,10 +99,10 @@ webhooks:
service:
name: webhook-service
namespace: system
- path: /mutate-cluster-x-k8s-io-v1beta2-machinehealthcheck
+ path: /mutate-cluster-x-k8s-io-v1beta2-machinedeployment
failurePolicy: Fail
matchPolicy: Equivalent
- name: default.machinehealthcheck.cluster.x-k8s.io
+ name: default.machinedeployment.cluster.x-k8s.io
rules:
- apiGroups:
- cluster.x-k8s.io
@@ -112,7 +112,7 @@ webhooks:
- CREATE
- UPDATE
resources:
- - machinehealthchecks
+ - machinedeployments
sideEffects: None
- admissionReviewVersions:
- v1
@@ -121,10 +121,10 @@ webhooks:
service:
name: webhook-service
namespace: system
- path: /mutate-cluster-x-k8s-io-v1beta2-machineset
+ path: /mutate-cluster-x-k8s-io-v1beta2-machinehealthcheck
failurePolicy: Fail
matchPolicy: Equivalent
- name: default.machineset.cluster.x-k8s.io
+ name: default.machinehealthcheck.cluster.x-k8s.io
rules:
- apiGroups:
- cluster.x-k8s.io
@@ -134,7 +134,7 @@ webhooks:
- CREATE
- UPDATE
resources:
- - machinesets
+ - machinehealthchecks
sideEffects: None
- admissionReviewVersions:
- v1
@@ -143,20 +143,20 @@ webhooks:
service:
name: webhook-service
namespace: system
- path: /mutate-runtime-cluster-x-k8s-io-v1beta2-extensionconfig
+ path: /mutate-cluster-x-k8s-io-v1beta2-machinepool
failurePolicy: Fail
matchPolicy: Equivalent
- name: default.extensionconfig.runtime.addons.cluster.x-k8s.io
+ name: default.machinepool.cluster.x-k8s.io
rules:
- apiGroups:
- - runtime.cluster.x-k8s.io
+ - cluster.x-k8s.io
apiVersions:
- v1beta2
operations:
- CREATE
- UPDATE
resources:
- - extensionconfigs
+ - machinepools
sideEffects: None
- admissionReviewVersions:
- v1
@@ -165,10 +165,10 @@ webhooks:
service:
name: webhook-service
namespace: system
- path: /mutate-cluster-x-k8s-io-v1beta2-machinepool
+ path: /mutate-cluster-x-k8s-io-v1beta2-machineset
failurePolicy: Fail
matchPolicy: Equivalent
- name: default.machinepool.cluster.x-k8s.io
+ name: default.machineset.cluster.x-k8s.io
rules:
- apiGroups:
- cluster.x-k8s.io
@@ -178,7 +178,7 @@ webhooks:
- CREATE
- UPDATE
resources:
- - machinepools
+ - machinesets
sideEffects: None
---
apiVersion: admissionregistration.k8s.io/v1
@@ -283,20 +283,20 @@ webhooks:
service:
name: webhook-service
namespace: system
- path: /validate-cluster-x-k8s-io-v1beta2-machine
+ path: /validate-runtime-cluster-x-k8s-io-v1beta2-extensionconfig
failurePolicy: Fail
matchPolicy: Equivalent
- name: validation.machine.cluster.x-k8s.io
+ name: validation.extensionconfig.runtime.cluster.x-k8s.io
rules:
- apiGroups:
- - cluster.x-k8s.io
+ - runtime.cluster.x-k8s.io
apiVersions:
- v1beta2
operations:
- CREATE
- UPDATE
resources:
- - machines
+ - extensionconfigs
sideEffects: None
- admissionReviewVersions:
- v1
@@ -305,20 +305,21 @@ webhooks:
service:
name: webhook-service
namespace: system
- path: /validate-cluster-x-k8s-io-v1beta2-machinedeployment
+ path: /validate-ipam-cluster-x-k8s-io-v1beta2-ipaddress
failurePolicy: Fail
matchPolicy: Equivalent
- name: validation.machinedeployment.cluster.x-k8s.io
+ name: validation.ipaddress.ipam.cluster.x-k8s.io
rules:
- apiGroups:
- - cluster.x-k8s.io
+ - ipam.cluster.x-k8s.io
apiVersions:
- v1beta2
operations:
- CREATE
- UPDATE
+ - DELETE
resources:
- - machinedeployments
+ - ipaddresses
sideEffects: None
- admissionReviewVersions:
- v1
@@ -327,20 +328,21 @@ webhooks:
service:
name: webhook-service
namespace: system
- path: /validate-cluster-x-k8s-io-v1beta2-machinedrainrule
+ path: /validate-ipam-cluster-x-k8s-io-v1beta2-ipaddressclaim
failurePolicy: Fail
matchPolicy: Equivalent
- name: validation.machinedrainrule.cluster.x-k8s.io
+ name: validation.ipaddressclaim.ipam.cluster.x-k8s.io
rules:
- apiGroups:
- - cluster.x-k8s.io
+ - ipam.cluster.x-k8s.io
apiVersions:
- v1beta2
operations:
- CREATE
- UPDATE
+ - DELETE
resources:
- - machinedrainrules
+ - ipaddressclaims
sideEffects: None
- admissionReviewVersions:
- v1
@@ -349,10 +351,10 @@ webhooks:
service:
name: webhook-service
namespace: system
- path: /validate-cluster-x-k8s-io-v1beta2-machinehealthcheck
+ path: /validate-cluster-x-k8s-io-v1beta2-machine
failurePolicy: Fail
matchPolicy: Equivalent
- name: validation.machinehealthcheck.cluster.x-k8s.io
+ name: validation.machine.cluster.x-k8s.io
rules:
- apiGroups:
- cluster.x-k8s.io
@@ -362,7 +364,7 @@ webhooks:
- CREATE
- UPDATE
resources:
- - machinehealthchecks
+ - machines
sideEffects: None
- admissionReviewVersions:
- v1
@@ -371,10 +373,10 @@ webhooks:
service:
name: webhook-service
namespace: system
- path: /validate-cluster-x-k8s-io-v1beta2-machineset
+ path: /validate-cluster-x-k8s-io-v1beta2-machinedeployment
failurePolicy: Fail
matchPolicy: Equivalent
- name: validation.machineset.cluster.x-k8s.io
+ name: validation.machinedeployment.cluster.x-k8s.io
rules:
- apiGroups:
- cluster.x-k8s.io
@@ -384,7 +386,7 @@ webhooks:
- CREATE
- UPDATE
resources:
- - machinesets
+ - machinedeployments
sideEffects: None
- admissionReviewVersions:
- v1
@@ -393,20 +395,20 @@ webhooks:
service:
name: webhook-service
namespace: system
- path: /validate-runtime-cluster-x-k8s-io-v1beta2-extensionconfig
+ path: /validate-cluster-x-k8s-io-v1beta2-machinedrainrule
failurePolicy: Fail
matchPolicy: Equivalent
- name: validation.extensionconfig.runtime.cluster.x-k8s.io
+ name: validation.machinedrainrule.cluster.x-k8s.io
rules:
- apiGroups:
- - runtime.cluster.x-k8s.io
+ - cluster.x-k8s.io
apiVersions:
- v1beta2
operations:
- CREATE
- UPDATE
resources:
- - extensionconfigs
+ - machinedrainrules
sideEffects: None
- admissionReviewVersions:
- v1
@@ -415,10 +417,10 @@ webhooks:
service:
name: webhook-service
namespace: system
- path: /validate-cluster-x-k8s-io-v1beta2-machinepool
+ path: /validate-cluster-x-k8s-io-v1beta2-machinehealthcheck
failurePolicy: Fail
matchPolicy: Equivalent
- name: validation.machinepool.cluster.x-k8s.io
+ name: validation.machinehealthcheck.cluster.x-k8s.io
rules:
- apiGroups:
- cluster.x-k8s.io
@@ -428,7 +430,7 @@ webhooks:
- CREATE
- UPDATE
resources:
- - machinepools
+ - machinehealthchecks
sideEffects: None
- admissionReviewVersions:
- v1
@@ -437,21 +439,20 @@ webhooks:
service:
name: webhook-service
namespace: system
- path: /validate-ipam-cluster-x-k8s-io-v1beta2-ipaddress
+ path: /validate-cluster-x-k8s-io-v1beta2-machinepool
failurePolicy: Fail
matchPolicy: Equivalent
- name: validation.ipaddress.ipam.cluster.x-k8s.io
+ name: validation.machinepool.cluster.x-k8s.io
rules:
- apiGroups:
- - ipam.cluster.x-k8s.io
+ - cluster.x-k8s.io
apiVersions:
- v1beta2
operations:
- CREATE
- UPDATE
- - DELETE
resources:
- - ipaddresses
+ - machinepools
sideEffects: None
- admissionReviewVersions:
- v1
@@ -460,19 +461,18 @@ webhooks:
service:
name: webhook-service
namespace: system
- path: /validate-ipam-cluster-x-k8s-io-v1beta2-ipaddressclaim
+ path: /validate-cluster-x-k8s-io-v1beta2-machineset
failurePolicy: Fail
matchPolicy: Equivalent
- name: validation.ipaddressclaim.ipam.cluster.x-k8s.io
+ name: validation.machineset.cluster.x-k8s.io
rules:
- apiGroups:
- - ipam.cluster.x-k8s.io
+ - cluster.x-k8s.io
apiVersions:
- v1beta2
operations:
- CREATE
- UPDATE
- - DELETE
resources:
- - ipaddressclaims
+ - machinesets
sideEffects: None
diff --git a/controllers/alias.go b/controllers/alias.go
index 63895489b137..b8fc4d21e103 100644
--- a/controllers/alias.go
+++ b/controllers/alias.go
@@ -34,9 +34,11 @@ import (
clusterclasscontroller "sigs.k8s.io/cluster-api/internal/controllers/clusterclass"
"sigs.k8s.io/cluster-api/internal/controllers/clusterresourceset"
"sigs.k8s.io/cluster-api/internal/controllers/clusterresourcesetbinding"
+ extensionconfigcontroller "sigs.k8s.io/cluster-api/internal/controllers/extensionconfig"
machinecontroller "sigs.k8s.io/cluster-api/internal/controllers/machine"
machinedeploymentcontroller "sigs.k8s.io/cluster-api/internal/controllers/machinedeployment"
machinehealthcheckcontroller "sigs.k8s.io/cluster-api/internal/controllers/machinehealthcheck"
+ machinepoolcontroller "sigs.k8s.io/cluster-api/internal/controllers/machinepool"
machinesetcontroller "sigs.k8s.io/cluster-api/internal/controllers/machineset"
clustertopologycontroller "sigs.k8s.io/cluster-api/internal/controllers/topology/cluster"
machinedeploymenttopologycontroller "sigs.k8s.io/cluster-api/internal/controllers/topology/machinedeployment"
@@ -70,9 +72,10 @@ func (r *ClusterReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manag
// MachineReconciler reconciles a Machine object.
type MachineReconciler struct {
- Client client.Client
- APIReader client.Reader
- ClusterCache clustercache.ClusterCache
+ Client client.Client
+ APIReader client.Reader
+ ClusterCache clustercache.ClusterCache
+ RuntimeClient runtimeclient.Client
// WatchFilterValue is the label value used to filter events prior to reconciliation.
WatchFilterValue string
@@ -88,6 +91,7 @@ func (r *MachineReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manag
Client: r.Client,
APIReader: r.APIReader,
ClusterCache: r.ClusterCache,
+ RuntimeClient: r.RuntimeClient,
WatchFilterValue: r.WatchFilterValue,
RemoteConditionsGracePeriod: r.RemoteConditionsGracePeriod,
AdditionalSyncMachineLabels: r.AdditionalSyncMachineLabels,
@@ -119,8 +123,9 @@ func (r *MachineSetReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Ma
// MachineDeploymentReconciler reconciles a MachineDeployment object.
type MachineDeploymentReconciler struct {
- Client client.Client
- APIReader client.Reader
+ Client client.Client
+ APIReader client.Reader
+ RuntimeClient runtimeclient.Client
// WatchFilterValue is the label value used to filter events prior to reconciliation.
WatchFilterValue string
@@ -130,6 +135,7 @@ func (r *MachineDeploymentReconciler) SetupWithManager(ctx context.Context, mgr
return (&machinedeploymentcontroller.Reconciler{
Client: r.Client,
APIReader: r.APIReader,
+ RuntimeClient: r.RuntimeClient,
WatchFilterValue: r.WatchFilterValue,
}).SetupWithManager(ctx, mgr, options)
}
@@ -279,3 +285,45 @@ func (r *ClusterResourceSetBindingReconciler) SetupWithManager(ctx context.Conte
WatchFilterValue: r.WatchFilterValue,
}).SetupWithManager(ctx, mgr, options)
}
+
+// MachinePoolReconciler reconciles a MachinePool object.
+type MachinePoolReconciler struct {
+ Client client.Client
+ APIReader client.Reader
+ ClusterCache clustercache.ClusterCache
+
+ // WatchFilterValue is the label value used to filter events prior to reconciliation.
+ WatchFilterValue string
+}
+
+func (r *MachinePoolReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error {
+ return (&machinepoolcontroller.Reconciler{
+ Client: r.Client,
+ APIReader: r.APIReader,
+ ClusterCache: r.ClusterCache,
+ WatchFilterValue: r.WatchFilterValue,
+ }).SetupWithManager(ctx, mgr, options)
+}
+
+// ExtensionConfigReconciler reconciles an ExtensionConfig object.
+type ExtensionConfigReconciler struct {
+ Client client.Client
+ APIReader client.Reader
+ RuntimeClient runtimeclient.Client
+ PartialSecretCache cache.Cache
+ ReadOnly bool
+
+ // WatchFilterValue is the label value used to filter events prior to reconciliation.
+ WatchFilterValue string
+}
+
+func (r *ExtensionConfigReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error {
+ return (&extensionconfigcontroller.Reconciler{
+ Client: r.Client,
+ APIReader: r.APIReader,
+ RuntimeClient: r.RuntimeClient,
+ PartialSecretCache: r.PartialSecretCache,
+ ReadOnly: r.ReadOnly,
+ WatchFilterValue: r.WatchFilterValue,
+ }).SetupWithManager(ctx, mgr, options)
+}
diff --git a/controllers/clustercache/cluster_accessor.go b/controllers/clustercache/cluster_accessor.go
index 0bbc92f2380d..d981607cd6ac 100644
--- a/controllers/clustercache/cluster_accessor.go
+++ b/controllers/clustercache/cluster_accessor.go
@@ -82,6 +82,10 @@ type clusterAccessorConfig struct {
// connection after creating a connection failed.
ConnectionCreationRetryInterval time.Duration
+ // DisableClientCertificatePrivateKey is the flag to disable the creation of the client
+ // certificate private key.
+ DisableClientCertificatePrivateKey bool
+
// Cache is the config used for the cache that the clusterAccessor creates.
Cache *clusterAccessorCacheConfig
@@ -191,6 +195,10 @@ type clusterAccessorLockedConnectionState struct {
// all typed objects except the ones for which caching has been disabled via DisableFor.
cachedClient client.Client
+ // uncachedClient to communicate with the workload cluster.
+ // It performs live GET/LIST calls directly against the API server with no caching.
+ uncachedClient client.Client
+
// cache is the cache used by the client.
// It manages informers that have been created e.g. by adding indexes to the cache,
// Get & List calls from the client or via the Watch method of the clusterAccessor.
@@ -280,7 +288,7 @@ func (ca *clusterAccessor) Connect(ctx context.Context) (retErr error) {
// Only generate the clientCertificatePrivateKey once as there is no need to regenerate it after disconnect/connect.
// Note: This has to be done before setting connection, because otherwise this code wouldn't be re-entrant if the
// private key generation fails because we check Connected above.
- if ca.lockedState.clientCertificatePrivateKey == nil {
+ if ca.lockedState.clientCertificatePrivateKey == nil && !ca.config.DisableClientCertificatePrivateKey {
log.V(6).Info("Generating client certificate private key")
clientCertificatePrivateKey, err := certs.NewPrivateKey()
if err != nil {
@@ -297,11 +305,12 @@ func (ca *clusterAccessor) Connect(ctx context.Context) (retErr error) {
consecutiveFailures: 0,
}
ca.lockedState.connection = &clusterAccessorLockedConnectionState{
- restConfig: connection.RESTConfig,
- restClient: connection.RESTClient,
- cachedClient: connection.CachedClient,
- cache: connection.Cache,
- watches: sets.Set[string]{},
+ restConfig: connection.RESTConfig,
+ restClient: connection.RESTClient,
+ cachedClient: connection.CachedClient,
+ uncachedClient: connection.UncachedClient,
+ cache: connection.Cache,
+ watches: sets.Set[string]{},
}
return nil
@@ -407,6 +416,18 @@ func (ca *clusterAccessor) GetReader(ctx context.Context) (client.Reader, error)
return ca.lockedState.connection.cachedClient, nil
}
+// GetUncachedClient returns a live (uncached) client for the given cluster.
+func (ca *clusterAccessor) GetUncachedClient(ctx context.Context) (client.Client, error) {
+ ca.rLock(ctx)
+ defer ca.rUnlock(ctx)
+
+ if ca.lockedState.connection == nil {
+ return nil, errors.Wrapf(ErrClusterNotConnected, "error getting uncached client")
+ }
+
+ return ca.lockedState.connection.uncachedClient, nil
+}
+
func (ca *clusterAccessor) GetRESTConfig(ctx context.Context) (*rest.Config, error) {
ca.rLock(ctx)
defer ca.rUnlock(ctx)
diff --git a/controllers/clustercache/cluster_accessor_client.go b/controllers/clustercache/cluster_accessor_client.go
index 7e5ae2484626..8cc9a0a6340c 100644
--- a/controllers/clustercache/cluster_accessor_client.go
+++ b/controllers/clustercache/cluster_accessor_client.go
@@ -42,10 +42,11 @@ import (
)
type createConnectionResult struct {
- RESTConfig *rest.Config
- RESTClient *rest.RESTClient
- CachedClient client.Client
- Cache *stoppableCache
+ RESTConfig *rest.Config
+ RESTClient *rest.RESTClient
+ CachedClient client.Client
+ UncachedClient client.Client
+ Cache *stoppableCache
}
func (ca *clusterAccessor) createConnection(ctx context.Context) (*createConnectionResult, error) {
@@ -97,6 +98,12 @@ func (ca *clusterAccessor) createConnection(ctx context.Context) (*createConnect
if err != nil {
return nil, errors.Wrapf(err, "error creating HTTP client and mapper (using in-cluster config)")
}
+
+ log.V(6).Info(fmt.Sprintf("Creating uncached client with updated REST config with host %q", restConfig.Host))
+ uncachedClient, err = createUncachedClient(ca.config.Scheme, restConfig, httpClient, mapper)
+ if err != nil {
+ return nil, errors.Wrapf(err, "error creating uncached client (using in-cluster config)")
+ }
}
log.V(6).Info("Creating cached client and cache")
@@ -106,10 +113,11 @@ func (ca *clusterAccessor) createConnection(ctx context.Context) (*createConnect
}
return &createConnectionResult{
- RESTConfig: restConfig,
- RESTClient: restClient,
- CachedClient: cachedClient,
- Cache: cache,
+ RESTConfig: restConfig,
+ RESTClient: restClient,
+ CachedClient: cachedClient,
+ UncachedClient: uncachedClient,
+ Cache: cache,
}, nil
}
@@ -208,7 +216,7 @@ func createUncachedClient(scheme *runtime.Scheme, config *rest.Config, httpClien
return nil, errors.Wrapf(err, "error creating uncached client")
}
- return uncachedClient, nil
+ return newClientWithTimeout(uncachedClient, config.Timeout), nil
}
// createCachedClient creates a cached client for the given cluster, based on the rest.Config.
diff --git a/controllers/clustercache/cluster_accessor_test.go b/controllers/clustercache/cluster_accessor_test.go
index bfe5acdf1d88..c3fb117b69f1 100644
--- a/controllers/clustercache/cluster_accessor_test.go
+++ b/controllers/clustercache/cluster_accessor_test.go
@@ -76,8 +76,13 @@ func TestConnect(t *testing.T) {
}, nil)
accessor := newClusterAccessor(context.Background(), clusterKey, config)
+ // Before connect, getting the uncached client should fail with ErrClusterNotConnected
+ _, err := accessor.GetUncachedClient(ctx)
+ g.Expect(err).To(HaveOccurred())
+ g.Expect(errors.Is(err, ErrClusterNotConnected)).To(BeTrue())
+
// Connect when kubeconfig Secret doesn't exist (should fail)
- err := accessor.Connect(ctx)
+ err = accessor.Connect(ctx)
g.Expect(err).To(HaveOccurred())
g.Expect(err.Error()).To(Equal("error creating REST config: error getting kubeconfig secret: Secret \"test-cluster-kubeconfig\" not found"))
g.Expect(accessor.Connected(ctx)).To(BeFalse())
@@ -136,6 +141,16 @@ func TestConnect(t *testing.T) {
g.Expect(accessor.lockedState.healthChecking.lastProbeSuccessTime.IsZero()).To(BeFalse())
g.Expect(accessor.lockedState.healthChecking.consecutiveFailures).To(Equal(0))
+ // After connect, getting the uncached client should succeed
+ r, err := accessor.GetUncachedClient(ctx)
+ g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(r).ToNot(BeNil())
+
+ // List Nodes via the uncached client
+ nodeListUncached := &corev1.NodeList{}
+ g.Expect(r.List(ctx, nodeListUncached)).To(Succeed())
+ g.Expect(nodeListUncached.Items).To(BeEmpty())
+
// Get client and test Get & List
c, err := accessor.GetClient(ctx)
g.Expect(err).ToNot(HaveOccurred())
@@ -150,6 +165,11 @@ func TestConnect(t *testing.T) {
// Disconnect
accessor.Disconnect(ctx)
g.Expect(accessor.Connected(ctx)).To(BeFalse())
+
+ // After disconnect, getting the uncached client should fail with ErrClusterNotConnected
+ _, err = accessor.GetUncachedClient(ctx)
+ g.Expect(err).To(HaveOccurred())
+ g.Expect(errors.Is(err, ErrClusterNotConnected)).To(BeTrue())
}
func TestDisconnect(t *testing.T) {
diff --git a/controllers/clustercache/cluster_cache.go b/controllers/clustercache/cluster_cache.go
index 06d64f39863f..cf4d20ffafac 100644
--- a/controllers/clustercache/cluster_cache.go
+++ b/controllers/clustercache/cluster_cache.go
@@ -44,6 +44,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/source"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ capicontrollerutil "sigs.k8s.io/cluster-api/internal/util/controller"
"sigs.k8s.io/cluster-api/util/predicates"
)
@@ -134,6 +135,10 @@ type ClusterCache interface {
// If there is no connection to the workload cluster ErrClusterNotConnected will be returned.
GetReader(ctx context.Context, cluster client.ObjectKey) (client.Reader, error)
+ // GetUncachedClient returns a live (uncached) client for the given cluster.
+ // If there is no connection to the workload cluster ErrClusterNotConnected will be returned.
+ GetUncachedClient(ctx context.Context, cluster client.ObjectKey) (client.Client, error)
+
// GetRESTConfig returns a REST config for the given cluster.
// If there is no connection to the workload cluster ErrClusterNotConnected will be returned.
GetRESTConfig(ctx context.Context, cluster client.ObjectKey) (*rest.Config, error)
@@ -143,6 +148,9 @@ type ClusterCache interface {
// cert to communicate with etcd.
// This private key is stored and cached in the ClusterCache because it's expensive to generate a new
// private key in every single Reconcile.
+ //
+ // Deprecated: This method is deprecated and will be removed in a future release as caching a rsa.PrivateKey
+ // is outside the scope of the ClusterCache.
GetClientCertificatePrivateKey(ctx context.Context, cluster client.ObjectKey) (*rsa.PrivateKey, error)
// Watch watches a workload cluster for events.
@@ -321,7 +329,8 @@ func SetupWithManager(ctx context.Context, mgr manager.Manager, options Options,
cacheCtxCancel: cacheCtxCancel,
}
- err := ctrl.NewControllerManagedBy(mgr).
+ predicateLog := ctrl.LoggerFrom(ctx).WithValues("controller", "clustercache")
+ err := capicontrollerutil.NewControllerManagedBy(mgr, predicateLog).
Named("clustercache").
For(&clusterv1.Cluster{}).
WithOptions(controllerOptions).
@@ -392,6 +401,16 @@ func (cc *clusterCache) GetReader(ctx context.Context, cluster client.ObjectKey)
return accessor.GetReader(ctx)
}
+// GetUncachedClient returns a live (uncached) client for the given cluster.
+// If there is no connection to the workload cluster ErrClusterNotConnected will be returned.
+func (cc *clusterCache) GetUncachedClient(ctx context.Context, cluster client.ObjectKey) (client.Client, error) {
+ accessor := cc.getClusterAccessor(cluster)
+ if accessor == nil {
+ return nil, errors.Wrapf(ErrClusterNotConnected, "error getting uncached client")
+ }
+ return accessor.GetUncachedClient(ctx)
+}
+
func (cc *clusterCache) GetRESTConfig(ctx context.Context, cluster client.ObjectKey) (*rest.Config, error) {
accessor := cc.getClusterAccessor(cluster)
if accessor == nil {
@@ -681,6 +700,12 @@ func (cc *clusterCache) SetConnectionCreationRetryInterval(interval time.Duratio
cc.clusterAccessorConfig.ConnectionCreationRetryInterval = interval
}
+// DisablePrivateKeyGeneration can be used to disable the creation of cluster cert private key on clusteraccessor.
+// This method should only be used for tests and is not part of the public ClusterCache interface.
+func (cc *clusterCache) DisablePrivateKeyGeneration() {
+ cc.clusterAccessorConfig.DisableClientCertificatePrivateKey = true
+}
+
// Shutdown can be used to shut down the ClusterCache in unit tests.
// This method should only be used for tests because it hasn't been designed for production usage
// in a manager (race conditions with manager shutdown etc.).
diff --git a/controllers/clustercache/cluster_cache_fake.go b/controllers/clustercache/cluster_cache_fake.go
index b6e44c4038f3..f4f44b3da097 100644
--- a/controllers/clustercache/cluster_cache_fake.go
+++ b/controllers/clustercache/cluster_cache_fake.go
@@ -32,8 +32,9 @@ func NewFakeClusterCache(workloadClient client.Client, clusterKey client.ObjectK
testCacheTracker.clusterAccessors[clusterKey] = &clusterAccessor{
lockedState: clusterAccessorLockedState{
connection: &clusterAccessorLockedConnectionState{
- cachedClient: workloadClient,
- watches: sets.Set[string]{}.Insert(watchObjects...),
+ cachedClient: workloadClient,
+ uncachedClient: workloadClient,
+ watches: sets.Set[string]{}.Insert(watchObjects...),
},
healthChecking: clusterAccessorLockedHealthCheckingState{
lastProbeTime: time.Now(),
@@ -44,3 +45,8 @@ func NewFakeClusterCache(workloadClient client.Client, clusterKey client.ObjectK
}
return testCacheTracker
}
+
+// NewFakeEmptyClusterCache creates a new empty ClusterCache that can be used by unit tests.
+func NewFakeEmptyClusterCache() ClusterCache {
+ return &clusterCache{}
+}
diff --git a/controllers/crdmigrator/crd_migrator.go b/controllers/crdmigrator/crd_migrator.go
index 4fdf83e8da49..e56110fd0ba8 100644
--- a/controllers/crdmigrator/crd_migrator.go
+++ b/controllers/crdmigrator/crd_migrator.go
@@ -45,6 +45,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/controller"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ capicontrollerutil "sigs.k8s.io/cluster-api/internal/util/controller"
"sigs.k8s.io/cluster-api/util/cache"
"sigs.k8s.io/cluster-api/util/contract"
"sigs.k8s.io/cluster-api/util/predicates"
@@ -121,7 +122,7 @@ func (r *CRDMigrator) SetupWithManager(ctx context.Context, mgr ctrl.Manager, co
}
predicateLog := ctrl.LoggerFrom(ctx).WithValues("controller", "crdmigrator")
- err := ctrl.NewControllerManagedBy(mgr).
+ err := capicontrollerutil.NewControllerManagedBy(mgr, predicateLog).
For(&apiextensionsv1.CustomResourceDefinition{},
// This controller uses a PartialObjectMetadata watch/informer to avoid an informer for CRDs
// to reduce memory usage.
@@ -412,7 +413,7 @@ func (r *CRDMigrator) reconcileStorageVersionMigration(ctx context.Context, crd
if migrationConfig.UseStatusForStorageVersionMigration {
err = r.Client.Status().Patch(ctx, u, client.Apply, client.FieldOwner("crdmigrator"))
} else {
- err = r.Client.Patch(ctx, u, client.Apply, client.FieldOwner("crdmigrator"))
+ err = r.Client.Apply(ctx, client.ApplyConfigurationFromUnstructured(u), client.FieldOwner("crdmigrator"))
}
// If we got a NotFound error, the object no longer exists so no need to update it.
// If we got a Conflict error, another client wrote the object already so no need to update it.
diff --git a/controllers/crdmigrator/crd_migrator_test.go b/controllers/crdmigrator/crd_migrator_test.go
index 1000ac050eb7..ba8667fb216e 100644
--- a/controllers/crdmigrator/crd_migrator_test.go
+++ b/controllers/crdmigrator/crd_migrator_test.go
@@ -195,10 +195,10 @@ func TestReconcile(t *testing.T) {
// Deploy test-cluster-1 and test-cluster-2.
testClusterT1 := unstructuredTestCluster("test-cluster-1", t1v1beta1.GroupVersion.WithKind("TestCluster"))
g.Expect(unstructured.SetNestedField(testClusterT1.Object, "foo-value", "spec", "foo")).To(Succeed())
- g.Expect(managerT1.GetClient().Patch(ctx, testClusterT1, client.Apply, fieldOwner)).To(Succeed())
+ g.Expect(managerT1.GetClient().Apply(ctx, client.ApplyConfigurationFromUnstructured(testClusterT1), fieldOwner)).To(Succeed())
testClusterT1 = unstructuredTestCluster("test-cluster-2", t1v1beta1.GroupVersion.WithKind("TestCluster"))
g.Expect(unstructured.SetNestedField(testClusterT1.Object, "foo-value", "spec", "foo")).To(Succeed())
- g.Expect(managerT1.GetClient().Patch(ctx, testClusterT1, client.Apply, fieldOwner)).To(Succeed())
+ g.Expect(managerT1.GetClient().Apply(ctx, client.ApplyConfigurationFromUnstructured(testClusterT1), fieldOwner)).To(Succeed())
validateManagedFields(t, g, "v1beta1", map[string][]string{
"test-cluster-1": {"test.cluster.x-k8s.io/v1beta1"},
"test-cluster-2": {"test.cluster.x-k8s.io/v1beta1"},
@@ -226,11 +226,11 @@ func TestReconcile(t *testing.T) {
// Set an additional field with a different field manager and v1beta2 apiVersion in test-cluster-2
testClusterT2 := unstructuredTestCluster("test-cluster-2", t2v1beta2.GroupVersion.WithKind("TestCluster"))
g.Expect(unstructured.SetNestedField(testClusterT2.Object, "bar-value", "spec", "bar")).To(Succeed())
- g.Expect(managerT2.GetClient().Patch(ctx, testClusterT2, client.Apply, client.FieldOwner("different-unit-test-client"))).To(Succeed())
+ g.Expect(managerT2.GetClient().Apply(ctx, client.ApplyConfigurationFromUnstructured(testClusterT2), client.FieldOwner("different-unit-test-client"))).To(Succeed())
// Deploy test-cluster-3.
testClusterT2 = unstructuredTestCluster("test-cluster-3", t2v1beta2.GroupVersion.WithKind("TestCluster"))
g.Expect(unstructured.SetNestedField(testClusterT2.Object, "foo-value", "spec", "foo")).To(Succeed())
- g.Expect(managerT2.GetClient().Patch(ctx, testClusterT2, client.Apply, fieldOwner)).To(Succeed())
+ g.Expect(managerT2.GetClient().Apply(ctx, client.ApplyConfigurationFromUnstructured(testClusterT2), fieldOwner)).To(Succeed())
// At this point we have clusters with all combinations of managedField apiVersions.
validateManagedFields(t, g, "v1beta2", map[string][]string{
"test-cluster-1": {"test.cluster.x-k8s.io/v1beta1"},
@@ -323,7 +323,7 @@ func TestReconcile(t *testing.T) {
// Try to patch the test-clusters CRs with SSA.
testClusterT4 := unstructuredTestCluster(clusterName, t4v1beta2.GroupVersion.WithKind("TestCluster"))
g.Expect(unstructured.SetNestedField(testClusterT4.Object, "new-foo-value", "spec", "foo")).To(Succeed())
- err = managerT4.GetClient().Patch(ctx, testClusterT4, client.Apply, fieldOwner)
+ err = managerT4.GetClient().Apply(ctx, client.ApplyConfigurationFromUnstructured(testClusterT4), fieldOwner)
// If managedField cleanup was skipped before, the SSA patch will fail for the clusters which still have v1beta1 managedFields.
if skipCRDMigrationPhases.Has(CleanupManagedFieldsPhase) && (clusterName == "test-cluster-1" || clusterName == "test-cluster-2") {
diff --git a/controllers/crdmigrator/test/t1/crd/test.cluster.x-k8s.io_testclusters.yaml b/controllers/crdmigrator/test/t1/crd/test.cluster.x-k8s.io_testclusters.yaml
index 100c8844e266..93c784c367b4 100644
--- a/controllers/crdmigrator/test/t1/crd/test.cluster.x-k8s.io_testclusters.yaml
+++ b/controllers/crdmigrator/test/t1/crd/test.cluster.x-k8s.io_testclusters.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: testclusters.test.cluster.x-k8s.io
spec:
group: test.cluster.x-k8s.io
diff --git a/controllers/crdmigrator/test/t2/crd/test.cluster.x-k8s.io_testclusters.yaml b/controllers/crdmigrator/test/t2/crd/test.cluster.x-k8s.io_testclusters.yaml
index 497595ef1136..5b228b55e307 100644
--- a/controllers/crdmigrator/test/t2/crd/test.cluster.x-k8s.io_testclusters.yaml
+++ b/controllers/crdmigrator/test/t2/crd/test.cluster.x-k8s.io_testclusters.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: testclusters.test.cluster.x-k8s.io
spec:
group: test.cluster.x-k8s.io
diff --git a/controllers/crdmigrator/test/t3/crd/test.cluster.x-k8s.io_testclusters.yaml b/controllers/crdmigrator/test/t3/crd/test.cluster.x-k8s.io_testclusters.yaml
index 26026c0f3991..fe9779f3d0db 100644
--- a/controllers/crdmigrator/test/t3/crd/test.cluster.x-k8s.io_testclusters.yaml
+++ b/controllers/crdmigrator/test/t3/crd/test.cluster.x-k8s.io_testclusters.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: testclusters.test.cluster.x-k8s.io
spec:
group: test.cluster.x-k8s.io
diff --git a/controllers/crdmigrator/test/t4/crd/test.cluster.x-k8s.io_testclusters.yaml b/controllers/crdmigrator/test/t4/crd/test.cluster.x-k8s.io_testclusters.yaml
index dde0047add67..883127ebc120 100644
--- a/controllers/crdmigrator/test/t4/crd/test.cluster.x-k8s.io_testclusters.yaml
+++ b/controllers/crdmigrator/test/t4/crd/test.cluster.x-k8s.io_testclusters.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: testclusters.test.cluster.x-k8s.io
spec:
group: test.cluster.x-k8s.io
diff --git a/controllers/external/tracker_test.go b/controllers/external/tracker_test.go
index e24d69296731..92966d2c82bb 100644
--- a/controllers/external/tracker_test.go
+++ b/controllers/external/tracker_test.go
@@ -22,7 +22,6 @@ import (
"github.com/go-logr/logr"
. "github.com/onsi/gomega"
"github.com/pkg/errors"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/cache/informertest"
@@ -83,12 +82,7 @@ func TestWatchMultipleTimes(t *testing.T) {
ctrl := &watchCountController{}
tracker := ObjectTracker{Controller: ctrl, Scheme: runtime.NewScheme(), Cache: &informertest.FakeInformers{}, PredicateLogger: ptr.To(logr.New(log.NullLogSink{}))}
- obj := &clusterv1.Cluster{
- TypeMeta: metav1.TypeMeta{
- Kind: "Cluster",
- APIVersion: clusterv1.GroupVersion.Version,
- },
- }
+ obj := &clusterv1.Cluster{}
err := tracker.Watch(logger, obj, nil)
g.Expect(err).ToNot(HaveOccurred())
g.Expect(ctrl.count).Should(Equal(1))
diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml
index 1f43319a0864..5fc53686c597 100644
--- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml
+++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: kubeadmcontrolplanes.controlplane.cluster.x-k8s.io
spec:
group: controlplane.cluster.x-k8s.io
@@ -733,9 +733,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -908,9 +907,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -1874,9 +1872,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -2052,9 +2049,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -2555,8 +2551,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2614,6 +2611,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount
+ containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -2771,8 +2805,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2830,6 +2865,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount
+ containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -3021,8 +3093,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -3081,6 +3154,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -3257,8 +3367,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -3316,6 +3427,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount
+ containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -3791,9 +3939,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -4196,9 +4343,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -5119,8 +5265,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -5178,6 +5325,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount
+ containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -5369,8 +5553,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -5428,6 +5613,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount
+ containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -5549,6 +5771,22 @@ spec:
minLength: 1
type: string
type: object
+ encryptionAlgorithm:
+ description: |-
+ encryptionAlgorithm holds the type of asymmetric encryption algorithm used for keys and certificates.
+ Can be one of "RSA-2048", "RSA-3072", "RSA-4096", "ECDSA-P256" or "ECDSA-P384".
+ For Kubernetes 1.34 or above, "ECDSA-P384" is supported.
+ If not specified, Cluster API will use RSA-2048 as default.
+ When this field is modified every certificate generated afterward will use the new
+ encryptionAlgorithm. Existing CA certificates and service account keys are not rotated.
+ This field is only supported with Kubernetes v1.31 or above.
+ enum:
+ - ECDSA-P256
+ - ECDSA-P384
+ - RSA-2048
+ - RSA-3072
+ - RSA-4096
+ type: string
etcd:
description: |-
etcd holds configuration for etcd.
@@ -5654,8 +5892,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -5714,6 +5953,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -5820,16 +6096,7 @@ spec:
imageRepository:
description: |-
imageRepository sets the container registry to pull images from.
- * If not set, the default registry of kubeadm will be used, i.e.
- * registry.k8s.io (new registry): >= v1.22.17, >= v1.23.15, >= v1.24.9, >= v1.25.0
- * k8s.gcr.io (old registry): all older versions
- Please note that when imageRepository is not set we don't allow upgrades to
- versions >= v1.22.0 which use the old registry (k8s.gcr.io). Please use
- a newer patch version with the new registry instead (i.e. >= v1.22.17,
- >= v1.23.15, >= v1.24.9, >= v1.25.0).
- * If the version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`)
- `gcr.io/k8s-staging-ci-images` will be used as a default for control plane components
- and for kube-proxy, while `registry.k8s.io` will be used for all the other images.
+ If not set, the default registry of kubeadm will be used (registry.k8s.io).
maxLength: 512
minLength: 1
type: string
@@ -5881,8 +6148,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -5940,6 +6208,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount
+ containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -6453,9 +6758,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -6938,9 +7242,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -7511,13 +7814,7 @@ spec:
type: object
type: object
version:
- description: |-
- version defines the desired Kubernetes version.
- Please note that if kubeadmConfigSpec.ClusterConfiguration.imageRepository is not set
- we don't allow upgrades to versions >= v1.22.0 for which kubeadm uses the old registry (k8s.gcr.io).
- Please use a newer patch version with the new registry instead. The default registries of kubeadm are:
- * registry.k8s.io (new registry): >= v1.22.17, >= v1.23.15, >= v1.24.9, >= v1.25.0
- * k8s.gcr.io (old registry): all older versions
+ description: version defines the desired Kubernetes version.
maxLength: 256
minLength: 1
type: string
diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml
index badeef3309e0..694318b53ed9 100644
--- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml
+++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.18.0
+ controller-gen.kubebuilder.io/version: v0.19.0
name: kubeadmcontrolplanetemplates.controlplane.cluster.x-k8s.io
spec:
group: controlplane.cluster.x-k8s.io
@@ -674,9 +674,8 @@ spec:
be applied to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time
+ at which the taint was added.
format: date-time
type: string
value:
@@ -854,9 +853,8 @@ spec:
be applied to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time
+ at which the taint was added.
format: date-time
type: string
value:
@@ -1240,8 +1238,9 @@ spec:
variable present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -1301,6 +1300,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -1463,8 +1499,9 @@ spec:
variable present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -1524,6 +1561,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -1720,8 +1794,9 @@ spec:
variable present in a Container.
properties:
name:
- description: Name of the environment
- variable. Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -1784,6 +1859,44 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the
+ volume mount containing the
+ env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -1964,8 +2077,9 @@ spec:
variable present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2025,6 +2139,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -2512,9 +2663,8 @@ spec:
be applied to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time
+ at which the taint was added.
format: date-time
type: string
value:
@@ -2922,9 +3072,8 @@ spec:
be applied to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time
+ at which the taint was added.
format: date-time
type: string
value:
@@ -3486,8 +3635,9 @@ spec:
variable present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -3547,6 +3697,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -3744,8 +3931,9 @@ spec:
variable present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -3805,6 +3993,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -3931,6 +4156,22 @@ spec:
minLength: 1
type: string
type: object
+ encryptionAlgorithm:
+ description: |-
+ encryptionAlgorithm holds the type of asymmetric encryption algorithm used for keys and certificates.
+ Can be one of "RSA-2048", "RSA-3072", "RSA-4096", "ECDSA-P256" or "ECDSA-P384".
+ For Kubernetes 1.34 or above, "ECDSA-P384" is supported.
+ If not specified, Cluster API will use RSA-2048 as default.
+ When this field is modified every certificate generated afterward will use the new
+ encryptionAlgorithm. Existing CA certificates and service account keys are not rotated.
+ This field is only supported with Kubernetes v1.31 or above.
+ enum:
+ - ECDSA-P256
+ - ECDSA-P384
+ - RSA-2048
+ - RSA-3072
+ - RSA-4096
+ type: string
etcd:
description: |-
etcd holds configuration for etcd.
@@ -4039,8 +4280,9 @@ spec:
variable present in a Container.
properties:
name:
- description: Name of the environment
- variable. Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -4103,6 +4345,44 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the
+ volume mount containing the
+ env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -4213,16 +4493,7 @@ spec:
imageRepository:
description: |-
imageRepository sets the container registry to pull images from.
- * If not set, the default registry of kubeadm will be used, i.e.
- * registry.k8s.io (new registry): >= v1.22.17, >= v1.23.15, >= v1.24.9, >= v1.25.0
- * k8s.gcr.io (old registry): all older versions
- Please note that when imageRepository is not set we don't allow upgrades to
- versions >= v1.22.0 which use the old registry (k8s.gcr.io). Please use
- a newer patch version with the new registry instead (i.e. >= v1.22.17,
- >= v1.23.15, >= v1.24.9, >= v1.25.0).
- * If the version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`)
- `gcr.io/k8s-staging-ci-images` will be used as a default for control plane components
- and for kube-proxy, while `registry.k8s.io` will be used for all the other images.
+ If not set, the default registry of kubeadm will be used (registry.k8s.io).
maxLength: 512
minLength: 1
type: string
@@ -4275,8 +4546,9 @@ spec:
variable present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -4336,6 +4608,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -4862,9 +5171,8 @@ spec:
be applied to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time
+ at which the taint was added.
format: date-time
type: string
value:
@@ -5353,9 +5661,8 @@ spec:
be applied to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time
+ at which the taint was added.
format: date-time
type: string
value:
diff --git a/controlplane/kubeadm/config/manager/manager.yaml b/controlplane/kubeadm/config/manager/manager.yaml
index b5584d88551c..096ac647011a 100644
--- a/controlplane/kubeadm/config/manager/manager.yaml
+++ b/controlplane/kubeadm/config/manager/manager.yaml
@@ -22,7 +22,7 @@ spec:
- "--leader-elect"
- "--diagnostics-address=${CAPI_DIAGNOSTICS_ADDRESS:=:8443}"
- "--insecure-diagnostics=${CAPI_INSECURE_DIAGNOSTICS:=false}"
- - "--feature-gates=MachinePool=${EXP_MACHINE_POOL:=true},ClusterTopology=${CLUSTER_TOPOLOGY:=false},KubeadmBootstrapFormatIgnition=${EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION:=false},PriorityQueue=${EXP_PRIORITY_QUEUE:=false}"
+ - "--feature-gates=MachinePool=${EXP_MACHINE_POOL:=true},ClusterTopology=${CLUSTER_TOPOLOGY:=false},KubeadmBootstrapFormatIgnition=${EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION:=false},PriorityQueue=${EXP_PRIORITY_QUEUE:=false},ReconcilerRateLimiting=${EXP_RECONCILER_RATE_LIMITING:=false},InPlaceUpdates=${EXP_IN_PLACE_UPDATES:=false}"
image: controller:latest
name: manager
env:
diff --git a/controlplane/kubeadm/config/rbac/role.yaml b/controlplane/kubeadm/config/rbac/role.yaml
index ba9d19f28edb..37f7163123ea 100644
--- a/controlplane/kubeadm/config/rbac/role.yaml
+++ b/controlplane/kubeadm/config/rbac/role.yaml
@@ -11,12 +11,21 @@ rules:
verbs:
- create
- patch
+- apiGroups:
+ - ""
+ resources:
+ - namespaces
+ verbs:
+ - get
+ - list
+ - watch
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
+ - delete
- get
- list
- patch
@@ -90,3 +99,11 @@ rules:
- patch
- update
- watch
+- apiGroups:
+ - runtime.cluster.x-k8s.io
+ resources:
+ - extensionconfigs
+ verbs:
+ - get
+ - list
+ - watch
diff --git a/controlplane/kubeadm/controllers/alias.go b/controlplane/kubeadm/controllers/alias.go
index b0733f825be5..0c9453ffd881 100644
--- a/controlplane/kubeadm/controllers/alias.go
+++ b/controlplane/kubeadm/controllers/alias.go
@@ -27,12 +27,15 @@ import (
"sigs.k8s.io/cluster-api/controllers/clustercache"
kubeadmcontrolplanecontrollers "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/controllers"
+ runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client"
)
// KubeadmControlPlaneReconciler reconciles a KubeadmControlPlane object.
type KubeadmControlPlaneReconciler struct {
Client client.Client
+ APIReader client.Reader
SecretCachingClient client.Client
+ RuntimeClient runtimeclient.Client
ClusterCache clustercache.ClusterCache
EtcdDialTimeout time.Duration
@@ -49,7 +52,9 @@ type KubeadmControlPlaneReconciler struct {
func (r *KubeadmControlPlaneReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error {
return (&kubeadmcontrolplanecontrollers.KubeadmControlPlaneReconciler{
Client: r.Client,
+ APIReader: r.APIReader,
SecretCachingClient: r.SecretCachingClient,
+ RuntimeClient: r.RuntimeClient,
ClusterCache: r.ClusterCache,
EtcdDialTimeout: r.EtcdDialTimeout,
EtcdCallTimeout: r.EtcdCallTimeout,
diff --git a/controlplane/kubeadm/internal/cluster.go b/controlplane/kubeadm/internal/cluster.go
index 1fddef3c8a21..f48999cb0ce3 100644
--- a/controlplane/kubeadm/internal/cluster.go
+++ b/controlplane/kubeadm/internal/cluster.go
@@ -27,11 +27,14 @@ import (
"go.uber.org/zap"
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
+ "k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/rest"
"sigs.k8s.io/controller-runtime/pkg/client"
+ bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
"sigs.k8s.io/cluster-api/controllers/clustercache"
+ "sigs.k8s.io/cluster-api/util/cache"
"sigs.k8s.io/cluster-api/util/collections"
"sigs.k8s.io/cluster-api/util/secret"
)
@@ -42,7 +45,7 @@ type ManagementCluster interface {
GetMachinesForCluster(ctx context.Context, cluster *clusterv1.Cluster, filters ...collections.Func) (collections.Machines, error)
GetMachinePoolsForCluster(ctx context.Context, cluster *clusterv1.Cluster) (*clusterv1.MachinePoolList, error)
- GetWorkloadCluster(ctx context.Context, clusterKey client.ObjectKey) (WorkloadCluster, error)
+ GetWorkloadCluster(ctx context.Context, cluster *clusterv1.Cluster, keyEncryptionAlgorithm bootstrapv1.EncryptionAlgorithmType) (WorkloadCluster, error)
}
// Management holds operations on the management cluster.
@@ -53,6 +56,20 @@ type Management struct {
EtcdDialTimeout time.Duration
EtcdCallTimeout time.Duration
EtcdLogger *zap.Logger
+ ClientCertCache cache.Cache[ClientCertEntry]
+}
+
+// ClientCertEntry is an Entry for the Cache that stores the client cert.
+type ClientCertEntry struct {
+ Cluster client.ObjectKey
+ ClusterUID types.UID
+ ClientCert *tls.Certificate
+ EncryptionAlgorithm bootstrapv1.EncryptionAlgorithmType
+}
+
+// Key returns the cache key of a ClientCertEntry.
+func (r ClientCertEntry) Key() string {
+ return fmt.Sprintf("%s/%s/%s", r.Cluster.String(), r.ClusterUID, r.EncryptionAlgorithm)
}
// RemoteClusterConnectionError represents a failure to connect to a remote cluster.
@@ -64,7 +81,7 @@ type RemoteClusterConnectionError struct {
// Error satisfies the error interface.
func (e *RemoteClusterConnectionError) Error() string { return e.Name + ": " + e.Err.Error() }
-// Unwrap satisfies the unwrap error inteface.
+// Unwrap satisfies the unwrap error interface.
func (e *RemoteClusterConnectionError) Unwrap() error { return e.Err }
// Get implements client.Reader.
@@ -98,7 +115,9 @@ func (m *Management) GetMachinePoolsForCluster(ctx context.Context, cluster *clu
// GetWorkloadCluster builds a cluster object.
// The cluster comes with an etcd client generator to connect to any etcd pod living on a managed machine.
-func (m *Management) GetWorkloadCluster(ctx context.Context, clusterKey client.ObjectKey) (WorkloadCluster, error) {
+func (m *Management) GetWorkloadCluster(ctx context.Context, cluster *clusterv1.Cluster, keyEncryptionAlgorithm bootstrapv1.EncryptionAlgorithmType) (WorkloadCluster, error) {
+ clusterKey := client.ObjectKeyFromObject(cluster)
+
// TODO(chuckha): Inject this dependency.
// TODO(chuckha): memoize this function. The workload client only exists as long as a reconciliation loop.
restConfig, err := m.ClusterCache.GetRESTConfig(ctx, clusterKey)
@@ -126,14 +145,17 @@ func (m *Management) GetWorkloadCluster(ctx context.Context, clusterKey client.O
// TODO: consider if we can detect if we are using external etcd in a more explicit way (e.g. looking at the config instead of deriving from the existing certificates)
var clientCert tls.Certificate
if keyData != nil {
- clientKey, err := m.ClusterCache.GetClientCertificatePrivateKey(ctx, clusterKey)
- if err != nil {
- return nil, err
- }
-
- clientCert, err = generateClientCert(crtData, keyData, clientKey)
- if err != nil {
- return nil, err
+ // Get client cert from cache if possible, otherwise generate it and add it to the cache.
+ // Note: The caching assumes that the etcd CA is not rotated during the lifetime of a Cluster.
+ if entry, ok := m.ClientCertCache.Has(ClientCertEntry{Cluster: clusterKey, ClusterUID: cluster.UID, EncryptionAlgorithm: keyEncryptionAlgorithm}.Key()); ok {
+ clientCert = *entry.ClientCert
+ } else {
+ // The client cert expires after 10 years, but that's okay as the cache has a TTL of 1 day.
+ clientCert, err = generateClientCert(crtData, keyData, keyEncryptionAlgorithm)
+ if err != nil {
+ return nil, err
+ }
+ m.ClientCertCache.Add(ClientCertEntry{Cluster: clusterKey, ClusterUID: cluster.UID, ClientCert: &clientCert, EncryptionAlgorithm: keyEncryptionAlgorithm})
}
} else {
clientCert, err = m.getAPIServerEtcdClientCert(ctx, clusterKey)
diff --git a/controlplane/kubeadm/internal/cluster_labels.go b/controlplane/kubeadm/internal/cluster_labels.go
deleted file mode 100644
index f0ff9663b9fd..000000000000
--- a/controlplane/kubeadm/internal/cluster_labels.go
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-Copyright 2020 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 internal
-
-import (
- controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
- "sigs.k8s.io/cluster-api/util/labels/format"
-)
-
-// ControlPlaneMachineLabelsForCluster returns a set of labels to add to a control plane machine for this specific cluster.
-func ControlPlaneMachineLabelsForCluster(kcp *controlplanev1.KubeadmControlPlane, clusterName string) map[string]string {
- labels := map[string]string{}
-
- // Add the labels from the MachineTemplate.
- // Note: we intentionally don't use the map directly to ensure we don't modify the map in KCP.
- for k, v := range kcp.Spec.MachineTemplate.ObjectMeta.Labels {
- labels[k] = v
- }
-
- // Always force these labels over the ones coming from the spec.
- labels[clusterv1.ClusterNameLabel] = clusterName
- labels[clusterv1.MachineControlPlaneLabel] = ""
- // Note: MustFormatValue is used here as the label value can be a hash if the control plane name is longer than 63 characters.
- labels[clusterv1.MachineControlPlaneNameLabel] = format.MustFormatValue(kcp.Name)
- return labels
-}
diff --git a/controlplane/kubeadm/internal/cluster_test.go b/controlplane/kubeadm/internal/cluster_test.go
index 14252358336f..b0dfdb36f56f 100644
--- a/controlplane/kubeadm/internal/cluster_test.go
+++ b/controlplane/kubeadm/internal/cluster_test.go
@@ -39,9 +39,11 @@ import (
"sigs.k8s.io/controller-runtime/pkg/controller"
"sigs.k8s.io/controller-runtime/pkg/reconcile"
+ bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
"sigs.k8s.io/cluster-api/controllers/clustercache"
"sigs.k8s.io/cluster-api/controllers/remote"
+ "sigs.k8s.io/cluster-api/util/cache"
"sigs.k8s.io/cluster-api/util/certs"
"sigs.k8s.io/cluster-api/util/collections"
"sigs.k8s.io/cluster-api/util/kubeconfig"
@@ -159,10 +161,6 @@ func TestGetWorkloadCluster(t *testing.T) {
secret.KubeconfigDataName: testEnvKubeconfig,
},
}
- clusterKey := client.ObjectKey{
- Name: "my-cluster",
- Namespace: ns.Name,
- }
tests := []struct {
name string
@@ -171,40 +169,34 @@ func TestGetWorkloadCluster(t *testing.T) {
expectErr bool
}{
{
- name: "returns a workload cluster",
- clusterKey: clusterKey,
- objs: []client.Object{etcdSecret.DeepCopy(), kubeconfigSecret.DeepCopy()},
- expectErr: false,
+ name: "returns a workload cluster",
+ objs: []client.Object{etcdSecret.DeepCopy(), kubeconfigSecret.DeepCopy()},
+ expectErr: false,
},
{
- name: "returns error if cannot get rest.Config from kubeconfigSecret",
- clusterKey: clusterKey,
- objs: []client.Object{etcdSecret.DeepCopy()},
- expectErr: true,
+ name: "returns error if cannot get rest.Config from kubeconfigSecret",
+ objs: []client.Object{etcdSecret.DeepCopy()},
+ expectErr: true,
},
{
- name: "returns error if unable to find the etcd secret",
- clusterKey: clusterKey,
- objs: []client.Object{kubeconfigSecret.DeepCopy()},
- expectErr: true,
+ name: "returns error if unable to find the etcd secret",
+ objs: []client.Object{kubeconfigSecret.DeepCopy()},
+ expectErr: true,
},
{
- name: "returns error if unable to find the certificate in the etcd secret",
- clusterKey: clusterKey,
- objs: []client.Object{emptyCrtEtcdSecret.DeepCopy(), kubeconfigSecret.DeepCopy()},
- expectErr: true,
+ name: "returns error if unable to find the certificate in the etcd secret",
+ objs: []client.Object{emptyCrtEtcdSecret.DeepCopy(), kubeconfigSecret.DeepCopy()},
+ expectErr: true,
},
{
- name: "returns error if unable to find the key in the etcd secret",
- clusterKey: clusterKey,
- objs: []client.Object{emptyKeyEtcdSecret.DeepCopy(), kubeconfigSecret.DeepCopy()},
- expectErr: true,
+ name: "returns error if unable to find the key in the etcd secret",
+ objs: []client.Object{emptyKeyEtcdSecret.DeepCopy(), kubeconfigSecret.DeepCopy()},
+ expectErr: true,
},
{
- name: "returns error if unable to generate client cert",
- clusterKey: clusterKey,
- objs: []client.Object{badCrtEtcdSecret.DeepCopy(), kubeconfigSecret.DeepCopy()},
- expectErr: true,
+ name: "returns error if unable to generate client cert",
+ objs: []client.Object{badCrtEtcdSecret.DeepCopy(), kubeconfigSecret.DeepCopy()},
+ expectErr: true,
},
}
@@ -239,6 +231,7 @@ func TestGetWorkloadCluster(t *testing.T) {
Client: env.GetClient(),
SecretCachingClient: secretCachingClient,
ClusterCache: clusterCache,
+ ClientCertCache: cache.New[ClientCertEntry](24 * time.Hour),
}
// Ensure the ClusterCache reconciled at least once (and if possible created a clusterAccessor).
@@ -247,7 +240,7 @@ func TestGetWorkloadCluster(t *testing.T) {
})
g.Expect(err).ToNot(HaveOccurred())
- workloadCluster, err := m.GetWorkloadCluster(ctx, tt.clusterKey)
+ workloadCluster, err := m.GetWorkloadCluster(ctx, cluster, bootstrapv1.EncryptionAlgorithmRSA2048)
if tt.expectErr {
g.Expect(err).To(HaveOccurred())
g.Expect(workloadCluster).To(BeNil())
@@ -301,7 +294,6 @@ func machineListForTestGetMachinesForCluster() *clusterv1.MachineList {
}
machine := func(name string) clusterv1.Machine {
return clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{},
ObjectMeta: metav1.ObjectMeta{
Name: name,
Namespace: metav1.NamespaceDefault,
diff --git a/controlplane/kubeadm/internal/control_plane.go b/controlplane/kubeadm/internal/control_plane.go
index cd3e862c886d..877c0aeb9814 100644
--- a/controlplane/kubeadm/internal/control_plane.go
+++ b/controlplane/kubeadm/internal/control_plane.go
@@ -33,8 +33,11 @@ import (
bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1"
"sigs.k8s.io/cluster-api/controllers/external"
"sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd"
+ "sigs.k8s.io/cluster-api/internal/hooks"
+ "sigs.k8s.io/cluster-api/internal/util/inplace"
"sigs.k8s.io/cluster-api/util/collections"
"sigs.k8s.io/cluster-api/util/conditions"
"sigs.k8s.io/cluster-api/util/failuredomains"
@@ -50,9 +53,13 @@ type ControlPlane struct {
Machines collections.Machines
machinesPatchHelpers map[string]*patch.Helper
- machinesNotUptoDate collections.Machines
- machinesNotUptoDateLogMessages map[string][]string
- machinesNotUptoDateConditionMessages map[string][]string
+ // MachinesNotUpToDate is the source of truth for Machines that are not up-to-date.
+ // It should be used to check if a Machine is up-to-date (not machinesUpToDateResults).
+ MachinesNotUpToDate collections.Machines
+ // machinesUpToDateResults is used to store the result of the UpToDate call for all Machines
+ // (even for Machines that are up-to-date).
+ // MachinesNotUpToDate should always be used instead to check if a Machine is up-to-date.
+ machinesUpToDateResults map[string]UpToDateResult
// reconciliationTime is the time of the current reconciliation, and should be used for all "now" calculations
reconciliationTime metav1.Time
@@ -98,7 +105,7 @@ type PreflightCheckResults struct {
// NewControlPlane returns an instantiated ControlPlane.
func NewControlPlane(ctx context.Context, managementCluster ManagementCluster, client client.Client, cluster *clusterv1.Cluster, kcp *controlplanev1.KubeadmControlPlane, ownedMachines collections.Machines) (*ControlPlane, error) {
- infraObjects, err := getInfraResources(ctx, client, ownedMachines)
+ infraMachines, err := getInfraMachines(ctx, client, ownedMachines)
if err != nil {
return nil, err
}
@@ -118,32 +125,31 @@ func NewControlPlane(ctx context.Context, managementCluster ManagementCluster, c
// Select machines that should be rolled out because of an outdated configuration or because rolloutAfter/Before expired.
reconciliationTime := metav1.Now()
machinesNotUptoDate := make(collections.Machines, len(ownedMachines))
- machinesNotUptoDateLogMessages := map[string][]string{}
- machinesNotUptoDateConditionMessages := map[string][]string{}
+ machinesUpToDateResults := map[string]UpToDateResult{}
for _, m := range ownedMachines {
- upToDate, logMessages, conditionMessages, err := UpToDate(m, kcp, &reconciliationTime, infraObjects, kubeadmConfigs)
+ upToDate, upToDateResult, err := UpToDate(ctx, client, cluster, m, kcp, &reconciliationTime, infraMachines, kubeadmConfigs)
if err != nil {
return nil, err
}
if !upToDate {
machinesNotUptoDate.Insert(m)
- machinesNotUptoDateLogMessages[m.Name] = logMessages
- machinesNotUptoDateConditionMessages[m.Name] = conditionMessages
}
+ // Set this even if machine is UpToDate. This is needed to complete triggering in-place updates
+ // MachinesNotUpToDate should always be used instead to check if a Machine is up-to-date.
+ machinesUpToDateResults[m.Name] = *upToDateResult
}
return &ControlPlane{
- KCP: kcp,
- Cluster: cluster,
- Machines: ownedMachines,
- machinesPatchHelpers: patchHelpers,
- machinesNotUptoDate: machinesNotUptoDate,
- machinesNotUptoDateLogMessages: machinesNotUptoDateLogMessages,
- machinesNotUptoDateConditionMessages: machinesNotUptoDateConditionMessages,
- KubeadmConfigs: kubeadmConfigs,
- InfraResources: infraObjects,
- reconciliationTime: reconciliationTime,
- managementCluster: managementCluster,
+ KCP: kcp,
+ Cluster: cluster,
+ Machines: ownedMachines,
+ machinesPatchHelpers: patchHelpers,
+ MachinesNotUpToDate: machinesNotUptoDate,
+ machinesUpToDateResults: machinesUpToDateResults,
+ KubeadmConfigs: kubeadmConfigs,
+ InfraResources: infraMachines,
+ reconciliationTime: reconciliationTime,
+ managementCluster: managementCluster,
}, nil
}
@@ -182,6 +188,21 @@ func (c *ControlPlane) MachineWithDeleteAnnotation(machines collections.Machines
return annotatedMachines
}
+// MachinesToCompleteTriggerInPlaceUpdate returns Machines for which we have to complete triggering
+// the in-place update. This can become necessary if triggering the in-place update fails after
+// we added UpdateInProgressAnnotation and before we marked the UpdateMachine hook as pending.
+func (c *ControlPlane) MachinesToCompleteTriggerInPlaceUpdate() collections.Machines {
+ return c.Machines.Filter(func(machine *clusterv1.Machine) bool {
+ _, ok := machine.Annotations[clusterv1.UpdateInProgressAnnotation]
+ return ok && !hooks.IsPending(runtimehooksv1.UpdateMachine, machine)
+ })
+}
+
+// MachinesToCompleteInPlaceUpdate returns Machines that still have to complete their in-place update.
+func (c *ControlPlane) MachinesToCompleteInPlaceUpdate() collections.Machines {
+ return c.Machines.Filter(inplace.IsUpdateInProgress)
+}
+
// FailureDomainWithMostMachines returns the fd with most machines in it and at least one eligible machine in it.
// Note: if there are eligibleMachines machines in failure domain that do not exist anymore, cleaning up those failure domains takes precedence.
func (c *ControlPlane) FailureDomainWithMostMachines(ctx context.Context, eligibleMachines collections.Machines) string {
@@ -220,25 +241,6 @@ func getGetFailureDomainIDs(failureDomains []clusterv1.FailureDomain) []string {
return ids
}
-// InitialControlPlaneConfig returns a new KubeadmConfigSpec that is to be used for an initializing control plane.
-func (c *ControlPlane) InitialControlPlaneConfig() *bootstrapv1.KubeadmConfigSpec {
- bootstrapSpec := c.KCP.Spec.KubeadmConfigSpec.DeepCopy()
- // Note: When building a KubeadmConfig for the first CP machine empty out the unnecessary JoinConfiguration.
- bootstrapSpec.JoinConfiguration = bootstrapv1.JoinConfiguration{}
- return bootstrapSpec
-}
-
-// JoinControlPlaneConfig returns a new KubeadmConfigSpec that is to be used for joining control planes.
-func (c *ControlPlane) JoinControlPlaneConfig() *bootstrapv1.KubeadmConfigSpec {
- bootstrapSpec := c.KCP.Spec.KubeadmConfigSpec.DeepCopy()
- // Note: When building a KubeadmConfig for a joining CP machine empty out the unnecessary InitConfiguration.
- bootstrapSpec.InitConfiguration = bootstrapv1.InitConfiguration{}
- // NOTE: For the joining we are preserving the ClusterConfiguration in order to determine if the
- // cluster is using an external etcd in the kubeadm bootstrap provider (even if this is not required by kubeadm Join).
- // TODO: Determine if this copy of cluster configuration can be used for rollouts (thus allowing to remove the annotation at machine level)
- return bootstrapSpec
-}
-
// HasDeletingMachine returns true if any machine in the control plane is in the process of being deleted.
func (c *ControlPlane) HasDeletingMachine() bool {
return len(c.Machines.Filter(collections.HasDeletionTimestamp)) > 0
@@ -256,35 +258,35 @@ func (c *ControlPlane) GetKubeadmConfig(machineName string) (*bootstrapv1.Kubead
}
// MachinesNeedingRollout return a list of machines that need to be rolled out.
-func (c *ControlPlane) MachinesNeedingRollout() (collections.Machines, map[string][]string) {
+func (c *ControlPlane) MachinesNeedingRollout() (collections.Machines, map[string]UpToDateResult) {
// Note: Machines already deleted are dropped because they will be replaced by new machines after deletion completes.
- return c.machinesNotUptoDate.Filter(collections.Not(collections.HasDeletionTimestamp)), c.machinesNotUptoDateLogMessages
+ return c.MachinesNotUpToDate.Filter(collections.Not(collections.HasDeletionTimestamp)), c.machinesUpToDateResults
}
// NotUpToDateMachines return a list of machines that are not up to date with the control
// plane's configuration.
-func (c *ControlPlane) NotUpToDateMachines() (collections.Machines, map[string][]string) {
- return c.machinesNotUptoDate, c.machinesNotUptoDateConditionMessages
+func (c *ControlPlane) NotUpToDateMachines() (collections.Machines, map[string]UpToDateResult) {
+ return c.MachinesNotUpToDate, c.machinesUpToDateResults
}
// UpToDateMachines returns the machines that are up to date with the control
// plane's configuration.
func (c *ControlPlane) UpToDateMachines() collections.Machines {
- return c.Machines.Difference(c.machinesNotUptoDate)
+ return c.Machines.Difference(c.MachinesNotUpToDate)
}
-// getInfraResources fetches the external infrastructure resource for each machine in the collection and returns a map of machine.Name -> infraResource.
-func getInfraResources(ctx context.Context, cl client.Client, machines collections.Machines) (map[string]*unstructured.Unstructured, error) {
+// getInfraMachines fetches the InfraMachine for each machine in the collection and returns a map of machine.Name -> InfraMachine.
+func getInfraMachines(ctx context.Context, cl client.Client, machines collections.Machines) (map[string]*unstructured.Unstructured, error) {
result := map[string]*unstructured.Unstructured{}
for _, m := range machines {
- infraObj, err := external.GetObjectFromContractVersionedRef(ctx, cl, m.Spec.InfrastructureRef, m.Namespace)
+ infraMachine, err := external.GetObjectFromContractVersionedRef(ctx, cl, m.Spec.InfrastructureRef, m.Namespace)
if err != nil {
if apierrors.IsNotFound(errors.Cause(err)) {
continue
}
- return nil, errors.Wrapf(err, "failed to retrieve infra obj for machine %q", m.Name)
+ return nil, errors.Wrapf(err, "failed to retrieve InfraMachine for Machine %s", m.Name)
}
- result[m.Name] = infraObj
+ result[m.Name] = infraMachine
}
return result, nil
}
@@ -297,14 +299,14 @@ func getKubeadmConfigs(ctx context.Context, cl client.Client, machines collectio
if !bootstrapRef.IsDefined() {
continue
}
- machineConfig := &bootstrapv1.KubeadmConfig{}
- if err := cl.Get(ctx, client.ObjectKey{Name: bootstrapRef.Name, Namespace: m.Namespace}, machineConfig); err != nil {
+ kubeadmConfig := &bootstrapv1.KubeadmConfig{}
+ if err := cl.Get(ctx, client.ObjectKey{Name: bootstrapRef.Name, Namespace: m.Namespace}, kubeadmConfig); err != nil {
if apierrors.IsNotFound(errors.Cause(err)) {
continue
}
- return nil, errors.Wrapf(err, "failed to retrieve bootstrap config for machine %q", m.Name)
+ return nil, errors.Wrapf(err, "failed to retrieve KubeadmConfig for Machine %s", m.Name)
}
- result[m.Name] = machineConfig
+ result[m.Name] = kubeadmConfig
}
return result, nil
}
@@ -388,7 +390,7 @@ func (c *ControlPlane) GetWorkloadCluster(ctx context.Context) (WorkloadCluster,
return c.workloadCluster, nil
}
- workloadCluster, err := c.managementCluster.GetWorkloadCluster(ctx, client.ObjectKeyFromObject(c.Cluster))
+ workloadCluster, err := c.managementCluster.GetWorkloadCluster(ctx, c.Cluster, c.GetKeyEncryptionAlgorithm())
if err != nil {
return nil, err
}
@@ -483,3 +485,12 @@ func (c *ControlPlane) StatusToLogKeyAndValues(newMachine, deletedMachine *clust
"etcdMembers", strings.Join(etcdMembers, ", "),
}
}
+
+// GetKeyEncryptionAlgorithm returns the control plane EncryptionAlgorithm.
+// If its unset the default encryption algorithm is returned.
+func (c *ControlPlane) GetKeyEncryptionAlgorithm() bootstrapv1.EncryptionAlgorithmType {
+ if c.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.EncryptionAlgorithm == "" {
+ return bootstrapv1.EncryptionAlgorithmRSA2048
+ }
+ return c.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.EncryptionAlgorithm
+}
diff --git a/controlplane/kubeadm/internal/control_plane_test.go b/controlplane/kubeadm/internal/control_plane_test.go
index 121c459fb5b9..a7bd0df271e6 100644
--- a/controlplane/kubeadm/internal/control_plane_test.go
+++ b/controlplane/kubeadm/internal/control_plane_test.go
@@ -27,6 +27,7 @@ import (
controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2"
"sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd"
"sigs.k8s.io/cluster-api/util/collections"
)
@@ -122,17 +123,19 @@ func TestControlPlane(t *testing.T) {
g.Expect(controlPlane.Machines).To(HaveLen(5))
- machinesNotUptoDate, machinesNotUptoDateConditionMessages := controlPlane.NotUpToDateMachines()
+ machinesNotUptoDate, machinesUpToDateResults := controlPlane.NotUpToDateMachines()
g.Expect(machinesNotUptoDate.Names()).To(ConsistOf("m2", "m3"))
- g.Expect(machinesNotUptoDateConditionMessages).To(HaveLen(2))
- g.Expect(machinesNotUptoDateConditionMessages).To(HaveKeyWithValue("m2", []string{"Version v1.29.0, v1.31.0 required"}))
- g.Expect(machinesNotUptoDateConditionMessages).To(HaveKeyWithValue("m3", []string{"Version v1.29.3, v1.31.0 required"}))
+ // machinesUpToDateResults contains results for all Machines (including up-to-date Machines).
+ g.Expect(machinesUpToDateResults).To(HaveLen(5))
+ g.Expect(machinesUpToDateResults["m2"].ConditionMessages).To(Equal([]string{"Version v1.29.0, v1.31.0 required"}))
+ g.Expect(machinesUpToDateResults["m3"].ConditionMessages).To(Equal([]string{"Version v1.29.3, v1.31.0 required"}))
- machinesNeedingRollout, machinesNotUptoDateLogMessages := controlPlane.MachinesNeedingRollout()
+ machinesNeedingRollout, machinesUpToDateResults := controlPlane.MachinesNeedingRollout()
g.Expect(machinesNeedingRollout.Names()).To(ConsistOf("m2"))
- g.Expect(machinesNotUptoDateLogMessages).To(HaveLen(2))
- g.Expect(machinesNotUptoDateLogMessages).To(HaveKeyWithValue("m2", []string{"Machine version \"v1.29.0\" is not equal to KCP version \"v1.31.0\""}))
- g.Expect(machinesNotUptoDateLogMessages).To(HaveKeyWithValue("m3", []string{"Machine version \"v1.29.3\" is not equal to KCP version \"v1.31.0\""}))
+ // machinesUpToDateResults contains results for all Machines (including up-to-date Machines).
+ g.Expect(machinesUpToDateResults).To(HaveLen(5))
+ g.Expect(machinesUpToDateResults["m2"].LogMessages).To(Equal([]string{"Machine version \"v1.29.0\" is not equal to KCP version \"v1.31.0\""}))
+ g.Expect(machinesUpToDateResults["m3"].LogMessages).To(Equal([]string{"Machine version \"v1.29.3\" is not equal to KCP version \"v1.31.0\""}))
upToDateMachines := controlPlane.UpToDateMachines()
g.Expect(upToDateMachines).To(HaveLen(3))
@@ -291,6 +294,160 @@ func TestHasHealthyMachineStillProvisioning(t *testing.T) {
})
}
+func TestMachinesToCompleteTriggerInPlaceUpdate(t *testing.T) {
+ machineWithoutAnnotations := &clusterv1.Machine{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machineWithoutAnnotations",
+ },
+ }
+ machineWithUpdateInProgressAnnotation := &clusterv1.Machine{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machineWithUpdateInProgressAnnotation",
+ Annotations: map[string]string{
+ clusterv1.UpdateInProgressAnnotation: "",
+ },
+ },
+ }
+ machineWithPendingHooksAnnotation := &clusterv1.Machine{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machineWithPendingHooksAnnotation",
+ Annotations: map[string]string{
+ runtimev1.PendingHooksAnnotation: "UpdateMachine",
+ },
+ },
+ }
+ machineWithBothAnnotations := &clusterv1.Machine{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machineWithBothAnnotations",
+ Annotations: map[string]string{
+ clusterv1.UpdateInProgressAnnotation: "",
+ runtimev1.PendingHooksAnnotation: "UpdateMachine",
+ },
+ },
+ }
+
+ tests := []struct {
+ name string
+ machine *clusterv1.Machine
+ completeTriggerInPlaceUpdate bool
+ }{
+ {
+ name: "machineWithoutAnnotations => false",
+ machine: machineWithoutAnnotations,
+ completeTriggerInPlaceUpdate: false,
+ },
+ {
+ name: "machineWithUpdateInProgressAnnotation => true",
+ machine: machineWithUpdateInProgressAnnotation,
+ completeTriggerInPlaceUpdate: true,
+ },
+ {
+ name: "machineWithPendingHooksAnnotation => false",
+ machine: machineWithPendingHooksAnnotation,
+ completeTriggerInPlaceUpdate: false,
+ },
+ {
+ name: "machineWithBothAnnotations => false",
+ machine: machineWithBothAnnotations,
+ completeTriggerInPlaceUpdate: false,
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+
+ c := ControlPlane{
+ Machines: collections.FromMachines(tt.machine),
+ }
+
+ if tt.completeTriggerInPlaceUpdate {
+ g.Expect(c.MachinesToCompleteTriggerInPlaceUpdate().Len()).To(Equal(1))
+ g.Expect(c.MachinesToCompleteTriggerInPlaceUpdate().Has(tt.machine)).To(BeTrue())
+ } else {
+ g.Expect(c.MachinesToCompleteTriggerInPlaceUpdate().Len()).To(Equal(0))
+ }
+ })
+ }
+}
+
+func TestMachinesToCompleteInPlaceUpdate(t *testing.T) {
+ machineWithoutAnnotations := &clusterv1.Machine{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machineWithoutAnnotations",
+ },
+ }
+ machineWithUpdateInProgressAnnotation := &clusterv1.Machine{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machineWithUpdateInProgressAnnotation",
+ Annotations: map[string]string{
+ clusterv1.UpdateInProgressAnnotation: "",
+ },
+ },
+ }
+ machineWithPendingHooksAnnotation := &clusterv1.Machine{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machineWithPendingHooksAnnotation",
+ Annotations: map[string]string{
+ runtimev1.PendingHooksAnnotation: "UpdateMachine",
+ },
+ },
+ }
+ machineWithBothAnnotations := &clusterv1.Machine{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machineWithBothAnnotations",
+ Annotations: map[string]string{
+ clusterv1.UpdateInProgressAnnotation: "",
+ runtimev1.PendingHooksAnnotation: "UpdateMachine",
+ },
+ },
+ }
+
+ tests := []struct {
+ name string
+ machine *clusterv1.Machine
+ completeInPlaceUpdate bool
+ }{
+ {
+ name: "machineWithoutAnnotations => false",
+ machine: machineWithoutAnnotations,
+ completeInPlaceUpdate: false,
+ },
+ {
+ name: "machineWithUpdateInProgressAnnotation => true",
+ machine: machineWithUpdateInProgressAnnotation,
+ completeInPlaceUpdate: true,
+ },
+ {
+ name: "machineWithPendingHooksAnnotation => true",
+ machine: machineWithPendingHooksAnnotation,
+ completeInPlaceUpdate: true,
+ },
+ {
+ name: "machineWithBothAnnotations => true",
+ machine: machineWithBothAnnotations,
+ completeInPlaceUpdate: true,
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+
+ c := ControlPlane{
+ Machines: collections.FromMachines(tt.machine),
+ }
+
+ if tt.completeInPlaceUpdate {
+ g.Expect(c.MachinesToCompleteInPlaceUpdate().Len()).To(Equal(1))
+ g.Expect(c.MachinesToCompleteInPlaceUpdate().Has(tt.machine)).To(BeTrue())
+ } else {
+ g.Expect(c.MachinesToCompleteInPlaceUpdate().Len()).To(Equal(0))
+ }
+ })
+ }
+}
+
func TestStatusToLogKeyAndValues(t *testing.T) {
healthyMachine := &clusterv1.Machine{
ObjectMeta: metav1.ObjectMeta{Name: "healthy"},
@@ -339,7 +496,7 @@ func TestStatusToLogKeyAndValues(t *testing.T) {
c := &ControlPlane{
KCP: &controlplanev1.KubeadmControlPlane{},
Machines: collections.FromMachines(healthyMachine, machineWithoutNode, machineJustDeleted, machineNotUpToDate, machineMarkedForRemediation),
- machinesNotUptoDate: collections.FromMachines(machineNotUpToDate),
+ MachinesNotUpToDate: collections.FromMachines(machineNotUpToDate),
EtcdMembers: []*etcd.Member{{Name: "m1"}, {Name: "m2"}, {Name: "m3"}},
}
diff --git a/controlplane/kubeadm/internal/controllers/controller.go b/controlplane/kubeadm/internal/controllers/controller.go
index ec7502a700c9..57ede403acd6 100644
--- a/controlplane/kubeadm/internal/controllers/controller.go
+++ b/controlplane/kubeadm/internal/controllers/controller.go
@@ -19,6 +19,7 @@ package controllers
import (
"context"
"fmt"
+ "slices"
"sort"
"strings"
"time"
@@ -35,7 +36,6 @@ import (
"k8s.io/klog/v2"
"k8s.io/utils/ptr"
ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/builder"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
@@ -46,10 +46,13 @@ import (
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
"sigs.k8s.io/cluster-api/controllers/clustercache"
"sigs.k8s.io/cluster-api/controlplane/kubeadm/internal"
+ runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client"
"sigs.k8s.io/cluster-api/feature"
- "sigs.k8s.io/cluster-api/internal/contract"
+ capicontrollerutil "sigs.k8s.io/cluster-api/internal/util/controller"
+ "sigs.k8s.io/cluster-api/internal/util/inplace"
"sigs.k8s.io/cluster-api/internal/util/ssa"
"sigs.k8s.io/cluster-api/util"
+ "sigs.k8s.io/cluster-api/util/cache"
"sigs.k8s.io/cluster-api/util/collections"
"sigs.k8s.io/cluster-api/util/conditions"
v1beta1conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1"
@@ -64,11 +67,12 @@ import (
const (
kcpManagerName = "capi-kubeadmcontrolplane"
+ kcpMetadataManagerName = "capi-kubeadmcontrolplane-metadata"
kubeadmControlPlaneKind = "KubeadmControlPlane"
)
// +kubebuilder:rbac:groups=core,resources=events,verbs=create;patch
-// +kubebuilder:rbac:groups=core,resources=secrets,verbs=get;list;watch;create;update;patch
+// +kubebuilder:rbac:groups=core,resources=secrets,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io;bootstrap.cluster.x-k8s.io;controlplane.cluster.x-k8s.io,resources=*,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=cluster.x-k8s.io,resources=clusters;clusters/status,verbs=get;list;watch
// +kubebuilder:rbac:groups=cluster.x-k8s.io,resources=machines;machines/status,verbs=get;list;watch;create;update;patch;delete
@@ -78,8 +82,10 @@ const (
// KubeadmControlPlaneReconciler reconciles a KubeadmControlPlane object.
type KubeadmControlPlaneReconciler struct {
Client client.Client
+ APIReader client.Reader
SecretCachingClient client.Client
- controller controller.Controller
+ RuntimeClient runtimeclient.Client
+ controller capicontrollerutil.Controller
recorder record.EventRecorder
ClusterCache clustercache.ClusterCache
@@ -95,6 +101,18 @@ type KubeadmControlPlaneReconciler struct {
managementCluster internal.ManagementCluster
managementClusterUncached internal.ManagementCluster
ssaCache ssa.Cache
+
+ // Only used for testing.
+ overrideTryInPlaceUpdateFunc func(ctx context.Context, controlPlane *internal.ControlPlane, machineToInPlaceUpdate *clusterv1.Machine, machineUpToDateResult internal.UpToDateResult) (bool, ctrl.Result, error)
+ overrideScaleUpControlPlaneFunc func(ctx context.Context, controlPlane *internal.ControlPlane) (ctrl.Result, error)
+ overrideScaleDownControlPlaneFunc func(ctx context.Context, controlPlane *internal.ControlPlane, machineToDelete *clusterv1.Machine) (ctrl.Result, error)
+ overridePreflightChecksFunc func(ctx context.Context, controlPlane *internal.ControlPlane, excludeFor ...*clusterv1.Machine) ctrl.Result
+ overrideCanUpdateMachineFunc func(ctx context.Context, machine *clusterv1.Machine, machineUpToDateResult internal.UpToDateResult) (bool, error)
+ overrideCanExtensionsUpdateMachine func(ctx context.Context, machine *clusterv1.Machine, machineUpToDateResult internal.UpToDateResult, extensionHandlers []string) (bool, []string, error)
+ overrideTriggerInPlaceUpdate func(ctx context.Context, machine *clusterv1.Machine, machineUpToDateResult internal.UpToDateResult) error
+ // Note: This field is only used for unit tests that use fake client because the fake client does not properly set resourceVersion
+ // on BootstrapConfig/InfraMachine after ssa.Patch and then ssa.RemoveManagedFieldsForLabelsAndAnnotations would fail.
+ disableRemoveManagedFieldsForLabelsAndAnnotations bool
}
func (r *KubeadmControlPlaneReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error {
@@ -109,25 +127,23 @@ func (r *KubeadmControlPlaneReconciler) SetupWithManager(ctx context.Context, mg
"EtcdDialTimeout and EtcdCallTimeout must not be 0 and " +
"RemoteConditionsGracePeriod must not be < 2m")
}
+ if feature.Gates.Enabled(feature.InPlaceUpdates) && r.RuntimeClient == nil {
+ return errors.New("RuntimeClient must not be nil when InPlaceUpdates feature gate is enabled")
+ }
predicateLog := ctrl.LoggerFrom(ctx).WithValues("controller", "kubeadmcontrolplane")
- c, err := ctrl.NewControllerManagedBy(mgr).
+ c, err := capicontrollerutil.NewControllerManagedBy(mgr, predicateLog).
For(&controlplanev1.KubeadmControlPlane{}).
- Owns(&clusterv1.Machine{}, builder.WithPredicates(predicates.ResourceIsChanged(mgr.GetScheme(), predicateLog))).
+ Owns(&clusterv1.Machine{}).
WithOptions(options).
WithEventFilter(predicates.ResourceHasFilterLabel(mgr.GetScheme(), predicateLog, r.WatchFilterValue)).
Watches(
&clusterv1.Cluster{},
handler.EnqueueRequestsFromMapFunc(r.ClusterToKubeadmControlPlane),
- builder.WithPredicates(
- predicates.All(mgr.GetScheme(), predicateLog,
- predicates.ResourceIsChanged(mgr.GetScheme(), predicateLog),
- predicates.ResourceHasFilterLabel(mgr.GetScheme(), predicateLog, r.WatchFilterValue),
- predicates.Any(mgr.GetScheme(), predicateLog,
- predicates.ClusterPausedTransitionsOrInfrastructureProvisioned(mgr.GetScheme(), predicateLog),
- predicates.ClusterTopologyVersionChanged(mgr.GetScheme(), predicateLog),
- ),
- ),
+ predicates.ResourceHasFilterLabel(mgr.GetScheme(), predicateLog, r.WatchFilterValue),
+ predicates.Any(mgr.GetScheme(), predicateLog,
+ predicates.ClusterPausedTransitionsOrInfrastructureProvisioned(mgr.GetScheme(), predicateLog),
+ predicates.ClusterTopologyVersionChanged(mgr.GetScheme(), predicateLog),
),
).
WatchesRawSource(r.ClusterCache.GetClusterSource("kubeadmcontrolplane", r.ClusterToKubeadmControlPlane,
@@ -149,6 +165,7 @@ func (r *KubeadmControlPlaneReconciler) SetupWithManager(ctx context.Context, mg
EtcdDialTimeout: r.EtcdDialTimeout,
EtcdCallTimeout: r.EtcdCallTimeout,
EtcdLogger: r.EtcdLogger,
+ ClientCertCache: cache.New[internal.ClientCertEntry](24 * time.Hour),
}
}
@@ -261,12 +278,6 @@ func (r *KubeadmControlPlaneReconciler) Reconcile(ctx context.Context, req ctrl.
res = ctrl.Result{RequeueAfter: 20 * time.Second}
}
}
-
- // Note: controller-runtime logs a warning that non-empty result is ignored
- // if error is not nil, so setting result here to empty to avoid noisy warnings.
- if reterr != nil {
- res = ctrl.Result{}
- }
}()
if !kcp.DeletionTimestamp.IsZero() {
@@ -308,7 +319,7 @@ func (r *KubeadmControlPlaneReconciler) initControlPlaneScope(ctx context.Contex
return nil, true, r.adoptMachines(ctx, kcp, adoptableMachines, cluster)
}
- ownedMachines := controlPlaneMachines.Filter(collections.OwnedMachines(kcp))
+ ownedMachines := controlPlaneMachines.Filter(collections.OwnedMachines(kcp, controlplanev1.GroupVersion.WithKind("KubeadmControlPlane").GroupKind()))
if kcp.DeletionTimestamp.IsZero() && len(ownedMachines) != len(controlPlaneMachines) {
err := errors.New("not all control plane machines are owned by this KubeadmControlPlane, refusing to operate in mixed management mode")
log.Error(err, "KCP cannot reconcile")
@@ -427,7 +438,7 @@ func (r *KubeadmControlPlaneReconciler) reconcile(ctx context.Context, controlPl
}
// Generate Cluster Kubeconfig if needed
- if result, err := r.reconcileKubeconfig(ctx, controlPlane); !result.IsZero() || err != nil {
+ if result, err := r.reconcileKubeconfig(ctx, controlPlane); err != nil || !result.IsZero() {
if err != nil {
log.Error(err, "Failed to reconcile Kubeconfig")
}
@@ -435,6 +446,11 @@ func (r *KubeadmControlPlaneReconciler) reconcile(ctx context.Context, controlPl
}
if err := r.syncMachines(ctx, controlPlane); err != nil {
+ // Note: If any of the calls got a NotFound error, it means that at least one Machine got deleted.
+ // Let's return here so that the next Reconcile will get the updated list of Machines.
+ if apierrors.IsNotFound(err) {
+ return ctrl.Result{}, nil // Note: Requeue is not needed, changes to Machines trigger another reconcile.
+ }
return ctrl.Result{}, errors.Wrap(err, "failed to sync Machines")
}
@@ -460,23 +476,48 @@ func (r *KubeadmControlPlaneReconciler) reconcile(ctx context.Context, controlPl
return result, err
}
+ // Complete triggering in-place update if necessary, for reentrancy if triggerInPlaceUpdate failed
+ // when triggering the in-place update initially.
+ if machines := controlPlane.MachinesToCompleteTriggerInPlaceUpdate(); len(machines) > 0 {
+ _, machinesUpToDateResults := controlPlane.NotUpToDateMachines()
+ for _, m := range machines {
+ if err := r.triggerInPlaceUpdate(ctx, m, machinesUpToDateResults[m.Name]); err != nil {
+ return ctrl.Result{}, err
+ }
+ }
+ return ctrl.Result{}, nil // Note: Changes to Machines trigger another reconcile.
+ }
+
// Reconcile unhealthy machines by triggering deletion and requeue if it is considered safe to remediate,
// otherwise continue with the other KCP operations.
if result, err := r.reconcileUnhealthyMachines(ctx, controlPlane); err != nil || !result.IsZero() {
return result, err
}
+ // Wait for in-place update to complete.
+ // Note: If a Machine becomes unhealthy during in-place update reconcileUnhealthyMachines above remediates it.
+ // Note: We have to wait here even if there are no more Machines that need rollout (in-place update in
+ // progress is not counted as needs rollout).
+ if machines := controlPlane.MachinesToCompleteInPlaceUpdate(); machines.Len() > 0 {
+ for _, machine := range machines {
+ log.Info(fmt.Sprintf("Waiting for in-place update of Machine %s to complete", machine.Name), "Machine", klog.KObj(machine))
+ }
+ return ctrl.Result{}, nil // Note: Changes to Machines trigger another reconcile.
+ }
+
// Control plane machines rollout due to configuration changes (e.g. upgrades) takes precedence over other operations.
- machinesNeedingRollout, machinesNeedingRolloutLogMessages := controlPlane.MachinesNeedingRollout()
+ machinesNeedingRollout, machinesUpToDateResults := controlPlane.MachinesNeedingRollout()
switch {
case len(machinesNeedingRollout) > 0:
var allMessages []string
- for machine, messages := range machinesNeedingRolloutLogMessages {
- allMessages = append(allMessages, fmt.Sprintf("Machine %s needs rollout: %s", machine, strings.Join(messages, ",")))
+ machinesNeedingRolloutNames := machinesNeedingRollout.Names()
+ slices.Sort(machinesNeedingRolloutNames)
+ for _, name := range machinesNeedingRolloutNames {
+ allMessages = append(allMessages, fmt.Sprintf("Machine %s needs rollout: %s", name, strings.Join(machinesUpToDateResults[name].LogMessages, ", ")))
}
- log.Info(fmt.Sprintf("Rolling out Control Plane machines: %s", strings.Join(allMessages, ",")), "machinesNeedingRollout", machinesNeedingRollout.Names())
+ log.Info(fmt.Sprintf("Machines need rollout: %s", strings.Join(machinesNeedingRolloutNames, ",")), "reason", strings.Join(allMessages, ", "))
v1beta1conditions.MarkFalse(controlPlane.KCP, controlplanev1.MachinesSpecUpToDateV1Beta1Condition, controlplanev1.RollingUpdateInProgressV1Beta1Reason, clusterv1.ConditionSeverityWarning, "Rolling %d replicas with outdated spec (%d replicas up to date)", len(machinesNeedingRollout), len(controlPlane.Machines)-len(machinesNeedingRollout))
- return r.upgradeControlPlane(ctx, controlPlane, machinesNeedingRollout)
+ return r.updateControlPlane(ctx, controlPlane, machinesNeedingRollout, machinesUpToDateResults)
default:
// make sure last upgrade operation is marked as completed.
// NOTE: we are checking the condition already exists in order to avoid to set this condition at the first
@@ -506,7 +547,12 @@ func (r *KubeadmControlPlaneReconciler) reconcile(ctx context.Context, controlPl
case numMachines > desiredReplicas:
log.Info("Scaling down control plane", "desired", desiredReplicas, "existing", numMachines)
// The last parameter (i.e. machines needing to be rolled out) should always be empty here.
- return r.scaleDownControlPlane(ctx, controlPlane, collections.Machines{})
+ // Pick the Machine that we should scale down.
+ machineToDelete, err := selectMachineForInPlaceUpdateOrScaleDown(ctx, controlPlane, collections.Machines{})
+ if err != nil {
+ return ctrl.Result{}, errors.Wrap(err, "failed to select machine for scale down")
+ }
+ return r.scaleDownControlPlane(ctx, controlPlane, machineToDelete)
}
// Get the workload cluster client.
@@ -760,12 +806,6 @@ func (r *KubeadmControlPlaneReconciler) ClusterToKubeadmControlPlane(_ context.C
}
// syncMachines updates Machines, InfrastructureMachines and KubeadmConfigs to propagate in-place mutable fields from KCP.
-// Note: It also cleans up managed fields of all Machines so that Machines that were
-// created/patched before (< v1.4.0) the controller adopted Server-Side-Apply (SSA) can also work with SSA.
-// Note: For InfrastructureMachines and KubeadmConfigs it also drops ownership of "metadata.labels" and
-// "metadata.annotations" from "manager" so that "capi-kubeadmcontrolplane" can own these fields and can work with SSA.
-// Otherwise, fields would be co-owned by our "old" "manager" and "capi-kubeadmcontrolplane" and then we would not be
-// able to e.g. drop labels and annotations.
func (r *KubeadmControlPlaneReconciler) syncMachines(ctx context.Context, controlPlane *internal.ControlPlane) error {
patchHelpers := map[string]*patch.Helper{}
for machineName := range controlPlane.Machines {
@@ -797,19 +837,17 @@ func (r *KubeadmControlPlaneReconciler) syncMachines(ctx context.Context, contro
continue
}
- // Cleanup managed fields of all Machines.
- // We do this so that Machines that were created/patched before the controller adopted Server-Side-Apply (SSA)
- // (< v1.4.0) can also work with SSA. Otherwise, fields would be co-owned by our "old" "manager" and
- // "capi-kubeadmcontrolplane" and then we would not be able to e.g. drop labels and annotations.
- if err := ssa.CleanUpManagedFieldsForSSAAdoption(ctx, r.Client, m, kcpManagerName); err != nil {
- return errors.Wrapf(err, "failed to update Machine: failed to adjust the managedFields of the Machine %s", klog.KObj(m))
- }
// Update Machine to propagate in-place mutable fields from KCP.
updatedMachine, err := r.updateMachine(ctx, m, controlPlane.KCP, controlPlane.Cluster)
if err != nil {
return errors.Wrapf(err, "failed to update Machine: %s", klog.KObj(m))
}
+ // Note: Ensure ControlPlane has the latest version of the Machine. This is required because
+ // e.g. the in-place update code that is called later has to use the latest version of the Machine.
controlPlane.Machines[machineName] = updatedMachine
+ if _, ok := controlPlane.MachinesNotUpToDate[machineName]; ok {
+ controlPlane.MachinesNotUpToDate[machineName] = updatedMachine
+ }
// Since the machine is updated, re-create the patch helper so that any subsequent
// Patch calls use the correct base machine object to calculate the diffs.
// Example: reconcileControlPlaneAndMachinesConditions patches the machine objects in a subsequent call
@@ -824,23 +862,21 @@ func (r *KubeadmControlPlaneReconciler) syncMachines(ctx context.Context, contro
}
patchHelpers[machineName] = patchHelper
- labelsAndAnnotationsManagedFieldPaths := []contract.Path{
- {"f:metadata", "f:annotations"},
- {"f:metadata", "f:labels"},
- }
infraMachine, infraMachineFound := controlPlane.InfraResources[machineName]
// Only update the InfraMachine if it is already found, otherwise just skip it.
// This could happen e.g. if the cache is not up-to-date yet.
if infraMachineFound {
- // Cleanup managed fields of all InfrastructureMachines to drop ownership of labels and annotations
- // from "manager". We do this so that InfrastructureMachines that are created using the Create method
- // can also work with SSA. Otherwise, labels and annotations would be co-owned by our "old" "manager"
- // and "capi-kubeadmcontrolplane" and then we would not be able to e.g. drop labels and annotations.
- if err := ssa.DropManagedFields(ctx, r.Client, infraMachine, kcpManagerName, labelsAndAnnotationsManagedFieldPaths); err != nil {
+ // Drop managedFields for manager:Update and capi-kubeadmcontrolplane:Apply for all objects created with CAPI <= v1.11.
+ // Starting with CAPI v1.12 we have a new managedField structure where capi-kubeadmcontrolplane-metadata will own
+ // labels and annotations and capi-kubeadmcontrolplane everything else.
+ // Note: We have to call ssa.MigrateManagedFields for every Machine created with CAPI <= v1.11 once.
+ // Given that this was introduced in CAPI v1.12 and our n-3 upgrade policy this can
+ // be removed with CAPI v1.15.
+ if err := ssa.MigrateManagedFields(ctx, r.Client, infraMachine, kcpManagerName, kcpMetadataManagerName); err != nil {
return errors.Wrapf(err, "failed to clean up managedFields of InfrastructureMachine %s", klog.KObj(infraMachine))
}
// Update in-place mutating fields on InfrastructureMachine.
- if err := r.updateExternalObject(ctx, infraMachine, controlPlane.KCP, controlPlane.Cluster); err != nil {
+ if err := r.updateLabelsAndAnnotations(ctx, infraMachine, infraMachine.GroupVersionKind(), controlPlane.KCP, controlPlane.Cluster); err != nil {
return errors.Wrapf(err, "failed to update InfrastructureMachine %s", klog.KObj(infraMachine))
}
}
@@ -849,17 +885,17 @@ func (r *KubeadmControlPlaneReconciler) syncMachines(ctx context.Context, contro
// Only update the KubeadmConfig if it is already found, otherwise just skip it.
// This could happen e.g. if the cache is not up-to-date yet.
if kubeadmConfigFound {
- // Note: Set the GroupVersionKind because updateExternalObject depends on it.
- kubeadmConfig.SetGroupVersionKind(bootstrapv1.GroupVersion.WithKind("KubeadmConfig"))
- // Cleanup managed fields of all KubeadmConfigs to drop ownership of labels and annotations
- // from "manager". We do this so that KubeadmConfigs that are created using the Create method
- // can also work with SSA. Otherwise, labels and annotations would be co-owned by our "old" "manager"
- // and "capi-kubeadmcontrolplane" and then we would not be able to e.g. drop labels and annotations.
- if err := ssa.DropManagedFields(ctx, r.Client, kubeadmConfig, kcpManagerName, labelsAndAnnotationsManagedFieldPaths); err != nil {
+ // Drop managedFields for manager:Update and capi-kubeadmcontrolplane:Apply for all objects created with CAPI <= v1.11.
+ // Starting with CAPI v1.12 we have a new managedField structure where capi-kubeadmcontrolplane-metadata will own
+ // labels and annotations and capi-kubeadmcontrolplane everything else.
+ // Note: We have to call ssa.MigrateManagedFields for every Machine created with CAPI <= v1.11 once.
+ // Given that this was introduced in CAPI v1.12 and our n-3 upgrade policy this can
+ // be removed with CAPI v1.15.
+ if err := ssa.MigrateManagedFields(ctx, r.Client, kubeadmConfig, kcpManagerName, kcpMetadataManagerName); err != nil {
return errors.Wrapf(err, "failed to clean up managedFields of KubeadmConfig %s", klog.KObj(kubeadmConfig))
}
// Update in-place mutating fields on BootstrapConfig.
- if err := r.updateExternalObject(ctx, kubeadmConfig, controlPlane.KCP, controlPlane.Cluster); err != nil {
+ if err := r.updateLabelsAndAnnotations(ctx, kubeadmConfig, bootstrapv1.GroupVersion.WithKind("KubeadmConfig"), controlPlane.KCP, controlPlane.Cluster); err != nil {
return errors.Wrapf(err, "failed to update KubeadmConfig %s", klog.KObj(kubeadmConfig))
}
}
@@ -980,16 +1016,17 @@ func (r *KubeadmControlPlaneReconciler) reconcileControlPlaneAndMachinesConditio
}
func reconcileMachineUpToDateCondition(_ context.Context, controlPlane *internal.ControlPlane) {
- machinesNotUptoDate, machinesNotUptoDateConditionMessages := controlPlane.NotUpToDateMachines()
+ machinesNotUptoDate, machinesUpToDateResults := controlPlane.NotUpToDateMachines()
machinesNotUptoDateNames := sets.New(machinesNotUptoDate.Names()...)
for _, machine := range controlPlane.Machines {
if machinesNotUptoDateNames.Has(machine.Name) {
// Note: the code computing the message for KCP's RolloutOut condition is making assumptions on the format/content of this message.
message := ""
- if reasons, ok := machinesNotUptoDateConditionMessages[machine.Name]; ok {
- for i := range reasons {
- reasons[i] = fmt.Sprintf("* %s", reasons[i])
+ if machineUpToDateResult, ok := machinesUpToDateResults[machine.Name]; ok && len(machineUpToDateResult.ConditionMessages) > 0 {
+ var reasons []string
+ for _, conditionMessage := range machineUpToDateResult.ConditionMessages {
+ reasons = append(reasons, fmt.Sprintf("* %s", conditionMessage))
}
message = strings.Join(reasons, "\n")
}
@@ -1000,9 +1037,23 @@ func reconcileMachineUpToDateCondition(_ context.Context, controlPlane *internal
Reason: clusterv1.MachineNotUpToDateReason,
Message: message,
})
+ continue
+ }
+ if inplace.IsUpdateInProgress(machine) {
+ msg := "* In-place update in progress"
+ if c := conditions.Get(machine, clusterv1.MachineUpdatingCondition); c != nil && c.Status == metav1.ConditionTrue && c.Message != "" {
+ msg = fmt.Sprintf("* %s", c.Message)
+ }
+ conditions.Set(machine, metav1.Condition{
+ Type: clusterv1.MachineUpToDateCondition,
+ Status: metav1.ConditionFalse,
+ Reason: clusterv1.MachineUpToDateUpdatingReason,
+ Message: msg,
+ })
continue
}
+
conditions.Set(machine, metav1.Condition{
Type: clusterv1.MachineUpToDateCondition,
Status: metav1.ConditionTrue,
@@ -1387,7 +1438,7 @@ func (r *KubeadmControlPlaneReconciler) adoptOwnedSecrets(ctx context.Context, k
for i := range secrets.Items {
s := secrets.Items[i]
- if !util.IsOwnedByObject(&s, currentOwner) {
+ if !util.IsOwnedByObject(&s, currentOwner, bootstrapv1.GroupVersion.WithKind("KubeadmConfig").GroupKind()) {
continue
}
// avoid taking ownership of the bootstrap data secret
diff --git a/controlplane/kubeadm/internal/controllers/controller_test.go b/controlplane/kubeadm/internal/controllers/controller_test.go
index 4f2f82002283..7ee1bc1bcde8 100644
--- a/controlplane/kubeadm/internal/controllers/controller_test.go
+++ b/controlplane/kubeadm/internal/controllers/controller_test.go
@@ -33,8 +33,10 @@ import (
"github.com/pkg/errors"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
+ apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+ "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/client-go/tools/clientcmd"
@@ -52,9 +54,9 @@ import (
"sigs.k8s.io/cluster-api/controllers/clustercache"
"sigs.k8s.io/cluster-api/controllers/external"
"sigs.k8s.io/cluster-api/controlplane/kubeadm/internal"
+ "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/desiredstate"
controlplanev1webhooks "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/webhooks"
"sigs.k8s.io/cluster-api/feature"
- "sigs.k8s.io/cluster-api/internal/contract"
"sigs.k8s.io/cluster-api/internal/util/ssa"
"sigs.k8s.io/cluster-api/internal/webhooks"
"sigs.k8s.io/cluster-api/util"
@@ -68,6 +70,10 @@ import (
"sigs.k8s.io/cluster-api/util/test/builder"
)
+const (
+ timeout = time.Second * 30
+)
+
func TestClusterToKubeadmControlPlane(t *testing.T) {
g := NewWithT(t)
fakeClient := newFakeClient()
@@ -520,7 +526,7 @@ func TestKubeadmControlPlaneReconciler_adoption(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{
Namespace: cluster.Namespace,
Name: name,
- Labels: internal.ControlPlaneMachineLabelsForCluster(kcp, cluster.Name),
+ Labels: desiredstate.ControlPlaneMachineLabels(kcp, cluster.Name),
},
Spec: clusterv1.MachineSpec{
Bootstrap: clusterv1.Bootstrap{
@@ -588,7 +594,7 @@ func TestKubeadmControlPlaneReconciler_adoption(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{
Namespace: cluster.Namespace,
Name: name,
- Labels: internal.ControlPlaneMachineLabelsForCluster(kcp, cluster.Name),
+ Labels: desiredstate.ControlPlaneMachineLabels(kcp, cluster.Name),
},
Spec: clusterv1.MachineSpec{
Bootstrap: clusterv1.Bootstrap{
@@ -602,10 +608,6 @@ func TestKubeadmControlPlaneReconciler_adoption(t *testing.T) {
},
}
cfg := &bootstrapv1.KubeadmConfig{
- TypeMeta: metav1.TypeMeta{
- APIVersion: bootstrapv1.GroupVersion.String(),
- Kind: "KubeadmConfig",
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: cluster.Namespace,
Name: name,
@@ -703,7 +705,7 @@ func TestKubeadmControlPlaneReconciler_adoption(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{
Namespace: cluster.Namespace,
Name: name,
- Labels: internal.ControlPlaneMachineLabelsForCluster(kcp, cluster.Name),
+ Labels: desiredstate.ControlPlaneMachineLabels(kcp, cluster.Name),
},
Spec: clusterv1.MachineSpec{
Bootstrap: clusterv1.Bootstrap{
@@ -761,7 +763,7 @@ func TestKubeadmControlPlaneReconciler_adoption(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{
Namespace: cluster.Namespace,
Name: "test0",
- Labels: internal.ControlPlaneMachineLabelsForCluster(kcp, cluster.Name),
+ Labels: desiredstate.ControlPlaneMachineLabels(kcp, cluster.Name),
},
Spec: clusterv1.MachineSpec{
Bootstrap: clusterv1.Bootstrap{
@@ -983,6 +985,9 @@ func TestReconcileCertificateExpiries(t *testing.T) {
cluster := newCluster(&types.NamespacedName{Name: "foo", Namespace: metav1.NamespaceDefault})
kcp := &controlplanev1.KubeadmControlPlane{
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ Version: "v1.30.0",
+ },
Status: controlplanev1.KubeadmControlPlaneStatus{
Initialization: controlplanev1.KubeadmControlPlaneInitializationStatus{
ControlPlaneInitialized: ptr.To(true),
@@ -1524,7 +1529,7 @@ func TestReconcileInitializeControlPlane_withUserCA(t *testing.T) {
KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{},
},
}
- g.Expect(env.Create(ctx, kcp)).To(Succeed())
+ g.Expect(env.CreateAndWait(ctx, kcp)).To(Succeed())
corednsCM := &corev1.ConfigMap{
ObjectMeta: metav1.ObjectMeta{
@@ -1701,7 +1706,6 @@ func TestKubeadmControlPlaneReconciler_syncMachines(t *testing.T) {
namespace, testCluster := setup(t, g)
defer teardown(t, g, namespace, testCluster)
- classicManager := "manager"
duration5s := ptr.To(int32(5))
duration10s := ptr.To(int32(10))
@@ -1716,12 +1720,12 @@ func TestKubeadmControlPlaneReconciler_syncMachines(t *testing.T) {
"metadata": map[string]interface{}{
"name": "existing-inframachine",
"namespace": testCluster.Namespace,
- "labels": map[string]string{
+ "labels": map[string]interface{}{
"preserved-label": "preserved-value",
"dropped-label": "dropped-value",
"modified-label": "modified-value",
},
- "annotations": map[string]string{
+ "annotations": map[string]interface{}{
"preserved-annotation": "preserved-value",
"dropped-annotation": "dropped-value",
"modified-annotation": "modified-value",
@@ -1735,18 +1739,12 @@ func TestKubeadmControlPlaneReconciler_syncMachines(t *testing.T) {
Name: "existing-inframachine",
APIGroup: clusterv1.GroupVersionInfrastructure.Group,
}
- // Note: use "manager" as the field owner to mimic the manager used before ClusterAPI v1.4.0.
- g.Expect(env.Create(ctx, existingInfraMachine, client.FieldOwner("manager"))).To(Succeed())
// Existing KubeadmConfig
bootstrapSpec := &bootstrapv1.KubeadmConfigSpec{
Users: []bootstrapv1.User{{Name: "test-user"}},
}
existingKubeadmConfig := &bootstrapv1.KubeadmConfig{
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmConfig",
- APIVersion: bootstrapv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Name: "existing-kubeadmconfig",
Namespace: namespace.Name,
@@ -1768,16 +1766,10 @@ func TestKubeadmControlPlaneReconciler_syncMachines(t *testing.T) {
Name: "existing-kubeadmconfig",
APIGroup: bootstrapv1.GroupVersion.Group,
}
- // Note: use "manager" as the field owner to mimic the manager used before ClusterAPI v1.4.0.
- g.Expect(env.Create(ctx, existingKubeadmConfig, client.FieldOwner("manager"))).To(Succeed())
// Existing Machine to validate in-place mutation
fd := "fd1"
inPlaceMutatingMachine := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- Kind: "Machine",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Name: "existing-machine",
Namespace: namespace.Name,
@@ -1800,7 +1792,7 @@ func TestKubeadmControlPlaneReconciler_syncMachines(t *testing.T) {
InfrastructureRef: *infraMachineRef,
Version: "v1.25.3",
FailureDomain: fd,
- ProviderID: "provider-id",
+ // ProviderID is intentionally not set here, this field is set by the Machine controller.
Deletion: clusterv1.MachineDeletionSpec{
NodeDrainTimeoutSeconds: duration5s,
NodeVolumeDetachTimeoutSeconds: duration5s,
@@ -1808,15 +1800,9 @@ func TestKubeadmControlPlaneReconciler_syncMachines(t *testing.T) {
},
},
}
- // Note: use "manager" as the field owner to mimic the manager used before ClusterAPI v1.4.0.
- g.Expect(env.Create(ctx, inPlaceMutatingMachine, client.FieldOwner("manager"))).To(Succeed())
// Existing machine that is in deleting state
deletingMachine := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- APIVersion: clusterv1.GroupVersion.String(),
- Kind: "Machine",
- },
ObjectMeta: metav1.ObjectMeta{
Name: "deleting-machine",
Namespace: namespace.Name,
@@ -1832,33 +1818,23 @@ func TestKubeadmControlPlaneReconciler_syncMachines(t *testing.T) {
Name: "inframachine",
},
Bootstrap: clusterv1.Bootstrap{
- DataSecretName: ptr.To("machine-bootstrap-secret"),
+ ConfigRef: clusterv1.ContractVersionedObjectReference{
+ Kind: "KubeadmConfig",
+ Name: "non-existing-kubeadmconfig",
+ APIGroup: bootstrapv1.GroupVersion.Group,
+ },
},
Deletion: clusterv1.MachineDeletionSpec{
NodeDrainTimeoutSeconds: duration5s,
NodeVolumeDetachTimeoutSeconds: duration5s,
NodeDeletionTimeoutSeconds: duration5s,
},
- ReadinessGates: mandatoryMachineReadinessGates,
+ ReadinessGates: desiredstate.MandatoryMachineReadinessGates,
},
}
- g.Expect(env.Create(ctx, deletingMachine, client.FieldOwner(classicManager))).To(Succeed())
- // Delete the machine to put it in the deleting state
- g.Expect(env.Delete(ctx, deletingMachine)).To(Succeed())
- // Wait till the machine is marked for deletion
- g.Eventually(func() bool {
- if err := env.Get(ctx, client.ObjectKeyFromObject(deletingMachine), deletingMachine); err != nil {
- return false
- }
- return !deletingMachine.DeletionTimestamp.IsZero()
- }, 30*time.Second).Should(BeTrue())
// Existing machine that has a InfrastructureRef which does not exist.
nilInfraMachineMachine := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- APIVersion: clusterv1.GroupVersion.String(),
- Kind: "Machine",
- },
ObjectMeta: metav1.ObjectMeta{
Name: "nil-infra-machine-machine",
Namespace: namespace.Name,
@@ -1874,18 +1850,16 @@ func TestKubeadmControlPlaneReconciler_syncMachines(t *testing.T) {
Name: "inframachine",
},
Bootstrap: clusterv1.Bootstrap{
- DataSecretName: ptr.To("machine-bootstrap-secret"),
+ ConfigRef: clusterv1.ContractVersionedObjectReference{
+ Kind: "KubeadmConfig",
+ Name: "non-existing-kubeadmconfig",
+ APIGroup: bootstrapv1.GroupVersion.Group,
+ },
},
},
}
- g.Expect(env.Create(ctx, nilInfraMachineMachine, client.FieldOwner(classicManager))).To(Succeed())
- // Delete the machine to put it in the deleting state
kcp := &controlplanev1.KubeadmControlPlane{
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmControlPlane",
- APIVersion: controlplanev1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
UID: types.UID("abc-123-control-plane"),
Name: "existing-kcp",
@@ -1923,6 +1897,32 @@ func TestKubeadmControlPlaneReconciler_syncMachines(t *testing.T) {
},
}
+ //
+ // Create objects
+ //
+
+ // Create InfraMachine (same as in createInfraMachine)
+ g.Expect(ssa.Patch(ctx, env.Client, kcpManagerName, existingInfraMachine)).To(Succeed())
+ g.Expect(ssa.RemoveManagedFieldsForLabelsAndAnnotations(ctx, env.Client, env.GetAPIReader(), existingInfraMachine, kcpManagerName)).To(Succeed())
+
+ // Create KubeadmConfig (same as in createKubeadmConfig)
+ g.Expect(ssa.Patch(ctx, env.Client, kcpManagerName, existingKubeadmConfig)).To(Succeed())
+ g.Expect(ssa.RemoveManagedFieldsForLabelsAndAnnotations(ctx, env.Client, env.GetAPIReader(), existingKubeadmConfig, kcpManagerName)).To(Succeed())
+
+ // Create Machines (same as in createMachine)
+ g.Expect(ssa.Patch(ctx, env.Client, kcpManagerName, inPlaceMutatingMachine)).To(Succeed())
+ g.Expect(ssa.Patch(ctx, env.Client, kcpManagerName, deletingMachine)).To(Succeed())
+ // Delete the machine to put it in the deleting state
+ g.Expect(env.Delete(ctx, deletingMachine)).To(Succeed())
+ // Wait till the machine is marked for deletion
+ g.Eventually(func() bool {
+ if err := env.Get(ctx, client.ObjectKeyFromObject(deletingMachine), deletingMachine); err != nil {
+ return false
+ }
+ return !deletingMachine.DeletionTimestamp.IsZero()
+ }, timeout).Should(BeTrue())
+ g.Expect(ssa.Patch(ctx, env.Client, kcpManagerName, nilInfraMachineMachine)).To(Succeed())
+
controlPlane := &internal.ControlPlane{
KCP: kcp,
Cluster: testCluster,
@@ -1948,66 +1948,67 @@ func TestKubeadmControlPlaneReconciler_syncMachines(t *testing.T) {
// Run syncMachines to clean up managed fields and have proper field ownership
// for Machines, InfrastructureMachines and KubeadmConfigs.
reconciler := &KubeadmControlPlaneReconciler{
- Client: env,
+ // Note: Ensure the fieldManager defaults to manager like in prod.
+ // Otherwise it defaults to the binary name which is not manager in tests.
+ Client: client.WithFieldOwner(env.Client, "manager"),
SecretCachingClient: secretCachingClient,
ssaCache: ssa.NewCache("test-controller"),
}
g.Expect(reconciler.syncMachines(ctx, controlPlane)).To(Succeed())
- // The inPlaceMutatingMachine should have cleaned up managed fields.
- updatedInplaceMutatingMachine := inPlaceMutatingMachine.DeepCopy()
- g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(updatedInplaceMutatingMachine), updatedInplaceMutatingMachine)).To(Succeed())
- // Verify ManagedFields
- g.Expect(updatedInplaceMutatingMachine.ManagedFields).Should(
- ContainElement(ssa.MatchManagedFieldsEntry(kcpManagerName, metav1.ManagedFieldsOperationApply)),
- "in-place mutable machine should contain an entry for SSA manager",
- )
- g.Expect(updatedInplaceMutatingMachine.ManagedFields).ShouldNot(
- ContainElement(ssa.MatchManagedFieldsEntry(classicManager, metav1.ManagedFieldsOperationUpdate)),
- "in-place mutable machine should not contain an entry for old manager",
- )
+ updatedInPlaceMutatingMachine := inPlaceMutatingMachine.DeepCopy()
+ g.Eventually(func(g Gomega) {
+ g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(updatedInPlaceMutatingMachine), updatedInPlaceMutatingMachine)).To(Succeed())
+ g.Expect(cleanupTime(updatedInPlaceMutatingMachine.ManagedFields)).To(ConsistOf(toManagedFields([]managedFieldEntry{{
+ // capi-kubeadmcontrolplane owns almost everything.
+ Manager: kcpManagerName,
+ Operation: metav1.ManagedFieldsOperationApply,
+ APIVersion: clusterv1.GroupVersion.String(),
+ FieldsV1: "{\"f:metadata\":{\"f:annotations\":{\"f:dropped-annotation\":{},\"f:modified-annotation\":{},\"f:pre-terminate.delete.hook.machine.cluster.x-k8s.io/kcp-cleanup\":{},\"f:preserved-annotation\":{}},\"f:labels\":{\"f:cluster.x-k8s.io/cluster-name\":{},\"f:cluster.x-k8s.io/control-plane\":{},\"f:cluster.x-k8s.io/control-plane-name\":{},\"f:dropped-label\":{},\"f:modified-label\":{},\"f:preserved-label\":{}},\"f:ownerReferences\":{\"k:{\\\"uid\\\":\\\"abc-123-control-plane\\\"}\":{}}},\"f:spec\":{\"f:bootstrap\":{\"f:configRef\":{\"f:apiGroup\":{},\"f:kind\":{},\"f:name\":{}}},\"f:clusterName\":{},\"f:deletion\":{\"f:nodeDeletionTimeoutSeconds\":{},\"f:nodeDrainTimeoutSeconds\":{},\"f:nodeVolumeDetachTimeoutSeconds\":{}},\"f:failureDomain\":{},\"f:infrastructureRef\":{\"f:apiGroup\":{},\"f:kind\":{},\"f:name\":{}},\"f:readinessGates\":{\"k:{\\\"conditionType\\\":\\\"APIServerPodHealthy\\\"}\":{\".\":{},\"f:conditionType\":{}},\"k:{\\\"conditionType\\\":\\\"ControllerManagerPodHealthy\\\"}\":{\".\":{},\"f:conditionType\":{}},\"k:{\\\"conditionType\\\":\\\"EtcdMemberHealthy\\\"}\":{\".\":{},\"f:conditionType\":{}},\"k:{\\\"conditionType\\\":\\\"EtcdPodHealthy\\\"}\":{\".\":{},\"f:conditionType\":{}},\"k:{\\\"conditionType\\\":\\\"SchedulerPodHealthy\\\"}\":{\".\":{},\"f:conditionType\":{}}},\"f:version\":{}}}",
+ }})))
+ }, timeout).Should(Succeed())
- // The InfrastructureMachine should have ownership of "labels" and "annotations" transferred to
- // "capi-kubeadmcontrolplane" manager.
updatedInfraMachine := existingInfraMachine.DeepCopy()
- g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(updatedInfraMachine), updatedInfraMachine)).To(Succeed())
+ g.Eventually(func(g Gomega) {
+ g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(updatedInfraMachine), updatedInfraMachine)).To(Succeed())
+ g.Expect(cleanupTime(updatedInfraMachine.GetManagedFields())).To(ConsistOf(toManagedFields([]managedFieldEntry{{
+ // capi-kubeadmcontrolplane-metadata owns labels and annotations.
+ Manager: kcpMetadataManagerName,
+ Operation: metav1.ManagedFieldsOperationApply,
+ APIVersion: updatedInfraMachine.GetAPIVersion(),
+ FieldsV1: "{\"f:metadata\":{\"f:annotations\":{\"f:dropped-annotation\":{},\"f:modified-annotation\":{},\"f:preserved-annotation\":{}},\"f:labels\":{\"f:cluster.x-k8s.io/cluster-name\":{},\"f:cluster.x-k8s.io/control-plane\":{},\"f:cluster.x-k8s.io/control-plane-name\":{},\"f:dropped-label\":{},\"f:modified-label\":{},\"f:preserved-label\":{}}}}",
+ }, {
+ // capi-kubeadmcontrolplane owns almost everything.
+ Manager: kcpManagerName,
+ Operation: metav1.ManagedFieldsOperationApply,
+ APIVersion: updatedInfraMachine.GetAPIVersion(),
+ FieldsV1: "{\"f:spec\":{\"f:infra-field\":{}}}",
+ }})))
+ }, timeout).Should(Succeed())
- // Verify ManagedFields
- g.Expect(updatedInfraMachine.GetManagedFields()).Should(
- ssa.MatchFieldOwnership(kcpManagerName, metav1.ManagedFieldsOperationApply, contract.Path{"f:metadata", "f:labels"}))
- g.Expect(updatedInfraMachine.GetManagedFields()).Should(
- ssa.MatchFieldOwnership(kcpManagerName, metav1.ManagedFieldsOperationApply, contract.Path{"f:metadata", "f:annotations"}))
- g.Expect(updatedInfraMachine.GetManagedFields()).ShouldNot(
- ssa.MatchFieldOwnership(classicManager, metav1.ManagedFieldsOperationUpdate, contract.Path{"f:metadata", "f:labels"}))
- g.Expect(updatedInfraMachine.GetManagedFields()).ShouldNot(
- ssa.MatchFieldOwnership(classicManager, metav1.ManagedFieldsOperationUpdate, contract.Path{"f:metadata", "f:annotations"}))
- // Verify ownership of other fields is not changed.
- g.Expect(updatedInfraMachine.GetManagedFields()).Should(
- ssa.MatchFieldOwnership(classicManager, metav1.ManagedFieldsOperationUpdate, contract.Path{"f:spec"}))
-
- // The KubeadmConfig should have ownership of "labels" and "annotations" transferred to
- // "capi-kubeadmcontrolplane" manager.
updatedKubeadmConfig := existingKubeadmConfig.DeepCopy()
- g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(updatedKubeadmConfig), updatedKubeadmConfig)).To(Succeed())
-
- // Verify ManagedFields
- g.Expect(updatedKubeadmConfig.GetManagedFields()).Should(
- ssa.MatchFieldOwnership(kcpManagerName, metav1.ManagedFieldsOperationApply, contract.Path{"f:metadata", "f:labels"}))
- g.Expect(updatedKubeadmConfig.GetManagedFields()).Should(
- ssa.MatchFieldOwnership(kcpManagerName, metav1.ManagedFieldsOperationApply, contract.Path{"f:metadata", "f:annotations"}))
- g.Expect(updatedKubeadmConfig.GetManagedFields()).ShouldNot(
- ssa.MatchFieldOwnership(classicManager, metav1.ManagedFieldsOperationUpdate, contract.Path{"f:metadata", "f:labels"}))
- g.Expect(updatedKubeadmConfig.GetManagedFields()).ShouldNot(
- ssa.MatchFieldOwnership(classicManager, metav1.ManagedFieldsOperationUpdate, contract.Path{"f:metadata", "f:annotations"}))
- // Verify ownership of other fields is not changed.
- g.Expect(updatedKubeadmConfig.GetManagedFields()).Should(
- ssa.MatchFieldOwnership(classicManager, metav1.ManagedFieldsOperationUpdate, contract.Path{"f:spec"}))
+ g.Eventually(func(g Gomega) {
+ g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(updatedKubeadmConfig), updatedKubeadmConfig)).To(Succeed())
+ g.Expect(cleanupTime(updatedKubeadmConfig.GetManagedFields())).To(ConsistOf(toManagedFields([]managedFieldEntry{{
+ // capi-kubeadmcontrolplane-metadata owns labels and annotations.
+ Manager: kcpMetadataManagerName,
+ Operation: metav1.ManagedFieldsOperationApply,
+ APIVersion: bootstrapv1.GroupVersion.String(),
+ FieldsV1: "{\"f:metadata\":{\"f:annotations\":{\"f:dropped-annotation\":{},\"f:modified-annotation\":{},\"f:preserved-annotation\":{}},\"f:labels\":{\"f:cluster.x-k8s.io/cluster-name\":{},\"f:cluster.x-k8s.io/control-plane\":{},\"f:cluster.x-k8s.io/control-plane-name\":{},\"f:dropped-label\":{},\"f:modified-label\":{},\"f:preserved-label\":{}}}}",
+ }, {
+ // capi-kubeadmcontrolplane owns almost everything.
+ Manager: kcpManagerName,
+ Operation: metav1.ManagedFieldsOperationApply,
+ APIVersion: bootstrapv1.GroupVersion.String(),
+ FieldsV1: "{\"f:spec\":{\"f:users\":{}}}",
+ }})))
+ }, timeout).Should(Succeed())
//
// Verify In-place mutating fields
//
- // Update KCP and verify the in-place mutating fields are propagated.
+ // Update the KCP and verify the in-place mutating fields are propagated.
kcp.Spec.MachineTemplate.ObjectMeta.Labels = map[string]string{
"preserved-label": "preserved-value", // Keep the label and value as is
"modified-label": "modified-value-2", // Modify the value of the label
@@ -2028,50 +2029,34 @@ func TestKubeadmControlPlaneReconciler_syncMachines(t *testing.T) {
kcp.Spec.MachineTemplate.Spec.Deletion.NodeDrainTimeoutSeconds = duration10s
kcp.Spec.MachineTemplate.Spec.Deletion.NodeDeletionTimeoutSeconds = duration10s
kcp.Spec.MachineTemplate.Spec.Deletion.NodeVolumeDetachTimeoutSeconds = duration10s
-
- // Use the updated KCP.
controlPlane.KCP = kcp
g.Expect(reconciler.syncMachines(ctx, controlPlane)).To(Succeed())
// Verify in-place mutable fields are updated on the Machine.
- updatedInplaceMutatingMachine = inPlaceMutatingMachine.DeepCopy()
- g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(updatedInplaceMutatingMachine), updatedInplaceMutatingMachine)).To(Succeed())
- // Verify Labels
- g.Expect(updatedInplaceMutatingMachine.Labels).Should(Equal(expectedLabels))
- // Verify Annotations
+ updatedInPlaceMutatingMachine = inPlaceMutatingMachine.DeepCopy()
+ g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(updatedInPlaceMutatingMachine), updatedInPlaceMutatingMachine)).To(Succeed())
+ g.Expect(updatedInPlaceMutatingMachine.Labels).Should(Equal(expectedLabels))
expectedAnnotations := map[string]string{}
for k, v := range kcp.Spec.MachineTemplate.ObjectMeta.Annotations {
expectedAnnotations[k] = v
}
// The pre-terminate annotation should always be added
expectedAnnotations[controlplanev1.PreTerminateHookCleanupAnnotation] = ""
- g.Expect(updatedInplaceMutatingMachine.Annotations).Should(Equal(expectedAnnotations))
- // Verify Node timeout values
- g.Expect(updatedInplaceMutatingMachine.Spec.Deletion.NodeDrainTimeoutSeconds).Should(And(
- Not(BeNil()),
- HaveValue(BeComparableTo(*kcp.Spec.MachineTemplate.Spec.Deletion.NodeDrainTimeoutSeconds)),
- ))
- g.Expect(updatedInplaceMutatingMachine.Spec.Deletion.NodeDeletionTimeoutSeconds).Should(And(
- Not(BeNil()),
- HaveValue(BeComparableTo(*kcp.Spec.MachineTemplate.Spec.Deletion.NodeDeletionTimeoutSeconds)),
- ))
- g.Expect(updatedInplaceMutatingMachine.Spec.Deletion.NodeVolumeDetachTimeoutSeconds).Should(And(
- Not(BeNil()),
- HaveValue(BeComparableTo(*kcp.Spec.MachineTemplate.Spec.Deletion.NodeVolumeDetachTimeoutSeconds)),
- ))
+ g.Expect(updatedInPlaceMutatingMachine.Annotations).Should(Equal(expectedAnnotations))
+ g.Expect(updatedInPlaceMutatingMachine.Spec.Deletion.NodeDrainTimeoutSeconds).Should(Equal(kcp.Spec.MachineTemplate.Spec.Deletion.NodeDrainTimeoutSeconds))
+ g.Expect(updatedInPlaceMutatingMachine.Spec.Deletion.NodeDeletionTimeoutSeconds).Should(Equal(kcp.Spec.MachineTemplate.Spec.Deletion.NodeDeletionTimeoutSeconds))
+ g.Expect(updatedInPlaceMutatingMachine.Spec.Deletion.NodeVolumeDetachTimeoutSeconds).Should(Equal(kcp.Spec.MachineTemplate.Spec.Deletion.NodeVolumeDetachTimeoutSeconds))
// Verify that the non in-place mutating fields remain the same.
- g.Expect(updatedInplaceMutatingMachine.Spec.FailureDomain).Should(Equal(inPlaceMutatingMachine.Spec.FailureDomain))
- g.Expect(updatedInplaceMutatingMachine.Spec.ProviderID).Should(Equal(inPlaceMutatingMachine.Spec.ProviderID))
- g.Expect(updatedInplaceMutatingMachine.Spec.Version).Should(Equal(inPlaceMutatingMachine.Spec.Version))
- g.Expect(updatedInplaceMutatingMachine.Spec.InfrastructureRef).Should(BeComparableTo(inPlaceMutatingMachine.Spec.InfrastructureRef))
- g.Expect(updatedInplaceMutatingMachine.Spec.Bootstrap).Should(BeComparableTo(inPlaceMutatingMachine.Spec.Bootstrap))
+ g.Expect(updatedInPlaceMutatingMachine.Spec.FailureDomain).Should(Equal(inPlaceMutatingMachine.Spec.FailureDomain))
+ g.Expect(updatedInPlaceMutatingMachine.Spec.ProviderID).Should(Equal(inPlaceMutatingMachine.Spec.ProviderID))
+ g.Expect(updatedInPlaceMutatingMachine.Spec.Version).Should(Equal(inPlaceMutatingMachine.Spec.Version))
+ g.Expect(updatedInPlaceMutatingMachine.Spec.InfrastructureRef).Should(BeComparableTo(inPlaceMutatingMachine.Spec.InfrastructureRef))
+ g.Expect(updatedInPlaceMutatingMachine.Spec.Bootstrap).Should(BeComparableTo(inPlaceMutatingMachine.Spec.Bootstrap))
// Verify in-place mutable fields are updated on InfrastructureMachine
updatedInfraMachine = existingInfraMachine.DeepCopy()
g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(updatedInfraMachine), updatedInfraMachine)).To(Succeed())
- // Verify Labels
g.Expect(updatedInfraMachine.GetLabels()).Should(Equal(expectedLabels))
- // Verify Annotations
g.Expect(updatedInfraMachine.GetAnnotations()).Should(Equal(kcp.Spec.MachineTemplate.ObjectMeta.Annotations))
// Verify spec remains the same
g.Expect(updatedInfraMachine.Object).Should(HaveKeyWithValue("spec", infraMachineSpec))
@@ -2079,31 +2064,35 @@ func TestKubeadmControlPlaneReconciler_syncMachines(t *testing.T) {
// Verify in-place mutable fields are updated on the KubeadmConfig.
updatedKubeadmConfig = existingKubeadmConfig.DeepCopy()
g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(updatedKubeadmConfig), updatedKubeadmConfig)).To(Succeed())
- // Verify Labels
g.Expect(updatedKubeadmConfig.GetLabels()).Should(Equal(expectedLabels))
- // Verify Annotations
g.Expect(updatedKubeadmConfig.GetAnnotations()).Should(Equal(kcp.Spec.MachineTemplate.ObjectMeta.Annotations))
// Verify spec remains the same
g.Expect(updatedKubeadmConfig.Spec).Should(BeComparableTo(existingKubeadmConfig.Spec))
- // The deleting machine should not change.
- updatedDeletingMachine := deletingMachine.DeepCopy()
- g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(updatedDeletingMachine), updatedDeletingMachine)).To(Succeed())
-
// Verify ManagedFields
- g.Expect(updatedDeletingMachine.ManagedFields).ShouldNot(
- ContainElement(ssa.MatchManagedFieldsEntry(kcpManagerName, metav1.ManagedFieldsOperationApply)),
- "deleting machine should not contain an entry for SSA manager",
- )
- g.Expect(updatedDeletingMachine.ManagedFields).Should(
- ContainElement(ssa.MatchManagedFieldsEntry("manager", metav1.ManagedFieldsOperationUpdate)),
- "in-place mutable machine should still contain an entry for old manager",
- )
+ g.Eventually(func(g Gomega) {
+ updatedDeletingMachine := deletingMachine.DeepCopy()
+ g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(updatedDeletingMachine), updatedDeletingMachine)).To(Succeed())
+ g.Expect(cleanupTime(updatedDeletingMachine.ManagedFields)).To(ConsistOf(toManagedFields([]managedFieldEntry{{
+ // capi-kubeadmcontrolplane owns almost everything.
+ Manager: kcpManagerName,
+ Operation: metav1.ManagedFieldsOperationApply,
+ APIVersion: clusterv1.GroupVersion.String(),
+ FieldsV1: "{\"f:metadata\":{\"f:finalizers\":{\"v:\\\"testing-finalizer\\\"\":{}}},\"f:spec\":{\"f:bootstrap\":{\"f:configRef\":{\"f:apiGroup\":{},\"f:kind\":{},\"f:name\":{}}},\"f:clusterName\":{},\"f:infrastructureRef\":{\"f:apiGroup\":{},\"f:kind\":{},\"f:name\":{}},\"f:readinessGates\":{\"k:{\\\"conditionType\\\":\\\"APIServerPodHealthy\\\"}\":{\".\":{},\"f:conditionType\":{}},\"k:{\\\"conditionType\\\":\\\"ControllerManagerPodHealthy\\\"}\":{\".\":{},\"f:conditionType\":{}},\"k:{\\\"conditionType\\\":\\\"SchedulerPodHealthy\\\"}\":{\".\":{},\"f:conditionType\":{}}}}}",
+ }, {
+ // capi-kubeadmcontrolplane owns the fields that are propagated in-place for deleting Machines in syncMachines via patchHelper.
+ Manager: "manager",
+ Operation: metav1.ManagedFieldsOperationUpdate,
+ APIVersion: clusterv1.GroupVersion.String(),
+ FieldsV1: "{\"f:spec\":{\"f:deletion\":{\"f:nodeDeletionTimeoutSeconds\":{},\"f:nodeDrainTimeoutSeconds\":{},\"f:nodeVolumeDetachTimeoutSeconds\":{}}}}",
+ }})))
+ }, timeout).Should(Succeed())
- // Verify the machine labels and annotations are unchanged.
- g.Expect(updatedDeletingMachine.Labels).Should(Equal(deletingMachine.Labels))
- g.Expect(updatedDeletingMachine.Annotations).Should(Equal(deletingMachine.Annotations))
- // Verify Node timeout values
+ // Verify in-place mutable fields are updated on the deleting Machine.
+ updatedDeletingMachine := deletingMachine.DeepCopy()
+ g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(updatedDeletingMachine), updatedDeletingMachine)).To(Succeed())
+ g.Expect(updatedDeletingMachine.Labels).Should(Equal(deletingMachine.Labels)) // Not propagated to a deleting Machine
+ g.Expect(updatedDeletingMachine.Annotations).Should(Equal(deletingMachine.Annotations)) // Not propagated to a deleting Machine
g.Expect(updatedDeletingMachine.Spec.Deletion.NodeDrainTimeoutSeconds).Should(Equal(kcp.Spec.MachineTemplate.Spec.Deletion.NodeDrainTimeoutSeconds))
g.Expect(updatedDeletingMachine.Spec.Deletion.NodeDeletionTimeoutSeconds).Should(Equal(kcp.Spec.MachineTemplate.Spec.Deletion.NodeDeletionTimeoutSeconds))
g.Expect(updatedDeletingMachine.Spec.Deletion.NodeVolumeDetachTimeoutSeconds).Should(Equal(kcp.Spec.MachineTemplate.Spec.Deletion.NodeVolumeDetachTimeoutSeconds))
@@ -2333,6 +2322,91 @@ func TestKubeadmControlPlaneReconciler_reconcileControlPlaneAndMachinesCondition
},
},
},
+ {
+ name: "Machines in place updating, machine not up-to-date date",
+ controlPlane: func() *internal.ControlPlane {
+ controlPlane, err := internal.NewControlPlane(ctx, nil, env.GetClient(), defaultCluster, defaultKCP.DeepCopy(), collections.FromMachines(
+ func() *clusterv1.Machine {
+ m := defaultMachine1.DeepCopy()
+ m.Annotations = map[string]string{
+ clusterv1.UpdateInProgressAnnotation: "",
+ }
+ return m
+ }(),
+ ))
+ if err != nil {
+ panic(err)
+ }
+ return controlPlane
+ }(),
+ managementCluster: &fakeManagementCluster{
+ Workload: &fakeWorkloadCluster{
+ Workload: &internal.Workload{
+ Client: fake.NewClientBuilder().Build(),
+ },
+ },
+ },
+ lastProbeSuccessTime: now.Add(-3 * time.Minute),
+ expectKCPConditions: []metav1.Condition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneInitializedCondition,
+ Status: metav1.ConditionTrue,
+ Reason: controlplanev1.KubeadmControlPlaneInitializedReason,
+ },
+ {
+ Type: controlplanev1.KubeadmControlPlaneEtcdClusterHealthyCondition,
+ Status: metav1.ConditionUnknown,
+ Reason: controlplanev1.KubeadmControlPlaneEtcdClusterHealthUnknownReason,
+ Message: "* Machine machine1-test:\n" +
+ " * EtcdMemberHealthy: Waiting for a Node with spec.providerID foo to exist",
+ },
+ {
+ Type: controlplanev1.KubeadmControlPlaneControlPlaneComponentsHealthyCondition,
+ Status: metav1.ConditionUnknown,
+ Reason: controlplanev1.KubeadmControlPlaneControlPlaneComponentsHealthUnknownReason,
+ Message: "* Machine machine1-test:\n" +
+ " * Control plane components: Waiting for a Node with spec.providerID foo to exist",
+ },
+ },
+ expectMachineConditions: []metav1.Condition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineAPIServerPodHealthyCondition,
+ Status: metav1.ConditionUnknown,
+ Reason: controlplanev1.KubeadmControlPlaneMachinePodInspectionFailedReason,
+ Message: "Waiting for a Node with spec.providerID foo to exist",
+ },
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineControllerManagerPodHealthyCondition,
+ Status: metav1.ConditionUnknown,
+ Reason: controlplanev1.KubeadmControlPlaneMachinePodInspectionFailedReason,
+ Message: "Waiting for a Node with spec.providerID foo to exist",
+ },
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineSchedulerPodHealthyCondition,
+ Status: metav1.ConditionUnknown,
+ Reason: controlplanev1.KubeadmControlPlaneMachinePodInspectionFailedReason,
+ Message: "Waiting for a Node with spec.providerID foo to exist",
+ },
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionUnknown,
+ Reason: controlplanev1.KubeadmControlPlaneMachinePodInspectionFailedReason,
+ Message: "Waiting for a Node with spec.providerID foo to exist",
+ },
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdMemberHealthyCondition,
+ Status: metav1.ConditionUnknown,
+ Reason: controlplanev1.KubeadmControlPlaneMachineEtcdMemberInspectionFailedReason,
+ Message: "Waiting for a Node with spec.providerID foo to exist",
+ },
+ {
+ Type: clusterv1.MachineUpToDateCondition,
+ Status: metav1.ConditionFalse,
+ Reason: clusterv1.MachineUpToDateUpdatingReason,
+ Message: "* In-place update in progress",
+ },
+ },
+ },
{
name: "Machines not up to date",
controlPlane: func() *internal.ControlPlane {
@@ -3919,17 +3993,25 @@ func TestObjectsPendingDelete(t *testing.T) {
// test utils.
-func newFakeClient(initObjs ...client.Object) client.Client {
+func newFakeClient(initObjs ...client.Object) client.WithWatch {
+ // Use a new scheme to avoid side effects if multiple tests are sharing the same global scheme.
+ scheme := runtime.NewScheme()
+ _ = appsv1.AddToScheme(scheme)
+ _ = corev1.AddToScheme(scheme)
+ _ = apiextensionsv1.AddToScheme(scheme)
+ _ = clusterv1.AddToScheme(scheme)
+ _ = bootstrapv1.AddToScheme(scheme)
+ _ = controlplanev1.AddToScheme(scheme)
return &fakeClient{
startTime: time.Now(),
- Client: fake.NewClientBuilder().WithObjects(initObjs...).WithStatusSubresource(&controlplanev1.KubeadmControlPlane{}).Build(),
+ WithWatch: fake.NewClientBuilder().WithScheme(scheme).WithObjects(initObjs...).WithStatusSubresource(&controlplanev1.KubeadmControlPlane{}).Build(),
}
}
type fakeClient struct {
startTime time.Time
mux sync.Mutex
- client.Client
+ client.WithWatch
}
type fakeClientI interface {
@@ -3945,7 +4027,7 @@ func (c *fakeClient) Create(ctx context.Context, obj client.Object, opts ...clie
f.SetCreationTimestamp(metav1.NewTime(c.startTime))
c.mux.Unlock()
}
- return c.Client.Create(ctx, obj, opts...)
+ return c.WithWatch.Create(ctx, obj, opts...)
}
func createClusterWithControlPlane(namespace string) (*clusterv1.Cluster, *controlplanev1.KubeadmControlPlane, *unstructured.Unstructured) {
@@ -3961,10 +4043,6 @@ func createClusterWithControlPlane(namespace string) (*clusterv1.Cluster, *contr
}
kcp := &controlplanev1.KubeadmControlPlane{
- TypeMeta: metav1.TypeMeta{
- APIVersion: controlplanev1.GroupVersion.String(),
- Kind: "KubeadmControlPlane",
- },
ObjectMeta: metav1.ObjectMeta{
Name: kcpName,
Namespace: namespace,
@@ -4029,14 +4107,10 @@ func setKCPHealthy(kcp *controlplanev1.KubeadmControlPlane) {
func createMachineNodePair(name string, cluster *clusterv1.Cluster, kcp *controlplanev1.KubeadmControlPlane, ready bool) (*clusterv1.Machine, *corev1.Node) {
machine := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- Kind: "Machine",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: cluster.Namespace,
Name: name,
- Labels: internal.ControlPlaneMachineLabelsForCluster(kcp, cluster.Name),
+ Labels: desiredstate.ControlPlaneMachineLabels(kcp, cluster.Name),
Annotations: map[string]string{},
OwnerReferences: []metav1.OwnerReference{
*metav1.NewControllerRef(kcp, controlplanev1.GroupVersion.WithKind("KubeadmControlPlane")),
@@ -4094,10 +4168,6 @@ func setMachineHealthy(m *clusterv1.Machine) {
// newCluster return a CAPI cluster object.
func newCluster(namespacedName *types.NamespacedName) *clusterv1.Cluster {
return &clusterv1.Cluster{
- TypeMeta: metav1.TypeMeta{
- Kind: "Cluster",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: namespacedName.Namespace,
Name: namespacedName.Name,
diff --git a/controlplane/kubeadm/internal/controllers/fakes_test.go b/controlplane/kubeadm/internal/controllers/fakes_test.go
index 8d819b52d6ad..77bc307a0d2d 100644
--- a/controlplane/kubeadm/internal/controllers/fakes_test.go
+++ b/controlplane/kubeadm/internal/controllers/fakes_test.go
@@ -49,7 +49,7 @@ func (f *fakeManagementCluster) List(ctx context.Context, list client.ObjectList
return f.Reader.List(ctx, list, opts...)
}
-func (f *fakeManagementCluster) GetWorkloadCluster(_ context.Context, _ client.ObjectKey) (internal.WorkloadCluster, error) {
+func (f *fakeManagementCluster) GetWorkloadCluster(_ context.Context, _ *clusterv1.Cluster, _ bootstrapv1.EncryptionAlgorithmType) (internal.WorkloadCluster, error) {
return f.Workload, f.WorkloadErr
}
diff --git a/controlplane/kubeadm/internal/controllers/helpers.go b/controlplane/kubeadm/internal/controllers/helpers.go
index bcc3c4518375..bff3a4d39047 100644
--- a/controlplane/kubeadm/internal/controllers/helpers.go
+++ b/controlplane/kubeadm/internal/controllers/helpers.go
@@ -25,9 +25,8 @@ import (
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
- "k8s.io/apimachinery/pkg/types"
+ "k8s.io/apimachinery/pkg/runtime/schema"
kerrors "k8s.io/apimachinery/pkg/util/errors"
- "k8s.io/apimachinery/pkg/util/sets"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
@@ -36,8 +35,7 @@ import (
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
"sigs.k8s.io/cluster-api/controllers/external"
"sigs.k8s.io/cluster-api/controlplane/kubeadm/internal"
- "sigs.k8s.io/cluster-api/internal/contract"
- topologynames "sigs.k8s.io/cluster-api/internal/topology/names"
+ "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/desiredstate"
"sigs.k8s.io/cluster-api/internal/util/ssa"
"sigs.k8s.io/cluster-api/util"
"sigs.k8s.io/cluster-api/util/certs"
@@ -47,19 +45,6 @@ import (
"sigs.k8s.io/cluster-api/util/secret"
)
-// mandatoryMachineReadinessGates are readinessGates KCP enforces to be set on machine it owns.
-var mandatoryMachineReadinessGates = []clusterv1.MachineReadinessGate{
- {ConditionType: controlplanev1.KubeadmControlPlaneMachineAPIServerPodHealthyCondition},
- {ConditionType: controlplanev1.KubeadmControlPlaneMachineControllerManagerPodHealthyCondition},
- {ConditionType: controlplanev1.KubeadmControlPlaneMachineSchedulerPodHealthyCondition},
-}
-
-// etcdMandatoryMachineReadinessGates are readinessGates KCP enforces to be set on machine it owns if etcd is managed.
-var etcdMandatoryMachineReadinessGates = []clusterv1.MachineReadinessGate{
- {ConditionType: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition},
- {ConditionType: controlplanev1.KubeadmControlPlaneMachineEtcdMemberHealthyCondition},
-}
-
func (r *KubeadmControlPlaneReconciler) reconcileKubeconfig(ctx context.Context, controlPlane *internal.ControlPlane) (ctrl.Result, error) {
log := ctrl.LoggerFrom(ctx)
@@ -67,7 +52,6 @@ func (r *KubeadmControlPlaneReconciler) reconcileKubeconfig(ctx context.Context,
if endpoint.IsZero() {
return ctrl.Result{}, nil
}
-
controllerOwnerRef := *metav1.NewControllerRef(controlPlane.KCP, controlplanev1.GroupVersion.WithKind(kubeadmControlPlaneKind))
clusterName := util.ObjectKey(controlPlane.Cluster)
configSecret, err := secret.GetFromNamespacedName(ctx, r.SecretCachingClient, clusterName, secret.Kubeconfig)
@@ -79,6 +63,7 @@ func (r *KubeadmControlPlaneReconciler) reconcileKubeconfig(ctx context.Context,
clusterName,
endpoint.String(),
controllerOwnerRef,
+ kubeconfig.KeyEncryptionAlgorithm(controlPlane.GetKeyEncryptionAlgorithm()),
)
if errors.Is(createErr, kubeconfig.ErrDependentCertificateNotFound) {
return ctrl.Result{RequeueAfter: dependentCertRequeueAfter}, nil
@@ -94,7 +79,7 @@ func (r *KubeadmControlPlaneReconciler) reconcileKubeconfig(ctx context.Context,
}
// only do rotation on owned secrets
- if !util.IsControlledBy(configSecret, controlPlane.KCP) {
+ if !util.IsControlledBy(configSecret, controlPlane.KCP, controlplanev1.GroupVersion.WithKind("KubeadmControlPlane").GroupKind()) {
return ctrl.Result{}, nil
}
@@ -105,7 +90,7 @@ func (r *KubeadmControlPlaneReconciler) reconcileKubeconfig(ctx context.Context,
if needsRotation {
log.Info("Rotating kubeconfig secret")
- if err := kubeconfig.RegenerateSecret(ctx, r.Client, configSecret); err != nil {
+ if err := kubeconfig.RegenerateSecret(ctx, r.Client, configSecret, kubeconfig.KeyEncryptionAlgorithm(controlPlane.GetKeyEncryptionAlgorithm())); err != nil {
return ctrl.Result{}, errors.Wrap(err, "failed to regenerate kubeconfig")
}
}
@@ -181,61 +166,32 @@ func (r *KubeadmControlPlaneReconciler) reconcileExternalReference(ctx context.C
return patchHelper.Patch(ctx, obj)
}
-func (r *KubeadmControlPlaneReconciler) cloneConfigsAndGenerateMachine(ctx context.Context, cluster *clusterv1.Cluster, kcp *controlplanev1.KubeadmControlPlane, bootstrapSpec *bootstrapv1.KubeadmConfigSpec, failureDomain string) (*clusterv1.Machine, error) {
+func (r *KubeadmControlPlaneReconciler) cloneConfigsAndGenerateMachine(ctx context.Context, cluster *clusterv1.Cluster, kcp *controlplanev1.KubeadmControlPlane, isJoin bool, failureDomain string) (*clusterv1.Machine, error) {
var errs []error
- // Compute desired Machine
- machine, err := r.computeDesiredMachine(kcp, cluster, failureDomain, nil)
+ machine, err := desiredstate.ComputeDesiredMachine(kcp, cluster, failureDomain, nil)
if err != nil {
- return nil, errors.Wrap(err, "failed to create Machine: failed to compute desired Machine")
- }
-
- // Since the cloned resource should eventually have a controller ref for the Machine, we create an
- // OwnerReference here without the Controller field set
- infraCloneOwner := &metav1.OwnerReference{
- APIVersion: controlplanev1.GroupVersion.String(),
- Kind: kubeadmControlPlaneKind,
- Name: kcp.Name,
- UID: kcp.UID,
+ return nil, errors.Wrap(err, "failed to create Machine")
}
- // Clone the infrastructure template
- apiVersion, err := contract.GetAPIVersion(ctx, r.Client, kcp.Spec.MachineTemplate.Spec.InfrastructureRef.GroupKind())
- if err != nil {
- return nil, errors.Wrap(err, "failed to clone infrastructure template")
- }
- infraMachine, infraRef, err := external.CreateFromTemplate(ctx, &external.CreateFromTemplateInput{
- Client: r.Client,
- TemplateRef: &corev1.ObjectReference{
- APIVersion: apiVersion,
- Kind: kcp.Spec.MachineTemplate.Spec.InfrastructureRef.Kind,
- Namespace: kcp.Namespace,
- Name: kcp.Spec.MachineTemplate.Spec.InfrastructureRef.Name,
- },
- Namespace: kcp.Namespace,
- Name: machine.Name,
- OwnerRef: infraCloneOwner,
- ClusterName: cluster.Name,
- Labels: internal.ControlPlaneMachineLabelsForCluster(kcp, cluster.Name),
- Annotations: kcp.Spec.MachineTemplate.ObjectMeta.Annotations,
- })
+ infraMachine, infraRef, err := r.createInfraMachine(ctx, kcp, cluster, machine.Name)
if err != nil {
// Safe to return early here since no resources have been created yet.
v1beta1conditions.MarkFalse(kcp, controlplanev1.MachinesCreatedV1Beta1Condition, controlplanev1.InfrastructureTemplateCloningFailedV1Beta1Reason,
clusterv1.ConditionSeverityError, "%s", err.Error())
- return nil, errors.Wrap(err, "failed to clone infrastructure template")
+ return nil, errors.Wrap(err, "failed to create Machine")
}
machine.Spec.InfrastructureRef = infraRef
// Clone the bootstrap configuration
- bootstrapConfig, bootstrapRef, err := r.generateKubeadmConfig(ctx, kcp, cluster, bootstrapSpec, machine.Name)
+ bootstrapConfig, bootstrapRef, err := r.createKubeadmConfig(ctx, kcp, cluster, isJoin, machine.Name)
if err != nil {
v1beta1conditions.MarkFalse(kcp, controlplanev1.MachinesCreatedV1Beta1Condition, controlplanev1.BootstrapTemplateCloningFailedV1Beta1Reason,
clusterv1.ConditionSeverityError, "%s", err.Error())
- errs = append(errs, errors.Wrap(err, "failed to generate bootstrap config"))
+ errs = append(errs, errors.Wrap(err, "failed to create Machine"))
}
- // Only proceed to generating the Machine if we haven't encountered an error
+ // Only proceed to creating the Machine if we haven't encountered an error
if len(errs) == 0 {
machine.Spec.Bootstrap.ConfigRef = bootstrapRef
@@ -249,7 +205,7 @@ func (r *KubeadmControlPlaneReconciler) cloneConfigsAndGenerateMachine(ctx conte
// If we encountered any errors, attempt to clean up any dangling resources
if len(errs) > 0 {
if err := r.cleanupFromGeneration(ctx, infraMachine, bootstrapConfig); err != nil {
- errs = append(errs, errors.Wrap(err, "failed to cleanup generated resources"))
+ errs = append(errs, errors.Wrap(err, "failed to cleanup created objects"))
}
return nil, kerrors.NewAggregate(errs)
}
@@ -272,61 +228,85 @@ func (r *KubeadmControlPlaneReconciler) cleanupFromGeneration(ctx context.Contex
return kerrors.NewAggregate(errs)
}
-func (r *KubeadmControlPlaneReconciler) generateKubeadmConfig(ctx context.Context, kcp *controlplanev1.KubeadmControlPlane, cluster *clusterv1.Cluster, spec *bootstrapv1.KubeadmConfigSpec, name string) (*bootstrapv1.KubeadmConfig, clusterv1.ContractVersionedObjectReference, error) {
- // Create an owner reference without a controller reference because the owning controller is the machine controller
- owner := metav1.OwnerReference{
- APIVersion: controlplanev1.GroupVersion.String(),
- Kind: kubeadmControlPlaneKind,
- Name: kcp.Name,
- UID: kcp.UID,
+func (r *KubeadmControlPlaneReconciler) createInfraMachine(ctx context.Context, kcp *controlplanev1.KubeadmControlPlane, cluster *clusterv1.Cluster, name string) (*unstructured.Unstructured, clusterv1.ContractVersionedObjectReference, error) {
+ infraMachine, err := desiredstate.ComputeDesiredInfraMachine(ctx, r.Client, kcp, cluster, name, nil)
+ if err != nil {
+ return nil, clusterv1.ContractVersionedObjectReference{}, errors.Wrapf(err, "failed to create InfraMachine")
+ }
+
+ // Create the full object with capi-kubeadmcontrolplane.
+ // Below ssa.RemoveManagedFieldsForLabelsAndAnnotations will drop ownership for labels and annotations
+ // so that in a subsequent syncMachines call capi-kubeadmcontrolplane-metadata can take ownership for them.
+ // Note: This is done in way that it does not rely on managedFields being stored in the cache, so we can optimize
+ // memory usage by dropping managedFields before storing objects in the cache.
+ if err := ssa.Patch(ctx, r.Client, kcpManagerName, infraMachine); err != nil {
+ return nil, clusterv1.ContractVersionedObjectReference{}, errors.Wrapf(err, "failed to create InfraMachine")
+ }
+
+ // Note: This field is only used for unit tests that use fake client because the fake client does not properly set resourceVersion
+ // on KubeadmConfig/InfraMachine after ssa.Patch and then ssa.RemoveManagedFieldsForLabelsAndAnnotations would fail.
+ if !r.disableRemoveManagedFieldsForLabelsAndAnnotations {
+ if err := ssa.RemoveManagedFieldsForLabelsAndAnnotations(ctx, r.Client, r.APIReader, infraMachine, kcpManagerName); err != nil {
+ return nil, clusterv1.ContractVersionedObjectReference{}, errors.Wrapf(err, "failed to create InfraMachine")
+ }
+ }
+
+ return infraMachine, clusterv1.ContractVersionedObjectReference{
+ APIGroup: infraMachine.GroupVersionKind().Group,
+ Kind: infraMachine.GetKind(),
+ Name: infraMachine.GetName(),
+ }, nil
+}
+
+func (r *KubeadmControlPlaneReconciler) createKubeadmConfig(ctx context.Context, kcp *controlplanev1.KubeadmControlPlane, cluster *clusterv1.Cluster, isJoin bool, name string) (*bootstrapv1.KubeadmConfig, clusterv1.ContractVersionedObjectReference, error) {
+ kubeadmConfig, err := desiredstate.ComputeDesiredKubeadmConfig(kcp, cluster, isJoin, name, nil)
+ if err != nil {
+ return nil, clusterv1.ContractVersionedObjectReference{}, errors.Wrapf(err, "failed to create KubeadmConfig")
}
- bootstrapConfig := &bootstrapv1.KubeadmConfig{
- ObjectMeta: metav1.ObjectMeta{
- Name: name,
- Namespace: kcp.Namespace,
- Labels: internal.ControlPlaneMachineLabelsForCluster(kcp, cluster.Name),
- Annotations: kcp.Spec.MachineTemplate.ObjectMeta.Annotations,
- OwnerReferences: []metav1.OwnerReference{owner},
- },
- Spec: *spec,
+ // Create the full object with capi-kubeadmcontrolplane.
+ // Below ssa.RemoveManagedFieldsForLabelsAndAnnotations will drop ownership for labels and annotations
+ // so that in a subsequent syncMachines call capi-kubeadmcontrolplane-metadata can take ownership for them.
+ // Note: This is done in way that it does not rely on managedFields being stored in the cache, so we can optimize
+ // memory usage by dropping managedFields before storing objects in the cache.
+ if err := ssa.Patch(ctx, r.Client, kcpManagerName, kubeadmConfig); err != nil {
+ return nil, clusterv1.ContractVersionedObjectReference{}, errors.Wrapf(err, "failed to create KubeadmConfig")
}
- if err := r.Client.Create(ctx, bootstrapConfig); err != nil {
- return nil, clusterv1.ContractVersionedObjectReference{}, errors.Wrap(err, "failed to create bootstrap configuration")
+ // Note: This field is only used for unit tests that use fake client because the fake client does not properly set resourceVersion
+ // on KubeadmConfig/InfraMachine after ssa.Patch and then ssa.RemoveManagedFieldsForLabelsAndAnnotations would fail.
+ if !r.disableRemoveManagedFieldsForLabelsAndAnnotations {
+ if err := ssa.RemoveManagedFieldsForLabelsAndAnnotations(ctx, r.Client, r.APIReader, kubeadmConfig, kcpManagerName); err != nil {
+ return nil, clusterv1.ContractVersionedObjectReference{}, errors.Wrapf(err, "failed to create KubeadmConfig")
+ }
}
- return bootstrapConfig, clusterv1.ContractVersionedObjectReference{
+ return kubeadmConfig, clusterv1.ContractVersionedObjectReference{
APIGroup: bootstrapv1.GroupVersion.Group,
Kind: "KubeadmConfig",
- Name: bootstrapConfig.GetName(),
+ Name: kubeadmConfig.GetName(),
}, nil
}
-// updateExternalObject updates the external object with the labels and annotations from KCP.
-func (r *KubeadmControlPlaneReconciler) updateExternalObject(ctx context.Context, obj client.Object, kcp *controlplanev1.KubeadmControlPlane, cluster *clusterv1.Cluster) error {
+// updateLabelsAndAnnotations updates the external object with the labels and annotations from KCP.
+func (r *KubeadmControlPlaneReconciler) updateLabelsAndAnnotations(ctx context.Context, obj client.Object, objGVK schema.GroupVersionKind, kcp *controlplanev1.KubeadmControlPlane, cluster *clusterv1.Cluster) error {
updatedObject := &unstructured.Unstructured{}
- updatedObject.SetGroupVersionKind(obj.GetObjectKind().GroupVersionKind())
+ updatedObject.SetGroupVersionKind(objGVK)
updatedObject.SetNamespace(obj.GetNamespace())
updatedObject.SetName(obj.GetName())
// Set the UID to ensure that Server-Side-Apply only performs an update
// and does not perform an accidental create.
updatedObject.SetUID(obj.GetUID())
- // Update labels
- updatedObject.SetLabels(internal.ControlPlaneMachineLabelsForCluster(kcp, cluster.Name))
- // Update annotations
- updatedObject.SetAnnotations(kcp.Spec.MachineTemplate.ObjectMeta.Annotations)
+ updatedObject.SetLabels(desiredstate.ControlPlaneMachineLabels(kcp, cluster.Name))
+ updatedObject.SetAnnotations(desiredstate.ControlPlaneMachineAnnotations(kcp))
- if err := ssa.Patch(ctx, r.Client, kcpManagerName, updatedObject, ssa.WithCachingProxy{Cache: r.ssaCache, Original: obj}); err != nil {
- return errors.Wrapf(err, "failed to update %s", obj.GetObjectKind().GroupVersionKind().Kind)
- }
- return nil
+ return ssa.Patch(ctx, r.Client, kcpMetadataManagerName, updatedObject, ssa.WithCachingProxy{Cache: r.ssaCache, Original: obj})
}
func (r *KubeadmControlPlaneReconciler) createMachine(ctx context.Context, kcp *controlplanev1.KubeadmControlPlane, machine *clusterv1.Machine) error {
if err := ssa.Patch(ctx, r.Client, kcpManagerName, machine); err != nil {
- return errors.Wrap(err, "failed to create Machine")
+ return err
}
// Remove the annotation tracking that a remediation is in progress (the remediation completed when
// the replacement machine has been created above).
@@ -335,167 +315,14 @@ func (r *KubeadmControlPlaneReconciler) createMachine(ctx context.Context, kcp *
}
func (r *KubeadmControlPlaneReconciler) updateMachine(ctx context.Context, machine *clusterv1.Machine, kcp *controlplanev1.KubeadmControlPlane, cluster *clusterv1.Cluster) (*clusterv1.Machine, error) {
- updatedMachine, err := r.computeDesiredMachine(kcp, cluster, machine.Spec.FailureDomain, machine)
+ updatedMachine, err := desiredstate.ComputeDesiredMachine(kcp, cluster, machine.Spec.FailureDomain, machine)
if err != nil {
- return nil, errors.Wrap(err, "failed to update Machine: failed to compute desired Machine")
+ return nil, errors.Wrap(err, "failed to apply Machine")
}
err = ssa.Patch(ctx, r.Client, kcpManagerName, updatedMachine, ssa.WithCachingProxy{Cache: r.ssaCache, Original: machine})
if err != nil {
- return nil, errors.Wrap(err, "failed to update Machine")
+ return nil, err
}
return updatedMachine, nil
}
-
-// computeDesiredMachine computes the desired Machine.
-// This Machine will be used during reconciliation to:
-// * create a new Machine
-// * update an existing Machine
-// Because we are using Server-Side-Apply we always have to calculate the full object.
-// There are small differences in how we calculate the Machine depending on if it
-// is a create or update. Example: for a new Machine we have to calculate a new name,
-// while for an existing Machine we have to use the name of the existing Machine.
-func (r *KubeadmControlPlaneReconciler) computeDesiredMachine(kcp *controlplanev1.KubeadmControlPlane, cluster *clusterv1.Cluster, failureDomain string, existingMachine *clusterv1.Machine) (*clusterv1.Machine, error) {
- var machineName string
- var machineUID types.UID
- var version string
- annotations := map[string]string{}
- if existingMachine == nil {
- // Creating a new machine
- nameTemplate := "{{ .kubeadmControlPlane.name }}-{{ .random }}"
- if kcp.Spec.MachineNaming.Template != "" {
- nameTemplate = kcp.Spec.MachineNaming.Template
- if !strings.Contains(nameTemplate, "{{ .random }}") {
- return nil, errors.New("cannot generate Machine name: {{ .random }} is missing in machineNaming.template")
- }
- }
- generatedMachineName, err := topologynames.KCPMachineNameGenerator(nameTemplate, cluster.Name, kcp.Name).GenerateName()
- if err != nil {
- return nil, errors.Wrap(err, "failed to generate Machine name")
- }
- machineName = generatedMachineName
- version = kcp.Spec.Version
-
- // Machine's bootstrap config may be missing ClusterConfiguration if it is not the first machine in the control plane.
- // We store ClusterConfiguration as annotation here to detect any changes in KCP ClusterConfiguration and rollout the machine if any.
- // Nb. This annotation is read when comparing the KubeadmConfig to check if a machine needs to be rolled out.
- clusterConfigurationAnnotation, err := internal.ClusterConfigurationToMachineAnnotationValue(&kcp.Spec.KubeadmConfigSpec.ClusterConfiguration)
- if err != nil {
- return nil, err
- }
- annotations[controlplanev1.KubeadmClusterConfigurationAnnotation] = clusterConfigurationAnnotation
-
- // In case this machine is being created as a consequence of a remediation, then add an annotation
- // tracking remediating data.
- // NOTE: This is required in order to track remediation retries.
- if remediationData, ok := kcp.Annotations[controlplanev1.RemediationInProgressAnnotation]; ok {
- annotations[controlplanev1.RemediationForAnnotation] = remediationData
- }
- } else {
- // Updating an existing machine
- machineName = existingMachine.Name
- machineUID = existingMachine.UID
- version = existingMachine.Spec.Version
-
- // For existing machine only set the ClusterConfiguration annotation if the machine already has it.
- // We should not add the annotation if it was missing in the first place because we do not have enough
- // information.
- if clusterConfigurationAnnotation, ok := existingMachine.Annotations[controlplanev1.KubeadmClusterConfigurationAnnotation]; ok {
- // In case the annotation is outdated, update it.
- if internal.ClusterConfigurationAnnotationFromMachineIsOutdated(clusterConfigurationAnnotation) {
- clusterConfiguration, err := internal.ClusterConfigurationFromMachine(existingMachine)
- if err != nil {
- return nil, err
- }
-
- clusterConfigurationAnnotation, err = internal.ClusterConfigurationToMachineAnnotationValue(clusterConfiguration)
- if err != nil {
- return nil, err
- }
- }
- annotations[controlplanev1.KubeadmClusterConfigurationAnnotation] = clusterConfigurationAnnotation
- }
-
- // If the machine already has remediation data then preserve it.
- // NOTE: This is required in order to track remediation retries.
- if remediationData, ok := existingMachine.Annotations[controlplanev1.RemediationForAnnotation]; ok {
- annotations[controlplanev1.RemediationForAnnotation] = remediationData
- }
- }
- // Setting pre-terminate hook so we can later remove the etcd member right before Machine termination
- // (i.e. before InfraMachine deletion).
- annotations[controlplanev1.PreTerminateHookCleanupAnnotation] = ""
-
- // Construct the basic Machine.
- desiredMachine := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- APIVersion: clusterv1.GroupVersion.String(),
- Kind: "Machine",
- },
- ObjectMeta: metav1.ObjectMeta{
- UID: machineUID,
- Name: machineName,
- Namespace: kcp.Namespace,
- // Note: by setting the ownerRef on creation we signal to the Machine controller that this is not a stand-alone Machine.
- OwnerReferences: []metav1.OwnerReference{
- *metav1.NewControllerRef(kcp, controlplanev1.GroupVersion.WithKind(kubeadmControlPlaneKind)),
- },
- Labels: map[string]string{},
- Annotations: map[string]string{},
- },
- Spec: clusterv1.MachineSpec{
- ClusterName: cluster.Name,
- Version: version,
- FailureDomain: failureDomain,
- },
- }
-
- // Set the in-place mutable fields.
- // When we create a new Machine we will just create the Machine with those fields.
- // When we update an existing Machine will we update the fields on the existing Machine (in-place mutate).
-
- // Set labels
- desiredMachine.Labels = internal.ControlPlaneMachineLabelsForCluster(kcp, cluster.Name)
-
- // Set annotations
- // Add the annotations from the MachineTemplate.
- // Note: we intentionally don't use the map directly to ensure we don't modify the map in KCP.
- for k, v := range kcp.Spec.MachineTemplate.ObjectMeta.Annotations {
- desiredMachine.Annotations[k] = v
- }
- for k, v := range annotations {
- desiredMachine.Annotations[k] = v
- }
-
- // Set other in-place mutable fields
- desiredMachine.Spec.Deletion.NodeDrainTimeoutSeconds = kcp.Spec.MachineTemplate.Spec.Deletion.NodeDrainTimeoutSeconds
- desiredMachine.Spec.Deletion.NodeDeletionTimeoutSeconds = kcp.Spec.MachineTemplate.Spec.Deletion.NodeDeletionTimeoutSeconds
- desiredMachine.Spec.Deletion.NodeVolumeDetachTimeoutSeconds = kcp.Spec.MachineTemplate.Spec.Deletion.NodeVolumeDetachTimeoutSeconds
-
- // Note: We intentionally don't set "minReadySeconds" on Machines because we consider it enough to have machine availability driven by readiness of control plane components.
- if existingMachine != nil {
- desiredMachine.Spec.InfrastructureRef = existingMachine.Spec.InfrastructureRef
- desiredMachine.Spec.Bootstrap.ConfigRef = existingMachine.Spec.Bootstrap.ConfigRef
- }
-
- // Set machines readiness gates
- allReadinessGates := []clusterv1.MachineReadinessGate{}
- allReadinessGates = append(allReadinessGates, mandatoryMachineReadinessGates...)
- isEtcdManaged := !kcp.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.External.IsDefined()
- if isEtcdManaged {
- allReadinessGates = append(allReadinessGates, etcdMandatoryMachineReadinessGates...)
- }
- allReadinessGates = append(allReadinessGates, kcp.Spec.MachineTemplate.Spec.ReadinessGates...)
-
- desiredMachine.Spec.ReadinessGates = []clusterv1.MachineReadinessGate{}
- knownGates := sets.Set[string]{}
- for _, gate := range allReadinessGates {
- if knownGates.Has(gate.ConditionType) {
- continue
- }
- desiredMachine.Spec.ReadinessGates = append(desiredMachine.Spec.ReadinessGates, gate)
- knownGates.Insert(gate.ConditionType)
- }
-
- return desiredMachine, nil
-}
diff --git a/controlplane/kubeadm/internal/controllers/helpers_test.go b/controlplane/kubeadm/internal/controllers/helpers_test.go
index 4aecf1b5175e..5ec5a38eb98f 100644
--- a/controlplane/kubeadm/internal/controllers/helpers_test.go
+++ b/controlplane/kubeadm/internal/controllers/helpers_test.go
@@ -17,25 +17,31 @@ limitations under the License.
package controllers
import (
- "fmt"
+ "context"
+ "strings"
"testing"
. "github.com/onsi/gomega"
- gomegatypes "github.com/onsi/gomega/types"
+ "github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
- "k8s.io/apimachinery/pkg/types"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/tools/record"
"k8s.io/utils/ptr"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
+ "sigs.k8s.io/controller-runtime/pkg/client/interceptor"
bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
"sigs.k8s.io/cluster-api/controllers/external"
"sigs.k8s.io/cluster-api/controlplane/kubeadm/internal"
+ clientutil "sigs.k8s.io/cluster-api/internal/util/client"
+ "sigs.k8s.io/cluster-api/internal/util/ssa"
+ "sigs.k8s.io/cluster-api/util/collections"
v1beta1conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1"
"sigs.k8s.io/cluster-api/util/kubeconfig"
"sigs.k8s.io/cluster-api/util/secret"
@@ -46,10 +52,6 @@ func TestReconcileKubeconfigEmptyAPIEndpoints(t *testing.T) {
g := NewWithT(t)
cluster := &clusterv1.Cluster{
- TypeMeta: metav1.TypeMeta{
- Kind: "Cluster",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Name: "foo",
Namespace: metav1.NamespaceDefault,
@@ -60,10 +62,6 @@ func TestReconcileKubeconfigEmptyAPIEndpoints(t *testing.T) {
}
kcp := &controlplanev1.KubeadmControlPlane{
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmControlPlane",
- APIVersion: controlplanev1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Name: "foo",
Namespace: metav1.NamespaceDefault,
@@ -102,10 +100,6 @@ func TestReconcileKubeconfigMissingCACertificate(t *testing.T) {
g := NewWithT(t)
cluster := &clusterv1.Cluster{
- TypeMeta: metav1.TypeMeta{
- Kind: "Cluster",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Name: "foo",
Namespace: metav1.NamespaceDefault,
@@ -116,10 +110,6 @@ func TestReconcileKubeconfigMissingCACertificate(t *testing.T) {
}
kcp := &controlplanev1.KubeadmControlPlane{
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmControlPlane",
- APIVersion: controlplanev1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Name: "foo",
Namespace: metav1.NamespaceDefault,
@@ -157,10 +147,6 @@ func TestReconcileKubeconfigSecretDoesNotAdoptsUserSecrets(t *testing.T) {
g := NewWithT(t)
cluster := &clusterv1.Cluster{
- TypeMeta: metav1.TypeMeta{
- Kind: "Cluster",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Name: "foo",
Namespace: metav1.NamespaceDefault,
@@ -171,10 +157,6 @@ func TestReconcileKubeconfigSecretDoesNotAdoptsUserSecrets(t *testing.T) {
}
kcp := &controlplanev1.KubeadmControlPlane{
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmControlPlane",
- APIVersion: controlplanev1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Name: "foo",
Namespace: metav1.NamespaceDefault,
@@ -232,10 +214,6 @@ func TestKubeadmControlPlaneReconciler_reconcileKubeconfig(t *testing.T) {
g := NewWithT(t)
cluster := &clusterv1.Cluster{
- TypeMeta: metav1.TypeMeta{
- Kind: "Cluster",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Name: "foo",
Namespace: metav1.NamespaceDefault,
@@ -246,10 +224,6 @@ func TestKubeadmControlPlaneReconciler_reconcileKubeconfig(t *testing.T) {
}
kcp := &controlplanev1.KubeadmControlPlane{
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmControlPlane",
- APIVersion: controlplanev1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Name: "foo",
Namespace: metav1.NamespaceDefault,
@@ -294,7 +268,7 @@ func TestKubeadmControlPlaneReconciler_reconcileKubeconfig(t *testing.T) {
g.Expect(kubeconfigSecret.Labels).To(HaveKeyWithValue(clusterv1.ClusterNameLabel, cluster.Name))
}
-func TestCloneConfigsAndGenerateMachine(t *testing.T) {
+func TestCloneConfigsAndGenerateMachineAndSyncMachines(t *testing.T) {
setup := func(t *testing.T, g *WithT) *corev1.Namespace {
t.Helper()
@@ -350,6 +324,18 @@ func TestCloneConfigsAndGenerateMachine(t *testing.T) {
UID: "abc-123-kcp-control-plane",
},
Spec: controlplanev1.KubeadmControlPlaneSpec{
+ KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ KubeletExtraArgs: []bootstrapv1.Arg{
+ {
+ Name: "v",
+ Value: ptr.To("8"),
+ },
+ },
+ },
+ },
+ },
MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
InfrastructureRef: clusterv1.ContractVersionedObjectReference{
@@ -369,39 +355,183 @@ func TestCloneConfigsAndGenerateMachine(t *testing.T) {
r := &KubeadmControlPlaneReconciler{
Client: env,
SecretCachingClient: secretCachingClient,
+ ssaCache: ssa.NewCache("test-controller"),
recorder: record.NewFakeRecorder(32),
}
- bootstrapSpec := &bootstrapv1.KubeadmConfigSpec{}
- _, err := r.cloneConfigsAndGenerateMachine(ctx, cluster, kcp, bootstrapSpec, "")
+ _, err := r.cloneConfigsAndGenerateMachine(ctx, cluster, kcp, true, "")
g.Expect(err).To(Succeed())
machineList := &clusterv1.MachineList{}
g.Expect(env.GetAPIReader().List(ctx, machineList, client.InNamespace(cluster.Namespace))).To(Succeed())
g.Expect(machineList.Items).To(HaveLen(1))
- for i := range machineList.Items {
- m := machineList.Items[i]
- g.Expect(m.Namespace).To(Equal(cluster.Namespace))
- g.Expect(m.Name).NotTo(BeEmpty())
- g.Expect(m.Name).To(HavePrefix(kcp.Name + namingTemplateKey))
+ m := machineList.Items[0]
+ g.Expect(m.Namespace).To(Equal(cluster.Namespace))
+ g.Expect(m.Name).NotTo(BeEmpty())
+ g.Expect(m.Name).To(HavePrefix(kcp.Name + namingTemplateKey))
+ g.Expect(m.Spec.InfrastructureRef.Name).To(Equal(m.Name))
+ g.Expect(m.Spec.InfrastructureRef.APIGroup).To(Equal(genericInfrastructureMachineTemplate.GroupVersionKind().Group))
+ g.Expect(m.Spec.InfrastructureRef.Kind).To(Equal("GenericInfrastructureMachine"))
- infraObj, err := external.GetObjectFromContractVersionedRef(ctx, r.Client, m.Spec.InfrastructureRef, m.Namespace)
- g.Expect(err).ToNot(HaveOccurred())
- g.Expect(infraObj.GetAnnotations()).To(HaveKeyWithValue(clusterv1.TemplateClonedFromNameAnnotation, genericInfrastructureMachineTemplate.GetName()))
- g.Expect(infraObj.GetAnnotations()).To(HaveKeyWithValue(clusterv1.TemplateClonedFromGroupKindAnnotation, genericInfrastructureMachineTemplate.GroupVersionKind().GroupKind().String()))
+ g.Expect(m.Spec.Bootstrap.ConfigRef.Name).To(Equal(m.Name))
+ g.Expect(m.Spec.Bootstrap.ConfigRef.APIGroup).To(Equal(bootstrapv1.GroupVersion.Group))
+ g.Expect(m.Spec.Bootstrap.ConfigRef.Kind).To(Equal("KubeadmConfig"))
+
+ infraObj, err := external.GetObjectFromContractVersionedRef(ctx, env.GetAPIReader(), m.Spec.InfrastructureRef, m.Namespace)
+ g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(infraObj.GetOwnerReferences()).To(HaveLen(1))
+ g.Expect(infraObj.GetOwnerReferences()).To(ContainElement(metav1.OwnerReference{
+ APIVersion: controlplanev1.GroupVersion.String(),
+ Kind: "KubeadmControlPlane",
+ Name: kcp.Name,
+ UID: kcp.UID,
+ }))
+ g.Expect(infraObj.GetAnnotations()).To(HaveKeyWithValue(clusterv1.TemplateClonedFromNameAnnotation, genericInfrastructureMachineTemplate.GetName()))
+ g.Expect(infraObj.GetAnnotations()).To(HaveKeyWithValue(clusterv1.TemplateClonedFromGroupKindAnnotation, genericInfrastructureMachineTemplate.GroupVersionKind().GroupKind().String()))
+ // Note: capi-kubeadmcontrolplane should own ownerReferences and spec, labels and annotations should be orphaned.
+ // Labels and annotations will be owned by capi-kubeadmcontrolplane-metadata after the next update
+ // of labels and annotations.
+ g.Expect(cleanupTime(infraObj.GetManagedFields())).To(ConsistOf(toManagedFields([]managedFieldEntry{{
+ APIVersion: infraObj.GetAPIVersion(),
+ Manager: kcpManagerName,
+ Operation: metav1.ManagedFieldsOperationApply,
+ FieldsV1: `{
+"f:metadata":{
+ "f:ownerReferences":{
+ "k:{\"uid\":\"abc-123-kcp-control-plane\"}":{}
+ }
+},
+"f:spec":{
+ "f:hello":{}
+}}`,
+ }})))
+
+ kubeadmConfig := &bootstrapv1.KubeadmConfig{}
+ err = env.GetAPIReader().Get(ctx, client.ObjectKey{Namespace: m.Namespace, Name: m.Spec.Bootstrap.ConfigRef.Name}, kubeadmConfig)
+ g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(kubeadmConfig.OwnerReferences).To(HaveLen(1))
+ g.Expect(kubeadmConfig.OwnerReferences).To(ContainElement(metav1.OwnerReference{
+ Kind: "KubeadmControlPlane",
+ APIVersion: controlplanev1.GroupVersion.String(),
+ Name: kcp.Name,
+ UID: kcp.UID,
+ }))
+ g.Expect(kubeadmConfig.Spec.InitConfiguration).To(BeComparableTo(bootstrapv1.InitConfiguration{}))
+ expectedJoinConfiguration := kcp.Spec.KubeadmConfigSpec.JoinConfiguration.DeepCopy()
+ expectedJoinConfiguration.ControlPlane = &bootstrapv1.JoinControlPlane{}
+ g.Expect(kubeadmConfig.Spec.JoinConfiguration).To(BeComparableTo(*expectedJoinConfiguration))
+ // Note: capi-kubeadmcontrolplane should own ownerReferences and spec, labels and annotations should be orphaned.
+ // Labels and annotations will be owned by capi-kubeadmcontrolplane-metadata after the next update
+ // of labels and annotations.
+ g.Expect(cleanupTime(kubeadmConfig.GetManagedFields())).To(ConsistOf(toManagedFields([]managedFieldEntry{{
+ APIVersion: bootstrapv1.GroupVersion.String(),
+ Manager: kcpManagerName,
+ Operation: metav1.ManagedFieldsOperationApply,
+ FieldsV1: `{
+"f:metadata":{
+ "f:ownerReferences":{
+ "k:{\"uid\":\"abc-123-kcp-control-plane\"}":{}
+ }
+},
+"f:spec":{
+ "f:joinConfiguration":{
+ "f:controlPlane":{},
+ "f:nodeRegistration":{
+ "f:kubeletExtraArgs":{
+ "k:{\"name\":\"v\",\"value\":\"8\"}":{
+ ".":{},"f:name":{},"f:value":{}}
+ }
+ }
+ }
+}}`,
+ }})))
- g.Expect(m.Spec.InfrastructureRef.Name).To(Equal(m.Name))
- g.Expect(m.Spec.InfrastructureRef.APIGroup).To(Equal(genericInfrastructureMachineTemplate.GroupVersionKind().Group))
- g.Expect(m.Spec.InfrastructureRef.Kind).To(Equal("GenericInfrastructureMachine"))
+ // Sync Machines
- g.Expect(m.Spec.Bootstrap.ConfigRef.Name).To(Equal(m.Name))
- g.Expect(m.Spec.Bootstrap.ConfigRef.APIGroup).To(Equal(bootstrapv1.GroupVersion.Group))
- g.Expect(m.Spec.Bootstrap.ConfigRef.Kind).To(Equal("KubeadmConfig"))
- }
+ // Note: Ensure the client observed the latest objects so syncMachines below is not failing with conflict errors.
+ // Note: Not adding a WaitForCacheToBeUpToDate for infraObj for now as we didn't have test flakes because of it and
+ // WaitForCacheToBeUpToDate does not support Unstructured as of now.
+ g.Expect(clientutil.WaitForCacheToBeUpToDate(ctx, r.Client, "cloneConfigsAndGenerateMachine", &m)).To(Succeed())
+ g.Expect(clientutil.WaitForCacheToBeUpToDate(ctx, r.Client, "cloneConfigsAndGenerateMachine", kubeadmConfig)).To(Succeed())
+
+ controlPlane, err := internal.NewControlPlane(ctx, r.managementCluster, r.Client, cluster, kcp, collections.FromMachines(&m))
+ g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(r.syncMachines(ctx, controlPlane)).To(Succeed())
+
+ // Verify managedFields again.
+ infraObj, err = external.GetObjectFromContractVersionedRef(ctx, env.GetAPIReader(), m.Spec.InfrastructureRef, m.Namespace)
+ g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(cleanupTime(infraObj.GetManagedFields())).To(ConsistOf(toManagedFields([]managedFieldEntry{{
+ // capi-kubeadmcontrolplane-metadata owns labels and annotations
+ APIVersion: infraObj.GetAPIVersion(),
+ Manager: kcpMetadataManagerName,
+ Operation: metav1.ManagedFieldsOperationApply,
+ FieldsV1: `{
+"f:metadata":{
+ "f:annotations":{},
+ "f:labels":{
+ "f:cluster.x-k8s.io/cluster-name":{},
+ "f:cluster.x-k8s.io/control-plane":{},
+ "f:cluster.x-k8s.io/control-plane-name":{}
+ }
+}}`,
+ }, {
+ // capi-kubeadmcontrolplane owns ownerReferences and spec
+ APIVersion: infraObj.GetAPIVersion(),
+ Manager: kcpManagerName,
+ Operation: metav1.ManagedFieldsOperationApply,
+ FieldsV1: `{
+"f:metadata":{
+ "f:ownerReferences":{
+ "k:{\"uid\":\"abc-123-kcp-control-plane\"}":{}
+ }
+},
+"f:spec":{
+ "f:hello":{}
+}}`,
+ }})))
+ g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKey{Namespace: m.Namespace, Name: m.Spec.Bootstrap.ConfigRef.Name}, kubeadmConfig)).To(Succeed())
+ g.Expect(cleanupTime(kubeadmConfig.GetManagedFields())).To(ConsistOf(toManagedFields([]managedFieldEntry{{
+ // capi-kubeadmcontrolplane-metadata owns labels and annotations
+ APIVersion: bootstrapv1.GroupVersion.String(),
+ Manager: kcpMetadataManagerName,
+ Operation: metav1.ManagedFieldsOperationApply,
+ FieldsV1: `{
+"f:metadata":{
+ "f:annotations":{},
+ "f:labels":{
+ "f:cluster.x-k8s.io/cluster-name":{},
+ "f:cluster.x-k8s.io/control-plane":{},
+ "f:cluster.x-k8s.io/control-plane-name":{}
+ }
+}}`,
+ }, {
+ // capi-kubeadmcontrolplane owns ownerReferences and spec
+ APIVersion: bootstrapv1.GroupVersion.String(),
+ Manager: kcpManagerName,
+ Operation: metav1.ManagedFieldsOperationApply,
+ FieldsV1: `{
+"f:metadata":{
+ "f:ownerReferences":{
+ "k:{\"uid\":\"abc-123-kcp-control-plane\"}":{}
+ }
+},
+"f:spec":{
+ "f:joinConfiguration":{
+ "f:controlPlane":{},
+ "f:nodeRegistration":{
+ "f:kubeletExtraArgs":{
+ "k:{\"name\":\"v\",\"value\":\"8\"}":{
+ ".":{},"f:name":{},"f:value":{}}
+ }
+ }
+ }
+}}`,
+ }})))
}
-func TestCloneConfigsAndGenerateMachineFail(t *testing.T) {
+func TestCloneConfigsAndGenerateMachineFailInfraMachineCreation(t *testing.T) {
g := NewWithT(t)
cluster := &clusterv1.Cluster{
@@ -456,587 +586,215 @@ func TestCloneConfigsAndGenerateMachineFail(t *testing.T) {
recorder: record.NewFakeRecorder(32),
}
- bootstrapSpec := &bootstrapv1.KubeadmConfigSpec{
- JoinConfiguration: bootstrapv1.JoinConfiguration{},
- }
-
- // Try to break Infra Cloning
+ // Break InfraMachine cloning
kcp.Spec.MachineTemplate.Spec.InfrastructureRef.Name = "something_invalid"
- _, err := r.cloneConfigsAndGenerateMachine(ctx, cluster, kcp, bootstrapSpec, "")
+ _, err := r.cloneConfigsAndGenerateMachine(ctx, cluster, kcp, true, "")
g.Expect(err).To(HaveOccurred())
g.Expect(&kcp.GetV1Beta1Conditions()[0]).Should(v1beta1conditions.HaveSameStateOf(&clusterv1.Condition{
Type: controlplanev1.MachinesCreatedV1Beta1Condition,
Status: corev1.ConditionFalse,
Severity: clusterv1.ConditionSeverityError,
Reason: controlplanev1.InfrastructureTemplateCloningFailedV1Beta1Reason,
- Message: "failed to retrieve GenericInfrastructureMachineTemplate default/something_invalid: genericinfrastructuremachinetemplates.infrastructure.cluster.x-k8s.io \"something_invalid\" not found",
+ Message: "failed to create InfraMachine: failed to compute desired InfraMachine: failed to retrieve GenericInfrastructureMachineTemplate default/something_invalid: genericinfrastructuremachinetemplates.infrastructure.cluster.x-k8s.io \"something_invalid\" not found",
}))
+ // No objects should exist.
+ machineList := &clusterv1.MachineList{}
+ g.Expect(fakeClient.List(ctx, machineList, client.InNamespace(cluster.Namespace))).To(Succeed())
+ g.Expect(machineList.Items).To(BeEmpty())
+ infraMachineList := &unstructured.UnstructuredList{}
+ infraMachineList.SetGroupVersionKind(schema.GroupVersionKind{
+ Group: builder.InfrastructureGroupVersion.Group,
+ Version: builder.InfrastructureGroupVersion.Version,
+ Kind: builder.GenericInfrastructureMachineKind + "List",
+ })
+ g.Expect(fakeClient.List(ctx, infraMachineList, client.InNamespace(cluster.Namespace))).To(Succeed())
+ g.Expect(infraMachineList.Items).To(BeEmpty())
+ kubeadmConfigList := &bootstrapv1.KubeadmConfigList{}
+ g.Expect(fakeClient.List(ctx, kubeadmConfigList, client.InNamespace(cluster.Namespace))).To(Succeed())
+ g.Expect(kubeadmConfigList.Items).To(BeEmpty())
}
-func TestKubeadmControlPlaneReconciler_computeDesiredMachine(t *testing.T) {
- namingTemplateKey := "-kcp"
- kcpName := "testControlPlane"
- clusterName := "testCluster"
+func TestCloneConfigsAndGenerateMachineFailKubeadmConfigCreation(t *testing.T) {
+ g := NewWithT(t)
cluster := &clusterv1.Cluster{
ObjectMeta: metav1.ObjectMeta{
- Name: clusterName,
+ Name: "foo",
Namespace: metav1.NamespaceDefault,
},
}
- duration5s := ptr.To(int32(5))
- duration10s := ptr.To(int32(10))
- kcpMachineTemplateObjectMeta := clusterv1.ObjectMeta{
- Labels: map[string]string{
- "machineTemplateLabel": "machineTemplateLabelValue",
- },
- Annotations: map[string]string{
- "machineTemplateAnnotation": "machineTemplateAnnotationValue",
- },
- }
- kcpMachineTemplateObjectMetaCopy := kcpMachineTemplateObjectMeta.DeepCopy()
- infraRef := &clusterv1.ContractVersionedObjectReference{
- Kind: "InfraKind",
- APIGroup: clusterv1.GroupVersionInfrastructure.Group,
- Name: "infra",
- }
- bootstrapRef := clusterv1.ContractVersionedObjectReference{
- Kind: "BootstrapKind",
- APIGroup: clusterv1.GroupVersionBootstrap.Group,
- Name: "bootstrap",
- }
-
- tests := []struct {
- name string
- kcp *controlplanev1.KubeadmControlPlane
- isUpdatingExistingMachine bool
- existingClusterConfigurationAnnotation string
- want []gomegatypes.GomegaMatcher
- wantClusterConfigurationAnnotation string
- wantErr bool
- }{
- {
- name: "should return the correct Machine object when creating a new Machine",
- kcp: &controlplanev1.KubeadmControlPlane{
- ObjectMeta: metav1.ObjectMeta{
- Name: kcpName,
- Namespace: cluster.Namespace,
- },
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- Version: "v1.16.6",
- MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
- ObjectMeta: kcpMachineTemplateObjectMeta,
- Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
- ReadinessGates: []clusterv1.MachineReadinessGate{
- {
- ConditionType: "Foo",
- },
- },
- Deletion: controlplanev1.KubeadmControlPlaneMachineTemplateDeletionSpec{
- NodeDrainTimeoutSeconds: duration5s,
- NodeDeletionTimeoutSeconds: duration5s,
- NodeVolumeDetachTimeoutSeconds: duration5s,
- },
- },
- },
- KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- CertificatesDir: "foo",
- },
- },
- MachineNaming: controlplanev1.MachineNamingSpec{
- Template: "{{ .kubeadmControlPlane.name }}" + namingTemplateKey + "-{{ .random }}",
- },
- },
- },
- isUpdatingExistingMachine: false,
- want: []gomegatypes.GomegaMatcher{
- HavePrefix(kcpName + namingTemplateKey),
- Not(HaveSuffix("00000")),
- },
- wantClusterConfigurationAnnotation: "{\"marshalVersion\":\"v1beta2\",\"certificatesDir\":\"foo\"}",
- wantErr: false,
- },
- {
- name: "should return error when creating a new Machine when '.random' is not added in template",
- kcp: &controlplanev1.KubeadmControlPlane{
- ObjectMeta: metav1.ObjectMeta{
- Name: kcpName,
- Namespace: cluster.Namespace,
- },
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- Version: "v1.16.6",
- MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
- ObjectMeta: kcpMachineTemplateObjectMeta,
- Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
- Deletion: controlplanev1.KubeadmControlPlaneMachineTemplateDeletionSpec{
- NodeDrainTimeoutSeconds: duration5s,
- NodeDeletionTimeoutSeconds: duration5s,
- NodeVolumeDetachTimeoutSeconds: duration5s,
- },
- },
- },
- KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- CertificatesDir: "foo",
- },
- },
- MachineNaming: controlplanev1.MachineNamingSpec{
- Template: "{{ .kubeadmControlPlane.name }}" + namingTemplateKey,
- },
- },
- },
- isUpdatingExistingMachine: false,
- wantErr: true,
- },
- {
- name: "should not return error when creating a new Machine when the generated name exceeds 63",
- kcp: &controlplanev1.KubeadmControlPlane{
- ObjectMeta: metav1.ObjectMeta{
- Name: kcpName,
- Namespace: cluster.Namespace,
- },
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- Version: "v1.16.6",
- MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
- ObjectMeta: kcpMachineTemplateObjectMeta,
- Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
- Deletion: controlplanev1.KubeadmControlPlaneMachineTemplateDeletionSpec{
- NodeDrainTimeoutSeconds: duration5s,
- NodeDeletionTimeoutSeconds: duration5s,
- NodeVolumeDetachTimeoutSeconds: duration5s,
- },
- },
- },
- KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- CertificatesDir: "foo",
- },
- },
- MachineNaming: controlplanev1.MachineNamingSpec{
- Template: "{{ .random }}" + fmt.Sprintf("%059d", 0),
- },
- },
- },
- isUpdatingExistingMachine: false,
- want: []gomegatypes.GomegaMatcher{
- ContainSubstring(fmt.Sprintf("%053d", 0)),
- Not(HaveSuffix("00000")),
- },
- wantClusterConfigurationAnnotation: "{\"marshalVersion\":\"v1beta2\",\"certificatesDir\":\"foo\"}",
- wantErr: false,
- },
- {
- name: "should return error when creating a new Machine with invalid template",
- kcp: &controlplanev1.KubeadmControlPlane{
- ObjectMeta: metav1.ObjectMeta{
- Name: kcpName,
- Namespace: cluster.Namespace,
- },
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- Version: "v1.16.6",
- MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
- ObjectMeta: kcpMachineTemplateObjectMeta,
- Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
- Deletion: controlplanev1.KubeadmControlPlaneMachineTemplateDeletionSpec{
- NodeDrainTimeoutSeconds: duration5s,
- NodeDeletionTimeoutSeconds: duration5s,
- NodeVolumeDetachTimeoutSeconds: duration5s,
- },
- },
- },
- KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- CertificatesDir: "foo",
- },
- },
- MachineNaming: controlplanev1.MachineNamingSpec{
- Template: "some-hardcoded-name-{{ .doesnotexistindata }}-{{ .random }}", // invalid template
- },
- },
- },
- isUpdatingExistingMachine: false,
- wantErr: true,
- },
- {
- name: "should return the correct Machine object when creating a new Machine with default templated name",
- kcp: &controlplanev1.KubeadmControlPlane{
- ObjectMeta: metav1.ObjectMeta{
- Name: kcpName,
- Namespace: cluster.Namespace,
- },
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- Version: "v1.16.6",
- MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
- ObjectMeta: kcpMachineTemplateObjectMeta,
- Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
- Deletion: controlplanev1.KubeadmControlPlaneMachineTemplateDeletionSpec{
- NodeDrainTimeoutSeconds: duration5s,
- NodeDeletionTimeoutSeconds: duration5s,
- NodeVolumeDetachTimeoutSeconds: duration5s,
- },
- },
- },
- KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- CertificatesDir: "foo",
- },
- },
- },
- },
- isUpdatingExistingMachine: false,
- wantErr: false,
- want: []gomegatypes.GomegaMatcher{
- HavePrefix(kcpName),
- Not(HaveSuffix("00000")),
- },
- wantClusterConfigurationAnnotation: "{\"marshalVersion\":\"v1beta2\",\"certificatesDir\":\"foo\"}",
- },
- {
- name: "should return the correct Machine object when creating a new Machine with additional kcp readinessGates",
- kcp: &controlplanev1.KubeadmControlPlane{
- ObjectMeta: metav1.ObjectMeta{
- Name: kcpName,
- Namespace: cluster.Namespace,
- },
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- Version: "v1.16.6",
- MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
- ObjectMeta: kcpMachineTemplateObjectMeta,
- Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
- ReadinessGates: []clusterv1.MachineReadinessGate{
- {
- ConditionType: "Bar",
- },
- },
- Deletion: controlplanev1.KubeadmControlPlaneMachineTemplateDeletionSpec{
- NodeDrainTimeoutSeconds: duration5s,
- NodeDeletionTimeoutSeconds: duration5s,
- NodeVolumeDetachTimeoutSeconds: duration5s,
- },
- },
- },
- KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- CertificatesDir: "foo",
- },
- },
- },
+ genericMachineTemplate := &unstructured.Unstructured{
+ Object: map[string]interface{}{
+ "kind": builder.GenericInfrastructureMachineTemplateKind,
+ "apiVersion": builder.InfrastructureGroupVersion.String(),
+ "metadata": map[string]interface{}{
+ "name": "infra-foo",
+ "namespace": cluster.Namespace,
},
- isUpdatingExistingMachine: false,
- wantClusterConfigurationAnnotation: "{\"marshalVersion\":\"v1beta2\",\"certificatesDir\":\"foo\"}",
- wantErr: false,
- },
- {
- name: "should return the correct Machine object when updating an existing Machine (empty ClusterConfiguration annotation)",
- kcp: &controlplanev1.KubeadmControlPlane{
- ObjectMeta: metav1.ObjectMeta{
- Name: kcpName,
- Namespace: cluster.Namespace,
- },
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- Version: "v1.16.6",
- MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
- ObjectMeta: kcpMachineTemplateObjectMeta,
- Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
- Deletion: controlplanev1.KubeadmControlPlaneMachineTemplateDeletionSpec{
- NodeDrainTimeoutSeconds: duration5s,
- NodeDeletionTimeoutSeconds: duration5s,
- NodeVolumeDetachTimeoutSeconds: duration5s,
- },
- ReadinessGates: []clusterv1.MachineReadinessGate{
- {
- ConditionType: "Foo",
- },
- },
- },
- },
- KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- CertificatesDir: "foo",
- },
- },
- MachineNaming: controlplanev1.MachineNamingSpec{
- Template: "{{ .kubeadmControlPlane.name }}" + namingTemplateKey + "-{{ .random }}",
+ "spec": map[string]interface{}{
+ "template": map[string]interface{}{
+ "spec": map[string]interface{}{
+ "hello": "world",
},
},
},
- isUpdatingExistingMachine: true,
- existingClusterConfigurationAnnotation: "",
- wantClusterConfigurationAnnotation: "",
- wantErr: false,
},
- {
- name: "should return the correct Machine object when updating an existing Machine (outdated ClusterConfiguration annotation)",
- kcp: &controlplanev1.KubeadmControlPlane{
- ObjectMeta: metav1.ObjectMeta{
- Name: kcpName,
- Namespace: cluster.Namespace,
- },
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- Version: "v1.16.6",
- MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
- ObjectMeta: kcpMachineTemplateObjectMeta,
- Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
- Deletion: controlplanev1.KubeadmControlPlaneMachineTemplateDeletionSpec{
- NodeDrainTimeoutSeconds: duration5s,
- NodeDeletionTimeoutSeconds: duration5s,
- NodeVolumeDetachTimeoutSeconds: duration5s,
- },
- ReadinessGates: []clusterv1.MachineReadinessGate{
- {
- ConditionType: "Foo",
- },
- },
- },
- },
- KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- CertificatesDir: "foo",
- },
- },
- MachineNaming: controlplanev1.MachineNamingSpec{
- Template: "{{ .kubeadmControlPlane.name }}" + namingTemplateKey + "-{{ .random }}",
- },
- },
- },
- isUpdatingExistingMachine: true,
+ }
- existingClusterConfigurationAnnotation: "{\"etcd\":{},\"apiServer\":{\"extraArgs\":{\"foo\":\"bar\"}},\"certificatesDir\":\"foo\"}",
- wantClusterConfigurationAnnotation: "{\"marshalVersion\":\"v1beta2\",\"apiServer\":{\"extraArgs\":[{\"name\":\"foo\",\"value\":\"bar\"}]},\"certificatesDir\":\"foo\"}",
- wantErr: false,
+ kcp := &controlplanev1.KubeadmControlPlane{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "kcp-foo",
+ Namespace: cluster.Namespace,
},
- {
- name: "should return the correct Machine object when updating an existing Machine (up to date ClusterConfiguration annotation)",
- kcp: &controlplanev1.KubeadmControlPlane{
- ObjectMeta: metav1.ObjectMeta{
- Name: kcpName,
- Namespace: cluster.Namespace,
- },
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- Version: "v1.16.6",
- MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
- ObjectMeta: kcpMachineTemplateObjectMeta,
- Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
- Deletion: controlplanev1.KubeadmControlPlaneMachineTemplateDeletionSpec{
- NodeDrainTimeoutSeconds: duration5s,
- NodeDeletionTimeoutSeconds: duration5s,
- NodeVolumeDetachTimeoutSeconds: duration5s,
- },
- ReadinessGates: []clusterv1.MachineReadinessGate{
- {
- ConditionType: "Foo",
- },
- },
- },
- },
- KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- CertificatesDir: "foo",
- },
- },
- MachineNaming: controlplanev1.MachineNamingSpec{
- Template: "{{ .kubeadmControlPlane.name }}" + namingTemplateKey + "-{{ .random }}",
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
+ Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
+ InfrastructureRef: clusterv1.ContractVersionedObjectReference{
+ Kind: genericMachineTemplate.GetKind(),
+ APIGroup: genericMachineTemplate.GroupVersionKind().Group,
+ Name: genericMachineTemplate.GetName(),
},
},
},
- isUpdatingExistingMachine: true,
- existingClusterConfigurationAnnotation: "{\"marshalVersion\":\"v1beta2\",\"etcd\":{},\"apiServer\":{\"extraArgs\":[{\"name\":\"foo\",\"value\":\"bar\"}]},\"controllerManager\":{},\"scheduler\":{},\"dns\":{},\"certificatesDir\":\"foo\"}",
- wantClusterConfigurationAnnotation: "{\"marshalVersion\":\"v1beta2\",\"etcd\":{},\"apiServer\":{\"extraArgs\":[{\"name\":\"foo\",\"value\":\"bar\"}]},\"controllerManager\":{},\"scheduler\":{},\"dns\":{},\"certificatesDir\":\"foo\"}",
- wantErr: false,
+ Version: "v1.16.6",
},
}
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- g := NewWithT(t)
-
- var desiredMachine *clusterv1.Machine
- failureDomain := "fd-1"
- var expectedMachineSpec clusterv1.MachineSpec
- var err error
-
- if tt.isUpdatingExistingMachine {
- machineName := "existing-machine"
- machineUID := types.UID("abc-123-existing-machine")
- // Use different ClusterConfiguration string than the information present in KCP
- // to verify that for an existing machine we do not override this information.
- remediationData := "remediation-data"
- machineVersion := "v1.25.3"
- existingMachine := &clusterv1.Machine{
- ObjectMeta: metav1.ObjectMeta{
- Name: machineName,
- UID: machineUID,
- Annotations: map[string]string{
- controlplanev1.RemediationForAnnotation: remediationData,
- },
- },
- Spec: clusterv1.MachineSpec{
- Version: machineVersion,
- FailureDomain: failureDomain,
- Deletion: clusterv1.MachineDeletionSpec{
- NodeDrainTimeoutSeconds: duration10s,
- NodeDeletionTimeoutSeconds: duration10s,
- NodeVolumeDetachTimeoutSeconds: duration10s,
- },
- Bootstrap: clusterv1.Bootstrap{
- ConfigRef: bootstrapRef,
- },
- InfrastructureRef: *infraRef,
- ReadinessGates: []clusterv1.MachineReadinessGate{{ConditionType: "Foo"}},
- },
- }
- if tt.existingClusterConfigurationAnnotation != "" {
- existingMachine.Annotations[controlplanev1.KubeadmClusterConfigurationAnnotation] = tt.existingClusterConfigurationAnnotation
- }
-
- desiredMachine, err = (&KubeadmControlPlaneReconciler{}).computeDesiredMachine(
- tt.kcp, cluster,
- existingMachine.Spec.FailureDomain, existingMachine,
- )
- if tt.wantErr {
- g.Expect(err).To(HaveOccurred())
- return
- }
- g.Expect(err).ToNot(HaveOccurred())
- expectedMachineSpec = clusterv1.MachineSpec{
- ClusterName: cluster.Name,
- Version: machineVersion, // Should use the Machine version and not the version from KCP.
- Bootstrap: clusterv1.Bootstrap{
- ConfigRef: bootstrapRef,
- },
- InfrastructureRef: *infraRef,
- FailureDomain: failureDomain,
- Deletion: clusterv1.MachineDeletionSpec{
- NodeDrainTimeoutSeconds: tt.kcp.Spec.MachineTemplate.Spec.Deletion.NodeDrainTimeoutSeconds,
- NodeDeletionTimeoutSeconds: tt.kcp.Spec.MachineTemplate.Spec.Deletion.NodeDeletionTimeoutSeconds,
- NodeVolumeDetachTimeoutSeconds: tt.kcp.Spec.MachineTemplate.Spec.Deletion.NodeVolumeDetachTimeoutSeconds,
- },
- ReadinessGates: append(append(mandatoryMachineReadinessGates, etcdMandatoryMachineReadinessGates...), tt.kcp.Spec.MachineTemplate.Spec.ReadinessGates...),
- }
-
- // Verify the Name and UID of the Machine remain unchanged
- g.Expect(desiredMachine.Name).To(Equal(machineName))
- g.Expect(desiredMachine.UID).To(Equal(machineUID))
- // Verify annotations.
- expectedAnnotations := map[string]string{}
- for k, v := range kcpMachineTemplateObjectMeta.Annotations {
- expectedAnnotations[k] = v
- }
- if tt.wantClusterConfigurationAnnotation != "" {
- expectedAnnotations[controlplanev1.KubeadmClusterConfigurationAnnotation] = tt.wantClusterConfigurationAnnotation
- }
- expectedAnnotations[controlplanev1.RemediationForAnnotation] = remediationData
- // The pre-terminate annotation should always be added
- expectedAnnotations[controlplanev1.PreTerminateHookCleanupAnnotation] = ""
- g.Expect(desiredMachine.Annotations).To(Equal(expectedAnnotations))
- } else {
- desiredMachine, err = (&KubeadmControlPlaneReconciler{}).computeDesiredMachine(
- tt.kcp, cluster,
- failureDomain, nil,
- )
- if tt.wantErr {
- g.Expect(err).To(HaveOccurred())
- return
- }
- g.Expect(err).ToNot(HaveOccurred())
-
- expectedMachineSpec = clusterv1.MachineSpec{
- ClusterName: cluster.Name,
- Version: tt.kcp.Spec.Version,
- FailureDomain: failureDomain,
- Deletion: clusterv1.MachineDeletionSpec{
- NodeDrainTimeoutSeconds: tt.kcp.Spec.MachineTemplate.Spec.Deletion.NodeDrainTimeoutSeconds,
- NodeDeletionTimeoutSeconds: tt.kcp.Spec.MachineTemplate.Spec.Deletion.NodeDeletionTimeoutSeconds,
- NodeVolumeDetachTimeoutSeconds: tt.kcp.Spec.MachineTemplate.Spec.Deletion.NodeVolumeDetachTimeoutSeconds,
- },
- ReadinessGates: append(append(mandatoryMachineReadinessGates, etcdMandatoryMachineReadinessGates...), tt.kcp.Spec.MachineTemplate.Spec.ReadinessGates...),
- }
- // Verify Name.
- for _, matcher := range tt.want {
- g.Expect(desiredMachine.Name).To(matcher)
- }
- // Verify annotations.
- expectedAnnotations := map[string]string{}
- for k, v := range kcpMachineTemplateObjectMeta.Annotations {
- expectedAnnotations[k] = v
- }
- expectedAnnotations[controlplanev1.KubeadmClusterConfigurationAnnotation] = tt.wantClusterConfigurationAnnotation
- // The pre-terminate annotation should always be added
- expectedAnnotations[controlplanev1.PreTerminateHookCleanupAnnotation] = ""
- g.Expect(desiredMachine.Annotations).To(Equal(expectedAnnotations))
- }
-
- g.Expect(desiredMachine.Namespace).To(Equal(tt.kcp.Namespace))
- g.Expect(desiredMachine.OwnerReferences).To(HaveLen(1))
- g.Expect(desiredMachine.OwnerReferences).To(ContainElement(*metav1.NewControllerRef(tt.kcp, controlplanev1.GroupVersion.WithKind("KubeadmControlPlane"))))
- g.Expect(desiredMachine.Spec).To(BeComparableTo(expectedMachineSpec))
+ fakeClient := newFakeClient(cluster.DeepCopy(), kcp.DeepCopy(), genericMachineTemplate.DeepCopy(), builder.GenericInfrastructureMachineTemplateCRD)
- // Verify that the machineTemplate.ObjectMeta has been propagated to the Machine.
- // Verify labels.
- expectedLabels := map[string]string{}
- for k, v := range kcpMachineTemplateObjectMeta.Labels {
- expectedLabels[k] = v
- }
- expectedLabels[clusterv1.ClusterNameLabel] = cluster.Name
- expectedLabels[clusterv1.MachineControlPlaneLabel] = ""
- expectedLabels[clusterv1.MachineControlPlaneNameLabel] = tt.kcp.Name
- g.Expect(desiredMachine.Labels).To(Equal(expectedLabels))
-
- // Verify that machineTemplate.ObjectMeta in KCP has not been modified.
- g.Expect(tt.kcp.Spec.MachineTemplate.ObjectMeta.Labels).To(Equal(kcpMachineTemplateObjectMetaCopy.Labels))
- g.Expect(tt.kcp.Spec.MachineTemplate.ObjectMeta.Annotations).To(Equal(kcpMachineTemplateObjectMetaCopy.Annotations))
- })
+ r := &KubeadmControlPlaneReconciler{
+ Client: fakeClient,
+ SecretCachingClient: fakeClient,
+ recorder: record.NewFakeRecorder(32),
+ // Note: This field is only used for unit tests that use fake client because the fake client does not properly set resourceVersion
+ // on BootstrapConfig/InfraMachine after ssa.Patch and then ssa.RemoveManagedFieldsForLabelsAndAnnotations would fail.
+ disableRemoveManagedFieldsForLabelsAndAnnotations: true,
}
+
+ // Break KubeadmConfig computation
+ kcp.Spec.Version = "something_invalid"
+ _, err := r.cloneConfigsAndGenerateMachine(ctx, cluster, kcp, true, "")
+ g.Expect(err).To(HaveOccurred())
+ g.Expect(&kcp.GetV1Beta1Conditions()[0]).Should(v1beta1conditions.HaveSameStateOf(&clusterv1.Condition{
+ Type: controlplanev1.MachinesCreatedV1Beta1Condition,
+ Status: corev1.ConditionFalse,
+ Severity: clusterv1.ConditionSeverityError,
+ Reason: controlplanev1.BootstrapTemplateCloningFailedV1Beta1Reason,
+ Message: "failed to create KubeadmConfig: failed to compute desired KubeadmConfig: failed to parse Kubernetes version \"something_invalid\": Invalid character(s) found in major number \"0something_invalid\"",
+ }))
+ // No objects should exist.
+ machineList := &clusterv1.MachineList{}
+ g.Expect(fakeClient.List(ctx, machineList, client.InNamespace(cluster.Namespace))).To(Succeed())
+ g.Expect(machineList.Items).To(BeEmpty())
+ infraMachineList := &unstructured.UnstructuredList{}
+ infraMachineList.SetGroupVersionKind(schema.GroupVersionKind{
+ Group: builder.InfrastructureGroupVersion.Group,
+ Version: builder.InfrastructureGroupVersion.Version,
+ Kind: builder.GenericInfrastructureMachineKind + "List",
+ })
+ g.Expect(fakeClient.List(ctx, infraMachineList, client.InNamespace(cluster.Namespace))).To(Succeed())
+ g.Expect(infraMachineList.Items).To(BeEmpty())
+ kubeadmConfigList := &bootstrapv1.KubeadmConfigList{}
+ g.Expect(fakeClient.List(ctx, kubeadmConfigList, client.InNamespace(cluster.Namespace))).To(Succeed())
+ g.Expect(kubeadmConfigList.Items).To(BeEmpty())
}
-func TestKubeadmControlPlaneReconciler_generateKubeadmConfig(t *testing.T) {
+func TestCloneConfigsAndGenerateMachineFailMachineCreation(t *testing.T) {
g := NewWithT(t)
- fakeClient := newFakeClient()
cluster := &clusterv1.Cluster{
ObjectMeta: metav1.ObjectMeta{
- Name: "testCluster",
+ Name: "foo",
Namespace: metav1.NamespaceDefault,
},
}
+ genericMachineTemplate := &unstructured.Unstructured{
+ Object: map[string]interface{}{
+ "kind": builder.GenericInfrastructureMachineTemplateKind,
+ "apiVersion": builder.InfrastructureGroupVersion.String(),
+ "metadata": map[string]interface{}{
+ "name": "infra-foo",
+ "namespace": cluster.Namespace,
+ },
+ "spec": map[string]interface{}{
+ "template": map[string]interface{}{
+ "spec": map[string]interface{}{
+ "hello": "world",
+ },
+ },
+ },
+ },
+ }
+
kcp := &controlplanev1.KubeadmControlPlane{
ObjectMeta: metav1.ObjectMeta{
- Name: "testControlPlane",
+ Name: "kcp-foo",
Namespace: cluster.Namespace,
},
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
+ Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
+ InfrastructureRef: clusterv1.ContractVersionedObjectReference{
+ Kind: genericMachineTemplate.GetKind(),
+ APIGroup: genericMachineTemplate.GroupVersionKind().Group,
+ Name: genericMachineTemplate.GetName(),
+ },
+ },
+ },
+ Version: "v1.16.6",
+ },
}
- spec := bootstrapv1.KubeadmConfigSpec{}
- expectedReferenceKind := "KubeadmConfig"
- expectedReferenceAPIGroup := bootstrapv1.GroupVersion.Group
- expectedOwner := metav1.OwnerReference{
- Kind: "KubeadmControlPlane",
- APIVersion: controlplanev1.GroupVersion.String(),
- Name: kcp.Name,
- }
+ fakeClient := newFakeClient(cluster.DeepCopy(), kcp.DeepCopy(), genericMachineTemplate.DeepCopy(), builder.GenericInfrastructureMachineTemplateCRD)
+ // Break Machine creation by injecting an error into the Machine apply call.
+ fakeClient = interceptor.NewClient(fakeClient, interceptor.Funcs{
+ Apply: func(ctx context.Context, c client.WithWatch, obj runtime.ApplyConfiguration, opts ...client.ApplyOption) error {
+ clientObject, ok := obj.(client.Object)
+ if !ok {
+ return errors.Errorf("error during Machine creation: unexpected ApplyConfiguration")
+ }
+ if clientObject.GetObjectKind().GroupVersionKind().Kind == "Machine" {
+ return errors.Errorf("fake error during Machine creation")
+ }
+ return c.Apply(ctx, obj, opts...)
+ },
+ })
r := &KubeadmControlPlaneReconciler{
Client: fakeClient,
SecretCachingClient: fakeClient,
recorder: record.NewFakeRecorder(32),
+ // Note: This field is only used for unit tests that use fake client because the fake client does not properly set resourceVersion
+ // on BootstrapConfig/InfraMachine after ssa.Patch and then ssa.RemoveManagedFieldsForLabelsAndAnnotations would fail.
+ disableRemoveManagedFieldsForLabelsAndAnnotations: true,
}
- _, got, err := r.generateKubeadmConfig(ctx, kcp, cluster, spec.DeepCopy(), "kubeadmconfig-name")
- g.Expect(err).ToNot(HaveOccurred())
- g.Expect(got).NotTo(BeNil())
- g.Expect(got.Name).To(Equal("kubeadmconfig-name"))
- g.Expect(got.Kind).To(Equal(expectedReferenceKind))
- g.Expect(got.APIGroup).To(Equal(expectedReferenceAPIGroup))
-
- bootstrapConfig := &bootstrapv1.KubeadmConfig{}
- key := client.ObjectKey{Name: got.Name, Namespace: kcp.Namespace}
- g.Expect(fakeClient.Get(ctx, key, bootstrapConfig)).To(Succeed())
- g.Expect(bootstrapConfig.OwnerReferences).To(HaveLen(1))
- g.Expect(bootstrapConfig.OwnerReferences).To(ContainElement(expectedOwner))
- g.Expect(bootstrapConfig.Spec).To(BeComparableTo(spec))
+ _, err := r.cloneConfigsAndGenerateMachine(ctx, cluster, kcp, true, "")
+ g.Expect(err).To(HaveOccurred())
+ g.Expect(&kcp.GetV1Beta1Conditions()[0]).Should(v1beta1conditions.HaveSameStateOf(&clusterv1.Condition{
+ Type: controlplanev1.MachinesCreatedV1Beta1Condition,
+ Status: corev1.ConditionFalse,
+ Severity: clusterv1.ConditionSeverityError,
+ Reason: controlplanev1.MachineGenerationFailedV1Beta1Reason,
+ Message: "failed to apply Machine: fake error during Machine creation",
+ }))
+ // No objects should exist.
+ machineList := &clusterv1.MachineList{}
+ g.Expect(fakeClient.List(ctx, machineList, client.InNamespace(cluster.Namespace))).To(Succeed())
+ g.Expect(machineList.Items).To(BeEmpty())
+ infraMachineList := &unstructured.UnstructuredList{}
+ infraMachineList.SetGroupVersionKind(schema.GroupVersionKind{
+ Group: builder.InfrastructureGroupVersion.Group,
+ Version: builder.InfrastructureGroupVersion.Version,
+ Kind: builder.GenericInfrastructureMachineKind + "List",
+ })
+ g.Expect(fakeClient.List(ctx, infraMachineList, client.InNamespace(cluster.Namespace))).To(Succeed())
+ g.Expect(infraMachineList.Items).To(BeEmpty())
+ kubeadmConfigList := &bootstrapv1.KubeadmConfigList{}
+ g.Expect(fakeClient.List(ctx, kubeadmConfigList, client.InNamespace(cluster.Namespace))).To(Succeed())
+ g.Expect(kubeadmConfigList.Items).To(BeEmpty())
}
func TestKubeadmControlPlaneReconciler_adoptKubeconfigSecret(t *testing.T) {
@@ -1073,10 +831,6 @@ func TestKubeadmControlPlaneReconciler_adoptKubeconfigSecret(t *testing.T) {
userProvidedKubeadmConfigSecretOtherOwner.OwnerReferences = []metav1.OwnerReference{otherOwner}
kcp := &controlplanev1.KubeadmControlPlane{
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmControlPlane",
- APIVersion: controlplanev1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Name: "testControlPlane",
Namespace: metav1.NamespaceDefault,
@@ -1093,8 +847,8 @@ func TestKubeadmControlPlaneReconciler_adoptKubeconfigSecret(t *testing.T) {
expectedOwnerRef: metav1.OwnerReference{
Name: kcp.Name,
UID: kcp.UID,
- Kind: kcp.Kind,
- APIVersion: kcp.APIVersion,
+ Kind: "KubeadmControlPlane",
+ APIVersion: controlplanev1.GroupVersion.String(),
Controller: ptr.To(true),
BlockOwnerDeletion: ptr.To(true),
},
@@ -1105,8 +859,8 @@ func TestKubeadmControlPlaneReconciler_adoptKubeconfigSecret(t *testing.T) {
expectedOwnerRef: metav1.OwnerReference{
Name: kcp.Name,
UID: kcp.UID,
- Kind: kcp.Kind,
- APIVersion: kcp.APIVersion,
+ Kind: "KubeadmControlPlane",
+ APIVersion: controlplanev1.GroupVersion.String(),
Controller: ptr.To(true),
BlockOwnerDeletion: ptr.To(true),
},
@@ -1136,3 +890,39 @@ func TestKubeadmControlPlaneReconciler_adoptKubeconfigSecret(t *testing.T) {
})
}
}
+
+func cleanupTime(fields []metav1.ManagedFieldsEntry) []metav1.ManagedFieldsEntry {
+ for i := range fields {
+ fields[i].Time = nil
+ }
+ return fields
+}
+
+type managedFieldEntry struct {
+ Manager string
+ Operation metav1.ManagedFieldsOperationType
+ APIVersion string
+ FieldsV1 string
+ Subresource string
+}
+
+func toManagedFields(managedFields []managedFieldEntry) []metav1.ManagedFieldsEntry {
+ res := []metav1.ManagedFieldsEntry{}
+ for _, f := range managedFields {
+ res = append(res, metav1.ManagedFieldsEntry{
+ Manager: f.Manager,
+ Operation: f.Operation,
+ APIVersion: f.APIVersion,
+ FieldsType: "FieldsV1",
+ FieldsV1: &metav1.FieldsV1{Raw: []byte(trimSpaces(f.FieldsV1))},
+ Subresource: f.Subresource,
+ })
+ }
+ return res
+}
+
+func trimSpaces(s string) string {
+ s = strings.ReplaceAll(s, "\n", "")
+ s = strings.ReplaceAll(s, "\t", "")
+ return s
+}
diff --git a/controlplane/kubeadm/internal/controllers/inplace.go b/controlplane/kubeadm/internal/controllers/inplace.go
new file mode 100644
index 000000000000..d4b659d250b6
--- /dev/null
+++ b/controlplane/kubeadm/internal/controllers/inplace.go
@@ -0,0 +1,67 @@
+/*
+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"
+
+ "github.com/pkg/errors"
+ ctrl "sigs.k8s.io/controller-runtime"
+
+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal"
+)
+
+func (r *KubeadmControlPlaneReconciler) tryInPlaceUpdate(
+ ctx context.Context,
+ controlPlane *internal.ControlPlane,
+ machineToInPlaceUpdate *clusterv1.Machine,
+ machineUpToDateResult internal.UpToDateResult,
+) (fallbackToScaleDown bool, _ ctrl.Result, _ error) {
+ if r.overrideTryInPlaceUpdateFunc != nil {
+ return r.overrideTryInPlaceUpdateFunc(ctx, controlPlane, machineToInPlaceUpdate, machineUpToDateResult)
+ }
+
+ // Run preflight checks to ensure that the control plane is stable before proceeding with in-place update operation.
+ if resultForAllMachines := r.preflightChecks(ctx, controlPlane); !resultForAllMachines.IsZero() {
+ // If the control plane is not stable, check if the issues are only for machineToInPlaceUpdate.
+ if result := r.preflightChecks(ctx, controlPlane, machineToInPlaceUpdate); result.IsZero() {
+ // The issues are only for machineToInPlaceUpdate, fallback to scale down.
+ // Note: The consequence of this is that a Machine with issues is scaled down and not in-place updated.
+ return true, ctrl.Result{}, nil
+ }
+
+ return false, resultForAllMachines, nil
+ }
+
+ // Note: Usually canUpdateMachine is only called once for a single Machine rollout.
+ // If it returns true, the code below will mark the in-place update as in progress via
+ // UpdateInProgressAnnotation. From this point forward we are not going to call canUpdateMachine again.
+ // If it returns false, we are going to fall back to scale down which will delete the Machine.
+ // We only have to repeat the canUpdateMachine call if the write call to set UpdateInProgressAnnotation
+ // fails or if we fail to delete the Machine.
+ canUpdate, err := r.canUpdateMachine(ctx, machineToInPlaceUpdate, machineUpToDateResult)
+ if err != nil {
+ return false, ctrl.Result{}, errors.Wrapf(err, "failed to determine if Machine %s can be updated in-place", machineToInPlaceUpdate.Name)
+ }
+
+ if !canUpdate {
+ return true, ctrl.Result{}, nil
+ }
+
+ return false, ctrl.Result{}, r.triggerInPlaceUpdate(ctx, machineToInPlaceUpdate, machineUpToDateResult)
+}
diff --git a/controlplane/kubeadm/internal/controllers/inplace_canupdatemachine.go b/controlplane/kubeadm/internal/controllers/inplace_canupdatemachine.go
new file mode 100644
index 000000000000..503919c75059
--- /dev/null
+++ b/controlplane/kubeadm/internal/controllers/inplace_canupdatemachine.go
@@ -0,0 +1,343 @@
+/*
+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"
+ "strings"
+
+ "github.com/pkg/errors"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/klog/v2"
+ ctrl "sigs.k8s.io/controller-runtime"
+ "sigs.k8s.io/controller-runtime/pkg/client"
+
+ bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1"
+ "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal"
+ "sigs.k8s.io/cluster-api/feature"
+ "sigs.k8s.io/cluster-api/internal/util/compare"
+ "sigs.k8s.io/cluster-api/internal/util/inplace"
+ "sigs.k8s.io/cluster-api/internal/util/patch"
+ "sigs.k8s.io/cluster-api/internal/util/ssa"
+)
+
+func (r *KubeadmControlPlaneReconciler) canUpdateMachine(ctx context.Context, machine *clusterv1.Machine, machineUpToDateResult internal.UpToDateResult) (bool, error) {
+ if r.overrideCanUpdateMachineFunc != nil {
+ return r.overrideCanUpdateMachineFunc(ctx, machine, machineUpToDateResult)
+ }
+
+ log := ctrl.LoggerFrom(ctx).WithValues("Machine", klog.KObj(machine))
+
+ // Machine cannot be updated in-place if the feature gate is not enabled.
+ if !feature.Gates.Enabled(feature.InPlaceUpdates) {
+ return false, nil
+ }
+
+ // Machine cannot be updated in-place if the UpToDate func was not able to provide all objects,
+ // e.g. if the InfraMachine or KubeadmConfig was deleted.
+ if machineUpToDateResult.DesiredMachine == nil ||
+ machineUpToDateResult.CurrentInfraMachine == nil ||
+ machineUpToDateResult.DesiredInfraMachine == nil ||
+ machineUpToDateResult.CurrentKubeadmConfig == nil ||
+ machineUpToDateResult.DesiredKubeadmConfig == nil {
+ return false, nil
+ }
+
+ extensionHandlers, err := r.RuntimeClient.GetAllExtensions(ctx, runtimehooksv1.CanUpdateMachine, machine)
+ if err != nil {
+ return false, err
+ }
+ // Machine cannot be updated in-place if no CanUpdateMachine extensions are registered.
+ if len(extensionHandlers) == 0 {
+ return false, nil
+ }
+ if len(extensionHandlers) > 1 {
+ return false, errors.Errorf("found multiple CanUpdateMachine hooks (%s): only one hook is supported", strings.Join(extensionHandlers, ","))
+ }
+
+ canUpdateMachine, reasons, err := r.canExtensionsUpdateMachine(ctx, machine, machineUpToDateResult, extensionHandlers)
+ if err != nil {
+ return false, err
+ }
+ if !canUpdateMachine {
+ log.Info(fmt.Sprintf("Machine %s cannot be updated in-place by extensions", machine.Name), "reason", strings.Join(reasons, ","))
+ return false, nil
+ }
+ return true, nil
+}
+
+// canExtensionsUpdateMachine calls CanUpdateMachine extensions to decide if a Machine can be updated in-place.
+// Note: This is following the same general structure that is used in the Apply func in
+// internal/controllers/topology/cluster/patches/engine.go.
+func (r *KubeadmControlPlaneReconciler) canExtensionsUpdateMachine(ctx context.Context, machine *clusterv1.Machine, machineUpToDateResult internal.UpToDateResult, extensionHandlers []string) (bool, []string, error) {
+ if r.overrideCanExtensionsUpdateMachine != nil {
+ return r.overrideCanExtensionsUpdateMachine(ctx, machine, machineUpToDateResult, extensionHandlers)
+ }
+
+ log := ctrl.LoggerFrom(ctx)
+
+ // Create the CanUpdateMachine request.
+ req, err := createRequest(ctx, r.Client, machine, machineUpToDateResult)
+ if err != nil {
+ return false, nil, errors.Wrapf(err, "failed to generate CanUpdateMachine request")
+ }
+
+ var reasons []string
+ for _, extensionHandler := range extensionHandlers {
+ // Call CanUpdateMachine extension.
+ resp := &runtimehooksv1.CanUpdateMachineResponse{}
+ if err := r.RuntimeClient.CallExtension(ctx, runtimehooksv1.CanUpdateMachine, machine, extensionHandler, req, resp); err != nil {
+ return false, nil, err
+ }
+
+ // Apply patches from the CanUpdateMachine response to the request.
+ if err := applyPatchesToRequest(ctx, req, resp); err != nil {
+ return false, nil, errors.Wrapf(err, "failed to apply patches from extension %s to the CanUpdateMachine request", extensionHandler)
+ }
+
+ // Check if current and desired objects are now matching.
+ var matches bool
+ matches, reasons, err = matchesMachine(req)
+ if err != nil {
+ return false, nil, errors.Wrapf(err, "failed to compare current and desired objects after calling extension %s", extensionHandler)
+ }
+ if matches {
+ return true, nil, nil
+ }
+ log.V(5).Info(fmt.Sprintf("Machine cannot be updated in-place yet after calling extension %s: %s", extensionHandler, strings.Join(reasons, ",")), "Machine", klog.KObj(&req.Current.Machine))
+ }
+
+ return false, reasons, nil
+}
+
+func createRequest(ctx context.Context, c client.Client, currentMachine *clusterv1.Machine, machineUpToDateResult internal.UpToDateResult) (*runtimehooksv1.CanUpdateMachineRequest, error) {
+ // DeepCopy objects to avoid mutations.
+ currentMachineForDiff := currentMachine.DeepCopy()
+ currentKubeadmConfigForDiff := machineUpToDateResult.CurrentKubeadmConfig.DeepCopy()
+ currentInfraMachineForDiff := machineUpToDateResult.CurrentInfraMachine.DeepCopy()
+
+ desiredMachineForDiff := machineUpToDateResult.DesiredMachine.DeepCopy()
+ desiredKubeadmConfigForDiff := machineUpToDateResult.DesiredKubeadmConfig.DeepCopy()
+ desiredInfraMachineForDiff := machineUpToDateResult.DesiredInfraMachine.DeepCopy()
+
+ // Sync in-place mutable changes from desired to current KubeadmConfig / InfraMachine.
+ // Note: Writing these fields is handled by syncMachines and not the responsibility of in-place updates.
+ // Note: Desired KubeadmConfig / InfraMachine already contain the latest labels & annotations.
+ currentKubeadmConfigForDiff.SetLabels(desiredKubeadmConfigForDiff.GetLabels())
+ currentKubeadmConfigForDiff.SetAnnotations(desiredKubeadmConfigForDiff.GetAnnotations())
+ currentInfraMachineForDiff.SetLabels(desiredInfraMachineForDiff.GetLabels())
+ currentInfraMachineForDiff.SetAnnotations(desiredInfraMachineForDiff.GetAnnotations())
+
+ // Apply defaulting to current / desired Machine / KubeadmConfig / InfraMachine.
+ // Machine
+ // Note: currentMachineForDiff doesn't need a dry-run as it was just written in syncMachines and then
+ // update in controlPlane to ensure the Machine we get here is the latest version of the Machine.
+ // Note: desiredMachineForDiff needs a dry-run because otherwise we have unintended diffs, e.g. dataSecretName,
+ // providerID and nodeDeletionTimeout don't exist on the newly computed desired Machine.
+ if err := ssa.Patch(ctx, c, kcpManagerName, desiredMachineForDiff, ssa.WithDryRun{}); err != nil {
+ return nil, errors.Wrap(err, "server side apply dry-run failed for desired Machine")
+ }
+ // InfraMachine
+ // Note: Both currentInfraMachineForDiff and desiredInfraMachineForDiff need a dry-run to ensure changes
+ // in defaulting logic and fields added by other controllers don't lead to an unintended diff.
+ if err := ssa.Patch(ctx, c, kcpManagerName, currentInfraMachineForDiff, ssa.WithDryRun{}); err != nil {
+ return nil, errors.Wrap(err, "server side apply dry-run failed for current InfraMachine")
+ }
+ if err := ssa.Patch(ctx, c, kcpManagerName, desiredInfraMachineForDiff, ssa.WithDryRun{}); err != nil {
+ return nil, errors.Wrap(err, "server side apply dry-run failed for desired InfraMachine")
+ }
+ // KubeadmConfig
+ // Note: Both currentKubeadmConfigForDiff and desiredKubeadmConfigForDiff don't need a dry-run as
+ // PrepareKubeadmConfigsForDiff already has to perfectly handle differences between current / desired
+ // KubeadmConfig. Otherwise the regular rollout logic would not detect correctly if a Machine needs a rollout.
+ // Note: KubeadmConfig doesn't have a defaulting webhook and no API defaulting anymore.
+ desiredKubeadmConfigForDiff, currentKubeadmConfigForDiff = internal.PrepareKubeadmConfigsForDiff(desiredKubeadmConfigForDiff, currentKubeadmConfigForDiff, true)
+
+ // Cleanup objects and create request.
+ req := &runtimehooksv1.CanUpdateMachineRequest{
+ Current: runtimehooksv1.CanUpdateMachineRequestObjects{
+ Machine: *cleanupMachine(currentMachineForDiff),
+ },
+ Desired: runtimehooksv1.CanUpdateMachineRequestObjects{
+ Machine: *cleanupMachine(desiredMachineForDiff),
+ },
+ }
+ var err error
+ req.Current.BootstrapConfig, err = patch.ConvertToRawExtension(cleanupKubeadmConfig(currentKubeadmConfigForDiff))
+ if err != nil {
+ return nil, err
+ }
+ req.Desired.BootstrapConfig, err = patch.ConvertToRawExtension(cleanupKubeadmConfig(desiredKubeadmConfigForDiff))
+ if err != nil {
+ return nil, err
+ }
+ req.Current.InfrastructureMachine, err = patch.ConvertToRawExtension(cleanupUnstructured(currentInfraMachineForDiff))
+ if err != nil {
+ return nil, err
+ }
+ req.Desired.InfrastructureMachine, err = patch.ConvertToRawExtension(cleanupUnstructured(desiredInfraMachineForDiff))
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+func cleanupMachine(machine *clusterv1.Machine) *clusterv1.Machine {
+ return &clusterv1.Machine{
+ // Set GVK because object is later marshalled with json.Marshal.
+ TypeMeta: metav1.TypeMeta{
+ APIVersion: clusterv1.GroupVersion.String(),
+ Kind: "Machine",
+ },
+ ObjectMeta: metav1.ObjectMeta{
+ Name: machine.Name,
+ Namespace: machine.Namespace,
+ Labels: machine.Labels,
+ Annotations: machine.Annotations,
+ },
+ Spec: *machine.Spec.DeepCopy(),
+ }
+}
+
+func cleanupKubeadmConfig(kubeadmConfig *bootstrapv1.KubeadmConfig) *bootstrapv1.KubeadmConfig {
+ return &bootstrapv1.KubeadmConfig{
+ // Set GVK because object is later marshalled with json.Marshal.
+ TypeMeta: metav1.TypeMeta{
+ APIVersion: bootstrapv1.GroupVersion.String(),
+ Kind: "KubeadmConfig",
+ },
+ ObjectMeta: metav1.ObjectMeta{
+ Name: kubeadmConfig.Name,
+ Namespace: kubeadmConfig.Namespace,
+ Labels: kubeadmConfig.Labels,
+ Annotations: kubeadmConfig.Annotations,
+ },
+ Spec: *kubeadmConfig.Spec.DeepCopy(),
+ }
+}
+
+func cleanupUnstructured(u *unstructured.Unstructured) *unstructured.Unstructured {
+ cleanedUpU := &unstructured.Unstructured{
+ Object: map[string]interface{}{
+ "apiVersion": u.GetAPIVersion(),
+ "kind": u.GetKind(),
+ "spec": u.Object["spec"],
+ },
+ }
+ cleanedUpU.SetName(u.GetName())
+ cleanedUpU.SetNamespace(u.GetNamespace())
+ cleanedUpU.SetLabels(u.GetLabels())
+ cleanedUpU.SetAnnotations(u.GetAnnotations())
+ return cleanedUpU
+}
+
+func applyPatchesToRequest(ctx context.Context, req *runtimehooksv1.CanUpdateMachineRequest, resp *runtimehooksv1.CanUpdateMachineResponse) error {
+ if resp.MachinePatch.IsDefined() {
+ if err := patch.ApplyPatchToTypedObject(ctx, &req.Current.Machine, resp.MachinePatch, "spec"); err != nil {
+ return err
+ }
+ }
+
+ if resp.BootstrapConfigPatch.IsDefined() {
+ if _, err := patch.ApplyPatchToObject(ctx, &req.Current.BootstrapConfig, resp.BootstrapConfigPatch, "spec"); err != nil {
+ return err
+ }
+ }
+
+ if resp.InfrastructureMachinePatch.IsDefined() {
+ if _, err := patch.ApplyPatchToObject(ctx, &req.Current.InfrastructureMachine, resp.InfrastructureMachinePatch, "spec"); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func matchesMachine(req *runtimehooksv1.CanUpdateMachineRequest) (bool, []string, error) {
+ var reasons []string
+ match, diff, err := matchesMachineSpec(&req.Current.Machine, &req.Desired.Machine)
+ if err != nil {
+ return false, nil, errors.Wrapf(err, "failed to match Machine")
+ }
+ if !match {
+ reasons = append(reasons, fmt.Sprintf("Machine cannot be updated in-place: %s", diff))
+ }
+ match, diff, err = matchesUnstructuredSpec(req.Current.BootstrapConfig, req.Desired.BootstrapConfig)
+ if err != nil {
+ return false, nil, errors.Wrapf(err, "failed to match KubeadmConfig")
+ }
+ if !match {
+ reasons = append(reasons, fmt.Sprintf("KubeadmConfig cannot be updated in-place: %s", diff))
+ }
+ match, diff, err = matchesUnstructuredSpec(req.Current.InfrastructureMachine, req.Desired.InfrastructureMachine)
+ if err != nil {
+ return false, nil, errors.Wrapf(err, "failed to match %s", req.Current.InfrastructureMachine.Object.GetObjectKind().GroupVersionKind().Kind)
+ }
+ if !match {
+ reasons = append(reasons, fmt.Sprintf("%s cannot be updated in-place: %s", req.Current.InfrastructureMachine.Object.GetObjectKind().GroupVersionKind().Kind, diff))
+ }
+
+ if len(reasons) > 0 {
+ return false, reasons, nil
+ }
+
+ return true, nil, nil
+}
+
+func matchesMachineSpec(patched, desired *clusterv1.Machine) (equal bool, diff string, matchErr error) {
+ // Note: Wrapping Machine specs in a Machine for proper formatting of the diff.
+ return compare.Diff(
+ &clusterv1.Machine{
+ Spec: *inplace.CleanupMachineSpecForDiff(&patched.Spec),
+ },
+ &clusterv1.Machine{
+ Spec: *inplace.CleanupMachineSpecForDiff(&desired.Spec),
+ },
+ )
+}
+
+func matchesUnstructuredSpec(patched, desired runtime.RawExtension) (equal bool, diff string, matchErr error) {
+ // Note: Both patched and desired objects are always Unstructured as createRequest and
+ // applyPatchToObject are always setting objects as Unstructured.
+ patchedUnstructured, ok := patched.Object.(*unstructured.Unstructured)
+ if !ok {
+ return false, "", errors.Errorf("patched object is not an Unstructured")
+ }
+ desiredUnstructured, ok := desired.Object.(*unstructured.Unstructured)
+ if !ok {
+ return false, "", errors.Errorf("desired object is not an Unstructured")
+ }
+ // Note: Wrapping Unstructured specs in an Unstructured for proper formatting of the diff.
+ return compare.Diff(
+ &unstructured.Unstructured{
+ Object: map[string]interface{}{
+ "spec": patchedUnstructured.Object["spec"],
+ },
+ },
+ &unstructured.Unstructured{
+ Object: map[string]interface{}{
+ "spec": desiredUnstructured.Object["spec"],
+ },
+ },
+ )
+}
diff --git a/controlplane/kubeadm/internal/controllers/inplace_canupdatemachine_test.go b/controlplane/kubeadm/internal/controllers/inplace_canupdatemachine_test.go
new file mode 100644
index 000000000000..94c4a9c68de8
--- /dev/null
+++ b/controlplane/kubeadm/internal/controllers/inplace_canupdatemachine_test.go
@@ -0,0 +1,1187 @@
+/*
+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 (
+ "bytes"
+ "context"
+ "encoding/json"
+ "fmt"
+ "testing"
+
+ . "github.com/onsi/gomega"
+ "github.com/pkg/errors"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+ "k8s.io/apimachinery/pkg/runtime"
+ utilfeature "k8s.io/component-base/featuregate/testing"
+ "k8s.io/utils/ptr"
+ "sigs.k8s.io/controller-runtime/pkg/client"
+ "sigs.k8s.io/controller-runtime/pkg/client/fake"
+
+ bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1"
+ "sigs.k8s.io/cluster-api/bootstrap/kubeadm/defaulting"
+ "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal"
+ runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog"
+ "sigs.k8s.io/cluster-api/feature"
+ fakeruntimeclient "sigs.k8s.io/cluster-api/internal/runtime/client/fake"
+ "sigs.k8s.io/cluster-api/internal/util/compare"
+ "sigs.k8s.io/cluster-api/internal/util/patch"
+ "sigs.k8s.io/cluster-api/internal/util/ssa"
+ "sigs.k8s.io/cluster-api/util/test/builder"
+)
+
+func Test_canUpdateMachine(t *testing.T) {
+ machineToInPlaceUpdate := &clusterv1.Machine{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machine-to-in-place-update",
+ },
+ }
+ nonEmptyMachineUpToDateResult := internal.UpToDateResult{
+ // No real content needed for this, fields should just not be nil,
+ EligibleForInPlaceUpdate: true,
+ DesiredMachine: &clusterv1.Machine{},
+ CurrentInfraMachine: &unstructured.Unstructured{},
+ DesiredInfraMachine: &unstructured.Unstructured{},
+ CurrentKubeadmConfig: &bootstrapv1.KubeadmConfig{},
+ DesiredKubeadmConfig: &bootstrapv1.KubeadmConfig{},
+ }
+ catalog := runtimecatalog.New()
+ _ = runtimehooksv1.AddToCatalog(catalog)
+ canUpdateMachineGVH, err := catalog.GroupVersionHook(runtimehooksv1.CanUpdateMachine)
+ if err != nil {
+ panic("unable to compute GVH")
+ }
+
+ tests := []struct {
+ name string
+ machineUpToDateResult internal.UpToDateResult
+ enableInPlaceUpdatesFeatureGate bool
+ canExtensionsUpdateMachineFunc func(ctx context.Context, machine *clusterv1.Machine, machineUpToDateResult internal.UpToDateResult, extensionHandlers []string) (bool, []string, error)
+ getAllExtensionsResponses map[runtimecatalog.GroupVersionHook][]string
+ wantCanExtensionsUpdateMachineCalled bool
+ wantCanUpdateMachine bool
+ wantError bool
+ wantErrorMessage string
+ }{
+ {
+ name: "Return false if feature gate is not enabled",
+ enableInPlaceUpdatesFeatureGate: false,
+ wantCanUpdateMachine: false,
+ },
+ {
+ name: "Return false if objects in machineUpToDateResult are nil",
+ enableInPlaceUpdatesFeatureGate: true,
+ wantCanUpdateMachine: false,
+ },
+ {
+ name: "Return false if no CanUpdateMachine extensions registered",
+ enableInPlaceUpdatesFeatureGate: true,
+ machineUpToDateResult: nonEmptyMachineUpToDateResult,
+ getAllExtensionsResponses: map[runtimecatalog.GroupVersionHook][]string{},
+ wantCanUpdateMachine: false,
+ },
+ {
+ name: "Return error if more than one CanUpdateMachine extensions registered",
+ enableInPlaceUpdatesFeatureGate: true,
+ machineUpToDateResult: nonEmptyMachineUpToDateResult,
+ getAllExtensionsResponses: map[runtimecatalog.GroupVersionHook][]string{
+ canUpdateMachineGVH: {"test-update-extension-1", "test-update-extension-2"},
+ },
+ wantError: true,
+ wantErrorMessage: "found multiple CanUpdateMachine hooks (test-update-extension-1,test-update-extension-2): only one hook is supported",
+ },
+ {
+ name: "Return false if canExtensionsUpdateMachine returns false",
+ enableInPlaceUpdatesFeatureGate: true,
+ machineUpToDateResult: nonEmptyMachineUpToDateResult,
+ getAllExtensionsResponses: map[runtimecatalog.GroupVersionHook][]string{
+ canUpdateMachineGVH: {"test-update-extension"},
+ },
+ canExtensionsUpdateMachineFunc: func(_ context.Context, _ *clusterv1.Machine, _ internal.UpToDateResult, extensionHandlers []string) (bool, []string, error) {
+ if len(extensionHandlers) != 1 || extensionHandlers[0] != "test-update-extension" {
+ return false, nil, errors.Errorf("unexpected error")
+ }
+ return false, []string{"can not update"}, nil
+ },
+ wantCanExtensionsUpdateMachineCalled: true,
+ wantCanUpdateMachine: false,
+ },
+ {
+ name: "Return true if canExtensionsUpdateMachine returns true",
+ enableInPlaceUpdatesFeatureGate: true,
+ machineUpToDateResult: nonEmptyMachineUpToDateResult,
+ getAllExtensionsResponses: map[runtimecatalog.GroupVersionHook][]string{
+ canUpdateMachineGVH: {"test-update-extension"},
+ },
+ canExtensionsUpdateMachineFunc: func(_ context.Context, _ *clusterv1.Machine, _ internal.UpToDateResult, extensionHandlers []string) (bool, []string, error) {
+ if len(extensionHandlers) != 1 || extensionHandlers[0] != "test-update-extension" {
+ return false, nil, errors.Errorf("unexpected error")
+ }
+ return true, nil, nil
+ },
+ wantCanExtensionsUpdateMachineCalled: true,
+ wantCanUpdateMachine: true,
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+
+ if tt.enableInPlaceUpdatesFeatureGate {
+ utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.InPlaceUpdates, true)
+ }
+
+ runtimeClient := fakeruntimeclient.NewRuntimeClientBuilder().
+ WithCatalog(catalog).
+ WithGetAllExtensionResponses(tt.getAllExtensionsResponses).
+ Build()
+
+ var canExtensionsUpdateMachineCalled bool
+ r := &KubeadmControlPlaneReconciler{
+ RuntimeClient: runtimeClient,
+ overrideCanExtensionsUpdateMachine: func(ctx context.Context, machine *clusterv1.Machine, machineUpToDateResult internal.UpToDateResult, extensionHandlers []string) (bool, []string, error) {
+ canExtensionsUpdateMachineCalled = true
+ return tt.canExtensionsUpdateMachineFunc(ctx, machine, machineUpToDateResult, extensionHandlers)
+ },
+ }
+
+ canUpdateMachine, err := r.canUpdateMachine(ctx, machineToInPlaceUpdate, tt.machineUpToDateResult)
+ if tt.wantError {
+ g.Expect(err).To(HaveOccurred())
+ g.Expect(err.Error()).To(Equal(tt.wantErrorMessage))
+ } else {
+ g.Expect(err).ToNot(HaveOccurred())
+ }
+ g.Expect(canUpdateMachine).To(Equal(tt.wantCanUpdateMachine))
+
+ g.Expect(canExtensionsUpdateMachineCalled).To(Equal(tt.wantCanExtensionsUpdateMachineCalled), "canExtensionsUpdateMachineCalled: actual: %t expected: %t", canExtensionsUpdateMachineCalled, tt.wantCanExtensionsUpdateMachineCalled)
+ })
+ }
+}
+
+func Test_canExtensionsUpdateMachine(t *testing.T) {
+ currentMachine := &clusterv1.Machine{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machine-to-in-place-update",
+ Namespace: metav1.NamespaceDefault,
+ },
+ Spec: clusterv1.MachineSpec{
+ Version: "v1.30.0",
+ },
+ }
+ desiredMachine := currentMachine.DeepCopy()
+ desiredMachine.Spec.Version = "v1.31.0"
+
+ currentKubeadmConfig := &bootstrapv1.KubeadmConfig{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machine-to-in-place-update",
+ Namespace: metav1.NamespaceDefault,
+ },
+ Spec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ Etcd: bootstrapv1.Etcd{
+ Local: bootstrapv1.LocalEtcd{
+ ImageTag: "3.5.0-0",
+ },
+ },
+ },
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ ControlPlane: &bootstrapv1.JoinControlPlane{},
+ },
+ },
+ }
+ desiredKubeadmConfig := currentKubeadmConfig.DeepCopy()
+ desiredKubeadmConfig.Spec.ClusterConfiguration.Etcd.Local.ImageTag = "3.6.4-0"
+
+ currentInfraMachine := &unstructured.Unstructured{
+ Object: map[string]interface{}{
+ "apiVersion": builder.InfrastructureGroupVersion.String(),
+ "kind": builder.TestInfrastructureMachineKind,
+ "metadata": map[string]interface{}{
+ "name": "machine-to-in-place-update",
+ "namespace": metav1.NamespaceDefault,
+ "annotations": map[string]interface{}{
+ clusterv1.TemplateClonedFromNameAnnotation: "infra-machine-template-1",
+ clusterv1.TemplateClonedFromGroupKindAnnotation: "TestInfrastructureMachineTemplate.infrastructure.cluster.x-k8s.io",
+ },
+ },
+ "spec": map[string]interface{}{
+ "hello": "world",
+ },
+ },
+ }
+ desiredInfraMachine := currentInfraMachine.DeepCopy()
+ _ = unstructured.SetNestedField(desiredInfraMachine.Object, "in-place updated world", "spec", "hello")
+
+ responseWithEmptyPatches := &runtimehooksv1.CanUpdateMachineResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{Status: runtimehooksv1.ResponseStatusSuccess},
+ MachinePatch: runtimehooksv1.Patch{
+ PatchType: runtimehooksv1.JSONPatchType,
+ Patch: []byte("[]"),
+ },
+ InfrastructureMachinePatch: runtimehooksv1.Patch{
+ PatchType: runtimehooksv1.JSONMergePatchType,
+ Patch: []byte{},
+ },
+ BootstrapConfigPatch: runtimehooksv1.Patch{
+ PatchType: runtimehooksv1.JSONMergePatchType,
+ Patch: []byte("{}"),
+ },
+ }
+ patchToUpdateMachine := runtimehooksv1.Patch{
+ PatchType: runtimehooksv1.JSONPatchType,
+ Patch: []byte(`[{"op":"replace","path":"/spec/version","value":"v1.31.0"}]`),
+ }
+ patchToUpdateKubeadmConfig := runtimehooksv1.Patch{
+ PatchType: runtimehooksv1.JSONPatchType,
+ Patch: []byte(`[{"op":"replace","path":"/spec/clusterConfiguration/etcd/local/imageTag","value":"3.6.4-0"}]`),
+ }
+ patchToUpdateInfraMachine := runtimehooksv1.Patch{
+ PatchType: runtimehooksv1.JSONPatchType,
+ Patch: []byte(`[{"op":"replace","path":"/spec/hello","value":"in-place updated world"}]`),
+ }
+ emptyPatch := runtimehooksv1.Patch{
+ PatchType: runtimehooksv1.JSONMergePatchType,
+ Patch: []byte{},
+ }
+
+ tests := []struct {
+ name string
+ machineUpToDateResult internal.UpToDateResult
+ extensionHandlers []string
+ callExtensionResponses map[string]runtimehooksv1.ResponseObject
+ callExtensionExpectedChanges map[string]func(runtime.Object)
+ wantCanUpdateMachine bool
+ wantReasons []string
+ wantError bool
+ wantErrorMessage string
+ }{
+ {
+ name: "Return true if current and desired objects are equal and no patches are returned",
+ // Note: canExtensionsUpdateMachine should never be called if the objects are equal, but this is a simple first test case.
+ machineUpToDateResult: internal.UpToDateResult{
+ DesiredMachine: currentMachine,
+ CurrentInfraMachine: currentInfraMachine,
+ DesiredInfraMachine: currentInfraMachine,
+ CurrentKubeadmConfig: currentKubeadmConfig,
+ DesiredKubeadmConfig: currentKubeadmConfig,
+ },
+ extensionHandlers: []string{"test-update-extension"},
+ callExtensionResponses: map[string]runtimehooksv1.ResponseObject{
+ "test-update-extension": responseWithEmptyPatches,
+ },
+ wantCanUpdateMachine: true,
+ },
+ {
+ name: "Return false if current and desired objects are not equal and no patches are returned",
+ machineUpToDateResult: internal.UpToDateResult{
+ DesiredMachine: desiredMachine,
+ CurrentInfraMachine: currentInfraMachine,
+ DesiredInfraMachine: desiredInfraMachine,
+ CurrentKubeadmConfig: currentKubeadmConfig,
+ DesiredKubeadmConfig: desiredKubeadmConfig,
+ },
+ extensionHandlers: []string{"test-update-extension"},
+ callExtensionResponses: map[string]runtimehooksv1.ResponseObject{
+ "test-update-extension": responseWithEmptyPatches,
+ },
+ wantCanUpdateMachine: false,
+ wantReasons: []string{
+ `Machine cannot be updated in-place: &v1beta2.Machine{
+ TypeMeta: {},
+ ObjectMeta: {},
+ Spec: v1beta2.MachineSpec{
+ ClusterName: "",
+ Bootstrap: {},
+ InfrastructureRef: {},
+- Version: "v1.30.0",
++ Version: "v1.31.0",
+ ProviderID: "",
+ FailureDomain: "",
+ ... // 4 identical fields
+ },
+ Status: {},
+ }`,
+ `KubeadmConfig cannot be updated in-place: &unstructured.Unstructured{
+ Object: map[string]any{
+ "spec": map[string]any{
+- "clusterConfiguration": map[string]any{"etcd": map[string]any{"local": map[string]any{"imageTag": string("3.5.0-0")}}},
++ "clusterConfiguration": map[string]any{"etcd": map[string]any{"local": map[string]any{"imageTag": string("3.6.4-0")}}},
+ "format": string("cloud-config"),
+ "initConfiguration": map[string]any{"nodeRegistration": map[string]any{"imagePullPolicy": string("IfNotPresent")}},
+ "joinConfiguration": map[string]any{"controlPlane": map[string]any{}, "nodeRegistration": map[string]any{"imagePullPolicy": string("IfNotPresent")}},
+ },
+ },
+ }`,
+ `TestInfrastructureMachine cannot be updated in-place: &unstructured.Unstructured{
+- Object: map[string]any{"spec": map[string]any{"hello": string("world")}},
++ Object: map[string]any{"spec": map[string]any{"hello": string("in-place updated world")}},
+ }`,
+ },
+ },
+ {
+ name: "Return true if current and desired objects are not equal and patches are returned that account for all diffs",
+ machineUpToDateResult: internal.UpToDateResult{
+ DesiredMachine: desiredMachine,
+ CurrentInfraMachine: currentInfraMachine,
+ DesiredInfraMachine: desiredInfraMachine,
+ CurrentKubeadmConfig: currentKubeadmConfig,
+ DesiredKubeadmConfig: desiredKubeadmConfig,
+ },
+ extensionHandlers: []string{"test-update-extension"},
+ callExtensionResponses: map[string]runtimehooksv1.ResponseObject{
+ "test-update-extension": &runtimehooksv1.CanUpdateMachineResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{Status: runtimehooksv1.ResponseStatusSuccess},
+ MachinePatch: patchToUpdateMachine,
+ InfrastructureMachinePatch: patchToUpdateInfraMachine,
+ BootstrapConfigPatch: patchToUpdateKubeadmConfig,
+ },
+ },
+ wantCanUpdateMachine: true,
+ },
+ {
+ name: "Return true if current and desired objects are not equal and patches are returned that account for all diffs (multiple extensions)",
+ machineUpToDateResult: internal.UpToDateResult{
+ DesiredMachine: desiredMachine,
+ CurrentInfraMachine: currentInfraMachine,
+ DesiredInfraMachine: desiredInfraMachine,
+ CurrentKubeadmConfig: currentKubeadmConfig,
+ DesiredKubeadmConfig: desiredKubeadmConfig,
+ },
+ extensionHandlers: []string{"test-update-extension-1", "test-update-extension-2", "test-update-extension-3"},
+ callExtensionResponses: map[string]runtimehooksv1.ResponseObject{
+ "test-update-extension-1": &runtimehooksv1.CanUpdateMachineResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{Status: runtimehooksv1.ResponseStatusSuccess},
+ MachinePatch: patchToUpdateMachine,
+ },
+ "test-update-extension-2": &runtimehooksv1.CanUpdateMachineResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{Status: runtimehooksv1.ResponseStatusSuccess},
+ InfrastructureMachinePatch: patchToUpdateInfraMachine,
+ },
+ "test-update-extension-3": &runtimehooksv1.CanUpdateMachineResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{Status: runtimehooksv1.ResponseStatusSuccess},
+ BootstrapConfigPatch: patchToUpdateKubeadmConfig,
+ },
+ },
+ callExtensionExpectedChanges: map[string]func(runtime.Object){
+ "test-update-extension-2": func(object runtime.Object) {
+ if machine, ok := object.(*clusterv1.Machine); ok {
+ // After the call to test-update-extension-1 we expect that patchToUpdateMachine is already applied.
+ machine.Spec.Version = "v1.31.0"
+ }
+ },
+ "test-update-extension-3": func(object runtime.Object) {
+ if machine, ok := object.(*clusterv1.Machine); ok {
+ // After the call to test-update-extension-1 we expect that patchToUpdateMachine is already applied.
+ machine.Spec.Version = "v1.31.0"
+ }
+ if infraMachine, ok := object.(*unstructured.Unstructured); ok {
+ // After the call to test-update-extension-2 we expect that patchToUpdateInfraMachine is already applied.
+ _ = unstructured.SetNestedField(infraMachine.Object, "in-place updated world", "spec", "hello")
+ }
+ },
+ },
+ wantCanUpdateMachine: true,
+ },
+ {
+ name: "Return false if current and desired objects are not equal and patches are returned that only account for some diffs",
+ machineUpToDateResult: internal.UpToDateResult{
+ DesiredMachine: desiredMachine,
+ CurrentInfraMachine: currentInfraMachine,
+ DesiredInfraMachine: desiredInfraMachine,
+ CurrentKubeadmConfig: currentKubeadmConfig,
+ DesiredKubeadmConfig: desiredKubeadmConfig,
+ },
+ extensionHandlers: []string{"test-update-extension"},
+ callExtensionResponses: map[string]runtimehooksv1.ResponseObject{
+ "test-update-extension": &runtimehooksv1.CanUpdateMachineResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{Status: runtimehooksv1.ResponseStatusSuccess},
+ MachinePatch: patchToUpdateMachine,
+ InfrastructureMachinePatch: emptyPatch,
+ BootstrapConfigPatch: emptyPatch,
+ },
+ },
+ wantCanUpdateMachine: false,
+ wantReasons: []string{
+ `KubeadmConfig cannot be updated in-place: &unstructured.Unstructured{
+ Object: map[string]any{
+ "spec": map[string]any{
+- "clusterConfiguration": map[string]any{"etcd": map[string]any{"local": map[string]any{"imageTag": string("3.5.0-0")}}},
++ "clusterConfiguration": map[string]any{"etcd": map[string]any{"local": map[string]any{"imageTag": string("3.6.4-0")}}},
+ "format": string("cloud-config"),
+ "initConfiguration": map[string]any{"nodeRegistration": map[string]any{"imagePullPolicy": string("IfNotPresent")}},
+ "joinConfiguration": map[string]any{"controlPlane": map[string]any{}, "nodeRegistration": map[string]any{"imagePullPolicy": string("IfNotPresent")}},
+ },
+ },
+ }`,
+ `TestInfrastructureMachine cannot be updated in-place: &unstructured.Unstructured{
+- Object: map[string]any{"spec": map[string]any{"hello": string("world")}},
++ Object: map[string]any{"spec": map[string]any{"hello": string("in-place updated world")}},
+ }`,
+ },
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+
+ fakeClient := fake.NewClientBuilder().
+ WithObjects(currentMachine, currentInfraMachine, currentKubeadmConfig).
+ Build()
+
+ catalog := runtimecatalog.New()
+ _ = runtimehooksv1.AddToCatalog(catalog)
+ runtimeClient := fakeruntimeclient.NewRuntimeClientBuilder().
+ WithCatalog(catalog).
+ WithCallExtensionValidations(validateCanUpdateMachineRequests(currentMachine, tt.machineUpToDateResult, tt.callExtensionExpectedChanges)).
+ WithCallExtensionResponses(tt.callExtensionResponses).
+ Build()
+
+ r := &KubeadmControlPlaneReconciler{
+ Client: fakeClient,
+ RuntimeClient: runtimeClient,
+ }
+
+ canUpdateMachine, reasons, err := r.canExtensionsUpdateMachine(ctx, currentMachine, tt.machineUpToDateResult, tt.extensionHandlers)
+ if tt.wantError {
+ g.Expect(err).To(HaveOccurred())
+ g.Expect(err.Error()).To(Equal(tt.wantErrorMessage))
+ } else {
+ g.Expect(err).ToNot(HaveOccurred())
+ }
+ g.Expect(canUpdateMachine).To(Equal(tt.wantCanUpdateMachine))
+ g.Expect(reasons).To(BeComparableTo(tt.wantReasons))
+ })
+ }
+}
+
+func validateCanUpdateMachineRequests(currentMachine *clusterv1.Machine, machineUpToDateResult internal.UpToDateResult, callExtensionExpectedChanges map[string]func(runtime.Object)) func(name string, object runtimehooksv1.RequestObject) error {
+ return func(name string, req runtimehooksv1.RequestObject) error {
+ switch req := req.(type) {
+ case *runtimehooksv1.CanUpdateMachineRequest:
+ // Compare Machine
+ currentMachine := currentMachine.DeepCopy()
+ currentMachine.SetGroupVersionKind(clusterv1.GroupVersion.WithKind("Machine"))
+ currentMachine.ResourceVersion = "" // cleanupMachine drops ResourceVersion.
+ if mutator, ok := callExtensionExpectedChanges[name]; ok {
+ mutator(currentMachine)
+ }
+ if d := diff(req.Current.Machine, *currentMachine); d != "" {
+ return fmt.Errorf("expected currentMachine to be equal, got diff: %s", d)
+ }
+ desiredMachine := machineUpToDateResult.DesiredMachine.DeepCopy()
+ desiredMachine.SetGroupVersionKind(clusterv1.GroupVersion.WithKind("Machine"))
+ desiredMachine.ResourceVersion = "" // cleanupMachine drops ResourceVersion.
+ if d := diff(req.Desired.Machine, *desiredMachine); d != "" {
+ return fmt.Errorf("expected desiredMachine to be equal, got diff: %s", d)
+ }
+
+ // Compare KubeadmConfig
+ currentKubeadmConfig := machineUpToDateResult.CurrentKubeadmConfig.DeepCopy()
+ currentKubeadmConfig.SetGroupVersionKind(bootstrapv1.GroupVersion.WithKind("KubeadmConfig"))
+ currentKubeadmConfig.ResourceVersion = "" // cleanupKubeadmConfig drops ResourceVersion.
+ defaulting.ApplyPreviousKubeadmConfigDefaults(¤tKubeadmConfig.Spec) // PrepareKubeadmConfigsForDiff applies defaults.
+ if mutator, ok := callExtensionExpectedChanges[name]; ok {
+ mutator(currentKubeadmConfig)
+ }
+ currentKubeadmConfigBytes, _ := json.Marshal(currentKubeadmConfig)
+ if d := diff(req.Current.BootstrapConfig.Raw, currentKubeadmConfigBytes); d != "" {
+ return fmt.Errorf("expected currentKubeadmConfig to be equal, got diff: %s", d)
+ }
+ desiredKubeadmConfig := machineUpToDateResult.DesiredKubeadmConfig.DeepCopy()
+ desiredKubeadmConfig.SetGroupVersionKind(bootstrapv1.GroupVersion.WithKind("KubeadmConfig"))
+ desiredKubeadmConfig.ResourceVersion = "" // cleanupKubeadmConfig drops ResourceVersion.
+ defaulting.ApplyPreviousKubeadmConfigDefaults(&desiredKubeadmConfig.Spec) // PrepareKubeadmConfigsForDiff applies defaults.
+ desiredKubeadmConfigBytes, _ := json.Marshal(desiredKubeadmConfig)
+ if d := diff(req.Desired.BootstrapConfig.Raw, desiredKubeadmConfigBytes); d != "" {
+ return fmt.Errorf("expected desiredKubeadmConfig to be equal, got diff: %s", d)
+ }
+
+ // Compare InfraMachine
+ currentInfraMachine := machineUpToDateResult.CurrentInfraMachine.DeepCopy()
+ currentInfraMachine.SetResourceVersion("") // cleanupUnstructured drops ResourceVersion.
+ if mutator, ok := callExtensionExpectedChanges[name]; ok {
+ mutator(currentInfraMachine)
+ }
+ currentInfraMachineBytes, _ := json.Marshal(currentInfraMachine)
+ reqCurrentInfraMachineBytes := bytes.TrimSuffix(req.Current.InfrastructureMachine.Raw, []byte("\n")) // Note: Somehow Patch introduces a trailing \n.
+ if d := diff(reqCurrentInfraMachineBytes, currentInfraMachineBytes); d != "" {
+ return fmt.Errorf("expected currentInfraMachine to be equal, got diff: %s", d)
+ }
+ desiredInfraMachine := machineUpToDateResult.DesiredInfraMachine.DeepCopy()
+ desiredInfraMachine.SetResourceVersion("") // cleanupUnstructured drops ResourceVersion.
+ desiredInfraMachineBytes, _ := json.Marshal(desiredInfraMachine)
+ if d := diff(req.Desired.InfrastructureMachine.Raw, desiredInfraMachineBytes); d != "" {
+ return fmt.Errorf("expected desiredInfraMachine to be equal, got diff: %s", d)
+ }
+
+ return nil
+ default:
+ return fmt.Errorf("unhandled request type %T", req)
+ }
+ }
+}
+
+func Test_createRequest(t *testing.T) {
+ g := NewWithT(t)
+
+ ns, err := env.CreateNamespace(ctx, "in-place-create-request")
+ g.Expect(err).ToNot(HaveOccurred())
+
+ currentMachine := &clusterv1.Machine{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machine-to-in-place-update",
+ Namespace: ns.Name,
+ Labels: map[string]string{
+ clusterv1.ClusterNameLabel: "cluster-1",
+ "label-1": "label-value-1",
+ },
+ Annotations: map[string]string{
+ "annotation-1": "annotation-value-1",
+ },
+ },
+ Spec: clusterv1.MachineSpec{
+ ClusterName: "cluster-1",
+ Bootstrap: clusterv1.Bootstrap{
+ ConfigRef: clusterv1.ContractVersionedObjectReference{
+ APIGroup: bootstrapv1.GroupVersion.Group,
+ Kind: "KubeadmConfig",
+ Name: "machine-to-in-place-update",
+ },
+ },
+ InfrastructureRef: clusterv1.ContractVersionedObjectReference{
+ APIGroup: builder.InfrastructureGroupVersion.Group,
+ Kind: builder.TestInfrastructureMachineKind,
+ Name: "machine-to-in-place-update",
+ },
+ Deletion: clusterv1.MachineDeletionSpec{
+ NodeDeletionTimeoutSeconds: ptr.To[int32](10),
+ },
+ Version: "v1.30.0",
+ },
+ Status: clusterv1.MachineStatus{
+ NodeRef: clusterv1.MachineNodeReference{
+ Name: "machine-to-in-place-update",
+ },
+ },
+ }
+ currentMachineCleanedUp := currentMachine.DeepCopy()
+ currentMachineCleanedUp.SetGroupVersionKind(clusterv1.GroupVersion.WithKind("Machine")) // cleanupMachine adds GVK.
+ currentMachineCleanedUp.Status = clusterv1.MachineStatus{} // cleanupMachine drops status.
+ currentMachineWithFieldsSetByMachineController := currentMachine.DeepCopy()
+ currentMachineWithFieldsSetByMachineController.Spec.ProviderID = "test://provider-id"
+ currentMachineWithFieldsSetByMachineController.Spec.Bootstrap.DataSecretName = ptr.To("data-secret")
+ currentMachineWithFieldsSetByMachineControllerCleanedUp := currentMachineCleanedUp.DeepCopy()
+ currentMachineWithFieldsSetByMachineControllerCleanedUp.Spec.ProviderID = "test://provider-id"
+ currentMachineWithFieldsSetByMachineControllerCleanedUp.Spec.Bootstrap.DataSecretName = ptr.To("data-secret")
+
+ desiredMachine := currentMachine.DeepCopy()
+ desiredMachine.Spec.Version = "v1.31.0"
+ desiredMachineCleanedUp := desiredMachine.DeepCopy()
+ desiredMachineCleanedUp.SetGroupVersionKind(clusterv1.GroupVersion.WithKind("Machine")) // cleanupMachine adds GVK.
+ desiredMachineCleanedUp.Status = clusterv1.MachineStatus{} // cleanupMachine drops status.
+ desiredMachineWithFieldsSetByMachineControllerCleanedUp := desiredMachineCleanedUp.DeepCopy()
+ desiredMachineWithFieldsSetByMachineControllerCleanedUp.Spec.ProviderID = "test://provider-id"
+ desiredMachineWithFieldsSetByMachineControllerCleanedUp.Spec.Bootstrap.DataSecretName = ptr.To("data-secret")
+
+ currentKubeadmConfig := &bootstrapv1.KubeadmConfig{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machine-to-in-place-update",
+ Namespace: ns.Name,
+ Labels: map[string]string{
+ "label-1": "label-value-1",
+ },
+ Annotations: map[string]string{
+ "annotation-1": "annotation-value-1",
+ },
+ },
+ Spec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ Etcd: bootstrapv1.Etcd{
+ Local: bootstrapv1.LocalEtcd{
+ ImageTag: "3.5.0-0",
+ },
+ },
+ },
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ ControlPlane: &bootstrapv1.JoinControlPlane{},
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ KubeletExtraArgs: []bootstrapv1.Arg{{
+ Name: "v",
+ Value: ptr.To("8"),
+ }},
+ },
+ },
+ },
+ Status: bootstrapv1.KubeadmConfigStatus{
+ ObservedGeneration: 5,
+ },
+ }
+ currentKubeadmConfigCleanedUp := currentKubeadmConfig.DeepCopy()
+ currentKubeadmConfigCleanedUp.SetGroupVersionKind(bootstrapv1.GroupVersion.WithKind("KubeadmConfig")) // cleanupKubeadmConfig adds GVK.
+ currentKubeadmConfigCleanedUp.Status = bootstrapv1.KubeadmConfigStatus{} // cleanupKubeadmConfig drops status.
+ defaulting.ApplyPreviousKubeadmConfigDefaults(¤tKubeadmConfigCleanedUp.Spec) // PrepareKubeadmConfigsForDiff applies defaults.
+ currentKubeadmConfigWithOutdatedLabelsAndAnnotations := currentKubeadmConfig.DeepCopy()
+ currentKubeadmConfigWithOutdatedLabelsAndAnnotations.Labels["outdated-label-1"] = "outdated-label-value-1"
+ currentKubeadmConfigWithOutdatedLabelsAndAnnotations.Annotations["outdated-annotation-1"] = "outdated-annotation-value-1"
+ currentKubeadmConfigWithInitConfiguration := currentKubeadmConfig.DeepCopy()
+ currentKubeadmConfigWithInitConfiguration.Spec.InitConfiguration.NodeRegistration = currentKubeadmConfigWithInitConfiguration.Spec.JoinConfiguration.NodeRegistration
+ currentKubeadmConfigWithInitConfiguration.Spec.JoinConfiguration = bootstrapv1.JoinConfiguration{}
+
+ desiredKubeadmConfig := currentKubeadmConfig.DeepCopy()
+ desiredKubeadmConfig.Spec.ClusterConfiguration.Etcd.Local.ImageTag = "3.6.4-0"
+ desiredKubeadmConfigCleanedUp := desiredKubeadmConfig.DeepCopy()
+ desiredKubeadmConfigCleanedUp.SetGroupVersionKind(bootstrapv1.GroupVersion.WithKind("KubeadmConfig")) // cleanupKubeadmConfig adds GVK.
+ desiredKubeadmConfigCleanedUp.Status = bootstrapv1.KubeadmConfigStatus{} // cleanupKubeadmConfig drops status.
+ defaulting.ApplyPreviousKubeadmConfigDefaults(&desiredKubeadmConfigCleanedUp.Spec) // PrepareKubeadmConfigsForDiff applies defaults.
+
+ currentInfraMachine := &unstructured.Unstructured{
+ Object: map[string]interface{}{
+ "apiVersion": builder.InfrastructureGroupVersion.String(),
+ "kind": builder.TestInfrastructureMachineKind,
+ "metadata": map[string]interface{}{
+ "name": "machine-to-in-place-update",
+ "namespace": ns.Name,
+ "labels": map[string]interface{}{
+ "label-1": "label-value-1",
+ },
+ "annotations": map[string]interface{}{
+ clusterv1.TemplateClonedFromNameAnnotation: "infra-machine-template-1",
+ clusterv1.TemplateClonedFromGroupKindAnnotation: "TestInfrastructureMachineTemplate.infrastructure.cluster.x-k8s.io",
+ },
+ },
+ "spec": map[string]interface{}{
+ "foo": "hello world",
+ },
+ "status": map[string]interface{}{
+ "foo": "hello world",
+ },
+ },
+ }
+ currentInfraMachineCleanedUp := currentInfraMachine.DeepCopy()
+ unstructured.RemoveNestedField(currentInfraMachineCleanedUp.Object, "status") // cleanupUnstructured drops status.
+ currentInfraMachineWithOutdatedLabelsAndAnnotations := currentInfraMachine.DeepCopy()
+ currentInfraMachineWithOutdatedLabelsAndAnnotations.SetLabels(map[string]string{"outdated-label-1": "outdated-label-value-1"})
+ currentInfraMachineWithOutdatedLabelsAndAnnotations.SetAnnotations(map[string]string{"outdated-annotation-1": "outdated-annotation-value-1"})
+ currentInfraMachineWithFieldsSetByMachineController := currentInfraMachine.DeepCopy()
+ g.Expect(unstructured.SetNestedField(currentInfraMachineWithFieldsSetByMachineController.Object, "hello world from the infra machine controller", "spec", "bar")).To(Succeed())
+ currentInfraMachineWithFieldsSetByMachineControllerCleanedUp := currentInfraMachineCleanedUp.DeepCopy()
+ g.Expect(unstructured.SetNestedField(currentInfraMachineWithFieldsSetByMachineControllerCleanedUp.Object, "hello world from the infra machine controller", "spec", "bar")).To(Succeed())
+
+ desiredInfraMachine := currentInfraMachine.DeepCopy()
+ g.Expect(unstructured.SetNestedField(desiredInfraMachine.Object, "hello in-place updated world", "spec", "foo")).To(Succeed())
+ desiredInfraMachineCleanedUp := desiredInfraMachine.DeepCopy()
+ unstructured.RemoveNestedField(desiredInfraMachineCleanedUp.Object, "status") // cleanupUnstructured drops status.
+ desiredInfraMachineWithFieldsSetByMachineControllerCleanedUp := desiredInfraMachineCleanedUp.DeepCopy()
+ g.Expect(unstructured.SetNestedField(desiredInfraMachineWithFieldsSetByMachineControllerCleanedUp.Object, "hello world from the infra machine controller", "spec", "bar")).To(Succeed())
+
+ tests := []struct {
+ name string
+ currentMachine *clusterv1.Machine
+ currentInfraMachine *unstructured.Unstructured
+ currentKubeadmConfig *bootstrapv1.KubeadmConfig
+ desiredMachine *clusterv1.Machine
+ desiredInfraMachine *unstructured.Unstructured
+ desiredKubeadmConfig *bootstrapv1.KubeadmConfig
+ modifyMachineAfterCreate func(ctx context.Context, c client.Client, machine *clusterv1.Machine) error
+ modifyInfraMachineAfterCreate func(ctx context.Context, c client.Client, infraMachine *unstructured.Unstructured) error
+ modifyUpToDateResult func(result *internal.UpToDateResult)
+ wantReq *runtimehooksv1.CanUpdateMachineRequest
+ wantError bool
+ wantErrorMessage string
+ }{
+ {
+ name: "Should prepare all objects for diff",
+ currentMachine: currentMachine,
+ currentInfraMachine: currentInfraMachine,
+ currentKubeadmConfig: currentKubeadmConfig,
+ desiredMachine: desiredMachine,
+ desiredInfraMachine: desiredInfraMachine,
+ desiredKubeadmConfig: desiredKubeadmConfig,
+ wantReq: &runtimehooksv1.CanUpdateMachineRequest{
+ // Objects have been cleaned up for the diff.
+ Current: runtimehooksv1.CanUpdateMachineRequestObjects{
+ Machine: *currentMachineCleanedUp,
+ InfrastructureMachine: mustConvertToRawExtension(currentInfraMachineCleanedUp),
+ BootstrapConfig: mustConvertToRawExtension(currentKubeadmConfigCleanedUp),
+ },
+ Desired: runtimehooksv1.CanUpdateMachineRequestObjects{
+ Machine: *desiredMachineCleanedUp,
+ InfrastructureMachine: mustConvertToRawExtension(desiredInfraMachineCleanedUp),
+ BootstrapConfig: mustConvertToRawExtension(desiredKubeadmConfigCleanedUp),
+ },
+ },
+ },
+ {
+ name: "Should prepare all objects for diff: syncs BootstrapConfig/InfraMachine labels and annotations",
+ currentMachine: currentMachine,
+ currentInfraMachine: currentInfraMachine,
+ currentKubeadmConfig: currentKubeadmConfig,
+ desiredMachine: desiredMachine,
+ desiredInfraMachine: desiredInfraMachine,
+ desiredKubeadmConfig: desiredKubeadmConfig,
+ modifyUpToDateResult: func(result *internal.UpToDateResult) {
+ // Modify the UpToDateResult before it is passed into createRequest.
+ // This covers the scenario where the "local" current objects are outdated.
+ result.CurrentInfraMachine = currentInfraMachineWithOutdatedLabelsAndAnnotations
+ result.CurrentKubeadmConfig = currentKubeadmConfigWithOutdatedLabelsAndAnnotations
+ },
+ wantReq: &runtimehooksv1.CanUpdateMachineRequest{
+ // Current / desired BootstrapConfig / InfraMachine all contain the latest labels / annotations.
+ Current: runtimehooksv1.CanUpdateMachineRequestObjects{
+ Machine: *currentMachineCleanedUp,
+ InfrastructureMachine: mustConvertToRawExtension(currentInfraMachineCleanedUp),
+ BootstrapConfig: mustConvertToRawExtension(currentKubeadmConfigCleanedUp),
+ },
+ Desired: runtimehooksv1.CanUpdateMachineRequestObjects{
+ Machine: *desiredMachineCleanedUp,
+ InfrastructureMachine: mustConvertToRawExtension(desiredInfraMachineCleanedUp),
+ BootstrapConfig: mustConvertToRawExtension(desiredKubeadmConfigCleanedUp),
+ },
+ },
+ },
+ {
+ name: "Should prepare all objects for diff: desiredMachine picks up changes from currentMachine via SSA dry-run",
+ currentMachine: currentMachine,
+ currentInfraMachine: currentInfraMachine,
+ currentKubeadmConfig: currentKubeadmConfig,
+ desiredMachine: desiredMachine,
+ desiredInfraMachine: desiredInfraMachine,
+ desiredKubeadmConfig: desiredKubeadmConfig,
+ modifyMachineAfterCreate: func(ctx context.Context, c client.Client, machine *clusterv1.Machine) error {
+ // Write additional fields like the Machine controller would do.
+ machineOrig := machine.DeepCopy()
+ machine.Spec.ProviderID = "test://provider-id"
+ machine.Spec.Bootstrap.DataSecretName = ptr.To("data-secret")
+ return c.Patch(ctx, machine, client.MergeFrom(machineOrig))
+ },
+ wantReq: &runtimehooksv1.CanUpdateMachineRequest{
+ Current: runtimehooksv1.CanUpdateMachineRequestObjects{
+ // currentMachine always contained the fields written by the Machine controller
+ // as we pass the Machine object after modifyMachineAfterCreate into createRequest.
+ Machine: *currentMachineWithFieldsSetByMachineControllerCleanedUp,
+ InfrastructureMachine: mustConvertToRawExtension(currentInfraMachineCleanedUp),
+ BootstrapConfig: mustConvertToRawExtension(currentKubeadmConfigCleanedUp),
+ },
+ Desired: runtimehooksv1.CanUpdateMachineRequestObjects{
+ // desiredMachine picked up the fields written by the Machine controller via SSA dry-run.
+ Machine: *desiredMachineWithFieldsSetByMachineControllerCleanedUp,
+ InfrastructureMachine: mustConvertToRawExtension(desiredInfraMachineCleanedUp),
+ BootstrapConfig: mustConvertToRawExtension(desiredKubeadmConfigCleanedUp),
+ },
+ },
+ },
+ {
+ name: "Should prepare all objects for diff: desiredInfraMachine picks up changes from currentInfraMachine via SSA dry-run",
+ currentMachine: currentMachine,
+ currentInfraMachine: currentInfraMachine,
+ currentKubeadmConfig: currentKubeadmConfig,
+ desiredMachine: desiredMachine,
+ desiredInfraMachine: desiredInfraMachine,
+ desiredKubeadmConfig: desiredKubeadmConfig,
+ modifyInfraMachineAfterCreate: func(ctx context.Context, c client.Client, infraMachine *unstructured.Unstructured) error {
+ // Write additional fields like the Infra Machine controller would do.
+ infraMachineOrig := infraMachine.DeepCopy()
+ g.Expect(unstructured.SetNestedField(infraMachine.Object, "hello world from the infra machine controller", "spec", "bar")).To(Succeed())
+ return c.Patch(ctx, infraMachine, client.MergeFrom(infraMachineOrig))
+ },
+ wantReq: &runtimehooksv1.CanUpdateMachineRequest{
+ Current: runtimehooksv1.CanUpdateMachineRequestObjects{
+ Machine: *currentMachineCleanedUp,
+ // currentInfraMachine always contained the fields written by the InfraMachine controller
+ // as we pass the InfraMachine object after modifyInfraMachineAfterCreate into createRequest.
+ InfrastructureMachine: mustConvertToRawExtension(currentInfraMachineWithFieldsSetByMachineControllerCleanedUp),
+ BootstrapConfig: mustConvertToRawExtension(currentKubeadmConfigCleanedUp),
+ },
+ Desired: runtimehooksv1.CanUpdateMachineRequestObjects{
+ Machine: *desiredMachineCleanedUp,
+ // desiredInfraMachine picked up the fields written by the InfraMachine controller via SSA dry-run.
+ InfrastructureMachine: mustConvertToRawExtension(desiredInfraMachineWithFieldsSetByMachineControllerCleanedUp),
+ BootstrapConfig: mustConvertToRawExtension(desiredKubeadmConfigCleanedUp),
+ },
+ },
+ },
+ {
+ name: "Should prepare all objects for diff: currentKubeadmConfig & desiredKubeadmConfig are prepared for diff",
+ currentMachine: currentMachine,
+ currentInfraMachine: currentInfraMachine,
+ currentKubeadmConfig: currentKubeadmConfigWithInitConfiguration,
+ desiredMachine: desiredMachine,
+ desiredInfraMachine: desiredInfraMachine,
+ desiredKubeadmConfig: desiredKubeadmConfig,
+ wantReq: &runtimehooksv1.CanUpdateMachineRequest{
+ Current: runtimehooksv1.CanUpdateMachineRequestObjects{
+ Machine: *currentMachineCleanedUp,
+ InfrastructureMachine: mustConvertToRawExtension(currentInfraMachineCleanedUp),
+ // currentKubeadmConfig was converted from InitConfiguration to JoinConfiguration via PrepareKubeadmConfigsForDiff.
+ BootstrapConfig: mustConvertToRawExtension(currentKubeadmConfigCleanedUp),
+ },
+ Desired: runtimehooksv1.CanUpdateMachineRequestObjects{
+ Machine: *desiredMachineCleanedUp,
+ InfrastructureMachine: mustConvertToRawExtension(desiredInfraMachineCleanedUp),
+ BootstrapConfig: mustConvertToRawExtension(desiredKubeadmConfigCleanedUp),
+ },
+ },
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ ctx := t.Context()
+ g := NewWithT(t)
+
+ // Create Machine (same as in createMachine)
+ currentMachineForPatch := tt.currentMachine.DeepCopy()
+ g.Expect(ssa.Patch(ctx, env.Client, kcpManagerName, currentMachineForPatch)).To(Succeed())
+ t.Cleanup(func() {
+ g.Expect(env.CleanupAndWait(context.Background(), tt.currentMachine)).To(Succeed())
+ })
+
+ // Create InfraMachine (same as in createInfraMachine)
+ currentInfraMachineForPatch := tt.currentInfraMachine.DeepCopy()
+ g.Expect(ssa.Patch(ctx, env.Client, kcpManagerName, currentInfraMachineForPatch)).To(Succeed())
+ g.Expect(ssa.RemoveManagedFieldsForLabelsAndAnnotations(ctx, env.Client, env.GetAPIReader(), currentInfraMachineForPatch, kcpManagerName)).To(Succeed())
+ t.Cleanup(func() {
+ g.Expect(env.CleanupAndWait(context.Background(), tt.currentInfraMachine)).To(Succeed())
+ })
+
+ // Create KubeadmConfig (same as in createKubeadmConfig)
+ currentKubeadmConfigForPatch := tt.currentKubeadmConfig.DeepCopy()
+ g.Expect(ssa.Patch(ctx, env.Client, kcpManagerName, currentKubeadmConfigForPatch)).To(Succeed())
+ g.Expect(ssa.RemoveManagedFieldsForLabelsAndAnnotations(ctx, env.Client, env.GetAPIReader(), currentKubeadmConfigForPatch, kcpManagerName)).To(Succeed())
+ t.Cleanup(func() {
+ g.Expect(env.CleanupAndWait(context.Background(), tt.currentKubeadmConfig)).To(Succeed())
+ })
+
+ if tt.modifyMachineAfterCreate != nil {
+ g.Expect(tt.modifyMachineAfterCreate(ctx, env.Client, currentMachineForPatch)).To(Succeed())
+ }
+ if tt.modifyInfraMachineAfterCreate != nil {
+ g.Expect(tt.modifyInfraMachineAfterCreate(ctx, env.Client, currentInfraMachineForPatch)).To(Succeed())
+ }
+
+ upToDateResult := internal.UpToDateResult{
+ CurrentInfraMachine: currentInfraMachineForPatch,
+ CurrentKubeadmConfig: currentKubeadmConfigForPatch,
+ DesiredMachine: tt.desiredMachine,
+ DesiredInfraMachine: tt.desiredInfraMachine,
+ DesiredKubeadmConfig: tt.desiredKubeadmConfig,
+ }
+ if tt.modifyUpToDateResult != nil {
+ tt.modifyUpToDateResult(&upToDateResult)
+ }
+
+ req, err := createRequest(ctx, env.Client, currentMachineForPatch, upToDateResult)
+ if tt.wantError {
+ g.Expect(err).To(HaveOccurred())
+ g.Expect(err.Error()).To(Equal(tt.wantErrorMessage))
+ } else {
+ g.Expect(err).ToNot(HaveOccurred())
+ }
+ g.Expect(req).To(BeComparableTo(tt.wantReq))
+ })
+ }
+}
+
+func Test_applyPatchesToRequest(t *testing.T) {
+ currentMachine := &clusterv1.Machine{
+ // Set GVK because this is required by convertToRawExtension.
+ TypeMeta: metav1.TypeMeta{
+ APIVersion: clusterv1.GroupVersion.String(),
+ Kind: "Machine",
+ },
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machine-to-in-place-update",
+ Namespace: metav1.NamespaceDefault,
+ },
+ Spec: clusterv1.MachineSpec{
+ Version: "v1.30.0",
+ },
+ }
+ patchedMachine := currentMachine.DeepCopy()
+ patchedMachine.Spec.Version = "v1.31.0"
+
+ currentKubeadmConfig := &bootstrapv1.KubeadmConfig{
+ // Set GVK because this is required by convertToRawExtension.
+ TypeMeta: metav1.TypeMeta{
+ APIVersion: bootstrapv1.GroupVersion.String(),
+ Kind: "KubeadmConfig",
+ },
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machine-to-in-place-update",
+ Namespace: metav1.NamespaceDefault,
+ },
+ Spec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ Etcd: bootstrapv1.Etcd{
+ Local: bootstrapv1.LocalEtcd{
+ ImageTag: "3.5.0-0",
+ },
+ },
+ },
+ },
+ }
+ patchedKubeadmConfig := currentKubeadmConfig.DeepCopy()
+ patchedKubeadmConfig.Spec.ClusterConfiguration.Etcd.Local.ImageTag = "3.6.4-0"
+
+ currentInfraMachine := &unstructured.Unstructured{
+ Object: map[string]interface{}{
+ "apiVersion": builder.InfrastructureGroupVersion.String(),
+ "kind": builder.TestInfrastructureMachineKind,
+ "metadata": map[string]interface{}{
+ "name": "machine-to-in-place-update",
+ "namespace": metav1.NamespaceDefault,
+ "annotations": map[string]interface{}{
+ clusterv1.TemplateClonedFromNameAnnotation: "infra-machine-template-1",
+ clusterv1.TemplateClonedFromGroupKindAnnotation: "TestInfrastructureMachineTemplate.infrastructure.cluster.x-k8s.io",
+ },
+ },
+ "spec": map[string]interface{}{
+ "hello": "world",
+ },
+ },
+ }
+ patchedInfraMachine := currentInfraMachine.DeepCopy()
+ _ = unstructured.SetNestedField(patchedInfraMachine.Object, "in-place updated world", "spec", "hello")
+
+ responseWithEmptyPatches := &runtimehooksv1.CanUpdateMachineResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{Status: runtimehooksv1.ResponseStatusSuccess},
+ MachinePatch: runtimehooksv1.Patch{
+ PatchType: runtimehooksv1.JSONPatchType,
+ Patch: []byte("[]"),
+ },
+ InfrastructureMachinePatch: runtimehooksv1.Patch{
+ PatchType: runtimehooksv1.JSONMergePatchType,
+ Patch: []byte{},
+ },
+ BootstrapConfigPatch: runtimehooksv1.Patch{
+ PatchType: runtimehooksv1.JSONMergePatchType,
+ Patch: []byte("{}"),
+ },
+ }
+ patchToUpdateMachine := runtimehooksv1.Patch{
+ PatchType: runtimehooksv1.JSONPatchType,
+ Patch: []byte(`[{"op":"replace","path":"/spec/version","value":"v1.31.0"}]`),
+ }
+ patchToUpdateKubeadmConfig := runtimehooksv1.Patch{
+ PatchType: runtimehooksv1.JSONPatchType,
+ Patch: []byte(`[{"op":"replace","path":"/spec/clusterConfiguration/etcd/local/imageTag","value":"3.6.4-0"}]`),
+ }
+ patchToUpdateInfraMachine := runtimehooksv1.Patch{
+ PatchType: runtimehooksv1.JSONPatchType,
+ Patch: []byte(`[{"op":"replace","path":"/spec/hello","value":"in-place updated world"}]`),
+ }
+ jsonMergePatchToUpdateMachine := runtimehooksv1.Patch{
+ PatchType: runtimehooksv1.JSONMergePatchType,
+ Patch: []byte(`{"spec":{"version":"v1.31.0"}}`),
+ }
+ jsonMergePatchToUpdateKubeadmConfig := runtimehooksv1.Patch{
+ PatchType: runtimehooksv1.JSONMergePatchType,
+ Patch: []byte(`{"spec":{"clusterConfiguration":{"etcd":{"local":{"imageTag":"3.6.4-0"}}}}}`),
+ }
+ jsonMergePatchToUpdateInfraMachine := runtimehooksv1.Patch{
+ PatchType: runtimehooksv1.JSONMergePatchType,
+ Patch: []byte(`{"spec":{"hello":"in-place updated world"}}`),
+ }
+ patchToUpdateMachineStatus := runtimehooksv1.Patch{
+ PatchType: runtimehooksv1.JSONPatchType,
+ Patch: []byte(`[{"op":"add","path":"/status","value":{"observedGeneration": 10}}]`),
+ }
+ patchToUpdateKubeadmConfigStatus := runtimehooksv1.Patch{
+ PatchType: runtimehooksv1.JSONPatchType,
+ Patch: []byte(`[{"op":"add","path":"/status","value":{"observedGeneration": 10}}]`),
+ }
+ patchToUpdateInfraMachineStatus := runtimehooksv1.Patch{
+ PatchType: runtimehooksv1.JSONPatchType,
+ Patch: []byte(`[{"op":"add","path":"/status","value":{"observedGeneration": 10}}]`),
+ }
+
+ tests := []struct {
+ name string
+ req *runtimehooksv1.CanUpdateMachineRequest
+ resp *runtimehooksv1.CanUpdateMachineResponse
+ wantReq *runtimehooksv1.CanUpdateMachineRequest
+ wantError bool
+ wantErrorMessage string
+ }{
+ {
+ name: "No changes with no patches",
+ req: &runtimehooksv1.CanUpdateMachineRequest{
+ Current: runtimehooksv1.CanUpdateMachineRequestObjects{
+ Machine: *currentMachine,
+ InfrastructureMachine: mustConvertToRawExtension(currentInfraMachine),
+ BootstrapConfig: mustConvertToRawExtension(currentKubeadmConfig),
+ },
+ },
+ resp: responseWithEmptyPatches,
+ wantReq: &runtimehooksv1.CanUpdateMachineRequest{
+ Current: runtimehooksv1.CanUpdateMachineRequestObjects{
+ Machine: *currentMachine,
+ InfrastructureMachine: mustConvertToRawExtension(currentInfraMachine),
+ BootstrapConfig: mustConvertToRawExtension(currentKubeadmConfig),
+ },
+ },
+ },
+ {
+ name: "Changes with patches",
+ req: &runtimehooksv1.CanUpdateMachineRequest{
+ Current: runtimehooksv1.CanUpdateMachineRequestObjects{
+ Machine: *currentMachine,
+ InfrastructureMachine: mustConvertToRawExtension(currentInfraMachine),
+ BootstrapConfig: mustConvertToRawExtension(currentKubeadmConfig),
+ },
+ },
+ resp: &runtimehooksv1.CanUpdateMachineResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{Status: runtimehooksv1.ResponseStatusSuccess},
+ MachinePatch: patchToUpdateMachine,
+ InfrastructureMachinePatch: patchToUpdateInfraMachine,
+ BootstrapConfigPatch: patchToUpdateKubeadmConfig,
+ },
+ wantReq: &runtimehooksv1.CanUpdateMachineRequest{
+ Current: runtimehooksv1.CanUpdateMachineRequestObjects{
+ Machine: *patchedMachine,
+ InfrastructureMachine: mustConvertToRawExtension(patchedInfraMachine),
+ BootstrapConfig: mustConvertToRawExtension(patchedKubeadmConfig),
+ },
+ },
+ },
+ {
+ name: "Changes with JSON merge patches",
+ req: &runtimehooksv1.CanUpdateMachineRequest{
+ Current: runtimehooksv1.CanUpdateMachineRequestObjects{
+ Machine: *currentMachine,
+ InfrastructureMachine: mustConvertToRawExtension(currentInfraMachine),
+ BootstrapConfig: mustConvertToRawExtension(currentKubeadmConfig),
+ },
+ },
+ resp: &runtimehooksv1.CanUpdateMachineResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{Status: runtimehooksv1.ResponseStatusSuccess},
+ MachinePatch: jsonMergePatchToUpdateMachine,
+ InfrastructureMachinePatch: jsonMergePatchToUpdateInfraMachine,
+ BootstrapConfigPatch: jsonMergePatchToUpdateKubeadmConfig,
+ },
+ wantReq: &runtimehooksv1.CanUpdateMachineRequest{
+ Current: runtimehooksv1.CanUpdateMachineRequestObjects{
+ Machine: *patchedMachine,
+ InfrastructureMachine: mustConvertToRawExtension(patchedInfraMachine),
+ BootstrapConfig: mustConvertToRawExtension(patchedKubeadmConfig),
+ },
+ },
+ },
+ {
+ name: "No changes with status patches",
+ req: &runtimehooksv1.CanUpdateMachineRequest{
+ Current: runtimehooksv1.CanUpdateMachineRequestObjects{
+ Machine: *currentMachine,
+ InfrastructureMachine: mustConvertToRawExtension(currentInfraMachine),
+ BootstrapConfig: mustConvertToRawExtension(currentKubeadmConfig),
+ },
+ },
+ resp: &runtimehooksv1.CanUpdateMachineResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{Status: runtimehooksv1.ResponseStatusSuccess},
+ MachinePatch: patchToUpdateMachineStatus,
+ InfrastructureMachinePatch: patchToUpdateInfraMachineStatus,
+ BootstrapConfigPatch: patchToUpdateKubeadmConfigStatus,
+ },
+ wantReq: &runtimehooksv1.CanUpdateMachineRequest{
+ Current: runtimehooksv1.CanUpdateMachineRequestObjects{
+ Machine: *currentMachine,
+ InfrastructureMachine: mustConvertToRawExtension(currentInfraMachine),
+ BootstrapConfig: mustConvertToRawExtension(currentKubeadmConfig),
+ },
+ },
+ },
+ {
+ name: "Error if PatchType is not set but Patch is",
+ req: &runtimehooksv1.CanUpdateMachineRequest{
+ Current: runtimehooksv1.CanUpdateMachineRequestObjects{
+ Machine: *currentMachine,
+ InfrastructureMachine: mustConvertToRawExtension(currentInfraMachine),
+ BootstrapConfig: mustConvertToRawExtension(currentKubeadmConfig),
+ },
+ },
+ resp: &runtimehooksv1.CanUpdateMachineResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{Status: runtimehooksv1.ResponseStatusSuccess},
+ MachinePatch: runtimehooksv1.Patch{
+ // PatchType is missing
+ Patch: []byte(`[{"op":"add","path":"/status","value":{"observedGeneration": 10}}]`),
+ },
+ },
+ wantError: true,
+ wantErrorMessage: "failed to apply patch: patchType is not set",
+ },
+ {
+ name: "Error if PatchType is set to an unknown value",
+ req: &runtimehooksv1.CanUpdateMachineRequest{
+ Current: runtimehooksv1.CanUpdateMachineRequestObjects{
+ Machine: *currentMachine,
+ InfrastructureMachine: mustConvertToRawExtension(currentInfraMachine),
+ BootstrapConfig: mustConvertToRawExtension(currentKubeadmConfig),
+ },
+ },
+ resp: &runtimehooksv1.CanUpdateMachineResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{Status: runtimehooksv1.ResponseStatusSuccess},
+ MachinePatch: runtimehooksv1.Patch{
+ PatchType: "UnknownType",
+ Patch: []byte(`[{"op":"add","path":"/status","value":{"observedGeneration": 10}}]`),
+ },
+ },
+ wantError: true,
+ wantErrorMessage: "failed to apply patch: unknown patchType UnknownType",
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+
+ err := applyPatchesToRequest(ctx, tt.req, tt.resp)
+ if tt.wantError {
+ g.Expect(err).To(HaveOccurred())
+ g.Expect(err.Error()).To(Equal(tt.wantErrorMessage))
+ return
+ }
+ g.Expect(err).ToNot(HaveOccurred())
+
+ // Compare only the objects and avoid comparing runtime.RawExtension.Raw because
+ // Raw is slightly non-deterministic because it doesn't guarantee order of map keys.
+ g.Expect(tt.req.Current.Machine).To(BeComparableTo(tt.wantReq.Current.Machine))
+ g.Expect(tt.req.Current.InfrastructureMachine.Object).To(BeComparableTo(tt.wantReq.Current.InfrastructureMachine.Object))
+ g.Expect(tt.req.Current.BootstrapConfig.Object).To(BeComparableTo(tt.wantReq.Current.BootstrapConfig.Object))
+ })
+ }
+}
+
+func diff(a, b any) string {
+ _, d, err := compare.Diff(a, b)
+ if err != nil {
+ return fmt.Sprintf("error during diff: %v", err)
+ }
+ return d
+}
+
+func mustConvertToRawExtension(object runtime.Object) runtime.RawExtension {
+ raw, err := patch.ConvertToRawExtension(object)
+ if err != nil {
+ panic(err)
+ }
+ return raw
+}
diff --git a/controlplane/kubeadm/internal/controllers/inplace_test.go b/controlplane/kubeadm/internal/controllers/inplace_test.go
new file mode 100644
index 000000000000..64a69a99a90b
--- /dev/null
+++ b/controlplane/kubeadm/internal/controllers/inplace_test.go
@@ -0,0 +1,137 @@
+/*
+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"
+ "testing"
+
+ . "github.com/onsi/gomega"
+ "github.com/pkg/errors"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ ctrl "sigs.k8s.io/controller-runtime"
+
+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal"
+)
+
+func Test_tryInPlaceUpdate(t *testing.T) {
+ machineToInPlaceUpdate := &clusterv1.Machine{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machine-to-in-place-update",
+ },
+ }
+
+ tests := []struct {
+ name string
+ preflightChecksFunc func(ctx context.Context, controlPlane *internal.ControlPlane, excludeFor ...*clusterv1.Machine) ctrl.Result
+ canUpdateMachineFunc func(ctx context.Context, machine *clusterv1.Machine, machineUpToDateResult internal.UpToDateResult) (bool, error)
+ wantCanUpdateMachineCalled bool
+ wantTriggerInPlaceUpdateCalled bool
+ wantFallbackToScaleDown bool
+ wantError bool
+ wantErrorMessage string
+ wantRes ctrl.Result
+ }{
+ {
+ name: "Requeue if preflight checks for all Machines failed",
+ preflightChecksFunc: func(_ context.Context, _ *internal.ControlPlane, _ ...*clusterv1.Machine) ctrl.Result {
+ return ctrl.Result{RequeueAfter: preflightFailedRequeueAfter}
+ },
+ wantRes: ctrl.Result{RequeueAfter: preflightFailedRequeueAfter},
+ },
+ {
+ name: "Fallback to scale down if checks for all Machines failed, but checks succeed when excluding machineToInPlaceUpdate",
+ preflightChecksFunc: func(_ context.Context, _ *internal.ControlPlane, excludeFor ...*clusterv1.Machine) ctrl.Result {
+ if len(excludeFor) == 1 && excludeFor[0] == machineToInPlaceUpdate {
+ return ctrl.Result{} // If machineToInPlaceUpdate is excluded preflight checks succeed => scale down
+ }
+ return ctrl.Result{RequeueAfter: preflightFailedRequeueAfter}
+ },
+ wantFallbackToScaleDown: true,
+ },
+ {
+ name: "Return error if canUpdateMachine returns an error",
+ preflightChecksFunc: func(_ context.Context, _ *internal.ControlPlane, _ ...*clusterv1.Machine) ctrl.Result {
+ return ctrl.Result{}
+ },
+ canUpdateMachineFunc: func(_ context.Context, _ *clusterv1.Machine, _ internal.UpToDateResult) (bool, error) {
+ return false, errors.New("canUpdateMachine error")
+ },
+ wantCanUpdateMachineCalled: true,
+ wantError: true,
+ wantErrorMessage: "failed to determine if Machine machine-to-in-place-update can be updated in-place: canUpdateMachine error",
+ },
+ {
+ name: "Fallback to scale down if canUpdateMachine returns false",
+ preflightChecksFunc: func(_ context.Context, _ *internal.ControlPlane, _ ...*clusterv1.Machine) ctrl.Result {
+ return ctrl.Result{}
+ },
+ canUpdateMachineFunc: func(_ context.Context, _ *clusterv1.Machine, _ internal.UpToDateResult) (bool, error) {
+ return false, nil
+ },
+ wantCanUpdateMachineCalled: true,
+ wantFallbackToScaleDown: true,
+ },
+ {
+ name: "Trigger in-place update if canUpdateMachine returns true",
+ preflightChecksFunc: func(_ context.Context, _ *internal.ControlPlane, _ ...*clusterv1.Machine) ctrl.Result {
+ return ctrl.Result{}
+ },
+ canUpdateMachineFunc: func(_ context.Context, _ *clusterv1.Machine, _ internal.UpToDateResult) (bool, error) {
+ return true, nil
+ },
+ wantCanUpdateMachineCalled: true,
+ wantTriggerInPlaceUpdateCalled: true,
+ wantFallbackToScaleDown: false,
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+
+ var canUpdateMachineCalled bool
+ var triggerInPlaceUpdateCalled bool
+ r := &KubeadmControlPlaneReconciler{
+ overridePreflightChecksFunc: func(ctx context.Context, controlPlane *internal.ControlPlane, excludeFor ...*clusterv1.Machine) ctrl.Result {
+ return tt.preflightChecksFunc(ctx, controlPlane, excludeFor...)
+ },
+ overrideCanUpdateMachineFunc: func(ctx context.Context, machine *clusterv1.Machine, machineUpToDateResult internal.UpToDateResult) (bool, error) {
+ canUpdateMachineCalled = true
+ return tt.canUpdateMachineFunc(ctx, machine, machineUpToDateResult)
+ },
+ overrideTriggerInPlaceUpdate: func(_ context.Context, _ *clusterv1.Machine, _ internal.UpToDateResult) error {
+ triggerInPlaceUpdateCalled = true
+ return nil
+ },
+ }
+
+ fallbackToScaleDown, res, err := r.tryInPlaceUpdate(ctx, nil, machineToInPlaceUpdate, internal.UpToDateResult{})
+ if tt.wantError {
+ g.Expect(err).To(HaveOccurred())
+ g.Expect(err.Error()).To(Equal(tt.wantErrorMessage))
+ } else {
+ g.Expect(err).ToNot(HaveOccurred())
+ }
+ g.Expect(res).To(Equal(tt.wantRes))
+ g.Expect(fallbackToScaleDown).To(Equal(tt.wantFallbackToScaleDown))
+
+ g.Expect(canUpdateMachineCalled).To(Equal(tt.wantCanUpdateMachineCalled), "canUpdateMachineCalled: actual: %t expected: %t", canUpdateMachineCalled, tt.wantCanUpdateMachineCalled)
+ g.Expect(triggerInPlaceUpdateCalled).To(Equal(tt.wantTriggerInPlaceUpdateCalled), "triggerInPlaceUpdateCalled: actual: %t expected: %t", triggerInPlaceUpdateCalled, tt.wantTriggerInPlaceUpdateCalled)
+ })
+ }
+}
diff --git a/controlplane/kubeadm/internal/controllers/inplace_trigger.go b/controlplane/kubeadm/internal/controllers/inplace_trigger.go
new file mode 100644
index 000000000000..580c1b97ba8f
--- /dev/null
+++ b/controlplane/kubeadm/internal/controllers/inplace_trigger.go
@@ -0,0 +1,170 @@
+/*
+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"
+
+ "github.com/pkg/errors"
+ corev1 "k8s.io/api/core/v1"
+ "k8s.io/klog/v2"
+ ctrl "sigs.k8s.io/controller-runtime"
+ "sigs.k8s.io/controller-runtime/pkg/client"
+
+ bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1"
+ "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal"
+ "sigs.k8s.io/cluster-api/internal/hooks"
+ clientutil "sigs.k8s.io/cluster-api/internal/util/client"
+ "sigs.k8s.io/cluster-api/internal/util/ssa"
+)
+
+func (r *KubeadmControlPlaneReconciler) triggerInPlaceUpdate(ctx context.Context, machine *clusterv1.Machine, machineUpToDateResult internal.UpToDateResult) error {
+ if r.overrideTriggerInPlaceUpdate != nil {
+ return r.overrideTriggerInPlaceUpdate(ctx, machine, machineUpToDateResult)
+ }
+
+ log := ctrl.LoggerFrom(ctx).WithValues("Machine", klog.KObj(machine))
+ log.Info(fmt.Sprintf("Triggering in-place update for Machine %s", machine.Name))
+
+ // Mark Machine for in-place update.
+ // Note: Once we write UpdateInProgressAnnotation we will always continue with the in-place update.
+ // Note: Intentionally using client.Patch instead of SSA. Otherwise we would have to ensure we preserve
+ // UpdateInProgressAnnotation on existing Machines in KCP and that would lead to race conditions when
+ // the Machine controller tries to remove the annotation and then KCP adds it back.
+ if _, ok := machine.Annotations[clusterv1.UpdateInProgressAnnotation]; !ok {
+ orig := machine.DeepCopy()
+ if machine.Annotations == nil {
+ machine.Annotations = map[string]string{}
+ }
+ machine.Annotations[clusterv1.UpdateInProgressAnnotation] = ""
+ if err := r.Client.Patch(ctx, machine, client.MergeFrom(orig)); err != nil {
+ return errors.Wrapf(err, "failed to trigger in-place update for Machine %s by setting the %s annotation", klog.KObj(machine), clusterv1.UpdateInProgressAnnotation)
+ }
+
+ // Wait until the cache observed the Machine with UpdateInProgressAnnotation to ensure subsequent reconciles
+ // will observe it as well and accordingly don't trigger another in-place update concurrently.
+ if err := clientutil.WaitForCacheToBeUpToDate(ctx, r.Client, fmt.Sprintf("setting the %s annotation", clusterv1.UpdateInProgressAnnotation), machine); err != nil {
+ return err
+ }
+ }
+
+ // TODO: If this func fails below we are going to reconcile again and call triggerInPlaceUpdate again. If KCP
+ // spec changed in the meantime desired objects might change and then we would use different desired objects
+ // for UpdateMachine compared to what we used in CanUpdateMachine.
+ // If we want to account for that we could consider writing desired InfraMachine/KubeadmConfig/Machine with
+ // the in-progress annotation on the Machine and use it if necessary (and clean it up when we set the pending
+ // annotation). This might lead to issues with the maximum object size supported by etcd though (so we might
+ // have to write the objects somewhere else).
+
+ desiredMachine := machineUpToDateResult.DesiredMachine
+ desiredInfraMachine := machineUpToDateResult.DesiredInfraMachine
+ desiredKubeadmConfig := machineUpToDateResult.DesiredKubeadmConfig
+
+ // Machine cannot be updated in-place if the UpToDate func was not able to provide all objects,
+ // e.g. if the InfraMachine or KubeadmConfig was deleted.
+ // Note: As canUpdateMachine also checks these fields for nil this can only happen if the initial
+ // triggerInPlaceUpdate call failed after setting UpdateInProgressAnnotation.
+ if desiredInfraMachine == nil {
+ return errors.Errorf("failed to complete triggering in-place update for Machine %s, could not compute desired InfraMachine", klog.KObj(machine))
+ }
+ if desiredKubeadmConfig == nil {
+ return errors.Errorf("failed to complete triggering in-place update for Machine %s, could not compute desired KubeadmConfig", klog.KObj(machine))
+ }
+
+ // Write InfraMachine without the labels & annotations that are written continuously by updateLabelsAndAnnotations.
+ // Note: Let's update InfraMachine first because that is the call that is most likely to fail.
+ desiredInfraMachine.SetLabels(nil)
+ desiredInfraMachine.SetAnnotations(map[string]string{
+ // ClonedFrom annotations are initially written by createInfraMachine and then managedField ownership is
+ // removed via ssa.RemoveManagedFieldsForLabelsAndAnnotations.
+ // updateLabelsAndAnnotations is intentionally not updating them as they should be only updated as part
+ // of an in-place update here, e.g. for the case where the InfraMachineTemplate was rotated.
+ clusterv1.TemplateClonedFromNameAnnotation: desiredInfraMachine.GetAnnotations()[clusterv1.TemplateClonedFromNameAnnotation],
+ clusterv1.TemplateClonedFromGroupKindAnnotation: desiredInfraMachine.GetAnnotations()[clusterv1.TemplateClonedFromGroupKindAnnotation],
+ // Machine controller waits for this annotation to exist on Machine and related objects before starting the in-place update.
+ clusterv1.UpdateInProgressAnnotation: "",
+ })
+ if err := ssa.Patch(ctx, r.Client, kcpManagerName, desiredInfraMachine); err != nil {
+ return errors.Wrapf(err, "failed to complete triggering in-place update for Machine %s", klog.KObj(machine))
+ }
+
+ // Write KubeadmConfig without the labels & annotations that are written continuously by updateLabelsAndAnnotations.
+ desiredKubeadmConfig.Labels = nil
+ desiredKubeadmConfig.Annotations = map[string]string{
+ // Machine controller waits for this annotation to exist on Machine and related objects before starting the in-place update.
+ clusterv1.UpdateInProgressAnnotation: "",
+ }
+ if err := ssa.Patch(ctx, r.Client, kcpManagerName, desiredKubeadmConfig); err != nil {
+ return errors.Wrapf(err, "failed to complete triggering in-place update for Machine %s", klog.KObj(machine))
+ }
+ if desiredKubeadmConfig.Spec.InitConfiguration.IsDefined() {
+ if err := r.removeInitConfiguration(ctx, desiredKubeadmConfig); err != nil {
+ return errors.Wrapf(err, "failed to complete triggering in-place update for Machine %s", klog.KObj(machine))
+ }
+ }
+
+ // Write Machine.
+ if err := ssa.Patch(ctx, r.Client, kcpManagerName, desiredMachine); err != nil {
+ return errors.Wrapf(err, "failed to complete triggering in-place update for Machine %s", klog.KObj(machine))
+ }
+
+ // Note: Once we write PendingHooksAnnotation the Machine controller will start with the in-place update.
+ // Note: Intentionally using client.Patch (via hooks.MarkAsPending + patchHelper) instead of SSA. Otherwise we would
+ // have to ensure we preserve PendingHooksAnnotation on existing Machines in KCP and that would lead to race
+ // conditions when the Machine controller tries to remove the annotation and KCP adds it back.
+ // Note: This call will update the resourceVersion on desiredMachine, so that WaitForCacheToBeUpToDate also considers this change.
+ if err := hooks.MarkAsPending(ctx, r.Client, desiredMachine, true, runtimehooksv1.UpdateMachine); err != nil {
+ return errors.Wrapf(err, "failed to complete triggering in-place update for Machine %s", klog.KObj(machine))
+ }
+
+ log.Info(fmt.Sprintf("Completed triggering in-place update for Machine %s", machine.Name))
+ r.recorder.Event(machine, corev1.EventTypeNormal, "SuccessfulStartInPlaceUpdate", "Machine starting in-place update")
+
+ // Wait until the cache observed the Machine with PendingHooksAnnotation to ensure subsequent reconciles
+ // will observe it as well and won't repeatedly call triggerInPlaceUpdate.
+ return clientutil.WaitForCacheToBeUpToDate(ctx, r.Client, "marking the UpdateMachine hook as pending", desiredMachine)
+}
+
+func (r *KubeadmControlPlaneReconciler) removeInitConfiguration(ctx context.Context, desiredKubeadmConfig *bootstrapv1.KubeadmConfig) error {
+ // Remove initConfiguration with Patch if necessary.
+ // This is only necessary if ssa.Patch above cannot remove the initConfiguration field because
+ // capi-kubeadmcontrolplane does not own it.
+ // Note: desiredKubeadmConfig here will always contain a joinConfiguration instead of an initConfiguration.
+ //
+ // This happens only on KubeadmConfigs (for kubeadm init) created with CAPI <= v1.11, because the initConfiguration
+ // field is not owned by anyone there (i.e. orphaned) after we called ssa.MigrateManagedFields in syncMachines.
+ //
+ // In KubeadmConfigs created with CAPI >= v1.12 capi-kubeadmcontrolplane owns the initConfiguration field
+ // and accordingly the ssa.Patch above is able to remove it.
+ //
+ // There are two ways this can be resolved:
+ // - Machine goes through an in-place rollout and this code removes the initConfiguration.
+ // - Machine is rolled out (re-created) which will use the new managedField structure.
+ //
+ // As CAPI v1.11 supported up to Kubernetes v1.34. We assume the Machine has to be either rolled out
+ // or in-place updated before CAPI drops support for Kubernetes v1.34. So this code can be removed
+ // once CAPI doesn't support Kubernetes v1.34 anymore.
+ origKubeadmConfig := desiredKubeadmConfig.DeepCopy()
+ desiredKubeadmConfig.Spec.InitConfiguration = bootstrapv1.InitConfiguration{}
+ if err := r.Client.Patch(ctx, desiredKubeadmConfig, client.MergeFrom(origKubeadmConfig)); err != nil {
+ return errors.Wrap(err, "failed to patch KubeadmConfig: failed to remove initConfiguration")
+ }
+ return nil
+}
diff --git a/controlplane/kubeadm/internal/controllers/inplace_trigger_test.go b/controlplane/kubeadm/internal/controllers/inplace_trigger_test.go
new file mode 100644
index 000000000000..b6e0da22522c
--- /dev/null
+++ b/controlplane/kubeadm/internal/controllers/inplace_trigger_test.go
@@ -0,0 +1,323 @@
+/*
+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/onsi/gomega"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+ "k8s.io/client-go/tools/record"
+ "k8s.io/utils/ptr"
+ "sigs.k8s.io/controller-runtime/pkg/client"
+
+ bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2"
+ "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal"
+ "sigs.k8s.io/cluster-api/internal/util/ssa"
+ "sigs.k8s.io/cluster-api/util/test/builder"
+)
+
+func Test_triggerInPlaceUpdate(t *testing.T) {
+ g := NewWithT(t)
+
+ ns, err := env.CreateNamespace(ctx, "in-place-trigger")
+ g.Expect(err).ToNot(HaveOccurred())
+
+ currentMachine := &clusterv1.Machine{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machine-to-in-place-update",
+ Namespace: ns.Name,
+ Labels: map[string]string{
+ clusterv1.ClusterNameLabel: "cluster-1",
+ "label-1": "label-value-1",
+ },
+ Annotations: map[string]string{
+ "annotation-1": "annotation-value-1",
+ },
+ },
+ Spec: clusterv1.MachineSpec{
+ ClusterName: "cluster-1",
+ Bootstrap: clusterv1.Bootstrap{
+ ConfigRef: clusterv1.ContractVersionedObjectReference{
+ APIGroup: bootstrapv1.GroupVersion.Group,
+ Kind: "KubeadmConfig",
+ Name: "machine-to-in-place-update",
+ },
+ },
+ InfrastructureRef: clusterv1.ContractVersionedObjectReference{
+ APIGroup: builder.InfrastructureGroupVersion.Group,
+ Kind: builder.TestInfrastructureMachineKind,
+ Name: "machine-to-in-place-update",
+ },
+ Deletion: clusterv1.MachineDeletionSpec{
+ NodeDeletionTimeoutSeconds: ptr.To[int32](10),
+ },
+ Version: "v1.30.0",
+ },
+ Status: clusterv1.MachineStatus{
+ NodeRef: clusterv1.MachineNodeReference{
+ Name: "machine-to-in-place-update",
+ },
+ },
+ }
+ desiredMachine := currentMachine.DeepCopy()
+ desiredMachine.Spec.Version = "v1.31.0"
+
+ currentKubeadmConfig := &bootstrapv1.KubeadmConfig{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machine-to-in-place-update",
+ Namespace: ns.Name,
+ Labels: map[string]string{
+ clusterv1.ClusterNameLabel: "cluster-1",
+ "label-1": "label-value-1",
+ },
+ Annotations: map[string]string{
+ "annotation-1": "annotation-value-1",
+ },
+ },
+ Spec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ Etcd: bootstrapv1.Etcd{
+ Local: bootstrapv1.LocalEtcd{
+ ImageTag: "3.5.0-0",
+ },
+ },
+ },
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ KubeletExtraArgs: []bootstrapv1.Arg{{
+ Name: "v",
+ Value: ptr.To("8"),
+ }},
+ },
+ },
+ },
+ Status: bootstrapv1.KubeadmConfigStatus{
+ ObservedGeneration: 5,
+ },
+ }
+ currentKubeadmConfigWithInitConfiguration := currentKubeadmConfig.DeepCopy()
+ currentKubeadmConfigWithInitConfiguration.Spec.InitConfiguration.NodeRegistration = currentKubeadmConfigWithInitConfiguration.Spec.JoinConfiguration.NodeRegistration
+ currentKubeadmConfigWithInitConfiguration.Spec.JoinConfiguration = bootstrapv1.JoinConfiguration{}
+ desiredKubeadmConfig := currentKubeadmConfig.DeepCopy()
+ desiredKubeadmConfig.Spec.ClusterConfiguration.Etcd.Local.ImageTag = "3.6.4-0"
+
+ currentInfraMachine := &unstructured.Unstructured{
+ Object: map[string]interface{}{
+ "apiVersion": builder.InfrastructureGroupVersion.String(),
+ "kind": builder.TestInfrastructureMachineKind,
+ "metadata": map[string]interface{}{
+ "name": "machine-to-in-place-update",
+ "namespace": ns.Name,
+ "labels": map[string]interface{}{
+ clusterv1.ClusterNameLabel: "cluster-1",
+ "label-1": "label-value-1",
+ },
+ "annotations": map[string]interface{}{
+ "annotation-1": "annotation-value-1",
+ clusterv1.TemplateClonedFromNameAnnotation: "infra-machine-template-1",
+ clusterv1.TemplateClonedFromGroupKindAnnotation: "TestInfrastructureMachineTemplate.infrastructure.cluster.x-k8s.io",
+ },
+ },
+ "spec": map[string]interface{}{
+ "foo": "hello world",
+ },
+ "status": map[string]interface{}{
+ "foo": "hello world",
+ },
+ },
+ }
+ desiredInfraMachine := currentInfraMachine.DeepCopy()
+ g.Expect(unstructured.SetNestedField(desiredInfraMachine.Object, "hello in-place updated world", "spec", "foo")).To(Succeed())
+ desiredInfraMachine.SetAnnotations(map[string]string{
+ clusterv1.TemplateClonedFromNameAnnotation: "infra-machine-template-2",
+ clusterv1.TemplateClonedFromGroupKindAnnotation: "TestInfrastructureMachineTemplate2.infrastructure.cluster.x-k8s.io",
+ })
+
+ tests := []struct {
+ name string
+ currentMachine *clusterv1.Machine
+ createMachineWithUpdateInProgressAnnotation bool
+ currentInfraMachine *unstructured.Unstructured
+ currentKubeadmConfig *bootstrapv1.KubeadmConfig
+ createKubeadmConfigLikeWithCAPI1_11 bool
+ desiredMachine *clusterv1.Machine
+ desiredInfraMachine *unstructured.Unstructured
+ desiredKubeadmConfig *bootstrapv1.KubeadmConfig
+ wantError bool
+ wantErrorMessage string
+ }{
+ {
+ name: "Return error if desiredInfraMachine is nil",
+ currentMachine: currentMachine,
+ currentInfraMachine: currentInfraMachine,
+ currentKubeadmConfig: currentKubeadmConfig,
+ desiredMachine: desiredMachine,
+ desiredInfraMachine: nil,
+ desiredKubeadmConfig: desiredKubeadmConfig,
+ wantError: true,
+ wantErrorMessage: fmt.Sprintf("failed to complete triggering in-place update for Machine %s/machine-to-in-place-update, could not compute desired InfraMachine", ns.Name),
+ },
+ {
+ name: "Return error if desiredKubeadmConfig is nil",
+ currentMachine: currentMachine,
+ currentInfraMachine: currentInfraMachine,
+ currentKubeadmConfig: currentKubeadmConfig,
+ desiredMachine: desiredMachine,
+ desiredInfraMachine: desiredInfraMachine,
+ desiredKubeadmConfig: nil,
+ wantError: true,
+ wantErrorMessage: fmt.Sprintf("failed to complete triggering in-place update for Machine %s/machine-to-in-place-update, could not compute desired KubeadmConfig", ns.Name),
+ },
+ {
+ name: "Trigger in-place update",
+ currentMachine: currentMachine,
+ currentInfraMachine: currentInfraMachine,
+ currentKubeadmConfig: currentKubeadmConfig,
+ desiredMachine: desiredMachine,
+ desiredInfraMachine: desiredInfraMachine,
+ desiredKubeadmConfig: desiredKubeadmConfig,
+ },
+ {
+ name: "Trigger in-place update (Machine already has UpdateInProgressAnnotation)",
+ currentMachine: currentMachine,
+ createMachineWithUpdateInProgressAnnotation: true,
+ currentInfraMachine: currentInfraMachine,
+ currentKubeadmConfig: currentKubeadmConfig,
+ desiredMachine: desiredMachine,
+ desiredInfraMachine: desiredInfraMachine,
+ desiredKubeadmConfig: desiredKubeadmConfig,
+ },
+ {
+ name: "Trigger in-place update: KubeadmConfig v1.11 => remove initConfiguration",
+ currentMachine: currentMachine,
+ currentInfraMachine: currentInfraMachine,
+ currentKubeadmConfig: currentKubeadmConfigWithInitConfiguration,
+ createKubeadmConfigLikeWithCAPI1_11: true,
+ desiredMachine: desiredMachine,
+ desiredInfraMachine: desiredInfraMachine,
+ desiredKubeadmConfig: desiredKubeadmConfig,
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ ctx := t.Context()
+ g := NewWithT(t)
+
+ // Create Machine (same as in createMachine)
+ currentMachineForPatch := tt.currentMachine.DeepCopy()
+ g.Expect(ssa.Patch(ctx, env.Client, kcpManagerName, currentMachineForPatch)).To(Succeed())
+ t.Cleanup(func() {
+ g.Expect(env.CleanupAndWait(context.Background(), tt.currentMachine)).To(Succeed())
+ })
+ if tt.createMachineWithUpdateInProgressAnnotation {
+ orig := currentMachineForPatch.DeepCopy()
+ currentMachineForPatch.Annotations[clusterv1.UpdateInProgressAnnotation] = ""
+ g.Expect(env.Client.Patch(ctx, currentMachineForPatch, client.MergeFrom(orig), client.FieldOwner("manager"))).To(Succeed())
+ }
+
+ // Create InfraMachine (same as in createInfraMachine)
+ currentInfraMachineForPatch := tt.currentInfraMachine.DeepCopy()
+ g.Expect(ssa.Patch(ctx, env.Client, kcpManagerName, currentInfraMachineForPatch)).To(Succeed())
+ g.Expect(ssa.RemoveManagedFieldsForLabelsAndAnnotations(ctx, env.Client, env.GetAPIReader(), currentInfraMachineForPatch, kcpManagerName)).To(Succeed())
+ t.Cleanup(func() {
+ g.Expect(env.CleanupAndWait(context.Background(), tt.currentInfraMachine)).To(Succeed())
+ })
+
+ // Create KubeadmConfig (same as in createKubeadmConfig)
+ currentKubeadmConfigForPatch := tt.currentKubeadmConfig.DeepCopy()
+ if tt.createKubeadmConfigLikeWithCAPI1_11 {
+ // Note: Create the object like it was created it in CAPI <= v1.11 (with manager).
+ g.Expect(env.Client.Create(ctx, currentKubeadmConfigForPatch, client.FieldOwner("manager"))).To(Succeed())
+ // Note: Update labels and annotations like in CAPI <= v1.11 (with the "capi-kubeadmcontrolplane" fieldManager).
+ updatedObject := &unstructured.Unstructured{}
+ updatedObject.SetGroupVersionKind(bootstrapv1.GroupVersion.WithKind("KubeadmConfig"))
+ updatedObject.SetNamespace(currentKubeadmConfigForPatch.GetNamespace())
+ updatedObject.SetName(currentKubeadmConfigForPatch.GetName())
+ updatedObject.SetUID(currentKubeadmConfigForPatch.GetUID())
+ updatedObject.SetLabels(currentMachineForPatch.GetLabels())
+ updatedObject.SetAnnotations(currentMachineForPatch.GetAnnotations())
+ g.Expect(ssa.Patch(ctx, env.Client, kcpManagerName, updatedObject)).To(Succeed())
+ // Now migrate the managedFields like CAPI >= v1.12 does.
+ g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(currentKubeadmConfigForPatch), currentKubeadmConfigForPatch)).Should(Succeed())
+ g.Expect(ssa.MigrateManagedFields(ctx, env.Client, currentKubeadmConfigForPatch, kcpManagerName, kcpMetadataManagerName)).To(Succeed())
+ // Note: At this point spec is not owned by anyone (orphaned). This requires the code path to remove initConfiguration for CAPI v1.11 objects.
+ } else {
+ g.Expect(ssa.Patch(ctx, env.Client, kcpManagerName, currentKubeadmConfigForPatch)).To(Succeed())
+ g.Expect(ssa.RemoveManagedFieldsForLabelsAndAnnotations(ctx, env.Client, env.GetAPIReader(), currentKubeadmConfigForPatch, kcpManagerName)).To(Succeed())
+ }
+ t.Cleanup(func() {
+ g.Expect(env.CleanupAndWait(context.Background(), tt.currentKubeadmConfig)).To(Succeed())
+ })
+
+ upToDateResult := internal.UpToDateResult{
+ CurrentInfraMachine: currentInfraMachineForPatch,
+ CurrentKubeadmConfig: currentKubeadmConfigForPatch,
+ DesiredMachine: tt.desiredMachine.DeepCopy(),
+ DesiredInfraMachine: tt.desiredInfraMachine.DeepCopy(),
+ DesiredKubeadmConfig: tt.desiredKubeadmConfig.DeepCopy(),
+ }
+
+ r := KubeadmControlPlaneReconciler{
+ Client: env.Client,
+ recorder: record.NewFakeRecorder(32),
+ }
+
+ err := r.triggerInPlaceUpdate(ctx, currentMachineForPatch, upToDateResult)
+ if tt.wantError {
+ g.Expect(err).To(HaveOccurred())
+ g.Expect(err.Error()).To(Equal(tt.wantErrorMessage))
+ return
+ }
+ g.Expect(err).ToNot(HaveOccurred())
+
+ gotMachine := &clusterv1.Machine{}
+ g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(tt.desiredMachine), gotMachine)).To(Succeed())
+ g.Expect(gotMachine.Annotations).To(Equal(map[string]string{
+ "annotation-1": "annotation-value-1",
+ clusterv1.UpdateInProgressAnnotation: "",
+ runtimev1.PendingHooksAnnotation: "UpdateMachine",
+ }))
+ g.Expect(gotMachine.Spec).To(BeComparableTo(tt.desiredMachine.Spec))
+
+ gotInfraMachine := &unstructured.Unstructured{}
+ gotInfraMachine.SetGroupVersionKind(tt.desiredInfraMachine.GroupVersionKind())
+ g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(tt.desiredInfraMachine), gotInfraMachine)).To(Succeed())
+ g.Expect(gotInfraMachine.GetAnnotations()).To(Equal(map[string]string{
+ "annotation-1": "annotation-value-1",
+ clusterv1.TemplateClonedFromNameAnnotation: "infra-machine-template-2",
+ clusterv1.TemplateClonedFromGroupKindAnnotation: "TestInfrastructureMachineTemplate2.infrastructure.cluster.x-k8s.io",
+ clusterv1.UpdateInProgressAnnotation: "",
+ }))
+ g.Expect(gotInfraMachine.Object["spec"]).To(BeComparableTo(tt.desiredInfraMachine.Object["spec"]))
+
+ gotKubeadmConfig := &bootstrapv1.KubeadmConfig{}
+ g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(tt.desiredKubeadmConfig), gotKubeadmConfig)).To(Succeed())
+ g.Expect(gotKubeadmConfig.Annotations).To(Equal(map[string]string{
+ "annotation-1": "annotation-value-1",
+ clusterv1.UpdateInProgressAnnotation: "",
+ }))
+ g.Expect(gotKubeadmConfig.Spec).To(BeComparableTo(tt.desiredKubeadmConfig.Spec))
+ })
+ }
+}
diff --git a/controlplane/kubeadm/internal/controllers/scale.go b/controlplane/kubeadm/internal/controllers/scale.go
index b58b1f1a5ffb..e9301b199527 100644
--- a/controlplane/kubeadm/internal/controllers/scale.go
+++ b/controlplane/kubeadm/internal/controllers/scale.go
@@ -20,8 +20,8 @@ import (
"context"
"fmt"
"strings"
+ "time"
- "github.com/blang/semver/v4"
"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
@@ -39,30 +39,22 @@ import (
)
func (r *KubeadmControlPlaneReconciler) initializeControlPlane(ctx context.Context, controlPlane *internal.ControlPlane) (ctrl.Result, error) {
- logger := ctrl.LoggerFrom(ctx)
-
- bootstrapSpec := controlPlane.InitialControlPlaneConfig()
-
- parsedVersion, err := semver.ParseTolerant(controlPlane.KCP.Spec.Version)
- if err != nil {
- return ctrl.Result{}, errors.Wrapf(err, "failed to parse kubernetes version %q", controlPlane.KCP.Spec.Version)
- }
- internal.DefaultFeatureGates(bootstrapSpec, parsedVersion)
+ log := ctrl.LoggerFrom(ctx)
fd, err := controlPlane.NextFailureDomainForScaleUp(ctx)
if err != nil {
return ctrl.Result{}, err
}
- newMachine, err := r.cloneConfigsAndGenerateMachine(ctx, controlPlane.Cluster, controlPlane.KCP, bootstrapSpec, fd)
+ newMachine, err := r.cloneConfigsAndGenerateMachine(ctx, controlPlane.Cluster, controlPlane.KCP, false, fd)
if err != nil {
- logger.Error(err, "Failed to create initial control plane Machine")
+ log.Error(err, "Failed to create initial control plane Machine")
r.recorder.Eventf(controlPlane.KCP, corev1.EventTypeWarning, "FailedInitialization", "Failed to create initial control plane Machine for cluster %s control plane: %v", klog.KObj(controlPlane.Cluster), err)
return ctrl.Result{}, err
}
- logger.WithValues(controlPlane.StatusToLogKeyAndValues(newMachine, nil)...).
- Info("Machine created (scale up)",
+ log.WithValues(controlPlane.StatusToLogKeyAndValues(newMachine, nil)...).
+ Info(fmt.Sprintf("Machine %s created (init)", newMachine.Name),
"Machine", klog.KObj(newMachine),
newMachine.Spec.InfrastructureRef.Kind, klog.KRef(newMachine.Namespace, newMachine.Spec.InfrastructureRef.Name),
newMachine.Spec.Bootstrap.ConfigRef.Kind, klog.KRef(newMachine.Namespace, newMachine.Spec.Bootstrap.ConfigRef.Name))
@@ -72,36 +64,31 @@ func (r *KubeadmControlPlaneReconciler) initializeControlPlane(ctx context.Conte
}
func (r *KubeadmControlPlaneReconciler) scaleUpControlPlane(ctx context.Context, controlPlane *internal.ControlPlane) (ctrl.Result, error) {
- logger := ctrl.LoggerFrom(ctx)
-
- // Run preflight checks to ensure that the control plane is stable before proceeding with a scale up/scale down operation; if not, wait.
- if result, err := r.preflightChecks(ctx, controlPlane); err != nil || !result.IsZero() {
- return result, err
+ if r.overrideScaleUpControlPlaneFunc != nil {
+ return r.overrideScaleUpControlPlaneFunc(ctx, controlPlane)
}
- // Create the bootstrap configuration
- bootstrapSpec := controlPlane.JoinControlPlaneConfig()
+ log := ctrl.LoggerFrom(ctx)
- parsedVersion, err := semver.ParseTolerant(controlPlane.KCP.Spec.Version)
- if err != nil {
- return ctrl.Result{}, errors.Wrapf(err, "failed to parse kubernetes version %q", controlPlane.KCP.Spec.Version)
+ // Run preflight checks to ensure that the control plane is stable before proceeding with a scale up/scale down operation; if not, wait.
+ if result := r.preflightChecks(ctx, controlPlane); !result.IsZero() {
+ return result, nil
}
- internal.DefaultFeatureGates(bootstrapSpec, parsedVersion)
fd, err := controlPlane.NextFailureDomainForScaleUp(ctx)
if err != nil {
return ctrl.Result{}, err
}
- newMachine, err := r.cloneConfigsAndGenerateMachine(ctx, controlPlane.Cluster, controlPlane.KCP, bootstrapSpec, fd)
+ newMachine, err := r.cloneConfigsAndGenerateMachine(ctx, controlPlane.Cluster, controlPlane.KCP, true, fd)
if err != nil {
- logger.Error(err, "Failed to create additional control plane Machine")
+ log.Error(err, "Failed to create additional control plane Machine")
r.recorder.Eventf(controlPlane.KCP, corev1.EventTypeWarning, "FailedScaleUp", "Failed to create additional control plane Machine for cluster % control plane: %v", klog.KObj(controlPlane.Cluster), err)
return ctrl.Result{}, err
}
- logger.WithValues(controlPlane.StatusToLogKeyAndValues(newMachine, nil)...).
- Info("Machine created (scale up)",
+ log.WithValues(controlPlane.StatusToLogKeyAndValues(newMachine, nil)...).
+ Info(fmt.Sprintf("Machine %s created (scale up)", newMachine.Name),
"Machine", klog.KObj(newMachine),
newMachine.Spec.InfrastructureRef.Kind, klog.KRef(newMachine.Namespace, newMachine.Spec.InfrastructureRef.Name),
newMachine.Spec.Bootstrap.ConfigRef.Kind, klog.KRef(newMachine.Namespace, newMachine.Spec.Bootstrap.ConfigRef.Name))
@@ -113,30 +100,28 @@ func (r *KubeadmControlPlaneReconciler) scaleUpControlPlane(ctx context.Context,
func (r *KubeadmControlPlaneReconciler) scaleDownControlPlane(
ctx context.Context,
controlPlane *internal.ControlPlane,
- outdatedMachines collections.Machines,
+ machineToDelete *clusterv1.Machine,
) (ctrl.Result, error) {
- logger := ctrl.LoggerFrom(ctx)
-
- // Pick the Machine that we should scale down.
- machineToDelete, err := selectMachineForScaleDown(ctx, controlPlane, outdatedMachines)
- if err != nil {
- return ctrl.Result{}, errors.Wrap(err, "failed to select machine for scale down")
+ if r.overrideScaleDownControlPlaneFunc != nil {
+ return r.overrideScaleDownControlPlaneFunc(ctx, controlPlane, machineToDelete)
}
+ log := ctrl.LoggerFrom(ctx)
+
// Run preflight checks ensuring the control plane is stable before proceeding with a scale up/scale down operation; if not, wait.
// Given that we're scaling down, we can exclude the machineToDelete from the preflight checks.
- if result, err := r.preflightChecks(ctx, controlPlane, machineToDelete); err != nil || !result.IsZero() {
- return result, err
+ if result := r.preflightChecks(ctx, controlPlane, machineToDelete); !result.IsZero() {
+ return result, nil
}
workloadCluster, err := controlPlane.GetWorkloadCluster(ctx)
if err != nil {
- logger.Error(err, "Failed to create client to workload cluster")
+ log.Error(err, "Failed to create client to workload cluster")
return ctrl.Result{}, errors.Wrapf(err, "failed to create client to workload cluster")
}
if machineToDelete == nil {
- logger.Info("Failed to pick control plane Machine to delete")
+ log.Info("Failed to pick control plane Machine to delete")
return ctrl.Result{}, errors.New("failed to pick control plane Machine to delete")
}
@@ -144,7 +129,7 @@ func (r *KubeadmControlPlaneReconciler) scaleDownControlPlane(
if controlPlane.IsEtcdManaged() {
etcdLeaderCandidate := controlPlane.Machines.Newest()
if err := workloadCluster.ForwardEtcdLeadership(ctx, machineToDelete, etcdLeaderCandidate); err != nil {
- logger.Error(err, "Failed to move leadership to candidate machine", "candidate", etcdLeaderCandidate.Name)
+ log.Error(err, "Failed to move leadership to candidate machine", "candidate", etcdLeaderCandidate.Name)
return ctrl.Result{}, err
}
@@ -152,15 +137,15 @@ func (r *KubeadmControlPlaneReconciler) scaleDownControlPlane(
}
if err := r.Client.Delete(ctx, machineToDelete); err != nil && !apierrors.IsNotFound(err) {
- logger.Error(err, "Failed to delete control plane machine")
+ log.Error(err, "Failed to delete control plane machine")
r.recorder.Eventf(controlPlane.KCP, corev1.EventTypeWarning, "FailedScaleDown",
"Failed to delete control plane Machine %s for cluster %s control plane: %v", machineToDelete.Name, klog.KObj(controlPlane.Cluster), err)
return ctrl.Result{}, err
}
// Note: We intentionally log after Delete because we want this log line to show up only after DeletionTimestamp has been set.
// Also, setting DeletionTimestamp doesn't mean the Machine is actually deleted (deletion takes some time).
- logger.WithValues(controlPlane.StatusToLogKeyAndValues(nil, machineToDelete)...).
- Info("Deleting Machine (scale down)", "Machine", klog.KObj(machineToDelete))
+ log.WithValues(controlPlane.StatusToLogKeyAndValues(nil, machineToDelete)...).
+ Info(fmt.Sprintf("Machine %s deleting (scale down)", machineToDelete.Name), "Machine", klog.KObj(machineToDelete))
// Requeue the control plane, in case there are additional operations to perform
return ctrl.Result{Requeue: true}, nil
@@ -174,29 +159,52 @@ func (r *KubeadmControlPlaneReconciler) scaleDownControlPlane(
// If the control plane is not passing preflight checks, it requeue.
//
// NOTE: this func uses KCP conditions, it is required to call reconcileControlPlaneAndMachinesConditions before this.
-func (r *KubeadmControlPlaneReconciler) preflightChecks(ctx context.Context, controlPlane *internal.ControlPlane, excludeFor ...*clusterv1.Machine) (ctrl.Result, error) { //nolint:unparam
- logger := ctrl.LoggerFrom(ctx)
+func (r *KubeadmControlPlaneReconciler) preflightChecks(ctx context.Context, controlPlane *internal.ControlPlane, excludeFor ...*clusterv1.Machine) ctrl.Result {
+ if r.overridePreflightChecksFunc != nil {
+ return r.overridePreflightChecksFunc(ctx, controlPlane, excludeFor...)
+ }
+
+ // Reset PreflightCheckResults in case this function is called multiple times (e.g. for in-place update code paths)
+ // Note: The PreflightCheckResults field is only written by this func, so this is safe.
+ controlPlane.PreflightCheckResults = internal.PreflightCheckResults{}
+
+ log := ctrl.LoggerFrom(ctx)
// If there is no KCP-owned control-plane machines, then control-plane has not been initialized yet,
// so it is considered ok to proceed.
if controlPlane.Machines.Len() == 0 {
- return ctrl.Result{}, nil
+ return ctrl.Result{}
}
if feature.Gates.Enabled(feature.ClusterTopology) {
// Block when we expect an upgrade to be propagated for topology clusters.
- if controlPlane.Cluster.Spec.Topology.IsDefined() && controlPlane.Cluster.Spec.Topology.Version != controlPlane.KCP.Spec.Version {
- logger.Info(fmt.Sprintf("Waiting for a version upgrade to %s to be propagated from Cluster.spec.topology", controlPlane.Cluster.Spec.Topology.Version))
+ // NOTE: in case the cluster is performing an upgrade, allow creation of machines for the intermediate step.
+ hasSameVersionOfCurrentUpgradeStep := false
+ if version, ok := controlPlane.Cluster.GetAnnotations()[clusterv1.ClusterTopologyUpgradeStepAnnotation]; ok {
+ hasSameVersionOfCurrentUpgradeStep = version == controlPlane.KCP.Spec.Version
+ }
+
+ if controlPlane.Cluster.Spec.Topology.IsDefined() && controlPlane.Cluster.Spec.Topology.Version != controlPlane.KCP.Spec.Version && !hasSameVersionOfCurrentUpgradeStep {
+ v := controlPlane.Cluster.Spec.Topology.Version
+ if version, ok := controlPlane.Cluster.GetAnnotations()[clusterv1.ClusterTopologyUpgradeStepAnnotation]; ok {
+ v = version
+ }
+ log.Info(fmt.Sprintf("Waiting for a version upgrade to %s to be propagated", v))
controlPlane.PreflightCheckResults.TopologyVersionMismatch = true
- return ctrl.Result{RequeueAfter: preflightFailedRequeueAfter}, nil
+ // Slow down reconcile frequency, as deferring a version upgrade waits for slow processes,
+ // e.g. workers are completing a previous upgrade step.
+ r.controller.DeferNextReconcileForObject(controlPlane.KCP, time.Now().Add(5*time.Second))
+ return ctrl.Result{RequeueAfter: preflightFailedRequeueAfter}
}
}
// If there are deleting machines, wait for the operation to complete.
if controlPlane.HasDeletingMachine() {
controlPlane.PreflightCheckResults.HasDeletingMachine = true
- logger.Info("Waiting for machines to be deleted", "machines", strings.Join(controlPlane.Machines.Filter(collections.HasDeletionTimestamp).Names(), ", "))
- return ctrl.Result{RequeueAfter: deleteRequeueAfter}, nil
+ log.Info("Waiting for machines to be deleted", "machines", strings.Join(controlPlane.Machines.Filter(collections.HasDeletionTimestamp).Names(), ", "))
+ // Slow down reconcile frequency, deletion is a slow process.
+ r.controller.DeferNextReconcileForObject(controlPlane.KCP, time.Now().Add(5*time.Second))
+ return ctrl.Result{RequeueAfter: deleteRequeueAfter}
}
// Check machine health conditions; if there are conditions with False or Unknown, then wait.
@@ -251,12 +259,15 @@ loopmachines:
aggregatedError := kerrors.NewAggregate(machineErrors)
r.recorder.Eventf(controlPlane.KCP, corev1.EventTypeWarning, "ControlPlaneUnhealthy",
"Waiting for control plane to pass preflight checks to continue reconciliation: %v", aggregatedError)
- logger.Info("Waiting for control plane to pass preflight checks", "failures", aggregatedError.Error())
-
- return ctrl.Result{RequeueAfter: preflightFailedRequeueAfter}, nil
+ log.Info("Waiting for control plane to pass preflight checks", "failures", aggregatedError.Error())
+ // Slow down reconcile frequency, it takes some time before control plane components stabilize
+ // after a new Machine is created. Similarly, if there are issues on running Machines, it
+ // usually takes some time to get back to normal state.
+ r.controller.DeferNextReconcileForObject(controlPlane.KCP, time.Now().Add(5*time.Second))
+ return ctrl.Result{RequeueAfter: preflightFailedRequeueAfter}
}
- return ctrl.Result{}, nil
+ return ctrl.Result{}
}
func preflightCheckCondition(kind string, obj *clusterv1.Machine, conditionType string) error {
@@ -273,7 +284,8 @@ func preflightCheckCondition(kind string, obj *clusterv1.Machine, conditionType
return nil
}
-// selectMachineForScaleDown select a machine candidate for scaling down. The selection is a two phase process:
+// selectMachineForInPlaceUpdateOrScaleDown select a machine candidate for scaling down or for in-place update.
+// The selection is a two phase process:
//
// In the first phase it selects a subset of machines eligible for deletion:
// - if there are outdated machines with the delete machine annotation, use them as eligible subset (priority to user requests, part 1)
@@ -284,18 +296,20 @@ func preflightCheckCondition(kind string, obj *clusterv1.Machine, conditionType
//
// Once the subset of machines eligible for deletion is identified, one machine is picked out of this subset by
// selecting the machine in the failure domain with most machines (including both eligible and not eligible machines).
-func selectMachineForScaleDown(ctx context.Context, controlPlane *internal.ControlPlane, outdatedMachines collections.Machines) (*clusterv1.Machine, error) {
+func selectMachineForInPlaceUpdateOrScaleDown(ctx context.Context, controlPlane *internal.ControlPlane, outdatedMachines collections.Machines) (*clusterv1.Machine, error) {
// Select the subset of machines eligible for scale down.
- eligibleMachines := controlPlane.Machines
+ var eligibleMachines collections.Machines
switch {
case controlPlane.MachineWithDeleteAnnotation(outdatedMachines).Len() > 0:
eligibleMachines = controlPlane.MachineWithDeleteAnnotation(outdatedMachines)
- case controlPlane.MachineWithDeleteAnnotation(eligibleMachines).Len() > 0:
- eligibleMachines = controlPlane.MachineWithDeleteAnnotation(eligibleMachines)
+ case controlPlane.MachineWithDeleteAnnotation(controlPlane.Machines).Len() > 0:
+ eligibleMachines = controlPlane.MachineWithDeleteAnnotation(controlPlane.Machines)
case controlPlane.UnhealthyMachinesWithUnhealthyControlPlaneComponents(outdatedMachines).Len() > 0:
eligibleMachines = controlPlane.UnhealthyMachinesWithUnhealthyControlPlaneComponents(outdatedMachines)
case outdatedMachines.Len() > 0:
eligibleMachines = outdatedMachines
+ default:
+ eligibleMachines = controlPlane.Machines
}
// Pick an eligible machine from the failure domain with most machines in (including both eligible and not eligible machines)
diff --git a/controlplane/kubeadm/internal/controllers/scale_test.go b/controlplane/kubeadm/internal/controllers/scale_test.go
index b125a7abfdc9..ccd5bb1aa66a 100644
--- a/controlplane/kubeadm/internal/controllers/scale_test.go
+++ b/controlplane/kubeadm/internal/controllers/scale_test.go
@@ -31,12 +31,15 @@ import (
"k8s.io/utils/ptr"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
+ "sigs.k8s.io/controller-runtime/pkg/reconcile"
bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
"sigs.k8s.io/cluster-api/controlplane/kubeadm/internal"
+ "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/desiredstate"
"sigs.k8s.io/cluster-api/feature"
+ capicontrollerutil "sigs.k8s.io/cluster-api/internal/util/controller"
"sigs.k8s.io/cluster-api/util"
"sigs.k8s.io/cluster-api/util/collections"
)
@@ -88,7 +91,7 @@ func TestKubeadmControlPlaneReconciler_initializeControlPlane(t *testing.T) {
g.Expect(env.GetAPIReader().List(ctx, machineList, client.InNamespace(cluster.Namespace))).To(Succeed())
g.Expect(machineList.Items).To(HaveLen(1))
- res, err := collections.GetFilteredMachinesForCluster(ctx, env.GetAPIReader(), cluster, collections.OwnedMachines(kcp))
+ res, err := collections.GetFilteredMachinesForCluster(ctx, env.GetAPIReader(), cluster, collections.OwnedMachines(kcp, controlplanev1.GroupVersion.WithKind("KubeadmControlPlane").GroupKind()))
g.Expect(res).To(HaveLen(1))
g.Expect(err).ToNot(HaveOccurred())
@@ -106,7 +109,7 @@ func TestKubeadmControlPlaneReconciler_initializeControlPlane(t *testing.T) {
kubeadmConfig := &bootstrapv1.KubeadmConfig{}
bootstrapRef := machineList.Items[0].Spec.Bootstrap.ConfigRef
g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKey{Namespace: machineList.Items[0].Namespace, Name: bootstrapRef.Name}, kubeadmConfig)).To(Succeed())
- g.Expect(kubeadmConfig.Spec.ClusterConfiguration.FeatureGates).To(BeComparableTo(map[string]bool{internal.ControlPlaneKubeletLocalMode: true}))
+ g.Expect(kubeadmConfig.Spec.ClusterConfiguration.FeatureGates).To(BeComparableTo(map[string]bool{desiredstate.ControlPlaneKubeletLocalMode: true}))
}
func TestKubeadmControlPlaneReconciler_scaleUpControlPlane(t *testing.T) {
@@ -174,7 +177,7 @@ func TestKubeadmControlPlaneReconciler_scaleUpControlPlane(t *testing.T) {
kubeadmConfig := &bootstrapv1.KubeadmConfig{}
bootstrapRef := controlPlaneMachines.Items[0].Spec.Bootstrap.ConfigRef
g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKey{Namespace: controlPlaneMachines.Items[0].Namespace, Name: bootstrapRef.Name}, kubeadmConfig)).To(Succeed())
- g.Expect(kubeadmConfig.Spec.ClusterConfiguration.FeatureGates).To(BeComparableTo(map[string]bool{internal.ControlPlaneKubeletLocalMode: true}))
+ g.Expect(kubeadmConfig.Spec.ClusterConfiguration.FeatureGates).To(BeComparableTo(map[string]bool{desiredstate.ControlPlaneKubeletLocalMode: true}))
})
t.Run("does not create a control plane Machine if preflight checks fail", func(t *testing.T) {
setup := func(t *testing.T, g *WithT) *corev1.Namespace {
@@ -217,9 +220,12 @@ func TestKubeadmControlPlaneReconciler_scaleUpControlPlane(t *testing.T) {
Workload: &fakeWorkloadCluster{},
}
+ fc := capicontrollerutil.NewFakeController()
+
r := &KubeadmControlPlaneReconciler{
Client: env,
SecretCachingClient: secretCachingClient,
+ controller: fc,
managementCluster: fmc,
managementClusterUncached: fmc,
recorder: record.NewFakeRecorder(32),
@@ -232,6 +238,10 @@ func TestKubeadmControlPlaneReconciler_scaleUpControlPlane(t *testing.T) {
result, err := r.scaleUpControlPlane(context.Background(), controlPlane)
g.Expect(err).ToNot(HaveOccurred())
g.Expect(result).To(BeComparableTo(ctrl.Result{RequeueAfter: preflightFailedRequeueAfter}))
+ g.Expect(fc.Deferrals).To(HaveKeyWithValue(
+ reconcile.Request{NamespacedName: client.ObjectKeyFromObject(kcp)},
+ BeTemporally("~", time.Now().Add(5*time.Second), 1*time.Second)),
+ )
// scaleUpControlPlane is never called due to health check failure and new machine is not created to scale up.
controlPlaneMachines := &clusterv1.MachineList{}
@@ -283,7 +293,9 @@ func TestKubeadmControlPlaneReconciler_scaleDownControlPlane_NoError(t *testing.
}
controlPlane.InjectTestManagementCluster(r.managementCluster)
- result, err := r.scaleDownControlPlane(context.Background(), controlPlane, controlPlane.Machines)
+ machineToDelete, err := selectMachineForInPlaceUpdateOrScaleDown(ctx, controlPlane, controlPlane.Machines)
+ g.Expect(err).ToNot(HaveOccurred())
+ result, err := r.scaleDownControlPlane(context.Background(), controlPlane, machineToDelete)
g.Expect(err).ToNot(HaveOccurred())
g.Expect(result).To(BeComparableTo(ctrl.Result{Requeue: true}))
@@ -325,7 +337,9 @@ func TestKubeadmControlPlaneReconciler_scaleDownControlPlane_NoError(t *testing.
}
controlPlane.InjectTestManagementCluster(r.managementCluster)
- result, err := r.scaleDownControlPlane(context.Background(), controlPlane, controlPlane.Machines)
+ machineToDelete, err := selectMachineForInPlaceUpdateOrScaleDown(ctx, controlPlane, controlPlane.Machines)
+ g.Expect(err).ToNot(HaveOccurred())
+ result, err := r.scaleDownControlPlane(context.Background(), controlPlane, machineToDelete)
g.Expect(err).ToNot(HaveOccurred())
g.Expect(result).To(BeComparableTo(ctrl.Result{Requeue: true}))
@@ -345,10 +359,13 @@ func TestKubeadmControlPlaneReconciler_scaleDownControlPlane_NoError(t *testing.
setMachineHealthy(machines["three"])
fakeClient := newFakeClient(machines["one"], machines["two"], machines["three"])
+ fc := capicontrollerutil.NewFakeController()
+
r := &KubeadmControlPlaneReconciler{
recorder: record.NewFakeRecorder(32),
Client: fakeClient,
SecretCachingClient: fakeClient,
+ controller: fc,
managementCluster: &fakeManagementCluster{
Workload: &fakeWorkloadCluster{},
},
@@ -363,9 +380,15 @@ func TestKubeadmControlPlaneReconciler_scaleDownControlPlane_NoError(t *testing.
}
controlPlane.InjectTestManagementCluster(r.managementCluster)
- result, err := r.scaleDownControlPlane(context.Background(), controlPlane, controlPlane.Machines)
+ machineToDelete, err := selectMachineForInPlaceUpdateOrScaleDown(ctx, controlPlane, controlPlane.Machines)
+ g.Expect(err).ToNot(HaveOccurred())
+ result, err := r.scaleDownControlPlane(context.Background(), controlPlane, machineToDelete)
g.Expect(err).ToNot(HaveOccurred())
g.Expect(result).To(BeComparableTo(ctrl.Result{RequeueAfter: preflightFailedRequeueAfter}))
+ g.Expect(fc.Deferrals).To(HaveKeyWithValue(
+ reconcile.Request{NamespacedName: client.ObjectKeyFromObject(kcp)},
+ BeTemporally("~", time.Now().Add(5*time.Second), 1*time.Second)),
+ )
controlPlaneMachines := clusterv1.MachineList{}
g.Expect(fakeClient.List(context.Background(), &controlPlaneMachines)).To(Succeed())
@@ -373,7 +396,7 @@ func TestKubeadmControlPlaneReconciler_scaleDownControlPlane_NoError(t *testing.
})
}
-func TestSelectMachineForScaleDown(t *testing.T) {
+func TestSelectMachineForInPlaceUpdateOrScaleDown(t *testing.T) {
kcp := controlplanev1.KubeadmControlPlane{
Spec: controlplanev1.KubeadmControlPlaneSpec{},
}
@@ -502,7 +525,7 @@ func TestSelectMachineForScaleDown(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
g := NewWithT(t)
- selectedMachine, err := selectMachineForScaleDown(ctx, tc.cp, tc.outDatedMachines)
+ selectedMachine, err := selectMachineForInPlaceUpdateOrScaleDown(ctx, tc.cp, tc.outDatedMachines)
if tc.expectErr {
g.Expect(err).To(HaveOccurred())
@@ -518,12 +541,13 @@ func TestSelectMachineForScaleDown(t *testing.T) {
func TestPreflightChecks(t *testing.T) {
utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.ClusterTopology, true)
testCases := []struct {
- name string
- cluster *clusterv1.Cluster
- kcp *controlplanev1.KubeadmControlPlane
- machines []*clusterv1.Machine
- expectResult ctrl.Result
- expectPreflight internal.PreflightCheckResults
+ name string
+ cluster *clusterv1.Cluster
+ kcp *controlplanev1.KubeadmControlPlane
+ machines []*clusterv1.Machine
+ expectResult ctrl.Result
+ expectPreflight internal.PreflightCheckResults
+ expectDeferNextReconcile time.Duration
}{
{
name: "control plane without machines (not initialized) should pass",
@@ -561,6 +585,39 @@ func TestPreflightChecks(t *testing.T) {
EtcdClusterNotHealthy: false,
TopologyVersionMismatch: true,
},
+ expectDeferNextReconcile: 5 * time.Second,
+ },
+ {
+ name: "control plane with a pending upgrade, but not yet at the current step of the upgrade plan, should requeue",
+ cluster: &clusterv1.Cluster{
+ ObjectMeta: metav1.ObjectMeta{
+ Annotations: map[string]string{
+ clusterv1.ClusterTopologyUpgradeStepAnnotation: "v1.32.0",
+ },
+ },
+ Spec: clusterv1.ClusterSpec{
+ Topology: clusterv1.Topology{
+ Version: "v1.33.0",
+ },
+ },
+ },
+ kcp: &controlplanev1.KubeadmControlPlane{
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ Version: "v1.31.0",
+ },
+ },
+ machines: []*clusterv1.Machine{
+ {},
+ },
+
+ expectResult: ctrl.Result{RequeueAfter: preflightFailedRequeueAfter},
+ expectPreflight: internal.PreflightCheckResults{
+ HasDeletingMachine: false,
+ ControlPlaneComponentsNotHealthy: false,
+ EtcdClusterNotHealthy: false,
+ TopologyVersionMismatch: true,
+ },
+ expectDeferNextReconcile: 5 * time.Second,
},
{
name: "control plane with a deleting machine should requeue",
@@ -579,6 +636,7 @@ func TestPreflightChecks(t *testing.T) {
EtcdClusterNotHealthy: false,
TopologyVersionMismatch: false,
},
+ expectDeferNextReconcile: 5 * time.Second,
},
{
name: "control plane without a nodeRef should requeue",
@@ -598,6 +656,7 @@ func TestPreflightChecks(t *testing.T) {
EtcdClusterNotHealthy: true,
TopologyVersionMismatch: false,
},
+ expectDeferNextReconcile: 5 * time.Second,
},
{
name: "control plane with an unhealthy machine condition should requeue",
@@ -625,6 +684,7 @@ func TestPreflightChecks(t *testing.T) {
EtcdClusterNotHealthy: false,
TopologyVersionMismatch: false,
},
+ expectDeferNextReconcile: 5 * time.Second,
},
{
name: "control plane with an unhealthy machine condition should requeue",
@@ -652,6 +712,7 @@ func TestPreflightChecks(t *testing.T) {
EtcdClusterNotHealthy: true,
TopologyVersionMismatch: false,
},
+ expectDeferNextReconcile: 5 * time.Second,
},
{
name: "control plane with an healthy machine and an healthy kcp condition should pass",
@@ -687,14 +748,66 @@ func TestPreflightChecks(t *testing.T) {
TopologyVersionMismatch: false,
},
},
+ {
+ name: "control plane with a pending upgrade, but already at the current step of the upgrade plan, should pass",
+ cluster: &clusterv1.Cluster{
+ ObjectMeta: metav1.ObjectMeta{
+ Annotations: map[string]string{
+ clusterv1.ClusterTopologyUpgradeStepAnnotation: "v1.32.0",
+ },
+ },
+ Spec: clusterv1.ClusterSpec{
+ Topology: clusterv1.Topology{
+ Version: "v1.33.0",
+ },
+ },
+ },
+ kcp: &controlplanev1.KubeadmControlPlane{
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ Version: "v1.32.0",
+ }, Status: controlplanev1.KubeadmControlPlaneStatus{
+ Conditions: []metav1.Condition{
+ {Type: controlplanev1.KubeadmControlPlaneControlPlaneComponentsHealthyCondition, Status: metav1.ConditionTrue},
+ {Type: controlplanev1.KubeadmControlPlaneEtcdClusterHealthyCondition, Status: metav1.ConditionTrue},
+ },
+ },
+ },
+ machines: []*clusterv1.Machine{
+ {
+ Status: clusterv1.MachineStatus{
+ NodeRef: clusterv1.MachineNodeReference{
+ Name: "node-1",
+ },
+ Conditions: []metav1.Condition{
+ {Type: controlplanev1.KubeadmControlPlaneMachineAPIServerPodHealthyCondition, Status: metav1.ConditionTrue},
+ {Type: controlplanev1.KubeadmControlPlaneMachineControllerManagerPodHealthyCondition, Status: metav1.ConditionTrue},
+ {Type: controlplanev1.KubeadmControlPlaneMachineSchedulerPodHealthyCondition, Status: metav1.ConditionTrue},
+ {Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition, Status: metav1.ConditionTrue},
+ {Type: controlplanev1.KubeadmControlPlaneMachineEtcdMemberHealthyCondition, Status: metav1.ConditionTrue},
+ },
+ },
+ },
+ },
+
+ expectResult: ctrl.Result{},
+ expectPreflight: internal.PreflightCheckResults{
+ HasDeletingMachine: false,
+ ControlPlaneComponentsNotHealthy: false,
+ EtcdClusterNotHealthy: false,
+ TopologyVersionMismatch: false,
+ },
+ },
}
for _, tt := range testCases {
t.Run(tt.name, func(t *testing.T) {
g := NewWithT(t)
+ fc := capicontrollerutil.NewFakeController()
+
r := &KubeadmControlPlaneReconciler{
- recorder: record.NewFakeRecorder(32),
+ controller: fc,
+ recorder: record.NewFakeRecorder(32),
}
cluster := &clusterv1.Cluster{}
if tt.cluster != nil {
@@ -705,10 +818,17 @@ func TestPreflightChecks(t *testing.T) {
KCP: tt.kcp,
Machines: collections.FromMachines(tt.machines...),
}
- result, err := r.preflightChecks(context.TODO(), controlPlane)
- g.Expect(err).ToNot(HaveOccurred())
+ result := r.preflightChecks(context.TODO(), controlPlane)
g.Expect(result).To(BeComparableTo(tt.expectResult))
g.Expect(controlPlane.PreflightCheckResults).To(Equal(tt.expectPreflight))
+ if tt.expectDeferNextReconcile == 0 {
+ g.Expect(fc.Deferrals).To(BeEmpty())
+ } else {
+ g.Expect(fc.Deferrals).To(HaveKeyWithValue(
+ reconcile.Request{NamespacedName: client.ObjectKeyFromObject(tt.kcp)},
+ BeTemporally("~", time.Now().Add(tt.expectDeferNextReconcile), 1*time.Second)),
+ )
+ }
})
}
}
diff --git a/controlplane/kubeadm/internal/controllers/status.go b/controlplane/kubeadm/internal/controllers/status.go
index d056e2d8a567..44b2a2041ae1 100644
--- a/controlplane/kubeadm/internal/controllers/status.go
+++ b/controlplane/kubeadm/internal/controllers/status.go
@@ -155,6 +155,21 @@ func (r *KubeadmControlPlaneReconciler) updateStatus(ctx context.Context, contro
// Note: This only gets initialized once and does not change if the kubeadm config map goes away.
func setControlPlaneInitialized(ctx context.Context, controlPlane *internal.ControlPlane) error {
if !ptr.Deref(controlPlane.KCP.Status.Initialization.ControlPlaneInitialized, false) {
+ // If the control plane has only one machine, and this machine is marked for remediation or in the process of deleting,
+ // do not check for control plane initialized.
+ // This prevents an issue that happens if kubeadm init completes in the short timeframe between when machine deletion is triggered
+ // to when the machine goes away; this issue, if not properly handled, will lead to an inconsistent state where
+ // cluster is initialized, no CP machine exists, and the replacement CP machine fails when trying to join.
+ if len(controlPlane.Machines) == 1 {
+ m := controlPlane.Machines.UnsortedList()[0]
+ if collections.IsUnhealthyAndOwnerRemediated(m) {
+ return nil
+ }
+ if !m.DeletionTimestamp.IsZero() {
+ return nil
+ }
+ }
+
workloadCluster, err := controlPlane.GetWorkloadCluster(ctx)
if err != nil {
return errors.Wrap(err, "failed to create remote cluster client")
@@ -836,7 +851,11 @@ func minTime(t1, t2 time.Time) time.Time {
func getPreflightMessages(cluster *clusterv1.Cluster, preflightChecks internal.PreflightCheckResults) []string {
additionalMessages := []string{}
if preflightChecks.TopologyVersionMismatch {
- additionalMessages = append(additionalMessages, fmt.Sprintf("* waiting for a version upgrade to %s to be propagated from Cluster.spec.topology", cluster.Spec.Topology.Version))
+ v := cluster.Spec.Topology.Version
+ if version, ok := cluster.GetAnnotations()[clusterv1.ClusterTopologyUpgradeStepAnnotation]; ok {
+ v = version
+ }
+ additionalMessages = append(additionalMessages, fmt.Sprintf("* waiting for a version upgrade to %s to be propagated", v))
}
if preflightChecks.HasDeletingMachine {
diff --git a/controlplane/kubeadm/internal/controllers/status_test.go b/controlplane/kubeadm/internal/controllers/status_test.go
index 66f983b8270e..6b1ff342ab3a 100644
--- a/controlplane/kubeadm/internal/controllers/status_test.go
+++ b/controlplane/kubeadm/internal/controllers/status_test.go
@@ -75,6 +75,9 @@ func TestKubeadmControlPlaneReconciler_setControlPlaneInitialized(t *testing.T)
controlPlane := &internal.ControlPlane{
Cluster: &clusterv1.Cluster{},
KCP: &controlplanev1.KubeadmControlPlane{},
+ Machines: collections.FromMachines(
+ &clusterv1.Machine{ObjectMeta: metav1.ObjectMeta{Name: "m1"}},
+ ),
}
controlPlane.InjectTestManagementCluster(&fakeManagementCluster{
Workload: &fakeWorkloadCluster{
@@ -98,6 +101,85 @@ func TestKubeadmControlPlaneReconciler_setControlPlaneInitialized(t *testing.T)
Reason: controlplanev1.KubeadmControlPlaneInitializedReason,
}, conditions.IgnoreLastTransitionTime(true)))
})
+ t.Run("kubeadm config exists is ignored if there is a single CP machine and it is marked for remediation", func(t *testing.T) {
+ g := NewWithT(t)
+ controlPlane := &internal.ControlPlane{
+ Cluster: &clusterv1.Cluster{},
+ KCP: &controlplanev1.KubeadmControlPlane{},
+ Machines: collections.FromMachines(
+ &clusterv1.Machine{
+ ObjectMeta: metav1.ObjectMeta{Name: "m1"},
+ Status: clusterv1.MachineStatus{
+ Conditions: []metav1.Condition{
+ {
+ Type: clusterv1.MachineHealthCheckSucceededCondition,
+ Status: metav1.ConditionFalse,
+ Reason: clusterv1.MachineHealthCheckNodeDeletedReason,
+ },
+ {
+ Type: clusterv1.MachineOwnerRemediatedCondition,
+ Status: metav1.ConditionFalse,
+ Reason: clusterv1.MachineOwnerRemediatedWaitingForRemediationReason,
+ Message: "Waiting for remediation",
+ },
+ },
+ },
+ },
+ ),
+ }
+ controlPlane.InjectTestManagementCluster(&fakeManagementCluster{
+ Workload: &fakeWorkloadCluster{
+ Status: internal.ClusterStatus{
+ HasKubeadmConfig: true,
+ },
+ },
+ })
+
+ err := setControlPlaneInitialized(ctx, controlPlane)
+ g.Expect(err).ToNot(HaveOccurred())
+
+ g.Expect(ptr.Deref(controlPlane.KCP.Status.Initialization.ControlPlaneInitialized, false)).To(BeFalse())
+
+ setInitializedCondition(ctx, controlPlane.KCP)
+ c := conditions.Get(controlPlane.KCP, controlplanev1.KubeadmControlPlaneInitializedCondition)
+ g.Expect(c).ToNot(BeNil())
+ g.Expect(*c).To(conditions.MatchCondition(metav1.Condition{
+ Type: controlplanev1.KubeadmControlPlaneInitializedCondition,
+ Status: metav1.ConditionFalse,
+ Reason: controlplanev1.KubeadmControlPlaneNotInitializedReason,
+ }, conditions.IgnoreLastTransitionTime(true)))
+ })
+ t.Run("kubeadm config exists is ignored if there is a single CP machine and it is deleting", func(t *testing.T) {
+ g := NewWithT(t)
+ controlPlane := &internal.ControlPlane{
+ Cluster: &clusterv1.Cluster{},
+ KCP: &controlplanev1.KubeadmControlPlane{},
+ Machines: collections.FromMachines(
+ &clusterv1.Machine{ObjectMeta: metav1.ObjectMeta{Name: "m1", DeletionTimestamp: ptr.To(metav1.Now())}},
+ ),
+ }
+ controlPlane.InjectTestManagementCluster(&fakeManagementCluster{
+ Workload: &fakeWorkloadCluster{
+ Status: internal.ClusterStatus{
+ HasKubeadmConfig: true,
+ },
+ },
+ })
+
+ err := setControlPlaneInitialized(ctx, controlPlane)
+ g.Expect(err).ToNot(HaveOccurred())
+
+ g.Expect(ptr.Deref(controlPlane.KCP.Status.Initialization.ControlPlaneInitialized, false)).To(BeFalse())
+
+ setInitializedCondition(ctx, controlPlane.KCP)
+ c := conditions.Get(controlPlane.KCP, controlplanev1.KubeadmControlPlaneInitializedCondition)
+ g.Expect(c).ToNot(BeNil())
+ g.Expect(*c).To(conditions.MatchCondition(metav1.Condition{
+ Type: controlplanev1.KubeadmControlPlaneInitializedCondition,
+ Status: metav1.ConditionFalse,
+ Reason: controlplanev1.KubeadmControlPlaneNotInitializedReason,
+ }, conditions.IgnoreLastTransitionTime(true)))
+ })
}
func TestSetReplicas(t *testing.T) {
@@ -451,7 +533,7 @@ func Test_setScalingUpCondition(t *testing.T) {
Status: metav1.ConditionTrue,
Reason: controlplanev1.KubeadmControlPlaneScalingUpReason,
Message: "Scaling up from 3 to 5 replicas is blocked because:\n" +
- "* waiting for a version upgrade to v1.32.0 to be propagated from Cluster.spec.topology\n" +
+ "* waiting for a version upgrade to v1.32.0 to be propagated\n" +
"* waiting for a control plane Machine to complete deletion\n" +
"* waiting for control plane components to become healthy\n" +
"* waiting for etcd cluster to become healthy",
@@ -645,7 +727,7 @@ After above Pods have been removed from the Node, the following Pods will be evi
Status: metav1.ConditionTrue,
Reason: controlplanev1.KubeadmControlPlaneScalingDownReason,
Message: "Scaling down from 3 to 1 replicas is blocked because:\n" +
- "* waiting for a version upgrade to v1.32.0 to be propagated from Cluster.spec.topology\n" +
+ "* waiting for a version upgrade to v1.32.0 to be propagated\n" +
"* waiting for a control plane Machine to complete deletion\n" +
"* waiting for control plane components to become healthy\n" +
"* waiting for etcd cluster to become healthy",
@@ -1971,10 +2053,6 @@ func TestKubeadmControlPlaneReconciler_updateStatusNoMachines(t *testing.T) {
}
kcp := &controlplanev1.KubeadmControlPlane{
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmControlPlane",
- APIVersion: controlplanev1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: cluster.Namespace,
Name: "foo",
@@ -2123,10 +2201,6 @@ func TestKubeadmControlPlaneReconciler_updateStatusAllMachinesNotReady(t *testin
}
kcp := &controlplanev1.KubeadmControlPlane{
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmControlPlane",
- APIVersion: controlplanev1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: cluster.Namespace,
Name: "foo",
@@ -2195,10 +2269,6 @@ func TestKubeadmControlPlaneReconciler_updateStatusAllMachinesReady(t *testing.T
}
kcp := &controlplanev1.KubeadmControlPlane{
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmControlPlane",
- APIVersion: controlplanev1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: cluster.Namespace,
Name: "foo",
@@ -2274,10 +2344,6 @@ func TestKubeadmControlPlaneReconciler_updateStatusMachinesReadyMixed(t *testing
}
kcp := &controlplanev1.KubeadmControlPlane{
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmControlPlane",
- APIVersion: controlplanev1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: cluster.Namespace,
Name: "foo",
@@ -2352,10 +2418,6 @@ func TestKubeadmControlPlaneReconciler_machinesCreatedIsIsTrueEvenWhenTheNodesAr
}
kcp := &controlplanev1.KubeadmControlPlane{
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmControlPlane",
- APIVersion: controlplanev1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: cluster.Namespace,
Name: "foo",
diff --git a/controlplane/kubeadm/internal/controllers/update.go b/controlplane/kubeadm/internal/controllers/update.go
new file mode 100644
index 000000000000..d84fd5d9c709
--- /dev/null
+++ b/controlplane/kubeadm/internal/controllers/update.go
@@ -0,0 +1,159 @@
+/*
+Copyright 2020 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"
+
+ "github.com/blang/semver/v4"
+ "github.com/pkg/errors"
+ "k8s.io/klog/v2"
+ ctrl "sigs.k8s.io/controller-runtime"
+
+ bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
+ controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
+ "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal"
+ "sigs.k8s.io/cluster-api/feature"
+ "sigs.k8s.io/cluster-api/util/collections"
+)
+
+func (r *KubeadmControlPlaneReconciler) updateControlPlane(
+ ctx context.Context,
+ controlPlane *internal.ControlPlane,
+ machinesNeedingRollout collections.Machines,
+ machinesUpToDateResults map[string]internal.UpToDateResult,
+) (ctrl.Result, error) {
+ log := ctrl.LoggerFrom(ctx)
+
+ // TODO: handle reconciliation of etcd members and kubeadm config in case they get out of sync with cluster
+
+ workloadCluster, err := controlPlane.GetWorkloadCluster(ctx)
+ if err != nil {
+ log.Error(err, "failed to get remote client for workload cluster", "Cluster", klog.KObj(controlPlane.Cluster))
+ return ctrl.Result{}, errors.Wrapf(err, "failed to update control plane")
+ }
+
+ parsedVersion, err := semver.ParseTolerant(controlPlane.KCP.Spec.Version)
+ if err != nil {
+ return ctrl.Result{}, errors.Wrapf(err, "failed to update control plane: failed to parse Kubernetes version %q", controlPlane.KCP.Spec.Version)
+ }
+
+ // Ensure kubeadm clusterRoleBinding for v1.29+ as per https://github.com/kubernetes/kubernetes/pull/121305
+ if err := workloadCluster.AllowClusterAdminPermissions(ctx, parsedVersion); err != nil {
+ return ctrl.Result{}, errors.Wrap(err, "failed to update control plane: failed to set cluster-admin ClusterRoleBinding for kubeadm")
+ }
+
+ kubeadmCMMutators := make([]func(*bootstrapv1.ClusterConfiguration), 0)
+
+ if controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.IsDefined() {
+ // Get the imageRepository or the correct value if nothing is set and a migration is necessary.
+ imageRepository := internal.ImageRepositoryFromClusterConfig(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration)
+
+ kubeadmCMMutators = append(kubeadmCMMutators,
+ workloadCluster.UpdateImageRepositoryInKubeadmConfigMap(imageRepository),
+ workloadCluster.UpdateFeatureGatesInKubeadmConfigMap(controlPlane.KCP.Spec.KubeadmConfigSpec, parsedVersion),
+ workloadCluster.UpdateAPIServerInKubeadmConfigMap(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.APIServer),
+ workloadCluster.UpdateControllerManagerInKubeadmConfigMap(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.ControllerManager),
+ workloadCluster.UpdateSchedulerInKubeadmConfigMap(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.Scheduler),
+ workloadCluster.UpdateCertificateValidityPeriodDays(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.CertificateValidityPeriodDays),
+ workloadCluster.UpdateEncryptionAlgorithm(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.EncryptionAlgorithm))
+
+ // Etcd local and external are mutually exclusive and they cannot be switched, once set.
+ if controlPlane.IsEtcdManaged() {
+ kubeadmCMMutators = append(kubeadmCMMutators,
+ workloadCluster.UpdateEtcdLocalInKubeadmConfigMap(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local))
+ } else {
+ kubeadmCMMutators = append(kubeadmCMMutators,
+ workloadCluster.UpdateEtcdExternalInKubeadmConfigMap(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.External))
+ }
+ }
+
+ // collectively update Kubeadm config map
+ if err = workloadCluster.UpdateClusterConfiguration(ctx, parsedVersion, kubeadmCMMutators...); err != nil {
+ return ctrl.Result{}, errors.Wrapf(err, "failed to update control plane")
+ }
+
+ switch controlPlane.KCP.Spec.Rollout.Strategy.Type {
+ case controlplanev1.RollingUpdateStrategyType:
+ // RolloutStrategy is currently defaulted and validated to be RollingUpdate
+ res, err := r.rollingUpdate(ctx, controlPlane, machinesNeedingRollout, machinesUpToDateResults)
+ if err != nil {
+ return ctrl.Result{}, errors.Wrapf(err, "failed to update control plane")
+ }
+ return res, nil
+ default:
+ log.Info("RolloutStrategy type is not set to RollingUpdate, unable to determine the strategy for rolling out machines")
+ return ctrl.Result{}, nil
+ }
+}
+
+func (r *KubeadmControlPlaneReconciler) rollingUpdate(
+ ctx context.Context,
+ controlPlane *internal.ControlPlane,
+ machinesNeedingRollout collections.Machines,
+ machinesUpToDateResults map[string]internal.UpToDateResult,
+) (ctrl.Result, error) {
+ currentReplicas := int32(controlPlane.Machines.Len())
+ currentUpToDateReplicas := int32(controlPlane.UpToDateMachines().Len())
+ desiredReplicas := *controlPlane.KCP.Spec.Replicas
+ maxSurge := int32(controlPlane.KCP.Spec.Rollout.Strategy.RollingUpdate.MaxSurge.IntValue())
+ // Note: As MaxSurge is validated to be either 0 or 1, maxReplicas will be either desiredReplicas or desiredReplicas+1.
+ maxReplicas := desiredReplicas + maxSurge
+
+ // If currentReplicas < maxReplicas we have to scale up
+ // Note: This is done to ensure we have as many Machines as allowed during rollout to maximize fault tolerance.
+ if currentReplicas < maxReplicas {
+ // Note: scaleUpControlPlane ensures that we don't continue scaling up while waiting for Machines to have NodeRefs.
+ return r.scaleUpControlPlane(ctx, controlPlane)
+ }
+
+ // If currentReplicas >= maxReplicas we have to scale down.
+ // Note: If we are already at or above the maximum Machines we have to in-place update or delete a Machine
+ // to make progress with the update (as we cannot create additional new Machines above the maximum).
+
+ // Pick the Machine that we should in-place update or scale down.
+ machineToInPlaceUpdateOrScaleDown, err := selectMachineForInPlaceUpdateOrScaleDown(ctx, controlPlane, machinesNeedingRollout)
+ if err != nil {
+ return ctrl.Result{}, errors.Wrap(err, "failed to select next Machine for rollout")
+ }
+ machineUpToDateResult, ok := machinesUpToDateResults[machineToInPlaceUpdateOrScaleDown.Name]
+ if !ok {
+ // Note: This should never happen as we store results for all Machines in machinesUpToDateResults.
+ return ctrl.Result{}, errors.Errorf("failed to check if Machine %s is UpToDate", machineToInPlaceUpdateOrScaleDown.Name)
+ }
+
+ // If the selected Machine is eligible for in-place update and we don't already have enough up-to-date replicas, try in-place update.
+ // Note: To be safe we only try an in-place update when we would otherwise delete a Machine. This ensures we could
+ // afford if the in-place update fails and the Machine becomes unavailable (and eventually MHC kicks in and the Machine is recreated).
+ if feature.Gates.Enabled(feature.InPlaceUpdates) &&
+ machineUpToDateResult.EligibleForInPlaceUpdate &&
+ currentUpToDateReplicas < desiredReplicas {
+ fallbackToScaleDown, res, err := r.tryInPlaceUpdate(ctx, controlPlane, machineToInPlaceUpdateOrScaleDown, machineUpToDateResult)
+ if err != nil {
+ return ctrl.Result{}, err
+ }
+ if !res.IsZero() {
+ return res, nil
+ }
+ if fallbackToScaleDown {
+ return r.scaleDownControlPlane(ctx, controlPlane, machineToInPlaceUpdateOrScaleDown)
+ }
+ // In-place update triggered
+ return ctrl.Result{}, nil // Note: Requeue is not needed, changes to Machines trigger another reconcile.
+ }
+ return r.scaleDownControlPlane(ctx, controlPlane, machineToInPlaceUpdateOrScaleDown)
+}
diff --git a/controlplane/kubeadm/internal/controllers/update_test.go b/controlplane/kubeadm/internal/controllers/update_test.go
new file mode 100644
index 000000000000..96d9736cad98
--- /dev/null
+++ b/controlplane/kubeadm/internal/controllers/update_test.go
@@ -0,0 +1,531 @@
+/*
+Copyright 2020 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"
+ "time"
+
+ . "github.com/onsi/gomega"
+ "github.com/pkg/errors"
+ corev1 "k8s.io/api/core/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/client-go/tools/record"
+ utilfeature "k8s.io/component-base/featuregate/testing"
+ "k8s.io/utils/ptr"
+ ctrl "sigs.k8s.io/controller-runtime"
+ "sigs.k8s.io/controller-runtime/pkg/client"
+ "sigs.k8s.io/controller-runtime/pkg/reconcile"
+
+ bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
+ controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal"
+ "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/desiredstate"
+ "sigs.k8s.io/cluster-api/feature"
+ capicontrollerutil "sigs.k8s.io/cluster-api/internal/util/controller"
+ "sigs.k8s.io/cluster-api/internal/util/ssa"
+ "sigs.k8s.io/cluster-api/util"
+ "sigs.k8s.io/cluster-api/util/collections"
+ "sigs.k8s.io/cluster-api/util/test/builder"
+)
+
+const (
+ UpdatedVersion string = "v1.17.4"
+ Host string = "nodomain.example.com"
+)
+
+func TestKubeadmControlPlaneReconciler_RolloutStrategy_ScaleUp(t *testing.T) {
+ setup := func(t *testing.T, g *WithT) *corev1.Namespace {
+ t.Helper()
+
+ t.Log("Creating the namespace")
+ ns, err := env.CreateNamespace(ctx, "test-kcp-reconciler-rollout-scaleup")
+ g.Expect(err).ToNot(HaveOccurred())
+
+ return ns
+ }
+
+ teardown := func(t *testing.T, g *WithT, ns *corev1.Namespace) {
+ t.Helper()
+
+ t.Log("Deleting the namespace")
+ g.Expect(env.Delete(ctx, ns)).To(Succeed())
+ }
+
+ g := NewWithT(t)
+ namespace := setup(t, g)
+ defer teardown(t, g, namespace)
+
+ timeout := 30 * time.Second
+
+ cluster, kcp, genericInfrastructureMachineTemplate := createClusterWithControlPlane(namespace.Name)
+ g.Expect(env.CreateAndWait(ctx, genericInfrastructureMachineTemplate, client.FieldOwner("manager"))).To(Succeed())
+ cluster.UID = types.UID(util.RandomString(10))
+ cluster.Spec.ControlPlaneEndpoint.Host = Host
+ cluster.Spec.ControlPlaneEndpoint.Port = 6443
+ cluster.Status.Initialization.InfrastructureProvisioned = ptr.To(true)
+ kcp.UID = types.UID(util.RandomString(10))
+ kcp.Spec.Replicas = ptr.To[int32](1)
+ setKCPHealthy(kcp)
+
+ fc := capicontrollerutil.NewFakeController()
+
+ r := &KubeadmControlPlaneReconciler{
+ Client: env,
+ SecretCachingClient: secretCachingClient,
+ controller: fc,
+ recorder: record.NewFakeRecorder(32),
+ managementCluster: &fakeManagementCluster{
+ Management: &internal.Management{Client: env},
+ Workload: &fakeWorkloadCluster{
+ Status: internal.ClusterStatus{Nodes: 1},
+ },
+ },
+ managementClusterUncached: &fakeManagementCluster{
+ Management: &internal.Management{Client: env},
+ Workload: &fakeWorkloadCluster{
+ Status: internal.ClusterStatus{Nodes: 1},
+ },
+ },
+ ssaCache: ssa.NewCache("test-controller"),
+ }
+ controlPlane := &internal.ControlPlane{
+ KCP: kcp,
+ Cluster: cluster,
+ Machines: nil,
+ }
+ controlPlane.InjectTestManagementCluster(r.managementCluster)
+
+ result, err := r.initializeControlPlane(ctx, controlPlane)
+ g.Expect(result).To(BeComparableTo(ctrl.Result{Requeue: true}))
+ g.Expect(err).ToNot(HaveOccurred())
+
+ // initial setup
+ initialMachine := &clusterv1.MachineList{}
+ g.Eventually(func(g Gomega) {
+ // Nb. This Eventually block also forces the cache to update so that subsequent
+ // reconcile and updateControlPlane calls use the updated cache and avoids flakiness in the test.
+ g.Expect(env.List(ctx, initialMachine, client.InNamespace(cluster.Namespace))).To(Succeed())
+ g.Expect(initialMachine.Items).To(HaveLen(1))
+ }, timeout).Should(Succeed())
+ for i := range initialMachine.Items {
+ setMachineHealthy(&initialMachine.Items[i])
+ }
+
+ // change the KCP spec so the machine becomes outdated
+ kcp.Spec.Version = UpdatedVersion
+
+ // run upgrade the first time, expect we scale up
+ needingUpgrade := collections.FromMachineList(initialMachine)
+ controlPlane.Machines = needingUpgrade
+ machinesUpToDateResults := map[string]internal.UpToDateResult{}
+ for _, m := range needingUpgrade {
+ machinesUpToDateResults[m.Name] = internal.UpToDateResult{EligibleForInPlaceUpdate: false}
+ }
+ result, err = r.updateControlPlane(ctx, controlPlane, needingUpgrade, machinesUpToDateResults)
+ g.Expect(result).To(BeComparableTo(ctrl.Result{Requeue: true}))
+ g.Expect(err).ToNot(HaveOccurred())
+ bothMachines := &clusterv1.MachineList{}
+ g.Eventually(func(g Gomega) {
+ g.Expect(env.List(ctx, bothMachines, client.InNamespace(cluster.Namespace))).To(Succeed())
+ g.Expect(bothMachines.Items).To(HaveLen(2))
+ }, timeout).Should(Succeed())
+
+ // run upgrade a second time, simulate that the node has not appeared yet but the machine exists
+
+ // Unhealthy control plane will be detected during reconcile loop and upgrade will never be called.
+ controlPlane = &internal.ControlPlane{
+ KCP: kcp,
+ Cluster: cluster,
+ Machines: collections.FromMachineList(bothMachines),
+ }
+ controlPlane.InjectTestManagementCluster(r.managementCluster)
+
+ result, err = r.reconcile(context.Background(), controlPlane)
+ g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(result).To(BeComparableTo(ctrl.Result{RequeueAfter: preflightFailedRequeueAfter}))
+ g.Expect(fc.Deferrals).To(HaveKeyWithValue(
+ reconcile.Request{NamespacedName: client.ObjectKeyFromObject(kcp)},
+ BeTemporally("~", time.Now().Add(5*time.Second), 1*time.Second)),
+ )
+ g.Eventually(func(g Gomega) {
+ g.Expect(env.List(context.Background(), bothMachines, client.InNamespace(cluster.Namespace))).To(Succeed())
+ g.Expect(bothMachines.Items).To(HaveLen(2))
+ }, timeout).Should(Succeed())
+
+ // manually increase number of nodes, make control plane healthy again
+ r.managementCluster.(*fakeManagementCluster).Workload.Status.Nodes++
+ for i := range bothMachines.Items {
+ setMachineHealthy(&bothMachines.Items[i])
+ }
+ controlPlane.Machines = collections.FromMachineList(bothMachines)
+
+ machinesRequireUpgrade := collections.Machines{}
+ for i := range bothMachines.Items {
+ if bothMachines.Items[i].Spec.Version != "" && bothMachines.Items[i].Spec.Version != UpdatedVersion {
+ machinesRequireUpgrade[bothMachines.Items[i].Name] = &bothMachines.Items[i]
+ }
+ }
+ machinesUpToDateResults = map[string]internal.UpToDateResult{}
+ for _, m := range machinesRequireUpgrade {
+ machinesUpToDateResults[m.Name] = internal.UpToDateResult{EligibleForInPlaceUpdate: false}
+ }
+
+ // run upgrade the second time, expect we scale down
+ result, err = r.updateControlPlane(ctx, controlPlane, machinesRequireUpgrade, machinesUpToDateResults)
+ g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(result).To(BeComparableTo(ctrl.Result{Requeue: true}))
+ finalMachine := &clusterv1.MachineList{}
+ g.Eventually(func(g Gomega) {
+ g.Expect(env.List(ctx, finalMachine, client.InNamespace(cluster.Namespace))).To(Succeed())
+ g.Expect(finalMachine.Items).To(HaveLen(1))
+ // assert that the deleted machine is the initial machine
+ g.Expect(finalMachine.Items[0].Name).ToNot(Equal(initialMachine.Items[0].Name))
+ }, timeout).Should(Succeed())
+}
+
+func TestKubeadmControlPlaneReconciler_RolloutStrategy_ScaleDown(t *testing.T) {
+ version := "v1.17.3"
+ g := NewWithT(t)
+
+ cluster, kcp, tmpl := createClusterWithControlPlane(metav1.NamespaceDefault)
+ cluster.Spec.ControlPlaneEndpoint.Host = "nodomain.example.com1"
+ cluster.Spec.ControlPlaneEndpoint.Port = 6443
+ kcp.Spec.Replicas = ptr.To[int32](3)
+ kcp.Spec.Rollout.Strategy.RollingUpdate.MaxSurge.IntVal = 0
+ setKCPHealthy(kcp)
+
+ fmc := &fakeManagementCluster{
+ Machines: collections.Machines{},
+ Workload: &fakeWorkloadCluster{
+ Status: internal.ClusterStatus{Nodes: 3},
+ },
+ }
+ objs := []client.Object{builder.GenericInfrastructureMachineTemplateCRD, cluster.DeepCopy(), kcp.DeepCopy(), tmpl.DeepCopy()}
+ for i := range 3 {
+ name := fmt.Sprintf("test-%d", i)
+ m := &clusterv1.Machine{
+ ObjectMeta: metav1.ObjectMeta{
+ Namespace: cluster.Namespace,
+ Name: name,
+ Labels: desiredstate.ControlPlaneMachineLabels(kcp, cluster.Name),
+ },
+ Spec: clusterv1.MachineSpec{
+ Bootstrap: clusterv1.Bootstrap{
+ ConfigRef: clusterv1.ContractVersionedObjectReference{
+ APIGroup: bootstrapv1.GroupVersion.Group,
+ Kind: "KubeadmConfig",
+ Name: name,
+ },
+ },
+ Version: version,
+ },
+ }
+ cfg := &bootstrapv1.KubeadmConfig{
+ ObjectMeta: metav1.ObjectMeta{
+ Namespace: cluster.Namespace,
+ Name: name,
+ },
+ }
+ objs = append(objs, m, cfg)
+ fmc.Machines.Insert(m)
+ }
+ fakeClient := newFakeClient(objs...)
+ fmc.Reader = fakeClient
+ r := &KubeadmControlPlaneReconciler{
+ Client: fakeClient,
+ SecretCachingClient: fakeClient,
+ managementCluster: fmc,
+ managementClusterUncached: fmc,
+ }
+
+ controlPlane := &internal.ControlPlane{
+ KCP: kcp,
+ Cluster: cluster,
+ Machines: nil,
+ }
+ controlPlane.InjectTestManagementCluster(r.managementCluster)
+
+ result, err := r.reconcile(ctx, controlPlane)
+ g.Expect(result).To(BeComparableTo(ctrl.Result{}))
+ g.Expect(err).ToNot(HaveOccurred())
+
+ machineList := &clusterv1.MachineList{}
+ g.Expect(fakeClient.List(ctx, machineList, client.InNamespace(cluster.Namespace))).To(Succeed())
+ g.Expect(machineList.Items).To(HaveLen(3))
+ for i := range machineList.Items {
+ setMachineHealthy(&machineList.Items[i])
+ }
+
+ // change the KCP spec so the machine becomes outdated
+ kcp.Spec.Version = UpdatedVersion
+
+ // run upgrade, expect we scale down
+ needingUpgrade := collections.FromMachineList(machineList)
+ controlPlane.Machines = needingUpgrade
+ machinesUpToDateResults := map[string]internal.UpToDateResult{}
+ for _, m := range needingUpgrade {
+ machinesUpToDateResults[m.Name] = internal.UpToDateResult{EligibleForInPlaceUpdate: false}
+ }
+ result, err = r.updateControlPlane(ctx, controlPlane, needingUpgrade, machinesUpToDateResults)
+ g.Expect(result).To(BeComparableTo(ctrl.Result{Requeue: true}))
+ g.Expect(err).ToNot(HaveOccurred())
+ remainingMachines := &clusterv1.MachineList{}
+ g.Expect(fakeClient.List(ctx, remainingMachines, client.InNamespace(cluster.Namespace))).To(Succeed())
+ g.Expect(remainingMachines.Items).To(HaveLen(2))
+}
+
+func Test_rollingUpdate(t *testing.T) {
+ tests := []struct {
+ name string
+ maxSurge int32
+ currentReplicas int32
+ currentUpToDateReplicas int32
+ desiredReplicas int32
+ enableInPlaceUpdatesFeatureGate bool
+ machineEligibleForInPlaceUpdate bool
+ tryInPlaceUpdateFunc func(ctx context.Context, controlPlane *internal.ControlPlane, machineToInPlaceUpdate *clusterv1.Machine, machineUpToDateResult internal.UpToDateResult) (bool, ctrl.Result, error)
+ wantTryInPlaceUpdateCalled bool
+ wantScaleDownCalled bool
+ wantScaleUpCalled bool
+ wantError bool
+ wantErrorMessage string
+ wantRes ctrl.Result
+ }{
+ // Regular rollout (no in-place updates)
+ {
+ name: "Regular rollout: maxSurge 1: scale up",
+ maxSurge: 1,
+ currentReplicas: 3,
+ currentUpToDateReplicas: 0,
+ desiredReplicas: 3,
+ wantScaleUpCalled: true,
+ },
+ {
+ name: "Regular rollout: maxSurge 1: scale down",
+ maxSurge: 1,
+ currentReplicas: 4,
+ currentUpToDateReplicas: 1,
+ desiredReplicas: 3,
+ wantScaleDownCalled: true,
+ },
+ {
+ name: "Regular rollout: maxSurge 0: scale down",
+ maxSurge: 0,
+ currentReplicas: 3,
+ currentUpToDateReplicas: 0,
+ desiredReplicas: 3,
+ wantScaleDownCalled: true,
+ },
+ {
+ name: "Regular rollout: maxSurge 0: scale up",
+ maxSurge: 0,
+ currentReplicas: 2,
+ currentUpToDateReplicas: 0,
+ desiredReplicas: 3,
+ wantScaleUpCalled: true,
+ },
+ // In-place updates
+ // Note: maxSurge 0 or 1 doesn't have an impact on the in-place code path so not testing permutations here.
+ // Note: Scale up works the same way as for regular rollouts so not testing it here again.
+ //
+ // In-place updates: tryInPlaceUpdate not called
+ {
+ name: "In-place updates: feature gate disabled: scale down (tryInPlaceUpdate not called)",
+ maxSurge: 0,
+ currentReplicas: 3,
+ currentUpToDateReplicas: 0,
+ desiredReplicas: 3,
+ enableInPlaceUpdatesFeatureGate: false,
+ wantTryInPlaceUpdateCalled: false,
+ wantScaleDownCalled: true,
+ },
+ {
+ name: "In-place updates: Machine not eligible for in-place: scale down (tryInPlaceUpdate not called)",
+ maxSurge: 0,
+ currentReplicas: 3,
+ currentUpToDateReplicas: 0,
+ desiredReplicas: 3,
+ enableInPlaceUpdatesFeatureGate: true,
+ machineEligibleForInPlaceUpdate: false,
+ wantTryInPlaceUpdateCalled: false,
+ wantScaleDownCalled: true,
+ },
+ {
+ name: "In-place updates: already enough up-to-date replicas: scale down (tryInPlaceUpdate not called)",
+ maxSurge: 1,
+ currentReplicas: 4,
+ currentUpToDateReplicas: 3,
+ desiredReplicas: 3,
+ enableInPlaceUpdatesFeatureGate: true,
+ machineEligibleForInPlaceUpdate: true,
+ wantTryInPlaceUpdateCalled: false,
+ wantScaleDownCalled: true,
+ },
+ // In-place updates: tryInPlaceUpdate called
+ {
+ name: "In-place updates: tryInPlaceUpdate returns error",
+ maxSurge: 0,
+ currentReplicas: 3,
+ currentUpToDateReplicas: 0,
+ desiredReplicas: 3,
+ enableInPlaceUpdatesFeatureGate: true,
+ machineEligibleForInPlaceUpdate: true,
+ tryInPlaceUpdateFunc: func(_ context.Context, _ *internal.ControlPlane, _ *clusterv1.Machine, _ internal.UpToDateResult) (bool, ctrl.Result, error) {
+ return false, ctrl.Result{}, errors.New("in-place update error")
+ },
+ wantTryInPlaceUpdateCalled: true,
+ wantScaleDownCalled: false,
+ wantError: true,
+ wantErrorMessage: "in-place update error",
+ },
+ {
+ name: "In-place updates: tryInPlaceUpdate returns Requeue",
+ maxSurge: 0,
+ currentReplicas: 3,
+ currentUpToDateReplicas: 0,
+ desiredReplicas: 3,
+ enableInPlaceUpdatesFeatureGate: true,
+ machineEligibleForInPlaceUpdate: true,
+ tryInPlaceUpdateFunc: func(_ context.Context, _ *internal.ControlPlane, _ *clusterv1.Machine, _ internal.UpToDateResult) (fallbackToScaleDown bool, _ ctrl.Result, _ error) {
+ return false, ctrl.Result{RequeueAfter: preflightFailedRequeueAfter}, nil
+ },
+ wantTryInPlaceUpdateCalled: true,
+ wantScaleDownCalled: false,
+ wantRes: ctrl.Result{RequeueAfter: preflightFailedRequeueAfter},
+ },
+ {
+ name: "In-place updates: tryInPlaceUpdate returns fallback to scale down",
+ maxSurge: 0,
+ currentReplicas: 3,
+ currentUpToDateReplicas: 0,
+ desiredReplicas: 3,
+ enableInPlaceUpdatesFeatureGate: true,
+ machineEligibleForInPlaceUpdate: true,
+ tryInPlaceUpdateFunc: func(_ context.Context, _ *internal.ControlPlane, _ *clusterv1.Machine, _ internal.UpToDateResult) (fallbackToScaleDown bool, _ ctrl.Result, _ error) {
+ return true, ctrl.Result{}, nil
+ },
+ wantTryInPlaceUpdateCalled: true,
+ wantScaleDownCalled: true,
+ },
+ {
+ name: "In-place updates: tryInPlaceUpdate returns nothing (in-place update triggered)",
+ maxSurge: 0,
+ currentReplicas: 3,
+ currentUpToDateReplicas: 0,
+ desiredReplicas: 3,
+ enableInPlaceUpdatesFeatureGate: true,
+ machineEligibleForInPlaceUpdate: true,
+ tryInPlaceUpdateFunc: func(_ context.Context, _ *internal.ControlPlane, _ *clusterv1.Machine, _ internal.UpToDateResult) (fallbackToScaleDown bool, _ ctrl.Result, _ error) {
+ return false, ctrl.Result{}, nil
+ },
+ wantTryInPlaceUpdateCalled: true,
+ wantScaleDownCalled: false,
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+
+ if tt.enableInPlaceUpdatesFeatureGate {
+ utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.InPlaceUpdates, true)
+ }
+
+ var inPlaceUpdateCalled bool
+ var scaleDownCalled bool
+ var scaleUpCalled bool
+ r := &KubeadmControlPlaneReconciler{
+ overrideTryInPlaceUpdateFunc: func(ctx context.Context, controlPlane *internal.ControlPlane, machineToInPlaceUpdate *clusterv1.Machine, machineUpToDateResult internal.UpToDateResult) (bool, ctrl.Result, error) {
+ inPlaceUpdateCalled = true
+ return tt.tryInPlaceUpdateFunc(ctx, controlPlane, machineToInPlaceUpdate, machineUpToDateResult)
+ },
+ overrideScaleDownControlPlaneFunc: func(_ context.Context, _ *internal.ControlPlane, _ *clusterv1.Machine) (ctrl.Result, error) {
+ scaleDownCalled = true
+ return ctrl.Result{}, nil
+ },
+ overrideScaleUpControlPlaneFunc: func(_ context.Context, _ *internal.ControlPlane) (ctrl.Result, error) {
+ scaleUpCalled = true
+ return ctrl.Result{}, nil
+ },
+ }
+
+ machines := collections.Machines{}
+ for i := range tt.currentReplicas {
+ machines[fmt.Sprintf("machine-%d", i)] = machine(fmt.Sprintf("machine-%d", i))
+ }
+ machinesUpToDate := collections.Machines{}
+ for i := range tt.currentUpToDateReplicas {
+ machinesUpToDate[fmt.Sprintf("machine-%d", i)] = machine(fmt.Sprintf("machine-%d", i))
+ }
+
+ controlPlane := &internal.ControlPlane{
+ KCP: &controlplanev1.KubeadmControlPlane{
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ Replicas: ptr.To(tt.desiredReplicas),
+ Rollout: controlplanev1.KubeadmControlPlaneRolloutSpec{
+ Strategy: controlplanev1.KubeadmControlPlaneRolloutStrategy{
+ RollingUpdate: controlplanev1.KubeadmControlPlaneRolloutStrategyRollingUpdate{
+ MaxSurge: ptr.To(intstr.FromInt32(tt.maxSurge)),
+ },
+ },
+ },
+ },
+ },
+ Cluster: &clusterv1.Cluster{},
+ Machines: machines,
+ MachinesNotUpToDate: machines.Difference(machinesUpToDate),
+ }
+ machinesNeedingRollout, _ := controlPlane.MachinesNeedingRollout()
+ machinesUpToDateResults := map[string]internal.UpToDateResult{}
+ for _, m := range machinesNeedingRollout {
+ machinesUpToDateResults[m.Name] = internal.UpToDateResult{EligibleForInPlaceUpdate: tt.machineEligibleForInPlaceUpdate}
+ }
+ res, err := r.rollingUpdate(ctx, controlPlane, machinesNeedingRollout, machinesUpToDateResults)
+ if tt.wantError {
+ g.Expect(err).To(HaveOccurred())
+ g.Expect(err.Error()).To(Equal(tt.wantErrorMessage))
+ } else {
+ g.Expect(err).ToNot(HaveOccurred())
+ }
+ g.Expect(res).To(Equal(tt.wantRes))
+
+ g.Expect(inPlaceUpdateCalled).To(Equal(tt.wantTryInPlaceUpdateCalled), "inPlaceUpdateCalled: actual: %t expected: %t", inPlaceUpdateCalled, tt.wantTryInPlaceUpdateCalled)
+ g.Expect(scaleDownCalled).To(Equal(tt.wantScaleDownCalled), "scaleDownCalled: actual: %t expected: %t", scaleDownCalled, tt.wantScaleDownCalled)
+ g.Expect(scaleUpCalled).To(Equal(tt.wantScaleUpCalled), "scaleUpCalled: actual: %t expected: %t", scaleUpCalled, tt.wantScaleUpCalled)
+ })
+ }
+}
+
+type machineOpt func(*clusterv1.Machine)
+
+func machine(name string, opts ...machineOpt) *clusterv1.Machine {
+ m := &clusterv1.Machine{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: name,
+ Namespace: metav1.NamespaceDefault,
+ },
+ }
+ for _, opt := range opts {
+ opt(m)
+ }
+ return m
+}
diff --git a/controlplane/kubeadm/internal/controllers/upgrade.go b/controlplane/kubeadm/internal/controllers/upgrade.go
deleted file mode 100644
index d267a4205e0e..000000000000
--- a/controlplane/kubeadm/internal/controllers/upgrade.go
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
-Copyright 2020 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"
-
- "github.com/blang/semver/v4"
- "github.com/pkg/errors"
- "k8s.io/klog/v2"
- ctrl "sigs.k8s.io/controller-runtime"
-
- bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
- controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
- "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal"
- "sigs.k8s.io/cluster-api/util/collections"
-)
-
-func (r *KubeadmControlPlaneReconciler) upgradeControlPlane(
- ctx context.Context,
- controlPlane *internal.ControlPlane,
- machinesRequireUpgrade collections.Machines,
-) (ctrl.Result, error) {
- logger := ctrl.LoggerFrom(ctx)
-
- // TODO: handle reconciliation of etcd members and kubeadm config in case they get out of sync with cluster
-
- workloadCluster, err := controlPlane.GetWorkloadCluster(ctx)
- if err != nil {
- logger.Error(err, "failed to get remote client for workload cluster", "Cluster", klog.KObj(controlPlane.Cluster))
- return ctrl.Result{}, err
- }
-
- parsedVersion, err := semver.ParseTolerant(controlPlane.KCP.Spec.Version)
- if err != nil {
- return ctrl.Result{}, errors.Wrapf(err, "failed to parse kubernetes version %q", controlPlane.KCP.Spec.Version)
- }
-
- // Ensure kubeadm clusterRoleBinding for v1.29+ as per https://github.com/kubernetes/kubernetes/pull/121305
- if err := workloadCluster.AllowClusterAdminPermissions(ctx, parsedVersion); err != nil {
- return ctrl.Result{}, errors.Wrap(err, "failed to set cluster-admin ClusterRoleBinding for kubeadm")
- }
-
- kubeadmCMMutators := make([]func(*bootstrapv1.ClusterConfiguration), 0)
-
- if controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.IsDefined() {
- // Get the imageRepository or the correct value if nothing is set and a migration is necessary.
- imageRepository := internal.ImageRepositoryFromClusterConfig(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration)
-
- kubeadmCMMutators = append(kubeadmCMMutators,
- workloadCluster.UpdateImageRepositoryInKubeadmConfigMap(imageRepository),
- workloadCluster.UpdateFeatureGatesInKubeadmConfigMap(controlPlane.KCP.Spec.KubeadmConfigSpec, parsedVersion),
- workloadCluster.UpdateAPIServerInKubeadmConfigMap(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.APIServer),
- workloadCluster.UpdateControllerManagerInKubeadmConfigMap(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.ControllerManager),
- workloadCluster.UpdateSchedulerInKubeadmConfigMap(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.Scheduler),
- workloadCluster.UpdateCertificateValidityPeriodDays(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.CertificateValidityPeriodDays))
-
- // Etcd local and external are mutually exclusive and they cannot be switched, once set.
- if controlPlane.IsEtcdManaged() {
- kubeadmCMMutators = append(kubeadmCMMutators,
- workloadCluster.UpdateEtcdLocalInKubeadmConfigMap(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local))
- } else {
- kubeadmCMMutators = append(kubeadmCMMutators,
- workloadCluster.UpdateEtcdExternalInKubeadmConfigMap(controlPlane.KCP.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.External))
- }
- }
-
- // collectively update Kubeadm config map
- if err = workloadCluster.UpdateClusterConfiguration(ctx, parsedVersion, kubeadmCMMutators...); err != nil {
- return ctrl.Result{}, err
- }
-
- switch controlPlane.KCP.Spec.Rollout.Strategy.Type {
- case controlplanev1.RollingUpdateStrategyType:
- // RolloutStrategy is currently defaulted and validated to be RollingUpdate
- // We can ignore MaxUnavailable because we are enforcing health checks before we get here.
- maxNodes := *controlPlane.KCP.Spec.Replicas + int32(controlPlane.KCP.Spec.Rollout.Strategy.RollingUpdate.MaxSurge.IntValue())
- if int32(controlPlane.Machines.Len()) < maxNodes {
- // scaleUp ensures that we don't continue scaling up while waiting for Machines to have NodeRefs
- return r.scaleUpControlPlane(ctx, controlPlane)
- }
- return r.scaleDownControlPlane(ctx, controlPlane, machinesRequireUpgrade)
- default:
- logger.Info("RolloutStrategy type is not set to RollingUpdate, unable to determine the strategy for rolling out machines")
- return ctrl.Result{}, nil
- }
-}
diff --git a/controlplane/kubeadm/internal/controllers/upgrade_test.go b/controlplane/kubeadm/internal/controllers/upgrade_test.go
deleted file mode 100644
index c841da58c0c2..000000000000
--- a/controlplane/kubeadm/internal/controllers/upgrade_test.go
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
-Copyright 2020 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"
- "time"
-
- . "github.com/onsi/gomega"
- corev1 "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/types"
- "k8s.io/client-go/tools/record"
- "k8s.io/utils/ptr"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/client"
-
- bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
- "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal"
- "sigs.k8s.io/cluster-api/internal/util/ssa"
- "sigs.k8s.io/cluster-api/util"
- "sigs.k8s.io/cluster-api/util/collections"
- "sigs.k8s.io/cluster-api/util/test/builder"
-)
-
-const (
- UpdatedVersion string = "v1.17.4"
- Host string = "nodomain.example.com"
-)
-
-func TestKubeadmControlPlaneReconciler_RolloutStrategy_ScaleUp(t *testing.T) {
- setup := func(t *testing.T, g *WithT) *corev1.Namespace {
- t.Helper()
-
- t.Log("Creating the namespace")
- ns, err := env.CreateNamespace(ctx, "test-kcp-reconciler-rollout-scaleup")
- g.Expect(err).ToNot(HaveOccurred())
-
- return ns
- }
-
- teardown := func(t *testing.T, g *WithT, ns *corev1.Namespace) {
- t.Helper()
-
- t.Log("Deleting the namespace")
- g.Expect(env.Delete(ctx, ns)).To(Succeed())
- }
-
- g := NewWithT(t)
- namespace := setup(t, g)
- defer teardown(t, g, namespace)
-
- timeout := 30 * time.Second
-
- cluster, kcp, genericInfrastructureMachineTemplate := createClusterWithControlPlane(namespace.Name)
- g.Expect(env.CreateAndWait(ctx, genericInfrastructureMachineTemplate, client.FieldOwner("manager"))).To(Succeed())
- cluster.UID = types.UID(util.RandomString(10))
- cluster.Spec.ControlPlaneEndpoint.Host = Host
- cluster.Spec.ControlPlaneEndpoint.Port = 6443
- cluster.Status.Initialization.InfrastructureProvisioned = ptr.To(true)
- kcp.UID = types.UID(util.RandomString(10))
- kcp.Spec.Replicas = ptr.To[int32](1)
- setKCPHealthy(kcp)
-
- r := &KubeadmControlPlaneReconciler{
- Client: env,
- SecretCachingClient: secretCachingClient,
- recorder: record.NewFakeRecorder(32),
- managementCluster: &fakeManagementCluster{
- Management: &internal.Management{Client: env},
- Workload: &fakeWorkloadCluster{
- Status: internal.ClusterStatus{Nodes: 1},
- },
- },
- managementClusterUncached: &fakeManagementCluster{
- Management: &internal.Management{Client: env},
- Workload: &fakeWorkloadCluster{
- Status: internal.ClusterStatus{Nodes: 1},
- },
- },
- ssaCache: ssa.NewCache("test-controller"),
- }
- controlPlane := &internal.ControlPlane{
- KCP: kcp,
- Cluster: cluster,
- Machines: nil,
- }
- controlPlane.InjectTestManagementCluster(r.managementCluster)
-
- result, err := r.initializeControlPlane(ctx, controlPlane)
- g.Expect(result).To(BeComparableTo(ctrl.Result{Requeue: true}))
- g.Expect(err).ToNot(HaveOccurred())
-
- // initial setup
- initialMachine := &clusterv1.MachineList{}
- g.Eventually(func(g Gomega) {
- // Nb. This Eventually block also forces the cache to update so that subsequent
- // reconcile and upgradeControlPlane calls use the updated cache and avoids flakiness in the test.
- g.Expect(env.List(ctx, initialMachine, client.InNamespace(cluster.Namespace))).To(Succeed())
- g.Expect(initialMachine.Items).To(HaveLen(1))
- }, timeout).Should(Succeed())
- for i := range initialMachine.Items {
- setMachineHealthy(&initialMachine.Items[i])
- }
-
- // change the KCP spec so the machine becomes outdated
- kcp.Spec.Version = UpdatedVersion
-
- // run upgrade the first time, expect we scale up
- needingUpgrade := collections.FromMachineList(initialMachine)
- controlPlane.Machines = needingUpgrade
- result, err = r.upgradeControlPlane(ctx, controlPlane, needingUpgrade)
- g.Expect(result).To(BeComparableTo(ctrl.Result{Requeue: true}))
- g.Expect(err).ToNot(HaveOccurred())
- bothMachines := &clusterv1.MachineList{}
- g.Eventually(func(g Gomega) {
- g.Expect(env.List(ctx, bothMachines, client.InNamespace(cluster.Namespace))).To(Succeed())
- g.Expect(bothMachines.Items).To(HaveLen(2))
- }, timeout).Should(Succeed())
-
- // run upgrade a second time, simulate that the node has not appeared yet but the machine exists
-
- // Unhealthy control plane will be detected during reconcile loop and upgrade will never be called.
- controlPlane = &internal.ControlPlane{
- KCP: kcp,
- Cluster: cluster,
- Machines: collections.FromMachineList(bothMachines),
- }
- controlPlane.InjectTestManagementCluster(r.managementCluster)
-
- result, err = r.reconcile(context.Background(), controlPlane)
- g.Expect(err).ToNot(HaveOccurred())
- g.Expect(result).To(BeComparableTo(ctrl.Result{RequeueAfter: preflightFailedRequeueAfter}))
- g.Eventually(func(g Gomega) {
- g.Expect(env.List(context.Background(), bothMachines, client.InNamespace(cluster.Namespace))).To(Succeed())
- g.Expect(bothMachines.Items).To(HaveLen(2))
- }, timeout).Should(Succeed())
-
- // manually increase number of nodes, make control plane healthy again
- r.managementCluster.(*fakeManagementCluster).Workload.Status.Nodes++
- for i := range bothMachines.Items {
- setMachineHealthy(&bothMachines.Items[i])
- }
- controlPlane.Machines = collections.FromMachineList(bothMachines)
-
- machinesRequireUpgrade := collections.Machines{}
- for i := range bothMachines.Items {
- if bothMachines.Items[i].Spec.Version != "" && bothMachines.Items[i].Spec.Version != UpdatedVersion {
- machinesRequireUpgrade[bothMachines.Items[i].Name] = &bothMachines.Items[i]
- }
- }
-
- // run upgrade the second time, expect we scale down
- result, err = r.upgradeControlPlane(ctx, controlPlane, machinesRequireUpgrade)
- g.Expect(err).ToNot(HaveOccurred())
- g.Expect(result).To(BeComparableTo(ctrl.Result{Requeue: true}))
- finalMachine := &clusterv1.MachineList{}
- g.Eventually(func(g Gomega) {
- g.Expect(env.List(ctx, finalMachine, client.InNamespace(cluster.Namespace))).To(Succeed())
- g.Expect(finalMachine.Items).To(HaveLen(1))
- // assert that the deleted machine is the initial machine
- g.Expect(finalMachine.Items[0].Name).ToNot(Equal(initialMachine.Items[0].Name))
- }, timeout).Should(Succeed())
-}
-
-func TestKubeadmControlPlaneReconciler_RolloutStrategy_ScaleDown(t *testing.T) {
- version := "v1.17.3"
- g := NewWithT(t)
-
- cluster, kcp, tmpl := createClusterWithControlPlane(metav1.NamespaceDefault)
- cluster.Spec.ControlPlaneEndpoint.Host = "nodomain.example.com1"
- cluster.Spec.ControlPlaneEndpoint.Port = 6443
- kcp.Spec.Replicas = ptr.To[int32](3)
- kcp.Spec.Rollout.Strategy.RollingUpdate.MaxSurge.IntVal = 0
- setKCPHealthy(kcp)
-
- fmc := &fakeManagementCluster{
- Machines: collections.Machines{},
- Workload: &fakeWorkloadCluster{
- Status: internal.ClusterStatus{Nodes: 3},
- },
- }
- objs := []client.Object{builder.GenericInfrastructureMachineTemplateCRD, cluster.DeepCopy(), kcp.DeepCopy(), tmpl.DeepCopy()}
- for i := range 3 {
- name := fmt.Sprintf("test-%d", i)
- m := &clusterv1.Machine{
- ObjectMeta: metav1.ObjectMeta{
- Namespace: cluster.Namespace,
- Name: name,
- Labels: internal.ControlPlaneMachineLabelsForCluster(kcp, cluster.Name),
- },
- Spec: clusterv1.MachineSpec{
- Bootstrap: clusterv1.Bootstrap{
- ConfigRef: clusterv1.ContractVersionedObjectReference{
- APIGroup: bootstrapv1.GroupVersion.Group,
- Kind: "KubeadmConfig",
- Name: name,
- },
- },
- Version: version,
- },
- }
- cfg := &bootstrapv1.KubeadmConfig{
- ObjectMeta: metav1.ObjectMeta{
- Namespace: cluster.Namespace,
- Name: name,
- },
- }
- objs = append(objs, m, cfg)
- fmc.Machines.Insert(m)
- }
- fakeClient := newFakeClient(objs...)
- fmc.Reader = fakeClient
- r := &KubeadmControlPlaneReconciler{
- Client: fakeClient,
- SecretCachingClient: fakeClient,
- managementCluster: fmc,
- managementClusterUncached: fmc,
- }
-
- controlPlane := &internal.ControlPlane{
- KCP: kcp,
- Cluster: cluster,
- Machines: nil,
- }
- controlPlane.InjectTestManagementCluster(r.managementCluster)
-
- result, err := r.reconcile(ctx, controlPlane)
- g.Expect(result).To(BeComparableTo(ctrl.Result{}))
- g.Expect(err).ToNot(HaveOccurred())
-
- machineList := &clusterv1.MachineList{}
- g.Expect(fakeClient.List(ctx, machineList, client.InNamespace(cluster.Namespace))).To(Succeed())
- g.Expect(machineList.Items).To(HaveLen(3))
- for i := range machineList.Items {
- setMachineHealthy(&machineList.Items[i])
- }
-
- // change the KCP spec so the machine becomes outdated
- kcp.Spec.Version = UpdatedVersion
-
- // run upgrade, expect we scale down
- needingUpgrade := collections.FromMachineList(machineList)
- controlPlane.Machines = needingUpgrade
-
- result, err = r.upgradeControlPlane(ctx, controlPlane, needingUpgrade)
- g.Expect(result).To(BeComparableTo(ctrl.Result{Requeue: true}))
- g.Expect(err).ToNot(HaveOccurred())
- remainingMachines := &clusterv1.MachineList{}
- g.Expect(fakeClient.List(ctx, remainingMachines, client.InNamespace(cluster.Namespace))).To(Succeed())
- g.Expect(remainingMachines.Items).To(HaveLen(2))
-}
-
-type machineOpt func(*clusterv1.Machine)
-
-func machine(name string, opts ...machineOpt) *clusterv1.Machine {
- m := &clusterv1.Machine{
- ObjectMeta: metav1.ObjectMeta{
- Name: name,
- Namespace: metav1.NamespaceDefault,
- },
- }
- for _, opt := range opts {
- opt(m)
- }
- return m
-}
diff --git a/controlplane/kubeadm/internal/desiredstate/desired_state.go b/controlplane/kubeadm/internal/desiredstate/desired_state.go
new file mode 100644
index 000000000000..5449f7cb9129
--- /dev/null
+++ b/controlplane/kubeadm/internal/desiredstate/desired_state.go
@@ -0,0 +1,341 @@
+/*
+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 desiredstate contains utils to compute the desired state of a Machine.
+package desiredstate
+
+import (
+ "context"
+ "strings"
+
+ "github.com/blang/semver/v4"
+ "github.com/pkg/errors"
+ corev1 "k8s.io/api/core/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/apimachinery/pkg/util/sets"
+ "sigs.k8s.io/controller-runtime/pkg/client"
+
+ bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
+ controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ "sigs.k8s.io/cluster-api/controllers/external"
+ "sigs.k8s.io/cluster-api/internal/contract"
+ topologynames "sigs.k8s.io/cluster-api/internal/topology/names"
+ "sigs.k8s.io/cluster-api/util"
+ "sigs.k8s.io/cluster-api/util/labels/format"
+ "sigs.k8s.io/cluster-api/util/version"
+)
+
+var (
+ // minKubernetesVersionControlPlaneKubeletLocalMode is the min version from which
+ // we will enable the ControlPlaneKubeletLocalMode kubeadm feature gate.
+ // Note: We have to do this with Kubernetes 1.31. Because with that version we encountered
+ // a case where it's not okay anymore to ignore the Kubernetes version skew (kubelet 1.31 uses
+ // the spec.clusterIP field selector that is only implemented in kube-apiserver >= 1.31.0).
+ minKubernetesVersionControlPlaneKubeletLocalMode = semver.MustParse("1.31.0")
+
+ // ControlPlaneKubeletLocalMode is a feature gate of kubeadm that ensures
+ // kubelets only communicate with the local apiserver.
+ ControlPlaneKubeletLocalMode = "ControlPlaneKubeletLocalMode"
+)
+
+// MandatoryMachineReadinessGates are readinessGates KCP enforces to be set on machine it owns.
+var MandatoryMachineReadinessGates = []clusterv1.MachineReadinessGate{
+ {ConditionType: controlplanev1.KubeadmControlPlaneMachineAPIServerPodHealthyCondition},
+ {ConditionType: controlplanev1.KubeadmControlPlaneMachineControllerManagerPodHealthyCondition},
+ {ConditionType: controlplanev1.KubeadmControlPlaneMachineSchedulerPodHealthyCondition},
+}
+
+// etcdMandatoryMachineReadinessGates are readinessGates KCP enforces to be set on machine it owns if etcd is managed.
+var etcdMandatoryMachineReadinessGates = []clusterv1.MachineReadinessGate{
+ {ConditionType: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition},
+ {ConditionType: controlplanev1.KubeadmControlPlaneMachineEtcdMemberHealthyCondition},
+}
+
+// kubeadmClusterConfigurationAnnotation is an annotation that was set in Cluster API <= v1.11.
+// Starting with Cluster API v1.12 we remove it from existing Machines.
+//
+// Deprecated: This constant and corresponding cleanup code can be removed once we don't support upgrades from Cluster API v1.12 anymore.
+const kubeadmClusterConfigurationAnnotation = "controlplane.cluster.x-k8s.io/kubeadm-cluster-configuration"
+
+// ComputeDesiredMachine computes the desired Machine.
+// This Machine will be used during reconciliation to:
+// * create a new Machine
+// * update an existing Machine
+// Because we are using Server-Side-Apply we always have to calculate the full object.
+// There are small differences in how we calculate the Machine depending on if it
+// is a create or update. Example: for a new Machine we have to calculate a new name,
+// while for an existing Machine we have to use the name of the existing Machine.
+func ComputeDesiredMachine(kcp *controlplanev1.KubeadmControlPlane, cluster *clusterv1.Cluster, failureDomain string, existingMachine *clusterv1.Machine) (*clusterv1.Machine, error) {
+ var machineName string
+ var machineUID types.UID
+ var version string
+ annotations := map[string]string{}
+ if existingMachine == nil {
+ // Creating a new machine
+ nameTemplate := "{{ .kubeadmControlPlane.name }}-{{ .random }}"
+ if kcp.Spec.MachineNaming.Template != "" {
+ nameTemplate = kcp.Spec.MachineNaming.Template
+ if !strings.Contains(nameTemplate, "{{ .random }}") {
+ return nil, errors.New("failed to compute desired Machine: cannot generate Machine name: {{ .random }} is missing in machineNaming.template")
+ }
+ }
+ generatedMachineName, err := topologynames.KCPMachineNameGenerator(nameTemplate, cluster.Name, kcp.Name).GenerateName()
+ if err != nil {
+ return nil, errors.Wrap(err, "failed to compute desired Machine: failed to generate Machine name")
+ }
+ machineName = generatedMachineName
+ version = kcp.Spec.Version
+
+ // In case this machine is being created as a consequence of a remediation, then add an annotation
+ // tracking remediating data.
+ // NOTE: This is required in order to track remediation retries.
+ if remediationData, ok := kcp.Annotations[controlplanev1.RemediationInProgressAnnotation]; ok {
+ annotations[controlplanev1.RemediationForAnnotation] = remediationData
+ }
+ } else {
+ // Updating an existing machine
+ machineName = existingMachine.Name
+ machineUID = existingMachine.UID
+ version = existingMachine.Spec.Version
+
+ // Cleanup the KubeadmClusterConfigurationAnnotation annotation that was set in Cluster API <= v1.11.
+ delete(annotations, kubeadmClusterConfigurationAnnotation)
+
+ // If the machine already has remediation data then preserve it.
+ // NOTE: This is required in order to track remediation retries.
+ if remediationData, ok := existingMachine.Annotations[controlplanev1.RemediationForAnnotation]; ok {
+ annotations[controlplanev1.RemediationForAnnotation] = remediationData
+ }
+ }
+ // Setting pre-terminate hook so we can later remove the etcd member right before Machine termination
+ // (i.e. before InfraMachine deletion).
+ annotations[controlplanev1.PreTerminateHookCleanupAnnotation] = ""
+
+ // Construct the basic Machine.
+ desiredMachine := &clusterv1.Machine{
+ TypeMeta: metav1.TypeMeta{
+ APIVersion: clusterv1.GroupVersion.String(),
+ Kind: "Machine",
+ },
+ ObjectMeta: metav1.ObjectMeta{
+ UID: machineUID,
+ Name: machineName,
+ Namespace: kcp.Namespace,
+ // Note: by setting the ownerRef on creation we signal to the Machine controller that this is not a stand-alone Machine.
+ OwnerReferences: []metav1.OwnerReference{
+ *metav1.NewControllerRef(kcp, controlplanev1.GroupVersion.WithKind("KubeadmControlPlane")),
+ },
+ },
+ Spec: clusterv1.MachineSpec{
+ ClusterName: cluster.Name,
+ Version: version,
+ FailureDomain: failureDomain,
+ },
+ }
+
+ // Set the in-place mutable fields.
+ // When we create a new Machine we will just create the Machine with those fields.
+ // When we update an existing Machine will we update the fields on the existing Machine (in-place mutate).
+
+ // Set labels
+ desiredMachine.Labels = ControlPlaneMachineLabels(kcp, cluster.Name)
+
+ // Set annotations
+ desiredMachine.Annotations = ControlPlaneMachineAnnotations(kcp)
+ for k, v := range annotations {
+ desiredMachine.Annotations[k] = v
+ }
+
+ // Set other in-place mutable fields
+ desiredMachine.Spec.Deletion.NodeDrainTimeoutSeconds = kcp.Spec.MachineTemplate.Spec.Deletion.NodeDrainTimeoutSeconds
+ desiredMachine.Spec.Deletion.NodeDeletionTimeoutSeconds = kcp.Spec.MachineTemplate.Spec.Deletion.NodeDeletionTimeoutSeconds
+ desiredMachine.Spec.Deletion.NodeVolumeDetachTimeoutSeconds = kcp.Spec.MachineTemplate.Spec.Deletion.NodeVolumeDetachTimeoutSeconds
+
+ // Note: We intentionally don't set "minReadySeconds" on Machines because we consider it enough to have machine availability driven by readiness of control plane components.
+ if existingMachine != nil {
+ desiredMachine.Spec.InfrastructureRef = existingMachine.Spec.InfrastructureRef
+ desiredMachine.Spec.Bootstrap.ConfigRef = existingMachine.Spec.Bootstrap.ConfigRef
+ }
+
+ // Set machines readiness gates
+ allReadinessGates := []clusterv1.MachineReadinessGate{}
+ allReadinessGates = append(allReadinessGates, MandatoryMachineReadinessGates...)
+ isEtcdManaged := !kcp.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.External.IsDefined()
+ if isEtcdManaged {
+ allReadinessGates = append(allReadinessGates, etcdMandatoryMachineReadinessGates...)
+ }
+ allReadinessGates = append(allReadinessGates, kcp.Spec.MachineTemplate.Spec.ReadinessGates...)
+
+ desiredMachine.Spec.ReadinessGates = []clusterv1.MachineReadinessGate{}
+ knownGates := sets.Set[string]{}
+ for _, gate := range allReadinessGates {
+ if knownGates.Has(gate.ConditionType) {
+ continue
+ }
+ desiredMachine.Spec.ReadinessGates = append(desiredMachine.Spec.ReadinessGates, gate)
+ knownGates.Insert(gate.ConditionType)
+ }
+
+ return desiredMachine, nil
+}
+
+// ComputeDesiredKubeadmConfig computes the desired KubeadmConfig.
+func ComputeDesiredKubeadmConfig(kcp *controlplanev1.KubeadmControlPlane, cluster *clusterv1.Cluster, isJoin bool, name string, existingKubeadmConfig *bootstrapv1.KubeadmConfig) (*bootstrapv1.KubeadmConfig, error) {
+ // Create an owner reference without a controller reference because the owning controller is the machine controller
+ var ownerReferences []metav1.OwnerReference
+ if existingKubeadmConfig == nil || !util.HasOwner(existingKubeadmConfig.OwnerReferences, clusterv1.GroupVersion.String(), []string{"Machine"}) {
+ ownerReferences = append(ownerReferences, metav1.OwnerReference{
+ APIVersion: controlplanev1.GroupVersion.String(),
+ Kind: "KubeadmControlPlane",
+ Name: kcp.Name,
+ UID: kcp.UID,
+ })
+ }
+
+ spec := kcp.Spec.KubeadmConfigSpec.DeepCopy()
+ if isJoin {
+ // Note: When building a KubeadmConfig for a joining CP machine empty out the unnecessary InitConfiguration.
+ spec.InitConfiguration = bootstrapv1.InitConfiguration{}
+ // Note: For the joining we are preserving the ClusterConfiguration in order to determine if the
+ // cluster is using an external etcd in the kubeadm bootstrap provider (even if this is not required by kubeadm Join).
+ // Note: We are always setting JoinConfiguration.ControlPlane so we can later identify this KubeadmConfig as a
+ // join KubeadmConfig.
+ if spec.JoinConfiguration.ControlPlane == nil {
+ spec.JoinConfiguration.ControlPlane = &bootstrapv1.JoinControlPlane{}
+ }
+ } else {
+ // Note: When building a KubeadmConfig for the first CP machine empty out the unnecessary JoinConfiguration.
+ spec.JoinConfiguration = bootstrapv1.JoinConfiguration{}
+ }
+
+ parsedVersion, err := semver.ParseTolerant(kcp.Spec.Version)
+ if err != nil {
+ return nil, errors.Wrapf(err, "failed to compute desired KubeadmConfig: failed to parse Kubernetes version %q", kcp.Spec.Version)
+ }
+ DefaultFeatureGates(spec, parsedVersion)
+
+ kubeadmConfig := &bootstrapv1.KubeadmConfig{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: name,
+ Namespace: kcp.Namespace,
+ Labels: ControlPlaneMachineLabels(kcp, cluster.Name),
+ Annotations: ControlPlaneMachineAnnotations(kcp),
+ OwnerReferences: ownerReferences,
+ },
+ Spec: *spec,
+ }
+ if existingKubeadmConfig != nil {
+ kubeadmConfig.SetUID(existingKubeadmConfig.GetUID())
+ }
+ return kubeadmConfig, nil
+}
+
+// ComputeDesiredInfraMachine computes the desired InfraMachine.
+func ComputeDesiredInfraMachine(ctx context.Context, c client.Client, kcp *controlplanev1.KubeadmControlPlane, cluster *clusterv1.Cluster, name string, existingInfraMachine *unstructured.Unstructured) (*unstructured.Unstructured, error) {
+ // Create an owner reference without a controller reference because the owning controller is the machine controller
+ var ownerReference *metav1.OwnerReference
+ if existingInfraMachine == nil || !util.HasOwner(existingInfraMachine.GetOwnerReferences(), clusterv1.GroupVersion.String(), []string{"Machine"}) {
+ ownerReference = &metav1.OwnerReference{
+ APIVersion: controlplanev1.GroupVersion.String(),
+ Kind: "KubeadmControlPlane",
+ Name: kcp.Name,
+ UID: kcp.UID,
+ }
+ }
+
+ apiVersion, err := contract.GetAPIVersion(ctx, c, kcp.Spec.MachineTemplate.Spec.InfrastructureRef.GroupKind())
+ if err != nil {
+ return nil, errors.Wrap(err, "failed to compute desired InfraMachine")
+ }
+ templateRef := &corev1.ObjectReference{
+ APIVersion: apiVersion,
+ Kind: kcp.Spec.MachineTemplate.Spec.InfrastructureRef.Kind,
+ Namespace: kcp.Namespace,
+ Name: kcp.Spec.MachineTemplate.Spec.InfrastructureRef.Name,
+ }
+
+ template, err := external.Get(ctx, c, templateRef)
+ if err != nil {
+ return nil, errors.Wrap(err, "failed to compute desired InfraMachine")
+ }
+ generateTemplateInput := &external.GenerateTemplateInput{
+ Template: template,
+ TemplateRef: templateRef,
+ Namespace: kcp.Namespace,
+ Name: name,
+ ClusterName: cluster.Name,
+ OwnerRef: ownerReference,
+ Labels: ControlPlaneMachineLabels(kcp, cluster.Name),
+ Annotations: ControlPlaneMachineAnnotations(kcp),
+ }
+ infraMachine, err := external.GenerateTemplate(generateTemplateInput)
+ if err != nil {
+ return nil, errors.Wrap(err, "failed to compute desired InfraMachine")
+ }
+ if existingInfraMachine != nil {
+ infraMachine.SetUID(existingInfraMachine.GetUID())
+ }
+ return infraMachine, nil
+}
+
+// DefaultFeatureGates defaults the feature gates field.
+func DefaultFeatureGates(kubeadmConfigSpec *bootstrapv1.KubeadmConfigSpec, kubernetesVersion semver.Version) {
+ if version.Compare(kubernetesVersion, minKubernetesVersionControlPlaneKubeletLocalMode, version.WithoutPreReleases()) < 0 {
+ return
+ }
+
+ if kubeadmConfigSpec.ClusterConfiguration.FeatureGates == nil {
+ kubeadmConfigSpec.ClusterConfiguration.FeatureGates = map[string]bool{}
+ }
+
+ if _, ok := kubeadmConfigSpec.ClusterConfiguration.FeatureGates[ControlPlaneKubeletLocalMode]; !ok {
+ kubeadmConfigSpec.ClusterConfiguration.FeatureGates[ControlPlaneKubeletLocalMode] = true
+ }
+}
+
+// ControlPlaneMachineLabels returns a set of labels to add to a control plane machine for this specific cluster.
+func ControlPlaneMachineLabels(kcp *controlplanev1.KubeadmControlPlane, clusterName string) map[string]string {
+ labels := map[string]string{}
+
+ // Add the labels from the MachineTemplate.
+ // Note: we intentionally don't use the map directly to ensure we don't modify the map in KCP.
+ for k, v := range kcp.Spec.MachineTemplate.ObjectMeta.Labels {
+ labels[k] = v
+ }
+
+ // Always force these labels over the ones coming from the spec.
+ labels[clusterv1.ClusterNameLabel] = clusterName
+ labels[clusterv1.MachineControlPlaneLabel] = ""
+ // Note: MustFormatValue is used here as the label value can be a hash if the control plane name is longer than 63 characters.
+ labels[clusterv1.MachineControlPlaneNameLabel] = format.MustFormatValue(kcp.Name)
+ return labels
+}
+
+// ControlPlaneMachineAnnotations returns a set of annotations to add to a control plane machine for this specific cluster.
+func ControlPlaneMachineAnnotations(kcp *controlplanev1.KubeadmControlPlane) map[string]string {
+ annotations := map[string]string{}
+
+ // Add the annotations from the MachineTemplate.
+ // Note: we intentionally don't use the map directly to ensure we don't modify the map in KCP.
+ for k, v := range kcp.Spec.MachineTemplate.ObjectMeta.Annotations {
+ annotations[k] = v
+ }
+
+ return annotations
+}
diff --git a/controlplane/kubeadm/internal/desiredstate/desired_state_test.go b/controlplane/kubeadm/internal/desiredstate/desired_state_test.go
new file mode 100644
index 000000000000..b7d5de7f8091
--- /dev/null
+++ b/controlplane/kubeadm/internal/desiredstate/desired_state_test.go
@@ -0,0 +1,885 @@
+/*
+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 desiredstate
+
+import (
+ "fmt"
+ "testing"
+
+ "github.com/blang/semver/v4"
+ . "github.com/onsi/gomega"
+ gomegatypes "github.com/onsi/gomega/types"
+ apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/utils/ptr"
+ "sigs.k8s.io/controller-runtime/pkg/client/fake"
+
+ bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
+ controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ "sigs.k8s.io/cluster-api/util/test/builder"
+)
+
+func Test_ComputeDesiredMachine(t *testing.T) {
+ namingTemplateKey := "-kcp"
+ kcpName := "testControlPlane"
+ clusterName := "testCluster"
+
+ cluster := &clusterv1.Cluster{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: clusterName,
+ Namespace: metav1.NamespaceDefault,
+ },
+ }
+ duration5s := ptr.To(int32(5))
+ duration10s := ptr.To(int32(10))
+ kcpMachineTemplateObjectMeta := clusterv1.ObjectMeta{
+ Labels: map[string]string{
+ "machineTemplateLabel": "machineTemplateLabelValue",
+ },
+ Annotations: map[string]string{
+ "machineTemplateAnnotation": "machineTemplateAnnotationValue",
+ },
+ }
+ kcpMachineTemplateObjectMetaCopy := kcpMachineTemplateObjectMeta.DeepCopy()
+
+ infraRef := &clusterv1.ContractVersionedObjectReference{
+ Kind: "InfraKind",
+ APIGroup: clusterv1.GroupVersionInfrastructure.Group,
+ Name: "infra",
+ }
+ bootstrapRef := clusterv1.ContractVersionedObjectReference{
+ Kind: "BootstrapKind",
+ APIGroup: clusterv1.GroupVersionBootstrap.Group,
+ Name: "bootstrap",
+ }
+
+ tests := []struct {
+ name string
+ kcp *controlplanev1.KubeadmControlPlane
+ isUpdatingExistingMachine bool
+ want []gomegatypes.GomegaMatcher
+ wantErr bool
+ }{
+ {
+ name: "should return the correct Machine object when creating a new Machine",
+ kcp: &controlplanev1.KubeadmControlPlane{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: kcpName,
+ Namespace: cluster.Namespace,
+ },
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ Version: "v1.16.6",
+ MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
+ ObjectMeta: kcpMachineTemplateObjectMeta,
+ Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
+ ReadinessGates: []clusterv1.MachineReadinessGate{
+ {
+ ConditionType: "Foo",
+ },
+ },
+ Deletion: controlplanev1.KubeadmControlPlaneMachineTemplateDeletionSpec{
+ NodeDrainTimeoutSeconds: duration5s,
+ NodeDeletionTimeoutSeconds: duration5s,
+ NodeVolumeDetachTimeoutSeconds: duration5s,
+ },
+ },
+ },
+ KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ CertificatesDir: "foo",
+ },
+ },
+ MachineNaming: controlplanev1.MachineNamingSpec{
+ Template: "{{ .kubeadmControlPlane.name }}" + namingTemplateKey + "-{{ .random }}",
+ },
+ },
+ },
+ isUpdatingExistingMachine: false,
+ want: []gomegatypes.GomegaMatcher{
+ HavePrefix(kcpName + namingTemplateKey),
+ Not(HaveSuffix("00000")),
+ },
+ wantErr: false,
+ },
+ {
+ name: "should return error when creating a new Machine when '.random' is not added in template",
+ kcp: &controlplanev1.KubeadmControlPlane{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: kcpName,
+ Namespace: cluster.Namespace,
+ },
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ Version: "v1.16.6",
+ MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
+ ObjectMeta: kcpMachineTemplateObjectMeta,
+ Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
+ Deletion: controlplanev1.KubeadmControlPlaneMachineTemplateDeletionSpec{
+ NodeDrainTimeoutSeconds: duration5s,
+ NodeDeletionTimeoutSeconds: duration5s,
+ NodeVolumeDetachTimeoutSeconds: duration5s,
+ },
+ },
+ },
+ KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ CertificatesDir: "foo",
+ },
+ },
+ MachineNaming: controlplanev1.MachineNamingSpec{
+ Template: "{{ .kubeadmControlPlane.name }}" + namingTemplateKey,
+ },
+ },
+ },
+ isUpdatingExistingMachine: false,
+ wantErr: true,
+ },
+ {
+ name: "should not return error when creating a new Machine when the generated name exceeds 63",
+ kcp: &controlplanev1.KubeadmControlPlane{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: kcpName,
+ Namespace: cluster.Namespace,
+ },
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ Version: "v1.16.6",
+ MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
+ ObjectMeta: kcpMachineTemplateObjectMeta,
+ Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
+ Deletion: controlplanev1.KubeadmControlPlaneMachineTemplateDeletionSpec{
+ NodeDrainTimeoutSeconds: duration5s,
+ NodeDeletionTimeoutSeconds: duration5s,
+ NodeVolumeDetachTimeoutSeconds: duration5s,
+ },
+ },
+ },
+ KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ CertificatesDir: "foo",
+ },
+ },
+ MachineNaming: controlplanev1.MachineNamingSpec{
+ Template: "{{ .random }}" + fmt.Sprintf("%059d", 0),
+ },
+ },
+ },
+ isUpdatingExistingMachine: false,
+ want: []gomegatypes.GomegaMatcher{
+ ContainSubstring(fmt.Sprintf("%053d", 0)),
+ Not(HaveSuffix("00000")),
+ },
+ wantErr: false,
+ },
+ {
+ name: "should return error when creating a new Machine with invalid template",
+ kcp: &controlplanev1.KubeadmControlPlane{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: kcpName,
+ Namespace: cluster.Namespace,
+ },
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ Version: "v1.16.6",
+ MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
+ ObjectMeta: kcpMachineTemplateObjectMeta,
+ Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
+ Deletion: controlplanev1.KubeadmControlPlaneMachineTemplateDeletionSpec{
+ NodeDrainTimeoutSeconds: duration5s,
+ NodeDeletionTimeoutSeconds: duration5s,
+ NodeVolumeDetachTimeoutSeconds: duration5s,
+ },
+ },
+ },
+ KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ CertificatesDir: "foo",
+ },
+ },
+ MachineNaming: controlplanev1.MachineNamingSpec{
+ Template: "some-hardcoded-name-{{ .doesnotexistindata }}-{{ .random }}", // invalid template
+ },
+ },
+ },
+ isUpdatingExistingMachine: false,
+ wantErr: true,
+ },
+ {
+ name: "should return the correct Machine object when creating a new Machine with default templated name",
+ kcp: &controlplanev1.KubeadmControlPlane{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: kcpName,
+ Namespace: cluster.Namespace,
+ },
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ Version: "v1.16.6",
+ MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
+ ObjectMeta: kcpMachineTemplateObjectMeta,
+ Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
+ Deletion: controlplanev1.KubeadmControlPlaneMachineTemplateDeletionSpec{
+ NodeDrainTimeoutSeconds: duration5s,
+ NodeDeletionTimeoutSeconds: duration5s,
+ NodeVolumeDetachTimeoutSeconds: duration5s,
+ },
+ },
+ },
+ KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ CertificatesDir: "foo",
+ },
+ },
+ },
+ },
+ isUpdatingExistingMachine: false,
+ wantErr: false,
+ want: []gomegatypes.GomegaMatcher{
+ HavePrefix(kcpName),
+ Not(HaveSuffix("00000")),
+ },
+ },
+ {
+ name: "should return the correct Machine object when creating a new Machine with additional kcp readinessGates",
+ kcp: &controlplanev1.KubeadmControlPlane{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: kcpName,
+ Namespace: cluster.Namespace,
+ },
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ Version: "v1.16.6",
+ MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
+ ObjectMeta: kcpMachineTemplateObjectMeta,
+ Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
+ ReadinessGates: []clusterv1.MachineReadinessGate{
+ {
+ ConditionType: "Bar",
+ },
+ },
+ Deletion: controlplanev1.KubeadmControlPlaneMachineTemplateDeletionSpec{
+ NodeDrainTimeoutSeconds: duration5s,
+ NodeDeletionTimeoutSeconds: duration5s,
+ NodeVolumeDetachTimeoutSeconds: duration5s,
+ },
+ },
+ },
+ KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ CertificatesDir: "foo",
+ },
+ },
+ },
+ },
+ isUpdatingExistingMachine: false,
+ wantErr: false,
+ },
+ {
+ name: "should return the correct Machine object when updating an existing Machine (empty ClusterConfiguration annotation)",
+ kcp: &controlplanev1.KubeadmControlPlane{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: kcpName,
+ Namespace: cluster.Namespace,
+ },
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ Version: "v1.16.6",
+ MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
+ ObjectMeta: kcpMachineTemplateObjectMeta,
+ Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
+ Deletion: controlplanev1.KubeadmControlPlaneMachineTemplateDeletionSpec{
+ NodeDrainTimeoutSeconds: duration5s,
+ NodeDeletionTimeoutSeconds: duration5s,
+ NodeVolumeDetachTimeoutSeconds: duration5s,
+ },
+ ReadinessGates: []clusterv1.MachineReadinessGate{
+ {
+ ConditionType: "Foo",
+ },
+ },
+ },
+ },
+ KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ CertificatesDir: "foo",
+ },
+ },
+ MachineNaming: controlplanev1.MachineNamingSpec{
+ Template: "{{ .kubeadmControlPlane.name }}" + namingTemplateKey + "-{{ .random }}",
+ },
+ },
+ },
+ isUpdatingExistingMachine: true,
+ wantErr: false,
+ },
+ {
+ name: "should return the correct Machine object when updating an existing Machine (outdated ClusterConfiguration annotation)",
+ kcp: &controlplanev1.KubeadmControlPlane{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: kcpName,
+ Namespace: cluster.Namespace,
+ },
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ Version: "v1.16.6",
+ MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
+ ObjectMeta: kcpMachineTemplateObjectMeta,
+ Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
+ Deletion: controlplanev1.KubeadmControlPlaneMachineTemplateDeletionSpec{
+ NodeDrainTimeoutSeconds: duration5s,
+ NodeDeletionTimeoutSeconds: duration5s,
+ NodeVolumeDetachTimeoutSeconds: duration5s,
+ },
+ ReadinessGates: []clusterv1.MachineReadinessGate{
+ {
+ ConditionType: "Foo",
+ },
+ },
+ },
+ },
+ KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ CertificatesDir: "foo",
+ },
+ },
+ MachineNaming: controlplanev1.MachineNamingSpec{
+ Template: "{{ .kubeadmControlPlane.name }}" + namingTemplateKey + "-{{ .random }}",
+ },
+ },
+ },
+ isUpdatingExistingMachine: true,
+ wantErr: false,
+ },
+ {
+ name: "should return the correct Machine object when updating an existing Machine (up to date ClusterConfiguration annotation)",
+ kcp: &controlplanev1.KubeadmControlPlane{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: kcpName,
+ Namespace: cluster.Namespace,
+ },
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ Version: "v1.16.6",
+ MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
+ ObjectMeta: kcpMachineTemplateObjectMeta,
+ Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
+ Deletion: controlplanev1.KubeadmControlPlaneMachineTemplateDeletionSpec{
+ NodeDrainTimeoutSeconds: duration5s,
+ NodeDeletionTimeoutSeconds: duration5s,
+ NodeVolumeDetachTimeoutSeconds: duration5s,
+ },
+ ReadinessGates: []clusterv1.MachineReadinessGate{
+ {
+ ConditionType: "Foo",
+ },
+ },
+ },
+ },
+ KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ CertificatesDir: "foo",
+ },
+ },
+ MachineNaming: controlplanev1.MachineNamingSpec{
+ Template: "{{ .kubeadmControlPlane.name }}" + namingTemplateKey + "-{{ .random }}",
+ },
+ },
+ },
+ isUpdatingExistingMachine: true,
+ wantErr: false,
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+
+ var desiredMachine *clusterv1.Machine
+ failureDomain := "fd-1"
+ var expectedMachineSpec clusterv1.MachineSpec
+ var err error
+
+ if tt.isUpdatingExistingMachine {
+ machineName := "existing-machine"
+ machineUID := types.UID("abc-123-existing-machine")
+ // Use different ClusterConfiguration string than the information present in KCP
+ // to verify that for an existing machine we do not override this information.
+ remediationData := "remediation-data"
+ machineVersion := "v1.25.3"
+ existingMachine := &clusterv1.Machine{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: machineName,
+ UID: machineUID,
+ Annotations: map[string]string{
+ controlplanev1.RemediationForAnnotation: remediationData,
+ },
+ },
+ Spec: clusterv1.MachineSpec{
+ Version: machineVersion,
+ FailureDomain: failureDomain,
+ Deletion: clusterv1.MachineDeletionSpec{
+ NodeDrainTimeoutSeconds: duration10s,
+ NodeDeletionTimeoutSeconds: duration10s,
+ NodeVolumeDetachTimeoutSeconds: duration10s,
+ },
+ Bootstrap: clusterv1.Bootstrap{
+ ConfigRef: bootstrapRef,
+ },
+ InfrastructureRef: *infraRef,
+ ReadinessGates: []clusterv1.MachineReadinessGate{{ConditionType: "Foo"}},
+ },
+ }
+
+ desiredMachine, err = ComputeDesiredMachine(
+ tt.kcp, cluster,
+ existingMachine.Spec.FailureDomain, existingMachine,
+ )
+ if tt.wantErr {
+ g.Expect(err).To(HaveOccurred())
+ return
+ }
+ g.Expect(err).ToNot(HaveOccurred())
+ expectedMachineSpec = clusterv1.MachineSpec{
+ ClusterName: cluster.Name,
+ Version: machineVersion, // Should use the Machine version and not the version from KCP.
+ Bootstrap: clusterv1.Bootstrap{
+ ConfigRef: bootstrapRef,
+ },
+ InfrastructureRef: *infraRef,
+ FailureDomain: failureDomain,
+ Deletion: clusterv1.MachineDeletionSpec{
+ NodeDrainTimeoutSeconds: tt.kcp.Spec.MachineTemplate.Spec.Deletion.NodeDrainTimeoutSeconds,
+ NodeDeletionTimeoutSeconds: tt.kcp.Spec.MachineTemplate.Spec.Deletion.NodeDeletionTimeoutSeconds,
+ NodeVolumeDetachTimeoutSeconds: tt.kcp.Spec.MachineTemplate.Spec.Deletion.NodeVolumeDetachTimeoutSeconds,
+ },
+ ReadinessGates: append(append(MandatoryMachineReadinessGates, etcdMandatoryMachineReadinessGates...), tt.kcp.Spec.MachineTemplate.Spec.ReadinessGates...),
+ }
+
+ // Verify the Name and UID of the Machine remain unchanged
+ g.Expect(desiredMachine.Name).To(Equal(machineName))
+ g.Expect(desiredMachine.UID).To(Equal(machineUID))
+ // Verify annotations.
+ expectedAnnotations := map[string]string{}
+ for k, v := range kcpMachineTemplateObjectMeta.Annotations {
+ expectedAnnotations[k] = v
+ }
+ expectedAnnotations[controlplanev1.RemediationForAnnotation] = remediationData
+ // The pre-terminate annotation should always be added
+ expectedAnnotations[controlplanev1.PreTerminateHookCleanupAnnotation] = ""
+ g.Expect(desiredMachine.Annotations).To(Equal(expectedAnnotations))
+ } else {
+ desiredMachine, err = ComputeDesiredMachine(
+ tt.kcp, cluster,
+ failureDomain, nil,
+ )
+ if tt.wantErr {
+ g.Expect(err).To(HaveOccurred())
+ return
+ }
+ g.Expect(err).ToNot(HaveOccurred())
+
+ expectedMachineSpec = clusterv1.MachineSpec{
+ ClusterName: cluster.Name,
+ Version: tt.kcp.Spec.Version,
+ FailureDomain: failureDomain,
+ Deletion: clusterv1.MachineDeletionSpec{
+ NodeDrainTimeoutSeconds: tt.kcp.Spec.MachineTemplate.Spec.Deletion.NodeDrainTimeoutSeconds,
+ NodeDeletionTimeoutSeconds: tt.kcp.Spec.MachineTemplate.Spec.Deletion.NodeDeletionTimeoutSeconds,
+ NodeVolumeDetachTimeoutSeconds: tt.kcp.Spec.MachineTemplate.Spec.Deletion.NodeVolumeDetachTimeoutSeconds,
+ },
+ ReadinessGates: append(append(MandatoryMachineReadinessGates, etcdMandatoryMachineReadinessGates...), tt.kcp.Spec.MachineTemplate.Spec.ReadinessGates...),
+ }
+ // Verify Name.
+ for _, matcher := range tt.want {
+ g.Expect(desiredMachine.Name).To(matcher)
+ }
+ // Verify annotations.
+ expectedAnnotations := map[string]string{}
+ for k, v := range kcpMachineTemplateObjectMeta.Annotations {
+ expectedAnnotations[k] = v
+ }
+ // The pre-terminate annotation should always be added
+ expectedAnnotations[controlplanev1.PreTerminateHookCleanupAnnotation] = ""
+ g.Expect(desiredMachine.Annotations).To(Equal(expectedAnnotations))
+ }
+
+ g.Expect(desiredMachine.Namespace).To(Equal(tt.kcp.Namespace))
+ g.Expect(desiredMachine.OwnerReferences).To(HaveLen(1))
+ g.Expect(desiredMachine.OwnerReferences).To(ContainElement(*metav1.NewControllerRef(tt.kcp, controlplanev1.GroupVersion.WithKind("KubeadmControlPlane"))))
+ g.Expect(desiredMachine.Spec).To(BeComparableTo(expectedMachineSpec))
+
+ // Verify that the machineTemplate.ObjectMeta has been propagated to the Machine.
+ // Verify labels.
+ expectedLabels := map[string]string{}
+ for k, v := range kcpMachineTemplateObjectMeta.Labels {
+ expectedLabels[k] = v
+ }
+ expectedLabels[clusterv1.ClusterNameLabel] = cluster.Name
+ expectedLabels[clusterv1.MachineControlPlaneLabel] = ""
+ expectedLabels[clusterv1.MachineControlPlaneNameLabel] = tt.kcp.Name
+ g.Expect(desiredMachine.Labels).To(Equal(expectedLabels))
+
+ // Verify that machineTemplate.ObjectMeta in KCP has not been modified.
+ g.Expect(tt.kcp.Spec.MachineTemplate.ObjectMeta.Labels).To(Equal(kcpMachineTemplateObjectMetaCopy.Labels))
+ g.Expect(tt.kcp.Spec.MachineTemplate.ObjectMeta.Annotations).To(Equal(kcpMachineTemplateObjectMetaCopy.Annotations))
+ })
+ }
+}
+
+func Test_ComputeDesiredKubeadmConfig(t *testing.T) {
+ g := NewWithT(t)
+
+ cluster := &clusterv1.Cluster{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "foo",
+ Namespace: metav1.NamespaceDefault,
+ },
+ }
+ kcp := &controlplanev1.KubeadmControlPlane{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "kcp-foo",
+ Namespace: cluster.Namespace,
+ UID: "abc-123-kcp-control-plane",
+ },
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
+ InitConfiguration: bootstrapv1.InitConfiguration{
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ KubeletExtraArgs: []bootstrapv1.Arg{
+ {
+ Name: "v",
+ Value: ptr.To("4"),
+ },
+ },
+ },
+ },
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ KubeletExtraArgs: []bootstrapv1.Arg{
+ {
+ Name: "v",
+ Value: ptr.To("8"),
+ },
+ },
+ },
+ },
+ },
+ Version: "v1.31.0",
+ },
+ }
+ expectedKubeadmConfigWithoutOwner := &bootstrapv1.KubeadmConfig{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machine-1",
+ Namespace: cluster.Namespace,
+ Labels: map[string]string{
+ clusterv1.ClusterNameLabel: cluster.Name,
+ clusterv1.MachineControlPlaneLabel: "",
+ clusterv1.MachineControlPlaneNameLabel: kcp.Name,
+ },
+ Annotations: map[string]string{},
+ },
+ Spec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ FeatureGates: map[string]bool{
+ ControlPlaneKubeletLocalMode: true,
+ },
+ },
+ // InitConfiguration and JoinConfiguration is added below.
+ },
+ }
+ preExistingKubeadmConfigOwnedByMachine := &bootstrapv1.KubeadmConfig{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machine-1",
+ Namespace: cluster.Namespace,
+ Labels: map[string]string{
+ clusterv1.ClusterNameLabel: cluster.Name,
+ clusterv1.MachineControlPlaneLabel: "",
+ clusterv1.MachineControlPlaneNameLabel: kcp.Name,
+ },
+ Annotations: map[string]string{},
+ OwnerReferences: []metav1.OwnerReference{{
+ APIVersion: clusterv1.GroupVersion.String(),
+ Kind: "Machine",
+ Name: "machine-1",
+ }},
+ },
+ }
+
+ for _, isJoin := range []bool{true, false} {
+ expectedKubeadmConfigWithoutOwner := expectedKubeadmConfigWithoutOwner.DeepCopy()
+ if isJoin {
+ expectedKubeadmConfigWithoutOwner.Spec.InitConfiguration = bootstrapv1.InitConfiguration{}
+ expectedKubeadmConfigWithoutOwner.Spec.JoinConfiguration = kcp.Spec.KubeadmConfigSpec.JoinConfiguration
+ expectedKubeadmConfigWithoutOwner.Spec.JoinConfiguration.ControlPlane = &bootstrapv1.JoinControlPlane{}
+ } else {
+ expectedKubeadmConfigWithoutOwner.Spec.InitConfiguration = kcp.Spec.KubeadmConfigSpec.InitConfiguration
+ expectedKubeadmConfigWithoutOwner.Spec.JoinConfiguration = bootstrapv1.JoinConfiguration{}
+ }
+
+ kubeadmConfig, err := ComputeDesiredKubeadmConfig(kcp, cluster, isJoin, "machine-1", nil)
+ g.Expect(err).ToNot(HaveOccurred())
+ expectedKubeadmConfig := expectedKubeadmConfigWithoutOwner.DeepCopy()
+ // New KubeadmConfig should have KCP ownerReference.
+ expectedKubeadmConfig.SetOwnerReferences([]metav1.OwnerReference{{
+ APIVersion: controlplanev1.GroupVersion.String(),
+ Kind: "KubeadmControlPlane",
+ Name: kcp.Name,
+ UID: kcp.UID,
+ }})
+ g.Expect(kubeadmConfig).To(BeComparableTo(expectedKubeadmConfig))
+
+ kubeadmConfig, err = ComputeDesiredKubeadmConfig(kcp, cluster, isJoin, "machine-1", preExistingKubeadmConfigOwnedByMachine)
+ g.Expect(err).ToNot(HaveOccurred())
+ // If there is a pre-existing KubeadmConfig that is owned by a Machine, the computed KubeadmConfig
+ // should have no ownerReferences, so we don't overwrite the ownerReference set by the Machine controller.
+ g.Expect(kubeadmConfig).To(BeComparableTo(expectedKubeadmConfigWithoutOwner))
+ }
+}
+
+func Test_ComputeDesiredInfraMachine(t *testing.T) {
+ g := NewWithT(t)
+
+ cluster := &clusterv1.Cluster{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "foo",
+ Namespace: metav1.NamespaceDefault,
+ },
+ }
+ infrastructureMachineTemplate := &unstructured.Unstructured{
+ Object: map[string]interface{}{
+ "kind": builder.GenericInfrastructureMachineTemplateKind,
+ "apiVersion": builder.InfrastructureGroupVersion.String(),
+ "metadata": map[string]interface{}{
+ "name": "infra-machine-template-1",
+ "namespace": cluster.Namespace,
+ },
+ "spec": map[string]interface{}{
+ "template": map[string]interface{}{
+ "spec": map[string]interface{}{
+ "hello": "world",
+ },
+ },
+ },
+ },
+ }
+ kcp := &controlplanev1.KubeadmControlPlane{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "kcp-foo",
+ Namespace: cluster.Namespace,
+ UID: "abc-123-kcp-control-plane",
+ },
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
+ Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
+ InfrastructureRef: clusterv1.ContractVersionedObjectReference{
+ Kind: infrastructureMachineTemplate.GetKind(),
+ APIGroup: infrastructureMachineTemplate.GroupVersionKind().Group,
+ Name: infrastructureMachineTemplate.GetName(),
+ },
+ },
+ },
+ },
+ }
+ expectedInfraMachineWithoutOwner := &unstructured.Unstructured{
+ Object: map[string]interface{}{
+ "kind": builder.GenericInfrastructureMachineKind,
+ "apiVersion": builder.InfrastructureGroupVersion.String(),
+ "metadata": map[string]interface{}{
+ "name": "machine-1",
+ "namespace": cluster.Namespace,
+ "labels": map[string]interface{}{
+ clusterv1.ClusterNameLabel: cluster.Name,
+ clusterv1.MachineControlPlaneLabel: "",
+ clusterv1.MachineControlPlaneNameLabel: kcp.Name,
+ },
+ "annotations": map[string]interface{}{
+ clusterv1.TemplateClonedFromNameAnnotation: "infra-machine-template-1",
+ clusterv1.TemplateClonedFromGroupKindAnnotation: "GenericInfrastructureMachineTemplate.infrastructure.cluster.x-k8s.io",
+ },
+ },
+ "spec": map[string]interface{}{
+ "hello": "world",
+ },
+ },
+ }
+ preExistingInfraMachineOwnedByMachine := &unstructured.Unstructured{
+ Object: map[string]interface{}{
+ "kind": builder.GenericInfrastructureMachineKind,
+ "apiVersion": builder.InfrastructureGroupVersion.String(),
+ "metadata": map[string]interface{}{
+ "name": "machine-1",
+ "namespace": cluster.Namespace,
+ "labels": map[string]interface{}{
+ clusterv1.ClusterNameLabel: cluster.Name,
+ clusterv1.MachineControlPlaneLabel: "",
+ clusterv1.MachineControlPlaneNameLabel: kcp.Name,
+ },
+ "annotations": map[string]interface{}{
+ clusterv1.TemplateClonedFromNameAnnotation: "infra-machine-template-1",
+ clusterv1.TemplateClonedFromGroupKindAnnotation: "GenericInfrastructureMachineTemplate.infrastructure.cluster.x-k8s.io",
+ },
+ "ownerReferences": []interface{}{
+ map[string]interface{}{
+ "apiVersion": clusterv1.GroupVersion.String(),
+ "kind": "Machine",
+ "name": "machine-1",
+ },
+ },
+ },
+ "spec": map[string]interface{}{
+ "hello": "world",
+ },
+ },
+ }
+
+ scheme := runtime.NewScheme()
+ _ = apiextensionsv1.AddToScheme(scheme)
+ fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(infrastructureMachineTemplate.DeepCopy(), builder.GenericInfrastructureMachineTemplateCRD).Build()
+
+ infraMachine, err := ComputeDesiredInfraMachine(t.Context(), fakeClient, kcp, cluster, "machine-1", nil)
+ g.Expect(err).ToNot(HaveOccurred())
+ expectedInfraMachine := expectedInfraMachineWithoutOwner.DeepCopy()
+ // New InfraMachine should have KCP ownerReference.
+ expectedInfraMachine.SetOwnerReferences([]metav1.OwnerReference{{
+ APIVersion: controlplanev1.GroupVersion.String(),
+ Kind: "KubeadmControlPlane",
+ Name: kcp.Name,
+ UID: kcp.UID,
+ }})
+ g.Expect(infraMachine).To(BeComparableTo(expectedInfraMachine))
+
+ infraMachine, err = ComputeDesiredInfraMachine(t.Context(), fakeClient, kcp, cluster, "machine-1", preExistingInfraMachineOwnedByMachine)
+ g.Expect(err).ToNot(HaveOccurred())
+ // If there is a pre-existing InfraMachine that is owned by a Machine, the computed InfraMachine
+ // should have no ownerReferences, so we don't overwrite the ownerReference set by the Machine controller.
+ g.Expect(infraMachine).To(BeComparableTo(expectedInfraMachineWithoutOwner))
+}
+
+func TestDefaultFeatureGates(t *testing.T) {
+ tests := []struct {
+ name string
+ kubernetesVersion semver.Version
+ kubeadmConfigSpec *bootstrapv1.KubeadmConfigSpec
+ wantKubeadmConfigSpec *bootstrapv1.KubeadmConfigSpec
+ }{
+ {
+ name: "don't default ControlPlaneKubeletLocalMode for 1.30",
+ kubernetesVersion: semver.MustParse("1.30.99"),
+ kubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ FeatureGates: map[string]bool{
+ "EtcdLearnerMode": true,
+ },
+ },
+ },
+ wantKubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ FeatureGates: map[string]bool{
+ "EtcdLearnerMode": true,
+ },
+ },
+ },
+ },
+ {
+ name: "default ControlPlaneKubeletLocalMode for 1.31",
+ kubernetesVersion: semver.MustParse("1.31.0"),
+ kubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{},
+ },
+ wantKubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ FeatureGates: map[string]bool{
+ ControlPlaneKubeletLocalMode: true,
+ },
+ },
+ },
+ },
+ {
+ name: "default ControlPlaneKubeletLocalMode for 1.31",
+ kubernetesVersion: semver.MustParse("1.31.0"),
+ kubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ FeatureGates: nil,
+ },
+ },
+ wantKubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ FeatureGates: map[string]bool{
+ ControlPlaneKubeletLocalMode: true,
+ },
+ },
+ },
+ },
+ {
+ name: "default ControlPlaneKubeletLocalMode for 1.31",
+ kubernetesVersion: semver.MustParse("1.31.0"),
+ kubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ FeatureGates: map[string]bool{},
+ },
+ },
+ wantKubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ FeatureGates: map[string]bool{
+ ControlPlaneKubeletLocalMode: true,
+ },
+ },
+ },
+ },
+ {
+ name: "default ControlPlaneKubeletLocalMode for 1.31",
+ kubernetesVersion: semver.MustParse("1.31.0"),
+ kubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ FeatureGates: map[string]bool{
+ "EtcdLearnerMode": true,
+ },
+ },
+ },
+ wantKubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ FeatureGates: map[string]bool{
+ ControlPlaneKubeletLocalMode: true,
+ "EtcdLearnerMode": true,
+ },
+ },
+ },
+ },
+ {
+ name: "don't default ControlPlaneKubeletLocalMode for 1.31 if already set to false",
+ kubernetesVersion: semver.MustParse("1.31.0"),
+ kubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ FeatureGates: map[string]bool{
+ ControlPlaneKubeletLocalMode: false,
+ },
+ },
+ },
+ wantKubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ FeatureGates: map[string]bool{
+ ControlPlaneKubeletLocalMode: false,
+ },
+ },
+ },
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+
+ DefaultFeatureGates(tt.kubeadmConfigSpec, tt.kubernetesVersion)
+ g.Expect(tt.wantKubeadmConfigSpec).Should(BeComparableTo(tt.kubeadmConfigSpec))
+ })
+ }
+}
diff --git a/controlplane/kubeadm/internal/etcd/etcd.go b/controlplane/kubeadm/internal/etcd/etcd.go
index 835f320256ca..6d959fa8451e 100644
--- a/controlplane/kubeadm/internal/etcd/etcd.go
+++ b/controlplane/kubeadm/internal/etcd/etcd.go
@@ -41,7 +41,7 @@ type etcd interface {
AlarmList(ctx context.Context) (*clientv3.AlarmResponse, error)
Close() error
Endpoints() []string
- MemberList(ctx context.Context) (*clientv3.MemberListResponse, error)
+ MemberList(ctx context.Context, opts ...clientv3.OpOption) (*clientv3.MemberListResponse, error)
MemberRemove(ctx context.Context, id uint64) (*clientv3.MemberRemoveResponse, error)
MoveLeader(ctx context.Context, id uint64) (*clientv3.MoveLeaderResponse, error)
Status(ctx context.Context, endpoint string) (*clientv3.StatusResponse, error)
diff --git a/controlplane/kubeadm/internal/etcd/fake/client.go b/controlplane/kubeadm/internal/etcd/fake/client.go
index 9d0f28a08811..7c2b024f22a0 100644
--- a/controlplane/kubeadm/internal/etcd/fake/client.go
+++ b/controlplane/kubeadm/internal/etcd/fake/client.go
@@ -52,7 +52,7 @@ func (c *FakeEtcdClient) AlarmList(_ context.Context) (*clientv3.AlarmResponse,
return c.AlarmResponse, c.ErrorResponse
}
-func (c *FakeEtcdClient) MemberList(_ context.Context) (*clientv3.MemberListResponse, error) {
+func (c *FakeEtcdClient) MemberList(_ context.Context, _ ...clientv3.OpOption) (*clientv3.MemberListResponse, error) {
return c.MemberListResponse, c.ErrorResponse
}
func (c *FakeEtcdClient) MemberRemove(_ context.Context, i uint64) (*clientv3.MemberRemoveResponse, error) {
diff --git a/controlplane/kubeadm/internal/filters.go b/controlplane/kubeadm/internal/filters.go
index 45ad54e1a569..21aa383bf4da 100644
--- a/controlplane/kubeadm/internal/filters.go
+++ b/controlplane/kubeadm/internal/filters.go
@@ -17,25 +17,98 @@ limitations under the License.
package internal
import (
- "encoding/json"
+ "context"
"fmt"
- "reflect"
- "strings"
"github.com/pkg/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
- "k8s.io/klog/v2"
+ "sigs.k8s.io/controller-runtime/pkg/client"
- bootstrapv1beta1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta1"
bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
"sigs.k8s.io/cluster-api/bootstrap/kubeadm/defaulting"
+ "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/desiredstate"
"sigs.k8s.io/cluster-api/internal/util/compare"
"sigs.k8s.io/cluster-api/util/collections"
)
+// UpToDateResult is the result of calling the UpToDate func for a Machine.
+type UpToDateResult struct {
+ LogMessages []string
+ ConditionMessages []string
+ EligibleForInPlaceUpdate bool
+ DesiredMachine *clusterv1.Machine
+ CurrentInfraMachine *unstructured.Unstructured
+ DesiredInfraMachine *unstructured.Unstructured
+ CurrentKubeadmConfig *bootstrapv1.KubeadmConfig
+ DesiredKubeadmConfig *bootstrapv1.KubeadmConfig
+}
+
+// UpToDate checks if a Machine is up to date with the control plane's configuration.
+// If not, messages explaining why are provided with different level of detail for logs and conditions.
+func UpToDate(
+ ctx context.Context,
+ c client.Client,
+ cluster *clusterv1.Cluster,
+ machine *clusterv1.Machine,
+ kcp *controlplanev1.KubeadmControlPlane,
+ reconciliationTime *metav1.Time,
+ infraMachines map[string]*unstructured.Unstructured,
+ kubeadmConfigs map[string]*bootstrapv1.KubeadmConfig,
+) (bool, *UpToDateResult, error) {
+ res := &UpToDateResult{
+ // A Machine is eligible for in-place update except if we find a reason why it shouldn't be,
+ // e.g. rollout.before, rollout.after or the Machine is already up-to-date.
+ EligibleForInPlaceUpdate: true,
+ }
+
+ // If a Machine is marked for deletion it is not eligible for in-place update.
+ if _, ok := machine.Annotations[clusterv1.DeleteMachineAnnotation]; ok {
+ res.EligibleForInPlaceUpdate = false
+ }
+
+ // If a Machine is marked for remediation it is not eligible for in-place update.
+ if _, ok := machine.Annotations[clusterv1.RemediateMachineAnnotation]; ok {
+ res.EligibleForInPlaceUpdate = false
+ }
+
+ // Machines whose certificates are about to expire.
+ if collections.ShouldRolloutBefore(reconciliationTime, kcp.Spec.Rollout.Before)(machine) {
+ res.LogMessages = append(res.LogMessages, "certificates will expire soon, rolloutBefore expired")
+ res.ConditionMessages = append(res.ConditionMessages, "Certificates will expire soon")
+ res.EligibleForInPlaceUpdate = false
+ }
+
+ // Machines that are scheduled for rollout (KCP.Spec.RolloutAfter set,
+ // the RolloutAfter deadline is expired, and the machine was created before the deadline).
+ if collections.ShouldRolloutAfter(reconciliationTime, kcp.Spec.Rollout.After)(machine) {
+ res.LogMessages = append(res.LogMessages, "rolloutAfter expired")
+ res.ConditionMessages = append(res.ConditionMessages, "KubeadmControlPlane spec.rolloutAfter expired")
+ res.EligibleForInPlaceUpdate = false
+ }
+
+ // Machines that do not match with KCP config.
+ // Note: matchesMachineSpec will update res with desired and current objects if necessary.
+ matches, specLogMessages, specConditionMessages, err := matchesMachineSpec(ctx, c, infraMachines, kubeadmConfigs, kcp, cluster, machine, res)
+ if err != nil {
+ return false, nil, errors.Wrapf(err, "failed to determine if Machine %s is up-to-date", machine.Name)
+ }
+ if !matches {
+ res.LogMessages = append(res.LogMessages, specLogMessages...)
+ res.ConditionMessages = append(res.ConditionMessages, specConditionMessages...)
+ }
+
+ if len(res.LogMessages) > 0 || len(res.ConditionMessages) > 0 {
+ return false, res, nil
+ }
+
+ // If everything matches no need for an update.
+ res.EligibleForInPlaceUpdate = false
+ return true, res, nil
+}
+
// matchesMachineSpec checks if a Machine matches any of a set of KubeadmConfigs and a set of infra machine configs.
// If it doesn't, it returns the reasons why.
// Kubernetes version, infrastructure template, and KubeadmConfig field need to be equivalent.
@@ -44,68 +117,55 @@ import (
// - mutated in-place (ex: NodeDrainTimeoutSeconds)
// - are not dictated by KCP (ex: ProviderID)
// - are not relevant for the rollout decision (ex: failureDomain).
-func matchesMachineSpec(infraConfigs map[string]*unstructured.Unstructured, machineConfigs map[string]*bootstrapv1.KubeadmConfig, kcp *controlplanev1.KubeadmControlPlane, machine *clusterv1.Machine) (bool, []string, []string, error) {
+func matchesMachineSpec(
+ ctx context.Context,
+ c client.Client,
+ infraMachines map[string]*unstructured.Unstructured,
+ kubeadmConfigs map[string]*bootstrapv1.KubeadmConfig,
+ kcp *controlplanev1.KubeadmControlPlane,
+ cluster *clusterv1.Cluster,
+ machine *clusterv1.Machine,
+ res *UpToDateResult,
+) (bool, []string, []string, error) {
logMessages := []string{}
conditionMessages := []string{}
- if !collections.MatchesKubernetesVersion(kcp.Spec.Version)(machine) {
- machineVersion := ""
- if machine != nil && machine.Spec.Version != "" {
- machineVersion = machine.Spec.Version
- }
- logMessages = append(logMessages, fmt.Sprintf("Machine version %q is not equal to KCP version %q", machineVersion, kcp.Spec.Version))
+ desiredMachine, err := desiredstate.ComputeDesiredMachine(kcp, cluster, machine.Spec.FailureDomain, machine)
+ if err != nil {
+ return false, nil, nil, errors.Wrapf(err, "failed to match Machine")
+ }
+ // Note: spec.version is not mutated in-place by syncMachines and accordingly
+ // not updated by desiredstate.ComputeDesiredMachine, so we have to update it here.
+ desiredMachine.Spec.Version = kcp.Spec.Version
+ // Note: spec.failureDomain is in general only changed on delete/create, so we don't have to update it here for in-place.
+ res.DesiredMachine = desiredMachine
+ // Note: Intentionally not storing currentMachine as it can change later, e.g. through syncMachines.
+ if desiredMachine.Spec.Version != machine.Spec.Version {
+ logMessages = append(logMessages, fmt.Sprintf("Machine version %q is not equal to KCP version %q", machine.Spec.Version, desiredMachine.Spec.Version))
// Note: the code computing the message for KCP's RolloutOut condition is making assumptions on the format/content of this message.
- conditionMessages = append(conditionMessages, fmt.Sprintf("Version %s, %s required", machineVersion, kcp.Spec.Version))
+ conditionMessages = append(conditionMessages, fmt.Sprintf("Version %s, %s required", machine.Spec.Version, desiredMachine.Spec.Version))
}
- reason, matches, err := matchesKubeadmBootstrapConfig(machineConfigs, kcp, machine)
+ reason, currentKubeadmConfig, desiredKubeadmConfig, matches, err := matchesKubeadmConfig(kubeadmConfigs, kcp, cluster, machine)
if err != nil {
- return false, nil, nil, errors.Wrapf(err, "failed to match Machine spec")
+ return false, nil, nil, errors.Wrapf(err, "failed to match Machine")
}
+ res.CurrentKubeadmConfig = currentKubeadmConfig
+ res.DesiredKubeadmConfig = desiredKubeadmConfig
if !matches {
logMessages = append(logMessages, reason)
conditionMessages = append(conditionMessages, "KubeadmConfig is not up-to-date")
}
- if reason, matches := matchesTemplateClonedFrom(infraConfigs, kcp, machine); !matches {
- logMessages = append(logMessages, reason)
- conditionMessages = append(conditionMessages, fmt.Sprintf("%s is not up-to-date", machine.Spec.InfrastructureRef.Kind))
- }
-
- if len(logMessages) > 0 || len(conditionMessages) > 0 {
- return false, logMessages, conditionMessages, nil
- }
-
- return true, nil, nil, nil
-}
-
-// UpToDate checks if a Machine is up to date with the control plane's configuration.
-// If not, messages explaining why are provided with different level of detail for logs and conditions.
-func UpToDate(machine *clusterv1.Machine, kcp *controlplanev1.KubeadmControlPlane, reconciliationTime *metav1.Time, infraConfigs map[string]*unstructured.Unstructured, machineConfigs map[string]*bootstrapv1.KubeadmConfig) (bool, []string, []string, error) {
- logMessages := []string{}
- conditionMessages := []string{}
-
- // Machines whose certificates are about to expire.
- if collections.ShouldRolloutBefore(reconciliationTime, kcp.Spec.Rollout.Before)(machine) {
- logMessages = append(logMessages, "certificates will expire soon, rolloutBefore expired")
- conditionMessages = append(conditionMessages, "Certificates will expire soon")
- }
-
- // Machines that are scheduled for rollout (KCP.Spec.RolloutAfter set,
- // the RolloutAfter deadline is expired, and the machine was created before the deadline).
- if collections.ShouldRolloutAfter(reconciliationTime, kcp.Spec.Rollout.After)(machine) {
- logMessages = append(logMessages, "rolloutAfter expired")
- conditionMessages = append(conditionMessages, "KubeadmControlPlane spec.rolloutAfter expired")
- }
-
- // Machines that do not match with KCP config.
- matches, specLogMessages, specConditionMessages, err := matchesMachineSpec(infraConfigs, machineConfigs, kcp, machine)
+ reason, currentInfraMachine, desiredInfraMachine, matches, err := matchesInfraMachine(ctx, c, infraMachines, kcp, cluster, machine)
if err != nil {
- return false, nil, nil, errors.Wrapf(err, "failed to determine if Machine %s is up-to-date", machine.Name)
+ return false, nil, nil, errors.Wrapf(err, "failed to match Machine")
}
+ res.CurrentInfraMachine = currentInfraMachine
+ res.DesiredInfraMachine = desiredInfraMachine
if !matches {
- logMessages = append(logMessages, specLogMessages...)
- conditionMessages = append(conditionMessages, specConditionMessages...)
+ logMessages = append(logMessages, reason)
+ conditionMessages = append(conditionMessages, fmt.Sprintf("%s is not up-to-date", machine.Spec.InfrastructureRef.Kind))
}
if len(logMessages) > 0 || len(conditionMessages) > 0 {
@@ -115,28 +175,36 @@ func UpToDate(machine *clusterv1.Machine, kcp *controlplanev1.KubeadmControlPlan
return true, nil, nil, nil
}
-// matchesTemplateClonedFrom checks if a Machine has a corresponding infrastructure machine that
+// matchesInfraMachine checks if a Machine has a corresponding infrastructure machine that
// matches a given KCP infra template and if it doesn't match returns the reason why.
// Note: Differences to the labels and annotations on the infrastructure machine are not considered for matching
// criteria, because changes to labels and annotations are propagated in-place to the infrastructure machines.
-// TODO: This function will be renamed in a follow-up PR to something better. (ex: MatchesInfraMachine).
-func matchesTemplateClonedFrom(infraConfigs map[string]*unstructured.Unstructured, kcp *controlplanev1.KubeadmControlPlane, machine *clusterv1.Machine) (string, bool) {
- if machine == nil {
- return "Machine cannot be compared with KCP.spec.machineTemplate.spec.infrastructureRef: Machine is nil", false
- }
- infraObj, found := infraConfigs[machine.Name]
+func matchesInfraMachine(
+ ctx context.Context,
+ c client.Client,
+ infraMachines map[string]*unstructured.Unstructured,
+ kcp *controlplanev1.KubeadmControlPlane,
+ cluster *clusterv1.Cluster,
+ machine *clusterv1.Machine,
+) (string, *unstructured.Unstructured, *unstructured.Unstructured, bool, error) {
+ currentInfraMachine, found := infraMachines[machine.Name]
if !found {
// Return true here because failing to get infrastructure machine should not be considered as unmatching.
- return "", true
+ return "", nil, nil, true, nil
}
- clonedFromName, ok1 := infraObj.GetAnnotations()[clusterv1.TemplateClonedFromNameAnnotation]
- clonedFromGroupKind, ok2 := infraObj.GetAnnotations()[clusterv1.TemplateClonedFromGroupKindAnnotation]
+ clonedFromName, ok1 := currentInfraMachine.GetAnnotations()[clusterv1.TemplateClonedFromNameAnnotation]
+ clonedFromGroupKind, ok2 := currentInfraMachine.GetAnnotations()[clusterv1.TemplateClonedFromGroupKindAnnotation]
if !ok1 || !ok2 {
// All kcp cloned infra machines should have this annotation.
// Missing the annotation may be due to older version machines or adopted machines.
// Should not be considered as mismatch.
- return "", true
+ return "", nil, nil, true, nil
+ }
+
+ desiredInfraMachine, err := desiredstate.ComputeDesiredInfraMachine(ctx, c, kcp, cluster, machine.Name, currentInfraMachine)
+ if err != nil {
+ return "", nil, nil, false, errors.Wrapf(err, "failed to match %s", currentInfraMachine.GetKind())
}
// Check if the machine's infrastructure reference has been created from the current KCP infrastructure template.
@@ -144,260 +212,148 @@ func matchesTemplateClonedFrom(infraConfigs map[string]*unstructured.Unstructure
clonedFromGroupKind != kcp.Spec.MachineTemplate.Spec.InfrastructureRef.GroupKind().String() {
return fmt.Sprintf("Infrastructure template on KCP rotated from %s %s to %s %s",
clonedFromGroupKind, clonedFromName,
- kcp.Spec.MachineTemplate.Spec.InfrastructureRef.GroupKind().String(), kcp.Spec.MachineTemplate.Spec.InfrastructureRef.Name), false
+ kcp.Spec.MachineTemplate.Spec.InfrastructureRef.GroupKind().String(), kcp.Spec.MachineTemplate.Spec.InfrastructureRef.Name), currentInfraMachine, desiredInfraMachine, false, nil
}
- return "", true
+ return "", currentInfraMachine, desiredInfraMachine, true, nil
}
-// matchesKubeadmBootstrapConfig checks if machine's KubeadmConfigSpec is equivalent with KCP's KubeadmConfigSpec.
+// matchesKubeadmConfig checks if machine's KubeadmConfigSpec is equivalent with KCP's KubeadmConfigSpec.
// Note: Differences to the labels and annotations on the KubeadmConfig are not considered for matching
// criteria, because changes to labels and annotations are propagated in-place to KubeadmConfig.
-func matchesKubeadmBootstrapConfig(machineConfigs map[string]*bootstrapv1.KubeadmConfig, kcp *controlplanev1.KubeadmControlPlane, machine *clusterv1.Machine) (string, bool, error) {
- if machine == nil {
- return "Machine KubeadmConfig cannot be compared: Machine is nil", false, nil
- }
-
- // Check if KCP and machine ClusterConfiguration matches, if not return
- match, diff, err := matchClusterConfiguration(kcp, machine)
- if err != nil {
- return "", false, errors.Wrapf(err, "failed to match KubeadmConfig")
- }
- if !match {
- return fmt.Sprintf("Machine KubeadmConfig ClusterConfiguration is outdated: diff: %s", diff), false, nil
- }
-
+func matchesKubeadmConfig(
+ kubeadmConfigs map[string]*bootstrapv1.KubeadmConfig,
+ kcp *controlplanev1.KubeadmControlPlane,
+ cluster *clusterv1.Cluster,
+ machine *clusterv1.Machine,
+) (string, *bootstrapv1.KubeadmConfig, *bootstrapv1.KubeadmConfig, bool, error) {
bootstrapRef := machine.Spec.Bootstrap.ConfigRef
if !bootstrapRef.IsDefined() {
// Missing bootstrap reference should not be considered as unmatching.
// This is a safety precaution to avoid selecting machines that are broken, which in the future should be remediated separately.
- return "", true, nil
+ return "", nil, nil, true, nil
}
- machineConfig, found := machineConfigs[machine.Name]
+ currentKubeadmConfig, found := kubeadmConfigs[machine.Name]
if !found {
// Return true here because failing to get KubeadmConfig should not be considered as unmatching.
// This is a safety precaution to avoid rolling out machines if the client or the api-server is misbehaving.
- return "", true, nil
+ return "", nil, nil, true, nil
}
- // Check if KCP and machine InitConfiguration or JoinConfiguration matches
- // NOTE: only one between init configuration and join configuration is set on a machine, depending
- // on the fact that the machine was the initial control plane node or a joining control plane node.
- match, diff, err = matchInitOrJoinConfiguration(machineConfig, kcp)
+ // Note: Compute a KubeadmConfig assuming we are dealing with a joining machine, which is the most common scenario.
+ // When dealing with the KubeadmConfig for the init machine, the code will make a first tentative comparison under
+ // the assumption that KCP initConfiguration and joinConfiguration should be configured identically.
+ // In order to do so, PrepareKubeadmConfigsForDiff will attempt to convert initConfiguration to
+ // joinConfiguration in currentKubeadmConfig.
+ desiredKubeadmConfigWithJoin, err := desiredstate.ComputeDesiredKubeadmConfig(kcp, cluster, true, machine.Name, currentKubeadmConfig)
if err != nil {
- return "", false, errors.Wrapf(err, "failed to match KubeadmConfig")
- }
- if !match {
- return fmt.Sprintf("Machine KubeadmConfig InitConfiguration or JoinConfiguration are outdated: diff: %s", diff), false, nil
- }
-
- return "", true, nil
-}
-
-// matchClusterConfiguration verifies if KCP and machine ClusterConfiguration matches.
-// NOTE: Machines that have KubeadmClusterConfigurationAnnotation will have to match with KCP ClusterConfiguration.
-// If the annotation is not present (machine is either old or adopted), we won't roll out on any possible changes
-// made in KCP's ClusterConfiguration given that we don't have enough information to make a decision.
-// Users should use KCP.Spec.RolloutAfter field to force a rollout in this case.
-func matchClusterConfiguration(kcp *controlplanev1.KubeadmControlPlane, machine *clusterv1.Machine) (bool, string, error) {
- if _, ok := machine.GetAnnotations()[controlplanev1.KubeadmClusterConfigurationAnnotation]; !ok {
- // We don't have enough information to make a decision; don't' trigger a roll out.
- return true, "", nil
+ return "", nil, nil, false, errors.Wrapf(err, "failed to match KubeadmConfig")
}
+ desiredKubeadmConfigWithJoinForDiff, currentKubeadmConfigWithJoinForDiff := PrepareKubeadmConfigsForDiff(desiredKubeadmConfigWithJoin, currentKubeadmConfig, true)
- machineClusterConfig, err := ClusterConfigurationFromMachine(machine)
+ // Check if current and desired KubeadmConfigs match.
+ // Note: desiredKubeadmConfigWithJoinForDiff has been computed for a kubeadm join.
+ // Note: currentKubeadmConfigWithJoinForDiff has been migrated from init to join, if currentKubeadmConfig was for a kubeadm init.
+ match, diff, err := compare.Diff(¤tKubeadmConfigWithJoinForDiff.Spec, &desiredKubeadmConfigWithJoinForDiff.Spec)
if err != nil {
- // ClusterConfiguration annotation is not correct, only solution is to rollout.
- // The call to json.Unmarshal has to take a pointer to the pointer struct defined above,
- // otherwise we won't be able to handle a nil ClusterConfiguration (that is serialized into "null").
- // See https://github.com/kubernetes-sigs/cluster-api/issues/3353.
- return false, "", nil //nolint:nilerr // Intentionally not returning the error here
+ return "", nil, nil, false, errors.Wrapf(err, "failed to match KubeadmConfig")
}
+ if !match {
+ // Note: KCP initConfiguration and joinConfiguration should be configured identically.
+ // But if they are not configured identically and the currentKubeadmConfig is for init we still
+ // want to avoid unnecessary rollouts.
+ // Accordingly, we also have to compare the currentKubeadmConfig against a desiredKubeadmConfig
+ // computed for init to avoid unnecessary rollouts.
+ // Note: In any case we are going to use desiredKubeadmConfigWithJoin for in-place updates and return it accordingly.
+ if isKubeadmConfigForInit(currentKubeadmConfig) {
+ desiredKubeadmConfigWithInit, err := desiredstate.ComputeDesiredKubeadmConfig(kcp, cluster, false, machine.Name, currentKubeadmConfig)
+ if err != nil {
+ return "", nil, nil, false, errors.Wrapf(err, "failed to match KubeadmConfig")
+ }
+ desiredKubeadmConfigWithInitForDiff, currentKubeadmConfigWithInitForDiff := PrepareKubeadmConfigsForDiff(desiredKubeadmConfigWithInit, currentKubeadmConfig, false)
+
+ // Check if current and desired KubeadmConfigs match.
+ // Note: desiredKubeadmConfigWithInitForDiff has been computed for a kubeadm init.
+ // Note: currentKubeadmConfigWithInitForDiff is for a kubeadm init.
+ match, diff, err := compare.Diff(¤tKubeadmConfigWithInitForDiff.Spec, &desiredKubeadmConfigWithInitForDiff.Spec)
+ if err != nil {
+ return "", nil, nil, false, errors.Wrapf(err, "failed to match KubeadmConfig")
+ }
+ // Always return desiredKubeadmConfigWithJoin (not desiredKubeadmConfigWithInit) as it should always be used for in-place updates.
+ if !match {
+ return fmt.Sprintf("Machine KubeadmConfig is outdated: diff: %s", diff), currentKubeadmConfig, desiredKubeadmConfigWithJoin, false, nil
+ }
+ return "", currentKubeadmConfig, desiredKubeadmConfigWithJoin, true, nil
+ }
- // If any of the compared values are nil, treat them the same as an empty ClusterConfiguration.
- if machineClusterConfig == nil {
- machineClusterConfig = &bootstrapv1.ClusterConfiguration{}
- }
-
- kcpLocalClusterConfiguration := kcp.Spec.KubeadmConfigSpec.ClusterConfiguration.DeepCopy()
- if kcpLocalClusterConfiguration == nil {
- kcpLocalClusterConfiguration = &bootstrapv1.ClusterConfiguration{}
- }
-
- // Skip checking DNS fields because we can update the configuration of the working cluster in place.
- machineClusterConfig.DNS = kcpLocalClusterConfiguration.DNS
-
- // Drop differences that do not lead to changes to Machines, but that might exist due
- // to changes in how we serialize objects or how webhooks work.
- specKCP := &bootstrapv1.KubeadmConfigSpec{ClusterConfiguration: *kcpLocalClusterConfiguration}
- specMachine := &bootstrapv1.KubeadmConfigSpec{ClusterConfiguration: *machineClusterConfig}
- dropOmittableFields(specKCP)
- dropOmittableFields(specMachine)
-
- // Compare and return.
- match, diff, err := compare.Diff(specMachine.ClusterConfiguration, specKCP.ClusterConfiguration)
- if err != nil {
- return false, "", errors.Wrapf(err, "failed to match ClusterConfiguration")
- }
- return match, diff, nil
-}
-
-type versionedClusterConfiguration struct {
- MarshalVersion string `json:"marshalVersion,omitempty"`
- *bootstrapv1.ClusterConfiguration
-}
-
-// ClusterConfigurationAnnotationFromMachineIsOutdated return true if the annotation is outdated.
-// Note: this is intentionally implemented with a string check to prevent an additional json.Unmarshal operation.
-func ClusterConfigurationAnnotationFromMachineIsOutdated(annotation string) bool {
- return !strings.Contains(annotation, fmt.Sprintf("\"marshalVersion\":%q", bootstrapv1.GroupVersion.Version))
-}
-
-// ClusterConfigurationToMachineAnnotationValue returns an annotation valued to add on machines for
-// tracking the ClusterConfiguration value at the time the machine was created.
-func ClusterConfigurationToMachineAnnotationValue(clusterConfiguration *bootstrapv1.ClusterConfiguration) (string, error) {
- machineClusterConfig := &versionedClusterConfiguration{
- MarshalVersion: bootstrapv1.GroupVersion.Version,
- ClusterConfiguration: clusterConfiguration,
+ return fmt.Sprintf("Machine KubeadmConfig is outdated: diff: %s", diff), currentKubeadmConfig, desiredKubeadmConfigWithJoin, false, nil
}
- annotationBytes, err := json.Marshal(machineClusterConfig)
- if err != nil {
- return "", errors.Wrap(err, "failed to marshal cluster configuration")
- }
- return string(annotationBytes), nil
+ return "", currentKubeadmConfig, desiredKubeadmConfigWithJoin, true, nil
}
-// ClusterConfigurationFromMachine returns the ClusterConfiguration value at the time the machine was created.
-// Note: In case the annotation was created with an older version of the KCP API, the value is converted to the current API version.
-func ClusterConfigurationFromMachine(machine *clusterv1.Machine) (*bootstrapv1.ClusterConfiguration, error) {
- machineClusterConfigStr, ok := machine.GetAnnotations()[controlplanev1.KubeadmClusterConfigurationAnnotation]
- if !ok {
- return nil, nil
- }
-
- if ClusterConfigurationAnnotationFromMachineIsOutdated(machineClusterConfigStr) {
- // Note: Only conversion from v1beta1 is supported as of today.
- machineClusterConfigV1Beta1 := &bootstrapv1beta1.ClusterConfiguration{}
- if err := json.Unmarshal([]byte(machineClusterConfigStr), &machineClusterConfigV1Beta1); err != nil {
- return nil, errors.Wrapf(err, "failed to unmarshal ClusterConfiguration from Machine %s", klog.KObj(machine))
- }
-
- kubeadmConfigV1Beta1 := &bootstrapv1beta1.KubeadmConfig{
- Spec: bootstrapv1beta1.KubeadmConfigSpec{
- ClusterConfiguration: machineClusterConfigV1Beta1,
- },
- }
- kubeadmConfig := &bootstrapv1.KubeadmConfig{}
- err := kubeadmConfigV1Beta1.ConvertTo(kubeadmConfig)
- if err != nil {
- return nil, errors.Wrapf(err, "failed to convert ClusterConfiguration from Machine %s", klog.KObj(machine))
+// PrepareKubeadmConfigsForDiff cleans up all fields that are not relevant for the comparison.
+func PrepareKubeadmConfigsForDiff(desiredKubeadmConfig, currentKubeadmConfig *bootstrapv1.KubeadmConfig, convertCurrentInitConfigurationToJoinConfiguration bool) (desired, current *bootstrapv1.KubeadmConfig) {
+ // DeepCopy to ensure the passed in KubeadmConfigs are not modified.
+ // This has to be done because we eventually want to be able to apply the desiredKubeadmConfig
+ // (without the modifications that we make here).
+ desiredKubeadmConfig = desiredKubeadmConfig.DeepCopy()
+ currentKubeadmConfig = currentKubeadmConfig.DeepCopy()
+
+ if convertCurrentInitConfigurationToJoinConfiguration && isKubeadmConfigForInit(currentKubeadmConfig) {
+ // Convert InitConfiguration to JoinConfiguration
+ currentKubeadmConfig.Spec.JoinConfiguration.Timeouts = currentKubeadmConfig.Spec.InitConfiguration.Timeouts
+ currentKubeadmConfig.Spec.JoinConfiguration.Patches = currentKubeadmConfig.Spec.InitConfiguration.Patches
+ currentKubeadmConfig.Spec.JoinConfiguration.SkipPhases = currentKubeadmConfig.Spec.InitConfiguration.SkipPhases
+ currentKubeadmConfig.Spec.JoinConfiguration.NodeRegistration = currentKubeadmConfig.Spec.InitConfiguration.NodeRegistration
+ currentKubeadmConfig.Spec.JoinConfiguration.ControlPlane = &bootstrapv1.JoinControlPlane{
+ LocalAPIEndpoint: currentKubeadmConfig.Spec.InitConfiguration.LocalAPIEndpoint,
}
+ currentKubeadmConfig.Spec.InitConfiguration = bootstrapv1.InitConfiguration{}
- machineClusterConfig := kubeadmConfig.Spec.ClusterConfiguration
- return &machineClusterConfig, nil
+ // CACertPath can only be configured for join.
+ // The CACertPath should never trigger a rollout of Machines created via kubeadm init.
+ currentKubeadmConfig.Spec.JoinConfiguration.CACertPath = desiredKubeadmConfig.Spec.JoinConfiguration.CACertPath
}
- machineClusterConfig := &versionedClusterConfiguration{}
- if err := json.Unmarshal([]byte(machineClusterConfigStr), &machineClusterConfig); err != nil {
- return nil, errors.Wrapf(err, "failed to unmarshal ClusterConfiguration from Machine %s", klog.KObj(machine))
- }
- return machineClusterConfig.ClusterConfiguration, nil
-}
+ // Ignore ControlPlaneEndpoint which is added on the Machine KubeadmConfig by CABPK.
+ // Note: ControlPlaneEndpoint should also never change for a Cluster, so no reason to trigger a rollout because of that.
+ currentKubeadmConfig.Spec.ClusterConfiguration.ControlPlaneEndpoint = desiredKubeadmConfig.Spec.ClusterConfiguration.ControlPlaneEndpoint
-// matchInitOrJoinConfiguration verifies if KCP and machine InitConfiguration or JoinConfiguration matches.
-// NOTE: By extension this method takes care of detecting changes in other fields of the KubeadmConfig configuration (e.g. Files, Mounts etc.)
-func matchInitOrJoinConfiguration(machineConfig *bootstrapv1.KubeadmConfig, kcp *controlplanev1.KubeadmControlPlane) (bool, string, error) {
- if machineConfig == nil {
- // Return true here because failing to get KubeadmConfig should not be considered as unmatching.
- // This is a safety precaution to avoid rolling out machines if the client or the api-server is misbehaving.
- return true, "", nil
- }
- machineConfig = machineConfig.DeepCopy()
-
- // takes the KubeadmConfigSpec from KCP and applies the transformations required
- // to allow a comparison with the KubeadmConfig referenced from the machine.
- kcpConfig := getAdjustedKcpConfig(kcp, machineConfig)
+ // Skip checking DNS fields because we can update the configuration of the working cluster in place.
+ currentKubeadmConfig.Spec.ClusterConfiguration.DNS = desiredKubeadmConfig.Spec.ClusterConfiguration.DNS
// Default both KubeadmConfigSpecs before comparison.
// *Note* This assumes that newly added default values never
// introduce a semantic difference to the unset value.
// But that is something that is ensured by our API guarantees.
- defaulting.ApplyPreviousKubeadmConfigDefaults(kcpConfig)
- defaulting.ApplyPreviousKubeadmConfigDefaults(&machineConfig.Spec)
-
- // cleanups all the fields that are not relevant for the comparison.
- cleanupConfigFields(kcpConfig, machineConfig)
-
- match, diff, err := compare.Diff(&machineConfig.Spec, kcpConfig)
- if err != nil {
- return false, "", errors.Wrapf(err, "failed to match InitConfiguration or JoinConfiguration")
- }
- return match, diff, nil
-}
-
-// getAdjustedKcpConfig takes the KubeadmConfigSpec from KCP and applies the transformations required
-// to allow a comparison with the KubeadmConfig referenced from the machine.
-// NOTE: The KCP controller applies a set of transformations when creating a KubeadmConfig referenced from the machine;
-// those transformations are implemented in ControlPlane.InitialControlPlaneConfig() and ControlPlane.JoinControlPlaneConfig().
-func getAdjustedKcpConfig(kcp *controlplanev1.KubeadmControlPlane, machineConfig *bootstrapv1.KubeadmConfig) *bootstrapv1.KubeadmConfigSpec {
- kcpConfig := kcp.Spec.KubeadmConfigSpec.DeepCopy()
-
- // if Machine's JoinConfiguration is set, this is a joining control plane machine, so empty out the InitConfiguration;
- // otherwise empty out the JoinConfiguration.
- // Note: a KubeadmConfig for a joining control plane must have at least joinConfiguration.controlPlane and joinConfiguration.discovery to be set for joining;
- // if those fields are missing in the KCP config, CABPK sets them.
- if machineConfig.Spec.JoinConfiguration.IsDefined() {
- kcpConfig.InitConfiguration = bootstrapv1.InitConfiguration{}
- } else {
- kcpConfig.JoinConfiguration = bootstrapv1.JoinConfiguration{}
- }
+ defaulting.ApplyPreviousKubeadmConfigDefaults(&desiredKubeadmConfig.Spec)
+ defaulting.ApplyPreviousKubeadmConfigDefaults(¤tKubeadmConfig.Spec)
- return kcpConfig
-}
-
-// cleanupConfigFields cleanups all the fields that are not relevant for the comparison.
-func cleanupConfigFields(kcpConfig *bootstrapv1.KubeadmConfigSpec, machineConfig *bootstrapv1.KubeadmConfig) {
- // KCP ClusterConfiguration will only be compared with a machine's ClusterConfiguration annotation, so
- // we are cleaning up from the reflect.DeepEqual comparison.
- kcpConfig.ClusterConfiguration = bootstrapv1.ClusterConfiguration{}
- machineConfig.Spec.ClusterConfiguration = bootstrapv1.ClusterConfiguration{}
-
- // If KCP JoinConfiguration is not present, set machine JoinConfiguration to nil (nothing can trigger rollout here).
- // NOTE: this is required because CABPK applies an empty joinConfiguration in case no one is provided.
- if !kcpConfig.JoinConfiguration.IsDefined() {
- machineConfig.Spec.JoinConfiguration = bootstrapv1.JoinConfiguration{}
- }
-
- // Cleanup JoinConfiguration.Discovery from kcpConfig and machineConfig, because those info are relevant only for
+ // Cleanup JoinConfiguration.Discovery from desiredKubeadmConfig and currentKubeadmConfig, because those info are relevant only for
// the join process and not for comparing the configuration of the machine.
- emptyDiscovery := bootstrapv1.Discovery{}
- if kcpConfig.JoinConfiguration.IsDefined() {
- kcpConfig.JoinConfiguration.Discovery = emptyDiscovery
- }
- if machineConfig.Spec.JoinConfiguration.IsDefined() {
- machineConfig.Spec.JoinConfiguration.Discovery = emptyDiscovery
- }
-
- // If KCP JoinConfiguration.ControlPlane is not present, set machine join configuration to nil (nothing can trigger rollout here).
- // NOTE: this is required because CABPK applies an empty joinConfiguration.ControlPlane in case no one is provided.
- if kcpConfig.JoinConfiguration.IsDefined() && kcpConfig.JoinConfiguration.ControlPlane == nil &&
- machineConfig.Spec.JoinConfiguration.ControlPlane != nil {
- machineConfig.Spec.JoinConfiguration.ControlPlane = nil
- }
-
- // If KCP's join NodeRegistration is empty, set machine's node registration to empty as no changes should trigger rollout.
- emptyNodeRegistration := bootstrapv1.NodeRegistrationOptions{}
- if kcpConfig.JoinConfiguration.IsDefined() && reflect.DeepEqual(kcpConfig.JoinConfiguration.NodeRegistration, emptyNodeRegistration) &&
- !reflect.DeepEqual(machineConfig.Spec.JoinConfiguration.NodeRegistration, emptyNodeRegistration) {
- machineConfig.Spec.JoinConfiguration.NodeRegistration = emptyNodeRegistration
- }
+ // Note: Changes to Discovery will apply for the next join, but they will not lead to a rollout.
+ // Note: We should also not send Discovery.BootstrapToken.Token to a RuntimeExtension for security reasons.
+ desiredKubeadmConfig.Spec.JoinConfiguration.Discovery = bootstrapv1.Discovery{}
+ currentKubeadmConfig.Spec.JoinConfiguration.Discovery = bootstrapv1.Discovery{}
+
+ // Cleanup ControlPlaneComponentHealthCheckSeconds from desiredKubeadmConfig and currentKubeadmConfig,
+ // because through conversion apiServer.timeoutForControlPlane in v1beta1 is converted to
+ // initConfiguration/joinConfiguration.timeouts.controlPlaneComponentHealthCheckSeconds in v1beta2 and
+ // this can lead to a diff here that would lead to a rollout.
+ // Note: Changes to ControlPlaneComponentHealthCheckSeconds will apply for the next join, but they will not lead to a rollout.
+ desiredKubeadmConfig.Spec.InitConfiguration.Timeouts.ControlPlaneComponentHealthCheckSeconds = nil
+ desiredKubeadmConfig.Spec.JoinConfiguration.Timeouts.ControlPlaneComponentHealthCheckSeconds = nil
+ currentKubeadmConfig.Spec.InitConfiguration.Timeouts.ControlPlaneComponentHealthCheckSeconds = nil
+ currentKubeadmConfig.Spec.JoinConfiguration.Timeouts.ControlPlaneComponentHealthCheckSeconds = nil
// Drop differences that do not lead to changes to Machines, but that might exist due
// to changes in how we serialize objects or how webhooks work.
- dropOmittableFields(kcpConfig)
- dropOmittableFields(&machineConfig.Spec)
+ dropOmittableFields(&desiredKubeadmConfig.Spec)
+ dropOmittableFields(¤tKubeadmConfig.Spec)
+
+ return desiredKubeadmConfig, currentKubeadmConfig
}
// dropOmittableFields makes the comparison tolerant to omittable fields being set in the go struct. It applies to:
@@ -571,3 +527,23 @@ func dropOmittableFields(spec *bootstrapv1.KubeadmConfigSpec) {
spec.NTP.Servers = nil
}
}
+
+// isKubeadmConfigForJoin returns true if the KubeadmConfig is for a control plane
+// or a worker machine that joined an existing cluster.
+// Note: This check is based on the assumption that KubeadmConfig for joining
+// control plane always have a non-empty JoinConfiguration.ControlPlane, while
+// instead the entire JoinConfiguration for the first control plane machine in the
+// cluster is emptied out by KCP.
+// Note: Previously we checked if the entire JoinConfiguration is defined, but that
+// is not safe because apiServer.timeoutForControlPlane in v1beta1 is also converted to
+// joinConfiguration.timeouts.controlPlaneComponentHealthCheckSeconds in v1beta2 and
+// accordingly we would also detect init KubeadmConfigs as join.
+func isKubeadmConfigForJoin(c *bootstrapv1.KubeadmConfig) bool {
+ return c.Spec.JoinConfiguration.ControlPlane != nil
+}
+
+// isKubeadmConfigForInit returns true if the KubeadmConfig is for the first control plane
+// machine in the cluster.
+func isKubeadmConfigForInit(c *bootstrapv1.KubeadmConfig) bool {
+ return !isKubeadmConfigForJoin(c)
+}
diff --git a/controlplane/kubeadm/internal/filters_test.go b/controlplane/kubeadm/internal/filters_test.go
index 0d3157ec6529..1e7c78a89f79 100644
--- a/controlplane/kubeadm/internal/filters_test.go
+++ b/controlplane/kubeadm/internal/filters_test.go
@@ -17,7 +17,6 @@ limitations under the License.
package internal
import (
- "fmt"
"testing"
"time"
@@ -25,130 +24,62 @@ import (
"github.com/google/go-cmp/cmp"
. "github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
+ apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+ "k8s.io/apimachinery/pkg/runtime"
"k8s.io/utils/ptr"
+ "sigs.k8s.io/controller-runtime/pkg/client/fake"
bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
kubeadmtypes "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types"
"sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstream"
+ "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/desiredstate"
+ "sigs.k8s.io/cluster-api/util/test/builder"
)
-func TestClusterConfigurationAnnotation(t *testing.T) {
- t.Run("ClusterConfigurationToMachineAnnotationValue", func(t *testing.T) {
+func TestMatchesKubeadmConfig(t *testing.T) {
+ t.Run("returns true if Machine configRef is not defined", func(t *testing.T) {
g := NewWithT(t)
- kcp := &controlplanev1.KubeadmControlPlane{
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- APIServer: bootstrapv1.APIServer{
- ExtraArgs: []bootstrapv1.Arg{
- {
- Name: "foo",
- Value: ptr.To("bar"),
- },
- },
- },
- CertificatesDir: "foo",
- },
- },
- },
- }
-
- annotations, err := ClusterConfigurationToMachineAnnotationValue(&kcp.Spec.KubeadmConfigSpec.ClusterConfiguration)
- g.Expect(err).NotTo(HaveOccurred())
- g.Expect(annotations).To(Equal("{\"marshalVersion\":\"v1beta2\",\"apiServer\":{\"extraArgs\":[{\"name\":\"foo\",\"value\":\"bar\"}]},\"certificatesDir\":\"foo\"}"))
- })
- t.Run("ClusterConfigurationFromMachineIsOutdated", func(t *testing.T) {
- g := NewWithT(t)
-
- // Without annotation.
- annotation := ""
- g.Expect(ClusterConfigurationAnnotationFromMachineIsOutdated(annotation)).To(BeTrue())
-
- // v1beta1 annotation (without marshalVersion)
- annotation = "{\"etcd\":{},\"apiServer\":{\"extraArgs\":{\"foo\":\"bar\"}},\"controllerManager\":{},\"scheduler\":{},\"dns\":{}}"
- g.Expect(ClusterConfigurationAnnotationFromMachineIsOutdated(annotation)).To(BeTrue())
-
- // up to date annotation (marshalVersion equal to current version)
- annotation = fmt.Sprintf("{\"marshalVersion\":%q,\"etcd\":{},\"apiServer\":{\"extraArgs\":[{\"name\":\"foo\",\"value\":\"bar\"}]},\"controllerManager\":{},\"scheduler\":{},\"dns\":{}}", bootstrapv1.GroupVersion.Version)
- g.Expect(ClusterConfigurationAnnotationFromMachineIsOutdated(annotation)).To(BeFalse())
-
- // marshalVersion not equal to the current version (this should not happen because marshalVersion has been introduced with the v1beta2 API)
- annotation = "{\"marshalVersion\":\"foo\",\"etcd\":{},\"apiServer\":{\"extraArgs\":[{\"name\":\"foo\",\"value\":\"bar\"}]},\"controllerManager\":{},\"scheduler\":{},\"dns\":{}}"
- g.Expect(ClusterConfigurationAnnotationFromMachineIsOutdated(annotation)).To(BeTrue())
- })
- t.Run("ClusterConfigurationFromMachine", func(t *testing.T) {
- g := NewWithT(t)
- m1 := &clusterv1.Machine{}
-
- // Without annotation.
- clusterConfiguration, err := ClusterConfigurationFromMachine(m1)
- g.Expect(err).NotTo(HaveOccurred())
- g.Expect(clusterConfiguration).To(BeNil())
-
- // v1beta1 annotation (without marshalVersion)
- m1.SetAnnotations(map[string]string{controlplanev1.KubeadmClusterConfigurationAnnotation: "{\"etcd\":{},\"apiServer\":{\"extraArgs\":{\"foo\":\"bar\"}},\"controllerManager\":{},\"scheduler\":{},\"dns\":{},\"certificatesDir\":\"foo\"}"})
- clusterConfiguration, err = ClusterConfigurationFromMachine(m1)
- g.Expect(err).NotTo(HaveOccurred())
- g.Expect(clusterConfiguration).To(Equal(&bootstrapv1.ClusterConfiguration{
- APIServer: bootstrapv1.APIServer{
- ExtraArgs: []bootstrapv1.Arg{ // Extra args converted from old format to new format.
- {
- Name: "foo",
- Value: ptr.To("bar"),
- },
- },
+ m := &clusterv1.Machine{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machine",
},
- CertificatesDir: "foo",
- }))
-
- // up to date annotation (marshalVersion equal to current version)
- m1.SetAnnotations(map[string]string{controlplanev1.KubeadmClusterConfigurationAnnotation: fmt.Sprintf("{\"marshalVersion\":%q,\"etcd\":{},\"apiServer\":{\"extraArgs\":[{\"name\":\"foo\",\"value\":\"bar\"}]},\"controllerManager\":{},\"scheduler\":{},\"dns\":{},\"certificatesDir\":\"foo\"}", bootstrapv1.GroupVersion.Version)})
- clusterConfiguration, err = ClusterConfigurationFromMachine(m1)
- g.Expect(err).NotTo(HaveOccurred())
- g.Expect(clusterConfiguration).To(Equal(&bootstrapv1.ClusterConfiguration{
- APIServer: bootstrapv1.APIServer{
- ExtraArgs: []bootstrapv1.Arg{
- {
- Name: "foo",
- Value: ptr.To("bar"),
- },
+ Spec: clusterv1.MachineSpec{
+ Bootstrap: clusterv1.Bootstrap{
+ // ConfigRef not defined
},
},
- CertificatesDir: "foo",
- }))
- })
-}
-
-func TestMatchClusterConfiguration(t *testing.T) {
- t.Run("machine without the ClusterConfiguration annotation should match (not enough information to make a decision)", func(t *testing.T) {
- g := NewWithT(t)
- kcp := &controlplanev1.KubeadmControlPlane{}
- m := &clusterv1.Machine{}
- match, diff, err := matchClusterConfiguration(kcp, m)
+ }
+ reason, _, _, match, err := matchesKubeadmConfig(map[string]*bootstrapv1.KubeadmConfig{}, nil, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
g.Expect(match).To(BeTrue())
- g.Expect(diff).To(BeEmpty())
+ g.Expect(reason).To(BeEmpty())
})
- t.Run("machine with an invalid ClusterConfiguration annotation should not match (only solution is to rollout)", func(t *testing.T) {
+ t.Run("returns true if Machine KubeadmConfig is not found", func(t *testing.T) {
g := NewWithT(t)
- kcp := &controlplanev1.KubeadmControlPlane{}
m := &clusterv1.Machine{
ObjectMeta: metav1.ObjectMeta{
- Annotations: map[string]string{
- controlplanev1.KubeadmClusterConfigurationAnnotation: "$|^^_",
+ Name: "machine",
+ },
+ Spec: clusterv1.MachineSpec{
+ Bootstrap: clusterv1.Bootstrap{
+ ConfigRef: clusterv1.ContractVersionedObjectReference{
+ APIGroup: bootstrapv1.GroupVersion.Group,
+ Kind: "KubeadmConfig",
+ Name: "test",
+ },
},
},
}
- match, diff, err := matchClusterConfiguration(kcp, m)
+ reason, _, _, match, err := matchesKubeadmConfig(map[string]*bootstrapv1.KubeadmConfig{}, nil, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
- g.Expect(match).To(BeFalse())
- g.Expect(diff).To(BeEmpty())
+ g.Expect(match).To(BeTrue())
+ g.Expect(reason).To(BeEmpty())
})
- t.Run("Return true if cluster configuration matches", func(t *testing.T) {
+ t.Run("returns true if ClusterConfiguration is equal", func(t *testing.T) {
g := NewWithT(t)
kcp := &controlplanev1.KubeadmControlPlane{
Spec: controlplanev1.KubeadmControlPlaneSpec{
@@ -157,382 +88,287 @@ func TestMatchClusterConfiguration(t *testing.T) {
CertificatesDir: "foo",
},
},
+ Version: "v1.30.0",
},
}
m := &clusterv1.Machine{
ObjectMeta: metav1.ObjectMeta{
- Annotations: map[string]string{
- controlplanev1.KubeadmClusterConfigurationAnnotation: "{\n \"certificatesDir\": \"foo\"\n}",
- },
+ Name: "machine",
},
- }
- match, diff, err := matchClusterConfiguration(kcp, m)
- g.Expect(err).ToNot(HaveOccurred())
- g.Expect(match).To(BeTrue())
- g.Expect(diff).To(BeEmpty())
- })
- t.Run("Return false if cluster configuration does not match", func(t *testing.T) {
- g := NewWithT(t)
- kcp := &controlplanev1.KubeadmControlPlane{
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- CertificatesDir: "foo",
+ Spec: clusterv1.MachineSpec{
+ Bootstrap: clusterv1.Bootstrap{
+ ConfigRef: clusterv1.ContractVersionedObjectReference{
+ APIGroup: bootstrapv1.GroupVersion.Group,
+ Kind: "KubeadmConfig",
+ Name: "test",
},
},
},
}
- m := &clusterv1.Machine{
+ machineConfig := &bootstrapv1.KubeadmConfig{
ObjectMeta: metav1.ObjectMeta{
- Annotations: map[string]string{
- controlplanev1.KubeadmClusterConfigurationAnnotation: "{\n \"certificatesDir\": \"bar\"\n}",
+ Namespace: "default",
+ Name: "test",
+ },
+ Spec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ CertificatesDir: "foo",
},
},
}
- match, diff, err := matchClusterConfiguration(kcp, m)
+ machineConfigs := map[string]*bootstrapv1.KubeadmConfig{
+ m.Name: machineConfig,
+ }
+ reason, currentKubeadmConfig, desiredKubeadmConfig, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
- g.Expect(match).To(BeFalse())
- g.Expect(diff).To(BeComparableTo(`v1beta2.ClusterConfiguration{
- ... // 4 identical fields
- Scheduler: {},
- DNS: {},
-- CertificatesDir: "bar",
-+ CertificatesDir: "foo",
- ImageRepository: "",
- FeatureGates: nil,
- ... // 2 identical fields
- }`))
+ g.Expect(currentKubeadmConfig).ToNot(BeNil())
+ g.Expect(desiredKubeadmConfig).ToNot(BeNil())
+ g.Expect(match).To(BeTrue())
+ g.Expect(reason).To(BeEmpty())
})
- t.Run("Return true if only omittable fields are changed", func(t *testing.T) {
+ t.Run("returns true if ClusterConfiguration is equal (empty)", func(t *testing.T) {
g := NewWithT(t)
kcp := &controlplanev1.KubeadmControlPlane{
Spec: controlplanev1.KubeadmControlPlaneSpec{
KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- FeatureGates: map[string]bool{},
- },
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{},
},
+ Version: "v1.30.0",
},
}
m := &clusterv1.Machine{
ObjectMeta: metav1.ObjectMeta{
- Annotations: map[string]string{
- controlplanev1.KubeadmClusterConfigurationAnnotation: "{}",
+ Name: "machine",
+ },
+ Spec: clusterv1.MachineSpec{
+ Bootstrap: clusterv1.Bootstrap{
+ ConfigRef: clusterv1.ContractVersionedObjectReference{
+ APIGroup: bootstrapv1.GroupVersion.Group,
+ Kind: "KubeadmConfig",
+ Name: "test",
+ },
},
},
}
- match, diff, err := matchClusterConfiguration(kcp, m)
+ machineConfig := &bootstrapv1.KubeadmConfig{
+ ObjectMeta: metav1.ObjectMeta{
+ Namespace: "default",
+ Name: "test",
+ },
+ Spec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{},
+ },
+ }
+ machineConfigs := map[string]*bootstrapv1.KubeadmConfig{
+ m.Name: machineConfig,
+ }
+ reason, currentKubeadmConfig, desiredKubeadmConfig, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(currentKubeadmConfig).ToNot(BeNil())
+ g.Expect(desiredKubeadmConfig).ToNot(BeNil())
g.Expect(match).To(BeTrue())
- g.Expect(diff).To(BeEmpty())
+ g.Expect(reason).To(BeEmpty())
})
- t.Run("Return true if cluster configuration is nil (special case)", func(t *testing.T) {
+ t.Run("returns true if ClusterConfiguration is equal apart from defaulted FeatureGates field", func(t *testing.T) {
g := NewWithT(t)
kcp := &controlplanev1.KubeadmControlPlane{
Spec: controlplanev1.KubeadmControlPlaneSpec{
- KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{},
+ KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{},
+ },
+ Version: "v1.31.0",
},
}
m := &clusterv1.Machine{
ObjectMeta: metav1.ObjectMeta{
- Annotations: map[string]string{
- controlplanev1.KubeadmClusterConfigurationAnnotation: "null",
- },
+ Name: "machine",
},
- }
- match, diff, err := matchClusterConfiguration(kcp, m)
- g.Expect(err).ToNot(HaveOccurred())
- g.Expect(match).To(BeTrue())
- g.Expect(diff).To(BeEmpty())
- })
- t.Run("Return true although the DNS fields are different", func(t *testing.T) {
- g := NewWithT(t)
- kcp := &controlplanev1.KubeadmControlPlane{
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- DNS: bootstrapv1.DNS{
- ImageTag: "v1.10.1",
- ImageRepository: "gcr.io/capi-test",
- },
+ Spec: clusterv1.MachineSpec{
+ Bootstrap: clusterv1.Bootstrap{
+ ConfigRef: clusterv1.ContractVersionedObjectReference{
+ APIGroup: bootstrapv1.GroupVersion.Group,
+ Kind: "KubeadmConfig",
+ Name: "test",
},
},
},
}
- m := &clusterv1.Machine{
+ machineConfig := &bootstrapv1.KubeadmConfig{
ObjectMeta: metav1.ObjectMeta{
- Annotations: map[string]string{
- controlplanev1.KubeadmClusterConfigurationAnnotation: "{\"dns\":{\"imageRepository\":\"gcr.io/capi-test\",\"imageTag\":\"v1.9.3\"}}",
+ Namespace: "default",
+ Name: "test",
+ },
+ Spec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ FeatureGates: map[string]bool{
+ desiredstate.ControlPlaneKubeletLocalMode: true,
+ },
},
},
}
- match, diff, err := matchClusterConfiguration(kcp, m)
+ machineConfigs := map[string]*bootstrapv1.KubeadmConfig{
+ m.Name: machineConfig,
+ }
+ reason, currentKubeadmConfig, desiredKubeadmConfig, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(currentKubeadmConfig).ToNot(BeNil())
+ g.Expect(desiredKubeadmConfig).ToNot(BeNil())
g.Expect(match).To(BeTrue())
- g.Expect(diff).To(BeEmpty())
+ g.Expect(reason).To(BeEmpty())
})
- t.Run("Check we are not introducing unexpected rollouts when changing the API", func(t *testing.T) {
+ t.Run("returns true if ClusterConfiguration is equal apart from ControlPlaneEndpoint and DNS fields", func(t *testing.T) {
g := NewWithT(t)
kcp := &controlplanev1.KubeadmControlPlane{
Spec: controlplanev1.KubeadmControlPlaneSpec{
KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- APIServer: bootstrapv1.APIServer{
- ExtraArgs: []bootstrapv1.Arg{
- {
- Name: "foo",
- Value: ptr.To("bar"),
- },
- },
- },
- ControllerManager: bootstrapv1.ControllerManager{
- ExtraArgs: []bootstrapv1.Arg{
- {
- Name: "foo",
- Value: ptr.To("bar"),
- },
- },
- },
- Scheduler: bootstrapv1.Scheduler{
- ExtraArgs: []bootstrapv1.Arg{
- {
- Name: "foo",
- Value: ptr.To("bar"),
- },
- },
- },
DNS: bootstrapv1.DNS{
ImageTag: "v1.10.1",
ImageRepository: "gcr.io/capi-test",
},
},
},
+ Version: "v1.30.0",
},
}
-
- // This is a point in time snapshot of how a serialized ClusterConfiguration looks like;
- // we are hardcoding this in the test so we can detect if a change in the API impacts serialization.
- // NOTE: changes in the json representation do not always trigger a rollout in KCP, but they are an heads up that should be investigated.
- annotationsCheckPoint := "{\"marshalVersion\":\"v1beta2\",\"apiServer\":{\"extraArgs\":[{\"name\":\"foo\",\"value\":\"bar\"}]},\"controllerManager\":{\"extraArgs\":[{\"name\":\"foo\",\"value\":\"bar\"}]},\"scheduler\":{\"extraArgs\":[{\"name\":\"foo\",\"value\":\"bar\"}]},\"dns\":{\"imageRepository\":\"gcr.io/capi-test\",\"imageTag\":\"v1.10.1\"}}"
-
- // compute how a serialized ClusterConfiguration looks like now
- annotations, err := ClusterConfigurationToMachineAnnotationValue(&kcp.Spec.KubeadmConfigSpec.ClusterConfiguration)
- g.Expect(err).NotTo(HaveOccurred())
- g.Expect(annotations).To(Equal(annotationsCheckPoint))
-
- // check the match function detects if a Machine with the annotation string above matches the object it originates from (round trip).
m := &clusterv1.Machine{
ObjectMeta: metav1.ObjectMeta{
- Annotations: map[string]string{
- controlplanev1.KubeadmClusterConfigurationAnnotation: annotationsCheckPoint,
- },
+ Name: "machine",
},
- }
- g.Expect(matchClusterConfiguration(kcp, m)).To(BeTrue())
- })
-}
-
-func TestGetAdjustedKcpConfig(t *testing.T) {
- t.Run("if the machine is the first control plane, kcp config should get InitConfiguration", func(t *testing.T) {
- g := NewWithT(t)
- kcp := &controlplanev1.KubeadmControlPlane{
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- InitConfiguration: bootstrapv1.InitConfiguration{
- Patches: bootstrapv1.Patches{
- Directory: "/tmp/patches",
- },
- },
- JoinConfiguration: bootstrapv1.JoinConfiguration{
- Patches: bootstrapv1.Patches{
- Directory: "/tmp/patches",
- },
+ Spec: clusterv1.MachineSpec{
+ Bootstrap: clusterv1.Bootstrap{
+ ConfigRef: clusterv1.ContractVersionedObjectReference{
+ APIGroup: bootstrapv1.GroupVersion.Group,
+ Kind: "KubeadmConfig",
+ Name: "test",
},
},
},
}
machineConfig := &bootstrapv1.KubeadmConfig{
+ ObjectMeta: metav1.ObjectMeta{
+ Namespace: "default",
+ Name: "test",
+ },
Spec: bootstrapv1.KubeadmConfigSpec{
- InitConfiguration: bootstrapv1.InitConfiguration{ // first control-plane
- Patches: bootstrapv1.Patches{
- Directory: "/tmp/patches",
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ ControlPlaneEndpoint: "1.2.3.4:6443",
+ DNS: bootstrapv1.DNS{
+ ImageTag: "v1.9.3",
+ ImageRepository: "gcr.io/capi-test",
},
},
},
}
- kcpConfig := getAdjustedKcpConfig(kcp, machineConfig)
- g.Expect(kcpConfig.InitConfiguration.IsDefined()).To(BeTrue())
- g.Expect(kcpConfig.JoinConfiguration.IsDefined()).To(BeFalse())
+ machineConfigs := map[string]*bootstrapv1.KubeadmConfig{
+ m.Name: machineConfig,
+ }
+ reason, currentKubeadmConfig, desiredKubeadmConfig, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
+ g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(currentKubeadmConfig).ToNot(BeNil())
+ g.Expect(desiredKubeadmConfig).ToNot(BeNil())
+ g.Expect(match).To(BeTrue())
+ g.Expect(reason).To(BeEmpty())
})
- t.Run("if the machine is a joining control plane, kcp config should get JoinConfiguration", func(t *testing.T) {
+ t.Run("returns false if ClusterConfiguration is NOT equal", func(t *testing.T) {
g := NewWithT(t)
kcp := &controlplanev1.KubeadmControlPlane{
Spec: controlplanev1.KubeadmControlPlaneSpec{
KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- InitConfiguration: bootstrapv1.InitConfiguration{
- Patches: bootstrapv1.Patches{
- Directory: "/tmp/patches",
- },
- },
- JoinConfiguration: bootstrapv1.JoinConfiguration{
- Patches: bootstrapv1.Patches{
- Directory: "/tmp/patches",
- },
- },
- },
- },
- }
- machineConfig := &bootstrapv1.KubeadmConfig{
- Spec: bootstrapv1.KubeadmConfigSpec{
- JoinConfiguration: bootstrapv1.JoinConfiguration{ // joining control-plane
- Patches: bootstrapv1.Patches{
- Directory: "/tmp/patches",
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ CertificatesDir: "foo",
},
},
+ Version: "v1.30.0",
},
}
- kcpConfig := getAdjustedKcpConfig(kcp, machineConfig)
- g.Expect(kcpConfig.InitConfiguration.IsDefined()).To(BeFalse())
- g.Expect(kcpConfig.JoinConfiguration.IsDefined()).To(BeTrue())
- })
-}
-
-func TestCleanupConfigFields(t *testing.T) {
- t.Run("ClusterConfiguration gets removed from KcpConfig and MachineConfig", func(t *testing.T) {
- g := NewWithT(t)
- kcpConfig := &bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- CertificatesDir: "/tmp/certs",
- },
- }
- machineConfig := &bootstrapv1.KubeadmConfig{
- Spec: bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- CertificatesDir: "/tmp/certs",
- },
- },
- }
- cleanupConfigFields(kcpConfig, machineConfig)
- g.Expect(kcpConfig.ClusterConfiguration.IsDefined()).To(BeFalse())
- g.Expect(machineConfig.Spec.ClusterConfiguration.IsDefined()).To(BeFalse())
- })
- t.Run("JoinConfiguration gets removed from MachineConfig if it was not derived by KCPConfig", func(t *testing.T) {
- g := NewWithT(t)
- kcpConfig := &bootstrapv1.KubeadmConfigSpec{
- JoinConfiguration: bootstrapv1.JoinConfiguration{}, // KCP not providing a JoinConfiguration
- }
- machineConfig := &bootstrapv1.KubeadmConfig{
- Spec: bootstrapv1.KubeadmConfigSpec{
- JoinConfiguration: bootstrapv1.JoinConfiguration{
- ControlPlane: &bootstrapv1.JoinControlPlane{},
- }, // Machine gets a default JoinConfiguration from CABPK
- },
- }
- cleanupConfigFields(kcpConfig, machineConfig)
- g.Expect(kcpConfig.JoinConfiguration.IsDefined()).To(BeFalse())
- g.Expect(machineConfig.Spec.JoinConfiguration.IsDefined()).To(BeFalse())
- })
- t.Run("JoinConfiguration.Discovery gets removed because it is not relevant for compare", func(t *testing.T) {
- g := NewWithT(t)
- kcpConfig := &bootstrapv1.KubeadmConfigSpec{
- JoinConfiguration: bootstrapv1.JoinConfiguration{
- Discovery: bootstrapv1.Discovery{TLSBootstrapToken: "aaa"},
+ m := &clusterv1.Machine{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "machine",
},
- }
- machineConfig := &bootstrapv1.KubeadmConfig{
- Spec: bootstrapv1.KubeadmConfigSpec{
- JoinConfiguration: bootstrapv1.JoinConfiguration{
- Discovery: bootstrapv1.Discovery{TLSBootstrapToken: "aaa"},
+ Spec: clusterv1.MachineSpec{
+ Bootstrap: clusterv1.Bootstrap{
+ ConfigRef: clusterv1.ContractVersionedObjectReference{
+ APIGroup: bootstrapv1.GroupVersion.Group,
+ Kind: "KubeadmConfig",
+ Name: "test",
+ },
},
},
}
- cleanupConfigFields(kcpConfig, machineConfig)
- g.Expect(kcpConfig.JoinConfiguration.Discovery).To(BeComparableTo(bootstrapv1.Discovery{}))
- g.Expect(machineConfig.Spec.JoinConfiguration.Discovery).To(BeComparableTo(bootstrapv1.Discovery{}))
- })
- t.Run("JoinConfiguration.ControlPlane gets removed from MachineConfig if it was not derived by KCPConfig", func(t *testing.T) {
- g := NewWithT(t)
- kcpConfig := &bootstrapv1.KubeadmConfigSpec{
- JoinConfiguration: bootstrapv1.JoinConfiguration{
- ControlPlane: nil, // Control plane configuration missing in KCP
- },
- }
machineConfig := &bootstrapv1.KubeadmConfig{
- Spec: bootstrapv1.KubeadmConfigSpec{
- JoinConfiguration: bootstrapv1.JoinConfiguration{
- ControlPlane: &bootstrapv1.JoinControlPlane{}, // Machine gets a default JoinConfiguration.ControlPlane from CABPK
- },
- },
- }
- cleanupConfigFields(kcpConfig, machineConfig)
- g.Expect(kcpConfig.JoinConfiguration).ToNot(BeNil())
- g.Expect(machineConfig.Spec.JoinConfiguration.ControlPlane).To(BeNil())
- })
- t.Run("JoinConfiguration.NodeRegistrationOptions gets removed from MachineConfig if it was not derived by KCPConfig", func(t *testing.T) {
- g := NewWithT(t)
- kcpConfig := &bootstrapv1.KubeadmConfigSpec{
- JoinConfiguration: bootstrapv1.JoinConfiguration{
- NodeRegistration: bootstrapv1.NodeRegistrationOptions{}, // NodeRegistrationOptions configuration missing in KCP
+ ObjectMeta: metav1.ObjectMeta{
+ Namespace: "default",
+ Name: "test",
},
- }
- machineConfig := &bootstrapv1.KubeadmConfig{
Spec: bootstrapv1.KubeadmConfigSpec{
- JoinConfiguration: bootstrapv1.JoinConfiguration{
- NodeRegistration: bootstrapv1.NodeRegistrationOptions{Name: "test"}, // Machine gets a some JoinConfiguration.NodeRegistrationOptions
- },
- },
- }
- cleanupConfigFields(kcpConfig, machineConfig)
- g.Expect(kcpConfig.JoinConfiguration).ToNot(BeNil())
- g.Expect(machineConfig.Spec.JoinConfiguration.NodeRegistration).To(BeComparableTo(bootstrapv1.NodeRegistrationOptions{}))
- })
- t.Run("drops omittable fields", func(t *testing.T) {
- g := NewWithT(t)
- kcpConfig := &bootstrapv1.KubeadmConfigSpec{
- JoinConfiguration: bootstrapv1.JoinConfiguration{
- NodeRegistration: bootstrapv1.NodeRegistrationOptions{
- KubeletExtraArgs: []bootstrapv1.Arg{},
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ CertificatesDir: "bar",
},
},
}
- machineConfig := &bootstrapv1.KubeadmConfig{
- Spec: bootstrapv1.KubeadmConfigSpec{
- JoinConfiguration: bootstrapv1.JoinConfiguration{
- NodeRegistration: bootstrapv1.NodeRegistrationOptions{
- KubeletExtraArgs: []bootstrapv1.Arg{},
- },
- },
- },
+ machineConfigs := map[string]*bootstrapv1.KubeadmConfig{
+ m.Name: machineConfig,
}
- cleanupConfigFields(kcpConfig, machineConfig)
- g.Expect(kcpConfig.JoinConfiguration.NodeRegistration.KubeletExtraArgs).To(BeNil())
- g.Expect(machineConfig.Spec.JoinConfiguration.NodeRegistration.KubeletExtraArgs).To(BeNil())
- })
-}
-
-func TestMatchInitOrJoinConfiguration(t *testing.T) {
- t.Run("returns true if the machine does not have a bootstrap config", func(t *testing.T) {
- g := NewWithT(t)
- kcp := &controlplanev1.KubeadmControlPlane{}
- match, diff, err := matchInitOrJoinConfiguration(nil, kcp)
+ reason, currentKubeadmConfig, desiredKubeadmConfig, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
- g.Expect(match).To(BeTrue())
- g.Expect(diff).To(BeEmpty())
+ g.Expect(currentKubeadmConfig).ToNot(BeNil())
+ g.Expect(desiredKubeadmConfig).ToNot(BeNil())
+ g.Expect(match).To(BeFalse())
+ g.Expect(reason).To(BeComparableTo(`Machine KubeadmConfig is outdated: diff: &v1beta2.KubeadmConfigSpec{
+ ClusterConfiguration: v1beta2.ClusterConfiguration{
+ ... // 4 identical fields
+ Scheduler: {},
+ DNS: {},
+- CertificatesDir: "bar",
++ CertificatesDir: "foo",
+ ImageRepository: "",
+ FeatureGates: nil,
+ ... // 3 identical fields
+ },
+ InitConfiguration: {NodeRegistration: {ImagePullPolicy: "IfNotPresent"}},
+ JoinConfiguration: {NodeRegistration: {ImagePullPolicy: "IfNotPresent"}},
+ ... // 11 identical fields
+ }`))
})
- t.Run("returns true if one format is empty and the other one cloud-config", func(t *testing.T) {
+ t.Run("returns true if InitConfiguration is equal after conversion to JoinConfiguration", func(t *testing.T) {
g := NewWithT(t)
kcp := &controlplanev1.KubeadmControlPlane{
Spec: controlplanev1.KubeadmControlPlaneSpec{
KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- Format: bootstrapv1.CloudConfig,
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{},
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ Timeouts: bootstrapv1.Timeouts{
+ // ControlPlaneComponentHealthCheckSeconds is different, but it is ignored for the diff
+ ControlPlaneComponentHealthCheckSeconds: ptr.To[int32](5),
+ KubernetesAPICallSeconds: ptr.To[int32](7),
+ },
+ Patches: bootstrapv1.Patches{
+ Directory: "/test/patches",
+ },
+ SkipPhases: []string{"skip-phase"},
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "name",
+ KubeletExtraArgs: []bootstrapv1.Arg{
+ {
+ Name: "v",
+ Value: ptr.To("8"),
+ },
+ },
+ },
+ ControlPlane: &bootstrapv1.JoinControlPlane{
+ LocalAPIEndpoint: bootstrapv1.APIEndpoint{
+ AdvertiseAddress: "1.2.3.4",
+ BindPort: 6443,
+ },
+ },
+ CACertPath: "/tmp/cacert", // This field doesn't exist in InitConfiguration, so it should not lead to a rollout.
+ },
},
+ Version: "v1.30.0",
},
}
m := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- Kind: "Machine",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
@@ -549,40 +385,68 @@ func TestMatchInitOrJoinConfiguration(t *testing.T) {
}
machineConfigs := map[string]*bootstrapv1.KubeadmConfig{
m.Name: {
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmConfig",
- APIVersion: bootstrapv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
},
Spec: bootstrapv1.KubeadmConfigSpec{
- Format: "",
+ // InitConfiguration will be converted to JoinConfiguration and then compared against the JoinConfiguration from KCP.
+ InitConfiguration: bootstrapv1.InitConfiguration{
+ Timeouts: bootstrapv1.Timeouts{
+ // ControlPlaneComponentHealthCheckSeconds is different, but it is ignored for the diff
+ ControlPlaneComponentHealthCheckSeconds: ptr.To[int32](1),
+ KubernetesAPICallSeconds: ptr.To[int32](7),
+ },
+ Patches: bootstrapv1.Patches{
+ Directory: "/test/patches",
+ },
+ SkipPhases: []string{"skip-phase"},
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "name",
+ KubeletExtraArgs: []bootstrapv1.Arg{
+ {
+ Name: "v",
+ Value: ptr.To("8"),
+ },
+ },
+ },
+ LocalAPIEndpoint: bootstrapv1.APIEndpoint{
+ AdvertiseAddress: "1.2.3.4",
+ BindPort: 6443,
+ },
+ },
},
},
}
- match, diff, err := matchInitOrJoinConfiguration(machineConfigs[m.Name], kcp)
+ reason, currentKubeadmConfig, desiredKubeadmConfig, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(currentKubeadmConfig).ToNot(BeNil())
+ g.Expect(desiredKubeadmConfig).ToNot(BeNil())
+ g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
g.Expect(match).To(BeTrue())
- g.Expect(diff).To(BeEmpty())
+ g.Expect(reason).To(BeEmpty())
})
- t.Run("returns true if InitConfiguration is equal", func(t *testing.T) {
+ t.Run("returns true if JoinConfiguration is not equal, but InitConfiguration is", func(t *testing.T) {
g := NewWithT(t)
kcp := &controlplanev1.KubeadmControlPlane{
Spec: controlplanev1.KubeadmControlPlaneSpec{
KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
ClusterConfiguration: bootstrapv1.ClusterConfiguration{},
- InitConfiguration: bootstrapv1.InitConfiguration{},
- JoinConfiguration: bootstrapv1.JoinConfiguration{},
+ InitConfiguration: bootstrapv1.InitConfiguration{
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "name",
+ },
+ },
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "Different name",
+ },
+ },
},
+ Version: "v1.30.0",
},
}
m := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- Kind: "Machine",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
@@ -599,23 +463,26 @@ func TestMatchInitOrJoinConfiguration(t *testing.T) {
}
machineConfigs := map[string]*bootstrapv1.KubeadmConfig{
m.Name: {
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmConfig",
- APIVersion: bootstrapv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
},
Spec: bootstrapv1.KubeadmConfigSpec{
- InitConfiguration: bootstrapv1.InitConfiguration{},
+ InitConfiguration: bootstrapv1.InitConfiguration{
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "name",
+ },
+ },
},
},
}
- match, diff, err := matchInitOrJoinConfiguration(machineConfigs[m.Name], kcp)
+ reason, currentKubeadmConfig, desiredKubeadmConfig, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(currentKubeadmConfig).ToNot(BeNil())
+ g.Expect(desiredKubeadmConfig).ToNot(BeNil())
+ g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
g.Expect(match).To(BeTrue())
- g.Expect(diff).To(BeEmpty())
+ g.Expect(reason).To(BeEmpty())
})
t.Run("returns false if InitConfiguration is NOT equal", func(t *testing.T) {
g := NewWithT(t)
@@ -628,15 +495,16 @@ func TestMatchInitOrJoinConfiguration(t *testing.T) {
Name: "A new name", // This is a change
},
},
- JoinConfiguration: bootstrapv1.JoinConfiguration{},
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "A new name", // This is a change
+ },
+ },
},
+ Version: "v1.30.0",
},
}
m := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- Kind: "Machine",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
@@ -653,10 +521,6 @@ func TestMatchInitOrJoinConfiguration(t *testing.T) {
}
machineConfigs := map[string]*bootstrapv1.KubeadmConfig{
m.Name: {
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmConfig",
- APIVersion: bootstrapv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
@@ -670,10 +534,13 @@ func TestMatchInitOrJoinConfiguration(t *testing.T) {
},
},
}
- match, diff, err := matchInitOrJoinConfiguration(machineConfigs[m.Name], kcp)
+ reason, currentKubeadmConfig, desiredKubeadmConfig, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(currentKubeadmConfig).ToNot(BeNil())
+ g.Expect(desiredKubeadmConfig).ToNot(BeNil())
+ g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
g.Expect(match).To(BeFalse())
- g.Expect(diff).To(BeComparableTo(`&v1beta2.KubeadmConfigSpec{
+ g.Expect(reason).To(BeComparableTo(`Machine KubeadmConfig is outdated: diff: &v1beta2.KubeadmConfigSpec{
ClusterConfiguration: {},
InitConfiguration: v1beta2.InitConfiguration{
BootstrapTokens: nil,
@@ -700,15 +567,16 @@ func TestMatchInitOrJoinConfiguration(t *testing.T) {
KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
ClusterConfiguration: bootstrapv1.ClusterConfiguration{},
InitConfiguration: bootstrapv1.InitConfiguration{},
- JoinConfiguration: bootstrapv1.JoinConfiguration{},
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "A new name",
+ },
+ },
},
+ Version: "v1.30.0",
},
}
m := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- Kind: "Machine",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
@@ -725,25 +593,29 @@ func TestMatchInitOrJoinConfiguration(t *testing.T) {
}
machineConfigs := map[string]*bootstrapv1.KubeadmConfig{
m.Name: {
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmConfig",
- APIVersion: bootstrapv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
},
Spec: bootstrapv1.KubeadmConfigSpec{
- JoinConfiguration: bootstrapv1.JoinConfiguration{},
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ ControlPlane: &bootstrapv1.JoinControlPlane{},
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "A new name",
+ },
+ },
},
},
}
- match, diff, err := matchInitOrJoinConfiguration(machineConfigs[m.Name], kcp)
+ reason, currentKubeadmConfig, desiredKubeadmConfig, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(currentKubeadmConfig).ToNot(BeNil())
+ g.Expect(desiredKubeadmConfig).ToNot(BeNil())
+ g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
g.Expect(match).To(BeTrue())
- g.Expect(diff).To(BeEmpty())
+ g.Expect(reason).To(BeEmpty())
})
- t.Run("returns false if JoinConfiguration is NOT equal", func(t *testing.T) {
+ t.Run("returns true if JoinConfiguration is equal apart from Discovery and Timeouts", func(t *testing.T) {
g := NewWithT(t)
kcp := &controlplanev1.KubeadmControlPlane{
Spec: controlplanev1.KubeadmControlPlaneSpec{
@@ -752,17 +624,19 @@ func TestMatchInitOrJoinConfiguration(t *testing.T) {
InitConfiguration: bootstrapv1.InitConfiguration{},
JoinConfiguration: bootstrapv1.JoinConfiguration{
NodeRegistration: bootstrapv1.NodeRegistrationOptions{
- Name: "A new name", // This is a change
+ Name: "A new name",
+ },
+ // Discovery gets removed because Discovery is not relevant for the rollout decision.
+ Discovery: bootstrapv1.Discovery{TLSBootstrapToken: "aaa"},
+ Timeouts: bootstrapv1.Timeouts{
+ ControlPlaneComponentHealthCheckSeconds: ptr.To[int32](1),
},
},
},
+ Version: "v1.30.0",
},
}
m := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- Kind: "Machine",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
@@ -779,63 +653,51 @@ func TestMatchInitOrJoinConfiguration(t *testing.T) {
}
machineConfigs := map[string]*bootstrapv1.KubeadmConfig{
m.Name: {
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmConfig",
- APIVersion: bootstrapv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
},
Spec: bootstrapv1.KubeadmConfigSpec{
JoinConfiguration: bootstrapv1.JoinConfiguration{
+ ControlPlane: &bootstrapv1.JoinControlPlane{},
NodeRegistration: bootstrapv1.NodeRegistrationOptions{
- Name: "An old name", // This is a change
+ Name: "A new name",
+ },
+ // Discovery gets removed because Discovery is not relevant for the rollout decision.
+ Discovery: bootstrapv1.Discovery{TLSBootstrapToken: "bbb"},
+ Timeouts: bootstrapv1.Timeouts{
+ ControlPlaneComponentHealthCheckSeconds: ptr.To[int32](11),
},
},
},
},
}
- match, diff, err := matchInitOrJoinConfiguration(machineConfigs[m.Name], kcp)
+ reason, currentKubeadmConfig, desiredKubeadmConfig, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
- g.Expect(match).To(BeFalse())
- g.Expect(diff).To(BeComparableTo(`&v1beta2.KubeadmConfigSpec{
- ClusterConfiguration: {},
- InitConfiguration: {NodeRegistration: {ImagePullPolicy: "IfNotPresent"}},
- JoinConfiguration: v1beta2.JoinConfiguration{
- NodeRegistration: v1beta2.NodeRegistrationOptions{
-- Name: "An old name",
-+ Name: "A new name",
- CRISocket: "",
- Taints: nil,
- ... // 4 identical fields
- },
- CACertPath: "",
- Discovery: {},
- ... // 4 identical fields
- },
- Files: nil,
- DiskSetup: {},
- ... // 9 identical fields
- }`))
+ g.Expect(currentKubeadmConfig).ToNot(BeNil())
+ g.Expect(desiredKubeadmConfig).ToNot(BeNil())
+ g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
+ g.Expect(match).To(BeTrue())
+ g.Expect(reason).To(BeEmpty())
})
- t.Run("returns true if returns true if only omittable configurations are not equal", func(t *testing.T) {
+ t.Run("returns true if JoinConfiguration is equal apart from JoinControlPlane", func(t *testing.T) {
g := NewWithT(t)
kcp := &controlplanev1.KubeadmControlPlane{
Spec: controlplanev1.KubeadmControlPlaneSpec{
KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
ClusterConfiguration: bootstrapv1.ClusterConfiguration{},
InitConfiguration: bootstrapv1.InitConfiguration{},
- JoinConfiguration: bootstrapv1.JoinConfiguration{},
- Files: []bootstrapv1.File{}, // This is a change, but it is an omittable field and the diff between nil and empty array is not relevant.
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "A new name",
+ },
+ ControlPlane: nil, // Control plane configuration missing in KCP
+ },
},
+ Version: "v1.30.0",
},
}
m := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- Kind: "Machine",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
@@ -852,41 +714,51 @@ func TestMatchInitOrJoinConfiguration(t *testing.T) {
}
machineConfigs := map[string]*bootstrapv1.KubeadmConfig{
m.Name: {
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmConfig",
- APIVersion: bootstrapv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
},
Spec: bootstrapv1.KubeadmConfigSpec{
- InitConfiguration: bootstrapv1.InitConfiguration{},
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "A new name",
+ },
+ // Machine gets a default JoinConfiguration.ControlPlane from CABPK
+ // Note: This field is now also set by KCP, but leaving this case here for additional coverage.
+ ControlPlane: &bootstrapv1.JoinControlPlane{},
+ },
},
},
}
- match, diff, err := matchInitOrJoinConfiguration(machineConfigs[m.Name], kcp)
+ reason, currentKubeadmConfig, desiredKubeadmConfig, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(currentKubeadmConfig).ToNot(BeNil())
+ g.Expect(desiredKubeadmConfig).ToNot(BeNil())
+ g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
g.Expect(match).To(BeTrue())
- g.Expect(diff).To(BeEmpty())
+ g.Expect(reason).To(BeEmpty())
})
- t.Run("returns false if some other configurations are not equal", func(t *testing.T) {
+ t.Run("returns false if JoinConfiguration is not equal, and InitConfiguration is also not equal", func(t *testing.T) {
g := NewWithT(t)
kcp := &controlplanev1.KubeadmControlPlane{
Spec: controlplanev1.KubeadmControlPlaneSpec{
KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
ClusterConfiguration: bootstrapv1.ClusterConfiguration{},
- InitConfiguration: bootstrapv1.InitConfiguration{},
- JoinConfiguration: bootstrapv1.JoinConfiguration{},
- Files: []bootstrapv1.File{{Path: "/tmp/foo"}}, // This is a change
+ InitConfiguration: bootstrapv1.InitConfiguration{
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "Different name",
+ },
+ },
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "Different name",
+ },
+ },
},
+ Version: "v1.30.0",
},
}
m := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- Kind: "Machine",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
@@ -903,113 +775,63 @@ func TestMatchInitOrJoinConfiguration(t *testing.T) {
}
machineConfigs := map[string]*bootstrapv1.KubeadmConfig{
m.Name: {
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmConfig",
- APIVersion: bootstrapv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
},
Spec: bootstrapv1.KubeadmConfigSpec{
- InitConfiguration: bootstrapv1.InitConfiguration{},
- },
- },
- }
- match, diff, err := matchInitOrJoinConfiguration(machineConfigs[m.Name], kcp)
- g.Expect(err).ToNot(HaveOccurred())
- g.Expect(match).To(BeFalse())
- g.Expect(diff).To(BeComparableTo(`&v1beta2.KubeadmConfigSpec{
- ClusterConfiguration: {},
- InitConfiguration: {NodeRegistration: {ImagePullPolicy: "IfNotPresent"}},
- JoinConfiguration: {NodeRegistration: {ImagePullPolicy: "IfNotPresent"}},
-- Files: nil,
-+ Files: []v1beta2.File{{Path: "/tmp/foo"}},
- DiskSetup: {},
- Mounts: nil,
- ... // 8 identical fields
- }`))
- })
-}
-
-func TestMatchesKubeadmBootstrapConfig(t *testing.T) {
- t.Run("returns true if ClusterConfiguration is equal", func(t *testing.T) {
- g := NewWithT(t)
- kcp := &controlplanev1.KubeadmControlPlane{
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- CertificatesDir: "foo",
- },
- },
- },
- }
- m := &clusterv1.Machine{
- ObjectMeta: metav1.ObjectMeta{
- Annotations: map[string]string{
- controlplanev1.KubeadmClusterConfigurationAnnotation: "{\n \"certificatesDir\": \"foo\"\n}",
- },
- },
- }
- machineConfigs := map[string]*bootstrapv1.KubeadmConfig{
- m.Name: {},
- }
- reason, match, err := matchesKubeadmBootstrapConfig(machineConfigs, kcp, m)
- g.Expect(err).ToNot(HaveOccurred())
- g.Expect(match).To(BeTrue())
- g.Expect(reason).To(BeEmpty())
- })
- t.Run("returns false if ClusterConfiguration is NOT equal", func(t *testing.T) {
- g := NewWithT(t)
- kcp := &controlplanev1.KubeadmControlPlane{
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- CertificatesDir: "foo",
+ InitConfiguration: bootstrapv1.InitConfiguration{
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "name",
+ },
},
},
},
}
- m := &clusterv1.Machine{
- ObjectMeta: metav1.ObjectMeta{
- Annotations: map[string]string{
- controlplanev1.KubeadmClusterConfigurationAnnotation: "{\n \"certificatesDir\": \"bar\"\n}",
- },
- },
- }
- machineConfigs := map[string]*bootstrapv1.KubeadmConfig{
- m.Name: {},
- }
- reason, match, err := matchesKubeadmBootstrapConfig(machineConfigs, kcp, m)
+ reason, currentKubeadmConfig, desiredKubeadmConfig, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(currentKubeadmConfig).ToNot(BeNil())
+ g.Expect(desiredKubeadmConfig).ToNot(BeNil())
+ g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
g.Expect(match).To(BeFalse())
- g.Expect(reason).To(BeComparableTo(`Machine KubeadmConfig ClusterConfiguration is outdated: diff: v1beta2.ClusterConfiguration{
- ... // 4 identical fields
- Scheduler: {},
- DNS: {},
-- CertificatesDir: "bar",
-+ CertificatesDir: "foo",
- ImageRepository: "",
- FeatureGates: nil,
- ... // 2 identical fields
+ g.Expect(reason).To(Equal(`Machine KubeadmConfig is outdated: diff: &v1beta2.KubeadmConfigSpec{
+ ClusterConfiguration: {},
+ InitConfiguration: v1beta2.InitConfiguration{
+ BootstrapTokens: nil,
+ NodeRegistration: v1beta2.NodeRegistrationOptions{
+- Name: "name",
++ Name: "Different name",
+ CRISocket: "",
+ Taints: nil,
+ ... // 4 identical fields
+ },
+ LocalAPIEndpoint: {},
+ SkipPhases: nil,
+ ... // 2 identical fields
+ },
+ JoinConfiguration: {NodeRegistration: {ImagePullPolicy: "IfNotPresent"}},
+ Files: nil,
+ ... // 10 identical fields
}`))
})
- t.Run("returns true if InitConfiguration is equal", func(t *testing.T) {
+ t.Run("returns false if JoinConfiguration has other differences in ControlPlane", func(t *testing.T) {
g := NewWithT(t)
kcp := &controlplanev1.KubeadmControlPlane{
Spec: controlplanev1.KubeadmControlPlaneSpec{
KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
ClusterConfiguration: bootstrapv1.ClusterConfiguration{},
InitConfiguration: bootstrapv1.InitConfiguration{},
- JoinConfiguration: bootstrapv1.JoinConfiguration{},
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "name",
+ },
+ ControlPlane: nil, // Control plane configuration missing in KCP
+ },
},
+ Version: "v1.30.0",
},
}
m := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- Kind: "Machine",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
@@ -1026,44 +848,72 @@ func TestMatchesKubeadmBootstrapConfig(t *testing.T) {
}
machineConfigs := map[string]*bootstrapv1.KubeadmConfig{
m.Name: {
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmConfig",
- APIVersion: bootstrapv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
},
Spec: bootstrapv1.KubeadmConfigSpec{
- InitConfiguration: bootstrapv1.InitConfiguration{},
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "name",
+ },
+ ControlPlane: &bootstrapv1.JoinControlPlane{
+ LocalAPIEndpoint: bootstrapv1.APIEndpoint{
+ AdvertiseAddress: "1.2.3.4",
+ BindPort: 6443,
+ },
+ },
+ },
},
},
}
- reason, match, err := matchesKubeadmBootstrapConfig(machineConfigs, kcp, m)
+ reason, currentKubeadmConfig, desiredKubeadmConfig, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
- g.Expect(match).To(BeTrue())
- g.Expect(reason).To(BeEmpty())
+ g.Expect(currentKubeadmConfig).ToNot(BeNil())
+ g.Expect(desiredKubeadmConfig).ToNot(BeNil())
+ g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
+ g.Expect(match).To(BeFalse())
+ g.Expect(reason).To(Equal(`Machine KubeadmConfig is outdated: diff: &v1beta2.KubeadmConfigSpec{
+ ClusterConfiguration: {},
+ InitConfiguration: {NodeRegistration: {ImagePullPolicy: "IfNotPresent"}},
+ JoinConfiguration: v1beta2.JoinConfiguration{
+ NodeRegistration: {Name: "name", ImagePullPolicy: "IfNotPresent"},
+ CACertPath: "",
+ Discovery: {},
+ ControlPlane: &v1beta2.JoinControlPlane{
+ LocalAPIEndpoint: v1beta2.APIEndpoint{
+- AdvertiseAddress: "1.2.3.4",
++ AdvertiseAddress: "",
+- BindPort: 6443,
++ BindPort: 0,
+ },
+ },
+ SkipPhases: nil,
+ Patches: {},
+ Timeouts: {},
+ },
+ Files: nil,
+ DiskSetup: {},
+ ... // 9 identical fields
+ }`))
})
- t.Run("returns false if InitConfiguration is NOT equal", func(t *testing.T) {
+ t.Run("returns false if JoinConfiguration is NOT equal", func(t *testing.T) {
g := NewWithT(t)
kcp := &controlplanev1.KubeadmControlPlane{
Spec: controlplanev1.KubeadmControlPlaneSpec{
KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
ClusterConfiguration: bootstrapv1.ClusterConfiguration{},
- InitConfiguration: bootstrapv1.InitConfiguration{
+ InitConfiguration: bootstrapv1.InitConfiguration{},
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
NodeRegistration: bootstrapv1.NodeRegistrationOptions{
Name: "A new name", // This is a change
},
},
- JoinConfiguration: bootstrapv1.JoinConfiguration{},
},
+ Version: "v1.30.0",
},
}
m := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- Kind: "Machine",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
@@ -1080,16 +930,13 @@ func TestMatchesKubeadmBootstrapConfig(t *testing.T) {
}
machineConfigs := map[string]*bootstrapv1.KubeadmConfig{
m.Name: {
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmConfig",
- APIVersion: bootstrapv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
},
Spec: bootstrapv1.KubeadmConfigSpec{
- InitConfiguration: bootstrapv1.InitConfiguration{
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ ControlPlane: &bootstrapv1.JoinControlPlane{},
NodeRegistration: bootstrapv1.NodeRegistrationOptions{
Name: "An old name", // This is a change
},
@@ -1097,13 +944,16 @@ func TestMatchesKubeadmBootstrapConfig(t *testing.T) {
},
},
}
- reason, match, err := matchesKubeadmBootstrapConfig(machineConfigs, kcp, m)
+ reason, currentKubeadmConfig, desiredKubeadmConfig, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(currentKubeadmConfig).ToNot(BeNil())
+ g.Expect(desiredKubeadmConfig).ToNot(BeNil())
+ g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
g.Expect(match).To(BeFalse())
- g.Expect(reason).To(BeComparableTo(`Machine KubeadmConfig InitConfiguration or JoinConfiguration are outdated: diff: &v1beta2.KubeadmConfigSpec{
+ g.Expect(reason).To(BeComparableTo(`Machine KubeadmConfig is outdated: diff: &v1beta2.KubeadmConfigSpec{
ClusterConfiguration: {},
- InitConfiguration: v1beta2.InitConfiguration{
- BootstrapTokens: nil,
+ InitConfiguration: {NodeRegistration: {ImagePullPolicy: "IfNotPresent"}},
+ JoinConfiguration: v1beta2.JoinConfiguration{
NodeRegistration: v1beta2.NodeRegistrationOptions{
- Name: "An old name",
+ Name: "A new name",
@@ -1111,31 +961,28 @@ func TestMatchesKubeadmBootstrapConfig(t *testing.T) {
Taints: nil,
... // 4 identical fields
},
- LocalAPIEndpoint: {},
- SkipPhases: nil,
- ... // 2 identical fields
+ CACertPath: "",
+ Discovery: {},
+ ... // 4 identical fields
},
- JoinConfiguration: {NodeRegistration: {ImagePullPolicy: "IfNotPresent"}},
- Files: nil,
- ... // 10 identical fields
+ Files: nil,
+ DiskSetup: {},
+ ... // 9 identical fields
}`))
})
- t.Run("returns true if JoinConfiguration is equal", func(t *testing.T) {
+ t.Run("returns false if JoinConfiguration is NOT equal", func(t *testing.T) {
g := NewWithT(t)
kcp := &controlplanev1.KubeadmControlPlane{
Spec: controlplanev1.KubeadmControlPlaneSpec{
KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
ClusterConfiguration: bootstrapv1.ClusterConfiguration{},
InitConfiguration: bootstrapv1.InitConfiguration{},
- JoinConfiguration: bootstrapv1.JoinConfiguration{},
+ // JoinConfiguration not set anymore.
},
+ Version: "v1.30.0",
},
}
m := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- Kind: "Machine",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
@@ -1152,44 +999,72 @@ func TestMatchesKubeadmBootstrapConfig(t *testing.T) {
}
machineConfigs := map[string]*bootstrapv1.KubeadmConfig{
m.Name: {
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmConfig",
- APIVersion: bootstrapv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
},
Spec: bootstrapv1.KubeadmConfigSpec{
- JoinConfiguration: bootstrapv1.JoinConfiguration{},
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ ControlPlane: &bootstrapv1.JoinControlPlane{},
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "An old name", // This is a change
+ },
+ },
},
},
}
- reason, match, err := matchesKubeadmBootstrapConfig(machineConfigs, kcp, m)
+ reason, currentKubeadmConfig, desiredKubeadmConfig, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
- g.Expect(match).To(BeTrue())
- g.Expect(reason).To(BeEmpty())
+ g.Expect(currentKubeadmConfig).ToNot(BeNil())
+ g.Expect(desiredKubeadmConfig).ToNot(BeNil())
+ // Can't check if desiredKubeadmConfig is for join because the test case is that JoinConfiguration is not set anymore.
+ g.Expect(match).To(BeFalse())
+ g.Expect(reason).To(BeComparableTo(`Machine KubeadmConfig is outdated: diff: &v1beta2.KubeadmConfigSpec{
+ ClusterConfiguration: {},
+ InitConfiguration: {NodeRegistration: {ImagePullPolicy: "IfNotPresent"}},
+ JoinConfiguration: v1beta2.JoinConfiguration{
+ NodeRegistration: v1beta2.NodeRegistrationOptions{
+- Name: "An old name",
++ Name: "",
+ CRISocket: "",
+ Taints: nil,
+ ... // 4 identical fields
+ },
+ CACertPath: "",
+ Discovery: {},
+ ... // 4 identical fields
+ },
+ Files: nil,
+ DiskSetup: {},
+ ... // 9 identical fields
+ }`))
})
- t.Run("returns false if JoinConfiguration is NOT equal", func(t *testing.T) {
+ t.Run("returns true if only omittable configurations are not equal", func(t *testing.T) {
g := NewWithT(t)
kcp := &controlplanev1.KubeadmControlPlane{
Spec: controlplanev1.KubeadmControlPlaneSpec{
KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{},
- InitConfiguration: bootstrapv1.InitConfiguration{},
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ FeatureGates: map[string]bool{}, // This is a change, but it is an omittable field
+ },
+ InitConfiguration: bootstrapv1.InitConfiguration{
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "name",
+ KubeletExtraArgs: []bootstrapv1.Arg{},
+ },
+ },
JoinConfiguration: bootstrapv1.JoinConfiguration{
NodeRegistration: bootstrapv1.NodeRegistrationOptions{
- Name: "A new name", // This is a change
+ Name: "name",
+ KubeletExtraArgs: []bootstrapv1.Arg{},
},
},
+ Files: []bootstrapv1.File{}, // This is a change, but it is an omittable field and the diff between nil and empty array is not relevant.
},
+ Version: "v1.30.0",
},
}
m := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- Kind: "Machine",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
@@ -1206,63 +1081,46 @@ func TestMatchesKubeadmBootstrapConfig(t *testing.T) {
}
machineConfigs := map[string]*bootstrapv1.KubeadmConfig{
m.Name: {
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmConfig",
- APIVersion: bootstrapv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
},
Spec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{},
+ InitConfiguration: bootstrapv1.InitConfiguration{},
JoinConfiguration: bootstrapv1.JoinConfiguration{
+ ControlPlane: &bootstrapv1.JoinControlPlane{},
NodeRegistration: bootstrapv1.NodeRegistrationOptions{
- Name: "An old name", // This is a change
+ Name: "name",
},
},
},
},
}
- reason, match, err := matchesKubeadmBootstrapConfig(machineConfigs, kcp, m)
+ reason, currentKubeadmConfig, desiredKubeadmConfig, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
- g.Expect(match).To(BeFalse())
- g.Expect(reason).To(BeComparableTo(`Machine KubeadmConfig InitConfiguration or JoinConfiguration are outdated: diff: &v1beta2.KubeadmConfigSpec{
- ClusterConfiguration: {},
- InitConfiguration: {NodeRegistration: {ImagePullPolicy: "IfNotPresent"}},
- JoinConfiguration: v1beta2.JoinConfiguration{
- NodeRegistration: v1beta2.NodeRegistrationOptions{
-- Name: "An old name",
-+ Name: "A new name",
- CRISocket: "",
- Taints: nil,
- ... // 4 identical fields
- },
- CACertPath: "",
- Discovery: {},
- ... // 4 identical fields
- },
- Files: nil,
- DiskSetup: {},
- ... // 9 identical fields
- }`))
+ g.Expect(currentKubeadmConfig).ToNot(BeNil())
+ g.Expect(desiredKubeadmConfig).ToNot(BeNil())
+ g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
+ g.Expect(match).To(BeTrue())
+ g.Expect(reason).To(BeEmpty())
})
- t.Run("returns true if only omittable configurations are not equal", func(t *testing.T) {
+ t.Run("returns true if KubeadmConfig is equal apart from defaulted format field", func(t *testing.T) {
g := NewWithT(t)
kcp := &controlplanev1.KubeadmControlPlane{
Spec: controlplanev1.KubeadmControlPlaneSpec{
KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{},
- InitConfiguration: bootstrapv1.InitConfiguration{},
- JoinConfiguration: bootstrapv1.JoinConfiguration{},
- Files: []bootstrapv1.File{}, // This is a change, but it is an omittable field and the diff between nil and empty array is not relevant.
+ Format: bootstrapv1.CloudConfig,
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "name",
+ },
+ },
},
+ Version: "v1.30.0",
},
}
m := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- Kind: "Machine",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
@@ -1279,41 +1137,47 @@ func TestMatchesKubeadmBootstrapConfig(t *testing.T) {
}
machineConfigs := map[string]*bootstrapv1.KubeadmConfig{
m.Name: {
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmConfig",
- APIVersion: bootstrapv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
},
Spec: bootstrapv1.KubeadmConfigSpec{
- InitConfiguration: bootstrapv1.InitConfiguration{},
+ Format: "",
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ ControlPlane: &bootstrapv1.JoinControlPlane{},
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "name",
+ },
+ },
},
},
}
- reason, match, err := matchesKubeadmBootstrapConfig(machineConfigs, kcp, m)
+ reason, currentKubeadmConfig, desiredKubeadmConfig, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(currentKubeadmConfig).ToNot(BeNil())
+ g.Expect(desiredKubeadmConfig).ToNot(BeNil())
+ g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
g.Expect(match).To(BeTrue())
g.Expect(reason).To(BeEmpty())
})
- t.Run("returns false if some other configurations are not equal", func(t *testing.T) {
+ t.Run("returns false if KubeadmConfig is not equal (other configurations)", func(t *testing.T) {
g := NewWithT(t)
kcp := &controlplanev1.KubeadmControlPlane{
Spec: controlplanev1.KubeadmControlPlaneSpec{
KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
ClusterConfiguration: bootstrapv1.ClusterConfiguration{},
InitConfiguration: bootstrapv1.InitConfiguration{},
- JoinConfiguration: bootstrapv1.JoinConfiguration{},
- Files: []bootstrapv1.File{{Path: "/tmp/foo"}}, // This is a change
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "name",
+ },
+ },
+ Files: []bootstrapv1.File{{Path: "/tmp/foo"}}, // This is a change
},
+ Version: "v1.30.0",
},
}
m := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- Kind: "Machine",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
@@ -1330,26 +1194,30 @@ func TestMatchesKubeadmBootstrapConfig(t *testing.T) {
}
machineConfigs := map[string]*bootstrapv1.KubeadmConfig{
m.Name: {
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmConfig",
- APIVersion: bootstrapv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
},
Spec: bootstrapv1.KubeadmConfigSpec{
- InitConfiguration: bootstrapv1.InitConfiguration{},
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ ControlPlane: &bootstrapv1.JoinControlPlane{},
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "name",
+ },
+ },
},
},
}
- reason, match, err := matchesKubeadmBootstrapConfig(machineConfigs, kcp, m)
+ reason, currentKubeadmConfig, desiredKubeadmConfig, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(currentKubeadmConfig).ToNot(BeNil())
+ g.Expect(desiredKubeadmConfig).ToNot(BeNil())
+ g.Expect(isKubeadmConfigForJoin(desiredKubeadmConfig)).To(BeTrue())
g.Expect(match).To(BeFalse())
- g.Expect(reason).To(BeComparableTo(`Machine KubeadmConfig InitConfiguration or JoinConfiguration are outdated: diff: &v1beta2.KubeadmConfigSpec{
+ g.Expect(reason).To(BeComparableTo(`Machine KubeadmConfig is outdated: diff: &v1beta2.KubeadmConfigSpec{
ClusterConfiguration: {},
InitConfiguration: {NodeRegistration: {ImagePullPolicy: "IfNotPresent"}},
- JoinConfiguration: {NodeRegistration: {ImagePullPolicy: "IfNotPresent"}},
+ JoinConfiguration: {NodeRegistration: {Name: "name", ImagePullPolicy: "IfNotPresent"}, ControlPlane: &{}},
- Files: nil,
+ Files: []v1beta2.File{{Path: "/tmp/foo"}},
DiskSetup: {},
@@ -1375,13 +1243,10 @@ func TestMatchesKubeadmBootstrapConfig(t *testing.T) {
InitConfiguration: bootstrapv1.InitConfiguration{},
JoinConfiguration: bootstrapv1.JoinConfiguration{},
},
+ Version: "v1.30.0",
},
}
m := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- Kind: "Machine",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
@@ -1398,10 +1263,6 @@ func TestMatchesKubeadmBootstrapConfig(t *testing.T) {
}
machineConfigs := map[string]*bootstrapv1.KubeadmConfig{
m.Name: {
- TypeMeta: metav1.TypeMeta{
- Kind: "KubeadmConfig",
- APIVersion: bootstrapv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Name: "test",
@@ -1416,7 +1277,7 @@ func TestMatchesKubeadmBootstrapConfig(t *testing.T) {
g := NewWithT(t)
machineConfigs[m.Name].Annotations = nil
machineConfigs[m.Name].Labels = nil
- reason, match, err := matchesKubeadmBootstrapConfig(machineConfigs, kcp, m)
+ reason, _, _, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
g.Expect(match).To(BeTrue())
g.Expect(reason).To(BeEmpty())
@@ -1426,7 +1287,7 @@ func TestMatchesKubeadmBootstrapConfig(t *testing.T) {
g := NewWithT(t)
machineConfigs[m.Name].Annotations = kcp.Spec.MachineTemplate.ObjectMeta.Annotations
machineConfigs[m.Name].Labels = nil
- reason, match, err := matchesKubeadmBootstrapConfig(machineConfigs, kcp, m)
+ reason, _, _, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
g.Expect(match).To(BeTrue())
g.Expect(reason).To(BeEmpty())
@@ -1436,7 +1297,7 @@ func TestMatchesKubeadmBootstrapConfig(t *testing.T) {
g := NewWithT(t)
machineConfigs[m.Name].Annotations = nil
machineConfigs[m.Name].Labels = kcp.Spec.MachineTemplate.ObjectMeta.Labels
- reason, match, err := matchesKubeadmBootstrapConfig(machineConfigs, kcp, m)
+ reason, _, _, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
g.Expect(match).To(BeTrue())
g.Expect(reason).To(BeEmpty())
@@ -1446,7 +1307,7 @@ func TestMatchesKubeadmBootstrapConfig(t *testing.T) {
g := NewWithT(t)
machineConfigs[m.Name].Labels = kcp.Spec.MachineTemplate.ObjectMeta.Labels
machineConfigs[m.Name].Annotations = kcp.Spec.MachineTemplate.ObjectMeta.Annotations
- reason, match, err := matchesKubeadmBootstrapConfig(machineConfigs, kcp, m)
+ reason, _, _, match, err := matchesKubeadmConfig(machineConfigs, kcp, &clusterv1.Cluster{}, m)
g.Expect(err).ToNot(HaveOccurred())
g.Expect(match).To(BeTrue())
g.Expect(reason).To(BeEmpty())
@@ -1454,14 +1315,7 @@ func TestMatchesKubeadmBootstrapConfig(t *testing.T) {
})
}
-func TestMatchesTemplateClonedFrom(t *testing.T) {
- t.Run("nil machine returns false", func(t *testing.T) {
- g := NewWithT(t)
- reason, match := matchesTemplateClonedFrom(nil, nil, nil)
- g.Expect(match).To(BeFalse())
- g.Expect(reason).To(Equal("Machine cannot be compared with KCP.spec.machineTemplate.spec.infrastructureRef: Machine is nil"))
- })
-
+func TestMatchesInfraMachine(t *testing.T) {
t.Run("returns true if machine not found", func(t *testing.T) {
g := NewWithT(t)
kcp := &controlplanev1.KubeadmControlPlane{}
@@ -1474,7 +1328,8 @@ func TestMatchesTemplateClonedFrom(t *testing.T) {
},
},
}
- reason, match := matchesTemplateClonedFrom(map[string]*unstructured.Unstructured{}, kcp, machine)
+ reason, _, _, match, err := matchesInfraMachine(t.Context(), nil, map[string]*unstructured.Unstructured{}, kcp, &clusterv1.Cluster{}, machine)
+ g.Expect(err).ToNot(HaveOccurred())
g.Expect(match).To(BeTrue())
g.Expect(reason).To(BeEmpty())
})
@@ -1496,20 +1351,32 @@ func TestMatchesTemplateClonedFrom(t *testing.T) {
},
Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
InfrastructureRef: clusterv1.ContractVersionedObjectReference{
- Kind: "GenericMachineTemplate",
- Name: "infra-foo",
- APIGroup: "generic.io",
+ APIGroup: builder.InfrastructureGroupVersion.Group,
+ Kind: builder.TestInfrastructureMachineTemplateKind,
+ Name: "infra-machine-template1",
},
},
},
},
}
+
+ infraMachineTemplate := &unstructured.Unstructured{
+ Object: map[string]interface{}{
+ "apiVersion": builder.InfrastructureGroupVersion.String(),
+ "kind": builder.TestInfrastructureMachineTemplateKind,
+ "metadata": map[string]interface{}{
+ "name": "infra-machine-template1",
+ "namespace": "default",
+ },
+ },
+ }
+
m := &clusterv1.Machine{
Spec: clusterv1.MachineSpec{
InfrastructureRef: clusterv1.ContractVersionedObjectReference{
- Kind: "GenericMachine",
- Name: "infra-foo",
- APIGroup: "generic.io",
+ APIGroup: builder.InfrastructureGroupVersion.Group,
+ Kind: builder.TestInfrastructureMachineKind,
+ Name: "infra-config1",
},
},
}
@@ -1517,8 +1384,8 @@ func TestMatchesTemplateClonedFrom(t *testing.T) {
infraConfigs := map[string]*unstructured.Unstructured{
m.Name: {
Object: map[string]interface{}{
- "kind": "InfrastructureMachine",
- "apiVersion": clusterv1.GroupVersionInfrastructure.String(),
+ "apiVersion": builder.InfrastructureGroupVersion.String(),
+ "kind": builder.TestInfrastructureMachineKind,
"metadata": map[string]interface{}{
"name": "infra-config1",
"namespace": "default",
@@ -1526,160 +1393,86 @@ func TestMatchesTemplateClonedFrom(t *testing.T) {
},
},
}
+ scheme := runtime.NewScheme()
+ _ = apiextensionsv1.AddToScheme(scheme)
+ c := fake.NewClientBuilder().WithScheme(scheme).WithObjects(builder.TestInfrastructureMachineTemplateCRD, infraMachineTemplate).Build()
- t.Run("by returning true if neither labels or annotations match", func(t *testing.T) {
+ t.Run("by returning true if annotations don't exist", func(t *testing.T) {
g := NewWithT(t)
- infraConfigs[m.Name].SetAnnotations(map[string]string{
- clusterv1.TemplateClonedFromNameAnnotation: "infra-foo",
- clusterv1.TemplateClonedFromGroupKindAnnotation: "GenericMachineTemplate.generic.io",
- })
- infraConfigs[m.Name].SetLabels(nil)
- reason, match := matchesTemplateClonedFrom(infraConfigs, kcp, m)
+ infraConfigs[m.Name].SetAnnotations(map[string]string{})
+ reason, _, _, match, err := matchesInfraMachine(t.Context(), c, infraConfigs, kcp, &clusterv1.Cluster{}, m)
+ g.Expect(err).ToNot(HaveOccurred())
g.Expect(match).To(BeTrue())
g.Expect(reason).To(BeEmpty())
})
- t.Run("by returning true if only labels don't match", func(t *testing.T) {
+ t.Run("by returning false if neither Name nor GroupKind matches", func(t *testing.T) {
g := NewWithT(t)
infraConfigs[m.Name].SetAnnotations(map[string]string{
- clusterv1.TemplateClonedFromNameAnnotation: "infra-foo",
- clusterv1.TemplateClonedFromGroupKindAnnotation: "GenericMachineTemplate.generic.io",
- "test": "annotation",
+ clusterv1.TemplateClonedFromNameAnnotation: "different-infra-machine-template1",
+ clusterv1.TemplateClonedFromGroupKindAnnotation: "DifferentTestInfrastructureMachineTemplate.infrastructure.cluster.x-k8s.io",
})
- infraConfigs[m.Name].SetLabels(nil)
- reason, match := matchesTemplateClonedFrom(infraConfigs, kcp, m)
- g.Expect(match).To(BeTrue())
- g.Expect(reason).To(BeEmpty())
+ reason, _, _, match, err := matchesInfraMachine(t.Context(), c, infraConfigs, kcp, &clusterv1.Cluster{}, m)
+ g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(match).To(BeFalse())
+ g.Expect(reason).To(Equal("Infrastructure template on KCP rotated from DifferentTestInfrastructureMachineTemplate.infrastructure.cluster.x-k8s.io different-infra-machine-template1 to TestInfrastructureMachineTemplate.infrastructure.cluster.x-k8s.io infra-machine-template1"))
})
- t.Run("by returning true if only annotations don't match", func(t *testing.T) {
+ t.Run("by returning false if only GroupKind matches", func(t *testing.T) {
g := NewWithT(t)
infraConfigs[m.Name].SetAnnotations(map[string]string{
- clusterv1.TemplateClonedFromNameAnnotation: "infra-foo",
- clusterv1.TemplateClonedFromGroupKindAnnotation: "GenericMachineTemplate.generic.io",
+ clusterv1.TemplateClonedFromNameAnnotation: "different-infra-machine-template1",
+ clusterv1.TemplateClonedFromGroupKindAnnotation: "TestInfrastructureMachineTemplate.infrastructure.cluster.x-k8s.io",
})
- infraConfigs[m.Name].SetLabels(kcp.Spec.MachineTemplate.ObjectMeta.Labels)
- reason, match := matchesTemplateClonedFrom(infraConfigs, kcp, m)
- g.Expect(match).To(BeTrue())
- g.Expect(reason).To(BeEmpty())
+ reason, _, _, match, err := matchesInfraMachine(t.Context(), c, infraConfigs, kcp, &clusterv1.Cluster{}, m)
+ g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(match).To(BeFalse())
+ g.Expect(reason).To(Equal("Infrastructure template on KCP rotated from TestInfrastructureMachineTemplate.infrastructure.cluster.x-k8s.io different-infra-machine-template1 to TestInfrastructureMachineTemplate.infrastructure.cluster.x-k8s.io infra-machine-template1"))
})
- t.Run("by returning true if both labels and annotations match", func(t *testing.T) {
+ t.Run("by returning false if only Name matches", func(t *testing.T) {
g := NewWithT(t)
infraConfigs[m.Name].SetAnnotations(map[string]string{
- clusterv1.TemplateClonedFromNameAnnotation: "infra-foo",
- clusterv1.TemplateClonedFromGroupKindAnnotation: "GenericMachineTemplate.generic.io",
- "test": "annotation",
+ clusterv1.TemplateClonedFromNameAnnotation: "infra-machine-template1",
+ clusterv1.TemplateClonedFromGroupKindAnnotation: "DifferentTestInfrastructureMachineTemplate.infrastructure.cluster.x-k8s.io",
})
- infraConfigs[m.Name].SetLabels(kcp.Spec.MachineTemplate.ObjectMeta.Labels)
- reason, match := matchesTemplateClonedFrom(infraConfigs, kcp, m)
- g.Expect(match).To(BeTrue())
- g.Expect(reason).To(BeEmpty())
+ reason, _, _, match, err := matchesInfraMachine(t.Context(), c, infraConfigs, kcp, &clusterv1.Cluster{}, m)
+ g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(match).To(BeFalse())
+ g.Expect(reason).To(Equal("Infrastructure template on KCP rotated from DifferentTestInfrastructureMachineTemplate.infrastructure.cluster.x-k8s.io infra-machine-template1 to TestInfrastructureMachineTemplate.infrastructure.cluster.x-k8s.io infra-machine-template1"))
})
- })
-}
-
-func TestMatchesTemplateClonedFrom_WithClonedFromAnnotations(t *testing.T) {
- kcp := &controlplanev1.KubeadmControlPlane{
- ObjectMeta: metav1.ObjectMeta{
- Namespace: "default",
- },
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
- Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
- InfrastructureRef: clusterv1.ContractVersionedObjectReference{
- Kind: "GenericMachineTemplate",
- Name: "infra-foo",
- APIGroup: "generic.io",
- },
- },
- },
- },
- }
- machine := &clusterv1.Machine{
- Spec: clusterv1.MachineSpec{
- InfrastructureRef: clusterv1.ContractVersionedObjectReference{
- APIGroup: clusterv1.GroupVersionInfrastructure.Group,
- Kind: "InfrastructureMachine",
- Name: "infra-config1",
- },
- },
- }
- tests := []struct {
- name string
- annotations map[string]interface{}
- expectMatch bool
- expectReason string
- }{
- {
- name: "returns true if annotations don't exist",
- annotations: map[string]interface{}{},
- expectMatch: true,
- },
- {
- name: "returns false if annotations don't match anything",
- annotations: map[string]interface{}{
- clusterv1.TemplateClonedFromNameAnnotation: "barfoo1",
- clusterv1.TemplateClonedFromGroupKindAnnotation: "barfoo2",
- },
- expectMatch: false,
- expectReason: "Infrastructure template on KCP rotated from barfoo2 barfoo1 to GenericMachineTemplate.generic.io infra-foo",
- },
- {
- name: "returns false if TemplateClonedFromNameAnnotation matches but TemplateClonedFromGroupKindAnnotation doesn't",
- annotations: map[string]interface{}{
- clusterv1.TemplateClonedFromNameAnnotation: "infra-foo",
- clusterv1.TemplateClonedFromGroupKindAnnotation: "barfoo2",
- },
- expectMatch: false,
- expectReason: "Infrastructure template on KCP rotated from barfoo2 infra-foo to GenericMachineTemplate.generic.io infra-foo",
- },
- {
- name: "returns true if both annotations match",
- annotations: map[string]interface{}{
- clusterv1.TemplateClonedFromNameAnnotation: "infra-foo",
- clusterv1.TemplateClonedFromGroupKindAnnotation: "GenericMachineTemplate.generic.io",
- },
- expectMatch: true,
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
+ t.Run("by returning true if both Name and GroupKind match", func(t *testing.T) {
g := NewWithT(t)
- infraConfigs := map[string]*unstructured.Unstructured{
- machine.Name: {
- Object: map[string]interface{}{
- "kind": "InfrastructureMachine",
- "apiVersion": clusterv1.GroupVersionInfrastructure.String(),
- "metadata": map[string]interface{}{
- "name": "infra-config1",
- "namespace": "default",
- "annotations": tt.annotations,
- },
- },
- },
- }
- reason, match := matchesTemplateClonedFrom(infraConfigs, kcp, machine)
- g.Expect(match).To(Equal(tt.expectMatch))
- g.Expect(reason).To(Equal(tt.expectReason))
+ infraConfigs[m.Name].SetAnnotations(map[string]string{
+ clusterv1.TemplateClonedFromNameAnnotation: "infra-machine-template1",
+ clusterv1.TemplateClonedFromGroupKindAnnotation: "TestInfrastructureMachineTemplate.infrastructure.cluster.x-k8s.io",
+ })
+ reason, _, _, match, err := matchesInfraMachine(t.Context(), c, infraConfigs, kcp, &clusterv1.Cluster{}, m)
+ g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(reason).To(BeEmpty())
+ g.Expect(match).To(BeTrue())
})
- }
+ })
}
func TestUpToDate(t *testing.T) {
reconciliationTime := metav1.Now()
defaultKcp := &controlplanev1.KubeadmControlPlane{
+ ObjectMeta: metav1.ObjectMeta{
+ Namespace: "default",
+ Name: "kcp",
+ },
Spec: controlplanev1.KubeadmControlPlaneSpec{
Replicas: nil,
- Version: "v1.31.0",
+ Version: "v1.30.0",
MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
InfrastructureRef: clusterv1.ContractVersionedObjectReference{
- APIGroup: clusterv1.GroupVersionInfrastructure.Group,
- Kind: "AWSMachineTemplate",
- Name: "template1",
+ APIGroup: builder.InfrastructureGroupVersion.Group,
+ Kind: builder.TestInfrastructureMachineTemplateKind,
+ Name: "infra-machine-template1",
},
},
},
@@ -1696,16 +1489,46 @@ func TestUpToDate(t *testing.T) {
},
},
}
+
+ infraMachineTemplate1 := &unstructured.Unstructured{
+ Object: map[string]interface{}{
+ "apiVersion": builder.InfrastructureGroupVersion.String(),
+ "kind": builder.TestInfrastructureMachineTemplateKind,
+ "metadata": map[string]interface{}{
+ "name": "infra-machine-template1",
+ "namespace": "default",
+ },
+ },
+ }
+ infraMachineTemplate2 := &unstructured.Unstructured{
+ Object: map[string]interface{}{
+ "apiVersion": builder.InfrastructureGroupVersion.String(),
+ "kind": builder.TestInfrastructureMachineTemplateKind,
+ "metadata": map[string]interface{}{
+ "name": "infra-machine-template2",
+ "namespace": "default",
+ },
+ },
+ }
+
defaultMachine := &clusterv1.Machine{
ObjectMeta: metav1.ObjectMeta{
CreationTimestamp: metav1.Time{Time: reconciliationTime.Add(-2 * 24 * time.Hour)}, // two days ago.
- Annotations: map[string]string{
- controlplanev1.KubeadmClusterConfigurationAnnotation: "{\n \"certificatesDir\": \"foo\"\n}",
- },
},
Spec: clusterv1.MachineSpec{
- Version: "v1.31.0",
- InfrastructureRef: clusterv1.ContractVersionedObjectReference{APIGroup: clusterv1.GroupVersionInfrastructure.Group, Kind: "AWSMachine", Name: "infra-machine1"},
+ Version: "v1.30.0",
+ Bootstrap: clusterv1.Bootstrap{
+ ConfigRef: clusterv1.ContractVersionedObjectReference{
+ APIGroup: bootstrapv1.GroupVersion.Group,
+ Kind: "KubeadmConfig",
+ Name: "boostrap-config1",
+ },
+ },
+ InfrastructureRef: clusterv1.ContractVersionedObjectReference{
+ APIGroup: clusterv1.GroupVersionInfrastructure.Group,
+ Kind: "TestInfrastructureMachine",
+ Name: "infra-machine1",
+ },
},
Status: clusterv1.MachineStatus{
CertificatesExpiryDate: metav1.Time{Time: reconciliationTime.Add(100 * 24 * time.Hour)}, // certificates will expire in 100 days from now.
@@ -1715,14 +1538,14 @@ func TestUpToDate(t *testing.T) {
defaultInfraConfigs := map[string]*unstructured.Unstructured{
defaultMachine.Name: {
Object: map[string]interface{}{
- "kind": "AWSMachine",
+ "kind": builder.TestInfrastructureMachineKind,
"apiVersion": clusterv1.GroupVersionInfrastructure.String(),
"metadata": map[string]interface{}{
- "name": "infra-config1",
+ "name": "infra-machine1",
"namespace": "default",
"annotations": map[string]interface{}{
- "cluster.x-k8s.io/cloned-from-name": "template1",
- "cluster.x-k8s.io/cloned-from-groupkind": "AWSMachineTemplate.infrastructure.cluster.x-k8s.io",
+ "cluster.x-k8s.io/cloned-from-name": "infra-machine-template1",
+ "cluster.x-k8s.io/cloned-from-groupkind": builder.InfrastructureGroupVersion.WithKind(builder.TestInfrastructureMachineTemplateKind).GroupKind().String(),
},
},
},
@@ -1731,31 +1554,39 @@ func TestUpToDate(t *testing.T) {
defaultMachineConfigs := map[string]*bootstrapv1.KubeadmConfig{
defaultMachine.Name: {
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "boostrap-config1",
+ },
Spec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ CertificatesDir: "foo",
+ },
InitConfiguration: bootstrapv1.InitConfiguration{}, // first control-plane
},
},
}
tests := []struct {
- name string
- kcp *controlplanev1.KubeadmControlPlane
- machine *clusterv1.Machine
- infraConfigs map[string]*unstructured.Unstructured
- machineConfigs map[string]*bootstrapv1.KubeadmConfig
- expectUptoDate bool
- expectLogMessages []string
- expectConditionMessages []string
+ name string
+ kcp *controlplanev1.KubeadmControlPlane
+ machine *clusterv1.Machine
+ infraConfigs map[string]*unstructured.Unstructured
+ machineConfigs map[string]*bootstrapv1.KubeadmConfig
+ expectUptoDate bool
+ expectEligibleForInPlaceUpdate bool
+ expectLogMessages []string
+ expectConditionMessages []string
}{
{
- name: "machine up-to-date",
- kcp: defaultKcp,
- machine: defaultMachine,
- infraConfigs: defaultInfraConfigs,
- machineConfigs: defaultMachineConfigs,
- expectUptoDate: true,
- expectLogMessages: nil,
- expectConditionMessages: nil,
+ name: "machine up-to-date",
+ kcp: defaultKcp,
+ machine: defaultMachine,
+ infraConfigs: defaultInfraConfigs,
+ machineConfigs: defaultMachineConfigs,
+ expectUptoDate: true,
+ expectEligibleForInPlaceUpdate: false,
+ expectLogMessages: nil,
+ expectConditionMessages: nil,
},
{
name: "certificate are expiring soon",
@@ -1764,12 +1595,13 @@ func TestUpToDate(t *testing.T) {
kcp.Spec.Rollout.Before.CertificatesExpiryDays = 150 // rollout if certificates will expire in less then 150 days.
return kcp
}(),
- machine: defaultMachine, // certificates will expire in 100 days from now.
- infraConfigs: defaultInfraConfigs,
- machineConfigs: defaultMachineConfigs,
- expectUptoDate: false,
- expectLogMessages: []string{"certificates will expire soon, rolloutBefore expired"},
- expectConditionMessages: []string{"Certificates will expire soon"},
+ machine: defaultMachine, // certificates will expire in 100 days from now.
+ infraConfigs: defaultInfraConfigs,
+ machineConfigs: defaultMachineConfigs,
+ expectUptoDate: false,
+ expectEligibleForInPlaceUpdate: false,
+ expectLogMessages: []string{"certificates will expire soon, rolloutBefore expired"},
+ expectConditionMessages: []string{"Certificates will expire soon"},
},
{
name: "rollout after expired",
@@ -1778,26 +1610,76 @@ func TestUpToDate(t *testing.T) {
kcp.Spec.Rollout.After = metav1.Time{Time: reconciliationTime.Add(-1 * 24 * time.Hour)} // one day ago
return kcp
}(),
- machine: defaultMachine, // created two days ago
- infraConfigs: defaultInfraConfigs,
- machineConfigs: defaultMachineConfigs,
- expectUptoDate: false,
- expectLogMessages: []string{"rolloutAfter expired"},
- expectConditionMessages: []string{"KubeadmControlPlane spec.rolloutAfter expired"},
+ machine: defaultMachine, // created two days ago
+ infraConfigs: defaultInfraConfigs,
+ machineConfigs: defaultMachineConfigs,
+ expectUptoDate: false,
+ expectEligibleForInPlaceUpdate: false,
+ expectLogMessages: []string{"rolloutAfter expired"},
+ expectConditionMessages: []string{"KubeadmControlPlane spec.rolloutAfter expired"},
},
{
name: "kubernetes version does not match",
kcp: func() *controlplanev1.KubeadmControlPlane {
kcp := defaultKcp.DeepCopy()
- kcp.Spec.Version = "v1.31.2"
+ kcp.Spec.Version = "v1.30.2"
+ return kcp
+ }(),
+ machine: func() *clusterv1.Machine {
+ machine := defaultMachine.DeepCopy()
+ machine.Spec.Version = "v1.30.0"
+ return machine
+ }(),
+ infraConfigs: defaultInfraConfigs,
+ machineConfigs: defaultMachineConfigs,
+ expectUptoDate: false,
+ expectEligibleForInPlaceUpdate: true,
+ expectLogMessages: []string{"Machine version \"v1.30.0\" is not equal to KCP version \"v1.30.2\""},
+ expectConditionMessages: []string{"Version v1.30.0, v1.30.2 required"},
+ },
+ {
+ name: "kubernetes version does not match + delete annotation",
+ kcp: func() *controlplanev1.KubeadmControlPlane {
+ kcp := defaultKcp.DeepCopy()
+ kcp.Spec.Version = "v1.30.2"
+ return kcp
+ }(),
+ machine: func() *clusterv1.Machine {
+ machine := defaultMachine.DeepCopy()
+ machine.Spec.Version = "v1.30.0"
+ machine.Annotations = map[string]string{
+ clusterv1.DeleteMachineAnnotation: "",
+ }
+ return machine
+ }(),
+ infraConfigs: defaultInfraConfigs,
+ machineConfigs: defaultMachineConfigs,
+ expectUptoDate: false,
+ expectEligibleForInPlaceUpdate: false, // Not eligible for in-place update because of delete annotation.
+ expectLogMessages: []string{"Machine version \"v1.30.0\" is not equal to KCP version \"v1.30.2\""},
+ expectConditionMessages: []string{"Version v1.30.0, v1.30.2 required"},
+ },
+ {
+ name: "kubernetes version does not match + remediate annotation",
+ kcp: func() *controlplanev1.KubeadmControlPlane {
+ kcp := defaultKcp.DeepCopy()
+ kcp.Spec.Version = "v1.30.2"
return kcp
}(),
- machine: defaultMachine, // defaultMachine has "v1.31.0"
- infraConfigs: defaultInfraConfigs,
- machineConfigs: defaultMachineConfigs,
- expectUptoDate: false,
- expectLogMessages: []string{"Machine version \"v1.31.0\" is not equal to KCP version \"v1.31.2\""},
- expectConditionMessages: []string{"Version v1.31.0, v1.31.2 required"},
+ machine: func() *clusterv1.Machine {
+ machine := defaultMachine.DeepCopy()
+ machine.Spec.Version = "v1.30.0"
+ machine.Annotations = map[string]string{
+ clusterv1.RemediateMachineAnnotation: "",
+ }
+ return machine
+ }(),
+ infraConfigs: defaultInfraConfigs,
+ machineConfigs: defaultMachineConfigs,
+ expectUptoDate: false,
+ expectEligibleForInPlaceUpdate: false, // Not eligible for in-place update because of remediate annotation.
+ expectLogMessages: []string{"Machine version \"v1.30.0\" is not equal to KCP version \"v1.30.2\""},
+ expectConditionMessages: []string{"Version v1.30.0, v1.30.2 required"},
},
{
name: "KubeadmConfig is not up-to-date",
@@ -1806,26 +1688,48 @@ func TestUpToDate(t *testing.T) {
kcp.Spec.KubeadmConfigSpec.ClusterConfiguration.CertificatesDir = "bar"
return kcp
}(),
- machine: defaultMachine, // was created with cluster name "foo"
- infraConfigs: defaultInfraConfigs,
- machineConfigs: defaultMachineConfigs,
- expectUptoDate: false,
- expectLogMessages: []string{"Machine KubeadmConfig ClusterConfiguration is outdated: diff: v1beta2.ClusterConfiguration{\n ... // 4 identical fields\n Scheduler: {},\n DNS: {},\n- CertificatesDir: \"foo\",\n+ CertificatesDir: \"bar\",\n ImageRepository: \"\",\n FeatureGates: nil,\n ... // 2 identical fields\n }"},
+ machine: defaultMachine, // was created with cluster name "foo"
+ infraConfigs: defaultInfraConfigs,
+ machineConfigs: defaultMachineConfigs,
+ expectUptoDate: false,
+ expectEligibleForInPlaceUpdate: true,
+ expectLogMessages: []string{`Machine KubeadmConfig is outdated: diff: &v1beta2.KubeadmConfigSpec{
+ ClusterConfiguration: v1beta2.ClusterConfiguration{
+ ... // 4 identical fields
+ Scheduler: {},
+ DNS: {},
+- CertificatesDir: "foo",
++ CertificatesDir: "bar",
+ ImageRepository: "",
+ FeatureGates: nil,
+ ... // 3 identical fields
+ },
+ InitConfiguration: {NodeRegistration: {ImagePullPolicy: "IfNotPresent"}},
+ JoinConfiguration: {NodeRegistration: {ImagePullPolicy: "IfNotPresent"}},
+ ... // 11 identical fields
+ }`},
expectConditionMessages: []string{"KubeadmConfig is not up-to-date"},
},
{
- name: "AWSMachine is not up-to-date",
+ name: "InfraMachine is not up-to-date",
kcp: func() *controlplanev1.KubeadmControlPlane {
kcp := defaultKcp.DeepCopy()
- kcp.Spec.MachineTemplate.Spec.InfrastructureRef = clusterv1.ContractVersionedObjectReference{APIGroup: clusterv1.GroupVersionInfrastructure.Group, Kind: "AWSMachineTemplate", Name: "template2"} // kcp moving to template 2
+ kcp.Spec.MachineTemplate.Spec.InfrastructureRef = clusterv1.ContractVersionedObjectReference{
+ APIGroup: builder.InfrastructureGroupVersion.Group,
+ Kind: builder.TestInfrastructureMachineTemplateKind,
+ Name: "infra-machine-template2",
+ } // kcp moving to infra-machine-template2
return kcp
}(),
- machine: defaultMachine,
- infraConfigs: defaultInfraConfigs, // infra config cloned from template1
- machineConfigs: defaultMachineConfigs,
- expectUptoDate: false,
- expectLogMessages: []string{"Infrastructure template on KCP rotated from AWSMachineTemplate.infrastructure.cluster.x-k8s.io template1 to AWSMachineTemplate.infrastructure.cluster.x-k8s.io template2"},
- expectConditionMessages: []string{"AWSMachine is not up-to-date"},
+ machine: defaultMachine,
+ infraConfigs: defaultInfraConfigs, // infra config cloned from infra-machine-template1
+ machineConfigs: defaultMachineConfigs,
+ expectUptoDate: false,
+ expectEligibleForInPlaceUpdate: true,
+ expectLogMessages: []string{"Infrastructure template on KCP rotated from " +
+ "TestInfrastructureMachineTemplate.infrastructure.cluster.x-k8s.io infra-machine-template1 to " +
+ "TestInfrastructureMachineTemplate.infrastructure.cluster.x-k8s.io infra-machine-template2"},
+ expectConditionMessages: []string{"TestInfrastructureMachine is not up-to-date"},
},
}
@@ -1833,11 +1737,28 @@ func TestUpToDate(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
g := NewWithT(t)
- upToDate, logMessages, conditionMessages, err := UpToDate(tt.machine, tt.kcp, &reconciliationTime, tt.infraConfigs, tt.machineConfigs)
+ scheme := runtime.NewScheme()
+ _ = apiextensionsv1.AddToScheme(scheme)
+ c := fake.NewClientBuilder().WithScheme(scheme).WithObjects(builder.TestInfrastructureMachineTemplateCRD, infraMachineTemplate1, infraMachineTemplate2).Build()
+
+ upToDate, res, err := UpToDate(t.Context(), c, &clusterv1.Cluster{}, tt.machine, tt.kcp, &reconciliationTime, tt.infraConfigs, tt.machineConfigs)
g.Expect(err).ToNot(HaveOccurred())
g.Expect(upToDate).To(Equal(tt.expectUptoDate))
- g.Expect(logMessages).To(BeComparableTo(tt.expectLogMessages))
- g.Expect(conditionMessages).To(Equal(tt.expectConditionMessages))
+ g.Expect(res).ToNot(BeNil())
+ g.Expect(res.EligibleForInPlaceUpdate).To(Equal(tt.expectEligibleForInPlaceUpdate))
+ g.Expect(res.DesiredMachine).ToNot(BeNil())
+ g.Expect(res.DesiredMachine.Spec.Version).To(Equal(tt.kcp.Spec.Version))
+ g.Expect(res.CurrentInfraMachine).ToNot(BeNil())
+ g.Expect(res.DesiredInfraMachine).ToNot(BeNil())
+ g.Expect(res.CurrentKubeadmConfig).ToNot(BeNil())
+ g.Expect(res.DesiredKubeadmConfig).ToNot(BeNil())
+ if upToDate {
+ g.Expect(res.LogMessages).To(BeEmpty())
+ g.Expect(res.ConditionMessages).To(BeEmpty())
+ } else {
+ g.Expect(res.LogMessages).To(BeComparableTo(tt.expectLogMessages))
+ g.Expect(res.ConditionMessages).To(Equal(tt.expectConditionMessages))
+ }
})
}
}
diff --git a/controlplane/kubeadm/internal/proxy/dial.go b/controlplane/kubeadm/internal/proxy/dial.go
index f30ced0bb697..b22b0d25065c 100644
--- a/controlplane/kubeadm/internal/proxy/dial.go
+++ b/controlplane/kubeadm/internal/proxy/dial.go
@@ -26,6 +26,7 @@ import (
"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
kerrors "k8s.io/apimachinery/pkg/util/errors"
+ "k8s.io/apimachinery/pkg/util/httpstream"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/portforward"
"k8s.io/client-go/transport/spdy"
@@ -108,6 +109,16 @@ func (d *Dialer) DialContext(ctx context.Context, _ string, addr string) (net.Co
dialer := spdy.NewDialer(d.upgrader, httpClient, "POST", req.URL())
+ // Configure websocket dialer and keep spdy as fallback
+ // Note: websockets are enabled per default starting with kubernetes 1.31.
+ tunnelingDialer, err := portforward.NewSPDYOverWebsocketDialer(req.URL(), d.proxy.KubeConfig)
+ if err != nil {
+ return nil, errors.Wrap(err, "error creating websocket tunneling dialer")
+ }
+ dialer = portforward.NewFallbackDialer(tunnelingDialer, dialer, func(err error) bool {
+ return httpstream.IsUpgradeFailure(err) || httpstream.IsHTTPSProxyError(err)
+ })
+
// Create a new connection from the dialer.
//
// Warning: Any early return should close this connection, otherwise we're going to leak them.
diff --git a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go
deleted file mode 100644
index a132bd90f5a4..000000000000
--- a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go
+++ /dev/null
@@ -1,685 +0,0 @@
-/*
-Copyright 2021 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"
- "encoding/json"
- "fmt"
- "reflect"
- "strings"
-
- "github.com/blang/semver/v4"
- "github.com/coredns/corefile-migration/migration"
- jsonpatch "github.com/evanphx/json-patch/v5"
- "github.com/pkg/errors"
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/intstr"
- "k8s.io/apimachinery/pkg/util/validation"
- "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/webhook/admission"
-
- bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
- controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
- topologynames "sigs.k8s.io/cluster-api/internal/topology/names"
- "sigs.k8s.io/cluster-api/util/container"
- "sigs.k8s.io/cluster-api/util/secret"
- "sigs.k8s.io/cluster-api/util/version"
-)
-
-func (webhook *KubeadmControlPlane) SetupWebhookWithManager(mgr ctrl.Manager) error {
- return ctrl.NewWebhookManagedBy(mgr).
- For(&controlplanev1.KubeadmControlPlane{}).
- WithDefaulter(webhook).
- WithValidator(webhook).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-controlplane-cluster-x-k8s-io-v1beta2-kubeadmcontrolplane,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=controlplane.cluster.x-k8s.io,resources=kubeadmcontrolplanes,versions=v1beta2,name=default.kubeadmcontrolplane.controlplane.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/validate-controlplane-cluster-x-k8s-io-v1beta2-kubeadmcontrolplane,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=controlplane.cluster.x-k8s.io,resources=kubeadmcontrolplanes,versions=v1beta2,name=validation.kubeadmcontrolplane.controlplane.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-// KubeadmControlPlane implements a validation and defaulting webhook for KubeadmControlPlane.
-type KubeadmControlPlane struct{}
-
-var _ webhook.CustomValidator = &KubeadmControlPlane{}
-var _ webhook.CustomDefaulter = &KubeadmControlPlane{}
-
-// Default implements webhook.Defaulter so a webhook will be registered for the type.
-func (webhook *KubeadmControlPlane) Default(_ context.Context, obj runtime.Object) error {
- k, ok := obj.(*controlplanev1.KubeadmControlPlane)
- if !ok {
- return apierrors.NewBadRequest(fmt.Sprintf("expected a KubeadmControlPlane but got a %T", obj))
- }
-
- defaultKubeadmControlPlaneSpec(&k.Spec)
-
- return nil
-}
-
-func defaultKubeadmControlPlaneSpec(s *controlplanev1.KubeadmControlPlaneSpec) {
- if s.Replicas == nil {
- replicas := int32(1)
- s.Replicas = &replicas
- }
-
- if !strings.HasPrefix(s.Version, "v") {
- s.Version = "v" + s.Version
- }
-
- // Enforce RollingUpdate strategy and default MaxSurge if not set.
- s.Rollout.Strategy.Type = controlplanev1.RollingUpdateStrategyType
- s.Rollout.Strategy.RollingUpdate.MaxSurge = intstr.ValueOrDefault(s.Rollout.Strategy.RollingUpdate.MaxSurge, intstr.FromInt32(1))
-}
-
-// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
-func (webhook *KubeadmControlPlane) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- k, ok := obj.(*controlplanev1.KubeadmControlPlane)
- if !ok {
- return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a KubeadmControlPlane but got a %T", obj))
- }
-
- spec := k.Spec
- allErrs := validateKubeadmControlPlaneSpec(spec, field.NewPath("spec"))
- allErrs = append(allErrs, validateClusterConfiguration(nil, &spec.KubeadmConfigSpec.ClusterConfiguration, field.NewPath("spec", "kubeadmConfigSpec", "clusterConfiguration"))...)
- allErrs = append(allErrs, spec.KubeadmConfigSpec.Validate(true, field.NewPath("spec", "kubeadmConfigSpec"))...)
- if len(allErrs) > 0 {
- return nil, apierrors.NewInvalid(clusterv1.GroupVersion.WithKind("KubeadmControlPlane").GroupKind(), k.Name, allErrs)
- }
- return nil, nil
-}
-
-const (
- spec = "spec"
- kubeadmConfigSpec = "kubeadmConfigSpec"
- clusterConfiguration = "clusterConfiguration"
- initConfiguration = "initConfiguration"
- joinConfiguration = "joinConfiguration"
- nodeRegistration = "nodeRegistration"
- skipPhases = "skipPhases"
- patches = "patches"
- directory = "directory"
- bootCommands = "bootCommands"
- preKubeadmCommands = "preKubeadmCommands"
- postKubeadmCommands = "postKubeadmCommands"
- files = "files"
- users = "users"
- apiServer = "apiServer"
- controllerManager = "controllerManager"
- scheduler = "scheduler"
- ntp = "ntp"
- ignition = "ignition"
- diskSetup = "diskSetup"
- featureGates = "featureGates"
- timeouts = "timeouts"
-)
-
-// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
-func (webhook *KubeadmControlPlane) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
- // add a * to indicate everything beneath is ok.
- // For example, {"spec", "*"} will allow any path under "spec" to change.
- // For example, {"spec"} will allow "spec" to also be unset.
- allowedPaths := [][]string{
- // metadata
- {"metadata", "*"},
- // spec.kubeadmConfigSpec.clusterConfiguration
- {spec, kubeadmConfigSpec, clusterConfiguration, "etcd"},
- {spec, kubeadmConfigSpec, clusterConfiguration, "etcd", "*"},
- {spec, kubeadmConfigSpec, clusterConfiguration, "etcd", "local"},
- {spec, kubeadmConfigSpec, clusterConfiguration, "etcd", "local", "*"},
- {spec, kubeadmConfigSpec, clusterConfiguration, "etcd", "external", "*"},
- {spec, kubeadmConfigSpec, clusterConfiguration, "dns"},
- {spec, kubeadmConfigSpec, clusterConfiguration, "dns", "*"},
- {spec, kubeadmConfigSpec, clusterConfiguration, "imageRepository"},
- {spec, kubeadmConfigSpec, clusterConfiguration, featureGates},
- {spec, kubeadmConfigSpec, clusterConfiguration, featureGates, "*"},
- {spec, kubeadmConfigSpec, clusterConfiguration, apiServer},
- {spec, kubeadmConfigSpec, clusterConfiguration, apiServer, "*"},
- {spec, kubeadmConfigSpec, clusterConfiguration, controllerManager},
- {spec, kubeadmConfigSpec, clusterConfiguration, controllerManager, "*"},
- {spec, kubeadmConfigSpec, clusterConfiguration, scheduler},
- {spec, kubeadmConfigSpec, clusterConfiguration, scheduler, "*"},
- {spec, kubeadmConfigSpec, clusterConfiguration, "certificateValidityPeriodDays"},
- // spec.kubeadmConfigSpec.initConfiguration
- {spec, kubeadmConfigSpec, initConfiguration, nodeRegistration},
- {spec, kubeadmConfigSpec, initConfiguration, nodeRegistration, "*"},
- {spec, kubeadmConfigSpec, initConfiguration, patches, directory},
- {spec, kubeadmConfigSpec, initConfiguration, patches},
- {spec, kubeadmConfigSpec, initConfiguration, skipPhases},
- {spec, kubeadmConfigSpec, initConfiguration, "bootstrapTokens"},
- {spec, kubeadmConfigSpec, initConfiguration, "localAPIEndpoint"},
- {spec, kubeadmConfigSpec, initConfiguration, "localAPIEndpoint", "*"},
- {spec, kubeadmConfigSpec, initConfiguration, timeouts},
- {spec, kubeadmConfigSpec, initConfiguration, timeouts, "*"},
- // spec.kubeadmConfigSpec.joinConfiguration
- {spec, kubeadmConfigSpec, joinConfiguration, nodeRegistration},
- {spec, kubeadmConfigSpec, joinConfiguration, nodeRegistration, "*"},
- {spec, kubeadmConfigSpec, joinConfiguration, patches, directory},
- {spec, kubeadmConfigSpec, joinConfiguration, patches},
- {spec, kubeadmConfigSpec, joinConfiguration, skipPhases},
- {spec, kubeadmConfigSpec, joinConfiguration, "caCertPath"},
- {spec, kubeadmConfigSpec, joinConfiguration, "controlPlane"},
- {spec, kubeadmConfigSpec, joinConfiguration, "controlPlane", "*"},
- {spec, kubeadmConfigSpec, joinConfiguration, "discovery"},
- {spec, kubeadmConfigSpec, joinConfiguration, "discovery", "*"},
- {spec, kubeadmConfigSpec, joinConfiguration, timeouts},
- {spec, kubeadmConfigSpec, joinConfiguration, timeouts, "*"},
- // spec.kubeadmConfigSpec
- {spec, kubeadmConfigSpec, bootCommands},
- {spec, kubeadmConfigSpec, preKubeadmCommands},
- {spec, kubeadmConfigSpec, postKubeadmCommands},
- {spec, kubeadmConfigSpec, files},
- {spec, kubeadmConfigSpec, "verbosity"},
- {spec, kubeadmConfigSpec, users},
- {spec, kubeadmConfigSpec, ntp},
- {spec, kubeadmConfigSpec, ntp, "*"},
- {spec, kubeadmConfigSpec, ignition},
- {spec, kubeadmConfigSpec, ignition, "*"},
- {spec, kubeadmConfigSpec, diskSetup},
- {spec, kubeadmConfigSpec, diskSetup, "*"},
- {spec, kubeadmConfigSpec, "format"},
- {spec, kubeadmConfigSpec, "mounts"},
- // spec.machineTemplate
- {spec, "machineTemplate", "metadata"},
- {spec, "machineTemplate", "metadata", "*"},
- {spec, "machineTemplate", "spec"},
- {spec, "machineTemplate", "spec", "*"},
- // spec
- {spec, "replicas"},
- {spec, "version"},
- {spec, "remediation"},
- {spec, "remediation", "*"},
- {spec, "machineNaming"},
- {spec, "machineNaming", "*"},
- {spec, "rollout"},
- {spec, "rollout", "*"},
- }
-
- oldK, ok := oldObj.(*controlplanev1.KubeadmControlPlane)
- if !ok {
- return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a KubeadmControlPlane but got a %T", oldObj))
- }
-
- newK, ok := newObj.(*controlplanev1.KubeadmControlPlane)
- if !ok {
- return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a KubeadmControlPlane but got a %T", newObj))
- }
-
- allErrs := validateKubeadmControlPlaneSpec(newK.Spec, field.NewPath("spec"))
-
- originalJSON, err := json.Marshal(oldK)
- if err != nil {
- return nil, apierrors.NewInternalError(err)
- }
- modifiedJSON, err := json.Marshal(newK)
- if err != nil {
- return nil, apierrors.NewInternalError(err)
- }
-
- diff, err := jsonpatch.CreateMergePatch(originalJSON, modifiedJSON)
- if err != nil {
- return nil, apierrors.NewInternalError(err)
- }
- jsonPatch := map[string]interface{}{}
- if err := json.Unmarshal(diff, &jsonPatch); err != nil {
- return nil, apierrors.NewInternalError(err)
- }
- // Build a list of all paths that are trying to change
- diffpaths := paths([]string{}, jsonPatch)
- // Every path in the diff must be valid for the update function to work.
- for _, path := range diffpaths {
- // Ignore paths that are empty
- if len(path) == 0 {
- continue
- }
- if !allowed(allowedPaths, path) {
- if len(path) == 1 {
- allErrs = append(allErrs, field.Forbidden(field.NewPath(path[0]), "cannot be modified"))
- continue
- }
- allErrs = append(allErrs, field.Forbidden(field.NewPath(path[0], path[1:]...), "cannot be modified"))
- }
- }
-
- allErrs = append(allErrs, webhook.validateVersion(oldK, newK)...)
- allErrs = append(allErrs, validateClusterConfiguration(&oldK.Spec.KubeadmConfigSpec.ClusterConfiguration, &newK.Spec.KubeadmConfigSpec.ClusterConfiguration, field.NewPath("spec", "kubeadmConfigSpec", "clusterConfiguration"))...)
- allErrs = append(allErrs, webhook.validateCoreDNSVersion(oldK, newK)...)
- allErrs = append(allErrs, newK.Spec.KubeadmConfigSpec.Validate(true, field.NewPath("spec", "kubeadmConfigSpec"))...)
-
- if len(allErrs) > 0 {
- return nil, apierrors.NewInvalid(clusterv1.GroupVersion.WithKind("KubeadmControlPlane").GroupKind(), newK.Name, allErrs)
- }
-
- return nil, nil
-}
-
-func validateKubeadmControlPlaneSpec(s controlplanev1.KubeadmControlPlaneSpec, pathPrefix *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
-
- if s.Replicas == nil {
- allErrs = append(
- allErrs,
- field.Required(
- pathPrefix.Child("replicas"),
- "is required",
- ),
- )
- } else if *s.Replicas <= 0 {
- // The use of the scale subresource should provide a guarantee that negative values
- // should not be accepted for this field, but since we have to validate that Replicas != 0
- // it doesn't hurt to also additionally validate for negative numbers here as well.
- allErrs = append(
- allErrs,
- field.Forbidden(
- pathPrefix.Child("replicas"),
- "cannot be less than or equal to 0",
- ),
- )
- }
-
- externalEtcd := s.KubeadmConfigSpec.ClusterConfiguration.Etcd.External.IsDefined()
- if !externalEtcd {
- if s.Replicas != nil && *s.Replicas%2 == 0 {
- allErrs = append(
- allErrs,
- field.Forbidden(
- pathPrefix.Child("replicas"),
- "cannot be an even number when etcd is stacked",
- ),
- )
- }
- }
-
- if s.MachineTemplate.Spec.InfrastructureRef.APIGroup == "" {
- allErrs = append(
- allErrs,
- field.Invalid(
- pathPrefix.Child("machineTemplate", "infrastructure", "apiGroup"),
- s.MachineTemplate.Spec.InfrastructureRef.APIGroup,
- "cannot be empty",
- ),
- )
- }
- if s.MachineTemplate.Spec.InfrastructureRef.Kind == "" {
- allErrs = append(
- allErrs,
- field.Invalid(
- pathPrefix.Child("machineTemplate", "infrastructure", "kind"),
- s.MachineTemplate.Spec.InfrastructureRef.Kind,
- "cannot be empty",
- ),
- )
- }
- if s.MachineTemplate.Spec.InfrastructureRef.Name == "" {
- allErrs = append(
- allErrs,
- field.Invalid(
- pathPrefix.Child("machineTemplate", "infrastructure", "name"),
- s.MachineTemplate.Spec.InfrastructureRef.Name,
- "cannot be empty",
- ),
- )
- }
-
- // Validate the metadata of the MachineTemplate
- allErrs = append(allErrs, s.MachineTemplate.ObjectMeta.Validate(pathPrefix.Child("machineTemplate", "metadata"))...)
-
- if !version.KubeSemver.MatchString(s.Version) {
- allErrs = append(allErrs, field.Invalid(pathPrefix.Child("version"), s.Version, "must be a valid semantic version"))
- }
-
- allErrs = append(allErrs, validateRolloutAndCertValidityFields(s.Rollout, s.KubeadmConfigSpec.ClusterConfiguration, s.Replicas, pathPrefix)...)
- allErrs = append(allErrs, validateNaming(s.MachineNaming, pathPrefix.Child("machineNaming"))...)
- return allErrs
-}
-
-func validateRolloutAndCertValidityFields(rolloutSpec controlplanev1.KubeadmControlPlaneRolloutSpec, clusterConfiguration bootstrapv1.ClusterConfiguration, replicas *int32, pathPrefix *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
-
- rolloutStrategy := rolloutSpec.Strategy
-
- if reflect.DeepEqual(rolloutStrategy, controlplanev1.KubeadmControlPlaneRolloutStrategy{}) {
- return nil
- }
-
- if rolloutStrategy.Type != controlplanev1.RollingUpdateStrategyType {
- allErrs = append(
- allErrs,
- field.Required(
- pathPrefix.Child("rollout", "strategy", "type"),
- "only RollingUpdate is supported",
- ),
- )
- }
-
- if rolloutStrategy.RollingUpdate.MaxSurge != nil {
- ios1 := intstr.FromInt32(1)
- ios0 := intstr.FromInt32(0)
- if rolloutStrategy.RollingUpdate.MaxSurge.IntValue() == ios0.IntValue() && (replicas != nil && *replicas < int32(3)) {
- allErrs = append(
- allErrs,
- field.Required(
- pathPrefix.Child("rollout", "strategy", "rollingUpdate"),
- "when KubeadmControlPlane is configured to scale-in, replica count needs to be at least 3",
- ),
- )
- }
- if rolloutStrategy.RollingUpdate.MaxSurge.IntValue() != ios1.IntValue() && rolloutStrategy.RollingUpdate.MaxSurge.IntValue() != ios0.IntValue() {
- allErrs = append(
- allErrs,
- field.Required(
- pathPrefix.Child("rollout", "strategy", "rollingUpdate", "maxSurge"),
- "value must be 1 or 0",
- ),
- )
- }
- }
-
- if clusterConfiguration.CertificateValidityPeriodDays != 0 {
- if clusterConfiguration.CACertificateValidityPeriodDays != 0 {
- if clusterConfiguration.CertificateValidityPeriodDays > clusterConfiguration.CACertificateValidityPeriodDays {
- allErrs = append(allErrs,
- field.Invalid(
- pathPrefix.Child("kubeadmConfigSpec", "clusterConfiguration", "certificateValidityPeriodDays"),
- clusterConfiguration.CertificateValidityPeriodDays,
- fmt.Sprintf("must be less than or equal to caCertificateValidityPeriodDays (%d)", clusterConfiguration.CACertificateValidityPeriodDays),
- ),
- )
- }
- } else if clusterConfiguration.CertificateValidityPeriodDays > secret.DefaultCACertificatesExpiryDays {
- allErrs = append(allErrs,
- field.Invalid(
- pathPrefix.Child("kubeadmConfigSpec", "clusterConfiguration", "certificateValidityPeriodDays"),
- clusterConfiguration.CertificateValidityPeriodDays,
- fmt.Sprintf("must be less than or equal to the default value of caCertificateValidityPeriodDays (%d)", secret.DefaultCACertificatesExpiryDays),
- ),
- )
- }
-
- if rolloutSpec.Before.CertificatesExpiryDays != 0 {
- if rolloutSpec.Before.CertificatesExpiryDays >= clusterConfiguration.CertificateValidityPeriodDays {
- allErrs = append(allErrs,
- field.Invalid(
- pathPrefix.Child("rollout", "before", "certificatesExpiryDays"),
- rolloutSpec.Before.CertificatesExpiryDays,
- fmt.Sprintf("must be less than certificateValidityPeriodDays (%d)", clusterConfiguration.CertificateValidityPeriodDays)))
- }
- }
- }
-
- return allErrs
-}
-
-func validateNaming(machineNaming controlplanev1.MachineNamingSpec, pathPrefix *field.Path) field.ErrorList {
- var allErrs field.ErrorList
-
- if machineNaming.Template != "" {
- if !strings.Contains(machineNaming.Template, "{{ .random }}") {
- allErrs = append(allErrs,
- field.Invalid(
- pathPrefix.Child("template"),
- machineNaming.Template,
- "invalid template, {{ .random }} is missing",
- ))
- }
- name, err := topologynames.KCPMachineNameGenerator(machineNaming.Template, "cluster", "kubeadmcontrolplane").GenerateName()
- if err != nil {
- allErrs = append(allErrs,
- field.Invalid(
- pathPrefix.Child("template"),
- machineNaming.Template,
- fmt.Sprintf("invalid template: %v", err),
- ))
- } else {
- for _, err := range validation.IsDNS1123Subdomain(name) {
- allErrs = append(allErrs,
- field.Invalid(
- pathPrefix.Child("template"),
- machineNaming.Template,
- fmt.Sprintf("invalid template, generated names would not be valid Kubernetes object names: %v", err),
- ))
- }
- }
- }
-
- return allErrs
-}
-
-func validateClusterConfiguration(oldClusterConfiguration, newClusterConfiguration *bootstrapv1.ClusterConfiguration, pathPrefix *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
-
- if newClusterConfiguration == nil {
- return allErrs
- }
-
- // TODO: Remove when kubeadm types include OpenAPI validation
- if !container.ImageTagIsValid(newClusterConfiguration.DNS.ImageTag) {
- allErrs = append(
- allErrs,
- field.Forbidden(
- pathPrefix.Child("dns", "imageTag"),
- fmt.Sprintf("tag %s is invalid", newClusterConfiguration.DNS.ImageTag),
- ),
- )
- }
-
- if newClusterConfiguration.DNS.ImageTag != "" {
- if _, err := version.ParseTolerantImageTag(newClusterConfiguration.DNS.ImageTag); err != nil {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("dns", "imageTag"),
- newClusterConfiguration.DNS.ImageTag,
- fmt.Sprintf("failed to parse CoreDNS version: %v", err),
- ),
- )
- }
- }
-
- // TODO: Remove when kubeadm types include OpenAPI validation
- if newClusterConfiguration.Etcd.Local.IsDefined() && !container.ImageTagIsValid(newClusterConfiguration.Etcd.Local.ImageTag) {
- allErrs = append(
- allErrs,
- field.Forbidden(
- pathPrefix.Child("etcd", "local", "imageTag"),
- fmt.Sprintf("tag %s is invalid", newClusterConfiguration.Etcd.Local.ImageTag),
- ),
- )
- }
-
- if newClusterConfiguration.Etcd.Local.IsDefined() && newClusterConfiguration.Etcd.External.IsDefined() {
- allErrs = append(
- allErrs,
- field.Forbidden(
- pathPrefix.Child("etcd", "local"),
- "cannot have both external and local etcd",
- ),
- )
- }
-
- // update validations
- if oldClusterConfiguration != nil {
- if (newClusterConfiguration.Etcd.External.IsDefined() && !oldClusterConfiguration.Etcd.External.IsDefined()) ||
- (!newClusterConfiguration.Etcd.External.IsDefined() && oldClusterConfiguration.Etcd.External.IsDefined()) {
- allErrs = append(
- allErrs,
- field.Forbidden(
- pathPrefix.Child("etcd", "external"),
- "cannot change between external and local etcd",
- ),
- )
- }
- }
-
- return allErrs
-}
-
-func allowed(allowList [][]string, path []string) bool {
- for _, allowed := range allowList {
- if pathsMatch(allowed, path) {
- return true
- }
- }
- return false
-}
-
-func pathsMatch(allowed, path []string) bool {
- // if either are empty then no match can be made
- if len(allowed) == 0 || len(path) == 0 {
- return false
- }
- i := 0
- for i = range path {
- // reached the end of the allowed path and no match was found
- if i > len(allowed)-1 {
- return false
- }
- if allowed[i] == "*" {
- return true
- }
- if path[i] != allowed[i] {
- return false
- }
- }
- // path has been completely iterated and has not matched the end of the path.
- // e.g. allowed: []string{"a","b","c"}, path: []string{"a"}
- return i >= len(allowed)-1
-}
-
-// paths builds a slice of paths that are being modified.
-func paths(path []string, diff map[string]interface{}) [][]string {
- allPaths := [][]string{}
- for key, m := range diff {
- nested, ok := m.(map[string]interface{})
- if !ok {
- // We have to use a copy of path, because otherwise the slice we append to
- // allPaths would be overwritten in another iteration.
- tmp := make([]string, len(path))
- copy(tmp, path)
- allPaths = append(allPaths, append(tmp, key))
- continue
- }
- allPaths = append(allPaths, paths(append(path, key), nested)...)
- }
- return allPaths
-}
-
-func (webhook *KubeadmControlPlane) validateCoreDNSVersion(oldK, newK *controlplanev1.KubeadmControlPlane) (allErrs field.ErrorList) {
- // return if either current or target versions is empty
- if newK.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS.ImageTag == "" || oldK.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS.ImageTag == "" {
- return allErrs
- }
- targetDNS := &newK.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS
-
- fromVersion, err := version.ParseTolerantImageTag(oldK.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS.ImageTag)
- if err != nil {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "kubeadmConfigSpec", "clusterConfiguration", "dns", "imageTag"),
- oldK.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS.ImageTag,
- fmt.Sprintf("failed to parse current CoreDNS version: %v", err),
- ),
- )
- return allErrs
- }
-
- toVersion, err := version.ParseTolerantImageTag(targetDNS.ImageTag)
- if err != nil {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "kubeadmConfigSpec", "clusterConfiguration", "dns", "imageTag"),
- targetDNS.ImageTag,
- fmt.Sprintf("failed to parse target CoreDNS version: %v", err),
- ),
- )
- return allErrs
- }
- // If the versions are equal return here without error.
- // This allows an upgrade where the version of CoreDNS in use is not supported by the migration tool.
- if version.Compare(toVersion, fromVersion, version.WithoutPreReleases()) == 0 {
- return allErrs
- }
-
- // Skip validating if the skip CoreDNS annotation is set. If set, KCP doesn't use the migration library.
- if _, ok := newK.Annotations[controlplanev1.SkipCoreDNSAnnotation]; ok {
- return allErrs
- }
-
- if err := migration.ValidUpMigration(version.MajorMinorPatch(fromVersion).String(), version.MajorMinorPatch(toVersion).String()); err != nil {
- allErrs = append(
- allErrs,
- field.Forbidden(
- field.NewPath("spec", "kubeadmConfigSpec", "clusterConfiguration", "dns", "imageTag"),
- fmt.Sprintf("cannot migrate CoreDNS up to '%v' from '%v': %v", toVersion, fromVersion, err),
- ),
- )
- }
-
- return allErrs
-}
-
-func (webhook *KubeadmControlPlane) validateVersion(oldK, newK *controlplanev1.KubeadmControlPlane) (allErrs field.ErrorList) {
- previousVersion := oldK.Spec.Version
- fromVersion, err := semver.ParseTolerant(previousVersion)
- if err != nil {
- allErrs = append(allErrs,
- field.InternalError(
- field.NewPath("spec", "version"),
- errors.Wrapf(err, "failed to parse current kubeadmcontrolplane version: %s", previousVersion),
- ),
- )
- return allErrs
- }
-
- toVersion, err := semver.ParseTolerant(newK.Spec.Version)
- if err != nil {
- allErrs = append(allErrs,
- field.InternalError(
- field.NewPath("spec", "version"),
- errors.Wrapf(err, "failed to parse updated kubeadmcontrolplane version: %s", newK.Spec.Version),
- ),
- )
- return allErrs
- }
-
- // Validate that the update is upgrading at most one minor version.
- // Note: Skipping a minor version is not allowed.
- // Note: Checking against this ceilVersion allows upgrading to the next minor
- // version irrespective of the patch version.
- ceilVersion := semver.Version{
- Major: fromVersion.Major,
- Minor: fromVersion.Minor + 2,
- Patch: 0,
- }
- if version.Compare(toVersion, ceilVersion, version.WithoutPreReleases()) >= 0 {
- allErrs = append(allErrs,
- field.Forbidden(
- field.NewPath("spec", "version"),
- fmt.Sprintf("cannot update Kubernetes version from %s to %s", previousVersion, newK.Spec.Version),
- ),
- )
- }
-
- return allErrs
-}
-
-// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
-func (webhook *KubeadmControlPlane) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
diff --git a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go
deleted file mode 100644
index 1d738699dc93..000000000000
--- a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go
+++ /dev/null
@@ -1,1467 +0,0 @@
-/*
-Copyright 2021 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 (
- "strings"
- "testing"
- "time"
-
- . "github.com/onsi/gomega"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/util/intstr"
- utilfeature "k8s.io/component-base/featuregate/testing"
- "k8s.io/utils/ptr"
- ctrl "sigs.k8s.io/controller-runtime"
-
- bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
- controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
- "sigs.k8s.io/cluster-api/feature"
- "sigs.k8s.io/cluster-api/internal/webhooks/util"
-)
-
-var (
- ctx = ctrl.SetupSignalHandler()
-)
-
-func TestKubeadmControlPlaneDefault(t *testing.T) {
- g := NewWithT(t)
-
- kcp := &controlplanev1.KubeadmControlPlane{
- ObjectMeta: metav1.ObjectMeta{
- Namespace: "foo",
- },
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- Version: "v1.18.3",
- MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
- Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
- InfrastructureRef: clusterv1.ContractVersionedObjectReference{
- APIGroup: "test",
- Kind: "UnknownInfraMachine",
- Name: "foo",
- },
- },
- },
- },
- }
- updateDefaultingValidationKCP := kcp.DeepCopy()
- updateDefaultingValidationKCP.Spec.Version = "v1.18.3"
- updateDefaultingValidationKCP.Spec.MachineTemplate.Spec.InfrastructureRef = clusterv1.ContractVersionedObjectReference{
- APIGroup: "test",
- Kind: "UnknownInfraMachine",
- Name: "foo",
- }
- webhook := &KubeadmControlPlane{}
- t.Run("for KubeadmControlPlane", util.CustomDefaultValidateTest(ctx, updateDefaultingValidationKCP, webhook))
- g.Expect(webhook.Default(ctx, kcp)).To(Succeed())
-
- g.Expect(kcp.Spec.Version).To(Equal("v1.18.3"))
- g.Expect(kcp.Spec.Rollout.Strategy.Type).To(Equal(controlplanev1.RollingUpdateStrategyType))
- g.Expect(kcp.Spec.Rollout.Strategy.RollingUpdate.MaxSurge.IntVal).To(Equal(int32(1)))
-}
-
-func TestKubeadmControlPlaneValidateCreate(t *testing.T) {
- valid := &controlplanev1.KubeadmControlPlane{
- ObjectMeta: metav1.ObjectMeta{
- Name: "test",
- Namespace: "foo",
- },
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
- Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
- InfrastructureRef: clusterv1.ContractVersionedObjectReference{
- APIGroup: "test",
- Kind: "UnknownInfraMachine",
- Name: "infraTemplate",
- },
- },
- },
- KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{},
- },
- Replicas: ptr.To[int32](1),
- Version: "v1.19.0",
- Rollout: controlplanev1.KubeadmControlPlaneRolloutSpec{
- Strategy: controlplanev1.KubeadmControlPlaneRolloutStrategy{
- Type: controlplanev1.RollingUpdateStrategyType,
- RollingUpdate: controlplanev1.KubeadmControlPlaneRolloutStrategyRollingUpdate{
- MaxSurge: &intstr.IntOrString{
- IntVal: 1,
- },
- },
- },
- },
- },
- }
-
- invalidMaxSurge := valid.DeepCopy()
- invalidMaxSurge.Spec.Rollout.Strategy.RollingUpdate.MaxSurge.IntVal = int32(3)
-
- stringMaxSurge := valid.DeepCopy()
- val := intstr.FromString("1")
- stringMaxSurge.Spec.Rollout.Strategy.RollingUpdate.MaxSurge = &val
-
- missingReplicas := valid.DeepCopy()
- missingReplicas.Spec.Replicas = nil
-
- zeroReplicas := valid.DeepCopy()
- zeroReplicas.Spec.Replicas = ptr.To[int32](0)
-
- evenReplicas := valid.DeepCopy()
- evenReplicas.Spec.Replicas = ptr.To[int32](2)
-
- evenReplicasExternalEtcd := evenReplicas.DeepCopy()
- evenReplicasExternalEtcd.Spec.KubeadmConfigSpec = bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- Etcd: bootstrapv1.Etcd{
- External: bootstrapv1.ExternalEtcd{
- Endpoints: []string{"1.2.3.4"},
- },
- },
- },
- }
-
- validVersion := valid.DeepCopy()
- validVersion.Spec.Version = "v1.16.6"
-
- invalidVersion1 := valid.DeepCopy()
- invalidVersion1.Spec.Version = "vv1.16.6"
-
- invalidVersion2 := valid.DeepCopy()
- invalidVersion2.Spec.Version = "1.16.6"
-
- invalidCoreDNSVersion := valid.DeepCopy()
- invalidCoreDNSVersion.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS.ImageTag = "1-7" // not a valid semantic version
-
- invalidIgnitionConfiguration := valid.DeepCopy() // Format is not set to ignition.
- invalidIgnitionConfiguration.Spec.KubeadmConfigSpec.Ignition = bootstrapv1.IgnitionSpec{
- ContainerLinuxConfig: bootstrapv1.ContainerLinuxConfig{
- AdditionalConfig: "config",
- },
- }
-
- validIgnitionConfiguration := valid.DeepCopy()
- validIgnitionConfiguration.Spec.KubeadmConfigSpec.Format = bootstrapv1.Ignition
- validIgnitionConfiguration.Spec.KubeadmConfigSpec.Ignition = bootstrapv1.IgnitionSpec{}
-
- invalidMetadata := valid.DeepCopy()
- invalidMetadata.Spec.MachineTemplate.ObjectMeta.Labels = map[string]string{
- "foo": "$invalid-key",
- "bar": strings.Repeat("a", 64) + "too-long-value",
- "/invalid-key": "foo",
- }
- invalidMetadata.Spec.MachineTemplate.ObjectMeta.Annotations = map[string]string{
- "/invalid-key": "foo",
- }
-
- invalidControlPlaneComponentHealthCheckSeconds := valid.DeepCopy()
- invalidControlPlaneComponentHealthCheckSeconds.Spec.KubeadmConfigSpec.InitConfiguration = bootstrapv1.InitConfiguration{Timeouts: bootstrapv1.Timeouts{ControlPlaneComponentHealthCheckSeconds: ptr.To[int32](10)}}
-
- validControlPlaneComponentHealthCheckSeconds := valid.DeepCopy()
- validControlPlaneComponentHealthCheckSeconds.Spec.KubeadmConfigSpec.InitConfiguration = bootstrapv1.InitConfiguration{Timeouts: bootstrapv1.Timeouts{ControlPlaneComponentHealthCheckSeconds: ptr.To[int32](10)}}
- validControlPlaneComponentHealthCheckSeconds.Spec.KubeadmConfigSpec.JoinConfiguration = bootstrapv1.JoinConfiguration{Timeouts: bootstrapv1.Timeouts{ControlPlaneComponentHealthCheckSeconds: ptr.To[int32](10)}}
-
- invalidCertificateValidityPeriodDaysGreaterCA := valid.DeepCopy()
- invalidCertificateValidityPeriodDaysGreaterCA.Spec.KubeadmConfigSpec.ClusterConfiguration.CertificateValidityPeriodDays = 350
- invalidCertificateValidityPeriodDaysGreaterCA.Spec.KubeadmConfigSpec.ClusterConfiguration.CACertificateValidityPeriodDays = 300
-
- invalidCertificateValidityPeriodDaysGreaterDefault := valid.DeepCopy()
- invalidCertificateValidityPeriodDaysGreaterDefault.Spec.KubeadmConfigSpec.ClusterConfiguration.CertificateValidityPeriodDays = 3651
- invalidCertificateValidityPeriodDaysGreaterDefault.Spec.KubeadmConfigSpec.ClusterConfiguration.CACertificateValidityPeriodDays = 0 // default is 3650
-
- invalidRolloutBeforeCertificatesExpiryDays := valid.DeepCopy()
- invalidRolloutBeforeCertificatesExpiryDays.Spec.Rollout.Before.CertificatesExpiryDays = 8
- invalidRolloutBeforeCertificatesExpiryDays.Spec.KubeadmConfigSpec.ClusterConfiguration.CertificateValidityPeriodDays = 7
-
- tests := []struct {
- name string
- enableIgnitionFeature bool
- expectErr bool
- kcp *controlplanev1.KubeadmControlPlane
- }{
- {
- name: "should succeed when given a valid config",
- expectErr: false,
- kcp: valid,
- },
- {
- name: "should return error when replicas is nil",
- expectErr: true,
- kcp: missingReplicas,
- },
- {
- name: "should return error when replicas is zero",
- expectErr: true,
- kcp: zeroReplicas,
- },
- {
- name: "should return error when replicas is even",
- expectErr: true,
- kcp: evenReplicas,
- },
- {
- name: "should allow even replicas when using external etcd",
- expectErr: false,
- kcp: evenReplicasExternalEtcd,
- },
- {
- name: "should succeed when given a valid semantic version with prepended 'v'",
- expectErr: false,
- kcp: validVersion,
- },
- {
- name: "should error when given a valid semantic version without 'v'",
- expectErr: true,
- kcp: invalidVersion2,
- },
- {
- name: "should return error when given an invalid semantic version",
- expectErr: true,
- kcp: invalidVersion1,
- },
- {
- name: "should return error when given an invalid semantic CoreDNS version",
- expectErr: true,
- kcp: invalidCoreDNSVersion,
- },
- {
- name: "should return error when maxSurge is not 1",
- expectErr: true,
- kcp: invalidMaxSurge,
- },
- {
- name: "should succeed when maxSurge is a string",
- expectErr: false,
- kcp: stringMaxSurge,
- },
- {
- name: "should return error when Ignition configuration is invalid",
- enableIgnitionFeature: true,
- expectErr: true,
- kcp: invalidIgnitionConfiguration,
- },
- {
- name: "should succeed when Ignition configuration is valid",
- enableIgnitionFeature: true,
- expectErr: false,
- kcp: validIgnitionConfiguration,
- },
- {
- name: "should return error for invalid metadata",
- enableIgnitionFeature: true,
- expectErr: true,
- kcp: invalidMetadata,
- },
- {
- name: "should return error for invalid Timeouts.ControlPlaneComponentHealthCheckSeconds",
- expectErr: true,
- kcp: invalidControlPlaneComponentHealthCheckSeconds,
- },
- {
- name: "should pass for valid Timeouts.ControlPlaneComponentHealthCheckSeconds",
- kcp: validControlPlaneComponentHealthCheckSeconds,
- },
- {
- name: "should return error when CertificateValidityPeriodDays greater than CACertificateValidityPeriodDays",
- expectErr: true,
- kcp: invalidCertificateValidityPeriodDaysGreaterCA,
- },
- {
- name: "should return error when CertificateValidityPeriodDays greater than CACertificateValidityPeriodDays default",
- expectErr: true,
- kcp: invalidCertificateValidityPeriodDaysGreaterDefault,
- },
- {
- name: "should return error when rolloutBefore CertificatesExpiryDays greater than cluster CertificateValidityPeriodDays",
- expectErr: true,
- kcp: invalidRolloutBeforeCertificatesExpiryDays,
- },
- }
-
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- if tt.enableIgnitionFeature {
- // NOTE: KubeadmBootstrapFormatIgnition feature flag is disabled by default.
- // Enabling the feature flag temporarily for this test.
- utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.KubeadmBootstrapFormatIgnition, true)
- }
-
- g := NewWithT(t)
-
- webhook := &KubeadmControlPlane{}
-
- warnings, err := webhook.ValidateCreate(ctx, tt.kcp)
- if tt.expectErr {
- g.Expect(err).To(HaveOccurred())
- } else {
- g.Expect(err).ToNot(HaveOccurred())
- }
- g.Expect(warnings).To(BeEmpty())
- })
- }
-}
-
-func TestKubeadmControlPlaneValidateUpdate(t *testing.T) {
- before := &controlplanev1.KubeadmControlPlane{
- ObjectMeta: metav1.ObjectMeta{
- Name: "test",
- Namespace: "foo",
- },
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
- Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
- InfrastructureRef: clusterv1.ContractVersionedObjectReference{
- APIGroup: "test",
- Kind: "UnknownInfraMachine",
- Name: "infraTemplate",
- },
- Deletion: controlplanev1.KubeadmControlPlaneMachineTemplateDeletionSpec{
- NodeDrainTimeoutSeconds: ptr.To(int32(1)),
- NodeVolumeDetachTimeoutSeconds: ptr.To(int32(1)),
- NodeDeletionTimeoutSeconds: ptr.To(int32(1)),
- },
- },
- },
- Replicas: ptr.To[int32](1),
- KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- InitConfiguration: bootstrapv1.InitConfiguration{
- LocalAPIEndpoint: bootstrapv1.APIEndpoint{
- AdvertiseAddress: "127.0.0.1",
- BindPort: int32(443),
- },
- NodeRegistration: bootstrapv1.NodeRegistrationOptions{
- Name: "test",
- },
- Timeouts: bootstrapv1.Timeouts{
- ControlPlaneComponentHealthCheckSeconds: ptr.To[int32](10),
- KubeletHealthCheckSeconds: ptr.To[int32](40),
- },
- },
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- DNS: bootstrapv1.DNS{
- ImageRepository: "registry.k8s.io/coredns",
- ImageTag: "1.6.5",
- },
- CertificateValidityPeriodDays: 100,
- CACertificateValidityPeriodDays: 365,
- },
- JoinConfiguration: bootstrapv1.JoinConfiguration{
- NodeRegistration: bootstrapv1.NodeRegistrationOptions{
- Name: "test",
- },
- Timeouts: bootstrapv1.Timeouts{
- ControlPlaneComponentHealthCheckSeconds: ptr.To[int32](10),
- KubeletHealthCheckSeconds: ptr.To[int32](40),
- },
- },
- PreKubeadmCommands: []string{
- "test", "foo",
- },
- PostKubeadmCommands: []string{
- "test", "foo",
- },
- Files: []bootstrapv1.File{
- {
- Path: "test",
- },
- },
- Users: []bootstrapv1.User{
- {
- Name: "user",
- SSHAuthorizedKeys: []string{
- "ssh-rsa foo",
- },
- },
- },
- NTP: bootstrapv1.NTP{
- Servers: []string{"test-server-1", "test-server-2"},
- Enabled: ptr.To(true),
- },
- },
- Version: "v1.16.6",
- Rollout: controlplanev1.KubeadmControlPlaneRolloutSpec{
- Before: controlplanev1.KubeadmControlPlaneRolloutBeforeSpec{
- CertificatesExpiryDays: 7,
- },
- Strategy: controlplanev1.KubeadmControlPlaneRolloutStrategy{
- Type: controlplanev1.RollingUpdateStrategyType,
- RollingUpdate: controlplanev1.KubeadmControlPlaneRolloutStrategyRollingUpdate{
- MaxSurge: &intstr.IntOrString{
- IntVal: 1,
- },
- },
- },
- },
- },
- }
-
- updateMaxSurgeVal := before.DeepCopy()
- updateMaxSurgeVal.Spec.Rollout.Strategy.RollingUpdate.MaxSurge.IntVal = int32(0)
- updateMaxSurgeVal.Spec.Replicas = ptr.To[int32](3)
-
- wrongReplicaCountForScaleIn := before.DeepCopy()
- wrongReplicaCountForScaleIn.Spec.Rollout.Strategy.RollingUpdate.MaxSurge.IntVal = int32(0)
-
- validUpdateKubeadmConfigInit := before.DeepCopy()
- validUpdateKubeadmConfigInit.Spec.KubeadmConfigSpec.InitConfiguration.NodeRegistration = bootstrapv1.NodeRegistrationOptions{}
-
- invalidUpdateKubeadmConfigCluster := before.DeepCopy()
- invalidUpdateKubeadmConfigCluster.Spec.KubeadmConfigSpec.ClusterConfiguration = bootstrapv1.ClusterConfiguration{
- CertificatesDir: "some-other-value",
- }
-
- validUpdateKubeadmConfigJoin := before.DeepCopy()
- validUpdateKubeadmConfigJoin.Spec.KubeadmConfigSpec.JoinConfiguration.NodeRegistration = bootstrapv1.NodeRegistrationOptions{}
-
- beforeKubeadmConfigFormatSet := before.DeepCopy()
- beforeKubeadmConfigFormatSet.Spec.KubeadmConfigSpec.Format = bootstrapv1.CloudConfig
- invalidUpdateKubeadmConfigFormat := beforeKubeadmConfigFormatSet.DeepCopy()
- invalidUpdateKubeadmConfigFormat.Spec.KubeadmConfigSpec.Format = bootstrapv1.Ignition
-
- validUpdate := before.DeepCopy()
- validUpdate.Labels = map[string]string{"blue": "green"}
- validUpdate.Spec.KubeadmConfigSpec.BootCommands = []string{"ab", "abc"}
- validUpdate.Spec.KubeadmConfigSpec.PreKubeadmCommands = []string{"ab", "abc"}
- validUpdate.Spec.KubeadmConfigSpec.PostKubeadmCommands = []string{"ab", "abc"}
- validUpdate.Spec.KubeadmConfigSpec.Files = []bootstrapv1.File{
- {
- Path: "ab",
- },
- {
- Path: "abc",
- },
- }
- validUpdate.Spec.Version = "v1.17.1"
- validUpdate.Spec.KubeadmConfigSpec.Users = []bootstrapv1.User{
- {
- Name: "bar",
- SSHAuthorizedKeys: []string{
- "ssh-rsa bar",
- "ssh-rsa foo",
- },
- },
- }
- validUpdate.Spec.MachineTemplate.ObjectMeta.Labels = map[string]string{
- "label": "labelValue",
- }
- validUpdate.Spec.MachineTemplate.ObjectMeta.Annotations = map[string]string{
- "annotation": "labelAnnotation",
- }
- validUpdate.Spec.MachineTemplate.Spec.InfrastructureRef.APIGroup = "test-changed"
- validUpdate.Spec.MachineTemplate.Spec.InfrastructureRef.Name = "orange"
- validUpdate.Spec.MachineTemplate.Spec.Deletion.NodeDrainTimeoutSeconds = ptr.To(int32(10))
- validUpdate.Spec.MachineTemplate.Spec.Deletion.NodeVolumeDetachTimeoutSeconds = ptr.To(int32(10))
- validUpdate.Spec.MachineTemplate.Spec.Deletion.NodeDeletionTimeoutSeconds = ptr.To(int32(10))
- validUpdate.Spec.Replicas = ptr.To[int32](5)
- now := metav1.NewTime(time.Now())
- validUpdate.Spec.Rollout.After = now
- validUpdate.Spec.Rollout.Before.CertificatesExpiryDays = 14
- validUpdate.Spec.Remediation = controlplanev1.KubeadmControlPlaneRemediationSpec{
- MaxRetry: ptr.To[int32](50),
- MinHealthyPeriodSeconds: ptr.To(int32(10 * 60 * 60)),
- RetryPeriodSeconds: ptr.To[int32](10 * 60),
- }
- validUpdate.Spec.KubeadmConfigSpec.Format = bootstrapv1.CloudConfig
-
- scaleToZero := before.DeepCopy()
- scaleToZero.Spec.Replicas = ptr.To[int32](0)
-
- scaleToEven := before.DeepCopy()
- scaleToEven.Spec.Replicas = ptr.To[int32](2)
-
- missingReplicas := before.DeepCopy()
- missingReplicas.Spec.Replicas = nil
-
- etcdLocalImageTag := before.DeepCopy()
- etcdLocalImageTag.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local = bootstrapv1.LocalEtcd{
- ImageTag: "v9.1.1",
- }
- etcdLocalImageTagAndDataDir := etcdLocalImageTag.DeepCopy()
- etcdLocalImageTagAndDataDir.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local.DataDir = "/foo"
-
- etcdLocalImageBuildTag := before.DeepCopy()
- etcdLocalImageBuildTag.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local = bootstrapv1.LocalEtcd{
- ImageTag: "v9.1.1_validBuild1",
- }
-
- etcdLocalImageInvalidTag := before.DeepCopy()
- etcdLocalImageInvalidTag.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local = bootstrapv1.LocalEtcd{
- ImageTag: "v9.1.1+invalidBuild1",
- }
-
- unsetEtcdLocal := etcdLocalImageTag.DeepCopy()
- unsetEtcdLocal.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local = bootstrapv1.LocalEtcd{}
-
- controlPlaneEndpoint := before.DeepCopy()
- controlPlaneEndpoint.Spec.KubeadmConfigSpec.ClusterConfiguration.ControlPlaneEndpoint = "some control plane endpoint"
-
- apiServer := before.DeepCopy()
- apiServer.Spec.KubeadmConfigSpec.ClusterConfiguration.APIServer = bootstrapv1.APIServer{
- ExtraArgs: []bootstrapv1.Arg{
- {
- Name: "foo",
- Value: ptr.To("bar"),
- },
- },
- ExtraVolumes: []bootstrapv1.HostPathMount{{Name: "mount1"}},
- CertSANs: []string{"foo", "bar"},
- }
-
- controllerManager := before.DeepCopy()
- controllerManager.Spec.KubeadmConfigSpec.ClusterConfiguration.ControllerManager = bootstrapv1.ControllerManager{
- ExtraArgs: []bootstrapv1.Arg{
- {
- Name: "controller manager field",
- Value: ptr.To("controller manager value"),
- },
- },
- ExtraVolumes: []bootstrapv1.HostPathMount{{Name: "mount", HostPath: "/foo", MountPath: "bar", ReadOnly: ptr.To(true), PathType: "File"}},
- }
-
- scheduler := before.DeepCopy()
- scheduler.Spec.KubeadmConfigSpec.ClusterConfiguration.Scheduler = bootstrapv1.Scheduler{
- ExtraArgs: []bootstrapv1.Arg{
- {
- Name: "scheduler field",
- Value: ptr.To("scheduler value"),
- },
- },
- ExtraVolumes: []bootstrapv1.HostPathMount{{Name: "mount", HostPath: "/foo", MountPath: "bar", ReadOnly: ptr.To(true), PathType: "File"}},
- }
-
- dns := before.DeepCopy()
- dns.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS = bootstrapv1.DNS{
- ImageRepository: "gcr.io/capi-test",
- ImageTag: "v1.6.6_foobar.1",
- }
-
- dnsBuildTag := before.DeepCopy()
- dnsBuildTag.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS = bootstrapv1.DNS{
- ImageRepository: "gcr.io/capi-test",
- ImageTag: "1.6.7",
- }
-
- dnsInvalidTag := before.DeepCopy()
- dnsInvalidTag.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS = bootstrapv1.DNS{
- ImageRepository: "gcr.io/capi-test",
- ImageTag: "v0.20.0+invalidBuild1",
- }
-
- dnsInvalidCoreDNSToVersion := dns.DeepCopy()
- dnsInvalidCoreDNSToVersion.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS = bootstrapv1.DNS{
- ImageRepository: "gcr.io/capi-test",
- ImageTag: "1.6.5",
- }
-
- validCoreDNSCustomToVersion := dns.DeepCopy()
- validCoreDNSCustomToVersion.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS = bootstrapv1.DNS{
- ImageRepository: "gcr.io/capi-test",
- ImageTag: "v1.6.6_foobar.2",
- }
- validUnsupportedCoreDNSVersion := dns.DeepCopy()
- validUnsupportedCoreDNSVersion.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS = bootstrapv1.DNS{
- ImageRepository: "gcr.io/capi-test",
- ImageTag: "v99.99.99",
- }
-
- validUnsupportedCoreDNSVersionWithSkipAnnotation := dns.DeepCopy()
- validUnsupportedCoreDNSVersionWithSkipAnnotation.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS = bootstrapv1.DNS{
- ImageRepository: "gcr.io/capi-test",
- ImageTag: "v99.99.99",
- }
- validUnsupportedCoreDNSVersionWithSkipAnnotation.Annotations = map[string]string{
- controlplanev1.SkipCoreDNSAnnotation: "",
- }
-
- unsetCoreDNSToVersion := dns.DeepCopy()
- unsetCoreDNSToVersion.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS = bootstrapv1.DNS{
- ImageRepository: "",
- ImageTag: "",
- }
-
- certificatesDir := before.DeepCopy()
- certificatesDir.Spec.KubeadmConfigSpec.ClusterConfiguration.CertificatesDir = "a new certificates directory"
-
- imageRepository := before.DeepCopy()
- imageRepository.Spec.KubeadmConfigSpec.ClusterConfiguration.ImageRepository = "a new image repository"
-
- featureGates := before.DeepCopy()
- featureGates.Spec.KubeadmConfigSpec.ClusterConfiguration.FeatureGates = map[string]bool{"a feature gate": true}
-
- externalEtcd := before.DeepCopy()
- externalEtcd.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.External = bootstrapv1.ExternalEtcd{
- KeyFile: "some key file",
- }
- externalEtcdChanged := before.DeepCopy()
- externalEtcdChanged.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.External = bootstrapv1.ExternalEtcd{
- KeyFile: "another key file",
- }
-
- localDataDir := before.DeepCopy()
- localDataDir.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local = bootstrapv1.LocalEtcd{
- DataDir: "some local data dir",
- }
-
- localPeerCertSANs := before.DeepCopy()
- localPeerCertSANs.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local = bootstrapv1.LocalEtcd{
- PeerCertSANs: []string{"a cert"},
- }
-
- localServerCertSANs := before.DeepCopy()
- localServerCertSANs.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local = bootstrapv1.LocalEtcd{
- ServerCertSANs: []string{"a cert"},
- }
-
- localExtraArgs := before.DeepCopy()
- localExtraArgs.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local = bootstrapv1.LocalEtcd{
- ExtraArgs: []bootstrapv1.Arg{
- {
- Name: "an arg",
- Value: ptr.To("a value"),
- },
- },
- }
-
- beforeExternalEtcdCluster := before.DeepCopy()
- beforeExternalEtcdCluster.Spec.KubeadmConfigSpec.ClusterConfiguration = bootstrapv1.ClusterConfiguration{
- Etcd: bootstrapv1.Etcd{
- External: bootstrapv1.ExternalEtcd{
- Endpoints: []string{"127.0.0.1"},
- },
- },
- }
- scaleToEvenExternalEtcdCluster := beforeExternalEtcdCluster.DeepCopy()
- scaleToEvenExternalEtcdCluster.Spec.Replicas = ptr.To[int32](2)
-
- beforeInvalidEtcdCluster := before.DeepCopy()
- beforeInvalidEtcdCluster.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd = bootstrapv1.Etcd{
- Local: bootstrapv1.LocalEtcd{
- ImageRepository: "image-repository",
- ImageTag: "latest",
- },
- }
-
- afterInvalidEtcdCluster := beforeInvalidEtcdCluster.DeepCopy()
- afterInvalidEtcdCluster.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd = bootstrapv1.Etcd{
- External: bootstrapv1.ExternalEtcd{
- Endpoints: []string{"127.0.0.1"},
- },
- }
-
- withoutClusterConfiguration := before.DeepCopy()
- withoutClusterConfiguration.Spec.KubeadmConfigSpec.ClusterConfiguration = bootstrapv1.ClusterConfiguration{}
-
- updateNTPServers := before.DeepCopy()
- updateNTPServers.Spec.KubeadmConfigSpec.NTP.Servers = []string{"new-server"}
-
- disableNTPServers := before.DeepCopy()
- disableNTPServers.Spec.KubeadmConfigSpec.NTP.Enabled = ptr.To(false)
-
- unsetRolloutBefore := before.DeepCopy()
- unsetRolloutBefore.Spec.Rollout.Before = controlplanev1.KubeadmControlPlaneRolloutBeforeSpec{}
-
- invalidIgnitionConfiguration := before.DeepCopy()
- invalidIgnitionConfiguration.Spec.KubeadmConfigSpec.Ignition = bootstrapv1.IgnitionSpec{ // Format is not set
- ContainerLinuxConfig: bootstrapv1.ContainerLinuxConfig{
- AdditionalConfig: "config",
- },
- }
-
- validIgnitionConfigurationBefore := before.DeepCopy()
- validIgnitionConfigurationBefore.Spec.KubeadmConfigSpec.Format = bootstrapv1.Ignition
- validIgnitionConfigurationBefore.Spec.KubeadmConfigSpec.Ignition = bootstrapv1.IgnitionSpec{
- ContainerLinuxConfig: bootstrapv1.ContainerLinuxConfig{
- AdditionalConfig: "config-before",
- },
- }
-
- validIgnitionConfigurationAfter := validIgnitionConfigurationBefore.DeepCopy()
- validIgnitionConfigurationAfter.Spec.KubeadmConfigSpec.Ignition.ContainerLinuxConfig.AdditionalConfig = "foo: bar"
-
- updateInitConfigurationPatches := before.DeepCopy()
- updateInitConfigurationPatches.Spec.KubeadmConfigSpec.InitConfiguration.Patches = bootstrapv1.Patches{
- Directory: "/tmp/patches",
- }
-
- updateJoinConfigurationPatches := before.DeepCopy()
- updateJoinConfigurationPatches.Spec.KubeadmConfigSpec.InitConfiguration.Patches = bootstrapv1.Patches{
- Directory: "/tmp/patches",
- }
-
- updateInitConfigurationSkipPhases := before.DeepCopy()
- updateInitConfigurationSkipPhases.Spec.KubeadmConfigSpec.InitConfiguration.SkipPhases = []string{"addon/kube-proxy"}
-
- updateJoinConfigurationSkipPhases := before.DeepCopy()
- updateJoinConfigurationSkipPhases.Spec.KubeadmConfigSpec.JoinConfiguration.SkipPhases = []string{"addon/kube-proxy"}
-
- updateDiskSetup := before.DeepCopy()
- updateDiskSetup.Spec.KubeadmConfigSpec.DiskSetup = bootstrapv1.DiskSetup{
- Filesystems: []bootstrapv1.Filesystem{
- {
- Device: "/dev/sda",
- Filesystem: "ext4",
- },
- },
- }
-
- switchFromCloudInitToIgnition := before.DeepCopy()
- switchFromCloudInitToIgnition.Spec.KubeadmConfigSpec.Format = bootstrapv1.Ignition
- switchFromCloudInitToIgnition.Spec.KubeadmConfigSpec.Mounts = []bootstrapv1.MountPoints{
- {"/var/lib/testdir", "/var/lib/etcd/data"},
- }
-
- invalidMetadata := before.DeepCopy()
- invalidMetadata.Spec.MachineTemplate.ObjectMeta.Labels = map[string]string{
- "foo": "$invalid-key",
- "bar": strings.Repeat("a", 64) + "too-long-value",
- "/invalid-key": "foo",
- }
- invalidMetadata.Spec.MachineTemplate.ObjectMeta.Annotations = map[string]string{
- "/invalid-key": "foo",
- }
-
- changeTimeouts := before.DeepCopy()
- changeTimeouts.Spec.KubeadmConfigSpec.InitConfiguration.Timeouts.ControlPlaneComponentHealthCheckSeconds = ptr.To[int32](20) // before 10
- changeTimeouts.Spec.KubeadmConfigSpec.InitConfiguration.Timeouts.KubeletHealthCheckSeconds = nil // before set
- changeTimeouts.Spec.KubeadmConfigSpec.InitConfiguration.Timeouts.EtcdAPICallSeconds = ptr.To[int32](20) // before not set
- changeTimeouts.Spec.KubeadmConfigSpec.JoinConfiguration.Timeouts.ControlPlaneComponentHealthCheckSeconds = ptr.To[int32](20) // before 10
- changeTimeouts.Spec.KubeadmConfigSpec.JoinConfiguration.Timeouts.KubeletHealthCheckSeconds = nil // before set
- changeTimeouts.Spec.KubeadmConfigSpec.JoinConfiguration.Timeouts.EtcdAPICallSeconds = ptr.To[int32](20) // before not set
-
- unsetTimeouts := before.DeepCopy()
- unsetTimeouts.Spec.KubeadmConfigSpec.InitConfiguration.Timeouts = bootstrapv1.Timeouts{}
- unsetTimeouts.Spec.KubeadmConfigSpec.JoinConfiguration.Timeouts = bootstrapv1.Timeouts{}
-
- validUpdateCertificateValidityPeriod := before.DeepCopy()
- validUpdateCertificateValidityPeriod.Spec.KubeadmConfigSpec.ClusterConfiguration.CertificateValidityPeriodDays = 150
-
- invalidUpdateCACertificateValidityPeriodDays := before.DeepCopy()
- invalidUpdateCACertificateValidityPeriodDays.Spec.KubeadmConfigSpec.ClusterConfiguration = bootstrapv1.ClusterConfiguration{
- CACertificateValidityPeriodDays: 730,
- }
-
- tests := []struct {
- name string
- enableIgnitionFeature bool
- expectErr bool
- before *controlplanev1.KubeadmControlPlane
- kcp *controlplanev1.KubeadmControlPlane
- }{
- {
- name: "should succeed when given a valid config",
- expectErr: false,
- before: before,
- kcp: validUpdate,
- },
- {
- name: "should not return an error when trying to mutate the kubeadmconfigspec initconfiguration noderegistration",
- expectErr: false,
- before: before,
- kcp: validUpdateKubeadmConfigInit,
- },
- {
- name: "should return error when trying to mutate the kubeadmconfigspec clusterconfiguration",
- expectErr: true,
- before: before,
- kcp: invalidUpdateKubeadmConfigCluster,
- },
- {
- name: "should not return an error when trying to mutate the kubeadmconfigspec joinconfiguration noderegistration",
- expectErr: false,
- before: before,
- kcp: validUpdateKubeadmConfigJoin,
- },
- {
- name: "should return error when trying to mutate the kubeadmconfigspec format from cloud-config to ignition",
- expectErr: true,
- before: beforeKubeadmConfigFormatSet,
- kcp: invalidUpdateKubeadmConfigFormat,
- },
- {
- name: "should return error when trying to scale to zero",
- expectErr: true,
- before: before,
- kcp: scaleToZero,
- },
- {
- name: "should return error when trying to scale to an even number",
- expectErr: true,
- before: before,
- kcp: scaleToEven,
- },
- {
- name: "should return error when trying to scale to nil",
- expectErr: true,
- before: before,
- kcp: missingReplicas,
- },
- {
- name: "should succeed when trying to scale to an even number with external etcd defined in ClusterConfiguration",
- expectErr: false,
- before: beforeExternalEtcdCluster,
- kcp: scaleToEvenExternalEtcdCluster,
- },
- {
- name: "should succeed when making a change to the local etcd image tag",
- expectErr: false,
- before: before,
- kcp: etcdLocalImageTag,
- },
- {
- name: "should succeed when making a change to the local etcd image tag",
- expectErr: false,
- before: before,
- kcp: etcdLocalImageBuildTag,
- },
- {
- name: "should fail when using an invalid etcd image tag",
- expectErr: true,
- before: before,
- kcp: etcdLocalImageInvalidTag,
- },
- {
- name: "should fail when making a change to the cluster config's controlPlaneEndpoint",
- expectErr: true,
- before: before,
- kcp: controlPlaneEndpoint,
- },
- {
- name: "should allow changes to the cluster config's apiServer",
- expectErr: false,
- before: before,
- kcp: apiServer,
- },
- {
- name: "should allow changes to the cluster config's controllerManager",
- expectErr: false,
- before: before,
- kcp: controllerManager,
- },
- {
- name: "should allow changes to the cluster config's scheduler",
- expectErr: false,
- before: before,
- kcp: scheduler,
- },
- {
- name: "should succeed when making a change to the cluster config's dns",
- expectErr: false,
- before: before,
- kcp: dns,
- },
- {
- name: "should succeed when changing to a valid custom CoreDNS version",
- expectErr: false,
- before: dns,
- kcp: validCoreDNSCustomToVersion,
- },
- {
- name: "should succeed when CoreDNS ImageTag is unset",
- expectErr: false,
- before: dns,
- kcp: unsetCoreDNSToVersion,
- },
- {
- name: "should succeed when DNS is set to nil",
- expectErr: false,
- before: dns,
- kcp: unsetCoreDNSToVersion,
- },
- {
- name: "should succeed when using an valid DNS build",
- expectErr: false,
- before: before,
- kcp: dnsBuildTag,
- },
- {
- name: "should succeed when using the same CoreDNS version",
- before: dns,
- kcp: dns.DeepCopy(),
- },
- {
- name: "should succeed when using the same CoreDNS version - not supported",
- before: validUnsupportedCoreDNSVersion,
- kcp: validUnsupportedCoreDNSVersion,
- },
- {
- name: "should fail when upgrading to an unsupported version",
- before: dns,
- kcp: validUnsupportedCoreDNSVersion,
- expectErr: true,
- },
- {
- name: "should succeed when upgrading to an unsupported version and KCP has skip annotation set",
- before: dns,
- kcp: validUnsupportedCoreDNSVersionWithSkipAnnotation,
- },
- {
- name: "should fail when using an invalid DNS build",
- expectErr: true,
- before: before,
- kcp: dnsInvalidTag,
- },
- {
- name: "should fail when using an invalid CoreDNS version",
- expectErr: true,
- before: dns,
- kcp: dnsInvalidCoreDNSToVersion,
- },
-
- {
- name: "should fail when making a change to the cluster config's certificatesDir",
- expectErr: true,
- before: before,
- kcp: certificatesDir,
- },
- {
- name: "should fail when making a change to the cluster config's imageRepository",
- expectErr: false,
- before: before,
- kcp: imageRepository,
- },
- {
- name: "should succeed when making a change to the cluster config's featureGates",
- expectErr: false,
- before: before,
- kcp: featureGates,
- },
- {
- name: "should succeed when making a change to the cluster config's local etcd's configuration localDataDir field",
- expectErr: false,
- before: before,
- kcp: localDataDir,
- },
- {
- name: "should succeed when making a change to the cluster config's local etcd's configuration localPeerCertSANs field",
- expectErr: false,
- before: before,
- kcp: localPeerCertSANs,
- },
- {
- name: "should succeed when making a change to the cluster config's local etcd's configuration localServerCertSANs field",
- expectErr: false,
- before: before,
- kcp: localServerCertSANs,
- },
- {
- name: "should succeed when making a change to the cluster config's local etcd's configuration localExtraArgs field",
- expectErr: false,
- before: before,
- kcp: localExtraArgs,
- },
- {
- name: "should succeed when making a change to the cluster config's external etcd's configuration",
- expectErr: false,
- before: externalEtcd,
- kcp: externalEtcdChanged,
- },
- {
- name: "should succeed when adding the cluster config's local etcd's configuration",
- expectErr: false,
- before: unsetEtcdLocal,
- kcp: etcdLocalImageTag,
- },
- {
- name: "should succeed when making a change to the cluster config's local etcd's configuration",
- expectErr: false,
- before: etcdLocalImageTag,
- kcp: etcdLocalImageTagAndDataDir,
- },
- {
- name: "should succeed when attempting to unset the etcd local object to fallback to the default",
- expectErr: false,
- before: etcdLocalImageTag,
- kcp: unsetEtcdLocal,
- },
- {
- name: "should fail if both local and external etcd are set",
- expectErr: true,
- before: beforeInvalidEtcdCluster,
- kcp: afterInvalidEtcdCluster,
- },
- {
- name: "should pass if ClusterConfiguration is nil",
- expectErr: false,
- before: withoutClusterConfiguration,
- kcp: withoutClusterConfiguration,
- },
- {
- name: "should not return an error when maxSurge value is updated to 0",
- expectErr: false,
- before: before,
- kcp: updateMaxSurgeVal,
- },
- {
- name: "should return an error when maxSurge value is updated to 0, but replica count is < 3",
- expectErr: true,
- before: before,
- kcp: wrongReplicaCountForScaleIn,
- },
- {
- name: "should pass if NTP servers are updated",
- expectErr: false,
- before: before,
- kcp: updateNTPServers,
- },
- {
- name: "should pass if NTP servers is disabled during update",
- expectErr: false,
- before: before,
- kcp: disableNTPServers,
- },
- {
- name: "should allow changes to initConfiguration.patches",
- expectErr: false,
- before: before,
- kcp: updateInitConfigurationPatches,
- },
- {
- name: "should allow changes to joinConfiguration.patches",
- expectErr: false,
- before: before,
- kcp: updateJoinConfigurationPatches,
- },
- {
- name: "should allow changes to initConfiguration.skipPhases",
- expectErr: false,
- before: before,
- kcp: updateInitConfigurationSkipPhases,
- },
- {
- name: "should allow changes to joinConfiguration.skipPhases",
- expectErr: false,
- before: before,
- kcp: updateJoinConfigurationSkipPhases,
- },
- {
- name: "should allow changes to diskSetup",
- expectErr: false,
- before: before,
- kcp: updateDiskSetup,
- },
- {
- name: "should allow unsetting rolloutBefore",
- expectErr: false,
- before: before,
- kcp: unsetRolloutBefore,
- },
- {
- name: "should return error when Ignition configuration is invalid",
- enableIgnitionFeature: true,
- expectErr: true,
- before: invalidIgnitionConfiguration,
- kcp: invalidIgnitionConfiguration,
- },
- {
- name: "should succeed when Ignition configuration is modified",
- enableIgnitionFeature: true,
- expectErr: false,
- before: validIgnitionConfigurationBefore,
- kcp: validIgnitionConfigurationAfter,
- },
- {
- name: "should succeed when CloudInit was used before",
- enableIgnitionFeature: true,
- expectErr: false,
- before: before,
- kcp: switchFromCloudInitToIgnition,
- },
- {
- name: "should return error for invalid metadata",
- enableIgnitionFeature: true,
- expectErr: true,
- before: before,
- kcp: invalidMetadata,
- },
- {
- name: "should succeed when changing timeouts",
- expectErr: false,
- before: before,
- kcp: changeTimeouts,
- },
- {
- name: "should succeed when unsetting timeouts",
- expectErr: false,
- before: before,
- kcp: unsetTimeouts,
- },
- {
- name: "should succeed when setting timeouts",
- expectErr: false,
- before: unsetTimeouts,
- kcp: changeTimeouts,
- },
- {
- name: "should succeed when making a change to the cluster config's certificateValidityPeriod",
- expectErr: false,
- before: before,
- kcp: validUpdateCertificateValidityPeriod,
- },
- {
- name: "should return error when trying to mutate the cluster config's caCertificateValidityPeriodDays",
- expectErr: true,
- before: before,
- kcp: invalidUpdateCACertificateValidityPeriodDays,
- },
- }
-
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- if tt.enableIgnitionFeature {
- // NOTE: KubeadmBootstrapFormatIgnition feature flag is disabled by default.
- // Enabling the feature flag temporarily for this test.
- utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.KubeadmBootstrapFormatIgnition, true)
- }
-
- g := NewWithT(t)
-
- webhook := &KubeadmControlPlane{}
-
- warnings, err := webhook.ValidateUpdate(ctx, tt.before.DeepCopy(), tt.kcp)
- if tt.expectErr {
- g.Expect(err).To(HaveOccurred())
- } else {
- g.Expect(err).To(Succeed())
- }
- g.Expect(warnings).To(BeEmpty())
- })
- }
-}
-
-func TestValidateVersion(t *testing.T) {
- tests := []struct {
- name string
- clusterConfiguration bootstrapv1.ClusterConfiguration
- oldVersion string
- newVersion string
- expectErr bool
- }{
- // Basic validation of old and new version.
- {
- name: "error when old version is empty",
- oldVersion: "",
- newVersion: "v1.16.6",
- expectErr: true,
- },
- {
- name: "error when old version is invalid",
- oldVersion: "invalid-version",
- newVersion: "v1.18.1",
- expectErr: true,
- },
- {
- name: "error when new version is empty",
- oldVersion: "v1.16.6",
- newVersion: "",
- expectErr: true,
- },
- {
- name: "error when new version is invalid",
- oldVersion: "v1.18.1",
- newVersion: "invalid-version",
- expectErr: true,
- },
- {
- name: "pass when both versions are v1.19.0",
- oldVersion: "v1.19.0",
- newVersion: "v1.19.0",
- expectErr: false,
- },
- // Validation for skip-level upgrades.
- {
- name: "error when upgrading two minor versions",
- oldVersion: "v1.18.8",
- newVersion: "v1.20.0-alpha.0.734_ba502ee555924a",
- expectErr: true,
- },
- {
- name: "pass when upgrading one minor version",
- oldVersion: "v1.20.1",
- newVersion: "v1.21.18",
- expectErr: false,
- },
- }
-
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- g := NewWithT(t)
-
- kcpNew := controlplanev1.KubeadmControlPlane{
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: tt.clusterConfiguration,
- },
- Version: tt.newVersion,
- },
- }
-
- kcpOld := controlplanev1.KubeadmControlPlane{
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: tt.clusterConfiguration,
- },
- Version: tt.oldVersion,
- },
- }
-
- webhook := &KubeadmControlPlane{}
-
- allErrs := webhook.validateVersion(&kcpOld, &kcpNew)
- if tt.expectErr {
- g.Expect(allErrs).ToNot(BeEmpty())
- } else {
- g.Expect(allErrs).To(BeEmpty())
- }
- })
- }
-}
-func TestKubeadmControlPlaneValidateUpdateAfterDefaulting(t *testing.T) {
- g := NewWithT(t)
-
- before := &controlplanev1.KubeadmControlPlane{
- ObjectMeta: metav1.ObjectMeta{
- Name: "test",
- Namespace: "foo",
- },
- Spec: controlplanev1.KubeadmControlPlaneSpec{
- Version: "v1.19.0",
- MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
- Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
- InfrastructureRef: clusterv1.ContractVersionedObjectReference{
- APIGroup: "test",
- Kind: "UnknownInfraMachine",
- Name: "infraTemplate",
- },
- },
- },
- },
- }
-
- afterDefault := before.DeepCopy()
- webhook := &KubeadmControlPlane{}
- g.Expect(webhook.Default(ctx, afterDefault)).To(Succeed())
-
- tests := []struct {
- name string
- expectErr bool
- before *controlplanev1.KubeadmControlPlane
- kcp *controlplanev1.KubeadmControlPlane
- }{
- {
- name: "update should succeed after defaulting",
- expectErr: false,
- before: before,
- kcp: afterDefault,
- },
- }
-
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- g := NewWithT(t)
-
- webhook := &KubeadmControlPlane{}
-
- warnings, err := webhook.ValidateUpdate(ctx, tt.before.DeepCopy(), tt.kcp)
- if tt.expectErr {
- g.Expect(err).To(HaveOccurred())
- } else {
- g.Expect(err).To(Succeed())
- g.Expect(tt.kcp.Spec.Version).To(Equal("v1.19.0"))
- g.Expect(tt.kcp.Spec.Rollout.Strategy.Type).To(Equal(controlplanev1.RollingUpdateStrategyType))
- g.Expect(tt.kcp.Spec.Rollout.Strategy.RollingUpdate.MaxSurge.IntVal).To(Equal(int32(1)))
- g.Expect(tt.kcp.Spec.Replicas).To(Equal(ptr.To[int32](1)))
- }
- g.Expect(warnings).To(BeEmpty())
- })
- }
-}
-
-func TestPathsMatch(t *testing.T) {
- tests := []struct {
- name string
- allowed, path []string
- match bool
- }{
- {
- name: "a simple match case",
- allowed: []string{"a", "b", "c"},
- path: []string{"a", "b", "c"},
- match: true,
- },
- {
- name: "a case can't match",
- allowed: []string{"a", "b", "c"},
- path: []string{"a"},
- match: false,
- },
- {
- name: "an empty path for whatever reason",
- allowed: []string{"a"},
- path: []string{""},
- match: false,
- },
- {
- name: "empty allowed matches nothing",
- allowed: []string{},
- path: []string{"a"},
- match: false,
- },
- {
- name: "wildcard match",
- allowed: []string{"a", "b", "c", "d", "*"},
- path: []string{"a", "b", "c", "d", "e", "f", "g"},
- match: true,
- },
- {
- name: "long path",
- allowed: []string{"a"},
- path: []string{"a", "b", "c", "d", "e", "f", "g"},
- match: false,
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- g := NewWithT(t)
- g.Expect(pathsMatch(tt.allowed, tt.path)).To(Equal(tt.match))
- })
- }
-}
-
-func TestAllowed(t *testing.T) {
- tests := []struct {
- name string
- allowList [][]string
- path []string
- match bool
- }{
- {
- name: "matches the first and none of the others",
- allowList: [][]string{
- {"a", "b", "c"},
- {"b", "d", "x"},
- },
- path: []string{"a", "b", "c"},
- match: true,
- },
- {
- name: "matches none in the allow list",
- allowList: [][]string{
- {"a", "b", "c"},
- {"b", "c", "d"},
- {"e", "*"},
- },
- path: []string{"a"},
- match: false,
- },
- {
- name: "an empty path matches nothing",
- allowList: [][]string{
- {"a", "b", "c"},
- {"*"},
- {"b", "c"},
- },
- path: []string{},
- match: false,
- },
- {
- name: "empty allowList matches nothing",
- allowList: [][]string{},
- path: []string{"a"},
- match: false,
- },
- {
- name: "length test check",
- allowList: [][]string{
- {"a", "b", "c", "d", "e", "f"},
- {"a", "b", "c", "d", "e", "f", "g", "h"},
- },
- path: []string{"a", "b", "c", "d", "e", "f", "g"},
- match: false,
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- g := NewWithT(t)
- g.Expect(allowed(tt.allowList, tt.path)).To(Equal(tt.match))
- })
- }
-}
-
-func TestPaths(t *testing.T) {
- tests := []struct {
- name string
- path []string
- diff map[string]interface{}
- expected [][]string
- }{
- {
- name: "basic check",
- diff: map[string]interface{}{
- "spec": map[string]interface{}{
- "replicas": 4,
- "version": "1.17.3",
- "kubeadmConfigSpec": map[string]interface{}{
- "clusterConfiguration": map[string]interface{}{
- "version": "v2.0.1",
- },
- "initConfiguration": map[string]interface{}{
- "bootstrapToken": []string{"abcd", "defg"},
- },
- "joinConfiguration": nil,
- },
- },
- },
- expected: [][]string{
- {"spec", "replicas"},
- {"spec", "version"},
- {"spec", "kubeadmConfigSpec", "joinConfiguration"},
- {"spec", "kubeadmConfigSpec", "clusterConfiguration", "version"},
- {"spec", "kubeadmConfigSpec", "initConfiguration", "bootstrapToken"},
- },
- },
- {
- name: "empty input makes for empty output",
- path: []string{"a"},
- diff: map[string]interface{}{},
- expected: [][]string{},
- },
- {
- name: "long recursive check with two keys",
- diff: map[string]interface{}{
- "spec": map[string]interface{}{
- "kubeadmConfigSpec": map[string]interface{}{
- "clusterConfiguration": map[string]interface{}{
- "version": "v2.0.1",
- "abc": "d",
- },
- },
- },
- },
- expected: [][]string{
- {"spec", "kubeadmConfigSpec", "clusterConfiguration", "version"},
- {"spec", "kubeadmConfigSpec", "clusterConfiguration", "abc"},
- },
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- g := NewWithT(t)
- g.Expect(paths(tt.path, tt.diff)).To(ConsistOf(tt.expected))
- })
- }
-}
diff --git a/controlplane/kubeadm/internal/webhooks/kubeadmcontrolplane.go b/controlplane/kubeadm/internal/webhooks/kubeadmcontrolplane.go
new file mode 100644
index 000000000000..390268c57857
--- /dev/null
+++ b/controlplane/kubeadm/internal/webhooks/kubeadmcontrolplane.go
@@ -0,0 +1,686 @@
+/*
+Copyright 2021 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"
+ "encoding/json"
+ "fmt"
+ "reflect"
+ "strings"
+
+ "github.com/blang/semver/v4"
+ "github.com/coredns/corefile-migration/migration"
+ jsonpatch "github.com/evanphx/json-patch/v5"
+ "github.com/pkg/errors"
+ apierrors "k8s.io/apimachinery/pkg/api/errors"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/apimachinery/pkg/util/validation"
+ "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/webhook/admission"
+
+ bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
+ controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ topologynames "sigs.k8s.io/cluster-api/internal/topology/names"
+ "sigs.k8s.io/cluster-api/util/container"
+ "sigs.k8s.io/cluster-api/util/secret"
+ "sigs.k8s.io/cluster-api/util/version"
+)
+
+func (webhook *KubeadmControlPlane) SetupWebhookWithManager(mgr ctrl.Manager) error {
+ return ctrl.NewWebhookManagedBy(mgr).
+ For(&controlplanev1.KubeadmControlPlane{}).
+ WithDefaulter(webhook).
+ WithValidator(webhook).
+ Complete()
+}
+
+// +kubebuilder:webhook:verbs=create;update,path=/mutate-controlplane-cluster-x-k8s-io-v1beta2-kubeadmcontrolplane,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=controlplane.cluster.x-k8s.io,resources=kubeadmcontrolplanes,versions=v1beta2,name=default.kubeadmcontrolplane.controlplane.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
+// +kubebuilder:webhook:verbs=create;update,path=/validate-controlplane-cluster-x-k8s-io-v1beta2-kubeadmcontrolplane,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=controlplane.cluster.x-k8s.io,resources=kubeadmcontrolplanes,versions=v1beta2,name=validation.kubeadmcontrolplane.controlplane.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
+
+// KubeadmControlPlane implements a validation and defaulting webhook for KubeadmControlPlane.
+type KubeadmControlPlane struct{}
+
+var _ webhook.CustomValidator = &KubeadmControlPlane{}
+var _ webhook.CustomDefaulter = &KubeadmControlPlane{}
+
+// Default implements webhook.Defaulter so a webhook will be registered for the type.
+func (webhook *KubeadmControlPlane) Default(_ context.Context, obj runtime.Object) error {
+ k, ok := obj.(*controlplanev1.KubeadmControlPlane)
+ if !ok {
+ return apierrors.NewBadRequest(fmt.Sprintf("expected a KubeadmControlPlane but got a %T", obj))
+ }
+
+ defaultKubeadmControlPlaneSpec(&k.Spec)
+
+ return nil
+}
+
+func defaultKubeadmControlPlaneSpec(s *controlplanev1.KubeadmControlPlaneSpec) {
+ if s.Replicas == nil {
+ replicas := int32(1)
+ s.Replicas = &replicas
+ }
+
+ if !strings.HasPrefix(s.Version, "v") {
+ s.Version = "v" + s.Version
+ }
+
+ // Enforce RollingUpdate strategy and default MaxSurge if not set.
+ s.Rollout.Strategy.Type = controlplanev1.RollingUpdateStrategyType
+ s.Rollout.Strategy.RollingUpdate.MaxSurge = intstr.ValueOrDefault(s.Rollout.Strategy.RollingUpdate.MaxSurge, intstr.FromInt32(1))
+}
+
+// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
+func (webhook *KubeadmControlPlane) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
+ k, ok := obj.(*controlplanev1.KubeadmControlPlane)
+ if !ok {
+ return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a KubeadmControlPlane but got a %T", obj))
+ }
+
+ spec := k.Spec
+ allErrs := validateKubeadmControlPlaneSpec(spec, field.NewPath("spec"))
+ allErrs = append(allErrs, validateClusterConfiguration(nil, &spec.KubeadmConfigSpec.ClusterConfiguration, field.NewPath("spec", "kubeadmConfigSpec", "clusterConfiguration"))...)
+ allErrs = append(allErrs, spec.KubeadmConfigSpec.Validate(true, field.NewPath("spec", "kubeadmConfigSpec"))...)
+ if len(allErrs) > 0 {
+ return nil, apierrors.NewInvalid(clusterv1.GroupVersion.WithKind("KubeadmControlPlane").GroupKind(), k.Name, allErrs)
+ }
+ return nil, nil
+}
+
+const (
+ spec = "spec"
+ kubeadmConfigSpec = "kubeadmConfigSpec"
+ clusterConfiguration = "clusterConfiguration"
+ initConfiguration = "initConfiguration"
+ joinConfiguration = "joinConfiguration"
+ nodeRegistration = "nodeRegistration"
+ skipPhases = "skipPhases"
+ patches = "patches"
+ directory = "directory"
+ bootCommands = "bootCommands"
+ preKubeadmCommands = "preKubeadmCommands"
+ postKubeadmCommands = "postKubeadmCommands"
+ files = "files"
+ users = "users"
+ apiServer = "apiServer"
+ controllerManager = "controllerManager"
+ scheduler = "scheduler"
+ ntp = "ntp"
+ ignition = "ignition"
+ diskSetup = "diskSetup"
+ featureGates = "featureGates"
+ timeouts = "timeouts"
+)
+
+// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
+func (webhook *KubeadmControlPlane) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
+ // add a * to indicate everything beneath is ok.
+ // For example, {"spec", "*"} will allow any path under "spec" to change.
+ // For example, {"spec"} will allow "spec" to also be unset.
+ allowedPaths := [][]string{
+ // metadata
+ {"metadata", "*"},
+ // spec.kubeadmConfigSpec.clusterConfiguration
+ {spec, kubeadmConfigSpec, clusterConfiguration, "etcd"},
+ {spec, kubeadmConfigSpec, clusterConfiguration, "etcd", "*"},
+ {spec, kubeadmConfigSpec, clusterConfiguration, "etcd", "local"},
+ {spec, kubeadmConfigSpec, clusterConfiguration, "etcd", "local", "*"},
+ {spec, kubeadmConfigSpec, clusterConfiguration, "etcd", "external", "*"},
+ {spec, kubeadmConfigSpec, clusterConfiguration, "dns"},
+ {spec, kubeadmConfigSpec, clusterConfiguration, "dns", "*"},
+ {spec, kubeadmConfigSpec, clusterConfiguration, "imageRepository"},
+ {spec, kubeadmConfigSpec, clusterConfiguration, featureGates},
+ {spec, kubeadmConfigSpec, clusterConfiguration, featureGates, "*"},
+ {spec, kubeadmConfigSpec, clusterConfiguration, apiServer},
+ {spec, kubeadmConfigSpec, clusterConfiguration, apiServer, "*"},
+ {spec, kubeadmConfigSpec, clusterConfiguration, controllerManager},
+ {spec, kubeadmConfigSpec, clusterConfiguration, controllerManager, "*"},
+ {spec, kubeadmConfigSpec, clusterConfiguration, scheduler},
+ {spec, kubeadmConfigSpec, clusterConfiguration, scheduler, "*"},
+ {spec, kubeadmConfigSpec, clusterConfiguration, "certificateValidityPeriodDays"},
+ {spec, kubeadmConfigSpec, clusterConfiguration, "encryptionAlgorithm"},
+ // spec.kubeadmConfigSpec.initConfiguration
+ {spec, kubeadmConfigSpec, initConfiguration, nodeRegistration},
+ {spec, kubeadmConfigSpec, initConfiguration, nodeRegistration, "*"},
+ {spec, kubeadmConfigSpec, initConfiguration, patches, directory},
+ {spec, kubeadmConfigSpec, initConfiguration, patches},
+ {spec, kubeadmConfigSpec, initConfiguration, skipPhases},
+ {spec, kubeadmConfigSpec, initConfiguration, "bootstrapTokens"},
+ {spec, kubeadmConfigSpec, initConfiguration, "localAPIEndpoint"},
+ {spec, kubeadmConfigSpec, initConfiguration, "localAPIEndpoint", "*"},
+ {spec, kubeadmConfigSpec, initConfiguration, timeouts},
+ {spec, kubeadmConfigSpec, initConfiguration, timeouts, "*"},
+ // spec.kubeadmConfigSpec.joinConfiguration
+ {spec, kubeadmConfigSpec, joinConfiguration, nodeRegistration},
+ {spec, kubeadmConfigSpec, joinConfiguration, nodeRegistration, "*"},
+ {spec, kubeadmConfigSpec, joinConfiguration, patches, directory},
+ {spec, kubeadmConfigSpec, joinConfiguration, patches},
+ {spec, kubeadmConfigSpec, joinConfiguration, skipPhases},
+ {spec, kubeadmConfigSpec, joinConfiguration, "caCertPath"},
+ {spec, kubeadmConfigSpec, joinConfiguration, "controlPlane"},
+ {spec, kubeadmConfigSpec, joinConfiguration, "controlPlane", "*"},
+ {spec, kubeadmConfigSpec, joinConfiguration, "discovery"},
+ {spec, kubeadmConfigSpec, joinConfiguration, "discovery", "*"},
+ {spec, kubeadmConfigSpec, joinConfiguration, timeouts},
+ {spec, kubeadmConfigSpec, joinConfiguration, timeouts, "*"},
+ // spec.kubeadmConfigSpec
+ {spec, kubeadmConfigSpec, bootCommands},
+ {spec, kubeadmConfigSpec, preKubeadmCommands},
+ {spec, kubeadmConfigSpec, postKubeadmCommands},
+ {spec, kubeadmConfigSpec, files},
+ {spec, kubeadmConfigSpec, "verbosity"},
+ {spec, kubeadmConfigSpec, users},
+ {spec, kubeadmConfigSpec, ntp},
+ {spec, kubeadmConfigSpec, ntp, "*"},
+ {spec, kubeadmConfigSpec, ignition},
+ {spec, kubeadmConfigSpec, ignition, "*"},
+ {spec, kubeadmConfigSpec, diskSetup},
+ {spec, kubeadmConfigSpec, diskSetup, "*"},
+ {spec, kubeadmConfigSpec, "format"},
+ {spec, kubeadmConfigSpec, "mounts"},
+ // spec.machineTemplate
+ {spec, "machineTemplate", "metadata"},
+ {spec, "machineTemplate", "metadata", "*"},
+ {spec, "machineTemplate", "spec"},
+ {spec, "machineTemplate", "spec", "*"},
+ // spec
+ {spec, "replicas"},
+ {spec, "version"},
+ {spec, "remediation"},
+ {spec, "remediation", "*"},
+ {spec, "machineNaming"},
+ {spec, "machineNaming", "*"},
+ {spec, "rollout"},
+ {spec, "rollout", "*"},
+ }
+
+ oldK, ok := oldObj.(*controlplanev1.KubeadmControlPlane)
+ if !ok {
+ return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a KubeadmControlPlane but got a %T", oldObj))
+ }
+
+ newK, ok := newObj.(*controlplanev1.KubeadmControlPlane)
+ if !ok {
+ return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a KubeadmControlPlane but got a %T", newObj))
+ }
+
+ allErrs := validateKubeadmControlPlaneSpec(newK.Spec, field.NewPath("spec"))
+
+ originalJSON, err := json.Marshal(oldK)
+ if err != nil {
+ return nil, apierrors.NewInternalError(err)
+ }
+ modifiedJSON, err := json.Marshal(newK)
+ if err != nil {
+ return nil, apierrors.NewInternalError(err)
+ }
+
+ diff, err := jsonpatch.CreateMergePatch(originalJSON, modifiedJSON)
+ if err != nil {
+ return nil, apierrors.NewInternalError(err)
+ }
+ jsonPatch := map[string]interface{}{}
+ if err := json.Unmarshal(diff, &jsonPatch); err != nil {
+ return nil, apierrors.NewInternalError(err)
+ }
+ // Build a list of all paths that are trying to change
+ diffpaths := paths([]string{}, jsonPatch)
+ // Every path in the diff must be valid for the update function to work.
+ for _, path := range diffpaths {
+ // Ignore paths that are empty
+ if len(path) == 0 {
+ continue
+ }
+ if !allowed(allowedPaths, path) {
+ if len(path) == 1 {
+ allErrs = append(allErrs, field.Forbidden(field.NewPath(path[0]), "cannot be modified"))
+ continue
+ }
+ allErrs = append(allErrs, field.Forbidden(field.NewPath(path[0], path[1:]...), "cannot be modified"))
+ }
+ }
+
+ allErrs = append(allErrs, webhook.validateVersion(oldK, newK)...)
+ allErrs = append(allErrs, validateClusterConfiguration(&oldK.Spec.KubeadmConfigSpec.ClusterConfiguration, &newK.Spec.KubeadmConfigSpec.ClusterConfiguration, field.NewPath("spec", "kubeadmConfigSpec", "clusterConfiguration"))...)
+ allErrs = append(allErrs, webhook.validateCoreDNSVersion(oldK, newK)...)
+ allErrs = append(allErrs, newK.Spec.KubeadmConfigSpec.Validate(true, field.NewPath("spec", "kubeadmConfigSpec"))...)
+
+ if len(allErrs) > 0 {
+ return nil, apierrors.NewInvalid(clusterv1.GroupVersion.WithKind("KubeadmControlPlane").GroupKind(), newK.Name, allErrs)
+ }
+
+ return nil, nil
+}
+
+func validateKubeadmControlPlaneSpec(s controlplanev1.KubeadmControlPlaneSpec, pathPrefix *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if s.Replicas == nil {
+ allErrs = append(
+ allErrs,
+ field.Required(
+ pathPrefix.Child("replicas"),
+ "is required",
+ ),
+ )
+ } else if *s.Replicas <= 0 {
+ // The use of the scale subresource should provide a guarantee that negative values
+ // should not be accepted for this field, but since we have to validate that Replicas != 0
+ // it doesn't hurt to also additionally validate for negative numbers here as well.
+ allErrs = append(
+ allErrs,
+ field.Forbidden(
+ pathPrefix.Child("replicas"),
+ "cannot be less than or equal to 0",
+ ),
+ )
+ }
+
+ externalEtcd := s.KubeadmConfigSpec.ClusterConfiguration.Etcd.External.IsDefined()
+ if !externalEtcd {
+ if s.Replicas != nil && *s.Replicas%2 == 0 {
+ allErrs = append(
+ allErrs,
+ field.Forbidden(
+ pathPrefix.Child("replicas"),
+ "cannot be an even number when etcd is stacked",
+ ),
+ )
+ }
+ }
+
+ if s.MachineTemplate.Spec.InfrastructureRef.APIGroup == "" {
+ allErrs = append(
+ allErrs,
+ field.Invalid(
+ pathPrefix.Child("machineTemplate", "infrastructure", "apiGroup"),
+ s.MachineTemplate.Spec.InfrastructureRef.APIGroup,
+ "cannot be empty",
+ ),
+ )
+ }
+ if s.MachineTemplate.Spec.InfrastructureRef.Kind == "" {
+ allErrs = append(
+ allErrs,
+ field.Invalid(
+ pathPrefix.Child("machineTemplate", "infrastructure", "kind"),
+ s.MachineTemplate.Spec.InfrastructureRef.Kind,
+ "cannot be empty",
+ ),
+ )
+ }
+ if s.MachineTemplate.Spec.InfrastructureRef.Name == "" {
+ allErrs = append(
+ allErrs,
+ field.Invalid(
+ pathPrefix.Child("machineTemplate", "infrastructure", "name"),
+ s.MachineTemplate.Spec.InfrastructureRef.Name,
+ "cannot be empty",
+ ),
+ )
+ }
+
+ // Validate the metadata of the MachineTemplate
+ allErrs = append(allErrs, s.MachineTemplate.ObjectMeta.Validate(pathPrefix.Child("machineTemplate", "metadata"))...)
+
+ if !version.KubeSemver.MatchString(s.Version) {
+ allErrs = append(allErrs, field.Invalid(pathPrefix.Child("version"), s.Version, "must be a valid semantic version"))
+ }
+
+ allErrs = append(allErrs, validateRolloutAndCertValidityFields(s.Rollout, s.KubeadmConfigSpec.ClusterConfiguration, s.Replicas, pathPrefix)...)
+ allErrs = append(allErrs, validateNaming(s.MachineNaming, pathPrefix.Child("machineNaming"))...)
+ return allErrs
+}
+
+func validateRolloutAndCertValidityFields(rolloutSpec controlplanev1.KubeadmControlPlaneRolloutSpec, clusterConfiguration bootstrapv1.ClusterConfiguration, replicas *int32, pathPrefix *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ rolloutStrategy := rolloutSpec.Strategy
+
+ if reflect.DeepEqual(rolloutStrategy, controlplanev1.KubeadmControlPlaneRolloutStrategy{}) {
+ return nil
+ }
+
+ if rolloutStrategy.Type != controlplanev1.RollingUpdateStrategyType {
+ allErrs = append(
+ allErrs,
+ field.Required(
+ pathPrefix.Child("rollout", "strategy", "type"),
+ "only RollingUpdate is supported",
+ ),
+ )
+ }
+
+ if rolloutStrategy.RollingUpdate.MaxSurge != nil {
+ ios1 := intstr.FromInt32(1)
+ ios0 := intstr.FromInt32(0)
+ if rolloutStrategy.RollingUpdate.MaxSurge.IntValue() == ios0.IntValue() && (replicas != nil && *replicas < int32(3)) {
+ allErrs = append(
+ allErrs,
+ field.Required(
+ pathPrefix.Child("rollout", "strategy", "rollingUpdate"),
+ "when KubeadmControlPlane is configured to scale-in, replica count needs to be at least 3",
+ ),
+ )
+ }
+ if rolloutStrategy.RollingUpdate.MaxSurge.IntValue() != ios1.IntValue() && rolloutStrategy.RollingUpdate.MaxSurge.IntValue() != ios0.IntValue() {
+ allErrs = append(
+ allErrs,
+ field.Required(
+ pathPrefix.Child("rollout", "strategy", "rollingUpdate", "maxSurge"),
+ "value must be 1 or 0",
+ ),
+ )
+ }
+ }
+
+ if clusterConfiguration.CertificateValidityPeriodDays != 0 {
+ if clusterConfiguration.CACertificateValidityPeriodDays != 0 {
+ if clusterConfiguration.CertificateValidityPeriodDays > clusterConfiguration.CACertificateValidityPeriodDays {
+ allErrs = append(allErrs,
+ field.Invalid(
+ pathPrefix.Child("kubeadmConfigSpec", "clusterConfiguration", "certificateValidityPeriodDays"),
+ clusterConfiguration.CertificateValidityPeriodDays,
+ fmt.Sprintf("must be less than or equal to caCertificateValidityPeriodDays (%d)", clusterConfiguration.CACertificateValidityPeriodDays),
+ ),
+ )
+ }
+ } else if clusterConfiguration.CertificateValidityPeriodDays > secret.DefaultCACertificatesExpiryDays {
+ allErrs = append(allErrs,
+ field.Invalid(
+ pathPrefix.Child("kubeadmConfigSpec", "clusterConfiguration", "certificateValidityPeriodDays"),
+ clusterConfiguration.CertificateValidityPeriodDays,
+ fmt.Sprintf("must be less than or equal to the default value of caCertificateValidityPeriodDays (%d)", secret.DefaultCACertificatesExpiryDays),
+ ),
+ )
+ }
+
+ if rolloutSpec.Before.CertificatesExpiryDays != 0 {
+ if rolloutSpec.Before.CertificatesExpiryDays >= clusterConfiguration.CertificateValidityPeriodDays {
+ allErrs = append(allErrs,
+ field.Invalid(
+ pathPrefix.Child("rollout", "before", "certificatesExpiryDays"),
+ rolloutSpec.Before.CertificatesExpiryDays,
+ fmt.Sprintf("must be less than certificateValidityPeriodDays (%d)", clusterConfiguration.CertificateValidityPeriodDays)))
+ }
+ }
+ }
+
+ return allErrs
+}
+
+func validateNaming(machineNaming controlplanev1.MachineNamingSpec, pathPrefix *field.Path) field.ErrorList {
+ var allErrs field.ErrorList
+
+ if machineNaming.Template != "" {
+ if !strings.Contains(machineNaming.Template, "{{ .random }}") {
+ allErrs = append(allErrs,
+ field.Invalid(
+ pathPrefix.Child("template"),
+ machineNaming.Template,
+ "invalid template, {{ .random }} is missing",
+ ))
+ }
+ name, err := topologynames.KCPMachineNameGenerator(machineNaming.Template, "cluster", "kubeadmcontrolplane").GenerateName()
+ if err != nil {
+ allErrs = append(allErrs,
+ field.Invalid(
+ pathPrefix.Child("template"),
+ machineNaming.Template,
+ fmt.Sprintf("invalid template: %v", err),
+ ))
+ } else {
+ for _, err := range validation.IsDNS1123Subdomain(name) {
+ allErrs = append(allErrs,
+ field.Invalid(
+ pathPrefix.Child("template"),
+ machineNaming.Template,
+ fmt.Sprintf("invalid template, generated names would not be valid Kubernetes object names: %v", err),
+ ))
+ }
+ }
+ }
+
+ return allErrs
+}
+
+func validateClusterConfiguration(oldClusterConfiguration, newClusterConfiguration *bootstrapv1.ClusterConfiguration, pathPrefix *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if newClusterConfiguration == nil {
+ return allErrs
+ }
+
+ // TODO: Remove when kubeadm types include OpenAPI validation
+ if !container.ImageTagIsValid(newClusterConfiguration.DNS.ImageTag) {
+ allErrs = append(
+ allErrs,
+ field.Forbidden(
+ pathPrefix.Child("dns", "imageTag"),
+ fmt.Sprintf("tag %s is invalid", newClusterConfiguration.DNS.ImageTag),
+ ),
+ )
+ }
+
+ if newClusterConfiguration.DNS.ImageTag != "" {
+ if _, err := version.ParseTolerantImageTag(newClusterConfiguration.DNS.ImageTag); err != nil {
+ allErrs = append(allErrs,
+ field.Invalid(
+ field.NewPath("dns", "imageTag"),
+ newClusterConfiguration.DNS.ImageTag,
+ fmt.Sprintf("failed to parse CoreDNS version: %v", err),
+ ),
+ )
+ }
+ }
+
+ // TODO: Remove when kubeadm types include OpenAPI validation
+ if newClusterConfiguration.Etcd.Local.IsDefined() && !container.ImageTagIsValid(newClusterConfiguration.Etcd.Local.ImageTag) {
+ allErrs = append(
+ allErrs,
+ field.Forbidden(
+ pathPrefix.Child("etcd", "local", "imageTag"),
+ fmt.Sprintf("tag %s is invalid", newClusterConfiguration.Etcd.Local.ImageTag),
+ ),
+ )
+ }
+
+ if newClusterConfiguration.Etcd.Local.IsDefined() && newClusterConfiguration.Etcd.External.IsDefined() {
+ allErrs = append(
+ allErrs,
+ field.Forbidden(
+ pathPrefix.Child("etcd", "local"),
+ "cannot have both external and local etcd",
+ ),
+ )
+ }
+
+ // update validations
+ if oldClusterConfiguration != nil {
+ if (newClusterConfiguration.Etcd.External.IsDefined() && !oldClusterConfiguration.Etcd.External.IsDefined()) ||
+ (!newClusterConfiguration.Etcd.External.IsDefined() && oldClusterConfiguration.Etcd.External.IsDefined()) {
+ allErrs = append(
+ allErrs,
+ field.Forbidden(
+ pathPrefix.Child("etcd", "external"),
+ "cannot change between external and local etcd",
+ ),
+ )
+ }
+ }
+
+ return allErrs
+}
+
+func allowed(allowList [][]string, path []string) bool {
+ for _, allowed := range allowList {
+ if pathsMatch(allowed, path) {
+ return true
+ }
+ }
+ return false
+}
+
+func pathsMatch(allowed, path []string) bool {
+ // if either are empty then no match can be made
+ if len(allowed) == 0 || len(path) == 0 {
+ return false
+ }
+ i := 0
+ for i = range path {
+ // reached the end of the allowed path and no match was found
+ if i > len(allowed)-1 {
+ return false
+ }
+ if allowed[i] == "*" {
+ return true
+ }
+ if path[i] != allowed[i] {
+ return false
+ }
+ }
+ // path has been completely iterated and has not matched the end of the path.
+ // e.g. allowed: []string{"a","b","c"}, path: []string{"a"}
+ return i >= len(allowed)-1
+}
+
+// paths builds a slice of paths that are being modified.
+func paths(path []string, diff map[string]interface{}) [][]string {
+ allPaths := [][]string{}
+ for key, m := range diff {
+ nested, ok := m.(map[string]interface{})
+ if !ok {
+ // We have to use a copy of path, because otherwise the slice we append to
+ // allPaths would be overwritten in another iteration.
+ tmp := make([]string, len(path))
+ copy(tmp, path)
+ allPaths = append(allPaths, append(tmp, key))
+ continue
+ }
+ allPaths = append(allPaths, paths(append(path, key), nested)...)
+ }
+ return allPaths
+}
+
+func (webhook *KubeadmControlPlane) validateCoreDNSVersion(oldK, newK *controlplanev1.KubeadmControlPlane) (allErrs field.ErrorList) {
+ // return if either current or target versions is empty
+ if newK.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS.ImageTag == "" || oldK.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS.ImageTag == "" {
+ return allErrs
+ }
+ targetDNS := &newK.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS
+
+ fromVersion, err := version.ParseTolerantImageTag(oldK.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS.ImageTag)
+ if err != nil {
+ allErrs = append(allErrs,
+ field.Invalid(
+ field.NewPath("spec", "kubeadmConfigSpec", "clusterConfiguration", "dns", "imageTag"),
+ oldK.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS.ImageTag,
+ fmt.Sprintf("failed to parse current CoreDNS version: %v", err),
+ ),
+ )
+ return allErrs
+ }
+
+ toVersion, err := version.ParseTolerantImageTag(targetDNS.ImageTag)
+ if err != nil {
+ allErrs = append(allErrs,
+ field.Invalid(
+ field.NewPath("spec", "kubeadmConfigSpec", "clusterConfiguration", "dns", "imageTag"),
+ targetDNS.ImageTag,
+ fmt.Sprintf("failed to parse target CoreDNS version: %v", err),
+ ),
+ )
+ return allErrs
+ }
+ // If the versions are equal return here without error.
+ // This allows an upgrade where the version of CoreDNS in use is not supported by the migration tool.
+ if version.Compare(toVersion, fromVersion, version.WithoutPreReleases()) == 0 {
+ return allErrs
+ }
+
+ // Skip validating if the skip CoreDNS annotation is set. If set, KCP doesn't use the migration library.
+ if _, ok := newK.Annotations[controlplanev1.SkipCoreDNSAnnotation]; ok {
+ return allErrs
+ }
+
+ if err := migration.ValidUpMigration(version.MajorMinorPatch(fromVersion).String(), version.MajorMinorPatch(toVersion).String()); err != nil {
+ allErrs = append(
+ allErrs,
+ field.Forbidden(
+ field.NewPath("spec", "kubeadmConfigSpec", "clusterConfiguration", "dns", "imageTag"),
+ fmt.Sprintf("cannot migrate CoreDNS up to '%v' from '%v': %v", toVersion, fromVersion, err),
+ ),
+ )
+ }
+
+ return allErrs
+}
+
+func (webhook *KubeadmControlPlane) validateVersion(oldK, newK *controlplanev1.KubeadmControlPlane) (allErrs field.ErrorList) {
+ previousVersion := oldK.Spec.Version
+ fromVersion, err := semver.ParseTolerant(previousVersion)
+ if err != nil {
+ allErrs = append(allErrs,
+ field.InternalError(
+ field.NewPath("spec", "version"),
+ errors.Wrapf(err, "failed to parse current kubeadmcontrolplane version: %s", previousVersion),
+ ),
+ )
+ return allErrs
+ }
+
+ toVersion, err := semver.ParseTolerant(newK.Spec.Version)
+ if err != nil {
+ allErrs = append(allErrs,
+ field.InternalError(
+ field.NewPath("spec", "version"),
+ errors.Wrapf(err, "failed to parse updated kubeadmcontrolplane version: %s", newK.Spec.Version),
+ ),
+ )
+ return allErrs
+ }
+
+ // Validate that the update is upgrading at most one minor version.
+ // Note: Skipping a minor version is not allowed.
+ // Note: Checking against this ceilVersion allows upgrading to the next minor
+ // version irrespective of the patch version.
+ ceilVersion := semver.Version{
+ Major: fromVersion.Major,
+ Minor: fromVersion.Minor + 2,
+ Patch: 0,
+ }
+ if version.Compare(toVersion, ceilVersion, version.WithoutPreReleases()) >= 0 {
+ allErrs = append(allErrs,
+ field.Forbidden(
+ field.NewPath("spec", "version"),
+ fmt.Sprintf("cannot update Kubernetes version from %s to %s", previousVersion, newK.Spec.Version),
+ ),
+ )
+ }
+
+ return allErrs
+}
+
+// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
+func (webhook *KubeadmControlPlane) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
+ return nil, nil
+}
diff --git a/controlplane/kubeadm/internal/webhooks/kubeadmcontrolplane_test.go b/controlplane/kubeadm/internal/webhooks/kubeadmcontrolplane_test.go
new file mode 100644
index 000000000000..27bec1e462e8
--- /dev/null
+++ b/controlplane/kubeadm/internal/webhooks/kubeadmcontrolplane_test.go
@@ -0,0 +1,1476 @@
+/*
+Copyright 2021 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 (
+ "strings"
+ "testing"
+ "time"
+
+ . "github.com/onsi/gomega"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ utilfeature "k8s.io/component-base/featuregate/testing"
+ "k8s.io/utils/ptr"
+ ctrl "sigs.k8s.io/controller-runtime"
+
+ bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
+ controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ "sigs.k8s.io/cluster-api/feature"
+ "sigs.k8s.io/cluster-api/internal/webhooks/util"
+)
+
+var (
+ ctx = ctrl.SetupSignalHandler()
+)
+
+func TestKubeadmControlPlaneDefault(t *testing.T) {
+ g := NewWithT(t)
+
+ kcp := &controlplanev1.KubeadmControlPlane{
+ ObjectMeta: metav1.ObjectMeta{
+ Namespace: "foo",
+ },
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ Version: "v1.18.3",
+ MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
+ Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
+ InfrastructureRef: clusterv1.ContractVersionedObjectReference{
+ APIGroup: "test",
+ Kind: "UnknownInfraMachine",
+ Name: "foo",
+ },
+ },
+ },
+ },
+ }
+ updateDefaultingValidationKCP := kcp.DeepCopy()
+ updateDefaultingValidationKCP.Spec.Version = "v1.18.3"
+ updateDefaultingValidationKCP.Spec.MachineTemplate.Spec.InfrastructureRef = clusterv1.ContractVersionedObjectReference{
+ APIGroup: "test",
+ Kind: "UnknownInfraMachine",
+ Name: "foo",
+ }
+ webhook := &KubeadmControlPlane{}
+ t.Run("for KubeadmControlPlane", util.CustomDefaultValidateTest(ctx, updateDefaultingValidationKCP, webhook))
+ g.Expect(webhook.Default(ctx, kcp)).To(Succeed())
+
+ g.Expect(kcp.Spec.Version).To(Equal("v1.18.3"))
+ g.Expect(kcp.Spec.Rollout.Strategy.Type).To(Equal(controlplanev1.RollingUpdateStrategyType))
+ g.Expect(kcp.Spec.Rollout.Strategy.RollingUpdate.MaxSurge.IntVal).To(Equal(int32(1)))
+}
+
+func TestKubeadmControlPlaneValidateCreate(t *testing.T) {
+ valid := &controlplanev1.KubeadmControlPlane{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "test",
+ Namespace: "foo",
+ },
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
+ Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
+ InfrastructureRef: clusterv1.ContractVersionedObjectReference{
+ APIGroup: "test",
+ Kind: "UnknownInfraMachine",
+ Name: "infraTemplate",
+ },
+ },
+ },
+ KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{},
+ },
+ Replicas: ptr.To[int32](1),
+ Version: "v1.19.0",
+ Rollout: controlplanev1.KubeadmControlPlaneRolloutSpec{
+ Strategy: controlplanev1.KubeadmControlPlaneRolloutStrategy{
+ Type: controlplanev1.RollingUpdateStrategyType,
+ RollingUpdate: controlplanev1.KubeadmControlPlaneRolloutStrategyRollingUpdate{
+ MaxSurge: &intstr.IntOrString{
+ IntVal: 1,
+ },
+ },
+ },
+ },
+ },
+ }
+
+ invalidMaxSurge := valid.DeepCopy()
+ invalidMaxSurge.Spec.Rollout.Strategy.RollingUpdate.MaxSurge.IntVal = int32(3)
+
+ stringMaxSurge := valid.DeepCopy()
+ val := intstr.FromString("1")
+ stringMaxSurge.Spec.Rollout.Strategy.RollingUpdate.MaxSurge = &val
+
+ missingReplicas := valid.DeepCopy()
+ missingReplicas.Spec.Replicas = nil
+
+ zeroReplicas := valid.DeepCopy()
+ zeroReplicas.Spec.Replicas = ptr.To[int32](0)
+
+ evenReplicas := valid.DeepCopy()
+ evenReplicas.Spec.Replicas = ptr.To[int32](2)
+
+ evenReplicasExternalEtcd := evenReplicas.DeepCopy()
+ evenReplicasExternalEtcd.Spec.KubeadmConfigSpec = bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ Etcd: bootstrapv1.Etcd{
+ External: bootstrapv1.ExternalEtcd{
+ Endpoints: []string{"1.2.3.4"},
+ },
+ },
+ },
+ }
+
+ validVersion := valid.DeepCopy()
+ validVersion.Spec.Version = "v1.16.6"
+
+ invalidVersion1 := valid.DeepCopy()
+ invalidVersion1.Spec.Version = "vv1.16.6"
+
+ invalidVersion2 := valid.DeepCopy()
+ invalidVersion2.Spec.Version = "1.16.6"
+
+ invalidCoreDNSVersion := valid.DeepCopy()
+ invalidCoreDNSVersion.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS.ImageTag = "1-7" // not a valid semantic version
+
+ invalidIgnitionConfiguration := valid.DeepCopy() // Format is not set to ignition.
+ invalidIgnitionConfiguration.Spec.KubeadmConfigSpec.Ignition = bootstrapv1.IgnitionSpec{
+ ContainerLinuxConfig: bootstrapv1.ContainerLinuxConfig{
+ AdditionalConfig: "config",
+ },
+ }
+
+ validIgnitionConfiguration := valid.DeepCopy()
+ validIgnitionConfiguration.Spec.KubeadmConfigSpec.Format = bootstrapv1.Ignition
+ validIgnitionConfiguration.Spec.KubeadmConfigSpec.Ignition = bootstrapv1.IgnitionSpec{}
+
+ invalidMetadata := valid.DeepCopy()
+ invalidMetadata.Spec.MachineTemplate.ObjectMeta.Labels = map[string]string{
+ "foo": "$invalid-key",
+ "bar": strings.Repeat("a", 64) + "too-long-value",
+ "/invalid-key": "foo",
+ }
+ invalidMetadata.Spec.MachineTemplate.ObjectMeta.Annotations = map[string]string{
+ "/invalid-key": "foo",
+ }
+
+ invalidControlPlaneComponentHealthCheckSeconds := valid.DeepCopy()
+ invalidControlPlaneComponentHealthCheckSeconds.Spec.KubeadmConfigSpec.InitConfiguration = bootstrapv1.InitConfiguration{Timeouts: bootstrapv1.Timeouts{ControlPlaneComponentHealthCheckSeconds: ptr.To[int32](10)}}
+
+ validControlPlaneComponentHealthCheckSeconds := valid.DeepCopy()
+ validControlPlaneComponentHealthCheckSeconds.Spec.KubeadmConfigSpec.InitConfiguration = bootstrapv1.InitConfiguration{Timeouts: bootstrapv1.Timeouts{ControlPlaneComponentHealthCheckSeconds: ptr.To[int32](10)}}
+ validControlPlaneComponentHealthCheckSeconds.Spec.KubeadmConfigSpec.JoinConfiguration = bootstrapv1.JoinConfiguration{Timeouts: bootstrapv1.Timeouts{ControlPlaneComponentHealthCheckSeconds: ptr.To[int32](10)}}
+
+ invalidCertificateValidityPeriodDaysGreaterCA := valid.DeepCopy()
+ invalidCertificateValidityPeriodDaysGreaterCA.Spec.KubeadmConfigSpec.ClusterConfiguration.CertificateValidityPeriodDays = 350
+ invalidCertificateValidityPeriodDaysGreaterCA.Spec.KubeadmConfigSpec.ClusterConfiguration.CACertificateValidityPeriodDays = 300
+
+ invalidCertificateValidityPeriodDaysGreaterDefault := valid.DeepCopy()
+ invalidCertificateValidityPeriodDaysGreaterDefault.Spec.KubeadmConfigSpec.ClusterConfiguration.CertificateValidityPeriodDays = 3651
+ invalidCertificateValidityPeriodDaysGreaterDefault.Spec.KubeadmConfigSpec.ClusterConfiguration.CACertificateValidityPeriodDays = 0 // default is 3650
+
+ invalidRolloutBeforeCertificatesExpiryDays := valid.DeepCopy()
+ invalidRolloutBeforeCertificatesExpiryDays.Spec.Rollout.Before.CertificatesExpiryDays = 8
+ invalidRolloutBeforeCertificatesExpiryDays.Spec.KubeadmConfigSpec.ClusterConfiguration.CertificateValidityPeriodDays = 7
+
+ tests := []struct {
+ name string
+ enableIgnitionFeature bool
+ expectErr bool
+ kcp *controlplanev1.KubeadmControlPlane
+ }{
+ {
+ name: "should succeed when given a valid config",
+ expectErr: false,
+ kcp: valid,
+ },
+ {
+ name: "should return error when replicas is nil",
+ expectErr: true,
+ kcp: missingReplicas,
+ },
+ {
+ name: "should return error when replicas is zero",
+ expectErr: true,
+ kcp: zeroReplicas,
+ },
+ {
+ name: "should return error when replicas is even",
+ expectErr: true,
+ kcp: evenReplicas,
+ },
+ {
+ name: "should allow even replicas when using external etcd",
+ expectErr: false,
+ kcp: evenReplicasExternalEtcd,
+ },
+ {
+ name: "should succeed when given a valid semantic version with prepended 'v'",
+ expectErr: false,
+ kcp: validVersion,
+ },
+ {
+ name: "should error when given a valid semantic version without 'v'",
+ expectErr: true,
+ kcp: invalidVersion2,
+ },
+ {
+ name: "should return error when given an invalid semantic version",
+ expectErr: true,
+ kcp: invalidVersion1,
+ },
+ {
+ name: "should return error when given an invalid semantic CoreDNS version",
+ expectErr: true,
+ kcp: invalidCoreDNSVersion,
+ },
+ {
+ name: "should return error when maxSurge is not 1",
+ expectErr: true,
+ kcp: invalidMaxSurge,
+ },
+ {
+ name: "should succeed when maxSurge is a string",
+ expectErr: false,
+ kcp: stringMaxSurge,
+ },
+ {
+ name: "should return error when Ignition configuration is invalid",
+ enableIgnitionFeature: true,
+ expectErr: true,
+ kcp: invalidIgnitionConfiguration,
+ },
+ {
+ name: "should succeed when Ignition configuration is valid",
+ enableIgnitionFeature: true,
+ expectErr: false,
+ kcp: validIgnitionConfiguration,
+ },
+ {
+ name: "should return error for invalid metadata",
+ enableIgnitionFeature: true,
+ expectErr: true,
+ kcp: invalidMetadata,
+ },
+ {
+ name: "should return error for invalid Timeouts.ControlPlaneComponentHealthCheckSeconds",
+ expectErr: true,
+ kcp: invalidControlPlaneComponentHealthCheckSeconds,
+ },
+ {
+ name: "should pass for valid Timeouts.ControlPlaneComponentHealthCheckSeconds",
+ kcp: validControlPlaneComponentHealthCheckSeconds,
+ },
+ {
+ name: "should return error when CertificateValidityPeriodDays greater than CACertificateValidityPeriodDays",
+ expectErr: true,
+ kcp: invalidCertificateValidityPeriodDaysGreaterCA,
+ },
+ {
+ name: "should return error when CertificateValidityPeriodDays greater than CACertificateValidityPeriodDays default",
+ expectErr: true,
+ kcp: invalidCertificateValidityPeriodDaysGreaterDefault,
+ },
+ {
+ name: "should return error when rolloutBefore CertificatesExpiryDays greater than cluster CertificateValidityPeriodDays",
+ expectErr: true,
+ kcp: invalidRolloutBeforeCertificatesExpiryDays,
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ if tt.enableIgnitionFeature {
+ // NOTE: KubeadmBootstrapFormatIgnition feature flag is disabled by default.
+ // Enabling the feature flag temporarily for this test.
+ utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.KubeadmBootstrapFormatIgnition, true)
+ }
+
+ g := NewWithT(t)
+
+ webhook := &KubeadmControlPlane{}
+
+ warnings, err := webhook.ValidateCreate(ctx, tt.kcp)
+ if tt.expectErr {
+ g.Expect(err).To(HaveOccurred())
+ } else {
+ g.Expect(err).ToNot(HaveOccurred())
+ }
+ g.Expect(warnings).To(BeEmpty())
+ })
+ }
+}
+
+func TestKubeadmControlPlaneValidateUpdate(t *testing.T) {
+ before := &controlplanev1.KubeadmControlPlane{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "test",
+ Namespace: "foo",
+ },
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
+ Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
+ InfrastructureRef: clusterv1.ContractVersionedObjectReference{
+ APIGroup: "test",
+ Kind: "UnknownInfraMachine",
+ Name: "infraTemplate",
+ },
+ Deletion: controlplanev1.KubeadmControlPlaneMachineTemplateDeletionSpec{
+ NodeDrainTimeoutSeconds: ptr.To(int32(1)),
+ NodeVolumeDetachTimeoutSeconds: ptr.To(int32(1)),
+ NodeDeletionTimeoutSeconds: ptr.To(int32(1)),
+ },
+ },
+ },
+ Replicas: ptr.To[int32](1),
+ KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
+ InitConfiguration: bootstrapv1.InitConfiguration{
+ LocalAPIEndpoint: bootstrapv1.APIEndpoint{
+ AdvertiseAddress: "127.0.0.1",
+ BindPort: int32(443),
+ },
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "test",
+ },
+ Timeouts: bootstrapv1.Timeouts{
+ ControlPlaneComponentHealthCheckSeconds: ptr.To[int32](10),
+ KubeletHealthCheckSeconds: ptr.To[int32](40),
+ },
+ },
+ ClusterConfiguration: bootstrapv1.ClusterConfiguration{
+ DNS: bootstrapv1.DNS{
+ ImageRepository: "registry.k8s.io/coredns",
+ ImageTag: "1.6.5",
+ },
+ CertificateValidityPeriodDays: 100,
+ CACertificateValidityPeriodDays: 365,
+ EncryptionAlgorithm: bootstrapv1.EncryptionAlgorithmRSA2048,
+ },
+ JoinConfiguration: bootstrapv1.JoinConfiguration{
+ NodeRegistration: bootstrapv1.NodeRegistrationOptions{
+ Name: "test",
+ },
+ Timeouts: bootstrapv1.Timeouts{
+ ControlPlaneComponentHealthCheckSeconds: ptr.To[int32](10),
+ KubeletHealthCheckSeconds: ptr.To[int32](40),
+ },
+ },
+ PreKubeadmCommands: []string{
+ "test", "foo",
+ },
+ PostKubeadmCommands: []string{
+ "test", "foo",
+ },
+ Files: []bootstrapv1.File{
+ {
+ Path: "test",
+ },
+ },
+ Users: []bootstrapv1.User{
+ {
+ Name: "user",
+ SSHAuthorizedKeys: []string{
+ "ssh-rsa foo",
+ },
+ },
+ },
+ NTP: bootstrapv1.NTP{
+ Servers: []string{"test-server-1", "test-server-2"},
+ Enabled: ptr.To(true),
+ },
+ },
+ Version: "v1.16.6",
+ Rollout: controlplanev1.KubeadmControlPlaneRolloutSpec{
+ Before: controlplanev1.KubeadmControlPlaneRolloutBeforeSpec{
+ CertificatesExpiryDays: 7,
+ },
+ Strategy: controlplanev1.KubeadmControlPlaneRolloutStrategy{
+ Type: controlplanev1.RollingUpdateStrategyType,
+ RollingUpdate: controlplanev1.KubeadmControlPlaneRolloutStrategyRollingUpdate{
+ MaxSurge: &intstr.IntOrString{
+ IntVal: 1,
+ },
+ },
+ },
+ },
+ },
+ }
+
+ updateMaxSurgeVal := before.DeepCopy()
+ updateMaxSurgeVal.Spec.Rollout.Strategy.RollingUpdate.MaxSurge.IntVal = int32(0)
+ updateMaxSurgeVal.Spec.Replicas = ptr.To[int32](3)
+
+ wrongReplicaCountForScaleIn := before.DeepCopy()
+ wrongReplicaCountForScaleIn.Spec.Rollout.Strategy.RollingUpdate.MaxSurge.IntVal = int32(0)
+
+ validUpdateKubeadmConfigInit := before.DeepCopy()
+ validUpdateKubeadmConfigInit.Spec.KubeadmConfigSpec.InitConfiguration.NodeRegistration = bootstrapv1.NodeRegistrationOptions{}
+
+ invalidUpdateKubeadmConfigCluster := before.DeepCopy()
+ invalidUpdateKubeadmConfigCluster.Spec.KubeadmConfigSpec.ClusterConfiguration = bootstrapv1.ClusterConfiguration{
+ CertificatesDir: "some-other-value",
+ }
+
+ validUpdateKubeadmConfigJoin := before.DeepCopy()
+ validUpdateKubeadmConfigJoin.Spec.KubeadmConfigSpec.JoinConfiguration.NodeRegistration = bootstrapv1.NodeRegistrationOptions{}
+
+ beforeKubeadmConfigFormatSet := before.DeepCopy()
+ beforeKubeadmConfigFormatSet.Spec.KubeadmConfigSpec.Format = bootstrapv1.CloudConfig
+ invalidUpdateKubeadmConfigFormat := beforeKubeadmConfigFormatSet.DeepCopy()
+ invalidUpdateKubeadmConfigFormat.Spec.KubeadmConfigSpec.Format = bootstrapv1.Ignition
+
+ validUpdate := before.DeepCopy()
+ validUpdate.Labels = map[string]string{"blue": "green"}
+ validUpdate.Spec.KubeadmConfigSpec.BootCommands = []string{"ab", "abc"}
+ validUpdate.Spec.KubeadmConfigSpec.PreKubeadmCommands = []string{"ab", "abc"}
+ validUpdate.Spec.KubeadmConfigSpec.PostKubeadmCommands = []string{"ab", "abc"}
+ validUpdate.Spec.KubeadmConfigSpec.Files = []bootstrapv1.File{
+ {
+ Path: "ab",
+ },
+ {
+ Path: "abc",
+ },
+ }
+ validUpdate.Spec.Version = "v1.17.1"
+ validUpdate.Spec.KubeadmConfigSpec.Users = []bootstrapv1.User{
+ {
+ Name: "bar",
+ SSHAuthorizedKeys: []string{
+ "ssh-rsa bar",
+ "ssh-rsa foo",
+ },
+ },
+ }
+ validUpdate.Spec.MachineTemplate.ObjectMeta.Labels = map[string]string{
+ "label": "labelValue",
+ }
+ validUpdate.Spec.MachineTemplate.ObjectMeta.Annotations = map[string]string{
+ "annotation": "labelAnnotation",
+ }
+ validUpdate.Spec.MachineTemplate.Spec.InfrastructureRef.APIGroup = "test-changed"
+ validUpdate.Spec.MachineTemplate.Spec.InfrastructureRef.Name = "orange"
+ validUpdate.Spec.MachineTemplate.Spec.Deletion.NodeDrainTimeoutSeconds = ptr.To(int32(10))
+ validUpdate.Spec.MachineTemplate.Spec.Deletion.NodeVolumeDetachTimeoutSeconds = ptr.To(int32(10))
+ validUpdate.Spec.MachineTemplate.Spec.Deletion.NodeDeletionTimeoutSeconds = ptr.To(int32(10))
+ validUpdate.Spec.Replicas = ptr.To[int32](5)
+ now := metav1.NewTime(time.Now())
+ validUpdate.Spec.Rollout.After = now
+ validUpdate.Spec.Rollout.Before.CertificatesExpiryDays = 14
+ validUpdate.Spec.Remediation = controlplanev1.KubeadmControlPlaneRemediationSpec{
+ MaxRetry: ptr.To[int32](50),
+ MinHealthyPeriodSeconds: ptr.To(int32(10 * 60 * 60)),
+ RetryPeriodSeconds: ptr.To[int32](10 * 60),
+ }
+ validUpdate.Spec.KubeadmConfigSpec.Format = bootstrapv1.CloudConfig
+
+ scaleToZero := before.DeepCopy()
+ scaleToZero.Spec.Replicas = ptr.To[int32](0)
+
+ scaleToEven := before.DeepCopy()
+ scaleToEven.Spec.Replicas = ptr.To[int32](2)
+
+ missingReplicas := before.DeepCopy()
+ missingReplicas.Spec.Replicas = nil
+
+ etcdLocalImageTag := before.DeepCopy()
+ etcdLocalImageTag.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local = bootstrapv1.LocalEtcd{
+ ImageTag: "v9.1.1",
+ }
+ etcdLocalImageTagAndDataDir := etcdLocalImageTag.DeepCopy()
+ etcdLocalImageTagAndDataDir.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local.DataDir = "/foo"
+
+ etcdLocalImageBuildTag := before.DeepCopy()
+ etcdLocalImageBuildTag.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local = bootstrapv1.LocalEtcd{
+ ImageTag: "v9.1.1_validBuild1",
+ }
+
+ etcdLocalImageInvalidTag := before.DeepCopy()
+ etcdLocalImageInvalidTag.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local = bootstrapv1.LocalEtcd{
+ ImageTag: "v9.1.1+invalidBuild1",
+ }
+
+ unsetEtcdLocal := etcdLocalImageTag.DeepCopy()
+ unsetEtcdLocal.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local = bootstrapv1.LocalEtcd{}
+
+ controlPlaneEndpoint := before.DeepCopy()
+ controlPlaneEndpoint.Spec.KubeadmConfigSpec.ClusterConfiguration.ControlPlaneEndpoint = "some control plane endpoint"
+
+ apiServer := before.DeepCopy()
+ apiServer.Spec.KubeadmConfigSpec.ClusterConfiguration.APIServer = bootstrapv1.APIServer{
+ ExtraArgs: []bootstrapv1.Arg{
+ {
+ Name: "foo",
+ Value: ptr.To("bar"),
+ },
+ },
+ ExtraVolumes: []bootstrapv1.HostPathMount{{Name: "mount1"}},
+ CertSANs: []string{"foo", "bar"},
+ }
+
+ controllerManager := before.DeepCopy()
+ controllerManager.Spec.KubeadmConfigSpec.ClusterConfiguration.ControllerManager = bootstrapv1.ControllerManager{
+ ExtraArgs: []bootstrapv1.Arg{
+ {
+ Name: "controller manager field",
+ Value: ptr.To("controller manager value"),
+ },
+ },
+ ExtraVolumes: []bootstrapv1.HostPathMount{{Name: "mount", HostPath: "/foo", MountPath: "bar", ReadOnly: ptr.To(true), PathType: "File"}},
+ }
+
+ scheduler := before.DeepCopy()
+ scheduler.Spec.KubeadmConfigSpec.ClusterConfiguration.Scheduler = bootstrapv1.Scheduler{
+ ExtraArgs: []bootstrapv1.Arg{
+ {
+ Name: "scheduler field",
+ Value: ptr.To("scheduler value"),
+ },
+ },
+ ExtraVolumes: []bootstrapv1.HostPathMount{{Name: "mount", HostPath: "/foo", MountPath: "bar", ReadOnly: ptr.To(true), PathType: "File"}},
+ }
+
+ dns := before.DeepCopy()
+ dns.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS = bootstrapv1.DNS{
+ ImageRepository: "gcr.io/capi-test",
+ ImageTag: "v1.6.6_foobar.1",
+ }
+
+ dnsBuildTag := before.DeepCopy()
+ dnsBuildTag.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS = bootstrapv1.DNS{
+ ImageRepository: "gcr.io/capi-test",
+ ImageTag: "1.6.7",
+ }
+
+ dnsInvalidTag := before.DeepCopy()
+ dnsInvalidTag.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS = bootstrapv1.DNS{
+ ImageRepository: "gcr.io/capi-test",
+ ImageTag: "v0.20.0+invalidBuild1",
+ }
+
+ dnsInvalidCoreDNSToVersion := dns.DeepCopy()
+ dnsInvalidCoreDNSToVersion.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS = bootstrapv1.DNS{
+ ImageRepository: "gcr.io/capi-test",
+ ImageTag: "1.6.5",
+ }
+
+ validCoreDNSCustomToVersion := dns.DeepCopy()
+ validCoreDNSCustomToVersion.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS = bootstrapv1.DNS{
+ ImageRepository: "gcr.io/capi-test",
+ ImageTag: "v1.6.6_foobar.2",
+ }
+ validUnsupportedCoreDNSVersion := dns.DeepCopy()
+ validUnsupportedCoreDNSVersion.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS = bootstrapv1.DNS{
+ ImageRepository: "gcr.io/capi-test",
+ ImageTag: "v99.99.99",
+ }
+
+ validUnsupportedCoreDNSVersionWithSkipAnnotation := dns.DeepCopy()
+ validUnsupportedCoreDNSVersionWithSkipAnnotation.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS = bootstrapv1.DNS{
+ ImageRepository: "gcr.io/capi-test",
+ ImageTag: "v99.99.99",
+ }
+ validUnsupportedCoreDNSVersionWithSkipAnnotation.Annotations = map[string]string{
+ controlplanev1.SkipCoreDNSAnnotation: "",
+ }
+
+ unsetCoreDNSToVersion := dns.DeepCopy()
+ unsetCoreDNSToVersion.Spec.KubeadmConfigSpec.ClusterConfiguration.DNS = bootstrapv1.DNS{
+ ImageRepository: "",
+ ImageTag: "",
+ }
+
+ certificatesDir := before.DeepCopy()
+ certificatesDir.Spec.KubeadmConfigSpec.ClusterConfiguration.CertificatesDir = "a new certificates directory"
+
+ imageRepository := before.DeepCopy()
+ imageRepository.Spec.KubeadmConfigSpec.ClusterConfiguration.ImageRepository = "a new image repository"
+
+ featureGates := before.DeepCopy()
+ featureGates.Spec.KubeadmConfigSpec.ClusterConfiguration.FeatureGates = map[string]bool{"a feature gate": true}
+
+ externalEtcd := before.DeepCopy()
+ externalEtcd.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.External = bootstrapv1.ExternalEtcd{
+ KeyFile: "some key file",
+ }
+ externalEtcdChanged := before.DeepCopy()
+ externalEtcdChanged.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.External = bootstrapv1.ExternalEtcd{
+ KeyFile: "another key file",
+ }
+
+ localDataDir := before.DeepCopy()
+ localDataDir.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local = bootstrapv1.LocalEtcd{
+ DataDir: "some local data dir",
+ }
+
+ localPeerCertSANs := before.DeepCopy()
+ localPeerCertSANs.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local = bootstrapv1.LocalEtcd{
+ PeerCertSANs: []string{"a cert"},
+ }
+
+ localServerCertSANs := before.DeepCopy()
+ localServerCertSANs.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local = bootstrapv1.LocalEtcd{
+ ServerCertSANs: []string{"a cert"},
+ }
+
+ localExtraArgs := before.DeepCopy()
+ localExtraArgs.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local = bootstrapv1.LocalEtcd{
+ ExtraArgs: []bootstrapv1.Arg{
+ {
+ Name: "an arg",
+ Value: ptr.To("a value"),
+ },
+ },
+ }
+
+ beforeExternalEtcdCluster := before.DeepCopy()
+ beforeExternalEtcdCluster.Spec.KubeadmConfigSpec.ClusterConfiguration = bootstrapv1.ClusterConfiguration{
+ Etcd: bootstrapv1.Etcd{
+ External: bootstrapv1.ExternalEtcd{
+ Endpoints: []string{"127.0.0.1"},
+ },
+ },
+ }
+ scaleToEvenExternalEtcdCluster := beforeExternalEtcdCluster.DeepCopy()
+ scaleToEvenExternalEtcdCluster.Spec.Replicas = ptr.To[int32](2)
+
+ beforeInvalidEtcdCluster := before.DeepCopy()
+ beforeInvalidEtcdCluster.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd = bootstrapv1.Etcd{
+ Local: bootstrapv1.LocalEtcd{
+ ImageRepository: "image-repository",
+ ImageTag: "latest",
+ },
+ }
+
+ afterInvalidEtcdCluster := beforeInvalidEtcdCluster.DeepCopy()
+ afterInvalidEtcdCluster.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd = bootstrapv1.Etcd{
+ External: bootstrapv1.ExternalEtcd{
+ Endpoints: []string{"127.0.0.1"},
+ },
+ }
+
+ withoutClusterConfiguration := before.DeepCopy()
+ withoutClusterConfiguration.Spec.KubeadmConfigSpec.ClusterConfiguration = bootstrapv1.ClusterConfiguration{}
+
+ updateNTPServers := before.DeepCopy()
+ updateNTPServers.Spec.KubeadmConfigSpec.NTP.Servers = []string{"new-server"}
+
+ disableNTPServers := before.DeepCopy()
+ disableNTPServers.Spec.KubeadmConfigSpec.NTP.Enabled = ptr.To(false)
+
+ unsetRolloutBefore := before.DeepCopy()
+ unsetRolloutBefore.Spec.Rollout.Before = controlplanev1.KubeadmControlPlaneRolloutBeforeSpec{}
+
+ invalidIgnitionConfiguration := before.DeepCopy()
+ invalidIgnitionConfiguration.Spec.KubeadmConfigSpec.Ignition = bootstrapv1.IgnitionSpec{ // Format is not set
+ ContainerLinuxConfig: bootstrapv1.ContainerLinuxConfig{
+ AdditionalConfig: "config",
+ },
+ }
+
+ validIgnitionConfigurationBefore := before.DeepCopy()
+ validIgnitionConfigurationBefore.Spec.KubeadmConfigSpec.Format = bootstrapv1.Ignition
+ validIgnitionConfigurationBefore.Spec.KubeadmConfigSpec.Ignition = bootstrapv1.IgnitionSpec{
+ ContainerLinuxConfig: bootstrapv1.ContainerLinuxConfig{
+ AdditionalConfig: "config-before",
+ },
+ }
+
+ validIgnitionConfigurationAfter := validIgnitionConfigurationBefore.DeepCopy()
+ validIgnitionConfigurationAfter.Spec.KubeadmConfigSpec.Ignition.ContainerLinuxConfig.AdditionalConfig = "foo: bar"
+
+ updateInitConfigurationPatches := before.DeepCopy()
+ updateInitConfigurationPatches.Spec.KubeadmConfigSpec.InitConfiguration.Patches = bootstrapv1.Patches{
+ Directory: "/tmp/patches",
+ }
+
+ updateJoinConfigurationPatches := before.DeepCopy()
+ updateJoinConfigurationPatches.Spec.KubeadmConfigSpec.InitConfiguration.Patches = bootstrapv1.Patches{
+ Directory: "/tmp/patches",
+ }
+
+ updateInitConfigurationSkipPhases := before.DeepCopy()
+ updateInitConfigurationSkipPhases.Spec.KubeadmConfigSpec.InitConfiguration.SkipPhases = []string{"addon/kube-proxy"}
+
+ updateJoinConfigurationSkipPhases := before.DeepCopy()
+ updateJoinConfigurationSkipPhases.Spec.KubeadmConfigSpec.JoinConfiguration.SkipPhases = []string{"addon/kube-proxy"}
+
+ updateDiskSetup := before.DeepCopy()
+ updateDiskSetup.Spec.KubeadmConfigSpec.DiskSetup = bootstrapv1.DiskSetup{
+ Filesystems: []bootstrapv1.Filesystem{
+ {
+ Device: "/dev/sda",
+ Filesystem: "ext4",
+ },
+ },
+ }
+
+ switchFromCloudInitToIgnition := before.DeepCopy()
+ switchFromCloudInitToIgnition.Spec.KubeadmConfigSpec.Format = bootstrapv1.Ignition
+ switchFromCloudInitToIgnition.Spec.KubeadmConfigSpec.Mounts = []bootstrapv1.MountPoints{
+ {"/var/lib/testdir", "/var/lib/etcd/data"},
+ }
+
+ invalidMetadata := before.DeepCopy()
+ invalidMetadata.Spec.MachineTemplate.ObjectMeta.Labels = map[string]string{
+ "foo": "$invalid-key",
+ "bar": strings.Repeat("a", 64) + "too-long-value",
+ "/invalid-key": "foo",
+ }
+ invalidMetadata.Spec.MachineTemplate.ObjectMeta.Annotations = map[string]string{
+ "/invalid-key": "foo",
+ }
+
+ changeTimeouts := before.DeepCopy()
+ changeTimeouts.Spec.KubeadmConfigSpec.InitConfiguration.Timeouts.ControlPlaneComponentHealthCheckSeconds = ptr.To[int32](20) // before 10
+ changeTimeouts.Spec.KubeadmConfigSpec.InitConfiguration.Timeouts.KubeletHealthCheckSeconds = nil // before set
+ changeTimeouts.Spec.KubeadmConfigSpec.InitConfiguration.Timeouts.EtcdAPICallSeconds = ptr.To[int32](20) // before not set
+ changeTimeouts.Spec.KubeadmConfigSpec.JoinConfiguration.Timeouts.ControlPlaneComponentHealthCheckSeconds = ptr.To[int32](20) // before 10
+ changeTimeouts.Spec.KubeadmConfigSpec.JoinConfiguration.Timeouts.KubeletHealthCheckSeconds = nil // before set
+ changeTimeouts.Spec.KubeadmConfigSpec.JoinConfiguration.Timeouts.EtcdAPICallSeconds = ptr.To[int32](20) // before not set
+
+ unsetTimeouts := before.DeepCopy()
+ unsetTimeouts.Spec.KubeadmConfigSpec.InitConfiguration.Timeouts = bootstrapv1.Timeouts{}
+ unsetTimeouts.Spec.KubeadmConfigSpec.JoinConfiguration.Timeouts = bootstrapv1.Timeouts{}
+
+ validUpdateCertificateValidityPeriod := before.DeepCopy()
+ validUpdateCertificateValidityPeriod.Spec.KubeadmConfigSpec.ClusterConfiguration.CertificateValidityPeriodDays = 150
+
+ invalidUpdateCACertificateValidityPeriodDays := before.DeepCopy()
+ invalidUpdateCACertificateValidityPeriodDays.Spec.KubeadmConfigSpec.ClusterConfiguration = bootstrapv1.ClusterConfiguration{
+ CACertificateValidityPeriodDays: 730,
+ }
+
+ validEncryptionAlgorithm := before.DeepCopy()
+ validEncryptionAlgorithm.Spec.KubeadmConfigSpec.ClusterConfiguration.EncryptionAlgorithm = bootstrapv1.EncryptionAlgorithmRSA3072
+
+ tests := []struct {
+ name string
+ enableIgnitionFeature bool
+ expectErr bool
+ before *controlplanev1.KubeadmControlPlane
+ kcp *controlplanev1.KubeadmControlPlane
+ }{
+ {
+ name: "should succeed when given a valid config",
+ expectErr: false,
+ before: before,
+ kcp: validUpdate,
+ },
+ {
+ name: "should not return an error when trying to mutate the kubeadmconfigspec initconfiguration noderegistration",
+ expectErr: false,
+ before: before,
+ kcp: validUpdateKubeadmConfigInit,
+ },
+ {
+ name: "should return error when trying to mutate the kubeadmconfigspec clusterconfiguration",
+ expectErr: true,
+ before: before,
+ kcp: invalidUpdateKubeadmConfigCluster,
+ },
+ {
+ name: "should not return an error when trying to mutate the kubeadmconfigspec joinconfiguration noderegistration",
+ expectErr: false,
+ before: before,
+ kcp: validUpdateKubeadmConfigJoin,
+ },
+ {
+ name: "should return error when trying to mutate the kubeadmconfigspec format from cloud-config to ignition",
+ expectErr: true,
+ before: beforeKubeadmConfigFormatSet,
+ kcp: invalidUpdateKubeadmConfigFormat,
+ },
+ {
+ name: "should return error when trying to scale to zero",
+ expectErr: true,
+ before: before,
+ kcp: scaleToZero,
+ },
+ {
+ name: "should return error when trying to scale to an even number",
+ expectErr: true,
+ before: before,
+ kcp: scaleToEven,
+ },
+ {
+ name: "should return error when trying to scale to nil",
+ expectErr: true,
+ before: before,
+ kcp: missingReplicas,
+ },
+ {
+ name: "should succeed when trying to scale to an even number with external etcd defined in ClusterConfiguration",
+ expectErr: false,
+ before: beforeExternalEtcdCluster,
+ kcp: scaleToEvenExternalEtcdCluster,
+ },
+ {
+ name: "should succeed when making a change to the local etcd image tag",
+ expectErr: false,
+ before: before,
+ kcp: etcdLocalImageTag,
+ },
+ {
+ name: "should succeed when making a change to the local etcd image tag",
+ expectErr: false,
+ before: before,
+ kcp: etcdLocalImageBuildTag,
+ },
+ {
+ name: "should fail when using an invalid etcd image tag",
+ expectErr: true,
+ before: before,
+ kcp: etcdLocalImageInvalidTag,
+ },
+ {
+ name: "should fail when making a change to the cluster config's controlPlaneEndpoint",
+ expectErr: true,
+ before: before,
+ kcp: controlPlaneEndpoint,
+ },
+ {
+ name: "should allow changes to the cluster config's apiServer",
+ expectErr: false,
+ before: before,
+ kcp: apiServer,
+ },
+ {
+ name: "should allow changes to the cluster config's controllerManager",
+ expectErr: false,
+ before: before,
+ kcp: controllerManager,
+ },
+ {
+ name: "should allow changes to the cluster config's scheduler",
+ expectErr: false,
+ before: before,
+ kcp: scheduler,
+ },
+ {
+ name: "should succeed when making a change to the cluster config's dns",
+ expectErr: false,
+ before: before,
+ kcp: dns,
+ },
+ {
+ name: "should succeed when changing to a valid custom CoreDNS version",
+ expectErr: false,
+ before: dns,
+ kcp: validCoreDNSCustomToVersion,
+ },
+ {
+ name: "should succeed when CoreDNS ImageTag is unset",
+ expectErr: false,
+ before: dns,
+ kcp: unsetCoreDNSToVersion,
+ },
+ {
+ name: "should succeed when DNS is set to nil",
+ expectErr: false,
+ before: dns,
+ kcp: unsetCoreDNSToVersion,
+ },
+ {
+ name: "should succeed when using an valid DNS build",
+ expectErr: false,
+ before: before,
+ kcp: dnsBuildTag,
+ },
+ {
+ name: "should succeed when using the same CoreDNS version",
+ before: dns,
+ kcp: dns.DeepCopy(),
+ },
+ {
+ name: "should succeed when using the same CoreDNS version - not supported",
+ before: validUnsupportedCoreDNSVersion,
+ kcp: validUnsupportedCoreDNSVersion,
+ },
+ {
+ name: "should fail when upgrading to an unsupported version",
+ before: dns,
+ kcp: validUnsupportedCoreDNSVersion,
+ expectErr: true,
+ },
+ {
+ name: "should succeed when upgrading to an unsupported version and KCP has skip annotation set",
+ before: dns,
+ kcp: validUnsupportedCoreDNSVersionWithSkipAnnotation,
+ },
+ {
+ name: "should fail when using an invalid DNS build",
+ expectErr: true,
+ before: before,
+ kcp: dnsInvalidTag,
+ },
+ {
+ name: "should fail when using an invalid CoreDNS version",
+ expectErr: true,
+ before: dns,
+ kcp: dnsInvalidCoreDNSToVersion,
+ },
+
+ {
+ name: "should fail when making a change to the cluster config's certificatesDir",
+ expectErr: true,
+ before: before,
+ kcp: certificatesDir,
+ },
+ {
+ name: "should fail when making a change to the cluster config's imageRepository",
+ expectErr: false,
+ before: before,
+ kcp: imageRepository,
+ },
+ {
+ name: "should succeed when making a change to the cluster config's featureGates",
+ expectErr: false,
+ before: before,
+ kcp: featureGates,
+ },
+ {
+ name: "should succeed when making a change to the cluster config's local etcd's configuration localDataDir field",
+ expectErr: false,
+ before: before,
+ kcp: localDataDir,
+ },
+ {
+ name: "should succeed when making a change to the cluster config's local etcd's configuration localPeerCertSANs field",
+ expectErr: false,
+ before: before,
+ kcp: localPeerCertSANs,
+ },
+ {
+ name: "should succeed when making a change to the cluster config's local etcd's configuration localServerCertSANs field",
+ expectErr: false,
+ before: before,
+ kcp: localServerCertSANs,
+ },
+ {
+ name: "should succeed when making a change to the cluster config's local etcd's configuration localExtraArgs field",
+ expectErr: false,
+ before: before,
+ kcp: localExtraArgs,
+ },
+ {
+ name: "should succeed when making a change to the cluster config's external etcd's configuration",
+ expectErr: false,
+ before: externalEtcd,
+ kcp: externalEtcdChanged,
+ },
+ {
+ name: "should succeed when adding the cluster config's local etcd's configuration",
+ expectErr: false,
+ before: unsetEtcdLocal,
+ kcp: etcdLocalImageTag,
+ },
+ {
+ name: "should succeed when making a change to the cluster config's local etcd's configuration",
+ expectErr: false,
+ before: etcdLocalImageTag,
+ kcp: etcdLocalImageTagAndDataDir,
+ },
+ {
+ name: "should succeed when attempting to unset the etcd local object to fallback to the default",
+ expectErr: false,
+ before: etcdLocalImageTag,
+ kcp: unsetEtcdLocal,
+ },
+ {
+ name: "should fail if both local and external etcd are set",
+ expectErr: true,
+ before: beforeInvalidEtcdCluster,
+ kcp: afterInvalidEtcdCluster,
+ },
+ {
+ name: "should pass if ClusterConfiguration is nil",
+ expectErr: false,
+ before: withoutClusterConfiguration,
+ kcp: withoutClusterConfiguration,
+ },
+ {
+ name: "should not return an error when maxSurge value is updated to 0",
+ expectErr: false,
+ before: before,
+ kcp: updateMaxSurgeVal,
+ },
+ {
+ name: "should return an error when maxSurge value is updated to 0, but replica count is < 3",
+ expectErr: true,
+ before: before,
+ kcp: wrongReplicaCountForScaleIn,
+ },
+ {
+ name: "should pass if NTP servers are updated",
+ expectErr: false,
+ before: before,
+ kcp: updateNTPServers,
+ },
+ {
+ name: "should pass if NTP servers is disabled during update",
+ expectErr: false,
+ before: before,
+ kcp: disableNTPServers,
+ },
+ {
+ name: "should allow changes to initConfiguration.patches",
+ expectErr: false,
+ before: before,
+ kcp: updateInitConfigurationPatches,
+ },
+ {
+ name: "should allow changes to joinConfiguration.patches",
+ expectErr: false,
+ before: before,
+ kcp: updateJoinConfigurationPatches,
+ },
+ {
+ name: "should allow changes to initConfiguration.skipPhases",
+ expectErr: false,
+ before: before,
+ kcp: updateInitConfigurationSkipPhases,
+ },
+ {
+ name: "should allow changes to joinConfiguration.skipPhases",
+ expectErr: false,
+ before: before,
+ kcp: updateJoinConfigurationSkipPhases,
+ },
+ {
+ name: "should allow changes to diskSetup",
+ expectErr: false,
+ before: before,
+ kcp: updateDiskSetup,
+ },
+ {
+ name: "should allow unsetting rolloutBefore",
+ expectErr: false,
+ before: before,
+ kcp: unsetRolloutBefore,
+ },
+ {
+ name: "should return error when Ignition configuration is invalid",
+ enableIgnitionFeature: true,
+ expectErr: true,
+ before: invalidIgnitionConfiguration,
+ kcp: invalidIgnitionConfiguration,
+ },
+ {
+ name: "should succeed when Ignition configuration is modified",
+ enableIgnitionFeature: true,
+ expectErr: false,
+ before: validIgnitionConfigurationBefore,
+ kcp: validIgnitionConfigurationAfter,
+ },
+ {
+ name: "should succeed when CloudInit was used before",
+ enableIgnitionFeature: true,
+ expectErr: false,
+ before: before,
+ kcp: switchFromCloudInitToIgnition,
+ },
+ {
+ name: "should return error for invalid metadata",
+ enableIgnitionFeature: true,
+ expectErr: true,
+ before: before,
+ kcp: invalidMetadata,
+ },
+ {
+ name: "should succeed when changing timeouts",
+ expectErr: false,
+ before: before,
+ kcp: changeTimeouts,
+ },
+ {
+ name: "should succeed when unsetting timeouts",
+ expectErr: false,
+ before: before,
+ kcp: unsetTimeouts,
+ },
+ {
+ name: "should succeed when setting timeouts",
+ expectErr: false,
+ before: unsetTimeouts,
+ kcp: changeTimeouts,
+ },
+ {
+ name: "should succeed when making a change to the cluster config's certificateValidityPeriod",
+ expectErr: false,
+ before: before,
+ kcp: validUpdateCertificateValidityPeriod,
+ },
+ {
+ name: "should return error when trying to mutate the cluster config's caCertificateValidityPeriodDays",
+ expectErr: true,
+ before: before,
+ kcp: invalidUpdateCACertificateValidityPeriodDays,
+ },
+ {
+ name: "should allow to update encryptionAlgorithm",
+ before: before,
+ kcp: validEncryptionAlgorithm,
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ if tt.enableIgnitionFeature {
+ // NOTE: KubeadmBootstrapFormatIgnition feature flag is disabled by default.
+ // Enabling the feature flag temporarily for this test.
+ utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.KubeadmBootstrapFormatIgnition, true)
+ }
+
+ g := NewWithT(t)
+
+ webhook := &KubeadmControlPlane{}
+
+ warnings, err := webhook.ValidateUpdate(ctx, tt.before.DeepCopy(), tt.kcp)
+ if tt.expectErr {
+ g.Expect(err).To(HaveOccurred())
+ } else {
+ g.Expect(err).To(Succeed())
+ }
+ g.Expect(warnings).To(BeEmpty())
+ })
+ }
+}
+
+func TestValidateVersion(t *testing.T) {
+ tests := []struct {
+ name string
+ clusterConfiguration bootstrapv1.ClusterConfiguration
+ oldVersion string
+ newVersion string
+ expectErr bool
+ }{
+ // Basic validation of old and new version.
+ {
+ name: "error when old version is empty",
+ oldVersion: "",
+ newVersion: "v1.16.6",
+ expectErr: true,
+ },
+ {
+ name: "error when old version is invalid",
+ oldVersion: "invalid-version",
+ newVersion: "v1.18.1",
+ expectErr: true,
+ },
+ {
+ name: "error when new version is empty",
+ oldVersion: "v1.16.6",
+ newVersion: "",
+ expectErr: true,
+ },
+ {
+ name: "error when new version is invalid",
+ oldVersion: "v1.18.1",
+ newVersion: "invalid-version",
+ expectErr: true,
+ },
+ {
+ name: "pass when both versions are v1.19.0",
+ oldVersion: "v1.19.0",
+ newVersion: "v1.19.0",
+ expectErr: false,
+ },
+ // Validation for skip-level upgrades.
+ {
+ name: "error when upgrading two minor versions",
+ oldVersion: "v1.18.8",
+ newVersion: "v1.20.0-alpha.0.734_ba502ee555924a",
+ expectErr: true,
+ },
+ {
+ name: "pass when upgrading one minor version",
+ oldVersion: "v1.20.1",
+ newVersion: "v1.21.18",
+ expectErr: false,
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+
+ kcpNew := controlplanev1.KubeadmControlPlane{
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: tt.clusterConfiguration,
+ },
+ Version: tt.newVersion,
+ },
+ }
+
+ kcpOld := controlplanev1.KubeadmControlPlane{
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{
+ ClusterConfiguration: tt.clusterConfiguration,
+ },
+ Version: tt.oldVersion,
+ },
+ }
+
+ webhook := &KubeadmControlPlane{}
+
+ allErrs := webhook.validateVersion(&kcpOld, &kcpNew)
+ if tt.expectErr {
+ g.Expect(allErrs).ToNot(BeEmpty())
+ } else {
+ g.Expect(allErrs).To(BeEmpty())
+ }
+ })
+ }
+}
+func TestKubeadmControlPlaneValidateUpdateAfterDefaulting(t *testing.T) {
+ g := NewWithT(t)
+
+ before := &controlplanev1.KubeadmControlPlane{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "test",
+ Namespace: "foo",
+ },
+ Spec: controlplanev1.KubeadmControlPlaneSpec{
+ Version: "v1.19.0",
+ MachineTemplate: controlplanev1.KubeadmControlPlaneMachineTemplate{
+ Spec: controlplanev1.KubeadmControlPlaneMachineTemplateSpec{
+ InfrastructureRef: clusterv1.ContractVersionedObjectReference{
+ APIGroup: "test",
+ Kind: "UnknownInfraMachine",
+ Name: "infraTemplate",
+ },
+ },
+ },
+ },
+ }
+
+ afterDefault := before.DeepCopy()
+ webhook := &KubeadmControlPlane{}
+ g.Expect(webhook.Default(ctx, afterDefault)).To(Succeed())
+
+ tests := []struct {
+ name string
+ expectErr bool
+ before *controlplanev1.KubeadmControlPlane
+ kcp *controlplanev1.KubeadmControlPlane
+ }{
+ {
+ name: "update should succeed after defaulting",
+ expectErr: false,
+ before: before,
+ kcp: afterDefault,
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+
+ webhook := &KubeadmControlPlane{}
+
+ warnings, err := webhook.ValidateUpdate(ctx, tt.before.DeepCopy(), tt.kcp)
+ if tt.expectErr {
+ g.Expect(err).To(HaveOccurred())
+ } else {
+ g.Expect(err).To(Succeed())
+ g.Expect(tt.kcp.Spec.Version).To(Equal("v1.19.0"))
+ g.Expect(tt.kcp.Spec.Rollout.Strategy.Type).To(Equal(controlplanev1.RollingUpdateStrategyType))
+ g.Expect(tt.kcp.Spec.Rollout.Strategy.RollingUpdate.MaxSurge.IntVal).To(Equal(int32(1)))
+ g.Expect(tt.kcp.Spec.Replicas).To(Equal(ptr.To[int32](1)))
+ }
+ g.Expect(warnings).To(BeEmpty())
+ })
+ }
+}
+
+func TestPathsMatch(t *testing.T) {
+ tests := []struct {
+ name string
+ allowed, path []string
+ match bool
+ }{
+ {
+ name: "a simple match case",
+ allowed: []string{"a", "b", "c"},
+ path: []string{"a", "b", "c"},
+ match: true,
+ },
+ {
+ name: "a case can't match",
+ allowed: []string{"a", "b", "c"},
+ path: []string{"a"},
+ match: false,
+ },
+ {
+ name: "an empty path for whatever reason",
+ allowed: []string{"a"},
+ path: []string{""},
+ match: false,
+ },
+ {
+ name: "empty allowed matches nothing",
+ allowed: []string{},
+ path: []string{"a"},
+ match: false,
+ },
+ {
+ name: "wildcard match",
+ allowed: []string{"a", "b", "c", "d", "*"},
+ path: []string{"a", "b", "c", "d", "e", "f", "g"},
+ match: true,
+ },
+ {
+ name: "long path",
+ allowed: []string{"a"},
+ path: []string{"a", "b", "c", "d", "e", "f", "g"},
+ match: false,
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+ g.Expect(pathsMatch(tt.allowed, tt.path)).To(Equal(tt.match))
+ })
+ }
+}
+
+func TestAllowed(t *testing.T) {
+ tests := []struct {
+ name string
+ allowList [][]string
+ path []string
+ match bool
+ }{
+ {
+ name: "matches the first and none of the others",
+ allowList: [][]string{
+ {"a", "b", "c"},
+ {"b", "d", "x"},
+ },
+ path: []string{"a", "b", "c"},
+ match: true,
+ },
+ {
+ name: "matches none in the allow list",
+ allowList: [][]string{
+ {"a", "b", "c"},
+ {"b", "c", "d"},
+ {"e", "*"},
+ },
+ path: []string{"a"},
+ match: false,
+ },
+ {
+ name: "an empty path matches nothing",
+ allowList: [][]string{
+ {"a", "b", "c"},
+ {"*"},
+ {"b", "c"},
+ },
+ path: []string{},
+ match: false,
+ },
+ {
+ name: "empty allowList matches nothing",
+ allowList: [][]string{},
+ path: []string{"a"},
+ match: false,
+ },
+ {
+ name: "length test check",
+ allowList: [][]string{
+ {"a", "b", "c", "d", "e", "f"},
+ {"a", "b", "c", "d", "e", "f", "g", "h"},
+ },
+ path: []string{"a", "b", "c", "d", "e", "f", "g"},
+ match: false,
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+ g.Expect(allowed(tt.allowList, tt.path)).To(Equal(tt.match))
+ })
+ }
+}
+
+func TestPaths(t *testing.T) {
+ tests := []struct {
+ name string
+ path []string
+ diff map[string]interface{}
+ expected [][]string
+ }{
+ {
+ name: "basic check",
+ diff: map[string]interface{}{
+ "spec": map[string]interface{}{
+ "replicas": 4,
+ "version": "1.17.3",
+ "kubeadmConfigSpec": map[string]interface{}{
+ "clusterConfiguration": map[string]interface{}{
+ "version": "v2.0.1",
+ },
+ "initConfiguration": map[string]interface{}{
+ "bootstrapToken": []string{"abcd", "defg"},
+ },
+ "joinConfiguration": nil,
+ },
+ },
+ },
+ expected: [][]string{
+ {"spec", "replicas"},
+ {"spec", "version"},
+ {"spec", "kubeadmConfigSpec", "joinConfiguration"},
+ {"spec", "kubeadmConfigSpec", "clusterConfiguration", "version"},
+ {"spec", "kubeadmConfigSpec", "initConfiguration", "bootstrapToken"},
+ },
+ },
+ {
+ name: "empty input makes for empty output",
+ path: []string{"a"},
+ diff: map[string]interface{}{},
+ expected: [][]string{},
+ },
+ {
+ name: "long recursive check with two keys",
+ diff: map[string]interface{}{
+ "spec": map[string]interface{}{
+ "kubeadmConfigSpec": map[string]interface{}{
+ "clusterConfiguration": map[string]interface{}{
+ "version": "v2.0.1",
+ "abc": "d",
+ },
+ },
+ },
+ },
+ expected: [][]string{
+ {"spec", "kubeadmConfigSpec", "clusterConfiguration", "version"},
+ {"spec", "kubeadmConfigSpec", "clusterConfiguration", "abc"},
+ },
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+ g.Expect(paths(tt.path, tt.diff)).To(ConsistOf(tt.expected))
+ })
+ }
+}
diff --git a/controlplane/kubeadm/internal/workload_cluster.go b/controlplane/kubeadm/internal/workload_cluster.go
index 80d497b90c9c..d4f6401664b9 100644
--- a/controlplane/kubeadm/internal/workload_cluster.go
+++ b/controlplane/kubeadm/internal/workload_cluster.go
@@ -20,7 +20,6 @@ import (
"context"
"crypto"
"crypto/rand"
- "crypto/rsa"
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
@@ -45,13 +44,13 @@ import (
controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
kubeadmtypes "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types"
+ "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/desiredstate"
"sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd"
"sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/proxy"
"sigs.k8s.io/cluster-api/util"
"sigs.k8s.io/cluster-api/util/certs"
containerutil "sigs.k8s.io/cluster-api/util/container"
"sigs.k8s.io/cluster-api/util/patch"
- "sigs.k8s.io/cluster-api/util/version"
)
const (
@@ -63,13 +62,6 @@ const (
)
var (
- // minKubernetesVersionControlPlaneKubeletLocalMode is the min version from which
- // we will enable the ControlPlaneKubeletLocalMode kubeadm feature gate.
- // Note: We have to do this with Kubernetes 1.31. Because with that version we encountered
- // a case where it's not okay anymore to ignore the Kubernetes version skew (kubelet 1.31 uses
- // the spec.clusterIP field selector that is only implemented in kube-apiserver >= 1.31.0).
- minKubernetesVersionControlPlaneKubeletLocalMode = semver.MustParse("1.31.0")
-
// ErrControlPlaneMinNodes signals that a cluster doesn't meet the minimum required nodes
// to remove an etcd member.
ErrControlPlaneMinNodes = errors.New("cluster has fewer than 2 control plane nodes; removing an etcd member is not supported")
@@ -95,6 +87,7 @@ type WorkloadCluster interface {
UpdateControllerManagerInKubeadmConfigMap(controllerManager bootstrapv1.ControllerManager) func(*bootstrapv1.ClusterConfiguration)
UpdateSchedulerInKubeadmConfigMap(scheduler bootstrapv1.Scheduler) func(*bootstrapv1.ClusterConfiguration)
UpdateCertificateValidityPeriodDays(certificateValidityPeriodDays int32) func(*bootstrapv1.ClusterConfiguration)
+ UpdateEncryptionAlgorithm(encryptionAlgorithm bootstrapv1.EncryptionAlgorithmType) func(*bootstrapv1.ClusterConfiguration)
UpdateKubeProxyImageInfo(ctx context.Context, kcp *controlplanev1.KubeadmControlPlane) error
UpdateCoreDNS(ctx context.Context, kcp *controlplanev1.KubeadmControlPlane) error
RemoveEtcdMemberForMachine(ctx context.Context, machine *clusterv1.Machine) error
@@ -166,7 +159,7 @@ func (w *Workload) UpdateFeatureGatesInKubeadmConfigMap(kubeadmConfigSpec bootst
return func(c *bootstrapv1.ClusterConfiguration) {
// We use DeepCopy here to avoid modifying the KCP object in the apiserver.
kubeadmConfigSpec := kubeadmConfigSpec.DeepCopy()
- DefaultFeatureGates(kubeadmConfigSpec, kubernetesVersion)
+ desiredstate.DefaultFeatureGates(kubeadmConfigSpec, kubernetesVersion)
// Even if featureGates is nil, reset it to ClusterConfiguration
// to override any previously set feature gates.
@@ -174,27 +167,6 @@ func (w *Workload) UpdateFeatureGatesInKubeadmConfigMap(kubeadmConfigSpec bootst
}
}
-const (
- // ControlPlaneKubeletLocalMode is a feature gate of kubeadm that ensures
- // kubelets only communicate with the local apiserver.
- ControlPlaneKubeletLocalMode = "ControlPlaneKubeletLocalMode"
-)
-
-// DefaultFeatureGates defaults the feature gates field.
-func DefaultFeatureGates(kubeadmConfigSpec *bootstrapv1.KubeadmConfigSpec, kubernetesVersion semver.Version) {
- if version.Compare(kubernetesVersion, minKubernetesVersionControlPlaneKubeletLocalMode, version.WithoutPreReleases()) < 0 {
- return
- }
-
- if kubeadmConfigSpec.ClusterConfiguration.FeatureGates == nil {
- kubeadmConfigSpec.ClusterConfiguration.FeatureGates = map[string]bool{}
- }
-
- if _, ok := kubeadmConfigSpec.ClusterConfiguration.FeatureGates[ControlPlaneKubeletLocalMode]; !ok {
- kubeadmConfigSpec.ClusterConfiguration.FeatureGates[ControlPlaneKubeletLocalMode] = true
- }
-}
-
// UpdateAPIServerInKubeadmConfigMap updates api server configuration in kubeadm config map.
func (w *Workload) UpdateAPIServerInKubeadmConfigMap(apiServer bootstrapv1.APIServer) func(*bootstrapv1.ClusterConfiguration) {
return func(c *bootstrapv1.ClusterConfiguration) {
@@ -223,6 +195,13 @@ func (w *Workload) UpdateCertificateValidityPeriodDays(certificateValidityPeriod
}
}
+// UpdateEncryptionAlgorithm updates EncryptionAlgorithmType in kubeadm config map.
+func (w *Workload) UpdateEncryptionAlgorithm(encryptionAlgorithm bootstrapv1.EncryptionAlgorithmType) func(*bootstrapv1.ClusterConfiguration) {
+ return func(c *bootstrapv1.ClusterConfiguration) {
+ c.EncryptionAlgorithm = encryptionAlgorithm
+ }
+}
+
// UpdateClusterConfiguration gets the ClusterConfiguration kubeadm-config ConfigMap, converts it to the
// Cluster API representation, and then applies a mutation func; if changes are detected, the
// data are converted back into the Kubeadm API version in use for the target Kubernetes version and the
@@ -375,7 +354,7 @@ func calculateAPIServerPort(config *bootstrapv1.KubeadmConfig) int32 {
return 6443
}
-func generateClientCert(caCertEncoded, caKeyEncoded []byte, clientKey *rsa.PrivateKey) (tls.Certificate, error) {
+func generateClientCert(caCertEncoded, caKeyEncoded []byte, keyEncryptionAlgorithm bootstrapv1.EncryptionAlgorithmType) (tls.Certificate, error) {
caCert, err := certs.DecodeCertPEM(caCertEncoded)
if err != nil {
return tls.Certificate{}, err
@@ -384,14 +363,24 @@ func generateClientCert(caCertEncoded, caKeyEncoded []byte, clientKey *rsa.Priva
if err != nil {
return tls.Certificate{}, err
}
+
+ clientKey, err := certs.NewSigner(keyEncryptionAlgorithm)
+ if err != nil {
+ return tls.Certificate{}, err
+ }
x509Cert, err := newClientCert(caCert, clientKey, caKey)
if err != nil {
return tls.Certificate{}, err
}
- return tls.X509KeyPair(certs.EncodeCertPEM(x509Cert), certs.EncodePrivateKeyPEM(clientKey))
+ encodedClientKey, err := certs.EncodePrivateKeyPEMFromSigner(clientKey)
+ if err != nil {
+ return tls.Certificate{}, err
+ }
+
+ return tls.X509KeyPair(certs.EncodeCertPEM(x509Cert), encodedClientKey)
}
-func newClientCert(caCert *x509.Certificate, key *rsa.PrivateKey, caKey crypto.Signer) (*x509.Certificate, error) {
+func newClientCert(caCert *x509.Certificate, key crypto.Signer, caKey crypto.Signer) (*x509.Certificate, error) {
cfg := certs.Config{
CommonName: "cluster-api.x-k8s.io",
}
diff --git a/controlplane/kubeadm/internal/workload_cluster_coredns_test.go b/controlplane/kubeadm/internal/workload_cluster_coredns_test.go
index 0f0be800a820..57396f9e0f9e 100644
--- a/controlplane/kubeadm/internal/workload_cluster_coredns_test.go
+++ b/controlplane/kubeadm/internal/workload_cluster_coredns_test.go
@@ -64,10 +64,6 @@ func TestUpdateCoreDNS(t *testing.T) {
}
depl := &appsv1.Deployment{
- TypeMeta: metav1.TypeMeta{
- Kind: "Deployment",
- APIVersion: "apps/v1",
- },
ObjectMeta: metav1.ObjectMeta{
Name: coreDNSKey,
Namespace: metav1.NamespaceSystem,
@@ -1139,10 +1135,6 @@ func (m *fakeMigrator) Migrate(_, _, _ string, _ bool) (string, error) {
func newCoreDNSInfoDeploymentWithimage(image string) *appsv1.Deployment {
return &appsv1.Deployment{
- TypeMeta: metav1.TypeMeta{
- Kind: "Deployment",
- APIVersion: "apps/v1",
- },
ObjectMeta: metav1.ObjectMeta{
Name: coreDNSKey,
Namespace: metav1.NamespaceSystem,
diff --git a/controlplane/kubeadm/internal/workload_cluster_test.go b/controlplane/kubeadm/internal/workload_cluster_test.go
index 5390ac42faf6..4d4bfdae50f2 100644
--- a/controlplane/kubeadm/internal/workload_cluster_test.go
+++ b/controlplane/kubeadm/internal/workload_cluster_test.go
@@ -35,6 +35,7 @@ import (
bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2"
controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
+ "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/desiredstate"
utilyaml "sigs.k8s.io/cluster-api/util/yaml"
)
@@ -947,7 +948,7 @@ func TestUpdateFeatureGatesInKubeadmConfigMap(t *testing.T) {
},
wantClusterConfiguration: bootstrapv1.ClusterConfiguration{
FeatureGates: map[string]bool{
- ControlPlaneKubeletLocalMode: true,
+ desiredstate.ControlPlaneKubeletLocalMode: true,
},
},
},
@@ -964,8 +965,8 @@ func TestUpdateFeatureGatesInKubeadmConfigMap(t *testing.T) {
},
wantClusterConfiguration: bootstrapv1.ClusterConfiguration{
FeatureGates: map[string]bool{
- ControlPlaneKubeletLocalMode: true,
- "EtcdLearnerMode": true,
+ desiredstate.ControlPlaneKubeletLocalMode: true,
+ "EtcdLearnerMode": true,
},
},
},
@@ -977,14 +978,14 @@ func TestUpdateFeatureGatesInKubeadmConfigMap(t *testing.T) {
kubernetesVersion: semver.MustParse("1.31.0"),
newClusterConfiguration: bootstrapv1.ClusterConfiguration{
FeatureGates: map[string]bool{
- "EtcdLearnerMode": true,
- ControlPlaneKubeletLocalMode: false,
+ "EtcdLearnerMode": true,
+ desiredstate.ControlPlaneKubeletLocalMode: false,
},
},
wantClusterConfiguration: bootstrapv1.ClusterConfiguration{
FeatureGates: map[string]bool{
- ControlPlaneKubeletLocalMode: false,
- "EtcdLearnerMode": true,
+ desiredstate.ControlPlaneKubeletLocalMode: false,
+ "EtcdLearnerMode": true,
},
},
},
@@ -1085,126 +1086,6 @@ func TestUpdateCertificateValidityPeriodDaysInKubeadmConfigMap(t *testing.T) {
}
}
-func TestDefaultFeatureGates(t *testing.T) {
- tests := []struct {
- name string
- kubernetesVersion semver.Version
- kubeadmConfigSpec *bootstrapv1.KubeadmConfigSpec
- wantKubeadmConfigSpec *bootstrapv1.KubeadmConfigSpec
- }{
- {
- name: "don't default ControlPlaneKubeletLocalMode for 1.30",
- kubernetesVersion: semver.MustParse("1.30.99"),
- kubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- FeatureGates: map[string]bool{
- "EtcdLearnerMode": true,
- },
- },
- },
- wantKubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- FeatureGates: map[string]bool{
- "EtcdLearnerMode": true,
- },
- },
- },
- },
- {
- name: "default ControlPlaneKubeletLocalMode for 1.31",
- kubernetesVersion: semver.MustParse("1.31.0"),
- kubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{},
- },
- wantKubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- FeatureGates: map[string]bool{
- ControlPlaneKubeletLocalMode: true,
- },
- },
- },
- },
- {
- name: "default ControlPlaneKubeletLocalMode for 1.31",
- kubernetesVersion: semver.MustParse("1.31.0"),
- kubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- FeatureGates: nil,
- },
- },
- wantKubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- FeatureGates: map[string]bool{
- ControlPlaneKubeletLocalMode: true,
- },
- },
- },
- },
- {
- name: "default ControlPlaneKubeletLocalMode for 1.31",
- kubernetesVersion: semver.MustParse("1.31.0"),
- kubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- FeatureGates: map[string]bool{},
- },
- },
- wantKubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- FeatureGates: map[string]bool{
- ControlPlaneKubeletLocalMode: true,
- },
- },
- },
- },
- {
- name: "default ControlPlaneKubeletLocalMode for 1.31",
- kubernetesVersion: semver.MustParse("1.31.0"),
- kubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- FeatureGates: map[string]bool{
- "EtcdLearnerMode": true,
- },
- },
- },
- wantKubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- FeatureGates: map[string]bool{
- ControlPlaneKubeletLocalMode: true,
- "EtcdLearnerMode": true,
- },
- },
- },
- },
- {
- name: "don't default ControlPlaneKubeletLocalMode for 1.31 if already set to false",
- kubernetesVersion: semver.MustParse("1.31.0"),
- kubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- FeatureGates: map[string]bool{
- ControlPlaneKubeletLocalMode: false,
- },
- },
- },
- wantKubeadmConfigSpec: &bootstrapv1.KubeadmConfigSpec{
- ClusterConfiguration: bootstrapv1.ClusterConfiguration{
- FeatureGates: map[string]bool{
- ControlPlaneKubeletLocalMode: false,
- },
- },
- },
- },
- }
-
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- g := NewWithT(t)
-
- DefaultFeatureGates(tt.kubeadmConfigSpec, tt.kubernetesVersion)
- g.Expect(tt.wantKubeadmConfigSpec).Should(BeComparableTo(tt.kubeadmConfigSpec))
- })
- }
-}
-
func getProxyImageInfo(ctx context.Context, c client.Client) (string, error) {
ds := &appsv1.DaemonSet{}
diff --git a/controlplane/kubeadm/main.go b/controlplane/kubeadm/main.go
index 2d6c992f2667..ca7c82e6cb38 100644
--- a/controlplane/kubeadm/main.go
+++ b/controlplane/kubeadm/main.go
@@ -56,22 +56,30 @@ import (
controlplanev1beta1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta1"
controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1"
+ runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2"
+ "sigs.k8s.io/cluster-api/controllers"
"sigs.k8s.io/cluster-api/controllers/clustercache"
"sigs.k8s.io/cluster-api/controllers/crdmigrator"
"sigs.k8s.io/cluster-api/controllers/remote"
kubeadmcontrolplanecontrollers "sigs.k8s.io/cluster-api/controlplane/kubeadm/controllers"
"sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd"
kcpwebhooks "sigs.k8s.io/cluster-api/controlplane/kubeadm/webhooks"
+ runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog"
+ runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client"
"sigs.k8s.io/cluster-api/feature"
controlplanev1alpha3 "sigs.k8s.io/cluster-api/internal/api/controlplane/kubeadm/v1alpha3"
controlplanev1alpha4 "sigs.k8s.io/cluster-api/internal/api/controlplane/kubeadm/v1alpha4"
"sigs.k8s.io/cluster-api/internal/contract"
+ internalruntimeclient "sigs.k8s.io/cluster-api/internal/runtime/client"
+ runtimeregistry "sigs.k8s.io/cluster-api/internal/runtime/registry"
"sigs.k8s.io/cluster-api/util/apiwarnings"
"sigs.k8s.io/cluster-api/util/flags"
"sigs.k8s.io/cluster-api/version"
)
var (
+ catalog = runtimecatalog.New()
scheme = runtime.NewScheme()
setupLog = ctrl.Log.WithName("setup")
controllerName = "cluster-api-kubeadm-control-plane-manager"
@@ -94,6 +102,8 @@ var (
webhookCertDir string
webhookCertName string
webhookKeyName string
+ runtimeExtensionCertFile string
+ runtimeExtensionKeyFile string
healthAddr string
managerOptions = flags.ManagerOptions{}
logOptions = logs.NewOptions()
@@ -116,6 +126,10 @@ func init() {
_ = controlplanev1.AddToScheme(scheme)
_ = bootstrapv1.AddToScheme(scheme)
_ = apiextensionsv1.AddToScheme(scheme)
+ _ = runtimev1.AddToScheme(scheme)
+
+ // Register the RuntimeHook types into the catalog.
+ _ = runtimehooksv1.AddToCatalog(catalog)
}
// InitFlags initializes the flags.
@@ -186,6 +200,12 @@ func InitFlags(fs *pflag.FlagSet) {
fs.StringVar(&webhookKeyName, "webhook-key-name", "tls.key",
"Webhook key name.")
+ fs.StringVar(&runtimeExtensionCertFile, "runtime-extension-client-cert-file", "",
+ "Path of the PEM-encoded client certificate to be used when calling runtime extensions.")
+
+ fs.StringVar(&runtimeExtensionKeyFile, "runtime-extension-client-key-file", "",
+ "Path of the PEM-encoded client key to be used when calling runtime extensions.")
+
fs.StringVar(&healthAddr, "health-addr", ":9440",
"The address the health endpoint binds to.")
@@ -209,6 +229,9 @@ func InitFlags(fs *pflag.FlagSet) {
// ADD CRD RBAC for CRD Migrator.
// +kubebuilder:rbac:groups=apiextensions.k8s.io,resources=customresourcedefinitions,verbs=get;list;watch
// +kubebuilder:rbac:groups=apiextensions.k8s.io,resources=customresourcedefinitions;customresourcedefinitions/status,verbs=update;patch,resourceNames=kubeadmcontrolplanes.controlplane.cluster.x-k8s.io;kubeadmcontrolplanetemplates.controlplane.cluster.x-k8s.io
+// Add RBAC for ExtensionConfig controller and runtime client (intentionally does not include write permissions)
+// +kubebuilder:rbac:groups=runtime.cluster.x-k8s.io,resources=extensionconfigs,verbs=get;list;watch
+// +kubebuilder:rbac:groups="",resources=namespaces,verbs=get;list;watch
func main() {
InitFlags(pflag.CommandLine)
@@ -437,8 +460,33 @@ func setupReconcilers(ctx context.Context, mgr ctrl.Manager) {
setupLog.Error(err, "unable to create etcd logger")
os.Exit(1)
}
+
+ var runtimeClient runtimeclient.Client
+ if feature.Gates.Enabled(feature.InPlaceUpdates) {
+ // This is the creation of the runtimeClient for the controllers, embedding a shared catalog and registry instance.
+ runtimeClient = internalruntimeclient.New(internalruntimeclient.Options{
+ CertFile: runtimeExtensionCertFile,
+ KeyFile: runtimeExtensionKeyFile,
+ Catalog: catalog,
+ Registry: runtimeregistry.New(),
+ Client: mgr.GetClient(),
+ })
+
+ if err = (&controllers.ExtensionConfigReconciler{
+ Client: mgr.GetClient(),
+ APIReader: mgr.GetAPIReader(),
+ RuntimeClient: runtimeClient,
+ ReadOnly: true,
+ WatchFilterValue: watchFilterValue,
+ }).SetupWithManager(ctx, mgr, concurrency(10)); err != nil {
+ setupLog.Error(err, "Unable to create controller", "controller", "ExtensionConfig")
+ os.Exit(1)
+ }
+ }
+
if err := (&kubeadmcontrolplanecontrollers.KubeadmControlPlaneReconciler{
Client: mgr.GetClient(),
+ APIReader: mgr.GetAPIReader(),
SecretCachingClient: secretCachingClient,
ClusterCache: clusterCache,
WatchFilterValue: watchFilterValue,
@@ -446,7 +494,11 @@ func setupReconcilers(ctx context.Context, mgr ctrl.Manager) {
EtcdCallTimeout: etcdCallTimeout,
EtcdLogger: etcdLogger,
RemoteConditionsGracePeriod: remoteConditionsGracePeriod,
- }).SetupWithManager(ctx, mgr, concurrency(kubeadmControlPlaneConcurrency)); err != nil {
+ RuntimeClient: runtimeClient,
+ }).SetupWithManager(ctx, mgr, controller.Options{
+ MaxConcurrentReconciles: kubeadmControlPlaneConcurrency,
+ ReconciliationTimeout: 3 * time.Minute, // increase reconciliation timeout because the KubeadmControlPlaneReconciler tries to connect with all the etcd member, and times out if those operations might sum up.
+ }); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "KubeadmControlPlane")
os.Exit(1)
}
diff --git a/docs/book/src/SUMMARY.md b/docs/book/src/SUMMARY.md
index d2e7feb3f3a7..88d7b4a17f3e 100644
--- a/docs/book/src/SUMMARY.md
+++ b/docs/book/src/SUMMARY.md
@@ -37,8 +37,10 @@
- [Operating a managed Cluster](./tasks/experimental-features/cluster-class/operate-cluster.md)
- [Runtime SDK](tasks/experimental-features/runtime-sdk/index.md)
- [Implementing Runtime Extensions](./tasks/experimental-features/runtime-sdk/implement-extensions.md)
+ - [Implementing In-Place Update Hooks Extensions](./tasks/experimental-features/runtime-sdk/implement-in-place-update-hooks.md)
- [Implementing Lifecycle Hook Extensions](./tasks/experimental-features/runtime-sdk/implement-lifecycle-hooks.md)
- [Implementing Topology Mutation Hook Extensions](./tasks/experimental-features/runtime-sdk/implement-topology-mutation-hook.md)
+ - [Implementing Upgrade Plan Runtime Extensions](./tasks/experimental-features/runtime-sdk/implement-upgrade-plan-hooks.md)
- [Deploying Runtime Extensions](./tasks/experimental-features/runtime-sdk/deploy-runtime-extension.md)
- [Ignition Bootstrap configuration](./tasks/experimental-features/ignition.md)
- [Running multiple providers](./tasks/multiple-providers.md)
@@ -47,6 +49,7 @@
- [ClusterResourceSet](./tasks/cluster-resource-set.md)
- [Security Guidelines](./security/index.md)
- [Pod Security Standards](./security/pod-security-standards.md)
+ - [Security Guidelines for Cluster API Users](./security/security-guidelines.md)
- [clusterctl CLI](./clusterctl/overview.md)
- [clusterctl Commands](clusterctl/commands/commands.md)
- [init](clusterctl/commands/init.md)
@@ -94,6 +97,7 @@
- [Provider contracts](developer/providers/contracts/overview.md)
- [InfraCluster](./developer/providers/contracts/infra-cluster.md)
- [InfraMachine](developer/providers/contracts/infra-machine.md)
+ - [InfraMachinePool](developer/providers/contracts/infra-machinepool.md)
- [BootstrapConfig](developer/providers/contracts/bootstrap-config.md)
- [ControlPlane](developer/providers/contracts/control-plane.md)
- [clusterctl](developer/providers/contracts/clusterctl.md)
@@ -101,9 +105,9 @@
- [Best practices](./developer/providers/best-practices.md)
- [Security guidelines](./developer/providers/security-guidelines.md)
- [Version migration](developer/providers/migrations/overview.md)
- - [v1.8 to v1.9](./developer/providers/migrations/v1.8-to-v1.9.md)
- [v1.9 to v1.10](./developer/providers/migrations/v1.9-to-v1.10.md)
- [v1.10 to v1.11](./developer/providers/migrations/v1.10-to-v1.11.md)
+ - [v1.11 to v1.12](./developer/providers/migrations/v1.11-to-v1.12.md)
- [Troubleshooting](./user/troubleshooting.md)
- [Reference](./reference/reference.md)
- [API Reference](./reference/api/reference.md)
diff --git a/docs/book/src/developer/core/controllers/machine-pool.md b/docs/book/src/developer/core/controllers/machine-pool.md
index 0ce38cb05d20..93e7798a7745 100644
--- a/docs/book/src/developer/core/controllers/machine-pool.md
+++ b/docs/book/src/developer/core/controllers/machine-pool.md
@@ -2,6 +2,8 @@

+📖 **For conceptual information about MachinePools, when to use them, and how they compare to MachineDeployments**, see the [MachinePool Guide](../../../tasks/experimental-features/machine-pools.md).
+
The MachinePool controller's main responsibilities are:
* Setting an OwnerReference on each MachinePool object to:
diff --git a/docs/book/src/developer/core/logging.md b/docs/book/src/developer/core/logging.md
index 06e43eace1a7..66654115597c 100644
--- a/docs/book/src/developer/core/logging.md
+++ b/docs/book/src/developer/core/logging.md
@@ -19,6 +19,8 @@ In Cluster API we strive to follow three principles while implementing logging:
Kubernetes defines a set of [logging conventions](https://git.k8s.io/community/contributors/devel/sig-instrumentation/logging.md),
as well as tools and libraries for logging.
+Cluster API should align to those guidelines and use those tools as much as possible.
+
## Continuous improvement
The foundational items of Cluster API logging are:
@@ -100,6 +102,11 @@ key value pairs (in order of importance):
creates a MachineSet.
- Other Key value pairs.
+Notably, over time in CAPI we are also standardizing usage of other key value pairs to improve consistency when reading
+logs, e.g.
+- key `reason` MUST be used when adding details about WHY a change happened.
+- key `diff` MUST be used when documenting the diff in an object that either lead to a change, or that is resulting from a change.
+
## Log Messages
- A Message MUST always start with a capital letter.
@@ -108,7 +115,13 @@ key value pairs (in order of importance):
the action log and the corresponding error log; While logging before the action, log verbs should use the -ing form.
- Ideally log messages should surface a different level of detail according to the target log level (see [log levels](#log-levels)
for more details).
-- If Kubernetes resource name is used in log messages, it should be used as is, For example `Reconciling DockerMachineTemplate`
+- If Kubernetes resource name is used in log messages, it MUST be used as is, For example `Reconciling DockerMachineTemplate`
+- If an API field name is used in log messages, the entire path MUST be used and field names MUST capitalized like in the
+ API (not as in the golang type). For example `Waiting for spec.providerID to be set`
+- If a log message is about a controlled or a referenced object, e.g. Machine controller performing an action on MachineSet,
+ the message MUST contain the Kind of the controlled/referenced object and its name, for example `Created MachineSet foo-bar`
+ - If the controlled/referenced object is in another namespace, use namespace/name instead of name
+ - The controlled/referenced object MUST also be added as a key value pair (see guidelines above)
## Log Levels
@@ -136,19 +149,19 @@ thorny parts of code. Over time, based on feedback from SRE/developers, more log
## Developing and testing logs
-Our [Tilt](tilt.md) setup offers a batteries-included log suite based on [Promtail](https://grafana.com/docs/loki/latest/clients/promtail/), [Loki](https://grafana.com/docs/loki/latest/fundamentals/overview/) and [Grafana](https://grafana.com/docs/grafana/latest/explore/logs-integration/).
+Our [Tilt](tilt.md) setup offers a batteries-included log suite based on [alloy](https://grafana.com/docs/loki/latest/send-data/alloy/), [Loki](https://grafana.com/docs/loki/latest/fundamentals/overview/) and [Grafana](https://grafana.com/docs/grafana/latest/explore/logs-integration/).
We are working to continuously improving this experience, allowing Cluster API developers to use logs and improve them as part of their development process.
For the best experience exploring the logs using Tilt:
1. Set `--logging-format=json`.
2. Set a high log verbosity, e.g. `v=5`.
-3. Enable Promtail, Loki, and Grafana under `deploy_observability`.
+3. Enable alloy, Loki, and Grafana under `deploy_observability`.
A minimal example of a tilt-settings.yaml file that deploys a ready-to-use logging suite looks like:
```yaml
deploy_observability:
- - promtail
+ - alloy
- loki
- grafana
enable_providers:
@@ -209,7 +222,6 @@ Will return logs from the `capi-controller-manager`, associated with the Cluster
Will return the logs from four CAPI providers - the Core provider, Kubeadm Control Plane provider, Kubeadm Bootstrap provider and the Docker infrastructure provider. It filters by the cluster name and the machine name and then formats the log lines to show just the source controller and the message. This allows us to correlate logs and see actions taken by each of these four providers related to the machine `my-cluster-linux-worker-1`.
For more information on formatting and filtering logs using Grafana and Loki see:
-- [json parsing](https://grafana.com/docs/loki/latest/clients/promtail/stages/json/)
- [log queries](https://grafana.com/docs/loki/latest/logql/log_queries/)
## What about providers
diff --git a/docs/book/src/developer/core/testing.md b/docs/book/src/developer/core/testing.md
index b0dff071a918..82d5fe8d23c2 100644
--- a/docs/book/src/developer/core/testing.md
+++ b/docs/book/src/developer/core/testing.md
@@ -308,7 +308,7 @@ analyzing them via Grafana.
1. Start the development environment as described in [Developing Cluster API with Tilt](tilt.md).
* Make sure to deploy Loki and Grafana via `deploy_observability`.
- * If you only want to see imported logs, don't deploy promtail (via `deploy_observability`).
+ * If you only want to see imported logs, don't deploy alloy (via `deploy_observability`).
* If you want to drop all logs from Loki, just delete the Loki Pod in the `observability` namespace.
2. You can then import logs via the `Import Logs` button on the top right of the [Loki resource page](http://localhost:10350/r/loki/overview).
Just click on the downwards arrow, enter either a ProwJob URL, a GCS path or a local folder and click on `Import Logs`.
diff --git a/docs/book/src/developer/core/tilt.md b/docs/book/src/developer/core/tilt.md
index 85d33eb96907..8d456fd71069 100644
--- a/docs/book/src/developer/core/tilt.md
+++ b/docs/book/src/developer/core/tilt.md
@@ -297,7 +297,7 @@ Supported values are:
* `loki`: To receive and store logs.
* `metrics-server`: To enable `kubectl top node/pod`.
* `prometheus`*: For collecting metrics from Kubernetes.
-* `promtail`: For providing pod logs to `loki`.
+* `alloy`: For providing pod logs to `loki`.
* `parca`*: For visualizing profiling data.
* `tempo`: To store traces.
* `visualizer`*: Visualize Cluster API resources for each cluster, provide quick access to the specs and status of any resource.
diff --git a/docs/book/src/developer/core/tuning.md b/docs/book/src/developer/core/tuning.md
index 19fb5fd018ff..964fb32e4b7f 100644
--- a/docs/book/src/developer/core/tuning.md
+++ b/docs/book/src/developer/core/tuning.md
@@ -9,7 +9,7 @@ When tuning controllers, both for scalability, performance or for reducing their
Cluster API provides a full stack of tools for tuning its own controllers as well as controllers for all providers if developed using controller runtime. As a bonus, most of this tooling can be used with any other controller runtime based controllers.
-With tilt, you can easily deploy a full observability stack with Grafana, Loki, promtail, Prometheus, kube-state-metrics, Parca and Tempo.
+With tilt, you can easily deploy a full observability stack with Grafana, Loki, alloy, Prometheus, kube-state-metrics, Parca and Tempo.
All tools are preconfigured, and most notably kube-state-metrics already collects CAPI metrics and Grafana is configured with a set of dashboards that we used in previous rounds of CAPI tuning. Overall, the CAPI dev environment offers a considerable amount of expertise, free to use and to improve for the entire community. We highly recommend to invest time in looking into those tools, learn and provide feedback.
diff --git a/docs/book/src/developer/providers/contracts/bootstrap-config.md b/docs/book/src/developer/providers/contracts/bootstrap-config.md
index b3cf28a8bc5e..ec940276c358 100644
--- a/docs/book/src/developer/providers/contracts/bootstrap-config.md
+++ b/docs/book/src/developer/providers/contracts/bootstrap-config.md
@@ -1,6 +1,6 @@
# Contract rules for BootstrapConfig
-Bootstrap providers SHOULD implement a BootstrapConfig resource.
+Bootstrap providers SHOULD implement a BootstrapConfig resource using Kubernetes' CustomResourceDefinition (CRD).
The goal of a BootstrapConfig resource is to generates bootstrap data that is used to bootstrap a Kubernetes node.
These may be e.g. [cloud-init] scripts.
@@ -501,6 +501,6 @@ The following diagram shows the typical logic for a bootstrap provider:
[clusterctl provider contract]: clusterctl.md
[implementation best practices]: ../best-practices.md
[Server Side Apply]: https://kubernetes.io/docs/reference/using-api/server-side-apply/
-[the DockerMachineTemplate webhook]: https://github.com/kubernetes-sigs/cluster-api/blob/main/test/infrastructure/docker/internal/webhooks/dockermachinetemplate_webhook.go
+[the DockerMachineTemplate webhook]: https://github.com/kubernetes-sigs/cluster-api/blob/main/test/infrastructure/docker/internal/webhooks/dockermachinetemplate.go
[BootstrapConfig: pausing]: #bootstrapconfig-pausing
[Cluster API v1.11 migration notes]: ../migrations/v1.10-to-v1.11.md
diff --git a/docs/book/src/developer/providers/contracts/clusterctl.md b/docs/book/src/developer/providers/contracts/clusterctl.md
index e6f0a1dee08a..f2fd9de61b56 100644
--- a/docs/book/src/developer/providers/contracts/clusterctl.md
+++ b/docs/book/src/developer/providers/contracts/clusterctl.md
@@ -131,7 +131,7 @@ A provider url should be in the form
* The components YAML, the metadata YAML and eventually the workload cluster templates are included into the same package version
See the [GitLab docs](https://docs.gitlab.com/ee/user/packages/generic_packages/) for more information
-about how to create a generic package.
+about how to create a generic package.
If you are hosting a private Gitlab repository, you can use a [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) or [project access token](https://docs.gitlab.com/user/project/settings/project_access_tokens.html) to access the provider artifacts by adding the `gitlab-access-token` variable to the `clusterctl` configuration in order to authenticate against the GitLab API.
@@ -350,6 +350,7 @@ providers.
| CAPKK | cluster.x-k8s.io/provider=infrastructure-kubekey |
| CAPK | cluster.x-k8s.io/provider=infrastructure-kubevirt |
| CAPM3 | cluster.x-k8s.io/provider=infrastructure-metal3 |
+| CAPMS | cluster.x-k8s.io/provider=infrastructure-metal-stack |
| CAPN | cluster.x-k8s.io/provider=infrastructure-nested |
| CAPONE | cluster.x-k8s.io/provider=infrastructure-opennebula |
| CAPO | cluster.x-k8s.io/provider=infrastructure-openstack |
diff --git a/docs/book/src/developer/providers/contracts/control-plane.md b/docs/book/src/developer/providers/contracts/control-plane.md
index 14448608d25e..aab4a600e96b 100644
--- a/docs/book/src/developer/providers/contracts/control-plane.md
+++ b/docs/book/src/developer/providers/contracts/control-plane.md
@@ -1,6 +1,6 @@
# Contract rules for ControlPlane
-Control plane providers MUST implement a ControlPlane resource.
+Control plane providers MUST implement a ControlPlane resource using Kubernetes' CustomResourceDefinition (CRD).
The goal of a ControlPlane resource is to instantiate a Kubernetes control plane; a Kubernetes control plane
at least contains the following components:
@@ -68,6 +68,7 @@ repo or add an item to the agenda in the [Cluster API community meeting](https:/
| [ControlPlane: version] | No | Mandatory if control plane allows direct management of the Kubernetes version in use; Mandatory for cluster class support. |
| [ControlPlane: machines] | No | Mandatory if control plane instances are represented with a set of Cluster API Machines. |
| [ControlPlane: initialization completed] | Yes | |
+| [ControlPlane: in-place updates] | No | Only supported for control plane providers with control plane machines |
| [ControlPlane: conditions] | No | |
| [ControlPlane: terminal failures] | No | |
| [ControlPlaneTemplate, ControlPlaneTemplateList resource definition] | No | Mandatory for ClusterClasses support |
@@ -616,8 +617,34 @@ the ControlPlane resource will be ignored.
-### ControlPlane: conditions
+### ControlPlane: in-place updates
+
+In case a control plane provider would like to provide support for in-place updates, please check the [proposal](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/20240807-in-place-updates.md).
+
+Supporting in-place updates requires:
+- implementing the call for the registered `CanUpdateMachine` hook when performing the "can update in-place" decision.
+- when it is decided to perform the in-place decision:
+ - the machine spec must be updated to the desired state, as well as the spec for the corresponding infrastructure machine and bootstrap config
+ - while updating those objects also the `in-place-updates.internal.cluster.x-k8s.io/update-in-progress` annotation must be set
+ - once all objects are updated the `UpdateMachine` hook must be set as pending on the machine object
+
+After above steps are completed, the machine controller will take over and complete the in-place upgrade.
+
+
+
+High complexity
+Implementing the in-place update transition in a race condition-free, re-entrant way is more complex than it might seem.
+
+Please read the proposal's [implementation notes](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240807-in-place-updates-implementation-notes.md)
+carefully.
+
+Also, it is highly recommended to use the KCP implementation as a reference.
+
+
+
+
+### ControlPlane: conditions
According to [Kubernetes API Conventions], Conditions provide a standard mechanism for higher-level
status reporting from a controller.
@@ -873,7 +900,8 @@ is implemented in ControlPlane controllers:
[ControlPlane: machines]: #controlplane-machines
[In place propagation of changes affecting Kubernetes objects only]: https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20221003-In-place-propagation-of-Kubernetes-objects-only-changes.md
[ControlPlane: version]: #controlplane-version
-[ControlPlane: initialization completed]: #controlplane-initialization-completed
+[ControlPlane: initialization completed]: #controlplane-initialization-completed
+[ControlPlane: in-place updates]: #controlplane-in-place-updates
[ControlPlane: conditions]: #controlplane-conditions
[Kubernetes API Conventions]: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
[Improving status in CAPI resources]: https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md
diff --git a/docs/book/src/developer/providers/contracts/infra-cluster.md b/docs/book/src/developer/providers/contracts/infra-cluster.md
index f6d19fdb8b04..12cd9ae040d2 100644
--- a/docs/book/src/developer/providers/contracts/infra-cluster.md
+++ b/docs/book/src/developer/providers/contracts/infra-cluster.md
@@ -1,6 +1,6 @@
# Contract rules for InfraCluster
-Infrastructure providers SHOULD implement an InfraCluster resource.
+Infrastructure providers SHOULD implement an InfraCluster resource using Kubernetes' CustomResourceDefinition (CRD).
The goal of an InfraCluster resource is to supply whatever prerequisites (in term of infrastructure) are necessary for running machines.
Examples might include networking, load balancers, firewall rules, and so on.
diff --git a/docs/book/src/developer/providers/contracts/infra-machine.md b/docs/book/src/developer/providers/contracts/infra-machine.md
index 44a8d1b94c1c..21463c077059 100644
--- a/docs/book/src/developer/providers/contracts/infra-machine.md
+++ b/docs/book/src/developer/providers/contracts/infra-machine.md
@@ -1,6 +1,6 @@
# Contract rules for InfraMachine
-Infrastructure providers SHOULD implement an InfraMachine resource.
+Infrastructure providers SHOULD implement an InfraMachine resource using Kubernetes' CustomResourceDefinition (CRD).
The goal of an InfraMachine resource is to manage the lifecycle of a provider-specific machine instances.
These may be physical or virtual instances, and they represent the infrastructure for Kubernetes nodes.
@@ -641,7 +641,7 @@ is implemented in InfraMachine controllers:
[implementation best practices]: ../best-practices.md
[infrastructure Provider Security Guidance]: ../security-guidelines.md
[Server Side Apply]: https://kubernetes.io/docs/reference/using-api/server-side-apply/
-[the DockerMachineTemplate webhook]: https://github.com/kubernetes-sigs/cluster-api/blob/main/test/infrastructure/docker/internal/webhooks/dockermachinetemplate_webhook.go
+[the DockerMachineTemplate webhook]: https://github.com/kubernetes-sigs/cluster-api/blob/main/test/infrastructure/docker/internal/webhooks/dockermachinetemplate.go
[Cluster API v1.11 migration notes]: ../migrations/v1.10-to-v1.11.md
[Opt-in Autoscaling from Zero]: https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20210310-opt-in-autoscaling-from-zero.md
[InfraMachine: pausing]: #inframachine-pausing
diff --git a/docs/book/src/developer/providers/contracts/infra-machinepool.md b/docs/book/src/developer/providers/contracts/infra-machinepool.md
new file mode 100644
index 000000000000..d8adbea7e426
--- /dev/null
+++ b/docs/book/src/developer/providers/contracts/infra-machinepool.md
@@ -0,0 +1,534 @@
+# Contract rules for InfraMachinePool
+
+Infrastructure providers CAN OPTIONALLY implement an InfraMachinePool resource using Kubernetes' CustomResourceDefinition (CRD).
+
+The goal of an InfraMachinePool is to manage the lifecycle of a provider-specific pool of machines using a provider specific service (like Auto Scaling groups in AWS & Virtual Machine Scale Sets in Azure).
+
+The machines in the pool may be physical or virtual instances (although most likely virtual), and they represent the infrastructure for Kubernetes nodes.
+
+The InfraMachinePool resource will be referenced by one of the Cluster API core resources, MachinePool.
+
+The [core MachinePool's controller](../../core/controllers/machine-pool.md) is responsible to coordinate operations of the MachinePool with the InfraMachinePool. The operations are coordinated via the contract rules defined in this page.
+
+Once contract rules are satisfied by an InfraMachinePool implementation, other implementation details
+could be addressed according to the specific needs (Cluster API is not prescriptive).
+
+Nevertheless, it is always recommended to take a look at Cluster API controllers,
+in-tree providers, other providers and use them as a reference implementation (unless custom solutions are required
+in order to address very specific needs).
+
+
+
+Never rely on Cluster API behaviours not defined as a contract rule!
+
+When developing a provider, you MUST consider any Cluster API behaviour that is not defined by a contract rule
+as a Cluster API internal implementation detail, and internal implementation details can change at any time.
+
+Accordingly, in order to not expose users to the risk that your provider breaks when the Cluster API internal behavior
+changes, you MUST NOT rely on any Cluster API internal behaviour when implementing an InfraMachinePool resource.
+
+Instead, whenever you need something more from the Cluster API contract, you MUST engage the community.
+
+The Cluster API maintainers welcome feedback and contributions to the contract in order to improve how it's defined,
+its clarity and visibility to provider implementers and its suitability across the different kinds of Cluster API providers.
+
+To provide feedback or open a discussion about the provider contract please [open an issue on the Cluster API](https://github.com/kubernetes-sigs/cluster-api/issues/new?template=feature_request.yaml) repo or add an item to the agenda in the [Cluster API community meeting](https://git.k8s.io/community/sig-cluster-lifecycle/README.md#cluster-api).
+
+
+
+## Rules (contract version v1beta2)
+
+| Rule | Mandatory | Note |
+|----------------------------------------------------------------------|-----------|--------------------------------------|
+| [All resources: scope] | Yes | |
+| [All resources: `TypeMeta` and `ObjectMeta`field] | Yes | |
+| [All resources: `APIVersion` field value] | Yes | |
+| [InfraMachinePool, InfraMachinePoolList resource definition] | Yes | |
+| [InfraMachinePool: instances] | No | |
+| [MachinePoolMachines support] | No | |
+| [InfraMachinePool: providerID] | No | |
+| [InfraMachinePool: providerIDList] | Yes | |
+| [InfraMachinePool: initialization completed] | Yes | |
+| [InfraMachinePool: pausing] | No | |
+| [InfraMachinePool: conditions] | No | |
+| [InfraMachinePool: replicas] | Yes | |
+| [InfraMachinePool: terminal failures] | No | |
+| [InfraMachinePoolTemplate, InfraMachineTemplatePoolList resource definition] | No | Mandatory for ClusterClasses support |
+| [InfraMachinePoolTemplate: support for SSA dry run] | No | Mandatory for ClusterClasses support |
+| [Multi tenancy] | No | Mandatory for clusterctl CLI support |
+| [Clusterctl support] | No | Mandatory for clusterctl CLI support |
+
+Note:
+
+- `All resources` refers to all the provider's resources "core" Cluster API interacts with;
+ In the context of this page: `InfraMachinePool`, `InfraMachinePoolTemplate` and corresponding list types
+
+### All resources: scope
+
+All resources MUST be namespace-scoped.
+
+### All resources: `TypeMeta` and `ObjectMeta` field
+
+All resources MUST have the standard Kubernetes `TypeMeta` and `ObjectMeta` fields.
+
+### All resources: `APIVersion` field value
+
+In Kubernetes `APIVersion` is a combination of API group and version.
+Special consideration MUST apply to both API group and version for all the resources Cluster API interacts with.
+
+#### All resources: API group
+
+The domain for Cluster API resources is `cluster.x-k8s.io`, and infrastructure providers under the Kubernetes SIGS org
+generally use `infrastructure.cluster.x-k8s.io` as API group.
+
+If your provider uses a different API group, you MUST grant full read/write RBAC permissions for resources in your API group
+to the Cluster API core controllers. The canonical way to do so is via a `ClusterRole` resource with the [aggregation label]
+`cluster.x-k8s.io/aggregate-to-manager: "true"`.
+
+The following is an example ClusterRole for a `FooMachinePool` resource in the `infrastructure.foo.com` API group:
+
+```yaml
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name: capi-foo-clusters
+ labels:
+ cluster.x-k8s.io/aggregate-to-manager: "true"
+rules:
+- apiGroups:
+ - infrastructure.foo.com
+ resources:
+ - foomachinepools
+ - foomachinepooltemplates
+ verbs:
+ - create
+ - delete
+ - get
+ - list
+ - patch
+ - update
+ - watch
+```
+
+Note: The write permissions are required because Cluster API manages InfraMachinePools generated from InfraMachinePoolTemplates; when using ClusterClass and managed topologies, also InfraMachinePoolTemplates are managed directly by Cluster API.
+
+#### All resources: version
+
+The resource Version defines the stability of the API and its backward compatibility guarantees.
+Examples include `v1alpha1`, `v1beta1`, `v1`, etc. and are governed by the [Kubernetes API Deprecation Policy].
+
+Your provider SHOULD abide by the same policies.
+
+Note: The version of your provider does not need to be in sync with the version of core Cluster API resources.
+Instead, prefer choosing a version that matches the stability of the provider API and its backward compatibility guarantees.
+
+Additionally:
+
+Providers MUST set `cluster.x-k8s.io/` label on the InfraMachinePool Custom Resource Definitions.
+
+The label is a map from a Cluster API contract version to your Custom Resource Definition versions.
+The value is an underscore-delimited (_) list of versions. Each value MUST point to an available version in your CRD Spec.
+
+The label allows Cluster API controllers to perform automatic conversions for object references, the controllers will pick
+the last available version in the list if multiple versions are found.
+
+To apply the label to CRDs it’s possible to use labels in your `kustomization.yaml` file, usually in `config/crd`:
+
+```yaml
+labels:
+- pairs:
+ cluster.x-k8s.io/v1beta1: v1beta1
+ cluster.x-k8s.io/v1beta2: v1beta2
+```
+
+An example of this is in the [AWS infrastructure provider](https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/config/crd/kustomization.yaml).
+
+### InfraMachinePool, InfraMachinePoolList resource definition
+
+You MUST define a InfraMachinePool resource if you provider supports MachinePools.
+The InfraMachinePool CRD name must have the format produced by [`sigs.k8s.io/cluster-api/util/contract.CalculateCRDName(Group, Kind)`](https://github.com/search?q=repo%3Akubernetes-sigs%2Fcluster-api+%22func+CalculateCRDName%22&type=code).
+
+Note: Cluster API is using such a naming convention to avoid an expensive CRD lookup operation when looking for labels from
+the CRD definition of the InfraMachinePool resource.
+
+It is a generally applied convention to use names in the format `${env}MachinePool`, where ${env} is a, possibly short, name
+for the environment in question. For example `AWSMachinePool` is an implementation for Amazon Web Services, and `AzureMachinePool`
+is one for Azure.
+
+```go
+// +kubebuilder:object:root=true
+// +kubebuilder:resource:path=foomachinepools,shortName=foomp,scope=Namespaced,categories=cluster-api
+// +kubebuilder:storageversion
+// +kubebuilder:subresource:status
+// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of FooMachinePool"
+
+// FooMachinePool is the Schema for foomachinepools.
+type FooMachinePool struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+ Spec FooMachinePoolSpec `json:"spec,omitempty"`
+ Status FooMachinePoolStatus `json:"status,omitempty"`
+}
+
+type FooMachinePoolSpec struct {
+ // See other rules for more details about mandatory/optional fields in InfraMachinePool spec.
+ // Other fields SHOULD be added based on the needs of your provider.
+}
+
+type FooMachinePoolStatus struct {
+ // See other rules for more details about mandatory/optional fields in InfraMachinePool status.
+ // Other fields SHOULD be added based on the needs of your provider.
+}
+```
+
+For each InfraMachinePool resource, you MUST also add the corresponding list resource.
+The list resource MUST be named as `List`.
+
+```go
+// +kubebuilder:object:root=true
+
+// FooMachinePoolList contains a list of foomachinepools.
+type FooMachinePoolList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty"`
+ Items []FooMachinePool `json:"items"`
+}
+```
+
+### InfraMachinePool: instances
+
+Each InfraMachinePool MAY specify a status field that is used to report information about each replica within the machine pool. This field is not used by core CAPI. It is purely informational and is used as convenient way for a user to get details of the replicas in the machine pool, such as their provider id and ip addresses.
+
+If you implement this then create a `status.instances` field that is a slice of a struct type that contains the information you want to store and be made available to the users.
+
+```go
+type FooMachinePoolStatus struct {
+ // Instances contains the status for each instance in the pool
+ // +optional
+ Instances []FooMachinePoolInstanceStatus `json:"instances,omitempty"`
+
+ // See other rules for more details about mandatory/optional fields in InfraMachinePool status.
+ // Other fields SHOULD be added based on the needs of your provider.
+}
+
+// FooMachinePoolInstanceStatus contains instance status information about a FooMachinePool.
+type FooMachinePoolInstanceStatus struct {
+ // Addresses contains the associated addresses for the machine.
+ // +optional
+ Addresses []clusterv1.MachineAddress `json:"addresses,omitempty"`
+
+ // InstanceName is the identification of the Machine Instance within the Machine Pool
+ InstanceName string `json:"instanceName,omitempty"`
+
+ // ProviderID is the provider identification of the Machine Pool Instance
+ // +optional
+ ProviderID *string `json:"providerID,omitempty"`
+
+ // Version defines the Kubernetes version for the Machine Instance
+ // +optional
+ Version *string `json:"version,omitempty"`
+
+ // Ready denotes that the machine is ready
+ // +optional
+ Ready bool `json:"ready"`
+}
+```
+
+### MachinePoolMachines support
+
+A provider can opt-in to MachinePool Machines (MPM). With MPM machines all the replicas in a MachinePool are represented by a Machine & InfraMachine. This enables core CAPI to perform common operations on single machines (and their Nodes), such as draining a node before scale down, integration with Cluster Autoscaler and also [MachineHealthChecks].
+
+If you want to adopt MPM then you MUST have an `status.infrastructureMachineKind` field and the fields value must be set to the resource kind that represents the replicas in the pool. This is usually the resource kind name for the providers InfraMachine. For example, for the AWS provider the value would be set to `AWSMachine`.
+
+By opting in, the infra provider is expected to create a InfraMachine for every replica in the pool. The lifecycle of these InfraMachines must be managed so that when scale up or scale down happens, the list of InfraMachines is kept up to date.
+
+```go
+type FooMachinePoolStatus struct {
+ // InfrastructureMachineKind is the kind of the infrastructure resources behind MachinePool Machines.
+ // +optional
+ InfrastructureMachineKind string `json:"infrastructureMachineKind,omitempty"`
+
+ // See other rules for more details about mandatory/optional fields in InfraMachinePool status.
+ // Other fields SHOULD be added based on the needs of your provider.
+}
+```
+
+Note: not all InfraMachinePool implementations support MPM as it depends on whether the infrastructure service underpinning the InfraMachinePool supports operations being performed against single machines. For example, in CAPA `AWSManagedMachinePool` is used to represent an "EKS managed node group" and as a "managed" service you are expected to NOT perform operations against single nodes.
+
+For further information see the [proposal](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20220209-machinepool-machines.md).
+
+### InfraMachinePool: providerID
+
+Each InfraMachinePool MAY specify a provider ID on `spec.providerID` that can be used to identify the infrastructure resource that implements the InfraMachinePool.
+
+This field isn't used by core CAPI. Its main purpose is purely informational to the user to surface the infrastructures identifier for the InfraMachinePool. For example, for AWSMachinePool this would be the ASG identifier.
+
+```go
+type FooMachinePoolSpec struct {
+ // providerID is the identification ID of the FooMachinePool.
+ // +optional
+ // +kubebuilder:validation:MinLength=1
+ // +kubebuilder:validation:MaxLength=512
+ ProviderID string `json:"providerID,omitempty"`
+
+ // See other rules for more details about mandatory/optional fields in InfraMachinePool spec.
+ // Other fields SHOULD be added based on the needs of your provider.
+}
+```
+
+NOTE: To align with API conventions, we recommend since the v1beta2 contract that the `ProviderID` field should be
+of type `string`.
+
+### InfraMachinePool: providerIDList
+
+Each InfraMachinePool MUST supply a list of the identification IDs of the machine instances managed by the machine pool by storing these in `spec.providerIDList`.
+
+```go
+type FooMachinePoolSpec struct {
+ // ProviderIDList is the list of identification IDs of machine instances managed by this Machine Pool
+ // +optional
+ // +listType=atomic
+ // +kubebuilder:validation:MaxItems=10000
+ // +kubebuilder:validation:items:MinLength=1
+ // +kubebuilder:validation:items:MaxLength=512
+ ProviderIDList []string `json:"providerIDList,omitempty"`
+
+ // See other rules for more details about mandatory/optional fields in InfraMachinePool spec.
+ // Other fields SHOULD be added based on the needs of your provider.
+}
+```
+
+Cluster API uses this list to determine the status of the machine pool and to know when replicas have been deleted, at which point the Node will be deleted. Therefore, the list MUST be kept up to date.
+
+### InfraMachinePool: initialization completed
+
+Each InfraMachinePool MUST report when the MachinePool's infrastructure is fully provisioned (initialization) by setting `status.initialization.provisioned` in the InfraMachinePool resource.
+
+```go
+type FooMachinePoolStatus struct {
+ // initialization provides observations of the FooMachinePool initialization process.
+ // +optional
+ Initialization FooMachinePoolInitializationStatus `json:"initialization,omitempty,omitzero"`
+
+ // See other rules for more details about mandatory/optional fields in InfraMachinePool status.
+ // Other fields SHOULD be added based on the needs of your provider.
+}
+
+// FooMachinePoolInitializationStatus provides observations of the FooMachinePool initialization process.
+// +kubebuilder:validation:MinProperties=1
+type FooMachinePoolInitializationStatus struct {
+ // provisioned is true when the infrastructure provider reports that the MachinePool's infrastructure is fully provisioned.
+ // +optional
+ Provisioned *bool `json:"provisioned,omitempty"`
+}
+
+```
+
+Once `status.initialization.provisioned` is set, the MachinePool "core" controller will bubble this info in the MachinePool's `status.initialization.infrastructureProvisioned`; also InfraMachinePools’s `spec.providerIDList` and `status.replicas` will be surfaced on MachinePool’s corresponding fields at the same time.
+
+
+
+Compatibility with the deprecated v1beta1 contract
+
+In order to ease the transition for providers, the v1beta2 version of the Cluster API contract _temporarily_ preserves compatibility with the deprecated v1beta1 contract; compatibility will be removed tentatively in August 2026.
+
+With regard to initialization completed:
+
+Cluster API will continue to temporarily support InfraMachinePool resource using `status.ready` field to report initialization completed.
+
+After compatibility with the deprecated v1beta1 contract will be removed, `status.ready` field in
+the InfraMachine resource will be ignored.
+
+
+
+### InfraMachinePool: pausing
+
+Providers SHOULD implement the pause behaviour for every object with a reconciliation loop. This is done by checking if `spec.paused` is set on the Cluster object and by checking for the `cluster.x-k8s.io/paused` annotation on the InfraMachinePool object. Preferably, the utility `sigs.k8s.io/cluster-api/util/annotations.IsPaused(cluster, infraMachinePool)` SHOULD be used.
+
+If implementing the pause behaviour, providers SHOULD surface the paused status of an object using the Paused condition: `Status.Conditions[Paused]`.
+
+### InfraMachinePool: conditions
+
+According to [Kubernetes API Conventions], Conditions provide a standard mechanism for higher-level
+status reporting from a controller.
+
+Providers implementers SHOULD implement `status.conditions` for their InfraMachinePool resource.
+In case conditions are implemented on a InfraMachinePool resource, Cluster API will only consider conditions providing the following information:
+
+- `type` (required)
+- `status` (required, one of True, False, Unknown)
+- `reason` (optional, if omitted a default one will be used)
+- `message` (optional, if omitted an empty message will be used)
+- `lastTransitionTime` (optional, if omitted time.Now will be used)
+- `observedGeneration` (optional, if omitted the generation of the InfraMachinePool resource will be used)
+
+Other fields will be ignored.
+
+If a condition with type `Ready` exist, such condition will be mirrored in MachinePool’s `InfrastructureReady` condition (not implemented yet).
+
+Please note that the `Ready` condition is expected to surface the status of the InfraMachinePool during its own entire lifecycle, including initial provisioning, the final deletion process, and the period in between these two moments.
+
+See [Improving status in CAPI resources] for more context.
+
+
+
+Compatibility with the deprecated v1beta1 contract
+
+In order to ease the transition for providers, the v1beta2 version of the Cluster API contract _temporarily_
+preserves compatibility with the deprecated v1beta1 contract; compatibility will be removed tentatively in August 2026.
+
+With regards to conditions:
+
+Cluster API will continue to read conditions from providers using deprecated Cluster API condition types.
+
+Please note that provider that will continue to use deprecated Cluster API condition types MUST carefully take into account
+the implication of this choice which are described both in the [Cluster API v1.11 migration notes] and in the [Improving status in CAPI resources] proposal.
+
+
+
+### InfraMachinePool: replicas
+
+Provider implementers MUST implement `status.replicas` to report the most recently observed number of machine instances in the pool. For example, in AWS this would be the number of replicas in a Auto Scaling group (ASG).
+
+```go
+type FooMachinePoolStatus struct {
+ // Replicas is the most recently observed number of replicas.
+ // +optional
+ Replicas int32 `json:"replicas"`
+
+ // See other rules for more details about mandatory/optional fields in InfraMachinePool status.
+ // Other fields SHOULD be added based on the needs of your provider.
+}
+```
+
+The value from this field is surfaced via the MachinePool's `status.replicas` field.
+
+### InfraMachinePool: terminal failures
+
+Starting from the v1beta2 contract version, there is no more special treatment for provider's terminal failures within Cluster API.
+
+In case necessary, "terminal failures" should be surfaced using conditions, with a well documented type/reason; it is up to consumers to treat them accordingly.
+
+See [Improving status in CAPI resources] for more context.
+
+
+
+Compatibility with the deprecated v1beta1 contract
+
+In order to ease the transition for providers, the v1beta2 version of the Cluster API contract _temporarily_ preserves compatibility with the deprecated v1beta1 contract; compatibility will be removed tentatively in August 2026.
+
+With regards to terminal failures:
+
+In case an infrastructure provider reports that a InfraMachinePool resource is in a state that cannot be recovered (terminal failure) by setting `status.failureReason` and `status.failureMessage` as defined by the deprecated v1beta1 contract, the "core" MachinePool controller will surface those info in the corresponding fields in the MachinePools's `status.deprecated.v1beta1` struct.
+
+After compatibility with the deprecated v1beta1 contract will be removed, `status.failureReason` and `status.failureMessage` fields in the InfraMachine resource will be ignored and Machine's `status.deprecated.v1beta1` struct will be dropped.
+
+
+
+### InfraMachinePoolTemplate, InfraMachineTemplatePoolList resource definition
+
+For a given InfraMachinePool resource, you SHOULD also add a corresponding InfraMachinePoolTemplate resource in order to use it in ClusterClasses. The template resource MUST be name `Template`.
+
+```go
+// +kubebuilder:object:root=true
+// +kubebuilder:resource:path=foomachinepooltemplates,scope=Namespaced,categories=cluster-api
+// +kubebuilder:storageversion
+
+// FooMachinePoolTemplate is the Schema for the foomachinepooltemplates API.
+type FooMachinePoolTemplate struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ Spec FooMachinePoolTemplateSpec `json:"spec,omitempty"`
+}
+
+type FooMachinePoolTemplateSpec struct {
+ Template FooMachinePooleTemplateResource `json:"template"`
+}
+
+type FooMachinePoolTemplateResource struct {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+ // +optional
+ ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty,omitzero"`
+ Spec FooMachinePoolSpec `json:"spec"`
+}
+```
+
+NOTE: in this example `spec.template.spec` embeds `FooMachinePoolSpec` from MachinePool. This might not always be
+the best choice depending of if/how InfraMachinePools spec fields applies to many machine pools vs only one.
+
+For each InfraMachinePoolTemplate resource, you MUST also add the corresponding list resource.
+The list resource MUST be named as `List`.
+
+```go
+// +kubebuilder:object:root=true
+
+// FooMachinePoolTemplateList contains a list of FooMachinePoolTemplates.
+type FooMachinePoolTemplateList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty"`
+ Items []FooMachinePoolTemplate `json:"items"`
+}
+```
+
+### InfraMachinePoolTemplate: support for SSA dry run
+
+When Cluster API's topology controller is trying to identify differences between templates defined in a ClusterClass and
+the current Cluster topology, it is required to run [Server Side Apply] (SSA) dry run call.
+
+However, in case you have immutability checks for your InfraMachinePoolTemplate, this can lead the SSA dry run call to error.
+
+In order to avoid this InfraMachinePoolTemplate MUST specifically implement support for SSA dry run calls from the topology controller.
+
+The implementation requires to use controller runtime's `CustomValidator`, available since version v0.12.3.
+
+This will allow to skip the immutability check only when the topology controller is dry running while preserving the
+validation behavior for all other cases.
+
+### Multi tenancy
+
+Multi tenancy in Cluster API defines the capability of an infrastructure provider to manage different credentials,
+each one of them corresponding to an infrastructure tenant.
+
+See [infrastructure Provider Security Guidance] for considerations about cloud provider credential management.
+
+Please also note that Cluster API does not support running multiples instances of the same provider, which someone can
+assume an alternative solution to implement multi tenancy; same applies to the clusterctl CLI.
+
+See [Support running multiple instances of the same provider] for more context.
+
+However, if you want to make it possible for users to run multiples instances of your provider, your controller's SHOULD:
+
+- support the `--namespace` flag.
+- support the `--watch-filter` flag.
+
+Please, read carefully the page linked above to fully understand implications and risks related to this option.
+
+### Clusterctl support
+
+The clusterctl command is designed to work with all the providers compliant with the rules defined in the [clusterctl provider contract].
+
+[All resources: Scope]: #all-resources-scope
+[All resources: `TypeMeta` and `ObjectMeta`field]: #all-resources-typemeta-and-objectmeta-field
+[All resources: `APIVersion` field value]: #all-resources-apiversion-field-value
+[InfraMachinePool, InfraMachinePoolList resource definition]: #inframachinepool-inframachinepoollist-resource-definition
+[InfraMachinePool: instances]: #inframachinepool-instances
+[InfraMachinePool: providerID]: #inframachinepool-providerid
+[InfraMachinePool: providerIDList]: #inframachinepool-provideridlist
+[InfraMachinePool: initialization completed]: #inframachinepool-initialization-completed
+[InfraMachinePool: pausing]: #inframachinepool-pausing
+[InfraMachinePool: conditions]: #inframachinepool-conditions
+[InfraMachinePool: replicas]: #inframachinepool-replicas
+[InfraMachinePool: terminal failures]: #inframachinepool-terminal-failures
+[InfraMachinePoolTemplate, InfraMachineTemplatePoolList resource definition]: #inframachinepooltemplate-inframachinetemplatepoollist-resource-definition
+[InfraMachinePoolTemplate: support for SSA dry run]: #inframachinepooltemplate-support-for-ssa-dry-run
+[MachinePoolMachines support]: #machinepoolmachines-support
+[Multi tenancy]: #multi-tenancy
+[Clusterctl support]: #clusterctl-support
+[Kubernetes API Conventions]: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
+[Improving status in CAPI resources]: https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md
+[infrastructure Provider Security Guidance]: ../security-guidelines.md
+[Support running multiple instances of the same provider]: ../../core/support-multiple-instances.md
+[clusterctl provider contract]: clusterctl.md
+[MachineHealthChecks]: ../../../tasks/automated-machine-management/healthchecking.md
diff --git a/docs/book/src/developer/providers/contracts/ipam.md b/docs/book/src/developer/providers/contracts/ipam.md
index 54d40adde2cc..7540b71d2c01 100644
--- a/docs/book/src/developer/providers/contracts/ipam.md
+++ b/docs/book/src/developer/providers/contracts/ipam.md
@@ -14,7 +14,7 @@ Note that the IPAM contract is single-stack. If you need both v4 and v6 addresse
## Data Types
-An IPAM provider must define one or more API types for IP address pools. The types:
+An IPAM provider must define one or more API types for IP address pools using Kubernetes' CustomResourceDefinition (CRD). The types:
1. Must belong to an API group served by the Kubernetes apiserver
2. Must be implemented as a CustomResourceDefinition.
diff --git a/docs/book/src/developer/providers/contracts/overview.md b/docs/book/src/developer/providers/contracts/overview.md
index 08f1a27460e3..8a90030108a3 100644
--- a/docs/book/src/developer/providers/contracts/overview.md
+++ b/docs/book/src/developer/providers/contracts/overview.md
@@ -10,7 +10,7 @@ See [Cluster API release vs contract versions](../../../reference/versions.md#cl
- Infrastructure provider
- Contract rules for [InfraCluster](infra-cluster.md) resource
- Contract rules for [InfraMachine](infra-machine.md) resource
- - Contract rules for InfraMachinePool resource (TODO)
+ - Contract rules for [InfraMachinePool](infra-machinepool.md) resource
- Bootstrap provider
- Contract rules for [BootstrapConfig](bootstrap-config.md) resource
diff --git a/docs/book/src/developer/providers/getting-started/building-running-and-testing.md b/docs/book/src/developer/providers/getting-started/building-running-and-testing.md
index d095c356a9c9..9b6880b326dc 100644
--- a/docs/book/src/developer/providers/getting-started/building-running-and-testing.md
+++ b/docs/book/src/developer/providers/getting-started/building-running-and-testing.md
@@ -2,41 +2,20 @@
## Docker Image Name
-The patch in `config/manager/manager_image_patch.yaml` will be applied to the manager pod.
-Right now there is a placeholder `IMAGE_URL`, which you will need to change to your actual image.
-
-### Development Images
-It's likely that you will want one location and tag for release development, and another during development.
-
-The approach most Cluster API projects is using [a `Makefile` that uses `sed` to replace the image URL][sed] on demand during development.
-
-[sed]: https://github.com/kubernetes-sigs/cluster-api/blob/e0fb83a839b2755b14fbefbe6f93db9a58c76952/Makefile#L201-L204
-
-## Deployment
-
-### cert-manager
-
-Cluster API uses [cert-manager] to manage the certificates it needs for its webhooks.
-Before you apply Cluster API's yaml, you should [install `cert-manager`][cm-install]
-
-[cert-manager]: https://github.com/cert-manager/cert-manager
-[cm-install]: https://cert-manager.io/docs/installation/
+The IMG variable is used to build the Docker image and push it to a registry. The default value is `controller:latest`, which is a local image. You can change it to a remote image if you want to push it to a registry.
```bash
-kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download//cert-manager.yaml
+make docker-push IMG=ghcr.io/your-org/your-repo:dev
```
+## Deployment
+
### Cluster API
Before you can deploy the infrastructure controller, you'll need to deploy Cluster API itself to the management cluster.
-You can use a precompiled manifest from the [release page][releases], run `clusterctl init`, or clone [`cluster-api`][capi] and apply its manifests using `kustomize`:
+Follow the [quick start guide](https://cluster-api.sigs.k8s.io/user/quick-start) up to and including the step of [creating the management cluster](https://cluster-api.sigs.k8s.io/user/quick-start#initialize-the-management-cluster). We will proceed presuming you created a cluster with kind and initalized cluster-api with `clusterctl init`.
-```bash
-cd cluster-api
-make envsubst
-kustomize build config/default | ./hack/tools/bin/envsubst | kubectl apply -f -
-```
Check the status of the manager to make sure it's running properly:
@@ -45,11 +24,11 @@ kubectl describe -n capi-system pod | grep -A 5 Conditions
```
```bash
Conditions:
- Type Status
- Initialized True
- Ready True
- ContainersReady True
- PodScheduled True
+ Type Status
+ PodReadyToStartContainers True
+ Initialized True
+ Ready True
+ ContainersReady True
```
[capi]: https://github.com/kubernetes-sigs/cluster-api
@@ -66,24 +45,36 @@ labels:
cluster.x-k8s.io/provider: infrastructure-mailgun
```
+If you're using kind for your management cluster, you can use the following command to build and push your image to the kind cluster's local registry. We need to use the IMG variable to override the default `controller:latest` image name with a specific version like `controller:0.1` to avoid having kubernetes try to pull the latest version of `controller` from docker hub.
+
+```bash
+cd cluster-api-provider-mailgun
+
+# Build the Docker image
+make docker-build IMG=controller:dev
+
+# Load the Docker image into the kind cluster
+kind load docker-image controller:dev
+```
+
Now you can apply your provider as well:
```bash
cd cluster-api-provider-mailgun
# Install CRD and controller to current kubectl context
-make install deploy
+make install deploy IMG=controller:dev
kubectl describe -n cluster-api-provider-mailgun-system pod | grep -A 5 Conditions
```
```text
Conditions:
- Type Status
- Initialized True
- Ready True
- ContainersReady True
- PodScheduled True
+ Type Status
+ PodReadyToStartContainers True
+ Initialized True
+ Ready True
+ ContainersReady True
```
[label_prefix]: https://github.com/kubernetes-sigs/cluster-api/search?q=%22infrastructure-%22
@@ -102,6 +93,7 @@ config:
image: controller:latest # change to remote image name if desired
label: CAPM
live_reload_deps: ["main.go", "go.mod", "go.sum", "api", "controllers", "pkg"]
+ go_main: cmd/main.go # kubebuilder puts main.go under the cmd directory
```
- Create file `tilt-settings.yaml` in the cluster-api directory:
@@ -116,15 +108,11 @@ enable_providers:
- mailgun
```
-- Create a kind cluster. By default, Tiltfile assumes the kind cluster is named `capi-test`.
+- Bring tilt up by using the `make tilt-up` command in the cluster-api directory. This will ensure tilt is set up correctly to use a local registry for your image. You may need to `make tilt-clean` before this if you've been using tilt with other providers.
```bash
-kind create cluster --name capi-test
-
-# If you want a more sophisticated setup of kind cluster + image registry, try:
-# ---
-# cd cluster-api
-# hack/kind-install-for-capd.sh
+cd cluster-api
+make tilt-up
```
- Run `tilt up` in the cluster-api folder
diff --git a/docs/book/src/developer/providers/getting-started/configure-the-deployment.md b/docs/book/src/developer/providers/getting-started/configure-the-deployment.md
index c473feeb86c7..08c2f8d8763e 100644
--- a/docs/book/src/developer/providers/getting-started/configure-the-deployment.md
+++ b/docs/book/src/developer/providers/getting-started/configure-the-deployment.md
@@ -53,7 +53,7 @@ As you might have noticed, we are reading variable values from a `ConfigMap` and
You now have to add those to the manifest, but how to inject configuration in production?
The convention many Cluster-API projects use is environment variables.
-`config/manager/configuration.yaml`
+`config/manager/credentials.yaml`
```yaml
---
diff --git a/docs/book/src/developer/providers/getting-started/controllers-and-reconciliation.md b/docs/book/src/developer/providers/getting-started/controllers-and-reconciliation.md
index 7c179f966ccd..7ddbdf379ae3 100644
--- a/docs/book/src/developer/providers/getting-started/controllers-and-reconciliation.md
+++ b/docs/book/src/developer/providers/getting-started/controllers-and-reconciliation.md
@@ -1,6 +1,6 @@
# Controllers and Reconciliation
-Right now, you can create objects with our API types, but those objects doesn't make any impact on your mailgun infrastrucrure.
+Right now, you can create objects with your API types, but those objects don't make any impact on your mailgun infrastructure.
Let's fix that by implementing controllers and reconciliation for your API objects.
From the [kubebuilder book][controller]:
@@ -25,17 +25,16 @@ Kubebuilder has created our first controller in `controllers/mailguncluster_cont
// MailgunClusterReconciler reconciles a MailgunCluster object
type MailgunClusterReconciler struct {
client.Client
- Log logr.Logger
+ Scheme *runtime.Scheme
}
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=mailgunclusters,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=mailgunclusters/status,verbs=get;update;patch
func (r *MailgunClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
- _ = context.Background()
- _ = r.Log.WithValues("mailguncluster", req.NamespacedName)
+ _ = logf.FromContext(ctx)
- // your logic here
+ // TODO(user): your logic here
return ctrl.Result{}, nil
}
@@ -88,7 +87,7 @@ We're going to be sending mail, so let's add a few extra fields:
// MailgunClusterReconciler reconciles a MailgunCluster object
type MailgunClusterReconciler struct {
client.Client
- Log logr.Logger
+ Scheme *runtime.Scheme
Mailgun mailgun.Mailgun
Recipient string
}
@@ -102,7 +101,7 @@ Here's a naive example:
```go
func (r *MailgunClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
ctx := context.Background()
- _ = r.Log.WithValues("mailguncluster", req.NamespacedName)
+ _ = ctrl.LoggerFrom(ctx)
var cluster infrav1.MailgunCluster
if err := r.Get(ctx, req.NamespacedName, &cluster); err != nil {
@@ -117,8 +116,8 @@ By returning an error, you request that our controller will get `Reconcile()` ca
That may not always be what you want - what if the object's been deleted? So let's check that:
```go
- var cluster infrav1.MailgunCluster
- if err := r.Get(ctx, req.NamespacedName, &cluster); err != nil {
+ var mailgunCluster infrav1.MailgunCluster
+ if err := r.Get(ctx, req.NamespacedName, &mailgunCluster); err != nil {
// import apierrors "k8s.io/apimachinery/pkg/api/errors"
if apierrors.IsNotFound(err) {
return ctrl.Result{}, nil
@@ -127,19 +126,57 @@ That may not always be what you want - what if the object's been deleted? So let
}
```
-Now, if this were any old `kubebuilder` project you'd be done, but in our case you have one more object to retrieve.
-Cluster API splits a cluster into two objects: the [`Cluster` defined by Cluster API itself][cluster].
-We'll want to retrieve that as well.
+Now that we have our own cluster object (`MailGunCluster`) that represents all the
+infrastructure provider specific details for our cluster, we also need to retrieve
+the upstream [`Cluster` object that is defined by Cluster API itself][cluster].
Luckily, cluster API [provides a helper for us][getowner].
+First, you'll need to import the cluster-api package into our project if you haven't done so yet:
+
+```bash
+# In your Mailgun repository's root directory
+go get sigs.k8s.io/cluster-api
+go mod tidy
+```
+
+Now we can add in a call to the `GetOwnerCluster` function to retrieve the cluster object:
+
```go
- cluster, err := util.GetOwnerCluster(ctx, r.Client, &mg)
+ // import sigs.k8s.io/cluster-api/util
+ cluster, err := util.GetOwnerCluster(ctx, r.Client, mailgunCluster.ObjectMeta)
if err != nil {
return ctrl.Result{}, err
-
}
```
+If our cluster was just created, the Cluster API controller may not have set the ownership reference on our object yet, so we'll have to return here and wait to do more with our cluster object until then. We can leave a log message noting that we're waiting for the main Cluster API controller to set the ownership reference. Here's what our `Reconcile()` function looks like now:
+
+```go
+func (r *MailgunClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
+ // We change the _ to `log` since we're going to log something now
+ log = ctrl.LoggerFrom(ctx)
+
+ var mailgunCluster infrav1.MailgunCluster
+ if err := r.Get(ctx, req.NamespacedName, &mailgunCluster); err != nil {
+ // import apierrors "k8s.io/apimachinery/pkg/api/errors"
+ if apierrors.IsNotFound(err) {
+ return ctrl.Result{}, nil
+ }
+ return ctrl.Result{}, err
+ }
+
+ // import sigs.k8s.io/cluster-api/util
+ cluster, err := util.GetOwnerCluster(ctx, r.Client, mailgunCluster.ObjectMeta)
+ if err != nil {
+ return ctrl.Result{}, err
+ }
+
+ if cluster == nil {
+ log.Info("Waiting for Cluster Controller to set OwnerRef on MailGunCluster")
+ return ctrl.Result{}, nil
+ }
+```
+
### The fun part
_More Documentation: [The Kubebuilder Book][book] has some excellent documentation on many things, including [how to write good controllers!][implement]_
@@ -152,10 +189,10 @@ This is where your provider really comes into its own.
In our case, let's try sending some mail:
```go
-subject := fmt.Sprintf("[%s] New Cluster %s requested", mgCluster.Spec.Priority, cluster.Name)
-body := fmt.Sprint("Hello! One cluster please.\n\n%s\n", mgCluster.Spec.Request)
+subject := fmt.Sprintf("[%s] New Cluster %s requested", mailgunCluster.Spec.Priority, cluster.Name)
+body := fmt.Sprintf("Hello! One cluster please.\n\n%s\n", mailgunCluster.Spec.Request)
-msg := mailgun.NewMessage(mgCluster.Spec.Requester, subject, body, r.Recipient)
+msg := r.mailgun.NewMessage(mailgunCluster.Spec.Requester, subject, body, r.Recipient)
_, _, err = r.Mailgun.Send(msg)
if err != nil {
return ctrl.Result{}, err
@@ -172,28 +209,28 @@ This is an important thing about controllers: they need to be idempotent. This m
So in our case, we'll store the result of sending a message, and then check to see if we've sent one before.
```go
- if mgCluster.Status.MessageID != nil {
+ if mailgunCluster.Status.MessageID != nil {
// We already sent a message, so skip reconciliation
return ctrl.Result{}, nil
}
- subject := fmt.Sprintf("[%s] New Cluster %s requested", mgCluster.Spec.Priority, cluster.Name)
- body := fmt.Sprintf("Hello! One cluster please.\n\n%s\n", mgCluster.Spec.Request)
+ subject := fmt.Sprintf("[%s] New Cluster %s requested", mailgunCluster.Spec.Priority, cluster.Name)
+ body := fmt.Sprintf("Hello! One cluster please.\n\n%s\n", mailgunCluster.Spec.Request)
- msg := mailgun.NewMessage(mgCluster.Spec.Requester, subject, body, r.Recipient)
+ msg := r.Mailgun.NewMessage(mailgunCluster.Spec.Requester, subject, body, r.Recipient)
_, msgID, err := r.Mailgun.Send(msg)
if err != nil {
return ctrl.Result{}, err
}
// patch from sigs.k8s.io/cluster-api/util/patch
- helper, err := patch.NewHelper(&mgCluster, r.Client)
+ helper, err := patch.NewHelper(&mailgunCluster, r.Client)
if err != nil {
return ctrl.Result{}, err
}
- mgCluster.Status.MessageID = &msgID
- if err := helper.Patch(ctx, &mgCluster); err != nil {
- return ctrl.Result{}, errors.Wrapf(err, "couldn't patch cluster %q", mgCluster.Name)
+ mailgunCluster.Status.MessageID = &msgID
+ if err := helper.Patch(ctx, &mailgunCluster); err != nil {
+ return ctrl.Result{}, errors.Wrapf(err, "couldn't patch cluster %q", mailgunCluster.Name)
}
return ctrl.Result{}, nil
@@ -223,7 +260,7 @@ Right now, it probably looks like this:
```go
if err = (&controllers.MailgunClusterReconciler{
Client: mgr.GetClient(),
- Log: ctrl.Log.WithName("controllers").WithName("MailgunCluster"),
+ Scheme: mgr.GetScheme(),
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "Unable to create controller", "controller", "MailgunCluster")
os.Exit(1)
@@ -256,7 +293,7 @@ We're going to use environment variables for this:
if err = (&controllers.MailgunClusterReconciler{
Client: mgr.GetClient(),
- Log: ctrl.Log.WithName("controllers").WithName("MailgunCluster"),
+ Scheme: mgr.GetScheme(),
Mailgun: mg,
Recipient: recipient,
}).SetupWithManager(mgr); err != nil {
diff --git a/docs/book/src/developer/providers/getting-started/implement-api-types.md b/docs/book/src/developer/providers/getting-started/implement-api-types.md
index 5f4b9e5ad8d2..275d4d0524bf 100644
--- a/docs/book/src/developer/providers/getting-started/implement-api-types.md
+++ b/docs/book/src/developer/providers/getting-started/implement-api-types.md
@@ -41,6 +41,9 @@ const (
// MailgunClusterSpec defines the desired state of MailgunCluster
type MailgunClusterSpec struct {
+ // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
+ // Important: Run "make" to regenerate code after modifying this file
+
// Priority is how quickly you need this cluster
Priority Priority `json:"priority"`
// Request is where you ask extra nicely
@@ -51,12 +54,15 @@ type MailgunClusterSpec struct {
// MailgunClusterStatus defines the observed state of MailgunCluster
type MailgunClusterStatus struct {
+ // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
+ // Important: Run "make" to regenerate code after modifying this file
+
// MessageID is set to the message ID from Mailgun when our message has been sent
MessageID *string `json:"response"`
}
```
-As the deleted comments request, run `make manager manifests` to regenerate some of the generated data files afterwards.
+As the comments request, run `make manager manifests` to regenerate some of the generated data files afterwards.
```bash
git add .
@@ -69,13 +75,19 @@ To enable clients to encode and decode your API, your types must be able to be r
[scheme]: https://pkg.go.dev/k8s.io/apimachinery/pkg/runtime#Scheme
-By default, Kubebuilder will provide you with a scheme builder like:
+By default, Kubebuilder will provide you with a scheme builder (likely in `api/v1alpha1/groupversion_info.go`) like:
```go
-import "sigs.k8s.io/controller-runtime/pkg/scheme"
+import (
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "sigs.k8s.io/controller-runtime/pkg/scheme"
+)
var (
- // SchemeBuilder is used to add go types to the GroupVersionKind scheme
+ // GroupVersion is group version used to register these objects.
+ GroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1alpha1"}
+
+ // SchemeBuilder is used to add go types to the GroupVersionKind scheme.
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
// AddToScheme adds the types in this group-version to the given scheme.
@@ -83,11 +95,11 @@ var (
)
```
-and scheme registration that looks like:
+and scheme registration (likely in `api/v1alpha1/*_types.go`) that looks like:
```go
func init() {
- SchemeBuilder.Register(&Captain{}, &CaptainList{})
+ SchemeBuilder.Register(&MailgunCluster{}, &MailgunClusterList{})
}
```
@@ -99,10 +111,17 @@ to be imported cleanly into other projects.
To mitigate this, use the following schemebuilder pattern:
```go
-import "k8s.io/apimachinery/pkg/runtime"
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
var (
- // schemeBuilder is used to add go types to the GroupVersionKind scheme.
+ // GroupVersion is group version used to register these objects.
+ GroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1alpha1"}
+
+ // 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.
@@ -122,7 +141,7 @@ and register types as below:
```go
func init() {
- objectTypes = append(objectTypes, &Captain{}, &CaptainList{})
+ objectTypes = append(objectTypes, &MailgunCluster{}, &MailgunClusterList{})
}
```
diff --git a/docs/book/src/developer/providers/getting-started/initialize-repo-and-api-types.md b/docs/book/src/developer/providers/getting-started/initialize-repo-and-api-types.md
index a64a365737e2..b8556f468931 100644
--- a/docs/book/src/developer/providers/getting-started/initialize-repo-and-api-types.md
+++ b/docs/book/src/developer/providers/getting-started/initialize-repo-and-api-types.md
@@ -3,7 +3,7 @@
## Create a repository
```bash
-mkdir cluster-api-provider-mailgun
+mkdir -p src/sigs.k8s.io/cluster-api-provider-mailgun
cd src/sigs.k8s.io/cluster-api-provider-mailgun
git init
```
@@ -38,6 +38,7 @@ The domain for Cluster API resources is `cluster.x-k8s.io`, and infrastructure p
Commit your changes so far:
```bash
+git add .
git commit -m "Generate scaffolding."
```
@@ -75,29 +76,6 @@ Create Controller under pkg/controller [y/n]?
y
```
-### Add Status subresource
-
-The [status subresource][status] lets Spec and Status requests for custom resources be addressed separately so requests don't conflict with each other.
-It also lets you split RBAC rules between Spec and Status. You will have to [manually enable it in Kubebuilder][kbstatus].
-
-Add the `subresource:status` annotation to your `cluster_types.go` `machine_types.go`
-
-```go
-// +kubebuilder:subresource:status
-// +kubebuilder:object:root=true
-
-// MailgunCluster is the Schema for the mailgunclusters API
-type MailgunCluster struct {
-```
-
-```go
-// +kubebuilder:subresource:status
-// +kubebuilder:object:root=true
-
-// MailgunMachine is the Schema for the mailgunmachines API
-type MailgunMachine struct {
-```
-
And regenerate the CRDs:
```bash
make manifests
@@ -110,9 +88,6 @@ git add .
git commit -m "Generate Cluster and Machine resources."
```
-[status]: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#status-subresource
-[kbstatus]: https://book.kubebuilder.io/reference/generating-crd.html?highlight=status#status
-
### Apply further customizations
The cluster API CRDs should be further customized, please refer to [provider contracts](../contracts/overview.md).
diff --git a/docs/book/src/developer/providers/migrations/v1.10-to-v1.11.md b/docs/book/src/developer/providers/migrations/v1.10-to-v1.11.md
index 41efc5e68215..020946572cfb 100644
--- a/docs/book/src/developer/providers/migrations/v1.10-to-v1.11.md
+++ b/docs/book/src/developer/providers/migrations/v1.10-to-v1.11.md
@@ -2800,6 +2800,12 @@ As documented in [Suggested changes for providers](#suggested-changes-for-provid
external.GetObjectFromContractVersionedRef(ctx, r.Client, cluster.Spec.InfrastructureRef, cluster.Namespace)
```
+ - This functions requires the permissions to `get`, `list` and `watch` objects of the type `customresourcedefinitions` to identify the used contract version.
+
+ ```go
+ // +kubebuilder:rbac:groups=apiextensions.k8s.io,resources=customresourcedefinitions,verbs=get;list;watch
+ ```
+
- Go clients writing status of core Cluster API objects, should use at least Cluster API v1.9 Go types.
If that is not possible, avoid updating or patching the entire status field and instead you should patch only individual fields.
(Cluster API v1.9 introduced `.status.v1beta2` fields that are necessary for lossless v1beta2 => v1beta1 => v1beta2 round trips)
@@ -2854,6 +2860,12 @@ As documented in [Suggested changes for providers](#suggested-changes-for-provid
external.GetObjectFromContractVersionedRef(ctx, r.Client, cluster.Spec.InfrastructureRef, cluster.Namespace)
```
+ - This functions requires the permissions to `get`, `list` and `watch` objects of the type `customresourcedefinitions` to identify the used contract version.
+
+ ```go
+ // +kubebuilder:rbac:groups=apiextensions.k8s.io,resources=customresourcedefinitions,verbs=get;list;watch
+ ```
+
- core Cluster API added the new CRD migrator component in the v1.9 release. For more details, see: https://github.com/kubernetes-sigs/cluster-api/issues/11894
- CRD migration in clusterctl has been deprecated and will be removed in CAPI v1.13, so it's recommended to
adopt the CRD migrator in providers instead.
diff --git a/docs/book/src/developer/providers/migrations/v1.11-to-v1.12.md b/docs/book/src/developer/providers/migrations/v1.11-to-v1.12.md
new file mode 100644
index 000000000000..a5e64c830d88
--- /dev/null
+++ b/docs/book/src/developer/providers/migrations/v1.11-to-v1.12.md
@@ -0,0 +1,212 @@
+# Cluster API v1.11 compared to v1.12
+
+This document provides an overview over relevant changes between Cluster API v1.11 and v1.12 for
+maintainers of providers and consumers of our Go API.
+
+Any feedback or contributions to improve following documentation is welcome!
+
+
+* [Cluster API v1.11 compared to v1.12](#cluster-api-v111-compared-to-v112)
+ * [Go version](#go-version)
+ * [Dependencies](#dependencies)
+ * [Implemented proposal](#implemented-proposal)
+ * [API Changes](#api-changes)
+ * [Cluster](#cluster-)
+ * [Machine](#machine)
+ * [MachineDeployment](#machinedeployment)
+ * [MachineSet](#machineset)
+ * [MachinePool](#machinepool)
+ * [MachineHealthCheck](#machinehealthcheck)
+ * [ClusterClass](#clusterclass)
+ * [KubeadmConfig](#kubeadmconfig)
+ * [KubeadmConfigTemplate](#kubeadmconfigtemplate)
+ * [KubeadmControlPlane](#kubeadmcontrolplane)
+ * [KubeadmControlPlaneTemplate](#kubeadmcontrolplanetemplate)
+ * [Runtime hooks Changes](#runtime-hooks-changes)
+ * [Cluster API Contract changes](#cluster-api-contract-changes)
+ * [Deprecation](#deprecation)
+ * [Removals](#removals)
+ * [Suggested changes for providers](#suggested-changes-for-providers)
+ * [Removals scheduled for future releases](#removals-scheduled-for-future-releases)
+
+
+## Go version
+
+- The minimal Go version required to build Cluster API is v1.24.x
+- The Go version used by Cluster API is v1.24.x
+
+## Dependencies
+
+- The Controller Runtime version used by Cluster API is v0.22.x
+- The version of the Kubernetes libraries used by Cluster API is v1.34.x
+
+## Implemented proposal
+
+The following proposal have been implemented in the Cluster API v1.12 release:
+- [In-place updates](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240807-in-place-updates.md)
+- [Chained and efficient upgrades](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20250513-chained-and-efficient-upgrades-for-clusters-with-managed-topologies.md)
+- [Taint propagation](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20250513-propogate-taints.md) (Only phase 1)
+
+## API Changes
+
+### Cluster
+
+- The new `spec.topology.controlPlane.healthCheck.checks.unhealthyMachineConditions` field has been added
+- The new `spec.topology.workers.machineDeployments[].healthCheck.checks.unhealthyMachineConditions` field has been added
+- The `TopologyReconciled` condition reports new `ClusterCreating` and `ClusterUpgrading` reasons
+ - The following reasons for the `TopologyReconciled` condition are now deprecated
+ - `ControlPlaneUpgradePending`
+ - `MachineDeploymentsCreatePending`
+ - `MachineDeploymentsUpgradePending`
+ - `MachinePoolsUpgradePending`
+ - `MachinePoolsCreatePending`
+ - `LifecycleHookBlocking`
+
+### Machine
+
+- The new `spec.taint` field has been added.
+- The `HealthCheckSucceeded` condition reports a new `UnhealthyMachine` reason when `unhealthyMachineConditions` checks fail
+- The `UpToDate` condition reports a new `Updating` reason when a machine is performing in-place updates
+- The new `Updating` condition has been added. It reports status `True` when a machine is performing in-place updates
+ - Supported reasons are `NotUpdating`, `InPlaceUpdating`, `InPlaceUpdateFailed`
+- The field `status.phases` reports a new `Updating` phase when a machine is performing in-place updates
+
+### MachineDeployment
+
+MachineDeployment `spec.template.spec` has been aligned to changes in the [Machine](#machine) `spec` struct
+
+### MachineSet
+
+MachineSet `spec.template.spec` has been aligned to changes in the [Machine](#machine) `spec` struct
+
+### MachinePool
+
+MachinePool `spec.template.spec` has been aligned to changes in the [Machine](#machine) `spec` struct
+
+### MachineHealthCheck
+
+- The new `spec.checks.unhealthyMachineConditions` field has been added
+
+### ClusterClass
+
+- The new `spec.controlPlane.healthCheck.checks.unhealthyMachineConditions` field has been added
+- The new `spec.workers.machineDeployments[].healthCheck.checks.unhealthyMachineConditions` field has been added
+- The new `spec.upgrade` field has been added
+- The new `spec.kubernetesVersions` field has been added
+
+### KubeadmConfig
+
+- The new `spec.clusterConfiguration.encryptionAlgorithm` field has been added
+
+### KubeadmConfigTemplate
+
+KubeadmConfigTemplate `spec.template.spec` has been aligned to changes in the [KubeadmConfig](#kubeadmconfig) `spec` struct
+
+### KubeadmControlPlane
+
+KubeadmControlPlane `spec.kubeadmConfigSpec` has been aligned to changes in the [KubeadmConfig](#kubeadmconfig) `spec` struct
+
+### KubeadmControlPlaneTemplate
+
+KubeadmControlPlaneTemplate `spec.template.spec` has been aligned to changes in the [KubeadmControlPlane](#kubeadmcontrolplane) `spec` struct
+
+## Runtime hooks Changes
+
+- Lifecycle hooks
+ - The request message for the `BeforeClusterUpgrade` hook has been extended to include info about the upgrade plan
+ - The new `BeforeControlPlaneUpgrade` hook has been added; the hook is called before each "upgrade control plane" step
+ - The request message for the `AfterControlPlaneUpgrade` hook have been extended to include info about the upgrade plan
+ - The `AfterControlPlaneUpgrade` hook is now called after each "upgrade control plane" step
+ - The new `BeforeWorkersUpgrade`, `AfterWorkersUpgrade` hooks have been added; the hooks are called before/after each "upgrade workers" step
+ - The `AfterClusterUpgrade` has been transformed into a blocking hook (it blocks next upgrade)
+- Upgrade plan hooks (new!)
+ - The new `GenerateUpgradePlan` has been added; the hook is called by the topology controller when it is required
+ to compute the upgrade plan for a cluster
+- In-place extension hooks (new!)
+ - the new `CanUpdateMachine` hook has been added; the hook is called by the KubeadmControlPlane controller to perform the
+ "can update in-place" decision for a machine that is not up-to-date
+ - the new `CanUpdateMachineSet` hook has been added; the hook is called by the MachineDeployment controller to perform the
+ "can update in-place" decision for a MachineSet that is not up-to-date
+ - the new `UpdateMachine` hook has been added; the hook is called by the Machine controller to perform in-place upgrades
+- Some optimization have been implemented to ensure that hooks are called only when necessary
+ - e.g. if a lifecycle hook response, e.g. the `BeforeClusterUpgradeResponse`, informs CAPI to retry after X seconds,
+ CAPI is going to not call the runtime extension until X expires, no matter if the underlying controller reconciles
+ one or more times in the between
+ - `GenerateUpgradePlan`, `CanUpdateMachine`, `CanUpdateMachineSet` hooks will use slightly different caching strategy
+
+## Cluster API Contract changes
+
+- Documentation for the [MachinePool](../contracts/infra-machinepool.md) contract has been aligned to the documentation
+ of other contracts.
+ - We strongly recommend all the MachinePool providers to read carefully this document and check compliance with
+ the updated definition of the contract rules.
+
+- A new, optional rule has been added to the control plane contract, defining what is required for implementing support
+ for in-place updates.
+
+## Deprecation
+
+- The following reasons for the `TopologyReconciled` condition on the `Cluster` object are now deprecated
+ - `ControlPlaneUpgradePending`
+ - `MachineDeploymentsCreatePending`
+ - `MachineDeploymentsUpgradePending`
+ - `MachinePoolsUpgradePending`
+ - `MachinePoolsCreatePending`
+ - `LifecycleHookBlocking`
+
+## Removals
+
+- The `controlplane.cluster.x-k8s.io/kubeadm-cluster-configuration` annotation that KCP was previously setting on Machines has been removed.
+ KCP used this annotation to detect if a Machine requires a rollout, this is now done via the KubeadmConfig of the Machine instead.
+
+## Suggested changes for providers
+
+- For providers that copied the core Cluster API v1beta1 `APIEndpoint` struct and used it in their InfraCluster
+ or ControlPlane Go type it is recommended to now make the `Host` and `Port` fields optional (they already have been made optional in
+ `clusterv1beta1.APIEndpoint` in Cluster API v1.12).
+ tl;dr The fields were previously required, but due to side effects that validation was never enforced. These side
+ effects might go away which then makes the fields suddenly required. To avoid issues we recommend making the fields
+ optional. Similar to how they are optional in the v1beta2 `APIEndpoint` struct and v1beta2 InfraCluster contract.
+ For more details, please see: https://github.com/kubernetes-sigs/cluster-api/pull/12634#discussion_r2275468291.
+ But this might look differently depending on how your InfraCluster/ControlPlane Go type and corresponding
+ mutating webhook evolved over time.
+
+- We strongly recommend all the MachinePool providers to read carefully the [MachinePool](../contracts/infra-machinepool.md) contract
+ and check compliance with the updated definition of the contract rules.
+
+- We strongly recommend providers to start moving to the new v1beta2 version of the Cluster API contract as soon as possible.
+ - v1beta1 version of the Cluster API contract is now deprecated and it will be removed tentatively in August 2026:
+ - In order to ease the transition to the new v1beta2 version of the Cluster API contract, v1beta2 version
+ will implement temporarily compatibility with the deprecated v1beta1 version of the Cluster API contract
+ - Compatibility is only intended to ease the transition for providers, and it has some limitations; please
+ read details in following paragraphs.
+ - Compatibility support for the v1beta1 version of the Cluster API contract will be removed tentatively in August 2026.
+ - After compatibility support for the v1beta1 version of the Cluster API contract is removed, providers
+ which are implementing the v1beta1 contract will stop to work (they will work only with older versions of Cluster API).
+
+- Various Cluster API e2e tests with Kubernetes upgrades now use the `wait-control-plane-upgrade` and `wait-machine-deployment-upgrade` timeouts.
+ If you are running Cluster API e2e tests with upgrades you have to configure the timeouts in your e2e test configuration file, otherwise
+ the e2e tests will use `1s` timeout which will lead to test failures. Example:
+ ```yaml
+ default/wait-control-plane-upgrade: ["15m", "10s"]
+ default/wait-machine-deployment-upgrade: ["10m", "10s"]
+ ```
+
+- Reconciler rate limiting feature has been introduced ([#13006](https://github.com/kubernetes-sigs/cluster-api/pull/13006))
+ - Can be enabled with the new `ReconcilerRateLimiting` feature gate
+ - It rate-limits all reconcilers to at most 1 request per second
+
+- `util.IsOwnedByObject`, `util.IsControlledBy` and `collections.OwnedMachines` now also require `schema.GroupKind` as input parameter.
+ `schema.GroupKind` is needed for cases where typed objects are passed in because controller-runtime does not guarantee that GVK is set on typed objects.
+
+## Removals scheduled for future releases
+
+As documented in [Suggested changes for providers](#suggested-changes-for-providers), it is highly recommended to start planning for future removals:
+
+- v1beta1 API version will be removed tentatively in August 2026
+- Starting from the CAPI release when v1beta1 removal will happen (tentative Aug 2026), the Cluster API project
+ will remove the Cluster API condition type, the `util/conditions/deprecated/v1beta1` package,
+ the `util/deprecated/v1beta1` package, the code handling old conditions in `util/patch.Helper`
+ and everything related to the custom Cluster API custom condition type.
+- All the `status.deprecated` fields will be removed tentatively in August 2026.
+- Compatibility support for the v1beta1 version of the Cluster API contract will be removed tentatively in August 2026
diff --git a/docs/book/src/developer/providers/migrations/v1.8-to-v1.9.md b/docs/book/src/developer/providers/migrations/v1.8-to-v1.9.md
deleted file mode 100644
index 81e13b91167f..000000000000
--- a/docs/book/src/developer/providers/migrations/v1.8-to-v1.9.md
+++ /dev/null
@@ -1,37 +0,0 @@
-# Cluster API v1.8 compared to v1.9
-
-This document provides an overview over relevant changes between Cluster API v1.8 and v1.9 for
-maintainers of providers and consumers of our Go API.
-
-## Go version
-
-- The Go version used by Cluster API is Go 1.22.x
-
-## Changes by Kind
-
-### Deprecation
-
-### Removals
-
-### API Changes
-
-### Other
-
-- Notes for Machines managed by KCP (starting with Cluster API v1.8.2):
- - KCP adds its own pre-terminate hook on all Machines it controls. This is done to ensure it can later remove
- the etcd member right before Machine termination (i.e. before InfraMachine deletion).
- - Starting with Kubernetes v1.31 the KCP pre-terminate hook will wait for all other pre-terminate hooks to finish to
- ensure it runs last (thus ensuring that kubelet is still working while other pre-terminate hooks run). This is only done
- for v1.31 or above because the kubeadm ControlPlaneKubeletLocalMode was introduced with kubeadm 1.31. This feature configures
- the kubelet to communicate with the local apiserver. Only because of that the kubelet immediately starts failing after the etcd
- member is removed. We need the ControlPlaneKubeletLocalMode feature with 1.31 to adhere to the kubelet skew policy.
-
-### Suggested changes for providers
-
-- The Errors package was created when capi provider implementation was running as machineActuators that needed to vendor core capi to function. There is no usage recommendations today and its value is questionable since we moved to CRDs that inter-operate mostly via conditions. Instead we plan to drop the dedicated semantic for terminal failure and keep improving Machine lifecycle signal through conditions. Therefore the Errors package [has been deprecated in v1.8](https://github.com/kubernetes-sigs/cluster-api/issues/10784). It's recommended to remove any usage of the currently exported variables.
-- The `ClusterCacheTracker` component has been deprecated, please use the new `ClusterCache` instead. For more context and examples for
- how to use it, see [PR: Introduce new ClusterCache](https://github.com/kubernetes-sigs/cluster-api/pull/11247) and the corresponding
- [issue](https://github.com/kubernetes-sigs/cluster-api/issues/11272). Some notes:
- - The `DisabledFor` option (previously `ClientUncachedObjects`) is not defaulted to `&corev1.ConfigMap` & `&corev1.Secret` anymore,
- thus it's now necessary to explicitly set `DisabledFor` to avoid caching ConfigMaps and Secrets.
- - `SecretClient` and `UserAgent` are now mandatory options, please take a look at the corresponding godoc.
diff --git a/docs/book/src/images/machinehealthcheck-controller.plantuml b/docs/book/src/images/machinehealthcheck-controller.plantuml
index 2481d302e7ff..deaf41401027 100644
--- a/docs/book/src/images/machinehealthcheck-controller.plantuml
+++ b/docs/book/src/images/machinehealthcheck-controller.plantuml
@@ -2,33 +2,54 @@
@startuml machinehealthcheck-controller
start;
-:Machine Health Check controller;
+:MachineHealthCheck controller;
repeat
- repeat
- :MachineHealthCheck controller enqueues a Reconcile call;
- if (Nodes being watched in remote cluster) then (no)
+ :MachineHealthCheck controller enqueues a Reconcile call;
+
+ if (Nodes being watched in remote cluster?) then (no)
:Watch nodes in remote cluster;
else (yes)
endif
- :Find targets: Machines matched by selector plus respective Nodes;
- :Health check targets: Determine which Machines require remediation;
- repeat while (Remediations are allowed (current unhealthy <= max unhealthy)) is (no)
- -> yes;
- repeat
- if (Target requires remediation) then (yes)
- if (Machine is owned by a MachineSet) then (yes)
- if (Machine is a Control Plane Machine) then (no)
- #LightBlue:Delete Machine;
- else (yes)
+
+ :Find targets: Machines matched by selector;
+ :Update ExpectedMachines and Targets in status;
+
+ #LightBlue:Health check targets: Determine healthy/unhealthy machines;
+ :Update CurrentHealthy in status;
+
+ if (Remediation allowed?\n(conditions in spec.triggerIf met)) then (no)
+ :Set RemediationsAllowed = 0;
+ #LightBlue:Mark RemediationAllowedCondition as False;
+ :Emit RemediationRestricted event;
+ else (yes)
+ :Calculate RemediationsAllowed count;
+ #LightBlue:Mark RemediationAllowedCondition as True;
+
+ repeat
+ if (Target is unhealthy?) then (yes)
+ if (ExternalRemediationTemplate defined?) then (yes)
+ if (External remediation request exists?) then (no)
+ #LightBlue:Create external remediation request;
+ #LightBlue:Set MachineExternallyRemediatedCondition;
+ else (yes)
+ endif
+ else (no)
+ if (Machine not in deletion AND\n(OwnerRemediated missing OR completed)?) then (yes)
+ #LightBlue:Set MachineOwnerRemediatedCondition to False;
+ else (no)
+ endif
endif
+ :Emit MachineMarkedUnhealthy event;
else (no)
+ if (ExternalRemediationTemplate defined\nAND request exists?) then (yes)
+ #LightBlue:Delete external remediation request;
+ else (no)
+ endif
endif
- else (no)
- endif
- repeat while (more Targets) is (yes)
- -> no;
-repeat while (Targets likely to go unhealthy) is (yes: requeue with minimum
- time before timeout as delay)
+ repeat while (More targets?) is (yes)
+ -> no;
+ endif
+repeat while (Any target likely to go unhealthy soon?) is (yes: requeue with\nminimum timeout delay)
-> no;
stop;
diff --git a/docs/book/src/images/machinehealthcheck-controller.png b/docs/book/src/images/machinehealthcheck-controller.png
index 78f235b3b537..d83b071c6752 100644
Binary files a/docs/book/src/images/machinehealthcheck-controller.png and b/docs/book/src/images/machinehealthcheck-controller.png differ
diff --git a/docs/book/src/images/runtime-sdk-lifecycle-hooks.png b/docs/book/src/images/runtime-sdk-lifecycle-hooks.png
index 7153ee288aef..2cefd8508e85 100644
Binary files a/docs/book/src/images/runtime-sdk-lifecycle-hooks.png and b/docs/book/src/images/runtime-sdk-lifecycle-hooks.png differ
diff --git a/docs/book/src/introduction.md b/docs/book/src/introduction.md
index 9b8465d47e43..6002450ffad4 100644
--- a/docs/book/src/introduction.md
+++ b/docs/book/src/introduction.md
@@ -16,8 +16,9 @@ Started by the Kubernetes Special Interest Group (SIG) [Cluster Lifecycle](https
ClusterAPI documentation versions
-This book documents ClusterAPI v1.11. For other Cluster API versions please see the corresponding documentation:
+This book documents ClusterAPI v1.12. For other Cluster API versions please see the corresponding documentation:
* [main.cluster-api.sigs.k8s.io](https://main.cluster-api.sigs.k8s.io)
+* [release-1-11.cluster-api.sigs.k8s.io](https://release-1-11.cluster-api.sigs.k8s.io)
* [release-1-10.cluster-api.sigs.k8s.io](https://release-1-10.cluster-api.sigs.k8s.io)
* [release-1-9.cluster-api.sigs.k8s.io](https://release-1-9.cluster-api.sigs.k8s.io)
* [release-1-8.cluster-api.sigs.k8s.io](https://release-1-8.cluster-api.sigs.k8s.io)
diff --git a/docs/book/src/reference/api/labels-and-annotations.md b/docs/book/src/reference/api/labels-and-annotations.md
index fc428bd5acd6..03ee614caad4 100644
--- a/docs/book/src/reference/api/labels-and-annotations.md
+++ b/docs/book/src/reference/api/labels-and-annotations.md
@@ -21,14 +21,14 @@
| Annotation | Note | Managed By | Applies to |
|:-----------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------|:-----------------------------------------------|
| before-upgrade.hook.cluster.cluster.x-k8s.io | It specifies the prefix we search each annotation for during the before-upgrade lifecycle hook to block propagating the new version to the control plane. These hooks will prevent propagation of changes made to the Cluster Topology to the underlying objects. | User | Clusters |
-| cluster.x-k8s.io/annotations-from-machine| It is set on nodes to track the annotations that originated from machines.| Cluster API | Nodes (workload cluster)|
+| cluster.x-k8s.io/annotations-from-machine | It is set on nodes to track the annotations that originated from machines. | Cluster API | Nodes (workload cluster) |
| cluster.x-k8s.io/cloned-from-groupkind | It is the annotation that stores the group-kind of the template from which the current resource has been cloned from. | Cluster API | All Cluster API objects cloned from a template |
| cluster.x-k8s.io/cloned-from-name | It is the annotation that stores the name of the template from which the current resource has been cloned from. | Cluster API | All Cluster API objects cloned from a template |
| cluster.x-k8s.io/cluster-name | It is set on nodes identifying the name of the cluster the node belongs to. | Cluster API | Nodes (workload cluster) |
| cluster.x-k8s.io/cluster-namespace | It is set on nodes identifying the namespace of the cluster the node belongs to. | Cluster API | Nodes (workload cluster) |
| cluster.x-k8s.io/delete-machine | It marks control plane and worker nodes that will be given priority for deletion when KCP or a MachineSet scales down. It is given top priority on all delete policies. | User | Machines |
| cluster.x-k8s.io/disable-machine-create | It can be used to signal a MachineSet to stop creating new machines. It is utilized in the OnDelete MachineDeploymentStrategy to allow the MachineDeployment controller to scale down older MachineSets when Machines are deleted and add the new replicas to the latest MachineSet. | Cluster API | MachineSets |
-| cluster.x-k8s.io/labels-from-machine| It is set on nodes to track the labels that originated from machines.| Cluster API | Nodes (workload cluster)|
+| cluster.x-k8s.io/labels-from-machine | It is set on nodes to track the labels that originated from machines. | Cluster API | Nodes (workload cluster) |
| cluster.x-k8s.io/managed-by | It can be applied to InfraCluster resources to signify that some external system is managing the cluster infrastructure. Provider InfraCluster controllers will ignore resources with this annotation. An external controller must fulfill the contract of the InfraCluster resource. External infrastructure providers should ensure that the annotation, once set, cannot be removed. | User | InfraClusters |
| cluster.x-k8s.io/machine | It is set on nodes identifying the machine the node belongs to. | Cluster API | Nodes (workload cluster) |
| cluster.x-k8s.io/owner-kind | It is set on nodes identifying the machine's owner kind the node belongs to. | Cluster API | Nodes (workload cluster) |
@@ -40,7 +40,6 @@
| clusterctl.cluster.x-k8s.io/block-move | BlockMoveAnnotation prevents the cluster move operation from starting if it is defined on at least one of the objects in scope. Provider controllers are expected to set the annotation on resources that cannot be instantaneously paused and remove the annotation when the resource has been actually paused. | Providers | All Cluster API objects |
| clusterctl.cluster.x-k8s.io/delete-for-move | DeleteForMoveAnnotation will be set to objects that are going to be deleted from the source cluster after being moved to the target cluster during the clusterctl move operation. It will help any validation webhook to take decision based on it. | Cluster API | All Cluster API objects |
| clusterctl.cluster.x-k8s.io/skip-crd-name-preflight-check | Can be placed on provider CRDs, so that clusterctl doesn't emit an error if the CRD doesn't comply with Cluster APIs naming scheme. Only CRDs that are referenced by core Cluster API CRDs have to comply with the naming scheme. | Providers | CRDs |
-| controlplane.cluster.x-k8s.io/kubeadm-cluster-configuration | It is a machine annotation that stores the json-marshalled string of KCP ClusterConfiguration. This annotation is used to detect any changes in ClusterConfiguration and trigger machine rollout in KCP. | Cluster API | Machines |
| controlplane.cluster.x-k8s.io/remediation-for | It is a machine annotation that links a new machine to the unhealthy machine it is replacing. | Cluster API | Machines |
| controlplane.cluster.x-k8s.io/remediation-in-progress | It is a KCP annotation that tracks that the system is in between having deleted an unhealthy machine and recreating its replacement. | Cluster API | KubeadmControlPlanes |
| controlplane.cluster.x-k8s.io/skip-coredns | It explicitly skips reconciling CoreDNS if set. | User | KubeadmControlPlanes |
@@ -61,3 +60,27 @@
| topology.cluster.x-k8s.io/upgrade-concurrency | It can be used to configure the maximum concurrency while upgrading MachineDeployments of a classy Cluster. It is set as a top level annotation on the Cluster object. The value should be >= 1. If unspecified the upgrade concurrency will default to 1. | Cluster API | Clusters |
| unsafe.topology.cluster.x-k8s.io/disable-update-class-name-check | It can be used to disable the webhook check on update that disallows a pre-existing Cluster to be populated with Topology information and Class. | User | Clusters |
| unsafe.topology.cluster.x-k8s.io/disable-update-version-check | It can be used to disable the webhook checks on update that disallows updating the .topology.spec.version on certain conditions. | User | Clusters |
+
+
+# Internal Annotations
+
+Following annotation are used by CAPI internally.
+
+
+
+Internal annotations should not be used outside CAPI controllers
+
+Name, meaning and semantic of internal annotations can change anytime.
+
+Users must not change or remove internal annotation on CAPI resources, because this can lead to issues or unexpected behaviour of the system.
+
+
+
+| Annotation | Note | Applies to |
+|------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|
+| in-place-updates.internal.cluster.x-k8s.io/acknowledge-move | This annotation is added by the MD controller to a MachineSet when it acknowledges a machine pending acknowledge after being moved from an oldMS | MachineSet |
+| in-place-updates.internal.cluster.x-k8s.io/move-machines-to-machineset | This annotation is added by the MD controller to the oldMS when it should scale down by moving machines that can be updated in-place to the newMS instead of deleting them. | MachineSet |
+| in-place-updates.internal.cluster.x-k8s.io/pending-acknowledge-move | This annotation is by the MS controller to a machine when being moved from the oldMS to the newMS | Machine |
+| in-place-updates.internal.cluster.x-k8s.io/receive-machines-from-machinesets | This annotation is added by the MD controller to the newMS when it should receive replicas from an oldMS | MachineSet |
+| in-place-updates.internal.cluster.x-k8s.io/update-in-progress | This annotation is added to machines by the controller owning the Machine when in-place update is started | Machine |
+| topology.internal.cluster.x-k8s.io/upgrade-step | This is an annotation used by the topology controller to a cluster to track upgrade steps. | Clusters |
diff --git a/docs/book/src/reference/glossary.md b/docs/book/src/reference/glossary.md
index 44210e338e17..bce714c45b5b 100644
--- a/docs/book/src/reference/glossary.md
+++ b/docs/book/src/reference/glossary.md
@@ -1,6 +1,6 @@
# Table of Contents
-[A](#a) | [B](#b) | [C](#c) | [D](#d) | [E](#e) | [H](#h) | [I](#i) | [K](#k) | [L](#l)| [M](#m) | [N](#n) | [O](#o) | [P](#p) | [R](#r) | [S](#s) | [T](#t) | [W](#w)
+[A](#a) | [B](#b) | [C](#c) | [D](#d) | [E](#e) | [H](#h) | [I](#i) | [K](#k) | [L](#l)| [M](#m) | [N](#n) | [O](#o) | [P](#p) | [R](#r) | [S](#s) | [T](#t) | [U](#u) |[W](#w)
# A
---
@@ -78,6 +78,9 @@ Cluster API Provider Akamai (Linode)
### CAPM3
Cluster API Provider Metal3
+### CAPMS
+Cluster API Provider metal-stack
+
### CAPN
Cluster API Provider Nested
@@ -129,6 +132,15 @@ Cluster API IPAM Provider Metal3
### CAREX
Cluster API Runtime Extensions Provider Nutanix
+### Chained upgrade
+An upgrade sequence that goes from one Kubernetes version to another by passing through a set of intermediate versions.
+E.g. upgrading from v1.31.0 (current state) to v1.34.0 (target version) requires
+a chained upgrade with the following steps: v1.32.0 (first intermediate version) -> v1.33.0 (second intermediate version) -> v1.34.0 (target version).
+
+The sequence of versions in a chained upgrade is also called [upgrade plan](#upgrade-plan).
+
+See also [efficient upgrade](#efficient-upgrade).
+
### Cloud provider
Or __Cloud service provider__
@@ -216,6 +228,14 @@ A feature implementation offered as part of the Cluster API project and maintain
# E
---
+### Efficient upgrade
+
+A [chained upgrade](#chained-upgrade) where worker nodes skip some of the intermediate versions,
+when allowed by the [Kubernetes version skew policy](https://kubernetes.io/releases/version-skew-policy/).
+
+When the chained upgrade is also an efficient upgrade, the [upgrade plan](#upgrade-plan) for worker machines is a subset
+of the [upgrade plan](#upgrade-plan) for control plane machines.
+
### External patch
[Patch](#patch) generated by an external component using [Runtime SDK](#runtime-sdk). Alternative to [inline patch](#inline-patch).
@@ -261,6 +281,12 @@ are propagated in place by CAPI controllers to avoid the more elaborated mechani
They include metadata, MinReadySeconds, NodeDrainTimeout, NodeVolumeDetachTimeout and NodeDeletionTimeout but are
not limited to be expanded in the future.
+### In-place update
+
+Any change to a Machine spec, that is performed without deleting the machines and creating a new one.
+
+Note: changing [in-place mutable fields](#in-place-mutable-fields) is not considered an in-place upgrade.
+
### Instance
see [Server](#server)
@@ -269,6 +295,8 @@ see [Server](#server)
A resource that does not mutate. In Kubernetes we often state the instance of a running pod is immutable or does not change once it is run. In order to make a change, a new pod is run. In the context of [Cluster API](#cluster-api) we often refer to a running instance of a [Machine](#machine) as being immutable, from a [Cluster API](#cluster-api) perspective.
+Note: Cluster API also have extensibility points that make it possible to perform [in-place updates](#in-place-update) of machines.
+
### IPAM provider
Refers to a [provider](#provider) that allows Cluster API to interact with IPAM solutions.
@@ -374,6 +402,16 @@ to refer to any project that can be deployed and provides functionality to the C
See [Bootstrap provider](#bootstrap-provider), [Control plane provider](#control-plane-provider), [Core provider](#core-provider),
[Infrastructure provider](#infrastructure-provider), [IPAM provider](#ipam-provider) [Runtime extension provider](#runtime-extension-provider).
+### ProviderID
+
+ProviderID is the provider-specific identifier used to correlate Cluster API objects with the
+underlying cloud instance. It appears in three resource types: InfrastructureMachine, Machine
+(Cluster API core), and Node (workload cluster). CAPI copies the ProviderID from the
+InfrastructureMachine to the Machine. The Node's ProviderID is set by the [Cloud Controller Manager
+(CCM)](https://kubernetes.io/docs/concepts/architecture/cloud-controller/) or the kubelet.
+
+The format is a URI-like string: `://`.
+
### Provider components
Refers to the YAML artifact published as part of the release process for [providers](#provider);
@@ -447,6 +485,24 @@ A [Runtime Hook](#runtime-hook) that allows external components to generate [pat
See [Topology Mutation](../tasks/experimental-features/runtime-sdk/implement-topology-mutation-hook.md)
+# U
+---
+
+### Update Extension
+
+A [runtime extension provider](#runtime-extension-provider) that implements [Update Lifecycle Hooks](#update-lifecycle-hooks).
+
+### Update Lifecycle Hooks
+Is a set of Cluster API [Runtime Hooks](#runtime-hook) called when performing the "can update in-place" decision or
+when performing an [in-place update](#in-place-update).
+
+### Upgrade plan
+The sequence of intermediate versions ... target version that a Cluster must upgrade to when
+performing a [chained upgrade](#chained-upgrade).
+
+Notably, the upgrade plan for control plane machines might be a superset of the upgrade plan for
+workers machines.
+
# W
---
diff --git a/docs/book/src/reference/providers.md b/docs/book/src/reference/providers.md
index db1c810ed433..ab7046568fa6 100644
--- a/docs/book/src/reference/providers.md
+++ b/docs/book/src/reference/providers.md
@@ -7,7 +7,7 @@ by SIG Cluster Lifecycle as well as providers from other open-source repositorie
Each provider is the responsibility of the respective maintainers and we highly recommend
everyone interested in a specific provider to engage with the corresponding team to show support, share use cases,
-learn more about the other users of the same provider.
+learn more about the other users of the same provider.
We also recommend to read provider's documentation carefully, test it, and perform a proper
due diligence before deciding to use a provider in production, like you will do for any other open source project.
@@ -28,6 +28,7 @@ source of inspiration and ideas for others.
## Control Plane
- [Canonical Kubernetes Platform](https://github.com/canonical/cluster-api-k8s)
+- [Hosted Control Plane](https://github.com/teutonet/cluster-api-provider-hosted-control-plane)
- [k0smotron/k0s](https://github.com/k0sproject/k0smotron)
- [K3s](https://github.com/cluster-api-provider-k3s/cluster-api-k3s)
- [Kamaji](https://github.com/clastix/cluster-api-control-plane-provider-kamaji)
@@ -58,6 +59,7 @@ source of inspiration and ideas for others.
- [KubeVirt](https://github.com/kubernetes-sigs/cluster-api-provider-kubevirt)
- [MAAS](https://github.com/spectrocloud/cluster-api-provider-maas)
- [Metal3](https://github.com/metal3-io/cluster-api-provider-metal3)
+- [metal-stack](https://github.com/metal-stack/cluster-api-provider-metal-stack)
- [Microvm](https://github.com/liquidmetal-dev/cluster-api-provider-microvm)
- [Nested](https://github.com/kubernetes-sigs/cluster-api-provider-nested)
- [Nutanix](https://github.com/nutanix-cloud-native/cluster-api-provider-nutanix)
diff --git a/docs/book/src/reference/versions.md b/docs/book/src/reference/versions.md
index 94842046ba07..3b3e233b8c97 100644
--- a/docs/book/src/reference/versions.md
+++ b/docs/book/src/reference/versions.md
@@ -67,9 +67,10 @@ The table below documents support matrix for Cluster API versions (versions olde
| Minor Release | Status | Supported Until (including maintenance mode) |
|---------------|-------------------------|---------------------------------------------------------------------------------------------|
+| v1.12.x | Standard support period | in maintenance mode when v1.14.0 will be released, EOL when v1.15.0 will be released |
| v1.11.x | Standard support period | in maintenance mode when v1.13.0 will be released, EOL when v1.14.0 will be released |
-| v1.10.x | Standard support period | in maintenance mode when v1.12.0 will be released, EOL when v1.13.0 will be released |
-| v1.9.x | Maintenance mode | Maintenance mode since 2025-08-12 - v1.11.0 release date, EOL when v1.12.0 will be released |
+| v1.10.x | Maintenance mode | Maintenance mode since 2025-12-18 - v1.12.0 release date, EOL when v1.13.0 will be released |
+| v1.9.x | EOL | EOL since 2025-12-18 - v1.12.0 release date |
| v1.8.x | EOL | EOL since 2025-08-12 - v1.11.0 release date |
| v1.7.x | EOL | EOL since 2025-04-22 - v1.10.0 release date |
| v1.6.x | EOL | EOL since 2024-12-10 - v1.9.0 release date |
@@ -80,6 +81,41 @@ The table below documents support matrix for Cluster API versions (versions olde
| v1.1.x | EOL | EOL since 2023-03-28 - v1.4.0 release date |
| v1.0.x | EOL | EOL since 2022-12-01 - v1.3.0 release date |
+
+
+Warning
+
+When importing Cluster API go modules as a dependency, you MUST consider any Cluster API behaviour that is not defined
+by an API field or by a well-defined extension point, as a Cluster API internal implementation detail, and internal
+implementation details can change at any time.
+
+Accordingly, in order to not expose users of projects importing Cluster API go modules as a dependency to the risk
+that issue arises when one of the Cluster API internal behavior changes, you MUST NOT rely on any Cluster API
+internal behaviours.
+
+Please note that this applies to any public go func or types; As a only and notable exception, maintainers
+are committed to avoid as much as possible breaking changes within the same minor release for the following packages:
+- /util/*
+- /cmd/clusterctl/client
+
+The Cluster API maintainers welcome feedback and contributions to improve project's extensibility point,
+please [open an issue](https://github.com/kubernetes-sigs/cluster-api/issues/new?assignees=&labels=&template=feature_request.md) on the Cluster API repo or add an item to the agenda in the [Cluster API community meeting](https://git.k8s.io/community/sig-cluster-lifecycle/README.md#cluster-api).
+
+
+
+
+
+Warning
+
+Forks of the CLuster API project are not recommended, instead, Cluster API maintainers welcome feedback and contributions
+to improve project's extensibility point, please [open an issue](https://github.com/kubernetes-sigs/cluster-api/issues/new?assignees=&labels=&template=feature_request.md) on the Cluster API repo or add an item
+to the agenda in the [Cluster API community meeting](https://git.k8s.io/community/sig-cluster-lifecycle/README.md#cluster-api).
+
+If a user still wants to fork this project, please note that it is up to the user to validate if the fork works
+properly and maintainers will not provide any support or guarantee on these kind of integrations/usage.
+
+
+
#### Skip upgrades
Cluster API supports at maximum n-3 minor version skip upgrades.
@@ -270,22 +306,32 @@ In some cases, also Cluster API and/or Cluster API providers are defining additi
The following table defines the support matrix for the Cluster API core provider.
See [Cluster API release support](#cluster-api-release-support) and [Kubernetes versions support](#kubernetes-versions-support).
-| | v1.9, _Maintenance Mode_ | v1.10 | v1.11 |
-|------------------|--------------------------|-------------------|-------------------|
-| Kubernetes v1.24 | | | |
-| Kubernetes v1.25 | | | |
-| Kubernetes v1.26 | ✓ (only workload) | | |
-| Kubernetes v1.27 | ✓ (only workload) | ✓ (only workload) | |
-| Kubernetes v1.28 | ✓ | ✓ (only workload) | ✓ (only workload) |
-| Kubernetes v1.29 | ✓ | ✓ | ✓ (only workload) |
-| Kubernetes v1.30 | ✓ | ✓ | ✓ |
-| Kubernetes v1.31 | ✓ | ✓ | ✓ |
-| Kubernetes v1.32 | ✓ >= v1.9.1 | ✓ | ✓ |
-| Kubernetes v1.33 | | ✓ >= v1.10.1 | ✓ |
-| Kubernetes v1.34 | | | ✓ >= v1.11.1 |
+| |v1.10, _Maintenance Mode_ | v1.11 | v1.12 |
+|------------------|--------------------------|-------------------|------------------------------|
+| Kubernetes v1.27 | ✓ (only workload) | | |
+| Kubernetes v1.28 | ✓ (only workload) | ✓ (only workload) | |
+| Kubernetes v1.29 | ✓ | ✓ (only workload) | ✓ (only workload) |
+| Kubernetes v1.30 | ✓ | ✓ | ✓ (only workload) |
+| Kubernetes v1.31 | ✓ | ✓ | ✓ |
+| Kubernetes v1.32 | ✓ | ✓ | ✓ |
+| Kubernetes v1.33 | ✓ >= v1.10.1 | ✓ | ✓ |
+| Kubernetes v1.34 | | ✓ >= v1.11.1 | ✓ |
+| Kubernetes v1.35 | | | ✓ >= v1.12.1 |
+
See also [Kubernetes version specific notes](#kubernetes-version-specific-notes).
+
+
+Warning
+
+Cluster API is tested with upstream, fully conformant, Kubernetes releases.
+
+It might be possible to use Cluster API also with non conformant Kubernetes releases, but it is up to users
+to validate if this works and the project does not provide any support or guarantees for these kind of deployments.
+
+
+
### Kubeadm Bootstrap provider (`kubeadm-bootstrap-controller`)
For each version of the Cluster API core provider, there is a corresponding version of the Kubeadm Bootstrap provider.
@@ -303,9 +349,6 @@ using the [kubeadm API](https://kubernetes.io/docs/setup/production-environment/
| | kubeadm API Version |
|------------------|------------------------------------------------------------------------------------|
-| Kubernetes v1.24 | [v1beta3](https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta3/) |
-| Kubernetes v1.25 | [v1beta3](https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta3/) |
-| Kubernetes v1.26 | [v1beta3](https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta3/) |
| Kubernetes v1.27 | [v1beta3](https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta3/) |
| Kubernetes v1.28 | [v1beta3](https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta3/) |
| Kubernetes v1.29 | [v1beta3](https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta3/) |
@@ -314,6 +357,7 @@ using the [kubeadm API](https://kubernetes.io/docs/setup/production-environment/
| Kubernetes v1.32 | [v1beta4](https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta4/) |
| Kubernetes v1.33 | [v1beta4](https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta4/) |
| Kubernetes v1.34 | [v1beta4](https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta4/) |
+| Kubernetes v1.35 | [v1beta4](https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta4/) |
### Kubeadm Control Plane provider (`kubeadm-control-plane-controller`)
@@ -355,10 +399,11 @@ Notably, the Max CoreDNS version could change also with patch releases.
| v1.10 | v1.12.1 |
| >= v1.10.5 | v1.12.3 |
| v1.10.7 | v1.12.4 |
-| >= v1.10.8 | v1.13.1 |
+| >= v1.10.8 | v1.13.1 |
| v1.11 | v1.12.3 |
| v1.11.2 | v1.12.4 |
-| >= v1.11.3 | v1.13.1 |
+| >= v1.11.3 | v1.13.1 |
+| v1.12 | v1.13.1 |
See [corefile-migration](https://github.com/coredns/corefile-migration)
diff --git a/docs/book/src/security/security-guidelines.md b/docs/book/src/security/security-guidelines.md
new file mode 100644
index 000000000000..ed6beb71e9a4
--- /dev/null
+++ b/docs/book/src/security/security-guidelines.md
@@ -0,0 +1,88 @@
+# Security Guidelines for Cluster API Users
+
+This document compiles security best practices for using Cluster API. These guidelines are based on the [Cluster API Security Self-Assessment](https://github.com/kubernetes/sig-security/blob/main/sig-security-assessments/cluster-api/self-assessment.md#threat-modeling-with-stride) conducted by the Kubernetes SIG Security. We recommend that organizations adapt these guidelines to their specific infrastructure and security requirements to ensure safe operations.
+
+## Comprehensive auditing
+
+To ensure comprehensive auditing, the following components require audit configuration:
+
+- **Cluster-level Auditing**
+ - Auditing on the management cluster
+ - API server auditing for all workload clusters
+
+- **Node/VM-level Auditing**
+ - Audit KubeConfig files access that are located on the node
+ - Audit access or edits to CA private keys and cert files located on the node
+
+- **Cloud Provider Auditing**
+ - Cloud API auditing to log all actions performed using cloud credentials
+
+After configuring these audit sources, centralize the logs using aggregation tools and implement real-time monitoring and alerting to detect suspicious activities and security incidents.
+
+## Use least privileges
+
+To minimize security risks related to cloud provider access, create dedicated cloud credentials that have only the necessary permissions to manage the lifecycle of a cluster. Avoid using administrative or root accounts for Cluster API operations, and use separate credentials for different purposes such as management cluster versus workload clusters.
+
+## Limit access
+
+Implement access restrictions to protect cluster infrastructure.
+
+### Control Plane Protection
+
+Limit who can create pods on control plane nodes through multiple methods:
+
+- **Taints and Tolerations**: Apply `NoSchedule` taints to control plane nodes to prevent general workload scheduling. See [Kubernetes Taints and Tolerations documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/)
+- **RBAC Policies**: Restrict pod creation permissions using Role-Based Access Control. See [Kubernetes RBAC documentation](https://kubernetes.io/docs/reference/access-authn-authz/rbac/)
+- **Admission Controllers**: Implement admission webhooks to enforce pod placement policies. See [Dynamic Admission Control](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/)
+
+### SSH Access
+
+Disable or restrict SSH access to nodes in a cluster to prevent unauthorized modifications and access to sensitive files.
+
+## Second pair of eyes
+
+Implement a review process where at least two people must approve privileged actions such as creating, deleting, or updating clusters. GitOps provides an effective way to enforce this requirement through pull request workflows, where changes to cluster configurations must be reviewed and approved by another team member before being merged and applied to the infrastructure.
+
+## Implement comprehensive alerting
+
+Configure alerts in the centralized audit log system to detect security incidents and resource anomalies.
+
+### Security Event Monitoring
+
+- Alert when cluster API components are modified, restarted, or experience unexpected state changes
+- Monitor and alert on unauthorized changes to sensitive files on machine images
+- Alert on unexpected machine restarts or shutdowns
+- Monitor deletion or modification of Elastic Load Balancers (ELB) for API servers
+
+### Resource Activity Monitoring
+
+- Alert on all cloud resource creation, update, and deletion activities
+- Identify anomalous patterns such as mass resource creation or deletion
+- Monitor for resources created outside expected boundaries
+
+### Resource Limit Monitoring
+
+- Alert when the number of clusters approaches or exceeds defined soft limits
+- Monitor node creation rates and alert when approaching capacity limits
+- Track usage against cloud provider quotas and organizational limits
+- Alert on excessive API calls or resource creation requests
+
+## Cluster isolation and segregation
+
+Implement multiple layers of isolation to prevent privilege escalation from workload clusters to management cluster.
+
+### Account/Subscription Separation
+
+Separate workload clusters into different AWS accounts or Azure subscriptions, and use dedicated accounts for management cluster and production workloads. This approach provides a strong security boundary at the cloud provider level.
+
+### Network Boundaries
+
+Separate workload and management clusters at the network level through VPC boundaries. Use dedicated VPC/VNet for each cluster type to prevent lateral movement between clusters.
+
+### Certificate Authority Isolation
+
+Do not build a chain of trust for cluster CAs. Each cluster must have its own independent CA to ensure that workload cluster CA compromise does not provide access to the management cluster. See [Kubernetes PKI certificates and requirements](https://kubernetes.io/docs/setup/best-practices/certificates/) for best practices.
+
+## Prevent runtime updates
+
+Implement controls to prevent tampering of machine images at runtime. Disable or restrict updates to machine images at runtime and prevent unauthorized modifications through SSH access restrictions. Following [immutable infrastructure](https://glossary.cncf.io/immutable-infrastructure/) practices ensures that any changes require deploying new images rather than modifying running systems.
diff --git a/docs/book/src/tasks/automated-machine-management/healthchecking.md b/docs/book/src/tasks/automated-machine-management/healthchecking.md
index 124acd65bf9b..bb405b470109 100644
--- a/docs/book/src/tasks/automated-machine-management/healthchecking.md
+++ b/docs/book/src/tasks/automated-machine-management/healthchecking.md
@@ -35,29 +35,42 @@ metadata:
spec:
# clusterName is required to associate this MachineHealthCheck with a particular cluster
clusterName: capi-quickstart
- # (Optional) maxUnhealthy prevents further remediation if the cluster is already partially unhealthy
- maxUnhealthy: 40%
- # (Optional) nodeStartupTimeout determines how long a MachineHealthCheck should wait for
- # a Node to join the cluster, before considering a Machine unhealthy.
- # Defaults to 10 minutes if not specified.
- # Set to 0 to disable the node startup timeout.
- # Disabling this timeout will prevent a Machine from being considered unhealthy when
- # the Node it created has not yet registered with the cluster. This can be useful when
- # Nodes take a long time to start up or when you only want condition based checks for
- # Machine health.
- nodeStartupTimeout: 10m
# selector is used to determine which Machines should be health checked
selector:
matchLabels:
nodepool: nodepool-0
- # Conditions to check on Nodes for matched Machines, if any condition is matched for the duration of its timeout, the Machine is considered unhealthy
- unhealthyNodeConditions:
- - type: Ready
- status: Unknown
- timeout: 300s
- - type: Ready
- status: "False"
- timeout: 300s
+ # checks are the checks that are used to evaluate if a Machine is healthy.
+ checks:
+ # (Optional) nodeStartupTimeout determines how long a MachineHealthCheck should wait for
+ # a Node to join the cluster, before considering a Machine unhealthy.
+ # Defaults to 10 minutes if not specified.
+ # Set to 0 to disable the node startup timeout.
+ # Disabling this timeout will prevent a Machine from being considered unhealthy when
+ # the Node it created has not yet registered with the cluster. This can be useful when
+ # Nodes take a long time to start up or when you only want condition based checks for
+ # Machine health.
+ nodeStartupTimeoutSeconds: 600
+
+ # Conditions to check on Nodes for matched Machines, if any condition is matched for the duration of its timeout, the Machine is considered unhealthy
+ unhealthyNodeConditions:
+ - type: Ready
+ status: Unknown
+ timeoutSeconds: 300
+ - type: Ready
+ status: "False"
+ timeoutSeconds: 300
+ unhealthyMachineConditions:
+ - type: "Ready"
+ status: Unknown
+ timeoutSeconds: 300
+ - type: "Ready"
+ status: "False"
+ timeoutSeconds: 300
+ # remediation configures if and how remediation is triggered if a Machine is unhealthy.
+ remediation:
+ triggerIf:
+ # (Optional) unhealthyLessThanOrEqualTo prevents further remediation if the cluster is already partially unhealthy
+ unhealthyLessThanOrEqualTo: 40%
```
Use this example as the basis for defining a MachineHealthCheck for control plane nodes managed via
@@ -70,17 +83,20 @@ metadata:
name: capi-quickstart-kcp-unhealthy-5m
spec:
clusterName: capi-quickstart
- maxUnhealthy: 100%
selector:
matchLabels:
cluster.x-k8s.io/control-plane: ""
- unhealthyNodeConditions:
+ checks:
+ unhealthyNodeConditions:
- type: Ready
status: Unknown
- timeout: 300s
+ timeoutSeconds: 300
- type: Ready
status: "False"
- timeout: 300s
+ timeoutSeconds: 300
+ remediation:
+ triggerIf:
+ unhealthyLessThanOrEqualTo: 100%
```
@@ -145,27 +161,27 @@ If for some reasons you want to remediate once maxRetry is exhausted there are t
## Remediation Short-Circuiting
-To ensure that MachineHealthChecks only remediate Machines when the cluster is healthy,
-short-circuiting is implemented to prevent further remediation via the `maxUnhealthy` and `unhealthyRange` fields within the MachineHealthCheck spec.
+To ensure that MachineHealthChecks do not perform excessive remediation of Machines,
+short-circuiting is implemented to prevent further remediation via the `remediation.triggerIf` field within the MachineHealthCheck spec.
-### Max Unhealthy
+### Unhealthy less than or equal to
-If the user defines a value for the `maxUnhealthy` field (either an absolute number or a percentage of the total Machines checked by this MachineHealthCheck),
-before remediating any Machines, the MachineHealthCheck will compare the value of `maxUnhealthy` with the number of Machines it has determined to be unhealthy.
-If the number of unhealthy Machines exceeds the limit set by `maxUnhealthy`, remediation will **not** be performed.
+If the user defines a value for the `unhealthyLessThanOrEqualTo` field (either an absolute number or a percentage of the total Machines checked by this MachineHealthCheck),
+before remediating any Machines, the MachineHealthCheck will compare the value of `unhealthyLessThanOrEqualTo` with the number of Machines it has determined to be unhealthy.
+If the number of unhealthy Machines exceeds the limit set by `unhealthyLessThanOrEqualTo`, remediation will **not** be performed.
Warning
-The default value for `maxUnhealthy` is `100%`.
+The default value for `unhealthyLessThanOrEqualTo` is `100%`.
This means the short circuiting mechanism is **disabled by default** and Machines will be remediated no matter the state of the cluster.
#### With an Absolute Value
-If `maxUnhealthy` is set to `2`:
+If `unhealthyLessThanOrEqualTo` is set to `2`:
- If 2 or fewer nodes are unhealthy, remediation will be performed
- If 3 or more nodes are unhealthy, remediation will not be performed
@@ -173,33 +189,33 @@ These values are independent of how many Machines are being checked by the Machi
#### With Percentages
-If `maxUnhealthy` is set to `40%` and there are 25 Machines being checked:
+If `unhealthyLessThanOrEqualTo` is set to `40%` and there are 25 Machines being checked:
- If 10 or fewer nodes are unhealthy, remediation will be performed
- If 11 or more nodes are unhealthy, remediation will not be performed
-If `maxUnhealthy` is set to `40%` and there are 6 Machines being checked:
+If `unhealthyLessThanOrEqualTo` is set to `40%` and there are 6 Machines being checked:
- If 2 or fewer nodes are unhealthy, remediation will be performed
- If 3 or more nodes are unhealthy, remediation will not be performed
Note, when the percentage is not a whole number, the allowed number is rounded down.
-### Unhealthy Range
+### Unhealthy in Range
-If the user defines a value for the `unhealthyRange` field (bracketed values that specify a start and an end value), before remediating any Machines,
-the MachineHealthCheck will check if the number of Machines it has determined to be unhealthy is within the range specified by `unhealthyRange`.
-If it is not within the range set by `unhealthyRange`, remediation will **not** be performed.
+If the user defines a value for the `unhealthyInRange` field (bracketed values that specify a start and an end value), before remediating any Machines,
+the MachineHealthCheck will check if the number of Machines it has determined to be unhealthy is within the range specified by `unhealthyInRange`.
+If it is not within the range set by `unhealthyInRange`, remediation will **not** be performed.
Important
-If both `maxUnhealthy` and `unhealthyRange` are specified, `unhealthyRange` takes precedence.
+If both `unhealthyLessThanOrEqualTo` and `unhealthyInRange` are specified, `unhealthyInRange` takes precedence.
#### With a range of values
-If `unhealthyRange` is set to `[3-5]` and there are 10 Machines being checked:
+If `unhealthyInRange` is set to `[3-5]` and there are 10 Machines being checked:
- If 2 or fewer nodes are unhealthy, remediation will not be performed.
- If 6 or more nodes are unhealthy, remediation will not be performed.
- In all other cases, remediation will be performed.
diff --git a/docs/book/src/tasks/certs/generate-kubeconfig.md b/docs/book/src/tasks/certs/generate-kubeconfig.md
index b9e9714a644b..3df1cb01261f 100644
--- a/docs/book/src/tasks/certs/generate-kubeconfig.md
+++ b/docs/book/src/tasks/certs/generate-kubeconfig.md
@@ -1,5 +1,8 @@
## Generating a Kubeconfig with your own CA
+This guide applies when you are [using custom certificates](using-custom-certificates.md) for a
+Cluster API workload cluster, rather than relying on automatically generated certificates.
+
1. Create a new Certificate Signing Request (CSR) for the `admin` user with the `system:masters` Kubernetes role, or specify any other role under O.
```bash
diff --git a/docs/book/src/tasks/cluster-resource-set.md b/docs/book/src/tasks/cluster-resource-set.md
index 35bdc3d3fa50..4736cc7d20be 100644
--- a/docs/book/src/tasks/cluster-resource-set.md
+++ b/docs/book/src/tasks/cluster-resource-set.md
@@ -3,12 +3,6 @@
The `ClusterResourceSet` feature is introduced to provide a way to automatically apply a set of resources (such as CNI/CSI) defined by users to matching newly-created/existing clusters.
`ClusterResourceSet` provides a basic solution for installing & managing resources, while for advanced use cases an addon provider must be used.
-**Feature gate name**: `ClusterResourceSet`
-
-**Variable name to enable/disable the feature gate**: `EXP_CLUSTER_RESOURCE_SET`
-
-The `ClusterResourceSet` feature is now GA and is enabled by default, but can be disabled by setting the `EXP_CLUSTER_RESOURCE_SET` environment variable to `false`.
-
More details on `ClusterResourceSet` can be found at:
[ClusterResourceSet CAEP](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20200220-cluster-resource-set.md)
diff --git a/docs/book/src/tasks/experimental-features/cluster-class/change-clusterclass.md b/docs/book/src/tasks/experimental-features/cluster-class/change-clusterclass.md
index e321bebe139f..9a5980813ec1 100644
--- a/docs/book/src/tasks/experimental-features/cluster-class/change-clusterclass.md
+++ b/docs/book/src/tasks/experimental-features/cluster-class/change-clusterclass.md
@@ -146,17 +146,17 @@ underlying objects like control plane and MachineDeployment act in the same way
| Changed field | Effects on Clusters |
|---------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| infrastructure.ref | Corresponding InfrastructureCluster objects are updated (in place update). |
-| controlPlane.metadata | If labels/annotations are added, changed or deleted the ControlPlane objects are updated (in place update). In case of KCP, corresponding controlPlane Machines, KubeadmConfigs and InfrastructureMachines are updated in-place. |
-| controlPlane.ref | Corresponding ControlPlane objects are updated (in place update). If updating ControlPlane objects implies changes in the spec, the corresponding ControlPlane Machines are updated accordingly (rollout). |
-| controlPlane.machineInfrastructure.ref | If the referenced template has changes only in metadata labels or annotations, the corresponding InfrastructureMachineTemplates are updated (in place update). If the referenced template has changes in the spec: - Corresponding InfrastructureMachineTemplate are rotated (create new, delete old) - Corresponding ControlPlane objects are updated with the reference to the newly created template (in place update) - The corresponding controlPlane Machines are updated accordingly (rollout). |
+| infrastructure.ref | Corresponding InfrastructureCluster objects are updated (in-place update). |
+| controlPlane.metadata | If labels/annotations are added, changed or deleted the ControlPlane objects are updated (in-place update). In case of KCP, corresponding controlPlane Machines, KubeadmConfigs and InfrastructureMachines are updated in-place. |
+| controlPlane.ref | Corresponding ControlPlane objects are updated (in-place update). If updating ControlPlane objects implies changes in the spec, the corresponding ControlPlane Machines are updated accordingly (rollout). |
+| controlPlane.machineInfrastructure.ref | If the referenced template has changes only in metadata labels or annotations, the corresponding InfrastructureMachineTemplates are updated (in-place update). If the referenced template has changes in the spec: - Corresponding InfrastructureMachineTemplate are rotated (create new, delete old) - Corresponding ControlPlane objects are updated with the reference to the newly created template (in-place update) - The corresponding controlPlane Machines are updated accordingly (rollout). |
| controlPlane.nodeDrainTimeout | If the value is changed the ControlPlane object is updated in-place. In case of KCP, the change is propagated in-place to control plane Machines. |
| controlPlane.nodeVolumeDetachTimeout | If the value is changed the ControlPlane object is updated in-place. In case of KCP, the change is propagated in-place to control plane Machines. |
| controlPlane.nodeDeletionTimeout | If the value is changed the ControlPlane object is updated in-place. In case of KCP, the change is propagated in-place to control plane Machines. |
| workers.machineDeployments | If a new MachineDeploymentClass is added, no changes are triggered to the Clusters. If an existing MachineDeploymentClass is changed, effect depends on the type of change (see below). |
-| workers.machineDeployments[].template.metadata | If labels/annotations are added, changed or deleted the MachineDeployment objects are updated (in place update) and corresponding worker Machines are updated (in-place). |
-| workers.machineDeployments[].template.bootstrap.ref | If the referenced template has changes only in metadata labels or annotations, the corresponding BootstrapTemplates are updated (in place update). If the referenced template has changes in the spec: - Corresponding BootstrapTemplate are rotated (create new, delete old). - Corresponding MachineDeployments objects are updated with the reference to the newly created template (in place update). - The corresponding worker machines are updated accordingly (rollout) |
-| workers.machineDeployments[].template.infrastructure.ref | If the referenced template has changes only in metadata labels or annotations, the corresponding InfrastructureMachineTemplates are updated (in place update). If the referenced template has changes in the spec: - Corresponding InfrastructureMachineTemplate are rotated (create new, delete old). - Corresponding MachineDeployments objects are updated with the reference to the newly created template (in place update). - The corresponding worker Machines are updated accordingly (rollout) |
+| workers.machineDeployments[].template.metadata | If labels/annotations are added, changed or deleted the MachineDeployment objects are updated (in-place update) and corresponding worker Machines are updated (in-place). |
+| workers.machineDeployments[].template.bootstrap.ref | If the referenced template has changes only in metadata labels or annotations, the corresponding BootstrapTemplates are updated (in-place update). If the referenced template has changes in the spec: - Corresponding BootstrapTemplate are rotated (create new, delete old). - Corresponding MachineDeployments objects are updated with the reference to the newly created template (in-place update). - The corresponding worker machines are updated accordingly (rollout) |
+| workers.machineDeployments[].template.infrastructure.ref | If the referenced template has changes only in metadata labels or annotations, the corresponding InfrastructureMachineTemplates are updated (in-place update). If the referenced template has changes in the spec: - Corresponding InfrastructureMachineTemplate are rotated (create new, delete old). - Corresponding MachineDeployments objects are updated with the reference to the newly created template (in-place update). - The corresponding worker Machines are updated accordingly (rollout) |
| workers.machineDeployments[].template.nodeDrainTimeout | If the value is changed the MachineDeployment is updated in-place. The change is propagated in-place to the MachineDeployment Machine. |
| workers.machineDeployments[].template.nodeVolumeDetachTimeout | If the value is changed the MachineDeployment is updated in-place. The change is propagated in-place to the MachineDeployment Machine. |
| workers.machineDeployments[].template.nodeDeletionTimeout | If the value is changed the MachineDeployment is updated in-place. The change is propagated in-place to the MachineDeployment Machine. |
diff --git a/docs/book/src/tasks/experimental-features/cluster-class/write-clusterclass.md b/docs/book/src/tasks/experimental-features/cluster-class/write-clusterclass.md
index 946a5601af12..347ad38f85e2 100644
--- a/docs/book/src/tasks/experimental-features/cluster-class/write-clusterclass.md
+++ b/docs/book/src/tasks/experimental-features/cluster-class/write-clusterclass.md
@@ -194,6 +194,13 @@ spec:
- type: Ready
status: "False"
timeoutSeconds: 300
+ unhealthyMachineConditions:
+ - type: "Ready"
+ status: Unknown
+ timeoutSeconds: 300
+ - type: "Ready"
+ status: "False"
+ timeoutSeconds: 300
remediation:
triggerIf:
unhealthyLessThanOrEqualTo: 33%
@@ -211,6 +218,13 @@ spec:
- type: Ready
status: "False"
timeoutSeconds: 300
+ unhealthyMachineConditions:
+ - type: Ready
+ status: Unknown
+ timeoutSeconds: 300
+ - type: Ready
+ status: "False"
+ timeoutSeconds: 300
remediation:
triggerIf:
unhealthyInRange: "[0-2]"
@@ -232,7 +246,7 @@ in `KubeadmControlPlane`. Use cases like this can be implemented with ClusterCla
The following example shows how variables can be defined in the ClusterClass.
A variable definition specifies the name and the schema of a variable and if it is
required. The schema defines how a variable is defaulted and validated. It supports
-a subset of the schema of CRDs. For more information please see the [godoc](https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api/cluster.x-k8s.io/ClusterClass/v1beta1#spec-variables-schema-openAPIV3Schema).
+a subset of the schema of CRDs. For more information please see the [godoc](https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api/cluster.x-k8s.io/ClusterClass/v1beta2#spec-variables-schema-openAPIV3Schema).
```yaml
apiVersion: cluster.x-k8s.io/v1beta2
@@ -267,7 +281,7 @@ The variable can then be used in a patch to set a field on a template referenced
The `selector` specifies on which template the patch should be applied. `jsonPatches` specifies which JSON
patches should be applied to that template. In this case we set the `imageRepository` field of the
`KubeadmControlPlaneTemplate` to the value of the variable `imageRepository`. For more information
-please see the [godoc](https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api/cluster.x-k8s.io/ClusterClass/v1beta1#spec-patches-definitions).
+please see the [godoc](https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api/cluster.x-k8s.io/ClusterClass/v1beta2#spec-patches-definitions).
```yaml
apiVersion: cluster.x-k8s.io/v1beta2
diff --git a/docs/book/src/tasks/experimental-features/experimental-features.md b/docs/book/src/tasks/experimental-features/experimental-features.md
index 04eac58daab9..75b8c27e6993 100644
--- a/docs/book/src/tasks/experimental-features/experimental-features.md
+++ b/docs/book/src/tasks/experimental-features/experimental-features.md
@@ -4,16 +4,23 @@ Cluster API now ships with a new experimental package that lives under the `exp/
temporary location for features which will be moved to their permanent locations after graduation. Users can experiment with these features by enabling them using feature gates.
Currently Cluster API has the following experimental features:
+* `ClusterTopology` (env var: `CLUSTER_TOPOLOGY`): [ClusterClass](./cluster-class/index.md)
+* `InPlaceUpdates` (env var: `EXP_IN_PLACE_UPDATES`):
+ * Allows users to execute changes on existing machines without deleting the machines and creating a new one.
+ * See the [proposal](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/20240807-in-place-updates.md) for more details.
+* `KubeadmBootstrapFormatIgnition` (env var: `EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION`): [Ignition](./ignition.md)
* `MachinePool` (env var: `EXP_MACHINE_POOL`): [MachinePools](./machine-pools.md)
* `MachineSetPreflightChecks` (env var: `EXP_MACHINE_SET_PREFLIGHT_CHECKS`): [MachineSetPreflightChecks](./machineset-preflight-checks.md)
-* `PriorityQueue` (env var: `EXP_PRIORITY_QUEUE`): Enables the usage of the controller-runtime PriorityQueue: https://github.com/kubernetes-sigs/controller-runtime/issues/2374
+* `MachineTaintPropagation` (env var: `EXP_MACHINE_TAINT_PROPAGATION`):
+ * Allows in-place propagation of taints to nodes using the taint fields within Machines, MachineSets, and MachineDeployments.
+ * In future this feature is planned to also cover topology clusters and KCP. See the proposal [Propagating taints from Cluster API to Nodes](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20250513-propogate-taints.md) for more information.
* `MachineWaitForVolumeDetachConsiderVolumeAttachments` (env var: `EXP_MACHINE_WAITFORVOLUMEDETACH_CONSIDER_VOLUMEATTACHMENTS`):
* During Machine drain the Machine controller waits for volumes to be detached. Per default, the controller considers
`Nodes.status.volumesAttached` and `VolumesAttachments`. This feature flag allows to opt-out from considering `VolumeAttachments`.
The feature gate was added to allow to opt-out in case unforeseen issues occur with `VolumeAttachments`.
-* `ClusterTopology` (env var: `CLUSTER_TOPOLOGY`): [ClusterClass](./cluster-class/index.md)
+* `PriorityQueue` (env var: `EXP_PRIORITY_QUEUE`): Enables the usage of the controller-runtime PriorityQueue: https://github.com/kubernetes-sigs/controller-runtime/issues/2374
+* `ReconcilerRateLimiting` (env var: `EXP_RECONCILER_RATE_LIMITING`): Enables reconciler rate-limiting: https://github.com/kubernetes-sigs/cluster-api/issues/13005
* `RuntimeSDK` (env var: `EXP_RUNTIME_SDK`): [RuntimeSDK](./runtime-sdk/index.md)
-* `KubeadmBootstrapFormatIgnition` (env var: `EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION`): [Ignition](./ignition.md)
## Enabling Experimental Features for Management Clusters Started with clusterctl
diff --git a/docs/book/src/tasks/experimental-features/machine-pools.md b/docs/book/src/tasks/experimental-features/machine-pools.md
index e8b7290c4620..ea01b3a7a105 100644
--- a/docs/book/src/tasks/experimental-features/machine-pools.md
+++ b/docs/book/src/tasks/experimental-features/machine-pools.md
@@ -1,28 +1,128 @@
# Experimental Feature: MachinePool (beta)
-The `MachinePool` feature provides a way to manage a set of machines by defining a common configuration, number of desired machine replicas etc. similar to `MachineDeployment`,
-except `MachineSet` controllers are responsible for the lifecycle management of the machines for `MachineDeployment`, whereas in `MachinePools`,
-each infrastructure provider has a specific solution for orchestrating these `Machines`.
-
**Feature gate name**: `MachinePool`
**Variable name to enable/disable the feature gate**: `EXP_MACHINE_POOL`
-Infrastructure providers can support this feature by implementing their specific `MachinePool` such as `AzureMachinePool`.
+## Table of Contents
+
+- [Introduction](#introduction)
+- [What is a MachinePool?](#what-is-a-machinepool)
+- [Why MachinePool?](#why-machinepool)
+- [When to use MachinePool vs MachineDeployment](#when-to-use-machinepool-vs-machinedeployment)
+- [Enabling MachinePool](#enabling-machinepool)
+- [MachinePool provider implementations](#machinepool-provider-implementations)
+- [Additional Resources](#additional-resources)
+
+## Introduction
+
+Cluster API (CAPI) manages Kubernetes worker nodes primarily through Machine, MachineSet, and MachineDeployment objects. These primitives manage nodes individually (Machines), and have served well across a wide variety of providers.
+
+However, many infrastructure providers already offer first-class abstractions for groups of compute instances (AWS: Auto Scaling Groups (ASG), Azure: Virtual Machine Scale Sets (VMSS), or GCP: Managed Instance Groups (MIG)). These primitives natively support scaling, rolling upgrades, and health management.
+
+MachinePool brings these provider features into Cluster API by introducing a higher-level abstraction for managing a group of machines as a single unit.
+
+## What is a MachinePool?
+
+A MachinePool is a Cluster API resource representing a group of worker nodes. Instead of reconciling each machine individually, CAPI delegates lifecycle management to the infrastructure provider.
+
+- **MachinePool (core API)**: defines desired state (replicas, Kubernetes version, bootstrap template, infrastructure reference).
+- **InfrastructureMachinePool (provider API)**: provides an implementation that backs a pool. A provider may offer more than one type depending on how it is managed. For example:
+ - `AWSMachinePool`: self-managed ASG
+ - `AWSManagedMachinePool`: EKS managed node group
+ - `AzureMachinePool`: VM Scale Set
+ - `AzureManagedMachinePool`: AKS managed node pool
+ - `GCPManagedMachinePool`: GKE managed node pool
+ - `OCIManagedMachinePool`: OKE managed node pool
+ - `ScalewayManagedMachinePool`: Scaleway Kapsule node pool
+- **Bootstrap configuration**: still applies (e.g., kubeadm configs), ensuring that new nodes join the cluster with the correct setup.
+
+The MachinePool controller coordinates between the Cluster API core and provider-specific implementations:
+
+- Reconciles desired replicas with the infrastructure pool.
+- Matches provider IDs from the infrastructure resource with Kubernetes Nodes in the workload cluster.
+- Updates MachinePool status (ready replicas, conditions, etc.)
+
+## Why MachinePool?
+
+### Leverage provider primitives
+
+Most cloud providers already manage scaling, instance replacement, and health monitoring at the group level. MachinePool lets CAPI delegate lifecycle operations instead of duplicating that logic.
+
+**Example:**
+- AWS Auto Scaling Groups replace failed nodes automatically.
+- Azure VM Scale Sets support rolling upgrades with configurable surge/availability strategies.
+
+### Simplify upgrades and scaling
+
+Upgrades and scaling events are managed at the pool level:
+- Update Kubernetes version or bootstrap template → cloud provider handles rolling replacement.
+- Scale up/down replicas → provider adjusts capacity.
+
+This provides more predictable, cloud-native semantics compared to reconciling many individual Machine objects.
+
+### Autoscaling integration
+
+MachinePool integrates with the Cluster Autoscaler in the same way that MachineDeployments do. In practice, the autoscaler treats a MachinePool as a node group, enabling scale-up and scale-down decisions based on cluster load.
+
+### Tradeoffs and limitations
+
+While powerful, MachinePool comes with tradeoffs:
+
+- **Infrastructure provider complexity**: requires infrastructure providers to implement and maintain an InfrastructureMachinePool type.
+- **Less per-machine granularity**: you cannot configure each node individually; the pool defines a shared template.
+ > **Note**: While this is typically true, certain cloud providers do offer flexibility.
+ > **Example**: AWS allows `AWSMachinepool.spec.mixedInstancesPolicy.instancesDistribution` while Azure allows `AzureMachinePool.spec.orchestrationMode`.
+- **Complex reconciliation**: node-to-providerID matching introduces edge cases (delays, inconsistent states).
+- **Draining**: The cloud resources for MachinePool may not necessarily support draining of Kubernetes worker nodes. For example, with an AWSMachinePool, AWS would normally terminate instances as quickly as possible. To solve this, tools like `aws-node-termination-handler` combined with ASG lifecycle hooks (defined in `AWSMachine.spec.lifecycleHooks`) must be installed, and is not a built-in feature of the infrastructure provider (CAPA in this example).
+- **Maturity**: The MachinePool API is still considered experimental/beta.
+
+## When to use MachinePool vs MachineDeployment
+
+Both MachineDeployment and MachinePool are valid options for managing worker nodes in Cluster API. The right choice depends on your infrastructure provider's capabilities and your operational requirements.
+
+### Use MachinePool when:
+
+- **Cloud provider supports scaling group primitives**: AWS Auto Scaling Groups, Azure Virtual Machine Scale Sets, GCP Managed Instance Groups, OCI Compute Instances, Scaleway Kapsule. These resources natively handle scaling, rolling upgrades, and health checks.
+- **You want to leverage cloud provider-level features**: MachinePool enables direct use of cloud-native upgrade strategies (e.g., surge, maxUnavailable) and autoscaling behaviors.
+
+### Use MachineDeployment when:
+
+- **The provider does not support scaling groups**: Common in environments such as bare metal, vSphere, or Docker.
+- **You need fine-grained per-machine control**: MachineDeployments allow unique bootstrap configurations, labels, and taints across different MachineSets.
+- **You prefer maturity and portability**: MachineDeployment is stable, GA, and supported across all providers. MachinePool remains experimental in some implementations.
+
+## Enabling MachinePool
+
+Starting from Cluster API v1.7, MachinePool is enabled by default. No additional configuration is needed.
+
+For Cluster API versions prior to v1.7, you need to set the `EXP_MACHINE_POOL` environment variable:
+
+```bash
+export EXP_MACHINE_POOL=true
+clusterctl init
+```
+
+Or when upgrading an existing management cluster:
+
+```bash
+export EXP_MACHINE_POOL=true
+clusterctl upgrade
+```
-More details on `MachinePool` can be found at:
-[MachinePool CAEP](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20190919-machinepool-api.md)
+## MachinePool provider implementations
-For developer docs on the MachinePool controller, see [here](./../../developer/core/controllers/machine-pool.md).
+The following Cluster API infrastructure providers have implemented support for MachinePools:
-## MachinePools vs MachineDeployments
+| Provider | Implementations | Status |
+| --- | --- | --- |
+| [AWS](https://cluster-api-aws.sigs.k8s.io/topics/machinepools.html) | `AWSManagedMachinePool` `AWSMachinePool` `ROSAMachinePool` | Implemented, MachinePoolMachines supported |
+| [Azure](https://capz.sigs.k8s.io/self-managed/machinepools) | `AzureASOManagedMachinePool` `AzureManagedMachinePool` `AzureMachinePool` | Implemented, MachinePoolMachines supported |
+| [GCP](https://github.com/kubernetes-sigs/cluster-api-provider-gcp/pull/1506) | `GCPMachinePool` | In Progress |
+| [OCI](https://oracle.github.io/cluster-api-provider-oci/managed/managedcluster.html) | `OCIManagedMachinePool` `OCIMachinePool` | Implemented, MachinePoolMachines supported |
+| [Scaleway](https://github.com/scaleway/cluster-api-provider-scaleway/blob/main/docs/scalewaymanagedmachinepool.md) | `ScalewayManagedMachinePool` | Implemented |
-Although MachinePools provide a similar feature to MachineDeployments, MachinePools do so by leveraging an InfraMachinePool which corresponds 1:1 with a resource like VMSS on Azure or Autoscaling Groups on AWS which we treat as a black box. When a MachinePool is scaled up, the InfraMachinePool scales itself up and populates its provider ID list based on the response from the infrastructure provider. On the other hand, when a MachineDeployment is scaled up, new Machines are created which then create an individual InfraMachine, which corresponds to a VM in any infrastructure provider.
+## Additional Resources
-| MachinePools | MachineDeployments |
-| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
-| Creates new instances through a single infrastructure resource like VMSS in Azure or Autoscaling Groups in AWS. | Creates new instances by creating new Machines, which create individual VM instances on the infra provider. |
-| Set of instances is orchestrated by the infrastructure provider. | Set of instances is orchestrated by Cluster API using a MachineSet. |
-| Each MachinePool corresponds 1:1 with an associated InfraMachinePool. | Each MachineDeployment includes a MachineSet, and for each replica, it creates a Machine and InfraMachine. |
-| Each MachinePool requires only a single BootstrapConfig. | Each MachineDeployment uses an InfraMachineTemplate and a BootstrapConfigTemplate, and each Machine requires a unique BootstrapConfig. |
-| Maintains a list of instances in the `providerIDList` field in the MachinePool spec. This list is populated based on the response from the infrastructure provider. | Maintains a list of instances through the Machine resources owned by the MachineSet. |
+- **Design Document**: [MachinePool CAEP](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20190919-machinepool-api.md)
+- **Developer Documentation**: [MachinePool Controller](./../../developer/core/controllers/machine-pool.md)
diff --git a/docs/book/src/tasks/experimental-features/runtime-sdk/implement-extensions.md b/docs/book/src/tasks/experimental-features/runtime-sdk/implement-extensions.md
index f07abb9664b2..82c8024ddc96 100644
--- a/docs/book/src/tasks/experimental-features/runtime-sdk/implement-extensions.md
+++ b/docs/book/src/tasks/experimental-features/runtime-sdk/implement-extensions.md
@@ -304,7 +304,7 @@ created, the extension will detect the associated service and discover the assoc
check the status of the ExtensionConfig. Below is an example of `ExtensionConfig` -
```yaml
-apiVersion: runtime.cluster.x-k8s.io/v1alpha1
+apiVersion: runtime.cluster.x-k8s.io/v1beta2
kind: ExtensionConfig
metadata:
annotations:
diff --git a/docs/book/src/tasks/experimental-features/runtime-sdk/implement-in-place-update-hooks.md b/docs/book/src/tasks/experimental-features/runtime-sdk/implement-in-place-update-hooks.md
new file mode 100644
index 000000000000..59f8af151662
--- /dev/null
+++ b/docs/book/src/tasks/experimental-features/runtime-sdk/implement-in-place-update-hooks.md
@@ -0,0 +1,279 @@
+# Implementing in-place update hooks
+
+
+
+Caution
+
+Please note Runtime SDK is an advanced feature. If implemented incorrectly, a failing Runtime Extension can severely impact the Cluster API runtime.
+
+
+
+## Introduction
+
+The proposal for [in-place updates in Cluster API](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/20240807-in-place-updates.md)
+introduced extensions allowing users to execute changes on existing machines without deleting the machines and creating a new one.
+
+Notably, the Cluster API user experience remain the same as of today no matter of the in-place update feature is enabled
+or not e.g. in order to trigger a MachineDeployment rollout, you have to rotate a template, etc.
+
+Users should care ONLY about the desired state (as of today).
+
+Cluster API is responsible to choose the best strategy to achieve desired state, and with the introduction of
+update extensions, Cluster API is expanding the set of tools that can be used to achieve the desired state.
+
+If external update extensions can not cover the totality of the desired changes, CAPI will fall back to Cluster API’s default,
+immutable rollouts.
+
+Cluster API will be also responsible to determine which Machine/MachineSet should be updated, as well as to handle rollout
+options like MaxSurge/MaxUnavailable. With this regard:
+
+- Machines updating in-place are considered not available, because in-place updates are always considered as potentially disruptive.
+ - For control plane machines, if maxSurge is one, a new machine must be created first, then as soon as there is
+ “buffer” for in-place, in-place update can proceed.
+ - KCP will not use in-place in case it will detect that it can impact health of the control plane.
+ - For workers machines, if maxUnavailable is zero, a new machine must be created first, then as soon as there
+ is “buffer” for in-place, in-place update can proceed.
+ - When in-place is possible, the system should try to in-place update as many machines as possible.
+ In practice, this means that maxSurge might be not fully used (it is used only for scale up by one if maxUnavailable=0).
+ - No in-place updates are performed for workers machines when using rollout strategy `OnDelete`.
+
+
+
+Important!
+
+Cluster API will call the in-place extensions only if the `InPlaceUpdates` feature flag is enabled.
+
+Also, please note that the current implementation of the [in-place updates proposal](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/20240807-in-place-updates.md) only allows registering one extension for the `CanUpdateMachine`, `CanUpdateMachineSet` and `UpdateMachine` hooks.
+
+
+
+
+* [Implementing in-place update hooks](#implementing-in-place-update-hooks)
+ * [Introduction](#introduction)
+ * [Guidelines](#guidelines)
+ * [Definitions](#definitions)
+ * [CanUpdateMachine](#canupdatemachine)
+ * [CanUpdateMachineSet](#canupdatemachineset)
+ * [UpdateMachine](#updatemachine)
+
+
+## Guidelines
+
+All guidelines defined in [Implementing Runtime Extensions](implement-extensions.md#guidelines) apply to the
+implementation of Runtime Extensions for upgrade plan hooks as well.
+
+In summary, Runtime Extensions are components that should be designed, written and deployed with great caution given
+that they can affect the proper functioning of the Cluster API runtime. A poorly implemented Runtime Extension could
+potentially block upgrade transitions from happening.
+
+Following recommendations are especially relevant:
+
+* [Timeouts](implement-extensions.md#timeouts)
+* [Idempotence](implement-extensions.md#idempotence)
+* [Deterministic result](implement-extensions.md#deterministic-result)
+* [Error messages](implement-extensions.md#error-messages)
+* [Error management](implement-extensions.md#error-management)
+* [Avoid dependencies](implement-extensions.md#avoid-dependencies)
+
+## Definitions
+
+For additional details about the OpenAPI spec of the upgrade plan hooks, please download the [`runtime-sdk-openapi.yaml`]({{#releaselink repo:"https://github.com/kubernetes-sigs/cluster-api" gomodule:"sigs.k8s.io/cluster-api" asset:"runtime-sdk-openapi.yaml" version:"1.11.x"}})
+file and then open it from the [Swagger UI](https://editor.swagger.io/).
+
+### CanUpdateMachine
+
+This hook is called by KCP when performing the "can update in-place" for a control plane machine.
+
+Example request:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: CanUpdateMachineRequest
+settings:
+current:
+ machine:
+ apiVersion: cluster.x-k8s.io/v1beta2
+ kind: Machine
+ metadata:
+ name: test-cluster
+ namespace: test-ns
+ spec:
+ ...
+ infrastructureMachine:
+ apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
+ kind: VSphereMachine
+ metadata:
+ name: test-cluster
+ namespace: test-ns
+ spec:
+ ...
+ boostrapConfig:
+ apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
+ kind: KubeadmConfig
+ metadata:
+ name: test-cluster
+ namespace: test-ns
+ spec:
+ ...
+desired:
+ machine:
+ ...
+ infrastructureMachine:
+ ...
+ boostrapConfig:
+ ...
+```
+
+Note:
+- All the objects will have the latest API version known by Cluster API.
+- Only spec is provided, status fields are not included
+- In a future release, when registering more than one extension for the `CanUpdateMachine` will be supported, the current state will already include changes that can be handled in-place by other runtime extensions.
+
+Example Response:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: CanUpdateMachineResponse
+status: Success # or Failure
+message: "error message if status == Failure"
+machinePatch:
+ patchType: JSONPatch
+ patch:
+infrastructureMachinePatch:
+ ...
+boostrapConfigPatch:
+ ...
+```
+
+Note:
+- Extensions should return per-object patches to be applied on current objects to indicate which changes they can handle in-place.
+- Only fields in Machine/InfraMachine/BootstrapConfig spec have to be covered by patches
+- Patches must be in JSONPatch or JSONMergePatch format
+
+### CanUpdateMachineSet
+
+This hook is called by the MachineDeployment controller when performing the "can update in-place" for all the Machines controlled by
+a MachineSet.
+
+Example request:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: CanUpdateMachineSetRequest
+settings:
+current:
+ machineSet:
+ apiVersion: cluster.x-k8s.io/v1beta2
+ kind: MachineSet
+ metadata:
+ name: test-cluster
+ namespace: test-ns
+ spec:
+ ...
+ infrastructureMachineTemplate:
+ apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
+ kind: VSphereMachineTemplate
+ metadata:
+ name: test-cluster
+ namespace: test-ns
+ spec:
+ ...
+ boostrapConfigTemplate:
+ apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
+ kind: KubeadmConfigTemplate
+ metadata:
+ name: test-cluster
+ namespace: test-ns
+ spec:
+ ...
+desired:
+ machineSet:
+ ...
+ infrastructureMachineTemplate:
+ ...
+ boostrapConfigTemplate:
+ ...
+```
+
+Note:
+- All the objects will have the latest API version known by Cluster API.
+- Only spec is provided, status fields are not included
+- In a future release, when registering more than one extension for the `CanUpdateMachineSet` will be supported, the current state will already include changes that can be handled in-place by other runtime extensions.
+
+Example Response:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: CanUpdateMachineSetResponse
+status: Success # or Failure
+message: "error message if status == Failure"
+machineSetPatch:
+ patchType: JSONPatch
+ patch:
+infrastructureMachineTemplatePatch:
+ ...
+boostrapConfigTemplatePatch:
+ ...
+```
+
+Note:
+- Extensions should return per-object patches to be applied on current objects to indicate which changes they can handle in-place.
+- Only fields in Machine/InfraMachine/BootstrapConfig spec have to be covered by patches
+- Patches must be in JSONPatch or JSONMergePatch format
+
+### UpdateMachine
+
+This hook is called by the Machine controller when performing the in-place updates for a Machine.
+
+Example request:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: UpdateMachineRequest
+settings:
+desired:
+ machine:
+ apiVersion: cluster.x-k8s.io/v1beta2
+ kind: Machine
+ metadata:
+ name: test-cluster
+ namespace: test-ns
+ spec:
+ ...
+ infrastructureMachineTemplate:
+ apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
+ kind: VSphereMachineTemplate
+ metadata:
+ name: test-cluster
+ namespace: test-ns
+ spec:
+ ...
+ boostrapConfigTemplate:
+ apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
+ kind: KubeadmConfigTemplate
+ metadata:
+ name: test-cluster
+ namespace: test-ns
+ spec:
+ ...
+```
+
+Note:
+- Only desired is provided (the external updater extension should know current state of the Machine).
+- Only spec is provided, status fields are not included
+
+Example Response:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: UpdateMachineSetResponse
+status: Success # or Failure
+message: "error message if status == Failure"
+retryAfterSeconds: 10
+```
+
+Note:
+- The status of the update operation is determined by the CommonRetryResponse fields:
+ - Status=Success + RetryAfterSeconds > 0: update is in progress
+ - Status=Success + RetryAfterSeconds = 0: update completed successfully
+ - Status=Failure: update failed
diff --git a/docs/book/src/tasks/experimental-features/runtime-sdk/implement-lifecycle-hooks.md b/docs/book/src/tasks/experimental-features/runtime-sdk/implement-lifecycle-hooks.md
index 9b9438fdabc3..1e30e1443414 100644
--- a/docs/book/src/tasks/experimental-features/runtime-sdk/implement-lifecycle-hooks.md
+++ b/docs/book/src/tasks/experimental-features/runtime-sdk/implement-lifecycle-hooks.md
@@ -14,8 +14,24 @@ The lifecycle hooks allow hooking into the Cluster lifecycle. The following diag

-Please see the corresponding [CAEP](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20220414-runtime-hooks.md)
-for additional background information.
+Please see the corresponding [CAEP](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20220414-runtime-hooks.md) as well as the proposal for [Chained and efficient upgrades](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/20250513-chained-and-efficient-upgrades-for-clusters-with-managed-topologies.md)
+for additional background information.
+
+
+* [Implementing Lifecycle Hook Runtime Extensions](#implementing-lifecycle-hook-runtime-extensions)
+ * [Introduction](#introduction)
+ * [Guidelines](#guidelines)
+ * [Definitions](#definitions)
+ * [BeforeClusterCreate](#beforeclustercreate)
+ * [AfterControlPlaneInitialized](#aftercontrolplaneinitialized)
+ * [BeforeClusterUpgrade](#beforeclusterupgrade)
+ * [BeforeControlPlaneUpgrade](#beforecontrolplaneupgrade)
+ * [AfterControlPlaneUpgrade](#aftercontrolplaneupgrade)
+ * [BeforeWorkersUpgrade](#beforeworkersupgrade)
+ * [AfterWorkersUpgrade](#afterworkersupgrade)
+ * [AfterClusterUpgrade](#afterclusterupgrade)
+ * [BeforeClusterDelete](#beforeclusterdelete)
+
## Guidelines
@@ -35,13 +51,16 @@ Following recommendations are especially relevant:
## Definitions
+For additional details about the OpenAPI spec of the lifecycle hooks, please download the [`runtime-sdk-openapi.yaml`]({{#releaselink repo:"https://github.com/kubernetes-sigs/cluster-api" gomodule:"sigs.k8s.io/cluster-api" asset:"runtime-sdk-openapi.yaml" version:"1.11.x"}})
+file and then open it from the [Swagger UI](https://editor.swagger.io/).
+
### BeforeClusterCreate
This hook is called after the Cluster object has been created by the user, immediately before all the objects which
are part of a Cluster topology(*) are going to be created. Runtime Extension implementers can use this hook to
determine/prepare add-ons for the Cluster and block the creation of those objects until everything is ready.
-#### Example Request:
+Example Request:
```yaml
apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
@@ -59,7 +78,7 @@ cluster:
...
```
-#### Example Response:
+Example Response:
```yaml
apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
@@ -69,8 +88,6 @@ message: "error message if status == Failure"
retryAfterSeconds: 10
```
-For additional details, you can see the full schema in Swagger UI .
-
(*) The objects which are part of a Cluster topology are the infrastructure Cluster, the Control Plane, the
MachineDeployments and the templates derived from the ClusterClass.
@@ -82,7 +99,7 @@ This usually happens sometime during the first CP machine provisioning or immedi
Runtime Extension implementers can use this hook to execute tasks, for example component installation on workload clusters, that are only
possible once the Control Plane is available. This hook does not block any further changes to the Cluster.
-#### Example Request:
+Example Request:
```yaml
apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
@@ -100,7 +117,7 @@ cluster:
...
```
-#### Example Response:
+Example Response:
```yaml
apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
@@ -109,26 +126,81 @@ status: Success # or Failure
message: "error message if status == Failure"
```
-For additional details, you can see the full schema in Swagger UI .
-
### BeforeClusterUpgrade
This hook is called after the Cluster object has been updated with a new `spec.topology.version` by the user, and
immediately before the new version is going to be propagated to the control plane (*). Runtime Extension implementers
can use this hook to execute pre-upgrade add-on tasks and block upgrades of the ControlPlane and Workers.
+(*) Under normal circumstances `spec.topology.version` gets propagated to the control plane immediately; however
+if previous upgrades or worker machine rollouts are still in progress, the system waits for those operations
+to complete before starting the new upgrade.
+
Note: While the upgrade is blocked changes made to the Cluster Topology will be delayed propagating to the underlying
objects while the object is waiting for upgrade. Example: modifying ControlPlane/MachineDeployments (think scale up),
or creating new MachineDeployments will be delayed until the target ControlPlane/MachineDeployment is ready to pick up the upgrade.
-This ensures that the ControlPlane and MachineDeployments do not perform a rollout prematurely while waiting to be rolled out again for the version upgrade (no double rollouts).
+This ensures that the ControlPlane and MachineDeployments do not perform a rollout prematurely while waiting to be rolled out again
+for the version upgrade (no double rollouts).
This also ensures that any version specific changes are only pushed to the underlying objects also at the correct version.
-#### Example Request:
+Example Request:
```yaml
apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
kind: BeforeClusterUpgradeRequest
settings:
+cluster:
+ apiVersion: cluster.x-k8s.io/v1beta1
+ kind: Cluster
+ metadata:
+ name: test-cluster
+ namespace: test-ns
+ spec:
+ ...
+ status:
+ ...
+fromKubernetesVersion: "v1.30.0"
+toKubernetesVersion: "v1.33.0"
+controlPlaneUpgrades:
+ - version: v1.31.0
+ - version: v1.32.3
+ - version: v1.33.0
+workersUpgrades:
+ - version: v1.32.3
+ - version: v1.33.0
+```
+
+Note: The `controlPlaneUpgrades` and the `workersUpgrades` fields contains the intermediate steps to reach the target version,
+which is also included in the list.
+
+Example Response:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: BeforeClusterUpgradeResponse
+status: Success # or Failure
+message: "error message if status == Failure"
+retryAfterSeconds: 10
+```
+
+### BeforeControlPlaneUpgrade
+
+This hook is called before a new version is propagated to the control plane object, which happens as many times
+as defined by the upgrade plan.
+
+Runtime Extension implementers can use this hook to execute pre-upgrade add-on tasks and block upgrades of the ControlPlane.
+
+Note:
+- When an upgrade is starting, `BeforeControlPlaneUpgrade` will be called after `BeforeClusterUpgrade` is completed.
+- When an upgrade is in progress `BeforeControlPlaneUpgrade` will be called for each intermediate version that will
+ be applied to the control plane (instead `BeforeClusterUpgrade` will be called only once at the beginning of the upgrade).
+
+Example Request:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: BeforeControlPlaneUpgradeRequest
+settings:
cluster:
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
@@ -139,32 +211,43 @@ cluster:
...
status:
...
-fromKubernetesVersion: "v1.21.2"
-toKubernetesVersion: "v1.22.0"
+fromKubernetesVersion: "v1.30.0"
+toKubernetesVersion: "v1.33.0"
+controlPlaneUpgrades:
+ - version: v1.31.0
+ - version: v1.32.3
+ - version: v1.33.0
+workersUpgrades:
+ - version: v1.32.3
+ - version: v1.33.0
```
-#### Example Response:
+Note: The `controlPlaneUpgrades` and the `workersUpgrades` fields contains the intermediate steps to reach the target version,
+which is also included in the list.
+
+Example Response:
```yaml
apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
-kind: BeforeClusterUpgradeResponse
+kind: BeforeControlPlaneUpgradeResponse
status: Success # or Failure
message: "error message if status == Failure"
retryAfterSeconds: 10
```
-For additional details, you can see the full schema in Swagger UI .
-
-(*) Under normal circumstances `spec.topology.version` gets propagated to the control plane immediately; however
- if previous upgrades or worker machine rollouts are still in progress, the system waits for those operations
- to complete before starting the new upgrade.
-
### AfterControlPlaneUpgrade
-This hook is called after the entire control plane has been upgraded to the version specified in `spec.topology.version`,
-and immediately before the new version is going to be propagated to the MachineDeployments of the Cluster.
-Runtime Extension implementers can use this hook to execute post-upgrade add-on tasks and block upgrades to workers
-until everything is ready.
+This hook is called after the control plane has been upgraded to the version specified in `spec.topology.version`
+or to an intermediate version in the upgrade plan and:
+- if workers upgrade can be skipped for this version and this is an intermediate version of an upgrade plan,
+ immediately before calling the `BeforeControlPlaneUpgrade` hook for the next version in the upgrade plane.
+- if workers upgrade must be performed for this version,
+ immediately before calling the `BeforeWorkersUpgrade` hook for the same version.
+- if the cluster does not have workers and this is the last version of an upgrade plan,
+ immediately before calling the `AfterClusterUpgrade` hook.
+
+Runtime Extension implementers can use this hook to execute post-upgrade add-on tasks and block upgrades to the next
+version of the control plane or to workers until everything is ready.
Note: While the MachineDeployments upgrade is blocked changes made to existing MachineDeployments and creating new MachineDeployments
will be delayed while the object is waiting for upgrade. Example: modifying MachineDeployments (think scale up),
@@ -172,12 +255,60 @@ or creating new MachineDeployments will be delayed until the target MachineDeplo
This ensures that the MachineDeployments do not perform a rollout prematurely while waiting to be rolled out again for the version upgrade (no double rollouts).
This also ensures that any version specific changes are only pushed to the underlying objects also at the correct version.
-#### Example Request:
+Example Request:
```yaml
apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
kind: AfterControlPlaneUpgradeRequest
settings:
+cluster:
+ apiVersion: cluster.x-k8s.io/v1beta1
+ kind: Cluster
+ metadata:
+ name: test-cluster
+ namespace: test-ns
+ spec:
+ ...
+ status:
+ ...
+kubernetesVersion: "v1.30.0"
+controlPlaneUpgrades:
+ - version: v1.31.0
+ - version: v1.32.3
+ - version: v1.33.0
+workersUpgrades:
+ - version: v1.32.3
+ - version: v1.33.0
+```
+
+Note: The `controlPlaneUpgrades` and the `workersUpgrades` fields contains the intermediate steps to reach the target version,
+which is also included in the list.
+
+Example Response:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: AfterControlPlaneUpgradeResponse
+status: Success # or Failure
+message: "error message if status == Failure"
+retryAfterSeconds: 10
+```
+
+### BeforeWorkersUpgrade
+
+This hook is called before a new version is propagated to workers. Runtime Extension implementers
+can use this hook to execute pre-upgrade add-on tasks and block upgrades of Workers.
+
+Note:
+- This hook will be called only if workers upgrade must be performed for an intermediate version of a chained upgrade
+ or when upgrading to the target `spec.topology.version`.
+
+Example Request:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: BeforeWorkersUpgradeRequest
+settings:
cluster:
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
@@ -188,28 +319,85 @@ cluster:
...
status:
...
-kubernetesVersion: "v1.22.0"
+fromKubernetesVersion: "v1.30.0"
+toKubernetesVersion: "v1.33.0"
+controlPlaneUpgrades:
+ - version: v1.31.0
+ - version: v1.32.3
+ - version: v1.33.0
+workersUpgrades:
+ - version: v1.32.3
+ - version: v1.33.0
```
-#### Example Response:
+Note: The `controlPlaneUpgrades` and the `workersUpgrades` fields contains the intermediate steps to reach the target version,
+which is also included in the list.
+
+Example Response:
```yaml
apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
-kind: AfterControlPlaneUpgradeResponse
+kind: BeforeWorkersUpgradeResponse
status: Success # or Failure
message: "error message if status == Failure"
retryAfterSeconds: 10
```
-For additional details, you can see the full schema in Swagger UI .
+### AfterWorkersUpgrade
+
+This hook is called after all the workers have been upgraded to the version specified in `spec.topology.version`
+or to an intermediate version in the upgrade plan, and:
+- if the upgrade plan is completed and the entire cluster is at `spec.topology.version`, immediately before calling the `AfterClusterUpgrade` hook.
+- if the upgrade plan is not complete and the entire cluster is now at one of the intermediate versions, immediately before
+ calling `BeforeControlPlaneUpgrade` hook for the next intermediate step; in this case, the hook will ensure the control
+ can't to move to the next version in the upgrade plan until `AfterWorkersUpgrade` is completed.
+
+Example Request:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: AfterWorkersUpgradeRequest
+settings:
+cluster:
+ apiVersion: cluster.x-k8s.io/v1beta1
+ kind: Cluster
+ metadata:
+ name: test-cluster
+ namespace: test-ns
+ spec:
+ ...
+ status:
+ ...
+kubernetesVersion: "v1.30.0"
+controlPlaneUpgrades:
+ - version: v1.31.0
+ - version: v1.32.3
+ - version: v1.33.0
+workersUpgrades:
+ - version: v1.32.3
+ - version: v1.33.0
+```
+
+Note: The `controlPlaneUpgrades` and the `workersUpgrades` fields contains the intermediate steps to reach the target version,
+which is also included in the list.
+
+Example Response:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: AfterWorkersUpgradeResponse
+status: Success # or Failure
+message: "error message if status == Failure"
+retryAfterSeconds: 10
+```
### AfterClusterUpgrade
This hook is called after the Cluster, control plane and workers have been upgraded to the version specified in
`spec.topology.version`. Runtime Extensions implementers can use this hook to execute post-upgrade add-on tasks.
-This hook does not block any further changes or upgrades to the Cluster.
+This hook blocks new upgrades to start until it is completed.
-#### Example Request:
+Example Request:
```yaml
apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
@@ -228,24 +416,23 @@ cluster:
kubernetesVersion: "v1.22.0"
```
-#### Example Response:
+Example Response:
```yaml
apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
kind: AfterClusterUpgradeResponse
status: Success # or Failure
message: "error message if status == Failure"
+retryAfterSeconds: 10
```
-For additional details, refer to the [Draft OpenAPI spec](https://editor.swagger.io/?url=https://raw.githubusercontent.com/kubernetes-sigs/cluster-api/main/docs/proposals/images/runtime-hooks/runtime-hooks-openapi.yaml).
-
### BeforeClusterDelete
This hook is called after the Cluster deletion has been triggered by the user and immediately before the topology
of the Cluster is going to be deleted. Runtime Extension implementers can use this hook to execute
cleanup tasks for the add-ons and block deletion of the Cluster and descendant objects until everything is ready.
-#### Example Request:
+Example Request:
```yaml
apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
@@ -263,7 +450,7 @@ cluster:
...
```
-#### Example Response:
+Example Response:
```yaml
apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
@@ -272,13 +459,3 @@ status: Success # or Failure
message: "error message if status == Failure"
retryAfterSeconds: 10
```
-
-For additional details, you can see the full schema in Swagger UI .
-
-
diff --git a/docs/book/src/tasks/experimental-features/runtime-sdk/implement-topology-mutation-hook.md b/docs/book/src/tasks/experimental-features/runtime-sdk/implement-topology-mutation-hook.md
index 0b4226269d39..943787639380 100644
--- a/docs/book/src/tasks/experimental-features/runtime-sdk/implement-topology-mutation-hook.md
+++ b/docs/book/src/tasks/experimental-features/runtime-sdk/implement-topology-mutation-hook.md
@@ -25,6 +25,50 @@ Three different hooks are called as part of Topology Mutation - two in the Clust
Please see the corresponding [CAEP](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20220330-topology-mutation-hook.md)
for additional background information.
+
+* [Implementing Topology Mutation Hook Runtime Extensions](#implementing-topology-mutation-hook-runtime-extensions)
+ * [Introduction](#introduction)
+ * [Guidelines](#guidelines)
+ * [Definitions](#definitions)
+ * [Inline vs. external patches](#inline-vs-external-patches)
+ * [External variable definitions](#external-variable-definitions)
+ * [External variable discovery in the ClusterClass](#external-variable-discovery-in-the-clusterclass)
+ * [Variable definition conflicts](#variable-definition-conflicts)
+ * [Setting values for variables in the Cluster](#setting-values-for-variables-in-the-cluster)
+ * [Using one or multiple external patch extensions](#using-one-or-multiple-external-patch-extensions)
+ * [Guidelines](#guidelines-1)
+ * [Patch extension guidelines](#patch-extension-guidelines)
+ * [Variable discovery guidelines](#variable-discovery-guidelines)
+ * [Definitions](#definitions-1)
+ * [GeneratePatches](#generatepatches)
+ * [ValidateTopology](#validatetopology)
+ * [DiscoverVariables](#discovervariables)
+ * [Dealing with Cluster API upgrades with apiVersion bumps](#dealing-with-cluster-api-upgrades-with-apiversion-bumps)
+
+
+## Guidelines
+
+All guidelines defined in [Implementing Runtime Extensions](implement-extensions.md#guidelines) apply to the
+implementation of Runtime Extensions for topology mutation hooks as well.
+
+In summary, Runtime Extensions are components that should be designed, written and deployed with great caution given
+that they can affect the proper functioning of the Cluster API runtime. A poorly implemented Runtime Extension could
+potentially block topology reconcile from happening.
+
+Following recommendations are especially relevant:
+
+* [Idempotence](implement-extensions.md#idempotence)
+* [Avoid side effects](implement-extensions.md#side-effects)
+* [Deterministic result](implement-extensions.md#deterministic-result)
+* [Error messages](implement-extensions.md#error-messages)
+* [Error management](implement-extensions.md#error-management)
+* [Avoid dependencies](implement-extensions.md#avoid-dependencies)
+
+## Definitions
+
+For additional details about the OpenAPI spec of the topology mutation hooks, please download the [`runtime-sdk-openapi.yaml`]({{#releaselink repo:"https://github.com/kubernetes-sigs/cluster-api" gomodule:"sigs.k8s.io/cluster-api" asset:"runtime-sdk-openapi.yaml" version:"1.11.x"}})
+file and then open it from the [Swagger UI](https://editor.swagger.io/).
+
## Inline vs. external patches
Inline patches have the following advantages:
@@ -157,6 +201,15 @@ Some considerations:
* [Conway's law](https://en.wikipedia.org/wiki/Conway%27s_law) might make it not feasible in large organizations
to use a single extension. In those cases it's important that boundaries between extensions are clearly defined.
+
+
+Caution
+
+Please note that the Cluster API test framework is not validating scenarios with using multiple external patch extensions,
+so user choosing this option should take care of performing additional validation before deploying this in production.
+
+
+
## Guidelines
For general Runtime Extension developer guidelines please refer to the guidelines in [Implementing Runtime Extensions](implement-extensions.md#guidelines).
@@ -199,7 +252,7 @@ so ClusterClass authors can evaluate impacts of changes before performing an upg
A GeneratePatches call generates patches for the entire Cluster topology. Accordingly the request contains all
templates, the global variables and the template-specific variables. The response contains generated patches.
-#### Example request:
+Example request:
* Generating patches for a Cluster topology is done via a single call to allow External Patch Extensions a
holistic view of the entire Cluster topology. Additionally this allows us to reduce the number of round-trips.
@@ -233,7 +286,7 @@ items:
...
```
-#### Example Response:
+Example Response:
* The response contains patches instead of full objects to reduce the payload.
* Templates in the request and patches in the response will be correlated via UIDs.
@@ -250,8 +303,6 @@ items:
patch:
```
-For additional details, you can see the full schema in Swagger UI .
-
We are considering to introduce a library to facilitate development of External Patch Extensions. It would provide capabilities like:
* Accessing builtin variables
* Extracting certain templates from a GeneratePatches request (e.g. all bootstrap templates)
@@ -265,7 +316,7 @@ A ValidateTopology call validates the topology after all patches have been appli
templates of the Cluster topology, the global variables and the template-specific variables. The response
contains the result of the validation.
-#### Example Request:
+Example Request:
* The request is the same as the GeneratePatches request except it doesn't have `uid` fields. We don't
need them as we don't have to correlate patches in the response.
@@ -296,7 +347,7 @@ items:
...
```
-#### Example Response:
+Example Response:
```yaml
apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
@@ -305,21 +356,11 @@ status: Success # or Failure
message: "error message if status == Failure"
```
-For additional details, you can see the full schema in Swagger UI .
-
-
-
### DiscoverVariables
A DiscoverVariables call returns definitions for one or more variables.
-#### Example Request:
+Example Request:
* The request is a simple call to the Runtime hook.
@@ -329,7 +370,7 @@ kind: DiscoverVariablesRequest
settings:
```
-#### Example Response:
+Example Response:
```yaml
apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
@@ -379,17 +420,6 @@ variables:
...
```
-For additional details, you can see the full schema in Swagger UI .
-TODO: Add openAPI definition to the SwaggerUI
-
-
-
## Dealing with Cluster API upgrades with apiVersion bumps
There are some special considerations regarding Cluster API upgrades when the upgrade includes a bump
diff --git a/docs/book/src/tasks/experimental-features/runtime-sdk/implement-upgrade-plan-hooks.md b/docs/book/src/tasks/experimental-features/runtime-sdk/implement-upgrade-plan-hooks.md
new file mode 100644
index 000000000000..725e649e707d
--- /dev/null
+++ b/docs/book/src/tasks/experimental-features/runtime-sdk/implement-upgrade-plan-hooks.md
@@ -0,0 +1,171 @@
+# Implementing Upgrade Plan Runtime Extensions
+
+
+
+Caution
+
+Please note Runtime SDK is an advanced feature. If implemented incorrectly, a failing Runtime Extension can severely impact the Cluster API runtime.
+
+
+
+## Introduction
+
+The proposal for [Chained and efficient upgrades](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/20250513-chained-and-efficient-upgrades-for-clusters-with-managed-topologies.md)
+introduced support for upgrading by more than one minor when working with Clusters using managed topologies.
+
+According to the proposal, there are two ways to provide to Cluster API the information required to compute the upgrade plan:
+- By setting the list of versions in the `spec.kubernetesVersions` field in the `ClusterClass` object.
+- By calling the runtime hook defined in the `spec.upgrade` in the `ClusterClass` object.
+
+This document defines the hook for the second option and provides recommendation on how to implement it.
+
+
+* [Implementing Upgrade Plan Runtime Extensions](#implementing-upgrade-plan-runtime-extensions)
+ * [Introduction](#introduction)
+ * [Guidelines](#guidelines)
+ * [Definitions](#definitions)
+ * [GenerateUpgradePlan](#generateupgradeplan)
+
+
+## Guidelines
+
+All guidelines defined in [Implementing Runtime Extensions](implement-extensions.md#guidelines) apply to the
+implementation of Runtime Extensions for upgrade plan hooks as well.
+
+In summary, Runtime Extensions are components that should be designed, written and deployed with great caution given
+that they can affect the proper functioning of the Cluster API runtime. A poorly implemented Runtime Extension could
+potentially block upgrade transitions from happening.
+
+Following recommendations are especially relevant:
+
+* [Idempotence](implement-extensions.md#idempotence)
+* [Deterministic result](implement-extensions.md#deterministic-result)
+* [Error messages](implement-extensions.md#error-messages)
+* [Error management](implement-extensions.md#error-management)
+* [Avoid dependencies](implement-extensions.md#avoid-dependencies)
+
+## Definitions
+
+For additional details about the OpenAPI spec of the upgrade plan hooks, please download the [`runtime-sdk-openapi.yaml`]({{#releaselink repo:"https://github.com/kubernetes-sigs/cluster-api" gomodule:"sigs.k8s.io/cluster-api" asset:"runtime-sdk-openapi.yaml" version:"1.11.x"}})
+file and then open it from the [Swagger UI](https://editor.swagger.io/).
+
+### GenerateUpgradePlan
+
+The GenerateUpgradePlan hook is called every time Cluster API is required to compute the upgrade plan.
+
+Notably, during an upgrade, the upgrade plan is recomputed several times, ideally one each time the upgrade plan completes
+a step, but the number of calls might be higher depending on e.g. by the duration of the upgrade.
+
+Example Request:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: GenerateUpgradePlanRequest
+settings:
+cluster:
+ apiVersion: cluster.x-k8s.io/v1beta1
+ kind: Cluster
+ metadata:
+ name: test-cluster
+ namespace: test-ns
+ spec:
+ ...
+ status:
+ ...
+fromKubernetesVersion: "v1.29.0"
+toKubernetesVersion: "v1.33.0"
+```
+
+Example Response:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: GenerateUpgradePlanResponse
+status: Success # or Failure
+message: "error message if status == Failure"
+controlPlaneUpgrades:
+- version: v1.30.0
+- version: v1.31.0
+- version: v1.32.3
+- version: v1.33.0
+ ```
+
+Note: in this case the system will infer the list of intermediate version for workers from the list of control plane versions, taking
+care of performing the minimum number of workers upgrade by taking into account the [Kubernetes version skew policy](https://kubernetes.io/releases/version-skew-policy/).
+
+Implementers of this runtime extension can also address more sophisticated use cases by computing the response in different ways, e.g.
+
+- Go through more patch release for a minor if necessary, e.g., v1.30.0 -> v1.30.1 -> etc.
+
+ ```yaml
+ ...
+ controlPlaneUpgrades:
+ - version: v1.30.0
+ - version: v1.30.1
+ - ...
+ ```
+
+Note: in this case the system will infer the list of intermediate version for workers from the list of control plane versions, taking
+care of performing the minimum number of workers upgrade by taking into account the [Kubernetes version skew policy](https://kubernetes.io/releases/version-skew-policy/).
+
+- Force workers to upgrade to specific versions, e.g., force workers upgrade to v1.30.0 when doing v1.29.0 -> v1.32.3
+ (in this example, worker upgrade to 1.30.0 is not required by the [Kubernetes version skew policy](https://kubernetes.io/releases/version-skew-policy/), so it would
+ be skipped under normal circumstances).
+
+ ```yaml
+ ...
+ controlPlaneUpgrades:
+ - version: v1.30.0
+ - version: v1.31.0
+ - version: v1.32.3
+ workersUpgrades:
+ - version: v1.30.0
+ - version: v1.32.3
+ ```
+
+Note: in this case the system will take into consideration the provided `workersUpgrades`, and validated it is
+consistent with `controlPlaneUpgrades` and also compliant with the [Kubernetes version skew policy](https://kubernetes.io/releases/version-skew-policy/).
+
+- Force workers to upgrade to all the intermediate steps (opt out from efficient upgrades).
+
+ ```yaml
+ ...
+ controlPlaneUpgrades:
+ - version: v1.30.0
+ - version: v1.31.0
+ - version: v1.32.3
+ workersUpgrades:
+ - version: v1.30.0
+ - version: v1.31.0
+ - version: v1.32.3
+ ```
+
+Note: in this case the system will take into consideration the provided `workersUpgrades`, and validated it is
+consistent with `controlPlaneUpgrades` and also compliant with the [Kubernetes version skew policy](https://kubernetes.io/releases/version-skew-policy/).
+
+In all the cases above, the `GenerateUpgradePlanResponse` content must comply the following validation rules:
+
+- `controlPlaneUpgrades` is the list of version upgrade steps for the control plane; it must be always specified
+ unless the control plane is already at the target version.
+ - there should be at least one version for every minor between `fromControlPlaneKubernetesVersion` (excluded) and `toKubernetesVersion` (included).
+ - each version must be:
+ - greater than `fromControlPlaneKubernetesVersion` (or with a different build number)
+ - greater than the previous version in the list (or with a different build number)
+ - less or equal to `toKubernetesVersion` (or with a different build number)
+ - the last version in the plan must be equal to `toKubernetesVersion`
+
+- `workersUpgrades` is the list of version upgrade steps for the workers.
+ - In case the upgrade plan for workers will be left to empty, the system will automatically
+ determine the minimal number of workers upgrade steps, thus minimizing impact on workloads and reducing
+ the overall upgrade time.
+ - If instead for any reason a custom upgrade plan for workers is required, `workersUpgrades` should be set and
+ the following rules apply to each version in the list. More specifically, each version must be:
+ - equal to `fromControlPlaneKubernetesVersion` or to one of the versions in the control plane upgrade plan.
+ - greater than `fromWorkersKubernetesVersion` (or with a different build number)
+ - greater than the previous version in the list (or with a different build number)
+ - less or equal to the `toKubernetesVersion` (or with a different build number)
+ - in case of versions with the same major/minor/patch version but different build number, also the order
+ of those versions must be the same for control plane and worker upgrade plan.
+ - the last version in the plan must be equal to `toKubernetesVersion`
+ - the upgrade plane must have all the intermediate version which workers must go through to avoid breaking rules
+ defining the max version skew between control plane and workers.
diff --git a/docs/book/src/tasks/experimental-features/runtime-sdk/index.md b/docs/book/src/tasks/experimental-features/runtime-sdk/index.md
index e9185491be03..9ea25345676a 100644
--- a/docs/book/src/tasks/experimental-features/runtime-sdk/index.md
+++ b/docs/book/src/tasks/experimental-features/runtime-sdk/index.md
@@ -29,7 +29,9 @@ Additional documentation:
* [Runtime Hooks for Add-on Management CAEP](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20220414-runtime-hooks.md)
* For Runtime Extension developers:
* [Implementing Runtime Extensions](./implement-extensions.md)
+ * [Implementing In-Place Update Hooks Extensions](./implement-in-place-update-hooks.md)
* [Implementing Lifecycle Hook Extensions](./implement-lifecycle-hooks.md)
* [Implementing Topology Mutation Hook Extensions](./implement-topology-mutation-hook.md)
+ * [Implementing Upgrade Plan Runtime Extensions](./implement-upgrade-plan-hooks.md)
* For Cluster operators:
* [Deploying Runtime Extensions](./deploy-runtime-extension.md)
diff --git a/docs/book/src/tasks/using-kustomize.md b/docs/book/src/tasks/using-kustomize.md
index 71f8b4c129da..34b0920932bb 100644
--- a/docs/book/src/tasks/using-kustomize.md
+++ b/docs/book/src/tasks/using-kustomize.md
@@ -96,6 +96,13 @@ spec:
- type: Ready
status: "False"
timeout: 300s
+ unhealthyMachineConditions:
+ - type: "Ready"
+ status: Unknown
+ timeout: 300s
+ - type: "Ready"
+ status: "False"
+ timeout: 300s
```
You would want to ensure the `clusterName` field in the MachineHealthCheck manifest appropriately
diff --git a/docs/book/src/user/concepts.md b/docs/book/src/user/concepts.md
index ea002042d75d..7c0e813d642c 100644
--- a/docs/book/src/user/concepts.md
+++ b/docs/book/src/user/concepts.md
@@ -49,18 +49,34 @@ A "Machine" is the declarative spec for an infrastructure component hosting a Ku
Common fields such as Kubernetes version are modeled as fields on the Machine's spec. Any information that is provider-specific is part of the `InfrastructureRef` and is not portable between different providers.
-#### Machine Immutability (In-place Upgrade vs. Replace)
+#### Machine Immutability (In-place update vs. Replace)
From the perspective of Cluster API, all Machines are immutable: once they are created, they are never updated (except for labels, annotations and status), only deleted.
For this reason, MachineDeployments are preferable. MachineDeployments handle changes to machines by replacing them, in the same way core Deployments handle changes to Pod specifications.
+Over time several improvement have been applied to Cluster API in oder to perform machine rollout only when necessary and
+for minimizing risks and impacts of this operation on users workloads.
+
+Starting from Cluster API v1.12, users can intentionally trade off some of the benefits that they get of Machine immutability by
+using Cluster API extensions points to add the capability to perform in-place updates under well-defined circumstances.
+
+Notably, the Cluster API user experience will remain the same no matter of the in-place update feature is enabled
+or not, because ultimately users should care ONLY about the desired state.
+
+Cluster API is responsible to choose the best strategy to achieve desired state, and with the introduction of
+update extensions, Cluster API is expanding the set of tools that can be used to achieve the desired state.
+
### MachineDeployment
A MachineDeployment provides declarative updates for Machines and MachineSets.
A MachineDeployment works similarly to a core Kubernetes [Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/). A MachineDeployment reconciles changes to a Machine spec by rolling out changes to 2 MachineSets, the old and the newly updated.
+### MachinePool
+
+A MachinePool is a declarative spec for a group of Machines. It is similar to a MachineDeployment, but is specific to a particular Infrastructure Provider. For more information, please check out [MachinePool](../tasks/experimental-features/machine-pools.md).
+
### MachineSet
A MachineSet's purpose is to maintain a stable set of Machines running at any given time.
diff --git a/docs/book/src/user/quick-start.md b/docs/book/src/user/quick-start.md
index 89cd3971f923..a49449c019d0 100644
--- a/docs/book/src/user/quick-start.md
+++ b/docs/book/src/user/quick-start.md
@@ -281,7 +281,7 @@ Additional documentation about experimental features can be found in [Experiment
Depending on the infrastructure provider you are planning to use, some additional prerequisites should be satisfied
before getting started with Cluster API. See below for the expected settings for common providers.
-{{#tabs name:"tab-installation-infrastructure" tabs:"Akamai (Linode),AWS,Azure,CloudStack,DigitalOcean,Docker,GCP,Harvester,Hetzner,Hivelocity,Huawei,IBM Cloud,IONOS Cloud,K0smotron,KubeKey,KubeVirt,Metal3,Nutanix,OCI,OpenNebula,OpenStack,Outscale,Proxmox,Scaleway,VCD,vcluster,Virtink,vSphere,Vultr"}}
+{{#tabs name:"tab-installation-infrastructure" tabs:"Akamai (Linode),AWS,Azure,CloudStack,DigitalOcean,Docker,GCP,Harvester,Hetzner,Hivelocity,Huawei,IBM Cloud,IONOS Cloud,K0smotron,KubeKey,KubeVirt,Metal3,metal-stack,Nutanix,OCI,OpenNebula,OpenStack,Outscale,Proxmox,Scaleway,VCD,vcluster,Virtink,vSphere,Vultr"}}
{{#tab Akamai (Linode)}}
```bash
@@ -705,6 +705,15 @@ clusterctl init --infrastructure kubevirt
Please visit the [Metal3 project][Metal3 provider].
+{{#/tab }}
+{{#tab metal-stack}}
+
+```bash
+clusterctl init --infrastructure metal-stack
+```
+
+Please follow the Cluster API Provider for [metal-stack Getting Started Guide](https://metal-stack.io/docs/references/cluster-api-provider-metal-stack#getting-started)
+
{{#/tab }}
{{#tab Nutanix}}
@@ -911,7 +920,7 @@ before configuring a cluster with Cluster API. Instructions are provided for com
Otherwise, you can look at the `clusterctl generate cluster` [command][clusterctl generate cluster] documentation for details about how to
discover the list of variables required by a cluster templates.
-{{#tabs name:"tab-configuration-infrastructure" tabs:"Akamai (Linode),AWS,Azure,CloudStack,DigitalOcean,Docker,GCP,Harvester,Huawei,IBM Cloud,IONOS Cloud,K0smotron,KubeKey,KubeVirt,Metal3,Nutanix,OpenNebula,OpenStack,Outscale,Proxmox,Scaleway,Tinkerbell,VCD,vcluster,Virtink,vSphere,Vultr"}}
+{{#tabs name:"tab-configuration-infrastructure" tabs:"Akamai (Linode),AWS,Azure,CloudStack,DigitalOcean,Docker,GCP,Harvester,Huawei,IBM Cloud,IONOS Cloud,K0smotron,KubeKey,KubeVirt,Metal3,metal-stack,Nutanix,OpenNebula,OpenStack,Outscale,Proxmox,Scaleway,Tinkerbell,VCD,vcluster,Virtink,vSphere,Vultr"}}
{{#tab Akamai (Linode)}}
```bash
@@ -1208,7 +1217,7 @@ Please visit the [KubeKey provider] for more information.
{{#/tab }}
{{#tab KubeVirt}}
-In this example, we'll use the image for Kubernetes v1.32.1:
+In this example, we'll use the image for Kubernetes v1.32.1:
```bash
export NODE_VM_IMAGE_TEMPLATE="quay.io/capk/ubuntu-2404-container-disk:v1.32.1"
export CAPK_GUEST_K8S_VERSION="${NODE_VM_IMAGE_TEMPLATE/*:/}"
@@ -1220,8 +1229,8 @@ Please visit the [KubeVirt project][KubeVirt provider] for more information.
Note
-Find additional images under [quay.io/capk/ubuntu-2404-container-disk](https://quay.io/capk/ubuntu-2404-container-disk),
-[quay.io/capk/ubuntu-2204-container-disk](https://quay.io/capk/ubuntu-2204-container-disk),
+Find additional images under [quay.io/capk/ubuntu-2404-container-disk](https://quay.io/capk/ubuntu-2404-container-disk),
+[quay.io/capk/ubuntu-2204-container-disk](https://quay.io/capk/ubuntu-2204-container-disk),
or [quay.io/capk/ubuntu-2004-container-disk](https://quay.io/capk/ubuntu-2004-container-disk).
Alternatively, create your own image; see [here](https://github.com/kubernetes-sigs/image-builder).
@@ -1257,6 +1266,25 @@ export IRONIC_INSPECTOR_NO_BASIC_AUTH=true
Please visit the [Metal3 getting started guide] for more details.
+{{#/tab }}
+{{#tab metal-stack}}
+
+```bash
+export METAL_PARTITION=
+export METAL_PROJECT_ID=
+export CONTROL_PLANE_IP=
+
+export FIREWALL_MACHINE_IMAGE=
+export FIREWALL_MACHINE_SIZE=
+
+export CONTROL_PLANE_MACHINE_IMAGE=
+export CONTROL_PLANE_MACHINE_SIZE=
+export WORKER_MACHINE_IMAGE=
+export WORKER_MACHINE_SIZE=
+```
+
+Please visit the [metal-stack getting started guide](https://metal-stack.io/docs/references/cluster-api-provider-metal-stack#getting-started) for more details.
+
{{#/tab }}
{{#tab Nutanix}}
@@ -2018,6 +2046,7 @@ kind delete cluster
[management cluster]: ../reference/glossary.md#management-cluster
[Metal3 getting started guide]: https://github.com/metal3-io/cluster-api-provider-metal3/blob/main/docs/getting-started.md
[Metal3 provider]: https://github.com/metal3-io/cluster-api-provider-metal3/
+[metal-stack provider]: https://github.com/metal-stack/cluster-api-provider-metal-stack/
[K0smotron provider]: https://github.com/k0sproject/k0smotron
[KubeKey provider]: https://github.com/kubesphere/kubekey
[KubeVirt provider]: https://github.com/kubernetes-sigs/cluster-api-provider-kubevirt/
diff --git a/docs/proposals/20181121-machine-api.md b/docs/proposals/20181121-machine-api.md
index aec1a88a60ae..dfb4439e2440 100644
--- a/docs/proposals/20181121-machine-api.md
+++ b/docs/proposals/20181121-machine-api.md
@@ -70,7 +70,7 @@ One simplification that might be controversial in this proposal is the lack of
API control over "in-place" versus "replace" reconciliation strategies. For
instance, if a Machine's spec is updated with a different version of kubelet
than is actually running, it is up to the provider-specific controller whether
-the request would best be fulfilled by performing an in-place upgrade on the
+the request would best be fulfilled by performing an in-place update on the
Node, or by deleting the Node and creating a new one in its place (or reporting
an error if this particular update is not supported). One can force a Node
replacement by deleting and recreating the Machine object rather than updating
diff --git a/docs/proposals/20210310-opt-in-autoscaling-from-zero.md b/docs/proposals/20210310-opt-in-autoscaling-from-zero.md
index 3a2dccd50928..4da7eb0eb736 100644
--- a/docs/proposals/20210310-opt-in-autoscaling-from-zero.md
+++ b/docs/proposals/20210310-opt-in-autoscaling-from-zero.md
@@ -316,6 +316,23 @@ status:
The cluster autoscaler will prefer the annotation on the MachineDeployment and will predict nodes that have a
`kubernetes.io/arch: amd64` label on them.
+**CSI driver attach limits and availability**
+
+When a user would like to signal that the node being created from a MachineSet or MachineDeployment will
+have a specific CSI driver installed with any volume attach limits, they can use following
+annotations to specify that information.
+
+```
+kind:
+metadata:
+ annotations:
+ capacity.cluster-autoscaler.kubernetes.io/csi-driver: "driver1=attach-limit,driver2=attach-limit"
+```
+
+Users can specify `attach-limit` of `0` if they merely want to signal presence of CSI driver and
+driver does not have any attach limits.
+
+
### Security Model
This feature will require the service account associated with the cluster autoscaler to have
diff --git a/docs/proposals/20210526-cluster-class-and-managed-topologies.md b/docs/proposals/20210526-cluster-class-and-managed-topologies.md
index f7866fcd3d88..9c260d288c08 100644
--- a/docs/proposals/20210526-cluster-class-and-managed-topologies.md
+++ b/docs/proposals/20210526-cluster-class-and-managed-topologies.md
@@ -188,7 +188,7 @@ If instead you are eager to see an example of ClusterClass and how the Cluster o
The ClusterClass CRD allows to define a collection of templates that describe the topology for one or more clusters.
-The detailed definition of this type can be found at [ClusterClass CRD reference](https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api/cluster.x-k8s.io/ClusterClass/v1beta1);
+The detailed definition of this type can be found at [ClusterClass CRD reference](https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api/cluster.x-k8s.io/ClusterClass/v1beta2);
at high level the new CRD contains:
- The reference to the InfrastructureCluster template (e.g. AWSClusterTemplate) to be used when creating a Cluster using this ClusterClass
@@ -209,6 +209,8 @@ at high level the new CRD contains:
- A list of patches, allowing to change above templates for each specific Cluster.
- A list of variable definitions, defining a set of additional values the users can provide on each specific cluster;
those values can be used in patches.
+- A list of Kubernetes versions to be used when performing chained upgrades for clusters using this Cluster class, see
+ [proposal: Chained and efficient upgrades for Clusters with managed topologies](20250513-chained-and-efficient-upgrades-for-clusters-with-managed-topologies.md).
The following paragraph provides some additional context on some of the above values; more info can
be found in [writing a ClusterClass](https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-class/write-clusterclass.html).
@@ -241,7 +243,7 @@ providing generic information about the cluster or the template being patched.
##### Cluster
-The [Cluster CRD](https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api/cluster.x-k8s.io/Cluster/v1beta1) has been extended
+The [Cluster CRD](https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api/cluster.x-k8s.io/Cluster/v1beta2) has been extended
with a new field allowing to define and control the cluster topology from a single point.
At high level the cluster topology is defined by:
@@ -378,7 +380,17 @@ as well as in
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: VSphereClusterTemplate
name: vsphere-prod-cluster-template
- ```
+ kubernetesVersions:
+ - v1.28.0
+ - v1.29.0
+ - v1.30.0
+ - v1.30.1
+ - v1.31.2
+ - ...
+ ```
+
+ see [proposal: Chained and efficient upgrades for Clusters with managed topologies](20250513-chained-and-efficient-upgrades-for-clusters-with-managed-topologies.md) for more options
+ for configuring Kubernetes version upgrade of clusters using managed topologies.
2. User creates a cluster using the class name and defining the topology.
```yaml
@@ -433,6 +445,9 @@ This section talks about updating a Cluster which was created using a `ClusterCl

+see [proposal: Chained and efficient upgrades for Clusters with managed topologies](20250513-chained-and-efficient-upgrades-for-clusters-with-managed-topologies.md)
+for more considerations about Kubernetes version upgrade of clusters using managed topologies.
+
#### Behavior with patches
This section highlights how the basic behavior discussed above changes when patches are used. This is an important use case because without
@@ -485,6 +500,9 @@ like e.g. a different HTTP proxy configuration, a different image to be used for
valueFrom:
variable: machineType
```
+
+See [proposal: topology mutation hook](20220330-topology-mutation-hook.md) for a powerful alternative to
+inline patches.
##### Create a new Cluster with patches
@@ -581,7 +599,8 @@ In this cases for ServerSideApply to work properly it is required to ensure the
type definitions, like +MapType or +MapTypeKey, see [merge strategy](https://kubernetes.io/docs/reference/using-api/server-side-apply/#merge-strategy) for more details.
Note: in order to allow the topology controller to execute templates rotation only when strictly necessary, it is necessary
-to implement specific handling of dry run operations in the templates webhooks as described in [Required Changes on providers from 1.1 to 1.2](https://release-1-8.cluster-api.sigs.k8s.io/developer/providers/migrations/v1.1-to-v1.2#required-api-changes-for-providers).
+to implement specific handling of dry run operations in the templates webhooks as described in the Cluster API contract, see
+e.g. [InfraMachineTemplate: support for SSA dry run](https://cluster-api.sigs.k8s.io/developer/providers/contracts/infra-machine#inframachinetemplate-support-for-ssa-dry-run).
### Risks and Mitigations
@@ -613,6 +632,7 @@ The initial plan is to rollout Cluster Class and support for managed topologies
- 10/04/2021: Added support for patches and variables
- 01/10/2022: Added support for MachineHealthChecks
- 12/20/2022: Cleaned up outdated implementation details by linking the book's pages instead. This will make it easier to keep the proposal up to date.
+- 05/13/2025: Added support for Upgrade Plans; see [proposal: Chained and efficient upgrades for Clusters with managed topologies](20250513-chained-and-efficient-upgrades-for-clusters-with-managed-topologies.md)
[community meeting]: https://docs.google.com/document/d/1Ys-DOR5UsgbMEeciuG0HOgDQc8kZsaWIWJeKJ1-UfbY
diff --git a/docs/proposals/20220221-runtime-SDK.md b/docs/proposals/20220221-runtime-SDK.md
index 1e719bf99968..ac008d094472 100644
--- a/docs/proposals/20220221-runtime-SDK.md
+++ b/docs/proposals/20220221-runtime-SDK.md
@@ -296,7 +296,7 @@ behavior is introduced by this proposal:
The Cluster administrator is required to register available Runtime Extension server using the following CR:
```yaml
-apiVersion: runtime.cluster.x-k8s.io/v1alpha1
+apiVersion: runtime.cluster.x-k8s.io/v1beta2
kind: ExtensionConfig
metadata:
name: "my-amazing-extensions"
@@ -326,7 +326,7 @@ The `namespaceSelector` will enable targeting of a subset of Clusters.
```yaml
-apiVersion: runtime.cluster.x-k8s.io/v1alpha1
+apiVersion: runtime.cluster.x-k8s.io/v1beta2
kind: ExtensionConfig
metadata:
name: "my-amazing-extensions"
@@ -367,8 +367,7 @@ dependencies among Runtime Extensions, being it modeled with something similar t
[systemd unit options](https://www.freedesktop.org/software/systemd/man/systemd.unit.html) or alternative approaches.
The main reason behind that is that such type of feature introduces complexity and creates "pet" like relations across
-components making the overall system more fragile. This is also consistent with the [avoid dependencies](#avoid-dependencies)
-recommendation above.
+components making the overall system more fragile. This is also consistent with the avoid dependencies recommendation.
## Runtime Hooks developer guide (CAPI internals)
diff --git a/docs/proposals/20220414-lifecycle-hooks.md b/docs/proposals/20220414-lifecycle-hooks.md
new file mode 100644
index 000000000000..55095a4bad35
--- /dev/null
+++ b/docs/proposals/20220414-lifecycle-hooks.md
@@ -0,0 +1,457 @@
+---
+title: Runtime Hooks for Add-on Management
+authors:
+ - "@killianmuldoon"
+ - "@ykakarap"
+reviewers:
+ - "@vincepri"
+ - "@CecileRobertMichon"
+ - "@enxebre"
+ - "@fabriziopandini"
+ - "@sbueringer"
+creation-date: 2022-04-14
+last-updated: 2022-04-14
+status: implementable
+replaces:
+see-also:
+superseded-by:
+---
+
+# Runtime hooks for Add-on Management
+
+## Table of Contents
+
+
+
+
+- [Glossary](#glossary)
+- [Summary](#summary)
+- [Motivation](#motivation)
+ - [Goals](#goals)
+ - [Non-Goals](#non-goals)
+- [Proposal](#proposal)
+ - [User Stories](#user-stories)
+ - [Runtime hook definitions](#runtime-hook-definitions)
+ - [Runtime Extensions developer guide](#runtime-extensions-developer-guide)
+ - [Security Model](#security-model)
+ - [Risks and Mitigations](#risks-and-mitigations)
+ - [Runtime Extension blocks Cluster lifecycle indefinitely](#runtime-extension-blocks-cluster-lifecycle-indefinitely)
+- [Alternatives](#alternatives)
+ - [External components watching CAPI resources without hooks](#external-components-watching-capi-resources-without-hooks)
+ - [OpenAPI spec implementation alternatives](#openapi-spec-implementation-alternatives)
+ - [Adding Cluster info to request vs providing only the Cluster name](#adding-cluster-info-to-request-vs-providing-only-the-cluster-name)
+ - [Embedding CAPI types in request vs using runtime.RawExtension](#embedding-capi-types-in-request-vs-using-runtimerawextension)
+- [Upgrade strategy](#upgrade-strategy)
+ - [Cluster API version upgrade](#cluster-api-version-upgrade)
+ - [Kubernetes version upgrade](#kubernetes-version-upgrade)
+- [Additional Details](#additional-details)
+ - [Test Plan](#test-plan)
+ - [Graduation Criteria](#graduation-criteria)
+ - [Version Skew Strategy](#version-skew-strategy)
+- [Implementation History](#implementation-history)
+
+
+
+## Glossary
+
+Refer to the [Cluster API Book Glossary](https://cluster-api.sigs.k8s.io/reference/glossary.html).
+
+* Add-on: an application that extends the functionality of Kubernetes.
+
+
+## Summary
+
+This proposal introduces a set of Runtime Hooks designed for providing the foundation for the implementation of add-on orchestration solutions on top of Cluster API.
+However, given that the hooks defined in this proposal are going to model common events in the Cluster lifecycle they could be used for other use cases beyond add-on
+management, but for the sake of having a focused and actionable scope, we are not exploring those option in this document.
+
+## Motivation
+
+Cluster Resource Set (CRS) is the current add-on management tool packaged with Cluster API, but many users rely on their own package management tool like helm, kapp, ArgoCD or flux, because those tools have a broad range of capabilities that are not currently available in CRS.
+
+The ability to orchestrate add-ons in line with events in the cluster lifecycle is becoming a requirement for many CAPI users, but in order to make this possible a mechanism to plug into the cluster lifecycle is required. This proposal introduces a set of Runtime Hooks designed to meet the need for add-on management orchestration including:
+
+* Operations for installing add-ons during the cluster provisioning workflow
+* Operations for upgrading add-ons during the cluster upgrade workflow
+* Operations for handling add-ons during the cluster deletion workflow
+
+Runtime Hooks enable the Cluster Lifecycle to trigger these processes based on the current state of the cluster, allowing them to start after some state has been reached or waiting for them to complete before moving on with Cluster-wide operations such as Cluster creation or deletion.
+
+Once these hooks are in place, it will be possible to build a comprehensive add-on orchestration solution on top of Cluster API that can leverage external tools such as helm, kapp, ArgoCD, flux or eventually CRS as an alternative.
+
+### Goals
+
+* Identify a set of Runtime Hooks that enable management of the entire add-on lifecycle
+* Define the OpenAPI specification of these Runtime Hooks
+* Document when the corresponding Runtime Extensions are called
+* Provide guidelines for developers implementing a corresponding Runtime Extension
+
+### Non-Goals
+
+* Defining all possible Runtime Hooks in Cluster API; this proposal defines only a subset of hooks required for add-on orchestration.
+* Define a full add-on management solution or define detailed steps for solving add-on related problems like CPI migration from in-tree to out-of-tree; this proposal is focused only in providing the foundational capabilities to do so.
+
+## Proposal
+
+This proposal adds a set of Runtime Hooks specifically designed for Cluster created from a ClusterClass and thus leveraging the idea of managed topology.
+
+The main reason for this choice is because a managed topology has a set of capabilities required for lifecycle hooks implementation:
+
+* A managed topology has the overarching view of the entire Cluster (vs other components in CAPI which are limited to controlling single resources or a subset of them).
+* A managed topology already has the capability to control all resources in a Cluster, thus making it possible to orchestrate lifecycle workflows like e.g. upgrades.
+
+In practice, if we look at the six lifecycle hooks introduced by this proposal, we should recognize that four of them cannot be implemented outside of the topology controller
+because there is no viable point to be used in an alternative (BeforeClusterCreate, BeforeClusterUpgrade, AfterControlPlaneUpgrade, and AfterClusterUpgrade).
+
+Also, by working in the topology controller it is possible to implement hooks allowing to block the cluster from transitioning from one state to another, which is a capability
+required to properly orchestrate the addon lifecycle.
+
+### User Stories
+
+These user stories are based on a concrete example of an add-on - a metrics database - to illustrate the use of each Runtime Hook.
+
+As a developer of an add-ons orchestration solution:
+
+* **Before a Cluster is Created** I want to automatically check if enough disk space is available for allocation to the cluster for persistent storage of collected metrics values.
+* **After the Control Plane** **is Initialized** I want to automatically install a metrics database and associated add-ons in the workload cluster.
+* **Before the Cluster is Upgraded** I want to install a new version of the metrics database with a new version of the custom metrics apiservice to interact directly with the Kubernetes apiserver.
+* **Before the ControlPlane is Upgraded** I want to install a new version of the metrics database with a new version of the custom metrics apiservice to interact directly with the Kubernetes apiserver.
+* **After the ControlPlane is Upgraded** I want to install new versions of metrics collectors to each upgraded node in the cluster.
+* **Before workers are Upgraded** I want to install a new version of the metrics database with a new version of the custom metrics apiservice to interact directly with the Kubernetes apiserver.
+* **After workers are Upgraded** I want to install new versions of metrics collectors to each upgraded node in the cluster
+* **After the Cluster is Upgraded** I want to install new versions of metrics collectors to each upgraded node in the cluster.
+* **Before the Cluster is Deleted** I want to automatically back up persistent volumes used by the metrics database.
+
+### Runtime hook definitions
+
+Below is a description for the Runtime Hooks introduced by this proposal.
+
+
+
+The remainder of this section has been moved to the Cluster API [book](../../docs/book/src/tasks/experimental-features/runtime-sdk/implement-lifecycle-hooks.md#definitions)
+to avoid duplication.
+
+Note: Following change will be applied to the hooks with the ongoing work for [Chained and efficient upgrades](./20250513-chained-and-efficient-upgrades-for-clusters-with-managed-topologies.md); the
+documentation in the book will be aligned as soon as the work completes:
+
+#### BeforeClusterUpgrade (modified)
+
+Request message will be extended with the info about the upgrade plane. e.g.
+
+##### Example Request:
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: BeforeClusterUpgradeRequest
+settings:
+cluster:
+ apiVersion: cluster.x-k8s.io/v1beta1
+ kind: Cluster
+ metadata:
+ name: test-cluster
+ namespace: test-ns
+ spec:
+ ...
+ status:
+ ...
+fromKubernetesVersion: "v1.30.0"
+toKubernetesVersion: "v1.33.0"
+controlPlaneUpgrades:
+ - version: v1.31.0
+ - version: v1.32.3
+ - version: v1.33.0
+workersUpgrades:
+ - version: v1.32.3
+ - version: v1.33.0
+```
+
+Note: The `controlPlaneUpgrades` and the `workersUpgrades` fields contains the intermediate steps to reach the target version,
+which is also included in the list.
+
+#### BeforeControlPlaneUpgrade (new hook)
+
+This hook is called before a new version is propagated to the control plane object. Runtime Extension implementers
+can use this hook to execute pre-upgrade add-on tasks and block upgrades of the ControlPlane.
+
+Note:
+- When an upgrade is starting, BeforeControlPlaneUpgrade will be called after BeforeClusterUpgrade is completed.
+- When an upgrade is in progress BeforeControlPlaneUpgrade will be called for each intermediate version that will
+ be applied to the control plane (instead BeforeClusterUpgrade will be called only once at the beginning of the upgrade).
+
+##### Example Request:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: BeforeControlPlaneUpgradeRequest
+settings:
+cluster:
+ apiVersion: cluster.x-k8s.io/v1beta1
+ kind: Cluster
+ metadata:
+ name: test-cluster
+ namespace: test-ns
+ spec:
+ ...
+ status:
+ ...
+fromKubernetesVersion: "v1.30.0"
+toKubernetesVersion: "v1.33.0"
+controlPlaneUpgrades:
+ - version: v1.31.0
+ - version: v1.32.3
+ - version: v1.33.0
+workersUpgrades:
+ - version: v1.32.3
+ - version: v1.33.0
+```
+
+Note: The `controlPlaneUpgrades` and the `workersUpgrades` fields contains the intermediate steps to reach the target version,
+which is also included in the list.
+
+##### Example Response:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: BeforeControlPlaneUpgradeResponse
+status: Success # or Failure
+message: "error message if status == Failure"
+retryAfterSeconds: 10
+```
+
+#### AfterControlPlaneUpgrade (modified)
+
+This hook is called after the control plane has been upgraded to the version specified in `spec.topology.version`
+or to an intermediate version in the upgrade plan and:
+- if workers upgrade can be skipped for this version, immediately before the next intermediate version is applied to the control plane
+- if workers upgrade must be performed for this version, immediately before the new version is going to be propagated to the MachineDeployments of the Cluster.
+
+Runtime Extension implementers can use this hook to execute post-upgrade add-on tasks and block upgrades to the next
+version of the control plane or to workers until everything is ready.
+
+Note: While the MachineDeployments upgrade is blocked changes made to existing MachineDeployments and creating new MachineDeployments
+will be delayed while the object is waiting for upgrade. Example: modifying MachineDeployments (think scale up),
+or creating new MachineDeployments will be delayed until the target MachineDeployment is ready to pick up the upgrade.
+This ensures that the MachineDeployments do not perform a rollout prematurely while waiting to be rolled out again for the version upgrade (no double rollouts).
+This also ensures that any version specific changes are only pushed to the underlying objects also at the correct version.
+
+##### Example Request:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: AfterControlPlaneUpgradeRequest
+settings:
+cluster:
+ apiVersion: cluster.x-k8s.io/v1beta1
+ kind: Cluster
+ metadata:
+ name: test-cluster
+ namespace: test-ns
+ spec:
+ ...
+ status:
+ ...
+kubernetesVersion: "v1.30.0"
+controlPlaneUpgrades:
+ - version: v1.31.0
+ - version: v1.32.3
+ - version: v1.33.0
+workersUpgrades:
+ - version: v1.32.3
+ - version: v1.33.0
+```
+
+Note: The `controlPlaneUpgrades` and the `workersUpgrades` fields contains the intermediate steps to reach the target version,
+which is also included in the list.
+
+##### Example Response:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: AfterControlPlaneUpgradeResponse
+status: Success # or Failure
+message: "error message if status == Failure"
+retryAfterSeconds: 10
+```
+
+#### BeforeWorkersUpgrade (new hook)
+
+This hook is called before a new version is propagated to workers. Runtime Extension implementers
+can use this hook to execute pre-upgrade add-on tasks and block upgrades of Workers.
+
+Note:
+- This hook will be called only if workers upgrade must be performed for an intermediate version of a chained upgrade
+ or when upgrading to the target `spec.topology.version`.
+
+##### Example Request:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: BeforeWorkersUpgradeRequest
+settings:
+cluster:
+ apiVersion: cluster.x-k8s.io/v1beta1
+ kind: Cluster
+ metadata:
+ name: test-cluster
+ namespace: test-ns
+ spec:
+ ...
+ status:
+ ...
+fromKubernetesVersion: "v1.30.0"
+toKubernetesVersion: "v1.33.0"
+controlPlaneUpgrades:
+ - version: v1.31.0
+ - version: v1.32.3
+ - version: v1.33.0
+workersUpgrades:
+ - version: v1.32.3
+ - version: v1.33.0
+```
+
+Note: The `controlPlaneUpgrades` and the `workersUpgrades` fields contains the intermediate steps to reach the target version,
+which is also included in the list.
+
+##### Example Response:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: BeforeWorkersUpgradeResponse
+status: Success # or Failure
+message: "error message if status == Failure"
+retryAfterSeconds: 10
+```
+
+#### AfterWorkersUpgrade (new hook)
+
+This hook is called after all the workers have been upgraded to the version specified in `spec.topology.version`
+or to an intermediate version in the upgrade plan, and:
+- if the upgrade plan is completed and the entire cluster is at `spec.topology.version`, immediately before calling the AfterClusterUpgrade hook;
+ in this case, the hook will ensure a new upgrade can't start until `AfterWorkersUpgrade` is completed.
+- if the upgrade plan is not complete and the entire cluster is now at one of the intermediate versions, immediately before calling BeforeControlPlaneUpgrade hook for the next intermediate step;
+ in this case, the hook will ensure the control can't to move to the next version in the upgrade plan until `AfterWorkersUpgrade` is completed.
+
+##### Example Request:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: AfterWorkersUpgradeRequest
+settings:
+cluster:
+ apiVersion: cluster.x-k8s.io/v1beta1
+ kind: Cluster
+ metadata:
+ name: test-cluster
+ namespace: test-ns
+ spec:
+ ...
+ status:
+ ...
+kubernetesVersion: "v1.30.0"
+controlPlaneUpgrades:
+ - version: v1.31.0
+ - version: v1.32.3
+ - version: v1.33.0
+workersUpgrades:
+ - version: v1.32.3
+ - version: v1.33.0
+```
+
+Note: The `controlPlaneUpgrades` and the `workersUpgrades` fields contains the intermediate steps to reach the target version,
+which is also included in the list.
+
+##### Example Response:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: AfterWorkersUpgradeResponse
+status: Success # or Failure
+message: "error message if status == Failure"
+retryAfterSeconds: 10
+```
+
+### Runtime Extensions developer guide
+
+This section has been moved to the Cluster API [book](../../docs/book/src/tasks/experimental-features/runtime-sdk/implement-lifecycle-hooks.md#guidelines)
+to avoid duplication.
+
+### Security Model
+
+For the general Runtime Extension security model please refer to the [developer guide in the Runtime SDK proposal](https://github.com/kubernetes-sigs/cluster-api/blob/75b39db545ae439f4f6203b5e07496d3b0a6aa75/docs/proposals/20220221-runtime-SDK.md#security-model).
+
+### Risks and Mitigations
+
+#### Runtime Extension blocks Cluster lifecycle indefinitely
+
+Cluster lifecycle can be blocked indefinitely when a Runtime Extension either blocks or fails indefinitely. Mitigation:
+
+* Surface errors from the Runtime Extension that is blocking reconciliation in Conditions to drive necessary action needed by the user.
+* A Runtime Extension should be extensively unit and e2e tested to ensure it behaves as expected.
+* Users should be able to manually intervene and unblock the reconciliation.
+
+As future work, we will explore more options like circuit breaker and timeout to unblock reconciliation.
+
+
+## Alternatives
+
+Alternatives to Runtime Hooks for comprehensive add-on management in Cluster API include:
+
+### External components watching CAPI resources without hooks
+
+This is the current pattern used by Cluster Resource Set. The implementers can only react to changes on CAPI resources, e.g. a Cluster being created, but they have no control over the cluster lifecycle.
+
+This and similar solutions based on scripting or git ops approaches are considered inadequate for comprehensive, integrated add-on management as they have limited insight into the state of the Cluster and can not easily influence reconciliation based on add-on state.
+
+More details about why watching Cluster API resources without hooks is not considered a valid alternative can be found in the [Cluster Addon Proposal](https://docs.google.com/document/d/1TdbfXC2_Hhg0mH7-7hXcT1Gg8h6oXKrKbnJqbpFFvjw/edit).
+
+### OpenAPI spec implementation alternatives
+
+For the implementation detail of Open API spec, we considered following alternative approaches:
+#### Adding Cluster info to request vs providing only the Cluster name
+
+In the proposed Open API specification for request type we have a full Cluster object. We considered an alternative of only including the Cluster name and namespace to reduce the size of the message. It was rejected based on the assumption that most extensions will require at least some additional information from the Cluster. Sending the full object reduces calls to the API server.
+
+#### Embedding CAPI types in request vs using runtime.RawExtension
+
+In the proposed Open API specification we are including the Cluster API object in requests. We considered using runtime.RawExtension in order to avoid having to bump the version of lifecycle hooks when bumping the version of the CAPI types. It was rejected as sending another version of the CAPI type via runtime.RawExtension would always be a breaking change. Embedding the type directly makes the version of the API used explicit.
+
+## Upgrade strategy
+
+#### Cluster API version upgrade
+
+This proposal does not affect the Cluster API upgrade strategy.
+
+If a new ClusterAPI version introduces a new Lifecycle Hook version, Runtime Extensions should be adapted, to avoid issues when older Lifecycle Hook versions are eventually removed. For details about the deprecation rules please refer to the [Runtime SDK](https://github.com/kubernetes-sigs/cluster-api/blob/75b39db545ae439f4f6203b5e07496d3b0a6aa75/docs/proposals/20220221-runtime-SDK.md#runtime-sdk-rules-1).
+
+
+#### Kubernetes version upgrade
+
+This proposal does not affect the Cluster API cluster upgrade strategy.
+
+However Runtime Extension will be able to tap into the upgrade process at defined stages.
+
+## Additional Details
+
+### Test Plan
+
+While in alpha phase it is expected that the Runtime Hooks will have unit and integration tests covering the topology reconciliation with calls to Runtime Extensions.
+
+With the increasing adoption of this feature we expect E2E test coverage for topology reconciliation with a Runtime Extension generating Runtime Hook Responses.
+
+### Graduation Criteria
+
+Main criteria for graduating this feature is adoption; further detail about graduation criteria will be added in future iterations of this document.
+
+### Version Skew Strategy
+
+See [upgrade strategy](#upgrade-strategy).
+
+## Implementation History
+
+* [x] 2022-03-29: Compiled a [CAEP Google Doc](https://docs.google.com/document/d/1vMwzGBi6XbIwKzP5aA7Mj9UdhAWKYqI-QmdDtcxWnA4)
+* [x] 2022-04-04: Opened corresponding [issue](https://github.com/kubernetes-sigs/cluster-api/issues/6374)
+* [x] 2022-04-06: Presented proposal at a [community meeting]
+* [x] 2022-04-14: Opened proposal PR
+* [x] 2025-05-13: Added runtime hooks for chained upgrades; see [proposal: Chained and efficient upgrades for Clusters with managed topologies](20250513-chained-and-efficient-upgrades-for-clusters-with-managed-topologies.md)
+
+
+[community meeting]: https://docs.google.com/document/d/1ushaVqAKYnZ2VN_aa3GyKlS4kEd6bSug13xaXOakAQI/edit#heading=h.pxsq37pzkbdq
diff --git a/docs/proposals/20220414-runtime-hooks.md b/docs/proposals/20220414-runtime-hooks.md
deleted file mode 100644
index 96f90f7fb50f..000000000000
--- a/docs/proposals/20220414-runtime-hooks.md
+++ /dev/null
@@ -1,215 +0,0 @@
----
-title: Runtime Hooks for Add-on Management
-authors:
- - "@killianmuldoon"
- - "@ykakarap"
-reviewers:
- - "@vincepri"
- - "@CecileRobertMichon"
- - "@enxebre"
- - "@fabriziopandini"
- - "@sbueringer"
-creation-date: 2022-04-14
-last-updated: 2022-04-14
-status: implementable
-replaces:
-see-also:
-superseded-by:
----
-
-# Runtime hooks for Add-on Management
-
-## Table of Contents
-
-
-
-
-- [Glossary](#glossary)
-- [Summary](#summary)
-- [Motivation](#motivation)
- - [Goals](#goals)
- - [Non-Goals](#non-goals)
-- [Proposal](#proposal)
- - [User Stories](#user-stories)
- - [Runtime hook definitions](#runtime-hook-definitions)
- - [Runtime Extensions developer guide](#runtime-extensions-developer-guide)
- - [Security Model](#security-model)
- - [Risks and Mitigations](#risks-and-mitigations)
- - [Runtime Extension blocks Cluster lifecycle indefinitely](#runtime-extension-blocks-cluster-lifecycle-indefinitely)
-- [Alternatives](#alternatives)
- - [External components watching CAPI resources without hooks](#external-components-watching-capi-resources-without-hooks)
- - [OpenAPI spec implementation alternatives](#openapi-spec-implementation-alternatives)
- - [Adding Cluster info to request vs providing only the Cluster name](#adding-cluster-info-to-request-vs-providing-only-the-cluster-name)
- - [Embedding CAPI types in request vs using runtime.RawExtension](#embedding-capi-types-in-request-vs-using-runtimerawextension)
-- [Upgrade strategy](#upgrade-strategy)
- - [Cluster API version upgrade](#cluster-api-version-upgrade)
- - [Kubernetes version upgrade](#kubernetes-version-upgrade)
-- [Additional Details](#additional-details)
- - [Test Plan](#test-plan)
- - [Graduation Criteria](#graduation-criteria)
- - [Version Skew Strategy](#version-skew-strategy)
-- [Implementation History](#implementation-history)
-
-
-
-## Glossary
-
-Refer to the [Cluster API Book Glossary](https://cluster-api.sigs.k8s.io/reference/glossary.html).
-
-* Add-on: an application that extends the functionality of Kubernetes.
-
-
-## Summary
-
-This proposal introduces a set of Runtime Hooks designed for providing the foundation for the implementation of add-on orchestration solutions on top of Cluster API.
-However, given that the hooks defined in this proposal are going to model common events in the Cluster lifecycle they could be used for other use cases beyond add-on
-management, but for the sake of having a focused and actionable scope, we are not exploring those option in this document.
-
-## Motivation
-
-Cluster Resource Set (CRS) is the current add-on management tool packaged with Cluster API, but many users rely on their own package management tool like helm, kapp, ArgoCD or flux, because those tools have a broad range of capabilities that are not currently available in CRS.
-
-The ability to orchestrate add-ons in line with events in the cluster lifecycle is becoming a requirement for many CAPI users, but in order to make this possible a mechanism to plug into the cluster lifecycle is required. This proposal introduces a set of Runtime Hooks designed to meet the need for add-on management orchestration including:
-
-* Operations for installing add-ons during the cluster provisioning workflow
-* Operations for upgrading add-ons during the cluster upgrade workflow
-* Operations for handling add-ons during the cluster deletion workflow
-
-Runtime Hooks enable the Cluster Lifecycle to trigger these processes based on the current state of the cluster, allowing them to start after some state has been reached or waiting for them to complete before moving on with Cluster-wide operations such as Cluster creation or deletion.
-
-Once these hooks are in place, it will be possible to build a comprehensive add-on orchestration solution on top of Cluster API that can leverage external tools such as helm, kapp, ArgoCD, flux or eventually CRS as an alternative.
-
-### Goals
-
-* Identify a set of Runtime Hooks that enable management of the entire add-on lifecycle
-* Define the OpenAPI specification of these Runtime Hooks
-* Document when the corresponding Runtime Extensions are called
-* Provide guidelines for developers implementing a corresponding Runtime Extension
-
-### Non-Goals
-
-* Defining all possible Runtime Hooks in Cluster API; this proposal defines only a subset of hooks required for add-on orchestration.
-* Define a full add-on management solution or define detailed steps for solving add-on related problems like CPI migration from in-tree to out-of-tree; this proposal is focused only in providing the foundational capabilities to do so.
-
-## Proposal
-
-This proposal adds a set of Runtime Hooks specifically designed for Cluster created from a ClusterClass and thus leveraging the idea of managed topology.
-
-The main reason for this choice is because a managed topology has a set of capabilities required for lifecycle hooks implementation:
-
-* A managed topology has the overarching view of the entire Cluster (vs other components in CAPI which are limited to controlling single resources or a subset of them).
-* A managed topology already has the capability to control all resources in a Cluster, thus making it possible to orchestrate lifecycle workflows like e.g. upgrades.
-
-In practice, if we look at the six lifecycle hooks introduced by this proposal, we should recognize that four of them cannot be implemented outside of the topology controller
-because there is no viable point to be used in an alternative (BeforeClusterCreate, BeforeClusterUpgrade, AfterControlPlaneUpgrade, and AfterClusterUpgrade).
-
-Also, by working in the topology controller it is possible to implement hooks allowing to block the cluster from transitioning from one state to another, which is a capability
-required to properly orchestrate the addon lifecycle.
-
-### User Stories
-
-These user stories are based on a concrete example of an add-on - a metrics database - to illustrate the use of each Runtime Hook.
-
-As a developer of an add-ons orchestration solution:
-
-* **Before a Cluster is Created** I want to automatically check if enough disk space is available for allocation to the cluster for persistent storage of collected metrics values.
-* **After the Control Plane** **is Initialized** I want to automatically install a metrics database and associated add-ons in the workload cluster.
-* **Before the Cluster is Upgraded** I want to install a new version of the metrics database with a new version of the custom metrics apiservice to interact directly with the Kubernetes apiserver.
-* **After the ControlPlane is Upgraded** I want to automatically check that the new version of the custom metrics apiservice is working and correctly fulfilled by my metrics database.
-* **After the Cluster is Upgraded** I want to install new versions of metrics collectors to each upgraded node in the cluster.
-* **Before the Cluster is Deleted** I want to automatically back up persistent volumes used by the metrics database.
-
-### Runtime hook definitions
-
-Below is a description for the Runtime Hooks introduced by this proposal.
-
-
-
-The remainder of this section has been moved to the Cluster API [book](../../docs/book/src/tasks/experimental-features/runtime-sdk/implement-lifecycle-hooks.md#definitions)
-to avoid duplication.
-
-### Runtime Extensions developer guide
-
-This section has been moved to the Cluster API [book](../../docs/book/src/tasks/experimental-features/runtime-sdk/implement-lifecycle-hooks.md#guidelines)
-to avoid duplication.
-
-### Security Model
-
-For the general Runtime Extension security model please refer to the [developer guide in the Runtime SDK proposal](https://github.com/kubernetes-sigs/cluster-api/blob/75b39db545ae439f4f6203b5e07496d3b0a6aa75/docs/proposals/20220221-runtime-SDK.md#security-model).
-
-### Risks and Mitigations
-
-#### Runtime Extension blocks Cluster lifecycle indefinitely
-
-Cluster lifecycle can be blocked indefinitely when a Runtime Extension either blocks or fails indefinitely. Mitigation:
-
-* Surface errors from the Runtime Extension that is blocking reconciliation in Conditions to drive necessary action needed by the user.
-* A Runtime Extension should be extensively unit and e2e tested to ensure it behaves as expected.
-* Users should be able to manually intervene and unblock the reconciliation.
-
-As future work, we will explore more options like circuit breaker and timeout to unblock reconciliation.
-
-
-## Alternatives
-
-Alternatives to Runtime Hooks for comprehensive add-on management in Cluster API include:
-
-### External components watching CAPI resources without hooks
-
-This is the current pattern used by Cluster Resource Set. The implementers can only react to changes on CAPI resources, e.g. a Cluster being created, but they have no control over the cluster lifecycle.
-
-This and similar solutions based on scripting or git ops approaches are considered inadequate for comprehensive, integrated add-on management as they have limited insight into the state of the Cluster and can not easily influence reconciliation based on add-on state.
-
-More details about why watching Cluster API resources without hooks is not considered a valid alternative can be found in the [Cluster Addon Proposal](https://docs.google.com/document/d/1TdbfXC2_Hhg0mH7-7hXcT1Gg8h6oXKrKbnJqbpFFvjw/edit).
-
-### OpenAPI spec implementation alternatives
-
-For the implementation detail of Open API spec, we considered following alternative approaches:
-#### Adding Cluster info to request vs providing only the Cluster name
-
-In the proposed Open API specification for request type we have a full Cluster object. We considered an alternative of only including the Cluster name and namespace to reduce the size of the message. It was rejected based on the assumption that most extensions will require at least some additional information from the Cluster. Sending the full object reduces calls to the API server.
-
-#### Embedding CAPI types in request vs using runtime.RawExtension
-
-In the proposed Open API specification we are including the Cluster API object in requests. We considered using runtime.RawExtension in order to avoid having to bump the version of lifecycle hooks when bumping the version of the CAPI types. It was rejected as sending another version of the CAPI type via runtime.RawExtension would always be a breaking change. Embedding the type directly makes the version of the API used explicit.
-
-## Upgrade strategy
-
-#### Cluster API version upgrade
-
-This proposal does not affect the Cluster API upgrade strategy.
-
-If a new ClusterAPI version introduces a new Lifecycle Hook version, Runtime Extensions should be adapted, to avoid issues when older Lifecycle Hook versions are eventually removed. For details about the deprecation rules please refer to the [Runtime SDK](https://github.com/kubernetes-sigs/cluster-api/blob/75b39db545ae439f4f6203b5e07496d3b0a6aa75/docs/proposals/20220221-runtime-SDK.md#runtime-sdk-rules-1).
-
-
-#### Kubernetes version upgrade
-
-This proposal does not affect the Cluster API cluster upgrade strategy.
-
-However Runtime Extension will be able to tap into the upgrade process at defined stages.
-
-## Additional Details
-
-### Test Plan
-
-While in alpha phase it is expected that the Runtime Hooks will have unit and integration tests covering the topology reconciliation with calls to Runtime Extensions.
-
-With the increasing adoption of this feature we expect E2E test coverage for topology reconciliation with a Runtime Extension generating Runtime Hook Responses.
-
-### Graduation Criteria
-
-Main criteria for graduating this feature is adoption; further detail about graduation criteria will be added in future iterations of this document.
-
-### Version Skew Strategy
-
-See [upgrade strategy](#upgrade-strategy).
-
-## Implementation History
-
-* [x] 2022-03-29: Compiled a [CAEP Google Doc](https://docs.google.com/document/d/1vMwzGBi6XbIwKzP5aA7Mj9UdhAWKYqI-QmdDtcxWnA4)
-* [x] 2022-04-04: Opened corresponding [issue](https://github.com/kubernetes-sigs/cluster-api/issues/6374)
-* [x] 2022-04-06: Presented proposal at a [community meeting]
-* [x] 2022-04-14: Opened proposal PR
-
-
-[community meeting]: https://docs.google.com/document/d/1ushaVqAKYnZ2VN_aa3GyKlS4kEd6bSug13xaXOakAQI/edit#heading=h.pxsq37pzkbdq
diff --git a/docs/proposals/20240807-in-place-updates-implementation-notes.md b/docs/proposals/20240807-in-place-updates-implementation-notes.md
new file mode 100644
index 000000000000..6141f7e6fc31
--- /dev/null
+++ b/docs/proposals/20240807-in-place-updates-implementation-notes.md
@@ -0,0 +1,257 @@
+# In-place updates in Cluster API - Implementations notes
+
+This document is a collection of notes about implementation details for the in-place update proposal.
+
+As soon as the implementation will be completed, some of the notes in this document will be moved back
+into the proposal or into the user-facing documentation for this feature.
+
+## Notes about in-place update implementation for machine deployments
+
+- In-place update is always considered as potentially disruptive
+ - in-place update must respect maxUnavailable
+ - if maxUnavailable is zero, a new machine must be created first, then as soon as there is “buffer” for in-place, in-place update can proceed
+ - when in-place is possible, the system should try to in-place update as many machines as possible.
+ - maxSurge is not fully used (it is used only for scale up by one if maxUnavailable =0)
+
+- No in-place updates are performed when using rollout strategy on delete.
+
+- The implementation respects the existing set of responsibilities of each controller:
+ - MD controller manages MS:
+ - MD controller enforces maxUnavailable, maxSurge
+ - MD controller decides when to scale up newMS, when to scale down oldMS
+ - When scaling down, the MD controller checks whether the operation can be performed in-place instead of delete/recreate. If in-place is possible:
+ - Old MS is instructed to move machines to the newMS, and newMS is informed to receive machines from oldMS.
+ - MS controller manages a subset of Machines
+ - When scaling down the old MS, if required to move, MS controller is responsible for moving a Machine to newMS
+ - When reconciling the new MachineSet, the MS controller takes ownership of the moved machine and begins the actual in-place update.
+
+- Orchestration of in-place updates between MD controller, MS controller, and Machine controller is implemented using annotations.
+ Following schemas provide an overview of how new annotations are used.
+
+Workflow #1: MD controller detects an in-place update is possible and it informs oldMS and newMS about how to perform this operation.
+
+```mermaid
+sequenceDiagram
+ autonumber
+ participant MD Controller
+ participant RX
+ participant MS1 (OldMS)
+ participant MS2 (NewMS)
+ MD Controller-->>+RX: Can you update in-place from MS1 (OldMS) to MS2 (NewMS)?
+ RX-->>-MD Controller: Yes!
+ MD Controller->>MS1 (OldMS): Apply annotation ".../move-machines-to-machineset": "MS2"
+ MD Controller->>MS2 (NewMS): Apply annotation ".../receive-machines-from-machinesets": "MS1"
+```
+
+Workflow #2: MS controller, when reconciling oldMS, move machines to the newMS.
+
+```mermaid
+sequenceDiagram
+ autonumber
+ participant MS Controller as MS Controller when reconciling MS1 (OldMS)
+ participant MS1 (OldMS)
+ participant MS2 (NewMS)
+ participant M1 as M1 controlled by MS1 (OldMS), selected to be moved to MS2 (NewMS)
+ MS Controller-->>MS1 (OldMS): Are you scaling down?
+ MS1 (OldMS)-->>MS Controller: Yes!
+ MS Controller-->>MS1 (OldMS): Do you have the ".../move-machines-to-machineset" annotation?
+ MS1 (OldMS)-->>MS Controller: Yes, I'm instructed to move machines to MS2!
+ MS Controller-->>MS2 (NewMS): Do you have ".../receive-machines-from-machinesets" annotation?
+ MS2 (NewMS)-->>MS Controller: Yes, I'm instructed to receive machines MS1!
+ MS Controller->>M1: Move M1 to MS2 (NewMS) Apply annotation ".../pending-acknowledge-move": "" Apply annotation ".../update-in-progress": ""
+```
+
+MD controller recognizes that a Machine has been moved to the new MachineSet and scales up the new MachineSet to acknowledge the operation.
+
+```mermaid
+sequenceDiagram
+ autonumber
+ participant MD Controller
+ participant MS2 (NewMS)
+ participant M1 as M1 now controlled by MS2 (NewMS)
+ MD Controller-->>M1: Are you pending acknowledge?
+ M1-->>MD Controller: Yes!
+ MD Controller->>MS2 (NewMS): Scale up to acknowledge receipt of M1 Apply annotation ".../acknowledged-move": "M1"
+```
+
+Workflow #4: MS controller, when reconciling newMS, detects that a machine has been acknowledged; it cleans up annotations on the machine, allowing the in-place update to begin.
+
+```mermaid
+sequenceDiagram
+ autonumber
+ participant MS Controller as MS Controller when reconciling MS2 (NewMS)
+ participant MS2 (NewMS)
+ participant M1 as M1 now controlled by MS2 (NewMS)
+ MS Controller-->>MS2 (NewMS): Is there some newly acknowledged replicas?
+ MS2 (NewMS)-->>MS Controller: Yes, M1!
+ MS Controller->>M1: Remove annotation ".../pending-acknowledge-move": ""
+```
+
+## Notes about in-place update implementation for KubeadmControlPlane
+
+- In-place updates respect the existing control plane update strategy:
+ - KCP controller uses `rollingUpdate` strategy with `maxSurge` (0 or 1)
+ - When `maxSurge` is 0, no new machines are created during rollout; updates are performed only on existing machines via in-place updates or by scaling down outdated machines
+ - When `maxSurge` is 1:
+ - The controller first scales up by creating one new machine to maximize fault tolerance
+ - Once `maxReplicas` (desiredReplicas + 1) is reached, it evaluates whether to in-place update or scale down old machines
+ - For each old machine needing rollout, the controller evaluates if it is eligible for in-place update. If so, it performs the in-place update on that machine. Otherwise, it scales down the outdated machine (which will be replaced by a new one in the next reconciliation cycle)
+ - This pattern repeats until all machines are up-to-date, it then scales back to the desired replica count
+
+- The implementation respects the existing set of responsibilities:
+ - KCP controller manages control plane Machines directly
+ - KCP controller enforces `maxSurge` limits during rolling updates
+ - KCP controller decides when to scale up, scale down, or perform in-place updates
+ - KCP controller runs preflight checks to ensure the control plane is stable before in-place updates
+ - KCP controller calls the `CanUpdateMachine` hook to verify if extensions can handle the changes
+ - When in-place update is possible, the KCP controller triggers the update by reconciling the desired state
+
+- The in-place update decision flow definition is:
+ - If `currentReplicas < maxReplicas` (desiredReplicas + maxSurge), scale up first to maximize fault tolerance
+ - If `currentReplicas >= maxReplicas`, select a machine needing rollout and evaluate options:
+ - Check if selected Machine is eligible for in-place update (determined by `UpToDate` function)
+ - Check if we already have enough up-to-date replicas (if `currentUpToDateReplicas >= desiredReplicas`, skip in-place and scale down)
+ - Run preflight checks to ensure control plane stability
+ - Call the `CanUpdateMachine` hook on registered runtime extensions
+ - If all checks pass, trigger in-place update. Otherwise, fall back to scale down/recreate
+ - This flow repeats on each reconciliation until all machines are up-to-date
+
+- Orchestration of in-place updates uses two key annotations:
+ - `in-place-updates.internal.cluster.x-k8s.io/update-in-progress` - Marks a Machine as undergoing in-place update
+ - `runtime.cluster.x-k8s.io/pending-hooks` - Tracks pending `UpdateMachine` runtime hooks
+
+The following schemas provide an overview of the in-place update workflow for KCP.
+
+Workflow #1: KCP controller determines that a Machine can be updated in-place and triggers the update.
+
+```mermaid
+sequenceDiagram
+ autonumber
+ participant KCP Controller
+ participant RX as Runtime Extension
+ participant M1 as Machine
+ participant IM1 as InfraMachine
+ participant KC1 as KubeadmConfig
+
+ KCP Controller->>KCP Controller: Select Machine for rollout
+ KCP Controller->>KCP Controller: Run preflight checks on control plane
+ KCP Controller->>RX: CanUpdateMachine(current, desired)?
+ RX-->>KCP Controller: Yes, with patches to indicate supported changes
+
+ KCP Controller->>M1: Set annotation "update-in-progress": ""
+ KCP Controller->>IM1: Apply desired InfraMachine spec Set annotation "update-in-progress": ""
+ KCP Controller->>KC1: Apply desired KubeadmConfig spec Set annotation "update-in-progress": ""
+ KCP Controller->>M1: Apply desired Machine spec Set annotation "pending-hooks": "UpdateMachine"
+```
+
+Workflow #2: The Machine controller detects the pending `UpdateMachine` hook and calls the runtime extension to perform the update.
+
+```mermaid
+sequenceDiagram
+ autonumber
+ participant Machine Controller
+ participant RX as Runtime Extension
+ participant M1 as Machine
+ participant IM1 as InfraMachine
+ participant KC1 as KubeadmConfig
+
+ Machine Controller-->>M1: Has "update-in-progress" and "pending-hooks: UpdateMachine"?
+ M1-->>Machine Controller: Yes!
+
+ Machine Controller->>RX: UpdateMachine(desired state)
+ RX-->>Machine Controller: Status: InProgress, RetryAfterSeconds: 30
+
+ Note over Machine Controller: Wait and retry
+
+ Machine Controller->>RX: UpdateMachine(desired state)
+ RX-->>Machine Controller: Status: Done
+
+ Machine Controller->>IM1: Remove annotation "update-in-progress"
+ Machine Controller->>KC1: Remove annotation "update-in-progress"
+ Machine Controller->>M1: Remove annotation "update-in-progress" Remove "UpdateMachine" from "pending-hooks"
+```
+
+Workflow #3: The KCP controller waits for in-place update to complete before proceeding with further operations.
+
+```mermaid
+sequenceDiagram
+ autonumber
+ participant KCP Controller
+ participant M1 as Machine
+
+ KCP Controller-->>M1: Is in-place update in progress?
+ M1-->>KCP Controller: Yes! ("update-in-progress" or "pending-hooks: UpdateMachine")
+
+ Note over KCP Controller: Wait for update to complete Requeue on Machine changes
+
+ KCP Controller-->>M1: Is in-place update in progress?
+ M1-->>KCP Controller: No! (annotations removed)
+
+ Note over KCP Controller: Continue with next Machine rollout or other operations
+```
+
+## Notes about managedFields refactoring for in-place updates (KCP/MS)
+
+To enable correct in-place updates of BootstrapConfigs and InfraMachines, CAPI v1.12 introduced a refactored managedFields structure. This change was necessary for the following reasons:
+
+- In CAPI <= v1.11, BootstrapConfigs/InfraMachines were only created, never updated
+- Starting with CAPI v1.12, BootstrapConfigs/InfraMachines need to be updated during in-place updates. SSA is used because it provides proper handling of co-ownership of fields and enables unsetting fields during updates
+
+### A "two field managers" approach
+
+The refactoring uses **two separate field managers** to enable different responsibilities:
+
+1. **Metadata manager** (`capi-kubeadmcontrolplane-metadata` / `capi-machineset-metadata`):
+ - Continuously syncs labels and annotations
+ - Updates on every reconciliation via `syncMachines`
+
+2. **Spec manager** (`capi-kubeadmcontrolplane` / `capi-machineset`):
+ - Manages the spec and in-place update specific annotations
+ - Updates only when creating objects or triggering in-place updates
+
+### ManagedFields structure comparison
+
+**CAPI <= v1.11** (legacy):
+- Machine:
+ - spec, labels, and annotations are owned by `capi-kubeadmcontrolplane` / `capi-machineset` (Apply)
+- BootstrapConfig / InfraMachine:
+ - labels and annotations are owned by `capi-kubeadmcontrolplane` / `capi-machineset` (Apply)
+ - spec is owned by `manager` (Update)
+
+**CAPI >= v1.12** (new):
+- Machine (unchanged):
+ - spec, labels, and annotations are owned by `capi-kubeadmcontrolplane` / `capi-machineset` (Apply)
+- BootstrapConfig / InfraMachine:
+ - labels and annotations are owned by `capi-kubeadmcontrolplane-metadata` / `capi-machineset-metadata` (Apply)
+ - spec is owned by `capi-kubeadmcontrolplane` / `capi-machineset` (Apply)
+
+### Object creation workflow (CAPI >= v1.12)
+
+When creating new BootstrapConfig/InfraMachine:
+
+1. **Initial creation**:
+ - Apply BootstrapConfig/InfraMachine with spec (manager: `capi-kubeadmcontrolplane` / `capi-machineset`)
+ - Remove managedFields for labels and annotations
+ - Result: labels and annotations are orphaned, spec is owned
+
+2. **First syncMachines call** (happens immediately after):
+ - Apply labels and annotations (manager: `capi-kubeadmcontrolplane-metadata` / `capi-machineset-metadata`)
+ - Result: Final desired managedField structure is established
+
+3. **Ready for operations**:
+ - Continuous `syncMachines` calls update labels/annotations without affecting the spec of a Machine
+ - In-place updates can now properly update spec fields and unset fields as needed
+
+### In-place update object modifications
+
+When triggering in-place updates:
+
+1. Apply BootstrapConfig/InfraMachine with:
+ - Updated spec (owned by the spec manager)
+ - `update-in-progress` annotation (owned by spec manager)
+ - For InfraMachine: `cloned-from` annotations (owned by the spec manager)
+
+2. Result after the in-place update trigger:
+ - labels and annotations are owned by the metadata manager
+ - spec is owned by the spec manager
+ - in-progress and cloned-from annotations are owned by the spec manager
diff --git a/docs/proposals/20240807-in-place-updates.md b/docs/proposals/20240807-in-place-updates.md
index 1c9ca8431baa..9234c683b192 100644
--- a/docs/proposals/20240807-in-place-updates.md
+++ b/docs/proposals/20240807-in-place-updates.md
@@ -78,7 +78,7 @@ __In-place Update__: any change to a Machine spec, including the Kubernetes Vers
__Update Lifecycle Hook__: CAPI Lifecycle Runtime Hook to invoke external update extensions.
-__Update Extension__: Runtime Extension (Implementation) is a component responsible to perform in place updates when the `External Update Lifecycle Hook` is invoked.
+__Update Extension__: Runtime Extension (Implementation) is a component responsible to perform in-place updates when the `External Update Lifecycle Hook` is invoked.
## Summary
@@ -100,11 +100,11 @@ This approach, inspired by the principle of immutable infrastructure (the very s
Over time several improvement were made to Cluster API immutable rollouts:
* Support for delete first strategy, thus making it easier to do immutable rollouts on bare metal / environments with constrained resources.
-* Support for [In place propagation of changes affecting Kubernetes objects only](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20221003-In-place-propagation-of-Kubernetes-objects-only-changes.md), thus avoiding unnecessary rollouts
+* Support for [In-place propagation of changes affecting Kubernetes objects only](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20221003-In-place-propagation-of-Kubernetes-objects-only-changes.md), thus avoiding unnecessary rollouts
* Support for [Taint nodes with PreferNoSchedule during rollouts](https://github.com/kubernetes-sigs/cluster-api/pull/10223), thus reducing Pod churn by optimizing how Pods are rescheduled during rollouts.
Even if the project continues to improve immutable rollouts, most probably there are and there will always be some remaining use cases where it is complex for users to perform immutable rollouts, or where users perceive immutable rollouts to be too disruptive to how they are used to manage machines in their organization:
-* More efficient updates (multiple instances) that don't require re-bootstrap. Re-bootstrapping a bare metal machine takes ~10-15 mins on average. Speed matters when you have 100s - 1000s of nodes to upgrade. For a common telco RAN use case, users can have 30000-ish nodes. Depending on the parallelism, that could take days / weeks to upgrade because of the re-bootstrap time.
+* More efficient updates (multiple instances) that don't require re-bootstrap. Re-bootstrapping a bare metal machine takes ~10-15 mins on average. Speed matters when you have 100s - 1000s of nodes to update. For a common telco RAN use case, users can have 30000-ish nodes. Depending on the parallelism, that could take days / weeks to update because of the re-bootstrap time.
* Credentials rotation, e.g. rotating authorized keys for SSH.
* Database workloads that use local storage and rely on application-level replication—rather than storage-level replication—can face significant downtime if recloning is required. In such cases, restoring a database may take hours and disrupt business continuity, compared to a simple reboot that takes just minutes (e.g. PostgreSQL clusters managed by CloudNativePG using local persistent volumes with storage classes like OpenEBS or TopoLVM).
@@ -114,9 +114,9 @@ With the implementation of an Update extension, users can take ownership of the
### Divide and conquer
-Considering the complexity of this topic, a phased approach is required to design and implement the solution for in-place upgrades.
+Considering the complexity of this topic, a phased approach is required to design and implement the solution for in-place updates.
-The main goal of the first iteration of this proposal is to make it possible for Cluster API users to start experimenting usage of in-place upgrades, so we can gather feedback and evolve to the next stage.
+The main goal of the first iteration of this proposal is to make it possible for Cluster API users to start experimenting usage of in-place updates, so we can gather feedback and evolve to the next stage.
This iteration will focus on implementing the machinery required to interact with update extensions, while users facing changes in the API types are deferred to follow up iterations.
@@ -126,11 +126,16 @@ This iteration will focus on implementing the machinery required to interact wit
Cluster API user experience MUST be the same when using default, immutable updates or when using external update extensions: e.g. in order to trigger a MachineDeployment rollout, you have to rotate a template, etc.
+Notably, this point has another relevant implication: users should care ONLY about the desired state, while Cluster API is responsible to choose
+the best strategy to achieve desired state.
+
+This proposal, with the introduction of update extensions, expands the set of tools Cluster API can use to achieve the desired state.
+
#### Fallback to Immutable rollouts
If external update extensions can not cover the totality of the desired changes, CAPI will defer to Cluster API’s default, immutable rollouts. This is important for a couple of reasons:
-* It allows to implement custom rollout strategies incrementally, without the need to cover all use cases up-front.
+* It allows to implement in-place update capabilities incrementally, without the need to cover all use cases up-front.
* There are cases when replacing the machine will always be necessary:
* When it is not possible to recover the machine, e.g. hardware failure.
* When the user determines that recovering the machine is too complex/costly vs replacing it.
@@ -138,9 +143,10 @@ If external update extensions can not cover the totality of the desired changes,
#### Clean separation of concern
-It is the responsibility of the extension to decide if it can perform changes in-place and to perform these changes on a single machine.
+It is the responsibility of the extension to decide if it can perform changes in-place and to perform these changes on a control plane single Machine
+and/or to all the Machines controlled by a MachineSet.
-The responsibility to determine which machine should be updated, the responsibility to handle CAPI resources during in-place update or immutable rollouts as well as the responsibility to handle rollout options like MaxSurge/MaxUnavailable will remain on the controllers owning the machine (e.g. KCP, MD controller).
+The responsibility to determine which Machine/MachineSet should be updated, the responsibility to handle CAPI resources during in-place update or immutable rollouts as well as the responsibility to handle rollout options like MaxSurge/MaxUnavailable will remain on the controllers owning the machine (e.g. KCP, MD controller).
### Goals
@@ -152,27 +158,32 @@ The responsibility to determine which machine should be updated, the responsibil
- To provide rollbacks in case of an in-place update failure. Failed updates need to be fixed manually by the user on the machine or by replacing the machine.
- Introduce any API changes both in core Cluster API or in KCP (or any other control plane provider).
+- Support more than one pluggable update extensions (future goal).
- Allow in-place updates for single-node clusters without the requirement to reprovision hosts (future goal).
## Proposal
-We propose to extend upgrade workflows to call External Update Extensions, if defined.
+We propose to extend KCP and MachineDeployment rollout workflows to call External Update Extensions, if defined.
+
+Initially, this feature will be implemented without making API changes in the current core Cluster API objects. It will follow Kubernetes' feature gate mechanism. All functionality related to in-place Updates will be available only if the `InPlaceUpdates` feature flag is set to true. It is disabled unless explicitly configured.
-Initially, this feature will be implemented without making API changes in the current core Cluster API objects. It will follow Kubernetes' feature gate mechanism. All functionality related to In-Place Updates will be available only if the `InPlaceUpdates` feature flag is set to true. It is disabled unless explicitly configured.
+This proposal introduces three new Lifecycle Hooks named `CanUpdateMachine`, `CanUpdateMachineSet` and `UpdateMachine` for communication between CAPI and external update implementers.
-This proposal introduces a Lifecycle Hook named `ExternalUpdate` for communication between CAPI and external update implementers. Multiple external updaters can be registered, each of them only covering a subset of machine changes. The CAPI controllers will ask the external updaters what kind of changes they can handle and, based on the response, compose and orchestrate them to achieve the desired state.
+Multiple external updaters can be registered, each of them only covering a subset of machine changes (*). The CAPI controllers will ask the external updaters what kind of changes they can handle and, based on the response, compose and orchestrate them to achieve the desired state.
With the introduction of this experimental feature, users may want to apply the in-place updates workflow to a subset of CAPI clusters only. By leveraging CAPI's `RuntimeExtension`, we can provide a namespace selector via [`ExtensionConfig`](https://cluster-api.sigs.k8s.io/tasks/experimental-features/runtime-sdk/implement-extensions#extensionconfig). This allows us to support cluster selection at the namespace level (only clusters/machines namespaces that match the selector) without applying API changes.
+(*) In the first iteration the number of external updaters will be limited to one.
+
### User Stories
#### Story 1
-As a cluster operator, I want to perform in-place updates on my Kubernetes clusters without replacing the underlying machines. I expect the update process to be flexible, allowing me to customize the strategy based on my specific requirements, such as air-gapped environments or special node configurations.
+As a cluster operator, I want to perform in-place updates on my Kubernetes clusters without replacing the underlying machines. I expect the update process to be flexible and customizable based on specific requirements, such as air-gapped environments or special node configurations.
#### Story 2
-As a cluster operator, I want to seamlessly transition between rolling and in-place updates while maintaining a consistent user interface. I appreciate the option to choose or implement my own update strategy, ensuring that the update process aligns with my organization's unique needs.
+As a cluster operator, I want to seamlessly transition between rolling and in-place updates while maintaining a consistent user interface. I appreciate the option to extend the rollout process with in-place update capabilities, ensuring that the update process aligns with my organization's unique needs.
#### Story 3
As a cluster operator for resource constrained environments, I want to utilize CAPI pluggable external update mechanism to implement in-place updates without requiring additional compute capacity in a single node cluster.
@@ -208,25 +219,20 @@ sequenceDiagram
end
capi->>capi: Decide Update Strategy
loop For all Machines
- capi->>apiserver: Mark Machine as pending
- apiserver->>mach: Notify changes
- mach->>apiserver: Set UpToDate condition to False
+ capi->>apiserver: Mark Machine as Updating in-place
loop For all External Updaters
- mach->>hook: Run updater
+ mach->>hook: Wait for the updater to apply changes
end
- mach->>apiserver: Mark Hooks in Machine as Done
- mach->>apiserver: Set UpToDate condition to True
+ mach->>apiserver: Mark Machine as UpToDate
end
```
When configured, external updates will, roughly, follow these steps:
1. CP/MD Controller: detect an update is required.
2. CP/MD Controller: query defined update extensions, and based on the response decides if an update should happen in-place. If not, the update will be performed as of today (rollout).
-3. CP/MD Controller: mark machines as pending to track that updaters should be called.
-4. Machine Controller: set `UpToDate` condition on machines to `False`.
-5. Machine Controller: invoke all registered updaters, sequentially, one by one.
-6. Machine Controller: once updaters finish use `sigs.k8s.io/cluster-api/internal/hooks.MarkAsDone()` to mark machine as done updating.
-7. Machine Controller: set `UpToDate` condition on machines to `True`.
+3. CP/MD Controller: mark machines as updating in-place.
+4. Machine Controller: invoke all registered updaters, sequentially, one by one.
+5. Machine Controller: once updaters finish Mark Machine as UpToDate.
The following sections dive deep into these steps, zooming in into the different component interactions and defining how the main error cases are handled.
@@ -246,31 +252,45 @@ sequenceDiagram
Operator->>+apiserver: make changes to CP/MD
apiserver->>+capi: Notify changes
apiserver->>-Operator: OK
- capi->>+hook: Can update?
- hook->>capi: Set of changes
- capi->>+hook2: Can update?
- hook2->>capi: Set of changes
- alt all changes covered?
- capi->>apiserver: Decide Update Strategy
+ capi->>+hook: Can update in-place?
+ hook->>capi: Set of changes supported by the external updater 1
+ capi->>+hook2: Can update in-place?
+ hook2->>capi: Set of changes supported by the external updater 2
+ alt Are all the changes covered by external updaters?
+ capi->>apiserver: Mark machines as updating in-place
else
- alt fallback strategy?
- capi->>apiserver: Re-create machines
- else
- capi->>apiserver: Marked update as failed
- end
+ capi->>apiserver: Re-create machines (regular rollout)
end
```
Both `KCP` and `MachineDeployment` controllers follow a similar pattern around updates; as a first step they detect if an update is required.
-With `InPlaceUpdates` feature gate enabled, CAPI controllers will compute the set of desired changes and iterate over the registered external updaters, requesting through the Runtime Hook the set of changes each updater can handle. The changes supported by an updater can be the complete set of desired changes, a subset of them or an empty set, signaling it cannot handle any of the desired changes.
+With `InPlaceUpdates` feature gate enabled, CAPI controllers will go through the "can update in-place" decision flow:
-If any combination of the updaters can handle the desired changes then CAPI will determine that the update can be performed using the external strategy.
+As a first step, CAPI controllers will compute the set of desired changes (current and desired state).
-If any of the desired changes cannot be covered by the updaters capabilities, CAPI will determine the desired state cannot be reached through external updaters. In this case, it will fallback to the rolling update strategy, replacing machines as needed.
+Then CAPI controllers will iterate over the registered external updaters, requesting each updater if it can handle required changes through the `CanUpdateMachineSet` (MachineDeployment) and `CanUpdateMachine` (KCP).
+
+The changes supported by an updater can be the complete set of desired changes, a subset of them or an empty set, signaling it cannot handle any of the desired changes.
+
+If the combination of the updaters can handle ALL the desired changes then CAPI will determine that the update can be performed in-place.
+
+If ANY of the desired changes cannot be covered by the updaters capabilities, CAPI will determine the desired state cannot be reached through external updaters. In this case, it will fallback to the rolling update strategy, replacing machines as needed.
### MachineDeployment updates
+The MachineDeployment update should take care of:
+- The internal implementation details of MachineDeployments, or more specifically of the intermediate layer MachineSet that controls Machines.
+- The MaxUnavailability and MaxSurge constraint that exist to protect user workloads.
+
+In order to do so:
+- The "can update in-place" decision is performed at MachineSet level by calling the `CanUpdateMachineSet` hook.
+- Before starting an in-place update, a Machine is moved from the current MachineSet (with the old spec) to
+ the MachineSet with the new spec; during this step also the Machine/InfraMachine/BootstrapConfig are updated
+ to the new spec.
+- Machines updating in-place are considered not available, because in-place updates are always considered as potentially disruptive.
+ - If maxUnavailable is zero, a new machine must be created first, then as soon as there is “buffer” for in-place, in-place update can proceed
+
```mermaid
sequenceDiagram
participant Operator
@@ -288,19 +308,40 @@ apiserver->>capi: Notify changes
apiserver->>Operator: OK
capi->>capi: Decide Update Strategy
capi->>apiserver: Create new MachineSet
+capi->>apiserver: Move existing Machine to the new MachineSet
loop For all machines
- capi->>apiserver: Mark as pending, update spec, and move to new Machine Set
- apiserver->>mach: Notify changes
- mach->>apiserver: Set UpToDate condition to False
+ capi->>apiserver: Move to new Machine Set, update spec
+ mach->>apiserver: Mark Machine as Updating in-place
loop For all updaters in plan
- mach->>hook: Run updater
+ mach->>hook: Wait for the updater to apply changes
end
- mach->>apiserver: Mark Hooks in Machine as Done
- mach->>apiserver: Set UpToDate condition to True
+ mach->>apiserver: Mark Machine as UpToDate
end
```
+Please note that:
+- When in-place is possible, the system should try to in-place update as many machines as possible.
+ In practice, this means that maxSurge might be not fully used (it is used only for scale up by one if maxUnavailable=0)
+- No in-place updates are performed when using rollout strategy on delete.
+
+Please refer to [implementation note](./20240807-in-place-updates-implementation-notes.md) for more details about how the move operation is performed.
+
### KCP updates
+The KCP external updates will work in a very similar way to MachineDeployments but removing the MachineSet level of indirection.
+
+In order to do so:
+- The "can update in-place" decision is performed at MachineSet level by calling the `CanUpdateMachine` hook.
+- Before starting an in-place update, the Machine/InfraMachine/BootstrapConfig are updated
+ to the new spec.
+- If maxSurge is one, a new machine must be created first, then as soon as there is “buffer” for in-place, in-place update can proceed.
+- If maxSurge is zero, in-place update can proceed immediately.
+- Note: to better understand above points, you might want to consider that maxSurge in KCP is a way to express if the
+ control plane rollout should be performed "scaling-out" or "scaling-in"
+- Note: KCP has its own definition of availability, that is preserved during a rollout no matter of it is performed using
+ in-place updates or regular rollouts.
+
+Notably, while KCP will always try to perform in-place whenever possible, KCP might decide to not perform in-place
+changes when it determines that this might impact the control-plane health.
```mermaid
sequenceDiagram
@@ -317,27 +358,33 @@ apiserver->>capi: Notify changes
apiserver->>Operator: OK
capi->>capi: Decide Update Strategy
loop For all machines
- capi->>apiserver: Mark Machine as pending, update spec
- apiserver->>mach: Notify changes
- mach->>apiserver: Set UpToDate condition to False
- loop For each External Updater
- mach->>hook: Run until completion
+ capi->>apiserver: Mark Machine as Updating in-place
+ loop For all updaters in plan
+ mach->>hook: Wait for the updater to apply changes
end
- mach->>apiserver: Mark Hooks in Machine as Done
- mach->>apiserver: Set UpToDate condition to True
+ mach->>apiserver: Mark Machine as UpToDate
end
```
-The KCP external updates will work in a very similar way to MachineDeployments but removing the MachineSet level of indirection. In this case, it's the KCP controller responsible for marking the machine as pending and updating
-the Machine spec, while the Machine controller manages setting the `UpToDate` condition. This follows this same pattern as for rolling updates, where the KCP controller directly creates and deletes Machines. Machines will be updated one by one, sequentially.
+Please refer to [implementation note](./20240807-in-place-updates-implementation-notes.md) for more details about how KCP handles in-place updates.
### Machine updates
+Once a Machine is marked as `Updating` in-place and the Machine's spec has been updated with the desired changes, the Machine controller takes over. This controller is responsible for calling the updaters and tracking the progress of those updaters and exposing this progress in the Machine conditions.
+
+The Machine controller currently calls only one updater (we are explicitly not trying to design a solution for ordering of execution at this stage. However, determining a specific ordering mechanism or dependency management between update extensions will need to be addressed in future iterations of this proposal).
+
+The controller will trigger updaters by calling the `UpdateMachine` hook. The updater could respond saying "update completed", "update failed" or "update in progress" with an optional "retry after X seconds". The CAPI controller will continuously poll the status of the update by hitting the same endpoint until the operation reports "update completed" or "update failed".
+
+CAPI expects the `UpdateMachine` endpoint of an updater to be idempotent: for the same Machine with the same spec, the endpoint can be called any number of times (before and after it completes), and the end result should be the same. CAPI guarantees that once an `UpdateMachine` endpoint has been called once, it won't change the Machine spec until the update either completes or fails.
+
+Once all of the updaters are complete, the Machine controller will mark machine as `UpToDate`. If the update fails, this will be reflected in the Machine status.
+
```mermaid
sequenceDiagram
box Management Cluster
participant apiserver as kube-api server
- participant capi as CAPI
+ participant capi as KCP/MD controller
participant mach as Machine Controller
participant hook as External updater
participant hook1 as Other external updaters
@@ -348,44 +395,21 @@ box Workload Cluster
end
capi->>apiserver: Decide Update Strategy
-capi->>apiserver: Mark Machine as pending, update spec
-apiserver->>mach: Notify changes
-mach->>hook: Start update
+capi->>apiserver: Mark Machine as Updating in-place
loop For all External Updaters
- mach->>hook: call UpdateMachine
- hook->>infra: Update components
- alt is pending
- hook->>mach: try in X secs
+ mach->>hook: call UpdateMachine hook
+ hook->>infra: Apply changes
+ alt is in-place updated not yet completed
+ hook->>mach: requeue after X secs
Note over hook,mach: Retry loop
- else is done
+ else is in-place completed
hook->>mach: Done
end
- mach->>hook1: call UpdateMachine
- hook1->>infra: Update components
- alt is pending
- hook1->>mach: try in X secs
- Note over hook1,mach: Retry loop
- else is done
- hook1->>mach: Done
- end
end
-mach->>apiserver: Mark Hooks in Machine as Done
-mach->>apiserver: Set UpToDate condition to True
+mach->>apiserver: Mark Machine as UpToDate
```
-Once a Machine is marked as pending and `UpToDate` condition is set and the Machine's spec has been updated with the desired changes, the Machine controller takes over. This controller is responsible for calling the updaters and tracking the progress of those updaters and exposing this progress in the Machine conditions.
-
-The Machine controller currently calls registered external updaters sequentially but without a defined order. We are explicitly not trying to design a solution for ordering of execution at this stage. However, determining a specific ordering mechanism or dependency management between update extensions will need to be addressed in future iterations of this proposal.
-
-The controller will trigger updaters by hitting a RuntimeHook endpoint (eg. `/UpdateMachine`). The updater could respond saying "update completed", "update failed" or "update in progress" with an optional "retry after X seconds". The CAPI controller will continuously poll the status of the update by hitting the same endpoint until the operation reports "update completed" or "update failed".
-
-CAPI expects the `/UpdateMachine` endpoint of an updater to be idempotent: for the same Machine with the same spec, the endpoint can be called any number of times (before and after it completes), and the end result should be the same. CAPI guarantees that once an `/UpdateMachine` endpoint has been called once, it won't change the Machine spec until the update either completes or fails.
-
-Once all of the updaters are complete, the Machine controller will mark machine as done. If the update fails, this will be reflected in the Machine status.
-
-From this point on, the `KCP` or `MachineDeployment` controller will take over and set the `UpToDate` condition to `True`.
-
-*Note: We might revisit which controller should set `UpToDate` during implementation, because we have to make sure there are no race conditions that can lead to reconcile failures, but apart from the ownership of this operation, the workflows described in this doc should not be impacted.*
+Please refer to [implementation note](./20240807-in-place-updates-implementation-notes.md) for more details about how managedFields management has been improved for allowing in-place updates (both for KCP and MS).
### Infra Machine Template changes
@@ -407,62 +431,16 @@ However, in-place updates might cause Nodes to become unhealthy while the update
### Examples
-This section aims to showcase our vision for the In-Places Updates end state. It shows a high level picture of a few common usecases, specially around how the different components interact through the API.
+This section aims to showcase our vision for the in-place update end state. It shows a high level picture of a few common use cases, specially around how the different components interact through the API.
-Note that these examples don't show all the low level details. Some of those details might not yet be defined in this doc and will be added later, the examples here are just to help communicate the vision.
+Note that these examples don't show all the low level details, the examples here are just to help communicate the vision.
-Let's imagine a vSphere cluster with a KCP control plane that has two fictional In-Place update extensions already deployed and registered through their respective `ExtensionConfig`.
+Let's imagine a vSphere cluster with a KCP control plane that has two fictional in-place update extensions already deployed and registered through their respective `ExtensionConfig`.
1. `vsphere-vm-memory-update`: The extension uses vSphere APIs to hot-add memory to VMs if "Memory Hot Add" is enabled or through a power cycle.
-2. `kcp-version-upgrade`: Updates the kubernetes version of KCP machines by using an agent that first updates the kubernetes related packages (`kubeadm`, `kubectl`, etc.) and then runs the `kubeadm upgrade` command. The In-place Update extension communicates with this agent, sending instructions with the kubernetes version a machine needs to be updated to.
-
-> Please note that exact Spec of messages will be defined during implementation; current examples are only meant to explain the flow.
+2. `kcp-version-update`: Updates the kubernetes version of KCP machines by using an agent that first updates the kubernetes related packages (`kubeadm`, `kubectl`, etc.) and then runs the `kubeadm upgrade` command. The In-place Update extension communicates with this agent, sending instructions with the kubernetes version a machine needs to be updated to.
#### KCP kubernetes version update
-```mermaid
-sequenceDiagram
- participant Operator
-
- box Management Cluster
- participant apiserver as kube-api server
- participant capi as KCP Controller
- participant mach as Machine Controller
- participant hook as KCP version update extension
- participant hook2 as vSphere memory update extension
- end
-
- box Workload Cluster
- participant machines as Agent in machine
- end
-
- Operator->>+apiserver: Update version field in KCP
- apiserver->>+capi: Notify changes
- apiserver->>-Operator: OK
- loop For 3 KCP Machines
- capi->>+hook2: Can update [spec.version, clusterConfiguration.kubernetesVersion]?
- hook2->>capi: I can update []
- capi->>+hook: Can update [spec.version, clusterConfiguration.kubernetesVersion]?
- hook->>capi: I can update [spec.version, clusterConfiguration.kubernetesVersion]
- capi->>capi: Decide Update Strategy
- capi->>apiserver: Mark Machine as pending, update spec
- apiserver->>mach: Notify changes
- mach->>apiserver: Set UpToDate condition to False
- apiserver->>mach: Notify changes
- mach->>hook2: Run update in in Machine
- hook2->>mach: Done
- mach->>hook: Run update in in Machine
- hook->>mach: In progress, requeue in 5 min
- hook->>machines: Update packages and run kubeadm upgrade 1.31
- machines->>hook: Done
- mach->>hook2: Run update in in Machine
- hook2->>mach: Done
- mach->>hook: Run update in in Machine
- hook->>mach: Done
- mach->>apiserver: Mark Hooks in Machine as Done
- mach->>apiserver: Set UpToDate condition
- end
-```
-
The user starts the process by updating the version field in the KCP object:
```diff
@@ -472,8 +450,6 @@ metadata:
name: kcp-1
spec:
replicas: 3
- rolloutStrategy:
- type: InPlace
- version: v1.30.0
+ version: v1.31.0
```
@@ -484,225 +460,125 @@ First, it makes a request to the `vsphere-vm-memory-update/CanUpdateMachine` end
```json
{
- "changes": ["machine.spec.version", "bootstrap.spec.clusterConfiguration.kubernetesVersion"],
+ "current": {
+ "machine": { ... },
+ "infrastructureMachine": { ... },
+ "bootstrapConfig": { ... },
+ },
+ "desired": {
+ "machine": { ... },
+ "infrastructureMachine": { ... },
+ "bootstrapConfig": { ... },
+ }
}
```
-The `vsphere-vm-memory-update` extension does not support any or the required changes, so it responds with the following message declaring that if does not accept any of the requrested changes:
+At this stage, the difference between current and desired will be the change applied by the user.
+
+The `vsphere-vm-memory-update` extension does not support any or the required changes, so it responds with the following message declaring that it does not accept any of the requested changes:
```json
{
- "error": null,
- "acceptedChanges": [],
+ "machinePatch": [],
+ "infrastructureMachinePatch": [],
+ "bootstrapConfigPatch": [],
}
```
-Given that there are still changes not covered, KCP continue with the next update extension, making the same request to the `kcp-version-upgrade/CanUpdateMachine` endpoint of the `kcp-version-upgrade` extension:
+Notably, supported changes are expressed as patches (more in the example below).
+Given that there are still changes not covered, KCP continue with the next update extension, making the same request to the `kcp-version-update/CanUpdateMachine` endpoint of the `kcp-version-update` extension:
```json
{
- "changes": ["machine.spec.version", "bootstrap.spec.clusterConfiguration.kubernetesVersion"],
+ "current": {
+ "machine": { ... },
+ "infrastructureMachine": { ... },
+ "bootstrapConfig": { ... },
+ },
+ "desired": {
+ "machine": { ... },
+ "infrastructureMachine": { ... },
+ "bootstrapConfig": { ... },
+ }
}
```
-The `kcp-version-upgrade` extension detects that this is a KCP machine, verifies that the changes only require a kubernetes version upgrade, and responds:
+The difference between current and desired will still be the change applied by the user.
+If instead the `vsphere-vm-memory-update` would have declared its ability to perform some changes via a patch,
+those changes would be applied to change "current" state the second extension should consider.
+
+The `kcp-version-update` extension detects that this is a KCP machine, verifies that the changes only require a kubernetes version update, and responds:
```json
{
- "error": null,
- "acceptedChanges": ["machine.spec.version", "bootstrap.spec.clusterConfiguration.kubernetesVersion"],
+ "machinePatch": [
+ {
+ "type": "JSONPatch",
+ "patch": [{"op":"replace","path":"/spec/version","value":"v1.31.0"}],
+ },
+ ],
+ "infrastructureMachinePatch": [ ... ],
+ "bootstrapConfigPatch": [ ... ],
}
```
-Now that the KCP knows how to cover all desired changes, it proceeds to mark the first selected KCP machine for update. It sets the pending hook annotation and condition on the machine, which is the signal for the Machine controller to treat this changes differently (as an external update).
+Now that the KCP knows how to cover all desired changes, it proceeds to mark the `Updating` condition on the first selected KCP machine to true.
-```diff
-apiVersion: cluster.x-k8s.io/v1beta1
-kind: Machine
-metadata:
-+ annotations:
-+ runtime.cluster.x-k8s.io/pending-hooks: ExternalUpdate
- name: kcp-1-hfg374h
-spec:
-- version: v1.30.0
-+ version: v1.31.0
- bootstrap:
- configRef:
- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
- kind: KubeadmConfig
- name: kcp-1-hfg374h-9wc29
- uid: fc69d363-272a-4b91-aa35-72ccdaa7a427
-status:
- conditions:
-+ - lastTransitionTime: "2024-12-31T23:50:00Z"
-+ status: "False"
-+ type: UpToDate
-```
+Please refer to [implementation note](./20240807-in-place-updates-implementation-notes.md) for more details about how the Machine is transitioned to Updating
+while avoiding race conditions between the controllers involved in this process.
These changes are observed by the Machine controller. Then it call all updaters. To trigger the updater, it calls the update extensions one by one. The `vsphere-vm-memory-update/UpdateMachine` receives the first request:
```json
{
- "machineRef": {...},
-}
-```
-
-Since this extension has not been able to cover any of the changes, it responds with the `Done` (machine controller doesn't need to know if the update was accepted or rejected):
-
-```json
-{
- "error": null,
- "status": "Done"
+ "machine": { ... },
+ "infrastructureMachine": { ... },
+ "bootstrapConfig": { ... },
}
```
-The Machine controller then sends a simillar request to `kcp-version-upgrade/UpdateMachine` endpoint:
+Since this extension has not been able to cover any of the changes, it responds with the `Success` (machine controller doesn't need to know if the update was accepted or rejected):
```json
{
- "machineRef": {...},
+ "status": "Success"
}
```
-When the `kcp-version-upgrade` extension receives the request, it verifies it can read the Machine object, verifies it's a CP machine and triggers the upgrade process by sending the order to the agent. It then responds to the Machine controller:
+The Machine controller then sends a similar request to `kcp-version-update/UpdateMachine` endpoint; when the `kcp-version-update` extension receives the request, it verifies it can read the Machine object, verifies it's a CP machine and triggers the update process by sending the order to the agent. It then responds to the Machine controller:
```json
{
- "error": null,
- "status": "InProgress",
+ "status": "Success",
+ "message": "I'm still applying changes",
"retryAfterSeconds": "5m0s"
}
```
-The Machine controller then requeues the reconcile request for this Machine for 5 minutes later. On the next reconciliation it repeats the request to the `vsphere-vm-memory-update/UpdateMachine` endpoint:
+The Machine controller then requeues the reconcile request for this Machine for 5 minutes later. On the next reconciliation the `vsphere-vm-memory-update` which is idempotent, returns `Success` response, once again.
```json
{
- "machineRef": {...},
+ "status": "Success"
}
```
-The `vsphere-vm-memory-update` which is idempotent, returns `Done` response, once again.
+The Machine controller then repeats the request to the previously pending `kcp-version-update/UpdateMachine` endpoint; the `kcp-version-update` which has tracked the update process reported by the agent and received the completion event, responds:
```json
{
- "error": null,
- "status": "Done"
+ "status": "Success"
}
```
-The Machine controller then repeats the request to the previously pending `kcp-version-upgrade/UpdateMachine` endpoint:
-
-```json
-{
- "machineRef": {...},
-}
-```
-
-The `kcp-version-upgrade` which has tracked the upgrade process reported by the agent and received the completion event, responds:
-
-```json
-{
- "error": null,
- "status": "Done"
-}
-```
-
-All in-place `ExternalUpdate` hooks are completed execution, so the Machine controller removes the annotation:
-
-```diff
-apiVersion: cluster.x-k8s.io/v1beta1
-kind: Machine
-metadata:
-- annotations:
-- runtime.cluster.x-k8s.io/pending-hooks: ExternalUpdate
- name: kcp-1-hfg374h
-spec:
- version: v1.31.0
- bootstrap:
- configRef:
- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
- kind: KubeadmConfig
- name: kcp-1-hfg374h-9wc29
- uid: fc69d363-272a-4b91-aa35-72ccdaa7a427
-status:
- conditions:
- - lastTransitionTime: "2024-12-31T23:50:00Z"
- status: "False"
- type: UpToDate
-```
-
-On the next KCP reconciliation, it detects that this machine doesn't have any pending hooks and sets the `UpToDate` condition to `True`.
-
-```diff
-apiVersion: cluster.x-k8s.io/v1beta1
-kind: Machine
-metadata:
- name: kcp-1-hfg374h
-spec:
- version: v1.31.0
- bootstrap:
- configRef:
- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
- kind: KubeadmConfig
- name: kcp-1-hfg374h-9wc29
- uid: fc69d363-272a-4b91-aa35-72ccdaa7a427
-status:
- conditions:
-- - lastTransitionTime: "2024-12-31T23:50:00Z"
-- status: "False"
-+ - lastTransitionTime: "2024-12-31T23:59:59Z"
-+ status: "True"
- type: UpToDate
-```
+All in-place `ExternalUpdate` hooks are completed execution, so the Machine controller sets the
+machine's `Upgrading` condition to false, and thus `UpToDate` flips back to true.
This process is repeated for the second and third KCP machine, finally marking the KCP object as up to date.
#### Update worker node memory
-```mermaid
-sequenceDiagram
- participant Operator
-
- box Management Cluster
- participant apiserver as kube-api server
- participant capi as MD controller
- participant msc as MachineSet Controller
- participant mach as Machine Controller
- participant hook2 as KCP version update extension
- participant hook as vSphere memory update extension
- end
-
-
- participant api as vSphere API
-
- Operator->>+apiserver: Update memory field in VsphereMachineTemplate
- apiserver->>+capi: Notify changes
- apiserver->>-Operator: OK
- capi->>+hook: Can update [spec.memoryMiB]?
- hook->>capi: I can update [spec.memoryMiB]
- capi->>+hook2: Can update []?
- hook2->>capi: I can update []
- capi->>capi: Decide Update Strategy
- capi->>apiserver: Create new MachineSet
- loop For all Machines
- capi->>apiserver: Mark as pending and move to new Machine Set
- apiserver->>msc: Notify changes
- msc->>apiserver: Update Machine's spec.memoryMiB
- apiserver->>mach: Notify changes
- mach->>hook: Run update in in Machine
- hook->>mach: In progress
- hook->>api: Update VM's memory
- api->>hook: Done
- mach->>hook: Run update in in Machine
- hook->>mach: Done
- mach->>apiserver: Mark Machine as updated
- mach->>apiserver: Mark Hooks in Machine as Done
- msc->>apiserver: Set UpToDate condition
- end
-```
-
The user starts the process by creating a new VSphereMachineTemplate with the updated `memoryMiB` value and updating the infrastructure template ref in the MachineDeployment:
```diff
@@ -724,8 +600,6 @@ kind: MachineDeployment
metadata:
name: m-cluster-vsphere-gaslor-md-0
spec:
- strategy:
- type: InPlace
template:
spec:
infrastructureRef:
@@ -735,38 +609,47 @@ spec:
+ name: md-1-2
```
-The `vsphere-vm-memory-update` extension informs that can cover required requested changes:
-
-```json
-{
- "changes": ["infraMachine.spec.memoryMiB"],
-}
-```
+The "can update in-place" decision is performed in a similar way than in the previous
+example, but in this case the `CanUpdateMachineSet` is called:
```json
{
- "error": null,
- "acceptedChanges": ["infraMachine.spec.memoryMiB"],
+ "current": {
+ "machineSet": { ... },
+ "infrastructureMachineTemplate": { ... },
+ "bootstrapConfigTemplate": { ... },
+ },
+ "desired": {
+ "machineSet": { ... },
+ "infrastructureMachine"Template: { ... },
+ "bootstrapConfigTemplate": { ... },
+ }
}
```
-The request is also made to `kcp-version-upgrade` but it responds with an empty array, indicating it cannot handle any of the changes:
+The `vsphere-vm-memory-update` extension informs that can cover required requested changes in a similar way than in the previous example.
```json
{
- "error": null,
- "acceptedChanges": [],
+ "machineSetPatch": [ ... ],
+ "infrastructureMachineTemplatePatch": [
+ {
+ "type": "JSONPatch",
+ "patch": [{"op":"replace","path":"/spec/template/spec/memoryMiB","value":"8192"}],
+ },
+ ],
+ "bootstrapConfigTemplatePatch": [ ... ],
}
```
-The Machine controller then creates a new MachineSet with the new spec and moves the first Machine to it by updating its `OwnerRefs`, it also marks the Machine as pending:
+The request is also made to `kcp-version-update` but it responds with an empty patches, indicating it cannot handle any of the changes.
+
+The MachineDeployment controller then creates a new MachineSet with the new spec and moves the first Machine to it by updating its `OwnerRefs`:
```diff
apiVersion: cluster.x-k8s.io/v1beta1
kind: Machine
metadata:
-+ annotations:
-+ runtime.cluster.x-k8s.io/pending-hooks: ExternalUpdate
name: md-1-6bp6g
ownerReferences:
- apiVersion: cluster.x-k8s.io/v1beta1
@@ -775,27 +658,8 @@ metadata:
+ name: md-1-hndio
```
-The MachineSet controller detects that this machine is out of date and is pending external update execution and proceeds to update the Machine's spec and sets the `UpToDate` condition to `False`:
-
-```diff
-apiVersion: cluster.x-k8s.io/v1beta1
-kind: Machine
-metadata:
- name: md-1-6bp6g
- annotations:
- runtime.cluster.x-k8s.io/pending-hooks: ExternalUpdate
-spec:
- infrastructureRef:
- apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
- kind: VSphereMachine
-- name: md-1-1-whtwq
-+ name: md-1-2-nfdol
-status:
-+ conditions:
-+ - lastTransitionTime: "2024-12-31T23:50:00Z"
-+ status: "False"
-+ type: UpToDate
-```
+Please refer to [implementation note](./20240807-in-place-updates-implementation-notes.md) for more details about how the Machine is transitioned from the old MachineSet to the new MachineSet, as well also for details on how the Machine is marked as Updating in-place
+ while avoiding race conditions between the controllers involved in this process.
From that point, the Machine controller follows the same process as in the first example.
@@ -803,40 +667,6 @@ The process is repeated for all replicas in the MachineDeployment.
#### Update worker nodes OS from Linux to Windows
-```mermaid
-flowchart TD
- Update[MachineDeployment spec change] --> UpdatePlane{Can all changes be covered with the registered update extensions?}
- UpdatePlane -->|No| Roll[Fallback to machine replacement rollout]
- UpdatePlane -->|Yes| InPlace[Run extensions to update in place]
-```
-
-```mermaid
-sequenceDiagram
- participant Operator
-
- box Management Cluster
- participant apiserver as kube-api server
- participant capi as MD controller
- participant msc as MachineSet Controller
- participant mach as Machine Controller
- participant hook as vSphere memory update extension
- participant hook2 as KCP version update extension
- end
-
-
- Operator->>+apiserver: Update template field in VsphereMachineTemplate
- apiserver->>+capi: Notify changes
- apiserver->>-Operator: OK
- capi->>+hook: Can update [spec.template]?
- hook->>capi: I can update []
- capi->>+hook2: Can update [spec.template]?
- hook2->>capi: I can update []
- capi->>apiserver: Create new MachineSet
- loop For all Machines
- capi->>apiserver: Replace machines
- end
-```
-
The user starts the process by creating a new VSphereMachineTemplate with the updated `template` value and updating the infrastructure template ref in the MachineDeployment:
```diff
@@ -858,10 +688,6 @@ kind: MachineDeployment
metadata:
name: m-cluster-vsphere-gaslor-md-0
spec:
- strategy:
- type: InPlace
- fallbackRollingUpdate:
- maxUnavailable: 1
template:
spec:
infrastructureRef:
@@ -871,22 +697,17 @@ spec:
+ name: md-1-3
```
-Both the `kcp-version-upgrade` and the `vsphere-vm-memory-update` extensions inform that they cannot handle any of the changes:
-
-```json
-{
- "changes": ["infraMachine.spec.template"],
-}
-```
+Both the `kcp-version-update` and the `vsphere-vm-memory-update` extensions inform that they cannot handle any of the changes:
```json
{
- "error": null,
- "acceptedChanges": [],
+ "machineSetPatch": [],
+ "infrastructureMachineTemplatePatch": [],
+ "bootstrapConfigTemplatePatch": [],
}
```
-Since the fallback to machine replacement is a default strategy and always enabled, the MachineDeployment controller proceeds with the rollout process as it does today, replacing the old machines with new ones.
+The MachineDeployment controller detects that not all the changes can be performed in-place, and thus it proceeds with the rollout process as it does today, replacing the old machines with new ones.
### Security Model
@@ -928,6 +749,8 @@ we will provide a way to toggle the in-place possibly though the API.
- [x] 2024-05: Second round of feedback.
- [x] 2024-07: Present proposal at a [community meeting].
- [x] 2024-08: Open proposal [PR](https://github.com/kubernetes-sigs/cluster-api/pull/11029).
+- [x] 2025-04: Proposal merged
+- [x] 2025-12: Update proposal after first implementation
[community meeting]: https://docs.google.com/document/d/1ushaVqAKYnZ2VN_aa3GyKlS4kEd6bSug13xaXOakAQI/edit#heading=h.pxsq37pzkbdq
diff --git a/docs/proposals/20240916-improve-status-in-CAPI-resources.md b/docs/proposals/20240916-improve-status-in-CAPI-resources.md
index d07778c33455..f5dd11bfcdd6 100644
--- a/docs/proposals/20240916-improve-status-in-CAPI-resources.md
+++ b/docs/proposals/20240916-improve-status-in-CAPI-resources.md
@@ -548,7 +548,7 @@ Notes:
- MachineSet is considered as a sort of implementation detail of MachineDeployments, so it doesn't have its own concept of availability.
Similarly, this proposal is dropping the notion of MachineSet readiness because it is preferred to let users focus on Machines readiness.
- When implementing this proposal `MachinesUpToDate` condition will be `false` for older MachineSet, `true` for the current MachineSet;
- in the future this might change in case Cluster API will start supporting in-place upgrades.
+ in the future this might change in case Cluster API will start supporting in-place updates.
- `Remediating` for older MachineSets will report that remediation will happen as part of the regular rollout (Cluster API
does not remediate Machines on old MachineSets, because those Machines are already scheduled for deletion).
diff --git a/docs/proposals/20250513-chained-and-efficient-upgrades-for-clusters-with-managed-topologies.md b/docs/proposals/20250513-chained-and-efficient-upgrades-for-clusters-with-managed-topologies.md
new file mode 100644
index 000000000000..9e3479dc150d
--- /dev/null
+++ b/docs/proposals/20250513-chained-and-efficient-upgrades-for-clusters-with-managed-topologies.md
@@ -0,0 +1,430 @@
+---
+title: Chained and efficient upgrades for Clusters with managed topologies
+authors:
+ - "@fabriziopandini"
+reviewers:
+ - "@sbueringer"
+ - "@chrischdi"
+creation-date: 2025-05-13
+last-updated: 2025-05-13
+status: implementable
+see-also:
+ - "/docs/proposals/20210526-cluster-class-and-managed-topologies.md"
+ - "/docs/proposals/20220414-lifecycle-hooks.md"
+---
+
+# Chained and efficient upgrades for Clusters with managed topologies
+
+## Table of Contents
+
+
+* [Chained and efficient upgrades for Clusters with managed topologies](#chained-and-efficient-upgrades-for-clusters-with-managed-topologies)
+ * [Table of Contents](#table-of-contents)
+ * [Glossary](#glossary)
+ * [Summary](#summary)
+ * [Motivation](#motivation)
+ * [Goals](#goals)
+ * [Non-Goals](#non-goals)
+ * [Proposal](#proposal)
+ * [User Stories](#user-stories)
+ * [Implementation Details/Notes/Constraints](#implementation-detailsnotesconstraints)
+ * [Upgrade plan](#upgrade-plan)
+ * [Performing chained upgrades](#performing-chained-upgrades)
+ * [Lifecycle hooks](#lifecycle-hooks)
+ * [Security Model](#security-model)
+ * [Risks and Mitigations](#risks-and-mitigations)
+ * [Alternatives](#alternatives)
+ * [Upgrade Strategy](#upgrade-strategy)
+ * [Additional Details](#additional-details)
+ * [Test Plan](#test-plan)
+ * [Graduation Criteria](#graduation-criteria)
+ * [Version Skew Strategy](#version-skew-strategy)
+ * [Implementation History](#implementation-history)
+
+
+## Glossary
+
+- **Chained upgrade**: an upgrade sequence that goes from one Kubernetes version to another
+ by passing through a set of intermediate versions. e.g., Upgrading from v1.31.0 (current state) to v1.34.0 (target version) requires
+ a chained upgrade with the following steps: v1.32.0 (first intermediate version)-> v1.33.0 (second intermediate version)
+ -> v1.34.0 (target version)
+
+- **Upgrade plan**: the sequence of intermediate versions ... target version that a Cluster must upgrade to when
+ performing a chained upgrade.
+
+- **Efficient upgrade**: a chained upgrade where worker nodes skip some of the intermediate versions,
+ when allowed by the [Kubernetes version skew policy](https://kubernetes.io/releases/version-skew-policy/) when the chained upgrade is also an efficient upgrade,
+ the upgrade plan for worker machines is a subset of the upgrade plan for control plane machines.
+
+## Summary
+
+This proposal will allow Cluster API users with Clusters using managed topologies to upgrade by more than one minor
+Kubernetes version by performing chained and efficient upgrades.
+
+## Motivation
+
+[KEP-3935](https://github.com/kubernetes/enhancements/pull/3936) extended the [Kubernetes version skew policy](https://kubernetes.io/releases/version-skew-policy/),
+making it possible to minimize the number of worker's machines rollouts when upgrading by more than one minor.
+
+Cluster API users could already benefit from this Kubernetes feature by orchestrating upgrade of different
+components like KCP and MachineDeployments.
+
+However, as of today, Cluster API users with Clusters using managed topologies cannot benefit from this feature,
+because the topology controller only implements support for upgrading from one minor to the next one.
+
+This proposal will remove this gap and allow Cluster API users with Clusters using managed topologies to upgrade
+by more than one minor Kubernetes version by performing chained and efficient upgrades.
+
+### Goals
+
+When using clusters with managed topologies:
+- Allow Cluster API users to perform chained upgrades.
+- Automatically perform chained upgrades in an efficient way by skipping workers upgrades whenever possible.
+- Allow Cluster API users to influence the upgrade plan e.g. based on availability of machines images for the intermediate versions.
+
+### Non-Goals
+
+- Support Kubernetes version downgrades.
+
+## Proposal
+
+### User Stories
+
+- As a user, I want to upgrade my Cluster using a managed topology by more than one minor version by simply changing
+ the value in `Cluster.spec.topology.version`.
+
+- As a user, I want that Cluster API automatically minimizes the number of worker machine rollouts
+ when upgrading a Cluster using managed topology by more than one minor.
+
+- As a cluster class author, I want to be able to specify the Kubernetes versions that the system might use as
+ intermediate or target versions for a chained upgrade for a Cluster using a specific cluster class.
+
+- As a developer building on top of Cluster API, I want that lifecycle hooks allow orchestration of external processes,
+ like e.g. addon management, during different steps of a chained upgrade.
+
+### Implementation Details/Notes/Constraints
+
+This proposal is composed of three sets of changes:
+
+- Improvements required to determine the upgrade plan for a chained upgrade.
+- Improvements required to perform chained and efficient upgrades.
+- Improvements to upgrade-related Lifecycle hooks.
+
+#### Upgrade plan
+
+To compute an upgrade plan it is required to determine the sequence of intermediate Kubernetes versions that a Cluster
+must go through when performing a chained upgrade to a target version. The following changes will make it possible:
+
+The ClusterClass CR will be extended to make it possible to define the list of Kubernetes versions that can be
+used for chained upgrades of the corresponding clusters.
+
+```yaml
+apiVersion: cluster.x-k8s.io/v1beta2
+kind: ClusterClass
+metadata:
+ name: quick-start-runtimesdk
+spec:
+ kubernetesVersions:
+ - v1.28.0
+ - v1.29.0
+ - v1.30.0
+ - v1.30.1
+ - v1.31.2
+ - ...
+```
+
+When computing the upgrade plan from Kubernetes vA to vB, Cluster API will use the latest version for each minor in
+between vA and vB.
+
+In the example above, the upgrade plan from v1.28.0 - current version - to v1.31.2 - target version -, will be:
+v1.29.0 -> v1.30.1 -> v1.31.2
+
+Note: By convention, the current version is omitted from the upgrade plan, the target version is included.
+
+Note: Cluster API cannot determine the list of available Kubernetes versions automatically, because the versions that can be used
+in a Cluster API management cluster depend on external factors, e.g., on the availability of machine images for a Kubernetes version.
+
+As an alternative to explicitly setting the list of versions in ClusterClasses, it will all also be possible to define
+a runtime extension to be called when computing an upgrade plan; this extension could be used to return a
+dynamically computed list of Kubernetes versions that can be used.
+
+```yaml
+apiVersion: cluster.x-k8s.io/v1beta2
+kind: ClusterClass
+metadata:
+ name: quick-start-runtimesdk
+spec:
+ upgrade:
+ external:
+ generateUpgradePlanExtension: get-upgrade-plan.foo
+```
+
+Example Request:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: GenerateUpgradePlanRequest
+settings:
+cluster:
+ apiVersion: cluster.x-k8s.io/v1beta1
+ kind: Cluster
+ metadata:
+ name: test-cluster
+ namespace: test-ns
+ spec:
+ ...
+ status:
+ ...
+fromKubernetesVersion: "v1.29.0"
+toKubernetesVersion: "v1.33.0"
+```
+
+Example Response:
+
+```yaml
+apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
+kind: GenerateUpgradePlanResponse
+status: Success # or Failure
+message: "error message if status == Failure"
+controlPlaneUpgrades:
+- version: v1.30.0
+- version: v1.31.0
+- version: v1.32.3
+- version: v1.33.0
+ ```
+
+Note: in this case the system will infer the list of intermediate version for workers from the list of control plane versions, taking
+care of performing the minimum number of workers upgrade by taking into account the [Kubernetes version skew policy](https://kubernetes.io/releases/version-skew-policy/).
+
+Implementers of this runtime extension can also support more sophisticated use cases, e.g.
+
+- Go through more patch release for a minor if necessary, e.g., v1.30.0 -> v1.30.1 -> etc.
+
+ ```yaml
+ ...
+ controlPlaneUpgrades:
+ - version: v1.30.0
+ - version: v1.30.1
+ - ...
+ ```
+
+Note: in this case the system will infer the list of intermediate version for workers from the list of control plane versions, taking
+care of performing the minimum number of workers upgrade by taking into account the [Kubernetes version skew policy](https://kubernetes.io/releases/version-skew-policy/).
+
+- Force workers to upgrade to specific versions, e.g., force workers upgrade to v1.30.0 when doing v1.29.0 -> v1.32.3
+ (in this example, worker upgrade to 1.30.0 is not required by the [Kubernetes version skew policy](https://kubernetes.io/releases/version-skew-policy/), so it would
+ be skipped under normal circumstances).
+
+ ```yaml
+ ...
+ controlPlaneUpgrades:
+ - version: v1.30.0
+ - version: v1.31.0
+ - version: v1.32.3
+ workersUpgrades:
+ - version: v1.30.0
+ - version: v1.32.3
+ ```
+
+Note: in this case the system will take into consideration the provided `workersUpgrades`, and validated it is
+consistent with `controlPlaneUpgrades` and also compliant with the [Kubernetes version skew policy](https://kubernetes.io/releases/version-skew-policy/).
+
+- Force workers to upgrade to all the intermediate steps (opt out from efficient upgrades).
+
+ ```yaml
+ ...
+ controlPlaneUpgrades:
+ - version: v1.30.0
+ - version: v1.31.0
+ - version: v1.32.3
+ workersUpgrades:
+ - version: v1.30.0
+ - version: v1.31.0
+ - version: v1.32.3
+ ```
+
+Note: in this case the system will take into consideration the provided `workersUpgrades`, and validated it is
+consistent with `controlPlaneUpgrades` and also compliant with the [Kubernetes version skew policy](https://kubernetes.io/releases/version-skew-policy/).
+
+Plase also consider that:
+- In case both the list of Kubernetes versions and the runtime extension definition will be left empty in a cluster class,
+ Cluster API will behave as of today: only upgrades to the next minor are allowed for the corresponding clusters.
+- If the list of Kubernetes versions is defined in a ClusterClass, the system is going to use this info also in
+ the Cluster validation webhook in order to:
+ - Validate the initial version of a corresponding cluster (on create)
+ - Validate the target version for an upgrade of a corresponding cluster (on update)
+ - Check if there is a valid upgrade path from the current version to the target version (on update)
+- If instead, the ClusterClass is reading upgrade plans from a runtime extension, the Cluster validation webhook is
+ NOT going to call this runtime extension, and thus it won't validate the initial/target version of a corresponding cluster.
+ - This limitation is driven by the fact that adding nested http calls into webhooks might lead to performance
+ issues; also, in most cases advanced users already are implementing additional checks for cluster upgrades, and they
+ need full flexibility in how to integrate the upgrade plan checks.
+- During a chained upgrade, The system will ensure that the upgrade plan is continuously re-computed, thus
+ adapting to changes to the list of Kubernetes versions that can be used.
+ - If during a chained upgrade the system fails to determine a viable upgrade path to make
+ progress, the upgrade will be blocked and the issue reported in a condition.
+
+#### Performing chained upgrades
+
+The topology controller is the component responsible to orchestrate upgrades for clusters using a managed topology,
+and it will be improved to:
+- compute the upgrade plan (when an upgrade is required/in progress)
+- perform the chained upgrade going through all the intermediate steps in the upgrade plan
+
+While the first change can be inferred from the previous paragraph, the second change requires some additional details.
+
+The topology controller is already capable of performing two atomic operations used during upgrades, "upgrade control
+plane" and "upgrade workers". Today for an upgrade we run "upgrade control plane" and then "upgrade workers".
+
+This proposal is planning to use existing "upgrade control plane" and "upgrade workers" primitives multiple times
+to perform chained and efficient upgrades, e.g., v1.29.0 -> v1.33.0 will be executed as:
+
+| Operation | Note |
+|------------------------------------|----------------------------------------------------------------------------|
+| CP upgrade v1.29.0 -> v1.30.0 | workers can remain on v1.29.0 |
+| CP upgrade v1.30.0 -> v1.31.0 | workers can remain on v1.29.0 |
+| CP upgrade v1.31.0 -> v1.32.0 | |
+| Workers upgrade v1.29.0 -> v1.32.0 | workers must upgrade to prevent violation of Kubernetes version skew rules |
+| CP upgrade v1.32.0 -> v1.33.0 | |
+| Workers upgrade v1.32.0 -> v1.33.0 | |
+
+The mechanics of how "upgrade control plane" and the mechanics of "upgrade workers" operations are performed won't change
+from today.
+
+This is specifically important for "upgrade workers", which by default is upgrading MachineDeployments first,
+one after the other according to the order defined in `cluster.spec.topology`, and then MachinePools in a similar way.
+
+Notably, also the exiting options to influence "upgrade workers" will continue to work as of today:
+- `topology.cluster.x-k8s.io/upgrade-concurrency` annotation can be used to configure the maximum concurrency while
+ upgrading MachineDeployments of a classy Cluster. It is set as a top level annotation on the Cluster object.
+- `topology.cluster.x-k8s.io/defer-upgrade` annotation can be used to defer the Kubernetes upgrade of MachineDeployments
+ in `Cluster.spec.topology.workers`.
+- `topology.cluster.x-k8s.io/hold-upgrade-sequence` can be used to hold the upgrade sequence for a MachineDeployment
+ in `Cluster.spec.topology.workers` and all the following ones.
+
+It also remains unchanged the fact that an "upgrade workers" operation cannot complete until all the MachineDeployment
+are upgraded to the intermediate/target version of this iteration, which is possible only after all the `topology.cluster.x-k8s.io/defer-upgrade` and
+`topology.cluster.x-k8s.io/hold-upgrade-sequence` annotations are removed.
+
+However, it might be worth to notice that:
+- While performing different "upgrade workers" operations, the target version all MachineDeployments should upgrade to also changes.
+- `topology.cluster.x-k8s.io/defer-upgrade` and `topology.cluster.x-k8s.io/hold-upgrade-sequence` annotations, must be
+ applied before each upgrade operation (lifecycle hooks described in the next paragraph can be used to orchestrate this process).
+
+#### Lifecycle hooks
+
+As of today, Cluster API implements three lifecycle hooks for upgrades:
+- `BeforeClusterUpgrade`
+- `AfterControlPlaneUpgrade`
+- `AfterClusterUpgrade`
+
+By introducing chained upgrades, it is necessary to expand this set to allow proper tracking of the intermediate steps.
+
+
+
+More specifically:
+- `BeforeClusterUpgrade` request will include the upgrade plan.
+- A new `BeforeControlPlaneUpgrade` hook will be added and called before each "upgrade control plane" step;
+ request and response payload will be similar to corresponding messages for `BeforeClusterUpgrade`
+- `AfterControlPlaneUpgrade` hook will now be called after each "upgrade control plane" step.
+- A new `BeforeWorkersUpgrade` hook will be added and called before each "upgrade workers" step;
+ request and response payload will be similar to corresponding messages for `BeforeControlPlaneUpgrade`
+- A new `AfterWorkersUpgrade` hook will be added and called after each "upgrade workers" step;
+ request and response payload will be similar to corresponding messages for `AfterControlPlaneUpgrade`
+ - if the upgrade plan is completed and the entire cluster is at `spec.topology.version`, the hook
+ will ensure a new upgrade can't start until `AfterWorkersUpgrade` is completed.
+ - if the upgrade plan is not complete and the entire cluster is now at one of the intermediate versions,
+ the hook will ensure the control can't to move to the next version in the upgrade plan until `AfterWorkersUpgrade` is completed.
+- `AfterClusterUpgrade` will remain as of today, but the system will ensure that a new upgrade
+ can't start until `AfterClusterUpgrade` is completed.
+
+### Security Model
+
+This proposal does not add additional security concern to Cluster API.
+
+### Risks and Mitigations
+
+- Upgrading a Cluster by multiple Kubernetes minor versions in a short timeframe might increase risks to face issues during the upgrade.
+
+This proposal aims to help users to manage these risks by automating the chained upgrade workflow so users can catch up with
+Kubernetes versions easily, quickly, and with an upgrade plan validated by the system.
+
+Also, worth to notice that each machine rollout in Cluster API ultimately is an operation that is exercising
+the same machinery that will be used during upgrades.
+
+That means that by doing any rollout, e.g. due to an automatic machine remediation, you get a proxy signal about the
+fact that the system can successfully perform an upgrade, or you get the chance to detect and fix issues in the system
+before a full upgrade is performed.
+
+Conversely, risk increases for users not performing any form of rollouts for long periods, or for users artificially
+extending the upgrade duration for a long time by using (or abusing) lifecycle hooks.
+
+The second point might become critical, depending on the complexity of operations that the users performs while the
+upgrade is blocked.
+
+With this regard, the recommendation is to keep the upgrade workflow as simple and as fast as possible,
+e.g. combining application upgrades and Kubernetes version upgrade in a single workflow should be avoided.
+
+- Upgrading a Cluster by multiple Kubernetes minor versions might compromise workloads.
+
+Each Kubernetes minor upgrade might include changes impacting workloads running in the Cluster, and going through
+multiple minors increases the chance that workloads running in a cluster are impacted.
+
+As a mitigation, this proposal is improving lifecycle hooks and giving full visibility in the upgrade plan, thus
+allowing users to implement additional pre-upgrade checks.
+
+## Alternatives
+
+An alternative option to leverage a new CR to define the list of Kubernetes version to be used for upgrade plans
+was considered.
+
+However, the option was discarded because it seems more consistent having the list of
+Kubernetes version to be used for upgrade plans in ClusterClasses, alongside all the other info defining
+how a managed topology should behave.
+
+## Upgrade Strategy
+
+No particular upgrade considerations are required, this feature will be available to users upgrading to
+Cluster API v1.12.
+
+However, it is required to enhance ClusterClasses with the information required to compute upgrade plans,
+otherwise the system will keep supporting only upgrade to the next minor for the corresponding clusters (opt-in).
+
+## Additional Details
+
+### Test Plan
+
+Considering the entire range of [Kubernetes versions currently supported by Cluster API](https://cluster-api.sigs.k8s.io/reference/versions#kubernetes-versions-support)
+plus the Kubernetes version currently under development (from N-6 to N+1), more than twenty additional E2E tests are
+required to get full coverage of the possible chained upgrade sequences.
+
+While implementing all those new tests is not impossible, it is considered not practical because the resulting E2E
+job would take a long time while current E2E jobs allow a fast iterative development process.
+
+Accordingly, in the first iteration only one chained upgrade test scenario going from N-3 to N+1 will be validated,
+but this is considered enough to ensure that:
+- The mechanics for chained upgrade works
+- [Kubernetes version skew policy](https://kubernetes.io/releases/version-skew-policy/) is respected, and workers upgrade are performed only when necessary
+- Lifecycle hooks are called
+- Resulting K8s cluster passes the conformance test
+
+This new test will run periodically, and also be available to be run on demand on PRs.
+
+### Graduation Criteria
+
+This feature should be considered part of ClusterClass and managed topologies, and thus it will follow the same graduation process.
+
+### Version Skew Strategy
+
+This proposal does not change the [Cluster API version skew policy](https://cluster-api.sigs.k8s.io/reference/versions#skip-upgrades)
+nor the [Cluster API - Cluster API provider version Skew policy](https://cluster-api.sigs.k8s.io/reference/versions#supported-cluster-api---cluster-api-provider-version-skew).
+
+Also worth to notice that this proposal implements safeguards to enforce [Kubernetes version skew policy](https://kubernetes.io/releases/version-skew-policy/) when using clusters
+with managed topologies.
+
+## Implementation History
+
+- [x] 05/05/2023: Proposed idea in https://github.com/kubernetes-sigs/cluster-api/issues/8616
+- [x] 05/07/2025: Presented proposal at a community meeting
+- [x] 05/13/2025: Open proposal PR
+- [x] 12/01/2025: Update the proposal to reflect changes during the implementation
diff --git a/docs/proposals/20250513-propogate-taints.md b/docs/proposals/20250513-propogate-taints.md
new file mode 100644
index 000000000000..73c381b331bc
--- /dev/null
+++ b/docs/proposals/20250513-propogate-taints.md
@@ -0,0 +1,562 @@
+---
+title: Propagating taints from Cluster API Machines to Kubernetes Nodes
+authors:
+ - "@nrb"
+ - "@chrischdi"
+reviewers:
+ - "@JoelSpeed"
+ - "@fabriziopandini"
+ - "@sbueringer"
+ - "@neolit123"
+creation-date: 2025-05-13
+last-updated: 2025-06-06
+status: provisional
+see-also:
+ - 20221003-In-place-propagation-of-Kubernetes-objects-only-changes.md
+---
+
+# Propagating taints from Cluster API to `Node`s
+
+## Table of Contents
+
+
+
+
+
+- [Glossary](#glossary)
+- [Summary](#summary)
+- [Motivation](#motivation)
+ - [Goals](#goals)
+ - [Non-Goals/Future Work](#non-goalsfuture-work)
+- [Proposal](#proposal)
+ - [User Stories](#user-stories)
+ - [Story 0](#story-0)
+ - [Story 1](#story-1)
+ - [Story 2](#story-2)
+ - [Story 3](#story-3)
+ - [Story 4](#story-4)
+ - [Requirements (Optional)](#requirements-optional)
+ - [Functional Requirements](#functional-requirements)
+ - [FR1](#fr1)
+ - [FR2](#fr2)
+ - [Implementation Details/Notes/Constraints](#implementation-detailsnotesconstraints)
+ - [The `.spec.taints` field on a `Node`](#the-spectaints-field-on-a-node)
+ - [Propagation of taints](#propagation-of-taints)
+ - [Behavior with Cluster API Bootstrap Provider Kubeadm's taints fields](#behavior-with-cluster-api-bootstrap-provider-kubeadms-taints-fields)
+ - [Proposed API changes](#proposed-api-changes)
+ - [Type definition of a taint in Cluster API objects](#type-definition-of-a-taint-in-cluster-api-objects)
+ - [Changes to the Machine, MachineSet, MachineDeployment and MachinePool resources via MachineSpec](#changes-to-the-machine-machineset-machinedeployment-and-machinepool-resources-via-machinespec)
+ - [Changes to the ClusterClass and Cluster API for topology-aware Clusters](#changes-to-the-clusterclass-and-cluster-api-for-topology-aware-clusters)
+ - [Proposed contract changes](#proposed-contract-changes)
+ - [Changes to the ControlPlane contract](#changes-to-the-controlplane-contract)
+ - [Proposed controller changes](#proposed-controller-changes)
+ - [Changes to the Machine controller](#changes-to-the-machine-controller)
+ - [Changes to the MachinePool controller](#changes-to-the-machinepool-controller)
+ - [Changes to the Cluster topology, MachineSet and MachineDeployment controllers](#changes-to-the-cluster-topology-machineset-and-machinedeployment-controllers)
+ - [Changes to the cluster-autoscaler](#changes-to-the-cluster-autoscaler)
+ - [Security Model](#security-model)
+ - [Migration strategy for Bootstrap providers](#migration-strategy-for-bootstrap-providers)
+ - [Risks and Mitigations](#risks-and-mitigations)
+- [Alternatives](#alternatives)
+ - [Continuous reconciliation](#continuous-reconciliation)
+ - [Type definition of a taint in Cluster API objects](#type-definition-of-a-taint-in-cluster-api-objects-1)
+- [Upgrade Strategy](#upgrade-strategy)
+- [Additional Details](#additional-details)
+ - [Kubernetes taints API discussions](#kubernetes-taints-api-discussions)
+ - [Test Plan [optional]](#test-plan-optional)
+ - [Graduation Criteria [optional]](#graduation-criteria-optional)
+- [Implementation History](#implementation-history)
+
+
+
+## Glossary
+
+Refer to the [Cluster API Book Glossary](https://cluster-api.sigs.k8s.io/reference/glossary.html).
+
+## Summary
+
+This proposal introduces taints as a first-class citizen in Cluster API's core types, enabling users to declaratively manage Node taints through higher-level Cluster API resources such as Cluster, ClusterClass, MachineSet, MachineDeployment and MachinePool.
+
+The proposal defines two different kind of propagation modes for taints:
+
+- **Always**: Taints are continuously reconciled and maintained on nodes
+- **OnInitialization**: Taints are set once during node initialization and then left unmanaged
+
+**Note:** This new proposal has been created rather than updating the prior [in-place metadata propagation](20221003-In-place-propagation-of-Kubernetes-objects-only-changes.md) proposal because taints are not yet part of the Core Provider's API types and are different enough from labels or annotations that a different set of constraints will need to be considered.
+Very early versions of Kubernetes tracked taints as annotations, but they have long since been [promoted to their own API type](https://github.com/kubernetes/kubernetes/commit/9b640838a5f5e28db1c1f084afa393fa0b6d1166)
+
+## Motivation
+
+As stated in the goals of the project, Cluster API tries to "define common operations" and "manage the lifecycle [...] of Kubernetes-conformant Clusters using a declarative API"
+[[0]](https://main.cluster-api.sigs.k8s.io/introduction#goals).
+Users of Cluster API can currently update labels and annotations on Cluster API objects and have those values propagate from their high level resources all the way down to nodes (see the [related proposal](./20220927-labels-and-annotations-sync-between-machine-and-nodes.md) for more context).
+While this is useful, it does not provide a way to, for example, reserve a set of nodes for specific workloads like GPU or network functions.
+
+As of today defining custom taints for nodes can be done via bootstrap providers, e.g. via CABPK's `nodeRegistration.taints` field in a `KubeadmConfig`
+[[1]](https://github.com/kubernetes-sigs/cluster-api/blob/51ab638dcef154f1e6f772314912237dd4665f0c/api/bootstrap/kubeadm/v1beta2/kubeadm_types.go#L325-L330)
+or by adding them manually after Node creation.
+In case of CABPK updating taints currently also requires a rollout.
+
+This proposal aims to standardize the way users can define taints for nodes in workload Clusters as well as how they get propagated in case of changes.
+
+**Note:** CAPI already manages the `node.cluster.x-k8s.io/uninitialized` and `node.cluster.x-k8s.io/outdated-revision` taints today. This proposal does not plan to change this.
+
+### Goals
+
+- Make taints a first-class citizen in core Cluster API types.
+- Define how taints get propagated to corresponding `Node`'s.
+- Define how a migration from a bootstrap provider's implementation of taints to the new feature could look like (taking CABPK as example).
+- Taints managed by Cluster API should not interfere with taints applied by other actors.
+
+### Non-Goals/Future Work
+
+- Supporting taints on individual devices via [Dynamic Resource Allocation](https://kubernetes.io/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#device-taints-and-tolerations). This may be added in the future, but is currently out of scope.
+- Change how CAPI manages the `node.cluster.x-k8s.io/uninitialized` and `node.cluster.x-k8s.io/outdated-revision` taints.
+
+## Proposal
+
+### User Stories
+
+#### Story 0
+
+In Kubernetes Clusters, taints and tolerations are what allow a workload to be scheduled to a specific Node.
+As a user, I would like to use this community-standard mechanism within the framework that Cluster API provides.
+
+#### Story 1
+
+As a user, I wish to use Cluster API to manage a set of Machines that have very specific characteristics for targeting workloads.
+Some examples of this might be:
+
+- Designating Nodes as `edge` Nodes and steering locality-critical workloads only to `edge` Nodes.
+- Designating Nodes as having a particular hardware capability, such as high performance GPUs
+
+#### Story 2
+
+As a user, I wish to have autoscaling capabilities using Kubernetes and Cluster API resources and conventions.
+I would like to define taints on a Cluster API resource representing some collection (including but not limited to MachineSets, MachinePools, and MachineDeployments).
+This is especially useful in scale-from-zero scenarios, where that autoscaling technology can reference taints on a collection to make decisions about the cloud resources available.
+
+#### Story 3
+
+As a user, I would like to update taint metadata on my collection resources without forcing a complete replacement of an owned resource, such as a Machine or Node.
+
+#### Story 4
+
+As a user, I want to define a taint that is applied only once so I could ensure workload is scheduled after a custom initialization process initialized the node and remove that taint.
+
+### Requirements (Optional)
+
+#### Functional Requirements
+
+##### FR1
+
+Users should be able to define Taints on collection resources and have the taints propagate to the owned resources.
+This would start at a `ClusterClass` or `Cluster` level, and ultimately be written to a `Node`.
+
+##### FR2
+
+Users should be able to remove Taints managed by Cluster API without removing taints that Cluster API does not manage.
+
+**Note:** This only applies to taints defined below as `Always`. It does not apply for `OnInitialization` taints.
+
+### Implementation Details/Notes/Constraints
+
+#### The `.spec.taints` field on a `Node`
+
+Cluster API already supports propagating labels and annotations downward in its resource hierarchy.
+This support is implemented such that when these fields are updated, the underlying compute resources are _not_ replaced.
+
+Taints present a challenge to this, because they are defined as an "atomic" field by Kubernetes. (see [Kubernetes taints API discussions](#kubernetes-taints-api-discussions) for more context).
+This means that when updating Taints on a `Node`, _all_ `Taint`s are replaced; it is not possible to add and replace individual elements like for labels and annotations.
+As a concrete example, if a Node has 3 taints and some client submits a patch request with only one, the end result is one taint on the Node.
+It also means that Server-Side Apply ownership rules could not be applied to individual taints, which could present conflicts between controllers or users trying to modify `Taints` on the resultant `Node`.
+
+For Cluster API to support propagating `Taint`s, it will need to:
+
+- implement its own mechanism for tracking what `Taint`s it owns. This will be similar to the implementation for annotations and labels. See [Changes to the Machine controller](#changes-to-the-machine-controller) for more details.
+- ensure there are no conflicts with other actors by always setting the `metadata.resourceVersion` on API calls changing the taints on a Node. In the code this can be done by using the `client.MergeFromWithOptimisticLock{}` option.
+
+#### Propagation of taints
+
+A taint for a Node may be defined for different use-cases:
+
+- Taints supposed to stay on the Node to ensure only certain workload runs on such a `Node` aka. `Always`:
+ - These taints are supposed to be set on the `Node` object as long as it is defined on its parent core CAPI object.
+ - Example: Nodes where only GPU related workload should run
+ - Reconciliation behavior:
+ - `Always` taint added to the machine or exists during initialization: reconciliation will add the taint to the node.
+ - `Always` taint removed from machine: reconciliation will remove the taint from the node, if it did add it in the past.
+ - `Always` taint not changed: reconciliation takes care that the taint still exists on the node.
+- Taint's supposed to get added once to a Node aka. `OnInitialization`
+ - These taints are supposed to be set **once** by Cluster API on a `Node` object.
+ - Example: Ensure that no workload gets scheduled to a `Node` unless the taint got removed to e.g. install a GPU driver before allowing workload.
+ - Cluster API should once set the taint on the Node and not add it again if it got removed.
+
+If a taint exists on a node and was changed from `Always` to `OnInitialization`, Cluster API should drop ownership of the taint, but does not remove it, so the taint behaves as it would have been defined as `OnInitialization` from the beginning.
+
+If a taint was changed from `OnInitialization` to `Always`, Cluster API should ensure the taint is set on the node and track ownership.
+
+#### Behavior with Cluster API Bootstrap Provider Kubeadm's taints fields
+
+In CABPK the taint field has special behavior depending on what is set. This comes from how kubeadm handles the relevant field and is as documented in the following table:
+
+| CABPK | Behavior |
+|--------------|--------------------------------|
+| Set | add only the taints configured |
+| Not set | add the default taint *[*1]* |
+| empty / `[]` | not add any taints |
+
+[*1]: Per default kubeadm adds the taint `node-role.kubernetes.io/control-plane:NoSchedule` to control plane nodes.
+
+The proposed changes should not influence the behavior for CABPK.
+The following table shows the resulting behavior, depending on where taints are set or not set.
+
+**Note:** The taints field on machine's will only allow being set or not being set, there will be no "empty / `[]`" option.
+
+| Machine | CABPK | Result for CABPK |
+|---------|--------------|-------------------------------------------------------------------------------------------------------------|
+| Set | Set | **CABPK** and **Machine** taints, on same key + effect use the value from the Machine defined taint |
+| Set | Not set | **CABPK default** and **Machine** taints, on same key + effect use the value from the Machine defined taint |
+| Set | empty / `[]` | **Machine** taints |
+| Not set | Set | **CABPK** taints |
+| Not set | Not set | **CABPK default** taint |
+| Not set | empty / `[]` | no taints |
+
+So the desired behavior of the new taints field does not change the behavior for taints configured via CABPK.
+
+In future CABPK could consider deprecating the related fields and propose using the machine taints instead.
+
+#### Proposed API changes
+
+##### Type definition of a taint in Cluster API objects
+
+The following defines a new struct which should be used to define taints at the corresponding API types.
+It replicates the upstream `corev1.Taint` specification and extends it by a field called `propagation`, which will define the propagation mechanism to use for the taint.
+Using a type definition allows to be extensible and add additional propagation mechanisms when necessary.
+
+```golang
+// MachineTaint defines a taint equivalent to corev1.Taint, but additionally having a propagation field.
+type MachineTaint struct {
+ // key is the taint key to be applied to a node.
+ // +required
+ // +kubebuilder:validation:MinLength=1
+ // +kubebuilder:validation:MaxLength=253
+ Key string `json:"key,omitempty"`
+
+ // value is the taint value corresponding to the taint key.
+ // +optional
+ // +kubebuilder:validation:MaxLength=63
+ Value *string `json:"value,omitempty"`
+
+ // effect is the effect for the taint. Valid values are NoSchedule, PreferNoSchedule and NoExecute.
+ // +required
+ // +kubebuilder:validation:Enum=NoSchedule;PreferNoSchedule;NoExecute
+ Effect corev1.TaintEffect `json:"effect,omitempty"`
+
+ // propagation defines how this taint should be propagated to nodes.
+ // 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.
+ // +required
+ Propagation MachineTaintPropagation `json:"propagation,omitempty"`
+}
+
+// MachineTaintPropagation defines when a taint should be propagated to nodes.
+// +kubebuilder:validation:Enum=Always;OnInitialization
+type MachineTaintPropagation string
+
+const (
+ // TaintPropagationAlways means the taint should be continuously reconciled and kept on the node.
+ // - If an Always taint is added to the Machine, the taint will be added to the node.
+ // - If an Always taint is removed from the Machine, the taint will be removed from the node.
+ // - If an OnInitialization taint is changed to Always, the Machine controller will ensure the taint is set on the node.
+ // - If an Always taint is removed from the node, it will be re-added during reconciliation.
+ TaintPropagationAlways MachineTaintPropagation = "Always"
+
+ // TaintPropagationOnInitialization means the taint should be set once during initialization and then
+ // left alone.
+ // - If an OnInitialization taint is added to the Machine, the taint will only be added to the node on initialization.
+ // - If an OnInitialization taint is removed from the Machine nothing will be changed on the node.
+ // - If an Always taint is changed to OnInitialization, the taint will only be added to the node on initialization.
+ // - If an OnInitialization taint is removed from the node, it will not be re-added during reconciliation.
+ TaintPropagationOnInitialization MachineTaintPropagation = "OnInitialization"
+)
+```
+
+Proper validation on the new field has to:
+
+* ensure the `key` and `value` fields are validated as done in the upstream node validation
+ [[3]](https://github.com/kubernetes/kubernetes/blob/51f02aa58a21aca9e3d3b8ac1aaebfbdc1481847/pkg/apis/core/validation/validation.go#L6879)
+ [[4]](https://github.com/kubernetes/kubernetes/blob/51f02aa58a21aca9e3d3b8ac1aaebfbdc1481847/pkg/apis/core/validation/validation.go#L6881).
+* block taints with a key of `node.cluster.x-k8s.io/uninitialized` or `node.cluster.x-k8s.io/outdated-revision`.
+ * These taints are managed by Cluster API and providers.
+* block taints with the key prefix `node.kubernetes.io/`, except `node.kubernetes.io/out-of-service`.
+ * With the exception of `node.kubernetes.io/out-of-service`, this taints are managed by the node controller or the kubelet.
+* block taints with the key prefix `node.cloudprovider.kubernetes.io/`
+ * This taints are either managed by the kubelet or by a cloud-controller-manager's node-lifecycle-controller
+* block the taint `node-role.kubernetes.io/control-plane` for worker nodes (identified by absence of the label `cluster.x-k8s.io/control-plane`) and for MachineDeployments, MachineSets and MachinePools.
+ * This taints are dedicated to be set on control-plane machines, not for workers.
+* block the taint `node-role.kubernetes.io/master` which is deprecated since 1.24
+
+If in the future we are introducing new taints that users should not be able to set, ratcheting may be used.
+
+**Note:** Other taints normally set by kubeadm should be able to get set by Cluster API too and not be blocked on to allow more flexibility and use-cases.
+
+##### Changes to the Machine, MachineSet, MachineDeployment and MachinePool resources via MachineSpec
+
+This proposes to add a field array to the `MachineSpec` struct.
+This implicitly leads to adding the field to the following types:
+
+| API Type | New field |
+|---------------------|------------------------------|
+| `Machine` | `.spec.taints` |
+| `MachineSet` | `.spec.template.spec.taints` |
+| `MachineDeployment` | `.spec.template.spec.taints` |
+| `MachinePool` | `.spec.template.spec.taints` |
+
+```golang
+
+type MachineSpec struct{
+ // taints are the node taints that Cluster API will manage.
+ // This list does not necessarily reflect the full list of taints on a Node: other Kubernetes components may add or remove other taints.
+ // Only the taints defined in this list will be added or removed by core Cluster API controllers.
+ //
+ // NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners.
+ // As of Kubernetes 1.33, this is different from the implementation on corev1.NodeSpec, but provides a more flexible API for components building on top of Cluster API.
+ // +optional
+ // +listType=map
+ // +listMapKey=key
+ // +listMapKey=effect
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=64
+ Taints []MachineTaint `json:"taints,omitempty"`
+
+ // Other fields...
+}
+```
+
+##### Changes to the ClusterClass and Cluster API for topology-aware Clusters
+
+This proposes to add a separate struct as field array to ClusterClass and the topology section of Cluster for the controlPlane and workers sections.
+
+The following table summarizes the new fields:
+
+| API Type | New field |
+|----------------|-----------------------------------------------------|
+| `ClusterClass` | `spec.controlPlane.taints` |
+| | `spec.workers.machineDeployments[].taints` |
+| | `spec.workers.machinePools[].taints` |
+| `Cluster` | `spec.topology.controlPlane.taints` |
+| | `spec.topology.workers.machineDeployments[].taints` |
+| | `spec.topology.workers.machinePools[].taints` |
+
+The propagation of the fields should follow the prior art and is summarized in the following table and picture:
+
+| ClusterClass | Cluster | Result |
+|--------------|---------|------------------------------------------------------|
+| Set | Set | **Cluster** taints (ClusterClass taints are ignored) |
+| Set | Not set | **ClusterClass** taints |
+| Not set | Set | **Cluster** taints |
+| Not set | Not set | No taints from ClusterClass or Cluster |
+
+
+
+Type definitions:
+
+```golang
+// ClusterMachineTaint defines a taint equivalent to corev1.Taint, but additionally having a propagation field.
+type ClusterMachineTaint struct {
+ // All fields are identical to MachineTaint.
+}
+
+// ClusterClassMachineTaint defines a taint equivalent to corev1.Taint, but additionally having a propagation field.
+type ClusterClassMachineTaint struct {
+ // All fields are identical to MachineTaint.
+}
+```
+
+Example type changes for the `Cluster` type:
+
+```golang
+type ControlPlaneTopology struct {
+ // taints are the node taints that Cluster API will manage.
+ // ...
+ Taints []ClusterMachineTaint `json:"taints,omitempty"`
+
+ // Other fields...
+}
+
+// Same for MachineDeploymentTopology and MachinePoolTopology.
+```
+
+Example type changes for the `ClusterClass` type:
+
+```golang
+type ControlPlaneClass struct {
+ // taints are the node taints that Cluster API will manage.
+ // ...
+ Taints []ClusterClassMachineTaint `json:"taints,omitempty"`
+
+ // Other fields...
+}
+
+// Same for MachineDeploymentClass and MachinePoolClass.
+```
+
+#### Proposed contract changes
+
+##### Changes to the ControlPlane contract
+
+To support taints for control plane Machines, the contract for ControlPlanes should be extended.
+
+Similar to the extension for `ReadinessGates` at the `Machines` section, an additional optional `FooControlPlaneMachineTemplate` rule should be added for supporting taints.
+
+Support and usage of that field would result in having the defined taints set on the Machines created by the ControlPlane provider and the Machine controller being responsible to behave as for worker Machines.
+
+#### Proposed controller changes
+
+##### Changes to the Machine controller
+
+The Machine controller as of today already manages the lifecycle of the taint `node.cluster.x-k8s.io/uninitialized` as well as label and annotation propagation and uses a single patch operation for this in `internal/controllers/machine.patchNode`.
+This is a good fit to also reconcile the taints set on a machine.
+
+Due to how [the `.spec.taints` field on a `Node`](#the-spectaints-field-on-a-node) is defined, additionally to patching the taints field, the controller needs to keep track of the taints it added.
+
+To keep track of which `Always` taints are owned by the machine controller, the controller adds the annotation `cluster.x-k8s.io/taints-from-machine` to the Node.
+This follows the convention established by `cluster.x-k8s.io/labels-from-machine`.
+
+This allows the machine controller to identify an `Always` taint it:
+
+- has added in the past which now should be removed
+- has added in the past which now should not be tracked anymore (transition to `OnInitialization`)
+- has added in the past which should be kept (does not require the annotation)
+- has not added yet and should be added (does not require the annotation)
+
+The taints will be concatenated with `,` and the serialization will look like this given the field keys of the `listMap`:
+`cluster.x-k8s.io/taints-from-machine: ":,:"`
+
+Additionally, the fact that this annotation does not exist yet should be used as signal that the controller has to add the `OnInitialization` taints.
+This also means if no `Always` taints are configured on the machine, the controller should add the annotation with an empty value.
+This ensures that a node ever only gets these taints added once, at the time of finishing initialization of a Node.
+
+If a Node re-registers itself, the controller would add the `OnInitialization` taints again in addition to the `Always` taints because the tracking annotation does not exist.
+
+**Note:** If a bootstrap provider supports the `node.cluster.x-k8s.io/uninitialized` taint as documented in [Contract rules for BootstrapConfig](https://cluster-api.sigs.k8s.io/developer/providers/contracts/bootstrap-config#taint-nodes-at-creation), the implementation ensures that all `OnInitialization` taints are applied in the same call through which the `node.cluster.x-k8s.io/uninitialized` taint is getting removed. This prevents that workload without proper tolerations could be scheduled to the node in the time between node creation and Cluster API adding the `OnInitialization` taints.
+
+**Note:** A taint added by a bootstrap provider (e.g. CABPK) will be treated as a taint added by any other actor and will not get special handling. Especially for an `Always` taint this means the machine controller would adopt the taint and start tracking it.
+
+##### Changes to the MachinePool controller
+
+The MachinePool controller changes depend on whether the provider implements MachinePool Machines or not.
+
+When using MachinePool Machines, no changes are required to the MachinePool controller itself. The taint propagation will be handled by the Machine controller as described above, ensuring consistent behavior between standalone Machines and Machines created by MachinePools.
+
+For MachinePools that directly manage infrastructure without creating Machine resources, the MachinePool controller will need to implement logic similar to the Machine controller to propagate taints to Nodes. This includes handling both `OnInitialization` and `Always` taints, applying the tracking annotation, and managing taint lifecycle.
+
+It's worth noting that the MachinePool controller as of today does not implement label or annotation propagation, so taint propagation represents a new capability for this controller. Additionally the MachinePool controller should not remove the `node.cluster.x-k8s.io/uninitialized` taint if the MachinePool uses Machines, as this responsibility then falls to the Machine controller to ensure consistent initialization semantics across all Machine resources.
+
+##### Changes to the Cluster topology, MachineSet and MachineDeployment controllers
+
+The Cluster's topology controller will properly calculate and in-place propagate the newly introduced taint fields down to the ControlPlane object (if it complies with the optional contract part), MachineDeployment and/or MachinePool resources.
+
+The MachineDeployment and MachineSet controllers will watch their associated `MachineSpec` for updates to the `spec.taints` field and update their owned objects (MachineSet or Machine) to reflect the new values.
+
+This should be done similar to how the existing in-place mutable fields like `ReadinessGates`, `NodeDrainTimeout`, etc. for a Machine are handled today.
+
+##### Changes to the cluster-autoscaler
+
+The cluster-autoscaler implementation for CAPI as of today consumes the `capacity.cluster-autoscaler.kubernetes.io/taints` (see [Pre-defined labels and taints on nodes scaled from zero](https://cluster-api.sigs.k8s.io/tasks/automated-machine-management/autoscaling#pre-defined-labels-and-taints-on-nodes-scaled-from-zero)).
+
+It should be adjusted to also consider the configured taints.
+
+### Security Model
+
+Users who can define `Taint`s that get placed on `Node`s will be able to steer workloads, possibly to malicious hosts in order to extract sensitive data.
+However, users who can define Cluster API resources already have this capability - an attacker who receives the permissions to update a `MachineTemplate` could alter the definition in a similar manner.
+
+This proposal therefore does not present any heightened security requirements on top of the ones that Cluster API already has.
+
+#### Migration strategy for Bootstrap providers
+
+With the introduction of the new fields, bootstrap providers could start deprecating their equivalent fields.
+
+For CABPK, adding a taint at a KubeadmConfigTemplate at `.spec.template.spec.joinConfiguration.nodeRegistration.taints` is almost equivalent to adding an `OnInitialization` typed taint via the new API.
+The only differences are that the taint does get added by the controllers after the Node joined the Cluster and the new field has no special behavior to add the control plane related taint as e.g. CABPK does via kubeadm.
+
+This is considered okay, because workloads should not be able to be scheduled on a Node unless the `node.cluster.x-k8s.io/uninitialized` taint was removed and the implementation should take care to add the `OnInitialization` taints when removing this taint.
+
+### Risks and Mitigations
+
+Managing the `Taint`s on `Node`s is considered a highly privileged action in Kubernetes; it even has its own top level `kubectl taint` command.
+The Kubernetes scheduler uses taints rather than `Conditions` to decide when to evict workloads.
+Updating these in place could then evict workloads unintentionally, or disrupt other systems that rely on taints being present.
+
+This risk can be mitigated by ensuring Cluster API only modifies taints that it owns on nodes, as described above.
+
+## Alternatives
+
+### Continuous reconciliation
+
+Deciding whether to reconcile taint changes continuously has been a challenge for the Cluster API.
+Historically, the v1alpha1 API included a `Machine.Taints` field.
+However, since this field was mostly used in cluster bootstrapping, it was later extracted into bootstrap provider implementations.
+There is no standard API in bootstrap provider's though for taints.
+
+Moving forward, two broad alternatives that have been explored in light of this: adding taints only at bootstrap time, and making taints immutable at the `Machine` level. Both methods would require that a Node be replaced in order to make any changes to the taints.
+
+While this simplifies the implementation logic for Cluster API, it may be surprising to many users, since the Kubernetes documentation presents taints as a mutable field on a Node.
+This would also mean that there are two different behaviors when modifying metadata within Cluster API, which could again be very confusing.
+There is already precedent for leaving infrastructure in-place when Kubernetes-only fields are modified, and this proposal seeks to align with the established function.
+
+### Type definition of a taint in Cluster API objects
+
+An alternative to define the taints as written above is using slices per type as follows:
+
+```golang
+type MachineTaints struct{
+ Always []corev1.Taint `json:"always,omitempty"`
+ OnInitialization []corev1.Taint `json:"onInitialization,omitempty"`
+}
+```
+
+However this was considered as not being as expressive and extensible as the above.
+
+## Upgrade Strategy
+
+Taint support is a net-new field, and therefore must be optional and not affect upgrades.
+
+## Additional Details
+
+### Kubernetes taints API discussions
+
+[*2]: It is worth noting that there has been discussion about making the taints on a Node a "map" list type and allowing for ownership of individual taints.
+As of this writing, the [pull request](https://github.com/kubernetes/kubernetes/pull/128866) and [issue](https://github.com/kubernetes/kubernetes/issues/117142) remain open.
+This proposal should be unaffected regardless of any upstream change to the handling of taints, except that using a "map" type would simplify the implementation and allow us to cooperate with other field managers.
+
+### Test Plan [optional]
+
+- There should be proper unit and integration test coverage when introducing the changes.
+ - Unit test coverage for the matrix of:
+ - Type of taint (`OnInitialization` and `Always`)
+ - Type of operation (adding a taint, removing a taint, transition to other type)
+- An e2e test should validate the high-level user-experience
+ - Usage of an `OnInitialization` and `Always` taint
+ - Adding or removing an `Always` and `OnInitialization` taint on day 2
+
+### Graduation Criteria [optional]
+
+The feature should be implemented behind a feature gate `MachineTaintPropagation`.
+
+If deactivated, the corresponding controllers should block setting the fields via webhooks and not run the corresponding logic in the controllers.
+
+This allows to gain experience and the ability to do adjustments and graduate the feature over time.
+
+## Implementation History
+
+- [ ] 2025-01-15: First discussions at the [community meeting]
+- [ ] 2025-06-06: Open proposal PR
+- [ ] 2025-10-13: Reworked the proposal based on feedback
+- [ ] 2025-10-21: Review feedback and discussions
+- [ ] 2025-11-12: Implementation for Machine, MachineSet and MachineDeployments
+
+
+[community meeting]: https://docs.google.com/document/d/1ushaVqAKYnZ2VN_aa3GyKlS4kEd6bSug13xaXOakAQI/edit#heading=h.pxsq37pzkbdq
diff --git a/docs/proposals/images/lifecycle-hooks/lifecycle-hooks-upgrade.png b/docs/proposals/images/lifecycle-hooks/lifecycle-hooks-upgrade.png
new file mode 100644
index 000000000000..82e8fd91687e
Binary files /dev/null and b/docs/proposals/images/lifecycle-hooks/lifecycle-hooks-upgrade.png differ
diff --git a/docs/proposals/images/lifecycle-hooks/lifecycle-hooks.png b/docs/proposals/images/lifecycle-hooks/lifecycle-hooks.png
new file mode 100644
index 000000000000..2cefd8508e85
Binary files /dev/null and b/docs/proposals/images/lifecycle-hooks/lifecycle-hooks.png differ
diff --git a/docs/proposals/images/lifecycle-hooks/lifecycle-hooks.pptx b/docs/proposals/images/lifecycle-hooks/lifecycle-hooks.pptx
new file mode 100644
index 000000000000..00bdc007c02e
Binary files /dev/null and b/docs/proposals/images/lifecycle-hooks/lifecycle-hooks.pptx differ
diff --git a/docs/proposals/images/propagate-taints/topology-propagation.excalidraw.png b/docs/proposals/images/propagate-taints/topology-propagation.excalidraw.png
new file mode 100644
index 000000000000..5ee0de6fec7f
Binary files /dev/null and b/docs/proposals/images/propagate-taints/topology-propagation.excalidraw.png differ
diff --git a/docs/proposals/images/runtime-hooks/runtime-hooks-openapi.yaml b/docs/proposals/images/runtime-hooks/runtime-hooks-openapi.yaml
deleted file mode 100644
index da2636778e40..000000000000
--- a/docs/proposals/images/runtime-hooks/runtime-hooks-openapi.yaml
+++ /dev/null
@@ -1,1190 +0,0 @@
-components:
- schemas:
- k8s.io.api.core.v1.ObjectReference:
- description: ObjectReference contains enough information to let you inspect
- or modify the referred object.
- properties:
- apiVersion:
- description: API version of the referent.
- type: string
- fieldPath:
- description: 'If referring to a piece of an object instead of an entire
- object, this string should contain a valid JSON/Go field access statement,
- such as desiredState.manifest.containers[2]. For example, if the object
- reference is to a container within a pod, this would take on a value like:
- "spec.containers{name}" (where "name" refers to the name of the container
- that triggered the event) or if no container name is specified "spec.containers[2]"
- (container with index 2 in this pod). This syntax is chosen only to have
- some well-defined way of referencing a part of an object.'
- type: string
- kind:
- description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
- type: string
- namespace:
- description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
- type: string
- resourceVersion:
- description: 'Specific resourceVersion to which this reference is made,
- if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
- type: string
- uid:
- description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
- type: string
- type: object
- x-kubernetes-map-type: atomic
- k8s.io.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON:
- description: 'JSON represents any valid JSON value. These types are supported:
- bool, int64, float64, string, []interface{}, map[string]interface{} and nil.'
- k8s.io.apimachinery.pkg.apis.meta.v1.FieldsV1:
- description: |-
- FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.
-
- Each key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:', where is the name of a field in a struct, or key in a map 'v:', where is the exact json formatted value of a list item 'i:', where is position of a item in a list 'k:', where is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.
-
- The exact format is defined in sigs.k8s.io/structured-merge-diff
- type: object
- k8s.io.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry:
- description: ManagedFieldsEntry is a workflow-id, a FieldSet and the group version
- of the resource that the fieldset applies to.
- properties:
- apiVersion:
- description: APIVersion defines the version of this resource that this field
- set applies to. The format is "group/version" just like the top-level
- APIVersion field. It is necessary to track the version of a field set
- because it cannot be automatically converted.
- type: string
- fieldsType:
- description: 'FieldsType is the discriminator for the different fields format
- and version. There is currently only one possible value: "FieldsV1"'
- type: string
- fieldsV1:
- $ref: '#/components/schemas/k8s.io.apimachinery.pkg.apis.meta.v1.FieldsV1'
- description: FieldsV1 holds the first JSON version format as described in
- the "FieldsV1" type.
- manager:
- description: Manager is an identifier of the workflow managing these fields.
- type: string
- operation:
- description: Operation is the type of operation which lead to this ManagedFieldsEntry
- being created. The only valid values for this field are 'Apply' and 'Update'.
- type: string
- subresource:
- description: Subresource is the name of the subresource used to update that
- object, or empty string if the object was updated through the main resource.
- The value of this field is used to distinguish between managers, even
- if they share the same name. For example, a status update will be distinct
- from a regular update using the same manager name. Note that the APIVersion
- field is not related to the Subresource field and it always corresponds
- to the version of the main resource.
- type: string
- time:
- $ref: '#/components/schemas/k8s.io.apimachinery.pkg.apis.meta.v1.Time'
- description: Time is timestamp of when these fields were set. It should
- always be empty if Operation is 'Apply'
- type: object
- k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta:
- description: ObjectMeta is metadata that all persisted resources must have,
- which includes all objects users must create.
- properties:
- annotations:
- additionalProperties:
- default: ""
- type: string
- description: 'Annotations is an unstructured key value map stored with a
- resource that may be set by external tools to store and retrieve arbitrary
- metadata. They are not queryable and should be preserved when modifying
- objects. More info: http://kubernetes.io/docs/user-guide/annotations'
- type: object
- clusterName:
- description: The name of the cluster which the object belongs to. This is
- used to distinguish resources with same name and namespace in different
- clusters. This field is not set anywhere right now and apiserver is going
- to ignore it if set in create or update request.
- type: string
- creationTimestamp:
- $ref: '#/components/schemas/k8s.io.apimachinery.pkg.apis.meta.v1.Time'
- default: {}
- 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.
-
- Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- deletionGracePeriodSeconds:
- description: Number of seconds allowed for this object to gracefully terminate
- before it will be removed from the system. Only set when deletionTimestamp
- is also set. May only be shortened. Read-only.
- format: int64
- type: integer
- deletionTimestamp:
- $ref: '#/components/schemas/k8s.io.apimachinery.pkg.apis.meta.v1.Time'
- 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.
-
- Populated 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
- finalizers:
- description: Must be empty before the object is deleted from the registry.
- Each entry is an identifier for the responsible component that will remove
- the entry from the list. If the deletionTimestamp of the object is non-nil,
- entries in this list can only be removed. Finalizers may be processed
- and removed in any order. Order is NOT enforced because it introduces
- significant risk of stuck finalizers. finalizers is a shared field, any
- actor with permission can reorder it. If the finalizer list is processed
- in order, then this can lead to a situation in which the component responsible
- for the first finalizer in the list is waiting for a signal (field value,
- external system, or other) produced by a component responsible for a finalizer
- later in the list, resulting in a deadlock. Without enforced ordering
- finalizers are free to order amongst themselves and are not vulnerable
- to ordering changes in the list.
- items:
- default: ""
- type: string
- type: array
- x-kubernetes-patch-strategy: merge
- generateName:
- description: |-
- GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.
-
- If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).
-
- Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency
- type: string
- generation:
- description: A sequence number representing a specific generation of the
- desired state. Populated by the system. Read-only.
- format: int64
- type: integer
- labels:
- additionalProperties:
- default: ""
- type: string
- description: 'Map of string keys and values that can be used to organize
- and categorize (scope and select) objects. May match selectors of replication
- controllers and services. More info: http://kubernetes.io/docs/user-guide/labels'
- type: object
- managedFields:
- description: ManagedFields maps workflow-id and version to the set of fields
- that are managed by that workflow. This is mostly for internal housekeeping,
- and users typically shouldn't need to set or understand this field. A
- workflow can be the user's name, a controller's name, or the name of a
- specific apply path like "ci-cd". The set of fields is always in the version
- that the workflow used when modifying the object.
- items:
- $ref: '#/components/schemas/k8s.io.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry'
- default: {}
- type: array
- name:
- description: 'Name must be unique within a namespace. Is required when creating
- resources, although some resources may allow a client to request the generation
- of an appropriate name automatically. Name is primarily intended for creation
- idempotence and configuration definition. Cannot be updated. More info:
- http://kubernetes.io/docs/user-guide/identifiers#names'
- type: string
- namespace:
- description: |-
- Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.
-
- Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces
- type: string
- ownerReferences:
- description: List of objects depended by this object. If ALL objects in
- the list have been deleted, this object will be garbage collected. If
- this object is managed by a controller, then an entry in this list will
- point to this controller, with the controller field set to true. There
- cannot be more than one managing controller.
- items:
- $ref: '#/components/schemas/k8s.io.apimachinery.pkg.apis.meta.v1.OwnerReference'
- default: {}
- type: array
- x-kubernetes-patch-merge-key: uid
- x-kubernetes-patch-strategy: merge
- resourceVersion:
- description: |-
- An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.
-
- Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
- type: string
- selfLink:
- description: |-
- SelfLink is a URL representing this object. Populated by the system. Read-only.
-
- DEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.
- type: string
- uid:
- description: |-
- UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.
-
- Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
- type: string
- type: object
- k8s.io.apimachinery.pkg.apis.meta.v1.OwnerReference:
- description: OwnerReference contains enough information to let you identify
- an owning object. An owning object must be in the same namespace as the dependent,
- or be cluster-scoped, so there is no namespace field.
- properties:
- apiVersion:
- default: ""
- description: API version of the referent.
- type: string
- blockOwnerDeletion:
- description: If true, AND if the owner has the "foregroundDeletion" finalizer,
- then the owner cannot be deleted from the key-value store until this reference
- is removed. Defaults to false. To set this field, a user needs "delete"
- permission of the owner, otherwise 422 (Unprocessable Entity) will be
- returned.
- type: boolean
- controller:
- description: If true, this reference points to the managing controller.
- type: boolean
- kind:
- default: ""
- description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- name:
- default: ""
- description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names'
- type: string
- uid:
- default: ""
- description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids'
- type: string
- required:
- - apiVersion
- - kind
- - name
- - uid
- type: object
- x-kubernetes-map-type: atomic
- k8s.io.apimachinery.pkg.apis.meta.v1.Time:
- description: Time is a wrapper around time.Time which supports correct marshaling
- to YAML and JSON. Wrappers are provided for many of the factory methods that
- the time package offers.
- format: date-time
- type: string
- sigs.k8s.io.cluster-api.api.v1beta1.APIEndpoint:
- description: APIEndpoint represents a reachable Kubernetes API endpoint.
- properties:
- host:
- default: ""
- description: The hostname on which the API server is serving.
- type: string
- port:
- default: 0
- description: The port on which the API server is serving.
- format: int32
- type: integer
- required:
- - host
- - port
- type: object
- sigs.k8s.io.cluster-api.api.v1beta1.Cluster:
- description: Cluster is the Schema for the clusters API.
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- $ref: '#/components/schemas/k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta'
- default: {}
- spec:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.ClusterSpec'
- default: {}
- status:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.ClusterStatus'
- default: {}
- type: object
- sigs.k8s.io.cluster-api.api.v1beta1.ClusterNetwork:
- description: ClusterNetwork specifies the different networking parameters for
- a cluster.
- properties:
- apiServerPort:
- description: APIServerPort specifies the port the API Server should bind
- to. Defaults to 6443.
- format: int32
- type: integer
- pods:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.NetworkRanges'
- description: The network ranges from which Pod networks are allocated.
- serviceDomain:
- description: Domain name for services.
- type: string
- services:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.NetworkRanges'
- description: The network ranges from which service VIPs are allocated.
- type: object
- sigs.k8s.io.cluster-api.api.v1beta1.ClusterSpec:
- description: ClusterSpec defines the desired state of Cluster.
- properties:
- clusterNetwork:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.ClusterNetwork'
- description: Cluster network configuration.
- controlPlaneEndpoint:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.APIEndpoint'
- default: {}
- description: ControlPlaneEndpoint represents the endpoint used to communicate
- with the control plane.
- controlPlaneRef:
- $ref: '#/components/schemas/k8s.io.api.core.v1.ObjectReference'
- description: ControlPlaneRef is an optional reference to a provider-specific
- resource that holds the details for provisioning the Control Plane for
- a Cluster.
- infrastructureRef:
- $ref: '#/components/schemas/k8s.io.api.core.v1.ObjectReference'
- description: InfrastructureRef is a reference to a provider-specific resource
- that holds the details for provisioning infrastructure for a cluster in
- said provider.
- paused:
- description: Paused can be used to prevent controllers from processing the
- Cluster and all its associated objects.
- type: boolean
- topology:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.Topology'
- description: 'This 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.'
- type: object
- sigs.k8s.io.cluster-api.api.v1beta1.ClusterStatus:
- description: ClusterStatus defines the observed state of Cluster.
- properties:
- conditions:
- description: Conditions defines current service state of the cluster.
- items:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.Condition'
- default: {}
- type: array
- controlPlaneReady:
- default: false
- description: ControlPlaneReady defines if the control plane is ready.
- type: boolean
- failureDomains:
- additionalProperties:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.FailureDomainSpec'
- default: {}
- description: FailureDomains is a slice of failure domain objects synced
- from the infrastructure provider.
- type: object
- failureMessage:
- description: FailureMessage indicates that there is a fatal problem reconciling
- the state, and will be set to a descriptive error message.
- type: string
- failureReason:
- description: FailureReason indicates that there is a fatal problem reconciling
- the state, and will be set to a token value suitable for programmatic
- interpretation.
- type: string
- infrastructureReady:
- default: false
- description: InfrastructureReady is the state of the infrastructure provider.
- type: boolean
- observedGeneration:
- description: ObservedGeneration is the latest generation observed by the
- controller.
- format: int64
- type: integer
- phase:
- description: Phase represents the current phase of cluster actuation. E.g.
- Pending, Running, Terminating, Failed etc.
- type: string
- type: object
- sigs.k8s.io.cluster-api.api.v1beta1.ClusterVariable:
- description: ClusterVariable can be used to customize the Cluster through patches.
- It must comply to the corresponding ClusterClassVariable defined in the ClusterClass.
- properties:
- name:
- default: ""
- description: Name of the variable.
- type: string
- value:
- $ref: '#/components/schemas/k8s.io.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON'
- default: {}
- description: 'Value of the variable. Note: the value will be validated against
- the schema of the corresponding ClusterClassVariable from the ClusterClass.
- Note: We have to use apiextensionsv1.JSON instead of a custom JSON type,
- because controller-tools has a hard-coded schema for apiextensionsv1.JSON
- which cannot be produced by another type via controller-tools, i.e. it
- is not possible to have no type field. Ref: https://github.com/kubernetes-sigs/controller-tools/blob/d0e03a142d0ecdd5491593e941ee1d6b5d91dba6/pkg/crd/known_types.go#L106-L111'
- required:
- - name
- - value
- type: object
- sigs.k8s.io.cluster-api.api.v1beta1.Condition:
- description: Condition defines an observation of a Cluster API resource operational
- state.
- properties:
- lastTransitionTime:
- $ref: '#/components/schemas/k8s.io.apimachinery.pkg.apis.meta.v1.Time'
- default: {}
- description: 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.
- message:
- description: A human readable message indicating details about the transition.
- This field may be empty.
- type: string
- reason:
- description: The reason for the condition's last transition in CamelCase.
- The specific API may choose whether or not this field is considered a
- guaranteed API. This field may not be empty.
- type: string
- severity:
- description: Severity provides an explicit classification of Reason code,
- so the users or machines can immediately understand the current situation
- and act accordingly. The Severity field MUST be set only when Status=False.
- type: string
- status:
- default: ""
- description: Status of the condition, one of True, False, Unknown.
- type: string
- type:
- default: ""
- description: Type of condition in CamelCase or in foo.example.com/CamelCase.
- Many .condition.type values are consistent across resources like Available,
- but because arbitrary conditions can be useful (see .node.status.conditions),
- the ability to deconflict is important.
- type: string
- required:
- - type
- - status
- - lastTransitionTime
- type: object
- sigs.k8s.io.cluster-api.api.v1beta1.ControlPlaneTopology:
- description: ControlPlaneTopology specifies the parameters for the control plane
- nodes in the cluster.
- properties:
- metadata:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.ObjectMeta'
- default: {}
- description: |-
- Metadata is the metadata applied to the machines of the ControlPlane. At runtime this metadata is merged with the corresponding metadata from the ClusterClass.
-
- This field is supported if and only if the control plane provider template referenced in the ClusterClass is Machine based.
- replicas:
- description: Replicas is the number of control plane nodes. If the value
- is nil, the ControlPlane object is created without the number of Replicas
- and it's assumed that the control plane controller does not implement
- support for this field. When specified against a control plane provider
- that lacks support for this field, this value will be ignored.
- format: int32
- type: integer
- type: object
- sigs.k8s.io.cluster-api.api.v1beta1.FailureDomainSpec:
- description: FailureDomainSpec is the Schema for Cluster API failure domains.
- It allows controllers to understand how many failure domains a cluster can
- optionally span across.
- properties:
- attributes:
- additionalProperties:
- default: ""
- type: string
- description: Attributes is a free form map of attributes an infrastructure
- provider might use or require.
- type: object
- controlPlane:
- description: ControlPlane determines if this failure domain is suitable
- for use by control plane machines.
- type: boolean
- type: object
- sigs.k8s.io.cluster-api.api.v1beta1.MachineDeploymentTopology:
- description: MachineDeploymentTopology specifies the different parameters for
- a set of worker nodes in the topology. This set of nodes is managed by a MachineDeployment
- object whose lifecycle is managed by the Cluster controller.
- properties:
- class:
- default: ""
- description: Class is the name of the MachineDeploymentClass used to create
- the set of worker nodes. This should match one of the deployment classes
- defined in the ClusterClass object mentioned in the `Cluster.Spec.Class`
- field.
- type: string
- failureDomain:
- description: FailureDomain is the failure domain the machines will be created
- in. Must match a key in the FailureDomains map stored on the cluster object.
- type: string
- metadata:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.ObjectMeta'
- default: {}
- description: Metadata is the metadata applied to the machines of the MachineDeployment.
- At runtime this metadata is merged with the corresponding metadata from
- the ClusterClass.
- name:
- default: ""
- description: Name is the unique identifier for this MachineDeploymentTopology.
- The value is used with other unique identifiers to create a MachineDeployment's
- Name (e.g. cluster's name, etc). In case the name is greater than the
- allowed maximum length, the values are hashed together.
- type: string
- replicas:
- description: Replicas is the number of worker nodes belonging to this set.
- If the value is nil, the MachineDeployment is created without the number
- of Replicas (defaulting to 1) and it's assumed that an external entity
- (like cluster autoscaler) is responsible for the management of this value.
- format: int32
- type: integer
- variables:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.MachineDeploymentVariables'
- description: Variables can be used to customize the MachineDeployment through
- patches.
- required:
- - class
- - name
- type: object
- sigs.k8s.io.cluster-api.api.v1beta1.MachineDeploymentVariables:
- description: MachineDeploymentVariables can be used to provide variables for
- a specific MachineDeployment.
- properties:
- overrides:
- description: Overrides can be used to override Cluster level variables.
- items:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.ClusterVariable'
- default: {}
- type: array
- type: object
- sigs.k8s.io.cluster-api.api.v1beta1.NetworkRanges:
- description: NetworkRanges represents ranges of network addresses.
- properties:
- cidrBlocks:
- items:
- default: ""
- type: string
- type: array
- required:
- - cidrBlocks
- type: object
- sigs.k8s.io.cluster-api.api.v1beta1.ObjectMeta:
- description: |-
- ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. This is a copy of customizable fields from metav1.ObjectMeta.
-
- ObjectMeta is embedded in `Machine.Spec`, `MachineDeployment.Template` and `MachineSet.Template`, which are not top-level Kubernetes objects. Given that metav1.ObjectMeta has lots of special cases and read-only fields which end up in the generated CRD validation, having it as a subset simplifies the API and some issues that can impact user experience.
-
- During the [upgrade to controller-tools@v2](https://github.com/kubernetes-sigs/cluster-api/pull/1054) for v1alpha2, we noticed a failure would occur running Cluster API test suite against the new CRDs, specifically `spec.metadata.creationTimestamp in body must be of type string: "null"`. The investigation showed that `controller-tools@v2` behaves differently than its previous version when handling types from [metav1](k8s.io/apimachinery/pkg/apis/meta/v1) package.
-
- In more details, we found that embedded (non-top level) types that embedded `metav1.ObjectMeta` had validation properties, including for `creationTimestamp` (metav1.Time). The `metav1.Time` type specifies a custom json marshaller that, when IsZero() is true, returns `null` which breaks validation because the field isn't marked as nullable.
-
- In future versions, controller-tools@v2 might allow overriding the type and validation for embedded types. When that happens, this hack should be revisited.
- properties:
- annotations:
- additionalProperties:
- default: ""
- type: string
- description: 'Annotations is an unstructured key value map stored with a
- resource that may be set by external tools to store and retrieve arbitrary
- metadata. They are not queryable and should be preserved when modifying
- objects. More info: http://kubernetes.io/docs/user-guide/annotations'
- type: object
- labels:
- additionalProperties:
- default: ""
- type: string
- description: 'Map of string keys and values that can be used to organize
- and categorize (scope and select) objects. May match selectors of replication
- controllers and services. More info: http://kubernetes.io/docs/user-guide/labels'
- type: object
- type: object
- sigs.k8s.io.cluster-api.api.v1beta1.Topology:
- description: Topology encapsulates the information of the managed resources.
- properties:
- class:
- default: ""
- description: The name of the ClusterClass object to create the topology.
- type: string
- controlPlane:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.ControlPlaneTopology'
- default: {}
- description: ControlPlane describes the cluster control plane.
- rolloutAfter:
- $ref: '#/components/schemas/k8s.io.apimachinery.pkg.apis.meta.v1.Time'
- description: RolloutAfter performs a rollout of the entire cluster one component
- at a time, control plane first and then machine deployments.
- variables:
- description: Variables can be used to customize the Cluster through patches.
- They must comply to the corresponding VariableClasses defined in the ClusterClass.
- items:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.ClusterVariable'
- default: {}
- type: array
- version:
- default: ""
- description: The Kubernetes version of the cluster.
- type: string
- workers:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.WorkersTopology'
- description: Workers encapsulates the different constructs that form the
- worker nodes for the cluster.
- required:
- - class
- - version
- type: object
- sigs.k8s.io.cluster-api.api.v1beta1.WorkersTopology:
- description: WorkersTopology represents the different sets of worker nodes in
- the cluster.
- properties:
- machineDeployments:
- description: MachineDeployments is a list of machine deployments in the
- cluster.
- items:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.MachineDeploymentTopology'
- default: {}
- type: array
- type: object
- sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.AfterClusterUpgradeRequest:
- description: AfterClusterUpgradeRequest is the request of the hook.
- 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
- cluster:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.Cluster'
- default: {}
- description: The cluster object the lifecycle hook corresponds to.
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- kubernetesVersion:
- default: ""
- description: The version after upgrade.
- type: string
- required:
- - cluster
- - kubernetesVersion
- type: object
- sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.AfterClusterUpgradeResponse:
- description: AfterClusterUpgradeResponse is the response of AfterClusterUpgrade
- hook.
- 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
- message:
- default: ""
- description: A human-readable description of the status of the call.
- type: string
- status:
- default: ""
- description: |-
- Status of the call. One of "Success" or "Failure".
-
- Possible enum values:
- - `"Failure"`
- - `"Success"`
- enum:
- - Failure
- - Success
- type: string
- required:
- - status
- - message
- type: object
- sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.AfterControlPlaneInitializedRequest:
- description: AfterControlPlaneInitializedRequest is the request of the hook.
- 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
- cluster:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.Cluster'
- default: {}
- description: The cluster object the lifecycle hook corresponds to.
- 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
- required:
- - cluster
- type: object
- sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.AfterControlPlaneInitializedResponse:
- description: AfterControlPlaneInitializedResponse is the response of AfterControlPlaneInitialized
- hook.
- 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
- message:
- default: ""
- description: A human-readable description of the status of the call.
- type: string
- status:
- default: ""
- description: |-
- Status of the call. One of "Success" or "Failure".
-
- Possible enum values:
- - `"Failure"`
- - `"Success"`
- enum:
- - Failure
- - Success
- type: string
- required:
- - status
- - message
- type: object
- sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.AfterControlPlaneUpgradeRequest:
- description: AfterControlPlaneUpgradeRequest is the request of the hook.
- 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
- cluster:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.Cluster'
- default: {}
- description: The cluster object the lifecycle hook corresponds to.
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- kubernetesVersion:
- default: ""
- description: The version after upgrade.
- type: string
- required:
- - cluster
- - kubernetesVersion
- type: object
- sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.AfterControlPlaneUpgradeResponse:
- description: AfterControlPlaneUpgradeResponse is the response of AfterControlPlaneUpgrade
- hook.
- 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
- message:
- default: ""
- description: A human-readable description of the status of the call.
- type: string
- retryAfterSeconds:
- default: 0
- description: RetryAfterSeconds when set to a non-zero signifies that the
- hook needs to be retried at a future time.
- format: int32
- type: integer
- status:
- default: ""
- description: |-
- Status of the call. One of "Success" or "Failure".
-
- Possible enum values:
- - `"Failure"`
- - `"Success"`
- enum:
- - Failure
- - Success
- type: string
- required:
- - status
- - retryAfterSeconds
- - message
- type: object
- sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.BeforeClusterCreateRequest:
- description: BeforeClusterCreateRequest is the request of the hook.
- 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
- cluster:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.Cluster'
- default: {}
- description: The cluster object the lifecycle hook corresponds to.
- 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
- required:
- - cluster
- type: object
- sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.BeforeClusterCreateResponse:
- description: BeforeClusterCreateResponse is the response of BeforeClusterCreate
- hook.
- 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
- message:
- default: ""
- description: A human-readable description of the status of the call.
- type: string
- retryAfterSeconds:
- default: 0
- description: RetryAfterSeconds when set to a non-zero signifies that the
- hook needs to be retried at a future time.
- format: int32
- type: integer
- status:
- default: ""
- description: |-
- Status of the call. One of "Success" or "Failure".
-
- Possible enum values:
- - `"Failure"`
- - `"Success"`
- enum:
- - Failure
- - Success
- type: string
- required:
- - status
- - retryAfterSeconds
- - message
- type: object
- sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.BeforeClusterDeleteRequest:
- description: BeforeClusterDeleteRequest is the request of the hook.
- 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
- cluster:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.Cluster'
- default: {}
- description: The cluster object the lifecycle hook corresponds to.
- 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
- required:
- - cluster
- type: object
- sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.BeforeClusterDeleteResponse:
- description: BeforeClusterDeleteResponse is the response of BeforeClusterDelete
- hook.
- 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
- message:
- default: ""
- description: A human-readable description of the status of the call.
- type: string
- retryAfterSeconds:
- default: 0
- description: RetryAfterSeconds when set to a non-zero signifies that the
- hook needs to be retried at a future time.
- format: int32
- type: integer
- status:
- default: ""
- description: |-
- Status of the call. One of "Success" or "Failure".
-
- Possible enum values:
- - `"Failure"`
- - `"Success"`
- enum:
- - Failure
- - Success
- type: string
- required:
- - status
- - retryAfterSeconds
- - message
- type: object
- sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.BeforeClusterUpgradeRequest:
- description: BeforeClusterUpgradeRequest is the request of the hook.
- 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
- cluster:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.api.v1beta1.Cluster'
- default: {}
- description: The cluster object the lifecycle hook corresponds to.
- fromKubernetesVersion:
- default: ""
- description: The current version of the cluster.
- 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
- toKubernetesVersion:
- default: ""
- description: The target version of upgrade.
- type: string
- required:
- - cluster
- - fromKubernetesVersion
- - toKubernetesVersion
- type: object
- sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.BeforeClusterUpgradeResponse:
- description: BeforeClusterUpgradeResponse is the response of BeforeClusterUpgrade
- hook.
- 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
- message:
- default: ""
- description: A human-readable description of the status of the call.
- type: string
- retryAfterSeconds:
- default: 0
- description: RetryAfterSeconds when set to a non-zero signifies that the
- hook needs to be retried at a future time.
- format: int32
- type: integer
- status:
- default: ""
- description: |-
- Status of the call. One of "Success" or "Failure".
-
- Possible enum values:
- - `"Failure"`
- - `"Success"`
- enum:
- - Failure
- - Success
- type: string
- required:
- - status
- - retryAfterSeconds
- - message
- type: object
-info:
- description: Open API specification for Cluster API Runtime SDK
- license:
- name: Apache 2.0
- url: http://www.apache.org/licenses/LICENSE-2.0.html
- title: Cluster API - Runtime SDK
- version: v1.2.0
-openapi: 3.0.0
-paths:
- /hooks.runtime.cluster.x-k8s.io/v1alpha1/afterclusterupgrade/{name}:
- post:
- description: TThis hook is called after the Cluster, control plane and workers
- have been upgraded to the version specified in spec.topology.version. Runtime
- Extensions implementers can use this hook to execute post-upgrade tasks. This
- hook does not block any further changes or upgrades to the Cluster.
- operationId: hooksRuntimeClusterV1alpha1AfterClusterUpgrade
- parameters:
- - in: path
- name: name
- required: true
- schema:
- type: string
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.AfterClusterUpgradeRequest'
- responses:
- "200":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.AfterClusterUpgradeResponse'
- description: OK
- summary: Called after the Cluster finished upgrade
- tags:
- - Lifecycle Hooks
- /hooks.runtime.cluster.x-k8s.io/v1alpha1/aftercontrolplaneinitialized/{name}:
- post:
- description: This hook is called after the ControlPlane for the Cluster is marked
- as available for the first time. Runtime Extension implementers can use this
- hook to execute tasks that are only possible once the Control Plane is available.
- This hook does not block any further changes to the Cluster.
- operationId: hooksRuntimeClusterV1alpha1AfterControlPlaneInitialized
- parameters:
- - in: path
- name: name
- required: true
- schema:
- type: string
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.AfterControlPlaneInitializedRequest'
- responses:
- "200":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.AfterControlPlaneInitializedResponse'
- description: OK
- summary: Called after the Control Plane is available for the first time
- tags:
- - Lifecycle Hooks
- /hooks.runtime.cluster.x-k8s.io/v1alpha1/aftercontrolplaneupgrade/{name}:
- post:
- description: This hook is called after the control plane has been upgraded to
- the version specified in spec.topology.version, and immediately before the
- new version is going to be propagated to the MachineDeployments existing in
- the Cluster. Runtime Extension implementers can use this hook to execute post-upgrade
- tasks and eventually block upgrades to workers.
- operationId: hooksRuntimeClusterV1alpha1AfterControlPlaneUpgrade
- parameters:
- - in: path
- name: name
- required: true
- schema:
- type: string
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.AfterControlPlaneUpgradeRequest'
- responses:
- "200":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.AfterControlPlaneUpgradeResponse'
- description: OK
- summary: Called after the Control Plane finished upgrade
- tags:
- - Lifecycle Hooks
- /hooks.runtime.cluster.x-k8s.io/v1alpha1/beforeclustercreate/{name}:
- post:
- description: This hook is called after the Cluster object has been created by
- the user, immediately before all the objects which are part of a Cluster topology
- are going to be created. Runtime Extension implementers can use this hook
- to determine/prepare add-ons for the Cluster and block the creation of those
- objects.
- operationId: hooksRuntimeClusterV1alpha1BeforeClusterCreate
- parameters:
- - in: path
- name: name
- required: true
- schema:
- type: string
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.BeforeClusterCreateRequest'
- responses:
- "200":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.BeforeClusterCreateResponse'
- description: OK
- summary: Called before Cluster topology is created
- tags:
- - Lifecycle Hooks
- /hooks.runtime.cluster.x-k8s.io/v1alpha1/beforeclusterdelete/{name}:
- post:
- description: This hook is called after the Cluster has been deleted by the user,
- and immediately before objects existing in the Cluster are going to be deleted.
- Runtime Extension implementers can use this hook to execute cleanup tasks
- and eventually block deletion of the Cluster and descendant objects until
- everything is ready.
- operationId: hooksRuntimeClusterV1alpha1BeforeClusterDelete
- parameters:
- - in: path
- name: name
- required: true
- schema:
- type: string
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.BeforeClusterDeleteRequest'
- responses:
- "200":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.BeforeClusterDeleteResponse'
- description: OK
- summary: Called before the Cluster is deleted
- tags:
- - Lifecycle Hooks
- /hooks.runtime.cluster.x-k8s.io/v1alpha1/beforeclusterupgrade/{name}:
- post:
- description: This hook is called after the Cluster object has been updated with
- a new spec.topology.version by the user, and immediately before the new version
- is going to be propagated to the control plane. Runtime Extension implementers
- can use this hook to execute pre-upgrade tasks and block upgrades of the ControlPlane
- and Workers.
- operationId: hooksRuntimeClusterV1alpha1BeforeClusterUpgrade
- parameters:
- - in: path
- name: name
- required: true
- schema:
- type: string
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.BeforeClusterUpgradeRequest'
- responses:
- "200":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.BeforeClusterUpgradeResponse'
- description: OK
- summary: Called before the Cluster begins upgrade
- tags:
- - Lifecycle Hooks
diff --git a/docs/proposals/images/runtime-hooks/runtime-hooks.png b/docs/proposals/images/runtime-hooks/runtime-hooks.png
deleted file mode 100644
index 7153ee288aef..000000000000
Binary files a/docs/proposals/images/runtime-hooks/runtime-hooks.png and /dev/null differ
diff --git a/docs/release/release-team-onboarding.md b/docs/release/release-team-onboarding.md
index a20c583543fe..33b0d07545d2 100644
--- a/docs/release/release-team-onboarding.md
+++ b/docs/release/release-team-onboarding.md
@@ -55,7 +55,7 @@ Now, let's dive into the specific onboarding notes for each sub-team below.
- Start by gaining a general understanding of GitHub labels and how to find issues and pull requests for the current milestone.
- Familiarize yourself with Prow commands: The Cluster API project utilizes [Prow](https://docs.prow.k8s.io/docs/overview/) to manage CI automation. Issues and PRs are categorized by applying specific list of area labels, which helps in prioritization of that specific issue/PR during the release cycle or release process. Learn more about the available [labels](https://github.com/kubernetes/test-infra/blob/master/label_sync/labels.md#labels-that-apply-to-kubernetes-sigscluster-api-for-both-issues-and-prs) and prow [commands](https://prow.k8s.io/command-help).
-- Take a look at [TestGrid](https://testgrid.k8s.io/sig-cluster-lifecycle-cluster-api#Summary), an interactive dashboard for visualizing the CI job results of the project in a grid format!
+- Take a look at [TestGrid](https://testgrid.k8s.io/cluster-api-core) for a high level overview of `main` and the supported release branches' testing status. Drill into one of the links for an interactive dashboard visualizing the CI job results of that branch in a grid format!
- Examine the [CI jobs](https://github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-sigs/cluster-api) in the test-infra repository. These jobs are defined in YAML and represent various job types, such as periodics and presubmits, that we run in the project.
- Explore [k8s-triage](https://storage.googleapis.com/k8s-triage/index.html?job=periodic-cluster-api-*), a tool that identifies groups of similar test failures across all jobs.
- Experiment with running [end-to-end tests](https://cluster-api.sigs.k8s.io/developer/core/testing#running-the-end-to-end-tests-locally) on your local machine to gain a better understanding of the tests and build a confidence debugging CI issues.
\ No newline at end of file
diff --git a/docs/release/releases/release-1.12.md b/docs/release/releases/release-1.12.md
new file mode 100644
index 000000000000..c27ac303867b
--- /dev/null
+++ b/docs/release/releases/release-1.12.md
@@ -0,0 +1,38 @@
+# Cluster API v1.12
+
+## Timeline
+
+The following table shows the preliminary dates for the `v1.12` release cycle.
+
+| **What** | **Who** | **When** | **Week** |
+|------------------------------------------------------|--------------|-----------------------------|----------|
+| Start of Release Cycle | Release Lead | Monday 25th August 2025 | week 1 |
+| Schedule finalized | Release Lead | Friday 29nd August 2025 | week 1 |
+| Team finalized | Release Lead | Friday 29nd August 2025 | week 1 |
+| *v1.10.x & v1.11.x released* | Release Lead | Tuesday 2nd September 2025 | week 2 |
+| *v1.10.x & v1.11.x released* | Release Lead | Tuesday 7th October 2025 | week 7 |
+| *v1.10.x & v1.11.x released* | Release Lead | Tuesday 4th November 2025 | week 11 |
+| v1.12.0-beta.0 released | Release Lead | Tuesday 4th November 2025 | week 11 |
+| Communicate beta to providers | Comms Lead | Tuesday 4th November 2025 | week 11 |
+| Communicate upcoming code freeze to the community | Comms Lead | Tuesday 4th November 2025 | week 11 |
+| KubeCon idle week | --- | --- | week 12 |
+| v1.12.0-beta.x released | Release Lead | Tuesday 18th November 2025 | week 13 |
+| release-1.12 branch created (**Begin Code Freeze**) | Release Lead | Tuesday 25th November 2025 | week 14 |
+| v1.12.0-rc.0 released | Release Lead | Tuesday 25th November 2025 | week 14 |
+| release-1.12 jobs created | Release Lead | Tuesday 25th November 2025 | week 14 |
+| v1.12.0-rc.x released | Release Lead | Tuesday 2nd December 2025 | week 15 |
+| **v1.12.0 released** | Release Lead | Tuesday 9th December 2025 | week 16 |
+| *v1.10.x & v1.11.x released* | Release Lead | Tuesday 9th December 2025 | week 16 |
+| Organize release retrospective | Release Lead | TBC | week 16 |
+| *v1.12.1 released (tentative)* | Release Lead | Thursday 18th December 2025 | |
+
+After CAPI v1.12.0, the .1 release will follow up to add support for Kubernetes 1.35.0 when it becomes available. After .1, we expect to do monthly patch releases (more details will be provided in the 1.13 release schedule).
+
+## Release team
+
+| **Role** | **Lead** (**GitHub / Slack ID**) | **Team member(s) (GitHub / Slack ID)** |
+|-------------------------------------------|-------------------------------------------------------------------------------------------|----------------------------------------|
+| Release Lead | Aman Shrivastava ([@aman4433](https://github.com/aman4433) / `@AmanShrivastava`) | |
+| Communications/Docs/Release Notes Manager | Chandan Kumar ([@chandankumar4](https://github.com/chandankumar4) / `@Chandan Kumar`) | Anshuman ([@anshuman-agarwala](https://github.com/anshuman-agarwala) / `@anshuman-agarwala`) Peppi-Lotta ([@Peppi-Lotta](https://github.com/Peppi-Lotta) / `@Peppi-Lotta`) |
+| CI Signal/Bug Triage/Automation Manager | Arshadd Banoo ([@arshadd-b](https://github.com/arshadd-b) / `@arshadda`) | Angelos Kolaitis ([@neoaggelos](https://github.com/neoaggelos) / `@AngelosKolaitis`) Avaneesh ([@avaneesh634](https://github.com/avaneesh634) / `@Avaneesh`) Sujay ([@SD-13](https://github.com/SD-13) / `@Sujay`) Pawel Bek ([@blind3dd](https://github.com/blind3dd) / `@usualsuspectx`) Wendy Ha ([@wendy-ha18](https://github.com/wendy-ha18) / `@Wendy Ha`) |
+| Emeritus Advisor | Matt Boersma ([@mboersma](https://github.com/mboersma) / `@mboersma`) | |
diff --git a/docs/release/role-handbooks/ci-signal/README.md b/docs/release/role-handbooks/ci-signal/README.md
index 3808d23ce724..6c6512ae5dec 100644
--- a/docs/release/role-handbooks/ci-signal/README.md
+++ b/docs/release/role-handbooks/ci-signal/README.md
@@ -45,7 +45,7 @@ While we add test coverage for the new release branch we will also drop the test
```sh
TEST_INFRA_DIR=../../k8s.io/test-infra make generate-test-infra-prowjobs
```
-6. Verify the jobs and dashboards a day later by taking a look at: `https://testgrid.k8s.io/sig-cluster-lifecycle-cluster-api-1.8`
+6. Verify the jobs and dashboards a day later by taking a look at the relevant release branch: `https://testgrid.k8s.io/cluster-api-core`
Prior art:
@@ -58,7 +58,7 @@ The goal of this task is to keep our tests running in CI stable.
**Note**: To be very clear, this is not meant to be an on-call role for Cluster API tests.
1. Add yourself to the [Cluster API alert mailing list](https://github.com/kubernetes/k8s.io/blob/151899b2de933e58a4dfd1bfc2c133ce5a8bbe22/groups/sig-cluster-lifecycle/groups.yaml#L20-L35)
- **Note**: An alternative to the alert mailing list is manually monitoring the [testgrid dashboards](https://testgrid.k8s.io/sig-cluster-lifecycle-cluster-api)
+ **Note**: An alternative to the alert mailing list is manually monitoring the [testgrid dashboards](https://testgrid.k8s.io/cluster-api-core)
(also dashboards of previous releases). Using the alert mailing list has proven to be a lot less effort though.
2. Subscribe to `CI Activity` notifications for the Cluster API repo.
3. Check the existing **failing-test** and **flaking-test** issue templates under `.github/ISSUE_TEMPLATE/` folder of the repo, used to create an issue for failing or flaking tests respectively. Please make sure they are up-to-date and if not, send a PR to update or improve them.
diff --git a/exp/controllers/alias.go b/exp/controllers/alias.go
deleted file mode 100644
index 920ef26da2de..000000000000
--- a/exp/controllers/alias.go
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-Copyright 2021 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"
-
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/client"
- "sigs.k8s.io/controller-runtime/pkg/controller"
-
- "sigs.k8s.io/cluster-api/controllers/clustercache"
- machinepool "sigs.k8s.io/cluster-api/exp/internal/controllers"
-)
-
-// MachinePoolReconciler reconciles a MachinePool object.
-type MachinePoolReconciler struct {
- Client client.Client
- APIReader client.Reader
- ClusterCache clustercache.ClusterCache
-
- // WatchFilterValue is the label value used to filter events prior to reconciliation.
- WatchFilterValue string
-}
-
-func (r *MachinePoolReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error {
- return (&machinepool.MachinePoolReconciler{
- Client: r.Client,
- APIReader: r.APIReader,
- ClusterCache: r.ClusterCache,
- WatchFilterValue: r.WatchFilterValue,
- }).SetupWithManager(ctx, mgr, options)
-}
diff --git a/exp/controllers/doc.go b/exp/controllers/doc.go
deleted file mode 100644
index a58a55ea32f8..000000000000
--- a/exp/controllers/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2021 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 implements experimental controllers.
-package controllers
diff --git a/exp/hack/boilerplate.go.txt b/exp/hack/boilerplate.go.txt
deleted file mode 100644
index b7c650da4701..000000000000
--- a/exp/hack/boilerplate.go.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-Copyright 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.
-*/
-
diff --git a/exp/internal/controllers/doc.go b/exp/internal/controllers/doc.go
deleted file mode 100644
index a58a55ea32f8..000000000000
--- a/exp/internal/controllers/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2021 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 implements experimental controllers.
-package controllers
diff --git a/exp/internal/controllers/machinepool_controller.go b/exp/internal/controllers/machinepool_controller.go
deleted file mode 100644
index cc72d985782a..000000000000
--- a/exp/internal/controllers/machinepool_controller.go
+++ /dev/null
@@ -1,523 +0,0 @@
-/*
-Copyright 2020 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"
- "time"
-
- "github.com/go-logr/logr"
- "github.com/pkg/errors"
- corev1 "k8s.io/api/core/v1"
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
- kerrors "k8s.io/apimachinery/pkg/util/errors"
- "k8s.io/client-go/tools/record"
- "k8s.io/klog/v2"
- "k8s.io/utils/ptr"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/builder"
- "sigs.k8s.io/controller-runtime/pkg/client"
- "sigs.k8s.io/controller-runtime/pkg/controller"
- "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
- "sigs.k8s.io/controller-runtime/pkg/handler"
- "sigs.k8s.io/controller-runtime/pkg/predicate"
- "sigs.k8s.io/controller-runtime/pkg/reconcile"
-
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
- "sigs.k8s.io/cluster-api/api/core/v1beta2/index"
- "sigs.k8s.io/cluster-api/controllers/clustercache"
- "sigs.k8s.io/cluster-api/controllers/external"
- "sigs.k8s.io/cluster-api/internal/util/ssa"
- "sigs.k8s.io/cluster-api/util"
- "sigs.k8s.io/cluster-api/util/conditions"
- v1beta1conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1"
- "sigs.k8s.io/cluster-api/util/finalizers"
- "sigs.k8s.io/cluster-api/util/labels/format"
- "sigs.k8s.io/cluster-api/util/patch"
- "sigs.k8s.io/cluster-api/util/paused"
- "sigs.k8s.io/cluster-api/util/predicates"
-)
-
-// Update permissions on /finalizers subresrouce is required on management clusters with 'OwnerReferencesPermissionEnforcement' plugin enabled.
-// See: https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#ownerreferencespermissionenforcement
-//
-// +kubebuilder:rbac:groups=core,resources=events,verbs=create;patch
-// +kubebuilder:rbac:groups=core,resources=secrets,verbs=get;list;watch
-// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io;bootstrap.cluster.x-k8s.io,resources=*,verbs=get;list;watch;create;update;patch;delete
-// +kubebuilder:rbac:groups=cluster.x-k8s.io,resources=machinepools;machinepools/status;machinepools/finalizers,verbs=get;list;watch;create;update;patch;delete
-
-// machinePoolKind contains the schema.GroupVersionKind for the MachinePool type.
-var machinePoolKind = clusterv1.GroupVersion.WithKind("MachinePool")
-
-const (
- // MachinePoolControllerName defines the controller used when creating clients.
- MachinePoolControllerName = "machinepool-controller"
-)
-
-// MachinePoolReconciler reconciles a MachinePool object.
-type MachinePoolReconciler struct {
- Client client.Client
- APIReader client.Reader
- ClusterCache clustercache.ClusterCache
-
- // WatchFilterValue is the label value used to filter events prior to reconciliation.
- WatchFilterValue string
-
- controller controller.Controller
- ssaCache ssa.Cache
- recorder record.EventRecorder
- externalTracker external.ObjectTracker
-
- predicateLog *logr.Logger
-}
-
-func (r *MachinePoolReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error {
- if r.Client == nil || r.APIReader == nil || r.ClusterCache == nil {
- return errors.New("Client, APIReader and ClusterCache must not be nil")
- }
-
- r.predicateLog = ptr.To(ctrl.LoggerFrom(ctx).WithValues("controller", "machinepool"))
- clusterToMachinePools, err := util.ClusterToTypedObjectsMapper(mgr.GetClient(), &clusterv1.MachinePoolList{}, mgr.GetScheme())
- if err != nil {
- return err
- }
-
- c, err := ctrl.NewControllerManagedBy(mgr).
- For(&clusterv1.MachinePool{}).
- WithOptions(options).
- WithEventFilter(predicates.ResourceHasFilterLabel(mgr.GetScheme(), *r.predicateLog, r.WatchFilterValue)).
- Watches(
- &clusterv1.Cluster{},
- handler.EnqueueRequestsFromMapFunc(clusterToMachinePools),
- // TODO: should this wait for Cluster.Status.InfrastructureReady similar to Infra Machine resources?
- builder.WithPredicates(
- predicates.All(mgr.GetScheme(), *r.predicateLog,
- predicates.ResourceIsChanged(mgr.GetScheme(), *r.predicateLog),
- predicates.ClusterPausedTransitions(mgr.GetScheme(), *r.predicateLog),
- predicates.ResourceHasFilterLabel(mgr.GetScheme(), *r.predicateLog, r.WatchFilterValue),
- ),
- ),
- ).
- WatchesRawSource(r.ClusterCache.GetClusterSource("machinepool", clusterToMachinePools)).
- Build(r)
- if err != nil {
- return errors.Wrap(err, "failed setting up with a controller manager")
- }
-
- r.controller = c
- r.recorder = mgr.GetEventRecorderFor("machinepool-controller")
- r.externalTracker = external.ObjectTracker{
- Controller: c,
- Cache: mgr.GetCache(),
- Scheme: mgr.GetScheme(),
- PredicateLogger: r.predicateLog,
- }
- r.ssaCache = ssa.NewCache("machinepool")
-
- return nil
-}
-
-func (r *MachinePoolReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error) {
- log := ctrl.LoggerFrom(ctx)
-
- mp := &clusterv1.MachinePool{}
- if err := r.Client.Get(ctx, req.NamespacedName, mp); err != nil {
- if apierrors.IsNotFound(err) {
- // Object not found, return. Created objects are automatically garbage collected.
- // For additional cleanup logic use finalizers.
- return ctrl.Result{}, nil
- }
- log.Error(err, "Error reading the object - requeue the request.")
- return ctrl.Result{}, err
- }
-
- log = log.WithValues("Cluster", klog.KRef(mp.Namespace, mp.Spec.ClusterName))
- ctx = ctrl.LoggerInto(ctx, log)
-
- // Add finalizer first if not set to avoid the race condition between init and delete.
- if finalizerAdded, err := finalizers.EnsureFinalizer(ctx, r.Client, mp, clusterv1.MachinePoolFinalizer); err != nil || finalizerAdded {
- return ctrl.Result{}, err
- }
-
- cluster, err := util.GetClusterByName(ctx, r.Client, mp.Namespace, mp.Spec.ClusterName)
- if err != nil {
- log.Error(err, "Failed to get Cluster for MachinePool.", "MachinePool", klog.KObj(mp), "Cluster", klog.KRef(mp.Namespace, mp.Spec.ClusterName))
- return ctrl.Result{}, errors.Wrapf(err, "failed to get cluster %q for machinepool %q in namespace %q",
- mp.Spec.ClusterName, mp.Name, mp.Namespace)
- }
-
- // Initialize the patch helper.
- patchHelper, err := patch.NewHelper(mp, r.Client)
- if err != nil {
- return ctrl.Result{}, err
- }
-
- if isPaused, requeue, err := paused.EnsurePausedCondition(ctx, r.Client, cluster, mp); err != nil || isPaused || requeue {
- return ctrl.Result{}, err
- }
-
- // Handle normal reconciliation loop.
- scope := &scope{
- cluster: cluster,
- machinePool: mp,
- }
-
- defer func() {
- if err := r.updateStatus(ctx, scope); err != nil {
- reterr = kerrors.NewAggregate([]error{reterr, err})
- }
-
- r.reconcilePhase(mp)
- // TODO(jpang): add support for metrics.
-
- // Always update the readyCondition with the summary of the machinepool conditions.
- v1beta1conditions.SetSummary(mp,
- v1beta1conditions.WithConditions(
- clusterv1.BootstrapReadyV1Beta1Condition,
- clusterv1.InfrastructureReadyV1Beta1Condition,
- clusterv1.ReplicasReadyV1Beta1Condition,
- ),
- )
-
- // Always attempt to patch the object and status after each reconciliation.
- // Patch ObservedGeneration only if the reconciliation completed successfully
- patchOpts := []patch.Option{
- patch.WithOwnedV1Beta1Conditions{Conditions: []clusterv1.ConditionType{
- clusterv1.ReadyV1Beta1Condition,
- clusterv1.BootstrapReadyV1Beta1Condition,
- clusterv1.InfrastructureReadyV1Beta1Condition,
- clusterv1.ReplicasReadyV1Beta1Condition,
- }},
- patch.WithOwnedConditions{Conditions: []string{
- clusterv1.PausedCondition,
- }},
- }
- if reterr == nil {
- patchOpts = append(patchOpts, patch.WithStatusObservedGeneration{})
- }
- if err := patchHelper.Patch(ctx, mp, patchOpts...); err != nil {
- reterr = kerrors.NewAggregate([]error{reterr, err})
- }
- }()
-
- alwaysReconcile := []machinePoolReconcileFunc{
- wrapErrMachinePoolReconcileFunc(r.reconcileSetOwnerAndLabels, "failed to set MachinePool owner and labels"),
- }
-
- // Handle deletion reconciliation loop.
- if !mp.DeletionTimestamp.IsZero() {
- reconcileDelete := append(
- alwaysReconcile,
- wrapErrMachinePoolReconcileFunc(r.reconcileDelete, "failed to reconcile delete"),
- )
- return doReconcile(ctx, scope, reconcileDelete)
- }
-
- reconcileNormal := append(alwaysReconcile,
- wrapErrMachinePoolReconcileFunc(r.reconcileBootstrap, "failed to reconcile bootstrap config"),
- wrapErrMachinePoolReconcileFunc(r.reconcileInfrastructure, "failed to reconcile infrastructure"),
- wrapErrMachinePoolReconcileFunc(r.getMachinesForMachinePool, "failed to get Machines for MachinePool"),
- wrapErrMachinePoolReconcileFunc(r.reconcileNodeRefs, "failed to reconcile nodeRefs"),
- wrapErrMachinePoolReconcileFunc(r.setMachinesUptoDate, "failed to set machines up to date"),
- )
-
- return doReconcile(ctx, scope, reconcileNormal)
-}
-
-func (r *MachinePoolReconciler) reconcileSetOwnerAndLabels(_ context.Context, s *scope) (ctrl.Result, error) {
- cluster := s.cluster
- mp := s.machinePool
-
- if mp.Labels == nil {
- mp.Labels = make(map[string]string)
- }
- mp.Labels[clusterv1.ClusterNameLabel] = mp.Spec.ClusterName
-
- mp.SetOwnerReferences(util.EnsureOwnerRef(mp.GetOwnerReferences(), metav1.OwnerReference{
- APIVersion: clusterv1.GroupVersion.String(),
- Kind: "Cluster",
- Name: cluster.Name,
- UID: cluster.UID,
- }))
-
- return ctrl.Result{}, nil
-}
-
-// reconcileDelete delete machinePool related resources.
-func (r *MachinePoolReconciler) reconcileDelete(ctx context.Context, s *scope) (ctrl.Result, error) {
- if ok, err := r.reconcileDeleteExternal(ctx, s.machinePool); !ok || err != nil {
- // Return early and don't remove the finalizer if we got an error or
- // the external reconciliation deletion isn't ready.
- return ctrl.Result{}, fmt.Errorf("failed deleting external references: %s", err)
- }
-
- // check nodes delete timeout passed.
- if !r.isMachinePoolNodeDeleteTimeoutPassed(s.machinePool) {
- if err := r.reconcileDeleteNodes(ctx, s.cluster, s.machinePool); err != nil {
- // Return early and don't remove the finalizer if we got an error.
- return ctrl.Result{}, fmt.Errorf("failed deleting nodes: %w", err)
- }
- } else {
- ctrl.LoggerFrom(ctx).Info("NodeDeleteTimeout passed, skipping Nodes deletion")
- }
-
- controllerutil.RemoveFinalizer(s.machinePool, clusterv1.MachinePoolFinalizer)
- return ctrl.Result{}, nil
-}
-
-// reconcileDeleteNodes delete the cluster nodes.
-func (r *MachinePoolReconciler) reconcileDeleteNodes(ctx context.Context, cluster *clusterv1.Cluster, machinePool *clusterv1.MachinePool) error {
- if len(machinePool.Status.NodeRefs) == 0 {
- return nil
- }
-
- clusterClient, err := r.ClusterCache.GetClient(ctx, util.ObjectKey(cluster))
- if err != nil {
- return err
- }
-
- return r.deleteRetiredNodes(ctx, clusterClient, machinePool.Status.NodeRefs, machinePool.Spec.ProviderIDList)
-}
-
-// isMachinePoolDeleteTimeoutPassed check the machinePool node delete time out.
-func (r *MachinePoolReconciler) isMachinePoolNodeDeleteTimeoutPassed(machinePool *clusterv1.MachinePool) bool {
- if !machinePool.DeletionTimestamp.IsZero() && machinePool.Spec.Template.Spec.Deletion.NodeDeletionTimeoutSeconds != nil {
- if *machinePool.Spec.Template.Spec.Deletion.NodeDeletionTimeoutSeconds != 0 {
- deleteTimePlusDuration := machinePool.DeletionTimestamp.Add(time.Duration(*machinePool.Spec.Template.Spec.Deletion.NodeDeletionTimeoutSeconds) * time.Second)
- return deleteTimePlusDuration.Before(time.Now())
- }
- }
- return false
-}
-
-// reconcileDeleteExternal tries to delete external references, returning true if it cannot find any.
-func (r *MachinePoolReconciler) reconcileDeleteExternal(ctx context.Context, machinePool *clusterv1.MachinePool) (bool, error) {
- objects := []*unstructured.Unstructured{}
- references := []clusterv1.ContractVersionedObjectReference{
- machinePool.Spec.Template.Spec.Bootstrap.ConfigRef,
- machinePool.Spec.Template.Spec.InfrastructureRef,
- }
-
- // Loop over the references and try to retrieve it with the client.
- for _, ref := range references {
- if !ref.IsDefined() {
- continue
- }
-
- obj, err := external.GetObjectFromContractVersionedRef(ctx, r.Client, ref, machinePool.Namespace)
- if err != nil && !apierrors.IsNotFound(errors.Cause(err)) {
- return false, errors.Wrapf(err, "failed to get %s %s for MachinePool %s",
- ref.Kind, klog.KRef(machinePool.Namespace, ref.Name), klog.KObj(machinePool))
- }
- if obj != nil {
- objects = append(objects, obj)
- }
- }
-
- // Issue a delete request for any object that has been found.
- for _, obj := range objects {
- if err := r.Client.Delete(ctx, obj); err != nil && !apierrors.IsNotFound(err) {
- return false, errors.Wrapf(err,
- "failed to delete %v %q for MachinePool %q in namespace %q",
- obj.GroupVersionKind(), obj.GetName(), machinePool.Name, machinePool.Namespace)
- }
- }
-
- // Return true if there are no more external objects.
- return len(objects) == 0, nil
-}
-
-func (r *MachinePoolReconciler) watchClusterNodes(ctx context.Context, cluster *clusterv1.Cluster) error {
- log := ctrl.LoggerFrom(ctx)
-
- if !conditions.IsTrue(cluster, clusterv1.ClusterControlPlaneInitializedCondition) {
- log.V(5).Info("Skipping node watching setup because control plane is not initialized")
- return nil
- }
-
- return r.ClusterCache.Watch(ctx, util.ObjectKey(cluster), clustercache.NewWatcher(clustercache.WatcherOptions{
- Name: "machinepool-watchNodes",
- Watcher: r.controller,
- Kind: &corev1.Node{},
- EventHandler: handler.EnqueueRequestsFromMapFunc(r.nodeToMachinePool),
- Predicates: []predicate.TypedPredicate[client.Object]{predicates.TypedResourceIsChanged[client.Object](r.Client.Scheme(), *r.predicateLog)},
- }))
-}
-
-func (r *MachinePoolReconciler) nodeToMachinePool(ctx context.Context, o client.Object) []reconcile.Request {
- node, ok := o.(*corev1.Node)
- if !ok {
- panic(fmt.Sprintf("Expected a Node but got a %T", o))
- }
-
- var filters []client.ListOption
- // Match by clusterName when the node has the annotation.
- if clusterName, ok := node.GetAnnotations()[clusterv1.ClusterNameAnnotation]; ok {
- filters = append(filters, client.MatchingLabels{
- clusterv1.ClusterNameLabel: clusterName,
- })
- }
-
- // Match by namespace when the node has the annotation.
- if namespace, ok := node.GetAnnotations()[clusterv1.ClusterNamespaceAnnotation]; ok {
- filters = append(filters, client.InNamespace(namespace))
- }
-
- // Match by nodeName and status.nodeRef.name.
- machinePoolList := &clusterv1.MachinePoolList{}
- if err := r.Client.List(
- ctx,
- machinePoolList,
- append(filters, client.MatchingFields{index.MachinePoolNodeNameField: node.Name})...); err != nil {
- return nil
- }
-
- // There should be exactly 1 MachinePool for the node.
- if len(machinePoolList.Items) == 1 {
- return []reconcile.Request{{NamespacedName: util.ObjectKey(&machinePoolList.Items[0])}}
- }
-
- // Otherwise let's match by providerID. This is useful when e.g the NodeRef has not been set yet.
- // Match by providerID
- if node.Spec.ProviderID == "" {
- return nil
- }
- machinePoolList = &clusterv1.MachinePoolList{}
- if err := r.Client.List(
- ctx,
- machinePoolList,
- append(filters, client.MatchingFields{index.MachinePoolProviderIDField: node.Spec.ProviderID})...); err != nil {
- return nil
- }
-
- // There should be exactly 1 MachinePool for the node.
- if len(machinePoolList.Items) == 1 {
- return []reconcile.Request{{NamespacedName: util.ObjectKey(&machinePoolList.Items[0])}}
- }
-
- return nil
-}
-
-func (r *MachinePoolReconciler) getMachinesForMachinePool(ctx context.Context, s *scope) (ctrl.Result, error) {
- infraMachineSelector := metav1.LabelSelector{
- MatchLabels: map[string]string{
- clusterv1.MachinePoolNameLabel: format.MustFormatValue(s.machinePool.Name),
- clusterv1.ClusterNameLabel: s.machinePool.Spec.ClusterName,
- },
- }
-
- allMachines := &clusterv1.MachineList{}
- if err := r.Client.List(ctx,
- allMachines,
- client.InNamespace(s.machinePool.Namespace),
- client.MatchingLabels(infraMachineSelector.MatchLabels)); err != nil {
- return ctrl.Result{}, err
- }
-
- filteredMachines := make([]*clusterv1.Machine, 0, len(allMachines.Items))
- for idx := range allMachines.Items {
- machine := &allMachines.Items[idx]
- if shouldExcludeMachine(s.machinePool, machine) {
- continue
- }
- filteredMachines = append(filteredMachines, machine)
- }
-
- s.machines = filteredMachines
-
- return ctrl.Result{}, nil
-}
-
-func (r *MachinePoolReconciler) setMachinesUptoDate(ctx context.Context, s *scope) (ctrl.Result, error) {
- var errs []error
- for _, machine := range s.machines {
- patchHelper, err := patch.NewHelper(machine, r.Client)
- if err != nil {
- errs = append(errs, err)
- continue
- }
-
- upToDateCondition := &metav1.Condition{
- Type: clusterv1.MachineUpToDateCondition,
- }
-
- if machine.DeletionTimestamp.IsZero() {
- upToDateCondition.Status = metav1.ConditionTrue
- upToDateCondition.Reason = clusterv1.MachineUpToDateReason
- } else {
- upToDateCondition.Status = metav1.ConditionFalse
- upToDateCondition.Reason = clusterv1.MachineNotUpToDateReason
- upToDateCondition.Message = "Machine is being deleted"
- }
- conditions.Set(machine, *upToDateCondition)
-
- if err := patchHelper.Patch(ctx, machine, patch.WithOwnedConditions{Conditions: []string{
- clusterv1.MachineUpToDateCondition,
- }}); err != nil {
- errs = append(errs, err)
- continue
- }
- }
-
- if len(errs) > 0 {
- return ctrl.Result{}, kerrors.NewAggregate(errs)
- }
-
- return ctrl.Result{}, nil
-}
-
-type machinePoolReconcileFunc func(ctx context.Context, s *scope) (ctrl.Result, error)
-
-func wrapErrMachinePoolReconcileFunc(f machinePoolReconcileFunc, msg string) machinePoolReconcileFunc {
- return func(ctx context.Context, s *scope) (ctrl.Result, error) {
- res, err := f(ctx, s)
- return res, errors.Wrap(err, msg)
- }
-}
-
-func doReconcile(ctx context.Context, s *scope, phases []machinePoolReconcileFunc) (ctrl.Result, kerrors.Aggregate) {
- res := ctrl.Result{}
- errs := []error{}
- for _, phase := range phases {
- // Call the inner reconciliation methods.
- phaseResult, err := phase(ctx, s)
- if err != nil {
- errs = append(errs, err)
- }
- if len(errs) > 0 {
- continue
- }
- res = util.LowestNonZeroResult(res, phaseResult)
- }
-
- if len(errs) > 0 {
- return ctrl.Result{}, kerrors.NewAggregate(errs)
- }
-
- return res, nil
-}
-
-func shouldExcludeMachine(machinePool *clusterv1.MachinePool, machine *clusterv1.Machine) bool {
- if metav1.GetControllerOf(machine) != nil && !metav1.IsControlledBy(machine, machinePool) {
- return true
- }
-
- return false
-}
diff --git a/exp/internal/controllers/machinepool_controller_noderef.go b/exp/internal/controllers/machinepool_controller_noderef.go
deleted file mode 100644
index a5264c5327dd..000000000000
--- a/exp/internal/controllers/machinepool_controller_noderef.go
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
-Copyright 2019 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"
- "time"
-
- "github.com/pkg/errors"
- corev1 "k8s.io/api/core/v1"
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/klog/v2"
- "k8s.io/utils/ptr"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/client"
-
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
- "sigs.k8s.io/cluster-api/controllers/noderefutil"
- "sigs.k8s.io/cluster-api/internal/util/taints"
- "sigs.k8s.io/cluster-api/util"
- "sigs.k8s.io/cluster-api/util/annotations"
- v1beta1conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1"
- "sigs.k8s.io/cluster-api/util/patch"
-)
-
-var errNoAvailableNodes = errors.New("cannot find nodes with matching ProviderIDs in ProviderIDList")
-
-type getNodeReferencesResult struct {
- references []corev1.ObjectReference
- available int
- ready int
-}
-
-func (r *MachinePoolReconciler) reconcileNodeRefs(ctx context.Context, s *scope) (ctrl.Result, error) {
- log := ctrl.LoggerFrom(ctx)
- cluster := s.cluster
- mp := s.machinePool
-
- // Create a watch on the nodes in the Cluster.
- if err := r.watchClusterNodes(ctx, cluster); err != nil {
- return ctrl.Result{}, err
- }
-
- // Check that the MachinePool hasn't been deleted or in the process.
- if !mp.DeletionTimestamp.IsZero() {
- return ctrl.Result{}, nil
- }
-
- // Check that the Machine doesn't already have a NodeRefs.
- // Return early if there is no work to do.
- // TODO (v1beta2) Use new replica counters
- readyReplicas := int32(0)
- if mp.Status.Deprecated != nil && mp.Status.Deprecated.V1Beta1 != nil {
- readyReplicas = mp.Status.Deprecated.V1Beta1.ReadyReplicas
- }
- if ptr.Deref(mp.Status.Replicas, 0) == readyReplicas && len(mp.Status.NodeRefs) == int(readyReplicas) {
- v1beta1conditions.MarkTrue(mp, clusterv1.ReplicasReadyV1Beta1Condition)
- return ctrl.Result{}, nil
- }
-
- // Check that the MachinePool has valid ProviderIDList.
- if len(mp.Spec.ProviderIDList) == 0 && (mp.Spec.Replicas == nil || *mp.Spec.Replicas != 0) {
- log.V(2).Info("MachinePool doesn't have any ProviderIDs yet")
- return ctrl.Result{}, nil
- }
-
- clusterClient, err := r.ClusterCache.GetClient(ctx, util.ObjectKey(cluster))
- if err != nil {
- return ctrl.Result{}, err
- }
-
- if err = r.deleteRetiredNodes(ctx, clusterClient, mp.Status.NodeRefs, mp.Spec.ProviderIDList); err != nil {
- return ctrl.Result{}, err
- }
-
- // Return early if nodeRefMap is nil.
- if s.nodeRefMap == nil {
- return ctrl.Result{}, errors.New("failed to get Node references")
- }
-
- nodeRefsResult, err := r.getNodeReferences(ctx, mp.Spec.ProviderIDList, ptr.Deref(mp.Spec.Template.Spec.MinReadySeconds, 0), s.nodeRefMap)
- if err != nil {
- if err == errNoAvailableNodes {
- log.Info("Cannot assign NodeRefs to MachinePool, no matching Nodes")
- // No need to requeue here. Nodes emit an event that triggers reconciliation.
- return ctrl.Result{}, nil
- }
- r.recorder.Event(mp, corev1.EventTypeWarning, "FailedSetNodeRef", err.Error())
- return ctrl.Result{}, errors.Wrapf(err, "failed to get node references")
- }
-
- if mp.Status.Deprecated == nil {
- mp.Status.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{}
- }
- if mp.Status.Deprecated.V1Beta1 == nil {
- mp.Status.Deprecated.V1Beta1 = &clusterv1.MachinePoolV1Beta1DeprecatedStatus{}
- }
- mp.Status.Deprecated.V1Beta1.ReadyReplicas = int32(nodeRefsResult.ready)
- mp.Status.Deprecated.V1Beta1.AvailableReplicas = int32(nodeRefsResult.available)
- mp.Status.Deprecated.V1Beta1.UnavailableReplicas = ptr.Deref(mp.Status.Replicas, 0) - mp.Status.Deprecated.V1Beta1.AvailableReplicas
- mp.Status.NodeRefs = nodeRefsResult.references
-
- log.Info("Set MachinePool's NodeRefs", "nodeRefs", mp.Status.NodeRefs)
- r.recorder.Event(mp, corev1.EventTypeNormal, "SuccessfulSetNodeRefs", fmt.Sprintf("%+v", mp.Status.NodeRefs))
-
- // Reconcile node annotations and taints.
- err = r.patchNodes(ctx, clusterClient, nodeRefsResult.references, mp)
- if err != nil {
- return ctrl.Result{}, err
- }
-
- if ptr.Deref(mp.Status.Replicas, 0) != mp.Status.Deprecated.V1Beta1.ReadyReplicas || len(nodeRefsResult.references) != int(mp.Status.Deprecated.V1Beta1.ReadyReplicas) {
- log.Info("Not enough ready replicas or node references", "nodeRefs", len(nodeRefsResult.references), "readyReplicas", ptr.Deref(mp.Status.ReadyReplicas, 0), "replicas", ptr.Deref(mp.Status.Replicas, 0))
- v1beta1conditions.MarkFalse(mp, clusterv1.ReplicasReadyV1Beta1Condition, clusterv1.WaitingForReplicasReadyV1Beta1Reason, clusterv1.ConditionSeverityInfo, "")
- return ctrl.Result{RequeueAfter: 30 * time.Second}, nil
- }
-
- // At this point, the required number of replicas are ready
- v1beta1conditions.MarkTrue(mp, clusterv1.ReplicasReadyV1Beta1Condition)
- return ctrl.Result{}, nil
-}
-
-// deleteRetiredNodes deletes nodes that don't have a corresponding ProviderID in Spec.ProviderIDList.
-// A MachinePool infrastructure provider indicates an instance in the set has been deleted by
-// removing its ProviderID from the slice.
-func (r *MachinePoolReconciler) deleteRetiredNodes(ctx context.Context, c client.Client, nodeRefs []corev1.ObjectReference, providerIDList []string) error {
- log := ctrl.LoggerFrom(ctx, "providerIDList", len(providerIDList))
- nodeRefsMap := make(map[string]*corev1.Node, len(nodeRefs))
- for _, nodeRef := range nodeRefs {
- node := &corev1.Node{}
- if err := c.Get(ctx, client.ObjectKey{Name: nodeRef.Name}, node); err != nil {
- log.Error(err, "Failed to get Node, skipping", "Node", klog.KRef("", nodeRef.Name))
- continue
- }
-
- if node.Spec.ProviderID == "" {
- log.V(2).Info("No ProviderID detected, skipping", "providerID", node.Spec.ProviderID)
- continue
- }
-
- nodeRefsMap[node.Spec.ProviderID] = node
- }
- for _, providerID := range providerIDList {
- if providerID == "" {
- log.V(2).Info("No ProviderID detected, skipping", "providerID", providerID)
- continue
- }
- delete(nodeRefsMap, providerID)
- }
- for _, node := range nodeRefsMap {
- if err := c.Delete(ctx, node); err != nil && !apierrors.IsNotFound(err) {
- return errors.Wrapf(err, "failed to delete Node")
- }
- }
- return nil
-}
-
-func (r *MachinePoolReconciler) getNodeReferences(ctx context.Context, providerIDList []string, minReadySeconds int32, nodeRefsMap map[string]*corev1.Node) (getNodeReferencesResult, error) {
- log := ctrl.LoggerFrom(ctx, "providerIDList", len(providerIDList))
-
- var ready, available int
-
- var nodeRefs []corev1.ObjectReference
- for _, providerID := range providerIDList {
- if providerID == "" {
- log.V(2).Info("No ProviderID detected, skipping", "providerID", providerID)
- continue
- }
- if node, ok := nodeRefsMap[providerID]; ok {
- if noderefutil.IsNodeReady(node) {
- ready++
- if noderefutil.IsNodeAvailable(node, minReadySeconds, metav1.Now()) {
- available++
- }
- }
- nodeRefs = append(nodeRefs, corev1.ObjectReference{
- APIVersion: corev1.SchemeGroupVersion.String(),
- Kind: "Node",
- Name: node.Name,
- UID: node.UID,
- })
- }
- }
-
- if len(nodeRefs) == 0 && len(providerIDList) != 0 {
- return getNodeReferencesResult{}, errNoAvailableNodes
- }
- return getNodeReferencesResult{nodeRefs, available, ready}, nil
-}
-
-// patchNodes patches the nodes with the cluster name and cluster namespace annotations.
-func (r *MachinePoolReconciler) patchNodes(ctx context.Context, c client.Client, references []corev1.ObjectReference, mp *clusterv1.MachinePool) error {
- log := ctrl.LoggerFrom(ctx)
- for _, nodeRef := range references {
- node := &corev1.Node{}
- if err := c.Get(ctx, client.ObjectKey{Name: nodeRef.Name}, node); err != nil {
- log.Error(err, "Failed to get Node, skipping setting annotations", "Node", klog.KRef("", nodeRef.Name))
- continue
- }
- patchHelper, err := patch.NewHelper(node, c)
- if err != nil {
- return err
- }
- desired := map[string]string{
- clusterv1.ClusterNameAnnotation: mp.Spec.ClusterName,
- clusterv1.ClusterNamespaceAnnotation: mp.GetNamespace(),
- clusterv1.OwnerKindAnnotation: mp.Kind,
- clusterv1.OwnerNameAnnotation: mp.Name,
- }
- // Add annotations and drop NodeUninitializedTaint.
- hasAnnotationChanges := annotations.AddAnnotations(node, desired)
- hasTaintChanges := taints.RemoveNodeTaint(node, clusterv1.NodeUninitializedTaint)
- // Patch the node if needed.
- if hasAnnotationChanges || hasTaintChanges {
- if err := patchHelper.Patch(ctx, node); err != nil {
- log.Error(err, "Failed patch Node to set annotations and drop taints", "Node", klog.KObj(node))
- return err
- }
- }
- }
- return nil
-}
diff --git a/exp/internal/controllers/machinepool_controller_phases.go b/exp/internal/controllers/machinepool_controller_phases.go
deleted file mode 100644
index 5af6a19275f9..000000000000
--- a/exp/internal/controllers/machinepool_controller_phases.go
+++ /dev/null
@@ -1,609 +0,0 @@
-/*
-Copyright 2019 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"
- "reflect"
- "time"
-
- "github.com/pkg/errors"
- corev1 "k8s.io/api/core/v1"
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
- kerrors "k8s.io/apimachinery/pkg/util/errors"
- "k8s.io/apimachinery/pkg/util/wait"
- "k8s.io/klog/v2"
- "k8s.io/utils/ptr"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/client"
- "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
- "sigs.k8s.io/controller-runtime/pkg/handler"
-
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
- "sigs.k8s.io/cluster-api/controllers/external"
- capierrors "sigs.k8s.io/cluster-api/errors"
- utilexp "sigs.k8s.io/cluster-api/exp/util"
- "sigs.k8s.io/cluster-api/internal/contract"
- "sigs.k8s.io/cluster-api/internal/util/ssa"
- "sigs.k8s.io/cluster-api/util"
- "sigs.k8s.io/cluster-api/util/annotations"
- v1beta1conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1"
- "sigs.k8s.io/cluster-api/util/labels"
- "sigs.k8s.io/cluster-api/util/labels/format"
- "sigs.k8s.io/cluster-api/util/patch"
- "sigs.k8s.io/cluster-api/util/predicates"
-)
-
-func (r *MachinePoolReconciler) reconcilePhase(mp *clusterv1.MachinePool) {
- // Set the phase to "pending" if nil.
- if mp.Status.Phase == "" {
- mp.Status.SetTypedPhase(clusterv1.MachinePoolPhasePending)
- }
-
- // Set the phase to "provisioning" if bootstrap is ready and the infrastructure isn't.
- if ptr.Deref(mp.Status.Initialization.BootstrapDataSecretCreated, false) && !ptr.Deref(mp.Status.Initialization.InfrastructureProvisioned, false) {
- mp.Status.SetTypedPhase(clusterv1.MachinePoolPhaseProvisioning)
- }
-
- // Set the phase to "provisioned" if the infrastructure is ready.
- if len(mp.Status.NodeRefs) != 0 {
- mp.Status.SetTypedPhase(clusterv1.MachinePoolPhaseProvisioned)
- }
-
- // Set the phase to "running" if the number of ready replicas is equal to desired replicas.
- // TODO (v1beta2) Use new replica counters
- readyReplicas := int32(0)
- if mp.Status.Deprecated != nil && mp.Status.Deprecated.V1Beta1 != nil {
- readyReplicas = mp.Status.Deprecated.V1Beta1.ReadyReplicas
- }
- if ptr.Deref(mp.Status.Initialization.InfrastructureProvisioned, false) && mp.Spec.Replicas != nil && *mp.Spec.Replicas == readyReplicas {
- mp.Status.SetTypedPhase(clusterv1.MachinePoolPhaseRunning)
- }
-
- // Set the appropriate phase in response to the MachinePool replica count being greater than the observed infrastructure replicas.
- if ptr.Deref(mp.Status.Initialization.InfrastructureProvisioned, false) && mp.Spec.Replicas != nil && *mp.Spec.Replicas > readyReplicas {
- // If we are being managed by an external autoscaler and can't predict scaling direction, set to "Scaling".
- if annotations.ReplicasManagedByExternalAutoscaler(mp) {
- mp.Status.SetTypedPhase(clusterv1.MachinePoolPhaseScaling)
- } else {
- // Set the phase to "ScalingUp" if we are actively scaling the infrastructure out.
- mp.Status.SetTypedPhase(clusterv1.MachinePoolPhaseScalingUp)
- }
- }
-
- // Set the appropriate phase in response to the MachinePool replica count being less than the observed infrastructure replicas.
- if ptr.Deref(mp.Status.Initialization.InfrastructureProvisioned, false) && mp.Spec.Replicas != nil && *mp.Spec.Replicas < readyReplicas {
- // If we are being managed by an external autoscaler and can't predict scaling direction, set to "Scaling".
- if annotations.ReplicasManagedByExternalAutoscaler(mp) {
- mp.Status.SetTypedPhase(clusterv1.MachinePoolPhaseScaling)
- } else {
- // Set the phase to "ScalingDown" if we are actively scaling the infrastructure in.
- mp.Status.SetTypedPhase(clusterv1.MachinePoolPhaseScalingDown)
- }
- }
-
- // Set the phase to "deleting" if the deletion timestamp is set.
- if !mp.DeletionTimestamp.IsZero() {
- mp.Status.SetTypedPhase(clusterv1.MachinePoolPhaseDeleting)
- }
-}
-
-// reconcileExternal handles generic unstructured objects referenced by a MachinePool.
-func (r *MachinePoolReconciler) reconcileExternal(ctx context.Context, m *clusterv1.MachinePool, ref clusterv1.ContractVersionedObjectReference) (external.ReconcileOutput, error) {
- log := ctrl.LoggerFrom(ctx)
-
- obj, err := external.GetObjectFromContractVersionedRef(ctx, r.Client, ref, m.Namespace)
- if err != nil {
- if apierrors.IsNotFound(errors.Cause(err)) {
- return external.ReconcileOutput{}, errors.Wrapf(err, "could not find %s %s for MachinePool %s, requeuing",
- ref.Kind, klog.KRef(m.Namespace, ref.Name), klog.KObj(m))
- }
- return external.ReconcileOutput{}, err
- }
-
- // Ensure we add a watch to the external object, if there isn't one already.
- if err := r.externalTracker.Watch(log, obj, handler.EnqueueRequestForOwner(r.Client.Scheme(), r.Client.RESTMapper(), &clusterv1.MachinePool{}), predicates.ResourceIsChanged(r.Client.Scheme(), *r.externalTracker.PredicateLogger)); err != nil {
- return external.ReconcileOutput{}, err
- }
-
- // Initialize the patch helper.
- patchHelper, err := patch.NewHelper(obj, r.Client)
- if err != nil {
- return external.ReconcileOutput{}, err
- }
-
- // Set external object ControllerReference to the MachinePool.
- if err := controllerutil.SetControllerReference(m, obj, r.Client.Scheme()); err != nil {
- return external.ReconcileOutput{}, err
- }
-
- // Set the Cluster label.
- labels := obj.GetLabels()
- if labels == nil {
- labels = make(map[string]string)
- }
- labels[clusterv1.ClusterNameLabel] = m.Spec.ClusterName
- obj.SetLabels(labels)
-
- // Always attempt to Patch the external object.
- if err := patchHelper.Patch(ctx, obj); err != nil {
- return external.ReconcileOutput{}, err
- }
-
- // Set failure reason and message, if any.
- failureReason, failureMessage, err := external.FailuresFrom(obj)
- if err != nil {
- return external.ReconcileOutput{}, err
- }
- if failureReason != "" {
- machineStatusFailure := capierrors.MachinePoolStatusFailure(failureReason)
- if m.Status.Deprecated != nil {
- m.Status.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{}
- }
- if m.Status.Deprecated.V1Beta1 != nil {
- m.Status.Deprecated.V1Beta1 = &clusterv1.MachinePoolV1Beta1DeprecatedStatus{}
- }
- m.Status.Deprecated.V1Beta1.FailureReason = &machineStatusFailure
- }
- if failureMessage != "" {
- if m.Status.Deprecated != nil {
- m.Status.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{}
- }
- if m.Status.Deprecated.V1Beta1 != nil {
- m.Status.Deprecated.V1Beta1 = &clusterv1.MachinePoolV1Beta1DeprecatedStatus{}
- }
- m.Status.Deprecated.V1Beta1.FailureMessage = ptr.To(
- fmt.Sprintf("Failure detected from referenced resource %v with name %q: %s",
- obj.GroupVersionKind(), obj.GetName(), failureMessage),
- )
- }
-
- return external.ReconcileOutput{Result: obj}, nil
-}
-
-// reconcileBootstrap reconciles the Spec.Bootstrap.ConfigRef object on a MachinePool.
-func (r *MachinePoolReconciler) reconcileBootstrap(ctx context.Context, s *scope) (ctrl.Result, error) {
- log := ctrl.LoggerFrom(ctx)
- m := s.machinePool
- // Call generic external reconciler if we have an external reference.
- var bootstrapConfig *unstructured.Unstructured
- if m.Spec.Template.Spec.Bootstrap.ConfigRef.IsDefined() {
- bootstrapReconcileResult, err := r.reconcileExternal(ctx, m, m.Spec.Template.Spec.Bootstrap.ConfigRef)
- if err != nil {
- return ctrl.Result{}, err
- }
- bootstrapConfig = bootstrapReconcileResult.Result
-
- // If the bootstrap config is being deleted, return early.
- if !bootstrapConfig.GetDeletionTimestamp().IsZero() {
- return ctrl.Result{}, nil
- }
-
- // Determine contract version used by the BootstrapConfig.
- contractVersion, err := contract.GetContractVersion(ctx, r.Client, bootstrapConfig.GroupVersionKind().GroupKind())
- if err != nil {
- return ctrl.Result{}, err
- }
-
- // Determine if the data secret was created.
- var dataSecretCreated bool
- if dataSecretCreatedPtr, err := contract.Bootstrap().DataSecretCreated(contractVersion).Get(bootstrapConfig); err != nil {
- if !errors.Is(err, contract.ErrFieldNotFound) {
- return ctrl.Result{}, err
- }
- } else {
- dataSecretCreated = *dataSecretCreatedPtr
- }
-
- // Report a summary of current status of the bootstrap object defined for this machine pool.
- v1beta1conditions.SetMirror(m, clusterv1.BootstrapReadyV1Beta1Condition,
- v1beta1conditions.UnstructuredGetter(bootstrapConfig),
- v1beta1conditions.WithFallbackValue(dataSecretCreated, clusterv1.WaitingForDataSecretFallbackV1Beta1Reason, clusterv1.ConditionSeverityInfo, ""),
- )
-
- if !dataSecretCreated {
- log.Info("Waiting for bootstrap provider to generate data secret and report status.ready", bootstrapConfig.GetKind(), klog.KObj(bootstrapConfig))
- m.Status.Initialization.BootstrapDataSecretCreated = ptr.To(dataSecretCreated)
- return ctrl.Result{}, nil
- }
-
- // Get and set the name of the secret containing the bootstrap data.
- secretName, err := contract.Bootstrap().DataSecretName().Get(bootstrapConfig)
- if err != nil {
- return ctrl.Result{}, errors.Wrapf(err, "failed to retrieve dataSecretName from bootstrap provider for MachinePool %q in namespace %q", m.Name, m.Namespace)
- } else if secretName == nil {
- return ctrl.Result{}, errors.Errorf("retrieved empty dataSecretName from bootstrap provider for MachinePool %q in namespace %q", m.Name, m.Namespace)
- }
-
- m.Spec.Template.Spec.Bootstrap.DataSecretName = secretName
- m.Status.Initialization.BootstrapDataSecretCreated = ptr.To(true)
- return ctrl.Result{}, nil
- }
-
- // If dataSecretName is set without a ConfigRef, this means the user brought their own bootstrap data.
- if m.Spec.Template.Spec.Bootstrap.DataSecretName != nil {
- m.Status.Initialization.BootstrapDataSecretCreated = ptr.To(true)
- v1beta1conditions.MarkTrue(m, clusterv1.BootstrapReadyV1Beta1Condition)
- return ctrl.Result{}, nil
- }
-
- // This should never happen because the MachinePool webhook would not allow neither ConfigRef nor DataSecretName to be set.
- return ctrl.Result{}, errors.Errorf("neither .spec.bootstrap.configRef nor .spec.bootstrap.dataSecretName are set for MachinePool %q in namespace %q", m.Name, m.Namespace)
-}
-
-// reconcileInfrastructure reconciles the Spec.InfrastructureRef object on a MachinePool.
-func (r *MachinePoolReconciler) reconcileInfrastructure(ctx context.Context, s *scope) (ctrl.Result, error) {
- log := ctrl.LoggerFrom(ctx)
- cluster := s.cluster
- mp := s.machinePool
- // Call generic external reconciler.
- infraReconcileResult, err := r.reconcileExternal(ctx, mp, mp.Spec.Template.Spec.InfrastructureRef)
- if err != nil {
- if apierrors.IsNotFound(errors.Cause(err)) {
- log.Error(err, "infrastructure reference could not be found")
- if ptr.Deref(mp.Status.Initialization.InfrastructureProvisioned, false) {
- // Infra object went missing after the machine pool was up and running
- log.Error(err, "infrastructure reference has been deleted after being ready, setting failure state")
- if mp.Status.Deprecated == nil {
- mp.Status.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{}
- }
- if mp.Status.Deprecated.V1Beta1 == nil {
- mp.Status.Deprecated.V1Beta1 = &clusterv1.MachinePoolV1Beta1DeprecatedStatus{}
- }
- mp.Status.Deprecated.V1Beta1.FailureReason = ptr.To(capierrors.InvalidConfigurationMachinePoolError)
- mp.Status.Deprecated.V1Beta1.FailureMessage = ptr.To(fmt.Sprintf("MachinePool infrastructure resource %s %s has been deleted after being ready",
- mp.Spec.Template.Spec.InfrastructureRef.Kind, klog.KRef(mp.Namespace, mp.Spec.Template.Spec.InfrastructureRef.Name)))
- }
- v1beta1conditions.MarkFalse(mp, clusterv1.InfrastructureReadyV1Beta1Condition, clusterv1.IncorrectExternalRefV1Beta1Reason, clusterv1.ConditionSeverityError, "%s", fmt.Sprintf("could not find infra reference of kind %s with name %s", mp.Spec.Template.Spec.InfrastructureRef.Kind, mp.Spec.Template.Spec.InfrastructureRef.Name))
- }
- return ctrl.Result{}, err
- }
- infraConfig := infraReconcileResult.Result
- s.infraMachinePool = infraConfig
-
- if !infraConfig.GetDeletionTimestamp().IsZero() {
- return ctrl.Result{}, nil
- }
-
- ready, err := external.IsReady(infraConfig)
- if err != nil {
- return ctrl.Result{}, err
- }
-
- mp.Status.Initialization.InfrastructureProvisioned = ptr.To(ready)
-
- // Report a summary of current status of the infrastructure object defined for this machine pool.
- v1beta1conditions.SetMirror(mp, clusterv1.InfrastructureReadyV1Beta1Condition,
- v1beta1conditions.UnstructuredGetter(infraConfig),
- v1beta1conditions.WithFallbackValue(ready, clusterv1.WaitingForInfrastructureFallbackV1Beta1Reason, clusterv1.ConditionSeverityInfo, ""),
- )
-
- clusterClient, err := r.ClusterCache.GetClient(ctx, util.ObjectKey(cluster))
- if err != nil {
- return ctrl.Result{}, err
- }
-
- var getNodeRefsErr error
- // Get the nodeRefsMap from the cluster.
- s.nodeRefMap, getNodeRefsErr = r.getNodeRefMap(ctx, clusterClient)
-
- err = r.reconcileMachines(ctx, s, infraConfig)
-
- if err != nil || getNodeRefsErr != nil {
- return ctrl.Result{}, kerrors.NewAggregate([]error{errors.Wrapf(err, "failed to reconcile Machines for MachinePool %s", klog.KObj(mp)), errors.Wrapf(getNodeRefsErr, "failed to get nodeRefs for MachinePool %s", klog.KObj(mp))})
- }
-
- if !ptr.Deref(mp.Status.Initialization.InfrastructureProvisioned, false) {
- log.Info("Infrastructure provider is not yet ready", infraConfig.GetKind(), klog.KObj(infraConfig))
- return ctrl.Result{}, nil
- }
-
- var providerIDList []string
- // Get Spec.ProviderIDList from the infrastructure provider.
- if err := util.UnstructuredUnmarshalField(infraConfig, &providerIDList, "spec", "providerIDList"); err != nil && !errors.Is(err, util.ErrUnstructuredFieldNotFound) {
- return ctrl.Result{}, errors.Wrapf(err, "failed to retrieve data from infrastructure provider for MachinePool %q in namespace %q", mp.Name, mp.Namespace)
- }
-
- // Get and set Status.Replicas from the infrastructure provider.
- err = util.UnstructuredUnmarshalField(infraConfig, &mp.Status.Replicas, "status", "replicas")
- if err != nil {
- if err != util.ErrUnstructuredFieldNotFound {
- return ctrl.Result{}, errors.Wrapf(err, "failed to retrieve replicas from infrastructure provider for MachinePool %q in namespace %q", mp.Name, mp.Namespace)
- }
- }
-
- if len(providerIDList) == 0 && ptr.Deref(mp.Status.Replicas, 0) != 0 {
- log.Info("Retrieved empty spec.providerIDList from infrastructure provider but status.replicas is not zero.", "replicas", ptr.Deref(mp.Status.Replicas, 0))
- return ctrl.Result{}, nil
- }
-
- if !reflect.DeepEqual(mp.Spec.ProviderIDList, providerIDList) {
- mp.Spec.ProviderIDList = providerIDList
- if mp.Status.Deprecated == nil {
- mp.Status.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{}
- }
- if mp.Status.Deprecated.V1Beta1 == nil {
- mp.Status.Deprecated.V1Beta1 = &clusterv1.MachinePoolV1Beta1DeprecatedStatus{}
- }
- mp.Status.Deprecated.V1Beta1.ReadyReplicas = 0
- mp.Status.Deprecated.V1Beta1.AvailableReplicas = 0
- mp.Status.Deprecated.V1Beta1.UnavailableReplicas = ptr.Deref(mp.Status.Replicas, 0)
- }
-
- return ctrl.Result{}, nil
-}
-
-// reconcileMachines reconciles Machines associated with a MachinePool.
-//
-// Note: In the case of MachinePools the machines are created in order to surface in CAPI what exists in the
-// infrastructure while instead on MachineDeployments, machines are created in CAPI first and then the
-// infrastructure is created accordingly.
-// Note: When supported by the cloud provider implementation of the MachinePool, machines will provide a means to interact
-// with the corresponding infrastructure (e.g. delete a specific machine in case MachineHealthCheck detects it is unhealthy).
-func (r *MachinePoolReconciler) reconcileMachines(ctx context.Context, s *scope, infraMachinePool *unstructured.Unstructured) error {
- log := ctrl.LoggerFrom(ctx)
- mp := s.machinePool
-
- var infraMachineKind string
- if err := util.UnstructuredUnmarshalField(infraMachinePool, &infraMachineKind, "status", "infrastructureMachineKind"); err != nil {
- if errors.Is(err, util.ErrUnstructuredFieldNotFound) {
- log.V(4).Info("MachinePool Machines not supported, no infraMachineKind found")
- return nil
- }
-
- return errors.Wrapf(err, "failed to retrieve infraMachineKind from infrastructure provider for MachinePool %s", klog.KObj(mp))
- }
-
- infraMachineSelector := metav1.LabelSelector{
- MatchLabels: map[string]string{
- clusterv1.MachinePoolNameLabel: format.MustFormatValue(mp.Name),
- clusterv1.ClusterNameLabel: mp.Spec.ClusterName,
- },
- }
-
- log.V(4).Info("Reconciling MachinePool Machines", "infrastructureMachineKind", infraMachineKind, "infrastructureMachineSelector", infraMachineSelector)
- var infraMachineList unstructured.UnstructuredList
-
- // Get the list of infraMachines, which are maintained by the InfraMachinePool controller.
- infraMachineList.SetAPIVersion(infraMachinePool.GetAPIVersion())
- infraMachineList.SetKind(infraMachineKind + "List")
- if err := r.Client.List(ctx, &infraMachineList, client.InNamespace(mp.Namespace), client.MatchingLabels(infraMachineSelector.MatchLabels)); err != nil {
- return errors.Wrapf(err, "failed to list infra machines for MachinePool %q in namespace %q", mp.Name, mp.Namespace)
- }
-
- // Add watcher for infraMachine, if there isn't one already; this will allow this controller to reconcile
- // immediately changes made by the InfraMachinePool controller.
- sampleInfraMachine := &unstructured.Unstructured{}
- sampleInfraMachine.SetAPIVersion(infraMachinePool.GetAPIVersion())
- sampleInfraMachine.SetKind(infraMachineKind)
-
- // Add watcher for infraMachine, if there isn't one already.
- if err := r.externalTracker.Watch(log, sampleInfraMachine, handler.EnqueueRequestsFromMapFunc(r.infraMachineToMachinePoolMapper), predicates.ResourceIsChanged(r.Client.Scheme(), *r.externalTracker.PredicateLogger)); err != nil {
- return err
- }
-
- // Get the list of machines managed by this controller, and align it with the infra machines managed by
- // the InfraMachinePool controller.
- machineList := &clusterv1.MachineList{}
- if err := r.Client.List(ctx, machineList, client.InNamespace(mp.Namespace), client.MatchingLabels(infraMachineSelector.MatchLabels)); err != nil {
- return err
- }
-
- if err := r.createOrUpdateMachines(ctx, s, machineList.Items, infraMachineList.Items); err != nil {
- return errors.Wrapf(err, "failed to create machines for MachinePool %q in namespace %q", mp.Name, mp.Namespace)
- }
-
- return nil
-}
-
-// createOrUpdateMachines creates a MachinePool Machine for each infraMachine if it doesn't already exist and sets the owner reference and infraRef.
-func (r *MachinePoolReconciler) createOrUpdateMachines(ctx context.Context, s *scope, machines []clusterv1.Machine, infraMachines []unstructured.Unstructured) error {
- log := ctrl.LoggerFrom(ctx)
-
- // Construct a set of names of infraMachines that already have a Machine.
- infraMachineToMachine := map[string]clusterv1.Machine{}
- for _, machine := range machines {
- infraRef := machine.Spec.InfrastructureRef
- infraMachineToMachine[infraRef.Name] = machine
- }
-
- createdMachines := []clusterv1.Machine{}
- var errs []error
- for i := range infraMachines {
- infraMachine := &infraMachines[i]
-
- // Get Spec.ProviderID from the infraMachine.
- var providerID string
- var node *corev1.Node
- if err := util.UnstructuredUnmarshalField(infraMachine, &providerID, "spec", "providerID"); err != nil {
- log.V(4).Info("could not retrieve providerID for infraMachine", "infraMachine", klog.KObj(infraMachine))
- } else {
- // Retrieve the Node for the infraMachine from the nodeRefsMap using the providerID.
- node = s.nodeRefMap[providerID]
- }
-
- // If infraMachine already has a Machine, update it if needed.
- if existingMachine, ok := infraMachineToMachine[infraMachine.GetName()]; ok {
- log.V(2).Info("Patching existing Machine for infraMachine", infraMachine.GetKind(), klog.KObj(infraMachine), "Machine", klog.KObj(&existingMachine))
-
- desiredMachine := r.computeDesiredMachine(s.machinePool, infraMachine, &existingMachine, node)
- if err := ssa.Patch(ctx, r.Client, MachinePoolControllerName, desiredMachine, ssa.WithCachingProxy{Cache: r.ssaCache, Original: &existingMachine}); err != nil {
- log.Error(err, "failed to update Machine", "Machine", klog.KObj(desiredMachine))
- errs = append(errs, errors.Wrapf(err, "failed to update Machine %q", klog.KObj(desiredMachine)))
- }
- } else {
- // Otherwise create a new Machine for the infraMachine.
- log.Info("Creating new Machine for infraMachine", "infraMachine", klog.KObj(infraMachine))
- machine := r.computeDesiredMachine(s.machinePool, infraMachine, nil, node)
-
- if err := ssa.Patch(ctx, r.Client, MachinePoolControllerName, machine); err != nil {
- errs = append(errs, errors.Wrapf(err, "failed to create new Machine for infraMachine %q in namespace %q", infraMachine.GetName(), infraMachine.GetNamespace()))
- continue
- }
-
- createdMachines = append(createdMachines, *machine)
- }
- }
- if err := r.waitForMachineCreation(ctx, createdMachines); err != nil {
- errs = append(errs, errors.Wrapf(err, "failed to wait for machines to be created"))
- }
- if len(errs) > 0 {
- return kerrors.NewAggregate(errs)
- }
-
- return nil
-}
-
-// computeDesiredMachine constructs the desired Machine for an infraMachine.
-// If the Machine exists, it ensures the Machine always owned by the MachinePool.
-func (r *MachinePoolReconciler) computeDesiredMachine(mp *clusterv1.MachinePool, infraMachine *unstructured.Unstructured, existingMachine *clusterv1.Machine, existingNode *corev1.Node) *clusterv1.Machine {
- infraRef := clusterv1.ContractVersionedObjectReference{
- APIGroup: infraMachine.GroupVersionKind().Group,
- Kind: infraMachine.GetKind(),
- Name: infraMachine.GetName(),
- }
-
- var kubernetesVersion string
- if existingNode != nil && existingNode.Status.NodeInfo.KubeletVersion != "" {
- kubernetesVersion = existingNode.Status.NodeInfo.KubeletVersion
- }
-
- machine := &clusterv1.Machine{
- ObjectMeta: metav1.ObjectMeta{
- Name: infraMachine.GetName(),
- // Note: by setting the ownerRef on creation we signal to the Machine controller that this is not a stand-alone Machine.
- OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(mp, machinePoolKind)},
- Namespace: mp.Namespace,
- Labels: make(map[string]string),
- Annotations: make(map[string]string),
- },
- Spec: clusterv1.MachineSpec{
- ClusterName: mp.Spec.ClusterName,
- Bootstrap: clusterv1.Bootstrap{
- DataSecretName: ptr.To(""),
- },
- InfrastructureRef: infraRef,
- Version: kubernetesVersion,
- },
- }
-
- if existingMachine != nil {
- machine.SetName(existingMachine.Name)
- machine.SetUID(existingMachine.UID)
- }
-
- for k, v := range mp.Spec.Template.Annotations {
- machine.Annotations[k] = v
- }
-
- // Set the labels from machinePool.Spec.Template.Labels as labels for the new Machine.
- // Note: We can't just set `machinePool.Spec.Template.Labels` directly and thus "share" the labels
- // map between Machine and machinePool.Spec.Template.Labels. This would mean that adding the
- // MachinePoolNameLabel later on the Machine would also add the labels to machinePool.Spec.Template.Labels
- // and thus modify the labels of the MachinePool.
- for k, v := range mp.Spec.Template.Labels {
- machine.Labels[k] = v
- }
-
- // Enforce that the MachinePoolNameLabel and ClusterNameLabel are present on the Machine.
- machine.Labels[clusterv1.MachinePoolNameLabel] = format.MustFormatValue(mp.Name)
- machine.Labels[clusterv1.ClusterNameLabel] = mp.Spec.ClusterName
-
- return machine
-}
-
-// infraMachineToMachinePoolMapper is a mapper function that maps an InfraMachine to the MachinePool that owns it.
-// This is used to trigger an update of the MachinePool when a InfraMachine is changed.
-func (r *MachinePoolReconciler) infraMachineToMachinePoolMapper(ctx context.Context, o client.Object) []ctrl.Request {
- log := ctrl.LoggerFrom(ctx)
-
- if labels.IsMachinePoolOwned(o) {
- machinePool, err := utilexp.GetMachinePoolByLabels(ctx, r.Client, o.GetNamespace(), o.GetLabels())
- if err != nil {
- log.Error(err, "Failed to get MachinePool for InfraMachine", o.GetObjectKind().GroupVersionKind().Kind, klog.KObj(o), "labels", o.GetLabels())
- return nil
- }
- if machinePool != nil {
- return []ctrl.Request{
- {
- NamespacedName: client.ObjectKey{
- Namespace: machinePool.Namespace,
- Name: machinePool.Name,
- },
- },
- }
- }
- }
-
- return nil
-}
-
-func (r *MachinePoolReconciler) waitForMachineCreation(ctx context.Context, machineList []clusterv1.Machine) error {
- _ = ctrl.LoggerFrom(ctx)
-
- // waitForCacheUpdateTimeout is the amount of time allowed to wait for desired state.
- const waitForCacheUpdateTimeout = 10 * time.Second
-
- // waitForCacheUpdateInterval is the amount of time between polling for the desired state.
- // The polling is against a local memory cache.
- const waitForCacheUpdateInterval = 100 * time.Millisecond
-
- for i := range machineList {
- machine := machineList[i]
- pollErr := wait.PollUntilContextTimeout(ctx, waitForCacheUpdateInterval, waitForCacheUpdateTimeout, true, func(ctx context.Context) (bool, error) {
- key := client.ObjectKey{Namespace: machine.Namespace, Name: machine.Name}
- if err := r.Client.Get(ctx, key, &clusterv1.Machine{}); err != nil {
- if apierrors.IsNotFound(err) {
- return false, nil
- }
- return false, err
- }
-
- return true, nil
- })
-
- if pollErr != nil {
- return errors.Wrapf(pollErr, "failed waiting for machine object %v to be created", klog.KObj(&machine))
- }
- }
-
- return nil
-}
-
-func (r *MachinePoolReconciler) getNodeRefMap(ctx context.Context, c client.Client) (map[string]*corev1.Node, error) {
- log := ctrl.LoggerFrom(ctx)
- nodeRefsMap := make(map[string]*corev1.Node)
- nodeList := corev1.NodeList{}
- // Note: We don't use pagination as this is a cached client and a cached client doesn't support pagination.
- if err := c.List(ctx, &nodeList); err != nil {
- return nil, err
- }
-
- for _, node := range nodeList.Items {
- if node.Spec.ProviderID == "" {
- log.V(2).Info("No ProviderID detected, skipping", "providerID", node.Spec.ProviderID)
- continue
- }
-
- nodeRefsMap[node.Spec.ProviderID] = &node
- }
-
- return nodeRefsMap, nil
-}
diff --git a/exp/internal/controllers/machinepool_controller_scope.go b/exp/internal/controllers/machinepool_controller_scope.go
deleted file mode 100644
index 1bb60bb4759f..000000000000
--- a/exp/internal/controllers/machinepool_controller_scope.go
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-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 (
- "errors"
- "fmt"
-
- corev1 "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
-
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
-)
-
-// scope holds the different objects that are read and used during the reconcile.
-type scope struct {
- // cluster is the Cluster object the Machine belongs to.
- // It is set at the beginning of the reconcile function.
- cluster *clusterv1.Cluster
-
- // machinePool is the MachinePool object. It is set at the beginning
- // of the reconcile function.
- machinePool *clusterv1.MachinePool
-
- // infraMachinePool is the infrastructure machinepool object. It is set during
- // the reconcile infrastructure phase.
- infraMachinePool *unstructured.Unstructured
-
- // nodeRefMapResult is a map of providerIDs to Nodes that are associated with the Cluster.
- // It is set after reconcileInfrastructure is called.
- nodeRefMap map[string]*corev1.Node
-
- // machines holds a list of the machines associated with this machine pool.
- machines []*clusterv1.Machine
-}
-
-func (s *scope) hasMachinePoolMachines() (bool, error) {
- if s.infraMachinePool == nil {
- return false, errors.New("infra machine pool not set on scope")
- }
-
- machineKind, found, err := unstructured.NestedString(s.infraMachinePool.Object, "status", "infrastructureMachineKind")
- if err != nil {
- return false, fmt.Errorf("failed to lookup infrastructureMachineKind: %w", err)
- }
-
- return found && (machineKind != ""), nil
-}
diff --git a/exp/internal/controllers/machinepool_controller_status.go b/exp/internal/controllers/machinepool_controller_status.go
deleted file mode 100644
index 6f5df81ad9c8..000000000000
--- a/exp/internal/controllers/machinepool_controller_status.go
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
-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"
-
- "k8s.io/utils/ptr"
- ctrl "sigs.k8s.io/controller-runtime"
-
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
- "sigs.k8s.io/cluster-api/util/conditions"
-)
-
-func (r *MachinePoolReconciler) updateStatus(ctx context.Context, s *scope) error {
- log := ctrl.LoggerFrom(ctx)
-
- if s.infraMachinePool == nil {
- log.V(4).Info("infra machine pool isn't set, skipping setting status")
- return nil
- }
- hasMachinePoolMachines, err := s.hasMachinePoolMachines()
- if err != nil {
- return fmt.Errorf("determining if there are machine pool machines: %w", err)
- }
-
- setReplicas(s.machinePool, hasMachinePoolMachines, s.machines)
-
- // TODO: in future add setting conditions here
-
- return nil
-}
-
-func setReplicas(mp *clusterv1.MachinePool, hasMachinePoolMachines bool, machines []*clusterv1.Machine) {
- if !hasMachinePoolMachines {
- // If we don't have machinepool machine then calculate the values differently
- mp.Status.ReadyReplicas = mp.Status.Replicas
- mp.Status.AvailableReplicas = mp.Status.Replicas
- mp.Status.UpToDateReplicas = mp.Spec.Replicas
-
- return
- }
-
- var readyReplicas, availableReplicas, upToDateReplicas int32
- for _, machine := range machines {
- if conditions.IsTrue(machine, clusterv1.MachineReadyCondition) {
- readyReplicas++
- }
- if conditions.IsTrue(machine, clusterv1.MachineAvailableCondition) {
- availableReplicas++
- }
- if conditions.IsTrue(machine, clusterv1.MachineUpToDateCondition) {
- upToDateReplicas++
- }
- }
-
- mp.Status.ReadyReplicas = ptr.To(readyReplicas)
- mp.Status.AvailableReplicas = ptr.To(availableReplicas)
- mp.Status.UpToDateReplicas = ptr.To(upToDateReplicas)
-}
diff --git a/exp/internal/controllers/suite_test.go b/exp/internal/controllers/suite_test.go
deleted file mode 100644
index 70c597ecaf7b..000000000000
--- a/exp/internal/controllers/suite_test.go
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
-Copyright 2019 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"
- "os"
- "testing"
-
- corev1 "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/apimachinery/pkg/selection"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/cache"
- "sigs.k8s.io/controller-runtime/pkg/client"
- "sigs.k8s.io/controller-runtime/pkg/controller"
-
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
- "sigs.k8s.io/cluster-api/api/core/v1beta2/index"
- "sigs.k8s.io/cluster-api/controllers/clustercache"
- "sigs.k8s.io/cluster-api/controllers/remote"
- "sigs.k8s.io/cluster-api/internal/test/envtest"
-)
-
-var (
- env *envtest.Environment
- ctx = ctrl.SetupSignalHandler()
-)
-
-func TestMain(m *testing.M) {
- setupIndexes := func(ctx context.Context, mgr ctrl.Manager) {
- if err := index.AddDefaultIndexes(ctx, mgr); err != nil {
- panic(fmt.Sprintf("unable to setup index: %v", err))
- }
- }
-
- setupReconcilers := func(ctx context.Context, mgr ctrl.Manager) {
- clusterCache, err := clustercache.SetupWithManager(ctx, mgr, clustercache.Options{
- SecretClient: mgr.GetClient(),
- Cache: clustercache.CacheOptions{
- Indexes: []clustercache.CacheOptionsIndex{clustercache.NodeProviderIDIndex},
- },
- Client: clustercache.ClientOptions{
- UserAgent: remote.DefaultClusterAPIUserAgent("test-controller-manager"),
- Cache: clustercache.ClientCacheOptions{
- DisableFor: []client.Object{
- // Don't cache ConfigMaps & Secrets.
- &corev1.ConfigMap{},
- &corev1.Secret{},
- },
- },
- },
- }, controller.Options{MaxConcurrentReconciles: 10})
- if err != nil {
- panic(fmt.Sprintf("Failed to create ClusterCache: %v", err))
- }
- go func() {
- <-ctx.Done()
- clusterCache.(interface{ Shutdown() }).Shutdown()
- }()
-
- if err := (&MachinePoolReconciler{
- Client: mgr.GetClient(),
- APIReader: mgr.GetAPIReader(),
- ClusterCache: clusterCache,
- recorder: mgr.GetEventRecorderFor("machinepool-controller"),
- }).SetupWithManager(ctx, mgr, controller.Options{MaxConcurrentReconciles: 1}); err != nil {
- panic(fmt.Sprintf("Failed to set up machine pool reconciler: %v", err))
- }
- }
-
- req, _ := labels.NewRequirement(clusterv1.ClusterNameLabel, selection.Exists, nil)
- clusterSecretCacheSelector := labels.NewSelector().Add(*req)
-
- os.Exit(envtest.Run(ctx, envtest.RunInput{
- M: m,
- ManagerCacheOptions: cache.Options{
- ByObject: map[client.Object]cache.ByObject{
- // Only cache Secrets with the cluster name label.
- // This is similar to the real world.
- &corev1.Secret{}: {
- Label: clusterSecretCacheSelector,
- },
- },
- },
- ManagerUncachedObjs: []client.Object{
- &corev1.ConfigMap{},
- &corev1.Secret{},
- },
- SetupEnv: func(e *envtest.Environment) { env = e },
- SetupIndexes: setupIndexes,
- SetupReconcilers: setupReconcilers,
- }))
-}
diff --git a/exp/internal/webhooks/doc.go b/exp/internal/webhooks/doc.go
deleted file mode 100644
index ad3cd005e864..000000000000
--- a/exp/internal/webhooks/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-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 contains external webhook implementations for some of our API types.
-package webhooks
diff --git a/exp/internal/webhooks/machinepool.go b/exp/internal/webhooks/machinepool.go
deleted file mode 100644
index 9b440eeca5fd..000000000000
--- a/exp/internal/webhooks/machinepool.go
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
-Copyright 2021 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"
- "fmt"
- "strconv"
- "strings"
-
- "github.com/pkg/errors"
- v1 "k8s.io/api/admission/v1"
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- "k8s.io/utils/ptr"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
- "sigs.k8s.io/cluster-api/feature"
- "sigs.k8s.io/cluster-api/util/version"
-)
-
-const defaultNodeDeletionTimeoutSeconds = int32(10)
-
-func (webhook *MachinePool) SetupWebhookWithManager(mgr ctrl.Manager) error {
- if webhook.decoder == nil {
- webhook.decoder = admission.NewDecoder(mgr.GetScheme())
- }
-
- return ctrl.NewWebhookManagedBy(mgr).
- For(&clusterv1.MachinePool{}).
- WithDefaulter(webhook).
- WithValidator(webhook).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-cluster-x-k8s-io-v1beta2-machinepool,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machinepools,versions=v1beta2,name=validation.machinepool.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-cluster-x-k8s-io-v1beta2-machinepool,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machinepools,versions=v1beta2,name=default.machinepool.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-// MachinePool implements a validation and defaulting webhook for MachinePool.
-type MachinePool struct {
- decoder admission.Decoder
-}
-
-var _ webhook.CustomValidator = &MachinePool{}
-var _ webhook.CustomDefaulter = &MachinePool{}
-
-// Default implements webhook.Defaulter so a webhook will be registered for the type.
-func (webhook *MachinePool) Default(ctx context.Context, obj runtime.Object) error {
- m, ok := obj.(*clusterv1.MachinePool)
- if !ok {
- return apierrors.NewBadRequest(fmt.Sprintf("expected a MachinePool but got a %T", obj))
- }
-
- req, err := admission.RequestFromContext(ctx)
- if err != nil {
- return err
- }
- dryRun := false
- if req.DryRun != nil {
- dryRun = *req.DryRun
- }
- var oldMP *clusterv1.MachinePool
- if req.Operation == v1.Update {
- oldMP = &clusterv1.MachinePool{}
- if err := webhook.decoder.DecodeRaw(req.OldObject, oldMP); err != nil {
- return errors.Wrapf(err, "failed to decode oldObject to MachinePool")
- }
- }
-
- if m.Labels == nil {
- m.Labels = make(map[string]string)
- }
- m.Labels[clusterv1.ClusterNameLabel] = m.Spec.ClusterName
-
- replicas, err := calculateMachinePoolReplicas(ctx, oldMP, m, dryRun)
- if err != nil {
- return err
- }
-
- m.Spec.Replicas = ptr.To[int32](replicas)
-
- // Set the default value for the node deletion timeout.
- if m.Spec.Template.Spec.Deletion.NodeDeletionTimeoutSeconds == nil {
- m.Spec.Template.Spec.Deletion.NodeDeletionTimeoutSeconds = ptr.To(defaultNodeDeletionTimeoutSeconds)
- }
-
- // tolerate version strings without a "v" prefix: prepend it if it's not there.
- if m.Spec.Template.Spec.Version != "" && !strings.HasPrefix(m.Spec.Template.Spec.Version, "v") {
- normalizedVersion := "v" + m.Spec.Template.Spec.Version
- m.Spec.Template.Spec.Version = normalizedVersion
- }
-
- return nil
-}
-
-// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
-func (webhook *MachinePool) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- mp, ok := obj.(*clusterv1.MachinePool)
- if !ok {
- return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a MachinePool but got a %T", obj))
- }
-
- return nil, webhook.validate(nil, mp)
-}
-
-// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
-func (webhook *MachinePool) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
- oldMP, ok := oldObj.(*clusterv1.MachinePool)
- if !ok {
- return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a MachinePool but got a %T", oldObj))
- }
- newMP, ok := newObj.(*clusterv1.MachinePool)
- if !ok {
- return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a MachinePool but got a %T", newObj))
- }
- return nil, webhook.validate(oldMP, newMP)
-}
-
-// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
-func (webhook *MachinePool) ValidateDelete(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- mp, ok := obj.(*clusterv1.MachinePool)
- if !ok {
- return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a MachinePool but got a %T", obj))
- }
-
- return nil, webhook.validate(nil, mp)
-}
-
-func (webhook *MachinePool) validate(oldObj, newObj *clusterv1.MachinePool) error {
- // NOTE: MachinePool is behind MachinePool feature gate flag; the web hook
- // must prevent creating newObj objects when the feature flag is disabled.
- specPath := field.NewPath("spec")
- if !feature.Gates.Enabled(feature.MachinePool) {
- return field.Forbidden(
- specPath,
- "can be set only if the MachinePool feature flag is enabled",
- )
- }
- var allErrs field.ErrorList
- if !newObj.Spec.Template.Spec.Bootstrap.ConfigRef.IsDefined() && newObj.Spec.Template.Spec.Bootstrap.DataSecretName == nil {
- allErrs = append(
- allErrs,
- field.Required(
- specPath.Child("template", "spec", "bootstrap"),
- "expected either spec.template.spec.bootstrap.dataSecretName or spec.template.spec.bootstrap.configRef to be populated",
- ),
- )
- }
-
- if oldObj != nil && oldObj.Spec.ClusterName != newObj.Spec.ClusterName {
- allErrs = append(
- allErrs,
- field.Forbidden(
- specPath.Child("clusterName"),
- "field is immutable"),
- )
- }
-
- if newObj.Spec.ClusterName != newObj.Spec.Template.Spec.ClusterName {
- allErrs = append(
- allErrs,
- field.Invalid(
- specPath.Child("clusterName"),
- newObj.Spec.ClusterName,
- "spec.clusterName and spec.template.spec.clusterName must be set to the same value",
- ),
- )
- }
-
- if newObj.Spec.Template.Spec.Version != "" {
- if !version.KubeSemver.MatchString(newObj.Spec.Template.Spec.Version) {
- allErrs = append(allErrs, field.Invalid(specPath.Child("template", "spec", "version"), newObj.Spec.Template.Spec.Version, "must be a valid semantic version"))
- }
- }
-
- // Validate the metadata of the MachinePool template.
- allErrs = append(allErrs, newObj.Spec.Template.Validate(specPath.Child("template", "metadata"))...)
-
- if len(allErrs) == 0 {
- return nil
- }
- return apierrors.NewInvalid(clusterv1.GroupVersion.WithKind("MachinePool").GroupKind(), newObj.Name, allErrs)
-}
-
-func calculateMachinePoolReplicas(ctx context.Context, oldMP *clusterv1.MachinePool, newMP *clusterv1.MachinePool, dryRun bool) (int32, error) {
- // If replicas is already set => Keep the current value.
- if newMP.Spec.Replicas != nil {
- return *newMP.Spec.Replicas, nil
- }
-
- log := ctrl.LoggerFrom(ctx)
-
- // If both autoscaler annotations are set, use them to calculate the default value.
- minSizeString, hasMinSizeAnnotation := newMP.Annotations[clusterv1.AutoscalerMinSizeAnnotation]
- maxSizeString, hasMaxSizeAnnotation := newMP.Annotations[clusterv1.AutoscalerMaxSizeAnnotation]
- if hasMinSizeAnnotation && hasMaxSizeAnnotation {
- minSize, err := strconv.ParseInt(minSizeString, 10, 32)
- if err != nil {
- return 0, errors.Wrapf(err, "failed to caculate MachinePool replicas value: could not parse the value of the %q annotation", clusterv1.AutoscalerMinSizeAnnotation)
- }
- maxSize, err := strconv.ParseInt(maxSizeString, 10, 32)
- if err != nil {
- return 0, errors.Wrapf(err, "failed to caculate MachinePool replicas value: could not parse the value of the %q annotation", clusterv1.AutoscalerMaxSizeAnnotation)
- }
-
- // If it's a new MachinePool => Use the min size.
- // Note: This will result in a scale up to get into the range where autoscaler takes over.
- if oldMP == nil {
- if !dryRun {
- log.V(2).Info(fmt.Sprintf("Replica field has been defaulted to %d based on the %s annotation (MP is a new MP)", minSize, clusterv1.AutoscalerMinSizeAnnotation))
- }
- return int32(minSize), nil
- }
-
- // Otherwise we are handing over the control for the replicas field for an existing MachinePool
- // to the autoscaler.
-
- switch {
- // If the old MachinePool doesn't have replicas set => Use the min size.
- // Note: As defaulting always sets the replica field, this case should not be possible
- // We only have this handling to be 100% safe against panics.
- case oldMP.Spec.Replicas == nil:
- if !dryRun {
- log.V(2).Info(fmt.Sprintf("Replica field has been defaulted to %d based on the %s annotation (old MP didn't have replicas set)", minSize, clusterv1.AutoscalerMinSizeAnnotation))
- }
- return int32(minSize), nil
- // If the old MachinePool replicas are lower than min size => Use the min size.
- // Note: This will result in a scale up to get into the range where autoscaler takes over.
- case *oldMP.Spec.Replicas < int32(minSize):
- if !dryRun {
- log.V(2).Info(fmt.Sprintf("Replica field has been defaulted to %d based on the %s annotation (old MP had replicas below min size)", minSize, clusterv1.AutoscalerMinSizeAnnotation))
- }
- return int32(minSize), nil
- // If the old MachinePool replicas are higher than max size => Use the max size.
- // Note: This will result in a scale down to get into the range where autoscaler takes over.
- case *oldMP.Spec.Replicas > int32(maxSize):
- if !dryRun {
- log.V(2).Info(fmt.Sprintf("Replica field has been defaulted to %d based on the %s annotation (old MP had replicas above max size)", maxSize, clusterv1.AutoscalerMaxSizeAnnotation))
- }
- return int32(maxSize), nil
- // If the old MachinePool replicas are between min and max size => Keep the current value.
- default:
- if !dryRun {
- log.V(2).Info(fmt.Sprintf("Replica field has been defaulted to %d based on replicas of the old MachinePool (old MP had replicas within min size / max size range)", *oldMP.Spec.Replicas))
- }
- return *oldMP.Spec.Replicas, nil
- }
- }
-
- // If neither the default nor the autoscaler annotations are set => Default to 1.
- if !dryRun {
- log.V(2).Info("Replica field has been defaulted to 1")
- }
- return 1, nil
-}
diff --git a/exp/ipam/internal/webhooks/doc.go b/exp/ipam/internal/webhooks/doc.go
deleted file mode 100644
index fded86ca9afc..000000000000
--- a/exp/ipam/internal/webhooks/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-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 webhooks implements experimental webhooks.
-package webhooks
diff --git a/exp/ipam/webhooks/alias.go b/exp/ipam/webhooks/alias.go
deleted file mode 100644
index 092347cf72f2..000000000000
--- a/exp/ipam/webhooks/alias.go
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-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 webhooks
-
-import (
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/client"
-
- "sigs.k8s.io/cluster-api/exp/ipam/internal/webhooks"
-)
-
-// IPAddress implements a validating and defaulting webhook for IPAddress.
-type IPAddress struct {
- Client client.Reader
-}
-
-// SetupWebhookWithManager sets up IPAddress webhooks.
-func (webhook *IPAddress) SetupWebhookWithManager(mgr ctrl.Manager) error {
- return (&webhooks.IPAddress{
- Client: webhook.Client,
- }).SetupWebhookWithManager(mgr)
-}
-
-// IPAddressClaim implements a validating and defaulting webhook for IPAddressClaim.
-type IPAddressClaim struct {
-}
-
-// SetupWebhookWithManager sets up IPAddressClaim webhooks.
-func (webhook *IPAddressClaim) SetupWebhookWithManager(mgr ctrl.Manager) error {
- return (&webhooks.IPAddressClaim{}).SetupWebhookWithManager(mgr)
-}
diff --git a/exp/ipam/webhooks/doc.go b/exp/ipam/webhooks/doc.go
deleted file mode 100644
index ff54398db2b2..000000000000
--- a/exp/ipam/webhooks/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-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 webhooks contains external webhook implementations for some of our API types.
-package webhooks
diff --git a/exp/runtime/client/client.go b/exp/runtime/client/client.go
index 3fb39f763414..714817f5f648 100644
--- a/exp/runtime/client/client.go
+++ b/exp/runtime/client/client.go
@@ -20,7 +20,7 @@ package client
import (
"context"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "sigs.k8s.io/controller-runtime/pkg/client"
runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1"
runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2"
@@ -86,9 +86,12 @@ type Client interface {
// Unregister unregisters the ExtensionConfig.
Unregister(extensionConfig *runtimev1.ExtensionConfig) error
+ // GetAllExtensions gets all the ExtensionHandlers registered for the hook.
+ GetAllExtensions(ctx context.Context, hook runtimecatalog.Hook, forObject client.Object) ([]string, error)
+
// CallAllExtensions calls all the ExtensionHandler registered for the hook.
- CallAllExtensions(ctx context.Context, hook runtimecatalog.Hook, forObject metav1.Object, request runtimehooksv1.RequestObject, response runtimehooksv1.ResponseObject) error
+ CallAllExtensions(ctx context.Context, hook runtimecatalog.Hook, forObject client.Object, request runtimehooksv1.RequestObject, response runtimehooksv1.ResponseObject) error
// CallExtension calls the ExtensionHandler with the given name.
- CallExtension(ctx context.Context, hook runtimecatalog.Hook, forObject metav1.Object, name string, request runtimehooksv1.RequestObject, response runtimehooksv1.ResponseObject, opts ...CallExtensionOption) error
+ CallExtension(ctx context.Context, hook runtimecatalog.Hook, forObject client.Object, name string, request runtimehooksv1.RequestObject, response runtimehooksv1.ResponseObject, opts ...CallExtensionOption) error
}
diff --git a/exp/runtime/controllers/alias.go b/exp/runtime/controllers/alias.go
deleted file mode 100644
index 48b1a173a3fc..000000000000
--- a/exp/runtime/controllers/alias.go
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-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 controllers
-
-import (
- "context"
-
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/cache"
- "sigs.k8s.io/controller-runtime/pkg/client"
- "sigs.k8s.io/controller-runtime/pkg/controller"
-
- runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client"
- runtimecontrollers "sigs.k8s.io/cluster-api/exp/runtime/internal/controllers"
-)
-
-// ExtensionConfigReconciler reconciles an ExtensionConfig object.
-type ExtensionConfigReconciler struct {
- Client client.Client
- APIReader client.Reader
- RuntimeClient runtimeclient.Client
-
- // WatchFilterValue is the label value used to filter events prior to reconciliation.
- WatchFilterValue string
-}
-
-func (r *ExtensionConfigReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options, partialSecretCache cache.Cache) error {
- return (&runtimecontrollers.Reconciler{
- Client: r.Client,
- APIReader: r.APIReader,
- RuntimeClient: r.RuntimeClient,
- WatchFilterValue: r.WatchFilterValue,
- }).SetupWithManager(ctx, mgr, options, partialSecretCache)
-}
diff --git a/exp/runtime/controllers/doc.go b/exp/runtime/controllers/doc.go
deleted file mode 100644
index bc5c76004d27..000000000000
--- a/exp/runtime/controllers/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-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 controllers implements the exp/runtime controllers.
-package controllers
diff --git a/exp/runtime/internal/controllers/doc.go b/exp/runtime/internal/controllers/doc.go
deleted file mode 100644
index bc5c76004d27..000000000000
--- a/exp/runtime/internal/controllers/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-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 controllers implements the exp/runtime controllers.
-package controllers
diff --git a/exp/runtime/internal/controllers/extensionconfig_controller.go b/exp/runtime/internal/controllers/extensionconfig_controller.go
deleted file mode 100644
index d85730c41c7a..000000000000
--- a/exp/runtime/internal/controllers/extensionconfig_controller.go
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
-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 controllers
-
-import (
- "context"
- "fmt"
- "strings"
-
- "github.com/pkg/errors"
- corev1 "k8s.io/api/core/v1"
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/types"
- kerrors "k8s.io/apimachinery/pkg/util/errors"
- "k8s.io/klog/v2"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/cache"
- "sigs.k8s.io/controller-runtime/pkg/client"
- "sigs.k8s.io/controller-runtime/pkg/controller"
- "sigs.k8s.io/controller-runtime/pkg/handler"
- "sigs.k8s.io/controller-runtime/pkg/reconcile"
- "sigs.k8s.io/controller-runtime/pkg/source"
-
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
- runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2"
- runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client"
- "sigs.k8s.io/cluster-api/util/conditions"
- v1beta1conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1"
- "sigs.k8s.io/cluster-api/util/patch"
- "sigs.k8s.io/cluster-api/util/paused"
- "sigs.k8s.io/cluster-api/util/predicates"
-)
-
-const (
- // tlsCAKey is used as a data key in Secret resources to store a CA certificate.
- tlsCAKey = "ca.crt"
-)
-
-// +kubebuilder:rbac:groups=runtime.cluster.x-k8s.io,resources=extensionconfigs;extensionconfigs/status,verbs=get;list;watch;patch;update
-// +kubebuilder:rbac:groups="",resources=namespaces,verbs=get;list;watch
-
-// Reconciler reconciles an ExtensionConfig object.
-type Reconciler struct {
- Client client.Client
- APIReader client.Reader
- RuntimeClient runtimeclient.Client
- // WatchFilterValue is the label value used to filter events prior to reconciliation.
- WatchFilterValue string
-}
-
-func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options, partialSecretCache cache.Cache) error {
- if r.Client == nil || r.APIReader == nil || r.RuntimeClient == nil {
- return errors.New("Client, APIReader and RuntimeClient must not be nil")
- }
-
- predicateLog := ctrl.LoggerFrom(ctx).WithValues("controller", "extensionconfig")
- err := ctrl.NewControllerManagedBy(mgr).
- For(&runtimev1.ExtensionConfig{}).
- WatchesRawSource(source.Kind(
- partialSecretCache,
- &metav1.PartialObjectMetadata{
- TypeMeta: metav1.TypeMeta{
- Kind: "Secret",
- APIVersion: "v1",
- },
- },
- handler.TypedEnqueueRequestsFromMapFunc(
- r.secretToExtensionConfig,
- ),
- predicates.TypedResourceIsChanged[*metav1.PartialObjectMetadata](mgr.GetScheme(), predicateLog),
- )).
- WithOptions(options).
- WithEventFilter(predicates.ResourceHasFilterLabel(mgr.GetScheme(), predicateLog, r.WatchFilterValue)).
- Complete(r)
- if err != nil {
- return errors.Wrap(err, "failed setting up with a controller manager")
- }
-
- if err := indexByExtensionInjectCAFromSecretName(ctx, mgr); err != nil {
- return errors.Wrap(err, "failed setting up with a controller manager")
- }
-
- // warmupRunnable will attempt to sync the RuntimeSDK registry with existing ExtensionConfig objects to ensure extensions
- // are discovered before controllers begin reconciling.
- err = mgr.Add(&warmupRunnable{
- Client: r.Client,
- APIReader: r.APIReader,
- RuntimeClient: r.RuntimeClient,
- })
- if err != nil {
- return errors.Wrap(err, "failed adding warmupRunnable to controller manager")
- }
- return nil
-}
-
-func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
- var errs []error
- log := ctrl.LoggerFrom(ctx)
-
- // Requeue events when the registry is not ready.
- // The registry will become ready after it is 'warmed up' by warmupRunnable.
- if !r.RuntimeClient.IsReady() {
- return ctrl.Result{Requeue: true}, nil
- }
-
- extensionConfig := &runtimev1.ExtensionConfig{}
- err := r.Client.Get(ctx, req.NamespacedName, extensionConfig)
- if err != nil {
- if apierrors.IsNotFound(err) {
- // ExtensionConfig not found. Remove from registry.
- // First we need to add Namespace/Name to empty ExtensionConfig object.
- extensionConfig.Name = req.Name
- extensionConfig.Namespace = req.Namespace
- return r.reconcileDelete(ctx, extensionConfig)
- }
- // Error reading the object - requeue the request.
- return ctrl.Result{}, err
- }
-
- // Copy to avoid modifying the original extensionConfig.
- original := extensionConfig.DeepCopy()
-
- if isPaused, requeue, err := paused.EnsurePausedCondition(ctx, r.Client, nil, extensionConfig); err != nil || isPaused || requeue {
- return ctrl.Result{}, err
- }
-
- // Handle deletion reconciliation loop.
- if !extensionConfig.DeletionTimestamp.IsZero() {
- return r.reconcileDelete(ctx, extensionConfig)
- }
-
- // Inject CABundle from secret if annotation is set. Otherwise https calls may fail.
- if err := reconcileCABundle(ctx, r.Client, extensionConfig); err != nil {
- return ctrl.Result{}, err
- }
-
- // discoverExtensionConfig will return a discovered ExtensionConfig with the appropriate conditions.
- discoveredExtensionConfig, err := discoverExtensionConfig(ctx, r.RuntimeClient, extensionConfig)
- if err != nil {
- errs = append(errs, err)
- }
-
- // Always patch the ExtensionConfig as it may contain updates in conditions or clientConfig.caBundle.
- if err = patchExtensionConfig(ctx, r.Client, original, discoveredExtensionConfig); err != nil {
- errs = append(errs, err)
- }
-
- if len(errs) != 0 {
- return ctrl.Result{}, kerrors.NewAggregate(errs)
- }
-
- // Register the ExtensionConfig if it was found and patched without error.
- log.V(4).Info("Registering ExtensionConfig information into registry")
- if err = r.RuntimeClient.Register(discoveredExtensionConfig); err != nil {
- return ctrl.Result{}, errors.Wrapf(err, "failed to register ExtensionConfig %s/%s", extensionConfig.Namespace, extensionConfig.Name)
- }
- return ctrl.Result{}, nil
-}
-
-func patchExtensionConfig(ctx context.Context, client client.Client, original, modified *runtimev1.ExtensionConfig, options ...patch.Option) error {
- patchHelper, err := patch.NewHelper(original, client)
- if err != nil {
- return err
- }
-
- options = append(options,
- patch.WithOwnedV1Beta1Conditions{Conditions: []clusterv1.ConditionType{
- runtimev1.RuntimeExtensionDiscoveredV1Beta1Condition,
- }},
- patch.WithOwnedConditions{Conditions: []string{
- clusterv1.PausedCondition,
- runtimev1.ExtensionConfigDiscoveredCondition,
- }},
- )
- return patchHelper.Patch(ctx, modified, options...)
-}
-
-// reconcileDelete will remove the ExtensionConfig from the registry on deletion of the object. Note this is a best
-// effort deletion that may not catch all cases.
-func (r *Reconciler) reconcileDelete(ctx context.Context, extensionConfig *runtimev1.ExtensionConfig) (ctrl.Result, error) {
- log := ctrl.LoggerFrom(ctx)
- log.Info("Unregistering ExtensionConfig information from registry")
- if err := r.RuntimeClient.Unregister(extensionConfig); err != nil {
- return ctrl.Result{}, errors.Wrapf(err, "failed to unregister ExtensionConfig %s", klog.KObj(extensionConfig))
- }
- return ctrl.Result{}, nil
-}
-
-// secretToExtensionConfig maps a secret to ExtensionConfigs with the corresponding InjectCAFromSecretAnnotation
-// to reconcile them on updates of the secrets.
-func (r *Reconciler) secretToExtensionConfig(ctx context.Context, secret *metav1.PartialObjectMetadata) []reconcile.Request {
- result := []ctrl.Request{}
-
- extensionConfigs := runtimev1.ExtensionConfigList{}
- indexKey := secret.GetNamespace() + "/" + secret.GetName()
-
- if err := r.Client.List(
- ctx,
- &extensionConfigs,
- client.MatchingFields{injectCAFromSecretAnnotationField: indexKey},
- ); err != nil {
- return nil
- }
-
- for _, ext := range extensionConfigs.Items {
- result = append(result, ctrl.Request{NamespacedName: client.ObjectKey{Name: ext.Name}})
- }
-
- return result
-}
-
-// discoverExtensionConfig attempts to discover the Handlers for an ExtensionConfig.
-// If discovery succeeds it returns the ExtensionConfig with Handlers updated in Status and an updated Condition.
-// If discovery fails it returns the ExtensionConfig with no update to Handlers and a Failed Condition.
-func discoverExtensionConfig(ctx context.Context, runtimeClient runtimeclient.Client, extensionConfig *runtimev1.ExtensionConfig) (*runtimev1.ExtensionConfig, error) {
- discoveredExtension, err := runtimeClient.Discover(ctx, extensionConfig.DeepCopy())
- if err != nil {
- modifiedExtensionConfig := extensionConfig.DeepCopy()
- v1beta1conditions.MarkFalse(modifiedExtensionConfig, runtimev1.RuntimeExtensionDiscoveredV1Beta1Condition, runtimev1.DiscoveryFailedV1Beta1Reason, clusterv1.ConditionSeverityError, "Error in discovery: %v", err)
- conditions.Set(modifiedExtensionConfig, metav1.Condition{
- Type: runtimev1.ExtensionConfigDiscoveredCondition,
- Status: metav1.ConditionFalse,
- Reason: runtimev1.ExtensionConfigNotDiscoveredReason,
- Message: fmt.Sprintf("Error in discovery: %v", err),
- })
- return modifiedExtensionConfig, errors.Wrapf(err, "failed to discover ExtensionConfig %s", klog.KObj(extensionConfig))
- }
-
- v1beta1conditions.MarkTrue(discoveredExtension, runtimev1.RuntimeExtensionDiscoveredV1Beta1Condition)
- conditions.Set(discoveredExtension, metav1.Condition{
- Type: runtimev1.ExtensionConfigDiscoveredCondition,
- Status: metav1.ConditionTrue,
- Reason: runtimev1.ExtensionConfigDiscoveredReason,
- })
- return discoveredExtension, nil
-}
-
-// reconcileCABundle reconciles the CA bundle for the ExtensionConfig.
-// Note: This was implemented to behave similar to the cert-manager cainjector.
-// We couldn't use the cert-manager cainjector because it doesn't work with CustomResources.
-func reconcileCABundle(ctx context.Context, client client.Client, config *runtimev1.ExtensionConfig) error {
- log := ctrl.LoggerFrom(ctx)
-
- secretNameRaw, ok := config.Annotations[runtimev1.InjectCAFromSecretAnnotation]
- if !ok {
- return nil
- }
- secretName := splitNamespacedName(secretNameRaw)
-
- log.V(4).Info(fmt.Sprintf("Injecting CA Bundle into ExtensionConfig from secret %q", secretNameRaw))
-
- if secretName.Namespace == "" || secretName.Name == "" {
- return errors.Errorf("failed to reconcile caBundle: secret name %q must be in the form /", secretNameRaw)
- }
-
- var secret corev1.Secret
- // Note: this is an expensive API call because secrets are explicitly not cached.
- if err := client.Get(ctx, secretName, &secret); err != nil {
- return errors.Wrapf(err, "failed to reconcile caBundle: failed to get secret %q", secretNameRaw)
- }
-
- caData, hasCAData := secret.Data[tlsCAKey]
- if !hasCAData {
- return errors.Errorf("failed to reconcile caBundle: secret %s does not contain a %q entry", secretNameRaw, tlsCAKey)
- }
-
- config.Spec.ClientConfig.CABundle = caData
- return nil
-}
-
-// splitNamespacedName turns the string form of a namespaced name
-// (/) into a types.NamespacedName.
-func splitNamespacedName(nameStr string) types.NamespacedName {
- splitPoint := strings.IndexRune(nameStr, types.Separator)
- if splitPoint == -1 {
- return types.NamespacedName{Name: nameStr}
- }
- return types.NamespacedName{Namespace: nameStr[:splitPoint], Name: nameStr[splitPoint+1:]}
-}
diff --git a/exp/runtime/internal/controllers/extensionconfig_controller_test.go b/exp/runtime/internal/controllers/extensionconfig_controller_test.go
deleted file mode 100644
index 49bfba2b8a3d..000000000000
--- a/exp/runtime/internal/controllers/extensionconfig_controller_test.go
+++ /dev/null
@@ -1,473 +0,0 @@
-/*
-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 controllers
-
-import (
- "context"
- "crypto/tls"
- "encoding/json"
- "net/http"
- "net/http/httptest"
- "testing"
- "time"
-
- . "github.com/onsi/gomega"
- "github.com/pkg/errors"
- corev1 "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apiserver/pkg/admission/plugin/webhook/testcerts"
- utilfeature "k8s.io/component-base/featuregate/testing"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/client"
- "sigs.k8s.io/controller-runtime/pkg/client/fake"
-
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
- runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1"
- runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2"
- runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog"
- "sigs.k8s.io/cluster-api/feature"
- internalruntimeclient "sigs.k8s.io/cluster-api/internal/runtime/client"
- runtimeregistry "sigs.k8s.io/cluster-api/internal/runtime/registry"
- fakev1alpha1 "sigs.k8s.io/cluster-api/internal/runtime/test/v1alpha1"
- "sigs.k8s.io/cluster-api/util"
- "sigs.k8s.io/cluster-api/util/conditions"
-)
-
-func TestExtensionReconciler_Reconcile(t *testing.T) {
- utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.ClusterTopology, true)
- utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.RuntimeSDK, true)
-
- g := NewWithT(t)
- ns, err := env.CreateNamespace(ctx, "test-extension-config")
- g.Expect(err).ToNot(HaveOccurred())
-
- cat := runtimecatalog.New()
- g.Expect(fakev1alpha1.AddToCatalog(cat)).To(Succeed())
-
- registry := runtimeregistry.New()
- runtimeClient := internalruntimeclient.New(internalruntimeclient.Options{
- Catalog: cat,
- Registry: registry,
- })
-
- g.Expect(runtimehooksv1.AddToCatalog(cat)).To(Succeed())
-
- r := &Reconciler{
- Client: env.GetAPIReader().(client.Client),
- APIReader: env.GetAPIReader(),
- RuntimeClient: runtimeClient,
- }
-
- caCertSecret := fakeCASecret(ns.Name, "ext1-webhook", testcerts.CACert)
- server, err := fakeSecureExtensionServer(discoveryHandler("first", "second", "third"))
- g.Expect(err).ToNot(HaveOccurred())
- defer server.Close()
- extensionConfig := fakeExtensionConfigForURL(ns.Name, "ext1", server.URL)
- extensionConfig.Annotations[runtimev1.InjectCAFromSecretAnnotation] = caCertSecret.GetNamespace() + "/" + caCertSecret.GetName()
-
- // Create the secret which contains the ca certificate.
- g.Expect(env.CreateAndWait(ctx, caCertSecret)).To(Succeed())
- defer func() {
- g.Expect(env.CleanupAndWait(ctx, caCertSecret)).To(Succeed())
- }()
- // Create the ExtensionConfig.
- g.Expect(env.CreateAndWait(ctx, extensionConfig)).To(Succeed())
- defer func() {
- g.Expect(env.CleanupAndWait(ctx, extensionConfig)).To(Succeed())
- }()
- t.Run("fail reconcile if registry has not been warmed up", func(*testing.T) {
- // Attempt to reconcile. This will be an error as the registry has not been warmed up at this point.
- res, err := r.Reconcile(ctx, ctrl.Request{NamespacedName: util.ObjectKey(extensionConfig)})
- g.Expect(err).ToNot(HaveOccurred())
- // If the registry isn't warm the reconcile loop will return Requeue: True
- g.Expect(res.Requeue).To(BeTrue())
- })
-
- t.Run("successful reconcile and discovery on ExtensionConfig create", func(*testing.T) {
- // Warm up the registry before trying reconciliation again.
- warmup := &warmupRunnable{
- Client: env.GetAPIReader().(client.Client),
- APIReader: env.GetAPIReader(),
- RuntimeClient: runtimeClient,
- }
- g.Expect(warmup.Start(ctx)).To(Succeed())
-
- // Reconcile the extension and assert discovery has succeeded (the first reconcile adds the Paused condition).
- _, err = r.Reconcile(ctx, ctrl.Request{NamespacedName: util.ObjectKey(extensionConfig)})
- g.Expect(err).ToNot(HaveOccurred())
-
- // Wait until the ExtensionConfig in the cache has the Paused condition so the next Reconcile can do discovery.
- g.Eventually(func(g Gomega) {
- conf := &runtimev1.ExtensionConfig{}
- g.Expect(env.Get(ctx, util.ObjectKey(extensionConfig), conf)).To(Succeed())
- pausedCondition := conditions.Get(conf, clusterv1.PausedCondition)
- g.Expect(pausedCondition).ToNot(BeNil())
- g.Expect(pausedCondition.ObservedGeneration).To(Equal(conf.Generation))
- }).WithTimeout(10 * time.Second).WithPolling(100 * time.Millisecond).Should(Succeed())
-
- _, err = r.Reconcile(ctx, ctrl.Request{NamespacedName: util.ObjectKey(extensionConfig)})
- g.Expect(err).ToNot(HaveOccurred())
-
- config := &runtimev1.ExtensionConfig{}
- g.Expect(env.GetAPIReader().Get(ctx, util.ObjectKey(extensionConfig), config)).To(Succeed())
-
- // Expect three handlers for the extension and expect the name to be the handler name plus the extension name.
- handlers := config.Status.Handlers
- g.Expect(handlers).To(HaveLen(3))
- g.Expect(handlers[0].Name).To(Equal("first.ext1"))
- g.Expect(handlers[1].Name).To(Equal("second.ext1"))
- g.Expect(handlers[2].Name).To(Equal("third.ext1"))
-
- conditions := config.GetV1Beta1Conditions()
- g.Expect(conditions).To(HaveLen(1))
- g.Expect(conditions[0].Status).To(Equal(corev1.ConditionTrue))
- g.Expect(conditions[0].Type).To(Equal(runtimev1.RuntimeExtensionDiscoveredV1Beta1Condition))
-
- v1beta2Conditions := config.GetConditions()
- g.Expect(v1beta2Conditions).To(HaveLen(2)) // Second condition is paused.
- g.Expect(v1beta2Conditions[0].Type).To(Equal(runtimev1.ExtensionConfigDiscoveredCondition))
- g.Expect(v1beta2Conditions[0].Status).To(Equal(metav1.ConditionTrue))
- g.Expect(v1beta2Conditions[0].Reason).To(Equal(runtimev1.ExtensionConfigDiscoveredReason))
-
- _, err = registry.Get("first.ext1")
- g.Expect(err).ToNot(HaveOccurred())
- _, err = registry.Get("second.ext1")
- g.Expect(err).ToNot(HaveOccurred())
- _, err = registry.Get("third.ext1")
- g.Expect(err).ToNot(HaveOccurred())
- })
-
- t.Run("Successful reconcile and discovery on Extension update", func(*testing.T) {
- // Start a new ExtensionServer where the second handler is removed.
- updatedServer, err := fakeSecureExtensionServer(discoveryHandler("first", "third"))
- g.Expect(err).ToNot(HaveOccurred())
- defer updatedServer.Close()
- // Close the original server it's no longer serving.
- server.Close()
-
- // Patch the extension with the new server endpoint.
- patch := client.MergeFrom(extensionConfig.DeepCopy())
- extensionConfig.Spec.ClientConfig.URL = updatedServer.URL
-
- g.Expect(env.Patch(ctx, extensionConfig, patch)).To(Succeed())
-
- // Wait until the object is updated in the client cache before continuing.
- g.Eventually(func() error {
- conf := &runtimev1.ExtensionConfig{}
- err := env.Get(ctx, util.ObjectKey(extensionConfig), conf)
- if err != nil {
- return err
- }
- if conf.Spec.ClientConfig.URL != updatedServer.URL {
- return errors.Errorf("URL not set on updated object: got: %s, want: %s", conf.Spec.ClientConfig.URL, updatedServer.URL)
- }
- return nil
- }, 30*time.Second, 100*time.Millisecond).Should(Succeed())
-
- // Reconcile the extension and assert discovery has succeeded.
- _, err = r.Reconcile(ctx, ctrl.Request{NamespacedName: util.ObjectKey(extensionConfig)})
- g.Expect(err).ToNot(HaveOccurred())
-
- var config runtimev1.ExtensionConfig
- g.Expect(env.GetAPIReader().Get(ctx, util.ObjectKey(extensionConfig), &config)).To(Succeed())
-
- // Expect two handlers for the extension and expect the name to be the handler name plus the extension name.
- handlers := config.Status.Handlers
- g.Expect(handlers).To(HaveLen(2))
- g.Expect(handlers[0].Name).To(Equal("first.ext1"))
- g.Expect(handlers[1].Name).To(Equal("third.ext1"))
- conditions := config.GetV1Beta1Conditions()
- g.Expect(conditions).To(HaveLen(1))
- g.Expect(conditions[0].Status).To(Equal(corev1.ConditionTrue))
- g.Expect(conditions[0].Type).To(Equal(runtimev1.RuntimeExtensionDiscoveredV1Beta1Condition))
-
- v1beta2Conditions := config.GetConditions()
- g.Expect(v1beta2Conditions).To(HaveLen(2)) // Second condition is paused.
- g.Expect(v1beta2Conditions[0].Type).To(Equal(runtimev1.ExtensionConfigDiscoveredCondition))
- g.Expect(v1beta2Conditions[0].Status).To(Equal(metav1.ConditionTrue))
- g.Expect(v1beta2Conditions[0].Reason).To(Equal(runtimev1.ExtensionConfigDiscoveredReason))
-
- _, err = registry.Get("first.ext1")
- g.Expect(err).ToNot(HaveOccurred())
- _, err = registry.Get("third.ext1")
- g.Expect(err).ToNot(HaveOccurred())
-
- // Second should not be found in the registry:
- _, err = registry.Get("second.ext1")
- g.Expect(err).To(HaveOccurred())
- })
- t.Run("Successful reconcile and deregister on ExtensionConfig delete", func(*testing.T) {
- g.Expect(env.CleanupAndWait(ctx, extensionConfig)).To(Succeed())
- _, err = r.Reconcile(ctx, ctrl.Request{NamespacedName: util.ObjectKey(extensionConfig)})
- g.Expect(env.Get(ctx, util.ObjectKey(extensionConfig), extensionConfig)).To(Not(Succeed()))
- _, err = registry.Get("first.ext1")
- g.Expect(err).To(HaveOccurred())
- _, err = registry.Get("third.ext1")
- g.Expect(err).To(HaveOccurred())
- })
-}
-
-func TestExtensionReconciler_discoverExtensionConfig(t *testing.T) {
- utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.ClusterTopology, true)
- utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.RuntimeSDK, true)
- g := NewWithT(t)
- ns, err := env.CreateNamespace(ctx, "test-runtime-extension")
- g.Expect(err).ToNot(HaveOccurred())
-
- t.Run("test discovery of a single extension", func(*testing.T) {
- cat := runtimecatalog.New()
- g.Expect(fakev1alpha1.AddToCatalog(cat)).To(Succeed())
-
- registry := runtimeregistry.New()
- g.Expect(runtimehooksv1.AddToCatalog(cat)).To(Succeed())
- extensionName := "ext1"
- srv1, err := fakeSecureExtensionServer(discoveryHandler("first"))
- g.Expect(err).ToNot(HaveOccurred())
- defer srv1.Close()
-
- runtimeClient := internalruntimeclient.New(internalruntimeclient.Options{
- Catalog: cat,
- Registry: registry,
- })
-
- extensionConfig := fakeExtensionConfigForURL(ns.Name, extensionName, srv1.URL)
- extensionConfig.Spec.ClientConfig.CABundle = testcerts.CACert
-
- discoveredExtensionConfig, err := discoverExtensionConfig(ctx, runtimeClient, extensionConfig)
- g.Expect(err).ToNot(HaveOccurred())
-
- // Expect exactly one handler and expect the name to be the handler name plus the extension name.
- handlers := discoveredExtensionConfig.Status.Handlers
- g.Expect(handlers).To(HaveLen(1))
- g.Expect(handlers[0].Name).To(Equal("first.ext1"))
-
- // Expect exactly one condition and expect the condition to have type RuntimeExtensionDiscoveredCondition and
- // Status true.
- conditions := discoveredExtensionConfig.GetV1Beta1Conditions()
- g.Expect(conditions).To(HaveLen(1))
- g.Expect(conditions[0].Status).To(Equal(corev1.ConditionTrue))
- g.Expect(conditions[0].Type).To(Equal(runtimev1.RuntimeExtensionDiscoveredV1Beta1Condition))
-
- v1beta2Conditions := discoveredExtensionConfig.GetConditions()
- g.Expect(v1beta2Conditions).To(HaveLen(1))
- g.Expect(v1beta2Conditions[0].Type).To(Equal(runtimev1.ExtensionConfigDiscoveredCondition))
- g.Expect(v1beta2Conditions[0].Status).To(Equal(metav1.ConditionTrue))
- g.Expect(v1beta2Conditions[0].Reason).To(Equal(runtimev1.ExtensionConfigDiscoveredReason))
- })
- t.Run("fail discovery for non-running extension", func(*testing.T) {
- cat := runtimecatalog.New()
- g.Expect(fakev1alpha1.AddToCatalog(cat)).To(Succeed())
- registry := runtimeregistry.New()
- g.Expect(runtimehooksv1.AddToCatalog(cat)).To(Succeed())
- extensionName := "ext1"
-
- // Don't set up a server to run the extensionDiscovery handler.
- // srv1 := fakeSecureExtensionServer(discoveryHandler("first"))
- // defer srv1.Close()
-
- runtimeClient := internalruntimeclient.New(internalruntimeclient.Options{
- Catalog: cat,
- Registry: registry,
- })
-
- extensionConfig := fakeExtensionConfigForURL(ns.Name, extensionName, "https://localhost:31239")
- extensionConfig.Spec.ClientConfig.CABundle = testcerts.CACert
-
- discoveredExtensionConfig, err := discoverExtensionConfig(ctx, runtimeClient, extensionConfig)
- g.Expect(err).To(HaveOccurred())
-
- // Expect exactly one handler and expect the name to be the handler name plus the extension name.
- handlers := discoveredExtensionConfig.Status.Handlers
- g.Expect(handlers).To(BeEmpty())
-
- // Expect exactly one condition and expect the condition to have type RuntimeExtensionDiscoveredCondition and
- // Status false.
- conditions := discoveredExtensionConfig.GetV1Beta1Conditions()
- g.Expect(conditions).To(HaveLen(1))
- g.Expect(conditions[0].Status).To(Equal(corev1.ConditionFalse))
- g.Expect(conditions[0].Type).To(Equal(runtimev1.RuntimeExtensionDiscoveredV1Beta1Condition))
-
- v1beta2Conditions := discoveredExtensionConfig.GetConditions()
- g.Expect(v1beta2Conditions).To(HaveLen(1))
- g.Expect(v1beta2Conditions[0].Type).To(Equal(runtimev1.ExtensionConfigDiscoveredCondition))
- g.Expect(v1beta2Conditions[0].Status).To(Equal(metav1.ConditionFalse))
- g.Expect(v1beta2Conditions[0].Reason).To(Equal(runtimev1.ExtensionConfigNotDiscoveredReason))
- })
-}
-
-func Test_reconcileCABundle(t *testing.T) {
- g := NewWithT(t)
-
- scheme := runtime.NewScheme()
- g.Expect(corev1.AddToScheme(scheme)).To(Succeed())
-
- tests := []struct {
- name string
- client client.Client
- config *runtimev1.ExtensionConfig
- wantCABundle []byte
- wantErr bool
- }{
- {
- name: "No-op because no annotation is set",
- client: fake.NewClientBuilder().WithScheme(scheme).Build(),
- config: fakeCAInjectionRuntimeExtensionConfig("some-namespace", "some-extension-config", "", ""),
- wantErr: false,
- },
- {
- name: "Inject ca-bundle",
- client: fake.NewClientBuilder().WithScheme(scheme).WithObjects(
- fakeCASecret("some-namespace", "some-ca-secret", []byte("some-ca-data")),
- ).Build(),
- config: fakeCAInjectionRuntimeExtensionConfig("some-namespace", "some-extension-config", "some-namespace/some-ca-secret", ""),
- wantCABundle: []byte(`some-ca-data`),
- wantErr: false,
- },
- {
- name: "Update ca-bundle",
- client: fake.NewClientBuilder().WithScheme(scheme).WithObjects(
- fakeCASecret("some-namespace", "some-ca-secret", []byte("some-new-data")),
- ).Build(),
- config: fakeCAInjectionRuntimeExtensionConfig("some-namespace", "some-extension-config", "some-namespace/some-ca-secret", "some-old-ca-data"),
- wantCABundle: []byte(`some-new-data`),
- wantErr: false,
- },
- {
- name: "Fail because secret does not exist",
- client: fake.NewClientBuilder().WithScheme(scheme).WithObjects().Build(),
- config: fakeCAInjectionRuntimeExtensionConfig("some-namespace", "some-extension-config", "some-namespace/some-ca-secret", ""),
- wantErr: true,
- },
- {
- name: "Fail because secret does not contain a ca.crt",
- client: fake.NewClientBuilder().WithScheme(scheme).WithObjects(
- fakeCASecret("some-namespace", "some-ca-secret", nil),
- ).Build(),
- config: fakeCAInjectionRuntimeExtensionConfig("some-namespace", "some-extension-config", "some-namespace/some-ca-secret", ""),
- wantErr: true,
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- g := NewWithT(t)
-
- err := reconcileCABundle(context.TODO(), tt.client, tt.config)
- g.Expect(err != nil).To(Equal(tt.wantErr))
-
- g.Expect(tt.config.Spec.ClientConfig.CABundle).To(Equal(tt.wantCABundle))
- })
- }
-}
-
-func discoveryHandler(handlerList ...string) func(http.ResponseWriter, *http.Request) {
- handlers := []runtimehooksv1.ExtensionHandler{}
- for _, name := range handlerList {
- handlers = append(handlers, runtimehooksv1.ExtensionHandler{
- Name: name,
- RequestHook: runtimehooksv1.GroupVersionHook{
- Hook: "FakeHook",
- APIVersion: fakev1alpha1.GroupVersion.String(),
- },
- })
- }
- response := &runtimehooksv1.DiscoveryResponse{
- TypeMeta: metav1.TypeMeta{
- Kind: "DiscoveryResponse",
- APIVersion: runtimehooksv1.GroupVersion.String(),
- },
- Handlers: handlers,
- }
- respBody, err := json.Marshal(response)
- if err != nil {
- panic(err)
- }
-
- return func(w http.ResponseWriter, _ *http.Request) {
- w.WriteHeader(http.StatusOK)
- _, _ = w.Write(respBody)
- }
-}
-
-func fakeExtensionConfigForURL(namespace, name, url string) *runtimev1.ExtensionConfig {
- return &runtimev1.ExtensionConfig{
- TypeMeta: metav1.TypeMeta{
- Kind: "ExtensionConfig",
- APIVersion: runtimehooksv1.GroupVersion.String(),
- },
- ObjectMeta: metav1.ObjectMeta{
- Name: name,
- Namespace: namespace,
- Annotations: map[string]string{},
- },
- Spec: runtimev1.ExtensionConfigSpec{
- ClientConfig: runtimev1.ClientConfig{
- URL: url,
- },
- NamespaceSelector: nil,
- },
- }
-}
-
-func fakeSecureExtensionServer(discoveryHandler func(w http.ResponseWriter, r *http.Request)) (*httptest.Server, error) {
- mux := http.NewServeMux()
- mux.HandleFunc("/", discoveryHandler)
-
- sCert, err := tls.X509KeyPair(testcerts.ServerCert, testcerts.ServerKey)
- if err != nil {
- return nil, err
- }
- testServer := httptest.NewUnstartedServer(mux)
- testServer.TLS = &tls.Config{
- MinVersion: tls.VersionTLS13,
- Certificates: []tls.Certificate{sCert},
- }
- testServer.StartTLS()
-
- return testServer, nil
-}
-
-func fakeCASecret(namespace, name string, caData []byte) *corev1.Secret {
- secret := &corev1.Secret{
- ObjectMeta: metav1.ObjectMeta{
- Name: name,
- Namespace: namespace,
- },
- Data: map[string][]byte{},
- }
- if caData != nil {
- secret.Data["ca.crt"] = caData
- }
- return secret
-}
-
-func fakeCAInjectionRuntimeExtensionConfig(namespace, name, annotationString, caBundleData string) *runtimev1.ExtensionConfig {
- ext := &runtimev1.ExtensionConfig{
- ObjectMeta: metav1.ObjectMeta{
- Name: name,
- Namespace: namespace,
- Annotations: map[string]string{},
- },
- }
- if annotationString != "" {
- ext.Annotations[runtimev1.InjectCAFromSecretAnnotation] = annotationString
- }
- if caBundleData != "" {
- ext.Spec.ClientConfig.CABundle = []byte(caBundleData)
- }
- return ext
-}
diff --git a/exp/runtime/internal/controllers/index.go b/exp/runtime/internal/controllers/index.go
deleted file mode 100644
index 34598daeb79a..000000000000
--- a/exp/runtime/internal/controllers/index.go
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-Copyright 2021 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"
-
- "github.com/pkg/errors"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/client"
-
- runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2"
-)
-
-const (
- // injectCAFromSecretAnnotationField is used by the Extension controller for indexing ExtensionConfigs
- // which have the InjectCAFromSecretAnnotation set.
- injectCAFromSecretAnnotationField = "metadata.annotations[" + runtimev1.InjectCAFromSecretAnnotation + "]"
-)
-
-// indexByExtensionInjectCAFromSecretName adds the index by InjectCAFromSecretAnnotation to the
-// managers cache.
-func indexByExtensionInjectCAFromSecretName(ctx context.Context, mgr ctrl.Manager) error {
- if err := mgr.GetCache().IndexField(ctx, &runtimev1.ExtensionConfig{},
- injectCAFromSecretAnnotationField,
- extensionConfigByInjectCAFromSecretName,
- ); err != nil {
- return errors.Wrap(err, "error setting index field for InjectCAFromSecretAnnotation")
- }
- return nil
-}
-
-func extensionConfigByInjectCAFromSecretName(o client.Object) []string {
- extensionConfig, ok := o.(*runtimev1.ExtensionConfig)
- if !ok {
- panic(fmt.Sprintf("Expected ExtensionConfig but got a %T", o))
- }
- if value, ok := extensionConfig.Annotations[runtimev1.InjectCAFromSecretAnnotation]; ok {
- return []string{value}
- }
- return nil
-}
diff --git a/exp/runtime/internal/controllers/suite_test.go b/exp/runtime/internal/controllers/suite_test.go
deleted file mode 100644
index 60cee94f1b5c..000000000000
--- a/exp/runtime/internal/controllers/suite_test.go
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
-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 controllers
-
-import (
- "context"
- "fmt"
- "os"
- "testing"
-
- corev1 "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/apimachinery/pkg/selection"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/cache"
- "sigs.k8s.io/controller-runtime/pkg/client"
-
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
- "sigs.k8s.io/cluster-api/api/core/v1beta2/index"
- "sigs.k8s.io/cluster-api/internal/test/envtest"
-)
-
-var (
- env *envtest.Environment
- ctx = ctrl.SetupSignalHandler()
-)
-
-func TestMain(m *testing.M) {
- setupIndexes := func(ctx context.Context, mgr ctrl.Manager) {
- if err := index.AddDefaultIndexes(ctx, mgr); err != nil {
- panic(fmt.Sprintf("unable to setup index: %v", err))
- }
- }
- req, _ := labels.NewRequirement(clusterv1.ClusterNameLabel, selection.Exists, nil)
- clusterSecretCacheSelector := labels.NewSelector().Add(*req)
-
- os.Exit(envtest.Run(ctx, envtest.RunInput{
- ManagerCacheOptions: cache.Options{
- ByObject: map[client.Object]cache.ByObject{
- // Only cache Secrets with the cluster name label.
- // This is similar to the real world.
- &corev1.Secret{}: {
- Label: clusterSecretCacheSelector,
- },
- },
- },
- ManagerUncachedObjs: []client.Object{
- &corev1.ConfigMap{},
- &corev1.Secret{},
- },
- M: m,
- SetupEnv: func(e *envtest.Environment) { env = e },
- SetupIndexes: setupIndexes,
- }))
-}
diff --git a/exp/runtime/internal/controllers/warmup.go b/exp/runtime/internal/controllers/warmup.go
deleted file mode 100644
index a7d090e13511..000000000000
--- a/exp/runtime/internal/controllers/warmup.go
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
-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 controllers
-
-import (
- "context"
- "time"
-
- "github.com/pkg/errors"
- kerrors "k8s.io/apimachinery/pkg/util/errors"
- "k8s.io/apimachinery/pkg/util/wait"
- "k8s.io/klog/v2"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/client"
- "sigs.k8s.io/controller-runtime/pkg/manager"
-
- runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2"
- runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client"
-)
-
-const (
- defaultWarmupTimeout = 60 * time.Second
- defaultWarmupInterval = 2 * time.Second
-)
-
-var _ manager.LeaderElectionRunnable = &warmupRunnable{}
-
-// warmupRunnable is a controller runtime LeaderElectionRunnable. It warms up the registry on controller start.
-type warmupRunnable struct {
- Client client.Client
- APIReader client.Reader
- RuntimeClient runtimeclient.Client
- warmupTimeout time.Duration
- warmupInterval time.Duration
-}
-
-// NeedLeaderElection satisfies the controller runtime LeaderElectionRunnable interface.
-// This ensures we warm up the RuntimeSDK registry only after the controller became leader.
-// Note: Only after the warmupRunnable is completed the registry becomes ready and thus
-// all controllers using the runtime client or registry will wait until warmup is completed.
-func (r *warmupRunnable) NeedLeaderElection() bool {
- return true
-}
-
-// Start attempts to warm up the registry. It will retry for 60 seconds before returning an error. An error on Start will
-// cause the CAPI controller manager to fail.
-// We are retrying for 60 seconds to mitigate failures when the CAPI controller manager and RuntimeExtensions
-// are started at the same time. After 60 seconds we crash the entire controller to surface the
-// issue to users in a timely fashion as it would block reconciliation of all Clusters.
-func (r *warmupRunnable) Start(ctx context.Context) error {
- log := ctrl.LoggerFrom(ctx)
- if r.warmupInterval == 0 {
- r.warmupInterval = defaultWarmupInterval
- }
- if r.warmupTimeout == 0 {
- r.warmupTimeout = defaultWarmupTimeout
- }
- ctx, cancel := context.WithTimeoutCause(ctx, r.warmupTimeout, errors.New("warmup timeout expired"))
- defer cancel()
-
- err := wait.PollUntilContextTimeout(ctx, r.warmupInterval, r.warmupTimeout, true, func(ctx context.Context) (done bool, err error) {
- if err = warmupRegistry(ctx, r.Client, r.APIReader, r.RuntimeClient); err != nil {
- log.Error(err, "ExtensionConfig registry warmup failed")
- return false, nil
- }
- return true, nil
- })
-
- if err != nil {
- return errors.Wrapf(err, "ExtensionConfig registry warmup timed out after %s", r.warmupTimeout.String())
- }
-
- return nil
-}
-
-// warmupRegistry attempts to discover all existing ExtensionConfigs and patch their status with discovered Handlers.
-// It warms up the registry by passing it the up-to-date list of ExtensionConfigs.
-func warmupRegistry(ctx context.Context, client client.Client, reader client.Reader, runtimeClient runtimeclient.Client) error {
- log := ctrl.LoggerFrom(ctx)
-
- var errs []error
-
- extensionConfigList := runtimev1.ExtensionConfigList{}
- if err := reader.List(ctx, &extensionConfigList); err != nil {
- return errors.Wrapf(err, "failed to list ExtensionConfigs")
- }
-
- for i := range extensionConfigList.Items {
- extensionConfig := &extensionConfigList.Items[i]
- original := extensionConfig.DeepCopy()
-
- log := log.WithValues("ExtensionConfig", klog.KObj(extensionConfig))
- ctx := ctrl.LoggerInto(ctx, log)
-
- // Inject CABundle from secret if annotation is set. Otherwise https calls may fail.
- if err := reconcileCABundle(ctx, client, extensionConfig); err != nil {
- errs = append(errs, err)
- // Note: we continue here because if reconcileCABundle doesn't work discovery will fail as well.
- continue
- }
-
- extensionConfig, err := discoverExtensionConfig(ctx, runtimeClient, extensionConfig)
- if err != nil {
- errs = append(errs, err)
- }
-
- // Always patch the ExtensionConfig as it may contain updates in conditions or clientConfig.caBundle.
- if err = patchExtensionConfig(ctx, client, original, extensionConfig); err != nil {
- errs = append(errs, err)
- }
- extensionConfigList.Items[i] = *extensionConfig
- }
-
- // If there was some error in discovery or patching return before committing to the Registry.
- if len(errs) != 0 {
- return kerrors.NewAggregate(errs)
- }
-
- if err := runtimeClient.WarmUp(&extensionConfigList); err != nil {
- return err
- }
-
- log.Info("The extension registry is warmed up")
-
- return nil
-}
diff --git a/exp/runtime/internal/controllers/warmup_test.go b/exp/runtime/internal/controllers/warmup_test.go
deleted file mode 100644
index 94a76d0f1e98..000000000000
--- a/exp/runtime/internal/controllers/warmup_test.go
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
-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 controllers
-
-import (
- "fmt"
- "testing"
- "time"
-
- . "github.com/onsi/gomega"
- "github.com/pkg/errors"
- corev1 "k8s.io/api/core/v1"
- "k8s.io/apiserver/pkg/admission/plugin/webhook/testcerts"
- utilfeature "k8s.io/component-base/featuregate/testing"
-
- runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1"
- runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2"
- runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog"
- "sigs.k8s.io/cluster-api/feature"
- internalruntimeclient "sigs.k8s.io/cluster-api/internal/runtime/client"
- runtimeregistry "sigs.k8s.io/cluster-api/internal/runtime/registry"
- fakev1alpha1 "sigs.k8s.io/cluster-api/internal/runtime/test/v1alpha1"
-)
-
-func Test_warmupRunnable_Start(t *testing.T) {
- g := NewWithT(t)
- utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.ClusterTopology, true)
- utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.RuntimeSDK, true)
-
- t.Run("succeed to warm up registry on Start", func(t *testing.T) {
- ns, err := env.CreateNamespace(ctx, "test-runtime-extension")
- g.Expect(err).ToNot(HaveOccurred())
-
- caCertSecret := fakeCASecret(ns.Name, "ext1-webhook", testcerts.CACert)
- // Create the secret which contains the fake ca certificate.
- g.Expect(env.CreateAndWait(ctx, caCertSecret)).To(Succeed())
- defer func() {
- g.Expect(env.CleanupAndWait(ctx, caCertSecret)).To(Succeed())
- }()
-
- cat := runtimecatalog.New()
- g.Expect(fakev1alpha1.AddToCatalog(cat)).To(Succeed())
-
- registry := runtimeregistry.New()
- g.Expect(runtimehooksv1.AddToCatalog(cat)).To(Succeed())
-
- for _, name := range []string{"ext1", "ext2", "ext3"} {
- server, err := fakeSecureExtensionServer(discoveryHandler("first", "second", "third"))
- g.Expect(err).ToNot(HaveOccurred())
- defer server.Close()
- extensionConfig := fakeExtensionConfigForURL(ns.Name, name, server.URL)
- extensionConfig.Annotations[runtimev1.InjectCAFromSecretAnnotation] = caCertSecret.GetNamespace() + "/" + caCertSecret.GetName()
-
- // Create the ExtensionConfig.
- g.Expect(env.CreateAndWait(ctx, extensionConfig)).To(Succeed())
- defer func(namespace, name, url string) {
- g.Expect(env.CleanupAndWait(ctx, fakeExtensionConfigForURL(namespace, name, url))).To(Succeed())
- }(ns.Name, name, server.URL)
- }
-
- r := &warmupRunnable{
- Client: env.GetClient(),
- APIReader: env.GetAPIReader(),
- RuntimeClient: internalruntimeclient.New(internalruntimeclient.Options{
- Catalog: cat,
- Registry: registry,
- }),
- }
-
- if err := r.Start(ctx); err != nil {
- t.Error(err)
- }
- list := &runtimev1.ExtensionConfigList{}
- g.Expect(env.GetAPIReader().List(ctx, list)).To(Succeed())
- g.Expect(list.Items).To(HaveLen(3))
- for i, config := range list.Items {
- // Expect three handlers for each extension and expect the name to be the handler name plus the extension name.
- handlers := config.Status.Handlers
- g.Expect(handlers).To(HaveLen(3))
- g.Expect(handlers[0].Name).To(Equal(fmt.Sprintf("first.ext%d", i+1)))
- g.Expect(handlers[1].Name).To(Equal(fmt.Sprintf("second.ext%d", i+1)))
- g.Expect(handlers[2].Name).To(Equal(fmt.Sprintf("third.ext%d", i+1)))
-
- conditions := config.GetV1Beta1Conditions()
- g.Expect(conditions).To(HaveLen(1))
- g.Expect(conditions[0].Status).To(Equal(corev1.ConditionTrue))
- g.Expect(conditions[0].Type).To(Equal(runtimev1.RuntimeExtensionDiscoveredV1Beta1Condition))
- }
- })
-
- t.Run("fail to warm up registry on Start with broken extension", func(t *testing.T) {
- // This test should time out and throw a failure.
- ns, err := env.CreateNamespace(ctx, "test-runtime-extension")
- g.Expect(err).ToNot(HaveOccurred())
-
- caCertSecret := fakeCASecret(ns.Name, "ext1-webhook", testcerts.CACert)
- // Create the secret which contains the ca certificate.
- g.Expect(env.CreateAndWait(ctx, caCertSecret)).To(Succeed())
- defer func() {
- g.Expect(env.CleanupAndWait(ctx, caCertSecret)).To(Succeed())
- }()
-
- cat := runtimecatalog.New()
- g.Expect(fakev1alpha1.AddToCatalog(cat)).To(Succeed())
- registry := runtimeregistry.New()
- g.Expect(runtimehooksv1.AddToCatalog(cat)).To(Succeed())
-
- // Do not create an extension server for an extension with this name, but do create an extensionconfig.
- brokenExtension := "ext2"
- for _, name := range []string{"ext1", "ext2", "ext3"} {
- if name == brokenExtension {
- g.Expect(env.CreateAndWait(ctx, fakeExtensionConfigForURL(ns.Name, name, "https://localhost:1234"))).To(Succeed())
- continue
- }
- server, err := fakeSecureExtensionServer(discoveryHandler("first", "second", "third"))
- g.Expect(err).ToNot(HaveOccurred())
- defer server.Close()
-
- extensionConfig := fakeExtensionConfigForURL(ns.Name, name, server.URL)
- extensionConfig.Annotations[runtimev1.InjectCAFromSecretAnnotation] = caCertSecret.GetNamespace() + "/" + caCertSecret.GetName()
-
- // Create the ExtensionConfig.
- g.Expect(env.CreateAndWait(ctx, extensionConfig)).To(Succeed())
- }
-
- r := &warmupRunnable{
- Client: env.GetClient(),
- APIReader: env.GetAPIReader(),
- RuntimeClient: internalruntimeclient.New(internalruntimeclient.Options{
- Catalog: cat,
- Registry: registry,
- }),
- warmupInterval: 500 * time.Millisecond,
- warmupTimeout: 5 * time.Second,
- }
-
- if err := r.Start(ctx); err == nil {
- t.Error(errors.New("expected error on start up"))
- }
- list := &runtimev1.ExtensionConfigList{}
- g.Expect(env.GetAPIReader().List(ctx, list)).To(Succeed())
- g.Expect(list.Items).To(HaveLen(3))
-
- for i, config := range list.Items {
- handlers := config.Status.Handlers
- conditions := config.GetV1Beta1Conditions()
-
- // Expect no handlers and a failed condition for the broken extension.
- if config.Name == brokenExtension {
- g.Expect(conditions).To(HaveLen(1))
- g.Expect(conditions[0].Status).To(Equal(corev1.ConditionFalse))
- g.Expect(conditions[0].Type).To(Equal(runtimev1.RuntimeExtensionDiscoveredV1Beta1Condition))
- g.Expect(handlers).To(BeEmpty())
-
- continue
- }
-
- // For other extensions expect handler name plus the extension name, and expect the condition to be True.
- g.Expect(handlers).To(HaveLen(3))
- g.Expect(handlers[0].Name).To(Equal(fmt.Sprintf("first.ext%d", i+1)))
- g.Expect(handlers[1].Name).To(Equal(fmt.Sprintf("second.ext%d", i+1)))
- g.Expect(handlers[2].Name).To(Equal(fmt.Sprintf("third.ext%d", i+1)))
-
- g.Expect(conditions).To(HaveLen(1))
- g.Expect(conditions[0].Status).To(Equal(corev1.ConditionTrue))
- g.Expect(conditions[0].Type).To(Equal(runtimev1.RuntimeExtensionDiscoveredV1Beta1Condition))
- }
- })
-}
diff --git a/exp/runtime/topologymutation/walker_test.go b/exp/runtime/topologymutation/walker_test.go
index fad450a60ef7..412f437329ff 100644
--- a/exp/runtime/topologymutation/walker_test.go
+++ b/exp/runtime/topologymutation/walker_test.go
@@ -60,6 +60,7 @@ func Test_WalkTemplates(t *testing.T) {
}
return nil
}
+ // TypeMeta is required here because we convert these objects directly to JSON.
kubeadmControlPlaneTemplate := controlplanev1.KubeadmControlPlaneTemplate{
TypeMeta: metav1.TypeMeta{
Kind: "KubeadmControlPlaneTemplate",
diff --git a/exp/topology/desiredstate/desired_state.go b/exp/topology/desiredstate/desired_state.go
index c0f35f29b0dc..def45075e96e 100644
--- a/exp/topology/desiredstate/desired_state.go
+++ b/exp/topology/desiredstate/desired_state.go
@@ -22,8 +22,6 @@ import (
"fmt"
"maps"
"reflect"
- "slices"
- "strings"
"time"
"github.com/pkg/errors"
@@ -54,6 +52,8 @@ import (
"sigs.k8s.io/cluster-api/internal/topology/selectors"
"sigs.k8s.io/cluster-api/internal/webhooks"
"sigs.k8s.io/cluster-api/util"
+ "sigs.k8s.io/cluster-api/util/annotations"
+ "sigs.k8s.io/cluster-api/util/cache"
"sigs.k8s.io/cluster-api/util/conversion"
)
@@ -63,13 +63,23 @@ type Generator interface {
}
// NewGenerator creates a new generator to generate desired state.
-func NewGenerator(client client.Client, clusterCache clustercache.ClusterCache, runtimeClient runtimeclient.Client) Generator {
- return &generator{
- Client: client,
- ClusterCache: clusterCache,
- RuntimeClient: runtimeClient,
- patchEngine: patches.NewEngine(client, runtimeClient),
+func NewGenerator(client client.Client, clusterCache clustercache.ClusterCache, runtimeClient runtimeclient.Client, hookCache cache.Cache[cache.HookEntry], getUpgradePlanCache cache.Cache[GenerateUpgradePlanCacheEntry]) (Generator, error) {
+ if client == nil || clusterCache == nil {
+ return nil, errors.New("Client and ClusterCache must not be nil")
+ }
+
+ if feature.Gates.Enabled(feature.RuntimeSDK) && runtimeClient == nil {
+ return nil, errors.New("RuntimeClient must not be nil")
}
+
+ return &generator{
+ Client: client,
+ ClusterCache: clusterCache,
+ RuntimeClient: runtimeClient,
+ hookCache: hookCache,
+ getUpgradePlanCache: getUpgradePlanCache,
+ patchEngine: patches.NewEngine(client, runtimeClient),
+ }, nil
}
// generator is a generator to generate desired state.
@@ -81,6 +91,9 @@ type generator struct {
RuntimeClient runtimeclient.Client
+ hookCache cache.Cache[cache.HookEntry]
+ getUpgradePlanCache cache.Cache[GenerateUpgradePlanCacheEntry]
+
// patchEngine is used to apply patches during computeDesiredState.
patchEngine patches.Engine
}
@@ -107,6 +120,21 @@ func (g *generator) Generate(ctx context.Context, s *scope.Scope) (*scope.Cluste
}
}
+ // Compute the upgradePlan.
+ // By default CAPI allows to upgrade only by one minor, but if the cluster class defines an upgrade plan extension,
+ // the upgrade plan will be computed by calling the extension. Otherwise, if the cluster class defines a list of
+ // Kubernetes versions, the upgrade plan will be inferred from those versions.
+ // Runtime extension takes precedence if defined.
+ getUpgradePlan := GetUpgradePlanOneMinor
+ if s.Blueprint.ClusterClass.Spec.Upgrade.External.GenerateUpgradePlanExtension != "" {
+ getUpgradePlan = GetUpgradePlanFromExtension(g.RuntimeClient, g.getUpgradePlanCache, s.Current.Cluster, s.Blueprint.ClusterClass.Spec.Upgrade.External.GenerateUpgradePlanExtension)
+ } else if len(s.Blueprint.ClusterClass.Spec.KubernetesVersions) > 0 {
+ getUpgradePlan = GetUpgradePlanFromClusterClassVersions(s.Blueprint.ClusterClass.Spec.KubernetesVersions)
+ }
+ if err := ComputeUpgradePlan(ctx, s, getUpgradePlan); err != nil {
+ return nil, err
+ }
+
// Mark all the MachineDeployments that are currently upgrading.
// This captured information is used for:
// - Building the TopologyReconciled condition.
@@ -170,7 +198,10 @@ func (g *generator) Generate(ctx context.Context, s *scope.Scope) (*scope.Cluste
// Compute the desired state for the Cluster object adding a reference to the
// InfrastructureCluster and the ControlPlane objects generated by the previous step.
- desiredState.Cluster = computeCluster(ctx, s, desiredState.InfrastructureCluster, desiredState.ControlPlane.Object)
+ desiredState.Cluster, err = computeCluster(ctx, s, desiredState.InfrastructureCluster, desiredState.ControlPlane.Object)
+ if err != nil {
+ return nil, errors.Wrapf(err, "failed to compute Cluster")
+ }
// If required, compute the desired state of the MachineDeployments from the list of MachineDeploymentTopologies
// defined in the cluster.
@@ -471,7 +502,7 @@ func (g *generator) computeControlPlane(ctx context.Context, s *scope.Scope, inf
// Sets the desired Kubernetes version for the control plane.
version, err := g.computeControlPlaneVersion(ctx, s)
if err != nil {
- return nil, errors.Wrap(err, "failed to compute version of control plane")
+ return nil, errors.Wrap(err, "failed to compute version of ControlPlane")
}
if err := contract.ControlPlane().Version().Set(controlPlane, version); err != nil {
return nil, errors.Wrapf(err, "failed to set %s in the ControlPlane object", contract.ControlPlane().Version().Path())
@@ -485,10 +516,11 @@ func (g *generator) computeControlPlane(ctx context.Context, s *scope.Scope, inf
// and the version defined in the topology.
func (g *generator) computeControlPlaneVersion(ctx context.Context, s *scope.Scope) (string, error) {
log := ctrl.LoggerFrom(ctx)
- desiredVersion := s.Blueprint.Topology.Version
+
+ topologyVersion := s.Blueprint.Topology.Version
// If we are creating the control plane object (current control plane is nil), use version from topology.
if s.Current.ControlPlane == nil || s.Current.ControlPlane.Object == nil {
- return desiredVersion, nil
+ return topologyVersion, nil
}
// Get the current currentVersion of the control plane.
@@ -497,11 +529,12 @@ func (g *generator) computeControlPlaneVersion(ctx context.Context, s *scope.Sco
return "", errors.Wrap(err, "failed to get the version from control plane spec")
}
+ // Track if the control plane needs an update.
+ // NOTE: in case the control plane don't need an update do not return immediately for:
+ // - computing a few more info for the update tracker, used to show the appropriate message for the TopologyReconciled condition.
+ // - call the AfterControlPlaneUpgrade hook (if not already called).
s.UpgradeTracker.ControlPlane.IsPendingUpgrade = true
- if *currentVersion == desiredVersion {
- // Mark that the control plane spec is already at the desired version.
- // This information is used to show the appropriate message for the TopologyReconciled
- // condition.
+ if *currentVersion == topologyVersion {
s.UpgradeTracker.ControlPlane.IsPendingUpgrade = false
}
@@ -510,8 +543,8 @@ func (g *generator) computeControlPlaneVersion(ctx context.Context, s *scope.Sco
if err != nil {
return "", errors.Wrap(err, "failed to check if the control plane is being provisioned")
}
- // If the control plane is being provisioned (being craeted for the first time), then do not
- // pick up the desiredVersion yet.
+ // If the control plane is being provisioned (being created for the first time), then do not
+ // pick up the topologyVersion yet.
// Return the current version of the control plane. We will pick up the new version after the
// control plane is provisioned.
if cpProvisioning {
@@ -525,7 +558,7 @@ func (g *generator) computeControlPlaneVersion(ctx context.Context, s *scope.Sco
return "", errors.Wrap(err, "failed to check if control plane is upgrading")
}
// If the current control plane is upgrading (still completing a previous upgrade),
- // then do not pick up the desiredVersion yet.
+ // then do not pick up the topologyVersion yet.
// Return the current version of the control plane. We will pick up the new version
// after the control plane is stable.
if cpUpgrading {
@@ -533,136 +566,154 @@ func (g *generator) computeControlPlaneVersion(ctx context.Context, s *scope.Sco
return *currentVersion, nil
}
- // Return here if the control plane is already at the desired version
- if !s.UpgradeTracker.ControlPlane.IsPendingUpgrade {
- // At this stage the control plane is not upgrading and is already at the desired version.
- // We can return.
- // Nb. We do not return early in the function if the control plane is already at the desired version so as
- // to know if the control plane is being upgraded. This information
- // is required when updating the TopologyReconciled condition on the cluster.
-
- // Call the AfterControlPlaneUpgrade now that the control plane is upgraded.
- if feature.Gates.Enabled(feature.RuntimeSDK) {
- // Call the hook only if we are tracking the intent to do so. If it is not tracked it means we don't need to call the
- // hook because we didn't go through an upgrade or we already called the hook after the upgrade.
- if hooks.IsPending(runtimehooksv1.AfterControlPlaneUpgrade, s.Current.Cluster) {
- v1beta1Cluster := &clusterv1beta1.Cluster{}
- // DeepCopy cluster because ConvertFrom has side effects like adding the conversion annotation.
- if err := v1beta1Cluster.ConvertFrom(s.Current.Cluster.DeepCopy()); err != nil {
- return "", errors.Wrap(err, "error converting Cluster to v1beta1 Cluster")
- }
+ // if the control plane is not upgrading, before making further considerations about if to pick up another version,
+ // we should call the AfterControlPlaneUpgrade and the BeforeWorkersUpgrade hooks if not already done.
+ if feature.Gates.Enabled(feature.RuntimeSDK) {
+ // Note: calling the AfterControlPlaneUpgrade is the final step of a control plane upgrade.
+ hookCompleted, err := g.callAfterControlPlaneUpgradeHook(ctx, s, currentVersion)
+ if err != nil {
+ return "", err
+ }
+ if !hookCompleted {
+ return *currentVersion, nil
+ }
- // Call all the registered extension for the hook.
- hookRequest := &runtimehooksv1.AfterControlPlaneUpgradeRequest{
- Cluster: *cleanupCluster(v1beta1Cluster),
- KubernetesVersion: desiredVersion,
- }
- hookResponse := &runtimehooksv1.AfterControlPlaneUpgradeResponse{}
- if err := g.RuntimeClient.CallAllExtensions(ctx, runtimehooksv1.AfterControlPlaneUpgrade, s.Current.Cluster, hookRequest, hookResponse); err != nil {
- return "", err
- }
- // Add the response to the tracker so we can later update condition or requeue when required.
- s.HookResponseTracker.Add(runtimehooksv1.AfterControlPlaneUpgrade, hookResponse)
-
- // If the extension responds to hold off on starting Machine deployments upgrades,
- // change the UpgradeTracker accordingly, otherwise the hook call is completed and we
- // can remove this hook from the list of pending-hooks.
- if hookResponse.RetryAfterSeconds != 0 {
- log.Info(fmt.Sprintf("MachineDeployments/MachinePools upgrade to version %q are blocked by %q hook", desiredVersion, runtimecatalog.HookName(runtimehooksv1.AfterControlPlaneUpgrade)))
- } else {
- if err := hooks.MarkAsDone(ctx, g.Client, s.Current.Cluster, runtimehooksv1.AfterControlPlaneUpgrade); err != nil {
- return "", err
- }
- }
- }
+ // Note: calling the BeforeWorkersUpgrade is the first part of the execution of a worker upgrade step from the upgrade plan.
+ // The call to this hook is implemented in this function in order to ensure the hook is called
+ // after AfterControlPlaneUpgrade unblocks, and also to ensure that BeforeWorkersUpgrade
+ // can block the control plane upgrade to proceed in the upgrade plan.
+ // Note: this operation is a no-op if workers are not required to upgrade to the current control plane version.
+ hookCompleted, err = g.callBeforeWorkersUpgradeHook(ctx, s, &s.UpgradeTracker.MinWorkersVersion, *currentVersion)
+ if err != nil {
+ return "", err
+ }
+ if !hookCompleted {
+ return *currentVersion, nil
}
+ }
+ // Before considering picking up the next control plane version, check if workers are required
+ // to upgrade first, e.g. to avoid breaking rules defining the max version skew between control plane
+ // and workers.
+ // If the MachineDeployments/MachinePools are required to upgrade, then do not pick up the next control plane version yet.
+ // We will pick up the new version after the MachineDeployments/MachinePools finish upgrading.
+ if len(s.UpgradeTracker.MachineDeployments.UpgradePlan) > 0 && s.UpgradeTracker.MachineDeployments.UpgradePlan[0] == *currentVersion {
+ s.UpgradeTracker.ControlPlane.IsWaitingForWorkersUpgrade = true
+ return *currentVersion, nil
+ }
+ if len(s.UpgradeTracker.MachinePools.UpgradePlan) > 0 && s.UpgradeTracker.MachinePools.UpgradePlan[0] == *currentVersion {
+ s.UpgradeTracker.ControlPlane.IsWaitingForWorkersUpgrade = true
return *currentVersion, nil
}
- // If the control plane is not upgrading or scaling, we can assume the control plane is stable.
- // However, we should also check for the MachineDeployments/MachinePools upgrading.
- // If the MachineDeployments/MachinePools are upgrading, then do not pick up the desiredVersion yet.
+ // Also check if MachineDeployments/MachinePools are already upgrading.
+ // If the MachineDeployments/MachinePools are upgrading, then do not pick up the next control plane version yet.
// We will pick up the new version after the MachineDeployments/MachinePools finish upgrading.
- if len(s.UpgradeTracker.MachineDeployments.UpgradingNames()) > 0 ||
- len(s.UpgradeTracker.MachinePools.UpgradingNames()) > 0 {
+ if s.UpgradeTracker.MachineDeployments.IsAnyUpgrading() || s.UpgradeTracker.MachinePools.IsAnyUpgrading() {
return *currentVersion, nil
}
+ // At this point we can assume the control plane is stable and also MachineDeployments/MachinePools
+ // are not upgrading/are not required to upgrade.
+
+ // If not already done, call the AfterWorkersUpgrade hook before picking up the desired version.
+ // (this is the last step of the previous upgrade).
if feature.Gates.Enabled(feature.RuntimeSDK) {
- var hookAnnotations []string
- for key := range s.Current.Cluster.Annotations {
- if strings.HasPrefix(key, clusterv1.BeforeClusterUpgradeHookAnnotationPrefix) {
- hookAnnotations = append(hookAnnotations, key)
- }
+ // Note: calling the AfterWorkersUpgrade is the last step of workers upgrade.
+ // The call to this hook is implemented in this function in order to ensure that AfterWorkersUpgrade
+ // can block the control plane upgrade to proceed in the upgrade plan.
+ // Note: this operation is a no-op if workers are not required to upgrade to the current control plane version.
+ hookCompleted, err := g.callAfterWorkersUpgradeHook(ctx, s, currentVersion)
+ if err != nil {
+ return "", err
}
- if len(hookAnnotations) > 0 {
- slices.Sort(hookAnnotations)
- message := fmt.Sprintf("annotations [%s] are set", strings.Join(hookAnnotations, ", "))
- if len(hookAnnotations) == 1 {
- message = fmt.Sprintf("annotation [%s] is set", strings.Join(hookAnnotations, ", "))
- }
- // Add the hook with a response to the tracker so we can later update the condition.
- s.HookResponseTracker.Add(runtimehooksv1.BeforeClusterUpgrade, &runtimehooksv1.BeforeClusterUpgradeResponse{
- CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
- // RetryAfterSeconds needs to be set because having only hooks without RetryAfterSeconds
- // would lead to not updating the condition. We can rely on getting an event when the
- // annotation gets removed so we set twice of the default sync-period to not cause additional reconciles.
- RetryAfterSeconds: 20 * 60,
- CommonResponse: runtimehooksv1.CommonResponse{
- Message: message,
- },
- },
- })
-
- log.Info(fmt.Sprintf("Cluster upgrade to version %q is blocked by %q hook (via annotations)", desiredVersion, runtimecatalog.HookName(runtimehooksv1.BeforeClusterUpgrade)), "hooks", strings.Join(hookAnnotations, ","))
+ if !hookCompleted {
return *currentVersion, nil
}
+ }
+
+ // At this stage, we can assume the previous control plane upgrade is fully complete (including calling the AfterControlPlaneUpgrade).
+ // It is now possible to start making considerations if to pick up another version.
- // At this point the control plane and the machine deployments are stable and we are almost ready to pick
- // up the desiredVersion. Call the BeforeClusterUpgrade hook before picking up the desired version.
- v1beta1Cluster := &clusterv1beta1.Cluster{}
- // DeepCopy cluster because ConvertFrom has side effects like adding the conversion annotation.
- if err := v1beta1Cluster.ConvertFrom(s.Current.Cluster.DeepCopy()); err != nil {
- return "", errors.Wrap(err, "error converting Cluster to v1beta1 Cluster")
+ // If the control plane is not pending upgrade, then it is already at the desired version and there is no other version to pick up.
+ if !s.UpgradeTracker.ControlPlane.IsPendingUpgrade {
+ return *currentVersion, nil
+ }
+
+ // If not already done, call the BeforeClusterUpgrade hook before picking up the desired version.
+ if feature.Gates.Enabled(feature.RuntimeSDK) {
+ // Note: calling the BeforeClusterUpgrade is the first step of an upgrade plan;
+ // this operation is a no-op for intermediate steps of an upgrade plan.
+ hookCompleted, err := g.callBeforeClusterUpgradeHook(ctx, s, currentVersion, topologyVersion)
+ if err != nil {
+ return "", err
+ }
+ if !hookCompleted {
+ return *currentVersion, nil
}
- hookRequest := &runtimehooksv1.BeforeClusterUpgradeRequest{
- Cluster: *cleanupCluster(v1beta1Cluster),
- FromKubernetesVersion: *currentVersion,
- ToKubernetesVersion: desiredVersion,
+ // After BeforeClusterUpgrade unblocked the upgrade, consider the upgrade started.
+ // As a consequence, the system start tracking the intent of calling AfterClusterUpgrade once the upgrade is complete.
+ // Note: this also prevent the BeforeClusterUpgrade to be called again (until after the upgrade is completed).
+ if err := hooks.MarkAsPending(ctx, g.Client, s.Current.Cluster, false, runtimehooksv1.AfterClusterUpgrade); err != nil {
+ return "", err
}
- hookResponse := &runtimehooksv1.BeforeClusterUpgradeResponse{}
- if err := g.RuntimeClient.CallAllExtensions(ctx, runtimehooksv1.BeforeClusterUpgrade, s.Current.Cluster, hookRequest, hookResponse); err != nil {
+ }
+
+ // Control plane and machine deployments are stable. The BeforeClusterUpgrade hook have been called.
+ // Ready to pick up the next version in the upgrade plan.
+
+ // Select the next version for the control plane
+ if len(s.UpgradeTracker.ControlPlane.UpgradePlan) == 0 {
+ return "", errors.New("cannot compute the control plane version if the control plane is pending upgrade and the upgrade plan is not set")
+ }
+ nextVersion := s.UpgradeTracker.ControlPlane.UpgradePlan[0]
+
+ if feature.Gates.Enabled(feature.RuntimeSDK) {
+ // Note: calling the BeforeControlPlaneUpgrade is the first step of a control plan upgrade step from the upgrade plan.
+ hookCompleted, err := g.callBeforeControlPlaneUpgradeHook(ctx, s, currentVersion, nextVersion)
+ if err != nil {
return "", err
}
- // Add the response to the tracker so we can later update condition or requeue when required.
- s.HookResponseTracker.Add(runtimehooksv1.BeforeClusterUpgrade, hookResponse)
- if hookResponse.RetryAfterSeconds != 0 {
- // Cannot pickup the new version right now. Need to try again later.
- log.Info(fmt.Sprintf("Cluster upgrade to version %q is blocked by %q hook", desiredVersion, runtimecatalog.HookName(runtimehooksv1.BeforeClusterUpgrade)))
+ if !hookCompleted {
return *currentVersion, nil
}
- // We are picking up the new version here.
- // Track the intent of calling the AfterControlPlaneUpgrade and the AfterClusterUpgrade hooks once we are done with the upgrade.
- if err := hooks.MarkAsPending(ctx, g.Client, s.Current.Cluster, runtimehooksv1.AfterControlPlaneUpgrade, runtimehooksv1.AfterClusterUpgrade); err != nil {
+ // After BeforeControlPlaneUpgrade unblocked the upgrade step, consider the upgrade step start started,
+ // As a consequence, the system start tracking the intent of calling other hooks for this upgrade step:
+ // - AfterControlPlaneUpgrade hook to be called after the control plane completes the upgrade step.
+ // - If workers are required to upgrade to the current control plane version:
+ // - BeforeWorkersUpgrade hook to be called before workers start the upgrade step.
+ // - AfterWorkersUpgrade hook to be called after workers completes the upgrade step.
+ hooksToBeCalled := []runtimecatalog.Hook{runtimehooksv1.AfterControlPlaneUpgrade}
+ machineDeploymentPendingUpgrade := len(s.UpgradeTracker.MachineDeployments.UpgradePlan) > 0 && s.UpgradeTracker.MachineDeployments.UpgradePlan[0] == nextVersion
+ machinePoolPendingUpgrade := len(s.UpgradeTracker.MachinePools.UpgradePlan) > 0 && s.UpgradeTracker.MachinePools.UpgradePlan[0] == nextVersion
+ if machineDeploymentPendingUpgrade || machinePoolPendingUpgrade {
+ hooksToBeCalled = append(hooksToBeCalled, runtimehooksv1.BeforeWorkersUpgrade, runtimehooksv1.AfterWorkersUpgrade)
+ }
+ if err := hooks.MarkAsPending(ctx, g.Client, s.Current.Cluster, false, hooksToBeCalled...); err != nil {
return "", err
}
}
- // Control plane and machine deployments are stable. All the required hook are called.
- // Ready to pick up the topology version.
- s.UpgradeTracker.ControlPlane.IsPendingUpgrade = false
+ // The upgrade is now starting in this reconcile and not pending anymore.
+ // Note: it is important to unset IsPendingUpgrade, otherwise reconcileState will assume that we are still waiting for another upgrade (and thus defer the one we are starting).
s.UpgradeTracker.ControlPlane.IsStartingUpgrade = true
- return desiredVersion, nil
+ s.UpgradeTracker.ControlPlane.IsPendingUpgrade = false
+
+ log.Info(fmt.Sprintf("Control plane %s upgraded from version %s to version %s", klog.KObj(s.Current.ControlPlane.Object), *currentVersion, nextVersion),
+ "ControlPlaneUpgrades", toUpgradeStep(s.UpgradeTracker.ControlPlane.UpgradePlan),
+ "WorkersUpgrades", toUpgradeStep(s.UpgradeTracker.MachineDeployments.UpgradePlan, s.UpgradeTracker.MachinePools.UpgradePlan),
+ s.Current.ControlPlane.Object.GetKind(), klog.KObj(s.Current.ControlPlane.Object),
+ )
+ return nextVersion, nil
}
// computeCluster computes the desired state for the Cluster object.
// NOTE: Some fields of the Cluster’s fields contribute to defining the Cluster blueprint (e.g. Cluster.Spec.Topology),
// while some other fields should be managed as part of the actual Cluster (e.g. Cluster.Spec.ControlPlaneRef); in this func
// we are concerned only about the latest group of fields.
-func computeCluster(_ context.Context, s *scope.Scope, infrastructureCluster, controlPlane *unstructured.Unstructured) *clusterv1.Cluster {
+func computeCluster(_ context.Context, s *scope.Scope, infrastructureCluster, controlPlane *unstructured.Unstructured) (*clusterv1.Cluster, error) {
cluster := s.Current.Cluster.DeepCopy()
// Enforce the topology labels.
@@ -679,7 +730,23 @@ func computeCluster(_ context.Context, s *scope.Scope, infrastructureCluster, co
cluster.Spec.InfrastructureRef = contract.ObjToContractVersionedObjectReference(infrastructureCluster)
cluster.Spec.ControlPlaneRef = contract.ObjToContractVersionedObjectReference(controlPlane)
- return cluster
+ // Track the current upgrade step in the cluster object (otherwise make sure we cleanup tracking of previous upgrades).
+ // NOTE: to detect if we are upgrading, we check if the intent to call the AfterClusterUpgrade is already tracked.
+ // NOTE, it is required to surface intermediate steps of the upgrade plan to allow creation of machines in KCP/MS.
+ // TODO: consider if we want to surface the upgrade plan (or the list of desired versions) in cluster status;
+ // TBD if the semantic of the new field can replace this annotation.
+ if hooks.IsPending(runtimehooksv1.AfterClusterUpgrade, s.Current.Cluster) {
+ // NOTE: to detect if we are at the beginning of an upgrade, we check if the intent to call the AfterClusterUpgrade is already tracked.
+ controlPlaneVersion, err := contract.ControlPlane().Version().Get(controlPlane)
+ if err != nil {
+ return nil, errors.Wrap(err, "error getting control plane version")
+ }
+ annotations.AddAnnotations(cluster, map[string]string{clusterv1.ClusterTopologyUpgradeStepAnnotation: *controlPlaneVersion})
+ } else {
+ delete(cluster.Annotations, clusterv1.ClusterTopologyUpgradeStepAnnotation)
+ }
+
+ return cluster, nil
}
// calculateRefDesiredAPIVersion returns the desired ref calculated from desiredReferencedObject
@@ -804,7 +871,10 @@ func (g *generator) computeMachineDeployment(ctx context.Context, s *scope.Scope
// Add ClusterTopologyMachineDeploymentLabel to the generated InfrastructureMachine template
infraMachineTemplateLabels[clusterv1.ClusterTopologyMachineDeploymentNameLabel] = machineDeploymentTopology.Name
desiredMachineDeployment.InfrastructureMachineTemplate.SetLabels(infraMachineTemplateLabels)
- version := g.computeMachineDeploymentVersion(s, machineDeploymentTopology, currentMachineDeployment)
+ version, err := g.computeMachineDeploymentVersion(ctx, s, machineDeploymentTopology, currentMachineDeployment)
+ if err != nil {
+ return nil, err
+ }
// Compute values that can be set both in the MachineDeploymentClass and in the MachineDeploymentTopology
minReadySeconds := machineDeploymentClass.MinReadySeconds
@@ -983,59 +1053,87 @@ func (g *generator) computeMachineDeployment(ctx context.Context, s *scope.Scope
// computeMachineDeploymentVersion calculates the version of the desired machine deployment.
// The version is calculated using the state of the current machine deployments,
// the current control plane and the version defined in the topology.
-func (g *generator) computeMachineDeploymentVersion(s *scope.Scope, machineDeploymentTopology clusterv1.MachineDeploymentTopology, currentMDState *scope.MachineDeploymentState) string {
- desiredVersion := s.Blueprint.Topology.Version
+func (g *generator) computeMachineDeploymentVersion(ctx context.Context, s *scope.Scope, machineDeploymentTopology clusterv1.MachineDeploymentTopology, currentMDState *scope.MachineDeploymentState) (string, error) {
+ log := ctrl.LoggerFrom(ctx)
+
+ topologyVersion := s.Blueprint.Topology.Version
// If creating a new machine deployment, mark it as pending if the control plane is not
// yet stable. Creating a new MD while the control plane is upgrading can lead to unexpected race conditions.
// Example: join could fail if the load balancers are slow in detecting when CP machines are
// being deleted.
if currentMDState == nil || currentMDState.Object == nil {
- if !s.UpgradeTracker.ControlPlane.IsControlPlaneStable() || s.HookResponseTracker.IsBlocking(runtimehooksv1.AfterControlPlaneUpgrade) {
+ if !s.UpgradeTracker.ControlPlane.IsControlPlaneStable() || s.HookResponseTracker.IsBlocking(runtimehooksv1.AfterControlPlaneUpgrade) || s.HookResponseTracker.IsBlocking(runtimehooksv1.BeforeWorkersUpgrade) {
s.UpgradeTracker.MachineDeployments.MarkPendingCreate(machineDeploymentTopology.Name)
}
- return desiredVersion
+ return topologyVersion, nil
}
// Get the current version of the machine deployment.
currentVersion := currentMDState.Object.Spec.Template.Spec.Version
- // Return early if the currentVersion is already equal to the desiredVersion
+ // Return early if the currentVersion is already equal to the topologyVersion
// no further checks required.
- if currentVersion == desiredVersion {
- return currentVersion
+ if currentVersion == topologyVersion {
+ return currentVersion, nil
}
// Return early if the upgrade for the MachineDeployment is deferred.
if isMachineDeploymentDeferred(s.Blueprint.Topology, machineDeploymentTopology) {
s.UpgradeTracker.MachineDeployments.MarkDeferredUpgrade(currentMDState.Object.Name)
s.UpgradeTracker.MachineDeployments.MarkPendingUpgrade(currentMDState.Object.Name)
- return currentVersion
+ return currentVersion, nil
}
// Return early if the AfterControlPlaneUpgrade hook returns a blocking response.
if s.HookResponseTracker.IsBlocking(runtimehooksv1.AfterControlPlaneUpgrade) {
s.UpgradeTracker.MachineDeployments.MarkPendingUpgrade(currentMDState.Object.Name)
- return currentVersion
+ return currentVersion, nil
+ }
+
+ // Return early if the BeforeWorkersUpgrade hook returns a blocking response.
+ if s.HookResponseTracker.IsBlocking(runtimehooksv1.BeforeWorkersUpgrade) {
+ s.UpgradeTracker.MachineDeployments.MarkPendingUpgrade(currentMDState.Object.Name)
+ return currentVersion, nil
}
// Return early if the upgrade concurrency is reached.
if s.UpgradeTracker.MachineDeployments.UpgradeConcurrencyReached() {
s.UpgradeTracker.MachineDeployments.MarkPendingUpgrade(currentMDState.Object.Name)
- return currentVersion
+ return currentVersion, nil
}
- // Return early if the Control Plane is not stable. Do not pick up the desiredVersion yet.
+ // Return early if the Control Plane is not stable. Do not pick up the topologyVersion yet.
// Return the current version of the machine deployment. We will pick up the new version after the control
// plane is stable.
- if !s.UpgradeTracker.ControlPlane.IsControlPlaneStable() {
+ if !s.UpgradeTracker.ControlPlane.IsControlPlaneStableOrWaitingForWorkersUpgrade() {
s.UpgradeTracker.MachineDeployments.MarkPendingUpgrade(currentMDState.Object.Name)
- return currentVersion
+ return currentVersion, nil
}
// Control plane and machine deployments are stable.
- // Ready to pick up the topology version.
+ // Ready to pick up the next version in the upgrade plan.
+ if len(s.UpgradeTracker.MachineDeployments.UpgradePlan) == 0 {
+ return "", errors.New("cannot compute the machine deployment version if the machine deployment is pending upgrade and the upgrade plan is not set")
+ }
+
+ // The upgrade plan for workers has all versions from minWorkersVersion version to topologyVersion.
+ // If this MachineDeployment is already at minWorkersVersion, it should wait for the control plane to pick up next version before upgrading.
+ // Note: at this point we know that MachineDeployment is not yet at topologyVersion, so also set that MachineDeployment as PendingUpgrade.
+ if s.UpgradeTracker.MachineDeployments.UpgradePlan[0] == currentVersion {
+ s.UpgradeTracker.MachineDeployments.MarkPendingUpgrade(currentMDState.Object.Name)
+ return currentVersion, nil
+ }
+
s.UpgradeTracker.MachineDeployments.MarkUpgrading(currentMDState.Object.Name)
- return desiredVersion
+
+ nextVersion := s.UpgradeTracker.MachineDeployments.UpgradePlan[0]
+
+ log.Info(fmt.Sprintf("MachineDeployment %s upgraded from version %s to version %s", klog.KObj(currentMDState.Object), currentVersion, nextVersion),
+ "ControlPlaneUpgrades", toUpgradeStep(s.UpgradeTracker.ControlPlane.UpgradePlan),
+ "WorkersUpgrades", toUpgradeStep(s.UpgradeTracker.MachineDeployments.UpgradePlan, s.UpgradeTracker.MachinePools.UpgradePlan),
+ "MachineDeployment", klog.KObj(currentMDState.Object),
+ )
+ return nextVersion, nil
}
// isMachineDeploymentDeferred returns true if the upgrade for the mdTopology is deferred.
@@ -1089,7 +1187,7 @@ func (g *generator) computeMachinePools(ctx context.Context, s *scope.Scope) (sc
// computeMachinePool computes the desired state for a MachinePoolTopology.
// The generated machinePool object is calculated using the values from the machinePoolTopology and
// the machinePool class.
-func (g *generator) computeMachinePool(_ context.Context, s *scope.Scope, machinePoolTopology clusterv1.MachinePoolTopology) (*scope.MachinePoolState, error) {
+func (g *generator) computeMachinePool(ctx context.Context, s *scope.Scope, machinePoolTopology clusterv1.MachinePoolTopology) (*scope.MachinePoolState, error) {
desiredMachinePool := &scope.MachinePoolState{}
// Gets the blueprint for the MachinePool class.
@@ -1167,7 +1265,10 @@ func (g *generator) computeMachinePool(_ context.Context, s *scope.Scope, machin
// Add ClusterTopologyMachinePoolLabel to the generated InfrastructureMachinePool object
infraMachinePoolObjectLabels[clusterv1.ClusterTopologyMachinePoolNameLabel] = machinePoolTopology.Name
desiredMachinePool.InfrastructureMachinePoolObject.SetLabels(infraMachinePoolObjectLabels)
- version := g.computeMachinePoolVersion(s, machinePoolTopology, currentMachinePool)
+ version, err := g.computeMachinePoolVersion(ctx, s, machinePoolTopology, currentMachinePool)
+ if err != nil {
+ return nil, err
+ }
// Compute values that can be set both in the MachinePoolClass and in the MachinePoolTopology
minReadySeconds := machinePoolClass.MinReadySeconds
@@ -1280,59 +1381,87 @@ func (g *generator) computeMachinePool(_ context.Context, s *scope.Scope, machin
// computeMachinePoolVersion calculates the version of the desired machine pool.
// The version is calculated using the state of the current machine pools,
// the current control plane and the version defined in the topology.
-func (g *generator) computeMachinePoolVersion(s *scope.Scope, machinePoolTopology clusterv1.MachinePoolTopology, currentMPState *scope.MachinePoolState) string {
- desiredVersion := s.Blueprint.Topology.Version
+func (g *generator) computeMachinePoolVersion(ctx context.Context, s *scope.Scope, machinePoolTopology clusterv1.MachinePoolTopology, currentMPState *scope.MachinePoolState) (string, error) {
+ log := ctrl.LoggerFrom(ctx)
+
+ topologyVersion := s.Blueprint.Topology.Version
// If creating a new machine pool, mark it as pending if the control plane is not
// yet stable. Creating a new MP while the control plane is upgrading can lead to unexpected race conditions.
// Example: join could fail if the load balancers are slow in detecting when CP machines are
// being deleted.
if currentMPState == nil || currentMPState.Object == nil {
- if !s.UpgradeTracker.ControlPlane.IsControlPlaneStable() || s.HookResponseTracker.IsBlocking(runtimehooksv1.AfterControlPlaneUpgrade) {
+ if !s.UpgradeTracker.ControlPlane.IsControlPlaneStable() || s.HookResponseTracker.IsBlocking(runtimehooksv1.AfterControlPlaneUpgrade) || s.HookResponseTracker.IsBlocking(runtimehooksv1.BeforeWorkersUpgrade) {
s.UpgradeTracker.MachinePools.MarkPendingCreate(machinePoolTopology.Name)
}
- return desiredVersion
+ return topologyVersion, nil
}
// Get the current version of the machine pool.
currentVersion := currentMPState.Object.Spec.Template.Spec.Version
- // Return early if the currentVersion is already equal to the desiredVersion
+ // Return early if the currentVersion is already equal to the topologyVersion
// no further checks required.
- if currentVersion == desiredVersion {
- return currentVersion
+ if currentVersion == topologyVersion {
+ return currentVersion, nil
}
// Return early if the upgrade for the MachinePool is deferred.
if isMachinePoolDeferred(s.Blueprint.Topology, machinePoolTopology) {
s.UpgradeTracker.MachinePools.MarkDeferredUpgrade(currentMPState.Object.Name)
s.UpgradeTracker.MachinePools.MarkPendingUpgrade(currentMPState.Object.Name)
- return currentVersion
+ return currentVersion, nil
}
// Return early if the AfterControlPlaneUpgrade hook returns a blocking response.
if s.HookResponseTracker.IsBlocking(runtimehooksv1.AfterControlPlaneUpgrade) {
s.UpgradeTracker.MachinePools.MarkPendingUpgrade(currentMPState.Object.Name)
- return currentVersion
+ return currentVersion, nil
+ }
+
+ // Return early if the BeforeWorkersUpgrade hook returns a blocking response.
+ if s.HookResponseTracker.IsBlocking(runtimehooksv1.BeforeWorkersUpgrade) {
+ s.UpgradeTracker.MachinePools.MarkPendingUpgrade(currentMPState.Object.Name)
+ return currentVersion, nil
}
// Return early if the upgrade concurrency is reached.
if s.UpgradeTracker.MachinePools.UpgradeConcurrencyReached() {
s.UpgradeTracker.MachinePools.MarkPendingUpgrade(currentMPState.Object.Name)
- return currentVersion
+ return currentVersion, nil
}
- // Return early if the Control Plane is not stable. Do not pick up the desiredVersion yet.
+ // Return early if the Control Plane is not stable. Do not pick up the topologyVersion yet.
// Return the current version of the machine pool. We will pick up the new version after the control
// plane is stable.
- if !s.UpgradeTracker.ControlPlane.IsControlPlaneStable() {
+ if !s.UpgradeTracker.ControlPlane.IsControlPlaneStableOrWaitingForWorkersUpgrade() {
s.UpgradeTracker.MachinePools.MarkPendingUpgrade(currentMPState.Object.Name)
- return currentVersion
+ return currentVersion, nil
}
// Control plane and machine pools are stable.
// Ready to pick up the topology version.
+ if len(s.UpgradeTracker.MachinePools.UpgradePlan) == 0 {
+ return "", errors.New("cannot compute the machine pool version if the machine pool is pending upgrade and the upgrade plan is not set")
+ }
+
+ // The upgrade plan for workers has all versions from minWorkersVersion version to topologyVersion.
+ // If this MachinePool is already at minWorkersVersion, it should wait for the control plane to pick up next version before upgrading.
+ // Note: at this point we know that MachinePool is not yet at topologyVersion, so also set that MachinePool is PendingUpgrade.
+ if s.UpgradeTracker.MachinePools.UpgradePlan[0] == currentVersion {
+ s.UpgradeTracker.MachinePools.MarkPendingUpgrade(currentMPState.Object.Name)
+ return currentVersion, nil
+ }
+
s.UpgradeTracker.MachinePools.MarkUpgrading(currentMPState.Object.Name)
- return desiredVersion
+
+ nextVersion := s.UpgradeTracker.MachinePools.UpgradePlan[0]
+
+ log.Info(fmt.Sprintf("MachinePool %s upgraded from version %s to version %s", klog.KObj(currentMPState.Object), currentVersion, nextVersion),
+ "ControlPlaneUpgrades", toUpgradeStep(s.UpgradeTracker.ControlPlane.UpgradePlan),
+ "WorkersUpgrades", toUpgradeStep(s.UpgradeTracker.MachineDeployments.UpgradePlan, s.UpgradeTracker.MachinePools.UpgradePlan),
+ "MachinePool", klog.KObj(currentMPState.Object),
+ )
+ return nextVersion, nil
}
// isMachinePoolDeferred returns true if the upgrade for the mpTopology is deferred.
@@ -1536,7 +1665,7 @@ func getOwnerReferenceFrom(obj, owner client.Object) *metav1.OwnerReference {
return nil
}
-func cleanupCluster(cluster *clusterv1beta1.Cluster) *clusterv1beta1.Cluster {
+func cleanupV1Beta1Cluster(cluster *clusterv1beta1.Cluster) *clusterv1beta1.Cluster {
// Optimize size of Cluster by not sending status, the managedFields and some specific annotations.
cluster.SetManagedFields(nil)
@@ -1551,3 +1680,19 @@ func cleanupCluster(cluster *clusterv1beta1.Cluster) *clusterv1beta1.Cluster {
cluster.Status = clusterv1beta1.ClusterStatus{}
return cluster
}
+
+func cleanupCluster(cluster *clusterv1.Cluster) *clusterv1.Cluster {
+ // Optimize size of Cluster by not sending status, the managedFields and some specific annotations.
+ cluster.SetManagedFields(nil)
+
+ // The conversion that we run before calling cleanupCluster does not clone annotations
+ // So we have to do it here to not modify the original Cluster.
+ if cluster.Annotations != nil {
+ annotations := maps.Clone(cluster.Annotations)
+ delete(annotations, corev1.LastAppliedConfigAnnotation)
+ delete(annotations, conversion.DataAnnotation)
+ cluster.Annotations = annotations
+ }
+ cluster.Status = clusterv1.ClusterStatus{}
+ return cluster
+}
diff --git a/exp/topology/desiredstate/desired_state_test.go b/exp/topology/desiredstate/desired_state_test.go
index cadbf8bf63ee..65ed6ef3cf78 100644
--- a/exp/topology/desiredstate/desired_state_test.go
+++ b/exp/topology/desiredstate/desired_state_test.go
@@ -19,17 +19,14 @@ package desiredstate
import (
"encoding/json"
"fmt"
- "maps"
"strings"
"testing"
"time"
"github.com/google/go-cmp/cmp"
. "github.com/onsi/gomega"
- "github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
- apiequality "k8s.io/apimachinery/pkg/api/equality"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
@@ -39,22 +36,25 @@ import (
utilfeature "k8s.io/component-base/featuregate/testing"
"k8s.io/utils/ptr"
ctrl "sigs.k8s.io/controller-runtime"
+ "sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
+ controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1"
runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2"
+ "sigs.k8s.io/cluster-api/controllers/clustercache"
runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog"
"sigs.k8s.io/cluster-api/exp/topology/scope"
"sigs.k8s.io/cluster-api/feature"
"sigs.k8s.io/cluster-api/internal/contract"
- "sigs.k8s.io/cluster-api/internal/hooks"
fakeruntimeclient "sigs.k8s.io/cluster-api/internal/runtime/client/fake"
"sigs.k8s.io/cluster-api/internal/topology/clustershim"
topologynames "sigs.k8s.io/cluster-api/internal/topology/names"
"sigs.k8s.io/cluster-api/internal/topology/ownerrefs"
"sigs.k8s.io/cluster-api/util"
+ "sigs.k8s.io/cluster-api/util/cache"
"sigs.k8s.io/cluster-api/util/conversion"
"sigs.k8s.io/cluster-api/util/test/builder"
)
@@ -435,19 +435,20 @@ func TestComputeControlPlane(t *testing.T) {
g.Expect(json.Unmarshal(jsonValue, &expectedReadinessGates)).ToNot(HaveOccurred())
scheme := runtime.NewScheme()
+ _ = clusterv1.AddToScheme(scheme)
_ = apiextensionsv1.AddToScheme(scheme)
- crd := builder.GenericControlPlaneCRD.DeepCopy()
- crd.Labels = map[string]string{
+ crdV1Beta1Contract := builder.GenericControlPlaneCRD.DeepCopy()
+ crdV1Beta1Contract.Labels = map[string]string{
// Set contract label for tt.contract.
fmt.Sprintf("%s/%s", clusterv1.GroupVersion.Group, "v1beta1"): clusterv1.GroupVersionControlPlane.Version,
}
- clientWithV1Beta1ContractCRD := fake.NewClientBuilder().WithScheme(scheme).WithObjects(crd).Build()
- crd = builder.GenericControlPlaneCRD.DeepCopy()
- crd.Labels = map[string]string{
+ clientWithV1Beta1ContractCRD := fake.NewClientBuilder().WithScheme(scheme).WithObjects(crdV1Beta1Contract).Build()
+ crdV1Beta2Contract := builder.GenericControlPlaneCRD.DeepCopy()
+ crdV1Beta2Contract.Labels = map[string]string{
// Set contract label for tt.contract.
fmt.Sprintf("%s/%s", clusterv1.GroupVersion.Group, "v1beta2"): clusterv1.GroupVersionControlPlane.Version,
}
- clientWithV1Beta2ContractCRD := fake.NewClientBuilder().WithScheme(scheme).WithObjects(crd).Build()
+ clientWithV1Beta2ContractCRD := fake.NewClientBuilder().WithScheme(scheme).WithObjects(crdV1Beta2Contract).Build()
t.Run("Generates the ControlPlane from the template (v1beta1 contract)", func(t *testing.T) {
g := NewWithT(t)
@@ -866,12 +867,13 @@ func TestComputeControlPlane(t *testing.T) {
})
})
t.Run("Should choose the correct version for control plane", func(t *testing.T) {
- // Note: in all of the following tests we are setting it up so that there are not machine deployments.
+ // Note: in all the following tests we are setting it up so that there are not machine deployments.
// A more extensive list of scenarios is tested in TestComputeControlPlaneVersion.
tests := []struct {
name string
currentControlPlane *unstructured.Unstructured
topologyVersion string
+ upgradePlan []string
expectedVersion string
}{
{
@@ -881,7 +883,21 @@ func TestComputeControlPlane(t *testing.T) {
expectedVersion: "v1.2.3",
},
{
- name: "use controlplane.spec.version if the control plane's spec.version is not equal to status.version",
+ name: "use cluster.spec.topology.version if the control plane is already up to date",
+ currentControlPlane: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.3",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.3",
+ }).
+ Build(),
+ topologyVersion: "v1.2.3",
+ upgradePlan: nil,
+ expectedVersion: "v1.2.3",
+ },
+ {
+ name: "use controlplane.spec.version if the control plane's spec.version is not equal to status.version", // NOTE: there are a few other conditions preventing to pick up latest cluster.spec.topology.version (other than is upgrading which is test here); all those conditions are validated in TestComputeControlPlaneVersion
currentControlPlane: builder.ControlPlane("test1", "cp1").
WithSpecFields(map[string]interface{}{
"spec.version": "v1.2.2",
@@ -891,8 +907,63 @@ func TestComputeControlPlane(t *testing.T) {
}).
Build(),
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.2",
},
+ {
+ name: "use cluster.spec.topology.version if the control plane can upgrade and it is a simple upgrade",
+ currentControlPlane: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ "spec.replicas": int64(2),
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ "status.replicas": int64(2),
+ "status.updatedReplicas": int64(2),
+ "status.readyReplicas": int64(2),
+ }).
+ Build(),
+ topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"}, // Simple upgrade
+ expectedVersion: "v1.2.3",
+ },
+ {
+ name: "use intermediate version if the control plane can upgrade and it is a multistep upgrade",
+ currentControlPlane: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ "spec.replicas": int64(2),
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ "status.replicas": int64(2),
+ "status.updatedReplicas": int64(2),
+ "status.readyReplicas": int64(2),
+ }).
+ Build(),
+ topologyVersion: "v1.5.3",
+ upgradePlan: []string{"v1.3.2", "v1.4.2", "v1.5.3"}, // Multistep upgrade
+ expectedVersion: "v1.3.2",
+ },
+ {
+ name: "use cluster.spec.topology.version if the control plane can upgrade and we are at the last step of a multistep upgrade",
+ currentControlPlane: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.4.2",
+ "spec.replicas": int64(2),
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.4.2",
+ "status.replicas": int64(2),
+ "status.updatedReplicas": int64(2),
+ "status.readyReplicas": int64(2),
+ }).
+ Build(),
+ topologyVersion: "v1.5.3",
+ upgradePlan: []string{"v1.5.3"},
+ expectedVersion: "v1.5.3",
+ },
}
for _, tt := range tests {
@@ -918,8 +989,10 @@ func TestComputeControlPlane(t *testing.T) {
s.Current.ControlPlane = &scope.ControlPlaneState{
Object: tt.currentControlPlane,
}
+ s.UpgradeTracker = scope.NewUpgradeTracker()
+ s.UpgradeTracker.ControlPlane.UpgradePlan = tt.upgradePlan
- obj, err := (&generator{Client: clientWithV1Beta2ContractCRD}).computeControlPlane(ctx, s, nil)
+ obj, err := (&generator{Client: fake.NewClientBuilder().WithScheme(scheme).WithObjects(crdV1Beta2Contract, clusterWithControlPlaneRef).Build()}).computeControlPlane(ctx, s, nil)
g.Expect(err).ToNot(HaveOccurred())
g.Expect(obj).NotTo(BeNil())
assertNestedField(g, obj, tt.expectedVersion, contract.ControlPlane().Version().Path()...)
@@ -986,706 +1059,676 @@ func TestComputeControlPlaneVersion(t *testing.T) {
}
clusterv1beta1.SetAPIVersionGetter(apiVersionGetter)
- t.Run("Compute control plane version under various circumstances", func(t *testing.T) {
- utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.RuntimeSDK, true)
-
- nonBlockingBeforeClusterUpgradeResponse := &runtimehooksv1.BeforeClusterUpgradeResponse{
- CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
- CommonResponse: runtimehooksv1.CommonResponse{
- Status: runtimehooksv1.ResponseStatusSuccess,
- },
- },
- }
-
- blockingBeforeClusterUpgradeResponse := &runtimehooksv1.BeforeClusterUpgradeResponse{
- CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
- CommonResponse: runtimehooksv1.CommonResponse{
- Status: runtimehooksv1.ResponseStatusSuccess,
- },
- RetryAfterSeconds: int32(10),
- },
- }
-
- failureBeforeClusterUpgradeResponse := &runtimehooksv1.BeforeClusterUpgradeResponse{
- CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
- CommonResponse: runtimehooksv1.CommonResponse{
- Status: runtimehooksv1.ResponseStatusFailure,
- },
- },
- }
-
- catalog := runtimecatalog.New()
- _ = runtimehooksv1.AddToCatalog(catalog)
+ utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.RuntimeSDK, true)
- beforeClusterUpgradeGVH, err := catalog.GroupVersionHook(runtimehooksv1.BeforeClusterUpgrade)
- if err != nil {
- panic("unable to compute GVH")
- }
+ catalog := runtimecatalog.New()
+ _ = runtimehooksv1.AddToCatalog(catalog)
+ beforeClusterUpgradeGVH, _ := catalog.GroupVersionHook(runtimehooksv1.BeforeClusterUpgrade)
+ beforeControlPlaneUpgradeGVH, _ := catalog.GroupVersionHook(runtimehooksv1.BeforeControlPlaneUpgrade)
+ beforeWorkersUpgradeGVH, _ := catalog.GroupVersionHook(runtimehooksv1.BeforeWorkersUpgrade)
+ afterWorkersUpgradeGVH, _ := catalog.GroupVersionHook(runtimehooksv1.AfterWorkersUpgrade)
- tests := []struct {
- name string
- hookResponse *runtimehooksv1.BeforeClusterUpgradeResponse
- topologyVersion string
- clusterModifier func(c *clusterv1.Cluster)
- controlPlaneObj *unstructured.Unstructured
- upgradingMachineDeployments []string
- upgradingMachinePools []string
- expectedVersion string
- wantErr bool
- }{
- {
- name: "should return cluster.spec.topology.version if creating a new control plane",
- topologyVersion: "v1.2.3",
- controlPlaneObj: nil,
- expectedVersion: "v1.2.3",
+ nonBlockingBeforeClusterUpgradeResponse := &runtimehooksv1.BeforeClusterUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusSuccess,
},
- {
- // Control plane is not upgrading implies that controlplane.spec.version is equal to controlplane.status.version.
- // Control plane is not scaling implies that controlplane.spec.replicas is equal to controlplane.status.replicas,
- // Controlplane.status.updatedReplicas and controlplane.status.readyReplicas.
- name: "should return cluster.spec.topology.version if the control plane is not upgrading and not scaling",
- hookResponse: nonBlockingBeforeClusterUpgradeResponse,
- topologyVersion: "v1.2.3",
- controlPlaneObj: builder.ControlPlane("test1", "cp1").
- WithSpecFields(map[string]interface{}{
- "spec.version": "v1.2.2",
- "spec.replicas": int64(2),
- }).
- WithStatusFields(map[string]interface{}{
- "status.version": "v1.2.2",
- "status.replicas": int64(2),
- "status.updatedReplicas": int64(2),
- "status.readyReplicas": int64(2),
- "status.unavailableReplicas": int64(0),
- }).
- Build(),
- expectedVersion: "v1.2.3",
- },
- {
- // Control plane is considered upgrading if controlplane.spec.version is not equal to controlplane.status.version.
- name: "should return controlplane.spec.version if the control plane is upgrading",
- topologyVersion: "v1.2.3",
- controlPlaneObj: builder.ControlPlane("test1", "cp1").
- WithSpecFields(map[string]interface{}{
- "spec.version": "v1.2.2",
- }).
- WithStatusFields(map[string]interface{}{
- "status.version": "v1.2.1",
- }).
- Build(),
- expectedVersion: "v1.2.2",
- },
- {
- name: "should return cluster.spec.topology.version if the control plane is scaling",
- hookResponse: nonBlockingBeforeClusterUpgradeResponse,
- topologyVersion: "v1.2.3",
- controlPlaneObj: builder.ControlPlane("test1", "cp1").
- WithSpecFields(map[string]interface{}{
- "spec.version": "v1.2.2",
- "spec.replicas": int64(2),
- }).
- WithStatusFields(map[string]interface{}{
- "status.version": "v1.2.2",
- "status.replicas": int64(1),
- "status.updatedReplicas": int64(1),
- "status.readyReplicas": int64(1),
- "status.unavailableReplicas": int64(0),
- }).
- Build(),
- expectedVersion: "v1.2.3",
- },
- {
- name: "should return controlplane.spec.version if control plane is not upgrading and not scaling and one of the MachineDeployments and one of the MachinePools is upgrading",
- topologyVersion: "v1.2.3",
- controlPlaneObj: builder.ControlPlane("test1", "cp1").
- WithSpecFields(map[string]interface{}{
- "spec.version": "v1.2.2",
- "spec.replicas": int64(2),
- }).
- WithStatusFields(map[string]interface{}{
- "status.version": "v1.2.2",
- "status.replicas": int64(2),
- "status.updatedReplicas": int64(2),
- "status.readyReplicas": int64(2),
- "status.unavailableReplicas": int64(0),
- }).
- Build(),
- upgradingMachineDeployments: []string{"md1"},
- upgradingMachinePools: []string{"mp1"},
- expectedVersion: "v1.2.2",
- },
- {
- name: "should return cluster.spec.topology.version if control plane is not upgrading and not scaling and none of the MachineDeployments and MachinePools are upgrading - hook returns non blocking response",
- hookResponse: nonBlockingBeforeClusterUpgradeResponse,
- topologyVersion: "v1.2.3",
- controlPlaneObj: builder.ControlPlane("test1", "cp1").
- WithSpecFields(map[string]interface{}{
- "spec.version": "v1.2.2",
- "spec.replicas": int64(2),
- }).
- WithStatusFields(map[string]interface{}{
- "status.version": "v1.2.2",
- "status.replicas": int64(2),
- "status.updatedReplicas": int64(2),
- "status.readyReplicas": int64(2),
- "status.unavailableReplicas": int64(0),
- }).
- Build(),
- upgradingMachineDeployments: []string{},
- upgradingMachinePools: []string{},
- expectedVersion: "v1.2.3",
- },
- {
- name: "should return the controlplane.spec.version if a BeforeClusterUpgradeHook returns a blocking response",
- hookResponse: blockingBeforeClusterUpgradeResponse,
- topologyVersion: "v1.2.3",
- controlPlaneObj: builder.ControlPlane("test1", "cp1").
- WithSpecFields(map[string]interface{}{
- "spec.version": "v1.2.2",
- "spec.replicas": int64(2),
- }).
- WithStatusFields(map[string]interface{}{
- "status.version": "v1.2.2",
- "status.replicas": int64(2),
- "status.updatedReplicas": int64(2),
- "status.readyReplicas": int64(2),
- "status.unavailableReplicas": int64(0),
- }).
- Build(),
- expectedVersion: "v1.2.2",
- },
- {
- name: "should fail if the BeforeClusterUpgrade hooks returns a failure response",
- hookResponse: failureBeforeClusterUpgradeResponse,
- topologyVersion: "v1.2.3",
- controlPlaneObj: builder.ControlPlane("test1", "cp1").
- WithSpecFields(map[string]interface{}{
- "spec.version": "v1.2.2",
- "spec.replicas": int64(2),
- }).
- WithStatusFields(map[string]interface{}{
- "status.version": "v1.2.2",
- "status.replicas": int64(2),
- "status.updatedReplicas": int64(2),
- "status.readyReplicas": int64(2),
- "status.unavailableReplicas": int64(0),
- }).
- Build(),
- expectedVersion: "v1.2.2",
- wantErr: true,
+ },
+ }
+ blockingBeforeClusterUpgradeResponse := &runtimehooksv1.BeforeClusterUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusSuccess,
},
- {
- name: "should return the controlplane.spec.version if a BeforeClusterUpgradeHook annotation is set",
- hookResponse: nonBlockingBeforeClusterUpgradeResponse,
- topologyVersion: "v1.2.3",
- controlPlaneObj: builder.ControlPlane("test1", "cp1").
- WithSpecFields(map[string]interface{}{
- "spec.version": "v1.2.2",
- "spec.replicas": int64(2),
- }).
- WithStatusFields(map[string]interface{}{
- "status.version": "v1.2.2",
- "status.replicas": int64(2),
- "status.updatedReplicas": int64(2),
- "status.readyReplicas": int64(2),
- "status.unavailableReplicas": int64(0),
- }).
- Build(),
- clusterModifier: func(c *clusterv1.Cluster) {
- c.Annotations = map[string]string{
- clusterv1.BeforeClusterUpgradeHookAnnotationPrefix + "/test": "true",
- }
- },
- expectedVersion: "v1.2.2",
+ RetryAfterSeconds: int32(10),
+ },
+ }
+ failureBeforeClusterUpgradeResponse := &runtimehooksv1.BeforeClusterUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusFailure,
},
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- g := NewWithT(t)
-
- s := &scope.Scope{
- Blueprint: &scope.ClusterBlueprint{Topology: clusterv1.Topology{
- Version: tt.topologyVersion,
- ControlPlane: clusterv1.ControlPlaneTopology{
- Replicas: ptr.To[int32](2),
- },
- }},
- Current: &scope.ClusterState{
- Cluster: &clusterv1.Cluster{
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-cluster",
- Namespace: "test-ns",
- // Add managedFields and annotations that should be cleaned up before the Cluster is sent to the RuntimeExtension.
- ManagedFields: []metav1.ManagedFieldsEntry{
- {
- APIVersion: builder.InfrastructureGroupVersion.String(),
- Manager: "manager",
- Operation: "op",
- Time: ptr.To(metav1.Now()),
- FieldsType: "FieldsV1",
- FieldsV1: &metav1.FieldsV1{},
- },
- },
- Annotations: map[string]string{
- "fizz": "buzz",
- corev1.LastAppliedConfigAnnotation: "should be cleaned up",
- conversion.DataAnnotation: "should be cleaned up",
- },
- },
- // Add some more fields to check that conversion implemented when calling RuntimeExtension are properly handled.
- Spec: clusterv1.ClusterSpec{
- InfrastructureRef: clusterv1.ContractVersionedObjectReference{
- APIGroup: "refAPIGroup1",
- Kind: "refKind1",
- Name: "refName1",
- },
- },
- },
- ControlPlane: &scope.ControlPlaneState{Object: tt.controlPlaneObj},
- },
- UpgradeTracker: scope.NewUpgradeTracker(),
- HookResponseTracker: scope.NewHookResponseTracker(),
- }
- if tt.clusterModifier != nil {
- tt.clusterModifier(s.Current.Cluster)
- }
- if len(tt.upgradingMachineDeployments) > 0 {
- s.UpgradeTracker.MachineDeployments.MarkUpgrading(tt.upgradingMachineDeployments...)
- }
- if len(tt.upgradingMachinePools) > 0 {
- s.UpgradeTracker.MachinePools.MarkUpgrading(tt.upgradingMachinePools...)
- }
-
- runtimeClient := fakeruntimeclient.NewRuntimeClientBuilder().
- WithCatalog(catalog).
- WithCallAllExtensionResponses(map[runtimecatalog.GroupVersionHook]runtimehooksv1.ResponseObject{
- beforeClusterUpgradeGVH: tt.hookResponse,
- }).
- WithCallAllExtensionValidations(validateClusterParameter(s.Current.Cluster)).
- Build()
-
- fakeClient := fake.NewClientBuilder().WithScheme(fakeScheme).WithObjects(s.Current.Cluster).Build()
-
- r := &generator{
- Client: fakeClient,
- RuntimeClient: runtimeClient,
- }
- version, err := r.computeControlPlaneVersion(ctx, s)
- if tt.wantErr {
- g.Expect(err).To(HaveOccurred())
- } else {
- g.Expect(err).ToNot(HaveOccurred())
- g.Expect(version).To(Equal(tt.expectedVersion))
- // Verify that if the upgrade is pending it is captured in the upgrade tracker.
- upgradePending := tt.expectedVersion != tt.topologyVersion
- g.Expect(s.UpgradeTracker.ControlPlane.IsPendingUpgrade).To(Equal(upgradePending))
- }
- })
- }
- })
-
- t.Run("Calling AfterControlPlaneUpgrade hook", func(t *testing.T) {
- utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.RuntimeSDK, true)
-
- catalog := runtimecatalog.New()
- _ = runtimehooksv1.AddToCatalog(catalog)
-
- afterControlPlaneUpgradeGVH, err := catalog.GroupVersionHook(runtimehooksv1.AfterControlPlaneUpgrade)
- if err != nil {
- panic(err)
- }
+ },
+ }
- blockingResponse := &runtimehooksv1.AfterControlPlaneUpgradeResponse{
- CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
- RetryAfterSeconds: int32(10),
- CommonResponse: runtimehooksv1.CommonResponse{
- Status: runtimehooksv1.ResponseStatusSuccess,
- },
+ nonBlockingBeforeControlPlaneUpgradeResponse := &runtimehooksv1.BeforeControlPlaneUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusSuccess,
},
- }
- nonBlockingResponse := &runtimehooksv1.AfterControlPlaneUpgradeResponse{
- CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
- RetryAfterSeconds: int32(0),
- CommonResponse: runtimehooksv1.CommonResponse{
- Status: runtimehooksv1.ResponseStatusSuccess,
- },
+ },
+ }
+ blockingBeforeControlPlaneUpgradeResponse := &runtimehooksv1.BeforeControlPlaneUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusSuccess,
},
- }
- failureResponse := &runtimehooksv1.AfterControlPlaneUpgradeResponse{
- CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
- CommonResponse: runtimehooksv1.CommonResponse{
- Status: runtimehooksv1.ResponseStatusFailure,
- },
+ RetryAfterSeconds: int32(10),
+ },
+ }
+ failureBeforeControlPlaneUpgradeResponse := &runtimehooksv1.BeforeControlPlaneUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusFailure,
},
- }
-
- topologyVersion := "v1.2.3"
- lowerVersion := "v1.2.2"
- controlPlaneStable := builder.ControlPlane("test-ns", "cp1").
- WithSpecFields(map[string]interface{}{
- "spec.version": topologyVersion,
- "spec.replicas": int64(2),
- }).
- WithStatusFields(map[string]interface{}{
- "status.version": topologyVersion,
- "status.replicas": int64(2),
- "status.updatedReplicas": int64(2),
- "status.readyReplicas": int64(2),
- }).
- Build()
-
- controlPlaneUpgrading := builder.ControlPlane("test-ns", "cp1").
- WithSpecFields(map[string]interface{}{
- "spec.version": topologyVersion,
- "spec.replicas": int64(2),
- }).
- WithStatusFields(map[string]interface{}{
- "status.version": lowerVersion,
- "status.replicas": int64(2),
- "status.updatedReplicas": int64(2),
- "status.readyReplicas": int64(2),
- }).
- Build()
-
- controlPlaneProvisioning := builder.ControlPlane("test-ns", "cp1").
- WithSpecFields(map[string]interface{}{
- "spec.version": "v1.2.2",
- "spec.replicas": int64(2),
- }).
- WithStatusFields(map[string]interface{}{
- "status.version": "",
- }).
- Build()
+ },
+ }
- tests := []struct {
- name string
- s *scope.Scope
- hookResponse *runtimehooksv1.AfterControlPlaneUpgradeResponse
- wantIntentToCall bool
- wantHookToBeCalled bool
- wantHookToBlock bool
- wantErr bool
- }{
- {
- name: "should not call hook if it is not marked",
- s: &scope.Scope{
- Blueprint: &scope.ClusterBlueprint{
- Topology: clusterv1.Topology{
- Version: topologyVersion,
- ControlPlane: clusterv1.ControlPlaneTopology{},
- },
- },
- Current: &scope.ClusterState{
- Cluster: &clusterv1.Cluster{
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-cluster",
- Namespace: "test-ns",
- },
- Spec: clusterv1.ClusterSpec{},
- },
- ControlPlane: &scope.ControlPlaneState{
- Object: controlPlaneStable,
- },
- },
- UpgradeTracker: scope.NewUpgradeTracker(),
- HookResponseTracker: scope.NewHookResponseTracker(),
- },
- wantIntentToCall: false,
- wantHookToBeCalled: false,
- wantErr: false,
+ nonBlockingBeforeWorkersUpgradeResponse := &runtimehooksv1.BeforeWorkersUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusSuccess,
},
- {
- name: "should not call hook if the control plane is provisioning - there is intent to call hook",
- s: &scope.Scope{
- Blueprint: &scope.ClusterBlueprint{
- Topology: clusterv1.Topology{
- Version: topologyVersion,
- ControlPlane: clusterv1.ControlPlaneTopology{},
- },
- },
- Current: &scope.ClusterState{
- Cluster: &clusterv1.Cluster{
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-cluster",
- Namespace: "test-ns",
- Annotations: map[string]string{
- runtimev1.PendingHooksAnnotation: "AfterControlPlaneUpgrade",
- },
- },
- Spec: clusterv1.ClusterSpec{},
- },
- ControlPlane: &scope.ControlPlaneState{
- Object: controlPlaneProvisioning,
- },
- },
- UpgradeTracker: scope.NewUpgradeTracker(),
- HookResponseTracker: scope.NewHookResponseTracker(),
- },
- wantIntentToCall: true,
- wantHookToBeCalled: false,
- wantErr: false,
+ },
+ }
+ blockingBeforeWorkersUpgradeResponse := &runtimehooksv1.BeforeWorkersUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusSuccess,
},
- {
- name: "should not call hook if the control plane is upgrading - there is intent to call hook",
- s: &scope.Scope{
- Blueprint: &scope.ClusterBlueprint{
- Topology: clusterv1.Topology{
- Version: topologyVersion,
- ControlPlane: clusterv1.ControlPlaneTopology{},
- },
- },
- Current: &scope.ClusterState{
- Cluster: &clusterv1.Cluster{
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-cluster",
- Namespace: "test-ns",
- Annotations: map[string]string{
- runtimev1.PendingHooksAnnotation: "AfterControlPlaneUpgrade",
- },
- },
- Spec: clusterv1.ClusterSpec{},
- },
- ControlPlane: &scope.ControlPlaneState{
- Object: controlPlaneUpgrading,
- },
- },
- UpgradeTracker: scope.NewUpgradeTracker(),
- HookResponseTracker: scope.NewHookResponseTracker(),
- },
- wantIntentToCall: true,
- wantHookToBeCalled: false,
- wantErr: false,
+ RetryAfterSeconds: int32(10),
+ },
+ }
+ failureBeforeWorkersUpgradeResponse := &runtimehooksv1.BeforeWorkersUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusFailure,
},
- {
- name: "should call hook if the control plane is at desired version - non blocking response should remove hook from pending hooks list and allow MD upgrades",
- s: &scope.Scope{
- Blueprint: &scope.ClusterBlueprint{
- Topology: clusterv1.Topology{
- Version: topologyVersion,
- ControlPlane: clusterv1.ControlPlaneTopology{},
- },
- },
- Current: &scope.ClusterState{
- Cluster: &clusterv1.Cluster{
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-cluster",
- Namespace: "test-ns",
- Annotations: map[string]string{
- runtimev1.PendingHooksAnnotation: "AfterControlPlaneUpgrade",
- },
- },
- Spec: clusterv1.ClusterSpec{},
- },
- ControlPlane: &scope.ControlPlaneState{
- Object: controlPlaneStable,
- },
- },
- UpgradeTracker: scope.NewUpgradeTracker(),
- HookResponseTracker: scope.NewHookResponseTracker(),
- },
- hookResponse: nonBlockingResponse,
- wantIntentToCall: false,
- wantHookToBeCalled: true,
- wantHookToBlock: false,
- wantErr: false,
+ },
+ }
+
+ nonBlockingAfterWorkersUpgradeResponse := &runtimehooksv1.AfterWorkersUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusSuccess,
},
- {
- name: "should call hook if the control plane is at desired version - blocking response should leave the hook in pending hooks list and block MD upgrades",
- s: &scope.Scope{
- Blueprint: &scope.ClusterBlueprint{
- Topology: clusterv1.Topology{
- Version: topologyVersion,
- ControlPlane: clusterv1.ControlPlaneTopology{},
- },
- },
- Current: &scope.ClusterState{
- Cluster: &clusterv1.Cluster{
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-cluster",
- Namespace: "test-ns",
- Annotations: map[string]string{
- runtimev1.PendingHooksAnnotation: "AfterControlPlaneUpgrade",
- },
- },
- Spec: clusterv1.ClusterSpec{},
- },
- ControlPlane: &scope.ControlPlaneState{
- Object: controlPlaneStable,
- },
- },
- UpgradeTracker: scope.NewUpgradeTracker(),
- HookResponseTracker: scope.NewHookResponseTracker(),
- },
- hookResponse: blockingResponse,
- wantIntentToCall: true,
- wantHookToBeCalled: true,
- wantHookToBlock: true,
- wantErr: false,
+ },
+ }
+ blockingAfterWorkersUpgradeResponse := &runtimehooksv1.AfterWorkersUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusSuccess,
},
- {
- name: "should call hook if the control plane is at desired version - failure response should leave the hook in pending hooks list",
- s: &scope.Scope{
- Blueprint: &scope.ClusterBlueprint{
- Topology: clusterv1.Topology{
- Version: topologyVersion,
- ControlPlane: clusterv1.ControlPlaneTopology{},
- },
- },
- Current: &scope.ClusterState{
- Cluster: &clusterv1.Cluster{
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-cluster",
- Namespace: "test-ns",
- Annotations: map[string]string{
- runtimev1.PendingHooksAnnotation: "AfterControlPlaneUpgrade",
- },
- },
- Spec: clusterv1.ClusterSpec{},
- },
- ControlPlane: &scope.ControlPlaneState{
- Object: controlPlaneStable,
- },
- },
- UpgradeTracker: scope.NewUpgradeTracker(),
- HookResponseTracker: scope.NewHookResponseTracker(),
- },
- hookResponse: failureResponse,
- wantIntentToCall: true,
- wantHookToBeCalled: true,
- wantErr: true,
+ RetryAfterSeconds: int32(10),
+ },
+ }
+ failureAfterWorkersUpgradeResponse := &runtimehooksv1.AfterWorkersUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusFailure,
},
- }
-
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- g := NewWithT(t)
+ },
+ }
- // Add managedFields and annotations that should be cleaned up before the Cluster is sent to the RuntimeExtension.
- tt.s.Current.Cluster.SetManagedFields([]metav1.ManagedFieldsEntry{
- {
- APIVersion: builder.InfrastructureGroupVersion.String(),
- Manager: "manager",
- Operation: "op",
- Time: ptr.To(metav1.Now()),
- FieldsType: "FieldsV1",
- FieldsV1: &metav1.FieldsV1{},
- },
- })
- if tt.s.Current.Cluster.Annotations == nil {
- tt.s.Current.Cluster.Annotations = map[string]string{}
+ tests := []struct {
+ name string
+ beforeClusterUpgradeResponse *runtimehooksv1.BeforeClusterUpgradeResponse
+ beforeControlPlaneUpgradeResponse *runtimehooksv1.BeforeControlPlaneUpgradeResponse
+ beforeWorkersUpgradeResponse *runtimehooksv1.BeforeWorkersUpgradeResponse
+ afterWorkersUpgradeResponse *runtimehooksv1.AfterWorkersUpgradeResponse
+ topologyVersion string
+ clusterModifier func(c *clusterv1.Cluster)
+ controlPlaneObj *unstructured.Unstructured
+ controlPlaneUpgradePlan []string
+ machineDeploymentsUpgradePlan []string
+ machinePoolsUpgradePlan []string
+ upgradingMachineDeployments []string
+ upgradingMachinePools []string
+ expectedVersion string
+ expectedIsPendingUpgrade bool
+ expectedIsStartingUpgrade bool
+ expectedIsWaitingForWorkersUpgrade bool
+ wantErr bool
+ }{
+ {
+ name: "should return cluster.spec.topology.version if creating a new control plane",
+ topologyVersion: "v1.2.3",
+ controlPlaneObj: nil,
+ expectedVersion: "v1.2.3",
+ expectedIsPendingUpgrade: false,
+ expectedIsStartingUpgrade: false,
+ },
+ {
+ name: "should return cluster.spec.topology.version if the control plane is already at the target version",
+ topologyVersion: "v1.2.3",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.3",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.3",
+ }).
+ Build(),
+ controlPlaneUpgradePlan: nil,
+ expectedVersion: "v1.2.3",
+ expectedIsPendingUpgrade: false,
+ expectedIsStartingUpgrade: false,
+ },
+ {
+ // Control plane is considered upgrading if controlplane.spec.version is not equal to controlplane.status.version.
+ name: "should return controlplane.spec.version if the control plane is upgrading",
+ topologyVersion: "v1.2.3",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.1",
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{"v1.2.3"},
+ expectedVersion: "v1.2.2",
+ expectedIsPendingUpgrade: true,
+ expectedIsStartingUpgrade: false,
+ },
+ {
+ name: "should return controlplane.spec.version if control plane is not upgrading and not scaling and one of the MachineDeployments and one of the MachinePools is upgrading",
+ topologyVersion: "v1.2.3",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ "spec.replicas": int64(2),
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ "status.replicas": int64(2),
+ "status.updatedReplicas": int64(2),
+ "status.readyReplicas": int64(2),
+ "status.unavailableReplicas": int64(0),
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{"v1.2.3"},
+ upgradingMachineDeployments: []string{"md1"},
+ upgradingMachinePools: []string{"mp1"},
+ expectedVersion: "v1.2.2",
+ expectedIsPendingUpgrade: true,
+ expectedIsStartingUpgrade: false,
+ },
+ {
+ name: "should return cluster.spec.topology.version if control plane is not upgrading and not scaling and none of the MachineDeployments and MachinePools are upgrading - BeforeClusterUpgrade, BeforeControlPlaneUpgrade, BeforeWorkersUpgrade and AfterWorkersUpgrade hooks returns non blocking response",
+ beforeClusterUpgradeResponse: nonBlockingBeforeClusterUpgradeResponse,
+ beforeControlPlaneUpgradeResponse: nonBlockingBeforeControlPlaneUpgradeResponse,
+ beforeWorkersUpgradeResponse: nonBlockingBeforeWorkersUpgradeResponse,
+ afterWorkersUpgradeResponse: nonBlockingAfterWorkersUpgradeResponse,
+ topologyVersion: "v1.2.3",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ "spec.replicas": int64(2),
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ "status.replicas": int64(2),
+ "status.updatedReplicas": int64(2),
+ "status.readyReplicas": int64(2),
+ "status.unavailableReplicas": int64(0),
+ }).
+ Build(),
+ clusterModifier: func(c *clusterv1.Cluster) {
+ c.Annotations = map[string]string{
+ runtimev1.PendingHooksAnnotation: "BeforeWorkersUpgrade,AfterWorkersUpgrade",
}
- tt.s.Current.Cluster.Annotations[corev1.LastAppliedConfigAnnotation] = "should be cleaned up"
- tt.s.Current.Cluster.Annotations[conversion.DataAnnotation] = "should be cleaned up"
-
- fakeRuntimeClient := fakeruntimeclient.NewRuntimeClientBuilder().
- WithCallAllExtensionResponses(map[runtimecatalog.GroupVersionHook]runtimehooksv1.ResponseObject{
- afterControlPlaneUpgradeGVH: tt.hookResponse,
- }).
- WithCallAllExtensionValidations(validateClusterParameter(tt.s.Current.Cluster)).
- WithCatalog(catalog).
- Build()
-
- fakeClient := fake.NewClientBuilder().WithScheme(fakeScheme).WithObjects(tt.s.Current.Cluster).Build()
-
- r := &generator{
- Client: fakeClient,
- RuntimeClient: fakeRuntimeClient,
+ },
+ controlPlaneUpgradePlan: []string{"v1.2.3"},
+ upgradingMachineDeployments: []string{},
+ upgradingMachinePools: []string{},
+ expectedVersion: "v1.2.3",
+ expectedIsPendingUpgrade: false,
+ expectedIsStartingUpgrade: true,
+ },
+ {
+ name: "should return cluster.spec.topology.version if the control plane is not upgrading or scaling and none of the MachineDeployments and MachinePools are upgrading - BeforeClusterUpgrade, BeforeControlPlaneUpgrade hooks returns non blocking response",
+ beforeClusterUpgradeResponse: nonBlockingBeforeClusterUpgradeResponse,
+ beforeControlPlaneUpgradeResponse: nonBlockingBeforeControlPlaneUpgradeResponse,
+ topologyVersion: "v1.2.3",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ "spec.replicas": int64(2),
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ "status.replicas": int64(1),
+ "status.updatedReplicas": int64(1),
+ "status.readyReplicas": int64(1),
+ "status.unavailableReplicas": int64(0),
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{"v1.2.3"},
+ expectedVersion: "v1.2.3",
+ expectedIsPendingUpgrade: false,
+ expectedIsStartingUpgrade: true,
+ },
+ {
+ name: "should return an intermediate version when upgrading by more than 1 minor and control plane should perform the first step of the upgrade sequence",
+ beforeClusterUpgradeResponse: nonBlockingBeforeClusterUpgradeResponse,
+ beforeControlPlaneUpgradeResponse: nonBlockingBeforeControlPlaneUpgradeResponse,
+ topologyVersion: "v1.5.3",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ "spec.replicas": int64(2),
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ "status.replicas": int64(2),
+ "status.updatedReplicas": int64(2),
+ "status.readyReplicas": int64(2),
+ "status.unavailableReplicas": int64(0),
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{"v1.3.2", "v1.4.2", "v1.5.3"},
+ upgradingMachineDeployments: []string{},
+ upgradingMachinePools: []string{},
+ expectedVersion: "v1.3.2", // first step of the upgrade plan
+ expectedIsPendingUpgrade: false, // there are still upgrade in the queue, but we are starting one (so not pending)
+ expectedIsStartingUpgrade: true,
+ },
+ {
+ name: "should return cluster.spec.topology.version when performing a multi step upgrade and control plane is at the second last minor in the upgrade sequence",
+ beforeClusterUpgradeResponse: nonBlockingBeforeClusterUpgradeResponse,
+ beforeControlPlaneUpgradeResponse: nonBlockingBeforeControlPlaneUpgradeResponse,
+ topologyVersion: "v1.5.3",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.4.2",
+ "spec.replicas": int64(2),
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.4.2",
+ "status.replicas": int64(2),
+ "status.updatedReplicas": int64(2),
+ "status.readyReplicas": int64(2),
+ "status.unavailableReplicas": int64(0),
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{"v1.5.3"},
+ upgradingMachineDeployments: []string{},
+ upgradingMachinePools: []string{},
+ expectedVersion: "v1.5.3", // last step of the upgrade plan
+ expectedIsPendingUpgrade: false,
+ expectedIsStartingUpgrade: true,
+ },
+ {
+ name: "should remain on the current version when upgrading by more than 1 minor and MachineDeployments have to upgrade",
+ beforeClusterUpgradeResponse: nonBlockingBeforeClusterUpgradeResponse,
+ topologyVersion: "v1.5.3",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ "spec.replicas": int64(2),
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ "status.replicas": int64(2),
+ "status.updatedReplicas": int64(2),
+ "status.readyReplicas": int64(2),
+ "status.unavailableReplicas": int64(0),
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{"v1.3.2", "v1.4.2", "v1.5.3"},
+ machineDeploymentsUpgradePlan: []string{"v1.2.2"},
+ upgradingMachineDeployments: []string{},
+ upgradingMachinePools: []string{},
+ expectedVersion: "v1.2.2",
+ expectedIsPendingUpgrade: true,
+ expectedIsWaitingForWorkersUpgrade: true,
+ expectedIsStartingUpgrade: false,
+ },
+ {
+ name: "should remain on the current version when upgrading by more than 1 minor and MachinePools have to upgrade",
+ beforeClusterUpgradeResponse: nonBlockingBeforeClusterUpgradeResponse,
+ topologyVersion: "v1.5.3",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ "spec.replicas": int64(2),
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ "status.replicas": int64(2),
+ "status.updatedReplicas": int64(2),
+ "status.readyReplicas": int64(2),
+ "status.unavailableReplicas": int64(0),
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{"v1.3.2", "v1.4.2", "v1.5.3"},
+ machinePoolsUpgradePlan: []string{"v1.2.2"},
+ upgradingMachineDeployments: []string{},
+ upgradingMachinePools: []string{},
+ expectedVersion: "v1.2.2",
+ expectedIsPendingUpgrade: true,
+ expectedIsWaitingForWorkersUpgrade: true,
+ expectedIsStartingUpgrade: false,
+ },
+ {
+ name: "should return the controlplane.spec.version if a BeforeClusterUpgradeHook returns a blocking response",
+ beforeClusterUpgradeResponse: blockingBeforeClusterUpgradeResponse,
+ topologyVersion: "v1.2.3",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ "spec.replicas": int64(2),
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ "status.replicas": int64(2),
+ "status.updatedReplicas": int64(2),
+ "status.readyReplicas": int64(2),
+ "status.unavailableReplicas": int64(0),
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{"v1.2.3"},
+ expectedVersion: "v1.2.2",
+ expectedIsPendingUpgrade: true,
+ expectedIsStartingUpgrade: false,
+ },
+ {
+ name: "should fail if the BeforeClusterUpgrade hooks returns a failure response",
+ beforeClusterUpgradeResponse: failureBeforeClusterUpgradeResponse,
+ topologyVersion: "v1.2.3",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ "spec.replicas": int64(2),
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ "status.replicas": int64(2),
+ "status.updatedReplicas": int64(2),
+ "status.readyReplicas": int64(2),
+ "status.unavailableReplicas": int64(0),
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{"v1.2.3"},
+ wantErr: true,
+ },
+ {
+ name: "should return the controlplane.spec.version if a BeforeClusterUpgradeHook annotation is set",
+ beforeClusterUpgradeResponse: nonBlockingBeforeClusterUpgradeResponse,
+ topologyVersion: "v1.2.3",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ "spec.replicas": int64(2),
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ "status.replicas": int64(2),
+ "status.updatedReplicas": int64(2),
+ "status.readyReplicas": int64(2),
+ "status.unavailableReplicas": int64(0),
+ }).
+ Build(),
+ clusterModifier: func(c *clusterv1.Cluster) {
+ c.Annotations = map[string]string{
+ clusterv1.BeforeClusterUpgradeHookAnnotationPrefix + "/test": "true",
+ }
+ },
+ controlPlaneUpgradePlan: []string{"v1.2.3"},
+ expectedVersion: "v1.2.2",
+ expectedIsPendingUpgrade: true,
+ expectedIsStartingUpgrade: false,
+ wantErr: false,
+ },
+ {
+ name: "should return the controlplane.spec.version if a BeforeControlPlaneUpgrade returns a blocking response",
+ beforeClusterUpgradeResponse: nonBlockingBeforeClusterUpgradeResponse,
+ beforeControlPlaneUpgradeResponse: blockingBeforeControlPlaneUpgradeResponse,
+ topologyVersion: "v1.2.3",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ "spec.replicas": int64(2),
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ "status.replicas": int64(2),
+ "status.updatedReplicas": int64(2),
+ "status.readyReplicas": int64(2),
+ "status.unavailableReplicas": int64(0),
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{"v1.2.3"},
+ expectedVersion: "v1.2.2",
+ expectedIsPendingUpgrade: true,
+ expectedIsStartingUpgrade: false,
+ },
+ {
+ name: "should fail if the BeforeControlPlaneUpgrade hooks returns a failure response",
+ beforeClusterUpgradeResponse: nonBlockingBeforeClusterUpgradeResponse,
+ beforeControlPlaneUpgradeResponse: failureBeforeControlPlaneUpgradeResponse,
+ topologyVersion: "v1.2.3",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ "spec.replicas": int64(2),
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ "status.replicas": int64(2),
+ "status.updatedReplicas": int64(2),
+ "status.readyReplicas": int64(2),
+ "status.unavailableReplicas": int64(0),
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{"v1.2.3"},
+ wantErr: true,
+ },
+ {
+ name: "should return the controlplane.spec.version if a AfterWorkersUpgrade returns a blocking response",
+ beforeClusterUpgradeResponse: nonBlockingBeforeClusterUpgradeResponse,
+ beforeControlPlaneUpgradeResponse: nonBlockingBeforeControlPlaneUpgradeResponse,
+ afterWorkersUpgradeResponse: blockingAfterWorkersUpgradeResponse,
+ topologyVersion: "v1.2.3",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ "spec.replicas": int64(2),
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ "status.replicas": int64(2),
+ "status.updatedReplicas": int64(2),
+ "status.readyReplicas": int64(2),
+ "status.unavailableReplicas": int64(0),
+ }).
+ Build(),
+ clusterModifier: func(c *clusterv1.Cluster) {
+ c.Annotations = map[string]string{
+ runtimev1.PendingHooksAnnotation: "AfterWorkersUpgrade",
}
-
- _, err := r.computeControlPlaneVersion(ctx, tt.s)
- if tt.wantErr {
- g.Expect(err).To(HaveOccurred())
- } else {
- g.Expect(err).ToNot(HaveOccurred())
+ },
+ controlPlaneUpgradePlan: []string{"v1.2.3"},
+ expectedVersion: "v1.2.2",
+ expectedIsPendingUpgrade: true,
+ expectedIsStartingUpgrade: false,
+ },
+ {
+ name: "should fail if the AfterWorkersUpgrade hooks returns a failure response",
+ beforeClusterUpgradeResponse: nonBlockingBeforeClusterUpgradeResponse,
+ beforeControlPlaneUpgradeResponse: nonBlockingBeforeControlPlaneUpgradeResponse,
+ afterWorkersUpgradeResponse: failureAfterWorkersUpgradeResponse,
+ topologyVersion: "v1.2.3",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ "spec.replicas": int64(2),
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ "status.replicas": int64(2),
+ "status.updatedReplicas": int64(2),
+ "status.readyReplicas": int64(2),
+ "status.unavailableReplicas": int64(0),
+ }).
+ Build(),
+ clusterModifier: func(c *clusterv1.Cluster) {
+ c.Annotations = map[string]string{
+ runtimev1.PendingHooksAnnotation: "AfterWorkersUpgrade",
}
-
- if tt.wantHookToBeCalled {
- g.Expect(fakeRuntimeClient.CallAllCount(runtimehooksv1.AfterControlPlaneUpgrade)).To(Equal(1), "Expected hook to be called once")
- } else {
- g.Expect(fakeRuntimeClient.CallAllCount(runtimehooksv1.AfterControlPlaneUpgrade)).To(Equal(0), "Did not expect hook to be called")
+ },
+ controlPlaneUpgradePlan: []string{"v1.2.3"},
+ wantErr: true,
+ },
+ {
+ name: "should return the controlplane.spec.version if a BeforeWorkersUpgrade returns a blocking response",
+ beforeClusterUpgradeResponse: nonBlockingBeforeClusterUpgradeResponse,
+ beforeControlPlaneUpgradeResponse: nonBlockingBeforeControlPlaneUpgradeResponse,
+ beforeWorkersUpgradeResponse: blockingBeforeWorkersUpgradeResponse,
+ topologyVersion: "v1.2.3",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ "spec.replicas": int64(2),
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ "status.replicas": int64(2),
+ "status.updatedReplicas": int64(2),
+ "status.readyReplicas": int64(2),
+ "status.unavailableReplicas": int64(0),
+ }).
+ Build(),
+ clusterModifier: func(c *clusterv1.Cluster) {
+ c.Annotations = map[string]string{
+ runtimev1.PendingHooksAnnotation: "BeforeWorkersUpgrade",
}
-
- g.Expect(hooks.IsPending(runtimehooksv1.AfterControlPlaneUpgrade, tt.s.Current.Cluster)).To(Equal(tt.wantIntentToCall))
- if tt.wantHookToBeCalled && !tt.wantErr {
- g.Expect(tt.s.HookResponseTracker.IsBlocking(runtimehooksv1.AfterControlPlaneUpgrade)).To(Equal(tt.wantHookToBlock))
+ },
+ controlPlaneUpgradePlan: []string{"v1.2.3"},
+ expectedVersion: "v1.2.2",
+ expectedIsPendingUpgrade: true,
+ expectedIsStartingUpgrade: false,
+ },
+ {
+ name: "should fail if the BeforeWorkersUpgrade hooks returns a failure response",
+ beforeClusterUpgradeResponse: nonBlockingBeforeClusterUpgradeResponse,
+ beforeControlPlaneUpgradeResponse: nonBlockingBeforeControlPlaneUpgradeResponse,
+ beforeWorkersUpgradeResponse: failureBeforeWorkersUpgradeResponse,
+ topologyVersion: "v1.2.3",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ "spec.replicas": int64(2),
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ "status.replicas": int64(2),
+ "status.updatedReplicas": int64(2),
+ "status.readyReplicas": int64(2),
+ "status.unavailableReplicas": int64(0),
+ }).
+ Build(),
+ clusterModifier: func(c *clusterv1.Cluster) {
+ c.Annotations = map[string]string{
+ runtimev1.PendingHooksAnnotation: "BeforeWorkersUpgrade",
}
- })
- }
- })
-
- t.Run("register intent to call AfterClusterUpgrade and AfterControlPlaneUpgrade hooks", func(t *testing.T) {
- utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.RuntimeSDK, true)
-
- catalog := runtimecatalog.New()
- _ = runtimehooksv1.AddToCatalog(catalog)
- beforeClusterUpgradeGVH, err := catalog.GroupVersionHook(runtimehooksv1.BeforeClusterUpgrade)
- if err != nil {
- panic("unable to compute GVH")
- }
- beforeClusterUpgradeNonBlockingResponse := &runtimehooksv1.BeforeClusterUpgradeResponse{
- CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
- CommonResponse: runtimehooksv1.CommonResponse{
- Status: runtimehooksv1.ResponseStatusSuccess,
- },
},
- }
-
- controlPlaneStable := builder.ControlPlane("test-ns", "cp1").
- WithSpecFields(map[string]interface{}{
- "spec.version": "v1.2.2",
- "spec.replicas": int64(2),
- }).
- WithStatusFields(map[string]interface{}{
- "status.version": "v1.2.2",
- "status.replicas": int64(2),
- "status.updatedReplicas": int64(2),
- "status.readyReplicas": int64(2),
- "status.unavailableReplicas": int64(0),
- }).
- Build()
+ controlPlaneUpgradePlan: []string{"v1.2.3"},
+ wantErr: true,
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
- s := &scope.Scope{
- Blueprint: &scope.ClusterBlueprint{Topology: clusterv1.Topology{
- Version: "v1.2.3",
- ControlPlane: clusterv1.ControlPlaneTopology{
- Replicas: ptr.To[int32](2),
- },
- }},
- Current: &scope.ClusterState{
- Cluster: &clusterv1.Cluster{
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-cluster",
- Namespace: "test-ns",
+ s := &scope.Scope{
+ Blueprint: &scope.ClusterBlueprint{Topology: clusterv1.Topology{
+ Version: tt.topologyVersion,
+ ControlPlane: clusterv1.ControlPlaneTopology{
+ Replicas: ptr.To[int32](2),
+ },
+ }},
+ Current: &scope.ClusterState{
+ Cluster: &clusterv1.Cluster{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "test-cluster",
+ Namespace: "test-ns",
+ // Add managedFields and annotations that should be cleaned up before the Cluster is sent to the RuntimeExtension.
+ ManagedFields: []metav1.ManagedFieldsEntry{
+ {
+ APIVersion: builder.InfrastructureGroupVersion.String(),
+ Manager: "manager",
+ Operation: "Apply",
+ Time: ptr.To(metav1.Now()),
+ FieldsType: "FieldsV1",
+ },
+ },
+ Annotations: map[string]string{
+ "fizz": "buzz",
+ corev1.LastAppliedConfigAnnotation: "should be cleaned up",
+ conversion.DataAnnotation: "should be cleaned up",
+ },
+ },
+ // Add some more fields to check that conversion implemented when calling RuntimeExtension are properly handled.
+ Spec: clusterv1.ClusterSpec{
+ InfrastructureRef: clusterv1.ContractVersionedObjectReference{
+ APIGroup: "refAPIGroup1",
+ Kind: "refKind1",
+ Name: "refName1",
+ }},
},
+ ControlPlane: &scope.ControlPlaneState{Object: tt.controlPlaneObj},
},
- ControlPlane: &scope.ControlPlaneState{Object: controlPlaneStable},
- },
- UpgradeTracker: scope.NewUpgradeTracker(),
- HookResponseTracker: scope.NewHookResponseTracker(),
- }
+ UpgradeTracker: scope.NewUpgradeTracker(),
+ HookResponseTracker: scope.NewHookResponseTracker(),
+ }
+ if tt.clusterModifier != nil {
+ tt.clusterModifier(s.Current.Cluster)
+ }
+ if len(tt.controlPlaneUpgradePlan) > 0 {
+ s.UpgradeTracker.ControlPlane.UpgradePlan = tt.controlPlaneUpgradePlan
+ }
+ if len(tt.machineDeploymentsUpgradePlan) > 0 {
+ s.UpgradeTracker.MachineDeployments.UpgradePlan = tt.machineDeploymentsUpgradePlan
+ }
+ if len(tt.machinePoolsUpgradePlan) > 0 {
+ s.UpgradeTracker.MachinePools.UpgradePlan = tt.machinePoolsUpgradePlan
+ }
+ if len(tt.upgradingMachineDeployments) > 0 {
+ s.UpgradeTracker.MachineDeployments.MarkUpgrading(tt.upgradingMachineDeployments...)
+ }
+ if len(tt.upgradingMachinePools) > 0 {
+ s.UpgradeTracker.MachinePools.MarkUpgrading(tt.upgradingMachinePools...)
+ }
- runtimeClient := fakeruntimeclient.NewRuntimeClientBuilder().
- WithCatalog(catalog).
- WithCallAllExtensionResponses(map[runtimecatalog.GroupVersionHook]runtimehooksv1.ResponseObject{
- beforeClusterUpgradeGVH: beforeClusterUpgradeNonBlockingResponse,
- }).
- Build()
+ runtimeClient := fakeruntimeclient.NewRuntimeClientBuilder().
+ WithCatalog(catalog).
+ WithGetAllExtensionResponses(map[runtimecatalog.GroupVersionHook][]string{
+ beforeClusterUpgradeGVH: {"foo"},
+ beforeControlPlaneUpgradeGVH: {"foo"},
+ beforeWorkersUpgradeGVH: {"foo"},
+ afterWorkersUpgradeGVH: {"foo"},
+ }).
+ WithCallAllExtensionResponses(map[runtimecatalog.GroupVersionHook]runtimehooksv1.ResponseObject{
+ beforeClusterUpgradeGVH: tt.beforeClusterUpgradeResponse,
+ beforeControlPlaneUpgradeGVH: tt.beforeControlPlaneUpgradeResponse,
+ beforeWorkersUpgradeGVH: tt.beforeWorkersUpgradeResponse,
+ afterWorkersUpgradeGVH: tt.afterWorkersUpgradeResponse,
+ }).
+ WithCallAllExtensionValidations(validateClusterParameter(s.Current.Cluster)).
+ Build()
- fakeClient := fake.NewClientBuilder().WithScheme(fakeScheme).WithObjects(s.Current.Cluster).Build()
+ fakeClient := fake.NewClientBuilder().WithScheme(fakeScheme).WithObjects(s.Current.Cluster).Build()
- r := &generator{
- Client: fakeClient,
- RuntimeClient: runtimeClient,
- }
+ r := &generator{
+ Client: fakeClient,
+ RuntimeClient: runtimeClient,
+ hookCache: cache.New[cache.HookEntry](cache.HookCacheDefaultTTL),
+ }
+ version, err := r.computeControlPlaneVersion(ctx, s)
+ if tt.wantErr {
+ g.Expect(err).To(HaveOccurred())
+ return
+ }
+ g.Expect(err).ToNot(HaveOccurred())
- desiredVersion, err := r.computeControlPlaneVersion(ctx, s)
- g := NewWithT(t)
- g.Expect(err).ToNot(HaveOccurred())
- // When successfully picking up the new version the intent to call AfterControlPlaneUpgrade and AfterClusterUpgrade hooks should be registered.
- g.Expect(desiredVersion).To(Equal("v1.2.3"))
- g.Expect(hooks.IsPending(runtimehooksv1.AfterControlPlaneUpgrade, s.Current.Cluster)).To(BeTrue())
- g.Expect(hooks.IsPending(runtimehooksv1.AfterClusterUpgrade, s.Current.Cluster)).To(BeTrue())
- })
+ g.Expect(version).To(Equal(tt.expectedVersion))
+ g.Expect(s.UpgradeTracker.ControlPlane.IsPendingUpgrade).To(Equal(tt.expectedIsPendingUpgrade))
+ g.Expect(s.UpgradeTracker.ControlPlane.IsStartingUpgrade).To(Equal(tt.expectedIsStartingUpgrade))
+ g.Expect(s.UpgradeTracker.ControlPlane.IsWaitingForWorkersUpgrade).To(Equal(tt.expectedIsWaitingForWorkersUpgrade))
+ })
+ }
}
func TestComputeCluster(t *testing.T) {
@@ -1695,6 +1738,7 @@ func TestComputeCluster(t *testing.T) {
infrastructureCluster := builder.InfrastructureCluster(metav1.NamespaceDefault, "infrastructureCluster1").
Build()
controlPlane := builder.ControlPlane(metav1.NamespaceDefault, "controlplane1").
+ WithVersion("v1.30.3").
Build()
// current cluster objects
@@ -1706,10 +1750,14 @@ func TestComputeCluster(t *testing.T) {
}
// aggregating current cluster objects into ClusterState (simulating getCurrentState)
- scope := scope.New(cluster)
+ s := scope.New(cluster)
+ s.Current.ControlPlane = &scope.ControlPlaneState{
+ Object: controlPlane,
+ }
- obj := computeCluster(ctx, scope, infrastructureCluster, controlPlane)
+ obj, err := computeCluster(ctx, s, infrastructureCluster, controlPlane)
g.Expect(obj).ToNot(BeNil())
+ g.Expect(err).ToNot(HaveOccurred())
// TypeMeta
g.Expect(obj.APIVersion).To(Equal(cluster.APIVersion))
@@ -1720,10 +1768,35 @@ func TestComputeCluster(t *testing.T) {
g.Expect(obj.Namespace).To(Equal(cluster.Namespace))
g.Expect(obj.GetLabels()).To(HaveKeyWithValue(clusterv1.ClusterNameLabel, cluster.Name))
g.Expect(obj.GetLabels()).To(HaveKeyWithValue(clusterv1.ClusterTopologyOwnedLabel, ""))
+ g.Expect(obj.GetAnnotations()).ToNot(HaveKey(clusterv1.ClusterTopologyUpgradeStepAnnotation))
// Spec
g.Expect(obj.Spec.InfrastructureRef).To(BeComparableTo(contract.ObjToContractVersionedObjectReference(infrastructureCluster)))
g.Expect(obj.Spec.ControlPlaneRef).To(BeComparableTo(contract.ObjToContractVersionedObjectReference(controlPlane)))
+
+ // Surfaces the ClusterTopologyUpgradeStepAnnotation annotation during upgrades.
+ annotations := s.Current.Cluster.GetAnnotations()
+ if annotations == nil {
+ annotations = map[string]string{}
+ }
+ annotations[runtimev1.PendingHooksAnnotation] = "AfterClusterUpgrade"
+ s.Current.Cluster.SetAnnotations(annotations)
+
+ obj, err = computeCluster(ctx, s, infrastructureCluster, controlPlane)
+ g.Expect(obj).ToNot(BeNil())
+ g.Expect(err).ToNot(HaveOccurred())
+
+ g.Expect(obj.GetAnnotations()).To(HaveKeyWithValue(clusterv1.ClusterTopologyUpgradeStepAnnotation, "v1.30.3"))
+
+ // Delete ClusterTopologyUpgradeStepAnnotation annotation after upgrade is completed.
+ delete(annotations, runtimev1.PendingHooksAnnotation)
+ s.Current.Cluster.SetAnnotations(annotations)
+
+ obj, err = computeCluster(ctx, s, infrastructureCluster, controlPlane)
+ g.Expect(obj).ToNot(BeNil())
+ g.Expect(err).ToNot(HaveOccurred())
+
+ g.Expect(obj.GetAnnotations()).ToNot(HaveKey(clusterv1.ClusterTopologyUpgradeStepAnnotation))
}
func TestComputeMachineDeployment(t *testing.T) {
@@ -1746,6 +1819,20 @@ func TestComputeMachineDeployment(t *testing.T) {
TimeoutSeconds: ptr.To(int32(5 * 60)),
},
}
+
+ unhealthyMachineConditions := []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionUnknown,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionFalse,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ }
+
nodeTimeoutDuration := ptr.To(int32(1))
clusterClassFailureDomain := "A"
@@ -1773,8 +1860,9 @@ func TestComputeMachineDeployment(t *testing.T) {
WithBootstrapTemplate(workerBootstrapTemplate).
WithMachineHealthCheckClass(clusterv1.MachineDeploymentClassHealthCheck{
Checks: clusterv1.MachineDeploymentClassHealthCheckChecks{
- UnhealthyNodeConditions: unhealthyNodeConditions,
- NodeStartupTimeoutSeconds: nodeTimeoutDuration,
+ UnhealthyNodeConditions: unhealthyNodeConditions,
+ UnhealthyMachineConditions: unhealthyMachineConditions,
+ NodeStartupTimeoutSeconds: nodeTimeoutDuration,
},
}).
WithReadinessGates(clusterClassReadinessGates).
@@ -1818,8 +1906,9 @@ func TestComputeMachineDeployment(t *testing.T) {
InfrastructureMachineTemplate: workerInfrastructureMachineTemplate,
HealthCheck: clusterv1.MachineDeploymentClassHealthCheck{
Checks: clusterv1.MachineDeploymentClassHealthCheckChecks{
- UnhealthyNodeConditions: unhealthyNodeConditions,
- NodeStartupTimeoutSeconds: ptr.To(int32(1)),
+ UnhealthyNodeConditions: unhealthyNodeConditions,
+ UnhealthyMachineConditions: unhealthyMachineConditions,
+ NodeStartupTimeoutSeconds: ptr.To(int32(1)),
},
},
},
@@ -1994,8 +2083,9 @@ func TestComputeMachineDeployment(t *testing.T) {
InfrastructureMachineTemplate: workerInfrastructureMachineTemplate,
HealthCheck: clusterv1.MachineDeploymentClassHealthCheck{
Checks: clusterv1.MachineDeploymentClassHealthCheckChecks{
- UnhealthyNodeConditions: unhealthyNodeConditions,
- NodeStartupTimeoutSeconds: ptr.To(int32(1)),
+ UnhealthyNodeConditions: unhealthyNodeConditions,
+ UnhealthyMachineConditions: unhealthyMachineConditions,
+ NodeStartupTimeoutSeconds: ptr.To(int32(1)),
},
},
},
@@ -2135,6 +2225,7 @@ func TestComputeMachineDeployment(t *testing.T) {
currentMDVersion *string
upgradeConcurrency string
topologyVersion string
+ upgradePlan []string
expectedVersion string
}{
{
@@ -2143,6 +2234,7 @@ func TestComputeMachineDeployment(t *testing.T) {
upgradeConcurrency: "1",
currentMDVersion: nil,
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.3",
},
{
@@ -2151,6 +2243,7 @@ func TestComputeMachineDeployment(t *testing.T) {
upgradeConcurrency: "1",
currentMDVersion: nil,
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.3",
},
{
@@ -2159,6 +2252,7 @@ func TestComputeMachineDeployment(t *testing.T) {
upgradeConcurrency: "1",
currentMDVersion: ptr.To("v1.2.2"),
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.2",
},
{
@@ -2167,6 +2261,7 @@ func TestComputeMachineDeployment(t *testing.T) {
upgradeConcurrency: "2",
currentMDVersion: ptr.To("v1.2.2"),
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.3",
},
}
@@ -2220,6 +2315,9 @@ func TestComputeMachineDeployment(t *testing.T) {
Replicas: ptr.To[int32](2),
}
s.UpgradeTracker.MachineDeployments.MarkUpgrading(tt.upgradingMachineDeployments...)
+ if tt.upgradePlan != nil {
+ s.UpgradeTracker.MachineDeployments.UpgradePlan = tt.upgradePlan
+ }
e := generator{}
@@ -2255,6 +2353,9 @@ func TestComputeMachineDeployment(t *testing.T) {
// Check that UnhealthyNodeConditions are set as expected.
g.Expect(actual.MachineHealthCheck.Spec.Checks.UnhealthyNodeConditions).To(BeComparableTo(unhealthyNodeConditions))
+
+ // Check that UnhealthyMachineConditions are set as expected.
+ g.Expect(actual.MachineHealthCheck.Spec.Checks.UnhealthyMachineConditions).To(BeComparableTo(unhealthyMachineConditions))
})
}
@@ -2536,6 +2637,7 @@ func TestComputeMachinePool(t *testing.T) {
currentMPVersion *string
upgradeConcurrency string
topologyVersion string
+ upgradePlan []string
expectedVersion string
}{
{
@@ -2544,6 +2646,7 @@ func TestComputeMachinePool(t *testing.T) {
upgradeConcurrency: "1",
currentMPVersion: nil,
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.3",
},
{
@@ -2552,6 +2655,7 @@ func TestComputeMachinePool(t *testing.T) {
upgradeConcurrency: "1",
currentMPVersion: nil,
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.3",
},
{
@@ -2560,6 +2664,7 @@ func TestComputeMachinePool(t *testing.T) {
upgradeConcurrency: "1",
currentMPVersion: ptr.To("v1.2.2"),
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.2",
},
{
@@ -2568,6 +2673,7 @@ func TestComputeMachinePool(t *testing.T) {
upgradeConcurrency: "2",
currentMPVersion: ptr.To("v1.2.2"),
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.3",
},
}
@@ -2623,6 +2729,9 @@ func TestComputeMachinePool(t *testing.T) {
Replicas: ptr.To[int32](2),
}
s.UpgradeTracker.MachinePools.MarkUpgrading(tt.upgradingMachinePools...)
+ if tt.upgradePlan != nil {
+ s.UpgradeTracker.MachinePools.UpgradePlan = tt.upgradePlan
+ }
e := generator{}
@@ -2647,11 +2756,15 @@ func TestComputeMachineDeploymentVersion(t *testing.T) {
currentMachineDeploymentState *scope.MachineDeploymentState
upgradingMachineDeployments []string
upgradeConcurrency int
+ controlPlanePendingUpgrade bool
+ controlPlaneWaitingForWorkersUpgrade bool
controlPlaneStartingUpgrade bool
controlPlaneUpgrading bool
controlPlaneProvisioning bool
afterControlPlaneUpgradeHookBlocking bool
+ beforeWorkersUpgradeHookBlocking bool
topologyVersion string
+ upgradePlan []string
expectedVersion string
expectPendingCreate bool
expectPendingUpgrade bool
@@ -2688,6 +2801,18 @@ func TestComputeMachineDeploymentVersion(t *testing.T) {
currentMachineDeploymentState: currentMachineDeploymentState,
upgradingMachineDeployments: []string{},
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
+ expectedVersion: "v1.2.2",
+ expectPendingUpgrade: true,
+ },
+ {
+ // Control plane is considered pending an upgrade if topology version did not yet propagate to the control plane.
+ name: "should return machine deployment's spec.template.spec.version if control plane is pending upgrading",
+ currentMachineDeploymentState: currentMachineDeploymentState,
+ upgradingMachineDeployments: []string{},
+ controlPlanePendingUpgrade: true,
+ topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.2",
expectPendingUpgrade: true,
},
@@ -2698,6 +2823,7 @@ func TestComputeMachineDeploymentVersion(t *testing.T) {
upgradingMachineDeployments: []string{},
controlPlaneUpgrading: true,
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.2",
expectPendingUpgrade: true,
},
@@ -2708,6 +2834,16 @@ func TestComputeMachineDeploymentVersion(t *testing.T) {
upgradingMachineDeployments: []string{},
controlPlaneStartingUpgrade: true,
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
+ expectedVersion: "v1.2.2",
+ expectPendingUpgrade: true,
+ },
+ {
+ name: "should return machine deployment's spec.template.spec.version if the Machine deployment already performed the upgrade step",
+ currentMachineDeploymentState: currentMachineDeploymentState,
+ upgradingMachineDeployments: []string{},
+ topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.2", "v1.2.3"},
expectedVersion: "v1.2.2",
expectPendingUpgrade: true,
},
@@ -2716,9 +2852,31 @@ func TestComputeMachineDeploymentVersion(t *testing.T) {
currentMachineDeploymentState: currentMachineDeploymentState,
upgradingMachineDeployments: []string{},
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.3",
expectPendingUpgrade: false,
},
+ {
+ name: "should return next version from the upgrade plan if mutistep upgrade, if the control plane is not upgrading, not scaling, not ready to upgrade and none of the machine deployments are upgrading",
+ currentMachineDeploymentState: currentMachineDeploymentState,
+ upgradingMachineDeployments: []string{},
+ topologyVersion: "v1.4.3",
+ upgradePlan: []string{"v1.3.3", "v1.4.3"},
+ expectedVersion: "v1.3.3",
+ expectPendingUpgrade: false,
+ },
+ {
+ // Control plane is considered pending an upgrade if topology version did not yet propagate to the control plane.
+ name: "should return next version from the upgrade plan if mutistep upgrade, if the control plane is pending an upgrade but this requires workers to upgrade first",
+ currentMachineDeploymentState: currentMachineDeploymentState,
+ upgradingMachineDeployments: []string{},
+ controlPlanePendingUpgrade: true,
+ controlPlaneWaitingForWorkersUpgrade: true,
+ topologyVersion: "v1.4.3",
+ upgradePlan: []string{"v1.3.3", "v1.4.3"},
+ expectedVersion: "v1.3.3",
+ expectPendingUpgrade: false,
+ },
{
name: "should return machine deployment's spec.template.spec.version if control plane is stable, other machine deployments are upgrading, concurrency limit not reached but AfterControlPlaneUpgrade hook is blocking",
currentMachineDeploymentState: currentMachineDeploymentState,
@@ -2726,15 +2884,28 @@ func TestComputeMachineDeploymentVersion(t *testing.T) {
upgradeConcurrency: 2,
afterControlPlaneUpgradeHookBlocking: true,
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.2",
expectPendingUpgrade: true,
},
+ {
+ name: "should return machine deployment's spec.template.spec.version if control plane is stable, other machine deployments are upgrading, concurrency limit not reached but BeforeWorkersUpgrade hook is blocking",
+ currentMachineDeploymentState: currentMachineDeploymentState,
+ upgradingMachineDeployments: []string{"upgrading-md1"},
+ upgradeConcurrency: 2,
+ beforeWorkersUpgradeHookBlocking: true,
+ topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
+ expectedVersion: "v1.2.2",
+ expectPendingUpgrade: true,
+ },
{
name: "should return cluster.spec.topology.version if control plane is stable, other machine deployments are upgrading, concurrency limit not reached",
currentMachineDeploymentState: currentMachineDeploymentState,
upgradingMachineDeployments: []string{"upgrading-md1"},
upgradeConcurrency: 2,
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.3",
expectPendingUpgrade: false,
},
@@ -2744,6 +2915,7 @@ func TestComputeMachineDeploymentVersion(t *testing.T) {
upgradingMachineDeployments: []string{"upgrading-md1", "upgrading-md2"},
upgradeConcurrency: 2,
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.2",
expectPendingUpgrade: true,
},
@@ -2767,6 +2939,9 @@ func TestComputeMachineDeploymentVersion(t *testing.T) {
UpgradeTracker: scope.NewUpgradeTracker(scope.MaxMDUpgradeConcurrency(tt.upgradeConcurrency)),
HookResponseTracker: scope.NewHookResponseTracker(),
}
+ if tt.upgradePlan != nil {
+ s.UpgradeTracker.MachineDeployments.UpgradePlan = tt.upgradePlan
+ }
if tt.afterControlPlaneUpgradeHookBlocking {
s.HookResponseTracker.Add(runtimehooksv1.AfterControlPlaneUpgrade, &runtimehooksv1.AfterControlPlaneUpgradeResponse{
CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
@@ -2774,14 +2949,24 @@ func TestComputeMachineDeploymentVersion(t *testing.T) {
},
})
}
+ if tt.beforeWorkersUpgradeHookBlocking {
+ s.HookResponseTracker.Add(runtimehooksv1.BeforeWorkersUpgrade, &runtimehooksv1.BeforeWorkersUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ RetryAfterSeconds: 10,
+ },
+ })
+ }
s.UpgradeTracker.ControlPlane.IsStartingUpgrade = tt.controlPlaneStartingUpgrade
s.UpgradeTracker.ControlPlane.IsUpgrading = tt.controlPlaneUpgrading
s.UpgradeTracker.ControlPlane.IsProvisioning = tt.controlPlaneProvisioning
+ s.UpgradeTracker.ControlPlane.IsPendingUpgrade = tt.controlPlanePendingUpgrade
+ s.UpgradeTracker.ControlPlane.IsWaitingForWorkersUpgrade = tt.controlPlaneWaitingForWorkersUpgrade
s.UpgradeTracker.MachineDeployments.MarkUpgrading(tt.upgradingMachineDeployments...)
e := generator{}
- version := e.computeMachineDeploymentVersion(s, tt.machineDeploymentTopology, tt.currentMachineDeploymentState)
+ version, err := e.computeMachineDeploymentVersion(ctx, s, tt.machineDeploymentTopology, tt.currentMachineDeploymentState)
+ g.Expect(err).NotTo(HaveOccurred())
g.Expect(version).To(Equal(tt.expectedVersion))
if tt.currentMachineDeploymentState != nil {
@@ -2816,11 +3001,15 @@ func TestComputeMachinePoolVersion(t *testing.T) {
currentMachinePoolState *scope.MachinePoolState
upgradingMachinePools []string
upgradeConcurrency int
+ controlPlanePendingUpgrade bool
+ controlPlaneWaitingForWorkersUpgrade bool
controlPlaneStartingUpgrade bool
controlPlaneUpgrading bool
controlPlaneProvisioning bool
afterControlPlaneUpgradeHookBlocking bool
+ beforeWorkersUpgradeHookBlocking bool
topologyVersion string
+ upgradePlan []string
expectedVersion string
expectPendingCreate bool
expectPendingUpgrade bool
@@ -2857,9 +3046,21 @@ func TestComputeMachinePoolVersion(t *testing.T) {
currentMachinePoolState: currentMachinePoolState,
upgradingMachinePools: []string{},
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.2",
expectPendingUpgrade: true,
},
+ {
+ // Control plane is considered pending an upgrade if topology version did not yet propagate to the control plane.
+ name: "should return machine MachinePool's spec.template.spec.version if control plane is pending upgrading",
+ currentMachinePoolState: currentMachinePoolState,
+ upgradingMachinePools: []string{},
+ controlPlanePendingUpgrade: true,
+ topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
+ expectedVersion: "v1.2.2",
+ expectPendingUpgrade: true,
+ },
{
// Control plane is considered upgrading if the control plane's spec.version and status.version is not equal.
name: "should return MachinePool's spec.template.spec.version if control plane is upgrading",
@@ -2867,6 +3068,7 @@ func TestComputeMachinePoolVersion(t *testing.T) {
upgradingMachinePools: []string{},
controlPlaneUpgrading: true,
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.2",
expectPendingUpgrade: true,
},
@@ -2877,17 +3079,49 @@ func TestComputeMachinePoolVersion(t *testing.T) {
upgradingMachinePools: []string{},
controlPlaneStartingUpgrade: true,
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.2",
expectPendingUpgrade: true,
},
+ {
+ name: "should return MachinePool's spec.template.spec.version if the MachinePool already performed the upgrade step",
+ currentMachinePoolState: currentMachinePoolState,
+ upgradingMachinePools: []string{},
+ topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.2", "v1.2.3"},
+ expectedVersion: "v1.2.2",
+ expectPendingUpgrade: true,
+ },
{
name: "should return cluster.spec.topology.version if the control plane is not upgrading, not scaling, not ready to upgrade and none of the MachinePools are upgrading",
currentMachinePoolState: currentMachinePoolState,
upgradingMachinePools: []string{},
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.3",
expectPendingUpgrade: false,
},
+ {
+ name: "should return next version in the upgrade plan if multistep upgrade, if the control plane is not upgrading, not scaling, not ready to upgrade and none of the MachinePools are upgrading",
+ currentMachinePoolState: currentMachinePoolState,
+ upgradingMachinePools: []string{},
+ topologyVersion: "v1.4.3",
+ upgradePlan: []string{"v1.3.3", "v1.4.3"},
+ expectedVersion: "v1.3.3",
+ expectPendingUpgrade: false,
+ },
+ {
+ // Control plane is considered pending an upgrade if topology version did not yet propagate to the control plane.
+ name: "should return next version in the upgrade plan if multistep upgrade, if the control plane is pending an upgrade but this requires workers to upgrade first",
+ currentMachinePoolState: currentMachinePoolState,
+ upgradingMachinePools: []string{},
+ controlPlanePendingUpgrade: true,
+ controlPlaneWaitingForWorkersUpgrade: true,
+ topologyVersion: "v1.4.3",
+ upgradePlan: []string{"v1.3.3", "v1.4.3"},
+ expectedVersion: "v1.3.3",
+ expectPendingUpgrade: false,
+ },
{
name: "should return MachinePool's spec.template.spec.version if control plane is stable, other MachinePools are upgrading, concurrency limit not reached but AfterControlPlaneUpgrade hook is blocking",
currentMachinePoolState: currentMachinePoolState,
@@ -2895,15 +3129,28 @@ func TestComputeMachinePoolVersion(t *testing.T) {
upgradeConcurrency: 2,
afterControlPlaneUpgradeHookBlocking: true,
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.2",
expectPendingUpgrade: true,
},
+ {
+ name: "should return MachinePool's spec.template.spec.version if control plane is stable, other MachinePools are upgrading, concurrency limit not reached but BeforeWorkersUpgrade hook is blocking",
+ currentMachinePoolState: currentMachinePoolState,
+ upgradingMachinePools: []string{"upgrading-mp1"},
+ upgradeConcurrency: 2,
+ beforeWorkersUpgradeHookBlocking: true,
+ topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
+ expectedVersion: "v1.2.2",
+ expectPendingUpgrade: true,
+ },
{
name: "should return cluster.spec.topology.version if control plane is stable, other MachinePools are upgrading, concurrency limit not reached",
currentMachinePoolState: currentMachinePoolState,
upgradingMachinePools: []string{"upgrading-mp1"},
upgradeConcurrency: 2,
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.3",
expectPendingUpgrade: false,
},
@@ -2913,6 +3160,7 @@ func TestComputeMachinePoolVersion(t *testing.T) {
upgradingMachinePools: []string{"upgrading-mp1", "upgrading-mp2"},
upgradeConcurrency: 2,
topologyVersion: "v1.2.3",
+ upgradePlan: []string{"v1.2.3"},
expectedVersion: "v1.2.2",
expectPendingUpgrade: true,
},
@@ -2943,14 +3191,27 @@ func TestComputeMachinePoolVersion(t *testing.T) {
},
})
}
+ if tt.beforeWorkersUpgradeHookBlocking {
+ s.HookResponseTracker.Add(runtimehooksv1.BeforeWorkersUpgrade, &runtimehooksv1.BeforeWorkersUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ RetryAfterSeconds: 10,
+ },
+ })
+ }
s.UpgradeTracker.ControlPlane.IsStartingUpgrade = tt.controlPlaneStartingUpgrade
s.UpgradeTracker.ControlPlane.IsUpgrading = tt.controlPlaneUpgrading
s.UpgradeTracker.ControlPlane.IsProvisioning = tt.controlPlaneProvisioning
+ s.UpgradeTracker.ControlPlane.IsPendingUpgrade = tt.controlPlanePendingUpgrade
+ s.UpgradeTracker.ControlPlane.IsWaitingForWorkersUpgrade = tt.controlPlaneWaitingForWorkersUpgrade
s.UpgradeTracker.MachinePools.MarkUpgrading(tt.upgradingMachinePools...)
+ if tt.upgradePlan != nil {
+ s.UpgradeTracker.MachinePools.UpgradePlan = tt.upgradePlan
+ }
e := generator{}
- version := e.computeMachinePoolVersion(s, tt.machinePoolTopology, tt.currentMachinePoolState)
+ version, err := e.computeMachinePoolVersion(ctx, s, tt.machinePoolTopology, tt.currentMachinePoolState)
+ g.Expect(err).NotTo(HaveOccurred())
g.Expect(version).To(Equal(tt.expectedVersion))
if tt.currentMachinePoolState != nil {
@@ -3419,6 +3680,18 @@ func Test_computeMachineHealthCheck(t *testing.T) {
TimeoutSeconds: ptr.To(int32(5 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionUnknown,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionFalse,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
NodeStartupTimeoutSeconds: ptr.To(int32(1)),
}
selector := &metav1.LabelSelector{MatchLabels: map[string]string{
@@ -3461,6 +3734,18 @@ func Test_computeMachineHealthCheck(t *testing.T) {
TimeoutSeconds: ptr.To(int32(5 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionUnknown,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionFalse,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
NodeStartupTimeoutSeconds: ptr.To(int32(1)),
},
},
@@ -3607,53 +3892,103 @@ func TestCalculateRefDesiredAPIVersion(t *testing.T) {
}
}
-func validateClusterParameter(originalCluster *clusterv1.Cluster) func(req runtimehooksv1.RequestObject) error {
- // return a func that allows to check if expected transformations are applied to the Cluster parameter which is
- // included in the payload for lifecycle hooks calls.
- return func(req runtimehooksv1.RequestObject) error {
- var cluster clusterv1beta1.Cluster
- switch req := req.(type) {
- case *runtimehooksv1.BeforeClusterUpgradeRequest:
- cluster = req.Cluster
- case *runtimehooksv1.AfterControlPlaneUpgradeRequest:
- cluster = req.Cluster
- default:
- return fmt.Errorf("unhandled request type %T", req)
- }
+func TestGenerate(t *testing.T) {
+ // templates and ClusterClass
+ infrastructureClusterTemplate := builder.InfrastructureClusterTemplate(metav1.NamespaceDefault, "template1").
+ Build()
+ controlPlaneTemplate := builder.ControlPlaneTemplate(metav1.NamespaceDefault, "template1").
+ Build()
+ clusterClass := builder.ClusterClass(metav1.NamespaceDefault, "class1").
+ WithInfrastructureClusterTemplate(infrastructureClusterTemplate).
+ WithControlPlaneTemplate(controlPlaneTemplate).
+ Build()
- // check if managed fields and well know annotations have been removed from the Cluster parameter included in the payload lifecycle hooks calls.
- if cluster.GetManagedFields() != nil {
- return errors.New("managedFields should have been cleaned up")
- }
- if _, ok := cluster.Annotations[corev1.LastAppliedConfigAnnotation]; ok {
- return errors.New("last-applied-configuration annotation should have been cleaned up")
- }
- if _, ok := cluster.Annotations[conversion.DataAnnotation]; ok {
- return errors.New("conversion annotation should have been cleaned up")
- }
+ // aggregating templates and cluster class into a blueprint
+ blueprint := &scope.ClusterBlueprint{
+ ClusterClass: clusterClass,
+ InfrastructureClusterTemplate: infrastructureClusterTemplate,
+ ControlPlane: &scope.ControlPlaneBlueprint{
+ Template: controlPlaneTemplate,
+ },
+ }
- // check the Cluster parameter included in the payload lifecycle hooks calls has been properly converted from v1beta2 to v1beta1.
- // Note: to perform this check we convert the parameter back to v1beta2 and compare with the original cluster +/- expected transformations.
- v1beta2Cluster := &clusterv1.Cluster{}
- if err := cluster.ConvertTo(v1beta2Cluster); err != nil {
- return err
- }
+ // current cluster objects
+ cluster := &clusterv1.Cluster{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "cluster1",
+ Namespace: metav1.NamespaceDefault,
+ },
+ }
- originalClusterCopy := originalCluster.DeepCopy()
- originalClusterCopy.SetManagedFields(nil)
- if originalClusterCopy.Annotations != nil {
- annotations := maps.Clone(cluster.Annotations)
- delete(annotations, corev1.LastAppliedConfigAnnotation)
- delete(annotations, conversion.DataAnnotation)
- originalClusterCopy.Annotations = annotations
- }
+ version := "v1.33.0"
+ workerInfrastructureMachinePool := builder.InfrastructureMachinePoolTemplate(metav1.NamespaceDefault, "linux-worker-inframachinepool").
+ Build()
+ workerBootstrapConfig := builder.BootstrapTemplate(metav1.NamespaceDefault, "linux-worker-bootstrap").
+ Build()
+
+ node := &corev1.Node{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "node-0",
+ },
+ Status: corev1.NodeStatus{
+ NodeInfo: corev1.NodeSystemInfo{
+ KubeletVersion: "v1.32.0", // Not yet upgraded to v1.33.0.
+ },
+ },
+ }
+ crd := builder.GenericControlPlaneCRD.DeepCopy()
+
+ t.Run("Generate desired state and verify MP is marked as upgrading", func(t *testing.T) {
+ g := NewWithT(t)
+
+ fakeClient := fake.NewClientBuilder().WithScheme(fakeScheme).WithObjects(node, crd).Build()
+ fakeRuntimeClient := fakeruntimeclient.NewRuntimeClientBuilder().Build()
+ clusterCache := clustercache.NewFakeClusterCache(fakeClient, client.ObjectKey{Name: cluster.Name, Namespace: cluster.Namespace})
+
+ desiredStateGenerator, err := NewGenerator(
+ fakeClient,
+ clusterCache,
+ fakeRuntimeClient,
+ cache.New[cache.HookEntry](cache.HookCacheDefaultTTL),
+ cache.New[GenerateUpgradePlanCacheEntry](10*time.Minute),
+ )
+ g.Expect(err).ToNot(HaveOccurred())
- // drop conditions, it is not possible to round trip without the data annotation.
- originalClusterCopy.Status.Conditions = nil
+ s := scope.New(cluster)
+ s.Blueprint = blueprint
+
+ mp := builder.MachinePool(metav1.NamespaceDefault, "existing-pool").
+ WithVersion(version).
+ WithReplicas(3).
+ WithBootstrap(workerBootstrapConfig).
+ WithInfrastructure(workerInfrastructureMachinePool).
+ WithStatus(clusterv1.MachinePoolStatus{
+ NodeRefs: []corev1.ObjectReference{
+ {
+ Kind: "Node",
+ Namespace: metav1.NamespaceDefault,
+ Name: "node-0",
+ },
+ },
+ }).
+ Build()
- if !apiequality.Semantic.DeepEqual(originalClusterCopy, v1beta2Cluster) {
- return errors.Errorf("call to extension is not passing the expected cluster object: %s", cmp.Diff(originalClusterCopy, v1beta2Cluster))
+ s.Current.MachinePools = map[string]*scope.MachinePoolState{
+ "pool-of-machines": {
+ Object: mp,
+ BootstrapObject: workerBootstrapConfig,
+ InfrastructureMachinePoolObject: workerInfrastructureMachinePool,
+ },
}
- return nil
- }
+
+ // Get the desired state.
+ desiredState, err := desiredStateGenerator.Generate(ctx, s)
+ g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(desiredState).ToNot(BeNil())
+ g.Expect(desiredState.Cluster).ToNot(BeNil())
+ g.Expect(desiredState.InfrastructureCluster).ToNot(BeNil())
+ g.Expect(desiredState.ControlPlane).ToNot(BeNil())
+ // Verify MP is marked as upgrading
+ g.Expect(s.UpgradeTracker.MachinePools.UpgradingNames()).To(ConsistOf(mp.Name))
+ })
}
diff --git a/exp/topology/desiredstate/lifecycle_hooks.go b/exp/topology/desiredstate/lifecycle_hooks.go
new file mode 100644
index 000000000000..0581856cfe98
--- /dev/null
+++ b/exp/topology/desiredstate/lifecycle_hooks.go
@@ -0,0 +1,420 @@
+/*
+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 desiredstate
+
+import (
+ "context"
+ "fmt"
+ "slices"
+ "strings"
+ "time"
+
+ "github.com/pkg/errors"
+ ctrl "sigs.k8s.io/controller-runtime"
+
+ clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1"
+ runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog"
+ "sigs.k8s.io/cluster-api/exp/topology/scope"
+ "sigs.k8s.io/cluster-api/internal/hooks"
+ "sigs.k8s.io/cluster-api/util/cache"
+)
+
+// callBeforeClusterUpgradeHook calls the BeforeClusterUpgrade at the beginning of an upgrade.
+// NOTE: the hook should be called only at the beginning of an upgrade sequence (it should not be called when in the middle of a multistep upgrade sequence);
+// to detect if we are at the beginning of an upgrade, the code checks if the intent to call the AfterClusterUpgrade is not yet tracked.
+func (g *generator) callBeforeClusterUpgradeHook(ctx context.Context, s *scope.Scope, currentVersion *string, topologyVersion string) (bool, error) {
+ log := ctrl.LoggerFrom(ctx)
+
+ if !hooks.IsPending(runtimehooksv1.AfterClusterUpgrade, s.Current.Cluster) {
+ var hookAnnotations []string
+ for key := range s.Current.Cluster.Annotations {
+ if strings.HasPrefix(key, clusterv1.BeforeClusterUpgradeHookAnnotationPrefix) {
+ hookAnnotations = append(hookAnnotations, key)
+ }
+ }
+ if len(hookAnnotations) > 0 {
+ slices.Sort(hookAnnotations)
+ message := fmt.Sprintf("annotations %s are set", strings.Join(hookAnnotations, ", "))
+ if len(hookAnnotations) == 1 {
+ message = fmt.Sprintf("annotation %s is set", strings.Join(hookAnnotations, ", "))
+ }
+ // Add the hook with a response to the tracker so we can later update the condition.
+ s.HookResponseTracker.Add(runtimehooksv1.BeforeClusterUpgrade, &runtimehooksv1.BeforeClusterUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ // RetryAfterSeconds needs to be set because having only hooks without RetryAfterSeconds
+ // would lead to not updating the condition. We can rely on getting an event when the
+ // annotation gets removed so we set twice of the default sync-period to not cause additional reconciles.
+ RetryAfterSeconds: 20 * 60,
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Message: message,
+ },
+ },
+ })
+
+ log.Info(fmt.Sprintf("Cluster upgrade from version %s to version %s is blocked by %s hook (via annotations)", *currentVersion, topologyVersion, runtimecatalog.HookName(runtimehooksv1.BeforeClusterUpgrade)), "hooks", strings.Join(hookAnnotations, ","),
+ "ControlPlaneUpgrades", toUpgradeStep(s.UpgradeTracker.ControlPlane.UpgradePlan),
+ "WorkersUpgrades", toUpgradeStep(s.UpgradeTracker.MachineDeployments.UpgradePlan, s.UpgradeTracker.MachinePools.UpgradePlan),
+ )
+ return false, nil
+ }
+
+ // Return quickly if the hook is not defined.
+ extensionHandlers, err := g.RuntimeClient.GetAllExtensions(ctx, runtimehooksv1.BeforeClusterUpgrade, s.Current.Cluster)
+ if err != nil {
+ return false, err
+ }
+ if len(extensionHandlers) == 0 {
+ return true, nil
+ }
+
+ if cacheEntry, ok := g.hookCache.Has(cache.NewHookEntryKey(s.Current.Cluster, runtimehooksv1.BeforeClusterUpgrade)); ok {
+ if requeueAfter, requeue := cacheEntry.ShouldRequeue(time.Now()); requeue {
+ log.V(5).Info(fmt.Sprintf("Skip calling BeforeClusterUpgrade hook, retry after %s", requeueAfter))
+ s.HookResponseTracker.Add(runtimehooksv1.BeforeClusterUpgrade, cacheEntry.ToResponse(&runtimehooksv1.BeforeClusterUpgradeResponse{}, requeueAfter))
+ return false, nil
+ }
+ }
+
+ v1beta1Cluster := &clusterv1beta1.Cluster{}
+ // DeepCopy cluster because ConvertFrom has side effects like adding the conversion annotation.
+ if err := v1beta1Cluster.ConvertFrom(s.Current.Cluster.DeepCopy()); err != nil {
+ return false, errors.Wrap(err, "error converting Cluster to v1beta1 Cluster")
+ }
+
+ hookRequest := &runtimehooksv1.BeforeClusterUpgradeRequest{
+ Cluster: *cleanupV1Beta1Cluster(v1beta1Cluster),
+ FromKubernetesVersion: *currentVersion,
+ ToKubernetesVersion: topologyVersion,
+ ControlPlaneUpgrades: toUpgradeStep(s.UpgradeTracker.ControlPlane.UpgradePlan),
+ WorkersUpgrades: toUpgradeStep(s.UpgradeTracker.MachineDeployments.UpgradePlan, s.UpgradeTracker.MachinePools.UpgradePlan),
+ }
+ hookResponse := &runtimehooksv1.BeforeClusterUpgradeResponse{}
+ if err := g.RuntimeClient.CallAllExtensions(ctx, runtimehooksv1.BeforeClusterUpgrade, s.Current.Cluster, hookRequest, hookResponse); err != nil {
+ return false, err
+ }
+ // Add the response to the tracker so we can later update condition or requeue when required.
+ s.HookResponseTracker.Add(runtimehooksv1.BeforeClusterUpgrade, hookResponse)
+
+ if hookResponse.RetryAfterSeconds != 0 {
+ // Cannot pickup the new version right now. Need to try again later.
+ g.hookCache.Add(cache.NewHookEntry(s.Current.Cluster, runtimehooksv1.BeforeClusterUpgrade, time.Now().Add(time.Duration(hookResponse.RetryAfterSeconds)*time.Second), hookResponse.GetMessage()))
+ log.Info(fmt.Sprintf("Cluster upgrade from version %s to version %s is blocked by %s hook, retry after %ds", hookRequest.FromKubernetesVersion, hookRequest.ToKubernetesVersion, runtimecatalog.HookName(runtimehooksv1.BeforeClusterUpgrade), hookResponse.RetryAfterSeconds),
+ "ControlPlaneUpgrades", hookRequest.ControlPlaneUpgrades,
+ "WorkersUpgrades", hookRequest.WorkersUpgrades,
+ )
+ return false, nil
+ }
+
+ log.Info(fmt.Sprintf("Cluster upgrade from version %s to version %s unblocked by %s hook", hookRequest.FromKubernetesVersion, hookRequest.ToKubernetesVersion, runtimecatalog.HookName(runtimehooksv1.BeforeClusterUpgrade)),
+ "ControlPlaneUpgrades", hookRequest.ControlPlaneUpgrades,
+ "WorkersUpgrades", hookRequest.WorkersUpgrades,
+ )
+ }
+ return true, nil
+}
+
+// callBeforeControlPlaneUpgradeHook calls the BeforeControlPlaneUpgrade before the control plane picks up a new control plane version,
+// no matter if this is an intermediate versions of an upgrade plan or the target version of an upgrade plan.
+// NOTE: when an upgrade starts, the hook should be called after the BeforeClusterUpgrade hook.
+// NOTE: the hook doesn't need call intent tracking: it is always called before picking up a new control plane version.
+func (g *generator) callBeforeControlPlaneUpgradeHook(ctx context.Context, s *scope.Scope, currentVersion *string, nextVersion string) (bool, error) {
+ log := ctrl.LoggerFrom(ctx)
+
+ // Return quickly if the hook is not defined.
+ extensionHandlers, err := g.RuntimeClient.GetAllExtensions(ctx, runtimehooksv1.BeforeControlPlaneUpgrade, s.Current.Cluster)
+ if err != nil {
+ return false, err
+ }
+ if len(extensionHandlers) == 0 {
+ return true, nil
+ }
+
+ if cacheEntry, ok := g.hookCache.Has(cache.NewHookEntryKey(s.Current.Cluster, runtimehooksv1.BeforeControlPlaneUpgrade)); ok {
+ if requeueAfter, requeue := cacheEntry.ShouldRequeue(time.Now()); requeue {
+ log.V(5).Info(fmt.Sprintf("Skip calling BeforeControlPlaneUpgrade hook, retry after %s", requeueAfter))
+ s.HookResponseTracker.Add(runtimehooksv1.BeforeControlPlaneUpgrade, cacheEntry.ToResponse(&runtimehooksv1.BeforeControlPlaneUpgradeResponse{}, requeueAfter))
+ return false, nil
+ }
+ }
+
+ // NOTE: the hook should always be called before piking up a new version.
+ v1beta1Cluster := &clusterv1beta1.Cluster{}
+ // DeepCopy cluster because ConvertFrom has side effects like adding the conversion annotation.
+ if err := v1beta1Cluster.ConvertFrom(s.Current.Cluster.DeepCopy()); err != nil {
+ return false, errors.Wrap(err, "error converting Cluster to v1beta1 Cluster")
+ }
+
+ hookRequest := &runtimehooksv1.BeforeControlPlaneUpgradeRequest{
+ Cluster: *cleanupV1Beta1Cluster(v1beta1Cluster),
+ FromKubernetesVersion: *currentVersion,
+ ToKubernetesVersion: nextVersion,
+ ControlPlaneUpgrades: toUpgradeStep(s.UpgradeTracker.ControlPlane.UpgradePlan),
+ WorkersUpgrades: toUpgradeStep(s.UpgradeTracker.MachineDeployments.UpgradePlan, s.UpgradeTracker.MachinePools.UpgradePlan),
+ }
+ hookResponse := &runtimehooksv1.BeforeControlPlaneUpgradeResponse{}
+ if err := g.RuntimeClient.CallAllExtensions(ctx, runtimehooksv1.BeforeControlPlaneUpgrade, s.Current.Cluster, hookRequest, hookResponse); err != nil {
+ return false, err
+ }
+ // Add the response to the tracker so we can later update condition or requeue when required.
+ s.HookResponseTracker.Add(runtimehooksv1.BeforeControlPlaneUpgrade, hookResponse)
+
+ if hookResponse.RetryAfterSeconds != 0 {
+ // Cannot pickup the new version right now. Need to try again later.
+ g.hookCache.Add(cache.NewHookEntry(s.Current.Cluster, runtimehooksv1.BeforeControlPlaneUpgrade, time.Now().Add(time.Duration(hookResponse.RetryAfterSeconds)*time.Second), hookResponse.GetMessage()))
+ log.Info(fmt.Sprintf("Control plane upgrade from version %s to version %s is blocked by %s hook, retry after %ds", hookRequest.FromKubernetesVersion, hookRequest.ToKubernetesVersion, runtimecatalog.HookName(runtimehooksv1.BeforeControlPlaneUpgrade), hookResponse.RetryAfterSeconds),
+ "ControlPlaneUpgrades", hookRequest.ControlPlaneUpgrades,
+ "WorkersUpgrades", hookRequest.WorkersUpgrades,
+ )
+ return false, nil
+ }
+
+ log.Info(fmt.Sprintf("Control plane upgrade from version %s to version %s unblocked by %s hook", hookRequest.FromKubernetesVersion, hookRequest.ToKubernetesVersion, runtimecatalog.HookName(runtimehooksv1.BeforeControlPlaneUpgrade)),
+ "ControlPlaneUpgrades", hookRequest.ControlPlaneUpgrades,
+ "WorkersUpgrades", hookRequest.WorkersUpgrades,
+ )
+
+ return true, nil
+}
+
+// callAfterControlPlaneUpgradeHook calls the AfterControlPlaneUpgrade after the control plane upgrade is completed,
+// no matter if this is an intermediate versions of an upgrade plan or the target version of an upgrade plan.
+// NOTE: computeControlPlaneVersion records intent to call this hook when picking up a new control plane version.
+func (g *generator) callAfterControlPlaneUpgradeHook(ctx context.Context, s *scope.Scope, currentVersion *string) (bool, error) {
+ log := ctrl.LoggerFrom(ctx)
+
+ // Call the hook only if we are tracking the intent to do so. If it is not tracked it means we don't need to call the
+ // hook because we didn't go through an upgrade or we already called the hook after the upgrade.
+ if hooks.IsPending(runtimehooksv1.AfterControlPlaneUpgrade, s.Current.Cluster) {
+ // Return quickly if the hook is not defined.
+ extensionHandlers, err := g.RuntimeClient.GetAllExtensions(ctx, runtimehooksv1.AfterControlPlaneUpgrade, s.Current.Cluster)
+ if err != nil {
+ return false, err
+ }
+ if len(extensionHandlers) == 0 {
+ if err := hooks.MarkAsDone(ctx, g.Client, s.Current.Cluster, false, runtimehooksv1.AfterControlPlaneUpgrade); err != nil {
+ return false, err
+ }
+ return true, nil
+ }
+
+ if cacheEntry, ok := g.hookCache.Has(cache.NewHookEntryKey(s.Current.Cluster, runtimehooksv1.AfterControlPlaneUpgrade)); ok {
+ if requeueAfter, requeue := cacheEntry.ShouldRequeue(time.Now()); requeue {
+ log.V(5).Info(fmt.Sprintf("Skip calling AfterControlPlaneUpgrade hook, retry after %s", requeueAfter))
+ s.HookResponseTracker.Add(runtimehooksv1.AfterControlPlaneUpgrade, cacheEntry.ToResponse(&runtimehooksv1.AfterControlPlaneUpgradeResponse{}, requeueAfter))
+ return false, nil
+ }
+ }
+
+ // DeepCopy cluster because ConvertFrom has side effects like adding the conversion annotation.
+ v1beta1Cluster := &clusterv1beta1.Cluster{}
+ if err := v1beta1Cluster.ConvertFrom(s.Current.Cluster.DeepCopy()); err != nil {
+ return false, errors.Wrap(err, "error converting Cluster to v1beta1 Cluster")
+ }
+
+ // Call all the registered extension for the hook.
+ hookRequest := &runtimehooksv1.AfterControlPlaneUpgradeRequest{
+ Cluster: *cleanupV1Beta1Cluster(v1beta1Cluster),
+ KubernetesVersion: *currentVersion,
+ ControlPlaneUpgrades: toUpgradeStep(s.UpgradeTracker.ControlPlane.UpgradePlan),
+ WorkersUpgrades: toUpgradeStep(s.UpgradeTracker.MachineDeployments.UpgradePlan, s.UpgradeTracker.MachinePools.UpgradePlan),
+ }
+ hookResponse := &runtimehooksv1.AfterControlPlaneUpgradeResponse{}
+ if err := g.RuntimeClient.CallAllExtensions(ctx, runtimehooksv1.AfterControlPlaneUpgrade, s.Current.Cluster, hookRequest, hookResponse); err != nil {
+ return false, err
+ }
+ // Add the response to the tracker so we can later update condition or requeue when required.
+ s.HookResponseTracker.Add(runtimehooksv1.AfterControlPlaneUpgrade, hookResponse)
+
+ if hookResponse.RetryAfterSeconds != 0 {
+ g.hookCache.Add(cache.NewHookEntry(s.Current.Cluster, runtimehooksv1.AfterControlPlaneUpgrade, time.Now().Add(time.Duration(hookResponse.RetryAfterSeconds)*time.Second), hookResponse.GetMessage()))
+ log.Info(fmt.Sprintf("Control plane upgrade to version %s completed but next steps are blocked by %s hook, retry after %ds", hookRequest.KubernetesVersion, runtimecatalog.HookName(runtimehooksv1.AfterControlPlaneUpgrade), hookResponse.RetryAfterSeconds),
+ "ControlPlaneUpgrades", hookRequest.ControlPlaneUpgrades,
+ "WorkersUpgrades", hookRequest.WorkersUpgrades,
+ )
+ return false, nil
+ }
+ if err := hooks.MarkAsDone(ctx, g.Client, s.Current.Cluster, false, runtimehooksv1.AfterControlPlaneUpgrade); err != nil {
+ return false, err
+ }
+
+ log.Info(fmt.Sprintf("Control plane upgrade to version %s and %s hook completed, next steps unblocked", hookRequest.KubernetesVersion, runtimecatalog.HookName(runtimehooksv1.AfterControlPlaneUpgrade)),
+ "ControlPlaneUpgrades", hookRequest.ControlPlaneUpgrades,
+ "WorkersUpgrades", hookRequest.WorkersUpgrades,
+ )
+ }
+ return true, nil
+}
+
+// callBeforeWorkersUpgradeHook calls the BeforeWorkersUpgrade before workers starts picking up a new worker version,
+// no matter if this is an intermediate versions of an upgrade plan or the target version of an upgrade plan.
+// NOTE: computeControlPlaneVersion records intent to call this hook when picking up a new control plane version
+// that exists also in the workers upgrade plan.
+func (g *generator) callBeforeWorkersUpgradeHook(ctx context.Context, s *scope.Scope, currentVersion *string, nextVersion string) (bool, error) {
+ log := ctrl.LoggerFrom(ctx)
+
+ // Call the hook only if we are tracking the intent to do so. If it is not tracked it means we don't need to call the
+ // hook because we didn't go through an upgrade or we already called the hook after the upgrade.
+ if hooks.IsPending(runtimehooksv1.BeforeWorkersUpgrade, s.Current.Cluster) {
+ // Return quickly if the hook is not defined.
+ extensionHandlers, err := g.RuntimeClient.GetAllExtensions(ctx, runtimehooksv1.BeforeWorkersUpgrade, s.Current.Cluster)
+ if err != nil {
+ return false, err
+ }
+ if len(extensionHandlers) == 0 {
+ if err := hooks.MarkAsDone(ctx, g.Client, s.Current.Cluster, false, runtimehooksv1.BeforeWorkersUpgrade); err != nil {
+ return false, err
+ }
+ return true, nil
+ }
+
+ if cacheEntry, ok := g.hookCache.Has(cache.NewHookEntryKey(s.Current.Cluster, runtimehooksv1.BeforeWorkersUpgrade)); ok {
+ if requeueAfter, requeue := cacheEntry.ShouldRequeue(time.Now()); requeue {
+ log.V(5).Info(fmt.Sprintf("Skip calling BeforeWorkersUpgrade hook, retry after %s", requeueAfter))
+ s.HookResponseTracker.Add(runtimehooksv1.BeforeWorkersUpgrade, cacheEntry.ToResponse(&runtimehooksv1.BeforeWorkersUpgradeResponse{}, requeueAfter))
+ return false, nil
+ }
+ }
+
+ // DeepCopy cluster because ConvertFrom has side effects like adding the conversion annotation.
+ v1beta1Cluster := &clusterv1beta1.Cluster{}
+ if err := v1beta1Cluster.ConvertFrom(s.Current.Cluster.DeepCopy()); err != nil {
+ return false, errors.Wrap(err, "error converting Cluster to v1beta1 Cluster")
+ }
+
+ hookRequest := &runtimehooksv1.BeforeWorkersUpgradeRequest{
+ Cluster: *cleanupV1Beta1Cluster(v1beta1Cluster),
+ FromKubernetesVersion: *currentVersion,
+ ToKubernetesVersion: nextVersion,
+ ControlPlaneUpgrades: toUpgradeStep(s.UpgradeTracker.ControlPlane.UpgradePlan),
+ WorkersUpgrades: toUpgradeStep(s.UpgradeTracker.MachineDeployments.UpgradePlan, s.UpgradeTracker.MachinePools.UpgradePlan),
+ }
+ hookResponse := &runtimehooksv1.BeforeWorkersUpgradeResponse{}
+ if err := g.RuntimeClient.CallAllExtensions(ctx, runtimehooksv1.BeforeWorkersUpgrade, s.Current.Cluster, hookRequest, hookResponse); err != nil {
+ return false, err
+ }
+ // Add the response to the tracker so we can later update condition or requeue when required.
+ s.HookResponseTracker.Add(runtimehooksv1.BeforeWorkersUpgrade, hookResponse)
+
+ if hookResponse.RetryAfterSeconds != 0 {
+ // Cannot pickup the new version right now. Need to try again later.
+ g.hookCache.Add(cache.NewHookEntry(s.Current.Cluster, runtimehooksv1.BeforeWorkersUpgrade, time.Now().Add(time.Duration(hookResponse.RetryAfterSeconds)*time.Second), hookResponse.GetMessage()))
+ log.Info(fmt.Sprintf("Workers upgrade from version %s to version %s is blocked by %s hook, retry after %ds", hookRequest.FromKubernetesVersion, hookRequest.ToKubernetesVersion, runtimecatalog.HookName(runtimehooksv1.BeforeWorkersUpgrade), hookResponse.RetryAfterSeconds),
+ "ControlPlaneUpgrades", hookRequest.ControlPlaneUpgrades,
+ "WorkersUpgrades", hookRequest.WorkersUpgrades,
+ )
+ return false, nil
+ }
+ if err := hooks.MarkAsDone(ctx, g.Client, s.Current.Cluster, false, runtimehooksv1.BeforeWorkersUpgrade); err != nil {
+ return false, err
+ }
+
+ log.Info(fmt.Sprintf("Workers upgrade from version %s to version %s unblocked by %s hook", hookRequest.FromKubernetesVersion, hookRequest.ToKubernetesVersion, runtimecatalog.HookName(runtimehooksv1.BeforeWorkersUpgrade)),
+ "ControlPlaneUpgrades", hookRequest.ControlPlaneUpgrades,
+ "WorkersUpgrades", hookRequest.WorkersUpgrades,
+ )
+ }
+
+ return true, nil
+}
+
+// callAfterWorkersUpgradeHook calls the AfterWorkersUpgrade after the worker upgrade is completed,
+// no matter if this is an intermediate versions of an upgrade plan or the target version of an upgrade plan.
+// NOTE: computeControlPlaneVersion records intent to call this hook when picking up a new control plane version
+// that exists also in the workers upgrade plan.
+func (g *generator) callAfterWorkersUpgradeHook(ctx context.Context, s *scope.Scope, currentVersion *string) (bool, error) {
+ log := ctrl.LoggerFrom(ctx)
+
+ // Call the hook only if we are tracking the intent to do so. If it is not tracked it means we don't need to call the
+ // hook because we didn't go through an upgrade or we already called the hook after the upgrade.
+ if hooks.IsPending(runtimehooksv1.AfterWorkersUpgrade, s.Current.Cluster) {
+ // Return quickly if the hook is not defined.
+ extensionHandlers, err := g.RuntimeClient.GetAllExtensions(ctx, runtimehooksv1.AfterWorkersUpgrade, s.Current.Cluster)
+ if err != nil {
+ return false, err
+ }
+ if len(extensionHandlers) == 0 {
+ if err := hooks.MarkAsDone(ctx, g.Client, s.Current.Cluster, false, runtimehooksv1.AfterWorkersUpgrade); err != nil {
+ return false, err
+ }
+ return true, nil
+ }
+
+ if cacheEntry, ok := g.hookCache.Has(cache.NewHookEntryKey(s.Current.Cluster, runtimehooksv1.AfterWorkersUpgrade)); ok {
+ if requeueAfter, requeue := cacheEntry.ShouldRequeue(time.Now()); requeue {
+ log.V(5).Info(fmt.Sprintf("Skip calling AfterWorkersUpgrade hook, retry after %s", requeueAfter))
+ s.HookResponseTracker.Add(runtimehooksv1.AfterWorkersUpgrade, cacheEntry.ToResponse(&runtimehooksv1.AfterWorkersUpgradeResponse{}, requeueAfter))
+ return false, nil
+ }
+ }
+
+ // DeepCopy cluster because ConvertFrom has side effects like adding the conversion annotation.
+ v1beta1Cluster := &clusterv1beta1.Cluster{}
+ if err := v1beta1Cluster.ConvertFrom(s.Current.Cluster.DeepCopy()); err != nil {
+ return false, errors.Wrap(err, "error converting Cluster to v1beta1 Cluster")
+ }
+
+ // Call all the registered extension for the hook.
+ hookRequest := &runtimehooksv1.AfterWorkersUpgradeRequest{
+ Cluster: *cleanupV1Beta1Cluster(v1beta1Cluster),
+ KubernetesVersion: *currentVersion,
+ ControlPlaneUpgrades: toUpgradeStep(s.UpgradeTracker.ControlPlane.UpgradePlan),
+ WorkersUpgrades: toUpgradeStep(s.UpgradeTracker.MachineDeployments.UpgradePlan, s.UpgradeTracker.MachinePools.UpgradePlan),
+ }
+ hookResponse := &runtimehooksv1.AfterWorkersUpgradeResponse{}
+ if err := g.RuntimeClient.CallAllExtensions(ctx, runtimehooksv1.AfterWorkersUpgrade, s.Current.Cluster, hookRequest, hookResponse); err != nil {
+ return false, err
+ }
+ // Add the response to the tracker so we can later update condition or requeue when required.
+ s.HookResponseTracker.Add(runtimehooksv1.AfterWorkersUpgrade, hookResponse)
+
+ if hookResponse.RetryAfterSeconds != 0 {
+ g.hookCache.Add(cache.NewHookEntry(s.Current.Cluster, runtimehooksv1.AfterWorkersUpgrade, time.Now().Add(time.Duration(hookResponse.RetryAfterSeconds)*time.Second), hookResponse.GetMessage()))
+ log.Info(fmt.Sprintf("Workers upgrade to version %s completed but next steps are blocked by %s hook, retry after %ds", hookRequest.KubernetesVersion, runtimecatalog.HookName(runtimehooksv1.AfterWorkersUpgrade), hookResponse.RetryAfterSeconds),
+ "ControlPlaneUpgrades", hookRequest.ControlPlaneUpgrades,
+ "WorkersUpgrades", hookRequest.WorkersUpgrades,
+ )
+ return false, nil
+ }
+ if err := hooks.MarkAsDone(ctx, g.Client, s.Current.Cluster, false, runtimehooksv1.AfterWorkersUpgrade); err != nil {
+ return false, err
+ }
+
+ log.Info(fmt.Sprintf("Workers upgrade to version %s and %s hook completed, next steps unblocked", hookRequest.KubernetesVersion, runtimecatalog.HookName(runtimehooksv1.AfterWorkersUpgrade)),
+ "ControlPlaneUpgrades", hookRequest.ControlPlaneUpgrades,
+ "WorkersUpgrades", hookRequest.WorkersUpgrades,
+ )
+ }
+ return true, nil
+}
+
+// toUpgradeStep converts a list of version to a list of upgrade steps.
+// Note. when called for workers, the function will receive in input two plans one for the MachineDeployments if any, the other for MachinePools if any.
+// Considering that both plans, if defined, have to be equal, the function picks the first one not empty.
+func toUpgradeStep(plans ...[]string) []runtimehooksv1.UpgradeStepInfo {
+ var steps []runtimehooksv1.UpgradeStepInfo
+ for _, plan := range plans {
+ if len(plan) != 0 {
+ for _, step := range plan {
+ steps = append(steps, runtimehooksv1.UpgradeStepInfo{Version: step})
+ }
+ break
+ }
+ }
+ return steps
+}
diff --git a/exp/topology/desiredstate/lifecycle_hooks_test.go b/exp/topology/desiredstate/lifecycle_hooks_test.go
new file mode 100644
index 000000000000..753ecf81e264
--- /dev/null
+++ b/exp/topology/desiredstate/lifecycle_hooks_test.go
@@ -0,0 +1,1487 @@
+/*
+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 desiredstate
+
+import (
+ "maps"
+ "reflect"
+ "testing"
+ "time"
+
+ "github.com/google/go-cmp/cmp"
+ . "github.com/onsi/gomega"
+ "github.com/pkg/errors"
+ corev1 "k8s.io/api/core/v1"
+ apiequality "k8s.io/apimachinery/pkg/api/equality"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/util/sets"
+ utilfeature "k8s.io/component-base/featuregate/testing"
+ "k8s.io/utils/ptr"
+ "sigs.k8s.io/controller-runtime/pkg/client/fake"
+
+ clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1"
+ runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2"
+ runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog"
+ "sigs.k8s.io/cluster-api/exp/topology/scope"
+ "sigs.k8s.io/cluster-api/feature"
+ fakeruntimeclient "sigs.k8s.io/cluster-api/internal/runtime/client/fake"
+ "sigs.k8s.io/cluster-api/util/cache"
+ "sigs.k8s.io/cluster-api/util/conversion"
+ "sigs.k8s.io/cluster-api/util/test/builder"
+)
+
+func TestComputeControlPlaneVersion_LifecycleHooksSequences(t *testing.T) {
+ var testGVKs = []schema.GroupVersionKind{
+ {
+ Group: "refAPIGroup1",
+ Kind: "refKind1",
+ Version: "v1beta4",
+ },
+ }
+
+ apiVersionGetter := func(gk schema.GroupKind) (string, error) {
+ for _, gvk := range testGVKs {
+ if gvk.GroupKind() == gk {
+ return schema.GroupVersion{
+ Group: gk.Group,
+ Version: gvk.Version,
+ }.String(), nil
+ }
+ }
+ return "", errors.Errorf("unknown GroupVersionKind: %v", gk)
+ }
+ clusterv1beta1.SetAPIVersionGetter(apiVersionGetter)
+
+ utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.RuntimeSDK, true)
+
+ clusterForCacheEntry := &clusterv1.Cluster{
+ ObjectMeta: metav1.ObjectMeta{
+ Namespace: "test-ns",
+ Name: "test-cluster",
+ },
+ }
+
+ catalog := runtimecatalog.New()
+ _ = runtimehooksv1.AddToCatalog(catalog)
+ beforeClusterUpgradeGVH, _ := catalog.GroupVersionHook(runtimehooksv1.BeforeClusterUpgrade)
+ beforeControlPlaneUpgradeGVH, _ := catalog.GroupVersionHook(runtimehooksv1.BeforeControlPlaneUpgrade)
+ afterControlPlaneUpgradeGVH, _ := catalog.GroupVersionHook(runtimehooksv1.AfterControlPlaneUpgrade)
+ beforeWorkersUpgradeGVH, _ := catalog.GroupVersionHook(runtimehooksv1.BeforeWorkersUpgrade)
+ afterWorkersUpgradeGVH, _ := catalog.GroupVersionHook(runtimehooksv1.AfterWorkersUpgrade)
+
+ blockingBeforeClusterUpgradeResponse := &runtimehooksv1.BeforeClusterUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusSuccess,
+ Message: "processing",
+ },
+ RetryAfterSeconds: int32(10),
+ },
+ }
+ nonBlockingBeforeClusterUpgradeResponse := &runtimehooksv1.BeforeClusterUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusSuccess,
+ },
+ },
+ }
+
+ blockingBeforeControlPlaneUpgradeResponse := &runtimehooksv1.BeforeControlPlaneUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusSuccess,
+ Message: "processing",
+ },
+ RetryAfterSeconds: int32(10),
+ },
+ }
+ nonBlockingBeforeControlPlaneUpgradeResponse := &runtimehooksv1.BeforeControlPlaneUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusSuccess,
+ },
+ },
+ }
+
+ blockingAfterControlPlaneUpgradeResponse := &runtimehooksv1.AfterControlPlaneUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusSuccess,
+ Message: "processing",
+ },
+ RetryAfterSeconds: int32(10),
+ },
+ }
+ nonBlockingAfterControlPlaneUpgradeResponse := &runtimehooksv1.AfterControlPlaneUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusSuccess,
+ },
+ },
+ }
+
+ blockingBeforeWorkersUpgradeResponse := &runtimehooksv1.BeforeWorkersUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusSuccess,
+ Message: "processing",
+ },
+ RetryAfterSeconds: int32(10),
+ },
+ }
+ nonBlockingBeforeWorkersUpgradeResponse := &runtimehooksv1.BeforeWorkersUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusSuccess,
+ },
+ },
+ }
+
+ blockingAfterWorkersUpgradeResponse := &runtimehooksv1.AfterWorkersUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusSuccess,
+ Message: "processing",
+ },
+ RetryAfterSeconds: int32(10),
+ },
+ }
+ nonBlockingAfterWorkersUpgradeResponse := &runtimehooksv1.AfterWorkersUpgradeResponse{
+ CommonRetryResponse: runtimehooksv1.CommonRetryResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusSuccess,
+ },
+ },
+ }
+
+ tests := []struct {
+ name string
+ topologyVersion string
+ pendingHookAnnotation string
+ controlPlaneObj *unstructured.Unstructured
+ controlPlaneUpgradePlan []string
+ minWorkersVersion string
+ machineDeploymentsUpgradePlan []string
+ machinePoolsUpgradePlan []string
+ wantBeforeClusterUpgradeRequest *runtimehooksv1.BeforeClusterUpgradeRequest
+ beforeClusterUpgradeResponse *runtimehooksv1.BeforeClusterUpgradeResponse
+ wantBeforeControlPlaneUpgradeRequest *runtimehooksv1.BeforeControlPlaneUpgradeRequest
+ beforeControlPlaneUpgradeResponse *runtimehooksv1.BeforeControlPlaneUpgradeResponse
+ wantAfterControlPlaneUpgradeRequest *runtimehooksv1.AfterControlPlaneUpgradeRequest
+ afterControlPlaneUpgradeResponse *runtimehooksv1.AfterControlPlaneUpgradeResponse
+ wantBeforeWorkersUpgradeRequest *runtimehooksv1.BeforeWorkersUpgradeRequest
+ beforeWorkersUpgradeResponse *runtimehooksv1.BeforeWorkersUpgradeResponse
+ wantAfterWorkersUpgradeRequest *runtimehooksv1.AfterWorkersUpgradeRequest
+ afterWorkersUpgradeResponse *runtimehooksv1.AfterWorkersUpgradeResponse
+ wantVersion string
+ wantIsPendingUpgrade bool
+ wantIsStartingUpgrade bool
+ wantIsWaitingForWorkersUpgrade bool
+ wantPendingHookAnnotation string
+ wantHookCacheEntry *cache.HookEntry
+ }{
+ // Upgrade cluster with CP, MD, MP (upgrade by one minor)
+
+ {
+ name: "no hook called before starting the upgrade",
+ topologyVersion: "v1.2.2",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ }).
+ Build(),
+ wantVersion: "v1.2.2",
+ },
+ {
+ name: "when an upgrade starts: call the BeforeClusterUpgrade hook, blocking answer",
+ topologyVersion: "v1.2.3", // changed from previous step
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.2",
+ controlPlaneUpgradePlan: []string{"v1.2.3"},
+ machineDeploymentsUpgradePlan: []string{"v1.2.3"},
+ machinePoolsUpgradePlan: []string{"v1.2.3"},
+ wantBeforeClusterUpgradeRequest: &runtimehooksv1.BeforeClusterUpgradeRequest{
+ FromKubernetesVersion: "v1.2.2",
+ ToKubernetesVersion: "v1.2.3",
+ ControlPlaneUpgrades: toUpgradeStep([]string{"v1.2.3"}),
+ WorkersUpgrades: toUpgradeStep([]string{"v1.2.3"}),
+ },
+ beforeClusterUpgradeResponse: blockingBeforeClusterUpgradeResponse,
+ wantVersion: "v1.2.2",
+ wantIsPendingUpgrade: true,
+ wantHookCacheEntry: ptr.To(cache.NewHookEntry(clusterForCacheEntry, runtimehooksv1.BeforeClusterUpgrade,
+ time.Now().Add(time.Duration(blockingBeforeClusterUpgradeResponse.RetryAfterSeconds)*time.Second), blockingBeforeClusterUpgradeResponse.Message)),
+ },
+ {
+ name: "when an upgrade starts: call the BeforeControlPlaneUpgrade hook when BeforeClusterUpgrade hook unblocks, blocking answer",
+ topologyVersion: "v1.2.3",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.2",
+ controlPlaneUpgradePlan: []string{"v1.2.3"},
+ machineDeploymentsUpgradePlan: []string{"v1.2.3"},
+ machinePoolsUpgradePlan: []string{"v1.2.3"},
+ wantBeforeClusterUpgradeRequest: &runtimehooksv1.BeforeClusterUpgradeRequest{
+ FromKubernetesVersion: "v1.2.2",
+ ToKubernetesVersion: "v1.2.3",
+ ControlPlaneUpgrades: toUpgradeStep([]string{"v1.2.3"}),
+ WorkersUpgrades: toUpgradeStep([]string{"v1.2.3"}),
+ },
+ beforeClusterUpgradeResponse: nonBlockingBeforeClusterUpgradeResponse,
+ wantBeforeControlPlaneUpgradeRequest: &runtimehooksv1.BeforeControlPlaneUpgradeRequest{
+ FromKubernetesVersion: "v1.2.2",
+ ToKubernetesVersion: "v1.2.3",
+ ControlPlaneUpgrades: toUpgradeStep([]string{"v1.2.3"}),
+ WorkersUpgrades: toUpgradeStep([]string{"v1.2.3"}),
+ },
+ beforeControlPlaneUpgradeResponse: blockingBeforeControlPlaneUpgradeResponse,
+ wantVersion: "v1.2.2",
+ wantIsPendingUpgrade: true,
+ wantPendingHookAnnotation: "AfterClusterUpgrade", // changed from previous step
+ wantHookCacheEntry: ptr.To(cache.NewHookEntry(clusterForCacheEntry, runtimehooksv1.BeforeControlPlaneUpgrade,
+ time.Now().Add(time.Duration(blockingBeforeControlPlaneUpgradeResponse.RetryAfterSeconds)*time.Second), blockingBeforeControlPlaneUpgradeResponse.Message)),
+ },
+ {
+ name: "when an upgrade starts: pick up a new version when BeforeControlPlaneUpgrade hook unblocks (does not call the BeforeClusterUpgrade hook when already done)",
+ topologyVersion: "v1.2.3",
+ pendingHookAnnotation: "AfterClusterUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.2",
+ controlPlaneUpgradePlan: []string{"v1.2.3"},
+ machineDeploymentsUpgradePlan: []string{"v1.2.3"},
+ machinePoolsUpgradePlan: []string{"v1.2.3"},
+ wantBeforeControlPlaneUpgradeRequest: &runtimehooksv1.BeforeControlPlaneUpgradeRequest{
+ FromKubernetesVersion: "v1.2.2",
+ ToKubernetesVersion: "v1.2.3",
+ ControlPlaneUpgrades: toUpgradeStep([]string{"v1.2.3"}),
+ WorkersUpgrades: toUpgradeStep([]string{"v1.2.3"}),
+ },
+ beforeControlPlaneUpgradeResponse: nonBlockingBeforeControlPlaneUpgradeResponse,
+ wantVersion: "v1.2.3", // changed from previous step
+ wantIsStartingUpgrade: true,
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade,AfterWorkersUpgrade,BeforeWorkersUpgrade", // changed from previous step
+ },
+ {
+ name: "when control plane is upgrading: do not call hooks",
+ topologyVersion: "v1.2.3",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade,AfterWorkersUpgrade,BeforeWorkersUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.3",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.2",
+ controlPlaneUpgradePlan: []string{"v1.2.3"},
+ machineDeploymentsUpgradePlan: []string{"v1.2.3"},
+ machinePoolsUpgradePlan: []string{"v1.2.3"},
+ wantVersion: "v1.2.3",
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade,AfterWorkersUpgrade,BeforeWorkersUpgrade",
+ },
+ {
+ name: "after control plane is upgraded: call the AfterControlPlaneUpgrade hook, blocking answer",
+ topologyVersion: "v1.2.3",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade,AfterWorkersUpgrade,BeforeWorkersUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.3",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.3", // changed from previous step
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.2",
+ controlPlaneUpgradePlan: []string{},
+ machineDeploymentsUpgradePlan: []string{"v1.2.3"},
+ machinePoolsUpgradePlan: []string{"v1.2.3"},
+ wantAfterControlPlaneUpgradeRequest: &runtimehooksv1.AfterControlPlaneUpgradeRequest{
+ KubernetesVersion: "v1.2.3",
+ ControlPlaneUpgrades: toUpgradeStep([]string{}),
+ WorkersUpgrades: toUpgradeStep([]string{"v1.2.3"}),
+ },
+ afterControlPlaneUpgradeResponse: blockingAfterControlPlaneUpgradeResponse,
+ wantVersion: "v1.2.3",
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade,AfterWorkersUpgrade,BeforeWorkersUpgrade",
+ wantHookCacheEntry: ptr.To(cache.NewHookEntry(clusterForCacheEntry, runtimehooksv1.AfterControlPlaneUpgrade,
+ time.Now().Add(time.Duration(blockingAfterControlPlaneUpgradeResponse.RetryAfterSeconds)*time.Second), blockingAfterControlPlaneUpgradeResponse.Message)),
+ },
+ {
+ name: "after control plane is upgraded: call the BeforeWorkersUpgrade hook when AfterControlPlaneUpgrade hook unblocks, blocking answer",
+ topologyVersion: "v1.2.3",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade,AfterWorkersUpgrade,BeforeWorkersUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.3",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.3",
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.2",
+ controlPlaneUpgradePlan: []string{},
+ machineDeploymentsUpgradePlan: []string{"v1.2.3"},
+ machinePoolsUpgradePlan: []string{"v1.2.3"},
+ wantAfterControlPlaneUpgradeRequest: &runtimehooksv1.AfterControlPlaneUpgradeRequest{
+ KubernetesVersion: "v1.2.3",
+ ControlPlaneUpgrades: toUpgradeStep([]string{}),
+ WorkersUpgrades: toUpgradeStep([]string{"v1.2.3"}),
+ },
+ afterControlPlaneUpgradeResponse: nonBlockingAfterControlPlaneUpgradeResponse,
+ wantBeforeWorkersUpgradeRequest: &runtimehooksv1.BeforeWorkersUpgradeRequest{
+ FromKubernetesVersion: "v1.2.2",
+ ToKubernetesVersion: "v1.2.3",
+ ControlPlaneUpgrades: toUpgradeStep([]string{}),
+ WorkersUpgrades: toUpgradeStep([]string{"v1.2.3"}),
+ },
+ beforeWorkersUpgradeResponse: blockingBeforeWorkersUpgradeResponse,
+ wantVersion: "v1.2.3",
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterWorkersUpgrade,BeforeWorkersUpgrade", // changed from previous step
+ wantHookCacheEntry: ptr.To(cache.NewHookEntry(clusterForCacheEntry, runtimehooksv1.BeforeWorkersUpgrade,
+ time.Now().Add(time.Duration(blockingBeforeWorkersUpgradeResponse.RetryAfterSeconds)*time.Second), blockingBeforeWorkersUpgradeResponse.Message)),
+ },
+ {
+ name: "after control plane is upgraded: BeforeWorkersUpgrade hook unblocks (does not call the AfterControlPlaneUpgrade hook when already done)",
+ topologyVersion: "v1.2.3",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterWorkersUpgrade,BeforeWorkersUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.3",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.3",
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.2",
+ controlPlaneUpgradePlan: []string{},
+ machineDeploymentsUpgradePlan: []string{"v1.2.3"},
+ machinePoolsUpgradePlan: []string{"v1.2.3"},
+ wantBeforeWorkersUpgradeRequest: &runtimehooksv1.BeforeWorkersUpgradeRequest{
+ FromKubernetesVersion: "v1.2.2",
+ ToKubernetesVersion: "v1.2.3",
+ ControlPlaneUpgrades: toUpgradeStep([]string{}),
+ WorkersUpgrades: toUpgradeStep([]string{"v1.2.3"}),
+ },
+ beforeWorkersUpgradeResponse: nonBlockingBeforeWorkersUpgradeResponse,
+ wantVersion: "v1.2.3",
+ wantIsWaitingForWorkersUpgrade: true,
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterWorkersUpgrade", // changed from previous step
+ },
+ {
+ name: "when machine deployment are upgrading: do not call hooks",
+ topologyVersion: "v1.2.3",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterWorkersUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.3",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.3",
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.2",
+ controlPlaneUpgradePlan: []string{},
+ machineDeploymentsUpgradePlan: []string{"v1.2.3"},
+ machinePoolsUpgradePlan: []string{"v1.2.3"},
+ wantVersion: "v1.2.3",
+ wantIsWaitingForWorkersUpgrade: true,
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterWorkersUpgrade",
+ },
+ {
+ name: "when machine pools are upgrading: do not call hooks",
+ topologyVersion: "v1.2.3",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterWorkersUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.3",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.3",
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.2",
+ controlPlaneUpgradePlan: []string{},
+ machineDeploymentsUpgradePlan: []string{}, // changed from previous step
+ machinePoolsUpgradePlan: []string{"v1.2.3"},
+ wantVersion: "v1.2.3",
+ wantIsWaitingForWorkersUpgrade: true,
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterWorkersUpgrade",
+ },
+ {
+ name: "after workers are upgraded: call the AfterWorkersUpgrade hook, blocking answer",
+ topologyVersion: "v1.2.3",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterWorkersUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.3",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.3",
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.3",
+ controlPlaneUpgradePlan: []string{},
+ machineDeploymentsUpgradePlan: []string{},
+ machinePoolsUpgradePlan: []string{}, // changed from previous step
+ wantAfterWorkersUpgradeRequest: &runtimehooksv1.AfterWorkersUpgradeRequest{
+ KubernetesVersion: "v1.2.3",
+ ControlPlaneUpgrades: toUpgradeStep([]string{}),
+ WorkersUpgrades: toUpgradeStep([]string{}),
+ },
+ afterWorkersUpgradeResponse: blockingAfterWorkersUpgradeResponse,
+ wantVersion: "v1.2.3",
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterWorkersUpgrade",
+ wantHookCacheEntry: ptr.To(cache.NewHookEntry(clusterForCacheEntry, runtimehooksv1.AfterWorkersUpgrade,
+ time.Now().Add(time.Duration(blockingAfterWorkersUpgradeResponse.RetryAfterSeconds)*time.Second), blockingAfterWorkersUpgradeResponse.Message)),
+ },
+ {
+ name: "after workers are upgraded: AfterWorkersUpgrade hook unblocks",
+ topologyVersion: "v1.2.3",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterWorkersUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.3",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.3",
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.3",
+ controlPlaneUpgradePlan: []string{},
+ machineDeploymentsUpgradePlan: []string{},
+ machinePoolsUpgradePlan: []string{},
+ wantAfterWorkersUpgradeRequest: &runtimehooksv1.AfterWorkersUpgradeRequest{
+ KubernetesVersion: "v1.2.3",
+ ControlPlaneUpgrades: toUpgradeStep([]string{}),
+ WorkersUpgrades: toUpgradeStep([]string{}),
+ },
+ afterWorkersUpgradeResponse: nonBlockingAfterWorkersUpgradeResponse,
+ wantVersion: "v1.2.3",
+ wantPendingHookAnnotation: "AfterClusterUpgrade", // changed from previous step
+ },
+ // Note: After MP upgrade completes, the AfterClusterUpgrade is called from reconcile_state.go
+
+ // Upgrade cluster with CP, MD (upgrade by two minors, workers skip the first one)
+
+ {
+ name: "no hook called before starting the upgrade",
+ topologyVersion: "v1.2.2",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ }).
+ Build(),
+ wantVersion: "v1.2.2",
+ },
+ {
+ name: "when an upgrade to the first minor starts: call the BeforeClusterUpgrade hook, blocking answer",
+ topologyVersion: "v1.4.4", // changed from previous step
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.2",
+ controlPlaneUpgradePlan: []string{"v1.3.3", "v1.4.4"},
+ machineDeploymentsUpgradePlan: []string{"v1.4.4"},
+ machinePoolsUpgradePlan: []string{},
+ wantBeforeClusterUpgradeRequest: &runtimehooksv1.BeforeClusterUpgradeRequest{
+ FromKubernetesVersion: "v1.2.2",
+ ToKubernetesVersion: "v1.4.4",
+ ControlPlaneUpgrades: toUpgradeStep([]string{"v1.3.3", "v1.4.4"}),
+ WorkersUpgrades: toUpgradeStep([]string{"v1.4.4"}),
+ },
+ beforeClusterUpgradeResponse: blockingBeforeClusterUpgradeResponse,
+ wantVersion: "v1.2.2",
+ wantIsPendingUpgrade: true,
+ wantHookCacheEntry: ptr.To(cache.NewHookEntry(clusterForCacheEntry, runtimehooksv1.BeforeClusterUpgrade,
+ time.Now().Add(time.Duration(blockingBeforeClusterUpgradeResponse.RetryAfterSeconds)*time.Second), blockingBeforeClusterUpgradeResponse.Message)),
+ },
+ {
+ name: "when an upgrade to the first minor starts: call the BeforeControlPlaneUpgrade hook when BeforeClusterUpgrade hook unblocks, blocking answer",
+ topologyVersion: "v1.4.4",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.2",
+ controlPlaneUpgradePlan: []string{"v1.3.3", "v1.4.4"},
+ machineDeploymentsUpgradePlan: []string{"v1.4.4"},
+ machinePoolsUpgradePlan: []string{},
+ wantBeforeClusterUpgradeRequest: &runtimehooksv1.BeforeClusterUpgradeRequest{
+ FromKubernetesVersion: "v1.2.2",
+ ToKubernetesVersion: "v1.4.4",
+ ControlPlaneUpgrades: toUpgradeStep([]string{"v1.3.3", "v1.4.4"}),
+ WorkersUpgrades: toUpgradeStep([]string{"v1.4.4"}),
+ },
+ beforeClusterUpgradeResponse: nonBlockingBeforeClusterUpgradeResponse,
+ wantBeforeControlPlaneUpgradeRequest: &runtimehooksv1.BeforeControlPlaneUpgradeRequest{
+ FromKubernetesVersion: "v1.2.2",
+ ToKubernetesVersion: "v1.3.3", // CP picking up the first version in the plan
+ ControlPlaneUpgrades: toUpgradeStep([]string{"v1.3.3", "v1.4.4"}),
+ WorkersUpgrades: toUpgradeStep([]string{"v1.4.4"}),
+ },
+ beforeControlPlaneUpgradeResponse: blockingBeforeControlPlaneUpgradeResponse,
+ wantVersion: "v1.2.2",
+ wantIsPendingUpgrade: true,
+ wantPendingHookAnnotation: "AfterClusterUpgrade", // changed from previous step
+ wantHookCacheEntry: ptr.To(cache.NewHookEntry(clusterForCacheEntry, runtimehooksv1.BeforeControlPlaneUpgrade,
+ time.Now().Add(time.Duration(blockingBeforeControlPlaneUpgradeResponse.RetryAfterSeconds)*time.Second), blockingBeforeControlPlaneUpgradeResponse.Message)),
+ },
+ {
+ name: "when an upgrade to the first minor starts: pick up a new version when BeforeControlPlaneUpgrade hook unblocks (does not call the BeforeClusterUpgrade hook when already done)",
+ topologyVersion: "v1.4.4",
+ pendingHookAnnotation: "AfterClusterUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.2",
+ controlPlaneUpgradePlan: []string{"v1.3.3", "v1.4.4"},
+ machineDeploymentsUpgradePlan: []string{"v1.4.4"},
+ machinePoolsUpgradePlan: []string{},
+ wantBeforeControlPlaneUpgradeRequest: &runtimehooksv1.BeforeControlPlaneUpgradeRequest{
+ FromKubernetesVersion: "v1.2.2",
+ ToKubernetesVersion: "v1.3.3", // CP picking up the first version in the plan
+ ControlPlaneUpgrades: toUpgradeStep([]string{"v1.3.3", "v1.4.4"}),
+ WorkersUpgrades: toUpgradeStep([]string{"v1.4.4"}),
+ },
+ beforeControlPlaneUpgradeResponse: nonBlockingBeforeControlPlaneUpgradeResponse,
+ wantVersion: "v1.3.3", // changed from previous step
+ wantIsStartingUpgrade: true,
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade", // changed from previous step
+ },
+ {
+ name: "when control plane is upgrading to the first minor: do not call hooks",
+ topologyVersion: "v1.4.4",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.3.3",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.2",
+ controlPlaneUpgradePlan: []string{"v1.4.4"}, // changed from previous step
+ machineDeploymentsUpgradePlan: []string{"v1.4.4"},
+ machinePoolsUpgradePlan: []string{},
+ wantVersion: "v1.3.3",
+ wantIsPendingUpgrade: true,
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade",
+ },
+ {
+ name: "after control plane is upgraded to the first minor: call the AfterControlPlaneUpgrade hook, blocking answer",
+ topologyVersion: "v1.4.4",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.3.3",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.3.3", // changed from previous step
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{"v1.4.4"},
+ machineDeploymentsUpgradePlan: []string{"v1.4.4"},
+ machinePoolsUpgradePlan: []string{},
+ wantAfterControlPlaneUpgradeRequest: &runtimehooksv1.AfterControlPlaneUpgradeRequest{
+ KubernetesVersion: "v1.3.3",
+ ControlPlaneUpgrades: toUpgradeStep([]string{"v1.4.4"}),
+ WorkersUpgrades: toUpgradeStep([]string{"v1.4.4"}),
+ },
+ afterControlPlaneUpgradeResponse: blockingAfterControlPlaneUpgradeResponse,
+ wantVersion: "v1.3.3",
+ wantIsPendingUpgrade: true,
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade",
+ wantHookCacheEntry: ptr.To(cache.NewHookEntry(clusterForCacheEntry, runtimehooksv1.AfterControlPlaneUpgrade,
+ time.Now().Add(time.Duration(blockingAfterControlPlaneUpgradeResponse.RetryAfterSeconds)*time.Second), blockingAfterControlPlaneUpgradeResponse.Message)),
+ },
+ {
+ name: "when an upgrade to the second minor starts: call the BeforeControlPlaneUpgrade after AfterControlPlaneUpgrade hook unblocks, blocking answer",
+ topologyVersion: "v1.4.4",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.3.3",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.3.3",
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.2",
+ controlPlaneUpgradePlan: []string{"v1.4.4"},
+ machineDeploymentsUpgradePlan: []string{"v1.4.4"},
+ machinePoolsUpgradePlan: []string{},
+ wantAfterControlPlaneUpgradeRequest: &runtimehooksv1.AfterControlPlaneUpgradeRequest{
+ KubernetesVersion: "v1.3.3",
+ ControlPlaneUpgrades: toUpgradeStep([]string{"v1.4.4"}),
+ WorkersUpgrades: toUpgradeStep([]string{"v1.4.4"}),
+ },
+ afterControlPlaneUpgradeResponse: nonBlockingAfterControlPlaneUpgradeResponse,
+ wantBeforeControlPlaneUpgradeRequest: &runtimehooksv1.BeforeControlPlaneUpgradeRequest{
+ FromKubernetesVersion: "v1.3.3",
+ ToKubernetesVersion: "v1.4.4", // CP picking up the first version in the plan
+ ControlPlaneUpgrades: toUpgradeStep([]string{"v1.4.4"}),
+ WorkersUpgrades: toUpgradeStep([]string{"v1.4.4"}),
+ },
+ beforeControlPlaneUpgradeResponse: blockingBeforeControlPlaneUpgradeResponse,
+ wantVersion: "v1.3.3",
+ wantIsPendingUpgrade: true,
+ wantPendingHookAnnotation: "AfterClusterUpgrade", // changed from previous step
+ wantHookCacheEntry: ptr.To(cache.NewHookEntry(clusterForCacheEntry, runtimehooksv1.BeforeControlPlaneUpgrade,
+ time.Now().Add(time.Duration(blockingBeforeControlPlaneUpgradeResponse.RetryAfterSeconds)*time.Second), blockingBeforeControlPlaneUpgradeResponse.Message)),
+ },
+ {
+ name: "when an upgrade to the second minor starts: pick up a new version when BeforeControlPlaneUpgrade hook unblocks (does not call the BeforeClusterUpgrade hook when already done)",
+ topologyVersion: "v1.4.4",
+ pendingHookAnnotation: "AfterClusterUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.3.3",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.3.3",
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.2",
+ controlPlaneUpgradePlan: []string{"v1.4.4"},
+ machineDeploymentsUpgradePlan: []string{"v1.4.4"},
+ machinePoolsUpgradePlan: []string{},
+ wantBeforeControlPlaneUpgradeRequest: &runtimehooksv1.BeforeControlPlaneUpgradeRequest{
+ FromKubernetesVersion: "v1.3.3",
+ ToKubernetesVersion: "v1.4.4", // CP picking up the first version in the plan
+ ControlPlaneUpgrades: toUpgradeStep([]string{"v1.4.4"}),
+ WorkersUpgrades: toUpgradeStep([]string{"v1.4.4"}),
+ },
+ beforeControlPlaneUpgradeResponse: nonBlockingBeforeControlPlaneUpgradeResponse,
+ wantVersion: "v1.4.4", // changed from previous step
+ wantIsStartingUpgrade: true,
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade,AfterWorkersUpgrade,BeforeWorkersUpgrade", // changed from previous step
+ },
+ {
+ name: "when control plane is upgrading to the second minor: do not call hooks",
+ topologyVersion: "v1.4.4",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade,AfterWorkersUpgrade,BeforeWorkersUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.4.4",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.3.3",
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.2",
+ controlPlaneUpgradePlan: []string{}, // changed from previous step
+ machineDeploymentsUpgradePlan: []string{"v1.4.4"},
+ machinePoolsUpgradePlan: []string{},
+ wantVersion: "v1.4.4",
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade,AfterWorkersUpgrade,BeforeWorkersUpgrade",
+ },
+ {
+ name: "after control plane is upgraded to the second minor: call the AfterControlPlaneUpgrade hook, blocking answer",
+ topologyVersion: "v1.4.4",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade,AfterWorkersUpgrade,BeforeWorkersUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.4.4",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.4.4", // changed from previous step
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.2",
+ controlPlaneUpgradePlan: []string{},
+ machineDeploymentsUpgradePlan: []string{"v1.4.4"},
+ machinePoolsUpgradePlan: []string{},
+ wantAfterControlPlaneUpgradeRequest: &runtimehooksv1.AfterControlPlaneUpgradeRequest{
+ KubernetesVersion: "v1.4.4",
+ ControlPlaneUpgrades: toUpgradeStep([]string{}),
+ WorkersUpgrades: toUpgradeStep([]string{"v1.4.4"}),
+ },
+ afterControlPlaneUpgradeResponse: blockingAfterControlPlaneUpgradeResponse,
+ wantVersion: "v1.4.4",
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade,AfterWorkersUpgrade,BeforeWorkersUpgrade",
+ wantHookCacheEntry: ptr.To(cache.NewHookEntry(clusterForCacheEntry, runtimehooksv1.AfterControlPlaneUpgrade,
+ time.Now().Add(time.Duration(blockingAfterControlPlaneUpgradeResponse.RetryAfterSeconds)*time.Second), blockingAfterControlPlaneUpgradeResponse.Message)),
+ },
+ {
+ name: "when starting workers upgrade to the second minor: call the BeforeWorkersUpgrade hook when AfterControlPlaneUpgradeRequest hook unblocks, blocking answer",
+ topologyVersion: "v1.4.4",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade,AfterWorkersUpgrade,BeforeWorkersUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.4.4",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.4.4",
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.2",
+ controlPlaneUpgradePlan: []string{},
+ machineDeploymentsUpgradePlan: []string{"v1.4.4"},
+ machinePoolsUpgradePlan: []string{},
+ wantAfterControlPlaneUpgradeRequest: &runtimehooksv1.AfterControlPlaneUpgradeRequest{
+ KubernetesVersion: "v1.4.4",
+ ControlPlaneUpgrades: toUpgradeStep([]string{}),
+ WorkersUpgrades: toUpgradeStep([]string{"v1.4.4"}),
+ },
+ afterControlPlaneUpgradeResponse: nonBlockingAfterControlPlaneUpgradeResponse,
+ wantBeforeWorkersUpgradeRequest: &runtimehooksv1.BeforeWorkersUpgradeRequest{
+ FromKubernetesVersion: "v1.2.2",
+ ToKubernetesVersion: "v1.4.4",
+ ControlPlaneUpgrades: toUpgradeStep([]string{}),
+ WorkersUpgrades: toUpgradeStep([]string{"v1.4.4"}),
+ },
+ beforeWorkersUpgradeResponse: blockingBeforeWorkersUpgradeResponse,
+ wantVersion: "v1.4.4",
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterWorkersUpgrade,BeforeWorkersUpgrade", // changed from previous step
+ wantHookCacheEntry: ptr.To(cache.NewHookEntry(clusterForCacheEntry, runtimehooksv1.BeforeWorkersUpgrade,
+ time.Now().Add(time.Duration(blockingBeforeWorkersUpgradeResponse.RetryAfterSeconds)*time.Second), blockingBeforeWorkersUpgradeResponse.Message)),
+ },
+ {
+ name: "when starting workers upgrade to the second minor: BeforeWorkersUpgrade hook unblocks (does not call the AfterControlPlaneUpgrade hook when already done)",
+ topologyVersion: "v1.4.4",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterWorkersUpgrade,BeforeWorkersUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.4.4",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.4.4",
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.2",
+ controlPlaneUpgradePlan: []string{},
+ machineDeploymentsUpgradePlan: []string{"v1.4.4"},
+ machinePoolsUpgradePlan: []string{},
+ wantBeforeWorkersUpgradeRequest: &runtimehooksv1.BeforeWorkersUpgradeRequest{
+ FromKubernetesVersion: "v1.2.2",
+ ToKubernetesVersion: "v1.4.4",
+ ControlPlaneUpgrades: toUpgradeStep([]string{}),
+ WorkersUpgrades: toUpgradeStep([]string{"v1.4.4"}),
+ },
+ beforeWorkersUpgradeResponse: nonBlockingBeforeWorkersUpgradeResponse,
+ wantVersion: "v1.4.4",
+ wantIsWaitingForWorkersUpgrade: true,
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterWorkersUpgrade", // changed from previous step
+ },
+ {
+ name: "when machine deployment are upgrading to the second minor: do not call hooks",
+ topologyVersion: "v1.4.4",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterWorkersUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.4.4",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.4.4",
+ }).
+ Build(),
+ minWorkersVersion: "v1.2.2",
+ controlPlaneUpgradePlan: []string{},
+ machineDeploymentsUpgradePlan: []string{"v1.4.4"},
+ machinePoolsUpgradePlan: []string{},
+ wantVersion: "v1.4.4",
+ wantIsWaitingForWorkersUpgrade: true,
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterWorkersUpgrade",
+ },
+ {
+ name: "after workers are upgraded to the second minor: call the AfterWorkersUpgrade hook, blocking answer",
+ topologyVersion: "v1.4.4",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterWorkersUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.4.4",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.4.4",
+ }).
+ Build(),
+ minWorkersVersion: "v1.4.4",
+ controlPlaneUpgradePlan: []string{},
+ machineDeploymentsUpgradePlan: []string{}, // changed from previous step
+ machinePoolsUpgradePlan: []string{},
+ wantAfterWorkersUpgradeRequest: &runtimehooksv1.AfterWorkersUpgradeRequest{
+ KubernetesVersion: "v1.4.4",
+ ControlPlaneUpgrades: toUpgradeStep([]string{}),
+ WorkersUpgrades: toUpgradeStep([]string{}),
+ },
+ afterWorkersUpgradeResponse: blockingAfterWorkersUpgradeResponse,
+ wantVersion: "v1.4.4",
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterWorkersUpgrade",
+ wantHookCacheEntry: ptr.To(cache.NewHookEntry(clusterForCacheEntry, runtimehooksv1.AfterWorkersUpgrade,
+ time.Now().Add(time.Duration(blockingAfterWorkersUpgradeResponse.RetryAfterSeconds)*time.Second), blockingAfterWorkersUpgradeResponse.Message)),
+ },
+ {
+ name: "after workers are upgraded to the second minor: AfterWorkersUpgrade hook unblocks",
+ topologyVersion: "v1.4.4",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterWorkersUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.4.4",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.4.4",
+ }).
+ Build(),
+ minWorkersVersion: "v1.4.4",
+ controlPlaneUpgradePlan: []string{},
+ machineDeploymentsUpgradePlan: []string{}, // changed from previous step
+ machinePoolsUpgradePlan: []string{},
+ wantAfterWorkersUpgradeRequest: &runtimehooksv1.AfterWorkersUpgradeRequest{
+ KubernetesVersion: "v1.4.4",
+ ControlPlaneUpgrades: toUpgradeStep([]string{}),
+ WorkersUpgrades: toUpgradeStep([]string{}),
+ },
+ afterWorkersUpgradeResponse: nonBlockingAfterWorkersUpgradeResponse,
+ wantVersion: "v1.4.4",
+ wantPendingHookAnnotation: "AfterClusterUpgrade", // changed from previous step
+ },
+ // Note: After MD upgrade completes, the AfterClusterUpgrade is called from reconcile_state.go
+
+ // Upgrade cluster with CP, no workers (upgrade by two minors)
+
+ {
+ name: "no hook called before starting the upgrade",
+ topologyVersion: "v1.2.2",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ }).
+ Build(),
+ wantVersion: "v1.2.2",
+ },
+ {
+ name: "when an upgrade to the first minor starts: call the BeforeClusterUpgrade hook, blocking answer",
+ topologyVersion: "v1.4.4", // changed from previous step
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{"v1.3.3", "v1.4.4"},
+ machineDeploymentsUpgradePlan: []string{},
+ machinePoolsUpgradePlan: []string{},
+ wantBeforeClusterUpgradeRequest: &runtimehooksv1.BeforeClusterUpgradeRequest{
+ FromKubernetesVersion: "v1.2.2",
+ ToKubernetesVersion: "v1.4.4",
+ ControlPlaneUpgrades: toUpgradeStep([]string{"v1.3.3", "v1.4.4"}),
+ WorkersUpgrades: toUpgradeStep([]string{}),
+ },
+ beforeClusterUpgradeResponse: blockingBeforeClusterUpgradeResponse,
+ wantVersion: "v1.2.2",
+ wantIsPendingUpgrade: true,
+ wantHookCacheEntry: ptr.To(cache.NewHookEntry(clusterForCacheEntry, runtimehooksv1.BeforeClusterUpgrade,
+ time.Now().Add(time.Duration(blockingBeforeClusterUpgradeResponse.RetryAfterSeconds)*time.Second), blockingBeforeClusterUpgradeResponse.Message)),
+ },
+ {
+ name: "when an upgrade to the first minor starts: call the BeforeControlPlaneUpgrade hook when BeforeClusterUpgrade hook unblocks, blocking answer",
+ topologyVersion: "v1.4.4",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{"v1.3.3", "v1.4.4"},
+ machineDeploymentsUpgradePlan: []string{},
+ machinePoolsUpgradePlan: []string{},
+ wantBeforeClusterUpgradeRequest: &runtimehooksv1.BeforeClusterUpgradeRequest{
+ FromKubernetesVersion: "v1.2.2",
+ ToKubernetesVersion: "v1.4.4",
+ ControlPlaneUpgrades: toUpgradeStep([]string{"v1.3.3", "v1.4.4"}),
+ WorkersUpgrades: toUpgradeStep([]string{}),
+ },
+ beforeClusterUpgradeResponse: nonBlockingBeforeClusterUpgradeResponse,
+ wantBeforeControlPlaneUpgradeRequest: &runtimehooksv1.BeforeControlPlaneUpgradeRequest{
+ FromKubernetesVersion: "v1.2.2",
+ ToKubernetesVersion: "v1.3.3", // CP picking up the first version in the plan
+ ControlPlaneUpgrades: toUpgradeStep([]string{"v1.3.3", "v1.4.4"}),
+ WorkersUpgrades: toUpgradeStep([]string{}),
+ },
+ beforeControlPlaneUpgradeResponse: blockingBeforeControlPlaneUpgradeResponse,
+ wantVersion: "v1.2.2",
+ wantIsPendingUpgrade: true,
+ wantPendingHookAnnotation: "AfterClusterUpgrade", // changed from previous step
+ wantHookCacheEntry: ptr.To(cache.NewHookEntry(clusterForCacheEntry, runtimehooksv1.BeforeControlPlaneUpgrade,
+ time.Now().Add(time.Duration(blockingBeforeControlPlaneUpgradeResponse.RetryAfterSeconds)*time.Second), blockingBeforeControlPlaneUpgradeResponse.Message)),
+ },
+ {
+ name: "when an upgrade to the first minor starts: pick up a new version when BeforeControlPlaneUpgrade hook unblocks (does not call the BeforeClusterUpgrade hook when already done)",
+ topologyVersion: "v1.4.4",
+ pendingHookAnnotation: "AfterClusterUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.2.2",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{"v1.3.3", "v1.4.4"},
+ machineDeploymentsUpgradePlan: []string{},
+ machinePoolsUpgradePlan: []string{},
+ wantBeforeControlPlaneUpgradeRequest: &runtimehooksv1.BeforeControlPlaneUpgradeRequest{
+ FromKubernetesVersion: "v1.2.2",
+ ToKubernetesVersion: "v1.3.3", // CP picking up the first version in the plan
+ ControlPlaneUpgrades: toUpgradeStep([]string{"v1.3.3", "v1.4.4"}),
+ WorkersUpgrades: toUpgradeStep([]string{}),
+ },
+ beforeControlPlaneUpgradeResponse: nonBlockingBeforeControlPlaneUpgradeResponse,
+ wantVersion: "v1.3.3", // changed from previous step
+ wantIsStartingUpgrade: true,
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade", // changed from previous step
+ },
+ {
+ name: "when control plane is upgrading to the first minor: do not call hooks",
+ topologyVersion: "v1.4.4",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.3.3",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.2.2",
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{"v1.4.4"}, // changed from previous step
+ machineDeploymentsUpgradePlan: []string{},
+ machinePoolsUpgradePlan: []string{},
+ wantVersion: "v1.3.3",
+ wantIsPendingUpgrade: true,
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade",
+ },
+ {
+ name: "after control plane is upgraded to the first minor: call the AfterControlPlaneUpgrade hook, blocking answer",
+ topologyVersion: "v1.4.4",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.3.3",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.3.3", // changed from previous step
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{"v1.4.4"},
+ machineDeploymentsUpgradePlan: []string{},
+ machinePoolsUpgradePlan: []string{},
+ wantAfterControlPlaneUpgradeRequest: &runtimehooksv1.AfterControlPlaneUpgradeRequest{
+ KubernetesVersion: "v1.3.3",
+ ControlPlaneUpgrades: toUpgradeStep([]string{"v1.4.4"}),
+ WorkersUpgrades: toUpgradeStep([]string{}),
+ },
+ afterControlPlaneUpgradeResponse: blockingAfterControlPlaneUpgradeResponse,
+ wantVersion: "v1.3.3",
+ wantIsPendingUpgrade: true,
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade",
+ wantHookCacheEntry: ptr.To(cache.NewHookEntry(clusterForCacheEntry, runtimehooksv1.AfterControlPlaneUpgrade,
+ time.Now().Add(time.Duration(blockingAfterControlPlaneUpgradeResponse.RetryAfterSeconds)*time.Second), blockingAfterControlPlaneUpgradeResponse.Message)),
+ },
+ {
+ name: "when an upgrade to the second minor starts: call the BeforeControlPlaneUpgrade after AfterControlPlaneUpgrade hook unblocks, blocking answer",
+ topologyVersion: "v1.4.4",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.3.3",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.3.3",
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{"v1.4.4"},
+ machineDeploymentsUpgradePlan: []string{},
+ machinePoolsUpgradePlan: []string{},
+ wantAfterControlPlaneUpgradeRequest: &runtimehooksv1.AfterControlPlaneUpgradeRequest{
+ KubernetesVersion: "v1.3.3",
+ ControlPlaneUpgrades: toUpgradeStep([]string{"v1.4.4"}),
+ WorkersUpgrades: toUpgradeStep([]string{}),
+ },
+ afterControlPlaneUpgradeResponse: nonBlockingAfterControlPlaneUpgradeResponse,
+ wantBeforeControlPlaneUpgradeRequest: &runtimehooksv1.BeforeControlPlaneUpgradeRequest{
+ FromKubernetesVersion: "v1.3.3",
+ ToKubernetesVersion: "v1.4.4", // CP picking up the first version in the plan
+ ControlPlaneUpgrades: toUpgradeStep([]string{"v1.4.4"}),
+ WorkersUpgrades: toUpgradeStep([]string{}),
+ },
+ beforeControlPlaneUpgradeResponse: blockingBeforeControlPlaneUpgradeResponse,
+ wantVersion: "v1.3.3",
+ wantIsPendingUpgrade: true,
+ wantPendingHookAnnotation: "AfterClusterUpgrade", // changed from previous step
+ wantHookCacheEntry: ptr.To(cache.NewHookEntry(clusterForCacheEntry, runtimehooksv1.BeforeControlPlaneUpgrade,
+ time.Now().Add(time.Duration(blockingBeforeControlPlaneUpgradeResponse.RetryAfterSeconds)*time.Second), blockingBeforeControlPlaneUpgradeResponse.Message)),
+ },
+ {
+ name: "when an upgrade to the second minor starts: pick up a new version when BeforeControlPlaneUpgrade hook unblocks (does not call the BeforeClusterUpgrade hook when already done)",
+ topologyVersion: "v1.4.4",
+ pendingHookAnnotation: "AfterClusterUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.3.3",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.3.3",
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{"v1.4.4"},
+ machineDeploymentsUpgradePlan: []string{},
+ machinePoolsUpgradePlan: []string{},
+ wantBeforeControlPlaneUpgradeRequest: &runtimehooksv1.BeforeControlPlaneUpgradeRequest{
+ FromKubernetesVersion: "v1.3.3",
+ ToKubernetesVersion: "v1.4.4", // CP picking up the first version in the plan
+ ControlPlaneUpgrades: toUpgradeStep([]string{"v1.4.4"}),
+ WorkersUpgrades: toUpgradeStep([]string{}),
+ },
+ beforeControlPlaneUpgradeResponse: nonBlockingBeforeControlPlaneUpgradeResponse,
+ wantVersion: "v1.4.4", // changed from previous step
+ wantIsStartingUpgrade: true,
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade", // changed from previous step
+ },
+ {
+ name: "when control plane is upgrading to the second minor: do not call hooks",
+ topologyVersion: "v1.4.4",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.4.4",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.3.3",
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{}, // changed from previous step
+ machineDeploymentsUpgradePlan: []string{},
+ machinePoolsUpgradePlan: []string{},
+ wantVersion: "v1.4.4",
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade",
+ },
+ {
+ name: "after control plane is upgraded to the second minor: call the AfterControlPlaneUpgrade hook, blocking answer",
+ topologyVersion: "v1.4.4",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.4.4",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.4.4", // changed from previous step
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{},
+ machineDeploymentsUpgradePlan: []string{},
+ machinePoolsUpgradePlan: []string{},
+ wantAfterControlPlaneUpgradeRequest: &runtimehooksv1.AfterControlPlaneUpgradeRequest{
+ KubernetesVersion: "v1.4.4",
+ ControlPlaneUpgrades: toUpgradeStep([]string{}),
+ WorkersUpgrades: toUpgradeStep([]string{}),
+ },
+ afterControlPlaneUpgradeResponse: blockingAfterControlPlaneUpgradeResponse,
+ wantVersion: "v1.4.4",
+ wantPendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade",
+ wantHookCacheEntry: ptr.To(cache.NewHookEntry(clusterForCacheEntry, runtimehooksv1.AfterControlPlaneUpgrade,
+ time.Now().Add(time.Duration(blockingAfterControlPlaneUpgradeResponse.RetryAfterSeconds)*time.Second), blockingAfterControlPlaneUpgradeResponse.Message)),
+ },
+ {
+ name: "after control plane is upgraded to the second minor: call the AfterControlPlaneUpgrade hook, non blocking answer",
+ topologyVersion: "v1.4.4",
+ pendingHookAnnotation: "AfterClusterUpgrade,AfterControlPlaneUpgrade",
+ controlPlaneObj: builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": "v1.4.4",
+ }).
+ WithStatusFields(map[string]interface{}{
+ "status.version": "v1.4.4", // changed from previous step
+ }).
+ Build(),
+ controlPlaneUpgradePlan: []string{},
+ machineDeploymentsUpgradePlan: []string{},
+ machinePoolsUpgradePlan: []string{},
+ wantAfterControlPlaneUpgradeRequest: &runtimehooksv1.AfterControlPlaneUpgradeRequest{
+ KubernetesVersion: "v1.4.4",
+ ControlPlaneUpgrades: toUpgradeStep([]string{}),
+ WorkersUpgrades: toUpgradeStep([]string{}),
+ },
+ afterControlPlaneUpgradeResponse: nonBlockingAfterControlPlaneUpgradeResponse,
+ wantVersion: "v1.4.4",
+ wantPendingHookAnnotation: "AfterClusterUpgrade", // changed from previous step
+ },
+ // Note: After MD upgrade completes, the AfterClusterUpgrade is called from reconcile_state.go
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+
+ s := &scope.Scope{
+ Blueprint: &scope.ClusterBlueprint{Topology: clusterv1.Topology{
+ Version: tt.topologyVersion,
+ ControlPlane: clusterv1.ControlPlaneTopology{
+ Replicas: ptr.To[int32](2),
+ },
+ }},
+ Current: &scope.ClusterState{
+ Cluster: &clusterv1.Cluster{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "test-cluster",
+ Namespace: "test-ns",
+ // Add managedFields and annotations that should be cleaned up before the Cluster is sent to the RuntimeExtension.
+ ManagedFields: []metav1.ManagedFieldsEntry{
+ {
+ APIVersion: builder.InfrastructureGroupVersion.String(),
+ Manager: "manager",
+ Operation: "Apply",
+ Time: ptr.To(metav1.Now()),
+ FieldsType: "FieldsV1",
+ },
+ },
+ Annotations: map[string]string{
+ "fizz": "buzz",
+ corev1.LastAppliedConfigAnnotation: "should be cleaned up",
+ conversion.DataAnnotation: "should be cleaned up",
+ },
+ },
+ // Add some more fields to check that conversion implemented when calling RuntimeExtension are properly handled.
+ Spec: clusterv1.ClusterSpec{
+ InfrastructureRef: clusterv1.ContractVersionedObjectReference{
+ APIGroup: "refAPIGroup1",
+ Kind: "refKind1",
+ Name: "refName1",
+ }},
+ },
+ ControlPlane: &scope.ControlPlaneState{Object: tt.controlPlaneObj},
+ },
+ UpgradeTracker: scope.NewUpgradeTracker(),
+ HookResponseTracker: scope.NewHookResponseTracker(),
+ }
+ if tt.pendingHookAnnotation != "" {
+ if s.Current.Cluster.Annotations == nil {
+ s.Current.Cluster.Annotations = map[string]string{}
+ }
+ s.Current.Cluster.Annotations[runtimev1.PendingHooksAnnotation] = tt.pendingHookAnnotation
+ }
+
+ s.UpgradeTracker.MinWorkersVersion = tt.minWorkersVersion
+ if len(tt.controlPlaneUpgradePlan) > 0 {
+ s.UpgradeTracker.ControlPlane.UpgradePlan = tt.controlPlaneUpgradePlan
+ }
+ if len(tt.machineDeploymentsUpgradePlan) > 0 {
+ s.UpgradeTracker.MachineDeployments.UpgradePlan = tt.machineDeploymentsUpgradePlan
+ }
+ if len(tt.machinePoolsUpgradePlan) > 0 {
+ s.UpgradeTracker.MachinePools.UpgradePlan = tt.machinePoolsUpgradePlan
+ }
+
+ hooksCalled := sets.Set[string]{}
+ validateHookCall := func(request runtimehooksv1.RequestObject) error {
+ switch request := request.(type) {
+ case *runtimehooksv1.BeforeClusterUpgradeRequest:
+ hooksCalled.Insert("BeforeClusterUpgrade")
+ if err := validateHookRequest(request, tt.wantBeforeClusterUpgradeRequest); err != nil {
+ return err
+ }
+ case *runtimehooksv1.BeforeControlPlaneUpgradeRequest:
+ hooksCalled.Insert("BeforeControlPlaneUpgrade")
+ if err := validateHookRequest(request, tt.wantBeforeControlPlaneUpgradeRequest); err != nil {
+ return err
+ }
+ case *runtimehooksv1.AfterControlPlaneUpgradeRequest:
+ hooksCalled.Insert("AfterControlPlaneUpgrade")
+ if err := validateHookRequest(request, tt.wantAfterControlPlaneUpgradeRequest); err != nil {
+ return err
+ }
+ case *runtimehooksv1.BeforeWorkersUpgradeRequest:
+ hooksCalled.Insert("BeforeWorkersUpgrade")
+ if err := validateHookRequest(request, tt.wantBeforeWorkersUpgradeRequest); err != nil {
+ return err
+ }
+ case *runtimehooksv1.AfterWorkersUpgradeRequest:
+ hooksCalled.Insert("AfterWorkersUpgrade")
+ if err := validateHookRequest(request, tt.wantAfterWorkersUpgradeRequest); err != nil {
+ return err
+ }
+ default:
+ return errors.Errorf("unhandled request type %T", request)
+ }
+ return validateClusterParameter(s.Current.Cluster)(request)
+ }
+
+ runtimeClient := fakeruntimeclient.NewRuntimeClientBuilder().
+ WithCatalog(catalog).
+ WithGetAllExtensionResponses(map[runtimecatalog.GroupVersionHook][]string{
+ beforeClusterUpgradeGVH: {"foo"},
+ beforeControlPlaneUpgradeGVH: {"foo"},
+ afterControlPlaneUpgradeGVH: {"foo"},
+ beforeWorkersUpgradeGVH: {"foo"},
+ afterWorkersUpgradeGVH: {"foo"},
+ }).
+ WithCallAllExtensionResponses(map[runtimecatalog.GroupVersionHook]runtimehooksv1.ResponseObject{
+ beforeClusterUpgradeGVH: tt.beforeClusterUpgradeResponse,
+ beforeControlPlaneUpgradeGVH: tt.beforeControlPlaneUpgradeResponse,
+ afterControlPlaneUpgradeGVH: tt.afterControlPlaneUpgradeResponse,
+ beforeWorkersUpgradeGVH: tt.beforeWorkersUpgradeResponse,
+ afterWorkersUpgradeGVH: tt.afterWorkersUpgradeResponse,
+ }).
+ WithCallAllExtensionValidations(validateHookCall).
+ Build()
+
+ fakeClient := fake.NewClientBuilder().WithScheme(fakeScheme).WithObjects(s.Current.Cluster).Build()
+
+ r := &generator{
+ Client: fakeClient,
+ RuntimeClient: runtimeClient,
+ hookCache: cache.New[cache.HookEntry](cache.HookCacheDefaultTTL),
+ }
+ version, err := r.computeControlPlaneVersion(ctx, s)
+ g.Expect(err).ToNot(HaveOccurred())
+
+ g.Expect(version).To(Equal(tt.wantVersion), "unexpected version")
+ g.Expect(s.UpgradeTracker.ControlPlane.IsPendingUpgrade).To(Equal(tt.wantIsPendingUpgrade), "unexpected IsPendingUpgrade")
+ g.Expect(s.UpgradeTracker.ControlPlane.IsStartingUpgrade).To(Equal(tt.wantIsStartingUpgrade), "unexpected IsStartingUpgrade")
+ g.Expect(s.UpgradeTracker.ControlPlane.IsWaitingForWorkersUpgrade).To(Equal(tt.wantIsWaitingForWorkersUpgrade), "unexpected IsWaitingForWorkersUpgrade")
+
+ // check call received
+ g.Expect(hooksCalled.Has("BeforeClusterUpgrade")).To(Equal(tt.wantBeforeClusterUpgradeRequest != nil), "Unexpected call/missing call to BeforeClusterUpgrade")
+ g.Expect(hooksCalled.Has("BeforeControlPlaneUpgrade")).To(Equal(tt.wantBeforeControlPlaneUpgradeRequest != nil), "Unexpected call/missing call to BeforeControlPlaneUpgrade")
+ g.Expect(hooksCalled.Has("AfterControlPlaneUpgrade")).To(Equal(tt.wantAfterControlPlaneUpgradeRequest != nil), "Unexpected call/missing call to AfterControlPlaneUpgrade")
+ g.Expect(hooksCalled.Has("BeforeWorkersUpgrade")).To(Equal(tt.wantBeforeWorkersUpgradeRequest != nil), "Unexpected call/missing call to BeforeWorkersUpgrade")
+ g.Expect(hooksCalled.Has("AfterWorkersUpgrade")).To(Equal(tt.wantAfterWorkersUpgradeRequest != nil), "Unexpected call/missing call to AfterWorkersUpgrade")
+
+ // check intent to call hooks
+ if tt.wantPendingHookAnnotation != "" {
+ g.Expect(s.Current.Cluster.Annotations).To(HaveKeyWithValue(runtimev1.PendingHooksAnnotation, tt.wantPendingHookAnnotation), "Unexpected PendingHookAnnotation")
+ } else {
+ g.Expect(s.Current.Cluster.Annotations).ToNot(HaveKey(runtimev1.PendingHooksAnnotation), "Unexpected PendingHookAnnotation")
+ }
+
+ if tt.wantHookCacheEntry != nil {
+ // Verify the cache entry.
+ cacheEntry, ok := r.hookCache.Has(tt.wantHookCacheEntry.Key())
+ g.Expect(ok).To(BeTrue())
+ g.Expect(cacheEntry.ObjectKey).To(Equal(tt.wantHookCacheEntry.ObjectKey))
+ g.Expect(cacheEntry.HookName).To(Equal(tt.wantHookCacheEntry.HookName))
+ g.Expect(cacheEntry.ReconcileAfter).To(BeTemporally("~", tt.wantHookCacheEntry.ReconcileAfter, 5*time.Second))
+ g.Expect(cacheEntry.ResponseMessage).To(Equal(tt.wantHookCacheEntry.ResponseMessage))
+
+ // Call computeControlPlaneVersion again and verify the cache hit.
+ hooksCalled = sets.Set[string]{}
+ version, err := r.computeControlPlaneVersion(ctx, s)
+ g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(version).To(Equal(tt.wantVersion))
+ g.Expect(hooksCalled).To(BeEmpty())
+ } else {
+ g.Expect(r.hookCache.Len()).To(Equal(0))
+ }
+ })
+ }
+}
+
+func validateHookRequest(request runtimehooksv1.RequestObject, wantRequest runtimehooksv1.RequestObject) error {
+ if request, ok := request.(*runtimehooksv1.BeforeClusterUpgradeRequest); ok {
+ if wantRequest, ok := wantRequest.(*runtimehooksv1.BeforeClusterUpgradeRequest); ok && wantRequest != nil {
+ if wantRequest.FromKubernetesVersion != request.FromKubernetesVersion {
+ return errors.Errorf("unexpected BeforeClusterUpgradeRequest.FromKubernetesVersion version %s, want %s", request.FromKubernetesVersion, wantRequest.FromKubernetesVersion)
+ }
+ if wantRequest.ToKubernetesVersion != request.ToKubernetesVersion {
+ return errors.Errorf("unexpected BeforeClusterUpgradeRequest.ToKubernetes version %s, want %s", request.ToKubernetesVersion, wantRequest.ToKubernetesVersion)
+ }
+ if !reflect.DeepEqual(wantRequest.ControlPlaneUpgrades, request.ControlPlaneUpgrades) {
+ return errors.Errorf("unexpected BeforeClusterUpgradeRequest.ControlPlaneUpgrades %s, want %s", request.ControlPlaneUpgrades, wantRequest.ControlPlaneUpgrades)
+ }
+ if !reflect.DeepEqual(wantRequest.WorkersUpgrades, request.WorkersUpgrades) {
+ return errors.Errorf("unexpected BeforeClusterUpgradeRequest.WorkersUpgrades %s, want %s", request.WorkersUpgrades, wantRequest.WorkersUpgrades)
+ }
+ } else {
+ return errors.Errorf("got an unexpected request of type %T", request)
+ }
+ }
+ if request, ok := request.(*runtimehooksv1.BeforeControlPlaneUpgradeRequest); ok {
+ if wantRequest, ok := wantRequest.(*runtimehooksv1.BeforeControlPlaneUpgradeRequest); ok && wantRequest != nil {
+ if wantRequest.FromKubernetesVersion != request.FromKubernetesVersion {
+ return errors.Errorf("unexpected BeforeControlPlaneUpgradeRequest.FromKubernetesVersion version %s, want %s", request.FromKubernetesVersion, wantRequest.FromKubernetesVersion)
+ }
+ if wantRequest.ToKubernetesVersion != request.ToKubernetesVersion {
+ return errors.Errorf("unexpected BeforeControlPlaneUpgradeRequest.ToKubernetes version %s, want %s", request.ToKubernetesVersion, wantRequest.ToKubernetesVersion)
+ }
+ if !reflect.DeepEqual(wantRequest.ControlPlaneUpgrades, request.ControlPlaneUpgrades) {
+ return errors.Errorf("unexpected BeforeControlPlaneUpgradeRequest.ControlPlaneUpgrades %s, want %s", request.ControlPlaneUpgrades, wantRequest.ControlPlaneUpgrades)
+ }
+ if !reflect.DeepEqual(wantRequest.WorkersUpgrades, request.WorkersUpgrades) {
+ return errors.Errorf("unexpected BeforeControlPlaneUpgradeRequest.WorkersUpgrades %s, want %s", request.WorkersUpgrades, wantRequest.WorkersUpgrades)
+ }
+ } else {
+ return errors.Errorf("got an unexpected request of type %T", request)
+ }
+ }
+ if request, ok := request.(*runtimehooksv1.BeforeWorkersUpgradeRequest); ok {
+ if wantRequest, ok := wantRequest.(*runtimehooksv1.BeforeWorkersUpgradeRequest); ok && wantRequest != nil {
+ if wantRequest.FromKubernetesVersion != request.FromKubernetesVersion {
+ return errors.Errorf("unexpected BeforeWorkersUpgradeRequest.FromKubernetesVersion version %s, want %s", request.FromKubernetesVersion, wantRequest.FromKubernetesVersion)
+ }
+ if wantRequest.ToKubernetesVersion != request.ToKubernetesVersion {
+ return errors.Errorf("unexpected BeforeWorkersUpgradeRequest.ToKubernetes version %s, want %s", request.ToKubernetesVersion, wantRequest.ToKubernetesVersion)
+ }
+ if !reflect.DeepEqual(wantRequest.ControlPlaneUpgrades, request.ControlPlaneUpgrades) {
+ return errors.Errorf("unexpected BeforeWorkersUpgradeRequest.ControlPlaneUpgrades %s, want %s", request.ControlPlaneUpgrades, wantRequest.ControlPlaneUpgrades)
+ }
+ if !reflect.DeepEqual(wantRequest.WorkersUpgrades, request.WorkersUpgrades) {
+ return errors.Errorf("unexpected BeforeWorkersUpgradeRequest.WorkersUpgrades %s, want %s", request.WorkersUpgrades, wantRequest.WorkersUpgrades)
+ }
+ } else {
+ return errors.Errorf("got an unexpected request of type %T", request)
+ }
+ }
+ if request, ok := request.(*runtimehooksv1.AfterControlPlaneUpgradeRequest); ok {
+ if wantRequest, ok := wantRequest.(*runtimehooksv1.AfterControlPlaneUpgradeRequest); ok && wantRequest != nil {
+ if wantRequest.KubernetesVersion != request.KubernetesVersion {
+ return errors.Errorf("unexpected AfterControlPlaneUpgradeRequest.Kubernetes version %s, want %s", request.KubernetesVersion, wantRequest.KubernetesVersion)
+ }
+ if !reflect.DeepEqual(wantRequest.ControlPlaneUpgrades, request.ControlPlaneUpgrades) {
+ return errors.Errorf("unexpected AfterControlPlaneUpgradeRequest.ControlPlaneUpgrades %s, want %s", request.ControlPlaneUpgrades, wantRequest.ControlPlaneUpgrades)
+ }
+ if !reflect.DeepEqual(wantRequest.WorkersUpgrades, request.WorkersUpgrades) {
+ return errors.Errorf("unexpected AfterControlPlaneUpgradeRequest.WorkersUpgrades %s, want %s", request.WorkersUpgrades, wantRequest.WorkersUpgrades)
+ }
+ } else {
+ return errors.Errorf("got an unexpected request of type %T", request)
+ }
+ }
+ if request, ok := request.(*runtimehooksv1.AfterWorkersUpgradeRequest); ok {
+ if wantRequest, ok := wantRequest.(*runtimehooksv1.AfterWorkersUpgradeRequest); ok && wantRequest != nil {
+ if wantRequest.KubernetesVersion != request.KubernetesVersion {
+ return errors.Errorf("unexpected AfterWorkersUpgradeRequest.Kubernetes version %s, want %s", request.KubernetesVersion, wantRequest.KubernetesVersion)
+ }
+ if !reflect.DeepEqual(wantRequest.ControlPlaneUpgrades, request.ControlPlaneUpgrades) {
+ return errors.Errorf("unexpected AfterWorkersUpgradeRequest.ControlPlaneUpgrades %s, want %s", request.ControlPlaneUpgrades, wantRequest.ControlPlaneUpgrades)
+ }
+ if !reflect.DeepEqual(wantRequest.WorkersUpgrades, request.WorkersUpgrades) {
+ return errors.Errorf("unexpected AfterWorkersUpgradeRequest.WorkersUpgrades %s, want %s", request.WorkersUpgrades, wantRequest.WorkersUpgrades)
+ }
+ } else {
+ return errors.Errorf("got an unexpected request of type %T", request)
+ }
+ }
+ return nil
+}
+
+func validateClusterParameter(originalCluster *clusterv1.Cluster) func(req runtimehooksv1.RequestObject) error {
+ // return a func that allows to check if expected transformations are applied to the Cluster parameter which is
+ // included in the payload for lifecycle hooks calls.
+ return func(req runtimehooksv1.RequestObject) error {
+ var cluster clusterv1beta1.Cluster
+ switch req := req.(type) {
+ case *runtimehooksv1.BeforeClusterUpgradeRequest:
+ cluster = req.Cluster
+ case *runtimehooksv1.BeforeControlPlaneUpgradeRequest:
+ cluster = req.Cluster
+ case *runtimehooksv1.AfterControlPlaneUpgradeRequest:
+ cluster = req.Cluster
+ case *runtimehooksv1.BeforeWorkersUpgradeRequest:
+ cluster = req.Cluster
+ case *runtimehooksv1.AfterWorkersUpgradeRequest:
+ cluster = req.Cluster
+ default:
+ return errors.Errorf("unhandled request type %T", req)
+ }
+
+ // check if managed fields and well know annotations have been removed from the Cluster parameter included in the payload lifecycle hooks calls.
+ if cluster.GetManagedFields() != nil {
+ return errors.New("managedFields should have been cleaned up")
+ }
+ if _, ok := cluster.Annotations[corev1.LastAppliedConfigAnnotation]; ok {
+ return errors.New("last-applied-configuration annotation should have been cleaned up")
+ }
+ if _, ok := cluster.Annotations[conversion.DataAnnotation]; ok {
+ return errors.New("conversion annotation should have been cleaned up")
+ }
+
+ // check the Cluster parameter included in the payload lifecycle hooks calls has been properly converted from v1beta2 to v1beta1.
+ // Note: to perform this check we convert the parameter back to v1beta2 and compare with the original cluster +/- expected transformations.
+ v1beta2Cluster := &clusterv1.Cluster{}
+ if err := cluster.ConvertTo(v1beta2Cluster); err != nil {
+ return err
+ }
+
+ originalClusterCopy := originalCluster.DeepCopy()
+ originalClusterCopy.SetManagedFields(nil)
+ if originalClusterCopy.Annotations != nil {
+ annotations := maps.Clone(cluster.Annotations)
+ delete(annotations, corev1.LastAppliedConfigAnnotation)
+ delete(annotations, conversion.DataAnnotation)
+ originalClusterCopy.Annotations = annotations
+ }
+
+ // drop conditions, it is not possible to round trip without the data annotation.
+ originalClusterCopy.Status.Conditions = nil
+
+ if !apiequality.Semantic.DeepEqual(originalClusterCopy, v1beta2Cluster) {
+ return errors.Errorf("call to extension is not passing the expected cluster object: %s", cmp.Diff(originalClusterCopy, v1beta2Cluster))
+ }
+ return nil
+ }
+}
diff --git a/exp/topology/desiredstate/upgrade_plan.go b/exp/topology/desiredstate/upgrade_plan.go
new file mode 100644
index 000000000000..9df1ebee313a
--- /dev/null
+++ b/exp/topology/desiredstate/upgrade_plan.go
@@ -0,0 +1,480 @@
+/*
+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 desiredstate
+
+import (
+ "context"
+ "fmt"
+ "slices"
+ "strings"
+
+ "github.com/blang/semver/v4"
+ "github.com/pkg/errors"
+ "k8s.io/apimachinery/pkg/util/sets"
+ "sigs.k8s.io/controller-runtime/pkg/client"
+
+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1"
+ runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client"
+ "sigs.k8s.io/cluster-api/exp/topology/scope"
+ "sigs.k8s.io/cluster-api/feature"
+ "sigs.k8s.io/cluster-api/internal/contract"
+ "sigs.k8s.io/cluster-api/util/cache"
+ "sigs.k8s.io/cluster-api/util/version"
+)
+
+// ComputeUpgradePlan is responsible to computes the upgrade plan for both control plane and workers
+// and to set up the upgrade tracker accordingly when there is an upgrade pending.
+//
+// The upgrade plan for control plane is the result of a pluggable function that should return all the
+// intermediates version a control plan upgrade must go through to reach desired version.
+//
+// The pluggable function could return also upgrade steps for workers; if not, this func
+// will determine the minimal number of workers upgrade steps, thus minimizing impact on workloads and reducing the overall upgrade time.
+func ComputeUpgradePlan(ctx context.Context, s *scope.Scope, getUpgradePlan GetUpgradePlanFunc) error {
+ // Return early if control plane is not yet created.
+ if s.Current.ControlPlane == nil || s.Current.ControlPlane.Object == nil {
+ return nil
+ }
+
+ // Get desired version, control plane versions and min worker versions
+ // NOTE: we consider both machine deployment and machine pools min for computing workers version
+ // because we are going to ask only a single workers upgrade plan.
+ desiredVersion := s.Blueprint.Topology.Version
+ desiredSemVer, err := semver.ParseTolerant(desiredVersion)
+ if err != nil {
+ return errors.Wrapf(err, "failed to parse Cluster version %s", desiredVersion)
+ }
+
+ controlPlaneVersion := ""
+ v, err := contract.ControlPlane().Version().Get(s.Current.ControlPlane.Object)
+ if err != nil {
+ return errors.Wrap(err, "failed to get the version from control plane spec")
+ }
+ controlPlaneVersion = *v
+ controlPlaneSemVer, err := semver.ParseTolerant(*v)
+ if err != nil {
+ return errors.Wrapf(err, "failed to parse ControlPlane version %s", *v)
+ }
+
+ var minWorkersSemVer *semver.Version
+ for _, md := range s.Current.MachineDeployments {
+ if md.Object.Spec.Template.Spec.Version != "" {
+ currentSemVer, err := semver.ParseTolerant(md.Object.Spec.Template.Spec.Version)
+ if err != nil {
+ return errors.Wrapf(err, "failed to parse version %s of MachineDeployment %s", md.Object.Spec.Template.Spec.Version, md.Object.Name)
+ }
+ if minWorkersSemVer == nil || isLowerThanMinVersion(currentSemVer, *minWorkersSemVer, controlPlaneSemVer) {
+ minWorkersSemVer = ¤tSemVer
+ }
+ }
+ }
+
+ for _, mp := range s.Current.MachinePools {
+ if mp.Object.Spec.Template.Spec.Version != "" {
+ currentSemVer, err := semver.ParseTolerant(mp.Object.Spec.Template.Spec.Version)
+ if err != nil {
+ return errors.Wrapf(err, "failed to parse version %s of MachinePool %s", mp.Object.Spec.Template.Spec.Version, mp.Object.Name)
+ }
+ if minWorkersSemVer == nil || isLowerThanMinVersion(currentSemVer, *minWorkersSemVer, controlPlaneSemVer) {
+ minWorkersSemVer = ¤tSemVer
+ }
+ }
+ }
+
+ minWorkersVersion := ""
+ if minWorkersSemVer != nil {
+ minWorkersVersion = fmt.Sprintf("v%s", minWorkersSemVer.String())
+ }
+ s.UpgradeTracker.MinWorkersVersion = minWorkersVersion
+
+ // If both control plane and workers are already at the desired version, there is no need to compute the upgrade plan.
+ if controlPlaneSemVer.String() == desiredSemVer.String() && (minWorkersSemVer == nil || minWorkersSemVer.String() == desiredSemVer.String()) {
+ return nil
+ }
+
+ // At this stage we know that an upgrade is required, then call the pluggable func that returns the upgrade plan.
+ controlPlaneUpgradePlan, workersUpgradePlan, err := getUpgradePlan(ctx, desiredVersion, controlPlaneVersion, minWorkersVersion)
+ if err != nil {
+ return err
+ }
+
+ // DefaultAndValidateUpgradePlans validates both control plane and workers upgrade plan.
+ // If workers upgrade plan is not specified, default it with the minimal number of workers upgrade steps.
+ workersUpgradePlan, err = DefaultAndValidateUpgradePlans(desiredVersion, controlPlaneVersion, minWorkersVersion, controlPlaneUpgradePlan, workersUpgradePlan)
+ if err != nil {
+ return err
+ }
+
+ // Sets the control plane upgrade plan.
+ s.UpgradeTracker.ControlPlane.UpgradePlan = controlPlaneUpgradePlan
+
+ // Sets the machine deployment and workers upgrade plan.
+ // Note. Each MachineDeployment/MachinePool then has to figure out if/when to pick up the first version in the plan,
+ // because the minWorkersVersion will be included until all of them are upgraded.
+ if len(s.Current.MachineDeployments) > 0 {
+ s.UpgradeTracker.MachineDeployments.UpgradePlan = workersUpgradePlan
+ }
+ if len(s.Current.MachinePools) > 0 {
+ s.UpgradeTracker.MachinePools.UpgradePlan = workersUpgradePlan
+ }
+
+ return nil
+}
+
+// DefaultAndValidateUpgradePlans validates both control plane and workers upgrade plan.
+// If workers upgrade plan is not specified, default it with the minimal number of workers upgrade steps.
+func DefaultAndValidateUpgradePlans(desiredVersion string, controlPlaneVersion string, minWorkersVersion string, controlPlaneUpgradePlan []string, workersUpgradePlan []string) ([]string, error) {
+ desiredSemVer, err := semver.ParseTolerant(desiredVersion)
+ if err != nil {
+ return nil, errors.Wrapf(err, "failed to parse Cluster version %s", desiredVersion)
+ }
+
+ controlPlaneSemVer, err := semver.ParseTolerant(controlPlaneVersion)
+ if err != nil {
+ return nil, errors.Wrapf(err, "failed to parse ControlPlane version %s", controlPlaneVersion)
+ }
+
+ var minWorkersSemVer *semver.Version
+ if minWorkersVersion != "" {
+ v, err := semver.ParseTolerant(minWorkersVersion)
+ if err != nil {
+ return nil, errors.Wrapf(err, "failed to parse min workers version %s", minWorkersVersion)
+ }
+ minWorkersSemVer = &v
+ }
+
+ // Setup for tracking known version for each minors; this info will be used to build intermediate steps for workers when required
+ // Note: The control plane might be already one version ahead of workers, we always add current control plane version
+ // (it should be used as a target version for workers lagging behind).
+ minors := map[uint64]string{}
+ minors[controlPlaneSemVer.Minor] = controlPlaneVersion
+
+ // Setup for tracking version order, which is required for disambiguating where there are version with different build numbers
+ // and thus it is not possible to determine order (and thus the code relies on the version order in the upgrade plan).
+ versionOrder := map[string]int{}
+ versionOrder[controlPlaneVersion] = -1
+
+ // Validate the control plane upgrade plan.
+ if version.Compare(controlPlaneSemVer, desiredSemVer, version.WithBuildTags()) != 0 {
+ currentSemVer := controlPlaneSemVer
+ for i, targetVersion := range controlPlaneUpgradePlan {
+ versionOrder[targetVersion] = i
+ targetSemVer, err := semver.ParseTolerant(targetVersion)
+ if err != nil {
+ return nil, errors.Wrapf(err, "invalid ControlPlane upgrade plan: item %d; failed to parse version %s", i, targetVersion)
+ }
+
+ // Check versions in the control plane upgrade plan are in the right order.
+ // Note: we tolerate having one version followed by another with the same major.minor.patch but different build tags (version.Compare==2)
+ if version.Compare(targetSemVer, currentSemVer, version.WithBuildTags()) <= 0 {
+ return nil, errors.Errorf("invalid ControlPlane upgrade plan: item %d; version %s must be greater than v%s", i, targetVersion, currentSemVer)
+ }
+
+ // Check we are not skipping minors.
+ if currentSemVer.Minor != targetSemVer.Minor && currentSemVer.Minor+1 != targetSemVer.Minor {
+ return nil, errors.Errorf("invalid ControlPlane upgrade plan: item %d; expecting a version with minor %d or %d, found version %s", i, currentSemVer.Minor, currentSemVer.Minor+1, targetVersion)
+ }
+
+ minors[targetSemVer.Minor] = targetVersion
+ currentSemVer = targetSemVer
+ }
+ if version.Compare(currentSemVer, desiredSemVer, version.WithBuildTags()) != 0 {
+ return nil, errors.Errorf("invalid ControlPlane upgrade plan: control plane upgrade plan must end with version %s, ends with %s instead", desiredVersion, fmt.Sprintf("v%s", currentSemVer))
+ }
+ } else if len(controlPlaneUpgradePlan) > 0 {
+ return nil, errors.New("invalid ControlPlane upgrade plan: control plane is already at the desired version")
+ }
+
+ // Defaults and validate the workers upgrade plan.
+ if minWorkersSemVer != nil && version.Compare(*minWorkersSemVer, desiredSemVer, version.WithBuildTags()) != 0 {
+ if len(controlPlaneUpgradePlan) > 0 {
+ // Check that the workers upgrade plan only includes the same versions considered for the control plane upgrade plan,
+ // plus the control plane version to handle the case that CP already completed its upgrade.
+ if diff := sets.New(workersUpgradePlan...).Difference(sets.New(controlPlaneUpgradePlan...).Insert(controlPlaneVersion)); len(diff) > 0 {
+ return nil, errors.Errorf("invalid workers upgrade plan: versions %s doesn't match any versions in the control plane upgrade plan nor the control plane version", strings.Join(diff.UnsortedList(), ","))
+ }
+ }
+
+ // If the workers upgrade plan is empty, default it by adding:
+ // - upgrade steps whenever required to prevent violation of version skew rules
+ // - an upgrade step at the end of the upgrade sequence
+ if len(workersUpgradePlan) == 0 {
+ currentMinor := minWorkersSemVer.Minor
+ targetMinor := desiredSemVer.Minor
+ for i := range targetMinor - currentMinor {
+ if i > 0 && i%3 == 0 {
+ targetVersion, ok := minors[currentMinor+i]
+ if !ok {
+ // Note: this should never happen, all the minors in the range minWorkersSemVer.Minor-desiredSemVer.Minor should exist in the list of minors, which is
+ // derived from control plane upgrade plan + current control plane version (a superset of the versions in the workers upgrade plan)
+ return nil, errors.Wrapf(err, "invalid upgrade plan; unable to identify version for minor %d", currentMinor+i)
+ }
+ workersUpgradePlan = append(workersUpgradePlan, targetVersion)
+ }
+ }
+ if len(workersUpgradePlan) == 0 || workersUpgradePlan[len(workersUpgradePlan)-1] != desiredVersion {
+ workersUpgradePlan = append(workersUpgradePlan, desiredVersion)
+ }
+ }
+
+ // Validate the workers upgrade plan.
+ currentSemVer := *minWorkersSemVer
+ currentMinor := currentSemVer.Minor
+ for i, targetVersion := range workersUpgradePlan {
+ targetSemVer, err := semver.ParseTolerant(targetVersion)
+ if err != nil {
+ return nil, errors.Wrapf(err, "invalid workers upgrade plan, item %d; failed to parse version %s", i, targetVersion)
+ }
+
+ // Check versions in the workers upgrade plan are in the right order.
+ cmp := version.Compare(targetSemVer, currentSemVer, version.WithBuildTags())
+ switch {
+ case cmp <= 0:
+ return nil, errors.Errorf("invalid workers upgrade plan, item %d; version %s must be greater than v%s", i, targetVersion, currentSemVer)
+ case cmp == 2:
+ // In the case of same major.minor.patch but different build tags (version.Compare==2), check if
+ // versions are in the same order as in the control plane upgrade plan.
+ targetVersionOrder, ok := versionOrder[targetVersion]
+ if !ok {
+ // Note: this should never happen, all the versions in the workers upgrade plan should exist in versionOrder, which is
+ // derived from control plane upgrade plan + current control plane version (a superset of the versions in the workers upgrade plan)
+ return nil, errors.Errorf("invalid workers upgrade plan, item %d; failer to determine version %s order", i, targetVersion)
+ }
+ currentVersionOrder, ok := versionOrder[fmt.Sprintf("v%s", currentSemVer)]
+ if !ok {
+ // Note: this should never happen, all the versions in the workers upgrade plan should exist in versionOrder, which is
+ // derived from control plane upgrade plan + current control plane version (a superset of the versions in the workers upgrade plan)
+ return nil, errors.Errorf("failer to determine version v%s order", currentSemVer)
+ }
+ if targetVersionOrder < currentVersionOrder {
+ return nil, errors.Errorf("invalid workers upgrade plan, item %d; version %s must be before v%s", i, targetVersion, currentSemVer)
+ }
+ }
+
+ targetMinor := targetSemVer.Minor
+ if targetMinor-currentMinor > 3 {
+ return nil, errors.Errorf("invalid workers upgrade plan, item %d; workers cannot go from minor %d (%s) to minor %d (%s), an intermediate step is required to comply with Kubernetes version skew rules", i, currentMinor, fmt.Sprintf("v%s", currentSemVer.String()), targetMinor, targetVersion)
+ }
+
+ currentSemVer = targetSemVer
+ currentMinor = currentSemVer.Minor
+ }
+ if version.Compare(currentSemVer, desiredSemVer, version.WithBuildTags()) != 0 {
+ return nil, errors.Errorf("invalid workers upgrade plan; workers upgrade plan must end with version %s, ends with %s instead", desiredVersion, fmt.Sprintf("v%s", currentSemVer))
+ }
+ } else if len(workersUpgradePlan) > 0 {
+ return nil, errors.New("invalid worker upgrade plan; there are no workers or workers already at the desired version")
+ }
+
+ return workersUpgradePlan, nil
+}
+
+func isLowerThanMinVersion(v, minVersion, controlPlaneSemVer semver.Version) bool {
+ switch cmp := version.Compare(v, minVersion, version.WithBuildTags()); cmp {
+ case -1:
+ // v is lower than minVersion
+ return true
+ case 2:
+ // v is different from minVersion, but it is not possible to determine order;
+ // use control plane version to resolve: MD/MP version can either be equal to control plane version or an older version,
+ // so v is considered lower than minVersion when different from control plane version.
+ return v.String() != controlPlaneSemVer.String()
+ default:
+ return false
+ }
+}
+
+// GetUpgradePlanFunc defines the signature for a func that returns the upgrade plan for control plane and workers.
+//
+// The upgrade plan for control plane must be a list of intermediate version the control plane must go through
+// to reach the desired version. The following rules apply:
+// - there should be at least one version for every minor between currentControlPlaneVersion (excluded) and desiredVersion (included).
+// - each version must be:
+// - greater than currentControlPlaneVersion (or with a different build number)
+// - greater than the previous version in the list (or with a different build number)
+// - less or equal to desiredVersion (or with a different build number)
+// - the last version in the plan must be equal to the desired version
+//
+// The upgrade plan for workers instead in most cases could be left to empty, because the system will automatically
+// determine the minimal number of workers upgrade steps, thus minimizing impact on workloads and reducing
+// the overall upgrade time.
+//
+// If instead for any reason the GetUpgradePlanFunc returns a custom upgrade path for workers, the following rules apply:
+// - each version must be:
+// - equal to currentControlPlaneVersion or to one of the versions in the control plane upgrade plan.
+// - greater than current min worker - MachineDeployment & MachinePool - version (or with a different build number)
+// - greater than the previous version in the list (or with a different build number)
+// - less or equal to the desiredVersion (or with a different build number)
+// - in case of versions with the same major/minor/patch version but different build number, also the order
+// of those versions must be the same for control plane and worker upgrade plan.
+// - the last version in the plan must be equal to the desired version
+// - the upgrade plane must have all the intermediate version which workers must go through to avoid breaking rules
+// defining the max version skew between control plane and workers.
+type GetUpgradePlanFunc func(_ context.Context, desiredVersion, currentControlPlaneVersion, currentMinWorkersVersion string) ([]string, []string, error)
+
+// GetUpgradePlanOneMinor returns an upgrade plan to reach the next minor.
+// The workers upgrade plan will be left empty, thus deferring to ComputeUpgradePlan to compute it.
+// NOTE: This is the func the system is going to use when there are no Kubernetes versions or UpgradePlan hook
+// defined in the ClusterClass. In this scenario, only upgrade by one minor is supported (same as before implementing chained upgrades).
+func GetUpgradePlanOneMinor(_ context.Context, desiredVersion, currentControlPlaneVersion, _ string) ([]string, []string, error) {
+ desiredSemVer, err := semver.ParseTolerant(desiredVersion)
+ if err != nil {
+ return nil, nil, errors.Wrap(err, "failed to parse desired version")
+ }
+
+ currentControlPlaneSemVer, err := semver.ParseTolerant(currentControlPlaneVersion)
+ if err != nil {
+ return nil, nil, errors.Wrap(err, "failed to parse current ControlPlane version")
+ }
+
+ if currentControlPlaneSemVer.String() == desiredSemVer.String() {
+ return nil, nil, nil
+ }
+
+ if desiredSemVer.Minor > currentControlPlaneSemVer.Minor+1 {
+ return nil, nil, errors.Errorf("cannot compute an upgrade plan from %s to %s", currentControlPlaneVersion, desiredVersion)
+ }
+
+ return []string{desiredVersion}, nil, nil
+}
+
+// GetUpgradePlanFromClusterClassVersions returns an upgrade plan based on versions defined on a ClusterClass.
+// The control plane plan will use the latest version for each minor in between currentControlPlaneVersion and desiredVersion;
+// workers upgrade plan will be left empty, thus deferring to ComputeUpgradePlan to compute the most efficient plan.
+// NOTE: This is the func the system is going to use when there are Kubernetes versions defined in the ClusterClass.
+func GetUpgradePlanFromClusterClassVersions(clusterClassVersions []string) func(_ context.Context, desiredVersion, currentControlPlaneVersion, _ string) ([]string, []string, error) {
+ return func(_ context.Context, desiredVersion, currentControlPlaneVersion, _ string) ([]string, []string, error) {
+ desiredSemVer, err := semver.ParseTolerant(desiredVersion)
+ if err != nil {
+ return nil, nil, errors.Wrap(err, "failed to parse desired version")
+ }
+
+ currentControlPlaneSemVer, err := semver.ParseTolerant(currentControlPlaneVersion)
+ if err != nil {
+ return nil, nil, errors.Wrap(err, "failed to parse current ControlPlane version")
+ }
+
+ if currentControlPlaneSemVer.String() == desiredSemVer.String() {
+ return nil, nil, nil
+ }
+
+ // Pick all the known kubernetes versions starting from control plane version (excluded) to desired version.
+ upgradePlan := []string{}
+ start := false
+ end := false
+ for _, v := range clusterClassVersions {
+ semV, err := semver.ParseTolerant(v)
+ if err != nil {
+ return nil, nil, errors.Wrapf(err, "failed to parse version %s", v)
+ }
+ if (start && !end) || (!start && semV.Minor > currentControlPlaneSemVer.Minor) {
+ upgradePlan = append(upgradePlan, v)
+ }
+ if semV.String() == currentControlPlaneSemVer.String() || version.Compare(currentControlPlaneSemVer, semV, version.WithBuildTags()) < 0 {
+ start = true
+ }
+ if semV.String() == desiredSemVer.String() || version.Compare(desiredSemVer, semV, version.WithBuildTags()) < 0 {
+ end = true
+ }
+ }
+
+ // In case there is more than one version for one minor, drop all the versions for one minor except the last.
+ simplifiedUpgradePlan := []string{}
+ currentMinor := currentControlPlaneSemVer.Minor
+ for _, v := range upgradePlan {
+ semV, err := semver.ParseTolerant(v)
+ if err != nil {
+ return nil, nil, errors.Wrapf(err, "failed to parse version %s", v)
+ }
+ if semV.Minor > currentMinor {
+ simplifiedUpgradePlan = append(simplifiedUpgradePlan, v)
+ }
+ if semV.Minor == currentMinor && len(simplifiedUpgradePlan) > 0 {
+ simplifiedUpgradePlan[len(simplifiedUpgradePlan)-1] = v
+ }
+ currentMinor = semV.Minor
+ }
+ return simplifiedUpgradePlan, nil, nil
+ }
+}
+
+// GenerateUpgradePlanCacheEntry is an entry for the GenerateUpgradePlan hook cache.
+type GenerateUpgradePlanCacheEntry struct {
+ ClusterKey client.ObjectKey
+ FromControlPlaneKubernetesVersion string
+ FromWorkersKubernetesVersion string
+ ToKubernetesVersion string
+ ControlPlaneUpgradePlan []string
+ WorkersUpgradePlan []string
+}
+
+// Key returns the cache key of a GenerateUpgradePlanCacheEntry.
+func (r GenerateUpgradePlanCacheEntry) Key() string {
+ return fmt.Sprintf("%s: (%s,%s) => %s", r.ClusterKey, r.FromControlPlaneKubernetesVersion, r.FromWorkersKubernetesVersion, r.ToKubernetesVersion)
+}
+
+// GetUpgradePlanFromExtension returns an upgrade plan by calling the GenerateUpgradePlan runtime extension.
+func GetUpgradePlanFromExtension(runtimeClient runtimeclient.Client, getUpgradePlanCache cache.Cache[GenerateUpgradePlanCacheEntry], cluster *clusterv1.Cluster, extensionName string) func(ctx context.Context, desiredVersion, currentControlPlaneVersion, currentMinWorkersVersion string) ([]string, []string, error) {
+ return func(ctx context.Context, desiredVersion, currentControlPlaneVersion, currentMinWorkersVersion string) ([]string, []string, error) {
+ if !feature.Gates.Enabled(feature.RuntimeSDK) {
+ return nil, nil, errors.Errorf("can not use GenerateUpgradePlan extension %q if RuntimeSDK feature flag is disabled", extensionName)
+ }
+
+ // Prepare the request.
+ req := &runtimehooksv1.GenerateUpgradePlanRequest{
+ Cluster: *cleanupCluster(cluster.DeepCopy()),
+ FromControlPlaneKubernetesVersion: currentControlPlaneVersion,
+ FromWorkersKubernetesVersion: currentMinWorkersVersion,
+ ToKubernetesVersion: desiredVersion,
+ }
+
+ entry := GenerateUpgradePlanCacheEntry{
+ ClusterKey: client.ObjectKeyFromObject(cluster),
+ FromControlPlaneKubernetesVersion: req.FromControlPlaneKubernetesVersion,
+ FromWorkersKubernetesVersion: req.FromWorkersKubernetesVersion,
+ ToKubernetesVersion: req.ToKubernetesVersion,
+ }
+
+ if cacheEntry, ok := getUpgradePlanCache.Has(entry.Key()); ok {
+ return slices.Clone(cacheEntry.ControlPlaneUpgradePlan), slices.Clone(cacheEntry.WorkersUpgradePlan), nil
+ }
+
+ // Call the extension.
+ resp := &runtimehooksv1.GenerateUpgradePlanResponse{}
+ if err := runtimeClient.CallExtension(ctx, runtimehooksv1.GenerateUpgradePlan, cluster, extensionName, req, resp); err != nil {
+ return nil, nil, errors.Wrap(err, "failed to get upgrade plan from extension")
+ }
+
+ // Convert UpgradeStep to string slice.
+ controlPlaneUpgradePlan := make([]string, len(resp.ControlPlaneUpgrades))
+ for i, step := range resp.ControlPlaneUpgrades {
+ controlPlaneUpgradePlan[i] = step.Version
+ }
+
+ workersUpgradePlan := make([]string, len(resp.WorkersUpgrades))
+ for i, step := range resp.WorkersUpgrades {
+ workersUpgradePlan[i] = step.Version
+ }
+
+ entry.ControlPlaneUpgradePlan = slices.Clone(controlPlaneUpgradePlan)
+ entry.WorkersUpgradePlan = slices.Clone(workersUpgradePlan)
+ getUpgradePlanCache.Add(entry)
+
+ return controlPlaneUpgradePlan, workersUpgradePlan, nil
+ }
+}
diff --git a/exp/topology/desiredstate/upgrade_plan_test.go b/exp/topology/desiredstate/upgrade_plan_test.go
new file mode 100644
index 000000000000..cb21acafafac
--- /dev/null
+++ b/exp/topology/desiredstate/upgrade_plan_test.go
@@ -0,0 +1,1273 @@
+/*
+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 desiredstate
+
+import (
+ "context"
+ "testing"
+ "time"
+
+ "github.com/blang/semver/v4"
+ . "github.com/onsi/gomega"
+ "github.com/pkg/errors"
+ utilfeature "k8s.io/component-base/featuregate/testing"
+ "sigs.k8s.io/controller-runtime/pkg/client"
+
+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
+ runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1"
+ runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog"
+ "sigs.k8s.io/cluster-api/exp/topology/scope"
+ "sigs.k8s.io/cluster-api/feature"
+ fakeruntimeclient "sigs.k8s.io/cluster-api/internal/runtime/client/fake"
+ "sigs.k8s.io/cluster-api/util/cache"
+ "sigs.k8s.io/cluster-api/util/test/builder"
+)
+
+func TestIsLowerThanMinVersion(t *testing.T) {
+ tests := []struct {
+ name string
+ v semver.Version
+ minVersion semver.Version
+ controlPlaneVersion semver.Version
+ want bool
+ }{
+ {
+ name: "Equal",
+ controlPlaneVersion: semver.MustParse("1.30.1"), // control plane at 1.30.1
+ minVersion: semver.MustParse("1.30.1"), // first machine deployment at 1.30.1
+ v: semver.MustParse("1.30.1"), // second machine deployment at 1.30.1
+ want: false,
+ },
+ {
+ name: "Lower",
+ controlPlaneVersion: semver.MustParse("1.30.1"), // control plane at 1.30.1
+ minVersion: semver.MustParse("1.30.1"), // first machine deployment at 1.30.1
+ v: semver.MustParse("1.29.0"), // second machine deployment still at 1.29.0
+ want: true,
+ },
+ {
+ name: "Equal pre-release",
+ controlPlaneVersion: semver.MustParse("1.30.1-alpha.1"), // control plane at 1.30.1-alpha.1
+ minVersion: semver.MustParse("1.30.1-alpha.1"), // first machine deployment at 1.30.1-alpha.1
+ v: semver.MustParse("1.30.1-alpha.1"), // second machine deployment at 1.30.1-alpha.1
+ want: false,
+ },
+ {
+ name: "Lower pre-release",
+ controlPlaneVersion: semver.MustParse("1.30.1-alpha.1"), // control plane at 1.30.1-alpha.1
+ minVersion: semver.MustParse("1.30.1-alpha.1"), // first machine deployment at 1.30.1-alpha.1
+ v: semver.MustParse("1.30.1-alpha.0"), // second machine deployment still at 1.30.1-alpha.0
+ want: true,
+ },
+ {
+ name: "Equal pre-release",
+ controlPlaneVersion: semver.MustParse("1.31.1+foo.2-bar.1"), // control plane at 1.31.1+foo.2-bar.1
+ minVersion: semver.MustParse("1.31.1+foo.2-bar.1"), // first machine deployment at 1.31.1+foo.2-bar.1
+ v: semver.MustParse("1.31.1+foo.2-bar.1"), // second machine deployment at 1.31.1+foo.2-bar.1
+ want: false,
+ },
+ {
+ name: "Lower pre-release",
+ controlPlaneVersion: semver.MustParse("1.31.1+foo.2-bar.1"), // control plane at 1.31.1+foo.2-bar.1
+ minVersion: semver.MustParse("1.31.1+foo.2-bar.1"), // first machine deployment at 1.31.1+foo.2-bar.1
+ v: semver.MustParse("1.31.1+foo.1-bar.1"), // second machine deployment still at 1.31.1+foo.1-bar.1
+ want: true,
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+
+ got := isLowerThanMinVersion(tt.v, tt.minVersion, tt.controlPlaneVersion)
+ g.Expect(got).To(Equal(tt.want))
+ })
+ }
+}
+
+func TestComputeUpgradePlan(t *testing.T) {
+ tests := []struct {
+ name string
+ topologyVersion string
+ controlPlaneVersion string
+ machineDeploymentVersion string
+ machinePoolVersion string
+ F GetUpgradePlanFunc
+ wantControlPlaneUpgradePlan []string
+ wantMachineDeploymentUpgradePlan []string
+ wantMachinePoolUpgradePlan []string
+ wantErr bool
+ wantErrMessage string
+ }{
+ // return early
+ {
+ name: "No op if control plane dose not exists",
+ topologyVersion: "v1.33.1",
+ },
+ {
+ name: "No op if everything is up to date",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.33.1",
+ machineDeploymentVersion: "v1.33.1",
+ machinePoolVersion: "v1.33.1",
+ },
+
+ // validation errors
+ {
+ name: "Fails for invalid control plane version",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "foo",
+ wantErr: true,
+ wantErrMessage: "failed to parse ControlPlane version foo: Invalid character(s) found in major number \"0foo\"",
+ },
+ {
+ name: "Fails if control plane upgrade plan has invalid versions",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"foo"}, nil, nil
+ },
+ wantErr: true,
+ wantErrMessage: "invalid ControlPlane upgrade plan: item 0; failed to parse version foo: Invalid character(s) found in major number \"0foo\"",
+ },
+ {
+ name: "Fails if control plane upgrade plan starts with the wrong minor (too old)",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.30.0"}, nil, nil // v1.31 expected
+ },
+ wantErr: true,
+ wantErrMessage: "invalid ControlPlane upgrade plan: item 0; version v1.30.0 must be greater than v1.30.0",
+ },
+ {
+ name: "Fails if control plane upgrade plan starts with the wrong minor (too new)",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.32.1"}, nil, nil // v1.31 expected
+ },
+ wantErr: true,
+ wantErrMessage: "invalid ControlPlane upgrade plan: item 0; expecting a version with minor 30 or 31, found version v1.32.1",
+ },
+ {
+ name: "Fails if control plane upgrade plan has a downgrade",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.31.1", "v1.30.0"}, nil, nil // v1.31 -> v1.30 is a downgrade!
+ },
+ wantErr: true,
+ wantErrMessage: "invalid ControlPlane upgrade plan: item 1; version v1.30.0 must be greater than v1.31.1",
+ },
+ {
+ name: "Fails if control plane upgrade plan doesn't end with the target version (stops before the target version)",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.31.1", "v1.32.0"}, nil, nil // v1.33 missing
+ },
+ wantErr: true,
+ wantErrMessage: "invalid ControlPlane upgrade plan: control plane upgrade plan must end with version v1.33.1, ends with v1.32.0 instead",
+ },
+ {
+ name: "Fails if control plane upgrade plan doesn't end with the target version (goes past the target version)",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.31.1", "v1.32.0", "v1.33.1", "v1.34.1"}, nil, nil // v1.34 is after the target version
+ },
+ wantErr: true,
+ wantErrMessage: "invalid ControlPlane upgrade plan: control plane upgrade plan must end with version v1.33.1, ends with v1.34.1 instead",
+ },
+ {
+ name: "Fails if control plane upgrade plan is returned but control plane is already up to date",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.33.1",
+ machineDeploymentVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.33.1"}, nil, nil // control plane is already up to date
+ },
+ wantErr: true,
+ wantErrMessage: "invalid ControlPlane upgrade plan: control plane is already at the desired version",
+ },
+ {
+ name: "Fails if workers plan has versions not included in control plane upgrade plan",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.30.0",
+ machineDeploymentVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.31.1", "v1.32.0", "v1.33.1"}, []string{"v1.32.2"}, nil // v1.32.2 is not a version in the control plane upgrade plan
+ },
+ wantErr: true,
+ wantErrMessage: "invalid workers upgrade plan: versions v1.32.2 doesn't match any versions in the control plane upgrade plan nor the control plane version",
+ },
+ {
+ name: "Fails if workers plan has versions in the wrong order",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.30.0",
+ machineDeploymentVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.31.1", "v1.32.0", "v1.33.1"}, []string{"v1.33.1", "v1.32.0"}, nil // v1.33 -> v1.32 is a downgrade!
+ },
+ wantErr: true,
+ wantErrMessage: "invalid workers upgrade plan, item 1; version v1.32.0 must be greater than v1.33.1",
+ },
+ {
+ name: "Fails if workers plan has invalid versions",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.33.1",
+ machineDeploymentVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return nil, []string{"foo"}, nil
+ },
+ wantErr: true,
+ wantErrMessage: "invalid workers upgrade plan, item 0; failed to parse version foo: Invalid character(s) found in major number \"0foo\"",
+ },
+ {
+ name: "Fails if workers plan starts with the wrong minor (too old)",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.33.1",
+ machineDeploymentVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return nil, []string{"v1.30.0"}, nil // v1.30.0 is the current min worker version
+ },
+ wantErr: true,
+ wantErrMessage: "invalid workers upgrade plan, item 0; version v1.30.0 must be greater than v1.30.0",
+ },
+ {
+ name: "Fails if workers plan doesn't end with the target version (stops before the target version)",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.33.1",
+ machineDeploymentVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return nil, []string{"v1.32.1"}, nil // v1.32.1 is before the target version
+ },
+ wantErr: true,
+ wantErrMessage: "invalid workers upgrade plan; workers upgrade plan must end with version v1.33.1, ends with v1.32.1 instead",
+ },
+ {
+ name: "Fails if workers plan doesn't end with the target version (goes past the target version)",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.33.1",
+ machineDeploymentVersion: "v1.31.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return nil, []string{"v1.34.1"}, nil // v1.34.1 is past the target version
+ },
+ wantErr: true,
+ wantErrMessage: "invalid workers upgrade plan; workers upgrade plan must end with version v1.33.1, ends with v1.34.1 instead",
+ },
+ {
+ name: "Fails if workers plan doesn't comply with Kubernetes version skew versions",
+ topologyVersion: "v1.34.1",
+ controlPlaneVersion: "v1.34.1",
+ machineDeploymentVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return nil, []string{"v1.34.1"}, nil // workers cannot go from minor 30 to minor 34, an intermediate step is required
+ },
+ wantErr: true,
+ wantErrMessage: "invalid workers upgrade plan, item 0; workers cannot go from minor 30 (v1.30.0) to minor 34 (v1.34.1), an intermediate step is required to comply with Kubernetes version skew rules",
+ },
+ {
+ name: "Fails if there are no workers and a worker upgrade plan is provided",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.31.1", "v1.32.0", "v1.33.1"}, []string{"v1.35.1"}, nil // there should not be worker update plan
+ },
+ wantErr: true,
+ wantErrMessage: "invalid worker upgrade plan; there are no workers or workers already at the desired version",
+ },
+
+ // upgrade sequence 1: CP only
+ {
+ name: "Return control plane upgrade plan, empty machine deployment and machine pool upgrade plan",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.31.1", "v1.32.0", "v1.33.1"}, nil, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.31.1", "v1.32.0", "v1.33.1"},
+ },
+ {
+ name: "Return control plane upgrade plan, empty machine deployment and machine pool upgrade plan (after CP upgrade to 1.31)",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.31.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.32.0", "v1.33.1"}, nil, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.32.0", "v1.33.1"},
+ },
+ {
+ name: "Return control plane upgrade plan, empty machine deployment and machine pool upgrade plan (after CP upgrade to 1.32)",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.32.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.33.1"}, nil, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.33.1"},
+ },
+ {
+ name: "Return control plane upgrade plan, empty machine deployment and machine pool upgrade plan (after CP upgrade to 1.33)",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.33.1",
+ },
+
+ // upgrade sequence 2: CP, MD (no MP); defer to the system computing the workers upgrade plan
+ {
+ name: "Return control plane and machine deployment upgrade plan with last version",
+ topologyVersion: "v1.32.0",
+ controlPlaneVersion: "v1.30.0",
+ machineDeploymentVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.31.1", "v1.32.0"}, nil, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.31.1", "v1.32.0"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.32.0"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with last version (after CP upgrade to 1.31)",
+ topologyVersion: "v1.32.0",
+ controlPlaneVersion: "v1.31.1",
+ machineDeploymentVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.32.0"}, nil, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.32.0"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.32.0"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with last version (after CP upgrade to 1.32)",
+ topologyVersion: "v1.32.0",
+ controlPlaneVersion: "v1.32.0",
+ machineDeploymentVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return nil, nil, nil
+ },
+ wantControlPlaneUpgradePlan: nil,
+ wantMachineDeploymentUpgradePlan: []string{"v1.32.0"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with last version (after CP and MD upgrade to 1.32)",
+ topologyVersion: "v1.32.0",
+ controlPlaneVersion: "v1.32.0",
+ machineDeploymentVersion: "v1.32.0",
+ },
+
+ // upgrade sequence 3: CP, MP (no MD); defer to the system computing the workers upgrade plan
+ {
+ name: "Return control plane and machine pool upgrade plan with last version",
+ topologyVersion: "v1.32.0",
+ controlPlaneVersion: "v1.30.0",
+ machinePoolVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.31.1", "v1.32.0"}, nil, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.31.1", "v1.32.0"},
+ wantMachinePoolUpgradePlan: []string{"v1.32.0"},
+ },
+ {
+ name: "Return control plane and machine pool upgrade plan with last version (after CP upgrade to 1.31)",
+ topologyVersion: "v1.32.0",
+ controlPlaneVersion: "v1.31.1",
+ machinePoolVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.32.0"}, nil, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.32.0"},
+ wantMachinePoolUpgradePlan: []string{"v1.32.0"},
+ },
+ {
+ name: "Return control plane and machine pool upgrade plan with last version (after CP upgrade to 1.32)",
+ topologyVersion: "v1.32.0",
+ controlPlaneVersion: "v1.32.0",
+ machinePoolVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return nil, nil, nil
+ },
+ wantControlPlaneUpgradePlan: nil,
+ wantMachinePoolUpgradePlan: []string{"v1.32.0"},
+ },
+ {
+ name: "Return control plane and machine pool upgrade plan with last version (after CP and MP upgrade to 1.32)",
+ topologyVersion: "v1.32.0",
+ controlPlaneVersion: "v1.32.0",
+ machinePoolVersion: "v1.32.0",
+ },
+
+ // upgrade sequence 3: CP, MD, MP; defer to the system computing the workers upgrade plan, an additional worker upgrade step required to respect version skew
+ {
+ name: "Return control plane and machine deployment upgrade plan with last version + version skew versions",
+ topologyVersion: "v1.34.1",
+ controlPlaneVersion: "v1.30.0",
+ machineDeploymentVersion: "v1.30.0",
+ machinePoolVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.31.1", "v1.32.0", "v1.33.1", "v1.34.1"}, nil, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.31.1", "v1.32.0", "v1.33.1", "v1.34.1"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.33.1", "v1.34.1"},
+ wantMachinePoolUpgradePlan: []string{"v1.33.1", "v1.34.1"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with last version + version skew versions (after CP upgrade to 1.31)",
+ topologyVersion: "v1.34.1",
+ controlPlaneVersion: "v1.31.1",
+ machineDeploymentVersion: "v1.30.0",
+ machinePoolVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.32.0", "v1.33.1", "v1.34.1"}, nil, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.32.0", "v1.33.1", "v1.34.1"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.33.1", "v1.34.1"},
+ wantMachinePoolUpgradePlan: []string{"v1.33.1", "v1.34.1"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with last version + version skew versions (after CP upgrade to 1.32)",
+ topologyVersion: "v1.34.1",
+ controlPlaneVersion: "v1.32.0",
+ machineDeploymentVersion: "v1.30.0",
+ machinePoolVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.33.1", "v1.34.1"}, nil, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.33.1", "v1.34.1"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.33.1", "v1.34.1"},
+ wantMachinePoolUpgradePlan: []string{"v1.33.1", "v1.34.1"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with last version + version skew versions (after CP upgrade to 1.33)",
+ topologyVersion: "v1.34.1",
+ controlPlaneVersion: "v1.33.1",
+ machineDeploymentVersion: "v1.30.0",
+ machinePoolVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.34.1"}, nil, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.34.1"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.33.1", "v1.34.1"},
+ wantMachinePoolUpgradePlan: []string{"v1.33.1", "v1.34.1"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with last version + version skew versions (after CP and MD upgrade to 1.33)",
+ topologyVersion: "v1.34.1",
+ controlPlaneVersion: "v1.33.1",
+ machineDeploymentVersion: "v1.33.1",
+ machinePoolVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.34.1"}, nil, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.34.1"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.33.1", "v1.34.1"},
+ wantMachinePoolUpgradePlan: []string{"v1.33.1", "v1.34.1"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with last version + version skew versions (after CP, MD and MP upgrade to 1.33)",
+ topologyVersion: "v1.34.1",
+ controlPlaneVersion: "v1.33.1",
+ machineDeploymentVersion: "v1.33.1",
+ machinePoolVersion: "v1.33.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.34.1"}, nil, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.34.1"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.34.1"},
+ wantMachinePoolUpgradePlan: []string{"v1.34.1"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with last version + version skew versions (after CP upgrade to 1.34)",
+ topologyVersion: "v1.34.1",
+ controlPlaneVersion: "v1.34.1",
+ machineDeploymentVersion: "v1.33.1",
+ machinePoolVersion: "v1.33.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return nil, nil, nil
+ },
+ wantControlPlaneUpgradePlan: nil,
+ wantMachineDeploymentUpgradePlan: []string{"v1.34.1"},
+ wantMachinePoolUpgradePlan: []string{"v1.34.1"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with last version + version skew versions (after CP and MD upgrade to 1.34)",
+ topologyVersion: "v1.34.1",
+ controlPlaneVersion: "v1.34.1",
+ machineDeploymentVersion: "v1.34.1",
+ machinePoolVersion: "v1.33.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return nil, nil, nil
+ },
+ wantControlPlaneUpgradePlan: nil,
+ wantMachineDeploymentUpgradePlan: []string{"v1.34.1"},
+ wantMachinePoolUpgradePlan: []string{"v1.34.1"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with last version + version skew versions (after CP, MD and MP upgrade to 1.34)",
+ topologyVersion: "v1.34.1",
+ controlPlaneVersion: "v1.34.1",
+ machineDeploymentVersion: "v1.34.1",
+ machinePoolVersion: "v1.34.1",
+ },
+
+ // upgrade sequence 4: CP, MD, MP; workers upgrade plan provided, force worker upgrades to an intermediate K8s version (even if not necessary)
+ {
+ name: "Return control plane and machine deployment upgrade plan custom worker version + last version",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.30.0",
+ machineDeploymentVersion: "v1.30.0",
+ machinePoolVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.31.1", "v1.32.0", "v1.33.1"}, []string{"v1.31.1", "v1.33.1"}, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.31.1", "v1.32.0", "v1.33.1"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.31.1", "v1.33.1"},
+ wantMachinePoolUpgradePlan: []string{"v1.31.1", "v1.33.1"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan custom worker version + last version (after CP upgrade to v1.31)",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.31.1",
+ machineDeploymentVersion: "v1.30.0",
+ machinePoolVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.32.0", "v1.33.1"}, []string{"v1.31.1", "v1.33.1"}, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.32.0", "v1.33.1"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.31.1", "v1.33.1"},
+ wantMachinePoolUpgradePlan: []string{"v1.31.1", "v1.33.1"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan custom worker version + last version (after CP and MD upgrade to v1.31)",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.31.1",
+ machineDeploymentVersion: "v1.31.1",
+ machinePoolVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.32.0", "v1.33.1"}, []string{"v1.31.1", "v1.33.1"}, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.32.0", "v1.33.1"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.31.1", "v1.33.1"},
+ wantMachinePoolUpgradePlan: []string{"v1.31.1", "v1.33.1"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan custom worker version + last version (after CP, MD and MP upgrade to v1.31)",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.31.1",
+ machineDeploymentVersion: "v1.31.1",
+ machinePoolVersion: "v1.31.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.32.0", "v1.33.1"}, []string{"v1.33.1"}, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.32.0", "v1.33.1"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.33.1"},
+ wantMachinePoolUpgradePlan: []string{"v1.33.1"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan custom worker version + last version (after CP upgrade to v1.32)",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.32.0",
+ machineDeploymentVersion: "v1.31.1",
+ machinePoolVersion: "v1.31.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.33.1"}, []string{"v1.33.1"}, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.33.1"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.33.1"},
+ wantMachinePoolUpgradePlan: []string{"v1.33.1"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan custom worker version + last version (after CP upgrade to v1.33)",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.33.1",
+ machineDeploymentVersion: "v1.31.1",
+ machinePoolVersion: "v1.31.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return nil, []string{"v1.33.1"}, nil
+ },
+ wantControlPlaneUpgradePlan: nil,
+ wantMachineDeploymentUpgradePlan: []string{"v1.33.1"},
+ wantMachinePoolUpgradePlan: []string{"v1.33.1"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan custom worker version + last version (after CP and MD upgrade to v1.33)",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.33.1",
+ machineDeploymentVersion: "v1.33.1",
+ machinePoolVersion: "v1.31.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return nil, []string{"v1.33.1"}, nil
+ },
+ wantControlPlaneUpgradePlan: nil,
+ wantMachineDeploymentUpgradePlan: []string{"v1.33.1"},
+ wantMachinePoolUpgradePlan: []string{"v1.33.1"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan custom worker version + last version (after CP, MD and MP upgrade to v1.33)",
+ topologyVersion: "v1.33.1",
+ controlPlaneVersion: "v1.33.1",
+ machineDeploymentVersion: "v1.33.1",
+ machinePoolVersion: "v1.33.1",
+ },
+
+ // upgrade sequence 5: CP, MD, MP; workers upgrade plan provided, force worker upgrades to an intermediate K8s version (even if not necessary) + additional worker upgrade to respect version skew
+ {
+ name: "Return control plane and machine deployment upgrade plan with custom worker version + version skew versions + last version",
+ topologyVersion: "v1.35.2",
+ controlPlaneVersion: "v1.30.0",
+ machineDeploymentVersion: "v1.30.0",
+ machinePoolVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.31.1", "v1.32.0", "v1.33.1", "v1.34.2", "v1.35.2"}, []string{"v1.31.1", "v1.34.2", "v1.35.2"}, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.31.1", "v1.32.0", "v1.33.1", "v1.34.2", "v1.35.2"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.31.1", "v1.34.2", "v1.35.2"},
+ wantMachinePoolUpgradePlan: []string{"v1.31.1", "v1.34.2", "v1.35.2"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with custom worker version + version skew versions + last version (after CP upgrade to v1.31)",
+ topologyVersion: "v1.35.2",
+ controlPlaneVersion: "v1.31.1",
+ machineDeploymentVersion: "v1.30.0",
+ machinePoolVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.32.0", "v1.33.1", "v1.34.2", "v1.35.2"}, []string{"v1.31.1", "v1.34.2", "v1.35.2"}, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.32.0", "v1.33.1", "v1.34.2", "v1.35.2"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.31.1", "v1.34.2", "v1.35.2"},
+ wantMachinePoolUpgradePlan: []string{"v1.31.1", "v1.34.2", "v1.35.2"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with custom worker version + version skew versions + last version (after CP and MD upgrade to v1.31)",
+ topologyVersion: "v1.35.2",
+ controlPlaneVersion: "v1.31.1",
+ machineDeploymentVersion: "v1.31.1",
+ machinePoolVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.32.0", "v1.33.1", "v1.34.2", "v1.35.2"}, []string{"v1.31.1", "v1.34.2", "v1.35.2"}, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.32.0", "v1.33.1", "v1.34.2", "v1.35.2"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.31.1", "v1.34.2", "v1.35.2"},
+ wantMachinePoolUpgradePlan: []string{"v1.31.1", "v1.34.2", "v1.35.2"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with custom worker version + version skew versions + last version (after CP, MD and MP upgrade to v1.31)",
+ topologyVersion: "v1.35.2",
+ controlPlaneVersion: "v1.31.1",
+ machineDeploymentVersion: "v1.31.1",
+ machinePoolVersion: "v1.31.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.32.0", "v1.33.1", "v1.34.2", "v1.35.2"}, []string{"v1.34.2", "v1.35.2"}, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.32.0", "v1.33.1", "v1.34.2", "v1.35.2"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.34.2", "v1.35.2"},
+ wantMachinePoolUpgradePlan: []string{"v1.34.2", "v1.35.2"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with custom worker version + version skew versions + last version (after CP upgrade to v1.32)",
+ topologyVersion: "v1.35.2",
+ controlPlaneVersion: "v1.32.0",
+ machineDeploymentVersion: "v1.31.1",
+ machinePoolVersion: "v1.31.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.33.1", "v1.34.2", "v1.35.2"}, []string{"v1.34.2", "v1.35.2"}, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.33.1", "v1.34.2", "v1.35.2"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.34.2", "v1.35.2"},
+ wantMachinePoolUpgradePlan: []string{"v1.34.2", "v1.35.2"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with custom worker version + version skew versions + last version (after CP upgrade to v1.33)",
+ topologyVersion: "v1.35.2",
+ controlPlaneVersion: "v1.33.1",
+ machineDeploymentVersion: "v1.31.1",
+ machinePoolVersion: "v1.31.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.34.2", "v1.35.2"}, []string{"v1.34.2", "v1.35.2"}, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.34.2", "v1.35.2"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.34.2", "v1.35.2"},
+ wantMachinePoolUpgradePlan: []string{"v1.34.2", "v1.35.2"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with custom worker version + version skew versions + last version (after CP upgrade to v1.34)",
+ topologyVersion: "v1.35.2",
+ controlPlaneVersion: "v1.34.2",
+ machineDeploymentVersion: "v1.31.1",
+ machinePoolVersion: "v1.31.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.35.2"}, []string{"v1.34.2", "v1.35.2"}, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.35.2"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.34.2", "v1.35.2"},
+ wantMachinePoolUpgradePlan: []string{"v1.34.2", "v1.35.2"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with custom worker version + version skew versions + last version (after CP and MD upgrade to v1.34)",
+ topologyVersion: "v1.35.2",
+ controlPlaneVersion: "v1.34.2",
+ machineDeploymentVersion: "v1.34.2",
+ machinePoolVersion: "v1.31.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.35.2"}, []string{"v1.34.2", "v1.35.2"}, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.35.2"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.34.2", "v1.35.2"},
+ wantMachinePoolUpgradePlan: []string{"v1.34.2", "v1.35.2"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with custom worker version + version skew versions + last version (after CP, MD and MP upgrade to v1.34)",
+ topologyVersion: "v1.35.2",
+ controlPlaneVersion: "v1.34.2",
+ machineDeploymentVersion: "v1.34.2",
+ machinePoolVersion: "v1.34.2",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.35.2"}, []string{"v1.35.2"}, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.35.2"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.35.2"},
+ wantMachinePoolUpgradePlan: []string{"v1.35.2"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with custom worker version + version skew versions + last version (after CP upgrade to v1.35)",
+ topologyVersion: "v1.35.2",
+ controlPlaneVersion: "v1.35.2",
+ machineDeploymentVersion: "v1.34.2",
+ machinePoolVersion: "v1.34.2",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return nil, []string{"v1.35.2"}, nil
+ },
+ wantControlPlaneUpgradePlan: nil,
+ wantMachineDeploymentUpgradePlan: []string{"v1.35.2"},
+ wantMachinePoolUpgradePlan: []string{"v1.35.2"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with custom worker version + version skew versions + last version (after CP and MD upgrade to v1.35)",
+ topologyVersion: "v1.35.2",
+ controlPlaneVersion: "v1.35.2",
+ machineDeploymentVersion: "v1.35.2",
+ machinePoolVersion: "v1.34.2",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return nil, []string{"v1.35.2"}, nil
+ },
+ wantControlPlaneUpgradePlan: nil,
+ wantMachineDeploymentUpgradePlan: []string{"v1.35.2"},
+ wantMachinePoolUpgradePlan: []string{"v1.35.2"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan with custom worker version + version skew versions + last version (after CP, MD and MP upgrade to v1.35)",
+ topologyVersion: "v1.35.2",
+ controlPlaneVersion: "v1.35.2",
+ machineDeploymentVersion: "v1.35.2",
+ machinePoolVersion: "v1.35.2",
+ },
+
+ // allows upgrades plans with many patch version for the same minor
+ {
+ name: "Return control plane and machine deployment upgrade plan with last version + version skew versions",
+ topologyVersion: "v1.34.1",
+ controlPlaneVersion: "v1.30.0",
+ machineDeploymentVersion: "v1.30.0",
+ machinePoolVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.31.1", "v1.31.2", "v1.32.0", "v1.33.1", "v1.33.2", "v1.34.1"}, nil, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.31.1", "v1.31.2", "v1.32.0", "v1.33.1", "v1.33.2", "v1.34.1"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.33.2", "v1.34.1"},
+ wantMachinePoolUpgradePlan: []string{"v1.33.2", "v1.34.1"},
+ },
+
+ // allows upgrades with pre-release versions
+ {
+ name: "Return control plane and machine deployment upgrade plan with last version + version skew versions",
+ topologyVersion: "v1.34.1",
+ controlPlaneVersion: "v1.30.0",
+ machineDeploymentVersion: "v1.30.0",
+ machinePoolVersion: "v1.30.0",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.31.1", "v1.32.0", "v1.33.2", "v1.34.1-beta.0", "v1.34.1-rc.0", "v1.34.1"}, nil, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.31.1", "v1.32.0", "v1.33.2", "v1.34.1-beta.0", "v1.34.1-rc.0", "v1.34.1"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.33.2", "v1.34.1"},
+ wantMachinePoolUpgradePlan: []string{"v1.33.2", "v1.34.1"},
+ },
+
+ // upgrade sequence 6: when using build tags
+ {
+ name: "Return control plane and machine deployment upgrade plan when using build tags",
+ topologyVersion: "v1.32.1+foo.1-bar.1",
+ controlPlaneVersion: "v1.30.0+foo.1-bar.1",
+ machineDeploymentVersion: "v1.30.0+foo.1-bar.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.31.1+foo.1-bar.1", "v1.31.1+foo.2-bar.1", "v1.32.1+foo.1-bar.1"}, nil, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.31.1+foo.1-bar.1", "v1.31.1+foo.2-bar.1", "v1.32.1+foo.1-bar.1"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.32.1+foo.1-bar.1"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan when using build tags (after CP upgrade to v1.31.1+foo.1-bar.1)",
+ topologyVersion: "v1.32.1+foo.1-bar.1",
+ controlPlaneVersion: "v1.31.1+foo.1-bar.1",
+ machineDeploymentVersion: "v1.30.0+foo.1-bar.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.31.1+foo.2-bar.1", "v1.32.1+foo.1-bar.1"}, nil, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.31.1+foo.2-bar.1", "v1.32.1+foo.1-bar.1"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.32.1+foo.1-bar.1"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan when using build tags (after CP upgrade to v1.31.1+foo.2-bar.1)",
+ topologyVersion: "v1.32.1+foo.1-bar.1",
+ controlPlaneVersion: "v1.31.1+foo.2-bar.1",
+ machineDeploymentVersion: "v1.30.0+foo.1-bar.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.32.1+foo.1-bar.1"}, nil, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.32.1+foo.1-bar.1"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.32.1+foo.1-bar.1"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan when using build tags (after CP upgrade to v1.32.1+foo.1-bar.1)",
+ topologyVersion: "v1.32.1+foo.1-bar.1",
+ controlPlaneVersion: "v1.32.1+foo.1-bar.1",
+ machineDeploymentVersion: "v1.30.0+foo.1-bar.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return nil, nil, nil
+ },
+ wantControlPlaneUpgradePlan: nil,
+ wantMachineDeploymentUpgradePlan: []string{"v1.32.1+foo.1-bar.1"},
+ },
+ {
+ name: "Return control plane and machine deployment upgrade plan when using build tags (after CP and MD upgrade to v1.32.1+foo.1-bar.1)",
+ topologyVersion: "v1.32.1+foo.1-bar.1",
+ controlPlaneVersion: "v1.32.1+foo.1-bar.1",
+ machineDeploymentVersion: "v1.32.1+foo.1-bar.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return nil, nil, nil
+ },
+ wantControlPlaneUpgradePlan: nil,
+ wantMachineDeploymentUpgradePlan: nil,
+ },
+
+ // fails if control plane plan and workers upgrade plan do not agree on ordering of version with the same major.minor.patch but different build tags
+ {
+ name: "Fails if control plane plan and workers upgrade plan do not agree on ordering",
+ topologyVersion: "v1.32.1+foo.1-bar.1",
+ controlPlaneVersion: "v1.30.0+foo.1-bar.1",
+ machineDeploymentVersion: "v1.30.0+foo.1-bar.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.31.1+foo.1-bar.1", "v1.31.1+foo.2-bar.1", "v1.32.1+foo.1-bar.1"}, []string{"v1.31.1+foo.2-bar.1", "v1.31.1+foo.1-bar.1", "v1.32.1+foo.1-bar.1"}, nil
+ },
+ wantErr: true,
+ wantErrMessage: "invalid workers upgrade plan, item 1; version v1.31.1+foo.1-bar.1 must be before v1.31.1+foo.2-bar.1",
+ },
+ {
+ name: "Pass if control plane plan and workers upgrade plan do agree on ordering (chained upgrades)",
+ topologyVersion: "v1.32.1+foo.1-bar.1",
+ controlPlaneVersion: "v1.30.0+foo.1-bar.1",
+ machineDeploymentVersion: "v1.30.0+foo.1-bar.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.31.1+foo.1-bar.1", "v1.31.1+foo.2-bar.1", "v1.32.1+foo.1-bar.1"}, []string{"v1.31.1+foo.1-bar.1", "v1.31.1+foo.2-bar.1", "v1.32.1+foo.1-bar.1"}, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.31.1+foo.1-bar.1", "v1.31.1+foo.2-bar.1", "v1.32.1+foo.1-bar.1"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.31.1+foo.1-bar.1", "v1.31.1+foo.2-bar.1", "v1.32.1+foo.1-bar.1"},
+ },
+ {
+ name: "Pass if control plane plan and workers upgrade plan do agree on ordering (chained upgrades)",
+ topologyVersion: "v1.32.1+foo.1-bar.1",
+ controlPlaneVersion: "v1.31.1+foo.1-bar.1",
+ machineDeploymentVersion: "v1.30.0+foo.1-bar.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.31.1+foo.2-bar.1", "v1.32.1+foo.1-bar.1"}, []string{"v1.31.1+foo.1-bar.1", "v1.31.1+foo.2-bar.1", "v1.32.1+foo.1-bar.1"}, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.31.1+foo.2-bar.1", "v1.32.1+foo.1-bar.1"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.31.1+foo.1-bar.1", "v1.31.1+foo.2-bar.1", "v1.32.1+foo.1-bar.1"},
+ },
+ {
+ name: "Pass if control plane plan and workers upgrade plan do agree on ordering (chained upgrade when skipping versions)",
+ topologyVersion: "v1.32.1+foo.1-bar.1",
+ controlPlaneVersion: "v1.30.0+foo.1-bar.1",
+ machineDeploymentVersion: "v1.30.0+foo.1-bar.1",
+ F: func(_ context.Context, _, _, _ string) ([]string, []string, error) {
+ return []string{"v1.31.1+foo.1-bar.1", "v1.31.1+foo.2-bar.1", "v1.32.1+foo.1-bar.1"}, []string{"v1.31.1+foo.1-bar.1", "v1.32.1+foo.1-bar.1"}, nil
+ },
+ wantControlPlaneUpgradePlan: []string{"v1.31.1+foo.1-bar.1", "v1.31.1+foo.2-bar.1", "v1.32.1+foo.1-bar.1"},
+ wantMachineDeploymentUpgradePlan: []string{"v1.31.1+foo.1-bar.1", "v1.32.1+foo.1-bar.1"},
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+
+ s := &scope.Scope{
+ Blueprint: &scope.ClusterBlueprint{Topology: clusterv1.Topology{
+ Version: tt.topologyVersion,
+ }},
+ Current: &scope.ClusterState{},
+ UpgradeTracker: scope.NewUpgradeTracker(),
+ }
+ s.Current.ControlPlane = &scope.ControlPlaneState{}
+ if tt.controlPlaneVersion != "" {
+ s.Current.ControlPlane.Object = builder.ControlPlane("test1", "cp1").
+ WithSpecFields(map[string]interface{}{
+ "spec.version": tt.controlPlaneVersion,
+ }).Build()
+ }
+ if tt.machineDeploymentVersion != "" {
+ s.Current.MachineDeployments = map[string]*scope.MachineDeploymentState{
+ "md1": {
+ Object: builder.MachineDeployment("test1", "md1").WithVersion(tt.machineDeploymentVersion).Build(),
+ },
+ }
+ }
+ if tt.machinePoolVersion != "" {
+ s.Current.MachinePools = map[string]*scope.MachinePoolState{
+ "mp1": {
+ Object: builder.MachinePool("test1", "mp1").WithVersion(tt.machinePoolVersion).Build(),
+ },
+ }
+ }
+
+ err := ComputeUpgradePlan(ctx, s, tt.F)
+ if tt.wantErr {
+ g.Expect(err).To(HaveOccurred())
+ g.Expect(err.Error()).To(Equal(tt.wantErrMessage))
+ } else {
+ g.Expect(err).ToNot(HaveOccurred())
+
+ if tt.F != nil {
+ computedControlPlaneUpgradePlan, _, err := tt.F(nil, "", "", "")
+ g.Expect(err).ToNot(HaveOccurred())
+ // Ensure the computed control plane upgrade plan is not modified later in ComputeUpgradePlan.
+ g.Expect(computedControlPlaneUpgradePlan).To(Equal(tt.wantControlPlaneUpgradePlan))
+ }
+ }
+ g.Expect(s.UpgradeTracker.ControlPlane.UpgradePlan).To(Equal(tt.wantControlPlaneUpgradePlan))
+ g.Expect(s.UpgradeTracker.MachineDeployments.UpgradePlan).To(Equal(tt.wantMachineDeploymentUpgradePlan))
+ g.Expect(s.UpgradeTracker.MachinePools.UpgradePlan).To(Equal(tt.wantMachinePoolUpgradePlan))
+ })
+ }
+}
+
+func TestGetUpgradePlanOneMinor(t *testing.T) {
+ tests := []struct {
+ name string
+ desiredVersion string
+ currentControlPlaneVersion string
+ wantControlPlaneUpgradePlan []string
+ wantWorkersUpgradePlan []string
+ wantErr bool
+ }{
+ {
+ name: "return empty plans if everything is up to date",
+ desiredVersion: "v1.31.0",
+ currentControlPlaneVersion: "v1.31.0",
+ wantControlPlaneUpgradePlan: nil,
+ wantWorkersUpgradePlan: nil,
+ wantErr: false,
+ },
+ {
+ name: "return control plane upgrade plan",
+ desiredVersion: "v1.32.0",
+ currentControlPlaneVersion: "v1.31.0",
+ wantControlPlaneUpgradePlan: []string{"v1.32.0"},
+ wantWorkersUpgradePlan: nil,
+ wantErr: false,
+ },
+ {
+ name: "return control plane upgrade plan with pre-release version",
+ desiredVersion: "v1.32.0-alpha.2",
+ currentControlPlaneVersion: "v1.32.0-alpha.1",
+ wantControlPlaneUpgradePlan: []string{"v1.32.0-alpha.2"},
+ wantWorkersUpgradePlan: nil,
+ wantErr: false,
+ },
+ {
+ name: "return control plane upgrade plan with build tags",
+ desiredVersion: "v1.32.0+foo.2-bar.1",
+ currentControlPlaneVersion: "v1.32.0+foo.1-bar.1",
+ wantControlPlaneUpgradePlan: []string{"v1.32.0+foo.2-bar.1"},
+ wantWorkersUpgradePlan: nil,
+ wantErr: false,
+ },
+ {
+ name: "fails when upgrading by more than one version",
+ desiredVersion: "v1.33.0",
+ currentControlPlaneVersion: "v1.31.0",
+ wantControlPlaneUpgradePlan: nil,
+ wantWorkersUpgradePlan: nil,
+ wantErr: true,
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+
+ controlPlaneUpgradePlan, workersUpgradePlan, err := GetUpgradePlanOneMinor(ctx, tt.desiredVersion, tt.currentControlPlaneVersion, "")
+ if tt.wantErr {
+ g.Expect(err).To(HaveOccurred())
+ } else {
+ g.Expect(err).ToNot(HaveOccurred())
+ }
+ g.Expect(controlPlaneUpgradePlan).To(Equal(tt.wantControlPlaneUpgradePlan))
+ g.Expect(workersUpgradePlan).To(Equal(tt.wantWorkersUpgradePlan))
+ })
+ }
+}
+
+func TestGetUpgradePlanFromClusterClassVersions(t *testing.T) {
+ tests := []struct {
+ name string
+ desiredVersion string
+ clusterClassVersions []string
+ currentControlPlaneVersion string
+ wantControlPlaneUpgradePlan []string
+ wantWorkersUpgradePlan []string
+ wantErr bool
+ }{
+ {
+ name: "return empty plans if everything is up to date",
+ clusterClassVersions: []string{"v1.31.0"},
+ desiredVersion: "v1.31.0",
+ currentControlPlaneVersion: "v1.31.0",
+ wantControlPlaneUpgradePlan: nil,
+ wantWorkersUpgradePlan: nil,
+ wantErr: false,
+ },
+ {
+ name: "return control plane upgrade plan for one minor",
+ clusterClassVersions: []string{"v1.31.0", "v1.32.0", "v1.32.1"},
+ desiredVersion: "v1.32.0",
+ currentControlPlaneVersion: "v1.31.0",
+ wantControlPlaneUpgradePlan: []string{"v1.32.0"},
+ wantWorkersUpgradePlan: nil,
+ wantErr: false,
+ },
+ {
+ name: "return control plane upgrade plan for more than one minor",
+ clusterClassVersions: []string{"v1.31.0", "v1.32.0", "v1.33.0"},
+ desiredVersion: "v1.33.0",
+ currentControlPlaneVersion: "v1.31.0",
+ wantControlPlaneUpgradePlan: []string{"v1.32.0", "v1.33.0"},
+ wantWorkersUpgradePlan: nil,
+ wantErr: false,
+ },
+ {
+ name: "pick latest for every minor",
+ clusterClassVersions: []string{"v1.31.0", "v1.31.1", "v1.32.0", "v1.32.2", "v1.32.3", "v1.33.0", "v1.33.1"},
+ desiredVersion: "v1.33.1",
+ currentControlPlaneVersion: "v1.31.0",
+ wantControlPlaneUpgradePlan: []string{"v1.32.3", "v1.33.1"},
+ wantWorkersUpgradePlan: nil,
+ wantErr: false,
+ },
+ {
+ name: "pick latest for every minor with pro-release",
+ clusterClassVersions: []string{"v1.31.0", "v1.31.1", "v1.32.0-alpha.0", "v1.32.0-alpha.1", "v1.32.0-alpha.2", "v1.33.0", "v1.33.1"},
+ desiredVersion: "v1.33.1",
+ currentControlPlaneVersion: "v1.31.0",
+ wantControlPlaneUpgradePlan: []string{"v1.32.0-alpha.2", "v1.33.1"},
+ wantWorkersUpgradePlan: nil,
+ wantErr: false,
+ },
+ {
+ name: "pick latest for every minor with build tags",
+ clusterClassVersions: []string{"v1.31.0", "v1.31.1", "v1.32.0+foo.1-bar.1", "v1.32.0+foo.2-bar.1", "v1.32.0+foo.2-bar.2", "v1.33.0", "v1.33.1"},
+ desiredVersion: "v1.33.1",
+ currentControlPlaneVersion: "v1.31.0",
+ wantControlPlaneUpgradePlan: []string{"v1.32.0+foo.2-bar.2", "v1.33.1"},
+ wantWorkersUpgradePlan: nil,
+ wantErr: false,
+ },
+
+ // Kubernetes versions in CC is set when clusters already exists
+
+ {
+ name: "best effort control plane upgrade plan if current version is not on the list of Kubernetes versions (happy path, case 1)",
+ clusterClassVersions: []string{"v1.31.1", "v1.32.0", "v1.33.0"},
+ desiredVersion: "v1.33.0",
+ currentControlPlaneVersion: "v1.31.0", // v1.31.0 is not in the kubernetes versions, but it is older than the first version on the same minor
+ wantControlPlaneUpgradePlan: []string{"v1.32.0", "v1.33.0"},
+ wantWorkersUpgradePlan: nil,
+ wantErr: false,
+ },
+ {
+ name: "best effort control plane upgrade plan if current version is not on the list of Kubernetes versions (happy path, case 2)",
+ clusterClassVersions: []string{"v1.31.0", "v1.32.0", "v1.33.0"},
+ desiredVersion: "v1.33.0",
+ currentControlPlaneVersion: "v1.31.2", // v1.31.0 is not in the kubernetes versions, but it is newer than the first version on the same minor
+ wantControlPlaneUpgradePlan: []string{"v1.32.0", "v1.33.0"},
+ wantWorkersUpgradePlan: nil,
+ wantErr: false,
+ },
+ {
+ name: "best effort control plane upgrade plan if current version is not on the list of Kubernetes versions (not happy path)",
+ clusterClassVersions: []string{"v1.32.0", "v1.33.0"},
+ desiredVersion: "v1.33.0",
+ currentControlPlaneVersion: "v1.30.2",
+ wantControlPlaneUpgradePlan: []string{"v1.32.0", "v1.33.0"}, // No version for 1.31, ComputeUpgradePlan will fail
+ wantWorkersUpgradePlan: nil,
+ wantErr: false,
+ },
+
+ // TODO: Kubernetes versions in CC is set after setting target version (when an upgrade is in progress)
+
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+
+ f := GetUpgradePlanFromClusterClassVersions(tt.clusterClassVersions)
+ controlPlaneUpgradePlan, workersUpgradePlan, err := f(nil, tt.desiredVersion, tt.currentControlPlaneVersion, "")
+ if tt.wantErr {
+ g.Expect(err).To(HaveOccurred())
+ } else {
+ g.Expect(err).ToNot(HaveOccurred())
+ }
+ g.Expect(controlPlaneUpgradePlan).To(Equal(tt.wantControlPlaneUpgradePlan))
+ g.Expect(workersUpgradePlan).To(Equal(tt.wantWorkersUpgradePlan))
+ })
+ }
+}
+
+func TestGetUpgradePlanFromExtension(t *testing.T) {
+ g := NewWithT(t)
+ ctx := t.Context()
+
+ // Enable RuntimeSDK feature flag
+ utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.RuntimeSDK, true)
+
+ // Create a test cluster
+ cluster := builder.Cluster("test-namespace", "test-cluster").Build()
+
+ // Create catalog and register runtime hooks
+ catalog := runtimecatalog.New()
+ _ = runtimehooksv1.AddToCatalog(catalog)
+
+ // Create fake runtime client
+ extensionResponse := &runtimehooksv1.GenerateUpgradePlanResponse{
+ CommonResponse: runtimehooksv1.CommonResponse{
+ Status: runtimehooksv1.ResponseStatusSuccess,
+ },
+ ControlPlaneUpgrades: []runtimehooksv1.UpgradeStep{
+ {Version: "v1.32.0"},
+ {Version: "v1.33.0"},
+ },
+ WorkersUpgrades: []runtimehooksv1.UpgradeStep{
+ {Version: "v1.33.0"},
+ },
+ }
+ fakeRuntimeClient := fakeruntimeclient.NewRuntimeClientBuilder().
+ WithCatalog(catalog).
+ WithCallExtensionResponses(map[string]runtimehooksv1.ResponseObject{
+ "test-extension": extensionResponse,
+ }).
+ Build()
+
+ // Call GetUpgradePlanFromExtension
+ generateUpgradePlanCache := cache.New[GenerateUpgradePlanCacheEntry](10 * time.Minute)
+ f := GetUpgradePlanFromExtension(fakeRuntimeClient, generateUpgradePlanCache, cluster, "test-extension")
+ controlPlaneUpgradePlan, workersUpgradePlan, err := f(ctx, "v1.33.0", "v1.31.0", "v1.31.0")
+
+ g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(controlPlaneUpgradePlan).To(Equal([]string{"v1.32.0", "v1.33.0"}))
+ g.Expect(workersUpgradePlan).To(Equal([]string{"v1.33.0"}))
+ g.Expect(fakeRuntimeClient.CallCount(runtimehooksv1.GenerateUpgradePlan)).To(Equal(1))
+
+ // Verify the cache entry.
+ wantCacheEntry := GenerateUpgradePlanCacheEntry{
+ ClusterKey: client.ObjectKeyFromObject(cluster),
+ FromControlPlaneKubernetesVersion: "v1.31.0",
+ FromWorkersKubernetesVersion: "v1.31.0",
+ ToKubernetesVersion: "v1.33.0",
+ ControlPlaneUpgradePlan: controlPlaneUpgradePlan,
+ WorkersUpgradePlan: workersUpgradePlan,
+ }
+
+ cacheEntry, ok := generateUpgradePlanCache.Has(wantCacheEntry.Key())
+ g.Expect(ok).To(BeTrue())
+ g.Expect(cacheEntry).To(Equal(wantCacheEntry))
+
+ // Call GetUpgradePlanFromExtension again and verify the cache hit.
+ f = GetUpgradePlanFromExtension(fakeRuntimeClient, generateUpgradePlanCache, cluster, "test-extension")
+ controlPlaneUpgradePlan, workersUpgradePlan, err = f(ctx, "v1.33.0", "v1.31.0", "v1.31.0")
+ g.Expect(err).ToNot(HaveOccurred())
+ g.Expect(fakeRuntimeClient.CallCount(runtimehooksv1.GenerateUpgradePlan)).To(Equal(1))
+ g.Expect(controlPlaneUpgradePlan).To(Equal(wantCacheEntry.ControlPlaneUpgradePlan))
+ g.Expect(workersUpgradePlan).To(Equal(wantCacheEntry.WorkersUpgradePlan))
+}
+
+func TestGetUpgradePlanFromExtension_Errors(t *testing.T) {
+ tests := []struct {
+ name string
+ enableRuntimeSDK bool
+ extensionError error
+ desiredVersion string
+ currentControlPlaneVersion string
+ currentMinWorkersVersion string
+ wantErrMessage string
+ }{
+ {
+ name: "fails when RuntimeSDK feature flag is disabled",
+ enableRuntimeSDK: false,
+ desiredVersion: "v1.33.0",
+ currentControlPlaneVersion: "v1.31.0",
+ currentMinWorkersVersion: "v1.31.0",
+ wantErrMessage: "can not use GenerateUpgradePlan extension \"test-extension\" if RuntimeSDK feature flag is disabled",
+ },
+ {
+ name: "fails when extension call returns error",
+ enableRuntimeSDK: true,
+ desiredVersion: "v1.33.0",
+ currentControlPlaneVersion: "v1.31.0",
+ currentMinWorkersVersion: "v1.31.0",
+ extensionError: errors.New("extension call error"),
+ wantErrMessage: "failed to get upgrade plan from extension: extension call error",
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+ ctx := t.Context()
+
+ // Enable/disable RuntimeSDK feature flag
+ utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.RuntimeSDK, tt.enableRuntimeSDK)
+
+ // Create a test cluster
+ cluster := builder.Cluster("test-namespace", "test-cluster").Build()
+
+ // Create catalog and register runtime hooks
+ catalog := runtimecatalog.New()
+ _ = runtimehooksv1.AddToCatalog(catalog)
+
+ // Create fake runtime client
+ fakeRuntimeClientBuilder := fakeruntimeclient.NewRuntimeClientBuilder().
+ WithCatalog(catalog)
+ if tt.extensionError != nil {
+ fakeRuntimeClientBuilder.WithCallExtensionValidations(func(_ string, _ runtimehooksv1.RequestObject) error {
+ return tt.extensionError
+ })
+ }
+ fakeRuntimeClient := fakeRuntimeClientBuilder.Build()
+
+ // Call GetUpgradePlanFromExtension
+ f := GetUpgradePlanFromExtension(fakeRuntimeClient, cache.New[GenerateUpgradePlanCacheEntry](10*time.Minute), cluster, "test-extension")
+ _, _, err := f(ctx, tt.desiredVersion, tt.currentControlPlaneVersion, tt.currentMinWorkersVersion)
+
+ g.Expect(err).To(HaveOccurred())
+ g.Expect(err.Error()).To(Equal(tt.wantErrMessage))
+ })
+ }
+}
diff --git a/exp/topology/scope/blueprint.go b/exp/topology/scope/blueprint.go
index 15c20fe3c597..5a6786519dc7 100644
--- a/exp/topology/scope/blueprint.go
+++ b/exp/topology/scope/blueprint.go
@@ -118,8 +118,9 @@ func (b *ClusterBlueprint) IsControlPlaneMachineHealthCheckEnabled() bool {
func (b *ClusterBlueprint) ControlPlaneMachineHealthCheckClass() (clusterv1.MachineHealthCheckChecks, clusterv1.MachineHealthCheckRemediation) {
if b.Topology.ControlPlane.HealthCheck.IsDefined() {
return clusterv1.MachineHealthCheckChecks{
- NodeStartupTimeoutSeconds: b.Topology.ControlPlane.HealthCheck.Checks.NodeStartupTimeoutSeconds,
- UnhealthyNodeConditions: b.Topology.ControlPlane.HealthCheck.Checks.UnhealthyNodeConditions,
+ NodeStartupTimeoutSeconds: b.Topology.ControlPlane.HealthCheck.Checks.NodeStartupTimeoutSeconds,
+ UnhealthyNodeConditions: b.Topology.ControlPlane.HealthCheck.Checks.UnhealthyNodeConditions,
+ UnhealthyMachineConditions: b.Topology.ControlPlane.HealthCheck.Checks.UnhealthyMachineConditions,
}, clusterv1.MachineHealthCheckRemediation{
TriggerIf: clusterv1.MachineHealthCheckRemediationTriggerIf{
UnhealthyLessThanOrEqualTo: b.Topology.ControlPlane.HealthCheck.Remediation.TriggerIf.UnhealthyLessThanOrEqualTo,
@@ -130,8 +131,9 @@ func (b *ClusterBlueprint) ControlPlaneMachineHealthCheckClass() (clusterv1.Mach
}
return clusterv1.MachineHealthCheckChecks{
- NodeStartupTimeoutSeconds: b.ControlPlane.HealthCheck.Checks.NodeStartupTimeoutSeconds,
- UnhealthyNodeConditions: b.ControlPlane.HealthCheck.Checks.UnhealthyNodeConditions,
+ NodeStartupTimeoutSeconds: b.ControlPlane.HealthCheck.Checks.NodeStartupTimeoutSeconds,
+ UnhealthyNodeConditions: b.ControlPlane.HealthCheck.Checks.UnhealthyNodeConditions,
+ UnhealthyMachineConditions: b.ControlPlane.HealthCheck.Checks.UnhealthyMachineConditions,
}, clusterv1.MachineHealthCheckRemediation{
TriggerIf: clusterv1.MachineHealthCheckRemediationTriggerIf{
UnhealthyLessThanOrEqualTo: b.ControlPlane.HealthCheck.Remediation.TriggerIf.UnhealthyLessThanOrEqualTo,
@@ -165,8 +167,9 @@ func (b *ClusterBlueprint) IsMachineDeploymentMachineHealthCheckEnabled(md *clus
func (b *ClusterBlueprint) MachineDeploymentMachineHealthCheckClass(md *clusterv1.MachineDeploymentTopology) (clusterv1.MachineHealthCheckChecks, clusterv1.MachineHealthCheckRemediation) {
if md.HealthCheck.IsDefined() {
return clusterv1.MachineHealthCheckChecks{
- NodeStartupTimeoutSeconds: md.HealthCheck.Checks.NodeStartupTimeoutSeconds,
- UnhealthyNodeConditions: md.HealthCheck.Checks.UnhealthyNodeConditions,
+ NodeStartupTimeoutSeconds: md.HealthCheck.Checks.NodeStartupTimeoutSeconds,
+ UnhealthyNodeConditions: md.HealthCheck.Checks.UnhealthyNodeConditions,
+ UnhealthyMachineConditions: md.HealthCheck.Checks.UnhealthyMachineConditions,
}, clusterv1.MachineHealthCheckRemediation{
TriggerIf: clusterv1.MachineHealthCheckRemediationTriggerIf{
UnhealthyLessThanOrEqualTo: md.HealthCheck.Remediation.TriggerIf.UnhealthyLessThanOrEqualTo,
@@ -177,8 +180,9 @@ func (b *ClusterBlueprint) MachineDeploymentMachineHealthCheckClass(md *clusterv
}
return clusterv1.MachineHealthCheckChecks{
- NodeStartupTimeoutSeconds: b.MachineDeployments[md.Class].HealthCheck.Checks.NodeStartupTimeoutSeconds,
- UnhealthyNodeConditions: b.MachineDeployments[md.Class].HealthCheck.Checks.UnhealthyNodeConditions,
+ NodeStartupTimeoutSeconds: b.MachineDeployments[md.Class].HealthCheck.Checks.NodeStartupTimeoutSeconds,
+ UnhealthyNodeConditions: b.MachineDeployments[md.Class].HealthCheck.Checks.UnhealthyNodeConditions,
+ UnhealthyMachineConditions: b.MachineDeployments[md.Class].HealthCheck.Checks.UnhealthyMachineConditions,
}, clusterv1.MachineHealthCheckRemediation{
TriggerIf: clusterv1.MachineHealthCheckRemediationTriggerIf{
UnhealthyLessThanOrEqualTo: b.MachineDeployments[md.Class].HealthCheck.Remediation.TriggerIf.UnhealthyLessThanOrEqualTo,
diff --git a/exp/topology/scope/blueprint_test.go b/exp/topology/scope/blueprint_test.go
index ca0cf5c635bb..0a244fe0bdb6 100644
--- a/exp/topology/scope/blueprint_test.go
+++ b/exp/topology/scope/blueprint_test.go
@@ -26,6 +26,7 @@ import (
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/utils/ptr"
+ controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
"sigs.k8s.io/cluster-api/util/test/builder"
)
@@ -70,6 +71,13 @@ func TestIsControlPlaneMachineHealthCheckEnabled(t *testing.T) {
TimeoutSeconds: ptr.To(int32(5 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionFalse,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
}).
Build(),
@@ -93,6 +101,13 @@ func TestIsControlPlaneMachineHealthCheckEnabled(t *testing.T) {
TimeoutSeconds: ptr.To(int32(5 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionUnknown,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
}).
Build(),
@@ -119,6 +134,13 @@ func TestIsControlPlaneMachineHealthCheckEnabled(t *testing.T) {
TimeoutSeconds: ptr.To(int32(5 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionUnknown,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
}).
Build(),
@@ -148,6 +170,13 @@ func TestIsControlPlaneMachineHealthCheckEnabled(t *testing.T) {
TimeoutSeconds: ptr.To(int32(5 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionUnknown,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
}).
Build(),
@@ -172,6 +201,13 @@ func TestIsControlPlaneMachineHealthCheckEnabled(t *testing.T) {
TimeoutSeconds: ptr.To(int32(5 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionUnknown,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
}).
Build(),
@@ -196,6 +232,13 @@ func TestIsControlPlaneMachineHealthCheckEnabled(t *testing.T) {
TimeoutSeconds: ptr.To(int32(5 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionUnknown,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
}).
Build(),
@@ -232,6 +275,13 @@ func TestControlPlaneMachineHealthCheckClass(t *testing.T) {
TimeoutSeconds: ptr.To(int32(20 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionFalse,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
Remediation: clusterv1.ControlPlaneTopologyHealthCheckRemediation{
TriggerIf: clusterv1.ControlPlaneTopologyHealthCheckRemediationTriggerIf{
@@ -250,6 +300,13 @@ func TestControlPlaneMachineHealthCheckClass(t *testing.T) {
TimeoutSeconds: ptr.To(int32(10 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionFalse,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
},
},
@@ -262,6 +319,13 @@ func TestControlPlaneMachineHealthCheckClass(t *testing.T) {
TimeoutSeconds: ptr.To(int32(20 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionFalse,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
wantRemediation: clusterv1.MachineHealthCheckRemediation{
TriggerIf: clusterv1.MachineHealthCheckRemediationTriggerIf{
@@ -285,6 +349,13 @@ func TestControlPlaneMachineHealthCheckClass(t *testing.T) {
TimeoutSeconds: ptr.To(int32(10 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionFalse,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
},
},
@@ -297,6 +368,13 @@ func TestControlPlaneMachineHealthCheckClass(t *testing.T) {
TimeoutSeconds: ptr.To(int32(10 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionFalse,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
wantRemediation: clusterv1.MachineHealthCheckRemediation{},
},
@@ -345,6 +423,13 @@ func TestIsMachineDeploymentMachineHealthCheckEnabled(t *testing.T) {
TimeoutSeconds: ptr.To(int32(5 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionUnknown,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
},
},
@@ -369,6 +454,13 @@ func TestIsMachineDeploymentMachineHealthCheckEnabled(t *testing.T) {
TimeoutSeconds: ptr.To(int32(5 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionUnknown,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
},
},
@@ -396,6 +488,13 @@ func TestIsMachineDeploymentMachineHealthCheckEnabled(t *testing.T) {
TimeoutSeconds: ptr.To(int32(5 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionUnknown,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
},
},
@@ -427,6 +526,13 @@ func TestIsMachineDeploymentMachineHealthCheckEnabled(t *testing.T) {
TimeoutSeconds: ptr.To(int32(5 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionUnknown,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
},
},
@@ -451,6 +557,13 @@ func TestIsMachineDeploymentMachineHealthCheckEnabled(t *testing.T) {
TimeoutSeconds: ptr.To(int32(5 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionUnknown,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
},
},
@@ -475,6 +588,13 @@ func TestIsMachineDeploymentMachineHealthCheckEnabled(t *testing.T) {
TimeoutSeconds: ptr.To(int32(5 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionUnknown,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
},
},
@@ -512,6 +632,13 @@ func TestMachineDeploymentMachineHealthCheckClass(t *testing.T) {
TimeoutSeconds: ptr.To(int32(10 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionFalse,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
},
},
@@ -528,6 +655,13 @@ func TestMachineDeploymentMachineHealthCheckClass(t *testing.T) {
TimeoutSeconds: ptr.To(int32(20 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionFalse,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
Remediation: clusterv1.MachineDeploymentTopologyHealthCheckRemediation{
TriggerIf: clusterv1.MachineDeploymentTopologyHealthCheckRemediationTriggerIf{
@@ -544,6 +678,13 @@ func TestMachineDeploymentMachineHealthCheckClass(t *testing.T) {
TimeoutSeconds: ptr.To(int32(20 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionFalse,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
wantRemediation: clusterv1.MachineHealthCheckRemediation{
TriggerIf: clusterv1.MachineHealthCheckRemediationTriggerIf{
@@ -565,6 +706,13 @@ func TestMachineDeploymentMachineHealthCheckClass(t *testing.T) {
TimeoutSeconds: ptr.To(int32(10 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionFalse,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
},
},
@@ -582,6 +730,13 @@ func TestMachineDeploymentMachineHealthCheckClass(t *testing.T) {
TimeoutSeconds: ptr.To(int32(10 * 60)),
},
},
+ UnhealthyMachineConditions: []clusterv1.UnhealthyMachineCondition{
+ {
+ Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyCondition,
+ Status: metav1.ConditionFalse,
+ TimeoutSeconds: ptr.To(int32(5 * 60)),
+ },
+ },
},
wantRemediation: clusterv1.MachineHealthCheckRemediation{},
},
diff --git a/exp/topology/scope/hookresponsetracker.go b/exp/topology/scope/hookresponsetracker.go
index e822961fda60..c8201ea3e6fd 100644
--- a/exp/topology/scope/hookresponsetracker.go
+++ b/exp/topology/scope/hookresponsetracker.go
@@ -64,6 +64,11 @@ func (h *HookResponseTracker) IsBlocking(hook runtimecatalog.Hook) bool {
return true
}
+// IsAnyBlocking return true if at least one hook is blocking.
+func (h *HookResponseTracker) IsAnyBlocking() bool {
+ return h.AggregateRetryAfter() > 0
+}
+
// AggregateRetryAfter calculates the lowest non-zero retryAfterSeconds time from all the tracked responses.
func (h *HookResponseTracker) AggregateRetryAfter() time.Duration {
res := int32(0)
@@ -76,7 +81,7 @@ func (h *HookResponseTracker) AggregateRetryAfter() time.Duration {
}
// AggregateMessage returns a human friendly message about the blocking status of hooks.
-func (h *HookResponseTracker) AggregateMessage() string {
+func (h *HookResponseTracker) AggregateMessage(action string) string {
blockingHooks := map[string]string{}
for hook, resp := range h.responses {
if retryResponse, ok := resp.(runtimehooksv1.RetryResponseObject); ok {
@@ -92,10 +97,10 @@ func (h *HookResponseTracker) AggregateMessage() string {
hookAndMessages := []string{}
for hook, message := range blockingHooks {
if message == "" {
- hookAndMessages = append(hookAndMessages, fmt.Sprintf("hook %q is blocking", hook))
+ hookAndMessages = append(hookAndMessages, hook)
} else {
- hookAndMessages = append(hookAndMessages, fmt.Sprintf("hook %q is blocking: %s", hook, message))
+ hookAndMessages = append(hookAndMessages, fmt.Sprintf("%s: %s", hook, message))
}
}
- return strings.Join(hookAndMessages, "; ")
+ return fmt.Sprintf("Following hooks are blocking %s: %s", action, strings.Join(hookAndMessages, "; "))
}
diff --git a/exp/topology/scope/hookresponsetracker_test.go b/exp/topology/scope/hookresponsetracker_test.go
index 797f0b46c36c..c12ec488e49a 100644
--- a/exp/topology/scope/hookresponsetracker_test.go
+++ b/exp/topology/scope/hookresponsetracker_test.go
@@ -21,7 +21,6 @@ import (
"time"
. "github.com/onsi/gomega"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1"
runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog"
@@ -133,8 +132,8 @@ func TestHookResponseTracker_AggregateMessage(t *testing.T) {
hrt.Add(runtimehooksv1.BeforeClusterCreate, blockingBeforeClusterCreateResponse)
hrt.Add(runtimehooksv1.BeforeClusterUpgrade, blockingBeforeClusterUpgradeResponse)
- g.Expect(hrt.AggregateMessage()).To(ContainSubstring(runtimecatalog.HookName(runtimehooksv1.BeforeClusterCreate)))
- g.Expect(hrt.AggregateMessage()).To(ContainSubstring(runtimecatalog.HookName(runtimehooksv1.BeforeClusterUpgrade)))
+ g.Expect(hrt.AggregateMessage("upgrade")).To(ContainSubstring(runtimecatalog.HookName(runtimehooksv1.BeforeClusterCreate)))
+ g.Expect(hrt.AggregateMessage("upgrade")).To(ContainSubstring(runtimecatalog.HookName(runtimehooksv1.BeforeClusterUpgrade)))
})
t.Run("AggregateMessage should return empty string if there are no blocking hook responses", func(t *testing.T) {
g := NewWithT(t)
@@ -143,7 +142,7 @@ func TestHookResponseTracker_AggregateMessage(t *testing.T) {
hrt.Add(runtimehooksv1.BeforeClusterCreate, nonBlockingBeforeClusterCreateResponse)
hrt.Add(runtimehooksv1.BeforeClusterUpgrade, nonBlockingBeforeClusterUpgradeResponse)
- g.Expect(hrt.AggregateMessage()).To(Equal(""))
+ g.Expect(hrt.AggregateMessage("upgrade")).To(Equal(""))
})
}
@@ -165,8 +164,7 @@ func TestHookResponseTracker_IsBlocking(t *testing.T) {
},
}
- afterClusterUpgradeResponse := &runtimehooksv1.AfterClusterUpgradeResponse{
- TypeMeta: metav1.TypeMeta{},
+ afterAfterControlPlaneInitializedResponse := &runtimehooksv1.AfterControlPlaneInitializedResponse{
CommonResponse: runtimehooksv1.CommonResponse{},
}
@@ -197,8 +195,8 @@ func TestHookResponseTracker_IsBlocking(t *testing.T) {
t.Run("should return false if the hook is non-blocking", func(t *testing.T) {
g := NewWithT(t)
hrt := NewHookResponseTracker()
- // AfterClusterUpgradeHook is non-blocking.
- hrt.Add(runtimehooksv1.AfterClusterUpgrade, afterClusterUpgradeResponse)
- g.Expect(hrt.IsBlocking(runtimehooksv1.AfterClusterUpgrade)).To(BeFalse())
+ // AfterControlPlaneInitialized is non-blocking.
+ hrt.Add(runtimehooksv1.AfterControlPlaneInitialized, afterAfterControlPlaneInitializedResponse)
+ g.Expect(hrt.IsBlocking(runtimehooksv1.AfterControlPlaneInitialized)).To(BeFalse())
})
}
diff --git a/exp/topology/scope/upgradetracker.go b/exp/topology/scope/upgradetracker.go
index a13cbbf6ef68..fef4649a1e69 100644
--- a/exp/topology/scope/upgradetracker.go
+++ b/exp/topology/scope/upgradetracker.go
@@ -23,6 +23,7 @@ type UpgradeTracker struct {
ControlPlane ControlPlaneUpgradeTracker
MachineDeployments WorkerUpgradeTracker
MachinePools WorkerUpgradeTracker
+ MinWorkersVersion string
}
// ControlPlaneUpgradeTracker holds the current upgrade status of the Control Plane.
@@ -36,6 +37,23 @@ type ControlPlaneUpgradeTracker struct {
// - Upgrade is blocked because any of the current MachineDeployments or MachinePools are upgrading.
IsPendingUpgrade bool
+ // IsWaitingForWorkersUpgrade documents when a Control Plane is pending a version upgrade but
+ // it cannot pick up the new version until workers upgrades.
+ // Note: this happens when performing a multistep upgrade, and the current upgrade step requires
+ // also workers to upgrade, e.g. for preventing violation of the rule that defines the max
+ // version skew between control plane and workers.
+ IsWaitingForWorkersUpgrade bool
+
+ // UpgradePlan tracks the list of version upgrades required to reach the desired version.
+ // The following rules apply:
+ // - there should be at least one version for every minor between currentControlPlaneVersion (excluded) and desiredVersion (included).
+ // - each version must be:
+ // - greater than currentControlPlaneVersion (or with a different build number)
+ // - greater than the previous version in the list (or with a different build number)
+ // - less or equal to desiredVersion (or with a different build number)
+ // - the last version in the plan must be equal to the desired version
+ UpgradePlan []string
+
// IsProvisioning is true if the current Control Plane is being provisioned for the first time. False otherwise.
IsProvisioning bool
@@ -70,6 +88,20 @@ type WorkerUpgradeTracker struct {
// By marking a MachineDeployment/MachinePool as pendingUpgrade we skip reconciling the MachineDeployment/MachinePool.
pendingUpgradeNames sets.Set[string]
+ // UpgradePlan tracks the list of version upgrades required to reach the desired version.
+ // the following rules apply:
+ // - each version must be:
+ // - equal to currentControlPlaneVersion or to one of the versions in the control plane upgrade plan.
+ // - greater than current min worker - MachineDeployment & MachinePool - version (or with a different build number)
+ // - greater than the previous version in the list (or with a different build number)
+ // - less or equal to the desiredVersion (or with a different build number)
+ // - in case of versions with the same major/minor/patch version but different build number, also the order
+ // of those versions must be the same for control plane and worker upgrade plan.
+ // - the last version in the plan must be equal to the desired version
+ // - the upgrade plane must have all the intermediate version which workers must go through to avoid breaking rules
+ // defining the max version skew between control plane and workers.
+ UpgradePlan []string
+
// deferredNames is the set of MachineDeployment/MachinePool names that are not going to pick up the new version
// in the current reconcile loop because they are deferred by the user.
// Note: If a MachineDeployment/MachinePool is marked as deferred it should also be marked as pendingUpgrade.
@@ -179,6 +211,33 @@ func (t *ControlPlaneUpgradeTracker) IsControlPlaneStable() bool {
return true
}
+// IsControlPlaneStableOrWaitingForWorkersUpgrade returns true is the ControlPlane is stable or waiting for worker upgrade.
+func (t *ControlPlaneUpgradeTracker) IsControlPlaneStableOrWaitingForWorkersUpgrade() bool {
+ // If the current control plane is provisioning it is not considered stable.
+ if t.IsProvisioning {
+ return false
+ }
+
+ // If the current control plane is upgrading it is not considered stable.
+ if t.IsUpgrading {
+ return false
+ }
+
+ // Check if we are about to upgrade the control plane. Since the control plane is about to start its upgrade process
+ // it cannot be considered stable.
+ if t.IsStartingUpgrade {
+ return false
+ }
+
+ // If the ControlPlane is pending picking up an upgrade then it is not yet at the desired state and
+ // cannot be considered stable unless the control plane is waiting for worker upgrade.
+ if t.IsPendingUpgrade && !t.IsWaitingForWorkersUpgrade {
+ return false
+ }
+
+ return true
+}
+
// MarkUpgrading marks a MachineDeployment/MachinePool as currently upgrading or about to upgrade.
func (m *WorkerUpgradeTracker) MarkUpgrading(names ...string) {
for _, name := range names {
@@ -192,6 +251,12 @@ func (m *WorkerUpgradeTracker) UpgradingNames() []string {
return sets.List(m.upgradingNames)
}
+// IsAnyUpgrading returns true if any of the machine deployments are upgrading.
+// Returns false, otherwise.
+func (m *WorkerUpgradeTracker) IsAnyUpgrading() bool {
+ return len(m.upgradingNames) != 0
+}
+
// UpgradeConcurrencyReached returns true if the number of MachineDeployments/MachinePools upgrading is at the concurrency limit.
func (m *WorkerUpgradeTracker) UpgradeConcurrencyReached() bool {
return m.upgradingNames.Len() >= m.maxUpgradeConcurrency
@@ -257,8 +322,8 @@ func (m *WorkerUpgradeTracker) DeferredUpgradeNames() []string {
return sets.List(m.deferredNames)
}
-// DeferredUpgrade returns true if the upgrade has been deferred for any of the
+// IsAnyUpgradeDeferred returns true if the upgrade has been deferred for any of the
// MachineDeployments/MachinePools. Returns false, otherwise.
-func (m *WorkerUpgradeTracker) DeferredUpgrade() bool {
+func (m *WorkerUpgradeTracker) IsAnyUpgradeDeferred() bool {
return len(m.deferredNames) != 0
}
diff --git a/exp/util/suite_test.go b/exp/util/suite_test.go
deleted file mode 100644
index 0cdb28e7f389..000000000000
--- a/exp/util/suite_test.go
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-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 util
-
-import (
- "k8s.io/apimachinery/pkg/runtime"
- ctrl "sigs.k8s.io/controller-runtime"
-
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
-)
-
-var (
- ctx = ctrl.SetupSignalHandler()
- fakeScheme = runtime.NewScheme()
-)
-
-func init() {
- _ = clusterv1.AddToScheme(fakeScheme)
-}
diff --git a/exp/util/util.go b/exp/util/util.go
deleted file mode 100644
index 5235cb3c630a..000000000000
--- a/exp/util/util.go
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
-Copyright 2020 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 util implements utility functions.
-package util
-
-import (
- "context"
-
- "github.com/pkg/errors"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime/schema"
- "k8s.io/klog/v2"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/client"
- "sigs.k8s.io/controller-runtime/pkg/handler"
- "sigs.k8s.io/controller-runtime/pkg/reconcile"
-
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
- "sigs.k8s.io/cluster-api/util/labels/format"
-)
-
-// GetOwnerMachinePool returns the MachinePool objects owning the current resource.
-func GetOwnerMachinePool(ctx context.Context, c client.Client, obj metav1.ObjectMeta) (*clusterv1.MachinePool, error) {
- for _, ref := range obj.GetOwnerReferences() {
- if ref.Kind != "MachinePool" {
- continue
- }
- gv, err := schema.ParseGroupVersion(ref.APIVersion)
- if err != nil {
- return nil, errors.WithStack(err)
- }
- if gv.Group == clusterv1.GroupVersion.Group {
- return GetMachinePoolByName(ctx, c, obj.Namespace, ref.Name)
- }
- }
- return nil, nil
-}
-
-// GetMachinePoolByName finds and returns a MachinePool object using the specified params.
-func GetMachinePoolByName(ctx context.Context, c client.Client, namespace, name string) (*clusterv1.MachinePool, error) {
- m := &clusterv1.MachinePool{}
- key := client.ObjectKey{Name: name, Namespace: namespace}
- if err := c.Get(ctx, key, m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-// GetMachinePoolByLabels finds and returns a MachinePool object using the value of clusterv1.MachinePoolNameLabel.
-// This differs from GetMachinePoolByName as the label value can be a hash.
-func GetMachinePoolByLabels(ctx context.Context, c client.Client, namespace string, labels map[string]string) (*clusterv1.MachinePool, error) {
- selector := map[string]string{}
- if clusterName, ok := labels[clusterv1.ClusterNameLabel]; ok {
- selector = map[string]string{clusterv1.ClusterNameLabel: clusterName}
- }
-
- if poolNameHash, ok := labels[clusterv1.MachinePoolNameLabel]; ok {
- machinePoolList := &clusterv1.MachinePoolList{}
- if err := c.List(ctx, machinePoolList, client.InNamespace(namespace), client.MatchingLabels(selector)); err != nil {
- return nil, errors.Wrapf(err, "failed to list MachinePools using labels %v", selector)
- }
-
- for _, mp := range machinePoolList.Items {
- if format.MustFormatValue(mp.Name) == poolNameHash {
- return &mp, nil
- }
- }
- } else {
- return nil, errors.Errorf("labels missing required key `%s`", clusterv1.MachinePoolNameLabel)
- }
-
- return nil, nil
-}
-
-// MachinePoolToInfrastructureMapFunc returns a handler.MapFunc that watches for
-// MachinePool events and returns reconciliation requests for an infrastructure provider object.
-func MachinePoolToInfrastructureMapFunc(ctx context.Context, gvk schema.GroupVersionKind) handler.MapFunc {
- log := ctrl.LoggerFrom(ctx)
- return func(_ context.Context, o client.Object) []reconcile.Request {
- m, ok := o.(*clusterv1.MachinePool)
- if !ok {
- log.V(4).Info("Not a machine pool", "Object", klog.KObj(o))
- return nil
- }
- log := log.WithValues("MachinePool", klog.KObj(o))
-
- gk := gvk.GroupKind()
- ref := m.Spec.Template.Spec.InfrastructureRef
- // Return early if the GroupKind doesn't match what we expect.
- infraGK := ref.GroupKind()
- if gk != infraGK {
- log.V(4).Info("Infra kind doesn't match filter group kind", "infrastructureGroupKind", infraGK.String())
- return nil
- }
-
- log.V(4).Info("Projecting object")
- return []reconcile.Request{
- {
- NamespacedName: client.ObjectKey{
- Namespace: m.Namespace,
- Name: ref.Name,
- },
- },
- }
- }
-}
diff --git a/exp/util/util_test.go b/exp/util/util_test.go
deleted file mode 100644
index ff2a546d21ee..000000000000
--- a/exp/util/util_test.go
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
-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 util implements utility functions.
-package util
-
-import (
- "fmt"
- "testing"
-
- . "github.com/onsi/gomega"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "sigs.k8s.io/controller-runtime/pkg/client"
- "sigs.k8s.io/controller-runtime/pkg/client/fake"
-
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
- "sigs.k8s.io/cluster-api/util/labels/format"
-)
-
-func TestGetMachinePoolByLabels(t *testing.T) {
- g := NewWithT(t)
-
- longMachinePoolName := "this-is-a-very-long-machinepool-name-that-will-turned-into-a-hash-because-it-is-longer-than-63-characters"
- namespace := "default"
-
- testcases := []struct {
- name string
- labels map[string]string
- machinePools []client.Object
- expectedMachinePoolName string
- expectedError string
- }{
- {
- name: "returns a MachinePool with matching labels",
- labels: map[string]string{
- clusterv1.MachinePoolNameLabel: "test-pool",
- },
- machinePools: []client.Object{
- &clusterv1.MachinePool{
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-pool",
- Namespace: "default",
- },
- },
- &clusterv1.MachinePool{
- ObjectMeta: metav1.ObjectMeta{
- Name: "other-pool",
- Namespace: "default",
- },
- },
- },
- expectedMachinePoolName: "test-pool",
- },
- {
- name: "returns a MachinePool with matching labels and cluster name is included",
- labels: map[string]string{
- clusterv1.MachinePoolNameLabel: "test-pool",
- clusterv1.ClusterNameLabel: "test-cluster",
- },
- machinePools: []client.Object{
- &clusterv1.MachinePool{
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-pool",
- Namespace: "default",
- Labels: map[string]string{
- clusterv1.ClusterNameLabel: "test-cluster",
- },
- },
- },
- &clusterv1.MachinePool{
- ObjectMeta: metav1.ObjectMeta{
- Name: "other-pool",
- Namespace: "default",
- Labels: map[string]string{
- clusterv1.ClusterNameLabel: "test-cluster",
- },
- },
- },
- },
- expectedMachinePoolName: "test-pool",
- },
- {
- name: "returns a MachinePool where label is a hash",
- labels: map[string]string{
- clusterv1.MachinePoolNameLabel: format.MustFormatValue(longMachinePoolName),
- },
- machinePools: []client.Object{
- &clusterv1.MachinePool{
- ObjectMeta: metav1.ObjectMeta{
- Name: longMachinePoolName,
- Namespace: "default",
- },
- },
- &clusterv1.MachinePool{
- ObjectMeta: metav1.ObjectMeta{
- Name: "other-pool",
- Namespace: "default",
- },
- },
- },
- expectedMachinePoolName: longMachinePoolName,
- },
- {
- name: "missing required key",
- labels: map[string]string{},
- expectedError: fmt.Sprintf("labels missing required key `%s`", clusterv1.MachinePoolNameLabel),
- },
- {
- name: "returns nil when no machine pool matches",
- labels: map[string]string{
- clusterv1.MachinePoolNameLabel: "test-pool",
- },
- machinePools: []client.Object{},
- expectedMachinePoolName: "",
- },
- }
-
- for _, tc := range testcases {
- t.Run(tc.name, func(*testing.T) {
- clientFake := fake.NewClientBuilder().
- WithScheme(fakeScheme).
- WithObjects(
- tc.machinePools...,
- ).Build()
-
- mp, err := GetMachinePoolByLabels(ctx, clientFake, namespace, tc.labels)
- if tc.expectedError != "" {
- g.Expect(err).To(MatchError(tc.expectedError))
- } else {
- g.Expect(err).NotTo(HaveOccurred())
- if tc.expectedMachinePoolName != "" {
- g.Expect(mp).ToNot(BeNil())
- g.Expect(mp.Name).To(Equal(tc.expectedMachinePoolName))
- } else {
- g.Expect(mp).To(BeNil())
- }
- }
- })
- }
-}
diff --git a/exp/webhooks/alias.go b/exp/webhooks/alias.go
deleted file mode 100644
index 21deef6e7651..000000000000
--- a/exp/webhooks/alias.go
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
-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 (
- ctrl "sigs.k8s.io/controller-runtime"
-
- "sigs.k8s.io/cluster-api/exp/internal/webhooks"
-)
-
-// MachinePool implements a validating and defaulting webhook for MachinePool.
-type MachinePool struct{}
-
-// SetupWebhookWithManager sets up MachinePool webhooks.
-func (webhook *MachinePool) SetupWebhookWithManager(mgr ctrl.Manager) error {
- return (&webhooks.MachinePool{}).SetupWebhookWithManager(mgr)
-}
diff --git a/exp/webhooks/doc.go b/exp/webhooks/doc.go
deleted file mode 100644
index ad3cd005e864..000000000000
--- a/exp/webhooks/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-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 contains external webhook implementations for some of our API types.
-package webhooks
diff --git a/feature/feature.go b/feature/feature.go
index 15a6fb169b4a..5f5956cdcf83 100644
--- a/feature/feature.go
+++ b/feature/feature.go
@@ -35,15 +35,6 @@ const (
// beta: v1.7
MachinePool featuregate.Feature = "MachinePool"
- // ClusterResourceSet is a feature gate for the ClusterResourceSet functionality.
- //
- // alpha: v0.3
- // beta: v0.4
- // GA: v1.10
- //
- // Deprecated: ClusterResourceSet feature is now GA and the corresponding feature flag will be removed in 1.12 release.
- ClusterResourceSet featuregate.Feature = "ClusterResourceSet"
-
// ClusterTopology is a feature gate for the ClusterClass and managed topologies functionality.
//
// alpha: v0.4
@@ -77,6 +68,21 @@ const (
//
// alpha: v1.10
PriorityQueue featuregate.Feature = "PriorityQueue"
+
+ // ReconcilerRateLimiting is a feature gate that controls if reconcilers are rate-limited.
+ // Note: Currently the feature gate is rate-limiting to 1 request / 1 second.
+ //
+ // alpha: v1.12
+ ReconcilerRateLimiting featuregate.Feature = "ReconcilerRateLimiting"
+
+ // InPlaceUpdates is a feature gate for the in-place machine updates functionality.
+ // alpha: v1.12
+ InPlaceUpdates featuregate.Feature = "InPlaceUpdates"
+
+ // MachineTaintPropagation is a feature gate for the machine taint propagation functionality.
+ //
+ // alpha: v1.12
+ MachineTaintPropagation featuregate.Feature = "MachineTaintPropagation"
)
func init() {
@@ -87,12 +93,14 @@ func init() {
// To add a new feature, define a key for it above and add it here.
var defaultClusterAPIFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{
// Every feature should be initiated here:
- ClusterResourceSet: {Default: true, PreRelease: featuregate.GA},
MachinePool: {Default: true, PreRelease: featuregate.Beta},
MachineSetPreflightChecks: {Default: true, PreRelease: featuregate.Beta},
MachineWaitForVolumeDetachConsiderVolumeAttachments: {Default: true, PreRelease: featuregate.Beta},
PriorityQueue: {Default: false, PreRelease: featuregate.Alpha},
+ ReconcilerRateLimiting: {Default: false, PreRelease: featuregate.Alpha},
ClusterTopology: {Default: false, PreRelease: featuregate.Alpha},
KubeadmBootstrapFormatIgnition: {Default: false, PreRelease: featuregate.Alpha},
RuntimeSDK: {Default: false, PreRelease: featuregate.Alpha},
+ InPlaceUpdates: {Default: false, PreRelease: featuregate.Alpha},
+ MachineTaintPropagation: {Default: false, PreRelease: featuregate.Alpha},
}
diff --git a/go.mod b/go.mod
index f2840ae550be..b0e21b19b1e7 100644
--- a/go.mod
+++ b/go.mod
@@ -18,47 +18,48 @@ require (
github.com/go-logr/logr v1.4.3
github.com/gobuffalo/flect v1.0.3
// Note: This must be kept in sync with the version used by k8s.io.
- github.com/google/cel-go v0.23.2
+ github.com/google/cel-go v0.26.0
github.com/google/go-cmp v0.7.0
github.com/google/go-github/v53 v53.2.0
- github.com/olekukonko/tablewriter v0.0.5
- github.com/onsi/ginkgo/v2 v2.23.4
- github.com/onsi/gomega v1.38.0
+ github.com/olekukonko/tablewriter v1.0.9
+ github.com/onsi/ginkgo/v2 v2.27.2
+ github.com/onsi/gomega v1.38.2
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.22.0
- github.com/spf13/cobra v1.9.1
- github.com/spf13/pflag v1.0.7
- github.com/spf13/viper v1.20.1
+ github.com/prometheus/client_model v0.6.2
+ github.com/spf13/cobra v1.10.1
+ github.com/spf13/pflag v1.0.10
+ github.com/spf13/viper v1.21.0
github.com/valyala/fastjson v1.6.4
- go.etcd.io/etcd/api/v3 v3.5.22
- go.etcd.io/etcd/client/pkg/v3 v3.5.22
- go.etcd.io/etcd/client/v3 v3.5.22
- go.uber.org/zap v1.27.0
+ go.etcd.io/etcd/api/v3 v3.6.6
+ go.etcd.io/etcd/client/pkg/v3 v3.6.6
+ go.etcd.io/etcd/client/v3 v3.6.6
+ go.uber.org/zap v1.27.1
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
- golang.org/x/oauth2 v0.30.0
- golang.org/x/text v0.27.0
+ golang.org/x/oauth2 v0.33.0
+ golang.org/x/text v0.31.0
gomodules.xyz/jsonpatch/v2 v2.5.0
- google.golang.org/grpc v1.71.3
- k8s.io/api v0.33.3
- k8s.io/apiextensions-apiserver v0.33.3
- k8s.io/apimachinery v0.33.3
- k8s.io/apiserver v0.33.3
- k8s.io/client-go v0.33.3
- k8s.io/cluster-bootstrap v0.33.3
- k8s.io/component-base v0.33.3
+ google.golang.org/grpc v1.72.3
+ k8s.io/api v0.34.2
+ k8s.io/apiextensions-apiserver v0.34.2
+ k8s.io/apimachinery v0.34.2
+ k8s.io/apiserver v0.34.2
+ k8s.io/client-go v0.34.2
+ k8s.io/cluster-bootstrap v0.34.2
+ k8s.io/component-base v0.34.2
k8s.io/klog/v2 v2.130.1
- k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff
- k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738
- sigs.k8s.io/controller-runtime v0.21.0
+ k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b
+ k8s.io/utils v0.0.0-20250604170112-4c0f3b243397
+ sigs.k8s.io/controller-runtime v0.22.4
sigs.k8s.io/randfill v1.0.0
sigs.k8s.io/yaml v1.6.0
)
require (
- cel.dev/expr v0.19.1 // indirect
+ cel.dev/expr v0.24.0 // indirect
dario.cat/mergo v1.0.1 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
- github.com/Masterminds/semver/v3 v3.3.0 // indirect
+ github.com/Masterminds/semver/v3 v3.4.0 // indirect
github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
github.com/ajeddeloh/go-json v0.0.0-20200220154158-5ae607161559 // indirect
@@ -72,11 +73,11 @@ require (
github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // 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.7.0+incompatible // 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
@@ -87,70 +88,74 @@ require (
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/btree v1.1.3 // indirect
- github.com/google/gnostic-models v0.6.9 // indirect
+ github.com/google/gnostic-models v0.7.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
- github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect
+ github.com/google/pprof v0.0.0-20250820193118-f64d9cf942d6 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
- github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 // indirect
+ github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // 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/spdystream v0.5.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/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // 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/opencontainers/go-digest v1.0.0 // indirect
- github.com/pelletier/go-toml/v2 v2.2.3 // indirect
- github.com/prometheus/client_model v0.6.1 // indirect
+ github.com/pelletier/go-toml/v2 v2.2.4 // indirect
+ github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/common v0.62.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
- github.com/rivo/uniseg v0.4.2 // indirect
- github.com/sagikazarmark/locafero v0.7.0 // 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.0 // indirect
- github.com/spf13/afero v1.12.0 // indirect
- github.com/spf13/cast v1.7.1 // 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/stoewer/go-strcase v1.3.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/vincent-petithory/dataurl v1.0.0 // 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 v1.35.0 // indirect
+ go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect
+ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect
+ go.opentelemetry.io/otel/metric v1.35.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/otel/trace v1.35.0 // indirect
+ go.opentelemetry.io/proto/otlp v1.5.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
+ go.yaml.in/yaml/v3 v3.0.4 // indirect
go4.org v0.0.0-20201209231011-d4a079459e60 // indirect
- golang.org/x/crypto v0.40.0 // indirect
- golang.org/x/net v0.42.0 // indirect
- golang.org/x/sync v0.16.0 // indirect
- golang.org/x/sys v0.34.0 // indirect
- golang.org/x/term v0.33.0 // indirect
+ golang.org/x/crypto v0.45.0 // indirect
+ golang.org/x/mod v0.29.0 // indirect
+ golang.org/x/net v0.47.0 // indirect
+ golang.org/x/sync v0.18.0 // indirect
+ golang.org/x/sys v0.38.0 // indirect
+ golang.org/x/term v0.37.0 // indirect
golang.org/x/time v0.9.0 // indirect
- golang.org/x/tools v0.34.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/protobuf v1.36.6 // indirect
+ golang.org/x/tools v0.38.0 // indirect
+ google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect
+ google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect
+ google.golang.org/protobuf v1.36.7 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // 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/structured-merge-diff/v4 v4.6.0 // indirect
+ sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
+ sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
)
diff --git a/go.sum b/go.sum
index 4a347e663f5c..42ae249f455b 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,5 @@
-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.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY=
+cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
@@ -25,8 +25,8 @@ github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ
github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE=
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
-github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0=
-github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
+github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
+github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs=
github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0=
github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I=
@@ -86,8 +86,8 @@ github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5Qvfr
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
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/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI=
@@ -105,10 +105,16 @@ github.com/flatcar/ignition v0.36.2/go.mod h1:uk1tpzLFRXus4RrvzgMI+IqmmB8a/RGFSB
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
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.15 h1:amyJrvM1D33cPHwVrjo9jQxX8g/7E2wYdZ+01KS3zGE=
+github.com/gkampitakis/go-snaps v0.5.15/go.mod h1:HNpx/9GoKisdhw9AFOBT1N7DBs9DiHo/hGheFGBZ+mc=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
@@ -133,6 +139,8 @@ github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9L
github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/gobuffalo/flect v1.0.3 h1:xeWBM2nui+qnVvNM4S3foBhCAL2XgPU+a7FdpelbTq4=
github.com/gobuffalo/flect v1.0.3/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs=
+github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw=
+github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
github.com/godbus/dbus v0.0.0-20181025153459-66d97aec3384/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
@@ -155,16 +163,15 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
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.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
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.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=
@@ -178,8 +185,8 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-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-20250820193118-f64d9cf942d6 h1:EEHtgt9IwisQ2AZ4pIsMjahcegHh6rmhqxzIRQIyepY=
+github.com/google/pprof v0.0.0-20250820193118-f64d9cf942d6/go.mod h1:I6V7YzU0XDpsHqbsyrghnFZLO1gwK6NPTNvmetQIk9U=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
@@ -191,8 +198,8 @@ github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5T
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA=
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.24.0 h1:TmHmbvxPmaegwhDubVz0lICL0J5Ka2vwTzhoePEXsGE=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0/go.mod h1:qztMSjm835F2bXf+5HKAPIS5qsmQDqZna/PgVt4rWtI=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI=
@@ -203,6 +210,8 @@ github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
+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/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
@@ -224,14 +233,16 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
-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/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.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=
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
@@ -241,68 +252,73 @@ github.com/moby/spdystream v0.5.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVO
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/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/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
-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.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus=
-github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8=
-github.com/onsi/gomega v1.38.0 h1:c/WX+w8SLAinvuKKQFh77WEucCnPk4j2OTUr7lt7BeY=
-github.com/onsi/gomega v1.38.0/go.mod h1:OcXcwId0b9QsE7Y49u+BTrL4IdKOBOKnD6VQNTJEB6o=
+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.27.2 h1:LzwLj0b89qtIy6SSASkzlNvX6WktqurSHwkk2ipF/Ns=
+github.com/onsi/ginkgo/v2 v2.27.2/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo=
+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/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/pborman/uuid v0.0.0-20170612153648-e790cca94e6c/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34=
-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/pin/tftp v2.1.0+incompatible/go.mod h1:xVpZOMCXTy+A5QMjEVN0Glwa1sUvaJhFXbr/aAxuxGY=
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/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q=
github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
-github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
+github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
+github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io=
github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I=
github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
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/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.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
-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/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/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk=
-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/sigma/bdoor v0.0.0-20160202064022-babf2a4017b0/go.mod h1:WBu7REWbxC/s/J06jsk//d+9DOz9BbsmcIrimuGRFbs=
github.com/sigma/vmw-guestinfo v0.0.0-20160204083807-95dd4126d6e8/go.mod h1:JrRFFC0veyh0cibh0DAhriSY7/gV3kDdNaVUOmfx01U=
github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo=
github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM=
-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/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M=
-github.com/spf13/pflag v1.0.7/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/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.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s=
+github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0=
+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.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=
@@ -316,10 +332,18 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
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.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
-github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
+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=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
+github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=
+github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
+github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
+github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
+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.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ=
github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY=
github.com/vincent-petithory/dataurl v1.0.0 h1:cXw+kPto8NLuJtlMsI152irrVw9fRDX8AbShPRpg2CI=
@@ -330,50 +354,48 @@ 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.etcd.io/etcd/api/v3 v3.5.22 h1:jRqZlcmndfKs1fO9I1Euqk3O5acEyBICyMKunxxhL94=
-go.etcd.io/etcd/api/v3 v3.5.22/go.mod h1:/mQQOEMyP7nAjMKZTJSCtMmlOoNAG5s7IjKZGvMN9Yc=
-go.etcd.io/etcd/client/pkg/v3 v3.5.22 h1:dFVbXCohuH0JKo6X+IznK6aohJSWcU+SF8QZF5EsaOQ=
-go.etcd.io/etcd/client/pkg/v3 v3.5.22/go.mod h1:cSURbmmXBOqyX839SdTbuO2zYtUjcZvKeQ7DEiYVOmU=
-go.etcd.io/etcd/client/v3 v3.5.22 h1:h+y9ocnclCPLPsoBoKwneZy7gy71VjvJ+8z4IPWxTn8=
-go.etcd.io/etcd/client/v3 v3.5.22/go.mod h1:p4ROLdCiv8gwQtnozOILXkqIjjSI0MR6Ly5F9qpFg+8=
+go.etcd.io/etcd/api/v3 v3.6.6 h1:mcaMp3+7JawWv69p6QShYWS8cIWUOl32bFLb6qf8pOQ=
+go.etcd.io/etcd/api/v3 v3.6.6/go.mod h1:f/om26iXl2wSkcTA1zGQv8reJRSLVdoEBsi4JdfMrx4=
+go.etcd.io/etcd/client/pkg/v3 v3.6.6 h1:uoqgzSOv2H9KlIF5O1Lsd8sW+eMLuV6wzE3q5GJGQNs=
+go.etcd.io/etcd/client/pkg/v3 v3.6.6/go.mod h1:YngfUVmvsvOJ2rRgStIyHsKtOt9SZI2aBJrZiWJhCbI=
+go.etcd.io/etcd/client/v3 v3.6.6 h1:G5z1wMf5B9SNexoxOHUGBaULurOZPIgGPsW6CN492ec=
+go.etcd.io/etcd/client/v3 v3.6.6/go.mod h1:36Qv6baQ07znPR3+n7t+Rk5VHEzVYPvFfGmfF4wBHV8=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
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/google.golang.org/grpc/otelgrpc v0.58.0 h1:PS8wXpbyaDJQ2VDHHncMe9Vct0Zn1fEjpsjrLxGJoSc=
-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0/go.mod h1:HDBUsEjOuRC0EzKZ1bSaRGZWUBAzo+MhAcUUORSr4D0=
+go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 h1:x7wzEgXfnzJcHDwStJT+mxOz4etr2EcexjqhBvmoakw=
+go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0/go.mod h1:rg+RlpR5dKwaS95IyyZqj5Wd4E13lk/msnTS0Xl9lJM=
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/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ=
-go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE=
+go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ=
+go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 h1:tgJ0uaNS4c98WRNUEx5U3aDlrDOI5Rs+1Vifcw4DJ8U=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0/go.mod h1:U7HYyW0zt/a9x5J1Kjs+r1f/d4ZHnYFclhYY2+YbeoE=
+go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M=
+go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE=
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.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs=
+go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc=
+go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4=
+go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4=
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/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.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.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=
go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=
-go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE=
-go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI=
+go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
+go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
go4.org v0.0.0-20160314031811-03efcb870d84/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE=
go4.org v0.0.0-20201209231011-d4a079459e60 h1:iqAGo78tVOJXELHQFRjR6TMwItrvXH4hrGJ32I/NFF8=
go4.org v0.0.0-20201209231011-d4a079459e60/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg=
@@ -383,8 +405,8 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U
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.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM=
-golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY=
+golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
+golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -413,6 +435,8 @@ golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
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.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA=
+golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -431,15 +455,15 @@ golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLL
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.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs=
-golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8=
+golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
+golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-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/oauth2 v0.33.0 h1:4Q+qn+E5z8gPRJfmRy7C2gGG3T4jIprK6aSYgTXGRpo=
+golang.org/x/oauth2 v0.33.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -447,8 +471,8 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ
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.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
-golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
+golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
+golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -466,21 +490,20 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/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.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA=
-golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
+golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
+golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg=
-golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0=
+golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU=
+golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
-golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4=
-golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU=
+golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
+golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY=
@@ -512,8 +535,8 @@ golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapK
golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
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.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo=
-golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg=
+golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ=
+golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs=
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=
@@ -546,10 +569,10 @@ google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvx
google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-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/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950=
+google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb h1:TLPQVbx1GJ8VKZxz52VAxl1EBgKXXbTiU9Fc5fZeLn4=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
@@ -557,10 +580,10 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-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.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
-google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
+google.golang.org/grpc v1.72.3 h1:6sysal2a4j9trATt+J/TSSEA/Q45ZrXzNh5zy4NMWuA=
+google.golang.org/grpc v1.72.3/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM=
+google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A=
+google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
@@ -581,40 +604,38 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
-k8s.io/api v0.33.3 h1:SRd5t//hhkI1buzxb288fy2xvjubstenEKL9K51KBI8=
-k8s.io/api v0.33.3/go.mod h1:01Y/iLUjNBM3TAvypct7DIj0M0NIZc+PzAHCIo0CYGE=
-k8s.io/apiextensions-apiserver v0.33.3 h1:qmOcAHN6DjfD0v9kxL5udB27SRP6SG/MTopmge3MwEs=
-k8s.io/apiextensions-apiserver v0.33.3/go.mod h1:oROuctgo27mUsyp9+Obahos6CWcMISSAPzQ77CAQGz8=
-k8s.io/apimachinery v0.33.3 h1:4ZSrmNa0c/ZpZJhAgRdcsFcZOw1PQU1bALVQ0B3I5LA=
-k8s.io/apimachinery v0.33.3/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
-k8s.io/apiserver v0.33.3 h1:Wv0hGc+QFdMJB4ZSiHrCgN3zL3QRatu56+rpccKC3J4=
-k8s.io/apiserver v0.33.3/go.mod h1:05632ifFEe6TxwjdAIrwINHWE2hLwyADFk5mBsQa15E=
-k8s.io/client-go v0.33.3 h1:M5AfDnKfYmVJif92ngN532gFqakcGi6RvaOF16efrpA=
-k8s.io/client-go v0.33.3/go.mod h1:luqKBQggEf3shbxHY4uVENAxrDISLOarxpTKMiUuujg=
-k8s.io/cluster-bootstrap v0.33.3 h1:u2NTxJ5CFSBFXaDxLQoOWMly8eni31psVso+caq6uwI=
-k8s.io/cluster-bootstrap v0.33.3/go.mod h1:p970f8u8jf273zyQ5raD8WUu2XyAl0SAWOY82o7i/ds=
-k8s.io/component-base v0.33.3 h1:mlAuyJqyPlKZM7FyaoM/LcunZaaY353RXiOd2+B5tGA=
-k8s.io/component-base v0.33.3/go.mod h1:ktBVsBzkI3imDuxYXmVxZ2zxJnYTZ4HAsVj9iF09qp4=
+k8s.io/api v0.34.2 h1:fsSUNZhV+bnL6Aqrp6O7lMTy6o5x2C4XLjnh//8SLYY=
+k8s.io/api v0.34.2/go.mod h1:MMBPaWlED2a8w4RSeanD76f7opUoypY8TFYkSM+3XHw=
+k8s.io/apiextensions-apiserver v0.34.2 h1:WStKftnGeoKP4AZRz/BaAAEJvYp4mlZGN0UCv+uvsqo=
+k8s.io/apiextensions-apiserver v0.34.2/go.mod h1:398CJrsgXF1wytdaanynDpJ67zG4Xq7yj91GrmYN2SE=
+k8s.io/apimachinery v0.34.2 h1:zQ12Uk3eMHPxrsbUJgNF8bTauTVR2WgqJsTmwTE/NW4=
+k8s.io/apimachinery v0.34.2/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
+k8s.io/apiserver v0.34.2 h1:2/yu8suwkmES7IzwlehAovo8dDE07cFRC7KMDb1+MAE=
+k8s.io/apiserver v0.34.2/go.mod h1:gqJQy2yDOB50R3JUReHSFr+cwJnL8G1dzTA0YLEqAPI=
+k8s.io/client-go v0.34.2 h1:Co6XiknN+uUZqiddlfAjT68184/37PS4QAzYvQvDR8M=
+k8s.io/client-go v0.34.2/go.mod h1:2VYDl1XXJsdcAxw7BenFslRQX28Dxz91U9MWKjX97fE=
+k8s.io/cluster-bootstrap v0.34.2 h1:oKckPeunVCns37BntcsxaOesDul32yzGd3DFLjW2fc8=
+k8s.io/cluster-bootstrap v0.34.2/go.mod h1:f21byPR7X5nt12ivZi+J3pb4sG4SH6VySX8KAAJA8BY=
+k8s.io/component-base v0.34.2 h1:HQRqK9x2sSAsd8+R4xxRirlTjowsg6fWCPwWYeSvogQ=
+k8s.io/component-base v0.34.2/go.mod h1:9xw2FHJavUHBFpiGkZoKuYZ5pdtLKe97DEByaA+hHbM=
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-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4=
-k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8=
-k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro=
-k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
+k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA=
+k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts=
+k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y=
+k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
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/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/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
+sigs.k8s.io/controller-runtime v0.22.4 h1:GEjV7KV3TY8e+tJ2LCTxUTanW4z/FmNB7l327UfMq9A=
+sigs.k8s.io/controller-runtime v0.22.4/go.mod h1:+QX1XUpTXN4mLoblf4tqr5CQcyHPAki2HLXqQMY6vh8=
+sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=
+sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
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.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc=
-sigs.k8s.io/structured-merge-diff/v4 v4.6.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.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco=
+sigs.k8s.io/structured-merge-diff/v6 v6.3.0/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/observability/alloy/kustomization.yaml b/hack/observability/alloy/kustomization.yaml
new file mode 100644
index 000000000000..3ac807ab325c
--- /dev/null
+++ b/hack/observability/alloy/kustomization.yaml
@@ -0,0 +1,18 @@
+resources:
+ - ../namespace.yaml
+
+helmCharts:
+ - name: alloy
+ repo: https://grafana.github.io/helm-charts
+ releaseName: alloy
+ version: 0.12.5
+ valuesFile: values.yaml
+ namespace: observability
+
+
+
+helmGlobals:
+ # Store chart in ".charts" folder instead of "charts".
+ # Otherwise "go mod tidy" picks up dependencies of go files contained in the Helm Chart.
+ # "go mod tidy" ignores folders that begin with ".": https://pkg.go.dev/cmd/go#hdr-Package_lists_and_patterns.
+ chartHome: .charts
diff --git a/hack/observability/alloy/values.yaml b/hack/observability/alloy/values.yaml
new file mode 100644
index 000000000000..111de8bda884
--- /dev/null
+++ b/hack/observability/alloy/values.yaml
@@ -0,0 +1,134 @@
+# Configuration for alloy - https://github.com/grafana/alloy/blob/main/operations/helm/charts/alloy/values.yaml
+alloy:
+ configMap:
+ create: true
+ content: |-
+ discovery.kubernetes "kubernetes_pods" {
+ role = "pod"
+ }
+
+ discovery.relabel "kubernetes_pods" {
+ targets = discovery.kubernetes.kubernetes_pods.targets
+
+ rule {
+ source_labels = ["__meta_kubernetes_pod_controller_name"]
+ regex = "([0-9a-z-.]+?)(-[0-9a-f]{8,10})?"
+ target_label = "__tmp_controller_name"
+ }
+
+ rule {
+ source_labels = ["__meta_kubernetes_pod_label_app_kubernetes_io_name", "__meta_kubernetes_pod_label_app", "__tmp_controller_name", "__meta_kubernetes_pod_name"]
+ regex = "^;*([^;]+)(;.*)?$"
+ target_label = "app"
+ }
+
+ rule {
+ source_labels = ["__meta_kubernetes_pod_label_app_kubernetes_io_instance", "__meta_kubernetes_pod_label_instance"]
+ regex = "^;*([^;]+)(;.*)?$"
+ target_label = "instance"
+ }
+
+ rule {
+ source_labels = ["__meta_kubernetes_pod_label_app_kubernetes_io_component", "__meta_kubernetes_pod_label_component"]
+ regex = "^;*([^;]+)(;.*)?$"
+ target_label = "component"
+ }
+
+ rule {
+ source_labels = ["__meta_kubernetes_pod_node_name"]
+ target_label = "node_name"
+ }
+
+ rule {
+ source_labels = ["__meta_kubernetes_namespace"]
+ target_label = "namespace"
+ }
+
+ rule {
+ source_labels = ["namespace", "app"]
+ separator = "/"
+ target_label = "job"
+ }
+
+ rule {
+ source_labels = ["__meta_kubernetes_pod_name"]
+ target_label = "pod"
+ }
+
+ rule {
+ source_labels = ["__meta_kubernetes_pod_container_name"]
+ target_label = "container"
+ }
+
+ rule {
+ source_labels = ["__meta_kubernetes_pod_uid", "__meta_kubernetes_pod_container_name"]
+ separator = "/"
+ target_label = "__path__"
+ replacement = "/var/log/pods/*$1/*.log"
+ }
+
+ rule {
+ source_labels = ["__meta_kubernetes_pod_annotationpresent_kubernetes_io_config_hash", "__meta_kubernetes_pod_annotation_kubernetes_io_config_hash", "__meta_kubernetes_pod_container_name"]
+ separator = "/"
+ regex = "true/(.*)"
+ target_label = "__path__"
+ replacement = "/var/log/pods/*$1/*.log"
+ }
+ }
+
+ local.file_match "kubernetes_pods" {
+ path_targets = discovery.relabel.kubernetes_pods.output
+ }
+
+ loki.process "kubernetes_pods" {
+ forward_to = [loki.write.default.receiver]
+
+ stage.cri { }
+
+ stage.json {
+ expressions = {
+ Cluster = "join('/',[Cluster.namespace,Cluster.name])",
+ KubeadmControlPlane = "join('/',[KubeadmControlPlane.namespace,KubeadmControlPlane.name])",
+ Machine = "join('/',[Machine.namespace,Machine.name])",
+ MachineDeployment = "join('/',[MachineDeployment.namespace,MachineDeployment.name])",
+ MachinePool = "join('/',[MachinePool.namespace,MachinePool.name])",
+ MachineSet = "join('/',[MachineSet.namespace,MachineSet.name])",
+ controller = "",
+ }
+ }
+
+ stage.labels {
+ values = {
+ Cluster = null,
+ KubeadmControlPlane = null,
+ Machine = null,
+ MachineDeployment = null,
+ MachinePool = null,
+ MachineSet = null,
+ controller = null,
+ }
+ }
+ }
+
+ loki.source.file "kubernetes_pods" {
+ targets = local.file_match.kubernetes_pods.targets
+ forward_to = [loki.process.kubernetes_pods.receiver]
+ legacy_positions_file = "/run/promtail/positions.yaml"
+ }
+
+ loki.write "default" {
+ endpoint {
+ url = "http://loki:3100/loki/api/v1/push"
+ tenant_id = "1"
+ }
+ external_labels = {}
+ }
+ mounts:
+ varlog: true
+ run:
+ enabled: true
+ path: /run
+ podSecurityContext:
+ runAsUser: 0
+ runAsGroup: 0
+ fsGroup: 0
diff --git a/hack/observability/grafana/chart/values.yaml b/hack/observability/grafana/chart/values.yaml
index a9411253874c..4bde2a178383 100644
--- a/hack/observability/grafana/chart/values.yaml
+++ b/hack/observability/grafana/chart/values.yaml
@@ -30,7 +30,7 @@ datasources:
isDefault: true
editable: true
# This header has to be set as we had to set an OrgID
- # in promtail to be able to push the logs to Loki.
+ # in alloy to be able to push the logs to Loki.
jsonData:
maxLines: 1000
derivedFields:
diff --git a/hack/observability/grafana/dashboards/cluster-api-state.json b/hack/observability/grafana/dashboards/cluster-api-state.json
index d26f86676aae..082288991d3a 100644
--- a/hack/observability/grafana/dashboards/cluster-api-state.json
+++ b/hack/observability/grafana/dashboards/cluster-api-state.json
@@ -1213,9 +1213,9 @@
"uid": "prometheus"
},
"editorMode": "code",
- "expr": "sum (capi_kubeadmcontrolplane_status_replicas_updated)",
+ "expr": "sum (capi_kubeadmcontrolplane_status_replicas_uptodate)",
"hide": false,
- "legendFormat": "status updated replicas",
+ "legendFormat": "status up-to-date replicas",
"range": true,
"refId": "E"
}
@@ -1572,9 +1572,9 @@
"uid": "prometheus"
},
"editorMode": "code",
- "expr": "sum (capi_machinedeployment_status_replicas_updated)",
+ "expr": "sum (capi_machinedeployment_status_replicas_uptodate)",
"hide": false,
- "legendFormat": "status updated replicas",
+ "legendFormat": "status up-to-date replicas",
"range": true,
"refId": "E"
},
diff --git a/hack/observability/grafana/dashboards/controller-runtime.json b/hack/observability/grafana/dashboards/controller-runtime.json
index f655604045b9..7f574cc5089a 100644
--- a/hack/observability/grafana/dashboards/controller-runtime.json
+++ b/hack/observability/grafana/dashboards/controller-runtime.json
@@ -1280,7 +1280,7 @@
"uid": "prometheus"
},
"editorMode": "code",
- "expr": "sum(rate(controller_runtime_reconcile_total{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod)",
+ "expr": "sum(rate(capi_reconcile_total{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod) or sum(rate(controller_runtime_reconcile_total{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod)",
"legendFormat": "{{pod}}",
"range": true,
"refId": "A"
@@ -1373,7 +1373,7 @@
"uid": "prometheus"
},
"editorMode": "code",
- "expr": "sum(rate(controller_runtime_reconcile_total{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod,controller)",
+ "expr": "sum(rate(capi_reconcile_total{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod,controller) or sum(rate(controller_runtime_reconcile_total{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod,controller)",
"legendFormat": "{{pod}}: {{controller}}",
"range": true,
"refId": "A"
@@ -1466,7 +1466,7 @@
"uid": "prometheus"
},
"editorMode": "code",
- "expr": "sum(rate(controller_runtime_reconcile_total{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod,result)",
+ "expr": "sum(rate(capi_reconcile_total{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod,result) or sum(rate(controller_runtime_reconcile_total{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod,result)",
"legendFormat": "{{pod}}: {{result}}",
"range": true,
"refId": "A"
@@ -1559,7 +1559,7 @@
"uid": "prometheus"
},
"editorMode": "code",
- "expr": "sum(rate(controller_runtime_reconcile_total{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod,controller,result)",
+ "expr": "sum(rate(capi_reconcile_total{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod,controller,result) or sum(rate(controller_runtime_reconcile_total{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod,controller,result)",
"legendFormat": "{{pod}}: {{controller}}: {{result}}",
"range": true,
"refId": "A"
@@ -1852,7 +1852,7 @@
"uid": "prometheus"
},
"editorMode": "code",
- "expr": "sum(rate(controller_runtime_reconcile_time_seconds_sum{pod=~\"$Pod\"}[5m])) by (pod) / sum(rate(controller_runtime_reconcile_time_seconds_count{pod=~\"$Pod\"}[5m])) by (pod)",
+ "expr": "sum(rate(capi_reconcile_time_seconds_sum{pod=~\"$Pod\"}[5m])) by (pod) / sum(rate(capi_reconcile_time_seconds_count{pod=~\"$Pod\"}[5m])) by (pod) or sum(rate(controller_runtime_reconcile_time_seconds_sum{pod=~\"$Pod\"}[5m])) by (pod) / sum(rate(controller_runtime_reconcile_time_seconds_count{pod=~\"$Pod\"}[5m])) by (pod)",
"legendFormat": "{{pod}}",
"range": true,
"refId": "A"
@@ -1946,7 +1946,7 @@
"uid": "prometheus"
},
"editorMode": "code",
- "expr": "histogram_quantile(0.50, sum(rate(controller_runtime_reconcile_time_seconds_bucket{pod=~\"$Pod\"}[5m])) by (pod, le))",
+ "expr": "histogram_quantile(0.50, sum(rate(capi_reconcile_time_seconds_bucket{pod=~\"$Pod\"}[5m])) by (pod, le)) or histogram_quantile(0.50, sum(rate(controller_runtime_reconcile_time_seconds_bucket{pod=~\"$Pod\"}[5m])) by (pod, le))",
"hide": false,
"legendFormat": "P50 {{pod}}",
"range": true,
@@ -1958,7 +1958,7 @@
"uid": "prometheus"
},
"editorMode": "code",
- "expr": "histogram_quantile(0.90, sum(rate(controller_runtime_reconcile_time_seconds_bucket{pod=~\"$Pod\"}[5m])) by (pod, le))",
+ "expr": "histogram_quantile(0.90, sum(rate(capi_reconcile_time_seconds_bucket{pod=~\"$Pod\"}[5m])) by (pod, le)) or histogram_quantile(0.90, sum(rate(controller_runtime_reconcile_time_seconds_bucket{pod=~\"$Pod\"}[5m])) by (pod, le))",
"hide": false,
"legendFormat": "P90 {{pod}}",
"range": true,
@@ -1970,7 +1970,7 @@
"uid": "prometheus"
},
"editorMode": "code",
- "expr": "histogram_quantile(0.99, sum(rate(controller_runtime_reconcile_time_seconds_bucket{pod=~\"$Pod\"}[5m])) by (pod, le))",
+ "expr": "histogram_quantile(0.99, sum(rate(capi_reconcile_time_seconds_bucket{pod=~\"$Pod\"}[5m])) by (pod, le)) or histogram_quantile(0.99, sum(rate(controller_runtime_reconcile_time_seconds_bucket{pod=~\"$Pod\"}[5m])) by (pod, le))",
"hide": false,
"legendFormat": "P99 {{pod}}",
"range": true,
@@ -2064,7 +2064,7 @@
"uid": "prometheus"
},
"editorMode": "code",
- "expr": "sum(rate(controller_runtime_reconcile_time_seconds_sum{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod,controller) / sum(rate(controller_runtime_reconcile_time_seconds_count{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod,controller)",
+ "expr": "sum(rate(capi_reconcile_time_seconds_sum{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod,controller) / sum(rate(capi_reconcile_time_seconds_count{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod,controller) or sum(rate(controller_runtime_reconcile_time_seconds_sum{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod,controller) / sum(rate(controller_runtime_reconcile_time_seconds_count{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod,controller)",
"legendFormat": "{{pod}}: {{controller}}",
"range": true,
"refId": "A"
@@ -2158,7 +2158,7 @@
"uid": "prometheus"
},
"editorMode": "code",
- "expr": "histogram_quantile(0.50, sum(rate(controller_runtime_reconcile_time_seconds_bucket{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod, controller, le))",
+ "expr": "histogram_quantile(0.50, sum(rate(capi_reconcile_time_seconds_bucket{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod, controller, le)) or histogram_quantile(0.50, sum(rate(controller_runtime_reconcile_time_seconds_bucket{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod, controller, le))",
"hide": false,
"legendFormat": "P50 {{pod}} {{controller}} ",
"range": true,
@@ -2170,7 +2170,7 @@
"uid": "prometheus"
},
"editorMode": "code",
- "expr": "histogram_quantile(0.90, sum(rate(controller_runtime_reconcile_time_seconds_bucket{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod, controller, le))",
+ "expr": "histogram_quantile(0.90, sum(rate(capi_reconcile_time_seconds_bucket{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod, controller, le)) or histogram_quantile(0.90, sum(rate(controller_runtime_reconcile_time_seconds_bucket{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod, controller, le))",
"hide": false,
"legendFormat": "P90 {{pod}} {{controller}} ",
"range": true,
@@ -2182,7 +2182,7 @@
"uid": "prometheus"
},
"editorMode": "code",
- "expr": "histogram_quantile(0.99, sum(rate(controller_runtime_reconcile_time_seconds_bucket{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod, controller, le))",
+ "expr": "histogram_quantile(0.99, sum(rate(capi_reconcile_time_seconds_bucket{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod, controller, le)) or histogram_quantile(0.99, sum(rate(controller_runtime_reconcile_time_seconds_bucket{pod=~\"$Pod\",controller=~\"$Controller\"}[5m])) by (pod, controller, le))",
"hide": false,
"legendFormat": "P99 {{pod}} {{controller}} ",
"range": true,
@@ -2262,7 +2262,7 @@
},
"editorMode": "code",
"exemplar": true,
- "expr": "rate(controller_runtime_reconcile_time_seconds_bucket{pod=~\"$Pod\", controller=~\"$Controller\"}[$__rate_interval])",
+ "expr": "rate(capi_reconcile_time_seconds_bucket{pod=~\"$Pod\", controller=~\"$Controller\"}[$__rate_interval]) or rate(controller_runtime_reconcile_time_seconds_bucket{pod=~\"$Pod\", controller=~\"$Controller\"}[$__rate_interval])",
"format": "heatmap",
"legendFormat": "{{le}}",
"range": true,
diff --git a/hack/observability/kube-state-metrics/crd-sidecar-patch.yaml b/hack/observability/kube-state-metrics/crd-sidecar-patch.yaml
index 3690e92f42a3..07e371714eac 100644
--- a/hack/observability/kube-state-metrics/crd-sidecar-patch.yaml
+++ b/hack/observability/kube-state-metrics/crd-sidecar-patch.yaml
@@ -17,6 +17,8 @@ spec:
value: observability
- name: SCRIPT
value: /script/compile.sh
+ - name: HEALTH_PORT
+ value: "18080" # Should not conflict with kube-state-metrics port
# This image continuously collects config maps with the specified label and
# updates the configuration for kube-state-metrics using a script.
image: kiwigrid/k8s-sidecar:latest
@@ -47,4 +49,4 @@ spec:
- configMap:
defaultMode: 511
name: kube-state-metrics-crd-sidecar-script
- name: compile-script
\ No newline at end of file
+ name: compile-script
diff --git a/hack/observability/promtail/kustomization.yaml b/hack/observability/promtail/kustomization.yaml
deleted file mode 100644
index 07821a5000e9..000000000000
--- a/hack/observability/promtail/kustomization.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-resources:
- - ../namespace.yaml
-
-helmCharts:
- - name: promtail
- repo: https://grafana.github.io/helm-charts
- releaseName: promtail
- namespace: observability
- valuesFile: values.yaml
- version: 6.16.6
-
-helmGlobals:
- # Store chart in ".charts" folder instead of "charts".
- # Otherwise "go mod tidy" picks up dependencies of go files contained in the Helm Chart.
- # "go mod tidy" ignores folders that begin with ".": https://pkg.go.dev/cmd/go#hdr-Package_lists_and_patterns.
- chartHome: .charts
diff --git a/hack/observability/promtail/values.yaml b/hack/observability/promtail/values.yaml
deleted file mode 100644
index ed419ef9c045..000000000000
--- a/hack/observability/promtail/values.yaml
+++ /dev/null
@@ -1,31 +0,0 @@
-# Configuration for promtail chart, see https://github.com/grafana/helm-charts/tree/main/charts/promtail
-
-config:
- # publish data to loki
- clients:
- - url: http://loki:3100/loki/api/v1/push
- # We have to set the tenant_id/OrgID to push logs to Loki
- # otherwise we get an auth error.
- tenant_id: 1
-
- snippets:
- pipelineStages:
- # Parse cluster and machine to make them available as labels.
- - cri: {}
- - json:
- expressions:
- controller:
- Cluster: join('/',[Cluster.namespace,Cluster.name])
- Machine: join('/',[Machine.namespace,Machine.name])
- KubeadmControlPlane: join('/',[KubeadmControlPlane.namespace,KubeadmControlPlane.name])
- MachineDeployment: join('/',[MachineDeployment.namespace,MachineDeployment.name])
- MachineSet: join('/',[MachineSet.namespace,MachineSet.name])
- MachinePool: join('/',[MachinePool.namespace,MachinePool.name])
- - labels:
- controller:
- Cluster:
- Machine:
- KubeadmControlPlane:
- MachineDeployment:
- MachineSet:
- MachinePool:
diff --git a/hack/tools/.custom-gcl.yaml b/hack/tools/.custom-gcl.yaml
index cee2f30f82b3..7356531632f7 100644
--- a/hack/tools/.custom-gcl.yaml
+++ b/hack/tools/.custom-gcl.yaml
@@ -1,6 +1,6 @@
-version: v2.3.0
+version: v2.7.0
name: golangci-lint-kube-api-linter
destination: ./bin
plugins:
- module: 'sigs.k8s.io/kube-api-linter'
- version: v0.0.0-20250808120943-48643eb2563d
+ version: v0.0.0-20251107220451-f87b38edda8c
diff --git a/hack/tools/go.mod b/hack/tools/go.mod
index 3e3b246595d1..4532153572f1 100644
--- a/hack/tools/go.mod
+++ b/hack/tools/go.mod
@@ -7,27 +7,27 @@ replace sigs.k8s.io/cluster-api => ../../
replace sigs.k8s.io/cluster-api/test => ../../test
require (
- cloud.google.com/go/storage v1.56.0
+ cloud.google.com/go/storage v1.57.2
github.com/blang/semver/v4 v4.0.0
github.com/google/go-cmp v0.7.0
github.com/google/go-github v17.0.0+incompatible
- github.com/onsi/gomega v1.38.0
+ github.com/onsi/gomega v1.38.2
github.com/pkg/errors v0.9.1
- github.com/spf13/pflag v1.0.7
+ github.com/spf13/pflag v1.0.10
github.com/valyala/fastjson v1.6.4
- golang.org/x/oauth2 v0.30.0
- google.golang.org/api v0.244.0
- k8s.io/api v0.33.3
- k8s.io/apiextensions-apiserver v0.33.3
- k8s.io/apimachinery v0.33.3
- k8s.io/client-go v0.33.3
+ golang.org/x/oauth2 v0.33.0
+ google.golang.org/api v0.256.0
+ k8s.io/api v0.34.2
+ k8s.io/apiextensions-apiserver v0.34.2
+ k8s.io/apimachinery v0.34.2
+ k8s.io/client-go v0.34.2
k8s.io/klog/v2 v2.130.1
- k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff
- k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738
+ k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b
+ k8s.io/utils v0.0.0-20250604170112-4c0f3b243397
sigs.k8s.io/cluster-api v0.0.0-00010101000000-000000000000
sigs.k8s.io/cluster-api/test v0.0.0-00010101000000-000000000000
- sigs.k8s.io/controller-runtime v0.21.0
- sigs.k8s.io/controller-tools v0.18.0
+ sigs.k8s.io/controller-runtime v0.22.4
+ sigs.k8s.io/controller-tools v0.19.0
sigs.k8s.io/kubebuilder/docs/book/utils v0.0.0-20211028165026-57688c578b5d
sigs.k8s.io/kustomize/api v0.17.3
sigs.k8s.io/yaml v1.6.0
@@ -35,10 +35,10 @@ require (
require (
cel.dev/expr v0.24.0 // indirect
- cloud.google.com/go/auth v0.16.3 // indirect
+ cloud.google.com/go/auth v0.17.0 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
cloud.google.com/go/monitoring v1.24.2 // indirect
- github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0 // indirect
+ github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.29.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.53.0 // indirect
github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 // indirect
@@ -46,29 +46,32 @@ require (
github.com/containerd/errdefs/pkg v0.3.0 // indirect
github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
- github.com/fxamacker/cbor/v2 v2.7.0 // indirect
- github.com/go-jose/go-jose/v4 v4.0.5 // indirect
+ github.com/fxamacker/cbor/v2 v2.9.0 // indirect
+ github.com/go-jose/go-jose/v4 v4.1.2 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/sys/sequential v0.6.0 // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
+ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
+ github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/zeebo/errs v1.4.0 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.36.0 // indirect
- go.opentelemetry.io/otel/sdk v1.36.0 // indirect
- go.opentelemetry.io/otel/sdk/metric v1.36.0 // indirect
+ go.opentelemetry.io/otel/sdk v1.37.0 // indirect
+ go.opentelemetry.io/otel/sdk/metric v1.37.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
+ sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
)
require (
- cloud.google.com/go v0.121.4 // indirect
- cloud.google.com/go/compute/metadata v0.7.0 // indirect
+ cloud.google.com/go v0.121.6 // indirect
+ cloud.google.com/go/compute/metadata v0.9.0 // indirect
cloud.google.com/go/iam v1.5.2 // indirect
dario.cat/mergo v1.0.1 // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
@@ -83,16 +86,16 @@ require (
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // 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
- github.com/emicklei/go-restful/v3 v3.12.2 // indirect
+ github.com/emicklei/go-restful/v3 v3.13.0 // indirect
github.com/emirpasic/gods v1.18.1 // 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/fsnotify/fsnotify v1.9.0 // indirect
github.com/go-errors/errors v1.4.2 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
@@ -105,78 +108,76 @@ require (
github.com/gobuffalo/flect v1.0.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
- github.com/google/gnostic-models v0.6.9 // indirect
+ github.com/google/gnostic-models v0.7.0 // indirect
github.com/google/go-github/v53 v53.2.0 // indirect
github.com/google/go-github/v58 v58.0.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/s2a-go v0.1.9 // indirect
github.com/google/uuid v1.6.0 // indirect
- github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
+ github.com/googleapis/enterprise-certificate-proxy v0.3.7 // indirect
github.com/googleapis/gax-go/v2 v2.15.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kevinburke/ssh_config v1.2.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.15 // indirect
+ github.com/mattn/go-runewidth v0.0.16 // 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/nozzle/throttler v0.0.0-20180817012639-2ea982251481 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc5 // indirect
- github.com/pelletier/go-toml/v2 v2.2.3 // indirect
+ github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/prometheus/client_golang v1.22.0 // indirect
- github.com/prometheus/client_model v0.6.1 // indirect
+ github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.62.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
- github.com/rivo/uniseg v0.4.4 // indirect
- github.com/sagikazarmark/locafero v0.7.0 // indirect
+ github.com/rivo/uniseg v0.4.7 // indirect
+ github.com/sagikazarmark/locafero v0.11.0 // indirect
github.com/saschagrunert/go-modiff v1.3.5 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/skeema/knownhosts v1.2.2 // 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/viper v1.20.1 // 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/viper v1.21.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
- go.opentelemetry.io/otel v1.36.0 // indirect
- go.opentelemetry.io/otel/metric v1.36.0 // indirect
- go.opentelemetry.io/otel/trace v1.36.0 // indirect
- go.uber.org/multierr v1.11.0 // indirect
- golang.org/x/crypto v0.40.0 // indirect
- golang.org/x/mod v0.25.0 // indirect
- golang.org/x/net v0.42.0 // indirect
- golang.org/x/sync v0.16.0 // indirect
- golang.org/x/sys v0.34.0 // indirect
- golang.org/x/term v0.33.0 // indirect
- golang.org/x/text v0.27.0 // indirect
- golang.org/x/time v0.12.0 // indirect
- golang.org/x/tools v0.34.0 // indirect
+ go.opentelemetry.io/otel v1.37.0 // indirect
+ go.opentelemetry.io/otel/metric v1.37.0 // indirect
+ go.opentelemetry.io/otel/trace v1.37.0 // indirect
+ golang.org/x/crypto v0.45.0 // indirect
+ golang.org/x/mod v0.29.0 // indirect
+ golang.org/x/net v0.47.0 // indirect
+ golang.org/x/sync v0.18.0 // indirect
+ golang.org/x/sys v0.38.0 // indirect
+ golang.org/x/term v0.37.0 // indirect
+ golang.org/x/text v0.31.0 // indirect
+ golang.org/x/time v0.14.0 // indirect
+ golang.org/x/tools v0.38.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
google.golang.org/genproto v0.0.0-20250603155806-513f23925822 // indirect
- google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 // indirect
- google.golang.org/genproto/googleapis/rpc v0.0.0-20250728155136-f173205681a0 // indirect
- google.golang.org/grpc v1.74.2 // indirect
- google.golang.org/protobuf v1.36.6 // indirect
+ google.golang.org/genproto/googleapis/api v0.0.0-20250818200422-3122310a409c // indirect
+ google.golang.org/genproto/googleapis/rpc v0.0.0-20251103181224-f26f9409b101 // indirect
+ google.golang.org/grpc v1.76.0 // indirect
+ google.golang.org/protobuf v1.36.10 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
- k8s.io/apiserver v0.33.3 // indirect
- k8s.io/cluster-bootstrap v0.33.3 // indirect
- k8s.io/component-base v0.33.3 // indirect
+ k8s.io/apiserver v0.34.2 // indirect
+ k8s.io/cluster-bootstrap v0.34.2 // indirect
+ k8s.io/component-base v0.34.2 // indirect
k8s.io/release v0.16.9
- sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
+ sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/kustomize/kyaml v0.17.2 // indirect
sigs.k8s.io/release-sdk v0.11.0 // indirect
sigs.k8s.io/release-utils v0.8.1 // indirect
- sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
)
diff --git a/hack/tools/go.sum b/hack/tools/go.sum
index 45857a22fac1..9f498c016da6 100644
--- a/hack/tools/go.sum
+++ b/hack/tools/go.sum
@@ -1,31 +1,31 @@
cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY=
cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw=
-cloud.google.com/go v0.121.4 h1:cVvUiY0sX0xwyxPwdSU2KsF9knOVmtRyAMt8xou0iTs=
-cloud.google.com/go v0.121.4/go.mod h1:XEBchUiHFJbz4lKBZwYBDHV/rSyfFktk737TLDU089s=
-cloud.google.com/go/auth v0.16.3 h1:kabzoQ9/bobUmnseYnBO6qQG7q4a/CffFRlJSxv2wCc=
-cloud.google.com/go/auth v0.16.3/go.mod h1:NucRGjaXfzP1ltpcQ7On/VTZ0H4kWB5Jy+Y9Dnm76fA=
+cloud.google.com/go v0.121.6 h1:waZiuajrI28iAf40cWgycWNgaXPO06dupuS+sgibK6c=
+cloud.google.com/go v0.121.6/go.mod h1:coChdst4Ea5vUpiALcYKXEpR1S9ZgXbhEzzMcMR66vI=
+cloud.google.com/go/auth v0.17.0 h1:74yCm7hCj2rUyyAocqnFzsAYXgJhrG26XCFimrc/Kz4=
+cloud.google.com/go/auth v0.17.0/go.mod h1:6wv/t5/6rOPAX4fJiRjKkJCvswLwdet7G8+UGXt7nCQ=
cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc=
cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c=
-cloud.google.com/go/compute/metadata v0.7.0 h1:PBWF+iiAerVNe8UCHxdOt6eHLVc3ydFeOCw78U8ytSU=
-cloud.google.com/go/compute/metadata v0.7.0/go.mod h1:j5MvL9PprKL39t166CoB1uVHfQMs4tFQZZcKwksXUjo=
+cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs=
+cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10=
cloud.google.com/go/iam v1.5.2 h1:qgFRAGEmd8z6dJ/qyEchAuL9jpswyODjA2lS+w234g8=
cloud.google.com/go/iam v1.5.2/go.mod h1:SE1vg0N81zQqLzQEwxL2WI6yhetBdbNQuTvIKCSkUHE=
cloud.google.com/go/logging v1.13.0 h1:7j0HgAp0B94o1YRDqiqm26w4q1rDMH7XNRU34lJXHYc=
cloud.google.com/go/logging v1.13.0/go.mod h1:36CoKh6KA/M0PbhPKMq6/qety2DCAErbhXT62TuXALA=
-cloud.google.com/go/longrunning v0.6.7 h1:IGtfDWHhQCgCjwQjV9iiLnUta9LBCo8R9QmAFsS/PrE=
-cloud.google.com/go/longrunning v0.6.7/go.mod h1:EAFV3IZAKmM56TyiE6VAP3VoTzhZzySwI/YI1s/nRsY=
+cloud.google.com/go/longrunning v0.7.0 h1:FV0+SYF1RIj59gyoWDRi45GiYUMM3K1qO51qoboQT1E=
+cloud.google.com/go/longrunning v0.7.0/go.mod h1:ySn2yXmjbK9Ba0zsQqunhDkYi0+9rlXIwnoAf+h+TPY=
cloud.google.com/go/monitoring v1.24.2 h1:5OTsoJ1dXYIiMiuL+sYscLc9BumrL3CarVLL7dd7lHM=
cloud.google.com/go/monitoring v1.24.2/go.mod h1:x7yzPWcgDRnPEv3sI+jJGBkwl5qINf+6qY4eq0I9B4U=
-cloud.google.com/go/storage v1.56.0 h1:iixmq2Fse2tqxMbWhLWC9HfBj1qdxqAmiK8/eqtsLxI=
-cloud.google.com/go/storage v1.56.0/go.mod h1:Tpuj6t4NweCLzlNbw9Z9iwxEkrSem20AetIeH/shgVU=
+cloud.google.com/go/storage v1.57.2 h1:sVlym3cHGYhrp6XZKkKb+92I1V42ks2qKKpB0CF5Mb4=
+cloud.google.com/go/storage v1.57.2/go.mod h1:n5ijg4yiRXXpCu0sJTD6k+eMf7GRrJmPyr9YxLXGHOk=
cloud.google.com/go/trace v1.11.6 h1:2O2zjPzqPYAHrn3OKl029qlqG6W8ZdYaOWRyr8NgMT4=
cloud.google.com/go/trace v1.11.6/go.mod h1:GA855OeDEBiBMzcckLPE2kDunIpC72N+Pq8WFieFjnI=
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=
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
-github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0 h1:ErKg/3iS1AKcTkf3yixlZ54f9U1rljCkQyEXWUnIUxc=
-github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0/go.mod h1:yAZHSGnqScoU556rBOVkwLze6WP5N+U11RHuWaGVxwY=
+github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.29.0 h1:UQUsRi8WTzhZntp5313l+CHIAT95ojUI2lpP/ExlZa4=
+github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.29.0/go.mod h1:Cz6ft6Dkn3Et6l2v2a9/RpN7epQ1GtDlO6lj8bEcOvw=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0 h1:owcC2UnmsZycprQ5RfRgjydWhuoxg71LUfyiQdijZuM=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0/go.mod h1:ZPpqegjbE99EPKsu3iUWV22A04wzGPcAY/ziSIQEEgs=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.53.0 h1:4LP6hvB4I5ouTbGgWtixJhgED6xdf67twf9PoY96Tbg=
@@ -36,8 +36,8 @@ github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ
github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE=
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
-github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0=
-github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
+github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
+github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs=
github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0=
github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=
@@ -90,18 +90,18 @@ 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/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU=
github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM=
-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/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
github.com/envoyproxy/go-control-plane v0.13.4 h1:zEqyPVyku6IvWCFwux4x9RxkLOMUL+1vC9xUFv5l2/M=
@@ -122,10 +122,10 @@ 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/gliderlabs/ssh v0.3.7 h1:iV3Bqi942d9huXnzEF2Mt+CY9gLu8DNM4Obd+8bODRE=
github.com/gliderlabs/ssh v0.3.7/go.mod h1:zpHEXBstFnQYtGnB8k8kQLol82umzn/2/snG7alWVD8=
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
@@ -138,8 +138,8 @@ github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMj
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII=
github.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys=
github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY=
-github.com/go-jose/go-jose/v4 v4.0.5 h1:M6T8+mKZl/+fNNuFHvGIzDz7BTLQPIounk/b9dw3AaE=
-github.com/go-jose/go-jose/v4 v4.0.5/go.mod h1:s3P1lRrkT8igV8D9OjyL4WRyHvjB6a4JSllnOrmmBOA=
+github.com/go-jose/go-jose/v4 v4.1.2 h1:TK/7NqRQZfgAh+Td8AlsrvtPoUyiHh0LqVvokh+1vHI=
+github.com/go-jose/go-jose/v4 v4.1.2/go.mod h1:22cg9HWM1pOlnRiY+9cQYJ9XHmya1bYW8OeDM6Ku6Oo=
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=
@@ -170,13 +170,12 @@ 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.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY=
@@ -192,19 +191,18 @@ 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/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc=
github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0=
-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-20250820193118-f64d9cf942d6 h1:EEHtgt9IwisQ2AZ4pIsMjahcegHh6rmhqxzIRQIyepY=
+github.com/google/pprof v0.0.0-20250820193118-f64d9cf942d6/go.mod h1:I6V7YzU0XDpsHqbsyrghnFZLO1gwK6NPTNvmetQIk9U=
github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0=
github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM=
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/googleapis/enterprise-certificate-proxy v0.3.6 h1:GW/XbdyBFQ8Qe+YAmFU9uHLo7OnF5tL52HFAgMmyrf4=
-github.com/googleapis/enterprise-certificate-proxy v0.3.6/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA=
+github.com/googleapis/enterprise-certificate-proxy v0.3.7 h1:zrn2Ee/nWmHulBx5sAVrGgAa0f2/R35S4DJwfFaUPFQ=
+github.com/googleapis/enterprise-certificate-proxy v0.3.7/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA=
github.com/googleapis/gax-go/v2 v2.15.0 h1:SyjDc1mGgZU5LncH8gimWo9lW1DtIfPibOG81vgd/bo=
github.com/googleapis/gax-go/v2 v2.15.0/go.mod h1:zVVkkxAQHa1RQpg9z2AUCMnKhi0Qld9rcmyfL1OZhoc=
-github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=
-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/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI=
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=
@@ -233,13 +231,12 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
-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.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
-github.com/mattn/go-runewidth v0.0.15/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/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
@@ -255,8 +252,9 @@ 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=
@@ -267,16 +265,16 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
-github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus=
-github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8=
-github.com/onsi/gomega v1.38.0 h1:c/WX+w8SLAinvuKKQFh77WEucCnPk4j2OTUr7lt7BeY=
-github.com/onsi/gomega v1.38.0/go.mod h1:OcXcwId0b9QsE7Y49u+BTrL4IdKOBOKnD6VQNTJEB6o=
+github.com/onsi/ginkgo/v2 v2.27.2 h1:LzwLj0b89qtIy6SSASkzlNvX6WktqurSHwkk2ipF/Ns=
+github.com/onsi/ginkgo/v2 v2.27.2/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo=
+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/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.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI=
github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8=
-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/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=
github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
@@ -288,19 +286,19 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q=
github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0=
-github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
-github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
+github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
+github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io=
github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I=
github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
-github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
-github.com/rivo/uniseg v0.4.4/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/sagikazarmark/locafero v0.7.0 h1:5MqpDsTGNDhY8sGp0Aowyf0qKsPrhewaLSsFaodPcyo=
-github.com/sagikazarmark/locafero v0.7.0/go.mod h1:2za3Cg5rMaTMoG/2Ulr9AwtFaIppKXTRYnozin4aB5k=
+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/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc=
+github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik=
github.com/saschagrunert/go-modiff v1.3.5 h1:Wb2KUhCiuTJfhCwGYIwjZOpC++RbY0MTf7J5m1CfQlw=
github.com/saschagrunert/go-modiff v1.3.5/go.mod h1:yWSOFnT8wQIzUMsVflHmkL1qYHk+WLcjzGoeAjqjRXM=
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
@@ -312,18 +310,18 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A=
github.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo=
-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.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M=
-github.com/spf13/pflag v1.0.7/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/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.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s=
+github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0=
+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.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU=
+github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY=
github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8WS0hE=
github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
@@ -340,8 +338,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
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.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
-github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
+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=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ=
@@ -363,34 +361,32 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.6
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q=
-go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg=
-go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E=
-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 v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ=
+go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 h1:tgJ0uaNS4c98WRNUEx5U3aDlrDOI5Rs+1Vifcw4DJ8U=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0/go.mod h1:U7HYyW0zt/a9x5J1Kjs+r1f/d4ZHnYFclhYY2+YbeoE=
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/exporters/stdout/stdoutmetric v1.36.0 h1:rixTyDGXFxRy1xzhKrotaHy3/KXdPhlWARrCgK+eqUY=
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.36.0/go.mod h1:dowW6UsM9MKbJq5JTz2AMVp3/5iW5I/TStsk8S+CfHw=
-go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE=
-go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs=
-go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
-go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
-go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
-go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
-go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w=
-go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA=
-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.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
+go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
+go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
+go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
+go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
+go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
+go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
+go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
+go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4=
+go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4=
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/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.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.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=
go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
@@ -402,16 +398,16 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
-golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM=
-golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY=
+golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
+golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8=
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY=
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.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
-golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w=
-golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
+golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA=
+golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w=
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=
@@ -422,17 +418,17 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
-golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs=
-golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8=
-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/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
+golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
+golang.org/x/oauth2 v0.33.0 h1:4Q+qn+E5z8gPRJfmRy7C2gGG3T4jIprK6aSYgTXGRpo=
+golang.org/x/oauth2 v0.33.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
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.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
-golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
+golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
+golang.org/x/sync v0.18.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/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -444,20 +440,19 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA=
-golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
+golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
+golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
-golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg=
-golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0=
+golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU=
+golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254=
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.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
@@ -465,36 +460,42 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
-golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4=
-golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU=
-golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE=
-golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
+golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
+golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
+golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI=
+golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4=
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.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
-golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo=
-golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg=
+golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ=
+golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs=
+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/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/api v0.244.0 h1:lpkP8wVibSKr++NCD36XzTk/IzeKJ3klj7vbj+XU5pE=
-google.golang.org/api v0.244.0/go.mod h1:dMVhVcylamkirHdzEBAIQWUCgqY885ivNeZYd7VAVr8=
+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/api v0.256.0 h1:u6Khm8+F9sxbCTYNoBHg6/Hwv0N/i+V94MvkOSor6oI=
+google.golang.org/api v0.256.0/go.mod h1:KIgPhksXADEKJlnEoRa9qAII4rXcy40vfI8HRqcU964=
google.golang.org/genproto v0.0.0-20250603155806-513f23925822 h1:rHWScKit0gvAPuOnu87KpaYtjK5zBMLcULh7gxkCXu4=
google.golang.org/genproto v0.0.0-20250603155806-513f23925822/go.mod h1:HubltRL7rMh0LfnQPkMH4NPDFEWp0jw3vixw7jEM53s=
-google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 h1:mVXdvnmR3S3BQOqHECm9NGMjYiRtEvDYcqAqedTXY6s=
-google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:vYFwMYFbmA8vl6Z/krj/h7+U/AqpHknwJX4Uqgfyc7I=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20250728155136-f173205681a0 h1:MAKi5q709QWfnkkpNQ0M12hYJ1+e8qYVDyowc4U1XZM=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20250728155136-f173205681a0/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
-google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4=
-google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM=
-google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
-google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
+google.golang.org/genproto/googleapis/api v0.0.0-20250818200422-3122310a409c h1:AtEkQdl5b6zsybXcbz00j1LwNodDuH6hVifIaNqk7NQ=
+google.golang.org/genproto/googleapis/api v0.0.0-20250818200422-3122310a409c/go.mod h1:ea2MjsO70ssTfCjiwHgI0ZFqcw45Ksuk2ckf9G468GA=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20251103181224-f26f9409b101 h1:tRPGkdGHuewF4UisLzzHHr1spKw92qLM98nIzxbC0wY=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20251103181224-f26f9409b101/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk=
+google.golang.org/grpc v1.76.0 h1:UnVkv1+uMLYXoIz6o7chp59WfQUYA2ex/BXQ9rHZu7A=
+google.golang.org/grpc v1.76.0/go.mod h1:Ju12QI8M6iQJtbcsV+awF5a4hfJMLi4X0JLo94ULZ6c=
+google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE=
+google.golang.org/protobuf v1.36.10/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-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
@@ -515,51 +516,49 @@ 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.3 h1:SRd5t//hhkI1buzxb288fy2xvjubstenEKL9K51KBI8=
-k8s.io/api v0.33.3/go.mod h1:01Y/iLUjNBM3TAvypct7DIj0M0NIZc+PzAHCIo0CYGE=
-k8s.io/apiextensions-apiserver v0.33.3 h1:qmOcAHN6DjfD0v9kxL5udB27SRP6SG/MTopmge3MwEs=
-k8s.io/apiextensions-apiserver v0.33.3/go.mod h1:oROuctgo27mUsyp9+Obahos6CWcMISSAPzQ77CAQGz8=
-k8s.io/apimachinery v0.33.3 h1:4ZSrmNa0c/ZpZJhAgRdcsFcZOw1PQU1bALVQ0B3I5LA=
-k8s.io/apimachinery v0.33.3/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
-k8s.io/apiserver v0.33.3 h1:Wv0hGc+QFdMJB4ZSiHrCgN3zL3QRatu56+rpccKC3J4=
-k8s.io/apiserver v0.33.3/go.mod h1:05632ifFEe6TxwjdAIrwINHWE2hLwyADFk5mBsQa15E=
-k8s.io/client-go v0.33.3 h1:M5AfDnKfYmVJif92ngN532gFqakcGi6RvaOF16efrpA=
-k8s.io/client-go v0.33.3/go.mod h1:luqKBQggEf3shbxHY4uVENAxrDISLOarxpTKMiUuujg=
-k8s.io/cluster-bootstrap v0.33.3 h1:u2NTxJ5CFSBFXaDxLQoOWMly8eni31psVso+caq6uwI=
-k8s.io/cluster-bootstrap v0.33.3/go.mod h1:p970f8u8jf273zyQ5raD8WUu2XyAl0SAWOY82o7i/ds=
-k8s.io/component-base v0.33.3 h1:mlAuyJqyPlKZM7FyaoM/LcunZaaY353RXiOd2+B5tGA=
-k8s.io/component-base v0.33.3/go.mod h1:ktBVsBzkI3imDuxYXmVxZ2zxJnYTZ4HAsVj9iF09qp4=
+k8s.io/api v0.34.2 h1:fsSUNZhV+bnL6Aqrp6O7lMTy6o5x2C4XLjnh//8SLYY=
+k8s.io/api v0.34.2/go.mod h1:MMBPaWlED2a8w4RSeanD76f7opUoypY8TFYkSM+3XHw=
+k8s.io/apiextensions-apiserver v0.34.2 h1:WStKftnGeoKP4AZRz/BaAAEJvYp4mlZGN0UCv+uvsqo=
+k8s.io/apiextensions-apiserver v0.34.2/go.mod h1:398CJrsgXF1wytdaanynDpJ67zG4Xq7yj91GrmYN2SE=
+k8s.io/apimachinery v0.34.2 h1:zQ12Uk3eMHPxrsbUJgNF8bTauTVR2WgqJsTmwTE/NW4=
+k8s.io/apimachinery v0.34.2/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
+k8s.io/apiserver v0.34.2 h1:2/yu8suwkmES7IzwlehAovo8dDE07cFRC7KMDb1+MAE=
+k8s.io/apiserver v0.34.2/go.mod h1:gqJQy2yDOB50R3JUReHSFr+cwJnL8G1dzTA0YLEqAPI=
+k8s.io/client-go v0.34.2 h1:Co6XiknN+uUZqiddlfAjT68184/37PS4QAzYvQvDR8M=
+k8s.io/client-go v0.34.2/go.mod h1:2VYDl1XXJsdcAxw7BenFslRQX28Dxz91U9MWKjX97fE=
+k8s.io/cluster-bootstrap v0.34.2 h1:oKckPeunVCns37BntcsxaOesDul32yzGd3DFLjW2fc8=
+k8s.io/cluster-bootstrap v0.34.2/go.mod h1:f21byPR7X5nt12ivZi+J3pb4sG4SH6VySX8KAAJA8BY=
+k8s.io/component-base v0.34.2 h1:HQRqK9x2sSAsd8+R4xxRirlTjowsg6fWCPwWYeSvogQ=
+k8s.io/component-base v0.34.2/go.mod h1:9xw2FHJavUHBFpiGkZoKuYZ5pdtLKe97DEByaA+hHbM=
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-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4=
-k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8=
+k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA=
+k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts=
k8s.io/release v0.16.9 h1:CDqFlNmckqtXEn+YPVbDoUbnmqf1Y2R9BkHBC2vgMGo=
k8s.io/release v0.16.9/go.mod h1:iRTTQYssZDVke2X7bqhdbi3cPjdmRqZXpIJsp2IRDyM=
-k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro=
-k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
+k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y=
+k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/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/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/controller-tools v0.18.0 h1:rGxGZCZTV2wJreeRgqVoWab/mfcumTMmSwKzoM9xrsE=
-sigs.k8s.io/controller-tools v0.18.0/go.mod h1:gLKoiGBriyNh+x1rWtUQnakUYEujErjXs9pf+x/8n1U=
-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/controller-runtime v0.22.4 h1:GEjV7KV3TY8e+tJ2LCTxUTanW4z/FmNB7l327UfMq9A=
+sigs.k8s.io/controller-runtime v0.22.4/go.mod h1:+QX1XUpTXN4mLoblf4tqr5CQcyHPAki2HLXqQMY6vh8=
+sigs.k8s.io/controller-tools v0.19.0 h1:OU7jrPPiZusryu6YK0jYSjPqg8Vhf8cAzluP9XGI5uk=
+sigs.k8s.io/controller-tools v0.19.0/go.mod h1:y5HY/iNDFkmFla2CfQoVb2AQXMsBk4ad84iR1PLANB0=
+sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=
+sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
sigs.k8s.io/kubebuilder/docs/book/utils v0.0.0-20211028165026-57688c578b5d h1:KLiQzLW3RZJR19+j4pw2h5iioyAyqCkDBEAFdnGa3N8=
sigs.k8s.io/kubebuilder/docs/book/utils v0.0.0-20211028165026-57688c578b5d/go.mod h1:NRdZafr4zSCseLQggdvIMXa7umxf+Q+PJzrj3wFwiGE=
sigs.k8s.io/kustomize/api v0.17.3 h1:6GCuHSsxq7fN5yhF2XrC+AAr8gxQwhexgHflOAD/JJU=
sigs.k8s.io/kustomize/api v0.17.3/go.mod h1:TuDH4mdx7jTfK61SQ/j1QZM/QWR+5rmEiNjvYlhzFhc=
sigs.k8s.io/kustomize/kyaml v0.17.2 h1:+AzvoJUY0kq4QAhH/ydPHHMRLijtUKiyVyh7fOSshr0=
sigs.k8s.io/kustomize/kyaml v0.17.2/go.mod h1:9V0mCjIEYjlXuCdYsSXvyoy2BTsLESH7TlGV81S282U=
-sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
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/release-sdk v0.11.0 h1:a+zjOO3tHm1NiVZgNcUWq5QrKmv7b63UZXw+XGdPGfk=
sigs.k8s.io/release-sdk v0.11.0/go.mod h1:sjbFpskyVjCXcFBnI3Bj1iGQHGjDYPoHVyld/pT+TvU=
sigs.k8s.io/release-utils v0.8.1 h1:qSA9p3vZzO6RAq7zvzupCZjR29+n3NK9DSJPe9bSf7w=
sigs.k8s.io/release-utils v0.8.1/go.mod h1:vrQ3eR1VmudgX4OUwr4pUZEkYLRms9bdbv06mr3kchQ=
-sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc=
-sigs.k8s.io/structured-merge-diff/v4 v4.6.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.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco=
+sigs.k8s.io/structured-merge-diff/v6 v6.3.0/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/tools/internal/tilt-prepare/main.go b/hack/tools/internal/tilt-prepare/main.go
index a6c257babb95..cc7c2b8e8088 100644
--- a/hack/tools/internal/tilt-prepare/main.go
+++ b/hack/tools/internal/tilt-prepare/main.go
@@ -71,7 +71,7 @@ const (
var (
// Defines the default version to be used for the provider CR if no version is specified in the tilt-provider.yaml|json file.
- defaultProviderVersion = "v1.11.99"
+ defaultProviderVersion = "v1.12.99"
// This data struct mirrors a subset of info from the providers struct in the tilt file
// which is containing "hard-coded" tilt-provider.yaml files for the providers managed in the Cluster API repository.
@@ -947,10 +947,6 @@ func getProviderObj(version *string) func(prefix string, objs []unstructured.Uns
}
provider := &clusterctlv1.Provider{
- TypeMeta: metav1.TypeMeta{
- Kind: "Provider",
- APIVersion: clusterctlv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Name: manifestLabel,
Namespace: namespace,
diff --git a/hack/tools/metadata-version-validator/README.md b/hack/tools/metadata-version-validator/README.md
new file mode 100644
index 000000000000..bbcbfec856df
--- /dev/null
+++ b/hack/tools/metadata-version-validator/README.md
@@ -0,0 +1,24 @@
+# Metadata Version Validator
+
+## Purpose
+
+A small utility that given a version number it will check that a release series is defined in the passed in metadata.yaml file.
+
+This is primarily for use in release pipelines.
+
+## Usage
+
+First create the binary by:
+
+```bash
+cd hack/tools
+go build -tags=tools -o bin/metadata-version-validator sigs.k8s.io/cluster-api/hack/tools/metadata-version-validator
+```
+
+Then run the binary to check a version:
+
+```bash
+bin/metadata-version-validator --file metadata.yaml --version v2.8.0
+```
+
+If there is no release series defined there will be an error message and also a non-zero exit code.
diff --git a/hack/tools/metadata-version-validator/main.go b/hack/tools/metadata-version-validator/main.go
new file mode 100644
index 000000000000..c979b18daf19
--- /dev/null
+++ b/hack/tools/metadata-version-validator/main.go
@@ -0,0 +1,84 @@
+/*
+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.
+*/
+
+// main is the main package for metadata-version-validator.
+package main
+
+import (
+ "flag"
+ "fmt"
+ "os"
+ "strings"
+
+ "github.com/blang/semver/v4"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/klog/v2"
+
+ clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3"
+)
+
+func main() {
+ file := flag.String("file", "metadata.yaml", "Path to metadata.yaml file to check")
+ version := flag.String("version", "", "The version number to check against the metadata file")
+
+ flag.Parse()
+
+ if *file == "" {
+ klog.Exit("--file must be specified")
+ }
+ if *version == "" {
+ klog.Exit("--version must be specified")
+ }
+
+ if err := runCheckMetadata(*file, *version); err != nil {
+ klog.Exitf("failed checking metadata: %v", err)
+ }
+}
+
+func runCheckMetadata(file, version string) error {
+ versionToCheck := strings.TrimPrefix(version, "v")
+
+ ver, err := semver.Parse(versionToCheck)
+ if err != nil {
+ return fmt.Errorf("failed parsing %s as semver version: %w", version, err)
+ }
+
+ fileData, err := os.ReadFile(file) //nolint:gosec
+ if err != nil {
+ return fmt.Errorf("failed reading file %s: %w", file, err)
+ }
+
+ scheme := runtime.NewScheme()
+ if err := clusterctlv1.AddToScheme(scheme); err != nil {
+ return fmt.Errorf("failed to add metadata type to scheme: %w", err)
+ }
+ metadata := &clusterctlv1.Metadata{}
+ codecFactory := serializer.NewCodecFactory(scheme)
+
+ if err := runtime.DecodeInto(codecFactory.UniversalDecoder(), fileData, metadata); err != nil {
+ return fmt.Errorf("failed decoding metadata from file: %w", err)
+ }
+
+ for _, series := range metadata.ReleaseSeries {
+ if series.Major == int32(ver.Major) && series.Minor == int32(ver.Minor) {
+ klog.Info("Success, there is a release series defined in the metadata file")
+ return nil
+ }
+ }
+
+ return fmt.Errorf("failed to find release series for version %s in metadata file %s", version, file)
+}
diff --git a/hack/tools/release/notes/github.go b/hack/tools/release/notes/github.go
index 874b5e80b711..6221b9f51cf8 100644
--- a/hack/tools/release/notes/github.go
+++ b/hack/tools/release/notes/github.go
@@ -35,6 +35,18 @@ type githubClient struct {
repo string
}
+// to allow for mocking in tests.
+type githubClientInterface interface {
+ getDiffAllCommits(base, head string) (*githubDiff, error)
+ getRef(ref string) (githubRef, error)
+ getTag(tagSHA string) (githubTag, error)
+ getCommit(sha string) (githubCommit, error)
+ listMergedPRs(after, before time.Time, baseBranches ...string) ([]githubPR, error)
+}
+
+// Ensure githubClient implements githubClientInterface.
+var _ githubClientInterface = (*githubClient)(nil)
+
// githubDiff is the API response for the "compare" endpoint.
type githubDiff struct {
// MergeBaseCommit points to most recent common ancestor between two references.
diff --git a/hack/tools/release/notes/github_test.go b/hack/tools/release/notes/github_test.go
new file mode 100644
index 000000000000..541560da562d
--- /dev/null
+++ b/hack/tools/release/notes/github_test.go
@@ -0,0 +1,158 @@
+//go:build tools
+// +build tools
+
+/*
+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 main
+
+import (
+ "fmt"
+ "time"
+)
+
+// mockGithubClient is a mock implementation of githubClientInterface for testing.
+type mockGithubClient struct {
+ // Mock responses
+ diffResponse *githubDiff
+ refResponse githubRef
+ tagResponse githubTag
+ commitResponse githubCommit
+ prsResponse []githubPR
+
+ // Mock errors
+ diffError error
+ refError error
+ tagError error
+ commitError error
+ prsError error
+}
+
+// Ensure mockGithubClient implements githubClientInterface.
+var _ githubClientInterface = (*mockGithubClient)(nil)
+
+func (m *mockGithubClient) getDiffAllCommits(_, _ string) (*githubDiff, error) {
+ if m.diffError != nil {
+ return nil, m.diffError
+ }
+ return m.diffResponse, nil
+}
+
+func (m *mockGithubClient) getRef(_ string) (githubRef, error) {
+ if m.refError != nil {
+ return githubRef{}, m.refError
+ }
+ return m.refResponse, nil
+}
+
+func (m *mockGithubClient) getTag(_ string) (githubTag, error) {
+ if m.tagError != nil {
+ return githubTag{}, m.tagError
+ }
+ return m.tagResponse, nil
+}
+
+func (m *mockGithubClient) getCommit(_ string) (githubCommit, error) {
+ if m.commitError != nil {
+ return githubCommit{}, m.commitError
+ }
+ return m.commitResponse, nil
+}
+
+func (m *mockGithubClient) listMergedPRs(_, _ time.Time, _ ...string) ([]githubPR, error) {
+ if m.prsError != nil {
+ return nil, m.prsError
+ }
+ return m.prsResponse, nil
+}
+
+// newMockGithubClient creates a new mock client with default responses.
+func newMockGithubClient() *mockGithubClient {
+ return &mockGithubClient{
+ diffResponse: &githubDiff{
+ MergeBaseCommit: githubCommitNode{
+ Commit: githubCommit{
+ Message: "Merge commit",
+ Committer: githubCommitter{
+ Date: time.Date(2023, 1, 1, 0, 0, 0, 0, time.UTC),
+ },
+ },
+ },
+ Commits: []githubCommitNode{
+ {
+ Commit: githubCommit{
+ Message: "Merge pull request #1234 from test/branch",
+ },
+ },
+ },
+ },
+ refResponse: githubRef{
+ Object: githubObject{
+ ObjectType: commitType,
+ SHA: "abc123",
+ },
+ },
+ tagResponse: githubTag{
+ Object: githubObject{
+ ObjectType: tagType,
+ SHA: "def456",
+ },
+ },
+ commitResponse: githubCommit{
+ Message: "Test commit",
+ Committer: githubCommitter{
+ Date: time.Date(2023, 1, 2, 0, 0, 0, 0, time.UTC),
+ },
+ },
+ prsResponse: []githubPR{
+ {
+ Number: 1234,
+ Title: "Test PR",
+ Labels: []githubLabel{
+ {Name: "area/testing"},
+ },
+ User: githubUser{
+ Login: "testuser",
+ },
+ },
+ },
+ }
+}
+
+// newMockGithubClientWithError creates a mock client that returns an error for specific operations.
+func newMockGithubClientWithError(operation string, err error) *mockGithubClient {
+ mock := newMockGithubClient()
+ switch operation {
+ case "diff":
+ mock.diffError = err
+ case "ref":
+ mock.refError = err
+ case "tag":
+ mock.tagError = err
+ case "commit":
+ mock.commitError = err
+ case "prs":
+ mock.prsError = err
+ }
+ return mock
+}
+
+// newMockGithubClientForInvalidRef creates a mock client that simulates invalid ref scenarios.
+func newMockGithubClientForInvalidRef() *mockGithubClient {
+ mock := newMockGithubClient()
+ mock.diffError = fmt.Errorf("invalid ref")
+ return mock
+}
diff --git a/hack/tools/release/notes/list.go b/hack/tools/release/notes/list.go
index 4cb5bcf1cbf2..03a2932f36b0 100644
--- a/hack/tools/release/notes/list.go
+++ b/hack/tools/release/notes/list.go
@@ -30,7 +30,7 @@ import (
// githubFromToPRLister lists PRs from GitHub contained between two refs.
type githubFromToPRLister struct {
- client *githubClient
+ client githubClientInterface
fromRef, toRef ref
// branch is optional. It helps optimize the PR query by restricting
// the results to PRs merged in the selected branch and in main
diff --git a/hack/tools/release/notes/list_test.go b/hack/tools/release/notes/list_test.go
index 688abc9a1c0e..e5410e516ae6 100644
--- a/hack/tools/release/notes/list_test.go
+++ b/hack/tools/release/notes/list_test.go
@@ -20,11 +20,22 @@ limitations under the License.
package main
import (
+ "fmt"
"testing"
. "github.com/onsi/gomega"
)
+// newGithubFromToPRListerWithClient is a helper function for testing purposes.
+// It creates a new githubFromToPRLister with the given client, fromRef, toRef and branch.
+func newGithubFromToPRListerWithClient(client githubClientInterface, fromRef, toRef ref, branch string) *githubFromToPRLister {
+ return &githubFromToPRLister{
+ client: client,
+ fromRef: fromRef,
+ toRef: toRef,
+ branch: branch,
+ }
+}
func Test_buildSetOfPRNumbers(t *testing.T) {
tests := []struct {
name string
@@ -65,3 +76,121 @@ func Test_buildSetOfPRNumbers(t *testing.T) {
})
}
}
+
+func Test_githubFromToPRLister_listPRs(t *testing.T) {
+ tests := []struct {
+ name string
+ lister *githubFromToPRLister
+ args ref
+ want []pr
+ wantErr bool
+ }{
+ {
+ name: "Successful PR Listing",
+ lister: newGithubFromToPRListerWithClient(
+ newMockGithubClient(),
+ ref{reType: "tags", value: "v0.26.0"},
+ ref{reType: "tags", value: "v0.27.0"},
+ "main",
+ ),
+ args: ref{
+ reType: "tags",
+ value: "v0.26.0",
+ },
+ want: []pr{
+ {
+ number: 1234,
+ title: "Test PR",
+ labels: []string{"area/testing"},
+ user: "testuser",
+ },
+ },
+ wantErr: false,
+ },
+ {
+ name: "Setting previousReleaseRef.value blank - should use toRef and fromRef from fields",
+ lister: newGithubFromToPRListerWithClient(
+ newMockGithubClient(),
+ ref{reType: "tags", value: "v0.26.0"},
+ ref{reType: "tags", value: "v0.27.0"},
+ "main",
+ ),
+ args: ref{
+ reType: "tags",
+ value: "",
+ },
+ want: []pr{
+ {
+ number: 1234,
+ title: "Test PR",
+ labels: []string{"area/testing"},
+ user: "testuser",
+ },
+ },
+ wantErr: false,
+ },
+ {
+ name: "Create PR List when fromRef is not set",
+ lister: newGithubFromToPRListerWithClient(
+ newMockGithubClient(),
+ ref{reType: "tags", value: ""},
+ ref{reType: "tags", value: "v0.27.0"},
+ "main",
+ ),
+ args: ref{
+ reType: "tags",
+ value: "v0.26.0",
+ },
+ want: []pr{
+ {
+ number: 1234,
+ title: "Test PR",
+ labels: []string{"area/testing"},
+ user: "testuser",
+ },
+ },
+ wantErr: false,
+ },
+ {
+ name: "Fail when previousReleaseRef.value is set to invalid",
+ lister: newGithubFromToPRListerWithClient(
+ newMockGithubClientForInvalidRef(),
+ ref{reType: "tags", value: "v0.26.0"},
+ ref{reType: "tags", value: "v0.27.0"},
+ "main",
+ ),
+ args: ref{
+ reType: "tags",
+ value: "invalid",
+ },
+ want: nil,
+ wantErr: true,
+ },
+ {
+ name: "Fail when toRef and previousReleaseRef set blank",
+ lister: newGithubFromToPRListerWithClient(
+ newMockGithubClientWithError("diff", fmt.Errorf("invalid ref")),
+ ref{reType: "tags", value: "v0.26.0"},
+ ref{reType: "tags", value: ""},
+ "main",
+ ),
+ args: ref{
+ reType: "tags",
+ value: "",
+ },
+ want: nil,
+ wantErr: true,
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+ got, err := tt.lister.listPRs(tt.args)
+ if (err != nil) != tt.wantErr {
+ t.Errorf("githubFromToPRLister.listPRs() error = %v, wantErr %v", err, tt.wantErr)
+ return
+ }
+ g.Expect(got).To(Equal(tt.want))
+ })
+ }
+}
diff --git a/hack/tools/release/notes/main.go b/hack/tools/release/notes/main.go
index 4d81d60a3343..f8e8257848c4 100644
--- a/hack/tools/release/notes/main.go
+++ b/hack/tools/release/notes/main.go
@@ -77,7 +77,8 @@ func readCmdConfig() *notesCmdConfig {
flag.StringVar(&config.toRef, "to", "", "The ref (tag, branch or commit to stop at. It must be formatted as heads/ for branches and tags/ for tags. If not set, it will default to branch.")
flag.StringVar(&config.branch, "branch", "", "The branch to generate the notes from. If not set, it will be calculated from release.")
flag.StringVar(&config.newTag, "release", "", "The tag for the new release.")
- flag.StringVar(&config.previousReleaseVersion, "previous-release-version", "", "The tag for the previous beta release.")
+ flag.StringVar(&config.previousReleaseVersion, "previous-release-version", "", "The tag for the previous pre-release. This is used to generate an additional section with the changes since the previous pre-release"+
+ "Accordingly this flag should not be set for the first pre-release.")
flag.BoolVar(&config.prefixAreaLabel, "prefix-area-label", true, "If enabled, will prefix the area label.")
flag.BoolVar(&config.deprecation, "deprecation", true, "If enabled, will add a templated deprecation warning header.")
diff --git a/hack/tools/release/notes/main_test.go b/hack/tools/release/notes/main_test.go
index fda8b933bd0e..7670931c6475 100644
--- a/hack/tools/release/notes/main_test.go
+++ b/hack/tools/release/notes/main_test.go
@@ -72,38 +72,38 @@ func Test_trimAreaFromTitle(t *testing.T) {
tests := []struct {
name string
title string
- area string
want string
}{
{
name: "PR title with area",
- title: "e2e: improve logging for a detected rollout",
- area: "e2e",
+ title: "test: improve logging for a detected rollout",
want: "improve logging for a detected rollout",
},
{
name: "PR title without area",
title: "improve logging for a detected rollout",
- area: "e2e",
want: "improve logging for a detected rollout",
},
{
name: "PR title without area being prefixed",
title: "test/e2e: improve logging for a detected rollout",
- area: "e2e",
- want: "test/e2e: improve logging for a detected rollout",
+ want: "improve logging for a detected rollout",
},
{
name: "PR title without space between area and title",
title: "e2e:improve logging for a detected rollout",
- area: "e2e",
+ want: "improve logging for a detected rollout",
+ },
+ {
+ name: "PR title with space between area and title",
+ title: "e2e/test: improve logging for a detected rollout",
want: "improve logging for a detected rollout",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
- if got := trimAreaFromTitle(tt.title, tt.area); got != tt.want {
+ if got := trimAreaFromTitle(tt.title); got != tt.want {
t.Errorf("trimAreaFromTitle() = %v, want %v", got, tt.want)
}
})
diff --git a/hack/tools/release/notes/process.go b/hack/tools/release/notes/process.go
index 9bcd256bb4d5..421fa0b8c169 100644
--- a/hack/tools/release/notes/process.go
+++ b/hack/tools/release/notes/process.go
@@ -31,10 +31,9 @@ import (
)
const (
- missingAreaLabelPrefix = "MISSING_AREA"
- areaLabelPrefix = "area/"
- multipleAreaLabelsPrefix = "MULTIPLE_AREAS["
- documentationArea = "Documentation"
+ missingAreaLabelPrefix = "MISSING_AREA"
+ areaLabelPrefix = "area/"
+ documentationArea = "Documentation"
)
var (
@@ -48,6 +47,7 @@ var (
"api": "API",
"machinepool": "MachinePool",
"clustercachetracker": "ClusterCacheTracker",
+ "clustercache": "ClusterCache",
"clusterclass": "ClusterClass",
"testing": "Testing",
"release": "Release",
@@ -191,7 +191,7 @@ func (g prEntriesProcessor) generateNoteEntry(p *pr) *notesEntry {
}
if g.addAreaPrefix {
- entry.title = trimAreaFromTitle(entry.title, area)
+ entry.title = trimAreaFromTitle(entry.title)
entry.title = capitalize(entry.title)
entry.title = fmt.Sprintf("- %s: %s", area, entry.title)
} else {
@@ -226,7 +226,7 @@ func (g prEntriesProcessor) extractArea(pr *pr) string {
case 1:
return areaLabels[0]
default:
- return multipleAreaLabelsPrefix + strings.Join(areaLabels, "/") + "]"
+ return strings.Join(areaLabels, "/")
}
}
@@ -280,11 +280,10 @@ func removePrefixes(title string, prefixes []string) string {
}
// trimAreaFromTitle removes the prefixed area from title to avoid duplication.
-func trimAreaFromTitle(title, area string) string {
- titleWithoutArea := title
- pattern := `(?i)^` + regexp.QuoteMeta(area+":")
- re := regexp.MustCompile(pattern)
- titleWithoutArea = re.ReplaceAllString(titleWithoutArea, "")
+func trimAreaFromTitle(title string) string {
+ re := regexp.MustCompile(`^[^:]*:\s*`)
+ titleWithoutArea := re.ReplaceAllString(title, "")
titleWithoutArea = strings.TrimSpace(titleWithoutArea)
+
return titleWithoutArea
}
diff --git a/hack/tools/runtime-openapi-gen/vendored_openapi.go b/hack/tools/runtime-openapi-gen/vendored_openapi.go
index 0205e91be071..7f00b011a2ef 100644
--- a/hack/tools/runtime-openapi-gen/vendored_openapi.go
+++ b/hack/tools/runtime-openapi-gen/vendored_openapi.go
@@ -30,10 +30,14 @@ import (
// Prior art: https://github.com/kubernetes-sigs/controller-tools/blob/master/pkg/crd/known_types.go.
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition {
return map[string]common.OpenAPIDefinition{
+ "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.ObjectReference": schema_k8sio_api_core_v1_ObjectReference(ref),
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON": schema_pkg_apis_apiextensions_v1_JSON(ref),
"k8s.io/apimachinery/pkg/apis/meta/v1.Duration": schema_pkg_apis_meta_v1_Duration(ref),
"k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1": schema_pkg_apis_meta_v1_FieldsV1(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.ManagedFieldsEntry": schema_pkg_apis_meta_v1_ManagedFieldsEntry(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),
@@ -553,3 +557,230 @@ func schema_pkg_apis_meta_v1_Condition(ref common.ReferenceCallback) common.Open
"k8s.io/apimachinery/pkg/apis/meta/v1.Time"},
}
}
+
+func schema_k8sio_api_core_v1_NodeSwapStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "NodeSwapStatus represents swap memory information.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "capacity": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Total amount of swap memory in bytes.",
+ Type: []string{"integer"},
+ Format: "int64",
+ },
+ },
+ },
+ },
+ },
+ }
+}
+
+func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "NodeSystemInfo is a set of ids/uuids to uniquely identify the node.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "machineID": {
+ SchemaProps: spec.SchemaProps{
+ Description: "MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "systemUUID": {
+ SchemaProps: spec.SchemaProps{
+ Description: "SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "bootID": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Boot ID reported by the node.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "kernelVersion": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "osImage": {
+ SchemaProps: spec.SchemaProps{
+ Description: "OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "containerRuntimeVersion": {
+ SchemaProps: spec.SchemaProps{
+ Description: "ContainerRuntime Version reported by the node through runtime remote API (e.g. containerd://1.4.2).",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "kubeletVersion": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Kubelet Version reported by the node.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "kubeProxyVersion": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Deprecated: KubeProxy Version reported by the node.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "operatingSystem": {
+ SchemaProps: spec.SchemaProps{
+ Description: "The Operating System reported by the node",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "architecture": {
+ SchemaProps: spec.SchemaProps{
+ Description: "The Architecture reported by the node",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "swap": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Swap Info reported by the node.",
+ Ref: ref("k8s.io/api/core/v1.NodeSwapStatus"),
+ },
+ },
+ },
+ Required: []string{"machineID", "systemUUID", "bootID", "kernelVersion", "osImage", "containerRuntimeVersion", "kubeletVersion", "kubeProxyVersion", "operatingSystem", "architecture"},
+ },
+ },
+ Dependencies: []string{
+ "k8s.io/api/core/v1.NodeSwapStatus"},
+ }
+}
+
+func schema_pkg_apis_meta_v1_LabelSelector(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "matchLabels": {
+ SchemaProps: spec.SchemaProps{
+ 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: []string{"object"},
+ AdditionalProperties: &spec.SchemaOrBool{
+ Allows: true,
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ },
+ },
+ "matchExpressions": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
+ 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.LabelSelectorRequirement"),
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-map-type": "atomic",
+ },
+ },
+ },
+ Dependencies: []string{
+ "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"},
+ }
+}
+
+func schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "key": {
+ SchemaProps: spec.SchemaProps{
+ Description: "key is the label key that the selector applies to.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "operator": {
+ SchemaProps: spec.SchemaProps{
+ Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "values": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ 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.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ },
+ },
+ },
+ Required: []string{"key", "operator"},
+ },
+ },
+ }
+}
diff --git a/hack/tools/vendor/cloud.google.com/go/auth/CHANGES.md b/hack/tools/vendor/cloud.google.com/go/auth/CHANGES.md
index cbee128167c8..4deca4435345 100644
--- a/hack/tools/vendor/cloud.google.com/go/auth/CHANGES.md
+++ b/hack/tools/vendor/cloud.google.com/go/auth/CHANGES.md
@@ -1,5 +1,27 @@
+## [0.17.0](https://github.com/googleapis/google-cloud-go/releases/tag/auth%2Fv0.17.0) (2025-10-02)
+
+### Features
+
+* Add trust boundary support for service accounts and impersonation (HTTP/gRPC) (#11870) ([5c2b665](https://github.com/googleapis/google-cloud-go/commit/5c2b665f392e6dd90192f107188720aa1357e7da))
+* add trust boundary support for external accounts (#12864) ([a67a146](https://github.com/googleapis/google-cloud-go/commit/a67a146a6a88a6f1ba10c409dfce8015ecd60a64))
+
# Changelog
+## [0.16.5](https://github.com/googleapis/google-cloud-go/compare/auth/v0.16.4...auth/v0.16.5) (2025-08-14)
+
+
+### Bug Fixes
+
+* **auth:** Improve error message for unknown credentials type ([#12673](https://github.com/googleapis/google-cloud-go/issues/12673)) ([558b164](https://github.com/googleapis/google-cloud-go/commit/558b16429f621276694405fa5f2091199f2d4c4d))
+* **auth:** Set Content-Type in userTokenProvider.exchangeToken ([#12634](https://github.com/googleapis/google-cloud-go/issues/12634)) ([1197ebc](https://github.com/googleapis/google-cloud-go/commit/1197ebcbca491f8c610da732c7361c90bc6f46d0))
+
+## [0.16.4](https://github.com/googleapis/google-cloud-go/compare/auth/v0.16.3...auth/v0.16.4) (2025-08-06)
+
+
+### Bug Fixes
+
+* **auth:** Add UseDefaultClient: true to metadata.Options ([#12666](https://github.com/googleapis/google-cloud-go/issues/12666)) ([1482191](https://github.com/googleapis/google-cloud-go/commit/1482191e88236693efef68769752638281566766)), refs [#11078](https://github.com/googleapis/google-cloud-go/issues/11078) [#12657](https://github.com/googleapis/google-cloud-go/issues/12657)
+
## [0.16.3](https://github.com/googleapis/google-cloud-go/compare/auth/v0.16.2...auth/v0.16.3) (2025-07-17)
diff --git a/hack/tools/vendor/cloud.google.com/go/auth/auth.go b/hack/tools/vendor/cloud.google.com/go/auth/auth.go
index fb24c43eb57f..c6d801583313 100644
--- a/hack/tools/vendor/cloud.google.com/go/auth/auth.go
+++ b/hack/tools/vendor/cloud.google.com/go/auth/auth.go
@@ -483,6 +483,8 @@ type Options2LO struct {
Audience string
// PrivateClaims allows specifying any custom claims for the JWT. Optional.
PrivateClaims map[string]interface{}
+ // UniverseDomain is the default service domain for a given Cloud universe.
+ UniverseDomain string
// Client is the client to be used to make the underlying token requests.
// Optional.
diff --git a/hack/tools/vendor/cloud.google.com/go/auth/credentials/compute.go b/hack/tools/vendor/cloud.google.com/go/auth/credentials/compute.go
index e4a8078f8b41..a2d5c310a41e 100644
--- a/hack/tools/vendor/cloud.google.com/go/auth/credentials/compute.go
+++ b/hack/tools/vendor/cloud.google.com/go/auth/credentials/compute.go
@@ -92,11 +92,11 @@ func (cs *computeProvider) Token(ctx context.Context) (*auth.Token, error) {
if res.ExpiresInSec == 0 || res.AccessToken == "" {
return nil, errors.New("credentials: incomplete token received from metadata")
}
- return &auth.Token{
+ token := &auth.Token{
Value: res.AccessToken,
Type: res.TokenType,
Expiry: time.Now().Add(time.Duration(res.ExpiresInSec) * time.Second),
Metadata: computeTokenMetadata,
- }, nil
-
+ }
+ return token, nil
}
diff --git a/hack/tools/vendor/cloud.google.com/go/auth/credentials/detect.go b/hack/tools/vendor/cloud.google.com/go/auth/credentials/detect.go
index d8f7d9614662..6700e33e1486 100644
--- a/hack/tools/vendor/cloud.google.com/go/auth/credentials/detect.go
+++ b/hack/tools/vendor/cloud.google.com/go/auth/credentials/detect.go
@@ -27,6 +27,7 @@ import (
"cloud.google.com/go/auth"
"cloud.google.com/go/auth/internal"
"cloud.google.com/go/auth/internal/credsfile"
+ "cloud.google.com/go/auth/internal/trustboundary"
"cloud.google.com/go/compute/metadata"
"github.com/googleapis/gax-go/v2/internallog"
)
@@ -95,6 +96,10 @@ func DetectDefault(opts *DetectOptions) (*auth.Credentials, error) {
if err := opts.validate(); err != nil {
return nil, err
}
+ trustBoundaryEnabled, err := trustboundary.IsEnabled()
+ if err != nil {
+ return nil, err
+ }
if len(opts.CredentialsJSON) > 0 {
return readCredentialsFileJSON(opts.CredentialsJSON, opts)
}
@@ -116,16 +121,29 @@ func DetectDefault(opts *DetectOptions) (*auth.Credentials, error) {
if OnGCE() {
metadataClient := metadata.NewWithOptions(&metadata.Options{
- Logger: opts.logger(),
+ Logger: opts.logger(),
+ UseDefaultClient: true,
})
+ gceUniverseDomainProvider := &internal.ComputeUniverseDomainProvider{
+ MetadataClient: metadataClient,
+ }
+
+ tp := computeTokenProvider(opts, metadataClient)
+ if trustBoundaryEnabled {
+ gceConfigProvider := trustboundary.NewGCEConfigProvider(gceUniverseDomainProvider)
+ var err error
+ tp, err = trustboundary.NewProvider(opts.client(), gceConfigProvider, opts.logger(), tp)
+ if err != nil {
+ return nil, fmt.Errorf("credentials: failed to initialize GCE trust boundary provider: %w", err)
+ }
+
+ }
return auth.NewCredentials(&auth.CredentialsOptions{
- TokenProvider: computeTokenProvider(opts, metadataClient),
+ TokenProvider: tp,
ProjectIDProvider: auth.CredentialsPropertyFunc(func(ctx context.Context) (string, error) {
return metadataClient.ProjectIDWithContext(ctx)
}),
- UniverseDomainProvider: &internal.ComputeUniverseDomainProvider{
- MetadataClient: metadataClient,
- },
+ UniverseDomainProvider: gceUniverseDomainProvider,
}), nil
}
diff --git a/hack/tools/vendor/cloud.google.com/go/auth/credentials/filetypes.go b/hack/tools/vendor/cloud.google.com/go/auth/credentials/filetypes.go
index e5243e6cfbea..d2a042470231 100644
--- a/hack/tools/vendor/cloud.google.com/go/auth/credentials/filetypes.go
+++ b/hack/tools/vendor/cloud.google.com/go/auth/credentials/filetypes.go
@@ -25,6 +25,7 @@ import (
"cloud.google.com/go/auth/credentials/internal/impersonate"
internalauth "cloud.google.com/go/auth/internal"
"cloud.google.com/go/auth/internal/credsfile"
+ "cloud.google.com/go/auth/internal/trustboundary"
)
func fileCredentials(b []byte, opts *DetectOptions) (*auth.Credentials, error) {
@@ -36,6 +37,8 @@ func fileCredentials(b []byte, opts *DetectOptions) (*auth.Credentials, error) {
var projectID, universeDomain string
var tp auth.TokenProvider
switch fileType {
+ case credsfile.UnknownCredType:
+ return nil, errors.New("credentials: unsupported unidentified file type")
case credsfile.ServiceAccountKey:
f, err := credsfile.ParseServiceAccount(b)
if err != nil {
@@ -134,19 +137,34 @@ func handleServiceAccount(f *credsfile.ServiceAccountFile, opts *DetectOptions)
return configureSelfSignedJWT(f, opts)
}
opts2LO := &auth.Options2LO{
- Email: f.ClientEmail,
- PrivateKey: []byte(f.PrivateKey),
- PrivateKeyID: f.PrivateKeyID,
- Scopes: opts.scopes(),
- TokenURL: f.TokenURL,
- Subject: opts.Subject,
- Client: opts.client(),
- Logger: opts.logger(),
+ Email: f.ClientEmail,
+ PrivateKey: []byte(f.PrivateKey),
+ PrivateKeyID: f.PrivateKeyID,
+ Scopes: opts.scopes(),
+ TokenURL: f.TokenURL,
+ Subject: opts.Subject,
+ Client: opts.client(),
+ Logger: opts.logger(),
+ UniverseDomain: ud,
}
if opts2LO.TokenURL == "" {
opts2LO.TokenURL = jwtTokenURL
}
- return auth.New2LOTokenProvider(opts2LO)
+
+ tp, err := auth.New2LOTokenProvider(opts2LO)
+ if err != nil {
+ return nil, err
+ }
+
+ trustBoundaryEnabled, err := trustboundary.IsEnabled()
+ if err != nil {
+ return nil, err
+ }
+ if !trustBoundaryEnabled {
+ return tp, nil
+ }
+ saConfig := trustboundary.NewServiceAccountConfigProvider(opts2LO.Email, opts2LO.UniverseDomain)
+ return trustboundary.NewProvider(opts.client(), saConfig, opts.logger(), tp)
}
func handleUserCredential(f *credsfile.UserCredentialsFile, opts *DetectOptions) (auth.TokenProvider, error) {
@@ -185,7 +203,39 @@ func handleExternalAccount(f *credsfile.ExternalAccountFile, opts *DetectOptions
if f.ServiceAccountImpersonation != nil {
externalOpts.ServiceAccountImpersonationLifetimeSeconds = f.ServiceAccountImpersonation.TokenLifetimeSeconds
}
- return externalaccount.NewTokenProvider(externalOpts)
+ tp, err := externalaccount.NewTokenProvider(externalOpts)
+ if err != nil {
+ return nil, err
+ }
+ trustBoundaryEnabled, err := trustboundary.IsEnabled()
+ if err != nil {
+ return nil, err
+ }
+ if !trustBoundaryEnabled {
+ return tp, nil
+ }
+
+ ud := resolveUniverseDomain(opts.UniverseDomain, f.UniverseDomain)
+ var configProvider trustboundary.ConfigProvider
+
+ if f.ServiceAccountImpersonationURL == "" {
+ // No impersonation, this is a direct external account credential.
+ // The trust boundary is based on the workload/workforce pool.
+ var err error
+ configProvider, err = trustboundary.NewExternalAccountConfigProvider(f.Audience, ud)
+ if err != nil {
+ return nil, err
+ }
+ } else {
+ // Impersonation is used. The trust boundary is based on the target service account.
+ targetSAEmail, err := impersonate.ExtractServiceAccountEmail(f.ServiceAccountImpersonationURL)
+ if err != nil {
+ return nil, fmt.Errorf("credentials: could not extract target service account email for trust boundary: %w", err)
+ }
+ configProvider = trustboundary.NewServiceAccountConfigProvider(targetSAEmail, ud)
+ }
+
+ return trustboundary.NewProvider(opts.client(), configProvider, opts.logger(), tp)
}
func handleExternalAccountAuthorizedUser(f *credsfile.ExternalAccountAuthorizedUserFile, opts *DetectOptions) (auth.TokenProvider, error) {
@@ -200,7 +250,24 @@ func handleExternalAccountAuthorizedUser(f *credsfile.ExternalAccountAuthorizedU
Client: opts.client(),
Logger: opts.logger(),
}
- return externalaccountuser.NewTokenProvider(externalOpts)
+ tp, err := externalaccountuser.NewTokenProvider(externalOpts)
+ if err != nil {
+ return nil, err
+ }
+ trustBoundaryEnabled, err := trustboundary.IsEnabled()
+ if err != nil {
+ return nil, err
+ }
+ if !trustBoundaryEnabled {
+ return tp, nil
+ }
+
+ ud := resolveUniverseDomain(opts.UniverseDomain, f.UniverseDomain)
+ configProvider, err := trustboundary.NewExternalAccountConfigProvider(f.Audience, ud)
+ if err != nil {
+ return nil, err
+ }
+ return trustboundary.NewProvider(opts.client(), configProvider, opts.logger(), tp)
}
func handleImpersonatedServiceAccount(f *credsfile.ImpersonatedServiceAccountFile, opts *DetectOptions) (auth.TokenProvider, error) {
@@ -208,20 +275,38 @@ func handleImpersonatedServiceAccount(f *credsfile.ImpersonatedServiceAccountFil
return nil, errors.New("missing 'source_credentials' field or 'service_account_impersonation_url' in credentials")
}
- tp, err := fileCredentials(f.CredSource, opts)
+ sourceTP, err := fileCredentials(f.CredSource, opts)
if err != nil {
return nil, err
}
- return impersonate.NewTokenProvider(&impersonate.Options{
- URL: f.ServiceAccountImpersonationURL,
- Scopes: opts.scopes(),
- Tp: tp,
- Delegates: f.Delegates,
- Client: opts.client(),
- Logger: opts.logger(),
- })
+ ud := resolveUniverseDomain(opts.UniverseDomain, f.UniverseDomain)
+ impOpts := &impersonate.Options{
+ URL: f.ServiceAccountImpersonationURL,
+ Scopes: opts.scopes(),
+ Tp: sourceTP,
+ Delegates: f.Delegates,
+ Client: opts.client(),
+ Logger: opts.logger(),
+ UniverseDomain: ud,
+ }
+ tp, err := impersonate.NewTokenProvider(impOpts)
+ if err != nil {
+ return nil, err
+ }
+ trustBoundaryEnabled, err := trustboundary.IsEnabled()
+ if err != nil {
+ return nil, err
+ }
+ if !trustBoundaryEnabled {
+ return tp, nil
+ }
+ targetSAEmail, err := impersonate.ExtractServiceAccountEmail(f.ServiceAccountImpersonationURL)
+ if err != nil {
+ return nil, fmt.Errorf("credentials: could not extract target service account email for trust boundary: %w", err)
+ }
+ targetSAConfig := trustboundary.NewServiceAccountConfigProvider(targetSAEmail, ud)
+ return trustboundary.NewProvider(opts.client(), targetSAConfig, opts.logger(), tp)
}
-
func handleGDCHServiceAccount(f *credsfile.GDCHServiceAccountFile, opts *DetectOptions) (auth.TokenProvider, error) {
return gdch.NewTokenProvider(f, &gdch.Options{
STSAudience: opts.STSAudience,
diff --git a/hack/tools/vendor/cloud.google.com/go/auth/credentials/internal/impersonate/impersonate.go b/hack/tools/vendor/cloud.google.com/go/auth/credentials/internal/impersonate/impersonate.go
index b3a99261fa90..8253376ef8d8 100644
--- a/hack/tools/vendor/cloud.google.com/go/auth/credentials/internal/impersonate/impersonate.go
+++ b/hack/tools/vendor/cloud.google.com/go/auth/credentials/internal/impersonate/impersonate.go
@@ -22,10 +22,12 @@ import (
"fmt"
"log/slog"
"net/http"
+ "regexp"
"time"
"cloud.google.com/go/auth"
"cloud.google.com/go/auth/internal"
+ "cloud.google.com/go/auth/internal/transport/headers"
"github.com/googleapis/gax-go/v2/internallog"
)
@@ -34,6 +36,8 @@ const (
authHeaderKey = "Authorization"
)
+var serviceAccountEmailRegex = regexp.MustCompile(`serviceAccounts/(.+?):generateAccessToken`)
+
// generateAccesstokenReq is used for service account impersonation
type generateAccessTokenReq struct {
Delegates []string `json:"delegates,omitempty"`
@@ -81,6 +85,8 @@ type Options struct {
// enabled by setting GOOGLE_SDK_GO_LOGGING_LEVEL in which case a default
// logger will be used. Optional.
Logger *slog.Logger
+ // UniverseDomain is the default service domain for a given Cloud universe.
+ UniverseDomain string
}
func (o *Options) validate() error {
@@ -114,9 +120,11 @@ func (o *Options) Token(ctx context.Context) (*auth.Token, error) {
return nil, fmt.Errorf("credentials: unable to create impersonation request: %w", err)
}
req.Header.Set("Content-Type", "application/json")
- if err := setAuthHeader(ctx, o.Tp, req); err != nil {
+ sourceToken, err := o.Tp.Token(ctx)
+ if err != nil {
return nil, err
}
+ headers.SetAuthHeader(sourceToken, req)
logger.DebugContext(ctx, "impersonated token request", "request", internallog.HTTPRequest(req, b))
resp, body, err := internal.DoRequest(o.Client, req)
if err != nil {
@@ -135,22 +143,26 @@ func (o *Options) Token(ctx context.Context) (*auth.Token, error) {
if err != nil {
return nil, fmt.Errorf("credentials: unable to parse expiry: %w", err)
}
- return &auth.Token{
+ token := &auth.Token{
Value: accessTokenResp.AccessToken,
Expiry: expiry,
Type: internal.TokenTypeBearer,
- }, nil
+ }
+ return token, nil
}
-func setAuthHeader(ctx context.Context, tp auth.TokenProvider, r *http.Request) error {
- t, err := tp.Token(ctx)
- if err != nil {
- return err
- }
- typ := t.Type
- if typ == "" {
- typ = internal.TokenTypeBearer
+// ExtractServiceAccountEmail extracts the service account email from the impersonation URL.
+// The impersonation URL is expected to be in the format:
+// https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}:generateAccessToken
+// or
+// https://iamcredentials.googleapis.com/v1/projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}:generateAccessToken
+// Returns an error if the email cannot be extracted.
+func ExtractServiceAccountEmail(impersonationURL string) (string, error) {
+ matches := serviceAccountEmailRegex.FindStringSubmatch(impersonationURL)
+
+ if len(matches) < 2 {
+ return "", fmt.Errorf("credentials: invalid impersonation URL format: %s", impersonationURL)
}
- r.Header.Set(authHeaderKey, typ+" "+t.Value)
- return nil
+
+ return matches[1], nil
}
diff --git a/hack/tools/vendor/cloud.google.com/go/auth/grpctransport/grpctransport.go b/hack/tools/vendor/cloud.google.com/go/auth/grpctransport/grpctransport.go
index 834aef41c87a..6bcd3ef54596 100644
--- a/hack/tools/vendor/cloud.google.com/go/auth/grpctransport/grpctransport.go
+++ b/hack/tools/vendor/cloud.google.com/go/auth/grpctransport/grpctransport.go
@@ -30,6 +30,7 @@ import (
"cloud.google.com/go/auth/credentials"
"cloud.google.com/go/auth/internal"
"cloud.google.com/go/auth/internal/transport"
+ "cloud.google.com/go/auth/internal/transport/headers"
"github.com/googleapis/gax-go/v2/internallog"
"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
"google.golang.org/grpc"
@@ -428,23 +429,13 @@ func (c *grpcCredentialsProvider) GetRequestMetadata(ctx context.Context, uri ..
}
}
metadata := make(map[string]string, len(c.metadata)+1)
- setAuthMetadata(token, metadata)
+ headers.SetAuthMetadata(token, metadata)
for k, v := range c.metadata {
metadata[k] = v
}
return metadata, nil
}
-// setAuthMetadata uses the provided token to set the Authorization metadata.
-// If the token.Type is empty, the type is assumed to be Bearer.
-func setAuthMetadata(token *auth.Token, m map[string]string) {
- typ := token.Type
- if typ == "" {
- typ = internal.TokenTypeBearer
- }
- m["authorization"] = typ + " " + token.Value
-}
-
func (c *grpcCredentialsProvider) RequireTransportSecurity() bool {
return c.secure
}
diff --git a/hack/tools/vendor/cloud.google.com/go/auth/httptransport/httptransport.go b/hack/tools/vendor/cloud.google.com/go/auth/httptransport/httptransport.go
index 5758e85b5db6..c9126535d722 100644
--- a/hack/tools/vendor/cloud.google.com/go/auth/httptransport/httptransport.go
+++ b/hack/tools/vendor/cloud.google.com/go/auth/httptransport/httptransport.go
@@ -25,8 +25,8 @@ import (
"cloud.google.com/go/auth"
detect "cloud.google.com/go/auth/credentials"
- "cloud.google.com/go/auth/internal"
"cloud.google.com/go/auth/internal/transport"
+ "cloud.google.com/go/auth/internal/transport/headers"
"github.com/googleapis/gax-go/v2/internallog"
)
@@ -236,12 +236,10 @@ func NewClient(opts *Options) (*http.Client, error) {
}, nil
}
-// SetAuthHeader uses the provided token to set the Authorization header on a
-// request. If the token.Type is empty, the type is assumed to be Bearer.
+// SetAuthHeader uses the provided token to set the Authorization and trust
+// boundary headers on an http.Request. If the token.Type is empty, the type is
+// assumed to be Bearer. This is the recommended way to set authorization
+// headers on a custom http.Request.
func SetAuthHeader(token *auth.Token, req *http.Request) {
- typ := token.Type
- if typ == "" {
- typ = internal.TokenTypeBearer
- }
- req.Header.Set("Authorization", typ+" "+token.Value)
+ headers.SetAuthHeader(token, req)
}
diff --git a/hack/tools/vendor/cloud.google.com/go/auth/httptransport/transport.go b/hack/tools/vendor/cloud.google.com/go/auth/httptransport/transport.go
index ee215b6dc6cb..3feb997c76d4 100644
--- a/hack/tools/vendor/cloud.google.com/go/auth/httptransport/transport.go
+++ b/hack/tools/vendor/cloud.google.com/go/auth/httptransport/transport.go
@@ -27,6 +27,7 @@ import (
"cloud.google.com/go/auth/internal"
"cloud.google.com/go/auth/internal/transport"
"cloud.google.com/go/auth/internal/transport/cert"
+ "cloud.google.com/go/auth/internal/transport/headers"
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
"golang.org/x/net/http2"
)
@@ -228,7 +229,7 @@ func (t *authTransport) RoundTrip(req *http.Request) (*http.Response, error) {
}
}
req2 := req.Clone(req.Context())
- SetAuthHeader(token, req2)
+ headers.SetAuthHeader(token, req2)
reqBodyClosed = true
return t.base.RoundTrip(req2)
}
diff --git a/hack/tools/vendor/cloud.google.com/go/auth/internal/internal.go b/hack/tools/vendor/cloud.google.com/go/auth/internal/internal.go
index 6a8eab6eb99f..72a8a6b7a53f 100644
--- a/hack/tools/vendor/cloud.google.com/go/auth/internal/internal.go
+++ b/hack/tools/vendor/cloud.google.com/go/auth/internal/internal.go
@@ -47,6 +47,12 @@ const (
// DefaultUniverseDomain is the default value for universe domain.
// Universe domain is the default service domain for a given Cloud universe.
DefaultUniverseDomain = "googleapis.com"
+
+ // TrustBoundaryNoOp is a constant indicating no trust boundary is enforced.
+ TrustBoundaryNoOp = "0x0"
+
+ // TrustBoundaryDataKey is the key used to store trust boundary data in a token's metadata.
+ TrustBoundaryDataKey = "google.auth.trust_boundary_data"
)
type clonableTransport interface {
@@ -223,3 +229,56 @@ func getMetadataUniverseDomain(ctx context.Context, client *metadata.Client) (st
func FormatIAMServiceAccountResource(name string) string {
return fmt.Sprintf("projects/-/serviceAccounts/%s", name)
}
+
+// TrustBoundaryData represents the trust boundary data associated with a token.
+// It contains information about the regions or environments where the token is valid.
+type TrustBoundaryData struct {
+ // Locations is the list of locations that the token is allowed to be used in.
+ Locations []string
+ // EncodedLocations represents the locations in an encoded format.
+ EncodedLocations string
+}
+
+// NewTrustBoundaryData returns a new TrustBoundaryData with the specified locations and encoded locations.
+func NewTrustBoundaryData(locations []string, encodedLocations string) *TrustBoundaryData {
+ // Ensure consistency by treating a nil slice as an empty slice.
+ if locations == nil {
+ locations = []string{}
+ }
+ locationsCopy := make([]string, len(locations))
+ copy(locationsCopy, locations)
+ return &TrustBoundaryData{
+ Locations: locationsCopy,
+ EncodedLocations: encodedLocations,
+ }
+}
+
+// NewNoOpTrustBoundaryData returns a new TrustBoundaryData with no restrictions.
+func NewNoOpTrustBoundaryData() *TrustBoundaryData {
+ return &TrustBoundaryData{
+ Locations: []string{},
+ EncodedLocations: TrustBoundaryNoOp,
+ }
+}
+
+// TrustBoundaryHeader returns the value for the x-allowed-locations header and a bool
+// indicating if the header should be set. The return values are structured to
+// handle three distinct states required by the backend:
+// 1. Header not set: (value="", present=false) -> data is empty.
+// 2. Header set to an empty string: (value="", present=true) -> data is a no-op.
+// 3. Header set to a value: (value="...", present=true) -> data has locations.
+func (t TrustBoundaryData) TrustBoundaryHeader() (value string, present bool) {
+ if t.EncodedLocations == "" {
+ // If the data is empty, the header should not be present.
+ return "", false
+ }
+
+ // If data is not empty, the header should always be present.
+ present = true
+ value = ""
+ if t.EncodedLocations != TrustBoundaryNoOp {
+ value = t.EncodedLocations
+ }
+ // For a no-op, the backend requires an empty string.
+ return value, present
+}
diff --git a/hack/tools/vendor/cloud.google.com/go/auth/internal/retry/retry.go b/hack/tools/vendor/cloud.google.com/go/auth/internal/retry/retry.go
new file mode 100644
index 000000000000..276cc4a3e269
--- /dev/null
+++ b/hack/tools/vendor/cloud.google.com/go/auth/internal/retry/retry.go
@@ -0,0 +1,117 @@
+// Copyright 2025 Google LLC
+//
+// 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 retry
+
+import (
+ "context"
+ "io"
+ "math/rand"
+ "net/http"
+ "time"
+)
+
+const (
+ maxRetryAttempts = 5
+)
+
+var (
+ syscallRetryable = func(error) bool { return false }
+)
+
+// defaultBackoff is basically equivalent to gax.Backoff without the need for
+// the dependency.
+type defaultBackoff struct {
+ max time.Duration
+ mul float64
+ cur time.Duration
+}
+
+func (b *defaultBackoff) Pause() time.Duration {
+ d := time.Duration(1 + rand.Int63n(int64(b.cur)))
+ b.cur = time.Duration(float64(b.cur) * b.mul)
+ if b.cur > b.max {
+ b.cur = b.max
+ }
+ return d
+}
+
+// Sleep is the equivalent of gax.Sleep without the need for the dependency.
+func Sleep(ctx context.Context, d time.Duration) error {
+ t := time.NewTimer(d)
+ select {
+ case <-ctx.Done():
+ t.Stop()
+ return ctx.Err()
+ case <-t.C:
+ return nil
+ }
+}
+
+// New returns a new Retryer with the default backoff strategy.
+func New() *Retryer {
+ return &Retryer{bo: &defaultBackoff{
+ cur: 100 * time.Millisecond,
+ max: 30 * time.Second,
+ mul: 2,
+ }}
+}
+
+type backoff interface {
+ Pause() time.Duration
+}
+
+// Retryer is a retryer for HTTP requests.
+type Retryer struct {
+ bo backoff
+ attempts int
+}
+
+// Retry determines if a request should be retried.
+func (r *Retryer) Retry(status int, err error) (time.Duration, bool) {
+ if status == http.StatusOK {
+ return 0, false
+ }
+ retryOk := shouldRetry(status, err)
+ if !retryOk {
+ return 0, false
+ }
+ if r.attempts == maxRetryAttempts {
+ return 0, false
+ }
+ r.attempts++
+ return r.bo.Pause(), true
+}
+
+func shouldRetry(status int, err error) bool {
+ if 500 <= status && status <= 599 {
+ return true
+ }
+ if err == io.ErrUnexpectedEOF {
+ return true
+ }
+ // Transient network errors should be retried.
+ if syscallRetryable(err) {
+ return true
+ }
+ if err, ok := err.(interface{ Temporary() bool }); ok {
+ if err.Temporary() {
+ return true
+ }
+ }
+ if err, ok := err.(interface{ Unwrap() error }); ok {
+ return shouldRetry(status, err.Unwrap())
+ }
+ return false
+}
diff --git a/hack/tools/vendor/cloud.google.com/go/auth/internal/transport/headers/headers.go b/hack/tools/vendor/cloud.google.com/go/auth/internal/transport/headers/headers.go
new file mode 100644
index 000000000000..5483a763c42c
--- /dev/null
+++ b/hack/tools/vendor/cloud.google.com/go/auth/internal/transport/headers/headers.go
@@ -0,0 +1,61 @@
+// Copyright 2025 Google LLC
+//
+// 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 headers
+
+import (
+ "net/http"
+
+ "cloud.google.com/go/auth"
+ "cloud.google.com/go/auth/internal"
+)
+
+// SetAuthHeader uses the provided token to set the Authorization and trust
+// boundary headers on a request. If the token.Type is empty, the type is
+// assumed to be Bearer.
+func SetAuthHeader(token *auth.Token, req *http.Request) {
+ typ := token.Type
+ if typ == "" {
+ typ = internal.TokenTypeBearer
+ }
+ req.Header.Set("Authorization", typ+" "+token.Value)
+
+ if headerVal, setHeader := getTrustBoundaryHeader(token); setHeader {
+ req.Header.Set("x-allowed-locations", headerVal)
+ }
+}
+
+// SetAuthMetadata uses the provided token to set the Authorization and trust
+// boundary metadata. If the token.Type is empty, the type is assumed to be
+// Bearer.
+func SetAuthMetadata(token *auth.Token, m map[string]string) {
+ typ := token.Type
+ if typ == "" {
+ typ = internal.TokenTypeBearer
+ }
+ m["authorization"] = typ + " " + token.Value
+
+ if headerVal, setHeader := getTrustBoundaryHeader(token); setHeader {
+ m["x-allowed-locations"] = headerVal
+ }
+}
+
+func getTrustBoundaryHeader(token *auth.Token) (val string, present bool) {
+ if data, ok := token.Metadata[internal.TrustBoundaryDataKey]; ok {
+ if tbd, ok := data.(internal.TrustBoundaryData); ok {
+ return tbd.TrustBoundaryHeader()
+ }
+ }
+ return "", false
+}
diff --git a/hack/tools/vendor/cloud.google.com/go/auth/internal/trustboundary/external_accounts_config_providers.go b/hack/tools/vendor/cloud.google.com/go/auth/internal/trustboundary/external_accounts_config_providers.go
new file mode 100644
index 000000000000..8fa5600bdcb0
--- /dev/null
+++ b/hack/tools/vendor/cloud.google.com/go/auth/internal/trustboundary/external_accounts_config_providers.go
@@ -0,0 +1,100 @@
+// Copyright 2025 Google LLC
+//
+// 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 trustboundary
+
+import (
+ "context"
+ "fmt"
+ "regexp"
+)
+
+const (
+ workloadAllowedLocationsEndpoint = "https://iamcredentials.%s/v1/projects/%s/locations/global/workloadIdentityPools/%s/allowedLocations"
+ workforceAllowedLocationsEndpoint = "https://iamcredentials.%s/v1/locations/global/workforcePools/%s/allowedLocations"
+)
+
+var (
+ workforceAudiencePattern = regexp.MustCompile(`//iam\.([^/]+)/locations/global/workforcePools/([^/]+)`)
+ workloadAudiencePattern = regexp.MustCompile(`//iam\.([^/]+)/projects/([^/]+)/locations/global/workloadIdentityPools/([^/]+)`)
+)
+
+// NewExternalAccountConfigProvider creates a new ConfigProvider for external accounts.
+func NewExternalAccountConfigProvider(audience, inputUniverseDomain string) (ConfigProvider, error) {
+ var audienceDomain, projectNumber, poolID string
+ var isWorkload bool
+
+ matches := workloadAudiencePattern.FindStringSubmatch(audience)
+ if len(matches) == 4 { // Expecting full match, domain, projectNumber, poolID
+ audienceDomain = matches[1]
+ projectNumber = matches[2]
+ poolID = matches[3]
+ isWorkload = true
+ } else {
+ matches = workforceAudiencePattern.FindStringSubmatch(audience)
+ if len(matches) == 3 { // Expecting full match, domain, poolID
+ audienceDomain = matches[1]
+ poolID = matches[2]
+ isWorkload = false
+ } else {
+ return nil, fmt.Errorf("trustboundary: unknown audience format: %q", audience)
+ }
+ }
+
+ effectiveUniverseDomain := inputUniverseDomain
+ if effectiveUniverseDomain == "" {
+ effectiveUniverseDomain = audienceDomain
+ } else if audienceDomain != "" && effectiveUniverseDomain != audienceDomain {
+ return nil, fmt.Errorf("trustboundary: provided universe domain (%q) does not match domain in audience (%q)", inputUniverseDomain, audienceDomain)
+ }
+
+ if isWorkload {
+ return &workloadIdentityPoolConfigProvider{
+ projectNumber: projectNumber,
+ poolID: poolID,
+ universeDomain: effectiveUniverseDomain,
+ }, nil
+ }
+ return &workforcePoolConfigProvider{
+ poolID: poolID,
+ universeDomain: effectiveUniverseDomain,
+ }, nil
+}
+
+type workforcePoolConfigProvider struct {
+ poolID string
+ universeDomain string
+}
+
+func (p *workforcePoolConfigProvider) GetTrustBoundaryEndpoint(ctx context.Context) (string, error) {
+ return fmt.Sprintf(workforceAllowedLocationsEndpoint, p.universeDomain, p.poolID), nil
+}
+
+func (p *workforcePoolConfigProvider) GetUniverseDomain(ctx context.Context) (string, error) {
+ return p.universeDomain, nil
+}
+
+type workloadIdentityPoolConfigProvider struct {
+ projectNumber string
+ poolID string
+ universeDomain string
+}
+
+func (p *workloadIdentityPoolConfigProvider) GetTrustBoundaryEndpoint(ctx context.Context) (string, error) {
+ return fmt.Sprintf(workloadAllowedLocationsEndpoint, p.universeDomain, p.projectNumber, p.poolID), nil
+}
+
+func (p *workloadIdentityPoolConfigProvider) GetUniverseDomain(ctx context.Context) (string, error) {
+ return p.universeDomain, nil
+}
diff --git a/hack/tools/vendor/cloud.google.com/go/auth/internal/trustboundary/trust_boundary.go b/hack/tools/vendor/cloud.google.com/go/auth/internal/trustboundary/trust_boundary.go
new file mode 100644
index 000000000000..bf898fffd697
--- /dev/null
+++ b/hack/tools/vendor/cloud.google.com/go/auth/internal/trustboundary/trust_boundary.go
@@ -0,0 +1,392 @@
+// Copyright 2025 Google LLC
+//
+// 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 trustboundary
+
+import (
+ "context"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "log/slog"
+ "net/http"
+ "os"
+ "strings"
+ "sync"
+
+ "cloud.google.com/go/auth"
+ "cloud.google.com/go/auth/internal"
+ "cloud.google.com/go/auth/internal/retry"
+ "cloud.google.com/go/auth/internal/transport/headers"
+ "github.com/googleapis/gax-go/v2/internallog"
+)
+
+const (
+ // serviceAccountAllowedLocationsEndpoint is the URL for fetching allowed locations for a given service account email.
+ serviceAccountAllowedLocationsEndpoint = "https://iamcredentials.%s/v1/projects/-/serviceAccounts/%s/allowedLocations"
+)
+
+// isEnabled wraps isTrustBoundaryEnabled with sync.OnceValues to ensure it's
+// called only once.
+var isEnabled = sync.OnceValues(isTrustBoundaryEnabled)
+
+// IsEnabled returns if the trust boundary feature is enabled and an error if
+// the configuration is invalid. The underlying check is performed only once.
+func IsEnabled() (bool, error) {
+ return isEnabled()
+}
+
+// isTrustBoundaryEnabled checks if the trust boundary feature is enabled via
+// GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED environment variable.
+//
+// If the environment variable is not set, it is considered false.
+//
+// The environment variable is interpreted as a boolean with the following
+// (case-insensitive) rules:
+// - "true", "1" are considered true.
+// - "false", "0" are considered false.
+//
+// Any other values will return an error.
+func isTrustBoundaryEnabled() (bool, error) {
+ const envVar = "GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED"
+ val, ok := os.LookupEnv(envVar)
+ if !ok {
+ return false, nil
+ }
+ val = strings.ToLower(val)
+ switch val {
+ case "true", "1":
+ return true, nil
+ case "false", "0":
+ return false, nil
+ default:
+ return false, fmt.Errorf(`invalid value for %s: %q. Must be one of "true", "false", "1", or "0"`, envVar, val)
+ }
+}
+
+// ConfigProvider provides specific configuration for trust boundary lookups.
+type ConfigProvider interface {
+ // GetTrustBoundaryEndpoint returns the endpoint URL for the trust boundary lookup.
+ GetTrustBoundaryEndpoint(ctx context.Context) (url string, err error)
+ // GetUniverseDomain returns the universe domain associated with the credential.
+ // It may return an error if the universe domain cannot be determined.
+ GetUniverseDomain(ctx context.Context) (string, error)
+}
+
+// AllowedLocationsResponse is the structure of the response from the Trust Boundary API.
+type AllowedLocationsResponse struct {
+ // Locations is the list of allowed locations.
+ Locations []string `json:"locations"`
+ // EncodedLocations is the encoded representation of the allowed locations.
+ EncodedLocations string `json:"encodedLocations"`
+}
+
+// fetchTrustBoundaryData fetches the trust boundary data from the API.
+func fetchTrustBoundaryData(ctx context.Context, client *http.Client, url string, token *auth.Token, logger *slog.Logger) (*internal.TrustBoundaryData, error) {
+ if logger == nil {
+ logger = slog.New(slog.NewTextHandler(io.Discard, nil))
+ }
+ if client == nil {
+ return nil, errors.New("trustboundary: HTTP client is required")
+ }
+
+ if url == "" {
+ return nil, errors.New("trustboundary: URL cannot be empty")
+ }
+
+ req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)
+ if err != nil {
+ return nil, fmt.Errorf("trustboundary: failed to create trust boundary request: %w", err)
+ }
+
+ if token == nil || token.Value == "" {
+ return nil, errors.New("trustboundary: access token required for lookup API authentication")
+ }
+ headers.SetAuthHeader(token, req)
+ logger.DebugContext(ctx, "trust boundary request", "request", internallog.HTTPRequest(req, nil))
+
+ retryer := retry.New()
+ var response *http.Response
+ for {
+ response, err = client.Do(req)
+
+ var statusCode int
+ if response != nil {
+ statusCode = response.StatusCode
+ }
+ pause, shouldRetry := retryer.Retry(statusCode, err)
+
+ if !shouldRetry {
+ break
+ }
+
+ if response != nil {
+ // Drain and close the body to reuse the connection
+ io.Copy(io.Discard, response.Body)
+ response.Body.Close()
+ }
+
+ if err := retry.Sleep(ctx, pause); err != nil {
+ return nil, err
+ }
+ }
+
+ if err != nil {
+ return nil, fmt.Errorf("trustboundary: failed to fetch trust boundary: %w", err)
+ }
+ defer response.Body.Close()
+
+ body, err := io.ReadAll(response.Body)
+ if err != nil {
+ return nil, fmt.Errorf("trustboundary: failed to read trust boundary response: %w", err)
+ }
+
+ logger.DebugContext(ctx, "trust boundary response", "response", internallog.HTTPResponse(response, body))
+
+ if response.StatusCode != http.StatusOK {
+ return nil, fmt.Errorf("trustboundary: trust boundary request failed with status: %s, body: %s", response.Status, string(body))
+ }
+
+ apiResponse := AllowedLocationsResponse{}
+ if err := json.Unmarshal(body, &apiResponse); err != nil {
+ return nil, fmt.Errorf("trustboundary: failed to unmarshal trust boundary response: %w", err)
+ }
+
+ if apiResponse.EncodedLocations == "" {
+ return nil, errors.New("trustboundary: invalid API response: encodedLocations is empty")
+ }
+
+ return internal.NewTrustBoundaryData(apiResponse.Locations, apiResponse.EncodedLocations), nil
+}
+
+// serviceAccountConfig holds configuration for SA trust boundary lookups.
+// It implements the ConfigProvider interface.
+type serviceAccountConfig struct {
+ ServiceAccountEmail string
+ UniverseDomain string
+}
+
+// NewServiceAccountConfigProvider creates a new config for service accounts.
+func NewServiceAccountConfigProvider(saEmail, universeDomain string) ConfigProvider {
+ return &serviceAccountConfig{
+ ServiceAccountEmail: saEmail,
+ UniverseDomain: universeDomain,
+ }
+}
+
+// GetTrustBoundaryEndpoint returns the formatted URL for fetching allowed locations
+// for the configured service account and universe domain.
+func (sac *serviceAccountConfig) GetTrustBoundaryEndpoint(ctx context.Context) (url string, err error) {
+ if sac.ServiceAccountEmail == "" {
+ return "", errors.New("trustboundary: service account email cannot be empty for config")
+ }
+ ud := sac.UniverseDomain
+ if ud == "" {
+ ud = internal.DefaultUniverseDomain
+ }
+ return fmt.Sprintf(serviceAccountAllowedLocationsEndpoint, ud, sac.ServiceAccountEmail), nil
+}
+
+// GetUniverseDomain returns the configured universe domain, defaulting to
+// [internal.DefaultUniverseDomain] if not explicitly set.
+func (sac *serviceAccountConfig) GetUniverseDomain(ctx context.Context) (string, error) {
+ if sac.UniverseDomain == "" {
+ return internal.DefaultUniverseDomain, nil
+ }
+ return sac.UniverseDomain, nil
+}
+
+// DataProvider fetches and caches trust boundary Data.
+// It implements the DataProvider interface and uses a ConfigProvider
+// to get type-specific details for the lookup.
+type DataProvider struct {
+ client *http.Client
+ configProvider ConfigProvider
+ data *internal.TrustBoundaryData
+ logger *slog.Logger
+ base auth.TokenProvider
+}
+
+// NewProvider wraps the provided base [auth.TokenProvider] to create a new
+// provider that injects tokens with trust boundary data. It uses the provided
+// HTTP client and configProvider to fetch the data and attach it to the token's
+// metadata.
+func NewProvider(client *http.Client, configProvider ConfigProvider, logger *slog.Logger, base auth.TokenProvider) (*DataProvider, error) {
+ if client == nil {
+ return nil, errors.New("trustboundary: HTTP client cannot be nil for DataProvider")
+ }
+ if configProvider == nil {
+ return nil, errors.New("trustboundary: ConfigProvider cannot be nil for DataProvider")
+ }
+ p := &DataProvider{
+ client: client,
+ configProvider: configProvider,
+ logger: internallog.New(logger),
+ base: base,
+ }
+ return p, nil
+}
+
+// Token retrieves a token from the base provider and injects it with trust
+// boundary data.
+func (p *DataProvider) Token(ctx context.Context) (*auth.Token, error) {
+ // Get the original token.
+ token, err := p.base.Token(ctx)
+ if err != nil {
+ return nil, err
+ }
+
+ tbData, err := p.GetTrustBoundaryData(ctx, token)
+ if err != nil {
+ return nil, fmt.Errorf("trustboundary: error fetching the trust boundary data: %w", err)
+ }
+ if tbData != nil {
+ if token.Metadata == nil {
+ token.Metadata = make(map[string]interface{})
+ }
+ token.Metadata[internal.TrustBoundaryDataKey] = *tbData
+ }
+ return token, nil
+}
+
+// GetTrustBoundaryData retrieves the trust boundary data.
+// It first checks the universe domain: if it's non-default, a NoOp is returned.
+// Otherwise, it checks a local cache. If the data is not cached as NoOp,
+// it fetches new data from the endpoint provided by its ConfigProvider,
+// using the given accessToken for authentication. Results are cached.
+// If fetching fails, it returns previously cached data if available, otherwise the fetch error.
+func (p *DataProvider) GetTrustBoundaryData(ctx context.Context, token *auth.Token) (*internal.TrustBoundaryData, error) {
+ // Check the universe domain.
+ uniDomain, err := p.configProvider.GetUniverseDomain(ctx)
+ if err != nil {
+ return nil, fmt.Errorf("trustboundary: error getting universe domain: %w", err)
+ }
+ if uniDomain != "" && uniDomain != internal.DefaultUniverseDomain {
+ if p.data == nil || p.data.EncodedLocations != internal.TrustBoundaryNoOp {
+ p.data = internal.NewNoOpTrustBoundaryData()
+ }
+ return p.data, nil
+ }
+
+ // Check cache for a no-op result from a previous API call.
+ cachedData := p.data
+ if cachedData != nil && cachedData.EncodedLocations == internal.TrustBoundaryNoOp {
+ return cachedData, nil
+ }
+
+ // Get the endpoint
+ url, err := p.configProvider.GetTrustBoundaryEndpoint(ctx)
+ if err != nil {
+ return nil, fmt.Errorf("trustboundary: error getting the lookup endpoint: %w", err)
+ }
+
+ // Proceed to fetch new data.
+ newData, fetchErr := fetchTrustBoundaryData(ctx, p.client, url, token, p.logger)
+
+ if fetchErr != nil {
+ // Fetch failed. Fallback to cachedData if available.
+ if cachedData != nil {
+ return cachedData, nil // Successful fallback
+ }
+ // No cache to fallback to.
+ return nil, fmt.Errorf("trustboundary: failed to fetch trust boundary data for endpoint %s and no cache available: %w", url, fetchErr)
+ }
+
+ // Fetch successful. Update cache.
+ p.data = newData
+ return newData, nil
+}
+
+// GCEConfigProvider implements ConfigProvider for GCE environments.
+// It lazily fetches and caches the necessary metadata (service account email, universe domain)
+// from the GCE metadata server.
+type GCEConfigProvider struct {
+ // universeDomainProvider provides the universe domain and underlying metadata client.
+ universeDomainProvider *internal.ComputeUniverseDomainProvider
+
+ // Caching for service account email
+ saOnce sync.Once
+ saEmail string
+ saEmailErr error
+
+ // Caching for universe domain
+ udOnce sync.Once
+ ud string
+ udErr error
+}
+
+// NewGCEConfigProvider creates a new GCEConfigProvider
+// which uses the provided gceUDP to interact with the GCE metadata server.
+func NewGCEConfigProvider(gceUDP *internal.ComputeUniverseDomainProvider) *GCEConfigProvider {
+ // The validity of gceUDP and its internal MetadataClient will be checked
+ // within the GetTrustBoundaryEndpoint and GetUniverseDomain methods.
+ return &GCEConfigProvider{
+ universeDomainProvider: gceUDP,
+ }
+}
+
+func (g *GCEConfigProvider) fetchSA(ctx context.Context) {
+ if g.universeDomainProvider == nil || g.universeDomainProvider.MetadataClient == nil {
+ g.saEmailErr = errors.New("trustboundary: GCEConfigProvider not properly initialized (missing ComputeUniverseDomainProvider or MetadataClient)")
+ return
+ }
+ mdClient := g.universeDomainProvider.MetadataClient
+ saEmail, err := mdClient.EmailWithContext(ctx, "default")
+ if err != nil {
+ g.saEmailErr = fmt.Errorf("trustboundary: GCE config: failed to get service account email: %w", err)
+ return
+ }
+ g.saEmail = saEmail
+}
+
+func (g *GCEConfigProvider) fetchUD(ctx context.Context) {
+ if g.universeDomainProvider == nil || g.universeDomainProvider.MetadataClient == nil {
+ g.udErr = errors.New("trustboundary: GCEConfigProvider not properly initialized (missing ComputeUniverseDomainProvider or MetadataClient)")
+ return
+ }
+ ud, err := g.universeDomainProvider.GetProperty(ctx)
+ if err != nil {
+ g.udErr = fmt.Errorf("trustboundary: GCE config: failed to get universe domain: %w", err)
+ return
+ }
+ if ud == "" {
+ ud = internal.DefaultUniverseDomain
+ }
+ g.ud = ud
+}
+
+// GetTrustBoundaryEndpoint constructs the trust boundary lookup URL for a GCE environment.
+// It uses cached metadata (service account email, universe domain) after the first call.
+func (g *GCEConfigProvider) GetTrustBoundaryEndpoint(ctx context.Context) (string, error) {
+ g.saOnce.Do(func() { g.fetchSA(ctx) })
+ if g.saEmailErr != nil {
+ return "", g.saEmailErr
+ }
+ g.udOnce.Do(func() { g.fetchUD(ctx) })
+ if g.udErr != nil {
+ return "", g.udErr
+ }
+ return fmt.Sprintf(serviceAccountAllowedLocationsEndpoint, g.ud, g.saEmail), nil
+}
+
+// GetUniverseDomain retrieves the universe domain from the GCE metadata server.
+// It uses a cached value after the first call.
+func (g *GCEConfigProvider) GetUniverseDomain(ctx context.Context) (string, error) {
+ g.udOnce.Do(func() { g.fetchUD(ctx) })
+ if g.udErr != nil {
+ return "", g.udErr
+ }
+ return g.ud, nil
+}
diff --git a/hack/tools/vendor/cloud.google.com/go/auth/internal/version.go b/hack/tools/vendor/cloud.google.com/go/auth/internal/version.go
new file mode 100644
index 000000000000..e2f56cf4d814
--- /dev/null
+++ b/hack/tools/vendor/cloud.google.com/go/auth/internal/version.go
@@ -0,0 +1,20 @@
+// Copyright 2025 Google LLC
+//
+// 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 gapicgen. DO NOT EDIT.
+
+package internal
+
+// Version is the current tagged release of the library.
+const Version = "0.17.0"
diff --git a/hack/tools/vendor/cloud.google.com/go/compute/metadata/CHANGES.md b/hack/tools/vendor/cloud.google.com/go/compute/metadata/CHANGES.md
index 1f848ce0b312..e384683c501e 100644
--- a/hack/tools/vendor/cloud.google.com/go/compute/metadata/CHANGES.md
+++ b/hack/tools/vendor/cloud.google.com/go/compute/metadata/CHANGES.md
@@ -1,5 +1,47 @@
# Changes
+## [0.9.0](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.8.4...compute/metadata/v0.9.0) (2025-09-24)
+
+
+### Features
+
+* **compute/metadata:** Retry on HTTP 429 ([#12932](https://github.com/googleapis/google-cloud-go/issues/12932)) ([1e91f5c](https://github.com/googleapis/google-cloud-go/commit/1e91f5c07acacd38ecdd4ff3e83e092b745e0bc2))
+
+## [0.8.4](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.8.3...compute/metadata/v0.8.4) (2025-09-18)
+
+
+### Bug Fixes
+
+* **compute/metadata:** Set subClient for UseDefaultClient case ([#12911](https://github.com/googleapis/google-cloud-go/issues/12911)) ([9e2646b](https://github.com/googleapis/google-cloud-go/commit/9e2646b1821231183fd775bb107c062865eeaccd))
+
+## [0.8.3](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.8.2...compute/metadata/v0.8.3) (2025-09-17)
+
+
+### Bug Fixes
+
+* **compute/metadata:** Disable Client timeouts for subscription client ([#12910](https://github.com/googleapis/google-cloud-go/issues/12910)) ([187a58a](https://github.com/googleapis/google-cloud-go/commit/187a58a540494e1e8562b046325b8cad8cf7af4a))
+
+## [0.8.2](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.8.1...compute/metadata/v0.8.2) (2025-09-17)
+
+
+### Bug Fixes
+
+* **compute/metadata:** Racy test and uninitialized subClient ([#12892](https://github.com/googleapis/google-cloud-go/issues/12892)) ([4943ca2](https://github.com/googleapis/google-cloud-go/commit/4943ca2bf83908a23806247bc4252dfb440d09cc)), refs [#12888](https://github.com/googleapis/google-cloud-go/issues/12888)
+
+## [0.8.1](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.8.0...compute/metadata/v0.8.1) (2025-09-16)
+
+
+### Bug Fixes
+
+* **compute/metadata:** Use separate client for subscribe methods ([#12885](https://github.com/googleapis/google-cloud-go/issues/12885)) ([76b80f8](https://github.com/googleapis/google-cloud-go/commit/76b80f8df9bf9339d175407e8c15936fe1ac1c9c))
+
+## [0.8.0](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.7.0...compute/metadata/v0.8.0) (2025-08-06)
+
+
+### Features
+
+* **compute/metadata:** Add Options.UseDefaultClient ([#12657](https://github.com/googleapis/google-cloud-go/issues/12657)) ([1a88209](https://github.com/googleapis/google-cloud-go/commit/1a8820900f20e038291c4bb2c5284a449196e81f)), refs [#11078](https://github.com/googleapis/google-cloud-go/issues/11078)
+
## [0.7.0](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.6.0...compute/metadata/v0.7.0) (2025-05-13)
diff --git a/hack/tools/vendor/cloud.google.com/go/compute/metadata/metadata.go b/hack/tools/vendor/cloud.google.com/go/compute/metadata/metadata.go
index 322be8032d7c..6bd189166050 100644
--- a/hack/tools/vendor/cloud.google.com/go/compute/metadata/metadata.go
+++ b/hack/tools/vendor/cloud.google.com/go/compute/metadata/metadata.go
@@ -22,6 +22,7 @@ package metadata // import "cloud.google.com/go/compute/metadata"
import (
"context"
"encoding/json"
+ "errors"
"fmt"
"io"
"log/slog"
@@ -62,21 +63,26 @@ var (
)
var defaultClient = &Client{
- hc: newDefaultHTTPClient(),
- logger: slog.New(noOpHandler{}),
+ hc: newDefaultHTTPClient(true),
+ subClient: newDefaultHTTPClient(false),
+ logger: slog.New(noOpHandler{}),
}
-func newDefaultHTTPClient() *http.Client {
- return &http.Client{
- Transport: &http.Transport{
- Dial: (&net.Dialer{
- Timeout: 2 * time.Second,
- KeepAlive: 30 * time.Second,
- }).Dial,
- IdleConnTimeout: 60 * time.Second,
- },
- Timeout: 5 * time.Second,
+func newDefaultHTTPClient(enableTimeouts bool) *http.Client {
+ transport := &http.Transport{
+ Dial: (&net.Dialer{
+ Timeout: 2 * time.Second,
+ KeepAlive: 30 * time.Second,
+ }).Dial,
}
+ c := &http.Client{
+ Transport: transport,
+ }
+ if enableTimeouts {
+ transport.IdleConnTimeout = 60 * time.Second
+ c.Timeout = 5 * time.Second
+ }
+ return c
}
// NotDefinedError is returned when requested metadata is not defined.
@@ -350,42 +356,74 @@ func strsContains(ss []string, s string) bool {
// A Client provides metadata.
type Client struct {
- hc *http.Client
- logger *slog.Logger
+ hc *http.Client
+ // subClient by default is a HTTP Client that is only used for subscribe
+ // methods that should not specify a timeout. If the user specifies a client
+ // this with be the same as 'hc'.
+ subClient *http.Client
+ logger *slog.Logger
}
// Options for configuring a [Client].
type Options struct {
// Client is the HTTP client used to make requests. Optional.
+ // If UseDefaultClient is true, this field is ignored.
+ // If this field is nil, a new default http.Client will be created.
Client *http.Client
// Logger is used to log information about HTTP request and responses.
// If not provided, nothing will be logged. Optional.
Logger *slog.Logger
+ // UseDefaultClient specifies that the client should use the same default
+ // internal http.Client that is used in functions such as GetWithContext.
+ // This is useful for sharing a single TCP connection pool across requests.
+ // The difference vs GetWithContext is the ability to use this struct
+ // to provide a custom logger. If this field is true, the Client
+ // field is ignored.
+ UseDefaultClient bool
}
// NewClient returns a Client that can be used to fetch metadata.
// Returns the client that uses the specified http.Client for HTTP requests.
-// If nil is specified, returns the default client.
+// If nil is specified, returns the default internal Client that is
+// also used in functions such as GetWithContext. This is useful for sharing
+// a single TCP connection pool across requests.
func NewClient(c *http.Client) *Client {
- return NewWithOptions(&Options{
- Client: c,
- })
+ if c == nil {
+ // Preserve original behavior for nil argument.
+ return defaultClient
+ }
+ // Return a new client with a no-op logger for backward compatibility.
+ return &Client{hc: c, subClient: c, logger: slog.New(noOpHandler{})}
}
// NewWithOptions returns a Client that is configured with the provided Options.
func NewWithOptions(opts *Options) *Client {
+ // Preserve original behavior for nil opts.
if opts == nil {
return defaultClient
}
+
+ // Handle explicit request for the internal default http.Client.
+ if opts.UseDefaultClient {
+ logger := opts.Logger
+ if logger == nil {
+ logger = slog.New(noOpHandler{})
+ }
+ return &Client{hc: defaultClient.hc, subClient: defaultClient.subClient, logger: logger}
+ }
+
+ // Handle isolated client creation.
client := opts.Client
+ subClient := opts.Client
if client == nil {
- client = newDefaultHTTPClient()
+ client = newDefaultHTTPClient(true)
+ subClient = newDefaultHTTPClient(false)
}
logger := opts.Logger
if logger == nil {
logger = slog.New(noOpHandler{})
}
- return &Client{hc: client, logger: logger}
+ return &Client{hc: client, subClient: subClient, logger: logger}
}
// NOTE: metadataRequestStrategy is assigned to a variable for test stubbing purposes.
@@ -469,6 +507,10 @@ func (c *Client) OnGCEWithContext(ctx context.Context) bool {
// getETag returns a value from the metadata service as well as the associated ETag.
// This func is otherwise equivalent to Get.
func (c *Client) getETag(ctx context.Context, suffix string) (value, etag string, err error) {
+ return c.getETagWithSubClient(ctx, suffix, false)
+}
+
+func (c *Client) getETagWithSubClient(ctx context.Context, suffix string, enableSubClient bool) (value, etag string, err error) {
// Using a fixed IP makes it very difficult to spoof the metadata service in
// a container, which is an important use-case for local testing of cloud
// deployments. To enable spoofing of the metadata service, the environment
@@ -495,9 +537,13 @@ func (c *Client) getETag(ctx context.Context, suffix string) (value, etag string
var reqErr error
var body []byte
retryer := newRetryer()
+ hc := c.hc
+ if enableSubClient {
+ hc = c.subClient
+ }
for {
c.logger.DebugContext(ctx, "metadata request", "request", httpRequest(req, nil))
- res, reqErr = c.hc.Do(req)
+ res, reqErr = hc.Do(req)
var code int
if res != nil {
code = res.StatusCode
@@ -843,7 +889,7 @@ func (c *Client) SubscribeWithContext(ctx context.Context, suffix string, fn fun
const failedSubscribeSleep = time.Second * 5
// First check to see if the metadata value exists at all.
- val, lastETag, err := c.getETag(ctx, suffix)
+ val, lastETag, err := c.getETagWithSubClient(ctx, suffix, true)
if err != nil {
return err
}
@@ -859,8 +905,11 @@ func (c *Client) SubscribeWithContext(ctx context.Context, suffix string, fn fun
suffix += "?wait_for_change=true&last_etag="
}
for {
- val, etag, err := c.getETag(ctx, suffix+url.QueryEscape(lastETag))
+ val, etag, err := c.getETagWithSubClient(ctx, suffix+url.QueryEscape(lastETag), true)
if err != nil {
+ if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {
+ return err
+ }
if _, deleted := err.(NotDefinedError); !deleted {
time.Sleep(failedSubscribeSleep)
continue // Retry on other errors.
diff --git a/hack/tools/vendor/cloud.google.com/go/compute/metadata/retry.go b/hack/tools/vendor/cloud.google.com/go/compute/metadata/retry.go
index 3d4bc75ddf26..d516f30f8050 100644
--- a/hack/tools/vendor/cloud.google.com/go/compute/metadata/retry.go
+++ b/hack/tools/vendor/cloud.google.com/go/compute/metadata/retry.go
@@ -95,6 +95,9 @@ func shouldRetry(status int, err error) bool {
if 500 <= status && status <= 599 {
return true
}
+ if status == http.StatusTooManyRequests {
+ return true
+ }
if err == io.ErrUnexpectedEOF {
return true
}
diff --git a/hack/tools/vendor/cloud.google.com/go/internal/.repo-metadata-full.json b/hack/tools/vendor/cloud.google.com/go/internal/.repo-metadata-full.json
index 655773bf1e11..eaa1dab09395 100644
--- a/hack/tools/vendor/cloud.google.com/go/internal/.repo-metadata-full.json
+++ b/hack/tools/vendor/cloud.google.com/go/internal/.repo-metadata-full.json
@@ -539,6 +539,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/bigquery/datapolicies/apiv2beta1": {
+ "api_shortname": "bigquerydatapolicy",
+ "distribution_name": "cloud.google.com/go/bigquery/datapolicies/apiv2beta1",
+ "description": "BigQuery Data Policy API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/bigquery/latest/datapolicies/apiv2beta1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/bigquery/datatransfer/apiv1": {
"api_shortname": "bigquerydatatransfer",
"distribution_name": "cloud.google.com/go/bigquery/datatransfer/apiv1",
@@ -939,6 +949,26 @@
"release_level": "stable",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/configdelivery/apiv1": {
+ "api_shortname": "configdelivery",
+ "distribution_name": "cloud.google.com/go/configdelivery/apiv1",
+ "description": "Config Delivery API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/configdelivery/latest/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
+ "cloud.google.com/go/configdelivery/apiv1beta": {
+ "api_shortname": "configdelivery",
+ "distribution_name": "cloud.google.com/go/configdelivery/apiv1beta",
+ "description": "Config Delivery API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/configdelivery/latest/apiv1beta",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/contactcenterinsights/apiv1": {
"api_shortname": "contactcenterinsights",
"distribution_name": "cloud.google.com/go/contactcenterinsights/apiv1",
@@ -1639,6 +1669,16 @@
"release_level": "stable",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/licensemanager/apiv1": {
+ "api_shortname": "licensemanager",
+ "distribution_name": "cloud.google.com/go/licensemanager/apiv1",
+ "description": "License Manager API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/licensemanager/latest/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/lifesciences/apiv2beta": {
"api_shortname": "lifesciences",
"distribution_name": "cloud.google.com/go/lifesciences/apiv2beta",
@@ -1719,6 +1759,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/managedkafka/schemaregistry/apiv1": {
+ "api_shortname": "managedkafka",
+ "distribution_name": "cloud.google.com/go/managedkafka/schemaregistry/apiv1",
+ "description": "Managed Service for Apache Kafka API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/managedkafka/latest/schemaregistry/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/maps/addressvalidation/apiv1": {
"api_shortname": "addressvalidation",
"distribution_name": "cloud.google.com/go/maps/addressvalidation/apiv1",
@@ -2249,23 +2299,13 @@
"release_level": "stable",
"library_type": "GAPIC_MANUAL"
},
- "cloud.google.com/go/pubsub/v2": {
- "api_shortname": "pubsub",
- "distribution_name": "cloud.google.com/go/pubsub/v2",
- "description": "Cloud Pub/Sub API",
- "language": "go",
- "client_library_type": "manual",
- "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/pubsub/latest/v2",
- "release_level": "stable",
- "library_type": "GAPIC_MANUAL"
- },
"cloud.google.com/go/pubsub/v2/apiv1": {
"api_shortname": "pubsub",
"distribution_name": "cloud.google.com/go/pubsub/v2/apiv1",
"description": "Cloud Pub/Sub API",
"language": "go",
"client_library_type": "generated",
- "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/pubsub/latest/v2/apiv1",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/pubsub/v2/latest/apiv1",
"release_level": "stable",
"library_type": "GAPIC_AUTO"
},
@@ -2679,6 +2719,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/shopping/merchant/accounts/apiv1": {
+ "api_shortname": "merchantapi",
+ "distribution_name": "cloud.google.com/go/shopping/merchant/accounts/apiv1",
+ "description": "Merchant API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/accounts/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/shopping/merchant/accounts/apiv1beta": {
"api_shortname": "merchantapi",
"distribution_name": "cloud.google.com/go/shopping/merchant/accounts/apiv1beta",
@@ -2689,6 +2739,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/shopping/merchant/conversions/apiv1": {
+ "api_shortname": "merchantapi",
+ "distribution_name": "cloud.google.com/go/shopping/merchant/conversions/apiv1",
+ "description": "Merchant API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/conversions/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/shopping/merchant/conversions/apiv1beta": {
"api_shortname": "merchantapi",
"distribution_name": "cloud.google.com/go/shopping/merchant/conversions/apiv1beta",
@@ -2699,6 +2759,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/shopping/merchant/datasources/apiv1": {
+ "api_shortname": "merchantapi",
+ "distribution_name": "cloud.google.com/go/shopping/merchant/datasources/apiv1",
+ "description": "Merchant API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/datasources/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/shopping/merchant/datasources/apiv1beta": {
"api_shortname": "merchantapi",
"distribution_name": "cloud.google.com/go/shopping/merchant/datasources/apiv1beta",
@@ -2709,6 +2779,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/shopping/merchant/inventories/apiv1": {
+ "api_shortname": "merchantapi",
+ "distribution_name": "cloud.google.com/go/shopping/merchant/inventories/apiv1",
+ "description": "Merchant API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/inventories/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/shopping/merchant/inventories/apiv1beta": {
"api_shortname": "merchantapi",
"distribution_name": "cloud.google.com/go/shopping/merchant/inventories/apiv1beta",
@@ -2719,6 +2799,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/shopping/merchant/issueresolution/apiv1": {
+ "api_shortname": "merchantapi",
+ "distribution_name": "cloud.google.com/go/shopping/merchant/issueresolution/apiv1",
+ "description": "Merchant API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/issueresolution/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/shopping/merchant/issueresolution/apiv1beta": {
"api_shortname": "merchantapi",
"distribution_name": "cloud.google.com/go/shopping/merchant/issueresolution/apiv1beta",
@@ -2729,6 +2819,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/shopping/merchant/lfp/apiv1": {
+ "api_shortname": "merchantapi",
+ "distribution_name": "cloud.google.com/go/shopping/merchant/lfp/apiv1",
+ "description": "Merchant API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/lfp/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/shopping/merchant/lfp/apiv1beta": {
"api_shortname": "merchantapi",
"distribution_name": "cloud.google.com/go/shopping/merchant/lfp/apiv1beta",
@@ -2739,6 +2839,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/shopping/merchant/notifications/apiv1": {
+ "api_shortname": "merchantapi",
+ "distribution_name": "cloud.google.com/go/shopping/merchant/notifications/apiv1",
+ "description": "Merchant API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/notifications/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/shopping/merchant/notifications/apiv1beta": {
"api_shortname": "merchantapi",
"distribution_name": "cloud.google.com/go/shopping/merchant/notifications/apiv1beta",
@@ -2749,6 +2859,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/shopping/merchant/ordertracking/apiv1": {
+ "api_shortname": "merchantapi",
+ "distribution_name": "cloud.google.com/go/shopping/merchant/ordertracking/apiv1",
+ "description": "Merchant API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/ordertracking/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/shopping/merchant/ordertracking/apiv1beta": {
"api_shortname": "merchantapi",
"distribution_name": "cloud.google.com/go/shopping/merchant/ordertracking/apiv1beta",
@@ -2759,6 +2879,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/shopping/merchant/products/apiv1": {
+ "api_shortname": "merchantapi",
+ "distribution_name": "cloud.google.com/go/shopping/merchant/products/apiv1",
+ "description": "Merchant API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/products/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/shopping/merchant/products/apiv1beta": {
"api_shortname": "merchantapi",
"distribution_name": "cloud.google.com/go/shopping/merchant/products/apiv1beta",
@@ -2769,6 +2899,26 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/shopping/merchant/productstudio/apiv1alpha": {
+ "api_shortname": "merchantapi",
+ "distribution_name": "cloud.google.com/go/shopping/merchant/productstudio/apiv1alpha",
+ "description": "Merchant API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/productstudio/apiv1alpha",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
+ "cloud.google.com/go/shopping/merchant/promotions/apiv1": {
+ "api_shortname": "merchantapi",
+ "distribution_name": "cloud.google.com/go/shopping/merchant/promotions/apiv1",
+ "description": "Merchant API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/promotions/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/shopping/merchant/promotions/apiv1beta": {
"api_shortname": "merchantapi",
"distribution_name": "cloud.google.com/go/shopping/merchant/promotions/apiv1beta",
@@ -2779,6 +2929,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/shopping/merchant/quota/apiv1": {
+ "api_shortname": "merchantapi",
+ "distribution_name": "cloud.google.com/go/shopping/merchant/quota/apiv1",
+ "description": "Merchant API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/quota/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/shopping/merchant/quota/apiv1beta": {
"api_shortname": "merchantapi",
"distribution_name": "cloud.google.com/go/shopping/merchant/quota/apiv1beta",
@@ -2789,6 +2949,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
+ "cloud.google.com/go/shopping/merchant/reports/apiv1": {
+ "api_shortname": "merchantapi",
+ "distribution_name": "cloud.google.com/go/shopping/merchant/reports/apiv1",
+ "description": "Merchant API",
+ "language": "go",
+ "client_library_type": "generated",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/reports/apiv1",
+ "release_level": "preview",
+ "library_type": "GAPIC_AUTO"
+ },
"cloud.google.com/go/shopping/merchant/reports/apiv1beta": {
"api_shortname": "merchantapi",
"distribution_name": "cloud.google.com/go/shopping/merchant/reports/apiv1beta",
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/.repo-metadata.json b/hack/tools/vendor/cloud.google.com/go/storage/.repo-metadata.json
new file mode 100644
index 000000000000..3eed725e335b
--- /dev/null
+++ b/hack/tools/vendor/cloud.google.com/go/storage/.repo-metadata.json
@@ -0,0 +1,10 @@
+{
+ "api_shortname": "storage",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/storage/latest",
+ "client_library_type": "manual",
+ "description": "Cloud Storage (GCS)",
+ "distribution_name": "cloud.google.com/go/storage",
+ "language": "go",
+ "library_type": "GAPIC_MANUAL",
+ "release_level": "stable"
+}
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/CHANGES.md b/hack/tools/vendor/cloud.google.com/go/storage/CHANGES.md
index cbe212871ffb..8333598e22b5 100644
--- a/hack/tools/vendor/cloud.google.com/go/storage/CHANGES.md
+++ b/hack/tools/vendor/cloud.google.com/go/storage/CHANGES.md
@@ -1,6 +1,58 @@
# Changes
+## [1.57.2](https://github.com/googleapis/google-cloud-go/releases/tag/storage%2Fv1.57.2) (2025-11-14)
+
+### Bug Fixes
+
+* Handle redirect on takeover. (#13354) ([b0f1362](https://github.com/googleapis/google-cloud-go/commit/b0f136268be1e4c629e288353bc277549ac5c663))
+* add env var to allow disabling bound token (#13236) ([cdaf6a6](https://github.com/googleapis/google-cloud-go/commit/cdaf6a6da006a19db932a74885ea3722b4e42311))
+
+### Documentation
+
+* updates to docs and docs formatting ([93ca68d](https://github.com/googleapis/google-cloud-go/commit/93ca68d54b6d213f22e0d67ae01d135cf26d37c6))
+
+## [1.57.1](https://github.com/googleapis/google-cloud-go/compare/storage/v1.57.0...storage/v1.57.1) (2025-10-28)
+
+
+### Bug Fixes
+* **storage:** Takeover idempotence ([#13230](https://github.com/googleapis/google-cloud-go/issues/13230)) ([cc5d2a1](https://github.com/googleapis/google-cloud-go/commit/cc5d2a12293a509a14da9bea8a86c8655eaf4a71))
+* **storage:** Copy metadata when using Copier with grpc ([#12919](https://github.com/googleapis/google-cloud-go/issues/12919)) ([57a2e80](https://github.com/googleapis/google-cloud-go/commit/57a2e804f690ec8d4c55fd1c73b0dafd5cff46e5))
+* **storage:** Fix takeover response handling ([#13239](https://github.com/googleapis/google-cloud-go/issues/13239)) ([26d75bc](https://github.com/googleapis/google-cloud-go/commit/26d75bc08e242348d26691877aba7fa68cf30f7f))
+* **storage:** Remove default timeout for gRPC operations ([#13022](https://github.com/googleapis/google-cloud-go/issues/13022)) ([b94c3ba](https://github.com/googleapis/google-cloud-go/commit/b94c3ba69994d9c56ae8f302449dd8df6f287296))
+* **storage:** Skip download of file outside of target dir ([#12945](https://github.com/googleapis/google-cloud-go/issues/12945)) ([6259aee](https://github.com/googleapis/google-cloud-go/commit/6259aeec393d0d996961cac38396daa57ad1a290))
+* **storage:** Upgrade gRPC service registration func ([8fffca2](https://github.com/googleapis/google-cloud-go/commit/8fffca2819fa3dc858c213aa0c503e0df331b084))
+
+## [1.57.0](https://github.com/googleapis/google-cloud-go/compare/storage/v1.56.1...storage/v1.57.0) (2025-09-23)
+
+
+### Features
+
+* **storage/control:** Add new GetIamPolicy, SetIamPolicy, and TestIamPermissions RPCs ([d73f912](https://github.com/googleapis/google-cloud-go/commit/d73f9123be77bb3278f48d510cd0fb22feb605bc))
+* **storage:** Post support dynamic key name ([#12677](https://github.com/googleapis/google-cloud-go/issues/12677)) ([9e761f9](https://github.com/googleapis/google-cloud-go/commit/9e761f961a2c4351b3e0793ed655314ac5853903))
+* **storage:** WithMeterProvider allows custom meter provider configuration ([#12668](https://github.com/googleapis/google-cloud-go/issues/12668)) ([7f574b0](https://github.com/googleapis/google-cloud-go/commit/7f574b01e0b454c1ef5c13e6a58075e394ee990d))
+
+
+### Bug Fixes
+
+* **storage:** Free buffers in Bidi Reader ([#12839](https://github.com/googleapis/google-cloud-go/issues/12839)) ([bc247fd](https://github.com/googleapis/google-cloud-go/commit/bc247fdc3f5234a8bd6934e58d5b0b578f1335cb))
+* **storage:** Make Writer thread-safe. ([#12753](https://github.com/googleapis/google-cloud-go/issues/12753)) ([9ea380b](https://github.com/googleapis/google-cloud-go/commit/9ea380bea5b980a9054d201be4f315a195da2182))
+* **storage:** No progress report for oneshot write ([#12746](https://github.com/googleapis/google-cloud-go/issues/12746)) ([b97c286](https://github.com/googleapis/google-cloud-go/commit/b97c286ec369a10a81b1a8a3a1aae18b46d2dfbc))
+
+
+### Performance Improvements
+
+* **storage:** Pipeline gRPC writes ([#12422](https://github.com/googleapis/google-cloud-go/issues/12422)) ([1f2c5fe](https://github.com/googleapis/google-cloud-go/commit/1f2c5fe2843724302086fe04cb8dab8b515969c5))
+
+## [1.56.1](https://github.com/googleapis/google-cloud-go/compare/storage/v1.56.0...storage/v1.56.1) (2025-08-19)
+
+
+### Bug Fixes
+
+* **storage:** Fix redirect logic in MRD ([#12733](https://github.com/googleapis/google-cloud-go/issues/12733)) ([9f369f9](https://github.com/googleapis/google-cloud-go/commit/9f369f931853220550cabb3d67a5a5d3d9e137ba))
+* **storage:** Pass all user options to NewService ([#12615](https://github.com/googleapis/google-cloud-go/issues/12615)) ([77cdb83](https://github.com/googleapis/google-cloud-go/commit/77cdb832a374eba29e4de7699324a87f1d20eea3))
+* **storage:** ZB Reader redirect support ([#12703](https://github.com/googleapis/google-cloud-go/issues/12703)) ([3c7ea5c](https://github.com/googleapis/google-cloud-go/commit/3c7ea5ceb199d5787d36bf8f415f028bea66e3b5))
+
## [1.56.0](https://github.com/googleapis/google-cloud-go/compare/storage/v1.55.0...storage/v1.56.0) (2025-07-24)
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/bucket.go b/hack/tools/vendor/cloud.google.com/go/storage/bucket.go
index 60a5ffb5b314..a8e56ed17374 100644
--- a/hack/tools/vendor/cloud.google.com/go/storage/bucket.go
+++ b/hack/tools/vendor/cloud.google.com/go/storage/bucket.go
@@ -225,6 +225,11 @@ func (b *BucketHandle) SignedURL(object string, opts *SignedURLOptions) (string,
// to be non-nil. You may need to set the GoogleAccessID and PrivateKey fields
// in some cases. Read more on the [automatic detection of credentials] for this method.
//
+// To allow the unauthenticated client to upload to any object name in the
+// bucket with a given prefix rather than a specific object name, you can pass
+// an empty string for object and set [PostPolicyV4Options].Conditions to
+// include [ConditionStartsWith]("$key", "prefix").
+//
// [automatic detection of credentials]: https://pkg.go.dev/cloud.google.com/go/storage#hdr-Credential_requirements_for_signing
func (b *BucketHandle) GenerateSignedPostPolicyV4(object string, opts *PostPolicyV4Options) (*PostPolicyV4, error) {
// Make a copy of opts so we don't modify the pointer parameter.
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/copy.go b/hack/tools/vendor/cloud.google.com/go/storage/copy.go
index a0b9a2683c7e..d10e377ffe5d 100644
--- a/hack/tools/vendor/cloud.google.com/go/storage/copy.go
+++ b/hack/tools/vendor/cloud.google.com/go/storage/copy.go
@@ -18,8 +18,6 @@ import (
"context"
"errors"
"fmt"
-
- "cloud.google.com/go/internal/trace"
)
// CopierFrom creates a Copier that can copy src to dst.
@@ -82,8 +80,8 @@ type Copier struct {
// Run performs the copy.
func (c *Copier) Run(ctx context.Context) (attrs *ObjectAttrs, err error) {
- ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Copier.Run")
- defer func() { trace.EndSpan(ctx, err) }()
+ ctx, _ = startSpan(ctx, "Copier.Run")
+ defer func() { endSpan(ctx, err) }()
if err := c.src.validate(); err != nil {
return nil, err
@@ -180,8 +178,8 @@ type Composer struct {
// Run performs the compose operation.
func (c *Composer) Run(ctx context.Context) (attrs *ObjectAttrs, err error) {
- ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Composer.Run")
- defer func() { trace.EndSpan(ctx, err) }()
+ ctx, _ = startSpan(ctx, "Composer.Run")
+ defer func() { endSpan(ctx, err) }()
if err := c.dst.validate(); err != nil {
return nil, err
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/doc.go b/hack/tools/vendor/cloud.google.com/go/storage/doc.go
index 6a64c6c03b21..3726432c86f1 100644
--- a/hack/tools/vendor/cloud.google.com/go/storage/doc.go
+++ b/hack/tools/vendor/cloud.google.com/go/storage/doc.go
@@ -364,7 +364,7 @@ to add a [custom audit logging] header:
This package includes support for the [Cloud Storage gRPC API]. This
implementation uses gRPC rather than the default JSON & XML APIs
to make requests to Cloud Storage. All methods on the [Client] support
-the gRPC API, with the exception of [GetServiceAccount], [Notification],
+the gRPC API, with the exception of the [Client.ServiceAccount], [Notification],
and [HMACKey] methods.
The Cloud Storage gRPC API is generally available.
@@ -390,7 +390,10 @@ Requirements to use Direct Connectivity include:
- Your client must use service account authentication.
Additional requirements for Direct Connectivity are documented in the
-[Cloud Storage gRPC docs].
+[Cloud Storage gRPC docs]. If all requirements are met, the client will
+use Direct Connectivity by default without requiring any client options
+or environment variables. To disable Direct Connectivity, you can set
+the environment variable GOOGLE_CLOUD_DISABLE_DIRECT_PATH=true.
Dependencies for the gRPC API may slightly increase the size of binaries for
applications depending on this package. If you are not using gRPC, you can use
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/experimental/experimental.go b/hack/tools/vendor/cloud.google.com/go/storage/experimental/experimental.go
index a178f9ebb31b..819e105d70c2 100644
--- a/hack/tools/vendor/cloud.google.com/go/storage/experimental/experimental.go
+++ b/hack/tools/vendor/cloud.google.com/go/storage/experimental/experimental.go
@@ -33,17 +33,25 @@ import (
// It sets how often to emit metrics [metric.WithInterval] when using
// [metric.NewPeriodicReader]
// When using Cloud Monitoring interval must be at minimum 1 [time.Minute].
+// This option is ignored if WithMeterProvider is also set.
func WithMetricInterval(metricInterval time.Duration) option.ClientOption {
return internal.WithMetricInterval.(func(time.Duration) option.ClientOption)(metricInterval)
}
// WithMetricExporter provides a [option.ClientOption] that may be passed to [storage.NewGRPCClient].
// Set an alternate client-side metric Exporter to emit metrics through.
-// Must implement [metric.Exporter]
+// Must implement [metric.Exporter]. This option is ignored if WithMeterProvider is also set.
func WithMetricExporter(ex *metric.Exporter) option.ClientOption {
return internal.WithMetricExporter.(func(*metric.Exporter) option.ClientOption)(ex)
}
+// WithMeterProvider provides a [option.ClientOption] that may be passed to [storage.NewGRPCClient].
+// Set an alternate client-side meter provider to emit metrics through.
+// This option takes precedence over WithMetricExporter and WithMetricInterval.
+func WithMeterProvider(mp *metric.MeterProvider) option.ClientOption {
+ return internal.WithMeterProvider.(func(*metric.MeterProvider) option.ClientOption)(mp)
+}
+
// WithReadStallTimeout provides a [option.ClientOption] that may be passed to [storage.NewClient].
// It enables the client to retry stalled requests when starting a download from
// Cloud Storage. If the timeout elapses with no response from the server, the request
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/grpc_client.go b/hack/tools/vendor/cloud.google.com/go/storage/grpc_client.go
index 19c969f73929..70d623b655ca 100644
--- a/hack/tools/vendor/cloud.google.com/go/storage/grpc_client.go
+++ b/hack/tools/vendor/cloud.google.com/go/storage/grpc_client.go
@@ -23,10 +23,10 @@ import (
"io"
"log"
"os"
+ "strconv"
"sync"
"cloud.google.com/go/iam/apiv1/iampb"
- "cloud.google.com/go/internal/trace"
gapic "cloud.google.com/go/storage/internal/apiv2"
"cloud.google.com/go/storage/internal/apiv2/storagepb"
"github.com/googleapis/gax-go/v2"
@@ -100,9 +100,12 @@ func defaultGRPCOptions() []option.ClientOption {
} else {
// Only enable DirectPath when the emulator is not being targeted.
defaults = append(defaults,
- internaloption.EnableDirectPath(true),
internaloption.AllowNonDefaultServiceAccount(true),
+ internaloption.EnableDirectPath(true),
internaloption.EnableDirectPathXds())
+ if disableBoundToken, _ := strconv.ParseBool(os.Getenv("STORAGE_DISABLE_DIRECTPATH_BOUND_TOKEN")); !disableBoundToken {
+ defaults = append(defaults, internaloption.AllowHardBoundTokens("ALTS"))
+ }
}
return defaults
@@ -124,9 +127,11 @@ func enableClientMetrics(ctx context.Context, s *settings, config storageConfig)
project = c.ProjectID
}
metricsContext, err := newGRPCMetricContext(ctx, metricsConfig{
- project: project,
- interval: config.metricInterval,
- manualReader: config.manualReader},
+ project: project,
+ interval: config.metricInterval,
+ manualReader: config.manualReader,
+ meterProvider: config.meterProvider,
+ },
)
if err != nil {
return nil, fmt.Errorf("gRPC Metrics: %w", err)
@@ -140,7 +145,7 @@ func newGRPCStorageClient(ctx context.Context, opts ...storageOption) (*grpcStor
s := initSettings(opts...)
s.clientOption = append(defaultGRPCOptions(), s.clientOption...)
// Disable all gax-level retries in favor of retry logic in the veneer client.
- s.gax = append(s.gax, gax.WithRetry(nil))
+ s.gax = append(s.gax, gax.WithRetry(nil), gax.WithTimeout(0))
config := newStorageConfig(s.clientOption...)
if config.readAPIWasSet {
@@ -950,14 +955,24 @@ func (c *grpcStorageClient) ComposeObject(ctx context.Context, req *composeObjec
}
func (c *grpcStorageClient) RewriteObject(ctx context.Context, req *rewriteObjectRequest, opts ...storageOption) (*rewriteObjectResponse, error) {
s := callSettings(c.settings, opts...)
- obj := req.dstObject.attrs.toProtoObject("")
+
+ var dst *storagepb.Object
+ // If the destination object attributes are not set, do not include them
+ // in the request. This indicates that the object attributes should be
+ // copied from the source object.
+ if req.dstObject.attrs.isZero() {
+ dst = nil
+ } else {
+ dst = req.dstObject.attrs.toProtoObject("")
+ }
+
call := &storagepb.RewriteObjectRequest{
SourceBucket: bucketResourceName(globalProjectAlias, req.srcObject.bucket),
SourceObject: req.srcObject.name,
RewriteToken: req.token,
DestinationBucket: bucketResourceName(globalProjectAlias, req.dstObject.bucket),
DestinationName: req.dstObject.name,
- Destination: obj,
+ Destination: dst,
DestinationKmsKey: req.dstObject.keyName,
DestinationPredefinedAcl: req.predefinedACL,
CommonObjectRequestParams: toProtoCommonObjectRequestParams(req.dstObject.encryptionKey),
@@ -1066,8 +1081,8 @@ func (c *grpcStorageClient) NewMultiRangeDownloader(ctx context.Context, params
return nil, errors.New("storage: MultiRangeDownloader requires the experimental.WithGRPCBidiReads option")
}
- ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.grpcStorageClient.NewMultiRangeDownloader")
- defer func() { trace.EndSpan(ctx, err) }()
+ ctx, _ = startSpan(ctx, "grpcStorageClient.NewMultiRangeDownloader")
+ defer func() { endSpan(ctx, err) }()
s := callSettings(c.settings, opts...)
// Force the use of the custom codec to enable zero-copy reads.
s.gax = append(s.gax, gax.WithGRPCOptions(
@@ -1100,8 +1115,6 @@ func (c *grpcStorageClient) NewMultiRangeDownloader(ctx context.Context, params
ReadObjectSpec: bidiObject,
}
- ctx = gax.InsertMetadataIntoOutgoingContext(ctx, contextMetadataFromBidiReadObject(req)...)
-
openStream := func(readHandle ReadHandle) (*bidiReadStreamResponse, context.CancelFunc, error) {
if err := applyCondsProto("grpcStorageClient.BidiReadObject", params.gen, params.conds, bidiObject); err != nil {
return nil, nil, err
@@ -1111,36 +1124,53 @@ func (c *grpcStorageClient) NewMultiRangeDownloader(ctx context.Context, params
Handle: readHandle,
}
}
+ databufs := mem.BufferSlice{}
+
var stream storagepb.Storage_BidiReadObjectClient
var decoder *readResponseDecoder
cc, cancel := context.WithCancel(ctx)
err = run(cc, func(ctx context.Context) error {
- stream, err = c.raw.BidiReadObject(ctx, s.gax...)
- if err != nil {
+ openAndSendReq := func() error {
+ mdCtx := gax.InsertMetadataIntoOutgoingContext(ctx, contextMetadataFromBidiReadObject(req)...)
+
+ stream, err = c.raw.BidiReadObject(mdCtx, s.gax...)
+ if err != nil {
+ return err
+ }
+ // If stream opened succesfully, send first message on the stream.
+ // First message to stream should contain read_object_spec
+ err = stream.Send(req)
+ if err != nil {
+ return err
+ }
+ // Use RecvMsg to get the raw buffer slice instead of Recv().
+ err = stream.RecvMsg(&databufs)
+ if err != nil {
+ return err
+ }
+ return nil
+ }
+
+ err := openAndSendReq()
+
+ // We might get a redirect error here for an out-of-region request.
+ // Add the routing token and read handle to the request and do one
+ // retry.
+ if st, ok := status.FromError(err); ok && st.Code() == codes.Aborted {
// BidiReadObjectRedirectedError error is only returned on initial open in case of a redirect.
// The routing token that should be used when reopening the read stream. Needs to be exported.
- rpcStatus := status.Convert(err)
- details := rpcStatus.Details()
- for _, detail := range details {
+ for _, detail := range st.Details() {
if bidiError, ok := detail.(*storagepb.BidiReadObjectRedirectedError); ok {
bidiObject.ReadHandle = bidiError.ReadHandle
bidiObject.RoutingToken = bidiError.RoutingToken
- req.ReadObjectSpec = bidiObject
- ctx = gax.InsertMetadataIntoOutgoingContext(ctx, contextMetadataFromBidiReadObject(req)...)
+ databufs = mem.BufferSlice{}
+ err = openAndSendReq()
+ break
}
}
- return err
- }
- // Incase stream opened succesfully, send first message on the stream.
- // First message to stream should contain read_object_spec
- err = stream.Send(req)
- if err != nil {
- return err
}
- // Use RecvMsg to get the raw buffer slice instead of Recv().
- databufs := mem.BufferSlice{}
- err = stream.RecvMsg(&databufs)
if err != nil {
+ databufs.Free()
return err
}
@@ -1596,8 +1626,8 @@ func (c *grpcStorageClient) NewRangeReader(ctx context.Context, params *newRange
return c.NewRangeReaderReadObject(ctx, params, opts...)
}
- ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.grpcStorageClient.NewRangeReader")
- defer func() { trace.EndSpan(ctx, err) }()
+ ctx, _ = startSpan(ctx, "grpcStorageClient.NewRangeReader")
+ defer func() { endSpan(ctx, err) }()
s := callSettings(c.settings, opts...)
@@ -1628,7 +1658,6 @@ func (c *grpcStorageClient) NewRangeReader(ctx context.Context, params *newRange
req := &storagepb.BidiReadObjectRequest{
ReadObjectSpec: spec,
}
- ctx = gax.InsertMetadataIntoOutgoingContext(ctx, contextMetadataFromBidiReadObject(req)...)
// Define a function that initiates a Read with offset and length, assuming
// we have already read seen bytes.
@@ -1660,28 +1689,53 @@ func (c *grpcStorageClient) NewRangeReader(ctx context.Context, params *newRange
var decoder *readResponseDecoder
err = run(cc, func(ctx context.Context) error {
- stream, err = c.raw.BidiReadObject(ctx, s.gax...)
- if err != nil {
- return err
- }
- if err := stream.Send(req); err != nil {
- return err
+ var databufs mem.BufferSlice
+ openAndSendReq := func() error {
+ databufs = mem.BufferSlice{}
+
+ // Insert context metadata, including routing token if this is a retry
+ // for a redirect.
+ mdCtx := gax.InsertMetadataIntoOutgoingContext(ctx, contextMetadataFromBidiReadObject(req)...)
+ stream, err = c.raw.BidiReadObject(mdCtx, s.gax...)
+ if err != nil {
+ return err
+ }
+ if err := stream.Send(req); err != nil {
+ return err
+ }
+ // Oneshot reads can close the client->server side immediately.
+ if err := stream.CloseSend(); err != nil {
+ return err
+ }
+
+ // Receive the message into databuf as a wire-encoded message so we can
+ // use a custom decoder to avoid an extra copy at the protobuf layer.
+ return stream.RecvMsg(&databufs)
}
- // Oneshot reads can close the client->server side immediately.
- if err := stream.CloseSend(); err != nil {
- return err
+
+ err := openAndSendReq()
+
+ // We might get a redirect error here for an out-of-region request.
+ // Add the routing token and read handle to the request and do one
+ // retry.
+ if st, ok := status.FromError(err); ok && st.Code() == codes.Aborted {
+ for _, d := range st.Details() {
+ if e, ok := d.(*storagepb.BidiReadObjectRedirectedError); ok {
+ req.ReadObjectSpec.ReadHandle = e.GetReadHandle()
+ req.ReadObjectSpec.RoutingToken = e.RoutingToken
+ err = openAndSendReq()
+ break
+ }
+ }
}
- // Receive the message into databuf as a wire-encoded message so we can
- // use a custom decoder to avoid an extra copy at the protobuf layer.
- databufs := mem.BufferSlice{}
- err := stream.RecvMsg(&databufs)
// These types of errors show up on the RecvMsg call, rather than the
// initialization of the stream via BidiReadObject above.
if s, ok := status.FromError(err); ok && s.Code() == codes.NotFound {
- return formatObjectErr(err)
+ err = formatObjectErr(err)
}
if err != nil {
+ databufs.Free()
return err
}
// Use a custom decoder that uses protobuf unmarshalling for all
@@ -1989,6 +2043,10 @@ func (r *gRPCReader) Read(p []byte) (int, error) {
n, found := r.currMsg.readAndUpdateCRC(p, 1, func(b []byte) {
r.updateCRC(b)
})
+ // If we are done reading the current msg, free buffers.
+ if r.currMsg.done {
+ r.currMsg.databufs.Free()
+ }
// If data for our readID was found, we can update `seen` and return.
if found {
@@ -2041,6 +2099,8 @@ func (r *gRPCReader) WriteTo(w io.Writer) (int64, error) {
r.updateCRC(b)
})
r.seen += written
+ // We have processed the message, so free the buffer
+ r.currMsg.databufs.Free()
if err != nil {
return r.seen - alreadySeen, err
}
@@ -2093,7 +2153,9 @@ func (r *gRPCReader) Close() error {
func (r *gRPCReader) recv() error {
databufs := mem.BufferSlice{}
err := r.stream.RecvMsg(&databufs)
- if err != nil && r.settings.retry.runShouldRetry(err) {
+ // If we get a mid-stream error on a recv call, reopen the stream.
+ // ABORTED could indicate a redirect so should also trigger a reopen.
+ if err != nil && (r.settings.retry.runShouldRetry(err) || status.Code(err) == codes.Aborted) {
// This will "close" the existing stream and immediately attempt to
// reopen the stream, but will backoff if further attempts are necessary.
// Reopening the stream Recvs the first message, so if retrying is
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/grpc_metrics.go b/hack/tools/vendor/cloud.google.com/go/storage/grpc_metrics.go
index f7bebd1defa7..0442101574e3 100644
--- a/hack/tools/vendor/cloud.google.com/go/storage/grpc_metrics.go
+++ b/hack/tools/vendor/cloud.google.com/go/storage/grpc_metrics.go
@@ -126,6 +126,7 @@ type metricsConfig struct {
project string
interval time.Duration
customExporter *metric.Exporter
+ meterProvider *metric.MeterProvider
manualReader *metric.ManualReader // used by tests
disableExporter bool // used by tests disables exports
resourceOpts []resource.Option // used by tests
@@ -172,7 +173,10 @@ func newGRPCMetricContext(ctx context.Context, cfg metricsConfig) (*metricsConte
meterOpts = append(meterOpts, metric.WithReader(
metric.NewPeriodicReader(&exporterLogSuppressor{Exporter: exporter}, metric.WithInterval(interval))))
}
- provider := metric.NewMeterProvider(meterOpts...)
+ provider := cfg.meterProvider
+ if provider == nil {
+ provider = metric.NewMeterProvider(meterOpts...)
+ }
mo := opentelemetry.MetricsOptions{
MeterProvider: provider,
Metrics: stats.NewMetrics(
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/grpc_reader.go b/hack/tools/vendor/cloud.google.com/go/storage/grpc_reader.go
index 14ec5048d8fc..0fd848cad6a8 100644
--- a/hack/tools/vendor/cloud.google.com/go/storage/grpc_reader.go
+++ b/hack/tools/vendor/cloud.google.com/go/storage/grpc_reader.go
@@ -22,7 +22,6 @@ import (
"hash/crc32"
"io"
- "cloud.google.com/go/internal/trace"
"cloud.google.com/go/storage/internal/apiv2/storagepb"
"github.com/googleapis/gax-go/v2"
"google.golang.org/grpc"
@@ -83,8 +82,8 @@ func (bytesCodecReadObject) Name() string {
// NewRangeReaderReadObject is the legacy (non-bidi) implementation of reads.
func (c *grpcStorageClient) NewRangeReaderReadObject(ctx context.Context, params *newRangeReaderParams, opts ...storageOption) (r *Reader, err error) {
- ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.grpcStorageClient.NewRangeReaderReadObject")
- defer func() { trace.EndSpan(ctx, err) }()
+ ctx, _ = startSpan(ctx, "grpcStorageClient.NewRangeReaderReadObject")
+ defer func() { endSpan(ctx, err) }()
s := callSettings(c.settings, opts...)
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/grpc_writer.go b/hack/tools/vendor/cloud.google.com/go/storage/grpc_writer.go
index 3d82e5951728..46e6742e4c34 100644
--- a/hack/tools/vendor/cloud.google.com/go/storage/grpc_writer.go
+++ b/hack/tools/vendor/cloud.google.com/go/storage/grpc_writer.go
@@ -19,7 +19,9 @@ import (
"errors"
"fmt"
"io"
+ "net/http"
"net/url"
+ "strings"
"time"
gapic "cloud.google.com/go/storage/internal/apiv2"
@@ -42,311 +44,745 @@ const (
maxPerMessageWriteSize int = int(storagepb.ServiceConstants_MAX_WRITE_CHUNK_BYTES)
)
-func withBidiWriteObjectRedirectionErrorRetries(s *settings) (newr *retryConfig) {
- oldr := s.retry
- newr = oldr.clone()
- if newr == nil {
- newr = &retryConfig{}
+func (w *gRPCWriter) Write(p []byte) (n int, err error) {
+ done := make(chan struct{})
+ cmd := &gRPCWriterCommandWrite{p: p, done: done}
+ select {
+ case <-w.donec:
+ return 0, w.streamResult
+ case w.writesChan <- cmd:
+ // write command successfully delivered to sender. We no longer own cmd.
+ break
}
- if (oldr.policy == RetryIdempotent && !s.idempotent) || oldr.policy == RetryNever {
- // We still retry redirection errors even when settings indicate not to
- // retry.
- //
- // The protocol requires us to respect redirection errors, so RetryNever has
- // to ignore them.
- //
- // Idempotency is always protected by redirection errors: they either
- // contain a handle which can be used as idempotency information, or they do
- // not contain a handle and are "affirmative failures" which indicate that
- // no server-side action occurred.
- newr.policy = RetryAlways
- newr.shouldRetry = func(err error) bool {
- return errors.Is(err, bidiWriteObjectRedirectionError{})
- }
- return newr
+
+ select {
+ case <-w.donec:
+ return 0, w.streamResult
+ case <-done:
+ return len(p), nil
}
- // If retry settings allow retries normally, fall back to that behavior.
- newr.shouldRetry = func(err error) bool {
- if errors.Is(err, bidiWriteObjectRedirectionError{}) {
- return true
- }
- v := oldr.runShouldRetry(err)
- return v
+}
+
+func (w *gRPCWriter) Flush() (int64, error) {
+ done := make(chan int64)
+ cmd := &gRPCWriterCommandFlush{done: done}
+ select {
+ case <-w.donec:
+ return 0, w.streamResult
+ case w.writesChan <- cmd:
+ // flush command successfully delivered to sender. We no longer own cmd.
+ break
}
- return newr
+
+ select {
+ case <-w.donec:
+ return 0, w.streamResult
+ case f := <-done:
+ return f, nil
+ }
+}
+
+func (w *gRPCWriter) Close() error {
+ w.CloseWithError(nil)
+ return w.streamResult
}
-type flushResult struct {
- err error
- offset int64
+func (w *gRPCWriter) CloseWithError(err error) error {
+ // N.B. CloseWithError always returns nil!
+ select {
+ case <-w.donec:
+ return nil
+ case w.writesChan <- &gRPCWriterCommandClose{err: err}:
+ break
+ }
+ <-w.donec
+ return nil
}
-type gRPCInternalWriter struct {
- flushSupported bool
- flushInProgress bool
+func (c *grpcStorageClient) OpenWriter(params *openWriterParams, opts ...storageOption) (internalWriter, error) {
+ if params.attrs.Retention != nil {
+ // TO-DO: remove once ObjectRetention is available - see b/308194853
+ return nil, status.Errorf(codes.Unimplemented, "storage: object retention is not supported in gRPC")
+ }
+
+ spec := &storagepb.WriteObjectSpec{
+ Resource: params.attrs.toProtoObject(params.bucket),
+ Appendable: proto.Bool(params.append),
+ }
+ // WriteObject doesn't support the generation condition, so use default.
+ if err := applyCondsProto("WriteObject", defaultGen, params.conds, spec); err != nil {
+ return nil, err
+ }
- pw *io.PipeWriter
+ s := callSettings(c.settings, opts...)
- flushComplete chan flushResult
-}
+ if s.retry == nil {
+ s.retry = defaultRetry.clone()
+ }
+ if params.append {
+ s.retry = withBidiWriteObjectRedirectionErrorRetries(s)
+ }
+
+ chunkRetryDeadline := defaultWriteChunkRetryDeadline
+ if params.chunkRetryDeadline != 0 {
+ chunkRetryDeadline = params.chunkRetryDeadline
+ }
+
+ ctx := params.ctx
+ if s.userProject != "" {
+ ctx = setUserProjectMetadata(ctx, s.userProject)
+ }
+
+ chunkSize := gRPCChunkSize(params.chunkSize)
+ writeQuantum := maxPerMessageWriteSize
+ if writeQuantum > chunkSize {
+ writeQuantum = chunkSize
+ }
+ sendableUnits := chunkSize / writeQuantum
+ // There's no strict requirement that the chunk size be an exact multiple of
+ // the writeQuantum. In that case, there will be a tail segment of less than
+ // writeQuantum.
+ lastSegmentStart := sendableUnits * writeQuantum
+ if lastSegmentStart < chunkSize {
+ sendableUnits++
+ }
+
+ if params.append && params.appendGen >= 0 && params.setTakeoverOffset == nil {
+ return nil, errors.New("storage: no way to report offset for appendable takeover")
+ }
+
+ w := &gRPCWriter{
+ preRunCtx: ctx,
+ c: c,
+ settings: s,
+
+ bucket: params.bucket,
+ attrs: params.attrs,
+ conds: params.conds,
+ spec: spec,
+ encryptionKey: params.encryptionKey,
-func (giw *gRPCInternalWriter) Flush() (int64, error) {
- if !giw.flushSupported {
- return 0, errors.New("Flush is supported only if Writer.Append is set to true")
+ setError: params.setError,
+ progress: params.progress,
+ setObj: params.setObj,
+ setSize: params.setSize,
+ setTakeoverOffset: params.setTakeoverOffset,
+
+ flushSupported: params.append,
+ sendCRC32C: params.sendCRC32C,
+ forceOneShot: params.chunkSize <= 0,
+ forceEmptyContentType: params.forceEmptyContentType,
+ append: params.append,
+ appendGen: params.appendGen,
+ finalizeOnClose: params.finalizeOnClose,
+
+ buf: make([]byte, 0, chunkSize),
+ writeQuantum: writeQuantum,
+ lastSegmentStart: lastSegmentStart,
+ sendableUnits: sendableUnits,
+ bufUnsentIdx: 0,
+ bufFlushedIdx: -1, // Handle flushes to length 0
+ bufBaseOffset: 0,
+
+ chunkRetryDeadline: chunkRetryDeadline,
+ abandonRetriesTime: time.Time{},
+ attempts: 0,
+ lastErr: nil,
+ streamSender: nil,
+
+ writesChan: make(chan gRPCWriterCommand, 1),
+ currentCommand: nil,
+ streamResult: nil,
+ donec: params.donec,
}
- giw.flushInProgress = true
- giw.pw.Close()
+ go func() {
+ if err := w.gatherFirstBuffer(); err != nil {
+ w.streamResult = err
+ w.setError(err)
+ close(w.donec)
+ return
+ }
+
+ if w.attrs.ContentType == "" && !w.forceEmptyContentType {
+ w.spec.Resource.ContentType = w.detectContentType()
+ }
+ w.streamSender = w.pickBufferSender()
+
+ w.streamResult = checkCanceled(run(w.preRunCtx, func(ctx context.Context) error {
+ w.lastErr = w.writeLoop(ctx)
+ return w.lastErr
+ }, w.settings.retry, w.settings.idempotent))
+ w.setError(w.streamResult)
+ close(w.donec)
+ }()
- // Return the offset based on flushComplete.
- r := <-giw.flushComplete
- return r.offset, r.err
+ return w, nil
}
-// Forward other methods to *io.PipeWriter
-func (giw *gRPCInternalWriter) Write(p []byte) (int, error) {
- return giw.pw.Write(p)
+// gRPCWriter is a wrapper around the the gRPC client-stream API that manages
+// sending chunks of data provided by the user over the stream.
+type gRPCWriter struct {
+ preRunCtx context.Context
+ c *grpcStorageClient
+ settings *settings
+
+ bucket string
+ attrs *ObjectAttrs
+ conds *Conditions
+ spec *storagepb.WriteObjectSpec
+ encryptionKey []byte
+
+ setError func(error)
+ progress func(int64)
+ setObj func(*ObjectAttrs)
+ setSize func(int64)
+ setTakeoverOffset func(int64)
+
+ flushSupported bool
+ sendCRC32C bool
+ forceOneShot bool
+ forceEmptyContentType bool
+ append bool
+ appendGen int64
+ finalizeOnClose bool
+
+ buf []byte
+ // A writeQuantum is the largest quantity of data which can be sent to the
+ // service in a single message.
+ writeQuantum int
+ lastSegmentStart int
+ sendableUnits int
+ bufUnsentIdx int
+ bufFlushedIdx int
+ bufBaseOffset int64
+
+ chunkRetryDeadline time.Duration
+ abandonRetriesTime time.Time
+ attempts int
+ lastErr error
+ streamSender gRPCBidiWriteBufferSender
+
+ // Communication from the user goroutine to the stream management goroutines
+ writesChan chan gRPCWriterCommand
+ currentCommand gRPCWriterCommand
+ forcedStreamResult error
+ streamResult error
+ donec chan struct{}
}
-func (giw *gRPCInternalWriter) Close() error {
- return giw.pw.Close()
+func (w *gRPCWriter) pickBufferSender() gRPCBidiWriteBufferSender {
+ if w.append {
+ // Appendable object semantics
+ if w.appendGen >= 0 {
+ return w.newGRPCAppendTakeoverWriteBufferSender()
+ }
+ return w.newGRPCAppendableObjectBufferSender()
+ }
+ if w.forceOneShot {
+ // One shot semantics - no progress reports
+ w.progress = func(int64) {}
+ return w.newGRPCOneshotBidiWriteBufferSender()
+ }
+ // Resumable write semantics
+ return w.newGRPCResumableBidiWriteBufferSender()
}
-func (giw *gRPCInternalWriter) CloseWithError(err error) error {
- return giw.pw.CloseWithError(err)
+// sendBufferToTarget uses cs to send slices of buf, which starts at baseOffset
+// bytes into the object. Slices are sent until flushAt bytes have sent, in
+// which case the final request is a flush, or until len(buf) < w.writeQuantum.
+//
+// handleCompletion is called for any completions that arrive during sends.
+//
+// Returns the last byte offset sent. Returns true if all desired requests were
+// delivered, and false if cs.completions was closed before all requests could
+// be delivered.
+func (w *gRPCWriter) sendBufferToTarget(cs gRPCWriterCommandHandleChans, buf []byte, baseOffset int64, flushAt int, handleCompletion func(gRPCBidiWriteCompletion)) (int64, bool) {
+ sent := 0
+ if len(buf) > flushAt {
+ buf = buf[:flushAt]
+ }
+ for len(buf) > 0 && (len(buf) >= w.writeQuantum || len(buf) >= flushAt-sent) {
+ q := w.writeQuantum
+ if flushAt-sent < w.writeQuantum {
+ q = flushAt - sent
+ }
+ req := gRPCBidiWriteRequest{
+ buf: buf[:q],
+ offset: baseOffset + int64(sent),
+ flush: q == flushAt-sent,
+ }
+ if !cs.deliverRequestUnlessCompleted(req, handleCompletion) {
+ return baseOffset + int64(sent), false
+ }
+ buf = buf[q:]
+ sent += q
+ }
+ return baseOffset + int64(sent), true
}
-func (c *grpcStorageClient) OpenWriter(params *openWriterParams, opts ...storageOption) (internalWriter, error) {
- var offset int64
- errorf := params.setError
- setObj := params.setObj
- pr, pw := io.Pipe()
+func (w *gRPCWriter) handleCompletion(c gRPCBidiWriteCompletion) {
+ if c.resource != nil {
+ w.setObj(newObjectFromProto(c.resource))
+ }
- s := callSettings(c.settings, opts...)
+ // Already handled this completion
+ if c.flushOffset <= w.bufBaseOffset+int64(w.bufFlushedIdx) {
+ return
+ }
- retryDeadline := defaultWriteChunkRetryDeadline
- if params.chunkRetryDeadline != 0 {
- retryDeadline = params.chunkRetryDeadline
+ w.bufFlushedIdx = int(c.flushOffset - w.bufBaseOffset)
+ if w.bufFlushedIdx >= len(w.buf) {
+ // We can clear w.buf
+ w.bufBaseOffset = c.flushOffset
+ w.bufUnsentIdx = 0
+ w.bufFlushedIdx = 0
+ w.buf = w.buf[:0]
}
- if s.retry == nil {
- s.retry = defaultRetry.clone()
+ w.setSize(c.flushOffset)
+ w.progress(c.flushOffset)
+}
+
+func (w *gRPCWriter) withCommandRetryDeadline(f func() error) error {
+ w.abandonRetriesTime = time.Now().Add(w.chunkRetryDeadline)
+ err := f()
+ if err == nil {
+ w.abandonRetriesTime = time.Time{}
}
- if params.append {
- s.retry = withBidiWriteObjectRedirectionErrorRetries(s)
+ return err
+}
+
+// Gather write commands before starting the actual write. Returns nil if the
+// stream should be started, and an error otherwise.
+func (w *gRPCWriter) gatherFirstBuffer() error {
+ if w.append && w.appendGen >= 0 {
+ // For takeovers, kick off the stream immediately since we need to know the
+ // takeover offset to issue writes.
+ return nil
}
- s.retry.maxRetryDuration = retryDeadline
- gw, err := newGRPCWriter(c, s, params, pr, pr, pw)
- if err != nil {
- errorf(err)
- pr.CloseWithError(err)
- close(params.donec)
- return nil, err
+ for cmd := range w.writesChan {
+ switch v := cmd.(type) {
+ case *gRPCWriterCommandWrite:
+ if len(w.buf)+len(v.p) <= cap(w.buf) {
+ // We have not started sending yet, and we can stage all data without
+ // starting a send. Compare against cap(w.buf) instead of
+ // w.writeQuantum: that way we can perform a oneshot upload for objects
+ // which fit in one chunk, even though we will cut the request into
+ // w.writeQuantum units when we do start sending.
+ origLen := len(w.buf)
+ w.buf = w.buf[:origLen+len(v.p)]
+ copy(w.buf[origLen:], v.p)
+ close(v.done)
+ } else {
+ // Too large. Handle it in writeLoop.
+ w.currentCommand = cmd
+ return nil
+ }
+ break
+ case *gRPCWriterCommandClose:
+ // If we get here, data (if any) fits in w.buf, so we can force oneshot.
+ w.forceOneShot = true
+ w.currentCommand = cmd
+ // No need to start sending if v.err is not nil.
+ return v.err
+ default:
+ // Have to start sending!
+ w.currentCommand = cmd
+ return nil
+ }
}
+ // Nothing should ever close w.writesChan, so we should never get here
+ return errors.New("storage.Writer: unexpectedly closed w.writesChan")
+}
- var o *storagepb.Object
+func (w *gRPCWriter) writeLoop(ctx context.Context) error {
+ w.attempts++
+ // Return an error if we've been waiting for a single operation for too long.
+ if !w.abandonRetriesTime.IsZero() && time.Now().After(w.abandonRetriesTime) {
+ return fmt.Errorf("storage: retry deadline of %s reached after %v attempts; last error: %w", w.chunkRetryDeadline, w.attempts, w.lastErr)
+ }
+ // Allow each request in w.buf to be sent and result in a completion without
+ // blocking.
+ requests := make(chan gRPCBidiWriteRequest, w.sendableUnits)
+ completions := make(chan gRPCBidiWriteCompletion, w.sendableUnits)
+ // Only one request ack will be outstanding at a time.
+ requestAcks := make(chan struct{}, 1)
+ chcs := gRPCWriterCommandHandleChans{requests, requestAcks, completions}
+ bscs := gRPCBufSenderChans{requests, requestAcks, completions}
+ ctx, cancel := context.WithCancel(ctx)
+ defer cancel()
+ w.streamSender.connect(ctx, bscs, w.settings.gax...)
+
+ // Send any full quantum in w.buf, possibly including a flush
+ if err := w.withCommandRetryDeadline(func() error {
+ sentOffset, ok := w.sendBufferToTarget(chcs, w.buf, w.bufBaseOffset, cap(w.buf),
+ w.handleCompletion)
+ if !ok {
+ return w.streamSender.err()
+ }
+ w.bufUnsentIdx = int(sentOffset - w.bufBaseOffset)
+ // We may have observed a completion that is after all of w.buf if we also
+ // have a write command in w.currentCommand which sent a flush, but failed
+ // before the completion could be delivered.
+ if w.bufUnsentIdx < 0 {
+ w.bufUnsentIdx = 0
+ }
+ return nil
+ }); err != nil {
+ return err
+ }
- // If we are taking over an appendable object, send the first message here
- // to get the append offset.
- if params.append && params.appendGen >= 0 {
- // Create the buffer sender. This opens a stream and blocks until we
- // get a response that tells us what offset to write from.
- wbs, err := gw.newGRPCAppendTakeoverWriteBufferSender(params.ctx)
- if err != nil {
- return nil, fmt.Errorf("storage: creating buffer sender: %w", err)
+ err := func() error {
+ for {
+ if w.currentCommand != nil {
+ if err := w.withCommandRetryDeadline(func() error {
+ return w.currentCommand.handle(w, chcs)
+ }); err != nil {
+ return err
+ }
+ w.currentCommand = nil
+ }
+ select {
+ case c, ok := <-completions:
+ if !ok {
+ return w.streamSender.err()
+ }
+ w.handleCompletion(c)
+ case cmd, ok := <-w.writesChan:
+ if !ok {
+ // Nothing should ever close w.writesChan, so we should never get here
+ return errors.New("storage.Writer: unexpectedly closed w.writesChan")
+ }
+ w.currentCommand = cmd
+ }
}
- // Propagate append offset to caller and buffer sending logic below.
- params.setTakeoverOffset(wbs.takeoverOffset)
- offset = wbs.takeoverOffset
- gw.streamSender = wbs
- o = wbs.objResource
- setObj(newObjectFromProto(o))
+ }()
+ if err == nil {
+ err = errors.New("storage.Writer: unexpected nil error from write loop")
+ }
+ var closeErr *gRPCWriterCommandClose
+ if !errors.As(err, &closeErr) {
+ // Not a shutdown.
+ return err
}
- // This function reads the data sent to the pipe and sends sets of messages
- // on the gRPC client-stream as the buffer is filled.
- go func() {
- err := func() error {
- // Unless the user told us the content type, we have to determine it from
- // the first read.
- if params.attrs.ContentType == "" && !params.forceEmptyContentType {
- gw.reader, gw.spec.Resource.ContentType = gax.DetermineContentType(gw.reader)
+ if closeErr.err == nil {
+ // Clean shutdown. Send any remaining tail.
+ req := gRPCBidiWriteRequest{
+ buf: w.buf[w.bufUnsentIdx:],
+ offset: w.bufBaseOffset + int64(w.bufUnsentIdx),
+ flush: true,
+ finishWrite: true,
+ }
+ if err := w.withCommandRetryDeadline(func() error {
+ if !chcs.deliverRequestUnlessCompleted(req, w.handleCompletion) {
+ return w.streamSender.err()
}
+ return nil
+ }); err != nil {
+ return err
+ }
+ } else {
+ // Unclean shutdown. Cancel the context so we clean up expeditiously.
+ cancel()
+ }
- // Loop until there is an error or the Object has been finalized.
- for {
- // Note: This blocks until either the buffer is full or EOF is read.
- recvd, doneReading, err := gw.read()
- if err != nil {
- return err
- }
+ close(requests)
+ for c := range completions {
+ w.handleCompletion(c)
+ }
+ if closeErr.err == nil {
+ return w.streamSender.err()
+ }
+ return closeErr.err
+}
- uploadBuff := func(ctx context.Context) error {
- obj, err := gw.uploadBuffer(ctx, recvd, offset, doneReading)
- if obj != nil {
- o = obj
- setObj(newObjectFromProto(o))
- }
- return err
- }
+// gRPCWriterCommandHandleChans contains the channels that a gRPCWriterCommand
+// implementation must use to send requests and get notified of completions.
+// Requests are delivered on a write-only channel, request acks and completions
+// arrive on read-only channels.
+type gRPCWriterCommandHandleChans struct {
+ requests chan<- gRPCBidiWriteRequest
+ requestAcks <-chan struct{}
+ completions <-chan gRPCBidiWriteCompletion
+}
- // Add routing headers to the context metadata for single-shot and resumable
- // writes. Append writes need to set this at a lower level to pass the routing
- // token.
- bctx := gw.ctx
- if !gw.append {
- bctx = bucketContext(bctx, gw.bucket)
- }
- err = run(bctx, uploadBuff, gw.settings.retry, s.idempotent)
- offset += int64(recvd)
- // If this buffer upload was triggered by a flush, reset and
- // communicate back the result.
- if gw.iw.flushInProgress {
- gw.setSize(offset)
- gw.iw.flushInProgress = false
- gw.iw.flushComplete <- flushResult{offset: offset, err: err}
- }
- if err != nil {
- return err
- }
- // When we are done reading data without errors, set the object and
- // finish.
- if doneReading {
- // Build Object from server's response.
- setObj(newObjectFromProto(o))
- return nil
- }
+// gRPCBufSenderChans contains the channels that a gRPCBidiWriteBufferSender
+// must use to get notified of requests and deliver completions. Requests arrive
+// on a read-only channel, request acks and completions are delivered on
+// write-only channels.
+type gRPCBufSenderChans struct {
+ requests <-chan gRPCBidiWriteRequest
+ requestAcks chan<- struct{}
+ completions chan<- gRPCBidiWriteCompletion
+}
+
+// deliverRequestUnlessCompleted submits req to cs.requests, unless
+// cs.completions is closed first. If a completion arrives before the request is
+// enqueued, handleCompletion is called.
+//
+// Returns true if request was successfully enqueued, and false if completions
+// was closed first.
+func (cs gRPCWriterCommandHandleChans) deliverRequestUnlessCompleted(req gRPCBidiWriteRequest, handleCompletion func(gRPCBidiWriteCompletion)) bool {
+ for {
+ select {
+ case cs.requests <- req:
+ return true
+ case c, ok := <-cs.completions:
+ if !ok {
+ return false
}
- }()
+ handleCompletion(c)
+ }
+ }
+}
- // These calls are still valid if err is nil
- err = checkCanceled(err)
- errorf(err)
- gw.pr.CloseWithError(err)
- close(params.donec)
- }()
+// gRPCWriterCommand represents an operation on a gRPCWriter
+type gRPCWriterCommand interface {
+ // handle applies the command to a gRPCWriter.
+ //
+ // Implementations may return an error. In that case, the command may be
+ // retried with a new gRPCWriterCommandHandleChans instance.
+ handle(*gRPCWriter, gRPCWriterCommandHandleChans) error
+}
- return gw.iw, nil
+type gRPCWriterCommandWrite struct {
+ p []byte
+ done chan struct{}
}
-func newGRPCWriter(c *grpcStorageClient, s *settings, params *openWriterParams, r io.Reader, pr *io.PipeReader, pw *io.PipeWriter) (*gRPCWriter, error) {
- if params.attrs.Retention != nil {
- // TO-DO: remove once ObjectRetention is available - see b/308194853
- return nil, status.Errorf(codes.Unimplemented, "storage: object retention is not supported in gRPC")
+func (c *gRPCWriterCommandWrite) handle(w *gRPCWriter, cs gRPCWriterCommandHandleChans) error {
+ if len(c.p) == 0 {
+ // No data to write.
+ close(c.done)
+ return nil
}
- size := googleapi.MinUploadChunkSize
- // A completely bufferless upload (params.chunkSize <= 0) is not possible in
- // gRPC because the buffer must be provided to the message. Use the minimum
- // size possible.
- if params.chunkSize > 0 {
- size = params.chunkSize
+ wblen := len(w.buf)
+ allKnownBytes := wblen + len(c.p)
+ fullBufs := allKnownBytes / cap(w.buf)
+ partialBuf := allKnownBytes % cap(w.buf)
+ if partialBuf == 0 {
+ // If we would exactly fill some number of cap(w.buf) units, we don't need
+ // to block on the flush for the last one. We know that c.p is not empty, so
+ // allKnownBytes is not 0 and therefore if partialBuf is 0, fullBufs is not
+ // 0.
+ fullBufs--
+ partialBuf = cap(w.buf)
}
- // Round up chunksize to nearest 256KiB
- if size%googleapi.MinUploadChunkSize != 0 {
- size += googleapi.MinUploadChunkSize - (size % googleapi.MinUploadChunkSize)
+ if fullBufs == 0 {
+ // Everything fits in w.buf. Copy in and send from there.
+ w.buf = w.buf[:allKnownBytes]
+ copied := copy(w.buf[wblen:], c.p)
+ // Now that it's in w.buf, clear it from the command in case we retry.
+ c.p = c.p[copied:]
+ sending := w.buf[w.bufUnsentIdx:]
+ sentOffset, ok := w.sendBufferToTarget(cs, sending, w.bufBaseOffset+int64(w.bufUnsentIdx), cap(sending),
+ w.handleCompletion)
+ if !ok {
+ return w.streamSender.err()
+ }
+ w.bufUnsentIdx = int(sentOffset - w.bufBaseOffset)
+ close(c.done)
+ return nil
}
- if s.userProject != "" {
- params.ctx = setUserProjectMetadata(params.ctx, s.userProject)
+ // We have at least one full buffer, followed by a partial. The first full
+ // buffer is the interesting one. We don't actually have to copy all of c.p
+ // in: we can send from it in place, except for any partial quantum at the
+ // tail of w.buf. Send that quantum...
+ toNextWriteQuantum := func() int {
+ if wblen > w.lastSegmentStart {
+ return cap(w.buf) - wblen
+ }
+ if wblen%w.writeQuantum == 0 {
+ return 0
+ }
+ return w.writeQuantum - (wblen % w.writeQuantum)
+ }()
+ w.buf = w.buf[:wblen+toNextWriteQuantum]
+ copied := copy(w.buf[wblen:], c.p)
+ c.p = c.p[copied:]
+ firstFullBufFromCmd := cap(w.buf) - len(w.buf)
+
+ sending := w.buf[w.bufUnsentIdx:]
+ sentOffset, ok := w.sendBufferToTarget(cs, sending, w.bufBaseOffset+int64(w.bufUnsentIdx), cap(sending),
+ w.handleCompletion)
+ if !ok {
+ return w.streamSender.err()
}
- spec := &storagepb.WriteObjectSpec{
- Resource: params.attrs.toProtoObject(params.bucket),
- Appendable: proto.Bool(params.append),
+ // ...then send the prefix of c.p which could fill w.buf
+ cmdBaseOffset := w.bufBaseOffset + int64(len(w.buf))
+ cmdBuf := c.p
+ trimCommandBuf := func(cmp gRPCBidiWriteCompletion) {
+ w.handleCompletion(cmp)
+ // After a completion, keep c.p up to date with w.buf's tail.
+ bufTail := w.bufBaseOffset + int64(len(w.buf))
+ if bufTail <= cmdBaseOffset {
+ return
+ }
+ trim := int(bufTail - cmdBaseOffset)
+ if len(c.p) < trim {
+ trim = len(c.p)
+ }
+ c.p = c.p[trim:]
+ cmdBaseOffset = bufTail
+ }
+ offset := cmdBaseOffset
+ sentOffset, ok = w.sendBufferToTarget(cs, cmdBuf, offset, firstFullBufFromCmd,
+ trimCommandBuf)
+ if !ok {
+ return w.streamSender.err()
}
- var appendSpec *storagepb.AppendObjectSpec
- if params.append && params.appendGen >= 0 {
- appendSpec = &storagepb.AppendObjectSpec{
- Bucket: bucketResourceName(globalProjectAlias, params.bucket),
- Object: params.attrs.Name,
- Generation: params.appendGen,
+ cmdBuf = cmdBuf[int(sentOffset-offset):]
+ offset = sentOffset
+
+ // Remaining full buffers can be satisfied entirely from cmdBuf with no copies.
+ for i := 0; i < fullBufs-1; i++ {
+ sentOffset, ok = w.sendBufferToTarget(cs, cmdBuf, offset, cap(w.buf),
+ trimCommandBuf)
+ if !ok {
+ return w.streamSender.err()
}
+ cmdBuf = cmdBuf[int(sentOffset-offset):]
+ offset = sentOffset
}
- // WriteObject doesn't support the generation condition, so use default.
- if err := applyCondsProto("WriteObject", defaultGen, params.conds, spec); err != nil {
- return nil, err
+
+ // Send the last partial buffer. We need to flush to offset before we can copy
+ // the rest of cmdBuf into w.buf and complete this command.
+ sentOffset, ok = w.sendBufferToTarget(cs, cmdBuf, offset, cap(w.buf),
+ trimCommandBuf)
+ if !ok {
+ return w.streamSender.err()
+ }
+ // Finally, we need the sender to ack to let us know c.p can be released.
+ if !cs.deliverRequestUnlessCompleted(gRPCBidiWriteRequest{requestAck: true}, trimCommandBuf) {
+ return w.streamSender.err()
}
+ ackOutstanding := true
+ for ackOutstanding || (w.bufBaseOffset+int64(w.bufFlushedIdx)) < offset {
+ select {
+ case cmp, ok := <-cs.completions:
+ if !ok {
+ return w.streamSender.err()
+ }
+ trimCommandBuf(cmp)
+ case <-cs.requestAcks:
+ ackOutstanding = false
+ }
+ }
+ toCopyIn := cmdBuf[int(w.bufBaseOffset-offset):]
+ w.buf = w.buf[:len(toCopyIn)]
+ copy(w.buf, toCopyIn)
+ w.bufUnsentIdx = int(sentOffset - w.bufBaseOffset)
+ close(c.done)
+ return nil
+}
- return &gRPCWriter{
- buf: make([]byte, size),
- c: c,
- ctx: params.ctx,
- reader: r,
- pr: pr,
- iw: &gRPCInternalWriter{
- flushSupported: params.append,
- flushInProgress: false,
- pw: pw,
- flushComplete: make(chan flushResult),
- },
- bucket: params.bucket,
- attrs: params.attrs,
- conds: params.conds,
- spec: spec,
- appendSpec: appendSpec,
- encryptionKey: params.encryptionKey,
- settings: s,
- progress: params.progress,
- setSize: params.setSize,
- sendCRC32C: params.sendCRC32C,
- forceOneShot: params.chunkSize <= 0,
- forceEmptyContentType: params.forceEmptyContentType,
- append: params.append,
- finalizeOnClose: params.finalizeOnClose,
- }, nil
+type gRPCWriterCommandFlush struct {
+ done chan int64
}
-// gRPCWriter is a wrapper around the the gRPC client-stream API that manages
-// sending chunks of data provided by the user over the stream.
-type gRPCWriter struct {
- c *grpcStorageClient
- buf []byte
- reader io.Reader
- pr *io.PipeReader // Keep track of pr to update post-flush
- iw *gRPCInternalWriter
+func (c *gRPCWriterCommandFlush) handle(w *gRPCWriter, cs gRPCWriterCommandHandleChans) error {
+ flushTarget := w.bufBaseOffset + int64(len(w.buf))
+ // We know that there are at most w.writeQuantum bytes in
+ // w.buf[w.bufUnsentIdx:], because we send anything more inline when handling
+ // a write.
+ req := gRPCBidiWriteRequest{
+ buf: w.buf[w.bufUnsentIdx:],
+ offset: w.bufBaseOffset + int64(w.bufUnsentIdx),
+ flush: true,
+ finishWrite: false,
+ }
+ if !cs.deliverRequestUnlessCompleted(req, w.handleCompletion) {
+ return w.streamSender.err()
+ }
+ // Successful flushes will clear w.buf.
+ for (w.bufBaseOffset + int64(w.bufFlushedIdx)) < flushTarget {
+ c, ok := <-cs.completions
+ if !ok {
+ // Stream failure
+ return w.streamSender.err()
+ }
+ w.handleCompletion(c)
+ }
+ // handleCompletion has cleared w.buf and updated w.bufUnsentIdx by now.
+ c.done <- flushTarget
+ return nil
+}
- ctx context.Context
+type gRPCWriterCommandClose struct {
+ err error
+}
- bucket string
- attrs *ObjectAttrs
- conds *Conditions
- spec *storagepb.WriteObjectSpec
- appendSpec *storagepb.AppendObjectSpec
- encryptionKey []byte
- settings *settings
- progress func(int64)
- setSize func(int64)
+func (e *gRPCWriterCommandClose) Error() string {
+ return e.err.Error()
+}
- sendCRC32C bool
- forceOneShot bool
- forceEmptyContentType bool
- append bool
- finalizeOnClose bool
+func (c *gRPCWriterCommandClose) handle(w *gRPCWriter, cs gRPCWriterCommandHandleChans) error {
+ // N.B. c is not nil, even if c.err is nil!
+ return c
+}
+
+// Detect content type using bytes first from baseBuf, then from pendingBuf if
+// there are not enough bytes in baseBuf.
+func (w *gRPCWriter) detectContentType() string {
+ wblen := len(w.buf)
+ // If the current command is a write, we want to be able to update it in
+ // place. If the
+ cmdbuf := &([]byte{})
+ if c, ok := w.currentCommand.(*gRPCWriterCommandWrite); ok {
+ cmdbuf = &c.p
+ }
+ if wblen == 0 {
+ // Use the command in place
+ return http.DetectContentType(*cmdbuf)
+ }
+ if wblen >= w.writeQuantum {
+ // Use w.buf in place
+ return http.DetectContentType(w.buf)
+ }
- streamSender gRPCBidiWriteBufferSender
+ // We need to put bytes from the command onto w.buf. Try to fill a
+ // writeQuantum since we'll have to do that in order to send, anyway.
+ newSz := w.writeQuantum
+ if wblen+len(*cmdbuf) < newSz {
+ newSz = wblen + len(*cmdbuf)
+ }
+ w.buf = w.buf[:newSz]
+ copied := copy(w.buf[wblen:], *cmdbuf)
+ *cmdbuf = (*cmdbuf)[copied:]
+ return http.DetectContentType(w.buf)
}
-func bucketContext(ctx context.Context, bucket string) context.Context {
- hds := []string{"x-goog-request-params", fmt.Sprintf("bucket=projects/_/buckets/%s", url.QueryEscape(bucket))}
- return gax.InsertMetadataIntoOutgoingContext(ctx, hds...)
+type gRPCBidiWriteRequest struct {
+ buf []byte
+ offset int64
+ flush bool
+ finishWrite bool
+ // If requestAck is true, no other message fields may be set. Buffer senders
+ // must ack on the requestAcks channel if all prior messages on the requests
+ // channel have been delivered to gRPC.
+ requestAck bool
}
-// drainInboundStream calls stream.Recv() repeatedly until an error is returned.
-// It returns the last Resource received on the stream, or nil if no Resource
-// was returned. drainInboundStream always returns a non-nil error. io.EOF
-// indicates all messages were successfully read.
-func drainInboundStream(stream storagepb.Storage_BidiWriteObjectClient) (object *storagepb.Object, err error) {
- for err == nil {
- var resp *storagepb.BidiWriteObjectResponse
- resp, err = stream.Recv()
- // GetResource() returns nil on a nil response
- if resp.GetResource() != nil {
- object = resp.GetResource()
- }
+type gRPCBidiWriteCompletion struct {
+ flushOffset int64
+ resource *storagepb.Object
+}
+
+func completion(r *storagepb.BidiWriteObjectResponse) *gRPCBidiWriteCompletion {
+ switch c := r.WriteStatus.(type) {
+ case *storagepb.BidiWriteObjectResponse_PersistedSize:
+ return &gRPCBidiWriteCompletion{flushOffset: c.PersistedSize}
+ case *storagepb.BidiWriteObjectResponse_Resource:
+ return &gRPCBidiWriteCompletion{flushOffset: c.Resource.GetSize(), resource: c.Resource}
+ default:
+ return nil
}
- return object, err
}
func bidiWriteObjectRequest(buf []byte, offset int64, flush, finishWrite bool) *storagepb.BidiWriteObjectRequest {
@@ -369,464 +805,449 @@ func bidiWriteObjectRequest(buf []byte, offset int64, flush, finishWrite bool) *
}
type gRPCBidiWriteBufferSender interface {
- // sendBuffer implementations should upload buf, respecting flush and
- // finishWrite. Callers must guarantee that buf is not too long to fit in a
- // gRPC message.
+ // connect implementations may attempt to establish a connection for issuing
+ // writes.
+ //
+ // In case of an error, implementations must close the completion channel. The
+ // write loop will inspect err() after that channel is closed and before any
+ // subsequent calls to connect().
//
- // If flush is true, implementations must not return until the data in buf is
- // stable. If finishWrite is true, implementations must return the object on
- // success.
- sendBuffer(ctx context.Context, buf []byte, offset int64, flush, finishWrite bool) (*storagepb.Object, error)
+ // If a request is delivered with flush true, implementations must request
+ // that the service make the data stable. If a request is delivered with
+ // finishWrite true, no subsequent messages will be delivered on the channel,
+ // and implementations must attempt to tear down the connection cleanly after
+ // sending the request. In both cases, the write loop will stall unless the
+ // completion channel is closed or receives a completion indicating that
+ // offset+len(buf) is persisted.
+ connect(context.Context, gRPCBufSenderChans, ...gax.CallOption)
+
+ // err implementations must return the error on the stream. err() must be safe
+ // to call after the completion channel provided to connect() is closed. The
+ // write loop will not make concurrent calls to connect() and err().
+ err() error
}
type gRPCOneshotBidiWriteBufferSender struct {
- firstMessage *storagepb.BidiWriteObjectRequest
raw *gapic.Client
- stream storagepb.Storage_BidiWriteObjectClient
- settings *settings
+ bucket string
+ firstMessage *storagepb.BidiWriteObjectRequest
+ streamErr error
}
-func (w *gRPCWriter) newGRPCOneshotBidiWriteBufferSender() (*gRPCOneshotBidiWriteBufferSender, error) {
- firstMessage := &storagepb.BidiWriteObjectRequest{
- FirstMessage: &storagepb.BidiWriteObjectRequest_WriteObjectSpec{
- WriteObjectSpec: w.spec,
+func (w *gRPCWriter) newGRPCOneshotBidiWriteBufferSender() *gRPCOneshotBidiWriteBufferSender {
+ return &gRPCOneshotBidiWriteBufferSender{
+ raw: w.c.raw,
+ bucket: w.bucket,
+ firstMessage: &storagepb.BidiWriteObjectRequest{
+ FirstMessage: &storagepb.BidiWriteObjectRequest_WriteObjectSpec{
+ WriteObjectSpec: w.spec,
+ },
+ CommonObjectRequestParams: toProtoCommonObjectRequestParams(w.encryptionKey),
+ // For a non-resumable upload, checksums must be sent in this message.
+ // TODO: Currently the checksums are only sent on the first message
+ // of the stream, but in the future, we must also support sending it
+ // on the *last* message of the stream (instead of the first).
+ ObjectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs),
},
- CommonObjectRequestParams: toProtoCommonObjectRequestParams(w.encryptionKey),
- // For a non-resumable upload, checksums must be sent in this message.
- // TODO: Currently the checksums are only sent on the first message
- // of the stream, but in the future, we must also support sending it
- // on the *last* message of the stream (instead of the first).
- ObjectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs),
}
-
- return &gRPCOneshotBidiWriteBufferSender{
- firstMessage: firstMessage,
- raw: w.c.raw,
- settings: w.settings,
- }, nil
}
-func (s *gRPCOneshotBidiWriteBufferSender) sendBuffer(ctx context.Context, buf []byte, offset int64, flush, finishWrite bool) (obj *storagepb.Object, err error) {
- var firstMessage *storagepb.BidiWriteObjectRequest
- if s.stream == nil {
- s.stream, err = s.raw.BidiWriteObject(ctx, s.settings.gax...)
- if err != nil {
- return
+func (s *gRPCOneshotBidiWriteBufferSender) err() error { return s.streamErr }
+
+// drainInboundStream calls stream.Recv() repeatedly until an error is returned.
+// It returns the last Resource received on the stream, or nil if no Resource
+// was returned. drainInboundStream always returns a non-nil error. io.EOF
+// indicates all messages were successfully read.
+func drainInboundStream(stream storagepb.Storage_BidiWriteObjectClient) (object *storagepb.Object, err error) {
+ for err == nil {
+ var resp *storagepb.BidiWriteObjectResponse
+ resp, err = stream.Recv()
+ // GetResource() returns nil on a nil response
+ if resp.GetResource() != nil {
+ object = resp.GetResource()
}
- firstMessage = s.firstMessage
- }
- req := bidiWriteObjectRequest(buf, offset, flush, finishWrite)
- if firstMessage != nil {
- proto.Merge(req, firstMessage)
}
+ return object, err
+}
- sendErr := s.stream.Send(req)
- if sendErr != nil {
- obj, err = drainInboundStream(s.stream)
- s.stream = nil
- if sendErr != io.EOF {
- err = sendErr
- }
+func (s *gRPCOneshotBidiWriteBufferSender) connect(ctx context.Context, cs gRPCBufSenderChans, opts ...gax.CallOption) {
+ s.streamErr = nil
+ ctx = gRPCWriteRequestParams{bucket: s.bucket}.apply(ctx)
+ stream, err := s.raw.BidiWriteObject(ctx, opts...)
+ if err != nil {
+ s.streamErr = err
+ close(cs.completions)
return
}
- // Oneshot uploads assume all flushes succeed
- if finishWrite {
- s.stream.CloseSend()
- // Oneshot uploads only read from the response stream on completion or
- // failure
- obj, err = drainInboundStream(s.stream)
- s.stream = nil
- if err == io.EOF {
- err = nil
+ go func() {
+ firstSend := true
+ for r := range cs.requests {
+ if r.requestAck {
+ cs.requestAcks <- struct{}{}
+ continue
+ }
+
+ req := bidiWriteObjectRequest(r.buf, r.offset, r.flush, r.finishWrite)
+ if firstSend {
+ proto.Merge(req, s.firstMessage)
+ firstSend = false
+ }
+
+ if err := stream.Send(req); err != nil {
+ _, s.streamErr = drainInboundStream(stream)
+ if err != io.EOF {
+ s.streamErr = err
+ }
+ close(cs.completions)
+ return
+ }
+
+ if r.finishWrite {
+ stream.CloseSend()
+ // Oneshot uploads only read from the response stream on completion or
+ // failure
+ obj, err := drainInboundStream(stream)
+ if obj == nil || err != io.EOF {
+ s.streamErr = err
+ } else {
+ cs.completions <- gRPCBidiWriteCompletion{flushOffset: obj.GetSize(), resource: obj}
+ }
+ close(cs.completions)
+ return
+ }
+
+ // Oneshot uploads assume all flushes succeed
+ if r.flush {
+ cs.completions <- gRPCBidiWriteCompletion{flushOffset: r.offset + int64(len(r.buf))}
+ }
}
- }
- return
+ }()
}
type gRPCResumableBidiWriteBufferSender struct {
- queryRetry *retryConfig
- upid string
- progress func(int64)
- raw *gapic.Client
- forceFirstMessage bool
- stream storagepb.Storage_BidiWriteObjectClient
- flushOffset int64
- settings *settings
-}
-
-func (w *gRPCWriter) newGRPCResumableBidiWriteBufferSender(ctx context.Context) (*gRPCResumableBidiWriteBufferSender, error) {
- req := &storagepb.StartResumableWriteRequest{
- WriteObjectSpec: w.spec,
- CommonObjectRequestParams: toProtoCommonObjectRequestParams(w.encryptionKey),
- // TODO: Currently the checksums are only sent on the request to initialize
- // the upload, but in the future, we must also support sending it
- // on the *last* message of the stream.
- ObjectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs),
- }
+ raw *gapic.Client
+ bucket string
- var upid string
- err := run(ctx, func(ctx context.Context) error {
- upres, err := w.c.raw.StartResumableWrite(ctx, req, w.settings.gax...)
- upid = upres.GetUploadId()
- return err
- }, w.settings.retry, w.settings.idempotent)
- if err != nil {
- return nil, err
- }
+ startWriteRequest *storagepb.StartResumableWriteRequest
+ upid string
- // Set up an initial connection for the 0 offset, so we don't query state
- // unnecessarily for the first buffer. If we fail, we'll just retry in the
- // normal connect path.
- stream, err := w.c.raw.BidiWriteObject(ctx, w.settings.gax...)
- if err != nil {
- stream = nil
- }
+ streamErr error
+}
+func (w *gRPCWriter) newGRPCResumableBidiWriteBufferSender() *gRPCResumableBidiWriteBufferSender {
return &gRPCResumableBidiWriteBufferSender{
- queryRetry: w.settings.retry,
- upid: upid,
- progress: w.progress,
- raw: w.c.raw,
- forceFirstMessage: true,
- stream: stream,
- settings: w.settings,
- }, nil
+ raw: w.c.raw,
+ bucket: w.bucket,
+ startWriteRequest: &storagepb.StartResumableWriteRequest{
+ WriteObjectSpec: w.spec,
+ CommonObjectRequestParams: toProtoCommonObjectRequestParams(w.encryptionKey),
+ // TODO: Currently the checksums are only sent on the request to initialize
+ // the upload, but in the future, we must also support sending it
+ // on the *last* message of the stream.
+ ObjectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs),
+ },
+ }
}
-// queryProgress is a helper that queries the status of the resumable upload
-// associated with the given upload ID.
-func (s *gRPCResumableBidiWriteBufferSender) queryProgress(ctx context.Context) (int64, error) {
- var persistedSize int64
- err := run(ctx, func(ctx context.Context) error {
- q, err := s.raw.QueryWriteStatus(ctx, &storagepb.QueryWriteStatusRequest{
- UploadId: s.upid,
- }, s.settings.gax...)
- // q.GetPersistedSize() will return 0 if q is nil.
- persistedSize = q.GetPersistedSize()
- return err
- }, s.queryRetry, true)
+func (s *gRPCResumableBidiWriteBufferSender) err() error { return s.streamErr }
- return persistedSize, err
-}
+func (s *gRPCResumableBidiWriteBufferSender) connect(ctx context.Context, cs gRPCBufSenderChans, opts ...gax.CallOption) {
+ s.streamErr = nil
+ ctx = gRPCWriteRequestParams{bucket: s.bucket}.apply(ctx)
-func (s *gRPCResumableBidiWriteBufferSender) sendBuffer(ctx context.Context, buf []byte, offset int64, flush, finishWrite bool) (obj *storagepb.Object, err error) {
- if s.stream == nil {
- // Determine offset and reconnect
- s.flushOffset, err = s.queryProgress(ctx)
+ if s.startWriteRequest != nil {
+ upres, err := s.raw.StartResumableWrite(ctx, s.startWriteRequest, opts...)
if err != nil {
+ s.streamErr = err
+ close(cs.completions)
return
}
- s.stream, err = s.raw.BidiWriteObject(ctx, s.settings.gax...)
+ s.upid = upres.GetUploadId()
+ s.startWriteRequest = nil
+ } else {
+ q, err := s.raw.QueryWriteStatus(ctx, &storagepb.QueryWriteStatusRequest{UploadId: s.upid}, opts...)
if err != nil {
+ s.streamErr = err
+ close(cs.completions)
return
}
- s.forceFirstMessage = true
- }
-
- // clean up buf. We'll still write the message if a flush/finishWrite was
- // requested.
- if offset < s.flushOffset {
- trim := s.flushOffset - offset
- if int64(len(buf)) <= trim {
- trim = int64(len(buf))
- }
- buf = buf[trim:]
- offset += trim
- }
- if len(buf) == 0 && !flush && !finishWrite {
- // no need to send anything
- return nil, nil
- }
-
- req := bidiWriteObjectRequest(buf, offset, flush, finishWrite)
- if s.forceFirstMessage {
- req.FirstMessage = &storagepb.BidiWriteObjectRequest_UploadId{UploadId: s.upid}
- s.forceFirstMessage = false
- }
-
- sendErr := s.stream.Send(req)
- if sendErr != nil {
- obj, err = drainInboundStream(s.stream)
- s.stream = nil
- if err == io.EOF {
- // This is unexpected - we got an error on Send(), but not on Recv().
- // Bubble up the sendErr.
- err = sendErr
- }
- return
+ cs.completions <- gRPCBidiWriteCompletion{flushOffset: q.GetPersistedSize()}
}
- if finishWrite {
- s.stream.CloseSend()
- obj, err = drainInboundStream(s.stream)
- s.stream = nil
- if err == io.EOF {
- err = nil
- if obj.GetSize() > s.flushOffset {
- s.progress(obj.GetSize())
- }
- }
+ stream, err := s.raw.BidiWriteObject(ctx, opts...)
+ if err != nil {
+ s.streamErr = err
+ close(cs.completions)
return
}
- if flush {
- resp, err := s.stream.Recv()
- if err != nil {
- return nil, err
- }
- persistedOffset := resp.GetPersistedSize()
- if persistedOffset > s.flushOffset {
- s.flushOffset = persistedOffset
- s.progress(s.flushOffset)
- }
- }
- return
-}
+ go func() {
+ var sendErr, recvErr error
+ sendDone := make(chan struct{})
+ recvDone := make(chan struct{})
+
+ go func() {
+ sendErr = func() error {
+ firstSend := true
+ for {
+ select {
+ case <-recvDone:
+ // Because `requests` is not connected to the gRPC machinery, we
+ // have to check for asynchronous termination on the receive side.
+ return nil
+ case r, ok := <-cs.requests:
+ if !ok {
+ stream.CloseSend()
+ return nil
+ }
+ if r.requestAck {
+ cs.requestAcks <- struct{}{}
+ continue
+ }
+ req := bidiWriteObjectRequest(r.buf, r.offset, r.flush, r.finishWrite)
+ if firstSend {
+ req.FirstMessage = &storagepb.BidiWriteObjectRequest_UploadId{UploadId: s.upid}
+ firstSend = false
+ }
+ if err := stream.Send(req); err != nil {
+ return err
+ }
+ if r.finishWrite {
+ stream.CloseSend()
+ return nil
+ }
+ }
+ }
+ }()
+ close(sendDone)
+ }()
-// uploadBuffer uploads the buffer at the given offset using a bi-directional
-// Write stream. It will open a new stream if necessary (on the first call or
-// after resuming from failure) and chunk the buffer per maxPerMessageWriteSize.
-// The final Object is returned on success if doneReading is true.
-//
-// Returns object and any error that is not retriable.
-func (w *gRPCWriter) uploadBuffer(ctx context.Context, recvd int, start int64, doneReading bool) (obj *storagepb.Object, err error) {
- if w.streamSender == nil {
- if w.append {
- // Appendable object semantics
- w.streamSender, err = w.newGRPCAppendableObjectBufferSender()
- } else if doneReading || w.forceOneShot {
- // One shot semantics
- w.streamSender, err = w.newGRPCOneshotBidiWriteBufferSender()
- } else {
- // Resumable write semantics
- w.streamSender, err = w.newGRPCResumableBidiWriteBufferSender(ctx)
- }
- if err != nil {
- return
- }
- }
+ go func() {
+ recvErr = func() error {
+ for {
+ resp, err := stream.Recv()
+ if err != nil {
+ return err
+ }
+ if c := completion(resp); c != nil {
+ cs.completions <- *c
+ }
+ }
+ }()
+ close(recvDone)
+ }()
- data := w.buf[:recvd]
- offset := start
- // We want to go through this loop at least once, in case we have to
- // finishWrite with an empty buffer.
- for {
- // Send as much as we can fit into a single gRPC message. Only flush once,
- // when sending the very last message.
- l := maxPerMessageWriteSize
- flush := false
- if len(data) <= l {
- l = len(data)
- flush = true
+ <-sendDone
+ <-recvDone
+ // Prefer recvErr since that's where RPC errors are delivered
+ if recvErr != nil {
+ s.streamErr = recvErr
+ } else if sendErr != nil {
+ s.streamErr = sendErr
}
- obj, err = w.streamSender.sendBuffer(ctx, data[:l], offset, flush, flush && doneReading)
- if err != nil {
- return nil, err
- }
- data = data[l:]
- offset += int64(l)
- if len(data) == 0 {
- // Update object size to match persisted offset.
- if obj != nil {
- obj.Size = offset
- }
- break
- }
- }
- return
-}
-
-// read copies the data in the reader to the given buffer and reports how much
-// data was read into the buffer and if there is no more data to read (EOF).
-// read returns when either 1. the buffer is full, 2. Writer.Flush was called,
-// or 3. Writer.Close was called.
-func (w *gRPCWriter) read() (int, bool, error) {
- // Set n to -1 to start the Read loop.
- var n, recvd int = -1, 0
- var err error
- for err == nil && n != 0 {
- // The routine blocks here until data is received.
- n, err = w.reader.Read(w.buf[recvd:])
- recvd += n
- }
- var done bool
- if err == io.EOF {
- err = nil
- // EOF can come from Writer.Flush or Writer.Close.
- if w.iw.flushInProgress {
- // Reset pipe for additional writes after the flush.
- pr, pw := io.Pipe()
- w.reader = pr
- w.pr = pr
- w.iw.pw = pw
- } else {
- done = true
+ if s.streamErr == io.EOF {
+ s.streamErr = nil
}
- }
- return recvd, done, err
+ close(cs.completions)
+ }()
}
-func checkCanceled(err error) error {
- if status.Code(err) == codes.Canceled {
- return context.Canceled
- }
+type gRPCAppendBidiWriteBufferSender struct {
+ raw *gapic.Client
+ bucket string
+ routingToken *string
- return err
-}
+ firstMessage *storagepb.BidiWriteObjectRequest
-type gRPCAppendBidiWriteBufferSender struct {
- bucket string
- routingToken *string
- raw *gapic.Client
- settings *settings
- stream storagepb.Storage_BidiWriteObjectClient
- firstMessage *storagepb.BidiWriteObjectRequest
objectChecksums *storagepb.ObjectChecksums
-
finalizeOnClose bool
+ objResource *storagepb.Object
- forceFirstMessage bool
- progress func(int64)
- flushOffset int64
- takeoverOffset int64
- objResource *storagepb.Object // Captures received obj to set w.Attrs.
-
- // Fields used to report responses from the receive side of the stream
- // recvs is closed when the current recv goroutine is complete. recvErr is set
- // to the result of that stream (including io.EOF to indicate success)
- recvs <-chan *storagepb.BidiWriteObjectResponse
- recvErr error
+ streamErr error
}
+func (s *gRPCAppendBidiWriteBufferSender) err() error { return s.streamErr }
+
// Use for a newly created appendable object.
-func (w *gRPCWriter) newGRPCAppendableObjectBufferSender() (*gRPCAppendBidiWriteBufferSender, error) {
- s := &gRPCAppendBidiWriteBufferSender{
- bucket: w.spec.GetResource().GetBucket(),
- raw: w.c.raw,
- settings: w.settings,
+func (w *gRPCWriter) newGRPCAppendableObjectBufferSender() *gRPCAppendBidiWriteBufferSender {
+ return &gRPCAppendBidiWriteBufferSender{
+ raw: w.c.raw,
+ bucket: w.bucket,
firstMessage: &storagepb.BidiWriteObjectRequest{
FirstMessage: &storagepb.BidiWriteObjectRequest_WriteObjectSpec{
WriteObjectSpec: w.spec,
},
CommonObjectRequestParams: toProtoCommonObjectRequestParams(w.encryptionKey),
},
- objectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs),
- finalizeOnClose: w.finalizeOnClose,
- forceFirstMessage: true,
- progress: w.progress,
- flushOffset: -1, // We should ack flushes to length 0.
+ objectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs),
+ finalizeOnClose: w.finalizeOnClose,
}
- return s, nil
}
-// Use for a takeover of an appendable object.
-// Unlike newGRPCAppendableObjectBufferSender, this blocks until the stream is
-// open because it needs to get the append offset from the server.
-func (w *gRPCWriter) newGRPCAppendTakeoverWriteBufferSender(ctx context.Context) (*gRPCAppendBidiWriteBufferSender, error) {
- s := &gRPCAppendBidiWriteBufferSender{
- bucket: w.spec.GetResource().GetBucket(),
- raw: w.c.raw,
- settings: w.settings,
- firstMessage: &storagepb.BidiWriteObjectRequest{
- FirstMessage: &storagepb.BidiWriteObjectRequest_AppendObjectSpec{
- AppendObjectSpec: w.appendSpec,
- },
- },
- objectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs),
- finalizeOnClose: w.finalizeOnClose,
- forceFirstMessage: true,
- progress: w.progress,
- }
- if err := s.connect(ctx); err != nil {
- return nil, fmt.Errorf("storage: opening appendable write stream: %w", err)
- }
- _, err := s.sendOnConnectedStream(nil, 0, false, false, true)
+func (s *gRPCAppendBidiWriteBufferSender) connect(ctx context.Context, cs gRPCBufSenderChans, opts ...gax.CallOption) {
+ s.streamErr = nil
+ ctx = gRPCWriteRequestParams{appendable: true, bucket: s.bucket, routingToken: s.routingToken}.apply(ctx)
+
+ stream, err := s.raw.BidiWriteObject(ctx, opts...)
if err != nil {
- return nil, err
- }
- firstResp := <-s.recvs
- // Check recvErr after getting the response.
- if s.recvErr != nil {
- return nil, s.recvErr
+ s.streamErr = err
+ close(cs.completions)
+ return
}
- // Object resource is returned in the first response on takeover, so capture
- // this now.
- s.objResource = firstResp.GetResource()
- s.takeoverOffset = firstResp.GetResource().GetSize()
- return s, nil
+ go s.handleStream(stream, cs, true)
}
-func (s *gRPCAppendBidiWriteBufferSender) connect(ctx context.Context) (err error) {
- err = func() error {
- // If this is a forced first message, we've already determined it's safe to
- // send.
- if s.forceFirstMessage {
- s.forceFirstMessage = false
- return nil
- }
-
- // It's always ok to reconnect if there is a handle. This is the common
- // case.
- if s.firstMessage.GetAppendObjectSpec().GetWriteHandle() != nil {
- return nil
- }
- // Also always okay to reconnect if there is a generation.
- if s.firstMessage.GetAppendObjectSpec().GetGeneration() != 0 {
- return nil
- }
- // Also always ok to reconnect if we've seen a redirect token
- if s.routingToken != nil {
- return nil
- }
-
- // We can also reconnect if the first message has an if_generation_match or
- // if_metageneration_match condition. Note that negative conditions like
- // if_generation_not_match are not necessarily safe to retry.
- aos := s.firstMessage.GetAppendObjectSpec()
- wos := s.firstMessage.GetWriteObjectSpec()
+func (s *gRPCAppendBidiWriteBufferSender) handleStream(stream storagepb.Storage_BidiWriteObjectClient, cs gRPCBufSenderChans, firstSend bool) {
+ var sendErr, recvErr error
+ sendDone := make(chan struct{})
+ recvDone := make(chan struct{})
- if aos != nil && aos.IfMetagenerationMatch != nil {
- return nil
- }
+ go func() {
+ sendErr = func() error {
+ for {
+ select {
+ case <-recvDone:
+ // Because `requests` is not connected to the gRPC machinery, we
+ // have to check for asynchronous termination on the receive side.
+ return nil
+ case r, ok := <-cs.requests:
+ if !ok {
+ stream.CloseSend()
+ return nil
+ }
+ if r.requestAck {
+ cs.requestAcks <- struct{}{}
+ continue
+ }
+ err := s.send(stream, r.buf, r.offset, r.flush, r.finishWrite, firstSend)
+ firstSend = false
+ if err != nil {
+ return err
+ }
+ if r.finishWrite {
+ stream.CloseSend()
+ return nil
+ }
+ }
+ }
+ }()
+ close(sendDone)
+ }()
- if wos != nil && wos.IfGenerationMatch != nil {
- return nil
- }
- if wos != nil && wos.IfMetagenerationMatch != nil {
- return nil
- }
+ go func() {
+ recvErr = func() error {
+ for {
+ resp, err := stream.Recv()
+ if err != nil {
+ return s.maybeHandleRedirectionError(err)
+ }
+ s.maybeUpdateFirstMessage(resp)
- // Otherwise, it is not safe to reconnect.
- return errors.New("cannot safely reconnect; no write handle or preconditions")
+ if c := completion(resp); c != nil {
+ cs.completions <- *c
+ }
+ }
+ }()
+ close(recvDone)
}()
- if err != nil {
- return err
+
+ <-sendDone
+ <-recvDone
+ // Prefer recvErr since that's where RPC errors are delivered
+ if recvErr != nil {
+ s.streamErr = recvErr
+ } else if sendErr != nil {
+ s.streamErr = sendErr
+ }
+ if s.streamErr == io.EOF {
+ s.streamErr = nil
}
+ close(cs.completions)
+}
+
+type gRPCAppendTakeoverBidiWriteBufferSender struct {
+ gRPCAppendBidiWriteBufferSender
+ takeoverReported bool
+ handleTakeoverCompletion func(gRPCBidiWriteCompletion)
+}
- return s.startReceiver(ctx)
+func writeObjectSpecAsAppendObjectSpec(s *storagepb.WriteObjectSpec, gen int64) *storagepb.AppendObjectSpec {
+ return &storagepb.AppendObjectSpec{
+ Bucket: s.GetResource().GetBucket(),
+ Object: s.GetResource().GetName(),
+ Generation: gen,
+ IfMetagenerationMatch: s.IfMetagenerationMatch,
+ IfMetagenerationNotMatch: s.IfMetagenerationNotMatch,
+ }
}
-func (s *gRPCAppendBidiWriteBufferSender) withRequestParams(ctx context.Context) context.Context {
- param := fmt.Sprintf("appendable=true&bucket=%s", s.bucket)
- if s.routingToken != nil {
- param = param + fmt.Sprintf("&routing_token=%s", *s.routingToken)
+// Use for a takeover of an appendable object.
+func (w *gRPCWriter) newGRPCAppendTakeoverWriteBufferSender() *gRPCAppendTakeoverBidiWriteBufferSender {
+ return &gRPCAppendTakeoverBidiWriteBufferSender{
+ gRPCAppendBidiWriteBufferSender: gRPCAppendBidiWriteBufferSender{
+ raw: w.c.raw,
+ bucket: w.bucket,
+ firstMessage: &storagepb.BidiWriteObjectRequest{
+ FirstMessage: &storagepb.BidiWriteObjectRequest_AppendObjectSpec{
+ AppendObjectSpec: writeObjectSpecAsAppendObjectSpec(w.spec, w.appendGen),
+ },
+ },
+ objectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs),
+ finalizeOnClose: w.finalizeOnClose,
+ },
+ takeoverReported: false,
+ handleTakeoverCompletion: func(c gRPCBidiWriteCompletion) {
+ w.handleCompletion(c)
+ w.setTakeoverOffset(c.flushOffset)
+ },
}
- return gax.InsertMetadataIntoOutgoingContext(ctx, "x-goog-request-params", param)
}
-func (s *gRPCAppendBidiWriteBufferSender) startReceiver(ctx context.Context) (err error) {
- s.stream, err = s.raw.BidiWriteObject(s.withRequestParams(ctx), s.settings.gax...)
+func (s *gRPCAppendTakeoverBidiWriteBufferSender) connect(ctx context.Context, cs gRPCBufSenderChans, opts ...gax.CallOption) {
+ s.streamErr = nil
+ ctx = gRPCWriteRequestParams{appendable: true, bucket: s.bucket, routingToken: s.routingToken}.apply(ctx)
+
+ stream, err := s.raw.BidiWriteObject(ctx, opts...)
if err != nil {
+ s.streamErr = err
+ close(cs.completions)
return
}
- recvs := make(chan *storagepb.BidiWriteObjectResponse)
- s.recvs = recvs
- s.recvErr = nil
- go s.receiveMessages(recvs)
- return
+ // This blocks until we know the takeover offset from the server on first
+ // connection
+ firstSend := true
+ if !s.takeoverReported {
+ if err := s.send(stream, nil, 0, false, false, true); err != nil {
+ s.streamErr = err
+ close(cs.completions)
+ return
+ }
+ firstSend = false
+
+ resp, err := stream.Recv()
+ if err != nil {
+ // A Recv() error may be a redirect.
+ s.streamErr = s.maybeHandleRedirectionError(err)
+ close(cs.completions)
+ return
+ }
+
+ c := completion(resp)
+ if c == nil {
+ s.streamErr = fmt.Errorf("storage: unexpectedly no size in initial takeover response %+v", resp)
+ close(cs.completions)
+ return
+ }
+
+ s.maybeUpdateFirstMessage(resp)
+ s.takeoverReported = true
+ s.handleTakeoverCompletion(*c)
+ }
+
+ go s.handleStream(stream, cs, firstSend)
}
func (s *gRPCAppendBidiWriteBufferSender) ensureFirstMessageAppendObjectSpec() {
@@ -865,72 +1286,40 @@ func (e bidiWriteObjectRedirectionError) Error() string {
return ""
}
-func (s *gRPCAppendBidiWriteBufferSender) handleRedirectionError(e *storagepb.BidiWriteObjectRedirectedError) bool {
- if e.RoutingToken == nil {
- // This shouldn't happen, but we don't want to blindly retry here. Instead,
- // surface the error to the caller.
- return false
- }
-
- if e.WriteHandle != nil {
- // If we get back a write handle, we should use it. We can only use it
- // on an append object spec.
- s.ensureFirstMessageAppendObjectSpec()
- s.firstMessage.GetAppendObjectSpec().WriteHandle = e.WriteHandle
- // Generation is meant to only come with the WriteHandle, so ignore it
- // otherwise.
- if e.Generation != nil {
- s.firstMessage.GetAppendObjectSpec().Generation = e.GetGeneration()
- }
- }
-
- s.routingToken = e.RoutingToken
- return true
-}
-
-func (s *gRPCAppendBidiWriteBufferSender) receiveMessages(resps chan<- *storagepb.BidiWriteObjectResponse) {
- resp, err := s.stream.Recv()
- for err == nil {
- s.maybeUpdateFirstMessage(resp)
-
- if resp.WriteStatus != nil {
- // We only get a WriteStatus if this was a solicited message (either
- // state_lookup: true or finish_write: true). Unsolicited messages may
- // arrive to update our handle if necessary. We don't want to block on
- // this channel write if this was an unsolicited message.
- resps <- resp
- }
-
- resp, err = s.stream.Recv()
- }
-
+func (s *gRPCAppendBidiWriteBufferSender) maybeHandleRedirectionError(err error) error {
if st, ok := status.FromError(err); ok && st.Code() == codes.Aborted {
for _, d := range st.Details() {
if e, ok := d.(*storagepb.BidiWriteObjectRedirectedError); ok {
- // If we can handle this error, wrap it with the sentinel so it gets
- // retried.
- if ok := s.handleRedirectionError(e); ok {
- err = fmt.Errorf("%w%w", bidiWriteObjectRedirectionError{}, err)
+ if e.RoutingToken == nil {
+ // This shouldn't happen, but we don't want to blindly retry here.
+ // Instead, surface the error to the caller.
+ return err
+ }
+
+ if e.WriteHandle != nil {
+ // If we get back a write handle, we should use it. We can only use it
+ // on an append object spec.
+ s.ensureFirstMessageAppendObjectSpec()
+ s.firstMessage.GetAppendObjectSpec().WriteHandle = e.WriteHandle
+ // Generation is meant to only come with the WriteHandle, so ignore it
+ // otherwise.
+ if e.Generation != nil {
+ s.firstMessage.GetAppendObjectSpec().Generation = e.GetGeneration()
+ }
}
+
+ s.routingToken = e.RoutingToken
+ return fmt.Errorf("%w%w", bidiWriteObjectRedirectionError{}, err)
}
}
}
-
- // TODO: automatically reconnect on retriable recv errors, even if there are
- // no sends occurring.
- s.recvErr = err
- close(resps)
+ return err
}
-func (s *gRPCAppendBidiWriteBufferSender) sendOnConnectedStream(buf []byte, offset int64, flush, finishWrite, sendFirstMessage bool) (obj *storagepb.Object, err error) {
- var req *storagepb.BidiWriteObjectRequest
+func (s *gRPCAppendBidiWriteBufferSender) send(stream storagepb.Storage_BidiWriteObjectClient, buf []byte, offset int64, flush, finishWrite, sendFirstMessage bool) error {
finalizeObject := finishWrite && s.finalizeOnClose
- if finishWrite {
- // Always flush when finishing the Write, even if not finalizing.
- req = bidiWriteObjectRequest(buf, offset, true, finalizeObject)
- } else {
- req = bidiWriteObjectRequest(buf, offset, flush, false)
- }
+ flush = flush || finishWrite
+ req := bidiWriteObjectRequest(buf, offset, flush, finalizeObject)
if finalizeObject {
// appendable objects pass checksums on the finalize message only
req.ObjectChecksums = s.objectChecksums
@@ -939,90 +1328,84 @@ func (s *gRPCAppendBidiWriteBufferSender) sendOnConnectedStream(buf []byte, offs
proto.Merge(req, s.firstMessage)
}
- if err = s.stream.Send(req); err != nil {
- return nil, err
- }
+ return stream.Send(req)
+}
- if finishWrite {
- s.stream.CloseSend()
- for resp := range s.recvs {
- if resp.GetResource() != nil {
- obj = resp.GetResource()
- }
- // When closing the stream, update the object resource to reflect
- // the persisted size. We get a new object from the stream if
- // the object was finalized, but not if it's unfinalized.
- if s.objResource != nil && resp.GetPersistedSize() > 0 {
- s.objResource.Size = resp.GetPersistedSize()
- }
- }
- if s.recvErr != io.EOF {
- return nil, s.recvErr
- }
- if obj.GetSize() > s.flushOffset {
- s.flushOffset = obj.GetSize()
- s.progress(s.flushOffset)
- }
- return
+func checkCanceled(err error) error {
+ if status.Code(err) == codes.Canceled {
+ return context.Canceled
}
- if flush {
- // We don't necessarily expect multiple responses for a single flush, but
- // this allows the server to send multiple responses if it wants to.
- flushOffset := s.flushOffset
+ return err
+}
- for flushOffset < offset+int64(len(buf)) {
- resp, ok := <-s.recvs
- if !ok {
- return nil, s.recvErr
- }
- pSize := resp.GetPersistedSize()
- rSize := resp.GetResource().GetSize()
- if flushOffset < pSize {
- flushOffset = pSize
- }
- if flushOffset < rSize {
- flushOffset = rSize
- }
- // On the first flush, we expect to get an object resource back and
- // should return it.
- if resp.GetResource() != nil {
- obj = resp.GetResource()
- }
- }
- if s.flushOffset < flushOffset {
- s.flushOffset = flushOffset
- s.progress(s.flushOffset)
- }
+// gRPCChunkSize returns the chunk size to use based on the requested chunk
+// size.
+//
+// The chunk size returned is always greater than 0 and a multiple of
+// googleapi.MinUploadChunkSize
+func gRPCChunkSize(requestSize int) int {
+ size := googleapi.MinUploadChunkSize
+ if requestSize > size {
+ size = requestSize
+ }
+
+ if size%googleapi.MinUploadChunkSize != 0 {
+ size += googleapi.MinUploadChunkSize - (size % googleapi.MinUploadChunkSize)
}
- return
+ return size
}
-func (s *gRPCAppendBidiWriteBufferSender) sendBuffer(ctx context.Context, buf []byte, offset int64, flush, finishWrite bool) (obj *storagepb.Object, err error) {
- for {
- sendFirstMessage := false
- if s.stream == nil {
- sendFirstMessage = true
- if err = s.connect(ctx); err != nil {
- return
- }
- }
+type gRPCWriteRequestParams struct {
+ appendable bool
+ bucket string
+ routingToken *string
+}
- obj, err = s.sendOnConnectedStream(buf, offset, flush, finishWrite, sendFirstMessage)
- if obj != nil {
- s.objResource = obj
- }
- if err == nil {
- return
- }
+func (p gRPCWriteRequestParams) apply(ctx context.Context) context.Context {
+ hds := make([]string, 0, 3)
+ if p.appendable {
+ hds = append(hds, "appendable=true")
+ }
+ if p.bucket != "" {
+ hds = append(hds, fmt.Sprintf("bucket=projects/_/buckets/%s", url.QueryEscape(p.bucket)))
+ }
+ if p.routingToken != nil {
+ hds = append(hds, fmt.Sprintf("routing_token=%s", *p.routingToken))
+ }
+ return gax.InsertMetadataIntoOutgoingContext(ctx, "x-goog-request-params", strings.Join(hds, "&"))
+}
- // await recv stream termination
- for range s.recvs {
+func withBidiWriteObjectRedirectionErrorRetries(s *settings) (newr *retryConfig) {
+ oldr := s.retry
+ newr = oldr.clone()
+ if newr == nil {
+ newr = &retryConfig{}
+ }
+ if (oldr.policy == RetryIdempotent && !s.idempotent) || oldr.policy == RetryNever {
+ // We still retry redirection errors even when settings indicate not to
+ // retry.
+ //
+ // The protocol requires us to respect redirection errors, so RetryNever has
+ // to ignore them.
+ //
+ // Idempotency is always protected by redirection errors: they either
+ // contain a handle which can be used as idempotency information, or they do
+ // not contain a handle and are "affirmative failures" which indicate that
+ // no server-side action occurred.
+ newr.policy = RetryAlways
+ newr.shouldRetry = func(err error) bool {
+ return errors.Is(err, bidiWriteObjectRedirectionError{})
}
- if s.recvErr != io.EOF {
- err = s.recvErr
+ return newr
+ }
+ // If retry settings allow retries normally, fall back to that behavior.
+ newr.shouldRetry = func(err error) bool {
+ if errors.Is(err, bidiWriteObjectRedirectionError{}) {
+ return true
}
- s.stream = nil
- return
+ v := oldr.runShouldRetry(err)
+ return v
}
+ return newr
}
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/http_client.go b/hack/tools/vendor/cloud.google.com/go/storage/http_client.go
index a4b601300dd8..a0ddadf71f2b 100644
--- a/hack/tools/vendor/cloud.google.com/go/storage/http_client.go
+++ b/hack/tools/vendor/cloud.google.com/go/storage/http_client.go
@@ -33,7 +33,6 @@ import (
"cloud.google.com/go/auth"
"cloud.google.com/go/iam/apiv1/iampb"
"cloud.google.com/go/internal/optional"
- "cloud.google.com/go/internal/trace"
"github.com/google/uuid"
"github.com/googleapis/gax-go/v2/callctx"
"google.golang.org/api/googleapi"
@@ -847,8 +846,8 @@ func (c *httpStorageClient) NewMultiRangeDownloader(ctx context.Context, params
}
func (c *httpStorageClient) NewRangeReader(ctx context.Context, params *newRangeReaderParams, opts ...storageOption) (r *Reader, err error) {
- ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.httpStorageClient.NewRangeReader")
- defer func() { trace.EndSpan(ctx, err) }()
+ ctx, _ = startSpan(ctx, "httpStorageClient.NewRangeReader")
+ defer func() { endSpan(ctx, err) }()
s := callSettings(c.settings, opts...)
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/internal/apiv2/.repo-metadata.json b/hack/tools/vendor/cloud.google.com/go/storage/internal/apiv2/.repo-metadata.json
new file mode 100644
index 000000000000..3a58e6826f32
--- /dev/null
+++ b/hack/tools/vendor/cloud.google.com/go/storage/internal/apiv2/.repo-metadata.json
@@ -0,0 +1,10 @@
+{
+ "api_shortname": "storage",
+ "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/storage/latest/internal/apiv2",
+ "client_library_type": "generated",
+ "description": "Cloud Storage API",
+ "distribution_name": "cloud.google.com/go/storage/internal/apiv2",
+ "language": "go",
+ "library_type": "GAPIC_AUTO",
+ "release_level": "stable"
+}
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/internal/apiv2/storage_client.go b/hack/tools/vendor/cloud.google.com/go/storage/internal/apiv2/storage_client.go
index 68133628c394..9936aa68d129 100644
--- a/hack/tools/vendor/cloud.google.com/go/storage/internal/apiv2/storage_client.go
+++ b/hack/tools/vendor/cloud.google.com/go/storage/internal/apiv2/storage_client.go
@@ -432,7 +432,8 @@ type internalClient interface {
//
// API Overview and Naming SyntaxThe Cloud Storage gRPC API allows applications to read and write data through
// the abstractions of buckets and objects. For a description of these
-// abstractions please see https://cloud.google.com/storage/docs (at https://cloud.google.com/storage/docs).
+// abstractions please see Cloud Storage
+// documentation (at https://cloud.google.com/storage/docs).
//
// Resources are named as follows:
//
@@ -440,18 +441,14 @@ type internalClient interface {
// using strings like projects/123456 or projects/my-string-id.
//
// Buckets are named using string names of the form:
-// projects/{project}/buckets/{bucket}
-// For globally unique buckets, _ may be substituted for the project.
+// projects/{project}/buckets/{bucket}.
+// For globally unique buckets, _ might be substituted for the project.
//
// Objects are uniquely identified by their name along with the name of the
// bucket they belong to, as separate strings in this API. For example:
//
-// ReadObjectRequest {
-// bucket: ‘projects/_/buckets/my-bucket’
-// object: ‘my-object’
-// }
-// Note that object names can contain / characters, which are treated as
-// any other character (no special directory semantics).
+// Note that object names can contain / characters, which are treated as
+// any other character (no special directory semantics).
type Client struct {
// The internal transport-dependent client.
internalClient internalClient
@@ -484,40 +481,121 @@ func (c *Client) Connection() *grpc.ClientConn {
}
// DeleteBucket permanently deletes an empty bucket.
+// The request fails if there are any live or
+// noncurrent objects in the bucket, but the request succeeds if the
+// bucket only contains soft-deleted objects or incomplete uploads, such
+// as ongoing XML API multipart uploads. Does not permanently delete
+// soft-deleted objects.
+//
+// When this API is used to delete a bucket containing an object that has a
+// soft delete policy
+// enabled, the object becomes soft deleted, and the
+// softDeleteTime and hardDeleteTime properties are set on the
+// object.
+//
+// Objects and multipart uploads that were in the bucket at the time of
+// deletion are also retained for the specified retention duration. When
+// a soft-deleted bucket reaches the end of its retention duration, it
+// is permanently deleted. The hardDeleteTime of the bucket always
+// equals
+// or exceeds the expiration time of the last soft-deleted object in the
+// bucket.
+//
+// IAM Permissions:
+//
+// Requires storage.buckets.delete IAM permission on the bucket.
func (c *Client) DeleteBucket(ctx context.Context, req *storagepb.DeleteBucketRequest, opts ...gax.CallOption) error {
return c.internalClient.DeleteBucket(ctx, req, opts...)
}
// GetBucket returns metadata for the specified bucket.
+//
+// IAM Permissions:
+//
+// Requires storage.buckets.get
+// IAM permission on
+// the bucket. Additionally, to return specific bucket metadata, the
+// authenticated user must have the following permissions:
+//
+// To return the IAM policies: storage.buckets.getIamPolicy
+//
+// To return the bucket IP filtering rules: storage.buckets.getIpFilter
func (c *Client) GetBucket(ctx context.Context, req *storagepb.GetBucketRequest, opts ...gax.CallOption) (*storagepb.Bucket, error) {
return c.internalClient.GetBucket(ctx, req, opts...)
}
// CreateBucket creates a new bucket.
+//
+// IAM Permissions:
+//
+// Requires storage.buckets.create IAM permission on the bucket.
+// Additionally, to enable specific bucket features, the authenticated user
+// must have the following permissions:
+//
+// To enable object retention using the enableObjectRetention query
+// parameter: storage.buckets.enableObjectRetention
+//
+// To set the bucket IP filtering rules: storage.buckets.setIpFilter
func (c *Client) CreateBucket(ctx context.Context, req *storagepb.CreateBucketRequest, opts ...gax.CallOption) (*storagepb.Bucket, error) {
return c.internalClient.CreateBucket(ctx, req, opts...)
}
-// ListBuckets retrieves a list of buckets for a given project.
+// ListBuckets retrieves a list of buckets for a given project, ordered
+// lexicographically by name.
+//
+// IAM Permissions:
+//
+// Requires storage.buckets.list IAM permission on the bucket.
+// Additionally, to enable specific bucket features, the authenticated
+// user must have the following permissions:
+//
+// To list the IAM policies: storage.buckets.getIamPolicy
+//
+// To list the bucket IP filtering rules: storage.buckets.getIpFilter
func (c *Client) ListBuckets(ctx context.Context, req *storagepb.ListBucketsRequest, opts ...gax.CallOption) *BucketIterator {
return c.internalClient.ListBuckets(ctx, req, opts...)
}
-// LockBucketRetentionPolicy locks retention policy on a bucket.
+// LockBucketRetentionPolicy permanently locks the retention
+// policy that is
+// currently applied to the specified bucket.
+//
+// Caution: Locking a bucket is an
+// irreversible action. Once you lock a bucket:
+//
+// You cannot remove the retention policy from the bucket.
+//
+// You cannot decrease the retention period for the policy.
+//
+// Once locked, you must delete the entire bucket in order to remove the
+// bucket’s retention policy. However, before you can delete the bucket, you
+// must delete all the objects in the bucket, which is only
+// possible if all the objects have reached the retention period set by the
+// retention policy.
+//
+// IAM Permissions:
+//
+// Requires storage.buckets.update IAM permission on the bucket.
func (c *Client) LockBucketRetentionPolicy(ctx context.Context, req *storagepb.LockBucketRetentionPolicyRequest, opts ...gax.CallOption) (*storagepb.Bucket, error) {
return c.internalClient.LockBucketRetentionPolicy(ctx, req, opts...)
}
-// GetIamPolicy gets the IAM policy for a specified bucket.
+// GetIamPolicy gets the IAM policy for a specified bucket or managed folder.
// The resource field in the request should be
// projects/_/buckets/{bucket} for a bucket, or
// projects/_/buckets/{bucket}/managedFolders/{managedFolder}
// for a managed folder.
+//
+// IAM Permissions:
+//
+// Requires storage.buckets.getIamPolicy on the bucket or
+// storage.managedFolders.getIamPolicy IAM permission on the
+// managed folder.
func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {
return c.internalClient.GetIamPolicy(ctx, req, opts...)
}
-// SetIamPolicy updates an IAM policy for the specified bucket.
+// SetIamPolicy updates an IAM policy for the specified bucket or managed folder.
// The resource field in the request should be
// projects/_/buckets/{bucket} for a bucket, or
// projects/_/buckets/{bucket}/managedFolders/{managedFolder}
@@ -527,9 +605,8 @@ func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyReques
}
// TestIamPermissions tests a set of permissions on the given bucket, object, or managed folder
-// to see which, if any, are held by the caller.
-// The resource field in the request should be
-// projects/_/buckets/{bucket} for a bucket,
+// to see which, if any, are held by the caller. The resource field in the
+// request should be projects/_/buckets/{bucket} for a bucket,
// projects/_/buckets/{bucket}/objects/{object} for an object, or
// projects/_/buckets/{bucket}/managedFolders/{managedFolder}
// for a managed folder.
@@ -537,20 +614,42 @@ func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermi
return c.internalClient.TestIamPermissions(ctx, req, opts...)
}
-// UpdateBucket updates a bucket. Equivalent to JSON API’s storage.buckets.patch method.
+// UpdateBucket updates a bucket. Changes to the bucket are readable immediately after
+// writing, but configuration changes might take time to propagate. This
+// method supports patch semantics.
+//
+// IAM Permissions:
+//
+// Requires storage.buckets.update IAM permission on the bucket.
+// Additionally, to enable specific bucket features, the authenticated user
+// must have the following permissions:
+//
+// To set bucket IP filtering rules: storage.buckets.setIpFilter
+//
+// To update public access prevention policies or access control lists
+// (ACLs): storage.buckets.setIamPolicy
func (c *Client) UpdateBucket(ctx context.Context, req *storagepb.UpdateBucketRequest, opts ...gax.CallOption) (*storagepb.Bucket, error) {
return c.internalClient.UpdateBucket(ctx, req, opts...)
}
// ComposeObject concatenates a list of existing objects into a new object in the same
-// bucket.
+// bucket. The existing source objects are unaffected by this operation.
+//
+// IAM Permissions:
+//
+// Requires the storage.objects.create and storage.objects.get IAM
+// permissions to use this method. If the new composite object
+// overwrites an existing object, the authenticated user must also have
+// the storage.objects.delete permission. If the request body includes
+// the retention property, the authenticated user must also have the
+// storage.objects.setRetention IAM permission.
func (c *Client) ComposeObject(ctx context.Context, req *storagepb.ComposeObjectRequest, opts ...gax.CallOption) (*storagepb.Object, error) {
return c.internalClient.ComposeObject(ctx, req, opts...)
}
// DeleteObject deletes an object and its metadata. Deletions are permanent if versioning
// is not enabled for the bucket, or if the generation parameter is used, or
-// if soft delete (at https://cloud.google.com/storage/docs/soft-delete) is not
+// if soft delete is not
// enabled for the bucket.
// When this API is used to delete an object from a bucket that has soft
// delete policy enabled, the object becomes soft deleted, and the
@@ -565,14 +664,56 @@ func (c *Client) ComposeObject(ctx context.Context, req *storagepb.ComposeObject
//
// IAM Permissions:
//
-// Requires storage.objects.delete
-// IAM permission (at https://cloud.google.com/iam/docs/overview#permissions) on
-// the bucket.
+// Requires storage.objects.delete IAM permission on the bucket.
func (c *Client) DeleteObject(ctx context.Context, req *storagepb.DeleteObjectRequest, opts ...gax.CallOption) error {
return c.internalClient.DeleteObject(ctx, req, opts...)
}
-// RestoreObject restores a soft-deleted object.
+// RestoreObject restores a
+// soft-deleted object.
+// When a soft-deleted object is restored, a new copy of that object is
+// created in the same bucket and inherits the same metadata as the
+// soft-deleted object. The inherited metadata is the metadata that existed
+// when the original object became soft deleted, with the following
+// exceptions:
+//
+// The createTime of the new object is set to the time at which the
+// soft-deleted object was restored.
+//
+// The softDeleteTime and hardDeleteTime values are cleared.
+//
+// A new generation is assigned and the metageneration is reset to 1.
+//
+// If the soft-deleted object was in a bucket that had Autoclass enabled,
+// the new object is
+// restored to Standard storage.
+//
+// The restored object inherits the bucket’s default object ACL, unless
+// copySourceAcl is true.
+//
+// If a live object using the same name already exists in the bucket and
+// becomes overwritten, the live object becomes a noncurrent object if Object
+// Versioning is enabled on the bucket. If Object Versioning is not enabled,
+// the live object becomes soft deleted.
+//
+// IAM Permissions:
+//
+// Requires the following IAM permissions to use this method:
+//
+// storage.objects.restore
+//
+// storage.objects.create
+//
+// storage.objects.delete (only required if overwriting an existing
+// object)
+//
+// storage.objects.getIamPolicy (only required if projection is full
+// and the relevant bucket
+// has uniform bucket-level access disabled)
+//
+// storage.objects.setIamPolicy (only required if copySourceAcl is
+// true and the relevant
+// bucket has uniform bucket-level access disabled)
func (c *Client) RestoreObject(ctx context.Context, req *storagepb.RestoreObjectRequest, opts ...gax.CallOption) (*storagepb.Object, error) {
return c.internalClient.RestoreObject(ctx, req, opts...)
}
@@ -580,9 +721,9 @@ func (c *Client) RestoreObject(ctx context.Context, req *storagepb.RestoreObject
// CancelResumableWrite cancels an in-progress resumable upload.
//
// Any attempts to write to the resumable upload after cancelling the upload
-// will fail.
+// fail.
//
-// The behavior for currently in progress write operations is not guaranteed -
+// The behavior for any in-progress write operations is not guaranteed;
// they could either complete before the cancellation or fail if the
// cancellation completes first.
func (c *Client) CancelResumableWrite(ctx context.Context, req *storagepb.CancelResumableWriteRequest, opts ...gax.CallOption) (*storagepb.CancelResumableWriteResponse, error) {
@@ -593,9 +734,8 @@ func (c *Client) CancelResumableWrite(ctx context.Context, req *storagepb.Cancel
//
// IAM Permissions:
//
-// Requires storage.objects.get
-// IAM permission (at https://cloud.google.com/iam/docs/overview#permissions) on
-// the bucket. To return object ACLs, the authenticated user must also have
+// Requires storage.objects.get IAM permission on the bucket.
+// To return object ACLs, the authenticated user must also have
// the storage.objects.getIamPolicy permission.
func (c *Client) GetObject(ctx context.Context, req *storagepb.GetObjectRequest, opts ...gax.CallOption) (*storagepb.Object, error) {
return c.internalClient.GetObject(ctx, req, opts...)
@@ -605,38 +745,34 @@ func (c *Client) GetObject(ctx context.Context, req *storagepb.GetObjectRequest,
//
// IAM Permissions:
//
-// Requires storage.objects.get
-// IAM permission (at https://cloud.google.com/iam/docs/overview#permissions) on
-// the bucket.
+// Requires storage.objects.get IAM permission on the bucket.
func (c *Client) ReadObject(ctx context.Context, req *storagepb.ReadObjectRequest, opts ...gax.CallOption) (storagepb.Storage_ReadObjectClient, error) {
return c.internalClient.ReadObject(ctx, req, opts...)
}
// BidiReadObject reads an object’s data.
//
-// This is a bi-directional API with the added support for reading multiple
-// ranges within one stream both within and across multiple messages.
-// If the server encountered an error for any of the inputs, the stream will
-// be closed with the relevant error code.
-// Because the API allows for multiple outstanding requests, when the stream
-// is closed the error response will contain a BidiReadObjectRangesError proto
-// in the error extension describing the error for each outstanding read_id.
+// This bi-directional API reads data from an object, allowing you to
+// request multiple data ranges within a single stream, even across
+// several messages. If an error occurs with any request, the stream
+// closes with a relevant error code. Since you can have multiple
+// outstanding requests, the error response includes a
+// BidiReadObjectRangesError field detailing the specific error for
+// each pending read_id.
//
// IAM Permissions:
//
-// # Requires storage.objects.get
-//
-// IAM permission (at https://cloud.google.com/iam/docs/overview#permissions) on
-// the bucket.
-//
-// This API is currently in preview and is not yet available for general
-// use.
+// Requires storage.objects.get IAM permission on the bucket.
func (c *Client) BidiReadObject(ctx context.Context, opts ...gax.CallOption) (storagepb.Storage_BidiReadObjectClient, error) {
return c.internalClient.BidiReadObject(ctx, opts...)
}
// UpdateObject updates an object’s metadata.
-// Equivalent to JSON API’s storage.objects.patch.
+// Equivalent to JSON API’s storage.objects.patch method.
+//
+// IAM Permissions:
+//
+// Requires storage.objects.update IAM permission on the bucket.
func (c *Client) UpdateObject(ctx context.Context, req *storagepb.UpdateObjectRequest, opts ...gax.CallOption) (*storagepb.Object, error) {
return c.internalClient.UpdateObject(ctx, req, opts...)
}
@@ -661,10 +797,10 @@ func (c *Client) UpdateObject(ctx context.Context, req *storagepb.UpdateObjectRe
// Check the result Status of the stream, to determine if writing can be
// resumed on this stream or must be restarted from scratch (by calling
// StartResumableWrite()). The resumable errors are DEADLINE_EXCEEDED,
-// INTERNAL, and UNAVAILABLE. For each case, the client should use binary
-// exponential backoff before retrying. Additionally, writes can be
-// resumed after RESOURCE_EXHAUSTED errors, but only after taking
-// appropriate measures, which may include reducing aggregate send rate
+// INTERNAL, and UNAVAILABLE. For each case, the client should use
+// binary exponential backoff before retrying. Additionally, writes can
+// be resumed after RESOURCE_EXHAUSTED errors, but only after taking
+// appropriate measures, which might include reducing aggregate send rate
// across clients and/or requesting a quota increase for your project.
//
// If the call to WriteObject returns ABORTED, that indicates
@@ -672,43 +808,43 @@ func (c *Client) UpdateObject(ctx context.Context, req *storagepb.UpdateObjectRe
// multiple racing clients or by a single client where the previous
// request was timed out on the client side but nonetheless reached the
// server. In this case the client should take steps to prevent further
-// concurrent writes (e.g., increase the timeouts, stop using more than
-// one process to perform the upload, etc.), and then should follow the
-// steps below for resuming the upload.
+// concurrent writes. For example, increase the timeouts and stop using
+// more than one process to perform the upload. Follow the steps below for
+// resuming the upload.
//
// For resumable errors, the client should call QueryWriteStatus() and
-// then continue writing from the returned persisted_size. This may be
+// then continue writing from the returned persisted_size. This might be
// less than the amount of data the client previously sent. Note also that
// it is acceptable to send data starting at an offset earlier than the
-// returned persisted_size; in this case, the service will skip data at
+// returned persisted_size; in this case, the service skips data at
// offsets that were already persisted (without checking that it matches
// the previously written data), and write only the data starting from the
-// persisted offset. Even though the data isn’t written, it may still
+// persisted offset. Even though the data isn’t written, it might still
// incur a performance cost over resuming at the correct write offset.
// This behavior can make client-side handling simpler in some cases.
//
// Clients must only send data that is a multiple of 256 KiB per message,
// unless the object is being finished with finish_write set to true.
//
-// The service will not view the object as complete until the client has
+// The service does not view the object as complete until the client has
// sent a WriteObjectRequest with finish_write set to true. Sending any
// requests on a stream after sending a request with finish_write set to
-// true will cause an error. The client should check the response it
-// receives to determine how much data the service was able to commit and
+// true causes an error. The client must check the response it
+// receives to determine how much data the service is able to commit and
// whether the service views the object as complete.
//
-// Attempting to resume an already finalized object will result in an OK
+// Attempting to resume an already finalized object results in an OK
// status, with a WriteObjectResponse containing the finalized object’s
// metadata.
//
-// Alternatively, the BidiWriteObject operation may be used to write an
+// Alternatively, you can use the BidiWriteObject operation to write an
// object with controls over flushing and the ability to fetch the ability to
// determine the current persisted size.
//
// IAM Permissions:
//
// Requires storage.objects.create
-// IAM permission (at https://cloud.google.com/iam/docs/overview#permissions) on
+// IAM permission on
// the bucket.
func (c *Client) WriteObject(ctx context.Context, opts ...gax.CallOption) (storagepb.Storage_WriteObjectClient, error) {
return c.internalClient.WriteObject(ctx, opts...)
@@ -720,15 +856,15 @@ func (c *Client) WriteObject(ctx context.Context, opts ...gax.CallOption) (stora
// manual flushing of persisted state, and the ability to determine current
// persisted size without closing the stream.
//
-// The client may specify one or both of the state_lookup and flush fields
-// in each BidiWriteObjectRequest. If flush is specified, the data written
-// so far will be persisted to storage. If state_lookup is specified, the
-// service will respond with a BidiWriteObjectResponse that contains the
+// The client might specify one or both of the state_lookup and flush
+// fields in each BidiWriteObjectRequest. If flush is specified, the data
+// written so far is persisted to storage. If state_lookup is specified, the
+// service responds with a BidiWriteObjectResponse that contains the
// persisted size. If both flush and state_lookup are specified, the flush
-// will always occur before a state_lookup, so that both may be set in the
-// same request and the returned state will be the state of the object
-// post-flush. When the stream is closed, a BidiWriteObjectResponse will
-// always be sent to the client, regardless of the value of state_lookup.
+// always occurs before a state_lookup, so that both might be set in the
+// same request and the returned state is the state of the object
+// post-flush. When the stream is closed, a BidiWriteObjectResponse
+// is always sent to the client, regardless of the value of state_lookup.
func (c *Client) BidiWriteObject(ctx context.Context, opts ...gax.CallOption) (storagepb.Storage_BidiWriteObjectClient, error) {
return c.internalClient.BidiWriteObject(ctx, opts...)
}
@@ -738,8 +874,8 @@ func (c *Client) BidiWriteObject(ctx context.Context, opts ...gax.CallOption) (s
// IAM Permissions:
//
// The authenticated user requires storage.objects.list
-// IAM permission (at https://cloud.google.com/iam/docs/overview#permissions)
-// to use this method. To return object ACLs, the authenticated user must also
+// IAM permission to use this method. To return object ACLs, the
+// authenticated user must also
// have the storage.objects.getIamPolicy permission.
func (c *Client) ListObjects(ctx context.Context, req *storagepb.ListObjectsRequest, opts ...gax.CallOption) *ObjectIterator {
return c.internalClient.ListObjects(ctx, req, opts...)
@@ -753,7 +889,7 @@ func (c *Client) RewriteObject(ctx context.Context, req *storagepb.RewriteObject
// StartResumableWrite starts a resumable write operation. This
// method is part of the Resumable
-// upload (at https://cloud.google.com/storage/docs/resumable-uploads) feature.
+// upload feature.
// This allows you to upload large objects in multiple chunks, which is more
// resilient to network interruptions than a single upload. The validity
// duration of the write operation, and the consequences of it becoming
@@ -761,16 +897,14 @@ func (c *Client) RewriteObject(ctx context.Context, req *storagepb.RewriteObject
//
// IAM Permissions:
//
-// Requires storage.objects.create
-// IAM permission (at https://cloud.google.com/iam/docs/overview#permissions) on
-// the bucket.
+// Requires storage.objects.create IAM permission on the bucket.
func (c *Client) StartResumableWrite(ctx context.Context, req *storagepb.StartResumableWriteRequest, opts ...gax.CallOption) (*storagepb.StartResumableWriteResponse, error) {
return c.internalClient.StartResumableWrite(ctx, req, opts...)
}
// QueryWriteStatus determines the persisted_size of an object that is being written. This
// method is part of the resumable
-// upload (at https://cloud.google.com/storage/docs/resumable-uploads) feature.
+// upload feature.
// The returned value is the size of the object that has been persisted so
// far. The value can be used as the write_offset for the next Write()
// call.
@@ -790,6 +924,21 @@ func (c *Client) QueryWriteStatus(ctx context.Context, req *storagepb.QueryWrite
}
// MoveObject moves the source object to the destination object in the same bucket.
+// This operation moves a source object to a destination object in the
+// same bucket by renaming the object. The move itself is an atomic
+// transaction, ensuring all steps either complete successfully or no
+// changes are made.
+//
+// IAM Permissions:
+//
+// Requires the following IAM permissions to use this method:
+//
+// storage.objects.move
+//
+// storage.objects.create
+//
+// storage.objects.delete (only required if overwriting an existing
+// object)
func (c *Client) MoveObject(ctx context.Context, req *storagepb.MoveObjectRequest, opts ...gax.CallOption) (*storagepb.Object, error) {
return c.internalClient.MoveObject(ctx, req, opts...)
}
@@ -818,7 +967,8 @@ type gRPCClient struct {
//
// API Overview and Naming SyntaxThe Cloud Storage gRPC API allows applications to read and write data through
// the abstractions of buckets and objects. For a description of these
-// abstractions please see https://cloud.google.com/storage/docs (at https://cloud.google.com/storage/docs).
+// abstractions please see Cloud Storage
+// documentation (at https://cloud.google.com/storage/docs).
//
// Resources are named as follows:
//
@@ -826,18 +976,14 @@ type gRPCClient struct {
// using strings like projects/123456 or projects/my-string-id.
//
// Buckets are named using string names of the form:
-// projects/{project}/buckets/{bucket}
-// For globally unique buckets, _ may be substituted for the project.
+// projects/{project}/buckets/{bucket}.
+// For globally unique buckets, _ might be substituted for the project.
//
// Objects are uniquely identified by their name along with the name of the
// bucket they belong to, as separate strings in this API. For example:
//
-// ReadObjectRequest {
-// bucket: ‘projects/_/buckets/my-bucket’
-// object: ‘my-object’
-// }
-// Note that object names can contain / characters, which are treated as
-// any other character (no special directory semantics).
+// Note that object names can contain / characters, which are treated as
+// any other character (no special directory semantics).
func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) {
clientOpts := defaultGRPCClientOptions()
if newClientHook != nil {
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage.pb.go b/hack/tools/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage.pb.go
index ee6639e49d80..b8cd9add5259 100644
--- a/hack/tools/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage.pb.go
+++ b/hack/tools/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage.pb.go
@@ -21,22 +21,19 @@
package storagepb
import (
+ reflect "reflect"
+ sync "sync"
+
iampb "cloud.google.com/go/iam/apiv1/iampb"
- context "context"
_ "google.golang.org/genproto/googleapis/api/annotations"
status "google.golang.org/genproto/googleapis/rpc/status"
date "google.golang.org/genproto/googleapis/type/date"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status1 "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
emptypb "google.golang.org/protobuf/types/known/emptypb"
fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
- reflect "reflect"
- sync "sync"
)
const (
@@ -52,8 +49,8 @@ type ServiceConstants_Values int32
const (
// Unused. Proto3 requires first enum to be 0.
ServiceConstants_VALUES_UNSPECIFIED ServiceConstants_Values = 0
- // The maximum size chunk that can will be returned in a single
- // ReadRequest.
+ // The maximum size chunk that can be returned in a single
+ // `ReadRequest`.
// 2 MiB.
ServiceConstants_MAX_READ_CHUNK_BYTES ServiceConstants_Values = 2097152
// The maximum size chunk that can be sent in a single WriteObjectRequest.
@@ -186,11 +183,11 @@ type Object_Retention_Mode int32
const (
// No specified mode. Object is not under retention.
Object_Retention_MODE_UNSPECIFIED Object_Retention_Mode = 0
- // Retention period may be decreased or increased.
- // The Retention configuration may be removed.
- // The mode may be changed to locked.
+ // Retention period might be decreased or increased.
+ // The Retention configuration might be removed.
+ // The mode might be changed to locked.
Object_Retention_UNLOCKED Object_Retention_Mode = 1
- // Retention period may be increased.
+ // Retention period might be increased.
// The Retention configuration cannot be removed.
// The mode cannot be changed.
Object_Retention_LOCKED Object_Retention_Mode = 2
@@ -237,7 +234,7 @@ func (Object_Retention_Mode) EnumDescriptor() ([]byte, []int) {
return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{50, 0, 0}
}
-// Request message for DeleteBucket.
+// Request message for [DeleteBucket][google.storage.v2.Storage.DeleteBucket].
type DeleteBucketRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -303,7 +300,7 @@ func (x *DeleteBucketRequest) GetIfMetagenerationNotMatch() int64 {
return 0
}
-// Request message for GetBucket.
+// Request message for [GetBucket][google.storage.v2.Storage.GetBucket].
type GetBucketRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -311,15 +308,15 @@ type GetBucketRequest struct {
// Required. Name of a bucket.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // If set, and if the bucket's current metageneration does not match the
- // specified value, the request will return an error.
+ // If set, only gets the bucket metadata if its metageneration matches this
+ // value.
IfMetagenerationMatch *int64 `protobuf:"varint,2,opt,name=if_metageneration_match,json=ifMetagenerationMatch,proto3,oneof" json:"if_metageneration_match,omitempty"`
// If set, and if the bucket's current metageneration matches the specified
- // value, the request will return an error.
+ // value, the request returns an error.
IfMetagenerationNotMatch *int64 `protobuf:"varint,3,opt,name=if_metageneration_not_match,json=ifMetagenerationNotMatch,proto3,oneof" json:"if_metageneration_not_match,omitempty"`
// Mask specifying which fields to read.
- // A "*" field may be used to indicate all fields.
- // If no mask is specified, will default to all fields.
+ // A `*` field might be used to indicate all fields.
+ // If no mask is specified, it defaults to all fields.
ReadMask *fieldmaskpb.FieldMask `protobuf:"bytes,5,opt,name=read_mask,json=readMask,proto3,oneof" json:"read_mask,omitempty"`
}
@@ -381,35 +378,35 @@ func (x *GetBucketRequest) GetReadMask() *fieldmaskpb.FieldMask {
return nil
}
-// Request message for CreateBucket.
+// Request message for [CreateBucket][google.storage.v2.Storage.CreateBucket].
type CreateBucketRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // Required. The project to which this bucket will belong. This field must
- // either be empty or `projects/_`. The project ID that owns this bucket
- // should be specified in the `bucket.project` field.
+ // Required. The project to which this bucket belongs. This field must either
+ // be empty or `projects/_`. The project ID that owns this bucket should be
+ // specified in the `bucket.project` field.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Optional. Properties of the new bucket being inserted.
// The name of the bucket is specified in the `bucket_id` field. Populating
- // `bucket.name` field will result in an error.
+ // `bucket.name` field results in an error.
// The project of the bucket must be specified in the `bucket.project` field.
// This field must be in `projects/{projectIdentifier}` format,
// {projectIdentifier} can be the project ID or project number. The `parent`
// field must be either empty or `projects/_`.
Bucket *Bucket `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"`
- // Required. The ID to use for this bucket, which will become the final
- // component of the bucket's resource name. For example, the value `foo` might
- // result in a bucket with the name `projects/123456/buckets/foo`.
+ // Required. The ID to use for this bucket, which becomes the final component
+ // of the bucket's resource name. For example, the value `foo` might result in
+ // a bucket with the name `projects/123456/buckets/foo`.
BucketId string `protobuf:"bytes,3,opt,name=bucket_id,json=bucketId,proto3" json:"bucket_id,omitempty"`
// Optional. Apply a predefined set of access controls to this bucket.
- // Valid values are "authenticatedRead", "private", "projectPrivate",
- // "publicRead", or "publicReadWrite".
+ // Valid values are `authenticatedRead`, `private`, `projectPrivate`,
+ // `publicRead`, or `publicReadWrite`.
PredefinedAcl string `protobuf:"bytes,6,opt,name=predefined_acl,json=predefinedAcl,proto3" json:"predefined_acl,omitempty"`
// Optional. Apply a predefined set of default object access controls to this
- // bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl",
- // "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
+ // bucket. Valid values are `authenticatedRead`, `bucketOwnerFullControl`,
+ // `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`.
PredefinedDefaultObjectAcl string `protobuf:"bytes,7,opt,name=predefined_default_object_acl,json=predefinedDefaultObjectAcl,proto3" json:"predefined_default_object_acl,omitempty"`
// Optional. If true, enable object retention on the bucket.
EnableObjectRetention bool `protobuf:"varint,9,opt,name=enable_object_retention,json=enableObjectRetention,proto3" json:"enable_object_retention,omitempty"`
@@ -487,7 +484,7 @@ func (x *CreateBucketRequest) GetEnableObjectRetention() bool {
return false
}
-// Request message for ListBuckets.
+// Request message for [ListBuckets][google.storage.v2.Storage.ListBuckets].
type ListBucketsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -496,9 +493,9 @@ type ListBucketsRequest struct {
// Required. The project whose buckets we are listing.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Optional. Maximum number of buckets to return in a single response. The
- // service will use this parameter or 1,000 items, whichever is smaller. If
- // "acl" is present in the read_mask, the service will use this parameter of
- // 200 items, whichever is smaller.
+ // service uses this parameter or `1,000` items, whichever is smaller. If
+ // `acl` is present in the `read_mask`, the service uses this parameter of
+ // `200` items, whichever is smaller.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// Optional. A previously-returned page token representing part of the larger
// set of results to view.
@@ -506,10 +503,13 @@ type ListBucketsRequest struct {
// Optional. Filter results to buckets whose names begin with this prefix.
Prefix string `protobuf:"bytes,4,opt,name=prefix,proto3" json:"prefix,omitempty"`
// Mask specifying which fields to read from each result.
- // If no mask is specified, will default to all fields except items.owner,
- // items.acl, and items.default_object_acl.
- // * may be used to mean "all fields".
+ // If no mask is specified, it defaults to all fields except `items.
+ // owner`, `items.acl`, and `items.default_object_acl`.
+ // `*` might be used to mean "all fields".
ReadMask *fieldmaskpb.FieldMask `protobuf:"bytes,5,opt,name=read_mask,json=readMask,proto3,oneof" json:"read_mask,omitempty"`
+ // Optional. Allows listing of buckets, even if there are buckets that are
+ // unreachable.
+ ReturnPartialSuccess bool `protobuf:"varint,9,opt,name=return_partial_success,json=returnPartialSuccess,proto3" json:"return_partial_success,omitempty"`
}
func (x *ListBucketsRequest) Reset() {
@@ -577,7 +577,14 @@ func (x *ListBucketsRequest) GetReadMask() *fieldmaskpb.FieldMask {
return nil
}
-// The result of a call to Buckets.ListBuckets
+func (x *ListBucketsRequest) GetReturnPartialSuccess() bool {
+ if x != nil {
+ return x.ReturnPartialSuccess
+ }
+ return false
+}
+
+// Response message for [ListBuckets][google.storage.v2.Storage.ListBuckets].
type ListBucketsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -588,6 +595,19 @@ type ListBucketsResponse struct {
// The continuation token, used to page through large result sets. Provide
// this value in a subsequent request to return the next page of results.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+ // Unreachable resources.
+ // This field can only be present if the caller specified
+ // return_partial_success to be true in the request to receive indications
+ // of temporarily missing resources.
+ // unreachable might be:
+ // unreachable = [
+ //
+ // "projects/_/buckets/bucket1",
+ // "projects/_/buckets/bucket2",
+ // "projects/_/buckets/bucket3",
+ //
+ // ]
+ Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"`
}
func (x *ListBucketsResponse) Reset() {
@@ -634,7 +654,15 @@ func (x *ListBucketsResponse) GetNextPageToken() string {
return ""
}
-// Request message for LockBucketRetentionPolicyRequest.
+func (x *ListBucketsResponse) GetUnreachable() []string {
+ if x != nil {
+ return x.Unreachable
+ }
+ return nil
+}
+
+// Request message for
+// [LockBucketRetentionPolicy][google.storage.v2.Storage.LockBucketRetentionPolicy].
type LockBucketRetentionPolicyRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -691,35 +719,35 @@ func (x *LockBucketRetentionPolicyRequest) GetIfMetagenerationMatch() int64 {
return 0
}
-// Request for UpdateBucket method.
+// Request for [UpdateBucket][google.storage.v2.Storage.UpdateBucket] method.
type UpdateBucketRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The bucket to update.
- // The bucket's `name` field will be used to identify the bucket.
+ // The bucket's `name` field is used to identify the bucket.
Bucket *Bucket `protobuf:"bytes,1,opt,name=bucket,proto3" json:"bucket,omitempty"`
- // If set, will only modify the bucket if its metageneration matches this
+ // If set, the request modifies the bucket if its metageneration matches this
// value.
IfMetagenerationMatch *int64 `protobuf:"varint,2,opt,name=if_metageneration_match,json=ifMetagenerationMatch,proto3,oneof" json:"if_metageneration_match,omitempty"`
- // If set, will only modify the bucket if its metageneration does not match
- // this value.
+ // If set, the request modifies the bucket if its metageneration doesn't
+ // match this value.
IfMetagenerationNotMatch *int64 `protobuf:"varint,3,opt,name=if_metageneration_not_match,json=ifMetagenerationNotMatch,proto3,oneof" json:"if_metageneration_not_match,omitempty"`
// Optional. Apply a predefined set of access controls to this bucket.
- // Valid values are "authenticatedRead", "private", "projectPrivate",
- // "publicRead", or "publicReadWrite".
+ // Valid values are `authenticatedRead`, `private`, `projectPrivate`,
+ // `publicRead`, or `publicReadWrite`.
PredefinedAcl string `protobuf:"bytes,8,opt,name=predefined_acl,json=predefinedAcl,proto3" json:"predefined_acl,omitempty"`
// Optional. Apply a predefined set of default object access controls to this
- // bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl",
- // "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
+ // bucket. Valid values are `authenticatedRead`, `bucketOwnerFullControl`,
+ // `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`.
PredefinedDefaultObjectAcl string `protobuf:"bytes,9,opt,name=predefined_default_object_acl,json=predefinedDefaultObjectAcl,proto3" json:"predefined_default_object_acl,omitempty"`
// Required. List of fields to be updated.
//
// To specify ALL fields, equivalent to the JSON API's "update" function,
// specify a single field with the value `*`. Note: not recommended. If a new
// field is introduced at a later time, an older client updating with the `*`
- // may accidentally reset the new field's value.
+ // might accidentally reset the new field's value.
//
// Not specifying any fields is an error.
UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,6,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
@@ -797,7 +825,7 @@ func (x *UpdateBucketRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
return nil
}
-// Request message for ComposeObject.
+// Request message for [ComposeObject][google.storage.v2.Storage.ComposeObject].
type ComposeObjectRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -805,12 +833,12 @@ type ComposeObjectRequest struct {
// Required. Properties of the resulting object.
Destination *Object `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
- // Optional. The list of source objects that will be concatenated into a
- // single object.
+ // Optional. The list of source objects that is concatenated into a single
+ // object.
SourceObjects []*ComposeObjectRequest_SourceObject `protobuf:"bytes,2,rep,name=source_objects,json=sourceObjects,proto3" json:"source_objects,omitempty"`
// Optional. Apply a predefined set of access controls to the destination
- // object. Valid values are "authenticatedRead", "bucketOwnerFullControl",
- // "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
+ // object. Valid values are `authenticatedRead`, `bucketOwnerFullControl`,
+ // `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`.
DestinationPredefinedAcl string `protobuf:"bytes,9,opt,name=destination_predefined_acl,json=destinationPredefinedAcl,proto3" json:"destination_predefined_acl,omitempty"`
// Makes the operation conditional on whether the object's current generation
// matches the given value. Setting to 0 makes the operation succeed only if
@@ -821,14 +849,14 @@ type ComposeObjectRequest struct {
IfMetagenerationMatch *int64 `protobuf:"varint,5,opt,name=if_metageneration_match,json=ifMetagenerationMatch,proto3,oneof" json:"if_metageneration_match,omitempty"`
// Optional. Resource name of the Cloud KMS key, of the form
// `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`,
- // that will be used to encrypt the object. Overrides the object
+ // that is used to encrypt the object. Overrides the object
// metadata's `kms_key_name` value, if any.
KmsKey string `protobuf:"bytes,6,opt,name=kms_key,json=kmsKey,proto3" json:"kms_key,omitempty"`
// Optional. A set of parameters common to Storage API requests concerning an
// object.
CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,7,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"`
- // Optional. The checksums of the complete object. This will be validated
- // against the combined checksums of the component objects.
+ // Optional. The checksums of the complete object. This is validated against
+ // the combined checksums of the component objects.
ObjectChecksums *ObjectChecksums `protobuf:"bytes,10,opt,name=object_checksums,json=objectChecksums,proto3" json:"object_checksums,omitempty"`
}
@@ -918,8 +946,7 @@ func (x *ComposeObjectRequest) GetObjectChecksums() *ObjectChecksums {
return nil
}
-// Message for deleting an object.
-// `bucket` and `object` **must** be set.
+// Request message for deleting an object.
type DeleteObjectRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1040,7 +1067,8 @@ func (x *DeleteObjectRequest) GetCommonObjectRequestParams() *CommonObjectReques
return nil
}
-// Message for restoring an object.
+// Request message for
+// [RestoreObject][google.storage.v2.Storage.RestoreObject].
// `bucket`, `object`, and `generation` **must** be set.
type RestoreObjectRequest struct {
state protoimpl.MessageState
@@ -1074,7 +1102,7 @@ type RestoreObjectRequest struct {
// Makes the operation conditional on whether the object's current
// metageneration does not match the given value.
IfMetagenerationNotMatch *int64 `protobuf:"varint,7,opt,name=if_metageneration_not_match,json=ifMetagenerationNotMatch,proto3,oneof" json:"if_metageneration_not_match,omitempty"`
- // If false or unset, the bucket's default object ACL will be used.
+ // If false or unset, the bucket's default object ACL is used.
// If true, copy the source object's access controls.
// Return an error if bucket has UBLA enabled.
CopySourceAcl *bool `protobuf:"varint,9,opt,name=copy_source_acl,json=copySourceAcl,proto3,oneof" json:"copy_source_acl,omitempty"`
@@ -1183,8 +1211,8 @@ func (x *RestoreObjectRequest) GetCommonObjectRequestParams() *CommonObjectReque
return nil
}
-// Message for canceling an in-progress resumable upload.
-// `upload_id` **must** be set.
+// Request message for
+// [CancelResumableWrite][google.storage.v2.Storage.CancelResumableWrite].
type CancelResumableWriteRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1232,7 +1260,7 @@ func (x *CancelResumableWriteRequest) GetUploadId() string {
return ""
}
-// Empty response message for canceling an in-progress resumable upload, will be
+// Empty response message for canceling an in-progress resumable upload, is
// extended as needed.
type CancelResumableWriteResponse struct {
state protoimpl.MessageState
@@ -1270,7 +1298,7 @@ func (*CancelResumableWriteResponse) Descriptor() ([]byte, []int) {
return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{11}
}
-// Request message for ReadObject.
+// Request message for [ReadObject][google.storage.v2.Storage.ReadObject].
type ReadObjectRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1286,16 +1314,16 @@ type ReadObjectRequest struct {
// Optional. The offset for the first byte to return in the read, relative to
// the start of the object.
//
- // A negative `read_offset` value will be interpreted as the number of bytes
+ // A negative `read_offset` value is interpreted as the number of bytes
// back from the end of the object to be returned. For example, if an object's
- // length is 15 bytes, a ReadObjectRequest with `read_offset` = -5 and
- // `read_limit` = 3 would return bytes 10 through 12 of the object. Requesting
- // a negative offset with magnitude larger than the size of the object will
- // return the entire object.
+ // length is `15` bytes, a `ReadObjectRequest` with `read_offset` = `-5` and
+ // `read_limit` = `3` would return bytes `10` through `12` of the object.
+ // Requesting a negative offset with magnitude larger than the size of the
+ // object returns the entire object.
ReadOffset int64 `protobuf:"varint,4,opt,name=read_offset,json=readOffset,proto3" json:"read_offset,omitempty"`
// Optional. The maximum number of `data` bytes the server is allowed to
// return in the sum of all `Object` messages. A `read_limit` of zero
- // indicates that there is no limit, and a negative `read_limit` will cause an
+ // indicates that there is no limit, and a negative `read_limit` causes an
// error.
//
// If the stream returns fewer bytes than allowed by the `read_limit` and no
@@ -1321,10 +1349,10 @@ type ReadObjectRequest struct {
// object.
CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,10,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"`
// Mask specifying which fields to read.
- // The checksummed_data field and its children will always be present.
- // If no mask is specified, will default to all fields except metadata.owner
- // and metadata.acl.
- // * may be used to mean "all fields".
+ // The `checksummed_data` field and its children are always present.
+ // If no mask is specified, it defaults to all fields except `metadata.
+ // owner` and `metadata.acl`.
+ // `*` might be used to mean "all fields".
ReadMask *fieldmaskpb.FieldMask `protobuf:"bytes,12,opt,name=read_mask,json=readMask,proto3,oneof" json:"read_mask,omitempty"`
}
@@ -1435,7 +1463,7 @@ func (x *ReadObjectRequest) GetReadMask() *fieldmaskpb.FieldMask {
return nil
}
-// Request message for GetObject.
+// Request message for [GetObject][google.storage.v2.Storage.GetObject].
type GetObjectRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1469,15 +1497,15 @@ type GetObjectRequest struct {
// object.
CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,8,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"`
// Mask specifying which fields to read.
- // If no mask is specified, will default to all fields except metadata.acl and
- // metadata.owner.
- // * may be used to mean "all fields".
+ // If no mask is specified, it defaults to all fields except `metadata.
+ // acl` and `metadata.owner`.
+ // `*` might be used to mean "all fields".
ReadMask *fieldmaskpb.FieldMask `protobuf:"bytes,10,opt,name=read_mask,json=readMask,proto3,oneof" json:"read_mask,omitempty"`
// Optional. Restore token used to differentiate soft-deleted objects with the
// same name and generation. Only applicable for hierarchical namespace
- // buckets and if soft_deleted is set to true. This parameter is optional, and
- // is only required in the rare case when there are multiple soft-deleted
- // objects with the same name and generation.
+ // buckets and if `soft_deleted` is set to `true`. This parameter is optional,
+ // and is only required in the rare case when there are multiple soft-deleted
+ // objects with the same `name` and `generation`.
RestoreToken string `protobuf:"bytes,12,opt,name=restore_token,json=restoreToken,proto3" json:"restore_token,omitempty"`
}
@@ -1588,13 +1616,13 @@ func (x *GetObjectRequest) GetRestoreToken() string {
return ""
}
-// Response message for ReadObject.
+// Response message for [ReadObject][google.storage.v2.Storage.ReadObject].
type ReadObjectResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // A portion of the data for the object. The service **may** leave `data`
+ // A portion of the data for the object. The service might leave `data`
// empty for any given `ReadResponse`. This enables the service to inform the
// client that the request is still live while it is running an operation to
// generate more data.
@@ -1603,9 +1631,9 @@ type ReadObjectResponse struct {
// the client should compute one of these checksums over the downloaded object
// and compare it against the value provided here.
ObjectChecksums *ObjectChecksums `protobuf:"bytes,2,opt,name=object_checksums,json=objectChecksums,proto3" json:"object_checksums,omitempty"`
- // If read_offset and or read_limit was specified on the
- // ReadObjectRequest, ContentRange will be populated on the first
- // ReadObjectResponse message of the read stream.
+ // If `read_offset` and or `read_limit` is specified on the
+ // `ReadObjectRequest`, `ContentRange` is populated on the first
+ // `ReadObjectResponse` message of the read stream.
ContentRange *ContentRange `protobuf:"bytes,3,opt,name=content_range,json=contentRange,proto3" json:"content_range,omitempty"`
// Metadata of the object whose media is being returned.
// Only populated in the first response in the stream.
@@ -1702,13 +1730,12 @@ type BidiReadObjectSpec struct {
// object.
CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,8,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"`
// Mask specifying which fields to read.
- // The checksummed_data field and its children will always be present.
- // If no mask is specified, will default to all fields except metadata.owner
- // and metadata.acl.
- // * may be used to mean "all fields".
+ // The `checksummed_data` field and its children are always present.
+ // If no mask is specified, it defaults to all fields except `metadata.
+ // owner` and `metadata.acl`.
+ // `*` might be used to mean "all fields".
// As per https://google.aip.dev/161, this field is deprecated.
- // As an alternative, grpc metadata can be used:
- // https://cloud.google.com/apis/docs/system-parameters#definitions
+ // As an alternative, `grpc metadata` can be used:
//
// Deprecated: Marked as deprecated in google/storage/v2/storage.proto.
ReadMask *fieldmaskpb.FieldMask `protobuf:"bytes,12,opt,name=read_mask,json=readMask,proto3,oneof" json:"read_mask,omitempty"`
@@ -1829,22 +1856,23 @@ func (x *BidiReadObjectSpec) GetRoutingToken() string {
return ""
}
-// Request message for BidiReadObject.
+// Request message for
+// [BidiReadObject][google.storage.v2.Storage.BidiReadObject].
type BidiReadObjectRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Optional. The first message of each stream should set this field. If this
- // is not the first message, an error will be returned. Describes the object
- // to read.
+ // is not the first message, an error is returned. Describes the object to
+ // read.
ReadObjectSpec *BidiReadObjectSpec `protobuf:"bytes,1,opt,name=read_object_spec,json=readObjectSpec,proto3" json:"read_object_spec,omitempty"`
// Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
// single range is large enough to require multiple responses, they are
- // guaranteed to be delivered in increasing offset order. There are no
- // ordering guarantees across ranges. When no ranges are provided, the
- // response message will not include ObjectRangeData. For full object
- // downloads, the offset and size can be set to 0.
+ // delivered in increasing offset order. There are no ordering guarantees
+ // across ranges. When no ranges are provided, the response message
+ // doesn't include `ObjectRangeData`. For full object downloads, the
+ // offset and size can be set to `0`.
ReadRanges []*ReadRange `protobuf:"bytes,8,rep,name=read_ranges,json=readRanges,proto3" json:"read_ranges,omitempty"`
}
@@ -1892,25 +1920,26 @@ func (x *BidiReadObjectRequest) GetReadRanges() []*ReadRange {
return nil
}
-// Response message for BidiReadObject.
+// Response message for
+// [BidiReadObject][google.storage.v2.Storage.BidiReadObject].
type BidiReadObjectResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // A portion of the object's data. The service **may** leave data
- // empty for any given ReadResponse. This enables the service to inform the
+ // A portion of the object's data. The service might leave data
+ // empty for any given `ReadResponse`. This enables the service to inform the
// client that the request is still live while it is running an operation to
// generate more data.
- // The service **may** pipeline multiple responses belonging to different read
- // requests. Each ObjectRangeData entry will have a read_id
- // set to the same value as the corresponding source read request.
+ // The service might pipeline multiple responses belonging to different read
+ // requests. Each `ObjectRangeData` entry has a `read_id` that is set
+ // to the same value as the corresponding source read request.
ObjectDataRanges []*ObjectRangeData `protobuf:"bytes,6,rep,name=object_data_ranges,json=objectDataRanges,proto3" json:"object_data_ranges,omitempty"`
// Metadata of the object whose media is being returned.
// Only populated in the first response in the stream and not populated when
// the stream is opened with a read handle.
Metadata *Object `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
- // This field will be periodically refreshed, however it may not be set in
+ // This field is periodically refreshed, however it might not be set in
// every response. It allows the client to more efficiently open subsequent
// bidirectional streams to the same object.
ReadHandle *BidiReadHandle `protobuf:"bytes,7,opt,name=read_handle,json=readHandle,proto3" json:"read_handle,omitempty"`
@@ -1967,15 +1996,15 @@ func (x *BidiReadObjectResponse) GetReadHandle() *BidiReadHandle {
return nil
}
-// Error proto containing details for a redirected read. This error may be
+// Error proto containing details for a redirected read. This error might be
// attached as details for an ABORTED response to BidiReadObject.
type BidiReadObjectRedirectedError struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // The read handle for the redirected read. If set, the client may use this in
- // the BidiReadObjectSpec when retrying the read stream.
+ // The read handle for the redirected read. If set, the client might use this
+ // in the BidiReadObjectSpec when retrying the read stream.
ReadHandle *BidiReadHandle `protobuf:"bytes,1,opt,name=read_handle,json=readHandle,proto3" json:"read_handle,omitempty"`
// The routing token the client must use when retrying the read stream.
// This value must be provided in the header `x-goog-request-params`, with key
@@ -2027,7 +2056,7 @@ func (x *BidiReadObjectRedirectedError) GetRoutingToken() string {
return ""
}
-// Error proto containing details for a redirected write. This error may be
+// Error proto containing details for a redirected write. This error might be
// attached as details for an ABORTED response to BidiWriteObject.
type BidiWriteObjectRedirectedError struct {
state protoimpl.MessageState
@@ -2040,11 +2069,11 @@ type BidiWriteObjectRedirectedError struct {
RoutingToken *string `protobuf:"bytes,1,opt,name=routing_token,json=routingToken,proto3,oneof" json:"routing_token,omitempty"`
// Opaque value describing a previous write. If set, the client must use this
// in an AppendObjectSpec first_message when retrying the write stream. If not
- // set, clients may retry the original request.
+ // set, clients might retry the original request.
WriteHandle *BidiWriteHandle `protobuf:"bytes,2,opt,name=write_handle,json=writeHandle,proto3,oneof" json:"write_handle,omitempty"`
- // The generation of the object that triggered the redirect. This will be set
- // iff write_handle is set. If set, the client must use this in an
- // AppendObjectSpec first_message when retrying the write stream.
+ // The generation of the object that triggered the redirect. This is set
+ // iff `write_handle` is set. If set, the client must use this in an
+ // `AppendObjectSpec` first_message when retrying the write stream.
Generation *int64 `protobuf:"varint,3,opt,name=generation,proto3,oneof" json:"generation,omitempty"`
}
@@ -2203,7 +2232,7 @@ func (x *ReadRangeError) GetStatus() *status.Status {
return nil
}
-// Describes a range of bytes to read in a BidiReadObjectRanges request.
+// Describes a range of bytes to read in a `BidiReadObjectRanges` request.
type ReadRange struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -2212,26 +2241,26 @@ type ReadRange struct {
// Required. The offset for the first byte to return in the read, relative to
// the start of the object.
//
- // A negative read_offset value will be interpreted as the number of bytes
+ // A negative read_offset value is interpreted as the number of bytes
// back from the end of the object to be returned. For example, if an object's
- // length is 15 bytes, a ReadObjectRequest with read_offset = -5 and
- // read_length = 3 would return bytes 10 through 12 of the object. Requesting
- // a negative offset with magnitude larger than the size of the object will
- // return the entire object. A read_offset larger than the size of the object
- // will result in an OutOfRange error.
+ // length is 15 bytes, a `ReadObjectRequest` with `read_offset` = -5 and
+ // `read_length` = 3 would return bytes 10 through 12 of the object.
+ // Requesting a negative offset with magnitude larger than the size of the
+ // object returns the entire object. A `read_offset` larger than the size
+ // of the object results in an `OutOfRange` error.
ReadOffset int64 `protobuf:"varint,1,opt,name=read_offset,json=readOffset,proto3" json:"read_offset,omitempty"`
// Optional. The maximum number of data bytes the server is allowed to return
- // across all response messages with the same read_id. A read_length of zero
- // indicates to read until the resource end, and a negative read_length will
- // cause an error. If the stream returns fewer bytes than allowed by the
- // read_length and no error occurred, the stream includes all data from the
- // read_offset to the resource end.
+ // across all response messages with the same `read_id`. A `read_length` of
+ // zero indicates to read until the resource end, and a negative `read_length`
+ // causes an error. If the stream returns fewer bytes than allowed by the
+ // `read_length` and no error occurred, the stream includes all data from the
+ // `read_offset` to the resource end.
ReadLength int64 `protobuf:"varint,2,opt,name=read_length,json=readLength,proto3" json:"read_length,omitempty"`
// Required. Read identifier provided by the client. When the client issues
- // more than one outstanding ReadRange on the same stream, responses can be
+ // more than one outstanding `ReadRange` on the same stream, responses can be
// mapped back to their corresponding requests using this value. Clients must
// ensure that all outstanding requests have different read_id values. The
- // server may close the stream with an error if this condition is not met.
+ // server might close the stream with an error if this condition is not met.
ReadId int64 `protobuf:"varint,3,opt,name=read_id,json=readId,proto3" json:"read_id,omitempty"`
}
@@ -2294,11 +2323,11 @@ type ObjectRangeData struct {
// A portion of the data for the object.
ChecksummedData *ChecksummedData `protobuf:"bytes,1,opt,name=checksummed_data,json=checksummedData,proto3" json:"checksummed_data,omitempty"`
- // The ReadRange describes the content being returned with read_id set to the
- // corresponding ReadObjectRequest in the stream. Multiple ObjectRangeData
- // messages may have the same read_id but increasing offsets.
- // ReadObjectResponse messages with the same read_id are guaranteed to be
- // delivered in increasing offset order.
+ // The `ReadRange` describes the content being returned with `read_id` set to
+ // the corresponding `ReadObjectRequest` in the stream. Multiple
+ // `ObjectRangeData` messages might have the same read_id but increasing
+ // offsets. `ReadObjectResponse` messages with the same `read_id` are
+ // guaranteed to be delivered in increasing offset order.
ReadRange *ReadRange `protobuf:"bytes,2,opt,name=read_range,json=readRange,proto3" json:"read_range,omitempty"`
// If set, indicates there are no more bytes to read for the given ReadRange.
RangeEnd bool `protobuf:"varint,3,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"`
@@ -2355,8 +2384,8 @@ func (x *ObjectRangeData) GetRangeEnd() bool {
return false
}
-// BidiReadHandle contains a handle from a previous BiDiReadObject
-// invocation. The client can use this instead of BidiReadObjectSpec as an
+// `BidiReadHandle` contains a handle from a previous `BiDiReadObject`
+// invocation. The client can use this instead of `BidiReadObjectSpec` as an
// optimized way of opening subsequent bidirectional streams to the same object.
type BidiReadHandle struct {
state protoimpl.MessageState
@@ -2404,9 +2433,9 @@ func (x *BidiReadHandle) GetHandle() []byte {
return nil
}
-// BidiWriteHandle contains a handle from a previous BidiWriteObject
-// invocation. The client can use this as an optimized way of opening subsequent
-// bidirectional streams to the same object.
+// `BidiWriteHandle` contains a handle from a previous `BidiWriteObject`
+// invocation. The client can use this instead of `BidiReadObjectSpec` as an
+// optimized way of opening subsequent bidirectional streams to the same object.
type BidiWriteHandle struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -2462,16 +2491,16 @@ type WriteObjectSpec struct {
// Required. Destination object, including its name and its metadata.
Resource *Object `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
// Optional. Apply a predefined set of access controls to this object.
- // Valid values are "authenticatedRead", "bucketOwnerFullControl",
- // "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
+ // Valid values are `authenticatedRead`, `bucketOwnerFullControl`,
+ // `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`.
PredefinedAcl string `protobuf:"bytes,7,opt,name=predefined_acl,json=predefinedAcl,proto3" json:"predefined_acl,omitempty"`
// Makes the operation conditional on whether the object's current
- // generation matches the given value. Setting to 0 makes the operation
+ // generation matches the given value. Setting to `0` makes the operation
// succeed only if there are no live versions of the object.
IfGenerationMatch *int64 `protobuf:"varint,3,opt,name=if_generation_match,json=ifGenerationMatch,proto3,oneof" json:"if_generation_match,omitempty"`
// Makes the operation conditional on whether the object's live
// generation does not match the given value. If no live object exists, the
- // precondition fails. Setting to 0 makes the operation succeed only if
+ // precondition fails. Setting to `0` makes the operation succeed only if
// there is a live version of the object.
IfGenerationNotMatch *int64 `protobuf:"varint,4,opt,name=if_generation_not_match,json=ifGenerationNotMatch,proto3,oneof" json:"if_generation_not_match,omitempty"`
// Makes the operation conditional on whether the object's current
@@ -2482,14 +2511,14 @@ type WriteObjectSpec struct {
IfMetagenerationNotMatch *int64 `protobuf:"varint,6,opt,name=if_metageneration_not_match,json=ifMetagenerationNotMatch,proto3,oneof" json:"if_metageneration_not_match,omitempty"`
// The expected final object size being uploaded.
// If this value is set, closing the stream after writing fewer or more than
- // `object_size` bytes will result in an OUT_OF_RANGE error.
+ // `object_size` bytes results in an `OUT_OF_RANGE` error.
//
// This situation is considered a client error, and if such an error occurs
// you must start the upload over from scratch, this time sending the correct
// number of bytes.
ObjectSize *int64 `protobuf:"varint,8,opt,name=object_size,json=objectSize,proto3,oneof" json:"object_size,omitempty"`
- // If true, the object will be created in appendable mode.
- // This field may only be set when using BidiWriteObject.
+ // If `true`, the object is created in appendable mode.
+ // This field might only be set when using `BidiWriteObject`.
Appendable *bool `protobuf:"varint,9,opt,name=appendable,proto3,oneof" json:"appendable,omitempty"`
}
@@ -2579,7 +2608,7 @@ func (x *WriteObjectSpec) GetAppendable() bool {
return false
}
-// Request message for WriteObject.
+// Request message for [WriteObject][google.storage.v2.Storage.WriteObject].
type WriteObjectRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -2604,7 +2633,7 @@ type WriteObjectRequest struct {
// first `write_offset` and the sizes of all `data` chunks sent previously on
// this stream.
//
- // An incorrect value will cause an error.
+ // An incorrect value causes an error.
WriteOffset int64 `protobuf:"varint,3,opt,name=write_offset,json=writeOffset,proto3" json:"write_offset,omitempty"`
// A portion of the data for the object.
//
@@ -2613,19 +2642,19 @@ type WriteObjectRequest struct {
// *WriteObjectRequest_ChecksummedData
Data isWriteObjectRequest_Data `protobuf_oneof:"data"`
// Optional. Checksums for the complete object. If the checksums computed by
- // the service don't match the specified checksums the call will fail. May
- // only be provided in the first or last request (either with first_message,
- // or finish_write set).
+ // the service don't match the specified checksums the call fails. This field
+ // might only be provided in the first or last request (either with
+ // `first_message`, or `finish_write` set).
ObjectChecksums *ObjectChecksums `protobuf:"bytes,6,opt,name=object_checksums,json=objectChecksums,proto3" json:"object_checksums,omitempty"`
// Optional. If `true`, this indicates that the write is complete. Sending any
// `WriteObjectRequest`s subsequent to one in which `finish_write` is `true`
- // will cause an error.
- // For a non-resumable write (where the upload_id was not set in the first
+ // causes an error.
+ // For a non-resumable write (where the `upload_id` was not set in the first
// message), it is an error not to set this field in the final message of the
// stream.
FinishWrite bool `protobuf:"varint,7,opt,name=finish_write,json=finishWrite,proto3" json:"finish_write,omitempty"`
- // Optional. A set of parameters common to Storage API requests concerning an
- // object.
+ // Optional. A set of parameters common to Cloud Storage API requests
+ // concerning an object.
CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,8,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"`
}
@@ -2748,19 +2777,20 @@ type isWriteObjectRequest_Data interface {
type WriteObjectRequest_ChecksummedData struct {
// The data to insert. If a crc32c checksum is provided that doesn't match
- // the checksum computed by the service, the request will fail.
+ // the checksum computed by the service, the request fails.
ChecksummedData *ChecksummedData `protobuf:"bytes,4,opt,name=checksummed_data,json=checksummedData,proto3,oneof"`
}
func (*WriteObjectRequest_ChecksummedData) isWriteObjectRequest_Data() {}
-// Response message for WriteObject.
+// Response message for
+// [WriteObject][google.storage.v2.Storage.WriteObject].
type WriteObjectResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // The response will set one of the following.
+ // The response sets one of the following.
//
// Types that are assignable to WriteStatus:
//
@@ -2865,7 +2895,7 @@ type AppendObjectSpec struct {
// is empty.
IfMetagenerationNotMatch *int64 `protobuf:"varint,5,opt,name=if_metageneration_not_match,json=ifMetagenerationNotMatch,proto3,oneof" json:"if_metageneration_not_match,omitempty"`
// An optional routing token that influences request routing for the stream.
- // Must be provided if a BidiWriteObjectRedirectedError is returned.
+ // Must be provided if a `BidiWriteObjectRedirectedError` is returned.
RoutingToken *string `protobuf:"bytes,6,opt,name=routing_token,json=routingToken,proto3,oneof" json:"routing_token,omitempty"`
// An optional write handle returned from a previous BidiWriteObjectResponse
// message or a BidiWriteObjectRedirectedError error.
@@ -2954,7 +2984,8 @@ func (x *AppendObjectSpec) GetWriteHandle() *BidiWriteHandle {
return nil
}
-// Request message for BidiWriteObject.
+// Request message for
+// [BidiWriteObject][google.storage.v2.Storage.BidiWriteObject].
type BidiWriteObjectRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -2972,15 +3003,15 @@ type BidiWriteObjectRequest struct {
// should be written.
//
// In the first `WriteObjectRequest` of a `WriteObject()` action, it
- // indicates the initial offset for the `Write()` call. The value **must** be
+ // indicates the initial offset for the `Write()` call. The value must be
// equal to the `persisted_size` that a call to `QueryWriteStatus()` would
// return (0 if this is the first write to the object).
//
- // On subsequent calls, this value **must** be no larger than the sum of the
+ // On subsequent calls, this value must be no larger than the sum of the
// first `write_offset` and the sizes of all `data` chunks sent previously on
// this stream.
//
- // An invalid value will cause an error.
+ // An invalid value causes an error.
WriteOffset int64 `protobuf:"varint,3,opt,name=write_offset,json=writeOffset,proto3" json:"write_offset,omitempty"`
// A portion of the data for the object.
//
@@ -2989,30 +3020,30 @@ type BidiWriteObjectRequest struct {
// *BidiWriteObjectRequest_ChecksummedData
Data isBidiWriteObjectRequest_Data `protobuf_oneof:"data"`
// Optional. Checksums for the complete object. If the checksums computed by
- // the service don't match the specified checksums the call will fail. May
- // only be provided in the first request or the last request (with
- // finish_write set).
+ // the service don't match the specified checksums the call fails. Might only
+ // be provided in the first request or the last request (with finish_write
+ // set).
ObjectChecksums *ObjectChecksums `protobuf:"bytes,6,opt,name=object_checksums,json=objectChecksums,proto3" json:"object_checksums,omitempty"`
- // Optional. For each BidiWriteObjectRequest where state_lookup is `true` or
- // the client closes the stream, the service will send a
- // BidiWriteObjectResponse containing the current persisted size. The
+ // Optional. For each `BidiWriteObjectRequest` where `state_lookup` is `true`
+ // or the client closes the stream, the service sends a
+ // `BidiWriteObjectResponse` containing the current persisted size. The
// persisted size sent in responses covers all the bytes the server has
// persisted thus far and can be used to decide what data is safe for the
// client to drop. Note that the object's current size reported by the
- // BidiWriteObjectResponse may lag behind the number of bytes written by the
- // client. This field is ignored if `finish_write` is set to true.
+ // `BidiWriteObjectResponse` might lag behind the number of bytes written by
+ // the client. This field is ignored if `finish_write` is set to true.
StateLookup bool `protobuf:"varint,7,opt,name=state_lookup,json=stateLookup,proto3" json:"state_lookup,omitempty"`
// Optional. Persists data written on the stream, up to and including the
// current message, to permanent storage. This option should be used sparingly
- // as it may reduce performance. Ongoing writes will periodically be persisted
+ // as it might reduce performance. Ongoing writes are periodically persisted
// on the server even when `flush` is not set. This field is ignored if
// `finish_write` is set to true since there's no need to checkpoint or flush
// if this message completes the write.
Flush bool `protobuf:"varint,8,opt,name=flush,proto3" json:"flush,omitempty"`
// Optional. If `true`, this indicates that the write is complete. Sending any
// `WriteObjectRequest`s subsequent to one in which `finish_write` is `true`
- // will cause an error.
- // For a non-resumable write (where the upload_id was not set in the first
+ // causes an error.
+ // For a non-resumable write (where the `upload_id` was not set in the first
// message), it is an error not to set this field in the final message of the
// stream.
FinishWrite bool `protobuf:"varint,9,opt,name=finish_write,json=finishWrite,proto3" json:"finish_write,omitempty"`
@@ -3168,7 +3199,7 @@ type isBidiWriteObjectRequest_Data interface {
type BidiWriteObjectRequest_ChecksummedData struct {
// The data to insert. If a crc32c checksum is provided that doesn't match
- // the checksum computed by the service, the request will fail.
+ // the checksum computed by the service, the request fails.
ChecksummedData *ChecksummedData `protobuf:"bytes,4,opt,name=checksummed_data,json=checksummedData,proto3,oneof"`
}
@@ -3180,14 +3211,14 @@ type BidiWriteObjectResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // The response will set one of the following.
+ // The response sets one of the following.
//
// Types that are assignable to WriteStatus:
//
// *BidiWriteObjectResponse_PersistedSize
// *BidiWriteObjectResponse_Resource
WriteStatus isBidiWriteObjectResponse_WriteStatus `protobuf_oneof:"write_status"`
- // An optional write handle that will periodically be present in response
+ // An optional write handle that is returned periodically in response
// messages. Clients should save it for later use in establishing a new stream
// if a connection is interrupted.
WriteHandle *BidiWriteHandle `protobuf:"bytes,3,opt,name=write_handle,json=writeHandle,proto3,oneof" json:"write_handle,omitempty"`
@@ -3271,7 +3302,7 @@ func (*BidiWriteObjectResponse_PersistedSize) isBidiWriteObjectResponse_WriteSta
func (*BidiWriteObjectResponse_Resource) isBidiWriteObjectResponse_WriteStatus() {}
-// Request message for ListObjects.
+// Request message for [ListObjects][google.storage.v2.Storage.ListObjects].
type ListObjectsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -3281,58 +3312,57 @@ type ListObjectsRequest struct {
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Optional. Maximum number of `items` plus `prefixes` to return
// in a single page of responses. As duplicate `prefixes` are
- // omitted, fewer total results may be returned than requested. The service
- // will use this parameter or 1,000 items, whichever is smaller.
+ // omitted, fewer total results might be returned than requested. The service
+ // uses this parameter or 1,000 items, whichever is smaller.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// Optional. A previously-returned page token representing part of the larger
// set of results to view.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
- // Optional. If set, returns results in a directory-like mode. `items` will
- // contain only objects whose names, aside from the `prefix`, do not contain
+ // Optional. If set, returns results in a directory-like mode. `items`
+ // contains only objects whose names, aside from the `prefix`, do not contain
// `delimiter`. Objects whose names, aside from the `prefix`, contain
- // `delimiter` will have their name, truncated after the `delimiter`, returned
- // in `prefixes`. Duplicate `prefixes` are omitted.
+ // `delimiter` has their name, truncated after the `delimiter`, returned in
+ // `prefixes`. Duplicate `prefixes` are omitted.
Delimiter string `protobuf:"bytes,4,opt,name=delimiter,proto3" json:"delimiter,omitempty"`
// Optional. If true, objects that end in exactly one instance of `delimiter`
- // will have their metadata included in `items` in addition to
+ // has their metadata included in `items` in addition to
// `prefixes`.
IncludeTrailingDelimiter bool `protobuf:"varint,5,opt,name=include_trailing_delimiter,json=includeTrailingDelimiter,proto3" json:"include_trailing_delimiter,omitempty"`
// Optional. Filter results to objects whose names begin with this prefix.
Prefix string `protobuf:"bytes,6,opt,name=prefix,proto3" json:"prefix,omitempty"`
// Optional. If `true`, lists all versions of an object as distinct results.
- // For more information, see
- // [Object
- // Versioning](https://cloud.google.com/storage/docs/object-versioning).
Versions bool `protobuf:"varint,7,opt,name=versions,proto3" json:"versions,omitempty"`
// Mask specifying which fields to read from each result.
- // If no mask is specified, will default to all fields except items.acl and
- // items.owner.
- // * may be used to mean "all fields".
+ // If no mask is specified, defaults to all fields except `items.acl` and
+ // `items.owner`.
+ // `*` might be used to mean all fields.
ReadMask *fieldmaskpb.FieldMask `protobuf:"bytes,8,opt,name=read_mask,json=readMask,proto3,oneof" json:"read_mask,omitempty"`
// Optional. Filter results to objects whose names are lexicographically equal
- // to or after lexicographic_start. If lexicographic_end is also set, the
- // objects listed have names between lexicographic_start (inclusive) and
- // lexicographic_end (exclusive).
+ // to or after `lexicographic_start`. If `lexicographic_end` is also set, the
+ // objects listed have names between `lexicographic_start` (inclusive) and
+ // `lexicographic_end` (exclusive).
LexicographicStart string `protobuf:"bytes,10,opt,name=lexicographic_start,json=lexicographicStart,proto3" json:"lexicographic_start,omitempty"`
// Optional. Filter results to objects whose names are lexicographically
- // before lexicographic_end. If lexicographic_start is also set, the objects
- // listed have names between lexicographic_start (inclusive) and
- // lexicographic_end (exclusive).
+ // before `lexicographic_end`. If `lexicographic_start` is also set, the
+ // objects listed have names between `lexicographic_start` (inclusive) and
+ // `lexicographic_end` (exclusive).
LexicographicEnd string `protobuf:"bytes,11,opt,name=lexicographic_end,json=lexicographicEnd,proto3" json:"lexicographic_end,omitempty"`
// Optional. If true, only list all soft-deleted versions of the object.
// Soft delete policy is required to set this option.
SoftDeleted bool `protobuf:"varint,12,opt,name=soft_deleted,json=softDeleted,proto3" json:"soft_deleted,omitempty"`
- // Optional. If true, will also include folders and managed folders (besides
- // objects) in the returned `prefixes`. Requires `delimiter` to be set to '/'.
+ // Optional. If true, includes folders and managed folders (besides objects)
+ // in the returned `prefixes`. Requires `delimiter` to be set to '/'.
IncludeFoldersAsPrefixes bool `protobuf:"varint,13,opt,name=include_folders_as_prefixes,json=includeFoldersAsPrefixes,proto3" json:"include_folders_as_prefixes,omitempty"`
// Optional. Filter results to objects and prefixes that match this glob
- // pattern. See [List Objects Using
- // Glob](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob)
+ // pattern. See [List objects using
+ // glob](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob)
// for the full syntax.
MatchGlob string `protobuf:"bytes,14,opt,name=match_glob,json=matchGlob,proto3" json:"match_glob,omitempty"`
- // Optional. Filter the returned objects. Currently only supported for the
- // `contexts` field. If `delimiter` is set, the returned `prefixes` are exempt
- // from this filter.
+ // Optional. An expression used to filter the returned objects by the
+ // `context` field. For the full syntax, see [Filter objects by contexts
+ // syntax](https://cloud.google.com/storage/docs/listing-objects#filter-by-object-contexts-syntax).
+ // If a `delimiter` is set, the returned `prefixes` are exempt from this
+ // filter.
Filter string `protobuf:"bytes,15,opt,name=filter,proto3" json:"filter,omitempty"`
}
@@ -3464,7 +3494,8 @@ func (x *ListObjectsRequest) GetFilter() string {
return ""
}
-// Request object for `QueryWriteStatus`.
+// Request object for
+// [QueryWriteStatus][google.storage.v2.Storage.QueryWriteStatus].
type QueryWriteStatusRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -3522,13 +3553,14 @@ func (x *QueryWriteStatusRequest) GetCommonObjectRequestParams() *CommonObjectRe
return nil
}
-// Response object for `QueryWriteStatus`.
+// Response object for
+// [QueryWriteStatus][google.storage.v2.Storage.QueryWriteStatus].
type QueryWriteStatusResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // The response will set one of the following.
+ // The response sets one of the following.
//
// Types that are assignable to WriteStatus:
//
@@ -3610,14 +3642,15 @@ func (*QueryWriteStatusResponse_PersistedSize) isQueryWriteStatusResponse_WriteS
func (*QueryWriteStatusResponse_Resource) isQueryWriteStatusResponse_WriteStatus() {}
-// Request message for RewriteObject.
+// Request message for [RewriteObject][google.storage.v2.Storage.RewriteObject].
// If the source object is encrypted using a Customer-Supplied Encryption Key
-// the key information must be provided in the copy_source_encryption_algorithm,
-// copy_source_encryption_key_bytes, and copy_source_encryption_key_sha256_bytes
-// fields. If the destination object should be encrypted the keying information
-// should be provided in the encryption_algorithm, encryption_key_bytes, and
-// encryption_key_sha256_bytes fields of the
-// common_object_request_params.customer_encryption field.
+// the key information must be provided in the
+// `copy_source_encryption_algorithm`, `copy_source_encryption_key_bytes`, and
+// `copy_source_encryption_key_sha256_bytes` fields. If the destination object
+// should be encrypted the keying information should be provided in the
+// `encryption_algorithm`, `encryption_key_bytes`, and
+// `encryption_key_sha256_bytes` fields of the
+// `common_object_request_params.customer_encryption` field.
type RewriteObjectRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -3634,7 +3667,7 @@ type RewriteObjectRequest struct {
// Required. Immutable. The name of the bucket containing the destination
// object.
DestinationBucket string `protobuf:"bytes,25,opt,name=destination_bucket,json=destinationBucket,proto3" json:"destination_bucket,omitempty"`
- // Optional. The name of the Cloud KMS key that will be used to encrypt the
+ // Optional. The name of the Cloud KMS key that is used to encrypt the
// destination object. The Cloud KMS key must be located in same location as
// the object. If the parameter is not specified, the request uses the
// destination bucket's default encryption key, if any, or else the
@@ -3644,8 +3677,8 @@ type RewriteObjectRequest struct {
// The `name`, `bucket` and `kms_key` fields must not be populated (these
// values are specified in the `destination_name`, `destination_bucket`, and
// `destination_kms_key` fields).
- // If `destination` is present it will be used to construct the destination
- // object's metadata; otherwise the destination object's metadata will be
+ // If `destination` is present it is used to construct the destination
+ // object's metadata; otherwise the destination object's metadata is
// copied from the source object.
Destination *Object `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
// Required. Name of the bucket in which to find the source object.
@@ -3662,8 +3695,8 @@ type RewriteObjectRequest struct {
// first rewrite request.
RewriteToken string `protobuf:"bytes,5,opt,name=rewrite_token,json=rewriteToken,proto3" json:"rewrite_token,omitempty"`
// Optional. Apply a predefined set of access controls to the destination
- // object. Valid values are "authenticatedRead", "bucketOwnerFullControl",
- // "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
+ // object. Valid values are `authenticatedRead`, `bucketOwnerFullControl`,
+ // `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`.
DestinationPredefinedAcl string `protobuf:"bytes,28,opt,name=destination_predefined_acl,json=destinationPredefinedAcl,proto3" json:"destination_predefined_acl,omitempty"`
// Makes the operation conditional on whether the object's current generation
// matches the given value. Setting to 0 makes the operation succeed only if
@@ -3692,7 +3725,7 @@ type RewriteObjectRequest struct {
// Makes the operation conditional on whether the source object's current
// metageneration does not match the given value.
IfSourceMetagenerationNotMatch *int64 `protobuf:"varint,14,opt,name=if_source_metageneration_not_match,json=ifSourceMetagenerationNotMatch,proto3,oneof" json:"if_source_metageneration_not_match,omitempty"`
- // Optional. The maximum number of bytes that will be rewritten per rewrite
+ // Optional. The maximum number of bytes that are rewritten per rewrite
// request. Most callers shouldn't need to specify this parameter - it is
// primarily in place to support testing. If specified the value must be an
// integral multiple of 1 MiB (1048576). Also, this only applies to requests
@@ -3714,8 +3747,8 @@ type RewriteObjectRequest struct {
// Optional. A set of parameters common to Storage API requests concerning an
// object.
CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,19,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"`
- // Optional. The checksums of the complete object. This will be used to
- // validate the destination object after rewriting.
+ // Optional. The checksums of the complete object. This is used to validate
+ // the destination object after rewriting.
ObjectChecksums *ObjectChecksums `protobuf:"bytes,29,opt,name=object_checksums,json=objectChecksums,proto3" json:"object_checksums,omitempty"`
}
@@ -3998,7 +4031,7 @@ func (x *RewriteResponse) GetResource() *Object {
return nil
}
-// Request message for MoveObject.
+// Request message for [MoveObject][google.storage.v2.Storage.MoveObject].
type MoveObjectRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -4167,7 +4200,8 @@ func (x *MoveObjectRequest) GetIfMetagenerationNotMatch() int64 {
return 0
}
-// Request message StartResumableWrite.
+// Request message for
+// [StartResumableWrite][google.storage.v2.Storage.StartResumableWrite].
type StartResumableWriteRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -4237,7 +4271,8 @@ func (x *StartResumableWriteRequest) GetObjectChecksums() *ObjectChecksums {
return nil
}
-// Response object for `StartResumableWrite`.
+// Response object for
+// [StartResumableWrite][google.storage.v2.Storage.StartResumableWrite].
type StartResumableWriteResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -4288,7 +4323,7 @@ func (x *StartResumableWriteResponse) GetUploadId() string {
return ""
}
-// Request message for UpdateObject.
+// Request message for [UpdateObject][google.storage.v2.Storage.UpdateObject].
type UpdateObjectRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -4324,7 +4359,7 @@ type UpdateObjectRequest struct {
// To specify ALL fields, equivalent to the JSON API's "update" function,
// specify a single field with the value `*`. Note: not recommended. If a new
// field is introduced at a later time, an older client updating with the `*`
- // may accidentally reset the new field's value.
+ // might accidentally reset the new field's value.
//
// Not specifying any fields is an error.
UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,7,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
@@ -4440,8 +4475,8 @@ type CommonObjectRequestParams struct {
// Optional. Encryption key used with the Customer-Supplied Encryption Keys
// feature. In raw bytes format (not base64-encoded).
EncryptionKeyBytes []byte `protobuf:"bytes,4,opt,name=encryption_key_bytes,json=encryptionKeyBytes,proto3" json:"encryption_key_bytes,omitempty"`
- // Optional. SHA256 hash of encryption key used with the Customer-Supplied
- // Encryption Keys feature.
+ // Optional. SHA256 hash of encryption key used with the Customer-supplied
+ // encryption keys feature.
EncryptionKeySha256Bytes []byte `protobuf:"bytes,5,opt,name=encryption_key_sha256_bytes,json=encryptionKeySha256Bytes,proto3" json:"encryption_key_sha256_bytes,omitempty"`
}
@@ -4544,25 +4579,23 @@ type Bucket struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Output only. The user-chosen part of the bucket name. The `{bucket}`
// portion of the `name` field. For globally unique buckets, this is equal to
- // the "bucket name" of other Cloud Storage APIs. Example: "pub".
+ // the `bucket name` of other Cloud Storage APIs. Example: `pub`.
BucketId string `protobuf:"bytes,2,opt,name=bucket_id,json=bucketId,proto3" json:"bucket_id,omitempty"`
// The etag of the bucket.
- // If included in the metadata of an UpdateBucketRequest, the operation will
- // only be performed if the etag matches that of the bucket.
+ // If included in the metadata of an `UpdateBucketRequest`, the operation is
+ // only performed if the `etag` matches that of the bucket.
Etag string `protobuf:"bytes,29,opt,name=etag,proto3" json:"etag,omitempty"`
// Immutable. The project which owns this bucket, in the format of
- // "projects/{projectIdentifier}".
- // {projectIdentifier} can be the project ID or project number.
- // Output values will always be in project number format.
+ // `projects/{projectIdentifier}`.
+ // `{projectIdentifier}` can be the project ID or project number.
+ // Output values are always in the project number format.
Project string `protobuf:"bytes,3,opt,name=project,proto3" json:"project,omitempty"`
// Output only. The metadata generation of this bucket.
Metageneration int64 `protobuf:"varint,4,opt,name=metageneration,proto3" json:"metageneration,omitempty"`
// Immutable. The location of the bucket. Object data for objects in the
// bucket resides in physical storage within this region. Defaults to `US`.
- // See the
- // [https://developers.google.com/storage/docs/concepts-techniques#specifyinglocations"][developer's
- // guide] for the authoritative list. Attempting to update this field after
- // the bucket is created will result in an error.
+ // Attempting to update this field after the bucket is created results in an
+ // error.
Location string `protobuf:"bytes,5,opt,name=location,proto3" json:"location,omitempty"`
// Output only. The location type of the bucket (region, dual-region,
// multi-region, etc).
@@ -4570,44 +4603,44 @@ type Bucket struct {
// Optional. The bucket's default storage class, used whenever no storageClass
// is specified for a newly-created object. This defines how objects in the
// bucket are stored and determines the SLA and the cost of storage.
- // If this value is not specified when the bucket is created, it will default
- // to `STANDARD`. For more information, see
- // https://developers.google.com/storage/docs/storage-classes.
+ // If this value is not specified when the bucket is created, it defaults
+ // to `STANDARD`. For more information, see [Storage
+ // classes](https://developers.google.com/storage/docs/storage-classes).
StorageClass string `protobuf:"bytes,7,opt,name=storage_class,json=storageClass,proto3" json:"storage_class,omitempty"`
// Optional. The recovery point objective for cross-region replication of the
- // bucket. Applicable only for dual- and multi-region buckets. "DEFAULT" uses
- // default replication. "ASYNC_TURBO" enables turbo replication, valid for
+ // bucket. Applicable only for dual- and multi-region buckets. `DEFAULT` uses
+ // default replication. `ASYNC_TURBO` enables turbo replication, valid for
// dual-region buckets only. If rpo is not specified when the bucket is
- // created, it defaults to "DEFAULT". For more information, see
- // https://cloud.google.com/storage/docs/availability-durability#turbo-replication.
+ // created, it defaults to `DEFAULT`. For more information, see [Turbo
+ // replication](https://cloud.google.com/storage/docs/availability-durability#turbo-replication).
Rpo string `protobuf:"bytes,27,opt,name=rpo,proto3" json:"rpo,omitempty"`
// Optional. Access controls on the bucket.
- // If iam_config.uniform_bucket_level_access is enabled on this bucket,
+ // If `iam_config.uniform_bucket_level_access` is enabled on this bucket,
// requests to set, read, or modify acl is an error.
Acl []*BucketAccessControl `protobuf:"bytes,8,rep,name=acl,proto3" json:"acl,omitempty"`
// Optional. Default access controls to apply to new objects when no ACL is
- // provided. If iam_config.uniform_bucket_level_access is enabled on this
+ // provided. If `iam_config.uniform_bucket_level_access` is enabled on this
// bucket, requests to set, read, or modify acl is an error.
DefaultObjectAcl []*ObjectAccessControl `protobuf:"bytes,9,rep,name=default_object_acl,json=defaultObjectAcl,proto3" json:"default_object_acl,omitempty"`
- // Optional. The bucket's lifecycle config. See
- // [https://developers.google.com/storage/docs/lifecycle]Lifecycle Management]
- // for more information.
+ // Optional. The bucket's lifecycle configuration. See [Lifecycle
+ // Management](https://developers.google.com/storage/docs/lifecycle) for more
+ // information.
Lifecycle *Bucket_Lifecycle `protobuf:"bytes,10,opt,name=lifecycle,proto3" json:"lifecycle,omitempty"`
// Output only. The creation time of the bucket.
CreateTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
- // Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
- // Sharing] (CORS) config.
+ // Optional. The bucket's [CORS](https://www.w3.org/TR/cors/)
+ // configuration.
Cors []*Bucket_Cors `protobuf:"bytes,12,rep,name=cors,proto3" json:"cors,omitempty"`
// Output only. The modification time of the bucket.
UpdateTime *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
// Optional. The default value for event-based hold on newly created objects
// in this bucket. Event-based hold is a way to retain objects indefinitely
// until an event occurs, signified by the hold's release. After being
- // released, such objects will be subject to bucket-level retention (if any).
- // One sample use case of this flag is for banks to hold loan documents for at
+ // released, such objects are subject to bucket-level retention (if any). One
+ // sample use case of this flag is for banks to hold loan documents for at
// least 3 years after loan is paid in full. Here, bucket-level retention is 3
// years and the event is loan being paid in full. In this example, these
- // objects will be held intact for any number of years until the event has
+ // objects are held intact for any number of years until the event has
// occurred (event-based hold on the object is released) and then 3 more years
// after that. That means retention duration of the objects begins from the
// moment event-based hold transitioned from true to false. Objects under
@@ -4617,11 +4650,11 @@ type Bucket struct {
// Optional. User-provided labels, in key/value pairs.
Labels map[string]string `protobuf:"bytes,15,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Optional. The bucket's website config, controlling how the service behaves
- // when accessing bucket contents as a web site. See the
- // [https://cloud.google.com/storage/docs/static-website][Static Website
- // Examples] for more information.
+ // when accessing bucket contents as a web site. See the [Static website
+ // examples](https://cloud.google.com/storage/docs/static-website) for more
+ // information.
Website *Bucket_Website `protobuf:"bytes,16,opt,name=website,proto3" json:"website,omitempty"`
- // Optional. The bucket's versioning config.
+ // Optional. The bucket's versioning configuration.
Versioning *Bucket_Versioning `protobuf:"bytes,17,opt,name=versioning,proto3" json:"versioning,omitempty"`
// Optional. The bucket's logging config, which defines the destination bucket
// and name prefix (if any) for the current bucket's logs.
@@ -4631,40 +4664,39 @@ type Bucket struct {
Owner *Owner `protobuf:"bytes,19,opt,name=owner,proto3" json:"owner,omitempty"`
// Optional. Encryption config for a bucket.
Encryption *Bucket_Encryption `protobuf:"bytes,20,opt,name=encryption,proto3" json:"encryption,omitempty"`
- // Optional. The bucket's billing config.
+ // Optional. The bucket's billing configuration.
Billing *Bucket_Billing `protobuf:"bytes,21,opt,name=billing,proto3" json:"billing,omitempty"`
// Optional. The bucket's retention policy. The retention policy enforces a
// minimum retention time for all objects contained in the bucket, based on
// their creation time. Any attempt to overwrite or delete objects younger
- // than the retention period will result in a PERMISSION_DENIED error. An
+ // than the retention period results in a `PERMISSION_DENIED` error. An
// unlocked retention policy can be modified or removed from the bucket via a
// storage.buckets.update operation. A locked retention policy cannot be
// removed or shortened in duration for the lifetime of the bucket.
- // Attempting to remove or decrease period of a locked retention policy will
- // result in a PERMISSION_DENIED error.
+ // Attempting to remove or decrease period of a locked retention policy
+ // results in a `PERMISSION_DENIED` error.
RetentionPolicy *Bucket_RetentionPolicy `protobuf:"bytes,22,opt,name=retention_policy,json=retentionPolicy,proto3" json:"retention_policy,omitempty"`
- // Optional. The bucket's IAM config.
+ // Optional. The bucket's IAM configuration.
IamConfig *Bucket_IamConfig `protobuf:"bytes,23,opt,name=iam_config,json=iamConfig,proto3" json:"iam_config,omitempty"`
// Optional. Reserved for future use.
SatisfiesPzs bool `protobuf:"varint,25,opt,name=satisfies_pzs,json=satisfiesPzs,proto3" json:"satisfies_pzs,omitempty"`
// Optional. Configuration that, if present, specifies the data placement for
- // a
- // [https://cloud.google.com/storage/docs/locations#location-dr][configurable
- // dual-region].
+ // a [configurable
+ // dual-region](https://cloud.google.com/storage/docs/locations#location-dr).
CustomPlacementConfig *Bucket_CustomPlacementConfig `protobuf:"bytes,26,opt,name=custom_placement_config,json=customPlacementConfig,proto3" json:"custom_placement_config,omitempty"`
// Optional. The bucket's Autoclass configuration. If there is no
- // configuration, the Autoclass feature will be disabled and have no effect on
- // the bucket.
+ // configuration, the Autoclass feature is disabled and has no effect on the
+ // bucket.
Autoclass *Bucket_Autoclass `protobuf:"bytes,28,opt,name=autoclass,proto3" json:"autoclass,omitempty"`
// Optional. The bucket's hierarchical namespace configuration. If there is no
- // configuration, the hierarchical namespace feature will be disabled and have
+ // configuration, the hierarchical namespace feature is disabled and has
// no effect on the bucket.
HierarchicalNamespace *Bucket_HierarchicalNamespace `protobuf:"bytes,32,opt,name=hierarchical_namespace,json=hierarchicalNamespace,proto3" json:"hierarchical_namespace,omitempty"`
// Optional. The bucket's soft delete policy. The soft delete policy prevents
// soft-deleted objects from being permanently deleted.
SoftDeletePolicy *Bucket_SoftDeletePolicy `protobuf:"bytes,31,opt,name=soft_delete_policy,json=softDeletePolicy,proto3" json:"soft_delete_policy,omitempty"`
// Optional. The bucket's object retention configuration. Must be enabled
- // before objects in the bucket may have retention configured.
+ // before objects in the bucket might have retention configured.
ObjectRetention *Bucket_ObjectRetention `protobuf:"bytes,33,opt,name=object_retention,json=objectRetention,proto3" json:"object_retention,omitempty"`
// Optional. The bucket's IP filter configuration.
IpFilter *Bucket_IpFilter `protobuf:"bytes,38,opt,name=ip_filter,json=ipFilter,proto3,oneof" json:"ip_filter,omitempty"`
@@ -4950,18 +4982,18 @@ type BucketAccessControl struct {
// `group-example@googlegroups.com`
// * All members of the Google Apps for Business domain `example.com` would be
// `domain-example.com`
- // For project entities, `project-{team}-{projectnumber}` format will be
+ // For project entities, `project-{team}-{projectnumber}` format is
// returned on response.
Entity string `protobuf:"bytes,3,opt,name=entity,proto3" json:"entity,omitempty"`
// Output only. The alternative entity format, if exists. For project
- // entities, `project-{team}-{projectid}` format will be returned on response.
+ // entities, `project-{team}-{projectid}` format is returned in the response.
EntityAlt string `protobuf:"bytes,9,opt,name=entity_alt,json=entityAlt,proto3" json:"entity_alt,omitempty"`
// Optional. The ID for the entity, if any.
EntityId string `protobuf:"bytes,4,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"`
- // Optional. The etag of the BucketAccessControl.
+ // Optional. The `etag` of the `BucketAccessControl`.
// If included in the metadata of an update or delete request message, the
- // operation operation will only be performed if the etag matches that of the
- // bucket's BucketAccessControl.
+ // operation operation is only performed if the etag matches that of the
+ // bucket's `BucketAccessControl`.
Etag string `protobuf:"bytes,8,opt,name=etag,proto3" json:"etag,omitempty"`
// Optional. The email address associated with the entity, if any.
Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"`
@@ -5129,16 +5161,15 @@ type ObjectChecksums struct {
// CRC32C digest of the object data. Computed by the Cloud Storage service for
// all written objects.
- // If set in a WriteObjectRequest, service will validate that the stored
+ // If set in a WriteObjectRequest, service validates that the stored
// object matches this checksum.
Crc32C *uint32 `protobuf:"fixed32,1,opt,name=crc32c,proto3,oneof" json:"crc32c,omitempty"`
- // Optional. 128 bit MD5 hash of the object data.
- // For more information about using the MD5 hash, see
- // [https://cloud.google.com/storage/docs/hashes-etags#json-api][Hashes and
- // ETags: Best Practices].
- // Not all objects will provide an MD5 hash. For example, composite objects
- // provide only crc32c hashes. This value is equivalent to running `cat
- // object.txt | openssl md5 -binary`
+ // Optional. 128 bit MD5 hash of the object data. For more information about
+ // using the MD5 hash, see [Data validation and change
+ // detection](https://cloud.google.com/storage/docs/data-validation). Not all
+ // objects provide an MD5 hash. For example, composite objects provide only
+ // crc32c hashes. This value is equivalent to running `cat object.txt |
+ // openssl md5 -binary`
Md5Hash []byte `protobuf:"bytes,2,opt,name=md5_hash,json=md5Hash,proto3" json:"md5_hash,omitempty"`
}
@@ -5298,8 +5329,8 @@ func (x *ObjectContexts) GetCustom() map[string]*ObjectCustomContextPayload {
return nil
}
-// Describes the Customer-Supplied Encryption Key mechanism used to store an
-// Object's data at rest.
+// Describes the customer-supplied encryption key mechanism used to store an
+// object's data at rest.
type CustomerEncryption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -5372,9 +5403,9 @@ type Object struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Immutable. The name of the bucket containing this object.
Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"`
- // Optional. The etag of the object.
+ // Optional. The `etag` of an object.
// If included in the metadata of an update or delete request message, the
- // operation will only be performed if the etag matches that of the live
+ // operation is only performed if the etag matches that of the live
// object.
Etag string `protobuf:"bytes,27,opt,name=etag,proto3" json:"etag,omitempty"`
// Immutable. The content generation of this object. Used for object
@@ -5392,25 +5423,25 @@ type Object struct {
// Optional. Storage class of the object.
StorageClass string `protobuf:"bytes,5,opt,name=storage_class,json=storageClass,proto3" json:"storage_class,omitempty"`
// Output only. Content-Length of the object data in bytes, matching
- // [https://tools.ietf.org/html/rfc7230#section-3.3.2][RFC 7230 §3.3.2].
+ // [RFC 7230 §3.3.2](https://tools.ietf.org/html/rfc7230#section-3.3.2]).
Size int64 `protobuf:"varint,6,opt,name=size,proto3" json:"size,omitempty"`
// Optional. Content-Encoding of the object data, matching
- // [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
+ // [RFC 7231 §3.1.2.2](https://tools.ietf.org/html/rfc7231#section-3.1.2.2)
ContentEncoding string `protobuf:"bytes,7,opt,name=content_encoding,json=contentEncoding,proto3" json:"content_encoding,omitempty"`
// Optional. Content-Disposition of the object data, matching
- // [https://tools.ietf.org/html/rfc6266][RFC 6266].
+ // [RFC 6266](https://tools.ietf.org/html/rfc6266).
ContentDisposition string `protobuf:"bytes,8,opt,name=content_disposition,json=contentDisposition,proto3" json:"content_disposition,omitempty"`
// Optional. Cache-Control directive for the object data, matching
- // [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
+ // [RFC 7234 §5.2](https://tools.ietf.org/html/rfc7234#section-5.2).
// If omitted, and the object is accessible to all anonymous users, the
- // default will be `public, max-age=3600`.
+ // default is `public, max-age=3600`.
CacheControl string `protobuf:"bytes,9,opt,name=cache_control,json=cacheControl,proto3" json:"cache_control,omitempty"`
// Optional. Access controls on the object.
- // If iam_config.uniform_bucket_level_access is enabled on the parent
+ // If `iam_config.uniform_bucket_level_access` is enabled on the parent
// bucket, requests to set, read, or modify acl is an error.
Acl []*ObjectAccessControl `protobuf:"bytes,10,rep,name=acl,proto3" json:"acl,omitempty"`
// Optional. Content-Language of the object data, matching
- // [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
+ // [RFC 7231 §3.1.3.2](https://tools.ietf.org/html/rfc7231#section-3.1.3.2).
ContentLanguage string `protobuf:"bytes,11,opt,name=content_language,json=contentLanguage,proto3" json:"content_language,omitempty"`
// Output only. If this object is noncurrent, this is the time when the object
// became noncurrent.
@@ -5418,7 +5449,7 @@ type Object struct {
// Output only. The time when the object was finalized.
FinalizeTime *timestamppb.Timestamp `protobuf:"bytes,36,opt,name=finalize_time,json=finalizeTime,proto3" json:"finalize_time,omitempty"`
// Optional. Content-Type of the object data, matching
- // [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
+ // [RFC 7231 §3.1.1.5](https://tools.ietf.org/html/rfc7231#section-3.1.1.5).
// If an object is stored without a Content-Type, it is served as
// `application/octet-stream`.
ContentType string `protobuf:"bytes,13,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
@@ -5428,7 +5459,7 @@ type Object struct {
// Components are accumulated by compose operations.
ComponentCount int32 `protobuf:"varint,15,opt,name=component_count,json=componentCount,proto3" json:"component_count,omitempty"`
// Output only. Hashes for the data part of this object. This field is used
- // for output only and will be silently ignored if provided in requests. The
+ // for output only and is silently ignored if provided in requests. The
// checksums of the complete object regardless of data range. If the object is
// downloaded in full, the client should compute one of these checksums over
// the downloaded object and compare it against the value provided here.
@@ -5444,7 +5475,7 @@ type Object struct {
// encrypted by such a key.
KmsKey string `protobuf:"bytes,18,opt,name=kms_key,json=kmsKey,proto3" json:"kms_key,omitempty"`
// Output only. The time at which the object's storage class was last changed.
- // When the object is initially created, it will be set to time_created.
+ // When the object is initially created, it is set to `time_created`.
UpdateStorageClassTime *timestamppb.Timestamp `protobuf:"bytes,19,opt,name=update_storage_class_time,json=updateStorageClassTime,proto3" json:"update_storage_class_time,omitempty"`
// Optional. Whether an object is under temporary hold. While this flag is set
// to true, the object is protected against deletion and overwrites. A common
@@ -5469,19 +5500,19 @@ type Object struct {
// Whether an object is under event-based hold.
// An event-based hold is a way to force the retention of an object until
// after some event occurs. Once the hold is released by explicitly setting
- // this field to false, the object will become subject to any bucket-level
- // retention policy, except that the retention duration will be calculated
+ // this field to `false`, the object becomes subject to any bucket-level
+ // retention policy, except that the retention duration is calculated
// from the time the event based hold was lifted, rather than the time the
// object was created.
//
- // In a WriteObject request, not setting this field implies that the value
- // should be taken from the parent bucket's "default_event_based_hold" field.
- // In a response, this field will always be set to true or false.
+ // In a `WriteObject` request, not setting this field implies that the value
+ // should be taken from the parent bucket's `default_event_based_hold` field.
+ // In a response, this field is always set to `true` or `false`.
EventBasedHold *bool `protobuf:"varint,23,opt,name=event_based_hold,json=eventBasedHold,proto3,oneof" json:"event_based_hold,omitempty"`
- // Output only. The owner of the object. This will always be the uploader of
- // the object.
+ // Output only. The owner of the object. This is always the uploader of the
+ // object.
Owner *Owner `protobuf:"bytes,24,opt,name=owner,proto3" json:"owner,omitempty"`
- // Optional. Metadata of Customer-Supplied Encryption Key, if the object is
+ // Optional. Metadata of customer-supplied encryption key, if the object is
// encrypted by such a key.
CustomerEncryption *CustomerEncryption `protobuf:"bytes,25,opt,name=customer_encryption,json=customerEncryption,proto3" json:"customer_encryption,omitempty"`
// Optional. A user-specified timestamp set on an object.
@@ -5489,15 +5520,15 @@ type Object struct {
// Output only. This is the time when the object became soft-deleted.
//
// Soft-deleted objects are only accessible if a soft_delete_policy is
- // enabled. Also see hard_delete_time.
+ // enabled. Also see `hard_delete_time`.
SoftDeleteTime *timestamppb.Timestamp `protobuf:"bytes,28,opt,name=soft_delete_time,json=softDeleteTime,proto3,oneof" json:"soft_delete_time,omitempty"`
- // Output only. The time when the object will be permanently deleted.
+ // Output only. The time when the object is permanently deleted.
//
- // Only set when an object becomes soft-deleted with a soft_delete_policy.
- // Otherwise, the object will not be accessible.
+ // Only set when an object becomes soft-deleted with a `soft_delete_policy`.
+ // Otherwise, the object is not accessible.
HardDeleteTime *timestamppb.Timestamp `protobuf:"bytes,29,opt,name=hard_delete_time,json=hardDeleteTime,proto3,oneof" json:"hard_delete_time,omitempty"`
// Optional. Retention configuration of this object.
- // May only be configured if the bucket has object retention enabled.
+ // Might only be configured if the bucket has object retention enabled.
Retention *Object_Retention `protobuf:"bytes,30,opt,name=retention,proto3" json:"retention,omitempty"`
}
@@ -5792,17 +5823,17 @@ type ObjectAccessControl struct {
// `group-example@googlegroups.com`.
// * All members of the Google Apps for Business domain `example.com` would be
// `domain-example.com`.
- // For project entities, `project-{team}-{projectnumber}` format will be
- // returned on response.
+ // For project entities, `project-{team}-{projectnumber}` format is
+ // returned in the response.
Entity string `protobuf:"bytes,3,opt,name=entity,proto3" json:"entity,omitempty"`
// Output only. The alternative entity format, if exists. For project
- // entities, `project-{team}-{projectid}` format will be returned on response.
+ // entities, `project-{team}-{projectid}` format is returned in the response.
EntityAlt string `protobuf:"bytes,9,opt,name=entity_alt,json=entityAlt,proto3" json:"entity_alt,omitempty"`
// Optional. The ID for the entity, if any.
EntityId string `protobuf:"bytes,4,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"`
// Optional. The etag of the ObjectAccessControl.
// If included in the metadata of an update or delete request message, the
- // operation will only be performed if the etag matches that of the live
+ // operation is only performed if the etag matches that of the live
// object's ObjectAccessControl.
Etag string `protobuf:"bytes,8,opt,name=etag,proto3" json:"etag,omitempty"`
// Optional. The email address associated with the entity, if any.
@@ -6224,7 +6255,7 @@ type ComposeObjectRequest_SourceObject_ObjectPreconditions struct {
// Only perform the composition if the generation of the source object
// that would be used matches this value. If this value and a generation
- // are both specified, they must be the same value or the call will fail.
+ // are both specified, they must be the same value or the call fails.
IfGenerationMatch *int64 `protobuf:"varint,1,opt,name=if_generation_match,json=ifGenerationMatch,proto3,oneof" json:"if_generation_match,omitempty"`
}
@@ -6321,22 +6352,23 @@ type Bucket_Cors struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // Optional. The list of Origins eligible to receive CORS response headers.
- // See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
- // Note: "*" is permitted in the list of origins, and means "any Origin".
+ // Optional. The list of origins eligible to receive CORS response headers.
+ // For more information about origins, see [RFC
+ // 6454](https://tools.ietf.org/html/rfc6454). Note: `*` is permitted in the
+ // list of origins, and means `any origin`.
Origin []string `protobuf:"bytes,1,rep,name=origin,proto3" json:"origin,omitempty"`
// Optional. The list of HTTP methods on which to include CORS response
// headers,
- // (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of
+ // (`GET`, `OPTIONS`, `POST`, etc) Note: `*` is permitted in the list of
// methods, and means "any method".
Method []string `protobuf:"bytes,2,rep,name=method,proto3" json:"method,omitempty"`
- // Optional. The list of HTTP headers other than the
- // [https://www.w3.org/TR/cors/#simple-response-header][simple response
- // headers] to give permission for the user-agent to share across domains.
+ // Optional. The list of HTTP headers other than the [simple response
+ // headers](https://www.w3.org/TR/cors/#simple-response-headers) to give
+ // permission for the user-agent to share across domains.
ResponseHeader []string `protobuf:"bytes,3,rep,name=response_header,json=responseHeader,proto3" json:"response_header,omitempty"`
- // Optional. The value, in seconds, to return in the
- // [https://www.w3.org/TR/cors/#access-control-max-age-response-header][Access-Control-Max-Age
- // header] used in preflight responses.
+ // Optional. The value, in seconds, to return in the [Access-Control-Max-Age
+ // header](https://www.w3.org/TR/cors/#access-control-max-age-response-header)
+ // used in preflight responses.
MaxAgeSeconds int32 `protobuf:"varint,4,opt,name=max_age_seconds,json=maxAgeSeconds,proto3" json:"max_age_seconds,omitempty"`
}
@@ -6404,8 +6436,8 @@ type Bucket_Encryption struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // Optional. The name of the Cloud KMS key that will be used to encrypt
- // objects inserted into this bucket, if no encryption method is specified.
+ // Optional. The name of the Cloud KMS key that is used to encrypt objects
+ // inserted into this bucket, if no encryption method is specified.
DefaultKmsKey string `protobuf:"bytes,1,opt,name=default_kms_key,json=defaultKmsKey,proto3" json:"default_kms_key,omitempty"`
// Optional. If omitted, then new objects with GMEK encryption-type is
// allowed. If set, then new objects created in this bucket must comply with
@@ -6490,8 +6522,8 @@ type Bucket_IamConfig struct {
// Optional. Bucket restriction options currently enforced on the bucket.
UniformBucketLevelAccess *Bucket_IamConfig_UniformBucketLevelAccess `protobuf:"bytes,1,opt,name=uniform_bucket_level_access,json=uniformBucketLevelAccess,proto3" json:"uniform_bucket_level_access,omitempty"`
- // Optional. Whether IAM will enforce public access prevention. Valid values
- // are "enforced" or "inherited".
+ // Optional. Whether IAM enforces public access prevention. Valid values are
+ // `enforced` or `inherited`.
PublicAccessPrevention string `protobuf:"bytes,3,opt,name=public_access_prevention,json=publicAccessPrevention,proto3" json:"public_access_prevention,omitempty"`
}
@@ -6540,14 +6572,15 @@ func (x *Bucket_IamConfig) GetPublicAccessPrevention() string {
}
// Lifecycle properties of a bucket.
-// For more information, see https://cloud.google.com/storage/docs/lifecycle.
+// For more information, see [Object Lifecycle
+// Management](https://cloud.google.com/storage/docs/lifecycle).
type Bucket_Lifecycle struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Optional. A lifecycle management rule, which is made of an action to take
- // and the condition(s) under which the action will be taken.
+ // and the condition under which the action is taken.
Rule []*Bucket_Lifecycle_Rule `protobuf:"bytes,1,rep,name=rule,proto3" json:"rule,omitempty"`
}
@@ -6708,7 +6741,7 @@ type Bucket_RetentionPolicy struct {
// duration must be greater than zero and less than 100 years. Note that
// enforcement of retention periods less than a day is not guaranteed. Such
// periods should only be used for testing purposes. Any `nanos` value
- // specified will be rounded down to the nearest second.
+ // specified is rounded down to the nearest second.
RetentionDuration *durationpb.Duration `protobuf:"bytes,4,opt,name=retention_duration,json=retentionDuration,proto3" json:"retention_duration,omitempty"`
}
@@ -6822,8 +6855,8 @@ func (x *Bucket_SoftDeletePolicy) GetEffectiveTime() *timestamppb.Timestamp {
}
// Properties of a bucket related to versioning.
-// For more on Cloud Storage versioning, see
-// https://cloud.google.com/storage/docs/object-versioning.
+// For more information about Cloud Storage versioning, see [Object
+// versioning](https://cloud.google.com/storage/docs/object-versioning).
type Bucket_Versioning struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -6871,22 +6904,22 @@ func (x *Bucket_Versioning) GetEnabled() bool {
}
// Properties of a bucket related to accessing the contents as a static
-// website. For more on hosting a static website via Cloud Storage, see
-// https://cloud.google.com/storage/docs/hosting-static-website.
+// website. For details, see [hosting a static website using Cloud
+// Storage](https://cloud.google.com/storage/docs/hosting-static-website).
type Bucket_Website struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // Optional. If the requested object path is missing, the service will
- // ensure the path has a trailing '/', append this suffix, and attempt to
- // retrieve the resulting object. This allows the creation of `index.html`
- // objects to represent directory pages.
+ // Optional. If the requested object path is missing, the service ensures
+ // the path has a trailing '/', append this suffix, and attempt to retrieve
+ // the resulting object. This allows the creation of `index.html` objects to
+ // represent directory pages.
MainPageSuffix string `protobuf:"bytes,1,opt,name=main_page_suffix,json=mainPageSuffix,proto3" json:"main_page_suffix,omitempty"`
// Optional. If the requested object path is missing, and any
// `mainPageSuffix` object is missing, if applicable, the service
- // will return the named object from this bucket as the content for a
- // [https://tools.ietf.org/html/rfc7231#section-6.5.4][404 Not Found]
+ // returns the named object from this bucket as the content for a
+ // [404 Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)
// result.
NotFoundPage string `protobuf:"bytes,2,opt,name=not_found_page,json=notFoundPage,proto3" json:"not_found_page,omitempty"`
}
@@ -6935,9 +6968,11 @@ func (x *Bucket_Website) GetNotFoundPage() string {
return ""
}
-// Configuration for Custom Dual Regions. It should specify precisely two
-// eligible regions within the same Multiregion. More information on regions
-// may be found [here](https://cloud.google.com/storage/docs/locations).
+// Configuration for [configurable dual-
+// regions](https://cloud.google.com/storage/docs/locations#configurable). It
+// should specify precisely two eligible regions within the same multi-region.
+// For details, see
+// [locations](https://cloud.google.com/storage/docs/locations).
type Bucket_CustomPlacementConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -6994,10 +7029,10 @@ type Bucket_Autoclass struct {
Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
// Output only. Latest instant at which the `enabled` field was set to true
// after being disabled/unconfigured or set to false after being enabled. If
- // Autoclass is enabled when the bucket is created, the toggle_time is set
- // to the bucket creation time.
+ // Autoclass is enabled when the bucket is created, the value of the
+ // `toggle_time` field is set to the bucket `create_time`.
ToggleTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=toggle_time,json=toggleTime,proto3" json:"toggle_time,omitempty"`
- // An object in an Autoclass bucket will eventually cool down to the
+ // An object in an Autoclass bucket eventually cools down to the
// terminal storage class if there is no access to the object.
// The only valid values are NEARLINE and ARCHIVE.
TerminalStorageClass *string `protobuf:"bytes,3,opt,name=terminal_storage_class,json=terminalStorageClass,proto3,oneof" json:"terminal_storage_class,omitempty"`
@@ -7077,7 +7112,7 @@ type Bucket_IpFilter struct {
// `Disabled`. When set to `Enabled`, IP filtering rules are applied to a
// bucket and all incoming requests to the bucket are evaluated against
// these rules. When set to `Disabled`, IP filtering rules are not applied
- // to a bucket.".
+ // to a bucket.
Mode *string `protobuf:"bytes,1,opt,name=mode,proto3,oneof" json:"mode,omitempty"`
// Public IPs allowed to operate or access the bucket.
PublicNetworkSource *Bucket_IpFilter_PublicNetworkSource `protobuf:"bytes,2,opt,name=public_network_source,json=publicNetworkSource,proto3,oneof" json:"public_network_source,omitempty"`
@@ -7087,11 +7122,11 @@ type Bucket_IpFilter struct {
// Optional. Whether or not to allow VPCs from orgs different than the
// bucket's parent org to access the bucket. When set to true, validations
// on the existence of the VPCs won't be performed. If set to false, each
- // VPC network source will be checked to belong to the same org as the
- // bucket as well as validated for existence.
+ // VPC network source is checked to belong to the same org as the bucket as
+ // well as validated for existence.
AllowCrossOrgVpcs bool `protobuf:"varint,4,opt,name=allow_cross_org_vpcs,json=allowCrossOrgVpcs,proto3" json:"allow_cross_org_vpcs,omitempty"`
// Whether or not to allow all P4SA access to the bucket. When set to true,
- // IP filter config validation will not apply.
+ // IP filter config validation doesn't apply.
AllowAllServiceAgentAccess *bool `protobuf:"varint,5,opt,name=allow_all_service_agent_access,json=allowAllServiceAgentAccess,proto3,oneof" json:"allow_all_service_agent_access,omitempty"`
}
@@ -7214,7 +7249,7 @@ type Bucket_Encryption_GoogleManagedEncryptionEnforcementConfig struct {
unknownFields protoimpl.UnknownFields
// Restriction mode for google-managed encryption for new objects within
- // the bucket. Valid values are: "NotRestricted", "FullyRestricted".
+ // the bucket. Valid values are: `NotRestricted` and `FullyRestricted`.
// If `NotRestricted` or unset, creation of new objects with
// google-managed encryption is allowed.
// If `FullyRestricted`, new objects can't be created using google-managed
@@ -7275,7 +7310,7 @@ type Bucket_Encryption_CustomerManagedEncryptionEnforcementConfig struct {
unknownFields protoimpl.UnknownFields
// Restriction mode for customer-managed encryption for new objects within
- // the bucket. Valid values are: "NotRestricted", "FullyRestricted".
+ // the bucket. Valid values are: `NotRestricted` and `FullyRestricted`.
// If `NotRestricted` or unset, creation of new objects with
// customer-managed encryption is allowed.
// If `FullyRestricted`, new objects can't be created using
@@ -7336,8 +7371,8 @@ type Bucket_Encryption_CustomerSuppliedEncryptionEnforcementConfig struct {
unknownFields protoimpl.UnknownFields
// Restriction mode for customer-supplied encryption for new objects
- // within the bucket. Valid values are: "NotRestricted",
- // "FullyRestricted".
+ // within the bucket. Valid values are: `NotRestricted` and
+ // `FullyRestricted`.
// If `NotRestricted` or unset, creation of new objects with
// customer-supplied encryption is allowed.
// If `FullyRestricted`, new objects can't be created using
@@ -7453,7 +7488,7 @@ func (x *Bucket_IamConfig_UniformBucketLevelAccess) GetLockTime() *timestamppb.T
}
// A lifecycle Rule, combining an action to take on an object and a
-// condition which will trigger that action.
+// condition which triggers that action.
type Bucket_Lifecycle_Rule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -7461,7 +7496,7 @@ type Bucket_Lifecycle_Rule struct {
// Optional. The action to take.
Action *Bucket_Lifecycle_Rule_Action `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"`
- // Optional. The condition(s) under which the action will be taken.
+ // Optional. The condition under which the action is taken.
Condition *Bucket_Lifecycle_Rule_Condition `protobuf:"bytes,2,opt,name=condition,proto3" json:"condition,omitempty"`
}
@@ -7591,8 +7626,8 @@ type Bucket_Lifecycle_Rule_Condition struct {
// the live version) newer than this version of the object.
NumNewerVersions *int32 `protobuf:"varint,4,opt,name=num_newer_versions,json=numNewerVersions,proto3,oneof" json:"num_newer_versions,omitempty"`
// Optional. Objects having any of the storage classes specified by this
- // condition will be matched. Values include `MULTI_REGIONAL`,
- // `REGIONAL`, `NEARLINE`, `COLDLINE`, `STANDARD`, and
+ // condition are matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
+ // `NEARLINE`, `COLDLINE`, `STANDARD`, and
// `DURABLE_REDUCED_AVAILABILITY`.
MatchesStorageClass []string `protobuf:"bytes,5,rep,name=matches_storage_class,json=matchesStorageClass,proto3" json:"matches_storage_class,omitempty"`
// Number of days that have elapsed since the custom timestamp set on an
@@ -7605,7 +7640,7 @@ type Bucket_Lifecycle_Rule_Condition struct {
// This condition is relevant only for versioned objects. An object
// version satisfies this condition only if these many days have been
// passed since it became noncurrent. The value of the field must be a
- // nonnegative integer. If it's zero, the object version will become
+ // nonnegative integer. If it's zero, the object version becomes
// eligible for Lifecycle action as soon as it becomes noncurrent.
DaysSinceNoncurrentTime *int32 `protobuf:"varint,9,opt,name=days_since_noncurrent_time,json=daysSinceNoncurrentTime,proto3,oneof" json:"days_since_noncurrent_time,omitempty"`
// Optional. This condition is relevant only for versioned objects. An
@@ -7985,7 +8020,7 @@ var file_google_storage_v2_storage_proto_rawDesc = []byte{
0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f,
0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x42,
0x03, 0xe0, 0x41, 0x01, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x62, 0x6a, 0x65,
- 0x63, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x82, 0x02, 0x0a, 0x12,
+ 0x63, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbd, 0x02, 0x0a, 0x12,
0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x12, 0x1d, 0x73, 0x74, 0x6f, 0x72,
@@ -8001,140 +8036,612 @@ var file_google_storage_v2_storage_proto_rawDesc = []byte{
0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d,
0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88,
- 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b,
- 0x22, 0x72, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65,
- 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63,
- 0x6b, 0x65, 0x74, 0x52, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f,
- 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54,
- 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9e, 0x01, 0x0a, 0x20, 0x4c, 0x6f, 0x63, 0x6b, 0x42, 0x75, 0x63,
- 0x6b, 0x65, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69,
- 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63,
- 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41,
- 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74,
- 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d,
+ 0x01, 0x01, 0x12, 0x39, 0x0a, 0x16, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x70, 0x61, 0x72,
+ 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x09, 0x20, 0x01,
+ 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x14, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x50,
+ 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x0c, 0x0a,
+ 0x0a, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0x94, 0x01, 0x0a, 0x13,
+ 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74,
+ 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52,
+ 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74,
+ 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
+ 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18,
+ 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62,
+ 0x6c, 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x20, 0x4c, 0x6f, 0x63, 0x6b, 0x42, 0x75, 0x63, 0x6b, 0x65,
+ 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65,
+ 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a,
+ 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61,
+ 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06,
+ 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63,
+ 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x15, 0x69, 0x66,
+ 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61,
+ 0x74, 0x63, 0x68, 0x22, 0xc0, 0x03, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75,
+ 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x62,
+ 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e,
+ 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x62, 0x75, 0x63,
+ 0x6b, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01,
+ 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67,
+ 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63,
+ 0x68, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e,
+ 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41,
+ 0x01, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c,
+ 0x12, 0x46, 0x0a, 0x1d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x64,
+ 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x63,
+ 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1a, 0x70, 0x72,
+ 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4f,
+ 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x63, 0x6c, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61,
+ 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a,
+ 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69,
+ 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65,
+ 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74,
+ 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xe5, 0x07, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x70, 0x6f,
+ 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x40, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74,
+ 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42,
+ 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x12, 0x60, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f,
+ 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42,
+ 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63,
+ 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x64, 0x65,
+ 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69,
+ 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e,
+ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69,
+ 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x15,
+ 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x07, 0x6b, 0x6d, 0x73, 0x5f,
+ 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x01, 0xfa, 0x41,
+ 0x23, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74,
+ 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x6b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x72, 0x0a, 0x1c,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,
+ 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
+ 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
+ 0x12, 0x52, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b,
+ 0x73, 0x75, 0x6d, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f,
+ 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x42, 0x03,
+ 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b,
+ 0x73, 0x75, 0x6d, 0x73, 0x1a, 0xb3, 0x02, 0x0a, 0x0c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f,
+ 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23,
+ 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x12, 0x80, 0x01, 0x0a, 0x14, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x70,
+ 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,
+ 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62,
+ 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50,
+ 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x03, 0xe0, 0x41,
+ 0x01, 0x52, 0x13, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64,
+ 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x62, 0x0a, 0x13, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
+ 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x0a,
+ 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d,
+ 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66,
+ 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88,
+ 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69,
+ 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xec,
+ 0x04, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d,
+ 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70,
+ 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62,
+ 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e,
+ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05,
+ 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17,
+ 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f,
+ 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52,
+ 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74,
+ 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d,
0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61,
- 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x15,
+ 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d,
+ 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74,
+ 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61,
+ 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d,
+ 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66,
+ 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f,
+ 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d,
+ 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
+ 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0,
+ 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x16, 0x0a,
+ 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e,
+ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63,
+ 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e,
+ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a,
+ 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xd8, 0x05,
+ 0x0a, 0x14, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d,
+ 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70,
+ 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62,
+ 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x67, 0x65, 0x6e,
+ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x6f,
+ 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,
+ 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x6b, 0x65,
+ 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00,
+ 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61,
+ 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e,
+ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63,
+ 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e,
+ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88,
+ 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e,
+ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20,
+ 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e,
+ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12,
+ 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07,
+ 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68,
+ 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x0d,
+ 0x63, 0x6f, 0x70, 0x79, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x6c, 0x88, 0x01, 0x01,
+ 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63,
+ 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73,
+ 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
+ 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61,
+ 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
+ 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61,
+ 0x72, 0x61, 0x6d, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18,
+ 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e,
+ 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f,
+ 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d,
+ 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61,
+ 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d,
+ 0x61, 0x74, 0x63, 0x68, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x6c, 0x22, 0x3f, 0x0a, 0x1b, 0x43, 0x61, 0x6e, 0x63,
+ 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61,
+ 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,
+ 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x22, 0x1e, 0x0a, 0x1c, 0x43, 0x61, 0x6e,
+ 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74,
+ 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x80, 0x06, 0x0a, 0x11, 0x52, 0x65,
+ 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
+ 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b,
+ 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,
+ 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0a, 0x67,
+ 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42,
+ 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64,
+ 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x22, 0x0a, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6c,
+ 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52,
+ 0x09, 0x72, 0x65, 0x61, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66,
+ 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63,
+ 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e,
+ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12,
+ 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03,
+ 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69,
+ 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15,
0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xc0, 0x03, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
- 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a,
- 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76,
- 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x62,
- 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61,
- 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61,
- 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88,
- 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e,
+ 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f,
+ 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52,
+ 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x72, 0x0a, 0x1c,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0a, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,
+ 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
+ 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
+ 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x0c, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x48,
+ 0x04, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x42, 0x16,
+ 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e,
+ 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0c,
+ 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0x98, 0x06, 0x0a,
+ 0x10, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61,
+ 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f,
+ 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74,
+ 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a,
+ 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x6f, 0x66, 0x74,
+ 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66,
+ 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63,
+ 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e,
+ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12,
+ 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
+ 0x48, 0x02, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69,
+ 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x15,
+ 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f,
+ 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x04, 0x52,
+ 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x72, 0x0a, 0x1c,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,
+ 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
+ 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
+ 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x0a, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x48,
+ 0x05, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x28,
+ 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,
+ 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x74,
+ 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x6f, 0x66,
+ 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66,
+ 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63,
+ 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a,
+ 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65,
+ 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0xaf, 0x02, 0x0a, 0x12, 0x52, 0x65, 0x61, 0x64,
+ 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d,
+ 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x5f, 0x64, 0x61,
+ 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65,
+ 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0f, 0x63, 0x68,
+ 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x4d, 0x0a,
+ 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d,
+ 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x52, 0x0f, 0x6f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x12, 0x44, 0x0a, 0x0d,
+ 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f,
+ 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52,
+ 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x6e,
+ 0x67, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74,
+ 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52,
+ 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xd0, 0x06, 0x0a, 0x12, 0x42, 0x69,
+ 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63,
+ 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
+ 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d,
+ 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12,
+ 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0a,
+ 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
+ 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00,
+ 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61,
+ 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63,
- 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74,
- 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61,
- 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66,
- 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,
- 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41,
- 0x63, 0x6c, 0x12, 0x46, 0x0a, 0x1d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64,
- 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f,
- 0x61, 0x63, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1a,
- 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c,
- 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x63, 0x6c, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70,
- 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02,
- 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x1a, 0x0a, 0x18,
+ 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e,
+ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88,
+ 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e,
+ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20,
+ 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e,
+ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12,
+ 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07,
+ 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68,
+ 0x88, 0x01, 0x01, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62,
+ 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72,
+ 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f,
+ 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f,
+ 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f,
+ 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65,
+ 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x02, 0x18, 0x01, 0x48, 0x04, 0x52, 0x08, 0x72, 0x65,
+ 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x47, 0x0a, 0x0b, 0x72, 0x65, 0x61,
+ 0x64, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
+ 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c,
+ 0x65, 0x48, 0x05, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x88,
+ 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f,
+ 0x6b, 0x65, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x0c, 0x72, 0x6f, 0x75,
+ 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14,
+ 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d,
+ 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68,
+ 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c,
0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f,
+ 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0c, 0x0a, 0x0a,
+ 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x72,
+ 0x65, 0x61, 0x64, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72,
+ 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xb1, 0x01, 0x0a,
+ 0x15, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x54, 0x0a, 0x10, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f,
+ 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
+ 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x72, 0x65,
+ 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x42, 0x0a, 0x0b,
+ 0x72, 0x65, 0x61, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
+ 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42,
+ 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73,
+ 0x22, 0xe5, 0x01, 0x0a, 0x16, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x12, 0x6f,
+ 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65,
+ 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x10, 0x6f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x35, 0x0a,
+ 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
+ 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x68, 0x61, 0x6e,
+ 0x64, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69,
+ 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x0a, 0x72, 0x65,
+ 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x9f, 0x01, 0x0a, 0x1d, 0x42, 0x69, 0x64,
+ 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x64, 0x69, 0x72,
+ 0x65, 0x63, 0x74, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x42, 0x0a, 0x0b, 0x72, 0x65,
+ 0x61, 0x64, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
+ 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64,
+ 0x6c, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x28,
+ 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67,
+ 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x6f, 0x75,
+ 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xed, 0x01, 0x0a, 0x1e, 0x42,
+ 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65,
+ 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x28, 0x0a,
+ 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x54,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65,
+ 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76,
+ 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c,
+ 0x65, 0x48, 0x01, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65,
+ 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x6f, 0x75,
+ 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x77,
+ 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f,
+ 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x64, 0x0a, 0x13, 0x42, 0x69,
+ 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x45, 0x72, 0x72, 0x6f,
+ 0x72, 0x12, 0x4d, 0x0a, 0x11, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f,
+ 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32,
+ 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52,
+ 0x0f, 0x72, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73,
+ 0x22, 0x55, 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x72, 0x72,
+ 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x03, 0x52, 0x06, 0x72, 0x65, 0x61, 0x64, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x06, 0x73,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
+ 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x75, 0x0a, 0x09, 0x52, 0x65, 0x61, 0x64, 0x52,
+ 0x61, 0x6e, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x66, 0x66,
+ 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a,
+ 0x72, 0x65, 0x61, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x65,
+ 0x61, 0x64, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42,
+ 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68,
+ 0x12, 0x1c, 0x0a, 0x07, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x72, 0x65, 0x61, 0x64, 0x49, 0x64, 0x22, 0xba,
+ 0x01, 0x0a, 0x0f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61,
+ 0x74, 0x61, 0x12, 0x4d, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65,
+ 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32,
+ 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61,
+ 0x52, 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74,
+ 0x61, 0x12, 0x3b, 0x0a, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,
+ 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x61,
+ 0x6e, 0x67, 0x65, 0x52, 0x09, 0x72, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1b,
+ 0x0a, 0x09, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x6e, 0x64, 0x22, 0x2d, 0x0a, 0x0e, 0x42,
+ 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1b, 0x0a,
+ 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0,
+ 0x41, 0x02, 0x52, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x2e, 0x0a, 0x0f, 0x42, 0x69,
+ 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1b, 0x0a,
+ 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0,
+ 0x41, 0x02, 0x52, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0xc5, 0x04, 0x0a, 0x0f, 0x57,
+ 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3a,
+ 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
+ 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02,
+ 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x72,
+ 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x07, 0x20, 0x01,
+ 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69,
+ 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e,
+ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69,
+ 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74,
+ 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14,
+ 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d,
+ 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65,
+ 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65,
+ 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63,
+ 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67,
+ 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61,
+ 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d,
+ 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74,
+ 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6f, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, 0x04, 0x52,
+ 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x23,
+ 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01,
+ 0x28, 0x08, 0x48, 0x05, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65,
+ 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f,
+ 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f,
+ 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61,
+ 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67,
+ 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61,
+ 0x74, 0x63, 0x68, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73,
+ 0x69, 0x7a, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62,
+ 0x6c, 0x65, 0x22, 0x87, 0x04, 0x0a, 0x12, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x09, 0x75, 0x70, 0x6c,
+ 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08,
+ 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x12, 0x50, 0x0a, 0x11, 0x77, 0x72, 0x69, 0x74,
+ 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f,
+ 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x0f, 0x77, 0x72, 0x69, 0x74, 0x65,
+ 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x26, 0x0a, 0x0c, 0x77, 0x72,
+ 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
+ 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x66, 0x66, 0x73,
+ 0x65, 0x74, 0x12, 0x4f, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65,
+ 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32,
+ 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61,
+ 0x48, 0x01, 0x52, 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44,
+ 0x61, 0x74, 0x61, 0x12, 0x52, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68,
+ 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76,
+ 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d,
+ 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68,
+ 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x69, 0x73,
+ 0x68, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0,
+ 0x41, 0x01, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12,
+ 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
+ 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18,
+ 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,
+ 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+ 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72,
+ 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+ 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72,
+ 0x61, 0x6d, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73,
+ 0x73, 0x61, 0x67, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x87, 0x01, 0x0a,
+ 0x13, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65,
+ 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0d,
+ 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x37, 0x0a,
+ 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
+ 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f,
+ 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xe9, 0x03, 0x0a, 0x10, 0x41, 0x70, 0x70, 0x65, 0x6e,
+ 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3d, 0x0a, 0x06, 0x62,
+ 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02,
+ 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b,
+ 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62,
+ 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,
+ 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02,
+ 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x17,
+ 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52,
+ 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f,
0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e,
- 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xe5, 0x07, 0x0a, 0x14, 0x43, 0x6f, 0x6d,
- 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x12, 0x40, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01,
+ 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a,
+ 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06,
+ 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x54,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65,
+ 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76,
+ 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c,
+ 0x65, 0x48, 0x03, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65,
+ 0x88, 0x01, 0x01, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67,
+ 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42,
+ 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42,
+ 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65,
+ 0x6e, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64,
+ 0x6c, 0x65, 0x22, 0xa3, 0x05, 0x0a, 0x16, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65,
+ 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a,
+ 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x48, 0x00, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x12, 0x50, 0x0a, 0x11,
+ 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65,
+ 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74,
+ 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x0f, 0x77,
+ 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x53,
+ 0x0a, 0x12, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f,
+ 0x73, 0x70, 0x65, 0x63, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x41,
+ 0x70, 0x70, 0x65, 0x6e, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x48,
+ 0x00, 0x52, 0x10, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53,
+ 0x70, 0x65, 0x63, 0x12, 0x26, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x66, 0x66,
+ 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b,
+ 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x4f, 0x0a, 0x10, 0x63,
+ 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,
+ 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73,
+ 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x48, 0x01, 0x52, 0x0f, 0x63, 0x68, 0x65,
+ 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x52, 0x0a, 0x10,
+ 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73,
+ 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e,
- 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f,
- 0x61, 0x63, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18,
- 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x64, 0x65,
- 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67,
- 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18,
- 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a,
- 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01,
- 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x07, 0x6b, 0x6d,
- 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x01,
- 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79,
- 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x6b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x72,
- 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f,
- 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x07,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74,
- 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61,
- 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61,
- 0x6d, 0x73, 0x12, 0x52, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65,
- 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32,
- 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73,
- 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65,
- 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x1a, 0xb3, 0x02, 0x0a, 0x0c, 0x53, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
- 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x80, 0x01, 0x0a, 0x14, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
- 0x5f, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74,
- 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65,
- 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x03,
- 0xe0, 0x41, 0x01, 0x52, 0x13, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f,
- 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x62, 0x0a, 0x13, 0x4f, 0x62, 0x6a, 0x65,
- 0x63, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,
- 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11,
- 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63,
- 0x68, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65,
- 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x16, 0x0a, 0x14,
- 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d,
- 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61,
- 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68,
- 0x22, 0xec, 0x04, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b,
- 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f,
- 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52,
- 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67,
- 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f,
- 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68,
- 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65,
- 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a,
- 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
- 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48,
- 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e,
- 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66,
- 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
- 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69,
- 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d,
- 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65,
- 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74,
- 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18,
- 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x72, 0x0a, 0x1c, 0x63,
+ 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52,
+ 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73,
+ 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70,
+ 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x73, 0x74, 0x61,
+ 0x74, 0x65, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, 0x75, 0x73,
+ 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, 0x66, 0x6c,
+ 0x75, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x5f, 0x77, 0x72,
+ 0x69, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b,
+ 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x72, 0x0a, 0x1c, 0x63,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
@@ -8142,1833 +8649,1367 @@ var file_google_storage_v2_storage_proto_rawDesc = []byte{
0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42,
0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65,
0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42,
- 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67,
- 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61,
- 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67,
- 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42,
- 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22,
- 0xd8, 0x05, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b,
- 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f,
- 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52,
- 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x67,
- 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x73,
- 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f,
- 0x6b, 0x65, 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
- 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67,
- 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61,
- 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47,
- 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63,
- 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67,
- 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18,
- 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67,
- 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01,
- 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65,
- 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68,
- 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61,
- 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74,
- 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04,
- 0x52, 0x0d, 0x63, 0x6f, 0x70, 0x79, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x6c, 0x88,
- 0x01, 0x01, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a,
+ 0x0f, 0x0a, 0x0d, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+ 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xe8, 0x01, 0x0a, 0x17, 0x42, 0x69, 0x64,
+ 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65,
+ 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0d,
+ 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x37, 0x0a,
+ 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
+ 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f,
+ 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32,
+ 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65,
+ 0x48, 0x01, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x88,
+ 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e,
+ 0x64, 0x6c, 0x65, 0x22, 0x9e, 0x05, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x61,
+ 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa,
+ 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65,
+ 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67,
+ 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41,
+ 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70,
+ 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
+ 0x21, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74,
+ 0x65, 0x72, 0x12, 0x41, 0x0a, 0x1a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x72,
+ 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x69, 0x6e, 0x63,
+ 0x6c, 0x75, 0x64, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x69,
+ 0x6d, 0x69, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18,
+ 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66,
+ 0x69, 0x78, 0x12, 0x1f, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07,
+ 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b,
+ 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61,
+ 0x73, 0x6b, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01,
+ 0x01, 0x12, 0x34, 0x0a, 0x13, 0x6c, 0x65, 0x78, 0x69, 0x63, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68,
+ 0x69, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,
+ 0xe0, 0x41, 0x01, 0x52, 0x12, 0x6c, 0x65, 0x78, 0x69, 0x63, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68,
+ 0x69, 0x63, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x30, 0x0a, 0x11, 0x6c, 0x65, 0x78, 0x69, 0x63,
+ 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x0b, 0x20, 0x01,
+ 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x6c, 0x65, 0x78, 0x69, 0x63, 0x6f, 0x67,
+ 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x6f, 0x66,
+ 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42,
+ 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
+ 0x64, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x66, 0x6f, 0x6c,
+ 0x64, 0x65, 0x72, 0x73, 0x5f, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73,
+ 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x69, 0x6e, 0x63,
+ 0x6c, 0x75, 0x64, 0x65, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x41, 0x73, 0x50, 0x72, 0x65,
+ 0x66, 0x69, 0x78, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x67,
+ 0x6c, 0x6f, 0x62, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x47, 0x6c, 0x6f, 0x62, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c,
+ 0x74, 0x65, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06,
+ 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f,
+ 0x6d, 0x61, 0x73, 0x6b, 0x22, 0xaf, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x72,
+ 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x20, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64,
+ 0x49, 0x64, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a,
0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61,
- 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d,
0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d,
0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65,
- 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a,
- 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69,
- 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65,
- 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74,
- 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x6c, 0x22, 0x3f, 0x0a, 0x1b, 0x43, 0x61,
- 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69,
- 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x75, 0x70, 0x6c,
- 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41,
- 0x02, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x22, 0x1e, 0x0a, 0x1c, 0x43,
- 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72,
- 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x80, 0x06, 0x0a, 0x11,
- 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61,
- 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f,
- 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74,
- 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a,
- 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65,
- 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x72, 0x65,
- 0x61, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x22, 0x0a, 0x0a, 0x72, 0x65, 0x61, 0x64,
- 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41,
- 0x01, 0x52, 0x09, 0x72, 0x65, 0x61, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x33, 0x0a, 0x13,
+ 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79,
+ 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64,
+ 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0d, 0x70,
+ 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x37, 0x0a, 0x08,
+ 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
+ 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xea, 0x0e, 0x0a, 0x14, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74,
+ 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31,
+ 0x0a, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x05,
+ 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d,
+ 0x65, 0x12, 0x57, 0x0a, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x42, 0x28, 0xe0,
+ 0x41, 0x02, 0xe0, 0x41, 0x05, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
+ 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d,
+ 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x59, 0x0a, 0x13, 0x64, 0x65,
+ 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x6d, 0x73, 0x5f, 0x6b, 0x65,
+ 0x79, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x01, 0xfa, 0x41, 0x23, 0x0a,
+ 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b,
+ 0x65, 0x79, 0x52, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b,
+ 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x40, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f,
+ 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74,
+ 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25,
+ 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42,
+ 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x75, 0x63,
+ 0x6b, 0x65, 0x74, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x62,
+ 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,
+ 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x30, 0x0a,
+ 0x11, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
+ 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x77,
+ 0x72, 0x69, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x41, 0x0a, 0x1a, 0x64, 0x65, 0x73,
+ 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69,
+ 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,
+ 0x41, 0x01, 0x52, 0x18, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50,
+ 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, 0x12, 0x33, 0x0a, 0x13,
0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61,
- 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47,
+ 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47,
0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01,
0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01,
+ 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01,
0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a,
0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02,
+ 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02,
0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66,
0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
- 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x48,
+ 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x48,
0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x72,
+ 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x40,
+ 0x0a, 0x1a, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x01,
+ 0x28, 0x03, 0x48, 0x04, 0x52, 0x17, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01,
+ 0x12, 0x47, 0x0a, 0x1e, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x48, 0x05, 0x52, 0x1a, 0x69, 0x66, 0x53, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f,
+ 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x48, 0x0a, 0x1e, 0x69, 0x66, 0x5f,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0d, 0x20, 0x01, 0x28,
+ 0x03, 0x48, 0x06, 0x52, 0x1b, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74,
+ 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68,
+ 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x22, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x48,
+ 0x07, 0x52, 0x1e, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x67,
+ 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63,
+ 0x68, 0x88, 0x01, 0x01, 0x12, 0x43, 0x0a, 0x1c, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65,
+ 0x73, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x5f,
+ 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52,
+ 0x18, 0x6d, 0x61, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x74,
+ 0x65, 0x6e, 0x50, 0x65, 0x72, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x4c, 0x0a, 0x20, 0x63, 0x6f, 0x70,
+ 0x79, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x10, 0x20,
+ 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1d, 0x63, 0x6f, 0x70, 0x79, 0x53, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c,
+ 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x4b, 0x0a, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x5f,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28,
+ 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1c, 0x63, 0x6f, 0x70, 0x79, 0x53, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x42,
+ 0x79, 0x74, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x27, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b,
+ 0x65, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18,
+ 0x16, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x22, 0x63, 0x6f, 0x70, 0x79,
+ 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x4b, 0x65, 0x79, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x72,
0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f,
- 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0a,
+ 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x13,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74,
0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f,
0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61,
0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f,
0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61,
- 0x6d, 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18,
- 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73,
- 0x6b, 0x48, 0x04, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01,
- 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f,
+ 0x6d, 0x73, 0x12, 0x52, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65,
+ 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32,
+ 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73,
+ 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65,
+ 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a,
+ 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69,
+ 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65,
+ 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74,
+ 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e,
+ 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x69, 0x66, 0x5f,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x25, 0x0a, 0x23, 0x5f,
+ 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x22, 0xd6, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f,
+ 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65,
+ 0x73, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x62,
+ 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
+ 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64,
+ 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x12,
+ 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x54,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63,
+ 0x74, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xec, 0x07, 0x0a, 0x11,
+ 0x4d, 0x6f, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61,
+ 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f,
+ 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74,
+ 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63,
+ 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x32, 0x0a, 0x12, 0x64, 0x65,
+ 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x11, 0x64, 0x65, 0x73,
+ 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x45,
+ 0x0a, 0x1a, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x17, 0x69, 0x66, 0x53, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74,
+ 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x1e, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f,
+ 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0,
+ 0x41, 0x01, 0x48, 0x01, 0x52, 0x1a, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68,
+ 0x88, 0x01, 0x01, 0x12, 0x4d, 0x0a, 0x1e, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01,
+ 0x48, 0x02, 0x52, 0x1b, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61,
+ 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88,
+ 0x01, 0x01, 0x12, 0x54, 0x0a, 0x22, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
+ 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e,
+ 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03,
+ 0xe0, 0x41, 0x01, 0x48, 0x03, 0x52, 0x1e, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d,
+ 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74,
+ 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67,
+ 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18,
+ 0x08, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x04, 0x52, 0x11, 0x69, 0x66,
+ 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88,
+ 0x01, 0x01, 0x12, 0x3f, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20,
+ 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x05, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68,
+ 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0a,
+ 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x06, 0x52, 0x15, 0x69, 0x66, 0x4d,
+ 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74,
+ 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x47, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61,
0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d,
- 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61,
- 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68,
- 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65,
+ 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48,
+ 0x07, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x42, 0x1d,
+ 0x0a, 0x1b, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e,
+ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x21, 0x0a,
+ 0x1f, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68,
- 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0x98,
- 0x06, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f,
- 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e,
- 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b,
- 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12,
- 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c,
- 0x65, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x6f,
- 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13,
- 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61,
- 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x11, 0x69, 0x66, 0x47,
- 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01,
- 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01,
- 0x28, 0x03, 0x48, 0x02, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a,
- 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03,
- 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66,
- 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
- 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48,
- 0x04, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x72,
+ 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61,
+ 0x74, 0x63, 0x68, 0x42, 0x25, 0x0a, 0x23, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69,
+ 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a,
+ 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69,
+ 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xb9, 0x02, 0x0a, 0x1a, 0x53,
+ 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69,
+ 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x53, 0x0a, 0x11, 0x77, 0x72, 0x69,
+ 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74,
+ 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62,
+ 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0f, 0x77,
+ 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x72,
0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f,
- 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08,
+ 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74,
0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f,
0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61,
0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f,
0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61,
- 0x6d, 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18,
- 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x6d, 0x73, 0x12, 0x52, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65,
+ 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32,
+ 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73,
+ 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65,
+ 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x22, 0x3a, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52,
+ 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f,
+ 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64,
+ 0x49, 0x64, 0x22, 0xd6, 0x05, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x62,
+ 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f,
+ 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48,
+ 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d,
+ 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68,
+ 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01,
+ 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18,
+ 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67,
+ 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63,
+ 0x68, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e,
+ 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41,
+ 0x01, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c,
+ 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18,
+ 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73,
- 0x6b, 0x48, 0x05, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01,
- 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65,
- 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x72, 0x65,
- 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73,
- 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x42, 0x16, 0x0a, 0x14, 0x5f,
+ 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61,
+ 0x73, 0x6b, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61,
+ 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d,
+ 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d,
+ 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x1b, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69,
+ 0x64, 0x65, 0x5f, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x74, 0x65,
+ 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01,
+ 0x52, 0x19, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b,
+ 0x65, 0x64, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x16, 0x0a, 0x14, 0x5f,
0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61,
0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42,
0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f,
0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0c, 0x0a, 0x0a, 0x5f,
- 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0xaf, 0x02, 0x0a, 0x12, 0x52, 0x65,
- 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x12, 0x4d, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x5f,
- 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43,
- 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0f,
- 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12,
- 0x4d, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73,
- 0x75, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x52, 0x0f, 0x6f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x12, 0x44,
- 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,
- 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
- 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52,
- 0x61, 0x6e, 0x67, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
- 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xd0, 0x06, 0x0a, 0x12,
- 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70,
- 0x65, 0x63, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72,
- 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63,
- 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65,
- 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23,
- 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
- 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67,
- 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61,
- 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47,
- 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63,
- 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67,
- 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18,
- 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67,
- 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01,
- 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65,
- 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68,
- 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61,
- 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74,
- 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f,
- 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70,
- 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e,
+ 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xce, 0x01, 0x0a, 0x19,
0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19,
- 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x72, 0x65, 0x61,
- 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46,
- 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x02, 0x18, 0x01, 0x48, 0x04, 0x52, 0x08,
- 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x47, 0x0a, 0x0b, 0x72,
- 0x65, 0x61, 0x64, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
- 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e,
- 0x64, 0x6c, 0x65, 0x48, 0x05, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c,
- 0x65, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f,
- 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x0c, 0x72,
- 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x16,
- 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65,
- 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74,
- 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65,
- 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e,
- 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0c,
- 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x42, 0x0e, 0x0a, 0x0c,
- 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x42, 0x10, 0x0a, 0x0e,
- 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xb1,
- 0x01, 0x0a, 0x15, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x54, 0x0a, 0x10, 0x72, 0x65, 0x61, 0x64,
- 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,
- 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e,
- 0x72, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x42,
- 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x08, 0x20,
- 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f,
- 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67,
- 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67,
- 0x65, 0x73, 0x22, 0xe5, 0x01, 0x0a, 0x16, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a,
- 0x12, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, 0x61, 0x6e,
- 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x10, 0x6f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12,
- 0x35, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
- 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65,
- 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x68,
- 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e,
- 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x0a,
- 0x72, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x9f, 0x01, 0x0a, 0x1d, 0x42,
- 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x64,
- 0x69, 0x72, 0x65, 0x63, 0x74, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x42, 0x0a, 0x0b,
- 0x72, 0x65, 0x61, 0x64, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
- 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, 0x61,
- 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65,
- 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65,
- 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69,
- 0x6e, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72,
- 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xed, 0x01, 0x0a,
- 0x1e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
- 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12,
- 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e,
- 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a, 0x0c, 0x77, 0x72, 0x69,
- 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
- 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e,
- 0x64, 0x6c, 0x65, 0x48, 0x01, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64,
- 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x0a, 0x67, 0x65, 0x6e,
- 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72,
- 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x0f, 0x0a, 0x0d,
- 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x42, 0x0d, 0x0a,
- 0x0b, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x64, 0x0a, 0x13,
- 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x45, 0x72,
- 0x72, 0x6f, 0x72, 0x12, 0x4d, 0x0a, 0x11, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67,
- 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
- 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f,
- 0x72, 0x52, 0x0f, 0x72, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f,
- 0x72, 0x73, 0x22, 0x55, 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x45,
- 0x72, 0x72, 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x72, 0x65, 0x61, 0x64, 0x49, 0x64, 0x12, 0x2a, 0x0a,
- 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75,
- 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x75, 0x0a, 0x09, 0x52, 0x65, 0x61,
- 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f,
- 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02,
- 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x24, 0x0a, 0x0b,
- 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x4c, 0x65, 0x6e, 0x67,
- 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x07, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x72, 0x65, 0x61, 0x64, 0x49, 0x64,
- 0x22, 0xba, 0x01, 0x0a, 0x0f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65,
- 0x44, 0x61, 0x74, 0x61, 0x12, 0x4d, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d,
- 0x6d, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
- 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61,
- 0x74, 0x61, 0x52, 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44,
- 0x61, 0x74, 0x61, 0x12, 0x3b, 0x0a, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67,
- 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64,
- 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x09, 0x72, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65,
- 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x6e, 0x64, 0x22, 0x2d, 0x0a,
- 0x0e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12,
- 0x1b, 0x0a, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42,
- 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x2e, 0x0a, 0x0f,
- 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12,
- 0x1b, 0x0a, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42,
- 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0xc5, 0x04, 0x0a,
- 0x0f, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63,
- 0x12, 0x3a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,
- 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x03, 0xe0,
- 0x41, 0x02, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x0e,
- 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x07,
- 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x64, 0x65,
- 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67,
- 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a,
- 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e,
- 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01,
- 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f,
- 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f,
- 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d,
- 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66,
- 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61,
- 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74,
- 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f,
- 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69,
- 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e,
- 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48,
- 0x04, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01,
- 0x12, 0x23, 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x09,
- 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62,
- 0x6c, 0x65, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e,
- 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a,
- 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
- 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66,
- 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
- 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74,
- 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f,
- 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
- 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64,
- 0x61, 0x62, 0x6c, 0x65, 0x22, 0x87, 0x04, 0x0a, 0x12, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x09, 0x75,
- 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00,
- 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x12, 0x50, 0x0a, 0x11, 0x77, 0x72,
- 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,
- 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x0f, 0x77, 0x72, 0x69,
- 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x26, 0x0a, 0x0c,
- 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x66,
- 0x66, 0x73, 0x65, 0x74, 0x12, 0x4f, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d,
- 0x6d, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
- 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61,
- 0x74, 0x61, 0x48, 0x01, 0x52, 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65,
- 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x52, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f,
- 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
- 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73,
- 0x75, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
- 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0c, 0x66, 0x69, 0x6e,
- 0x69, 0x73, 0x68, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x42,
- 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x57, 0x72, 0x69, 0x74,
- 0x65, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65,
- 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d,
- 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
- 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50,
- 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d,
- 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50,
- 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6d,
- 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x87,
- 0x01, 0x0a, 0x13, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73,
- 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00,
- 0x52, 0x0d, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12,
- 0x37, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
- 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x08,
- 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74,
- 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xe9, 0x03, 0x0a, 0x10, 0x41, 0x70, 0x70,
- 0x65, 0x6e, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3d, 0x0a,
- 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0,
- 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75,
- 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06,
- 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41,
- 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e,
- 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0,
- 0x41, 0x02, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b,
- 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48,
- 0x00, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69,
- 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
- 0x48, 0x01, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12,
- 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
- 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e,
- 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a, 0x0c, 0x77, 0x72, 0x69,
- 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
- 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e,
- 0x64, 0x6c, 0x65, 0x48, 0x03, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64,
- 0x6c, 0x65, 0x88, 0x01, 0x01, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74,
- 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63,
- 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e,
- 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63,
- 0x68, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f,
- 0x6b, 0x65, 0x6e, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x61,
- 0x6e, 0x64, 0x6c, 0x65, 0x22, 0xa3, 0x05, 0x0a, 0x16, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69,
- 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
- 0x1d, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x12, 0x50,
- 0x0a, 0x11, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73,
- 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72,
- 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52,
- 0x0f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63,
- 0x12, 0x53, 0x0a, 0x12, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32,
- 0x2e, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65,
- 0x63, 0x48, 0x00, 0x52, 0x10, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x26, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f,
- 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02,
- 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x4f, 0x0a,
- 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74,
- 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63,
- 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x48, 0x01, 0x52, 0x0f, 0x63,
- 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x52,
- 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75,
- 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a,
- 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41,
- 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75,
- 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b,
- 0x75, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x73,
- 0x74, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c,
- 0x75, 0x73, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05,
- 0x66, 0x6c, 0x75, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x5f,
- 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01,
- 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x72, 0x0a,
- 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0a, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f,
- 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d,
- 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d,
- 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61,
- 0x67, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xe8, 0x01, 0x0a, 0x17, 0x42,
- 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73,
- 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00,
- 0x52, 0x0d, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12,
- 0x37, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
- 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x08,
- 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74,
- 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
- 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64,
- 0x6c, 0x65, 0x48, 0x01, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c,
- 0x65, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74,
- 0x61, 0x74, 0x75, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68,
- 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x9e, 0x05, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06,
- 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41,
- 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63,
- 0x6b, 0x65, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70,
- 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03,
- 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a,
- 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65,
- 0x6e, 0x12, 0x21, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x18, 0x04,
- 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x6d,
- 0x69, 0x74, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x1a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f,
- 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74,
- 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x69,
- 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x44, 0x65,
- 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69,
- 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x70, 0x72,
- 0x65, 0x66, 0x69, 0x78, 0x12, 0x1f, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73,
- 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x76, 0x65, 0x72,
- 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61,
- 0x73, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64,
- 0x4d, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b,
- 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x13, 0x6c, 0x65, 0x78, 0x69, 0x63, 0x6f, 0x67, 0x72, 0x61,
- 0x70, 0x68, 0x69, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x12, 0x6c, 0x65, 0x78, 0x69, 0x63, 0x6f, 0x67, 0x72, 0x61,
- 0x70, 0x68, 0x69, 0x63, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x30, 0x0a, 0x11, 0x6c, 0x65, 0x78,
- 0x69, 0x63, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x0b,
- 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x6c, 0x65, 0x78, 0x69, 0x63,
- 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x12, 0x26, 0x0a, 0x0c, 0x73,
- 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28,
- 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65,
- 0x74, 0x65, 0x64, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x66,
- 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78,
- 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x69,
- 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x41, 0x73, 0x50,
- 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x63, 0x68,
- 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01,
- 0x52, 0x09, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x47, 0x6c, 0x6f, 0x62, 0x12, 0x1b, 0x0a, 0x06, 0x66,
- 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01,
- 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x61,
- 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0xaf, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79,
- 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f,
- 0x61, 0x64, 0x49, 0x64, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61,
- 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43,
- 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63,
- 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x18, 0x51, 0x75, 0x65,
- 0x72, 0x79, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74,
- 0x65, 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52,
- 0x0d, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x37,
- 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
- 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x08, 0x72,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65,
- 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xea, 0x0e, 0x0a, 0x14, 0x52, 0x65, 0x77, 0x72,
- 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x12, 0x31, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
- 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, 0x02, 0xe0,
- 0x41, 0x05, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e,
- 0x61, 0x6d, 0x65, 0x12, 0x57, 0x0a, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x42,
- 0x28, 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x05, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72,
- 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63,
- 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69,
- 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x59, 0x0a, 0x13,
- 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x6d, 0x73, 0x5f,
- 0x6b, 0x65, 0x79, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x01, 0xfa, 0x41,
- 0x23, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74,
- 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x4b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x40, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69,
- 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32,
- 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x64, 0x65,
- 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x0d, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
- 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d,
- 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42,
- 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
- 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41,
- 0x02, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12,
- 0x30, 0x0a, 0x11, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52,
- 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x6f, 0x6b,
- 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x72,
- 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x41, 0x0a, 0x1a, 0x64,
- 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x65,
- 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x42,
- 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x50, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, 0x12, 0x33,
- 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
- 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69,
- 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68,
- 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08,
- 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12,
- 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03,
- 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b,
- 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28,
- 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01,
- 0x12, 0x40, 0x0a, 0x1a, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65,
- 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b,
- 0x20, 0x01, 0x28, 0x03, 0x48, 0x04, 0x52, 0x17, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88,
- 0x01, 0x01, 0x12, 0x47, 0x0a, 0x1e, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
- 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d,
- 0x61, 0x74, 0x63, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x48, 0x05, 0x52, 0x1a, 0x69, 0x66,
- 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x48, 0x0a, 0x1e, 0x69,
- 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e,
- 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0d, 0x20,
- 0x01, 0x28, 0x03, 0x48, 0x06, 0x52, 0x1b, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d,
- 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74,
- 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x22, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28,
- 0x03, 0x48, 0x07, 0x52, 0x1e, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74,
- 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61,
- 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x43, 0x0a, 0x1c, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x79,
- 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x70, 0x65,
- 0x72, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41,
- 0x01, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x77, 0x72, 0x69,
- 0x74, 0x74, 0x65, 0x6e, 0x50, 0x65, 0x72, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x4c, 0x0a, 0x20, 0x63,
- 0x6f, 0x70, 0x79, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18,
- 0x10, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1d, 0x63, 0x6f, 0x70, 0x79,
- 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x4b, 0x0a, 0x20, 0x63, 0x6f, 0x70,
- 0x79, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x15, 0x20,
- 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1c, 0x63, 0x6f, 0x70, 0x79, 0x53, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65,
- 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x27, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x5f, 0x62, 0x79, 0x74, 0x65,
- 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x22, 0x63, 0x6f,
- 0x70, 0x79, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x42, 0x79, 0x74, 0x65, 0x73,
- 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73,
- 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
- 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61,
- 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
- 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61,
- 0x72, 0x61, 0x6d, 0x73, 0x12, 0x52, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63,
- 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
- 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75,
- 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43,
- 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f,
- 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68,
- 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18,
- 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f,
- 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e,
- 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x69, 0x66, 0x5f,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x69, 0x66, 0x5f, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x69,
- 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e,
- 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x25, 0x0a,
- 0x23, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61,
- 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d,
- 0x61, 0x74, 0x63, 0x68, 0x22, 0xd6, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61,
- 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65,
- 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79,
- 0x74, 0x65, 0x73, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x12, 0x1f, 0x0a, 0x0b,
- 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x03, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a,
- 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, 0x6f, 0x6e,
- 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x6f, 0x6b,
- 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74,
- 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a,
- 0x65, 0x63, 0x74, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xec, 0x07,
- 0x0a, 0x11, 0x4d, 0x6f, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f,
- 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e,
- 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b,
- 0x65, 0x74, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x62, 0x6a,
- 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x32, 0x0a, 0x12,
- 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65,
- 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x11, 0x64,
- 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
- 0x12, 0x45, 0x0a, 0x1a, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65,
- 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04,
- 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x17, 0x69, 0x66, 0x53,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d,
- 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x1e, 0x69, 0x66, 0x5f, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
- 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42,
- 0x03, 0xe0, 0x41, 0x01, 0x48, 0x01, 0x52, 0x1a, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74,
- 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x4d, 0x0a, 0x1e, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0,
- 0x41, 0x01, 0x48, 0x02, 0x52, 0x1b, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65,
- 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63,
- 0x68, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x22, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03,
- 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x03, 0x52, 0x1e, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e,
- 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x13, 0x69, 0x66,
- 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63,
- 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x04, 0x52, 0x11,
- 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63,
- 0x68, 0x88, 0x01, 0x01, 0x12, 0x3f, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18,
- 0x09, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x05, 0x52, 0x14, 0x69, 0x66,
- 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74,
- 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61,
- 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68,
- 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x06, 0x52, 0x15, 0x69,
- 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d,
- 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x47, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65,
- 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74,
- 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41,
- 0x01, 0x48, 0x07, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01,
- 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67,
- 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42,
- 0x21, 0x0a, 0x1f, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65,
- 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74,
- 0x63, 0x68, 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
- 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x25, 0x0a, 0x23, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x16, 0x0a, 0x14,
- 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d,
- 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65,
- 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68,
- 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65,
- 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c,
- 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xb9, 0x02, 0x0a,
- 0x1a, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57,
- 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x53, 0x0a, 0x11, 0x77,
- 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65,
- 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,
- 0x0f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63,
- 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
- 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61,
- 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
- 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61,
- 0x72, 0x61, 0x6d, 0x73, 0x12, 0x52, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63,
- 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
- 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75,
- 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43,
- 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x22, 0x3a, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x72,
- 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61,
- 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f,
- 0x61, 0x64, 0x49, 0x64, 0x22, 0xd6, 0x05, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x06,
- 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32,
- 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f,
- 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d,
- 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66,
- 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74,
- 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61,
- 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68,
- 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61,
- 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88,
- 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e,
- 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63,
- 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74,
- 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61,
- 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66,
- 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,
- 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41,
- 0x63, 0x6c, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73,
- 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d,
- 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
- 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61,
- 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43,
- 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63,
- 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x1b, 0x6f, 0x76, 0x65, 0x72,
- 0x72, 0x69, 0x64, 0x65, 0x5f, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x72, 0x65,
- 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0,
- 0x41, 0x01, 0x52, 0x19, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x55, 0x6e, 0x6c, 0x6f,
- 0x63, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x16, 0x0a,
- 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
- 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e,
- 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63,
- 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e,
- 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a,
- 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xce, 0x01,
- 0x0a, 0x19, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x14, 0x65,
- 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69,
- 0x74, 0x68, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x13,
- 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69,
- 0x74, 0x68, 0x6d, 0x12, 0x35, 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
- 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x1b, 0x65, 0x6e,
- 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x68, 0x61,
- 0x32, 0x35, 0x36, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42,
- 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x4b, 0x65, 0x79, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0xca,
- 0x05, 0x0a, 0x10, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61,
- 0x6e, 0x74, 0x73, 0x22, 0xb5, 0x05, 0x0a, 0x06, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x16,
- 0x0a, 0x12, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,
- 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x14, 0x4d, 0x41, 0x58, 0x5f, 0x52, 0x45,
- 0x41, 0x44, 0x5f, 0x43, 0x48, 0x55, 0x4e, 0x4b, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x80,
- 0x80, 0x80, 0x01, 0x12, 0x1c, 0x0a, 0x15, 0x4d, 0x41, 0x58, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45,
+ 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x14, 0x65, 0x6e, 0x63,
+ 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68,
+ 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x13, 0x65, 0x6e,
+ 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68,
+ 0x6d, 0x12, 0x35, 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42,
+ 0x03, 0xe0, 0x41, 0x01, 0x52, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x4b, 0x65, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x1b, 0x65, 0x6e, 0x63, 0x72,
+ 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35,
+ 0x36, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0,
+ 0x41, 0x01, 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65,
+ 0x79, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0xca, 0x05, 0x0a,
+ 0x10, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74,
+ 0x73, 0x22, 0xb5, 0x05, 0x0a, 0x06, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x12,
+ 0x56, 0x41, 0x4c, 0x55, 0x45, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
+ 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x14, 0x4d, 0x41, 0x58, 0x5f, 0x52, 0x45, 0x41, 0x44,
0x5f, 0x43, 0x48, 0x55, 0x4e, 0x4b, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0x80, 0x80,
- 0x01, 0x12, 0x19, 0x0a, 0x12, 0x4d, 0x41, 0x58, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f,
- 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x4d, 0x42, 0x10, 0x80, 0x80, 0xc0, 0x02, 0x12, 0x29, 0x0a, 0x24,
- 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44,
- 0x41, 0x54, 0x41, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x42,
- 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0x08, 0x12, 0x2a, 0x0a, 0x25, 0x4d, 0x41, 0x58, 0x5f, 0x43,
- 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x46,
- 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53,
- 0x10, 0x80, 0x20, 0x12, 0x29, 0x0a, 0x24, 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f,
- 0x4d, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x54, 0x4f, 0x54, 0x41, 0x4c,
- 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0x40, 0x12, 0x2a,
- 0x0a, 0x24, 0x4d, 0x41, 0x58, 0x5f, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4d, 0x45, 0x54,
- 0x41, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x54, 0x4f, 0x54, 0x41, 0x4c, 0x5f, 0x53, 0x49, 0x5a, 0x45,
- 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0xa0, 0x01, 0x12, 0x27, 0x0a, 0x23, 0x4d, 0x41,
- 0x58, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43,
- 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x5f, 0x42, 0x55, 0x43, 0x4b, 0x45,
- 0x54, 0x10, 0x64, 0x12, 0x22, 0x0a, 0x1e, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x49, 0x46, 0x45, 0x43,
- 0x59, 0x43, 0x4c, 0x45, 0x5f, 0x52, 0x55, 0x4c, 0x45, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x5f, 0x42,
- 0x55, 0x43, 0x4b, 0x45, 0x54, 0x10, 0x64, 0x12, 0x26, 0x0a, 0x22, 0x4d, 0x41, 0x58, 0x5f, 0x4e,
- 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x55, 0x53, 0x54,
- 0x4f, 0x4d, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x53, 0x10, 0x05, 0x12,
- 0x31, 0x0a, 0x2c, 0x4d, 0x41, 0x58, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54,
- 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x49,
- 0x42, 0x55, 0x54, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x10,
- 0x80, 0x02, 0x12, 0x33, 0x0a, 0x2e, 0x4d, 0x41, 0x58, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49,
- 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x41, 0x54,
- 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x4c, 0x45,
- 0x4e, 0x47, 0x54, 0x48, 0x10, 0x80, 0x08, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x41, 0x58, 0x5f, 0x4c,
- 0x41, 0x42, 0x45, 0x4c, 0x53, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x49, 0x45, 0x53, 0x5f, 0x43, 0x4f,
- 0x55, 0x4e, 0x54, 0x10, 0x40, 0x12, 0x1f, 0x0a, 0x1b, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x41, 0x42,
- 0x45, 0x4c, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x4c, 0x45,
- 0x4e, 0x47, 0x54, 0x48, 0x10, 0x3f, 0x12, 0x1f, 0x0a, 0x1a, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x41,
- 0x42, 0x45, 0x4c, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x42,
- 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0x01, 0x12, 0x2e, 0x0a, 0x29, 0x4d, 0x41, 0x58, 0x5f, 0x4f,
- 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x49, 0x44, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x5f, 0x44, 0x45,
- 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x53, 0x5f, 0x52, 0x45, 0x51,
- 0x55, 0x45, 0x53, 0x54, 0x10, 0xe8, 0x07, 0x12, 0x1e, 0x0a, 0x1a, 0x53, 0x50, 0x4c, 0x49, 0x54,
- 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44,
- 0x5f, 0x44, 0x41, 0x59, 0x53, 0x10, 0x0e, 0x1a, 0x02, 0x10, 0x01, 0x22, 0xb5, 0x37, 0x0a, 0x06,
- 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x08, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
- 0x20, 0x0a, 0x09, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x08, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49,
- 0x64, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x4d, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x05, 0xfa, 0x41, 0x2d, 0x0a, 0x2b,
- 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x6e,
- 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e,
- 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f,
- 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2b, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65,
- 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41,
- 0x03, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x12, 0x1f, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20,
- 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74,
- 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c,
- 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0d,
- 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x07, 0x20,
- 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
- 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x15, 0x0a, 0x03, 0x72, 0x70, 0x6f, 0x18, 0x1b, 0x20,
- 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x03, 0x72, 0x70, 0x6f, 0x12, 0x3d, 0x0a,
- 0x03, 0x61, 0x63, 0x6c, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42,
- 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72,
- 0x6f, 0x6c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x03, 0x61, 0x63, 0x6c, 0x12, 0x59, 0x0a, 0x12,
- 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61,
- 0x63, 0x6c, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a,
- 0x65, 0x63, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
- 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x41, 0x63, 0x6c, 0x12, 0x46, 0x0a, 0x09, 0x6c, 0x69, 0x66, 0x65, 0x63,
- 0x79, 0x63, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42,
- 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x42,
- 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x12,
- 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
- 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
- 0x65, 0x12, 0x37, 0x0a, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
- 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x43, 0x6f, 0x72, 0x73, 0x42,
- 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70,
- 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03,
- 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x18,
- 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x61,
- 0x73, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03,
- 0xe0, 0x41, 0x01, 0x52, 0x15, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x76, 0x65, 0x6e,
- 0x74, 0x42, 0x61, 0x73, 0x65, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x12, 0x42, 0x0a, 0x06, 0x6c, 0x61,
- 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x01, 0x12, 0x1c, 0x0a, 0x15, 0x4d, 0x41, 0x58, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x43,
+ 0x48, 0x55, 0x4e, 0x4b, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0x80, 0x80, 0x01, 0x12,
+ 0x19, 0x0a, 0x12, 0x4d, 0x41, 0x58, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x53, 0x49,
+ 0x5a, 0x45, 0x5f, 0x4d, 0x42, 0x10, 0x80, 0x80, 0xc0, 0x02, 0x12, 0x29, 0x0a, 0x24, 0x4d, 0x41,
+ 0x58, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54,
+ 0x41, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x42, 0x59, 0x54,
+ 0x45, 0x53, 0x10, 0x80, 0x08, 0x12, 0x2a, 0x0a, 0x25, 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x55, 0x53,
+ 0x54, 0x4f, 0x4d, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x46, 0x49, 0x45,
+ 0x4c, 0x44, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x80,
+ 0x20, 0x12, 0x29, 0x0a, 0x24, 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f,
+ 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x54, 0x4f, 0x54, 0x41, 0x4c, 0x5f, 0x53,
+ 0x49, 0x5a, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0x40, 0x12, 0x2a, 0x0a, 0x24,
+ 0x4d, 0x41, 0x58, 0x5f, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44,
+ 0x41, 0x54, 0x41, 0x5f, 0x54, 0x4f, 0x54, 0x41, 0x4c, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x42,
+ 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0xa0, 0x01, 0x12, 0x27, 0x0a, 0x23, 0x4d, 0x41, 0x58, 0x5f,
+ 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x4e,
+ 0x46, 0x49, 0x47, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x5f, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x10,
+ 0x64, 0x12, 0x22, 0x0a, 0x1e, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x49, 0x46, 0x45, 0x43, 0x59, 0x43,
+ 0x4c, 0x45, 0x5f, 0x52, 0x55, 0x4c, 0x45, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x5f, 0x42, 0x55, 0x43,
+ 0x4b, 0x45, 0x54, 0x10, 0x64, 0x12, 0x26, 0x0a, 0x22, 0x4d, 0x41, 0x58, 0x5f, 0x4e, 0x4f, 0x54,
+ 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d,
+ 0x5f, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x53, 0x10, 0x05, 0x12, 0x31, 0x0a,
+ 0x2c, 0x4d, 0x41, 0x58, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f,
+ 0x4e, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55,
+ 0x54, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x10, 0x80, 0x02,
+ 0x12, 0x33, 0x0a, 0x2e, 0x4d, 0x41, 0x58, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41,
+ 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x41, 0x54, 0x54, 0x52,
+ 0x49, 0x42, 0x55, 0x54, 0x45, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x4c, 0x45, 0x4e, 0x47,
+ 0x54, 0x48, 0x10, 0x80, 0x08, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x41, 0x42,
+ 0x45, 0x4c, 0x53, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x49, 0x45, 0x53, 0x5f, 0x43, 0x4f, 0x55, 0x4e,
+ 0x54, 0x10, 0x40, 0x12, 0x1f, 0x0a, 0x1b, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x41, 0x42, 0x45, 0x4c,
+ 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x4c, 0x45, 0x4e, 0x47,
+ 0x54, 0x48, 0x10, 0x3f, 0x12, 0x1f, 0x0a, 0x1a, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x41, 0x42, 0x45,
+ 0x4c, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x42, 0x59, 0x54,
+ 0x45, 0x53, 0x10, 0x80, 0x01, 0x12, 0x2e, 0x0a, 0x29, 0x4d, 0x41, 0x58, 0x5f, 0x4f, 0x42, 0x4a,
+ 0x45, 0x43, 0x54, 0x5f, 0x49, 0x44, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x4c, 0x45,
+ 0x54, 0x45, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x53, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45,
+ 0x53, 0x54, 0x10, 0xe8, 0x07, 0x12, 0x1e, 0x0a, 0x1a, 0x53, 0x50, 0x4c, 0x49, 0x54, 0x5f, 0x54,
+ 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x44,
+ 0x41, 0x59, 0x53, 0x10, 0x0e, 0x1a, 0x02, 0x10, 0x01, 0x22, 0xb5, 0x37, 0x0a, 0x06, 0x42, 0x75,
+ 0x63, 0x6b, 0x65, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x08, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a,
+ 0x09, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x08, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12,
+ 0x12, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x65,
+ 0x74, 0x61, 0x67, 0x12, 0x4d, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x05, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x63, 0x6c,
+ 0x6f, 0x75, 0x64, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67,
+ 0x65, 0x72, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f,
+ 0x6d, 0x2f, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65,
+ 0x63, 0x74, 0x12, 0x2b, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52,
+ 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
+ 0x1f, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28,
+ 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x12, 0x28, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70,
+ 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x6c, 0x6f,
+ 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x74,
+ 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28,
+ 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43,
+ 0x6c, 0x61, 0x73, 0x73, 0x12, 0x15, 0x0a, 0x03, 0x72, 0x70, 0x6f, 0x18, 0x1b, 0x20, 0x01, 0x28,
+ 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x03, 0x72, 0x70, 0x6f, 0x12, 0x3d, 0x0a, 0x03, 0x61,
+ 0x63, 0x6c, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63,
+ 0x6b, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
+ 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x03, 0x61, 0x63, 0x6c, 0x12, 0x59, 0x0a, 0x12, 0x64, 0x65,
+ 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x63, 0x6c,
+ 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63,
+ 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x42, 0x03,
+ 0xe0, 0x41, 0x01, 0x52, 0x10, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4f, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x41, 0x63, 0x6c, 0x12, 0x46, 0x0a, 0x09, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63,
+ 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63,
+ 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x42, 0x03, 0xe0,
+ 0x41, 0x01, 0x52, 0x09, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x12, 0x40, 0x0a,
+ 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03,
+ 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12,
+ 0x37, 0x0a, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76,
+ 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x43, 0x6f, 0x72, 0x73, 0x42, 0x03, 0xe0,
+ 0x41, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61,
+ 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a,
+ 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x18, 0x64, 0x65,
+ 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x61, 0x73, 0x65,
+ 0x64, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41,
+ 0x01, 0x52, 0x15, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42,
+ 0x61, 0x73, 0x65, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x12, 0x42, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65,
+ 0x6c, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63,
+ 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42,
+ 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x40, 0x0a, 0x07,
+ 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76,
+ 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65,
+ 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x12, 0x49,
+ 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x11, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,
+ 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x56, 0x65,
+ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x76,
+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x40, 0x0a, 0x07, 0x6c, 0x6f, 0x67,
+ 0x67, 0x69, 0x6e, 0x67, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42,
- 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72,
- 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x40,
- 0x0a, 0x07, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
- 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x69,
- 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65,
- 0x12, 0x49, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x11,
+ 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x42, 0x03, 0xe0,
+ 0x41, 0x01, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x33, 0x0a, 0x05, 0x6f,
+ 0x77, 0x6e, 0x65, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f,
+ 0x77, 0x6e, 0x65, 0x72, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72,
+ 0x12, 0x49, 0x0a, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x14,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74,
0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e,
- 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52,
- 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x40, 0x0a, 0x07, 0x6c,
- 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67,
+ 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52,
+ 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x07, 0x62,
+ 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32,
- 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x42,
- 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x33, 0x0a,
- 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67,
+ 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x42,
+ 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x59, 0x0a,
+ 0x10, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63,
+ 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b,
+ 0x65, 0x74, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69,
+ 0x63, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69,
+ 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x47, 0x0a, 0x0a, 0x69, 0x61, 0x6d, 0x5f,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32,
- 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x6f, 0x77, 0x6e,
- 0x65, 0x72, 0x12, 0x49, 0x0a, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65,
- 0x74, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41,
- 0x01, 0x52, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a,
- 0x07, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
- 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e,
- 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x12,
- 0x59, 0x0a, 0x10, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c,
- 0x69, 0x63, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75,
- 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f,
- 0x6c, 0x69, 0x63, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x72, 0x65, 0x74, 0x65, 0x6e,
- 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x47, 0x0a, 0x0a, 0x69, 0x61,
- 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
- 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x61, 0x6d, 0x43, 0x6f, 0x6e,
- 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x69, 0x61, 0x6d, 0x43, 0x6f, 0x6e,
- 0x66, 0x69, 0x67, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x61, 0x74, 0x69, 0x73, 0x66, 0x69, 0x65, 0x73,
- 0x5f, 0x70, 0x7a, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52,
- 0x0c, 0x73, 0x61, 0x74, 0x69, 0x73, 0x66, 0x69, 0x65, 0x73, 0x50, 0x7a, 0x73, 0x12, 0x6c, 0x0a,
- 0x17, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e,
- 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
- 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d,
- 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42,
- 0x03, 0xe0, 0x41, 0x01, 0x52, 0x15, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x63,
- 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x46, 0x0a, 0x09, 0x61,
- 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
- 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6c,
- 0x61, 0x73, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c,
- 0x61, 0x73, 0x73, 0x12, 0x6b, 0x0a, 0x16, 0x68, 0x69, 0x65, 0x72, 0x61, 0x72, 0x63, 0x68, 0x69,
- 0x63, 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x20, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f,
- 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x48,
- 0x69, 0x65, 0x72, 0x61, 0x72, 0x63, 0x68, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73,
- 0x70, 0x61, 0x63, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x15, 0x68, 0x69, 0x65, 0x72, 0x61,
- 0x72, 0x63, 0x68, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
- 0x12, 0x5d, 0x0a, 0x12, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f,
- 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67,
+ 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x69, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x61, 0x74, 0x69, 0x73, 0x66, 0x69, 0x65, 0x73, 0x5f, 0x70,
+ 0x7a, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x73,
+ 0x61, 0x74, 0x69, 0x73, 0x66, 0x69, 0x65, 0x73, 0x50, 0x7a, 0x73, 0x12, 0x6c, 0x0a, 0x17, 0x63,
+ 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32,
- 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x53, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65,
- 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x73,
- 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12,
- 0x59, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74,
- 0x69, 0x6f, 0x6e, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75,
- 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e,
- 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x09, 0x69, 0x70,
- 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76,
- 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65,
- 0x72, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x08, 0x69, 0x70, 0x46, 0x69, 0x6c, 0x74,
- 0x65, 0x72, 0x88, 0x01, 0x01, 0x1a, 0x35, 0x0a, 0x07, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67,
- 0x12, 0x2a, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x61,
- 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x72,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x79, 0x73, 0x1a, 0x9b, 0x01, 0x0a,
- 0x04, 0x43, 0x6f, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18,
- 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67,
- 0x69, 0x6e, 0x12, 0x1b, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x03,
- 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12,
- 0x2c, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64,
- 0x65, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x72,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2b, 0x0a,
- 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73,
- 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x6d, 0x61, 0x78,
- 0x41, 0x67, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x1a, 0xa0, 0x0b, 0x0a, 0x0a, 0x45,
- 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x0f, 0x64, 0x65, 0x66,
- 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6b, 0x6d, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x01, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75,
- 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e,
- 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x0d, 0x64,
- 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, 0xb7, 0x01, 0x0a,
- 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f,
- 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72,
- 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f,
- 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x45,
- 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66,
- 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e,
- 0x66, 0x69, 0x67, 0x88, 0x01, 0x01, 0x12, 0xbd, 0x01, 0x0a, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f,
- 0x6d, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x72,
- 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65,
- 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x4f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
- 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4d, 0x61,
+ 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x6c,
+ 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0,
+ 0x41, 0x01, 0x52, 0x15, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d,
+ 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x46, 0x0a, 0x09, 0x61, 0x75, 0x74,
+ 0x6f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32,
+ 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x61, 0x73,
+ 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x61, 0x73,
+ 0x73, 0x12, 0x6b, 0x0a, 0x16, 0x68, 0x69, 0x65, 0x72, 0x61, 0x72, 0x63, 0x68, 0x69, 0x63, 0x61,
+ 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x20, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
+ 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x48, 0x69, 0x65,
+ 0x72, 0x61, 0x72, 0x63, 0x68, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
+ 0x63, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x15, 0x68, 0x69, 0x65, 0x72, 0x61, 0x72, 0x63,
+ 0x68, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x5d,
+ 0x0a, 0x12, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x70, 0x6f,
+ 0x6c, 0x69, 0x63, 0x79, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42,
+ 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x53, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
+ 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x73, 0x6f, 0x66,
+ 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x59, 0x0a,
+ 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f,
+ 0x6e, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b,
+ 0x65, 0x74, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69,
+ 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52,
+ 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x09, 0x69, 0x70, 0x5f, 0x66,
+ 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e,
+ 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42,
+ 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x08, 0x69, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72,
+ 0x88, 0x01, 0x01, 0x1a, 0x35, 0x0a, 0x07, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x2a,
+ 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x79, 0x73,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x72, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x79, 0x73, 0x1a, 0x9b, 0x01, 0x0a, 0x04, 0x43,
+ 0x6f, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e,
+ 0x12, 0x1b, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09,
+ 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x2c, 0x0a,
+ 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72,
+ 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x72, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x0f, 0x6d,
+ 0x61, 0x78, 0x5f, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x41, 0x67,
+ 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x1a, 0xa0, 0x0b, 0x0a, 0x0a, 0x45, 0x6e, 0x63,
+ 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75,
+ 0x6c, 0x74, 0x5f, 0x6b, 0x6d, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x29, 0xe0, 0x41, 0x01, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b,
+ 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f,
+ 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x0d, 0x64, 0x65, 0x66,
+ 0x61, 0x75, 0x6c, 0x74, 0x4b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, 0xb7, 0x01, 0x0a, 0x2c, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x65, 0x6e,
+ 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65,
+ 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x4d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
+ 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x63,
+ 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x4d, 0x61,
0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45,
0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x01, 0x52, 0x2a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
+ 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x4d,
+ 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x88, 0x01, 0x01, 0x12, 0xbd, 0x01, 0x0a, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
+ 0x72, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74,
+ 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76,
+ 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61,
+ 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x66,
+ 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x03,
+ 0xe0, 0x41, 0x01, 0x48, 0x01, 0x52, 0x2a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4d,
+ 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x88, 0x01, 0x01, 0x12, 0xc0, 0x01, 0x0a, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
+ 0x72, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e,
+ 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x50,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
+ 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53, 0x75, 0x70,
+ 0x70, 0x6c, 0x69, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45,
+ 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x02, 0x52, 0x2b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
+ 0x72, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x88, 0x01, 0x01, 0x1a, 0xca, 0x01, 0x0a, 0x28, 0x47, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00,
+ 0x52, 0x0f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64,
+ 0x65, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76,
+ 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,
+ 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x66, 0x66, 0x65,
+ 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11,
+ 0x5f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64,
+ 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f,
+ 0x74, 0x69, 0x6d, 0x65, 0x1a, 0xcc, 0x01, 0x0a, 0x2a, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e,
- 0x66, 0x69, 0x67, 0x88, 0x01, 0x01, 0x12, 0xc0, 0x01, 0x0a, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f,
- 0x6d, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63,
- 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d,
- 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x50, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
- 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x63, 0x72,
- 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53,
- 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66,
- 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x02, 0x52, 0x2b, 0x63, 0x75, 0x73, 0x74, 0x6f,
- 0x6d, 0x65, 0x72, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74,
- 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x88, 0x01, 0x01, 0x1a, 0xca, 0x01, 0x0a, 0x28, 0x47, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74,
- 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
- 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d,
- 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74,
- 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x66,
- 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x13,
- 0x0a, 0x11, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d,
- 0x6f, 0x64, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76,
- 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0xcc, 0x01, 0x0a, 0x2a, 0x43, 0x75, 0x73, 0x74, 0x6f,
- 0x6d, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43,
- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48,
- 0x00, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f,
- 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69,
- 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
- 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x66, 0x66,
- 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a,
- 0x11, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f,
- 0x64, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65,
- 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0xcd, 0x01, 0x0a, 0x2b, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d,
- 0x65, 0x72, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43,
- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48,
- 0x00, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f,
- 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69,
- 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
- 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x66, 0x66,
- 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a,
- 0x11, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f,
- 0x64, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65,
- 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x2f, 0x0a, 0x2d, 0x5f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f,
- 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x31, 0x0a, 0x2f, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f,
- 0x6d, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x72,
- 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65,
- 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x32, 0x0a, 0x30, 0x5f, 0x63, 0x75,
- 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x5f,
- 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72,
- 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xc6, 0x02,
- 0x0a, 0x09, 0x49, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x80, 0x01, 0x0a, 0x1b,
- 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6c,
- 0x65, 0x76, 0x65, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
- 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x61, 0x6d,
- 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x75,
- 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42,
- 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x75, 0x63,
- 0x6b, 0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3d,
- 0x0a, 0x18, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f,
- 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x16, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x41, 0x63, 0x63,
- 0x65, 0x73, 0x73, 0x50, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x77, 0x0a,
- 0x18, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x65,
- 0x76, 0x65, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x65, 0x6e, 0x61,
- 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52,
- 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3c, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b,
+ 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
+ 0x0f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65,
+ 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65,
0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
- 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x6c, 0x6f,
- 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x92, 0x08, 0x0a, 0x09, 0x4c, 0x69, 0x66, 0x65, 0x63,
- 0x79, 0x63, 0x6c, 0x65, 0x12, 0x41, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,
- 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x69,
- 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x42, 0x03, 0xe0, 0x41,
- 0x01, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x1a, 0xc1, 0x07, 0x0a, 0x04, 0x52, 0x75, 0x6c, 0x65,
- 0x12, 0x4c, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
- 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x69, 0x66, 0x65,
- 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x55,
- 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
- 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x69, 0x66,
- 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x64,
- 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64,
- 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x4b, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12,
- 0x17, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,
- 0x41, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72,
- 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42,
- 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61,
- 0x73, 0x73, 0x1a, 0xc6, 0x05, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
- 0x12, 0x1e, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x05, 0x48, 0x00, 0x52, 0x07, 0x61, 0x67, 0x65, 0x44, 0x61, 0x79, 0x73, 0x88, 0x01, 0x01,
- 0x12, 0x3d, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x65, 0x66, 0x6f,
- 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01,
- 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12,
- 0x1c, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08,
- 0x48, 0x01, 0x52, 0x06, 0x69, 0x73, 0x4c, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a,
- 0x12, 0x6e, 0x75, 0x6d, 0x5f, 0x6e, 0x65, 0x77, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69,
- 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x48, 0x02, 0x52, 0x10, 0x6e, 0x75, 0x6d,
- 0x4e, 0x65, 0x77, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x88, 0x01, 0x01,
- 0x12, 0x37, 0x0a, 0x15, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x5f, 0x73, 0x74, 0x6f, 0x72,
- 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x42,
- 0x03, 0xe0, 0x41, 0x01, 0x52, 0x13, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x53, 0x74, 0x6f,
- 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x16, 0x64, 0x61, 0x79,
- 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74,
- 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x48, 0x03, 0x52, 0x13, 0x64, 0x61, 0x79,
- 0x73, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x69, 0x6d, 0x65,
- 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x12, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x69,
- 0x6d, 0x65, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x11, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61,
- 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54,
- 0x69, 0x6d, 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x40, 0x0a, 0x1a, 0x64, 0x61, 0x79,
- 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65,
- 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x48, 0x04, 0x52,
- 0x17, 0x64, 0x61, 0x79, 0x73, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x75, 0x72,
- 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x16, 0x6e,
- 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x62,
- 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x42, 0x03,
- 0xe0, 0x41, 0x01, 0x52, 0x14, 0x6e, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54,
- 0x69, 0x6d, 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x6d, 0x61, 0x74,
- 0x63, 0x68, 0x65, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x0b, 0x20, 0x03, 0x28,
- 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x50,
- 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x2a, 0x0a, 0x0e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73,
- 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0,
- 0x41, 0x01, 0x52, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x53, 0x75, 0x66, 0x66, 0x69,
- 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x42, 0x0a,
- 0x0a, 0x08, 0x5f, 0x69, 0x73, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6e,
- 0x75, 0x6d, 0x5f, 0x6e, 0x65, 0x77, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
- 0x73, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65,
- 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x1d, 0x0a, 0x1b,
- 0x5f, 0x64, 0x61, 0x79, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x63,
- 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x5e, 0x0a, 0x07, 0x4c,
- 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x22, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x5f, 0x62, 0x75,
- 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52,
- 0x09, 0x6c, 0x6f, 0x67, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x11, 0x6c, 0x6f,
- 0x67, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6c, 0x6f, 0x67, 0x4f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x1a, 0x33, 0x0a, 0x0f, 0x4f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20,
- 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42,
- 0x06, 0xe0, 0x41, 0x01, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
- 0x1a, 0xca, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f,
- 0x6c, 0x69, 0x63, 0x79, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76,
- 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,
- 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x65,
- 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x09,
- 0x69, 0x73, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42,
- 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x69, 0x73, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x4d,
- 0x0a, 0x12, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x75, 0x72, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x11, 0x72, 0x65, 0x74, 0x65,
- 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xd3, 0x01,
- 0x0a, 0x10, 0x53, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69,
- 0x63, 0x79, 0x12, 0x4d, 0x0a, 0x12, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
- 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x74,
- 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01,
- 0x01, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74,
+ 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x66, 0x66, 0x65, 0x63,
+ 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f,
+ 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65,
+ 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74,
+ 0x69, 0x6d, 0x65, 0x1a, 0xcd, 0x01, 0x0a, 0x2b, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72,
+ 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
+ 0x0f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65,
+ 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65,
+ 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
+ 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x66, 0x66, 0x65, 0x63,
+ 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f,
+ 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65,
+ 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74,
+ 0x69, 0x6d, 0x65, 0x42, 0x2f, 0x0a, 0x2d, 0x5f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x6d,
+ 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x42, 0x31, 0x0a, 0x2f, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
+ 0x72, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74,
+ 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x32, 0x0a, 0x30, 0x5f, 0x63, 0x75, 0x73, 0x74,
+ 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x5f, 0x65, 0x6e,
+ 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65,
+ 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xc6, 0x02, 0x0a, 0x09,
+ 0x49, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x80, 0x01, 0x0a, 0x1b, 0x75, 0x6e,
+ 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6c, 0x65, 0x76,
+ 0x65, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
+ 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x61, 0x6d, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x75, 0x63, 0x6b,
+ 0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x03, 0xe0,
+ 0x41, 0x01, 0x52, 0x18, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65,
+ 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3d, 0x0a, 0x18,
+ 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x72,
+ 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,
+ 0xe0, 0x41, 0x01, 0x52, 0x16, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73,
+ 0x73, 0x50, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x77, 0x0a, 0x18, 0x55,
+ 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x65, 0x76, 0x65,
+ 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c,
+ 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x65,
+ 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3c, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74,
0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
- 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69,
- 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x72, 0x65,
- 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74,
- 0x69, 0x6d, 0x65, 0x1a, 0x2b, 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e,
- 0x67, 0x12, 0x1d, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
- 0x1a, 0x63, 0x0a, 0x07, 0x57, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x10, 0x6d,
- 0x61, 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x6d, 0x61, 0x69, 0x6e,
- 0x50, 0x61, 0x67, 0x65, 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x12, 0x29, 0x0a, 0x0e, 0x6e, 0x6f,
- 0x74, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x6e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e,
- 0x64, 0x50, 0x61, 0x67, 0x65, 0x1a, 0x43, 0x0a, 0x15, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50,
- 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a,
- 0x0a, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x64, 0x61, 0x74,
- 0x61, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xdb, 0x02, 0x0a, 0x09, 0x41,
- 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62,
- 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07,
- 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0b, 0x74, 0x6f, 0x67, 0x67, 0x6c,
- 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,
- 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x74,
- 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x16, 0x74, 0x65, 0x72,
- 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c,
- 0x61, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x14, 0x74, 0x65, 0x72,
- 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73,
- 0x73, 0x88, 0x01, 0x01, 0x12, 0x70, 0x0a, 0x22, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c,
- 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x75,
- 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41,
- 0x03, 0x48, 0x01, 0x52, 0x1e, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x6f,
- 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54,
- 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69,
+ 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b,
+ 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x92, 0x08, 0x0a, 0x09, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63,
+ 0x6c, 0x65, 0x12, 0x41, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
+ 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x69, 0x66, 0x65,
+ 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52,
+ 0x04, 0x72, 0x75, 0x6c, 0x65, 0x1a, 0xc1, 0x07, 0x0a, 0x04, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x4c,
+ 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
+ 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79,
+ 0x63, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42,
+ 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x55, 0x0a, 0x09,
+ 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
+ 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63,
+ 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74,
+ 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74,
+ 0x69, 0x6f, 0x6e, 0x1a, 0x4b, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a,
+ 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01,
+ 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
+ 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,
+ 0x41, 0x01, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73,
+ 0x1a, 0xc6, 0x05, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e,
+ 0x0a, 0x08, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
+ 0x48, 0x00, 0x52, 0x07, 0x61, 0x67, 0x65, 0x44, 0x61, 0x79, 0x73, 0x88, 0x01, 0x01, 0x12, 0x3d,
+ 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d,
+ 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x1c, 0x0a,
+ 0x07, 0x69, 0x73, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01,
+ 0x52, 0x06, 0x69, 0x73, 0x4c, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x6e,
+ 0x75, 0x6d, 0x5f, 0x6e, 0x65, 0x77, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x48, 0x02, 0x52, 0x10, 0x6e, 0x75, 0x6d, 0x4e, 0x65,
+ 0x77, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x88, 0x01, 0x01, 0x12, 0x37,
+ 0x0a, 0x15, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
+ 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0,
+ 0x41, 0x01, 0x52, 0x13, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x53, 0x74, 0x6f, 0x72, 0x61,
+ 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x16, 0x64, 0x61, 0x79, 0x73, 0x5f,
+ 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x69, 0x6d,
+ 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x48, 0x03, 0x52, 0x13, 0x64, 0x61, 0x79, 0x73, 0x53,
+ 0x69, 0x6e, 0x63, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01,
+ 0x01, 0x12, 0x44, 0x0a, 0x12, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65,
+ 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65,
+ 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x69, 0x6d,
+ 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x40, 0x0a, 0x1a, 0x64, 0x61, 0x79, 0x73, 0x5f,
+ 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74,
+ 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x48, 0x04, 0x52, 0x17, 0x64,
+ 0x61, 0x79, 0x73, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65,
+ 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x16, 0x6e, 0x6f, 0x6e,
+ 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x62, 0x65, 0x66,
+ 0x6f, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41,
+ 0x01, 0x52, 0x14, 0x6e, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d,
+ 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x6d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x42,
+ 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x50, 0x72, 0x65,
+ 0x66, 0x69, 0x78, 0x12, 0x2a, 0x0a, 0x0e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x5f, 0x73,
+ 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01,
+ 0x52, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x42,
+ 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x42, 0x0a, 0x0a, 0x08,
+ 0x5f, 0x69, 0x73, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6e, 0x75, 0x6d,
+ 0x5f, 0x6e, 0x65, 0x77, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42,
+ 0x19, 0x0a, 0x17, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x63,
+ 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x64,
+ 0x61, 0x79, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x75, 0x72,
+ 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x5e, 0x0a, 0x07, 0x4c, 0x6f, 0x67,
+ 0x67, 0x69, 0x6e, 0x67, 0x12, 0x22, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x5f, 0x62, 0x75, 0x63, 0x6b,
+ 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x6c,
+ 0x6f, 0x67, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x11, 0x6c, 0x6f, 0x67, 0x5f,
+ 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6c, 0x6f, 0x67, 0x4f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x1a, 0x33, 0x0a, 0x0f, 0x4f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x07,
+ 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x06, 0xe0,
+ 0x41, 0x01, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x1a, 0xca,
+ 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69,
+ 0x63, 0x79, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f,
+ 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
+ 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x65, 0x66, 0x66,
+ 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x69, 0x73,
+ 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0,
+ 0x41, 0x01, 0x52, 0x08, 0x69, 0x73, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x4d, 0x0a, 0x12,
+ 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x11, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74,
+ 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xd3, 0x01, 0x0a, 0x10,
+ 0x53, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
+ 0x12, 0x4d, 0x0a, 0x12, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x75,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44,
+ 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x74, 0x65, 0x6e,
+ 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12,
+ 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
+ 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65,
+ 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x72, 0x65, 0x74, 0x65,
+ 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x11,
+ 0x0a, 0x0f, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d,
+ 0x65, 0x1a, 0x2b, 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x12,
+ 0x1d, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
+ 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x1a, 0x63,
+ 0x0a, 0x07, 0x57, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x10, 0x6d, 0x61, 0x69,
+ 0x6e, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x61,
+ 0x67, 0x65, 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x12, 0x29, 0x0a, 0x0e, 0x6e, 0x6f, 0x74, 0x5f,
+ 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x6e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x50,
+ 0x61, 0x67, 0x65, 0x1a, 0x43, 0x0a, 0x15, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x6c, 0x61,
+ 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x0a, 0x0e,
+ 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01,
+ 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x4c,
+ 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xdb, 0x02, 0x0a, 0x09, 0x41, 0x75, 0x74,
+ 0x6f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x65, 0x6e,
+ 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0b, 0x74, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x5f,
+ 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
+ 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x67,
+ 0x67, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x16, 0x74, 0x65, 0x72, 0x6d, 0x69,
0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73,
- 0x73, 0x42, 0x25, 0x0a, 0x23, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73,
+ 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x14, 0x74, 0x65, 0x72, 0x6d, 0x69,
+ 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x88,
+ 0x01, 0x01, 0x12, 0x70, 0x0a, 0x22, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73,
0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x75, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x8d, 0x05, 0x0a, 0x08, 0x49, 0x70, 0x46,
- 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x6f,
- 0x0a, 0x15, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b,
- 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76,
- 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65,
- 0x72, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x01, 0x52, 0x13, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4e,
- 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12,
- 0x68, 0x0a, 0x13, 0x76, 0x70, 0x63, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32,
- 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72,
- 0x2e, 0x56, 0x70, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x11, 0x76, 0x70, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f,
- 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x14, 0x61, 0x6c, 0x6c,
- 0x6f, 0x77, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x6f, 0x72, 0x67, 0x5f, 0x76, 0x70, 0x63,
- 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x11, 0x61, 0x6c,
- 0x6c, 0x6f, 0x77, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x4f, 0x72, 0x67, 0x56, 0x70, 0x63, 0x73, 0x12,
- 0x47, 0x0a, 0x1e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73,
- 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x1a, 0x61, 0x6c, 0x6c, 0x6f, 0x77,
- 0x41, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x41,
- 0x63, 0x63, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x1a, 0x4f, 0x0a, 0x13, 0x50, 0x75, 0x62, 0x6c,
- 0x69, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12,
- 0x38, 0x0a, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x69, 0x70, 0x5f, 0x63, 0x69,
- 0x64, 0x72, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42,
- 0x03, 0xe0, 0x41, 0x01, 0x52, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x49, 0x70, 0x43,
- 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x1a, 0x77, 0x0a, 0x10, 0x56, 0x70, 0x63,
- 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1d, 0x0a,
- 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00,
- 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x16,
- 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x69, 0x70, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x5f,
- 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41,
- 0x01, 0x52, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x49, 0x70, 0x43, 0x69, 0x64, 0x72,
- 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f,
- 0x72, 0x6b, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x42, 0x18, 0x0a, 0x16, 0x5f,
+ 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48,
+ 0x01, 0x52, 0x1e, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x61,
+ 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
+ 0x65, 0x88, 0x01, 0x01, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61,
+ 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x42,
+ 0x25, 0x0a, 0x23, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f,
+ 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74,
+ 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x8d, 0x05, 0x0a, 0x08, 0x49, 0x70, 0x46, 0x69, 0x6c,
+ 0x74, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x48, 0x00, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x6f, 0x0a, 0x15,
0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f,
- 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x67, 0x65, 0x6e,
- 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x1a, 0x36, 0x0a, 0x15, 0x48, 0x69, 0x65, 0x72,
- 0x61, 0x72, 0x63, 0x68, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
- 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
- 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
- 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
- 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x58, 0xea, 0x41, 0x55,
- 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12,
- 0x23, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65,
- 0x63, 0x74, 0x7d, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x62, 0x75, 0x63,
- 0x6b, 0x65, 0x74, 0x7d, 0x2a, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x32, 0x06, 0x62,
- 0x75, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x69, 0x70, 0x5f, 0x66, 0x69, 0x6c,
- 0x74, 0x65, 0x72, 0x22, 0xbf, 0x02, 0x0a, 0x13, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63,
- 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x17, 0x0a, 0x04, 0x72,
- 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04,
- 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x06, 0x65, 0x6e, 0x74,
- 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06,
- 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x22, 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
- 0x5f, 0x61, 0x6c, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52,
- 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x6e,
- 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,
- 0x41, 0x01, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x04,
- 0x65, 0x74, 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52,
- 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x05,
- 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
- 0x12, 0x1b, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x46, 0x0a,
- 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x07, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f,
- 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54,
- 0x65, 0x61, 0x6d, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,
- 0x74, 0x54, 0x65, 0x61, 0x6d, 0x22, 0x5a, 0x0a, 0x0f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75,
- 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74,
- 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x05, 0xe0, 0x41, 0x01, 0x08, 0x01,
- 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x72, 0x63,
- 0x33, 0x32, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x07, 0x48, 0x00, 0x52, 0x06, 0x63, 0x72, 0x63,
- 0x33, 0x32, 0x63, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32,
- 0x63, 0x22, 0x59, 0x0a, 0x0f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b,
- 0x73, 0x75, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x07, 0x48, 0x00, 0x52, 0x06, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x88, 0x01,
- 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x6d, 0x64, 0x35, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x6d, 0x64, 0x35, 0x48, 0x61, 0x73,
- 0x68, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x22, 0xbb, 0x01, 0x0a,
- 0x1a, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6e,
- 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,
- 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
- 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e,
+ 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e,
+ 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x48, 0x01, 0x52, 0x13, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4e, 0x65, 0x74,
+ 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x68, 0x0a,
+ 0x13, 0x76, 0x70, 0x63, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42,
+ 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x56,
+ 0x70, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42,
+ 0x03, 0xe0, 0x41, 0x01, 0x52, 0x11, 0x76, 0x70, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b,
+ 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77,
+ 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x6f, 0x72, 0x67, 0x5f, 0x76, 0x70, 0x63, 0x73, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x11, 0x61, 0x6c, 0x6c, 0x6f,
+ 0x77, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x4f, 0x72, 0x67, 0x56, 0x70, 0x63, 0x73, 0x12, 0x47, 0x0a,
+ 0x1e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18,
+ 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x1a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c,
+ 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63,
+ 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x1a, 0x4f, 0x0a, 0x13, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63,
+ 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x38, 0x0a,
+ 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x69, 0x70, 0x5f, 0x63, 0x69, 0x64, 0x72,
+ 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0,
+ 0x41, 0x01, 0x52, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x49, 0x70, 0x43, 0x69, 0x64,
+ 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x1a, 0x77, 0x0a, 0x10, 0x56, 0x70, 0x63, 0x4e, 0x65,
+ 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x6e,
+ 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07,
+ 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x16, 0x61, 0x6c,
+ 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x69, 0x70, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x5f, 0x72, 0x61,
+ 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52,
+ 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x49, 0x70, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61,
+ 0x6e, 0x67, 0x65, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b,
+ 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x70, 0x75,
+ 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c,
+ 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f,
+ 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x1a, 0x36, 0x0a, 0x15, 0x48, 0x69, 0x65, 0x72, 0x61, 0x72,
+ 0x63, 0x68, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12,
+ 0x1d, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
+ 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x1a, 0x39,
+ 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
+ 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
+ 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x58, 0xea, 0x41, 0x55, 0x0a, 0x1d,
+ 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70,
+ 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x23, 0x70,
+ 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
+ 0x7d, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65,
+ 0x74, 0x7d, 0x2a, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x32, 0x06, 0x62, 0x75, 0x63,
+ 0x6b, 0x65, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x69, 0x70, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65,
+ 0x72, 0x22, 0xbf, 0x02, 0x0a, 0x13, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65,
+ 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x17, 0x0a, 0x04, 0x72, 0x6f, 0x6c,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x72, 0x6f,
+ 0x6c, 0x65, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,
+ 0xe0, 0x41, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74,
+ 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x65, 0x6e,
+ 0x74, 0x69, 0x74, 0x79, 0x12, 0x22, 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x61,
+ 0x6c, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x65,
+ 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69,
+ 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01,
+ 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x04, 0x65, 0x74,
+ 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x65,
+ 0x74, 0x61, 0x67, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x05, 0x20, 0x01,
+ 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1b,
+ 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,
+ 0xe0, 0x41, 0x01, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x46, 0x0a, 0x0c, 0x70,
+ 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
+ 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x65, 0x61,
+ 0x6d, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54,
+ 0x65, 0x61, 0x6d, 0x22, 0x5a, 0x0a, 0x0f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d,
+ 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
+ 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x05, 0xe0, 0x41, 0x01, 0x08, 0x01, 0x52, 0x07,
+ 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x72, 0x63, 0x33, 0x32,
+ 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x07, 0x48, 0x00, 0x52, 0x06, 0x63, 0x72, 0x63, 0x33, 0x32,
+ 0x63, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x22,
+ 0x59, 0x0a, 0x0f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75,
+ 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x07, 0x48, 0x00, 0x52, 0x06, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x88, 0x01, 0x01, 0x12,
+ 0x1e, 0x0a, 0x08, 0x6d, 0x64, 0x35, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x6d, 0x64, 0x35, 0x48, 0x61, 0x73, 0x68, 0x42,
+ 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x22, 0xbb, 0x01, 0x0a, 0x1a, 0x4f,
+ 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x74, 0x65,
+ 0x78, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74,
+ 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
+ 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61,
+ 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
- 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72,
- 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61,
- 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
+ 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xc6, 0x01, 0x0a, 0x0e, 0x4f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x06, 0x63,
+ 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e,
+ 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x2e, 0x43,
+ 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52,
+ 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x1a, 0x68, 0x0a, 0x0b, 0x43, 0x75, 0x73, 0x74, 0x6f,
+ 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x43, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50,
+ 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
+ 0x01, 0x22, 0x7b, 0x0a, 0x12, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x45, 0x6e, 0x63,
+ 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72,
+ 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12,
+ 0x2d, 0x0a, 0x10, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x5f, 0x62, 0x79,
+ 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e,
+ 0x6b, 0x65, 0x79, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0xe3,
+ 0x11, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x05, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72,
+ 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63,
+ 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65,
+ 0x74, 0x12, 0x17, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03,
+ 0xe0, 0x41, 0x05, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
+ 0x2d, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
+ 0x18, 0x23, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x00, 0x52, 0x0c, 0x72,
+ 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2b,
+ 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0e, 0x6d, 0x65, 0x74,
+ 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0d, 0x73,
+ 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01,
+ 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
+ 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20,
+ 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x2e,
+ 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69,
+ 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x63,
+ 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x34,
+ 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01,
+ 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x63, 0x6f,
+ 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01,
+ 0x52, 0x0c, 0x63, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x3d,
+ 0x0a, 0x03, 0x61, 0x63, 0x6c, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e,
+ 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74,
+ 0x72, 0x6f, 0x6c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x03, 0x61, 0x63, 0x6c, 0x12, 0x2e, 0x0a,
+ 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67,
+ 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x63, 0x6f,
+ 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x40, 0x0a,
+ 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03,
+ 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12,
+ 0x44, 0x0a, 0x0d, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65,
+ 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
+ 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a,
+ 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
+ 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01,
+ 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x40, 0x0a,
+ 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03,
+ 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12,
+ 0x2c, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x75,
+ 0x6e, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0e, 0x63,
+ 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x45, 0x0a,
+ 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
+ 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b,
+ 0x73, 0x75, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b,
+ 0x73, 0x75, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74,
+ 0x69, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
+ 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61,
+ 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x07, 0x6b, 0x6d, 0x73, 0x5f, 0x6b, 0x65,
+ 0x79, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x01, 0xfa, 0x41, 0x23, 0x0a,
+ 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b,
+ 0x65, 0x79, 0x52, 0x06, 0x6b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x5a, 0x0a, 0x19, 0x75, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61,
+ 0x73, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
- 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a,
- 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xc6, 0x01, 0x0a, 0x0e, 0x4f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x4a, 0x0a,
- 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76,
- 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73,
- 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41,
- 0x01, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x1a, 0x68, 0x0a, 0x0b, 0x43, 0x75, 0x73,
- 0x74, 0x6f, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x43, 0x0a, 0x05, 0x76, 0x61,
- 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x16,
+ 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61,
+ 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72,
+ 0x61, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03,
+ 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x79, 0x48, 0x6f,
+ 0x6c, 0x64, 0x12, 0x53, 0x0a, 0x15, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0,
+ 0x41, 0x01, 0x52, 0x13, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70,
+ 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
- 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
- 0x02, 0x38, 0x01, 0x22, 0x7b, 0x0a, 0x12, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x45,
- 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x14, 0x65, 0x6e, 0x63,
- 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68,
- 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x13, 0x65, 0x6e,
- 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68,
- 0x6d, 0x12, 0x2d, 0x0a, 0x10, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x5f,
- 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01,
- 0x52, 0x0e, 0x6b, 0x65, 0x79, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x42, 0x79, 0x74, 0x65, 0x73,
- 0x22, 0xe3, 0x11, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e,
- 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x04,
- 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x05, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74,
- 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73,
- 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63,
- 0x6b, 0x65, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x1b, 0x20, 0x01, 0x28,
- 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x23, 0x0a, 0x0a,
- 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
- 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x12, 0x2d, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x6b,
- 0x65, 0x6e, 0x18, 0x23, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x00, 0x52,
- 0x0c, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01,
- 0x12, 0x2b, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0e, 0x6d,
- 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a,
- 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x05,
- 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61,
- 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18,
- 0x06, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65,
- 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x6f,
- 0x64, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52,
- 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67,
- 0x12, 0x34, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x70,
- 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,
- 0x41, 0x01, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x6f,
- 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f,
- 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,
- 0x41, 0x01, 0x52, 0x0c, 0x63, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
- 0x12, 0x3d, 0x0a, 0x03, 0x61, 0x63, 0x6c, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76,
- 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f,
- 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x03, 0x61, 0x63, 0x6c, 0x12,
- 0x2e, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75,
- 0x61, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f,
- 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12,
- 0x40, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
- 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d,
- 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x5f, 0x74, 0x69,
- 0x6d, 0x65, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
- 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x66, 0x69, 0x6e, 0x61, 0x6c,
- 0x69, 0x7a, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65,
- 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,
- 0x41, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12,
- 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0e,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
- 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
- 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x63,
- 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52,
- 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12,
- 0x45, 0x0a, 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x10, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,
- 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65,
- 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x63, 0x68, 0x65,
- 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
- 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
+ 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74,
+ 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x12, 0x42, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x26, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f,
+ 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x63, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x10, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x62,
+ 0x61, 0x73, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x48,
+ 0x01, 0x52, 0x0e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x73, 0x65, 0x64, 0x48, 0x6f, 0x6c,
+ 0x64, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x18, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f,
+ 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x42, 0x03, 0xe0,
+ 0x41, 0x03, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x5b, 0x0a, 0x13, 0x63, 0x75, 0x73,
+ 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f,
+ 0x6d, 0x65, 0x72, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0,
+ 0x41, 0x01, 0x52, 0x12, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x45, 0x6e, 0x63, 0x72,
+ 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
+ 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
- 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70,
- 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x07, 0x6b, 0x6d, 0x73, 0x5f,
- 0x6b, 0x65, 0x79, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x01, 0xfa, 0x41,
- 0x23, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74,
- 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x6b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x5a, 0x0a, 0x19,
- 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63,
- 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03,
- 0x52, 0x16, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43,
- 0x6c, 0x61, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x74, 0x65, 0x6d, 0x70,
- 0x6f, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08,
- 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x79,
- 0x48, 0x6f, 0x6c, 0x64, 0x12, 0x53, 0x0a, 0x15, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f,
- 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x15, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42,
- 0x03, 0xe0, 0x41, 0x01, 0x52, 0x13, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x45,
- 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x08, 0x6d, 0x65, 0x74,
- 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f,
+ 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x63, 0x75,
+ 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x10, 0x73, 0x6f, 0x66, 0x74,
+ 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x1c, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03,
+ 0xe0, 0x41, 0x03, 0x48, 0x02, 0x52, 0x0e, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4e, 0x0a, 0x10, 0x68, 0x61, 0x72, 0x64,
+ 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x1d, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03,
+ 0xe0, 0x41, 0x03, 0x48, 0x03, 0x52, 0x0e, 0x68, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65,
+ 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e,
- 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45,
- 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64,
- 0x61, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18,
- 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,
- 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
- 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x63,
- 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x10, 0x65, 0x76, 0x65, 0x6e, 0x74,
- 0x5f, 0x62, 0x61, 0x73, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28,
- 0x08, 0x48, 0x01, 0x52, 0x0e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x73, 0x65, 0x64, 0x48,
- 0x6f, 0x6c, 0x64, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18,
- 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,
- 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x42,
- 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x5b, 0x0a, 0x13, 0x63,
- 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75, 0x73,
- 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42,
- 0x03, 0xe0, 0x41, 0x01, 0x52, 0x12, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x45, 0x6e,
- 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74,
- 0x6f, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
- 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a,
- 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x10, 0x73, 0x6f,
- 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x1c,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
- 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x02, 0x52, 0x0e, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c,
- 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4e, 0x0a, 0x10, 0x68, 0x61,
- 0x72, 0x64, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x1d,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
- 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x03, 0x52, 0x0e, 0x68, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6c,
- 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x09, 0x72, 0x65,
- 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76,
- 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69,
- 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69,
- 0x6f, 0x6e, 0x1a, 0xd3, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e,
- 0x12, 0x41, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
- 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74,
- 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x6d,
- 0x6f, 0x64, 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x75, 0x6e,
- 0x74, 0x69, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52,
- 0x0f, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x54, 0x69, 0x6d, 0x65,
- 0x22, 0x36, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x4f, 0x44, 0x45,
- 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c,
- 0x0a, 0x08, 0x55, 0x4e, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06,
- 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x02, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61,
- 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72,
- 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x65, 0x76, 0x65, 0x6e,
- 0x74, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x13, 0x0a, 0x11,
- 0x5f, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d,
- 0x65, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74,
- 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xbf, 0x02, 0x0a, 0x13, 0x4f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x17,
- 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41,
- 0x01, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x06,
- 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41,
- 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x22, 0x0a, 0x0a, 0x65, 0x6e, 0x74,
- 0x69, 0x74, 0x79, 0x5f, 0x61, 0x6c, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,
- 0x41, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x6c, 0x74, 0x12, 0x20, 0x0a,
- 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12,
- 0x17, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,
- 0x41, 0x01, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69,
- 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, 0x65, 0x6d,
- 0x61, 0x69, 0x6c, 0x12, 0x1b, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20,
- 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e,
- 0x12, 0x46, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x65, 0x61, 0x6d,
- 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65,
- 0x63, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x70, 0x72, 0x6f,
- 0x6a, 0x65, 0x63, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x22, 0x8e, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73,
- 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x12, 0x33, 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
- 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
- 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x6f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65,
- 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65,
- 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74,
- 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74,
- 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x52, 0x0a, 0x0b, 0x50, 0x72, 0x6f,
- 0x6a, 0x65, 0x63, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x6a,
- 0x65, 0x63, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x75,
- 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x46, 0x0a,
- 0x05, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74,
- 0x69, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x65, 0x6e, 0x74,
- 0x69, 0x74, 0x79, 0x49, 0x64, 0x22, 0x5f, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
- 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65,
- 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x27, 0x0a,
- 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65,
- 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x32, 0x9f, 0x1f, 0x0a, 0x07, 0x53, 0x74, 0x6f, 0x72, 0x61,
- 0x67, 0x65, 0x12, 0x72, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b,
- 0x65, 0x74, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,
- 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x63,
- 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
- 0x74, 0x79, 0x22, 0x22, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xd3, 0xe4, 0x93, 0x02,
- 0x15, 0x12, 0x13, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b,
- 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x6f, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x75, 0x63,
- 0x6b, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f,
- 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65,
- 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63,
- 0x6b, 0x65, 0x74, 0x22, 0x22, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xd3, 0xe4, 0x93,
- 0x02, 0x15, 0x12, 0x13, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63,
- 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xab, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61,
- 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65,
- 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
- 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x58, 0xda, 0x41, 0x17,
- 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x62, 0x75,
- 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x16, 0x0a,
- 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x0c, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,
- 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x1e, 0x0a, 0x0e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e,
- 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x0c, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,
- 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x85, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75,
- 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,
- 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75,
- 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67,
+ 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e,
+ 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e,
+ 0x1a, 0xd3, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41,
+ 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32,
- 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x8a,
- 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12,
- 0x0c, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x93, 0x01,
- 0x0a, 0x19, 0x4c, 0x6f, 0x63, 0x6b, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x74, 0x65,
- 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x33, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e,
- 0x4c, 0x6f, 0x63, 0x6b, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74,
- 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
- 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x26, 0xda, 0x41, 0x06,
- 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06,
- 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d,
- 0x2a, 0x2a, 0x7d, 0x12, 0xa3, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f,
- 0x6c, 0x69, 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61,
- 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63,
- 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22,
- 0x58, 0xda, 0x41, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x8a, 0xd3, 0xe4, 0x93,
- 0x02, 0x47, 0x12, 0x17, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b,
- 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x2c, 0x0a, 0x08, 0x72,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x20, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74,
- 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b,
- 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0xaa, 0x01, 0x0a, 0x0c, 0x53, 0x65,
- 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x49, 0x61,
- 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50,
- 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x5f, 0xda, 0x41, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x2c, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x12,
- 0x17, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x7b, 0x62, 0x75,
- 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x2c, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x12, 0x20, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72,
- 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73,
- 0x2f, 0x2a, 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0x96, 0x02, 0x0a, 0x12, 0x54, 0x65, 0x73, 0x74, 0x49,
- 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65,
- 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50,
- 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x22, 0xaa, 0x01, 0xda, 0x41, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x2c, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x8a, 0xd3, 0xe4, 0x93,
- 0x02, 0x8c, 0x01, 0x12, 0x17, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12,
- 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x34, 0x0a, 0x08,
- 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x28, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65,
- 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63,
- 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f,
- 0x2a, 0x2a, 0x12, 0x3b, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2f,
- 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73,
- 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6d, 0x61,
- 0x6e, 0x61, 0x67, 0x65, 0x64, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2a, 0x12,
- 0x8a, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74,
+ 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f,
+ 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x6d, 0x6f, 0x64,
+ 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x75, 0x6e, 0x74, 0x69,
+ 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,
+ 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x72,
+ 0x65, 0x74, 0x61, 0x69, 0x6e, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x36,
+ 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55,
+ 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08,
+ 0x55, 0x4e, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x4f,
+ 0x43, 0x4b, 0x45, 0x44, 0x10, 0x02, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
+ 0x02, 0x38, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f,
+ 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f,
+ 0x62, 0x61, 0x73, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x73,
+ 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42,
+ 0x13, 0x0a, 0x11, 0x5f, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f,
+ 0x74, 0x69, 0x6d, 0x65, 0x22, 0xbf, 0x02, 0x0a, 0x13, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41,
+ 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x17, 0x0a, 0x04,
+ 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52,
+ 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x06, 0x65, 0x6e,
+ 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52,
+ 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x22, 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74,
+ 0x79, 0x5f, 0x61, 0x6c, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03,
+ 0x52, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x65,
+ 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,
+ 0xe0, 0x41, 0x01, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x17, 0x0a,
+ 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01,
+ 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18,
+ 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69,
+ 0x6c, 0x12, 0x1b, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28,
+ 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x46,
+ 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x07,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74,
+ 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
+ 0x54, 0x65, 0x61, 0x6d, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65,
+ 0x63, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x22, 0x8e, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x4f,
+ 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33,
+ 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
+ 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x6f, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x18,
+ 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x12,
+ 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b,
+ 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61,
+ 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x52, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x6a, 0x65,
+ 0x63, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,
+ 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,
+ 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x75, 0x6d, 0x62,
+ 0x65, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x46, 0x0a, 0x05, 0x4f,
+ 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74,
+ 0x79, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74,
+ 0x79, 0x49, 0x64, 0x22, 0x5f, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x61,
+ 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x63,
+ 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x65,
+ 0x6e, 0x67, 0x74, 0x68, 0x32, 0x9f, 0x1f, 0x0a, 0x07, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
+ 0x12, 0x72, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74,
0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
- 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65,
- 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63,
- 0x6b, 0x65, 0x74, 0x22, 0x37, 0xda, 0x41, 0x12, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x75,
- 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x1c,
- 0x12, 0x1a, 0x0a, 0x0b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x12,
- 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x7e, 0x0a, 0x0d,
- 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x27, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76,
- 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52,
+ 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65,
+ 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
+ 0x22, 0x22, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12,
+ 0x13, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74,
+ 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x6f, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65,
+ 0x74, 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
+ 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x22, 0x29, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x0a, 0x12, 0x64, 0x65, 0x73,
- 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12,
- 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x98, 0x01, 0x0a,
- 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x26, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76,
- 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x48, 0xda,
- 0x41, 0x0d, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0xda,
- 0x41, 0x18, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c,
- 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17,
- 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63,
- 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x8d, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x74,
- 0x6f, 0x72, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65,
- 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,
- 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x38, 0xda,
- 0x41, 0x18, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c,
- 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17,
- 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63,
- 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xba, 0x01, 0x0a, 0x14, 0x43, 0x61, 0x6e, 0x63,
- 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65,
- 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
- 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d,
- 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
- 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d,
- 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x22, 0x41, 0xda, 0x41, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x8a,
- 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f,
- 0x69, 0x64, 0x12, 0x20, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a,
+ 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65,
+ 0x74, 0x22, 0x22, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x15,
+ 0x12, 0x13, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65,
+ 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xab, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
+ 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
+ 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x58, 0xda, 0x41, 0x17, 0x70, 0x61,
+ 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x62, 0x75, 0x63, 0x6b,
+ 0x65, 0x74, 0x5f, 0x69, 0x64, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x16, 0x0a, 0x06, 0x70,
+ 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x0c, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x3d,
+ 0x2a, 0x2a, 0x7d, 0x12, 0x1e, 0x0a, 0x0e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72,
+ 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x0c, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x3d,
+ 0x2a, 0x2a, 0x7d, 0x12, 0x85, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b,
+ 0x65, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f,
+ 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b,
+ 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4c,
+ 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0x27, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x8a, 0xd3, 0xe4,
+ 0x93, 0x02, 0x18, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x0c, 0x7b,
+ 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x93, 0x01, 0x0a, 0x19,
+ 0x4c, 0x6f, 0x63, 0x6b, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74,
+ 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x6f,
+ 0x63, 0x6b, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f,
+ 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
+ 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x26, 0xda, 0x41, 0x06, 0x62, 0x75,
+ 0x63, 0x6b, 0x65, 0x74, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75,
+ 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a,
+ 0x7d, 0x12, 0xa3, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69,
+ 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e,
+ 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x58, 0xda,
+ 0x41, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x47,
+ 0x12, 0x17, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x7b, 0x62,
+ 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x2c, 0x0a, 0x08, 0x72, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x20, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70,
+ 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74,
+ 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0xaa, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x49,
+ 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50,
+ 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c,
+ 0x69, 0x63, 0x79, 0x22, 0x5f, 0xda, 0x41, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x2c, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x12, 0x17, 0x0a,
+ 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b,
+ 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x2c, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x12, 0x20, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a,
0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x2a,
- 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0x95, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65,
- 0x63, 0x74, 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,
- 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
+ 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0x96, 0x02, 0x0a, 0x12, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d,
+ 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74,
+ 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69,
+ 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72,
+ 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x22, 0xaa, 0x01, 0xda, 0x41, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x70,
+ 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x8c,
+ 0x01, 0x12, 0x17, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x7b,
+ 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x28, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d,
+ 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65,
+ 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2a,
+ 0x12, 0x3b, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2f, 0x7b, 0x62,
+ 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a,
+ 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6d, 0x61, 0x6e, 0x61,
+ 0x67, 0x65, 0x64, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2a, 0x12, 0x8a, 0x01,
+ 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x26,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
+ 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65,
+ 0x74, 0x22, 0x37, 0xda, 0x41, 0x12, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x75, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a,
+ 0x0a, 0x0b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0b, 0x7b,
+ 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x7e, 0x0a, 0x0d, 0x43, 0x6f,
+ 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e,
+ 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74,
+ 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22,
+ 0x29, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x0a, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69,
+ 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b,
+ 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x0c, 0x44,
+ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x26, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e,
+ 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x48, 0xda, 0x41, 0x0d,
+ 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0xda, 0x41, 0x18,
+ 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x67, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15,
+ 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65,
+ 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x8d, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72,
+ 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x74,
+ 0x6f, 0x72, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
+ 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x38, 0xda, 0x41, 0x18,
+ 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x67, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15,
+ 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65,
+ 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xba, 0x01, 0x0a, 0x14, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c,
+ 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x2e,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
+ 0x76, 0x32, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62,
+ 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
+ 0x76, 0x32, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62,
+ 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
+ 0x41, 0xda, 0x41, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x8a, 0xd3, 0xe4,
+ 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64,
+ 0x12, 0x20, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,
+ 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f,
+ 0x2a, 0x2a, 0x12, 0x95, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
+ 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
+ 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,
+ 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
+ 0x22, 0x48, 0xda, 0x41, 0x0d, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0xda, 0x41, 0x18, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x2c, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8a, 0xd3, 0xe4,
+ 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b,
+ 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xa5, 0x01, 0x0a, 0x0a, 0x52,
+ 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65,
+ 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
+ 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0xda, 0x41, 0x0d, 0x62, 0x75, 0x63, 0x6b, 0x65,
+ 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0xda, 0x41, 0x18, 0x62, 0x75, 0x63, 0x6b, 0x65,
+ 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63,
+ 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d,
+ 0x30, 0x01, 0x12, 0x99, 0x01, 0x0a, 0x0e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f,
+ 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,
+ 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65,
+ 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
+ 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x8a, 0xd3, 0xe4, 0x93,
+ 0x02, 0x28, 0x12, 0x26, 0x0a, 0x17, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63,
+ 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b,
+ 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x28, 0x01, 0x30, 0x01, 0x12, 0x8c,
+ 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12,
+ 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
+ 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65,
- 0x63, 0x74, 0x22, 0x48, 0xda, 0x41, 0x0d, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0xda, 0x41, 0x18, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8a,
- 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12,
- 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xa5, 0x01, 0x0a,
- 0x0a, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e,
- 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
- 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0xda, 0x41, 0x0d, 0x62, 0x75, 0x63,
- 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0xda, 0x41, 0x18, 0x62, 0x75, 0x63,
- 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x67, 0x65, 0x6e, 0x65, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62,
+ 0x63, 0x74, 0x22, 0x39, 0xda, 0x41, 0x12, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x75, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12,
+ 0x1c, 0x0a, 0x0d, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74,
+ 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x60, 0x0a,
+ 0x0b, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x25, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32,
+ 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f,
+ 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x12,
+ 0x6e, 0x0a, 0x0f, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x12, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,
+ 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65,
+ 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76,
+ 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63,
+ 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12,
+ 0x84, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12,
+ 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
+ 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f,
+ 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26,
+ 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12,
+ 0x15, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b,
+ 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x77, 0x72, 0x69,
+ 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x77,
+ 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
+ 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x0f, 0x0a,
+ 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x21,
+ 0x0a, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x75,
+ 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a,
+ 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d,
+ 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74,
+ 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74,
+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61,
+ 0x72, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x32,
+ 0x12, 0x30, 0x0a, 0x21, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
+ 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x62,
0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a,
- 0x2a, 0x7d, 0x30, 0x01, 0x12, 0x99, 0x01, 0x0a, 0x0e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61,
- 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69,
- 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
- 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x8a, 0xd3,
- 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x0a, 0x17, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x62, 0x6a,
- 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12,
- 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x28, 0x01, 0x30, 0x01,
- 0x12, 0x8c, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
- 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65,
- 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x22, 0x39, 0xda, 0x41, 0x12, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c,
- 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x8a, 0xd3, 0xe4, 0x93, 0x02,
- 0x1e, 0x12, 0x1c, 0x0a, 0x0d, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x62, 0x75, 0x63, 0x6b,
- 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12,
- 0x60, 0x0a, 0x0b, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x25,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
- 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,
- 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28,
- 0x01, 0x12, 0x6e, 0x0a, 0x0f, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x12, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74,
- 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69,
- 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
- 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
- 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a,
- 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30,
- 0x01, 0x12, 0x84, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
- 0x73, 0x12, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
- 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
- 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73,
- 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x22, 0x26, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x8a, 0xd3, 0xe4, 0x93, 0x02,
- 0x17, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75,
- 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x77,
- 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52,
- 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f,
- 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12,
- 0x0f, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74,
- 0x12, 0x21, 0x0a, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
- 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d,
- 0x2a, 0x2a, 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73,
- 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x2d, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e,
- 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72,
- 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53,
- 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69,
- 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x8a, 0xd3, 0xe4, 0x93,
- 0x02, 0x32, 0x12, 0x30, 0x0a, 0x21, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65,
- 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x2e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74,
- 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x72,
- 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75,
- 0x65, 0x72, 0x79, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,
- 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57,
- 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x22, 0x41, 0xda, 0x41, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64,
- 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64,
- 0x5f, 0x69, 0x64, 0x12, 0x20, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72, 0x6f,
- 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f,
- 0x2a, 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0x96, 0x01, 0x0a, 0x0a, 0x4d, 0x6f, 0x76, 0x65, 0x4f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74,
- 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x4f, 0x62, 0x6a,
- 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f,
- 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x47, 0xda, 0x41, 0x27, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74,
- 0x2c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x64,
- 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65,
- 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x1a, 0xa7,
- 0x02, 0xca, 0x41, 0x16, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x8a, 0x02, 0x68, 0x74,
- 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c,
- 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, 0x74,
- 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61,
- 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f,
- 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x72, 0x65, 0x61, 0x64,
- 0x2d, 0x6f, 0x6e, 0x6c, 0x79, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77,
- 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d,
- 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x64, 0x65, 0x76, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
- 0x2e, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2c, 0x68, 0x74,
- 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x64, 0x65,
- 0x76, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e,
- 0x6c, 0x79, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75,
- 0x74, 0x68, 0x2f, 0x64, 0x65, 0x76, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x72, 0x65,
- 0x61, 0x64, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x42, 0xe2, 0x01, 0xea, 0x41, 0x78, 0x0a, 0x21,
- 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61,
- 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65,
- 0x79, 0x12, 0x53, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f,
- 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
- 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69,
- 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x7d, 0x2f, 0x63,
- 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x7b, 0x63, 0x72, 0x79, 0x70, 0x74,
- 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x7d, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x42, 0x0c, 0x53,
- 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x63,
- 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
- 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72,
- 0x6e, 0x61, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
- 0x65, 0x70, 0x62, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x2a, 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x72, 0x69, 0x74,
+ 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72,
+ 0x79, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f,
+ 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x72, 0x69,
+ 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x22, 0x41, 0xda, 0x41, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x8a, 0xd3,
+ 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69,
+ 0x64, 0x12, 0x20, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65,
+ 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d,
+ 0x2f, 0x2a, 0x2a, 0x12, 0x96, 0x01, 0x0a, 0x0a, 0x4d, 0x6f, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x12, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,
+ 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63,
+ 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x22, 0x47, 0xda, 0x41, 0x27, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x64, 0x65, 0x73,
+ 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x8a,
+ 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12,
+ 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x1a, 0xa7, 0x02, 0xca,
+ 0x41, 0x16, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x8a, 0x02, 0x68, 0x74, 0x74, 0x70,
+ 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70,
+ 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75,
+ 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73,
+ 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69,
+ 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64,
+ 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x2d, 0x6f,
+ 0x6e, 0x6c, 0x79, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61,
+ 0x75, 0x74, 0x68, 0x2f, 0x64, 0x65, 0x76, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x66,
+ 0x75, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2c, 0x68, 0x74, 0x74, 0x70,
+ 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70,
+ 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x64, 0x65, 0x76, 0x73,
+ 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79,
+ 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68,
+ 0x2f, 0x64, 0x65, 0x76, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x72, 0x65, 0x61, 0x64,
+ 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x42, 0xe2, 0x01, 0xea, 0x41, 0x78, 0x0a, 0x21, 0x63, 0x6c,
+ 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69,
+ 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x12,
+ 0x53, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65,
+ 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c,
+ 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67,
+ 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x7d, 0x2f, 0x63, 0x72, 0x79,
+ 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x7b, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f,
+ 0x6b, 0x65, 0x79, 0x7d, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x42, 0x0c, 0x53, 0x74, 0x6f,
+ 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x63, 0x6c, 0x6f,
+ 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f,
+ 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
+ 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70,
+ 0x62, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x33,
}
var (
@@ -10352,1459 +10393,3 @@ func file_google_storage_v2_storage_proto_init() {
file_google_storage_v2_storage_proto_goTypes = nil
file_google_storage_v2_storage_proto_depIdxs = nil
}
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ context.Context
-var _ grpc.ClientConnInterface
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion6
-
-// StorageClient is the client API for Storage service.
-//
-// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
-type StorageClient interface {
- // Permanently deletes an empty bucket.
- DeleteBucket(ctx context.Context, in *DeleteBucketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
- // Returns metadata for the specified bucket.
- GetBucket(ctx context.Context, in *GetBucketRequest, opts ...grpc.CallOption) (*Bucket, error)
- // Creates a new bucket.
- CreateBucket(ctx context.Context, in *CreateBucketRequest, opts ...grpc.CallOption) (*Bucket, error)
- // Retrieves a list of buckets for a given project.
- ListBuckets(ctx context.Context, in *ListBucketsRequest, opts ...grpc.CallOption) (*ListBucketsResponse, error)
- // Locks retention policy on a bucket.
- LockBucketRetentionPolicy(ctx context.Context, in *LockBucketRetentionPolicyRequest, opts ...grpc.CallOption) (*Bucket, error)
- // Gets the IAM policy for a specified bucket.
- // The `resource` field in the request should be
- // `projects/_/buckets/{bucket}` for a bucket, or
- // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
- // for a managed folder.
- GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error)
- // Updates an IAM policy for the specified bucket.
- // The `resource` field in the request should be
- // `projects/_/buckets/{bucket}` for a bucket, or
- // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
- // for a managed folder.
- SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error)
- // Tests a set of permissions on the given bucket, object, or managed folder
- // to see which, if any, are held by the caller.
- // The `resource` field in the request should be
- // `projects/_/buckets/{bucket}` for a bucket,
- // `projects/_/buckets/{bucket}/objects/{object}` for an object, or
- // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
- // for a managed folder.
- TestIamPermissions(ctx context.Context, in *iampb.TestIamPermissionsRequest, opts ...grpc.CallOption) (*iampb.TestIamPermissionsResponse, error)
- // Updates a bucket. Equivalent to JSON API's storage.buckets.patch method.
- UpdateBucket(ctx context.Context, in *UpdateBucketRequest, opts ...grpc.CallOption) (*Bucket, error)
- // Concatenates a list of existing objects into a new object in the same
- // bucket.
- ComposeObject(ctx context.Context, in *ComposeObjectRequest, opts ...grpc.CallOption) (*Object, error)
- // Deletes an object and its metadata. Deletions are permanent if versioning
- // is not enabled for the bucket, or if the generation parameter is used, or
- // if [soft delete](https://cloud.google.com/storage/docs/soft-delete) is not
- // enabled for the bucket.
- // When this API is used to delete an object from a bucket that has soft
- // delete policy enabled, the object becomes soft deleted, and the
- // `softDeleteTime` and `hardDeleteTime` properties are set on the object.
- // This API cannot be used to permanently delete soft-deleted objects.
- // Soft-deleted objects are permanently deleted according to their
- // `hardDeleteTime`.
- //
- // You can use the [`RestoreObject`][google.storage.v2.Storage.RestoreObject]
- // API to restore soft-deleted objects until the soft delete retention period
- // has passed.
- //
- // **IAM Permissions**:
- //
- // Requires `storage.objects.delete`
- // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on
- // the bucket.
- DeleteObject(ctx context.Context, in *DeleteObjectRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
- // Restores a soft-deleted object.
- RestoreObject(ctx context.Context, in *RestoreObjectRequest, opts ...grpc.CallOption) (*Object, error)
- // Cancels an in-progress resumable upload.
- //
- // Any attempts to write to the resumable upload after cancelling the upload
- // will fail.
- //
- // The behavior for currently in progress write operations is not guaranteed -
- // they could either complete before the cancellation or fail if the
- // cancellation completes first.
- CancelResumableWrite(ctx context.Context, in *CancelResumableWriteRequest, opts ...grpc.CallOption) (*CancelResumableWriteResponse, error)
- // Retrieves object metadata.
- //
- // **IAM Permissions**:
- //
- // Requires `storage.objects.get`
- // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on
- // the bucket. To return object ACLs, the authenticated user must also have
- // the `storage.objects.getIamPolicy` permission.
- GetObject(ctx context.Context, in *GetObjectRequest, opts ...grpc.CallOption) (*Object, error)
- // Retrieves object data.
- //
- // **IAM Permissions**:
- //
- // Requires `storage.objects.get`
- // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on
- // the bucket.
- ReadObject(ctx context.Context, in *ReadObjectRequest, opts ...grpc.CallOption) (Storage_ReadObjectClient, error)
- // Reads an object's data.
- //
- // This is a bi-directional API with the added support for reading multiple
- // ranges within one stream both within and across multiple messages.
- // If the server encountered an error for any of the inputs, the stream will
- // be closed with the relevant error code.
- // Because the API allows for multiple outstanding requests, when the stream
- // is closed the error response will contain a BidiReadObjectRangesError proto
- // in the error extension describing the error for each outstanding read_id.
- //
- // **IAM Permissions**:
- //
- // Requires `storage.objects.get`
- //
- // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on
- // the bucket.
- //
- // This API is currently in preview and is not yet available for general
- // use.
- BidiReadObject(ctx context.Context, opts ...grpc.CallOption) (Storage_BidiReadObjectClient, error)
- // Updates an object's metadata.
- // Equivalent to JSON API's storage.objects.patch.
- UpdateObject(ctx context.Context, in *UpdateObjectRequest, opts ...grpc.CallOption) (*Object, error)
- // Stores a new object and metadata.
- //
- // An object can be written either in a single message stream or in a
- // resumable sequence of message streams. To write using a single stream,
- // the client should include in the first message of the stream an
- // `WriteObjectSpec` describing the destination bucket, object, and any
- // preconditions. Additionally, the final message must set 'finish_write' to
- // true, or else it is an error.
- //
- // For a resumable write, the client should instead call
- // `StartResumableWrite()`, populating a `WriteObjectSpec` into that request.
- // They should then attach the returned `upload_id` to the first message of
- // each following call to `WriteObject`. If the stream is closed before
- // finishing the upload (either explicitly by the client or due to a network
- // error or an error response from the server), the client should do as
- // follows:
- // - Check the result Status of the stream, to determine if writing can be
- // resumed on this stream or must be restarted from scratch (by calling
- // `StartResumableWrite()`). The resumable errors are DEADLINE_EXCEEDED,
- // INTERNAL, and UNAVAILABLE. For each case, the client should use binary
- // exponential backoff before retrying. Additionally, writes can be
- // resumed after RESOURCE_EXHAUSTED errors, but only after taking
- // appropriate measures, which may include reducing aggregate send rate
- // across clients and/or requesting a quota increase for your project.
- // - If the call to `WriteObject` returns `ABORTED`, that indicates
- // concurrent attempts to update the resumable write, caused either by
- // multiple racing clients or by a single client where the previous
- // request was timed out on the client side but nonetheless reached the
- // server. In this case the client should take steps to prevent further
- // concurrent writes (e.g., increase the timeouts, stop using more than
- // one process to perform the upload, etc.), and then should follow the
- // steps below for resuming the upload.
- // - For resumable errors, the client should call `QueryWriteStatus()` and
- // then continue writing from the returned `persisted_size`. This may be
- // less than the amount of data the client previously sent. Note also that
- // it is acceptable to send data starting at an offset earlier than the
- // returned `persisted_size`; in this case, the service will skip data at
- // offsets that were already persisted (without checking that it matches
- // the previously written data), and write only the data starting from the
- // persisted offset. Even though the data isn't written, it may still
- // incur a performance cost over resuming at the correct write offset.
- // This behavior can make client-side handling simpler in some cases.
- // - Clients must only send data that is a multiple of 256 KiB per message,
- // unless the object is being finished with `finish_write` set to `true`.
- //
- // The service will not view the object as complete until the client has
- // sent a `WriteObjectRequest` with `finish_write` set to `true`. Sending any
- // requests on a stream after sending a request with `finish_write` set to
- // `true` will cause an error. The client **should** check the response it
- // receives to determine how much data the service was able to commit and
- // whether the service views the object as complete.
- //
- // Attempting to resume an already finalized object will result in an OK
- // status, with a `WriteObjectResponse` containing the finalized object's
- // metadata.
- //
- // Alternatively, the BidiWriteObject operation may be used to write an
- // object with controls over flushing and the ability to fetch the ability to
- // determine the current persisted size.
- //
- // **IAM Permissions**:
- //
- // Requires `storage.objects.create`
- // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on
- // the bucket.
- WriteObject(ctx context.Context, opts ...grpc.CallOption) (Storage_WriteObjectClient, error)
- // Stores a new object and metadata.
- //
- // This is similar to the WriteObject call with the added support for
- // manual flushing of persisted state, and the ability to determine current
- // persisted size without closing the stream.
- //
- // The client may specify one or both of the `state_lookup` and `flush` fields
- // in each BidiWriteObjectRequest. If `flush` is specified, the data written
- // so far will be persisted to storage. If `state_lookup` is specified, the
- // service will respond with a BidiWriteObjectResponse that contains the
- // persisted size. If both `flush` and `state_lookup` are specified, the flush
- // will always occur before a `state_lookup`, so that both may be set in the
- // same request and the returned state will be the state of the object
- // post-flush. When the stream is closed, a BidiWriteObjectResponse will
- // always be sent to the client, regardless of the value of `state_lookup`.
- BidiWriteObject(ctx context.Context, opts ...grpc.CallOption) (Storage_BidiWriteObjectClient, error)
- // Retrieves a list of objects matching the criteria.
- //
- // **IAM Permissions**:
- //
- // The authenticated user requires `storage.objects.list`
- // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions)
- // to use this method. To return object ACLs, the authenticated user must also
- // have the `storage.objects.getIamPolicy` permission.
- ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (*ListObjectsResponse, error)
- // Rewrites a source object to a destination object. Optionally overrides
- // metadata.
- RewriteObject(ctx context.Context, in *RewriteObjectRequest, opts ...grpc.CallOption) (*RewriteResponse, error)
- // Starts a resumable write operation. This
- // method is part of the [Resumable
- // upload](https://cloud.google.com/storage/docs/resumable-uploads) feature.
- // This allows you to upload large objects in multiple chunks, which is more
- // resilient to network interruptions than a single upload. The validity
- // duration of the write operation, and the consequences of it becoming
- // invalid, are service-dependent.
- //
- // **IAM Permissions**:
- //
- // Requires `storage.objects.create`
- // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on
- // the bucket.
- StartResumableWrite(ctx context.Context, in *StartResumableWriteRequest, opts ...grpc.CallOption) (*StartResumableWriteResponse, error)
- // Determines the `persisted_size` of an object that is being written. This
- // method is part of the [resumable
- // upload](https://cloud.google.com/storage/docs/resumable-uploads) feature.
- // The returned value is the size of the object that has been persisted so
- // far. The value can be used as the `write_offset` for the next `Write()`
- // call.
- //
- // If the object does not exist, meaning if it was deleted, or the
- // first `Write()` has not yet reached the service, this method returns the
- // error `NOT_FOUND`.
- //
- // This method is useful for clients that buffer data and need to know which
- // data can be safely evicted. The client can call `QueryWriteStatus()` at any
- // time to determine how much data has been logged for this object.
- // For any sequence of `QueryWriteStatus()` calls for a given
- // object name, the sequence of returned `persisted_size` values are
- // non-decreasing.
- QueryWriteStatus(ctx context.Context, in *QueryWriteStatusRequest, opts ...grpc.CallOption) (*QueryWriteStatusResponse, error)
- // Moves the source object to the destination object in the same bucket.
- MoveObject(ctx context.Context, in *MoveObjectRequest, opts ...grpc.CallOption) (*Object, error)
-}
-
-type storageClient struct {
- cc grpc.ClientConnInterface
-}
-
-func NewStorageClient(cc grpc.ClientConnInterface) StorageClient {
- return &storageClient{cc}
-}
-
-func (c *storageClient) DeleteBucket(ctx context.Context, in *DeleteBucketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
- out := new(emptypb.Empty)
- err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/DeleteBucket", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *storageClient) GetBucket(ctx context.Context, in *GetBucketRequest, opts ...grpc.CallOption) (*Bucket, error) {
- out := new(Bucket)
- err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/GetBucket", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *storageClient) CreateBucket(ctx context.Context, in *CreateBucketRequest, opts ...grpc.CallOption) (*Bucket, error) {
- out := new(Bucket)
- err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/CreateBucket", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *storageClient) ListBuckets(ctx context.Context, in *ListBucketsRequest, opts ...grpc.CallOption) (*ListBucketsResponse, error) {
- out := new(ListBucketsResponse)
- err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/ListBuckets", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *storageClient) LockBucketRetentionPolicy(ctx context.Context, in *LockBucketRetentionPolicyRequest, opts ...grpc.CallOption) (*Bucket, error) {
- out := new(Bucket)
- err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/LockBucketRetentionPolicy", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *storageClient) GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) {
- out := new(iampb.Policy)
- err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/GetIamPolicy", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *storageClient) SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) {
- out := new(iampb.Policy)
- err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/SetIamPolicy", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *storageClient) TestIamPermissions(ctx context.Context, in *iampb.TestIamPermissionsRequest, opts ...grpc.CallOption) (*iampb.TestIamPermissionsResponse, error) {
- out := new(iampb.TestIamPermissionsResponse)
- err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/TestIamPermissions", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *storageClient) UpdateBucket(ctx context.Context, in *UpdateBucketRequest, opts ...grpc.CallOption) (*Bucket, error) {
- out := new(Bucket)
- err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/UpdateBucket", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *storageClient) ComposeObject(ctx context.Context, in *ComposeObjectRequest, opts ...grpc.CallOption) (*Object, error) {
- out := new(Object)
- err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/ComposeObject", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *storageClient) DeleteObject(ctx context.Context, in *DeleteObjectRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
- out := new(emptypb.Empty)
- err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/DeleteObject", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *storageClient) RestoreObject(ctx context.Context, in *RestoreObjectRequest, opts ...grpc.CallOption) (*Object, error) {
- out := new(Object)
- err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/RestoreObject", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *storageClient) CancelResumableWrite(ctx context.Context, in *CancelResumableWriteRequest, opts ...grpc.CallOption) (*CancelResumableWriteResponse, error) {
- out := new(CancelResumableWriteResponse)
- err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/CancelResumableWrite", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *storageClient) GetObject(ctx context.Context, in *GetObjectRequest, opts ...grpc.CallOption) (*Object, error) {
- out := new(Object)
- err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/GetObject", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *storageClient) ReadObject(ctx context.Context, in *ReadObjectRequest, opts ...grpc.CallOption) (Storage_ReadObjectClient, error) {
- stream, err := c.cc.NewStream(ctx, &_Storage_serviceDesc.Streams[0], "/google.storage.v2.Storage/ReadObject", opts...)
- if err != nil {
- return nil, err
- }
- x := &storageReadObjectClient{stream}
- if err := x.ClientStream.SendMsg(in); err != nil {
- return nil, err
- }
- if err := x.ClientStream.CloseSend(); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type Storage_ReadObjectClient interface {
- Recv() (*ReadObjectResponse, error)
- grpc.ClientStream
-}
-
-type storageReadObjectClient struct {
- grpc.ClientStream
-}
-
-func (x *storageReadObjectClient) Recv() (*ReadObjectResponse, error) {
- m := new(ReadObjectResponse)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-func (c *storageClient) BidiReadObject(ctx context.Context, opts ...grpc.CallOption) (Storage_BidiReadObjectClient, error) {
- stream, err := c.cc.NewStream(ctx, &_Storage_serviceDesc.Streams[1], "/google.storage.v2.Storage/BidiReadObject", opts...)
- if err != nil {
- return nil, err
- }
- x := &storageBidiReadObjectClient{stream}
- return x, nil
-}
-
-type Storage_BidiReadObjectClient interface {
- Send(*BidiReadObjectRequest) error
- Recv() (*BidiReadObjectResponse, error)
- grpc.ClientStream
-}
-
-type storageBidiReadObjectClient struct {
- grpc.ClientStream
-}
-
-func (x *storageBidiReadObjectClient) Send(m *BidiReadObjectRequest) error {
- return x.ClientStream.SendMsg(m)
-}
-
-func (x *storageBidiReadObjectClient) Recv() (*BidiReadObjectResponse, error) {
- m := new(BidiReadObjectResponse)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-func (c *storageClient) UpdateObject(ctx context.Context, in *UpdateObjectRequest, opts ...grpc.CallOption) (*Object, error) {
- out := new(Object)
- err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/UpdateObject", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *storageClient) WriteObject(ctx context.Context, opts ...grpc.CallOption) (Storage_WriteObjectClient, error) {
- stream, err := c.cc.NewStream(ctx, &_Storage_serviceDesc.Streams[2], "/google.storage.v2.Storage/WriteObject", opts...)
- if err != nil {
- return nil, err
- }
- x := &storageWriteObjectClient{stream}
- return x, nil
-}
-
-type Storage_WriteObjectClient interface {
- Send(*WriteObjectRequest) error
- CloseAndRecv() (*WriteObjectResponse, error)
- grpc.ClientStream
-}
-
-type storageWriteObjectClient struct {
- grpc.ClientStream
-}
-
-func (x *storageWriteObjectClient) Send(m *WriteObjectRequest) error {
- return x.ClientStream.SendMsg(m)
-}
-
-func (x *storageWriteObjectClient) CloseAndRecv() (*WriteObjectResponse, error) {
- if err := x.ClientStream.CloseSend(); err != nil {
- return nil, err
- }
- m := new(WriteObjectResponse)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-func (c *storageClient) BidiWriteObject(ctx context.Context, opts ...grpc.CallOption) (Storage_BidiWriteObjectClient, error) {
- stream, err := c.cc.NewStream(ctx, &_Storage_serviceDesc.Streams[3], "/google.storage.v2.Storage/BidiWriteObject", opts...)
- if err != nil {
- return nil, err
- }
- x := &storageBidiWriteObjectClient{stream}
- return x, nil
-}
-
-type Storage_BidiWriteObjectClient interface {
- Send(*BidiWriteObjectRequest) error
- Recv() (*BidiWriteObjectResponse, error)
- grpc.ClientStream
-}
-
-type storageBidiWriteObjectClient struct {
- grpc.ClientStream
-}
-
-func (x *storageBidiWriteObjectClient) Send(m *BidiWriteObjectRequest) error {
- return x.ClientStream.SendMsg(m)
-}
-
-func (x *storageBidiWriteObjectClient) Recv() (*BidiWriteObjectResponse, error) {
- m := new(BidiWriteObjectResponse)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-func (c *storageClient) ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (*ListObjectsResponse, error) {
- out := new(ListObjectsResponse)
- err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/ListObjects", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *storageClient) RewriteObject(ctx context.Context, in *RewriteObjectRequest, opts ...grpc.CallOption) (*RewriteResponse, error) {
- out := new(RewriteResponse)
- err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/RewriteObject", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *storageClient) StartResumableWrite(ctx context.Context, in *StartResumableWriteRequest, opts ...grpc.CallOption) (*StartResumableWriteResponse, error) {
- out := new(StartResumableWriteResponse)
- err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/StartResumableWrite", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *storageClient) QueryWriteStatus(ctx context.Context, in *QueryWriteStatusRequest, opts ...grpc.CallOption) (*QueryWriteStatusResponse, error) {
- out := new(QueryWriteStatusResponse)
- err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/QueryWriteStatus", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *storageClient) MoveObject(ctx context.Context, in *MoveObjectRequest, opts ...grpc.CallOption) (*Object, error) {
- out := new(Object)
- err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/MoveObject", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-// StorageServer is the server API for Storage service.
-type StorageServer interface {
- // Permanently deletes an empty bucket.
- DeleteBucket(context.Context, *DeleteBucketRequest) (*emptypb.Empty, error)
- // Returns metadata for the specified bucket.
- GetBucket(context.Context, *GetBucketRequest) (*Bucket, error)
- // Creates a new bucket.
- CreateBucket(context.Context, *CreateBucketRequest) (*Bucket, error)
- // Retrieves a list of buckets for a given project.
- ListBuckets(context.Context, *ListBucketsRequest) (*ListBucketsResponse, error)
- // Locks retention policy on a bucket.
- LockBucketRetentionPolicy(context.Context, *LockBucketRetentionPolicyRequest) (*Bucket, error)
- // Gets the IAM policy for a specified bucket.
- // The `resource` field in the request should be
- // `projects/_/buckets/{bucket}` for a bucket, or
- // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
- // for a managed folder.
- GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error)
- // Updates an IAM policy for the specified bucket.
- // The `resource` field in the request should be
- // `projects/_/buckets/{bucket}` for a bucket, or
- // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
- // for a managed folder.
- SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error)
- // Tests a set of permissions on the given bucket, object, or managed folder
- // to see which, if any, are held by the caller.
- // The `resource` field in the request should be
- // `projects/_/buckets/{bucket}` for a bucket,
- // `projects/_/buckets/{bucket}/objects/{object}` for an object, or
- // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
- // for a managed folder.
- TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error)
- // Updates a bucket. Equivalent to JSON API's storage.buckets.patch method.
- UpdateBucket(context.Context, *UpdateBucketRequest) (*Bucket, error)
- // Concatenates a list of existing objects into a new object in the same
- // bucket.
- ComposeObject(context.Context, *ComposeObjectRequest) (*Object, error)
- // Deletes an object and its metadata. Deletions are permanent if versioning
- // is not enabled for the bucket, or if the generation parameter is used, or
- // if [soft delete](https://cloud.google.com/storage/docs/soft-delete) is not
- // enabled for the bucket.
- // When this API is used to delete an object from a bucket that has soft
- // delete policy enabled, the object becomes soft deleted, and the
- // `softDeleteTime` and `hardDeleteTime` properties are set on the object.
- // This API cannot be used to permanently delete soft-deleted objects.
- // Soft-deleted objects are permanently deleted according to their
- // `hardDeleteTime`.
- //
- // You can use the [`RestoreObject`][google.storage.v2.Storage.RestoreObject]
- // API to restore soft-deleted objects until the soft delete retention period
- // has passed.
- //
- // **IAM Permissions**:
- //
- // Requires `storage.objects.delete`
- // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on
- // the bucket.
- DeleteObject(context.Context, *DeleteObjectRequest) (*emptypb.Empty, error)
- // Restores a soft-deleted object.
- RestoreObject(context.Context, *RestoreObjectRequest) (*Object, error)
- // Cancels an in-progress resumable upload.
- //
- // Any attempts to write to the resumable upload after cancelling the upload
- // will fail.
- //
- // The behavior for currently in progress write operations is not guaranteed -
- // they could either complete before the cancellation or fail if the
- // cancellation completes first.
- CancelResumableWrite(context.Context, *CancelResumableWriteRequest) (*CancelResumableWriteResponse, error)
- // Retrieves object metadata.
- //
- // **IAM Permissions**:
- //
- // Requires `storage.objects.get`
- // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on
- // the bucket. To return object ACLs, the authenticated user must also have
- // the `storage.objects.getIamPolicy` permission.
- GetObject(context.Context, *GetObjectRequest) (*Object, error)
- // Retrieves object data.
- //
- // **IAM Permissions**:
- //
- // Requires `storage.objects.get`
- // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on
- // the bucket.
- ReadObject(*ReadObjectRequest, Storage_ReadObjectServer) error
- // Reads an object's data.
- //
- // This is a bi-directional API with the added support for reading multiple
- // ranges within one stream both within and across multiple messages.
- // If the server encountered an error for any of the inputs, the stream will
- // be closed with the relevant error code.
- // Because the API allows for multiple outstanding requests, when the stream
- // is closed the error response will contain a BidiReadObjectRangesError proto
- // in the error extension describing the error for each outstanding read_id.
- //
- // **IAM Permissions**:
- //
- // Requires `storage.objects.get`
- //
- // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on
- // the bucket.
- //
- // This API is currently in preview and is not yet available for general
- // use.
- BidiReadObject(Storage_BidiReadObjectServer) error
- // Updates an object's metadata.
- // Equivalent to JSON API's storage.objects.patch.
- UpdateObject(context.Context, *UpdateObjectRequest) (*Object, error)
- // Stores a new object and metadata.
- //
- // An object can be written either in a single message stream or in a
- // resumable sequence of message streams. To write using a single stream,
- // the client should include in the first message of the stream an
- // `WriteObjectSpec` describing the destination bucket, object, and any
- // preconditions. Additionally, the final message must set 'finish_write' to
- // true, or else it is an error.
- //
- // For a resumable write, the client should instead call
- // `StartResumableWrite()`, populating a `WriteObjectSpec` into that request.
- // They should then attach the returned `upload_id` to the first message of
- // each following call to `WriteObject`. If the stream is closed before
- // finishing the upload (either explicitly by the client or due to a network
- // error or an error response from the server), the client should do as
- // follows:
- // - Check the result Status of the stream, to determine if writing can be
- // resumed on this stream or must be restarted from scratch (by calling
- // `StartResumableWrite()`). The resumable errors are DEADLINE_EXCEEDED,
- // INTERNAL, and UNAVAILABLE. For each case, the client should use binary
- // exponential backoff before retrying. Additionally, writes can be
- // resumed after RESOURCE_EXHAUSTED errors, but only after taking
- // appropriate measures, which may include reducing aggregate send rate
- // across clients and/or requesting a quota increase for your project.
- // - If the call to `WriteObject` returns `ABORTED`, that indicates
- // concurrent attempts to update the resumable write, caused either by
- // multiple racing clients or by a single client where the previous
- // request was timed out on the client side but nonetheless reached the
- // server. In this case the client should take steps to prevent further
- // concurrent writes (e.g., increase the timeouts, stop using more than
- // one process to perform the upload, etc.), and then should follow the
- // steps below for resuming the upload.
- // - For resumable errors, the client should call `QueryWriteStatus()` and
- // then continue writing from the returned `persisted_size`. This may be
- // less than the amount of data the client previously sent. Note also that
- // it is acceptable to send data starting at an offset earlier than the
- // returned `persisted_size`; in this case, the service will skip data at
- // offsets that were already persisted (without checking that it matches
- // the previously written data), and write only the data starting from the
- // persisted offset. Even though the data isn't written, it may still
- // incur a performance cost over resuming at the correct write offset.
- // This behavior can make client-side handling simpler in some cases.
- // - Clients must only send data that is a multiple of 256 KiB per message,
- // unless the object is being finished with `finish_write` set to `true`.
- //
- // The service will not view the object as complete until the client has
- // sent a `WriteObjectRequest` with `finish_write` set to `true`. Sending any
- // requests on a stream after sending a request with `finish_write` set to
- // `true` will cause an error. The client **should** check the response it
- // receives to determine how much data the service was able to commit and
- // whether the service views the object as complete.
- //
- // Attempting to resume an already finalized object will result in an OK
- // status, with a `WriteObjectResponse` containing the finalized object's
- // metadata.
- //
- // Alternatively, the BidiWriteObject operation may be used to write an
- // object with controls over flushing and the ability to fetch the ability to
- // determine the current persisted size.
- //
- // **IAM Permissions**:
- //
- // Requires `storage.objects.create`
- // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on
- // the bucket.
- WriteObject(Storage_WriteObjectServer) error
- // Stores a new object and metadata.
- //
- // This is similar to the WriteObject call with the added support for
- // manual flushing of persisted state, and the ability to determine current
- // persisted size without closing the stream.
- //
- // The client may specify one or both of the `state_lookup` and `flush` fields
- // in each BidiWriteObjectRequest. If `flush` is specified, the data written
- // so far will be persisted to storage. If `state_lookup` is specified, the
- // service will respond with a BidiWriteObjectResponse that contains the
- // persisted size. If both `flush` and `state_lookup` are specified, the flush
- // will always occur before a `state_lookup`, so that both may be set in the
- // same request and the returned state will be the state of the object
- // post-flush. When the stream is closed, a BidiWriteObjectResponse will
- // always be sent to the client, regardless of the value of `state_lookup`.
- BidiWriteObject(Storage_BidiWriteObjectServer) error
- // Retrieves a list of objects matching the criteria.
- //
- // **IAM Permissions**:
- //
- // The authenticated user requires `storage.objects.list`
- // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions)
- // to use this method. To return object ACLs, the authenticated user must also
- // have the `storage.objects.getIamPolicy` permission.
- ListObjects(context.Context, *ListObjectsRequest) (*ListObjectsResponse, error)
- // Rewrites a source object to a destination object. Optionally overrides
- // metadata.
- RewriteObject(context.Context, *RewriteObjectRequest) (*RewriteResponse, error)
- // Starts a resumable write operation. This
- // method is part of the [Resumable
- // upload](https://cloud.google.com/storage/docs/resumable-uploads) feature.
- // This allows you to upload large objects in multiple chunks, which is more
- // resilient to network interruptions than a single upload. The validity
- // duration of the write operation, and the consequences of it becoming
- // invalid, are service-dependent.
- //
- // **IAM Permissions**:
- //
- // Requires `storage.objects.create`
- // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on
- // the bucket.
- StartResumableWrite(context.Context, *StartResumableWriteRequest) (*StartResumableWriteResponse, error)
- // Determines the `persisted_size` of an object that is being written. This
- // method is part of the [resumable
- // upload](https://cloud.google.com/storage/docs/resumable-uploads) feature.
- // The returned value is the size of the object that has been persisted so
- // far. The value can be used as the `write_offset` for the next `Write()`
- // call.
- //
- // If the object does not exist, meaning if it was deleted, or the
- // first `Write()` has not yet reached the service, this method returns the
- // error `NOT_FOUND`.
- //
- // This method is useful for clients that buffer data and need to know which
- // data can be safely evicted. The client can call `QueryWriteStatus()` at any
- // time to determine how much data has been logged for this object.
- // For any sequence of `QueryWriteStatus()` calls for a given
- // object name, the sequence of returned `persisted_size` values are
- // non-decreasing.
- QueryWriteStatus(context.Context, *QueryWriteStatusRequest) (*QueryWriteStatusResponse, error)
- // Moves the source object to the destination object in the same bucket.
- MoveObject(context.Context, *MoveObjectRequest) (*Object, error)
-}
-
-// UnimplementedStorageServer can be embedded to have forward compatible implementations.
-type UnimplementedStorageServer struct {
-}
-
-func (*UnimplementedStorageServer) DeleteBucket(context.Context, *DeleteBucketRequest) (*emptypb.Empty, error) {
- return nil, status1.Errorf(codes.Unimplemented, "method DeleteBucket not implemented")
-}
-func (*UnimplementedStorageServer) GetBucket(context.Context, *GetBucketRequest) (*Bucket, error) {
- return nil, status1.Errorf(codes.Unimplemented, "method GetBucket not implemented")
-}
-func (*UnimplementedStorageServer) CreateBucket(context.Context, *CreateBucketRequest) (*Bucket, error) {
- return nil, status1.Errorf(codes.Unimplemented, "method CreateBucket not implemented")
-}
-func (*UnimplementedStorageServer) ListBuckets(context.Context, *ListBucketsRequest) (*ListBucketsResponse, error) {
- return nil, status1.Errorf(codes.Unimplemented, "method ListBuckets not implemented")
-}
-func (*UnimplementedStorageServer) LockBucketRetentionPolicy(context.Context, *LockBucketRetentionPolicyRequest) (*Bucket, error) {
- return nil, status1.Errorf(codes.Unimplemented, "method LockBucketRetentionPolicy not implemented")
-}
-func (*UnimplementedStorageServer) GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error) {
- return nil, status1.Errorf(codes.Unimplemented, "method GetIamPolicy not implemented")
-}
-func (*UnimplementedStorageServer) SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error) {
- return nil, status1.Errorf(codes.Unimplemented, "method SetIamPolicy not implemented")
-}
-func (*UnimplementedStorageServer) TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) {
- return nil, status1.Errorf(codes.Unimplemented, "method TestIamPermissions not implemented")
-}
-func (*UnimplementedStorageServer) UpdateBucket(context.Context, *UpdateBucketRequest) (*Bucket, error) {
- return nil, status1.Errorf(codes.Unimplemented, "method UpdateBucket not implemented")
-}
-func (*UnimplementedStorageServer) ComposeObject(context.Context, *ComposeObjectRequest) (*Object, error) {
- return nil, status1.Errorf(codes.Unimplemented, "method ComposeObject not implemented")
-}
-func (*UnimplementedStorageServer) DeleteObject(context.Context, *DeleteObjectRequest) (*emptypb.Empty, error) {
- return nil, status1.Errorf(codes.Unimplemented, "method DeleteObject not implemented")
-}
-func (*UnimplementedStorageServer) RestoreObject(context.Context, *RestoreObjectRequest) (*Object, error) {
- return nil, status1.Errorf(codes.Unimplemented, "method RestoreObject not implemented")
-}
-func (*UnimplementedStorageServer) CancelResumableWrite(context.Context, *CancelResumableWriteRequest) (*CancelResumableWriteResponse, error) {
- return nil, status1.Errorf(codes.Unimplemented, "method CancelResumableWrite not implemented")
-}
-func (*UnimplementedStorageServer) GetObject(context.Context, *GetObjectRequest) (*Object, error) {
- return nil, status1.Errorf(codes.Unimplemented, "method GetObject not implemented")
-}
-func (*UnimplementedStorageServer) ReadObject(*ReadObjectRequest, Storage_ReadObjectServer) error {
- return status1.Errorf(codes.Unimplemented, "method ReadObject not implemented")
-}
-func (*UnimplementedStorageServer) BidiReadObject(Storage_BidiReadObjectServer) error {
- return status1.Errorf(codes.Unimplemented, "method BidiReadObject not implemented")
-}
-func (*UnimplementedStorageServer) UpdateObject(context.Context, *UpdateObjectRequest) (*Object, error) {
- return nil, status1.Errorf(codes.Unimplemented, "method UpdateObject not implemented")
-}
-func (*UnimplementedStorageServer) WriteObject(Storage_WriteObjectServer) error {
- return status1.Errorf(codes.Unimplemented, "method WriteObject not implemented")
-}
-func (*UnimplementedStorageServer) BidiWriteObject(Storage_BidiWriteObjectServer) error {
- return status1.Errorf(codes.Unimplemented, "method BidiWriteObject not implemented")
-}
-func (*UnimplementedStorageServer) ListObjects(context.Context, *ListObjectsRequest) (*ListObjectsResponse, error) {
- return nil, status1.Errorf(codes.Unimplemented, "method ListObjects not implemented")
-}
-func (*UnimplementedStorageServer) RewriteObject(context.Context, *RewriteObjectRequest) (*RewriteResponse, error) {
- return nil, status1.Errorf(codes.Unimplemented, "method RewriteObject not implemented")
-}
-func (*UnimplementedStorageServer) StartResumableWrite(context.Context, *StartResumableWriteRequest) (*StartResumableWriteResponse, error) {
- return nil, status1.Errorf(codes.Unimplemented, "method StartResumableWrite not implemented")
-}
-func (*UnimplementedStorageServer) QueryWriteStatus(context.Context, *QueryWriteStatusRequest) (*QueryWriteStatusResponse, error) {
- return nil, status1.Errorf(codes.Unimplemented, "method QueryWriteStatus not implemented")
-}
-func (*UnimplementedStorageServer) MoveObject(context.Context, *MoveObjectRequest) (*Object, error) {
- return nil, status1.Errorf(codes.Unimplemented, "method MoveObject not implemented")
-}
-
-func RegisterStorageServer(s *grpc.Server, srv StorageServer) {
- s.RegisterService(&_Storage_serviceDesc, srv)
-}
-
-func _Storage_DeleteBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DeleteBucketRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StorageServer).DeleteBucket(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.storage.v2.Storage/DeleteBucket",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StorageServer).DeleteBucket(ctx, req.(*DeleteBucketRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Storage_GetBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetBucketRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StorageServer).GetBucket(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.storage.v2.Storage/GetBucket",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StorageServer).GetBucket(ctx, req.(*GetBucketRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Storage_CreateBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(CreateBucketRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StorageServer).CreateBucket(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.storage.v2.Storage/CreateBucket",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StorageServer).CreateBucket(ctx, req.(*CreateBucketRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Storage_ListBuckets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ListBucketsRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StorageServer).ListBuckets(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.storage.v2.Storage/ListBuckets",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StorageServer).ListBuckets(ctx, req.(*ListBucketsRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Storage_LockBucketRetentionPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(LockBucketRetentionPolicyRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StorageServer).LockBucketRetentionPolicy(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.storage.v2.Storage/LockBucketRetentionPolicy",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StorageServer).LockBucketRetentionPolicy(ctx, req.(*LockBucketRetentionPolicyRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Storage_GetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(iampb.GetIamPolicyRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StorageServer).GetIamPolicy(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.storage.v2.Storage/GetIamPolicy",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StorageServer).GetIamPolicy(ctx, req.(*iampb.GetIamPolicyRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Storage_SetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(iampb.SetIamPolicyRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StorageServer).SetIamPolicy(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.storage.v2.Storage/SetIamPolicy",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StorageServer).SetIamPolicy(ctx, req.(*iampb.SetIamPolicyRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Storage_TestIamPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(iampb.TestIamPermissionsRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StorageServer).TestIamPermissions(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.storage.v2.Storage/TestIamPermissions",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StorageServer).TestIamPermissions(ctx, req.(*iampb.TestIamPermissionsRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Storage_UpdateBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(UpdateBucketRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StorageServer).UpdateBucket(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.storage.v2.Storage/UpdateBucket",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StorageServer).UpdateBucket(ctx, req.(*UpdateBucketRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Storage_ComposeObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ComposeObjectRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StorageServer).ComposeObject(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.storage.v2.Storage/ComposeObject",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StorageServer).ComposeObject(ctx, req.(*ComposeObjectRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Storage_DeleteObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DeleteObjectRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StorageServer).DeleteObject(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.storage.v2.Storage/DeleteObject",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StorageServer).DeleteObject(ctx, req.(*DeleteObjectRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Storage_RestoreObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(RestoreObjectRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StorageServer).RestoreObject(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.storage.v2.Storage/RestoreObject",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StorageServer).RestoreObject(ctx, req.(*RestoreObjectRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Storage_CancelResumableWrite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(CancelResumableWriteRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StorageServer).CancelResumableWrite(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.storage.v2.Storage/CancelResumableWrite",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StorageServer).CancelResumableWrite(ctx, req.(*CancelResumableWriteRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Storage_GetObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetObjectRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StorageServer).GetObject(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.storage.v2.Storage/GetObject",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StorageServer).GetObject(ctx, req.(*GetObjectRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Storage_ReadObject_Handler(srv interface{}, stream grpc.ServerStream) error {
- m := new(ReadObjectRequest)
- if err := stream.RecvMsg(m); err != nil {
- return err
- }
- return srv.(StorageServer).ReadObject(m, &storageReadObjectServer{stream})
-}
-
-type Storage_ReadObjectServer interface {
- Send(*ReadObjectResponse) error
- grpc.ServerStream
-}
-
-type storageReadObjectServer struct {
- grpc.ServerStream
-}
-
-func (x *storageReadObjectServer) Send(m *ReadObjectResponse) error {
- return x.ServerStream.SendMsg(m)
-}
-
-func _Storage_BidiReadObject_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(StorageServer).BidiReadObject(&storageBidiReadObjectServer{stream})
-}
-
-type Storage_BidiReadObjectServer interface {
- Send(*BidiReadObjectResponse) error
- Recv() (*BidiReadObjectRequest, error)
- grpc.ServerStream
-}
-
-type storageBidiReadObjectServer struct {
- grpc.ServerStream
-}
-
-func (x *storageBidiReadObjectServer) Send(m *BidiReadObjectResponse) error {
- return x.ServerStream.SendMsg(m)
-}
-
-func (x *storageBidiReadObjectServer) Recv() (*BidiReadObjectRequest, error) {
- m := new(BidiReadObjectRequest)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-func _Storage_UpdateObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(UpdateObjectRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StorageServer).UpdateObject(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.storage.v2.Storage/UpdateObject",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StorageServer).UpdateObject(ctx, req.(*UpdateObjectRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Storage_WriteObject_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(StorageServer).WriteObject(&storageWriteObjectServer{stream})
-}
-
-type Storage_WriteObjectServer interface {
- SendAndClose(*WriteObjectResponse) error
- Recv() (*WriteObjectRequest, error)
- grpc.ServerStream
-}
-
-type storageWriteObjectServer struct {
- grpc.ServerStream
-}
-
-func (x *storageWriteObjectServer) SendAndClose(m *WriteObjectResponse) error {
- return x.ServerStream.SendMsg(m)
-}
-
-func (x *storageWriteObjectServer) Recv() (*WriteObjectRequest, error) {
- m := new(WriteObjectRequest)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-func _Storage_BidiWriteObject_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(StorageServer).BidiWriteObject(&storageBidiWriteObjectServer{stream})
-}
-
-type Storage_BidiWriteObjectServer interface {
- Send(*BidiWriteObjectResponse) error
- Recv() (*BidiWriteObjectRequest, error)
- grpc.ServerStream
-}
-
-type storageBidiWriteObjectServer struct {
- grpc.ServerStream
-}
-
-func (x *storageBidiWriteObjectServer) Send(m *BidiWriteObjectResponse) error {
- return x.ServerStream.SendMsg(m)
-}
-
-func (x *storageBidiWriteObjectServer) Recv() (*BidiWriteObjectRequest, error) {
- m := new(BidiWriteObjectRequest)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-func _Storage_ListObjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ListObjectsRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StorageServer).ListObjects(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.storage.v2.Storage/ListObjects",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StorageServer).ListObjects(ctx, req.(*ListObjectsRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Storage_RewriteObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(RewriteObjectRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StorageServer).RewriteObject(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.storage.v2.Storage/RewriteObject",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StorageServer).RewriteObject(ctx, req.(*RewriteObjectRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Storage_StartResumableWrite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(StartResumableWriteRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StorageServer).StartResumableWrite(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.storage.v2.Storage/StartResumableWrite",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StorageServer).StartResumableWrite(ctx, req.(*StartResumableWriteRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Storage_QueryWriteStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(QueryWriteStatusRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StorageServer).QueryWriteStatus(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.storage.v2.Storage/QueryWriteStatus",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StorageServer).QueryWriteStatus(ctx, req.(*QueryWriteStatusRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Storage_MoveObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(MoveObjectRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StorageServer).MoveObject(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/google.storage.v2.Storage/MoveObject",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StorageServer).MoveObject(ctx, req.(*MoveObjectRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-var _Storage_serviceDesc = grpc.ServiceDesc{
- ServiceName: "google.storage.v2.Storage",
- HandlerType: (*StorageServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "DeleteBucket",
- Handler: _Storage_DeleteBucket_Handler,
- },
- {
- MethodName: "GetBucket",
- Handler: _Storage_GetBucket_Handler,
- },
- {
- MethodName: "CreateBucket",
- Handler: _Storage_CreateBucket_Handler,
- },
- {
- MethodName: "ListBuckets",
- Handler: _Storage_ListBuckets_Handler,
- },
- {
- MethodName: "LockBucketRetentionPolicy",
- Handler: _Storage_LockBucketRetentionPolicy_Handler,
- },
- {
- MethodName: "GetIamPolicy",
- Handler: _Storage_GetIamPolicy_Handler,
- },
- {
- MethodName: "SetIamPolicy",
- Handler: _Storage_SetIamPolicy_Handler,
- },
- {
- MethodName: "TestIamPermissions",
- Handler: _Storage_TestIamPermissions_Handler,
- },
- {
- MethodName: "UpdateBucket",
- Handler: _Storage_UpdateBucket_Handler,
- },
- {
- MethodName: "ComposeObject",
- Handler: _Storage_ComposeObject_Handler,
- },
- {
- MethodName: "DeleteObject",
- Handler: _Storage_DeleteObject_Handler,
- },
- {
- MethodName: "RestoreObject",
- Handler: _Storage_RestoreObject_Handler,
- },
- {
- MethodName: "CancelResumableWrite",
- Handler: _Storage_CancelResumableWrite_Handler,
- },
- {
- MethodName: "GetObject",
- Handler: _Storage_GetObject_Handler,
- },
- {
- MethodName: "UpdateObject",
- Handler: _Storage_UpdateObject_Handler,
- },
- {
- MethodName: "ListObjects",
- Handler: _Storage_ListObjects_Handler,
- },
- {
- MethodName: "RewriteObject",
- Handler: _Storage_RewriteObject_Handler,
- },
- {
- MethodName: "StartResumableWrite",
- Handler: _Storage_StartResumableWrite_Handler,
- },
- {
- MethodName: "QueryWriteStatus",
- Handler: _Storage_QueryWriteStatus_Handler,
- },
- {
- MethodName: "MoveObject",
- Handler: _Storage_MoveObject_Handler,
- },
- },
- Streams: []grpc.StreamDesc{
- {
- StreamName: "ReadObject",
- Handler: _Storage_ReadObject_Handler,
- ServerStreams: true,
- },
- {
- StreamName: "BidiReadObject",
- Handler: _Storage_BidiReadObject_Handler,
- ServerStreams: true,
- ClientStreams: true,
- },
- {
- StreamName: "WriteObject",
- Handler: _Storage_WriteObject_Handler,
- ClientStreams: true,
- },
- {
- StreamName: "BidiWriteObject",
- Handler: _Storage_BidiWriteObject_Handler,
- ServerStreams: true,
- ClientStreams: true,
- },
- },
- Metadata: "google/storage/v2/storage.proto",
-}
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage_grpc.pb.go b/hack/tools/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage_grpc.pb.go
new file mode 100644
index 000000000000..e1c9161c2722
--- /dev/null
+++ b/hack/tools/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage_grpc.pb.go
@@ -0,0 +1,1799 @@
+// Copyright 2025 Google LLC
+//
+// 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 protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.3.0
+// - protoc v4.25.7
+// source: google/storage/v2/storage.proto
+
+package storagepb
+
+import (
+ context "context"
+
+ iampb "cloud.google.com/go/iam/apiv1/iampb"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+ emptypb "google.golang.org/protobuf/types/known/emptypb"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+const (
+ Storage_DeleteBucket_FullMethodName = "/google.storage.v2.Storage/DeleteBucket"
+ Storage_GetBucket_FullMethodName = "/google.storage.v2.Storage/GetBucket"
+ Storage_CreateBucket_FullMethodName = "/google.storage.v2.Storage/CreateBucket"
+ Storage_ListBuckets_FullMethodName = "/google.storage.v2.Storage/ListBuckets"
+ Storage_LockBucketRetentionPolicy_FullMethodName = "/google.storage.v2.Storage/LockBucketRetentionPolicy"
+ Storage_GetIamPolicy_FullMethodName = "/google.storage.v2.Storage/GetIamPolicy"
+ Storage_SetIamPolicy_FullMethodName = "/google.storage.v2.Storage/SetIamPolicy"
+ Storage_TestIamPermissions_FullMethodName = "/google.storage.v2.Storage/TestIamPermissions"
+ Storage_UpdateBucket_FullMethodName = "/google.storage.v2.Storage/UpdateBucket"
+ Storage_ComposeObject_FullMethodName = "/google.storage.v2.Storage/ComposeObject"
+ Storage_DeleteObject_FullMethodName = "/google.storage.v2.Storage/DeleteObject"
+ Storage_RestoreObject_FullMethodName = "/google.storage.v2.Storage/RestoreObject"
+ Storage_CancelResumableWrite_FullMethodName = "/google.storage.v2.Storage/CancelResumableWrite"
+ Storage_GetObject_FullMethodName = "/google.storage.v2.Storage/GetObject"
+ Storage_ReadObject_FullMethodName = "/google.storage.v2.Storage/ReadObject"
+ Storage_BidiReadObject_FullMethodName = "/google.storage.v2.Storage/BidiReadObject"
+ Storage_UpdateObject_FullMethodName = "/google.storage.v2.Storage/UpdateObject"
+ Storage_WriteObject_FullMethodName = "/google.storage.v2.Storage/WriteObject"
+ Storage_BidiWriteObject_FullMethodName = "/google.storage.v2.Storage/BidiWriteObject"
+ Storage_ListObjects_FullMethodName = "/google.storage.v2.Storage/ListObjects"
+ Storage_RewriteObject_FullMethodName = "/google.storage.v2.Storage/RewriteObject"
+ Storage_StartResumableWrite_FullMethodName = "/google.storage.v2.Storage/StartResumableWrite"
+ Storage_QueryWriteStatus_FullMethodName = "/google.storage.v2.Storage/QueryWriteStatus"
+ Storage_MoveObject_FullMethodName = "/google.storage.v2.Storage/MoveObject"
+)
+
+// StorageClient is the client API for Storage service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type StorageClient interface {
+ // Permanently deletes an empty bucket.
+ // The request fails if there are any live or
+ // noncurrent objects in the bucket, but the request succeeds if the
+ // bucket only contains soft-deleted objects or incomplete uploads, such
+ // as ongoing XML API multipart uploads. Does not permanently delete
+ // soft-deleted objects.
+ //
+ // When this API is used to delete a bucket containing an object that has a
+ // soft delete policy
+ // enabled, the object becomes soft deleted, and the
+ // `softDeleteTime` and `hardDeleteTime` properties are set on the
+ // object.
+ //
+ // Objects and multipart uploads that were in the bucket at the time of
+ // deletion are also retained for the specified retention duration. When
+ // a soft-deleted bucket reaches the end of its retention duration, it
+ // is permanently deleted. The `hardDeleteTime` of the bucket always
+ // equals
+ // or exceeds the expiration time of the last soft-deleted object in the
+ // bucket.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.buckets.delete` IAM permission on the bucket.
+ DeleteBucket(ctx context.Context, in *DeleteBucketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
+ // Returns metadata for the specified bucket.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.buckets.get`
+ // IAM permission on
+ // the bucket. Additionally, to return specific bucket metadata, the
+ // authenticated user must have the following permissions:
+ //
+ // - To return the IAM policies: `storage.buckets.getIamPolicy`
+ // - To return the bucket IP filtering rules: `storage.buckets.getIpFilter`
+ GetBucket(ctx context.Context, in *GetBucketRequest, opts ...grpc.CallOption) (*Bucket, error)
+ // Creates a new bucket.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.buckets.create` IAM permission on the bucket.
+ // Additionally, to enable specific bucket features, the authenticated user
+ // must have the following permissions:
+ //
+ // - To enable object retention using the `enableObjectRetention` query
+ // parameter: `storage.buckets.enableObjectRetention`
+ // - To set the bucket IP filtering rules: `storage.buckets.setIpFilter`
+ CreateBucket(ctx context.Context, in *CreateBucketRequest, opts ...grpc.CallOption) (*Bucket, error)
+ // Retrieves a list of buckets for a given project, ordered
+ // lexicographically by name.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.buckets.list` IAM permission on the bucket.
+ // Additionally, to enable specific bucket features, the authenticated
+ // user must have the following permissions:
+ //
+ // - To list the IAM policies: `storage.buckets.getIamPolicy`
+ // - To list the bucket IP filtering rules: `storage.buckets.getIpFilter`
+ ListBuckets(ctx context.Context, in *ListBucketsRequest, opts ...grpc.CallOption) (*ListBucketsResponse, error)
+ // Permanently locks the retention
+ // policy that is
+ // currently applied to the specified bucket.
+ //
+ // Caution: Locking a bucket is an
+ // irreversible action. Once you lock a bucket:
+ //
+ // - You cannot remove the retention policy from the bucket.
+ // - You cannot decrease the retention period for the policy.
+ //
+ // Once locked, you must delete the entire bucket in order to remove the
+ // bucket's retention policy. However, before you can delete the bucket, you
+ // must delete all the objects in the bucket, which is only
+ // possible if all the objects have reached the retention period set by the
+ // retention policy.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.buckets.update` IAM permission on the bucket.
+ LockBucketRetentionPolicy(ctx context.Context, in *LockBucketRetentionPolicyRequest, opts ...grpc.CallOption) (*Bucket, error)
+ // Gets the IAM policy for a specified bucket or managed folder.
+ // The `resource` field in the request should be
+ // `projects/_/buckets/{bucket}` for a bucket, or
+ // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
+ // for a managed folder.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.buckets.getIamPolicy` on the bucket or
+ // `storage.managedFolders.getIamPolicy` IAM permission on the
+ // managed folder.
+ GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error)
+ // Updates an IAM policy for the specified bucket or managed folder.
+ // The `resource` field in the request should be
+ // `projects/_/buckets/{bucket}` for a bucket, or
+ // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
+ // for a managed folder.
+ SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error)
+ // Tests a set of permissions on the given bucket, object, or managed folder
+ // to see which, if any, are held by the caller. The `resource` field in the
+ // request should be `projects/_/buckets/{bucket}` for a bucket,
+ // `projects/_/buckets/{bucket}/objects/{object}` for an object, or
+ // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
+ // for a managed folder.
+ TestIamPermissions(ctx context.Context, in *iampb.TestIamPermissionsRequest, opts ...grpc.CallOption) (*iampb.TestIamPermissionsResponse, error)
+ // Updates a bucket. Changes to the bucket are readable immediately after
+ // writing, but configuration changes might take time to propagate. This
+ // method supports `patch` semantics.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.buckets.update` IAM permission on the bucket.
+ // Additionally, to enable specific bucket features, the authenticated user
+ // must have the following permissions:
+ //
+ // - To set bucket IP filtering rules: `storage.buckets.setIpFilter`
+ // - To update public access prevention policies or access control lists
+ // (ACLs): `storage.buckets.setIamPolicy`
+ UpdateBucket(ctx context.Context, in *UpdateBucketRequest, opts ...grpc.CallOption) (*Bucket, error)
+ // Concatenates a list of existing objects into a new object in the same
+ // bucket. The existing source objects are unaffected by this operation.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires the `storage.objects.create` and `storage.objects.get` IAM
+ // permissions to use this method. If the new composite object
+ // overwrites an existing object, the authenticated user must also have
+ // the `storage.objects.delete` permission. If the request body includes
+ // the retention property, the authenticated user must also have the
+ // `storage.objects.setRetention` IAM permission.
+ ComposeObject(ctx context.Context, in *ComposeObjectRequest, opts ...grpc.CallOption) (*Object, error)
+ // Deletes an object and its metadata. Deletions are permanent if versioning
+ // is not enabled for the bucket, or if the generation parameter is used, or
+ // if soft delete is not
+ // enabled for the bucket.
+ // When this API is used to delete an object from a bucket that has soft
+ // delete policy enabled, the object becomes soft deleted, and the
+ // `softDeleteTime` and `hardDeleteTime` properties are set on the object.
+ // This API cannot be used to permanently delete soft-deleted objects.
+ // Soft-deleted objects are permanently deleted according to their
+ // `hardDeleteTime`.
+ //
+ // You can use the [`RestoreObject`][google.storage.v2.Storage.RestoreObject]
+ // API to restore soft-deleted objects until the soft delete retention period
+ // has passed.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.objects.delete` IAM permission on the bucket.
+ DeleteObject(ctx context.Context, in *DeleteObjectRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
+ // Restores a
+ // soft-deleted object.
+ // When a soft-deleted object is restored, a new copy of that object is
+ // created in the same bucket and inherits the same metadata as the
+ // soft-deleted object. The inherited metadata is the metadata that existed
+ // when the original object became soft deleted, with the following
+ // exceptions:
+ //
+ // - The `createTime` of the new object is set to the time at which the
+ // soft-deleted object was restored.
+ // - The `softDeleteTime` and `hardDeleteTime` values are cleared.
+ // - A new generation is assigned and the metageneration is reset to 1.
+ // - If the soft-deleted object was in a bucket that had Autoclass enabled,
+ // the new object is
+ // restored to Standard storage.
+ // - The restored object inherits the bucket's default object ACL, unless
+ // `copySourceAcl` is `true`.
+ //
+ // If a live object using the same name already exists in the bucket and
+ // becomes overwritten, the live object becomes a noncurrent object if Object
+ // Versioning is enabled on the bucket. If Object Versioning is not enabled,
+ // the live object becomes soft deleted.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires the following IAM permissions to use this method:
+ //
+ // - `storage.objects.restore`
+ // - `storage.objects.create`
+ // - `storage.objects.delete` (only required if overwriting an existing
+ // object)
+ // - `storage.objects.getIamPolicy` (only required if `projection` is `full`
+ // and the relevant bucket
+ // has uniform bucket-level access disabled)
+ // - `storage.objects.setIamPolicy` (only required if `copySourceAcl` is
+ // `true` and the relevant
+ // bucket has uniform bucket-level access disabled)
+ RestoreObject(ctx context.Context, in *RestoreObjectRequest, opts ...grpc.CallOption) (*Object, error)
+ // Cancels an in-progress resumable upload.
+ //
+ // Any attempts to write to the resumable upload after cancelling the upload
+ // fail.
+ //
+ // The behavior for any in-progress write operations is not guaranteed;
+ // they could either complete before the cancellation or fail if the
+ // cancellation completes first.
+ CancelResumableWrite(ctx context.Context, in *CancelResumableWriteRequest, opts ...grpc.CallOption) (*CancelResumableWriteResponse, error)
+ // Retrieves object metadata.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.objects.get` IAM permission on the bucket.
+ // To return object ACLs, the authenticated user must also have
+ // the `storage.objects.getIamPolicy` permission.
+ GetObject(ctx context.Context, in *GetObjectRequest, opts ...grpc.CallOption) (*Object, error)
+ // Retrieves object data.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.objects.get` IAM permission on the bucket.
+ ReadObject(ctx context.Context, in *ReadObjectRequest, opts ...grpc.CallOption) (Storage_ReadObjectClient, error)
+ // Reads an object's data.
+ //
+ // This bi-directional API reads data from an object, allowing you to
+ // request multiple data ranges within a single stream, even across
+ // several messages. If an error occurs with any request, the stream
+ // closes with a relevant error code. Since you can have multiple
+ // outstanding requests, the error response includes a
+ // `BidiReadObjectRangesError` field detailing the specific error for
+ // each pending `read_id`.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.objects.get` IAM permission on the bucket.
+ BidiReadObject(ctx context.Context, opts ...grpc.CallOption) (Storage_BidiReadObjectClient, error)
+ // Updates an object's metadata.
+ // Equivalent to JSON API's `storage.objects.patch` method.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.objects.update` IAM permission on the bucket.
+ UpdateObject(ctx context.Context, in *UpdateObjectRequest, opts ...grpc.CallOption) (*Object, error)
+ // Stores a new object and metadata.
+ //
+ // An object can be written either in a single message stream or in a
+ // resumable sequence of message streams. To write using a single stream,
+ // the client should include in the first message of the stream an
+ // `WriteObjectSpec` describing the destination bucket, object, and any
+ // preconditions. Additionally, the final message must set 'finish_write' to
+ // true, or else it is an error.
+ //
+ // For a resumable write, the client should instead call
+ // `StartResumableWrite()`, populating a `WriteObjectSpec` into that request.
+ // They should then attach the returned `upload_id` to the first message of
+ // each following call to `WriteObject`. If the stream is closed before
+ // finishing the upload (either explicitly by the client or due to a network
+ // error or an error response from the server), the client should do as
+ // follows:
+ //
+ // - Check the result Status of the stream, to determine if writing can be
+ // resumed on this stream or must be restarted from scratch (by calling
+ // `StartResumableWrite()`). The resumable errors are `DEADLINE_EXCEEDED`,
+ // `INTERNAL`, and `UNAVAILABLE`. For each case, the client should use
+ // binary exponential backoff before retrying. Additionally, writes can
+ // be resumed after `RESOURCE_EXHAUSTED` errors, but only after taking
+ // appropriate measures, which might include reducing aggregate send rate
+ // across clients and/or requesting a quota increase for your project.
+ // - If the call to `WriteObject` returns `ABORTED`, that indicates
+ // concurrent attempts to update the resumable write, caused either by
+ // multiple racing clients or by a single client where the previous
+ // request was timed out on the client side but nonetheless reached the
+ // server. In this case the client should take steps to prevent further
+ // concurrent writes. For example, increase the timeouts and stop using
+ // more than one process to perform the upload. Follow the steps below for
+ // resuming the upload.
+ // - For resumable errors, the client should call `QueryWriteStatus()` and
+ // then continue writing from the returned `persisted_size`. This might be
+ // less than the amount of data the client previously sent. Note also that
+ // it is acceptable to send data starting at an offset earlier than the
+ // returned `persisted_size`; in this case, the service skips data at
+ // offsets that were already persisted (without checking that it matches
+ // the previously written data), and write only the data starting from the
+ // persisted offset. Even though the data isn't written, it might still
+ // incur a performance cost over resuming at the correct write offset.
+ // This behavior can make client-side handling simpler in some cases.
+ // - Clients must only send data that is a multiple of 256 KiB per message,
+ // unless the object is being finished with `finish_write` set to `true`.
+ //
+ // The service does not view the object as complete until the client has
+ // sent a `WriteObjectRequest` with `finish_write` set to `true`. Sending any
+ // requests on a stream after sending a request with `finish_write` set to
+ // `true` causes an error. The client must check the response it
+ // receives to determine how much data the service is able to commit and
+ // whether the service views the object as complete.
+ //
+ // Attempting to resume an already finalized object results in an `OK`
+ // status, with a `WriteObjectResponse` containing the finalized object's
+ // metadata.
+ //
+ // Alternatively, you can use the `BidiWriteObject` operation to write an
+ // object with controls over flushing and the ability to fetch the ability to
+ // determine the current persisted size.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.objects.create`
+ // IAM permission on
+ // the bucket.
+ WriteObject(ctx context.Context, opts ...grpc.CallOption) (Storage_WriteObjectClient, error)
+ // Stores a new object and metadata.
+ //
+ // This is similar to the `WriteObject` call with the added support for
+ // manual flushing of persisted state, and the ability to determine current
+ // persisted size without closing the stream.
+ //
+ // The client might specify one or both of the `state_lookup` and `flush`
+ // fields in each `BidiWriteObjectRequest`. If `flush` is specified, the data
+ // written so far is persisted to storage. If `state_lookup` is specified, the
+ // service responds with a `BidiWriteObjectResponse` that contains the
+ // persisted size. If both `flush` and `state_lookup` are specified, the flush
+ // always occurs before a `state_lookup`, so that both might be set in the
+ // same request and the returned state is the state of the object
+ // post-flush. When the stream is closed, a `BidiWriteObjectResponse`
+ // is always sent to the client, regardless of the value of `state_lookup`.
+ BidiWriteObject(ctx context.Context, opts ...grpc.CallOption) (Storage_BidiWriteObjectClient, error)
+ // Retrieves a list of objects matching the criteria.
+ //
+ // **IAM Permissions**:
+ //
+ // The authenticated user requires `storage.objects.list`
+ // IAM permission to use this method. To return object ACLs, the
+ // authenticated user must also
+ // have the `storage.objects.getIamPolicy` permission.
+ ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (*ListObjectsResponse, error)
+ // Rewrites a source object to a destination object. Optionally overrides
+ // metadata.
+ RewriteObject(ctx context.Context, in *RewriteObjectRequest, opts ...grpc.CallOption) (*RewriteResponse, error)
+ // Starts a resumable write operation. This
+ // method is part of the Resumable
+ // upload feature.
+ // This allows you to upload large objects in multiple chunks, which is more
+ // resilient to network interruptions than a single upload. The validity
+ // duration of the write operation, and the consequences of it becoming
+ // invalid, are service-dependent.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.objects.create` IAM permission on the bucket.
+ StartResumableWrite(ctx context.Context, in *StartResumableWriteRequest, opts ...grpc.CallOption) (*StartResumableWriteResponse, error)
+ // Determines the `persisted_size` of an object that is being written. This
+ // method is part of the resumable
+ // upload feature.
+ // The returned value is the size of the object that has been persisted so
+ // far. The value can be used as the `write_offset` for the next `Write()`
+ // call.
+ //
+ // If the object does not exist, meaning if it was deleted, or the
+ // first `Write()` has not yet reached the service, this method returns the
+ // error `NOT_FOUND`.
+ //
+ // This method is useful for clients that buffer data and need to know which
+ // data can be safely evicted. The client can call `QueryWriteStatus()` at any
+ // time to determine how much data has been logged for this object.
+ // For any sequence of `QueryWriteStatus()` calls for a given
+ // object name, the sequence of returned `persisted_size` values are
+ // non-decreasing.
+ QueryWriteStatus(ctx context.Context, in *QueryWriteStatusRequest, opts ...grpc.CallOption) (*QueryWriteStatusResponse, error)
+ // Moves the source object to the destination object in the same bucket.
+ // This operation moves a source object to a destination object in the
+ // same bucket by renaming the object. The move itself is an atomic
+ // transaction, ensuring all steps either complete successfully or no
+ // changes are made.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires the following IAM permissions to use this method:
+ //
+ // - `storage.objects.move`
+ // - `storage.objects.create`
+ // - `storage.objects.delete` (only required if overwriting an existing
+ // object)
+ MoveObject(ctx context.Context, in *MoveObjectRequest, opts ...grpc.CallOption) (*Object, error)
+}
+
+type storageClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewStorageClient(cc grpc.ClientConnInterface) StorageClient {
+ return &storageClient{cc}
+}
+
+func (c *storageClient) DeleteBucket(ctx context.Context, in *DeleteBucketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
+ err := c.cc.Invoke(ctx, Storage_DeleteBucket_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageClient) GetBucket(ctx context.Context, in *GetBucketRequest, opts ...grpc.CallOption) (*Bucket, error) {
+ out := new(Bucket)
+ err := c.cc.Invoke(ctx, Storage_GetBucket_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageClient) CreateBucket(ctx context.Context, in *CreateBucketRequest, opts ...grpc.CallOption) (*Bucket, error) {
+ out := new(Bucket)
+ err := c.cc.Invoke(ctx, Storage_CreateBucket_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageClient) ListBuckets(ctx context.Context, in *ListBucketsRequest, opts ...grpc.CallOption) (*ListBucketsResponse, error) {
+ out := new(ListBucketsResponse)
+ err := c.cc.Invoke(ctx, Storage_ListBuckets_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageClient) LockBucketRetentionPolicy(ctx context.Context, in *LockBucketRetentionPolicyRequest, opts ...grpc.CallOption) (*Bucket, error) {
+ out := new(Bucket)
+ err := c.cc.Invoke(ctx, Storage_LockBucketRetentionPolicy_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageClient) GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) {
+ out := new(iampb.Policy)
+ err := c.cc.Invoke(ctx, Storage_GetIamPolicy_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageClient) SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) {
+ out := new(iampb.Policy)
+ err := c.cc.Invoke(ctx, Storage_SetIamPolicy_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageClient) TestIamPermissions(ctx context.Context, in *iampb.TestIamPermissionsRequest, opts ...grpc.CallOption) (*iampb.TestIamPermissionsResponse, error) {
+ out := new(iampb.TestIamPermissionsResponse)
+ err := c.cc.Invoke(ctx, Storage_TestIamPermissions_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageClient) UpdateBucket(ctx context.Context, in *UpdateBucketRequest, opts ...grpc.CallOption) (*Bucket, error) {
+ out := new(Bucket)
+ err := c.cc.Invoke(ctx, Storage_UpdateBucket_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageClient) ComposeObject(ctx context.Context, in *ComposeObjectRequest, opts ...grpc.CallOption) (*Object, error) {
+ out := new(Object)
+ err := c.cc.Invoke(ctx, Storage_ComposeObject_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageClient) DeleteObject(ctx context.Context, in *DeleteObjectRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
+ err := c.cc.Invoke(ctx, Storage_DeleteObject_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageClient) RestoreObject(ctx context.Context, in *RestoreObjectRequest, opts ...grpc.CallOption) (*Object, error) {
+ out := new(Object)
+ err := c.cc.Invoke(ctx, Storage_RestoreObject_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageClient) CancelResumableWrite(ctx context.Context, in *CancelResumableWriteRequest, opts ...grpc.CallOption) (*CancelResumableWriteResponse, error) {
+ out := new(CancelResumableWriteResponse)
+ err := c.cc.Invoke(ctx, Storage_CancelResumableWrite_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageClient) GetObject(ctx context.Context, in *GetObjectRequest, opts ...grpc.CallOption) (*Object, error) {
+ out := new(Object)
+ err := c.cc.Invoke(ctx, Storage_GetObject_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageClient) ReadObject(ctx context.Context, in *ReadObjectRequest, opts ...grpc.CallOption) (Storage_ReadObjectClient, error) {
+ stream, err := c.cc.NewStream(ctx, &Storage_ServiceDesc.Streams[0], Storage_ReadObject_FullMethodName, opts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &storageReadObjectClient{stream}
+ if err := x.ClientStream.SendMsg(in); err != nil {
+ return nil, err
+ }
+ if err := x.ClientStream.CloseSend(); err != nil {
+ return nil, err
+ }
+ return x, nil
+}
+
+type Storage_ReadObjectClient interface {
+ Recv() (*ReadObjectResponse, error)
+ grpc.ClientStream
+}
+
+type storageReadObjectClient struct {
+ grpc.ClientStream
+}
+
+func (x *storageReadObjectClient) Recv() (*ReadObjectResponse, error) {
+ m := new(ReadObjectResponse)
+ if err := x.ClientStream.RecvMsg(m); err != nil {
+ return nil, err
+ }
+ return m, nil
+}
+
+func (c *storageClient) BidiReadObject(ctx context.Context, opts ...grpc.CallOption) (Storage_BidiReadObjectClient, error) {
+ stream, err := c.cc.NewStream(ctx, &Storage_ServiceDesc.Streams[1], Storage_BidiReadObject_FullMethodName, opts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &storageBidiReadObjectClient{stream}
+ return x, nil
+}
+
+type Storage_BidiReadObjectClient interface {
+ Send(*BidiReadObjectRequest) error
+ Recv() (*BidiReadObjectResponse, error)
+ grpc.ClientStream
+}
+
+type storageBidiReadObjectClient struct {
+ grpc.ClientStream
+}
+
+func (x *storageBidiReadObjectClient) Send(m *BidiReadObjectRequest) error {
+ return x.ClientStream.SendMsg(m)
+}
+
+func (x *storageBidiReadObjectClient) Recv() (*BidiReadObjectResponse, error) {
+ m := new(BidiReadObjectResponse)
+ if err := x.ClientStream.RecvMsg(m); err != nil {
+ return nil, err
+ }
+ return m, nil
+}
+
+func (c *storageClient) UpdateObject(ctx context.Context, in *UpdateObjectRequest, opts ...grpc.CallOption) (*Object, error) {
+ out := new(Object)
+ err := c.cc.Invoke(ctx, Storage_UpdateObject_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageClient) WriteObject(ctx context.Context, opts ...grpc.CallOption) (Storage_WriteObjectClient, error) {
+ stream, err := c.cc.NewStream(ctx, &Storage_ServiceDesc.Streams[2], Storage_WriteObject_FullMethodName, opts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &storageWriteObjectClient{stream}
+ return x, nil
+}
+
+type Storage_WriteObjectClient interface {
+ Send(*WriteObjectRequest) error
+ CloseAndRecv() (*WriteObjectResponse, error)
+ grpc.ClientStream
+}
+
+type storageWriteObjectClient struct {
+ grpc.ClientStream
+}
+
+func (x *storageWriteObjectClient) Send(m *WriteObjectRequest) error {
+ return x.ClientStream.SendMsg(m)
+}
+
+func (x *storageWriteObjectClient) CloseAndRecv() (*WriteObjectResponse, error) {
+ if err := x.ClientStream.CloseSend(); err != nil {
+ return nil, err
+ }
+ m := new(WriteObjectResponse)
+ if err := x.ClientStream.RecvMsg(m); err != nil {
+ return nil, err
+ }
+ return m, nil
+}
+
+func (c *storageClient) BidiWriteObject(ctx context.Context, opts ...grpc.CallOption) (Storage_BidiWriteObjectClient, error) {
+ stream, err := c.cc.NewStream(ctx, &Storage_ServiceDesc.Streams[3], Storage_BidiWriteObject_FullMethodName, opts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &storageBidiWriteObjectClient{stream}
+ return x, nil
+}
+
+type Storage_BidiWriteObjectClient interface {
+ Send(*BidiWriteObjectRequest) error
+ Recv() (*BidiWriteObjectResponse, error)
+ grpc.ClientStream
+}
+
+type storageBidiWriteObjectClient struct {
+ grpc.ClientStream
+}
+
+func (x *storageBidiWriteObjectClient) Send(m *BidiWriteObjectRequest) error {
+ return x.ClientStream.SendMsg(m)
+}
+
+func (x *storageBidiWriteObjectClient) Recv() (*BidiWriteObjectResponse, error) {
+ m := new(BidiWriteObjectResponse)
+ if err := x.ClientStream.RecvMsg(m); err != nil {
+ return nil, err
+ }
+ return m, nil
+}
+
+func (c *storageClient) ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (*ListObjectsResponse, error) {
+ out := new(ListObjectsResponse)
+ err := c.cc.Invoke(ctx, Storage_ListObjects_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageClient) RewriteObject(ctx context.Context, in *RewriteObjectRequest, opts ...grpc.CallOption) (*RewriteResponse, error) {
+ out := new(RewriteResponse)
+ err := c.cc.Invoke(ctx, Storage_RewriteObject_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageClient) StartResumableWrite(ctx context.Context, in *StartResumableWriteRequest, opts ...grpc.CallOption) (*StartResumableWriteResponse, error) {
+ out := new(StartResumableWriteResponse)
+ err := c.cc.Invoke(ctx, Storage_StartResumableWrite_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageClient) QueryWriteStatus(ctx context.Context, in *QueryWriteStatusRequest, opts ...grpc.CallOption) (*QueryWriteStatusResponse, error) {
+ out := new(QueryWriteStatusResponse)
+ err := c.cc.Invoke(ctx, Storage_QueryWriteStatus_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageClient) MoveObject(ctx context.Context, in *MoveObjectRequest, opts ...grpc.CallOption) (*Object, error) {
+ out := new(Object)
+ err := c.cc.Invoke(ctx, Storage_MoveObject_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// StorageServer is the server API for Storage service.
+// All implementations should embed UnimplementedStorageServer
+// for forward compatibility
+type StorageServer interface {
+ // Permanently deletes an empty bucket.
+ // The request fails if there are any live or
+ // noncurrent objects in the bucket, but the request succeeds if the
+ // bucket only contains soft-deleted objects or incomplete uploads, such
+ // as ongoing XML API multipart uploads. Does not permanently delete
+ // soft-deleted objects.
+ //
+ // When this API is used to delete a bucket containing an object that has a
+ // soft delete policy
+ // enabled, the object becomes soft deleted, and the
+ // `softDeleteTime` and `hardDeleteTime` properties are set on the
+ // object.
+ //
+ // Objects and multipart uploads that were in the bucket at the time of
+ // deletion are also retained for the specified retention duration. When
+ // a soft-deleted bucket reaches the end of its retention duration, it
+ // is permanently deleted. The `hardDeleteTime` of the bucket always
+ // equals
+ // or exceeds the expiration time of the last soft-deleted object in the
+ // bucket.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.buckets.delete` IAM permission on the bucket.
+ DeleteBucket(context.Context, *DeleteBucketRequest) (*emptypb.Empty, error)
+ // Returns metadata for the specified bucket.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.buckets.get`
+ // IAM permission on
+ // the bucket. Additionally, to return specific bucket metadata, the
+ // authenticated user must have the following permissions:
+ //
+ // - To return the IAM policies: `storage.buckets.getIamPolicy`
+ // - To return the bucket IP filtering rules: `storage.buckets.getIpFilter`
+ GetBucket(context.Context, *GetBucketRequest) (*Bucket, error)
+ // Creates a new bucket.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.buckets.create` IAM permission on the bucket.
+ // Additionally, to enable specific bucket features, the authenticated user
+ // must have the following permissions:
+ //
+ // - To enable object retention using the `enableObjectRetention` query
+ // parameter: `storage.buckets.enableObjectRetention`
+ // - To set the bucket IP filtering rules: `storage.buckets.setIpFilter`
+ CreateBucket(context.Context, *CreateBucketRequest) (*Bucket, error)
+ // Retrieves a list of buckets for a given project, ordered
+ // lexicographically by name.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.buckets.list` IAM permission on the bucket.
+ // Additionally, to enable specific bucket features, the authenticated
+ // user must have the following permissions:
+ //
+ // - To list the IAM policies: `storage.buckets.getIamPolicy`
+ // - To list the bucket IP filtering rules: `storage.buckets.getIpFilter`
+ ListBuckets(context.Context, *ListBucketsRequest) (*ListBucketsResponse, error)
+ // Permanently locks the retention
+ // policy that is
+ // currently applied to the specified bucket.
+ //
+ // Caution: Locking a bucket is an
+ // irreversible action. Once you lock a bucket:
+ //
+ // - You cannot remove the retention policy from the bucket.
+ // - You cannot decrease the retention period for the policy.
+ //
+ // Once locked, you must delete the entire bucket in order to remove the
+ // bucket's retention policy. However, before you can delete the bucket, you
+ // must delete all the objects in the bucket, which is only
+ // possible if all the objects have reached the retention period set by the
+ // retention policy.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.buckets.update` IAM permission on the bucket.
+ LockBucketRetentionPolicy(context.Context, *LockBucketRetentionPolicyRequest) (*Bucket, error)
+ // Gets the IAM policy for a specified bucket or managed folder.
+ // The `resource` field in the request should be
+ // `projects/_/buckets/{bucket}` for a bucket, or
+ // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
+ // for a managed folder.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.buckets.getIamPolicy` on the bucket or
+ // `storage.managedFolders.getIamPolicy` IAM permission on the
+ // managed folder.
+ GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error)
+ // Updates an IAM policy for the specified bucket or managed folder.
+ // The `resource` field in the request should be
+ // `projects/_/buckets/{bucket}` for a bucket, or
+ // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
+ // for a managed folder.
+ SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error)
+ // Tests a set of permissions on the given bucket, object, or managed folder
+ // to see which, if any, are held by the caller. The `resource` field in the
+ // request should be `projects/_/buckets/{bucket}` for a bucket,
+ // `projects/_/buckets/{bucket}/objects/{object}` for an object, or
+ // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
+ // for a managed folder.
+ TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error)
+ // Updates a bucket. Changes to the bucket are readable immediately after
+ // writing, but configuration changes might take time to propagate. This
+ // method supports `patch` semantics.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.buckets.update` IAM permission on the bucket.
+ // Additionally, to enable specific bucket features, the authenticated user
+ // must have the following permissions:
+ //
+ // - To set bucket IP filtering rules: `storage.buckets.setIpFilter`
+ // - To update public access prevention policies or access control lists
+ // (ACLs): `storage.buckets.setIamPolicy`
+ UpdateBucket(context.Context, *UpdateBucketRequest) (*Bucket, error)
+ // Concatenates a list of existing objects into a new object in the same
+ // bucket. The existing source objects are unaffected by this operation.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires the `storage.objects.create` and `storage.objects.get` IAM
+ // permissions to use this method. If the new composite object
+ // overwrites an existing object, the authenticated user must also have
+ // the `storage.objects.delete` permission. If the request body includes
+ // the retention property, the authenticated user must also have the
+ // `storage.objects.setRetention` IAM permission.
+ ComposeObject(context.Context, *ComposeObjectRequest) (*Object, error)
+ // Deletes an object and its metadata. Deletions are permanent if versioning
+ // is not enabled for the bucket, or if the generation parameter is used, or
+ // if soft delete is not
+ // enabled for the bucket.
+ // When this API is used to delete an object from a bucket that has soft
+ // delete policy enabled, the object becomes soft deleted, and the
+ // `softDeleteTime` and `hardDeleteTime` properties are set on the object.
+ // This API cannot be used to permanently delete soft-deleted objects.
+ // Soft-deleted objects are permanently deleted according to their
+ // `hardDeleteTime`.
+ //
+ // You can use the [`RestoreObject`][google.storage.v2.Storage.RestoreObject]
+ // API to restore soft-deleted objects until the soft delete retention period
+ // has passed.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.objects.delete` IAM permission on the bucket.
+ DeleteObject(context.Context, *DeleteObjectRequest) (*emptypb.Empty, error)
+ // Restores a
+ // soft-deleted object.
+ // When a soft-deleted object is restored, a new copy of that object is
+ // created in the same bucket and inherits the same metadata as the
+ // soft-deleted object. The inherited metadata is the metadata that existed
+ // when the original object became soft deleted, with the following
+ // exceptions:
+ //
+ // - The `createTime` of the new object is set to the time at which the
+ // soft-deleted object was restored.
+ // - The `softDeleteTime` and `hardDeleteTime` values are cleared.
+ // - A new generation is assigned and the metageneration is reset to 1.
+ // - If the soft-deleted object was in a bucket that had Autoclass enabled,
+ // the new object is
+ // restored to Standard storage.
+ // - The restored object inherits the bucket's default object ACL, unless
+ // `copySourceAcl` is `true`.
+ //
+ // If a live object using the same name already exists in the bucket and
+ // becomes overwritten, the live object becomes a noncurrent object if Object
+ // Versioning is enabled on the bucket. If Object Versioning is not enabled,
+ // the live object becomes soft deleted.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires the following IAM permissions to use this method:
+ //
+ // - `storage.objects.restore`
+ // - `storage.objects.create`
+ // - `storage.objects.delete` (only required if overwriting an existing
+ // object)
+ // - `storage.objects.getIamPolicy` (only required if `projection` is `full`
+ // and the relevant bucket
+ // has uniform bucket-level access disabled)
+ // - `storage.objects.setIamPolicy` (only required if `copySourceAcl` is
+ // `true` and the relevant
+ // bucket has uniform bucket-level access disabled)
+ RestoreObject(context.Context, *RestoreObjectRequest) (*Object, error)
+ // Cancels an in-progress resumable upload.
+ //
+ // Any attempts to write to the resumable upload after cancelling the upload
+ // fail.
+ //
+ // The behavior for any in-progress write operations is not guaranteed;
+ // they could either complete before the cancellation or fail if the
+ // cancellation completes first.
+ CancelResumableWrite(context.Context, *CancelResumableWriteRequest) (*CancelResumableWriteResponse, error)
+ // Retrieves object metadata.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.objects.get` IAM permission on the bucket.
+ // To return object ACLs, the authenticated user must also have
+ // the `storage.objects.getIamPolicy` permission.
+ GetObject(context.Context, *GetObjectRequest) (*Object, error)
+ // Retrieves object data.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.objects.get` IAM permission on the bucket.
+ ReadObject(*ReadObjectRequest, Storage_ReadObjectServer) error
+ // Reads an object's data.
+ //
+ // This bi-directional API reads data from an object, allowing you to
+ // request multiple data ranges within a single stream, even across
+ // several messages. If an error occurs with any request, the stream
+ // closes with a relevant error code. Since you can have multiple
+ // outstanding requests, the error response includes a
+ // `BidiReadObjectRangesError` field detailing the specific error for
+ // each pending `read_id`.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.objects.get` IAM permission on the bucket.
+ BidiReadObject(Storage_BidiReadObjectServer) error
+ // Updates an object's metadata.
+ // Equivalent to JSON API's `storage.objects.patch` method.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.objects.update` IAM permission on the bucket.
+ UpdateObject(context.Context, *UpdateObjectRequest) (*Object, error)
+ // Stores a new object and metadata.
+ //
+ // An object can be written either in a single message stream or in a
+ // resumable sequence of message streams. To write using a single stream,
+ // the client should include in the first message of the stream an
+ // `WriteObjectSpec` describing the destination bucket, object, and any
+ // preconditions. Additionally, the final message must set 'finish_write' to
+ // true, or else it is an error.
+ //
+ // For a resumable write, the client should instead call
+ // `StartResumableWrite()`, populating a `WriteObjectSpec` into that request.
+ // They should then attach the returned `upload_id` to the first message of
+ // each following call to `WriteObject`. If the stream is closed before
+ // finishing the upload (either explicitly by the client or due to a network
+ // error or an error response from the server), the client should do as
+ // follows:
+ //
+ // - Check the result Status of the stream, to determine if writing can be
+ // resumed on this stream or must be restarted from scratch (by calling
+ // `StartResumableWrite()`). The resumable errors are `DEADLINE_EXCEEDED`,
+ // `INTERNAL`, and `UNAVAILABLE`. For each case, the client should use
+ // binary exponential backoff before retrying. Additionally, writes can
+ // be resumed after `RESOURCE_EXHAUSTED` errors, but only after taking
+ // appropriate measures, which might include reducing aggregate send rate
+ // across clients and/or requesting a quota increase for your project.
+ // - If the call to `WriteObject` returns `ABORTED`, that indicates
+ // concurrent attempts to update the resumable write, caused either by
+ // multiple racing clients or by a single client where the previous
+ // request was timed out on the client side but nonetheless reached the
+ // server. In this case the client should take steps to prevent further
+ // concurrent writes. For example, increase the timeouts and stop using
+ // more than one process to perform the upload. Follow the steps below for
+ // resuming the upload.
+ // - For resumable errors, the client should call `QueryWriteStatus()` and
+ // then continue writing from the returned `persisted_size`. This might be
+ // less than the amount of data the client previously sent. Note also that
+ // it is acceptable to send data starting at an offset earlier than the
+ // returned `persisted_size`; in this case, the service skips data at
+ // offsets that were already persisted (without checking that it matches
+ // the previously written data), and write only the data starting from the
+ // persisted offset. Even though the data isn't written, it might still
+ // incur a performance cost over resuming at the correct write offset.
+ // This behavior can make client-side handling simpler in some cases.
+ // - Clients must only send data that is a multiple of 256 KiB per message,
+ // unless the object is being finished with `finish_write` set to `true`.
+ //
+ // The service does not view the object as complete until the client has
+ // sent a `WriteObjectRequest` with `finish_write` set to `true`. Sending any
+ // requests on a stream after sending a request with `finish_write` set to
+ // `true` causes an error. The client must check the response it
+ // receives to determine how much data the service is able to commit and
+ // whether the service views the object as complete.
+ //
+ // Attempting to resume an already finalized object results in an `OK`
+ // status, with a `WriteObjectResponse` containing the finalized object's
+ // metadata.
+ //
+ // Alternatively, you can use the `BidiWriteObject` operation to write an
+ // object with controls over flushing and the ability to fetch the ability to
+ // determine the current persisted size.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.objects.create`
+ // IAM permission on
+ // the bucket.
+ WriteObject(Storage_WriteObjectServer) error
+ // Stores a new object and metadata.
+ //
+ // This is similar to the `WriteObject` call with the added support for
+ // manual flushing of persisted state, and the ability to determine current
+ // persisted size without closing the stream.
+ //
+ // The client might specify one or both of the `state_lookup` and `flush`
+ // fields in each `BidiWriteObjectRequest`. If `flush` is specified, the data
+ // written so far is persisted to storage. If `state_lookup` is specified, the
+ // service responds with a `BidiWriteObjectResponse` that contains the
+ // persisted size. If both `flush` and `state_lookup` are specified, the flush
+ // always occurs before a `state_lookup`, so that both might be set in the
+ // same request and the returned state is the state of the object
+ // post-flush. When the stream is closed, a `BidiWriteObjectResponse`
+ // is always sent to the client, regardless of the value of `state_lookup`.
+ BidiWriteObject(Storage_BidiWriteObjectServer) error
+ // Retrieves a list of objects matching the criteria.
+ //
+ // **IAM Permissions**:
+ //
+ // The authenticated user requires `storage.objects.list`
+ // IAM permission to use this method. To return object ACLs, the
+ // authenticated user must also
+ // have the `storage.objects.getIamPolicy` permission.
+ ListObjects(context.Context, *ListObjectsRequest) (*ListObjectsResponse, error)
+ // Rewrites a source object to a destination object. Optionally overrides
+ // metadata.
+ RewriteObject(context.Context, *RewriteObjectRequest) (*RewriteResponse, error)
+ // Starts a resumable write operation. This
+ // method is part of the Resumable
+ // upload feature.
+ // This allows you to upload large objects in multiple chunks, which is more
+ // resilient to network interruptions than a single upload. The validity
+ // duration of the write operation, and the consequences of it becoming
+ // invalid, are service-dependent.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires `storage.objects.create` IAM permission on the bucket.
+ StartResumableWrite(context.Context, *StartResumableWriteRequest) (*StartResumableWriteResponse, error)
+ // Determines the `persisted_size` of an object that is being written. This
+ // method is part of the resumable
+ // upload feature.
+ // The returned value is the size of the object that has been persisted so
+ // far. The value can be used as the `write_offset` for the next `Write()`
+ // call.
+ //
+ // If the object does not exist, meaning if it was deleted, or the
+ // first `Write()` has not yet reached the service, this method returns the
+ // error `NOT_FOUND`.
+ //
+ // This method is useful for clients that buffer data and need to know which
+ // data can be safely evicted. The client can call `QueryWriteStatus()` at any
+ // time to determine how much data has been logged for this object.
+ // For any sequence of `QueryWriteStatus()` calls for a given
+ // object name, the sequence of returned `persisted_size` values are
+ // non-decreasing.
+ QueryWriteStatus(context.Context, *QueryWriteStatusRequest) (*QueryWriteStatusResponse, error)
+ // Moves the source object to the destination object in the same bucket.
+ // This operation moves a source object to a destination object in the
+ // same bucket by renaming the object. The move itself is an atomic
+ // transaction, ensuring all steps either complete successfully or no
+ // changes are made.
+ //
+ // **IAM Permissions**:
+ //
+ // Requires the following IAM permissions to use this method:
+ //
+ // - `storage.objects.move`
+ // - `storage.objects.create`
+ // - `storage.objects.delete` (only required if overwriting an existing
+ // object)
+ MoveObject(context.Context, *MoveObjectRequest) (*Object, error)
+}
+
+// UnimplementedStorageServer should be embedded to have forward compatible implementations.
+type UnimplementedStorageServer struct {
+}
+
+func (UnimplementedStorageServer) DeleteBucket(context.Context, *DeleteBucketRequest) (*emptypb.Empty, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method DeleteBucket not implemented")
+}
+func (UnimplementedStorageServer) GetBucket(context.Context, *GetBucketRequest) (*Bucket, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetBucket not implemented")
+}
+func (UnimplementedStorageServer) CreateBucket(context.Context, *CreateBucketRequest) (*Bucket, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method CreateBucket not implemented")
+}
+func (UnimplementedStorageServer) ListBuckets(context.Context, *ListBucketsRequest) (*ListBucketsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListBuckets not implemented")
+}
+func (UnimplementedStorageServer) LockBucketRetentionPolicy(context.Context, *LockBucketRetentionPolicyRequest) (*Bucket, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method LockBucketRetentionPolicy not implemented")
+}
+func (UnimplementedStorageServer) GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetIamPolicy not implemented")
+}
+func (UnimplementedStorageServer) SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method SetIamPolicy not implemented")
+}
+func (UnimplementedStorageServer) TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method TestIamPermissions not implemented")
+}
+func (UnimplementedStorageServer) UpdateBucket(context.Context, *UpdateBucketRequest) (*Bucket, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdateBucket not implemented")
+}
+func (UnimplementedStorageServer) ComposeObject(context.Context, *ComposeObjectRequest) (*Object, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ComposeObject not implemented")
+}
+func (UnimplementedStorageServer) DeleteObject(context.Context, *DeleteObjectRequest) (*emptypb.Empty, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method DeleteObject not implemented")
+}
+func (UnimplementedStorageServer) RestoreObject(context.Context, *RestoreObjectRequest) (*Object, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method RestoreObject not implemented")
+}
+func (UnimplementedStorageServer) CancelResumableWrite(context.Context, *CancelResumableWriteRequest) (*CancelResumableWriteResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method CancelResumableWrite not implemented")
+}
+func (UnimplementedStorageServer) GetObject(context.Context, *GetObjectRequest) (*Object, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetObject not implemented")
+}
+func (UnimplementedStorageServer) ReadObject(*ReadObjectRequest, Storage_ReadObjectServer) error {
+ return status.Errorf(codes.Unimplemented, "method ReadObject not implemented")
+}
+func (UnimplementedStorageServer) BidiReadObject(Storage_BidiReadObjectServer) error {
+ return status.Errorf(codes.Unimplemented, "method BidiReadObject not implemented")
+}
+func (UnimplementedStorageServer) UpdateObject(context.Context, *UpdateObjectRequest) (*Object, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdateObject not implemented")
+}
+func (UnimplementedStorageServer) WriteObject(Storage_WriteObjectServer) error {
+ return status.Errorf(codes.Unimplemented, "method WriteObject not implemented")
+}
+func (UnimplementedStorageServer) BidiWriteObject(Storage_BidiWriteObjectServer) error {
+ return status.Errorf(codes.Unimplemented, "method BidiWriteObject not implemented")
+}
+func (UnimplementedStorageServer) ListObjects(context.Context, *ListObjectsRequest) (*ListObjectsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListObjects not implemented")
+}
+func (UnimplementedStorageServer) RewriteObject(context.Context, *RewriteObjectRequest) (*RewriteResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method RewriteObject not implemented")
+}
+func (UnimplementedStorageServer) StartResumableWrite(context.Context, *StartResumableWriteRequest) (*StartResumableWriteResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method StartResumableWrite not implemented")
+}
+func (UnimplementedStorageServer) QueryWriteStatus(context.Context, *QueryWriteStatusRequest) (*QueryWriteStatusResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method QueryWriteStatus not implemented")
+}
+func (UnimplementedStorageServer) MoveObject(context.Context, *MoveObjectRequest) (*Object, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method MoveObject not implemented")
+}
+
+// UnsafeStorageServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to StorageServer will
+// result in compilation errors.
+type UnsafeStorageServer interface {
+ mustEmbedUnimplementedStorageServer()
+}
+
+func RegisterStorageServer(s grpc.ServiceRegistrar, srv StorageServer) {
+ s.RegisterService(&Storage_ServiceDesc, srv)
+}
+
+func _Storage_DeleteBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(DeleteBucketRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServer).DeleteBucket(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Storage_DeleteBucket_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServer).DeleteBucket(ctx, req.(*DeleteBucketRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Storage_GetBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetBucketRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServer).GetBucket(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Storage_GetBucket_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServer).GetBucket(ctx, req.(*GetBucketRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Storage_CreateBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CreateBucketRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServer).CreateBucket(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Storage_CreateBucket_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServer).CreateBucket(ctx, req.(*CreateBucketRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Storage_ListBuckets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListBucketsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServer).ListBuckets(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Storage_ListBuckets_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServer).ListBuckets(ctx, req.(*ListBucketsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Storage_LockBucketRetentionPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(LockBucketRetentionPolicyRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServer).LockBucketRetentionPolicy(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Storage_LockBucketRetentionPolicy_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServer).LockBucketRetentionPolicy(ctx, req.(*LockBucketRetentionPolicyRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Storage_GetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(iampb.GetIamPolicyRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServer).GetIamPolicy(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Storage_GetIamPolicy_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServer).GetIamPolicy(ctx, req.(*iampb.GetIamPolicyRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Storage_SetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(iampb.SetIamPolicyRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServer).SetIamPolicy(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Storage_SetIamPolicy_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServer).SetIamPolicy(ctx, req.(*iampb.SetIamPolicyRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Storage_TestIamPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(iampb.TestIamPermissionsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServer).TestIamPermissions(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Storage_TestIamPermissions_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServer).TestIamPermissions(ctx, req.(*iampb.TestIamPermissionsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Storage_UpdateBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(UpdateBucketRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServer).UpdateBucket(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Storage_UpdateBucket_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServer).UpdateBucket(ctx, req.(*UpdateBucketRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Storage_ComposeObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ComposeObjectRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServer).ComposeObject(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Storage_ComposeObject_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServer).ComposeObject(ctx, req.(*ComposeObjectRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Storage_DeleteObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(DeleteObjectRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServer).DeleteObject(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Storage_DeleteObject_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServer).DeleteObject(ctx, req.(*DeleteObjectRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Storage_RestoreObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(RestoreObjectRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServer).RestoreObject(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Storage_RestoreObject_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServer).RestoreObject(ctx, req.(*RestoreObjectRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Storage_CancelResumableWrite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CancelResumableWriteRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServer).CancelResumableWrite(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Storage_CancelResumableWrite_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServer).CancelResumableWrite(ctx, req.(*CancelResumableWriteRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Storage_GetObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetObjectRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServer).GetObject(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Storage_GetObject_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServer).GetObject(ctx, req.(*GetObjectRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Storage_ReadObject_Handler(srv interface{}, stream grpc.ServerStream) error {
+ m := new(ReadObjectRequest)
+ if err := stream.RecvMsg(m); err != nil {
+ return err
+ }
+ return srv.(StorageServer).ReadObject(m, &storageReadObjectServer{stream})
+}
+
+type Storage_ReadObjectServer interface {
+ Send(*ReadObjectResponse) error
+ grpc.ServerStream
+}
+
+type storageReadObjectServer struct {
+ grpc.ServerStream
+}
+
+func (x *storageReadObjectServer) Send(m *ReadObjectResponse) error {
+ return x.ServerStream.SendMsg(m)
+}
+
+func _Storage_BidiReadObject_Handler(srv interface{}, stream grpc.ServerStream) error {
+ return srv.(StorageServer).BidiReadObject(&storageBidiReadObjectServer{stream})
+}
+
+type Storage_BidiReadObjectServer interface {
+ Send(*BidiReadObjectResponse) error
+ Recv() (*BidiReadObjectRequest, error)
+ grpc.ServerStream
+}
+
+type storageBidiReadObjectServer struct {
+ grpc.ServerStream
+}
+
+func (x *storageBidiReadObjectServer) Send(m *BidiReadObjectResponse) error {
+ return x.ServerStream.SendMsg(m)
+}
+
+func (x *storageBidiReadObjectServer) Recv() (*BidiReadObjectRequest, error) {
+ m := new(BidiReadObjectRequest)
+ if err := x.ServerStream.RecvMsg(m); err != nil {
+ return nil, err
+ }
+ return m, nil
+}
+
+func _Storage_UpdateObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(UpdateObjectRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServer).UpdateObject(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Storage_UpdateObject_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServer).UpdateObject(ctx, req.(*UpdateObjectRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Storage_WriteObject_Handler(srv interface{}, stream grpc.ServerStream) error {
+ return srv.(StorageServer).WriteObject(&storageWriteObjectServer{stream})
+}
+
+type Storage_WriteObjectServer interface {
+ SendAndClose(*WriteObjectResponse) error
+ Recv() (*WriteObjectRequest, error)
+ grpc.ServerStream
+}
+
+type storageWriteObjectServer struct {
+ grpc.ServerStream
+}
+
+func (x *storageWriteObjectServer) SendAndClose(m *WriteObjectResponse) error {
+ return x.ServerStream.SendMsg(m)
+}
+
+func (x *storageWriteObjectServer) Recv() (*WriteObjectRequest, error) {
+ m := new(WriteObjectRequest)
+ if err := x.ServerStream.RecvMsg(m); err != nil {
+ return nil, err
+ }
+ return m, nil
+}
+
+func _Storage_BidiWriteObject_Handler(srv interface{}, stream grpc.ServerStream) error {
+ return srv.(StorageServer).BidiWriteObject(&storageBidiWriteObjectServer{stream})
+}
+
+type Storage_BidiWriteObjectServer interface {
+ Send(*BidiWriteObjectResponse) error
+ Recv() (*BidiWriteObjectRequest, error)
+ grpc.ServerStream
+}
+
+type storageBidiWriteObjectServer struct {
+ grpc.ServerStream
+}
+
+func (x *storageBidiWriteObjectServer) Send(m *BidiWriteObjectResponse) error {
+ return x.ServerStream.SendMsg(m)
+}
+
+func (x *storageBidiWriteObjectServer) Recv() (*BidiWriteObjectRequest, error) {
+ m := new(BidiWriteObjectRequest)
+ if err := x.ServerStream.RecvMsg(m); err != nil {
+ return nil, err
+ }
+ return m, nil
+}
+
+func _Storage_ListObjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListObjectsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServer).ListObjects(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Storage_ListObjects_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServer).ListObjects(ctx, req.(*ListObjectsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Storage_RewriteObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(RewriteObjectRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServer).RewriteObject(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Storage_RewriteObject_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServer).RewriteObject(ctx, req.(*RewriteObjectRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Storage_StartResumableWrite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(StartResumableWriteRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServer).StartResumableWrite(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Storage_StartResumableWrite_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServer).StartResumableWrite(ctx, req.(*StartResumableWriteRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Storage_QueryWriteStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(QueryWriteStatusRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServer).QueryWriteStatus(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Storage_QueryWriteStatus_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServer).QueryWriteStatus(ctx, req.(*QueryWriteStatusRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Storage_MoveObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(MoveObjectRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServer).MoveObject(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Storage_MoveObject_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServer).MoveObject(ctx, req.(*MoveObjectRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// Storage_ServiceDesc is the grpc.ServiceDesc for Storage service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var Storage_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "google.storage.v2.Storage",
+ HandlerType: (*StorageServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "DeleteBucket",
+ Handler: _Storage_DeleteBucket_Handler,
+ },
+ {
+ MethodName: "GetBucket",
+ Handler: _Storage_GetBucket_Handler,
+ },
+ {
+ MethodName: "CreateBucket",
+ Handler: _Storage_CreateBucket_Handler,
+ },
+ {
+ MethodName: "ListBuckets",
+ Handler: _Storage_ListBuckets_Handler,
+ },
+ {
+ MethodName: "LockBucketRetentionPolicy",
+ Handler: _Storage_LockBucketRetentionPolicy_Handler,
+ },
+ {
+ MethodName: "GetIamPolicy",
+ Handler: _Storage_GetIamPolicy_Handler,
+ },
+ {
+ MethodName: "SetIamPolicy",
+ Handler: _Storage_SetIamPolicy_Handler,
+ },
+ {
+ MethodName: "TestIamPermissions",
+ Handler: _Storage_TestIamPermissions_Handler,
+ },
+ {
+ MethodName: "UpdateBucket",
+ Handler: _Storage_UpdateBucket_Handler,
+ },
+ {
+ MethodName: "ComposeObject",
+ Handler: _Storage_ComposeObject_Handler,
+ },
+ {
+ MethodName: "DeleteObject",
+ Handler: _Storage_DeleteObject_Handler,
+ },
+ {
+ MethodName: "RestoreObject",
+ Handler: _Storage_RestoreObject_Handler,
+ },
+ {
+ MethodName: "CancelResumableWrite",
+ Handler: _Storage_CancelResumableWrite_Handler,
+ },
+ {
+ MethodName: "GetObject",
+ Handler: _Storage_GetObject_Handler,
+ },
+ {
+ MethodName: "UpdateObject",
+ Handler: _Storage_UpdateObject_Handler,
+ },
+ {
+ MethodName: "ListObjects",
+ Handler: _Storage_ListObjects_Handler,
+ },
+ {
+ MethodName: "RewriteObject",
+ Handler: _Storage_RewriteObject_Handler,
+ },
+ {
+ MethodName: "StartResumableWrite",
+ Handler: _Storage_StartResumableWrite_Handler,
+ },
+ {
+ MethodName: "QueryWriteStatus",
+ Handler: _Storage_QueryWriteStatus_Handler,
+ },
+ {
+ MethodName: "MoveObject",
+ Handler: _Storage_MoveObject_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{
+ {
+ StreamName: "ReadObject",
+ Handler: _Storage_ReadObject_Handler,
+ ServerStreams: true,
+ },
+ {
+ StreamName: "BidiReadObject",
+ Handler: _Storage_BidiReadObject_Handler,
+ ServerStreams: true,
+ ClientStreams: true,
+ },
+ {
+ StreamName: "WriteObject",
+ Handler: _Storage_WriteObject_Handler,
+ ClientStreams: true,
+ },
+ {
+ StreamName: "BidiWriteObject",
+ Handler: _Storage_BidiWriteObject_Handler,
+ ServerStreams: true,
+ ClientStreams: true,
+ },
+ },
+ Metadata: "google/storage/v2/storage.proto",
+}
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/internal/experimental.go b/hack/tools/vendor/cloud.google.com/go/storage/internal/experimental.go
index 4482eab8a341..b8c5731fe3ac 100644
--- a/hack/tools/vendor/cloud.google.com/go/storage/internal/experimental.go
+++ b/hack/tools/vendor/cloud.google.com/go/storage/internal/experimental.go
@@ -26,6 +26,10 @@ var (
// Set an alternate client-side metric Exporter to emit metrics through.
WithMetricExporter any // func (*metric.Exporter) option.ClientOption
+ // WithMeterProvider is a function which is implemented by storage package.
+ // Set an alternate client-side meter provider to emit metrics through.
+ WithMeterProvider any // func (*metric.MeterProvider) option.ClientOption
+
// WithReadStallTimeout is a function which is implemented by storage package.
// It takes ReadStallTimeoutConfig as inputs and returns a option.ClientOption.
WithReadStallTimeout any // func (*ReadStallTimeoutConfig) option.ClientOption
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/internal/version.go b/hack/tools/vendor/cloud.google.com/go/storage/internal/version.go
index f801fb63b98e..53ebe1de124d 100644
--- a/hack/tools/vendor/cloud.google.com/go/storage/internal/version.go
+++ b/hack/tools/vendor/cloud.google.com/go/storage/internal/version.go
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -12,7 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+// Code generated by gapicgen. DO NOT EDIT.
+
package internal
// Version is the current tagged release of the library.
-const Version = "1.56.0"
+const Version = "1.57.2"
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/option.go b/hack/tools/vendor/cloud.google.com/go/storage/option.go
index 6548cc18e82c..6afc669386e5 100644
--- a/hack/tools/vendor/cloud.google.com/go/storage/option.go
+++ b/hack/tools/vendor/cloud.google.com/go/storage/option.go
@@ -39,6 +39,7 @@ func init() {
// initialize experimental options
storageinternal.WithMetricExporter = withMetricExporter
storageinternal.WithMetricInterval = withMetricInterval
+ storageinternal.WithMeterProvider = withMeterProvider
storageinternal.WithReadStallTimeout = withReadStallTimeout
storageinternal.WithGRPCBidiReads = withGRPCBidiReads
storageinternal.WithZonalBucketAPIs = withZonalBucketAPIs
@@ -81,6 +82,7 @@ type storageConfig struct {
disableClientMetrics bool
metricExporter *metric.Exporter
metricInterval time.Duration
+ meterProvider *metric.MeterProvider
manualReader *metric.ManualReader
readStallTimeoutConfig *experimental.ReadStallTimeoutConfig
grpcBidiReads bool
@@ -203,6 +205,20 @@ type withTestMetricReaderConfig struct {
metricReader *metric.ManualReader
}
+type withMeterProviderConfig struct {
+ internaloption.EmbeddableAdapter
+ // meter provider override
+ meterProvider *metric.MeterProvider
+}
+
+func withMeterProvider(provider *metric.MeterProvider) option.ClientOption {
+ return &withMeterProviderConfig{meterProvider: provider}
+}
+
+func (w *withMeterProviderConfig) ApplyStorageOpt(c *storageConfig) {
+ c.meterProvider = w.meterProvider
+}
+
func withTestMetricReader(ex *metric.ManualReader) option.ClientOption {
return &withTestMetricReaderConfig{metricReader: ex}
}
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/post_policy_v4.go b/hack/tools/vendor/cloud.google.com/go/storage/post_policy_v4.go
index 6bc73fb7af47..4b2feea954a8 100644
--- a/hack/tools/vendor/cloud.google.com/go/storage/post_policy_v4.go
+++ b/hack/tools/vendor/cloud.google.com/go/storage/post_policy_v4.go
@@ -252,9 +252,6 @@ func GenerateSignedPostPolicyV4(bucket, object string, opts *PostPolicyV4Options
if bucket == "" {
return nil, errors.New("storage: bucket must be non-empty")
}
- if object == "" {
- return nil, errors.New("storage: object must be non-empty")
- }
now := utcNow()
if err := validatePostPolicyV4Options(opts, now); err != nil {
return nil, err
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/reader.go b/hack/tools/vendor/cloud.google.com/go/storage/reader.go
index 793c1b2e0e8a..0c5f5be0ab99 100644
--- a/hack/tools/vendor/cloud.google.com/go/storage/reader.go
+++ b/hack/tools/vendor/cloud.google.com/go/storage/reader.go
@@ -23,8 +23,6 @@ import (
"strings"
"sync"
"time"
-
- "cloud.google.com/go/internal/trace"
)
var crc32cTable = crc32.MakeTable(crc32.Castagnoli)
@@ -116,7 +114,8 @@ func (o *ObjectHandle) NewReader(ctx context.Context) (*Reader, error) {
func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64) (r *Reader, err error) {
// This span covers the life of the reader. It is closed via the context
// in Reader.Close.
- ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Object.Reader")
+ ctx, _ = startSpan(ctx, "Object.Reader")
+ defer func() { endSpan(ctx, err) }()
if err := o.validate(); err != nil {
return nil, err
@@ -150,8 +149,6 @@ func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64)
// span now if there is an error.
if err == nil {
r.ctx = ctx
- } else {
- trace.EndSpan(ctx, err)
}
return r, err
@@ -167,7 +164,8 @@ func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64)
func (o *ObjectHandle) NewMultiRangeDownloader(ctx context.Context) (mrd *MultiRangeDownloader, err error) {
// This span covers the life of the reader. It is closed via the context
// in Reader.Close.
- ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Object.MultiRangeDownloader")
+ ctx, _ = startSpan(ctx, "Object.MultiRangeDownloader")
+ defer func() { endSpan(ctx, err) }()
if err := o.validate(); err != nil {
return nil, err
@@ -195,8 +193,6 @@ func (o *ObjectHandle) NewMultiRangeDownloader(ctx context.Context) (mrd *MultiR
// span now if there is an error.
if err == nil {
r.ctx = ctx
- } else {
- trace.EndSpan(ctx, err)
}
return r, err
@@ -285,7 +281,7 @@ type Reader struct {
// Close closes the Reader. It must be called when done reading.
func (r *Reader) Close() error {
err := r.reader.Close()
- trace.EndSpan(r.ctx, err)
+ endSpan(r.ctx, err)
return err
}
@@ -436,7 +432,7 @@ func (mrd *MultiRangeDownloader) Add(output io.Writer, offset, length int64, cal
// Call [MultiRangeDownloader.Wait] to avoid this error.
func (mrd *MultiRangeDownloader) Close() error {
err := mrd.reader.close()
- trace.EndSpan(mrd.ctx, err)
+ endSpan(mrd.ctx, err)
return err
}
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/storage.go b/hack/tools/vendor/cloud.google.com/go/storage/storage.go
index d8455425fdc3..32a145b8d5d0 100644
--- a/hack/tools/vendor/cloud.google.com/go/storage/storage.go
+++ b/hack/tools/vendor/cloud.google.com/go/storage/storage.go
@@ -40,7 +40,6 @@ import (
"cloud.google.com/go/auth"
"cloud.google.com/go/internal/optional"
- "cloud.google.com/go/internal/trace"
"cloud.google.com/go/storage/internal"
"cloud.google.com/go/storage/internal/apiv2/storagepb"
"github.com/googleapis/gax-go/v2"
@@ -208,7 +207,9 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error
return nil, fmt.Errorf("dialing: %w", err)
}
// RawService should be created with the chosen endpoint to take account of user override.
- rawService, err := raw.NewService(ctx, option.WithEndpoint(ep), option.WithHTTPClient(hc))
+ // Preserve other user-supplied options as well.
+ opts = append(opts, option.WithEndpoint(ep), option.WithHTTPClient(hc))
+ rawService, err := raw.NewService(ctx, opts...)
if err != nil {
return nil, fmt.Errorf("storage client: %w", err)
}
@@ -1197,8 +1198,7 @@ func (o *ObjectHandle) Restore(ctx context.Context, opts *RestoreOptions) (*Obje
}
// Move changes the name of the object to the destination name.
-// It can only be used to rename an object within the same bucket. The
-// bucket must have [HierarchicalNamespace] enabled to use this method.
+// It can only be used to rename an object within the same bucket.
//
// Any preconditions set on the ObjectHandle will be applied for the source
// object. Set preconditions on the destination object using
@@ -1247,7 +1247,7 @@ type MoveObjectDestination struct {
// It is the caller's responsibility to call Close when writing is done. To
// stop writing without saving the data, cancel the context.
func (o *ObjectHandle) NewWriter(ctx context.Context) *Writer {
- ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Object.Writer")
+ ctx, _ = startSpan(ctx, "Object.Writer")
return &Writer{
ctx: ctx,
o: o,
@@ -1283,16 +1283,18 @@ func (o *ObjectHandle) NewWriter(ctx context.Context) *Writer {
// objects which were created append semantics and not finalized.
// This feature is in preview and is not yet available for general use.
func (o *ObjectHandle) NewWriterFromAppendableObject(ctx context.Context, opts *AppendableWriterOpts) (*Writer, int64, error) {
- ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Object.Writer")
+ ctx, _ = startSpan(ctx, "Object.WriterFromAppendableObject")
if o.gen < 0 {
return nil, 0, errors.New("storage: ObjectHandle.Generation must be set to use NewWriterFromAppendableObject")
}
+ toc := make(chan int64)
w := &Writer{
- ctx: ctx,
- o: o,
- donec: make(chan struct{}),
- ObjectAttrs: ObjectAttrs{Name: o.object},
- Append: true,
+ ctx: ctx,
+ o: o,
+ donec: make(chan struct{}),
+ ObjectAttrs: ObjectAttrs{Name: o.object},
+ Append: true,
+ setTakeoverOffset: func(to int64) { toc <- to },
}
opts.apply(w)
if w.ChunkSize == 0 {
@@ -1302,7 +1304,16 @@ func (o *ObjectHandle) NewWriterFromAppendableObject(ctx context.Context, opts *
if err != nil {
return nil, 0, err
}
- return w, w.takeoverOffset, nil
+ // Block until we discover the takeover offset, or the stream fails
+ select {
+ case to, ok := <-toc:
+ if !ok {
+ return nil, 0, errors.New("storage: unexpectedly did not discover takeover offset")
+ }
+ return w, to, nil
+ case <-w.donec:
+ return nil, 0, w.err
+ }
}
// AppendableWriterOpts provides options to set on a Writer initialized
@@ -1661,6 +1672,12 @@ type ObjectAttrs struct {
HardDeleteTime time.Time
}
+// isZero reports whether the ObjectAttrs struct is empty (i.e. all the
+// fields are their zero value).
+func (o *ObjectAttrs) isZero() bool {
+ return reflect.DeepEqual(o, &ObjectAttrs{})
+}
+
// ObjectRetention contains the retention configuration for this object.
type ObjectRetention struct {
// Mode is the retention policy's mode on this object. Valid values are
diff --git a/hack/tools/vendor/cloud.google.com/go/storage/writer.go b/hack/tools/vendor/cloud.google.com/go/storage/writer.go
index bc0893eeac92..ae5a4d667f4d 100644
--- a/hack/tools/vendor/cloud.google.com/go/storage/writer.go
+++ b/hack/tools/vendor/cloud.google.com/go/storage/writer.go
@@ -22,8 +22,6 @@ import (
"sync"
"time"
"unicode/utf8"
-
- "cloud.google.com/go/internal/trace"
)
// Interface internalWriter wraps low-level implementations which may vary
@@ -159,9 +157,9 @@ type Writer struct {
donec chan struct{} // closed after err and obj are set.
obj *ObjectAttrs
- mu sync.Mutex
- err error
- takeoverOffset int64 // offset from which the writer started appending to the object.
+ mu sync.Mutex
+ err error
+ setTakeoverOffset func(int64)
}
// Write appends to w. It implements the io.Writer interface.
@@ -261,7 +259,7 @@ func (w *Writer) Close() error {
w.closed = true
w.mu.Lock()
defer w.mu.Unlock()
- trace.EndSpan(w.ctx, w.err)
+ endSpan(w.ctx, w.err)
return w.err
}
@@ -274,6 +272,8 @@ func (w *Writer) openWriter() (err error) {
}
isIdempotent := w.o.conds != nil && (w.o.conds.GenerationMatch >= 0 || w.o.conds.DoesNotExist)
+ // Append operations that takeover a specific generation are idempotent.
+ isIdempotent = isIdempotent || w.Append && w.o.gen > 0
opts := makeStorageOpts(isIdempotent, w.o.retry, w.o.userProject)
params := &openWriterParams{
ctx: w.ctx,
@@ -297,7 +297,7 @@ func (w *Writer) openWriter() (err error) {
w.obj.Size = n
}
},
- setTakeoverOffset: func(n int64) { w.takeoverOffset = n },
+ setTakeoverOffset: w.setTakeoverOffset,
forceEmptyContentType: w.ForceEmptyContentType,
}
if err := w.ctx.Err(); err != nil {
diff --git a/hack/tools/vendor/github.com/docker/docker/api/swagger.yaml b/hack/tools/vendor/github.com/docker/docker/api/swagger.yaml
index 3880635db128..feb42e808adb 100644
--- a/hack/tools/vendor/github.com/docker/docker/api/swagger.yaml
+++ b/hack/tools/vendor/github.com/docker/docker/api/swagger.yaml
@@ -81,7 +81,6 @@ info:
{
"username": "string",
"password": "string",
- "email": "string",
"serveraddress": "string"
}
```
@@ -637,6 +636,9 @@ definitions:
by the default (runc) runtime.
This field is omitted when empty.
+
+ **Deprecated**: This field is deprecated as kernel 6.12 has deprecated `memory.kmem.tcp.limit_in_bytes` field
+ for cgroups v1. This field will be removed in a future release.
type: "integer"
format: "int64"
MemoryReservation:
@@ -1531,37 +1533,6 @@ definitions:
items:
type: "string"
example: ["/bin/sh", "-c"]
- # FIXME(thaJeztah): temporarily using a full example to remove some "omitempty" fields. Remove once the fields are removed.
- example:
- "User": "web:web"
- "ExposedPorts": {
- "80/tcp": {},
- "443/tcp": {}
- }
- "Env": ["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"]
- "Cmd": ["/bin/sh"]
- "Healthcheck": {
- "Test": ["string"],
- "Interval": 0,
- "Timeout": 0,
- "Retries": 0,
- "StartPeriod": 0,
- "StartInterval": 0
- }
- "ArgsEscaped": true
- "Volumes": {
- "/app/data": {},
- "/app/config": {}
- }
- "WorkingDir": "/public/"
- "Entrypoint": []
- "OnBuild": []
- "Labels": {
- "com.example.some-label": "some-value",
- "com.example.some-other-label": "some-other-value"
- }
- "StopSignal": "SIGTERM"
- "Shell": ["/bin/sh", "-c"]
NetworkingConfig:
description: |
@@ -1608,6 +1579,8 @@ definitions:
Bridge:
description: |
Name of the default bridge interface when dockerd's --bridge flag is set.
+
+ Deprecated: This field is only set when the daemon is started with the --bridge flag specified.
type: "string"
example: "docker0"
SandboxID:
@@ -1965,6 +1938,11 @@ definitions:
Depending on how the image was created, this field may be empty and
is only set for images that were built/created locally. This field
is empty if the image was pulled from an image registry.
+
+ > **Deprecated**: This field is only set when using the deprecated
+ > legacy builder. It is included in API responses for informational
+ > purposes, but should not be depended on as it will be omitted
+ > once the legacy builder is removed.
type: "string"
x-nullable: false
example: ""
@@ -1990,6 +1968,11 @@ definitions:
The version of Docker that was used to build the image.
Depending on how the image was created, this field may be empty.
+
+ > **Deprecated**: This field is only set when using the deprecated
+ > legacy builder. It is included in API responses for informational
+ > purposes, but should not be depended on as it will be omitted
+ > once the legacy builder is removed.
type: "string"
x-nullable: false
example: "27.0.1"
@@ -2034,14 +2017,6 @@ definitions:
format: "int64"
x-nullable: false
example: 1239828
- VirtualSize:
- description: |
- Total size of the image including all layers it is composed of.
-
- Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead.
- type: "integer"
- format: "int64"
- example: 1239828
GraphDriver:
$ref: "#/definitions/DriverData"
RootFS:
@@ -2174,14 +2149,6 @@ definitions:
format: "int64"
x-nullable: false
example: 1239828
- VirtualSize:
- description: |-
- Total size of the image including all layers it is composed of.
-
- Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead.
- type: "integer"
- format: "int64"
- example: 172064416
Labels:
description: "User-defined key/value metadata."
type: "object"
@@ -2234,6 +2201,10 @@ definitions:
password:
type: "string"
email:
+ description: |
+ Email is an optional value associated with the username.
+
+ > **Deprecated**: This field is deprecated since docker 1.11 (API v1.23) and will be removed in a future release.
type: "string"
serveraddress:
type: "string"
@@ -2682,14 +2653,6 @@ definitions:
description: |
Unique ID of the build cache record.
example: "ndlpt0hhvkqcdfkputsk4cq9c"
- Parent:
- description: |
- ID of the parent build cache record.
-
- > **Deprecated**: This field is deprecated, and omitted if empty.
- type: "string"
- x-nullable: true
- example: ""
Parents:
description: |
List of parent build cache record IDs.
@@ -3171,10 +3134,15 @@ definitions:
- Args
properties:
DockerVersion:
- description: "Docker Version used to create the plugin"
+ description: |-
+ Docker Version used to create the plugin.
+
+ Depending on how the plugin was created, this field may be empty or omitted.
+
+ Deprecated: this field is no longer set, and will be removed in the next API version.
type: "string"
x-nullable: false
- example: "17.06.0-ce"
+ x-omitempty: true
Description:
type: "string"
x-nullable: false
@@ -4392,6 +4360,7 @@ definitions:
A counter that triggers an update even if no relevant parameters have
been changed.
type: "integer"
+ format: "uint64"
Runtime:
description: |
Runtime is the type of runtime specified for the task executor.
@@ -6375,6 +6344,8 @@ definitions:
Kernel memory TCP limits are not supported when using cgroups v2, which
does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup.
+
+ **Deprecated**: This field is deprecated as kernel 6.12 has deprecated kernel memory TCP accounting.
type: "boolean"
example: true
CpuCfsPeriod:
@@ -6412,29 +6383,6 @@ definitions:
description: "Indicates IPv4 forwarding is enabled."
type: "boolean"
example: true
- BridgeNfIptables:
- description: |
- Indicates if `bridge-nf-call-iptables` is available on the host when
- the daemon was started.
-
-
-
- > **Deprecated**: netfilter module is now loaded on-demand and no longer
- > during daemon startup, making this field obsolete. This field is always
- > `false` and will be removed in a API v1.49.
- type: "boolean"
- example: false
- BridgeNfIp6tables:
- description: |
- Indicates if `bridge-nf-call-ip6tables` is available on the host.
-
-
-
- > **Deprecated**: netfilter module is now loaded on-demand, and no longer
- > during daemon startup, making this field obsolete. This field is always
- > `false` and will be removed in a API v1.49.
- type: "boolean"
- example: false
Debug:
description: |
Indicates if the daemon is running in debug-mode / with debug-level
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/build/disk_usage.go b/hack/tools/vendor/github.com/docker/docker/api/types/build/disk_usage.go
index e969b6d615f2..cfd7333272c4 100644
--- a/hack/tools/vendor/github.com/docker/docker/api/types/build/disk_usage.go
+++ b/hack/tools/vendor/github.com/docker/docker/api/types/build/disk_usage.go
@@ -1,6 +1,8 @@
package build
// CacheDiskUsage contains disk usage for the build cache.
+//
+// Deprecated: this type is no longer used and will be removed in the next release.
type CacheDiskUsage struct {
TotalSize int64
Reclaimable int64
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/container/disk_usage.go b/hack/tools/vendor/github.com/docker/docker/api/types/container/disk_usage.go
index 05b6cbe9c709..d77538c2ab55 100644
--- a/hack/tools/vendor/github.com/docker/docker/api/types/container/disk_usage.go
+++ b/hack/tools/vendor/github.com/docker/docker/api/types/container/disk_usage.go
@@ -1,6 +1,8 @@
package container
// DiskUsage contains disk usage for containers.
+//
+// Deprecated: this type is no longer used and will be removed in the next release.
type DiskUsage struct {
TotalSize int64
Reclaimable int64
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/container/hostconfig.go b/hack/tools/vendor/github.com/docker/docker/api/types/container/hostconfig.go
index f63f049c7c25..7a41436cc702 100644
--- a/hack/tools/vendor/github.com/docker/docker/api/types/container/hostconfig.go
+++ b/hack/tools/vendor/github.com/docker/docker/api/types/container/hostconfig.go
@@ -394,7 +394,12 @@ type Resources struct {
// KernelMemory specifies the kernel memory limit (in bytes) for the container.
// Deprecated: kernel 5.4 deprecated kmem.limit_in_bytes.
- KernelMemory int64 `json:",omitempty"`
+ KernelMemory int64 `json:",omitempty"`
+ // Hard limit for kernel TCP buffer memory (in bytes).
+ //
+ // Deprecated: This field is deprecated and will be removed in the next release.
+ // Starting with 6.12, the kernel has deprecated kernel memory tcp accounting
+ // for cgroups v1.
KernelMemoryTCP int64 `json:",omitempty"` // Hard limit for kernel TCP buffer memory (in bytes)
MemoryReservation int64 // Memory soft limit (in bytes)
MemorySwap int64 // Total memory usage (memory + swap); set `-1` to enable unlimited swap
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/container/network_settings.go b/hack/tools/vendor/github.com/docker/docker/api/types/container/network_settings.go
index afec0e54323e..687145f2953a 100644
--- a/hack/tools/vendor/github.com/docker/docker/api/types/container/network_settings.go
+++ b/hack/tools/vendor/github.com/docker/docker/api/types/container/network_settings.go
@@ -13,8 +13,11 @@ type NetworkSettings struct {
}
// NetworkSettingsBase holds networking state for a container when inspecting it.
+//
+// Deprecated: Most fields in NetworkSettingsBase are deprecated. Fields which aren't deprecated will move to
+// NetworkSettings in v29.0, and this struct will be removed.
type NetworkSettingsBase struct {
- Bridge string // Bridge contains the name of the default bridge interface iff it was set through the daemon --bridge flag.
+ Bridge string // Deprecated: This field is only set when the daemon is started with the --bridge flag specified.
SandboxID string // SandboxID uniquely represents a container's network stack
SandboxKey string // SandboxKey identifies the sandbox
Ports nat.PortMap // Ports is a collection of PortBinding indexed by Port
@@ -35,18 +38,44 @@ type NetworkSettingsBase struct {
SecondaryIPv6Addresses []network.Address // Deprecated: This field is never set and will be removed in a future release.
}
-// DefaultNetworkSettings holds network information
-// during the 2 release deprecation period.
-// It will be removed in Docker 1.11.
+// DefaultNetworkSettings holds the networking state for the default bridge, if the container is connected to that
+// network.
+//
+// Deprecated: this struct is deprecated since Docker v1.11 and will be removed in v29. You should look for the default
+// network in NetworkSettings.Networks instead.
type DefaultNetworkSettings struct {
- EndpointID string // EndpointID uniquely represents a service endpoint in a Sandbox
- Gateway string // Gateway holds the gateway address for the network
- GlobalIPv6Address string // GlobalIPv6Address holds network's global IPv6 address
- GlobalIPv6PrefixLen int // GlobalIPv6PrefixLen represents mask length of network's global IPv6 address
- IPAddress string // IPAddress holds the IPv4 address for the network
- IPPrefixLen int // IPPrefixLen represents mask length of network's IPv4 address
- IPv6Gateway string // IPv6Gateway holds gateway address specific for IPv6
- MacAddress string // MacAddress holds the MAC address for the network
+ // EndpointID uniquely represents a service endpoint in a Sandbox
+ //
+ // Deprecated: This field will be removed in v29. You should look for the default network in NetworkSettings.Networks instead.
+ EndpointID string
+ // Gateway holds the gateway address for the network
+ //
+ // Deprecated: This field will be removed in v29. You should look for the default network in NetworkSettings.Networks instead.
+ Gateway string
+ // GlobalIPv6Address holds network's global IPv6 address
+ //
+ // Deprecated: This field will be removed in v29. You should look for the default network in NetworkSettings.Networks instead.
+ GlobalIPv6Address string
+ // GlobalIPv6PrefixLen represents mask length of network's global IPv6 address
+ //
+ // Deprecated: This field will be removed in v29. You should look for the default network in NetworkSettings.Networks instead.
+ GlobalIPv6PrefixLen int
+ // IPAddress holds the IPv4 address for the network
+ //
+ // Deprecated: This field will be removed in v29. You should look for the default network in NetworkSettings.Networks instead.
+ IPAddress string
+ // IPPrefixLen represents mask length of network's IPv4 address
+ //
+ // Deprecated: This field will be removed in v29. You should look for the default network in NetworkSettings.Networks instead.
+ IPPrefixLen int
+ // IPv6Gateway holds gateway address specific for IPv6
+ //
+ // Deprecated: This field will be removed in v29. You should look for the default network in NetworkSettings.Networks instead.
+ IPv6Gateway string
+ // MacAddress holds the MAC address for the network
+ //
+ // Deprecated: This field will be removed in v29. You should look for the default network in NetworkSettings.Networks instead.
+ MacAddress string
}
// NetworkSettingsSummary provides a summary of container's networks
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/filters/filters_deprecated.go b/hack/tools/vendor/github.com/docker/docker/api/types/filters/filters_deprecated.go
new file mode 100644
index 000000000000..4504cd7a7fef
--- /dev/null
+++ b/hack/tools/vendor/github.com/docker/docker/api/types/filters/filters_deprecated.go
@@ -0,0 +1,61 @@
+package filters
+
+import (
+ "encoding/json"
+
+ "github.com/docker/docker/api/types/versions"
+)
+
+// ToParamWithVersion encodes Args as a JSON string. If version is less than 1.22
+// then the encoded format will use an older legacy format where the values are a
+// list of strings, instead of a set.
+//
+// Deprecated: do not use in any new code; use ToJSON instead
+func ToParamWithVersion(version string, a Args) (string, error) {
+ out, err := ToJSON(a)
+ if out == "" || err != nil {
+ return "", nil
+ }
+ if version != "" && versions.LessThan(version, "1.22") {
+ return encodeLegacyFilters(out)
+ }
+ return out, nil
+}
+
+// encodeLegacyFilters encodes Args in the legacy format as used in API v1.21 and older.
+// where values are a list of strings, instead of a set.
+//
+// Don't use in any new code; use [filters.ToJSON]] instead.
+func encodeLegacyFilters(currentFormat string) (string, error) {
+ // The Args.fields field is not exported, but used to marshal JSON,
+ // so we'll marshal to the new format, then unmarshal to get the
+ // fields, and marshal again.
+ //
+ // This is far from optimal, but this code is only used for deprecated
+ // API versions, so should not be hit commonly.
+ var argsFields map[string]map[string]bool
+ err := json.Unmarshal([]byte(currentFormat), &argsFields)
+ if err != nil {
+ return "", err
+ }
+
+ buf, err := json.Marshal(convertArgsToSlice(argsFields))
+ if err != nil {
+ return "", err
+ }
+ return string(buf), nil
+}
+
+func convertArgsToSlice(f map[string]map[string]bool) map[string][]string {
+ m := map[string][]string{}
+ for k, v := range f {
+ values := []string{}
+ for kk := range v {
+ if v[kk] {
+ values = append(values, kk)
+ }
+ }
+ m[k] = values
+ }
+ return m
+}
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/filters/parse.go b/hack/tools/vendor/github.com/docker/docker/api/types/filters/parse.go
index 86f4bdb28e17..396657bb1921 100644
--- a/hack/tools/vendor/github.com/docker/docker/api/types/filters/parse.go
+++ b/hack/tools/vendor/github.com/docker/docker/api/types/filters/parse.go
@@ -8,8 +8,6 @@ import (
"encoding/json"
"regexp"
"strings"
-
- "github.com/docker/docker/api/types/versions"
)
// Args stores a mapping of keys to a set of multiple values.
@@ -63,24 +61,6 @@ func ToJSON(a Args) (string, error) {
return string(buf), err
}
-// ToParamWithVersion encodes Args as a JSON string. If version is less than 1.22
-// then the encoded format will use an older legacy format where the values are a
-// list of strings, instead of a set.
-//
-// Deprecated: do not use in any new code; use ToJSON instead
-func ToParamWithVersion(version string, a Args) (string, error) {
- if a.Len() == 0 {
- return "", nil
- }
-
- if version != "" && versions.LessThan(version, "1.22") {
- buf, err := json.Marshal(convertArgsToSlice(a.fields))
- return string(buf), err
- }
-
- return ToJSON(a)
-}
-
// FromJSON decodes a JSON encoded string into Args
func FromJSON(p string) (Args, error) {
args := NewArgs()
@@ -320,17 +300,3 @@ func deprecatedArgs(d map[string][]string) map[string]map[string]bool {
}
return m
}
-
-func convertArgsToSlice(f map[string]map[string]bool) map[string][]string {
- m := map[string][]string{}
- for k, v := range f {
- values := []string{}
- for kk := range v {
- if v[kk] {
- values = append(values, kk)
- }
- }
- m[k] = values
- }
- return m
-}
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/image/disk_usage.go b/hack/tools/vendor/github.com/docker/docker/api/types/image/disk_usage.go
index b29d925cac48..e847386a8d13 100644
--- a/hack/tools/vendor/github.com/docker/docker/api/types/image/disk_usage.go
+++ b/hack/tools/vendor/github.com/docker/docker/api/types/image/disk_usage.go
@@ -1,6 +1,8 @@
package image
// DiskUsage contains disk usage for images.
+//
+// Deprecated: this type is no longer used and will be removed in the next release.
type DiskUsage struct {
TotalSize int64
Reclaimable int64
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/image/image_inspect.go b/hack/tools/vendor/github.com/docker/docker/api/types/image/image_inspect.go
index 3bdb474287c0..1bec0b72b287 100644
--- a/hack/tools/vendor/github.com/docker/docker/api/types/image/image_inspect.go
+++ b/hack/tools/vendor/github.com/docker/docker/api/types/image/image_inspect.go
@@ -48,6 +48,8 @@ type InspectResponse struct {
// Depending on how the image was created, this field may be empty and
// is only set for images that were built/created locally. This field
// is empty if the image was pulled from an image registry.
+ //
+ // Deprecated: this field is deprecated, and will be removed in the next release.
Parent string
// Comment is an optional message that can be set when committing or
@@ -80,6 +82,8 @@ type InspectResponse struct {
// DockerVersion is the version of Docker that was used to build the image.
//
// Depending on how the image was created, this field may be empty.
+ //
+ // Deprecated: this field is deprecated, and will be removed in the next release.
DockerVersion string
// Author is the name of the author that was specified when committing the
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/network/endpoint.go b/hack/tools/vendor/github.com/docker/docker/api/types/network/endpoint.go
index 167ac70ab56a..cdc06c6c9001 100644
--- a/hack/tools/vendor/github.com/docker/docker/api/types/network/endpoint.go
+++ b/hack/tools/vendor/github.com/docker/docker/api/types/network/endpoint.go
@@ -4,8 +4,6 @@ import (
"errors"
"fmt"
"net"
-
- "github.com/docker/docker/internal/multierror"
)
// EndpointSettings stores the network endpoint details
@@ -99,7 +97,7 @@ func (cfg *EndpointIPAMConfig) IsInRange(v4Subnets []NetworkSubnet, v6Subnets []
errs = append(errs, err)
}
- return multierror.Join(errs...)
+ return errJoin(errs...)
}
func validateEndpointIPAddress(epAddr string, ipamSubnets []NetworkSubnet) error {
@@ -149,5 +147,5 @@ func (cfg *EndpointIPAMConfig) Validate() error {
}
}
- return multierror.Join(errs...)
+ return errJoin(errs...)
}
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/network/ipam.go b/hack/tools/vendor/github.com/docker/docker/api/types/network/ipam.go
index f319e1402b08..f9a9ff9b358f 100644
--- a/hack/tools/vendor/github.com/docker/docker/api/types/network/ipam.go
+++ b/hack/tools/vendor/github.com/docker/docker/api/types/network/ipam.go
@@ -4,8 +4,7 @@ import (
"errors"
"fmt"
"net/netip"
-
- "github.com/docker/docker/internal/multierror"
+ "strings"
)
// IPAM represents IP Address Management
@@ -72,7 +71,7 @@ func ValidateIPAM(ipam *IPAM, enableIPv6 bool) error {
}
}
- if err := multierror.Join(errs...); err != nil {
+ if err := errJoin(errs...); err != nil {
return fmt.Errorf("invalid network config:\n%w", err)
}
@@ -132,3 +131,43 @@ func validateAddress(address string, subnet netip.Prefix, subnetFamily ipFamily)
return nil
}
+
+func errJoin(errs ...error) error {
+ n := 0
+ for _, err := range errs {
+ if err != nil {
+ n++
+ }
+ }
+ if n == 0 {
+ return nil
+ }
+ e := &joinError{
+ errs: make([]error, 0, n),
+ }
+ for _, err := range errs {
+ if err != nil {
+ e.errs = append(e.errs, err)
+ }
+ }
+ return e
+}
+
+type joinError struct {
+ errs []error
+}
+
+func (e *joinError) Error() string {
+ if len(e.errs) == 1 {
+ return strings.TrimSpace(e.errs[0].Error())
+ }
+ stringErrs := make([]string, 0, len(e.errs))
+ for _, subErr := range e.errs {
+ stringErrs = append(stringErrs, strings.ReplaceAll(subErr.Error(), "\n", "\n\t"))
+ }
+ return "* " + strings.Join(stringErrs, "\n* ")
+}
+
+func (e *joinError) Unwrap() []error {
+ return e.errs
+}
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/plugin.go b/hack/tools/vendor/github.com/docker/docker/api/types/plugin.go
index abae48b9ab01..a9eff28a0485 100644
--- a/hack/tools/vendor/github.com/docker/docker/api/types/plugin.go
+++ b/hack/tools/vendor/github.com/docker/docker/api/types/plugin.go
@@ -42,7 +42,11 @@ type PluginConfig struct {
// Required: true
Description string `json:"Description"`
- // Docker Version used to create the plugin
+ // Docker Version used to create the plugin.
+ //
+ // Depending on how the plugin was created, this field may be empty or omitted.
+ //
+ // Deprecated: this field is no longer set, and will be removed in the next API version.
DockerVersion string `json:"DockerVersion,omitempty"`
// documentation
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/registry/authconfig.go b/hack/tools/vendor/github.com/docker/docker/api/types/registry/authconfig.go
index fa9037bdadfd..4c6d7ab2badf 100644
--- a/hack/tools/vendor/github.com/docker/docker/api/types/registry/authconfig.go
+++ b/hack/tools/vendor/github.com/docker/docker/api/types/registry/authconfig.go
@@ -32,8 +32,8 @@ type AuthConfig struct {
Auth string `json:"auth,omitempty"`
// Email is an optional value associated with the username.
- // This field is deprecated and will be removed in a later
- // version of docker.
+ //
+ // Deprecated: This field is deprecated since docker 1.11 (API v1.23) and will be removed in the next release.
Email string `json:"email,omitempty"`
ServerAddress string `json:"serveraddress,omitempty"`
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/swarm/runtime.go b/hack/tools/vendor/github.com/docker/docker/api/types/swarm/runtime.go
index 8a28320f7b85..3fda4ca65d1d 100644
--- a/hack/tools/vendor/github.com/docker/docker/api/types/swarm/runtime.go
+++ b/hack/tools/vendor/github.com/docker/docker/api/types/swarm/runtime.go
@@ -1,5 +1,7 @@
package swarm
+import "github.com/docker/docker/api/types/swarm/runtime"
+
// RuntimeType is the type of runtime used for the TaskSpec
type RuntimeType string
@@ -25,3 +27,11 @@ const (
type NetworkAttachmentSpec struct {
ContainerID string
}
+
+// RuntimeSpec defines the base payload which clients can specify for creating
+// a service with the plugin runtime.
+type RuntimeSpec = runtime.PluginSpec
+
+// RuntimePrivilege describes a permission the user has to accept
+// upon installing a plugin.
+type RuntimePrivilege = runtime.PluginPrivilege
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/swarm/runtime/gen.go b/hack/tools/vendor/github.com/docker/docker/api/types/swarm/runtime/gen.go
deleted file mode 100644
index 90e572cf9c90..000000000000
--- a/hack/tools/vendor/github.com/docker/docker/api/types/swarm/runtime/gen.go
+++ /dev/null
@@ -1,3 +0,0 @@
-//go:generate protoc --gogofaster_out=import_path=github.com/docker/docker/api/types/swarm/runtime:. plugin.proto
-
-package runtime
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.pb.go b/hack/tools/vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.pb.go
deleted file mode 100644
index 32aaf0d51990..000000000000
--- a/hack/tools/vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.pb.go
+++ /dev/null
@@ -1,808 +0,0 @@
-// Code generated by protoc-gen-gogo. DO NOT EDIT.
-// source: plugin.proto
-
-package runtime
-
-import (
- fmt "fmt"
- proto "github.com/gogo/protobuf/proto"
- io "io"
- math "math"
- math_bits "math/bits"
-)
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
-
-// PluginSpec defines the base payload which clients can specify for creating
-// a service with the plugin runtime.
-type PluginSpec struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- Remote string `protobuf:"bytes,2,opt,name=remote,proto3" json:"remote,omitempty"`
- Privileges []*PluginPrivilege `protobuf:"bytes,3,rep,name=privileges,proto3" json:"privileges,omitempty"`
- Disabled bool `protobuf:"varint,4,opt,name=disabled,proto3" json:"disabled,omitempty"`
- Env []string `protobuf:"bytes,5,rep,name=env,proto3" json:"env,omitempty"`
-}
-
-func (m *PluginSpec) Reset() { *m = PluginSpec{} }
-func (m *PluginSpec) String() string { return proto.CompactTextString(m) }
-func (*PluginSpec) ProtoMessage() {}
-func (*PluginSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_22a625af4bc1cc87, []int{0}
-}
-func (m *PluginSpec) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *PluginSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_PluginSpec.Marshal(b, m, deterministic)
- } else {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
- }
-}
-func (m *PluginSpec) XXX_Merge(src proto.Message) {
- xxx_messageInfo_PluginSpec.Merge(m, src)
-}
-func (m *PluginSpec) XXX_Size() int {
- return m.Size()
-}
-func (m *PluginSpec) XXX_DiscardUnknown() {
- xxx_messageInfo_PluginSpec.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_PluginSpec proto.InternalMessageInfo
-
-func (m *PluginSpec) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *PluginSpec) GetRemote() string {
- if m != nil {
- return m.Remote
- }
- return ""
-}
-
-func (m *PluginSpec) GetPrivileges() []*PluginPrivilege {
- if m != nil {
- return m.Privileges
- }
- return nil
-}
-
-func (m *PluginSpec) GetDisabled() bool {
- if m != nil {
- return m.Disabled
- }
- return false
-}
-
-func (m *PluginSpec) GetEnv() []string {
- if m != nil {
- return m.Env
- }
- return nil
-}
-
-// PluginPrivilege describes a permission the user has to accept
-// upon installing a plugin.
-type PluginPrivilege struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
- Value []string `protobuf:"bytes,3,rep,name=value,proto3" json:"value,omitempty"`
-}
-
-func (m *PluginPrivilege) Reset() { *m = PluginPrivilege{} }
-func (m *PluginPrivilege) String() string { return proto.CompactTextString(m) }
-func (*PluginPrivilege) ProtoMessage() {}
-func (*PluginPrivilege) Descriptor() ([]byte, []int) {
- return fileDescriptor_22a625af4bc1cc87, []int{1}
-}
-func (m *PluginPrivilege) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *PluginPrivilege) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_PluginPrivilege.Marshal(b, m, deterministic)
- } else {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
- }
-}
-func (m *PluginPrivilege) XXX_Merge(src proto.Message) {
- xxx_messageInfo_PluginPrivilege.Merge(m, src)
-}
-func (m *PluginPrivilege) XXX_Size() int {
- return m.Size()
-}
-func (m *PluginPrivilege) XXX_DiscardUnknown() {
- xxx_messageInfo_PluginPrivilege.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_PluginPrivilege proto.InternalMessageInfo
-
-func (m *PluginPrivilege) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *PluginPrivilege) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-func (m *PluginPrivilege) GetValue() []string {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-func init() {
- proto.RegisterType((*PluginSpec)(nil), "PluginSpec")
- proto.RegisterType((*PluginPrivilege)(nil), "PluginPrivilege")
-}
-
-func init() { proto.RegisterFile("plugin.proto", fileDescriptor_22a625af4bc1cc87) }
-
-var fileDescriptor_22a625af4bc1cc87 = []byte{
- // 225 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0xc8, 0x29, 0x4d,
- 0xcf, 0xcc, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x57, 0x9a, 0xc1, 0xc8, 0xc5, 0x15, 0x00, 0x16,
- 0x08, 0x2e, 0x48, 0x4d, 0x16, 0x12, 0xe2, 0x62, 0xc9, 0x4b, 0xcc, 0x4d, 0x95, 0x60, 0x54, 0x60,
- 0xd4, 0xe0, 0x0c, 0x02, 0xb3, 0x85, 0xc4, 0xb8, 0xd8, 0x8a, 0x52, 0x73, 0xf3, 0x4b, 0x52, 0x25,
- 0x98, 0xc0, 0xa2, 0x50, 0x9e, 0x90, 0x01, 0x17, 0x57, 0x41, 0x51, 0x66, 0x59, 0x66, 0x4e, 0x6a,
- 0x7a, 0x6a, 0xb1, 0x04, 0xb3, 0x02, 0xb3, 0x06, 0xb7, 0x91, 0x80, 0x1e, 0xc4, 0xb0, 0x00, 0x98,
- 0x44, 0x10, 0x92, 0x1a, 0x21, 0x29, 0x2e, 0x8e, 0x94, 0xcc, 0xe2, 0xc4, 0xa4, 0x9c, 0xd4, 0x14,
- 0x09, 0x16, 0x05, 0x46, 0x0d, 0x8e, 0x20, 0x38, 0x5f, 0x48, 0x80, 0x8b, 0x39, 0x35, 0xaf, 0x4c,
- 0x82, 0x55, 0x81, 0x59, 0x83, 0x33, 0x08, 0xc4, 0x54, 0x8a, 0xe5, 0xe2, 0x47, 0x33, 0x0c, 0xab,
- 0xf3, 0x14, 0xb8, 0xb8, 0x53, 0x52, 0x8b, 0x93, 0x8b, 0x32, 0x0b, 0x4a, 0x32, 0xf3, 0xf3, 0xa0,
- 0x6e, 0x44, 0x16, 0x12, 0x12, 0xe1, 0x62, 0x2d, 0x4b, 0xcc, 0x29, 0x4d, 0x05, 0xbb, 0x91, 0x33,
- 0x08, 0xc2, 0x71, 0x92, 0x38, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4,
- 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x24, 0x36,
- 0x70, 0xd0, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x37, 0xea, 0xe2, 0xca, 0x2a, 0x01, 0x00,
- 0x00,
-}
-
-func (m *PluginSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PluginSpec) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *PluginSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Env) > 0 {
- for iNdEx := len(m.Env) - 1; iNdEx >= 0; iNdEx-- {
- i -= len(m.Env[iNdEx])
- copy(dAtA[i:], m.Env[iNdEx])
- i = encodeVarintPlugin(dAtA, i, uint64(len(m.Env[iNdEx])))
- i--
- dAtA[i] = 0x2a
- }
- }
- if m.Disabled {
- i--
- if m.Disabled {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i--
- dAtA[i] = 0x20
- }
- if len(m.Privileges) > 0 {
- for iNdEx := len(m.Privileges) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Privileges[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintPlugin(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x1a
- }
- }
- if len(m.Remote) > 0 {
- i -= len(m.Remote)
- copy(dAtA[i:], m.Remote)
- i = encodeVarintPlugin(dAtA, i, uint64(len(m.Remote)))
- i--
- dAtA[i] = 0x12
- }
- if len(m.Name) > 0 {
- i -= len(m.Name)
- copy(dAtA[i:], m.Name)
- i = encodeVarintPlugin(dAtA, i, uint64(len(m.Name)))
- i--
- dAtA[i] = 0xa
- }
- return len(dAtA) - i, nil
-}
-
-func (m *PluginPrivilege) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PluginPrivilege) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *PluginPrivilege) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Value) > 0 {
- for iNdEx := len(m.Value) - 1; iNdEx >= 0; iNdEx-- {
- i -= len(m.Value[iNdEx])
- copy(dAtA[i:], m.Value[iNdEx])
- i = encodeVarintPlugin(dAtA, i, uint64(len(m.Value[iNdEx])))
- i--
- dAtA[i] = 0x1a
- }
- }
- if len(m.Description) > 0 {
- i -= len(m.Description)
- copy(dAtA[i:], m.Description)
- i = encodeVarintPlugin(dAtA, i, uint64(len(m.Description)))
- i--
- dAtA[i] = 0x12
- }
- if len(m.Name) > 0 {
- i -= len(m.Name)
- copy(dAtA[i:], m.Name)
- i = encodeVarintPlugin(dAtA, i, uint64(len(m.Name)))
- i--
- dAtA[i] = 0xa
- }
- return len(dAtA) - i, nil
-}
-
-func encodeVarintPlugin(dAtA []byte, offset int, v uint64) int {
- offset -= sovPlugin(v)
- base := offset
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return base
-}
-func (m *PluginSpec) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Name)
- if l > 0 {
- n += 1 + l + sovPlugin(uint64(l))
- }
- l = len(m.Remote)
- if l > 0 {
- n += 1 + l + sovPlugin(uint64(l))
- }
- if len(m.Privileges) > 0 {
- for _, e := range m.Privileges {
- l = e.Size()
- n += 1 + l + sovPlugin(uint64(l))
- }
- }
- if m.Disabled {
- n += 2
- }
- if len(m.Env) > 0 {
- for _, s := range m.Env {
- l = len(s)
- n += 1 + l + sovPlugin(uint64(l))
- }
- }
- return n
-}
-
-func (m *PluginPrivilege) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Name)
- if l > 0 {
- n += 1 + l + sovPlugin(uint64(l))
- }
- l = len(m.Description)
- if l > 0 {
- n += 1 + l + sovPlugin(uint64(l))
- }
- if len(m.Value) > 0 {
- for _, s := range m.Value {
- l = len(s)
- n += 1 + l + sovPlugin(uint64(l))
- }
- }
- return n
-}
-
-func sovPlugin(x uint64) (n int) {
- return (math_bits.Len64(x|1) + 6) / 7
-}
-func sozPlugin(x uint64) (n int) {
- return sovPlugin(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (m *PluginSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PluginSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PluginSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthPlugin
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthPlugin
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Remote", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthPlugin
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthPlugin
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Remote = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Privileges", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthPlugin
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthPlugin
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Privileges = append(m.Privileges, &PluginPrivilege{})
- if err := m.Privileges[len(m.Privileges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Disabled", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Disabled = bool(v != 0)
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthPlugin
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthPlugin
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Env = append(m.Env, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipPlugin(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthPlugin
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PluginPrivilege) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PluginPrivilege: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PluginPrivilege: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthPlugin
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthPlugin
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthPlugin
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthPlugin
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Description = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthPlugin
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthPlugin
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Value = append(m.Value, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipPlugin(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthPlugin
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipPlugin(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- depth := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- case 1:
- iNdEx += 8
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if length < 0 {
- return 0, ErrInvalidLengthPlugin
- }
- iNdEx += length
- case 3:
- depth++
- case 4:
- if depth == 0 {
- return 0, ErrUnexpectedEndOfGroupPlugin
- }
- depth--
- case 5:
- iNdEx += 4
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- if iNdEx < 0 {
- return 0, ErrInvalidLengthPlugin
- }
- if depth == 0 {
- return iNdEx, nil
- }
- }
- return 0, io.ErrUnexpectedEOF
-}
-
-var (
- ErrInvalidLengthPlugin = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowPlugin = fmt.Errorf("proto: integer overflow")
- ErrUnexpectedEndOfGroupPlugin = fmt.Errorf("proto: unexpected end of group")
-)
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.proto b/hack/tools/vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.proto
deleted file mode 100644
index e311b36ba2cf..000000000000
--- a/hack/tools/vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.proto
+++ /dev/null
@@ -1,19 +0,0 @@
-syntax = "proto3";
-
-// PluginSpec defines the base payload which clients can specify for creating
-// a service with the plugin runtime.
-message PluginSpec {
- string name = 1;
- string remote = 2;
- repeated PluginPrivilege privileges = 3;
- bool disabled = 4;
- repeated string env = 5;
-}
-
-// PluginPrivilege describes a permission the user has to accept
-// upon installing a plugin.
-message PluginPrivilege {
- string name = 1;
- string description = 2;
- repeated string value = 3;
-}
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/swarm/runtime/runtime.go b/hack/tools/vendor/github.com/docker/docker/api/types/swarm/runtime/runtime.go
new file mode 100644
index 000000000000..95176b268186
--- /dev/null
+++ b/hack/tools/vendor/github.com/docker/docker/api/types/swarm/runtime/runtime.go
@@ -0,0 +1,27 @@
+package runtime
+
+import "fmt"
+
+// PluginSpec defines the base payload which clients can specify for creating
+// a service with the plugin runtime.
+type PluginSpec struct {
+ Name string `json:"name,omitempty"`
+ Remote string `json:"remote,omitempty"`
+ Privileges []*PluginPrivilege `json:"privileges,omitempty"`
+ Disabled bool `json:"disabled,omitempty"`
+ Env []string `json:"env,omitempty"`
+}
+
+// PluginPrivilege describes a permission the user has to accept
+// upon installing a plugin.
+type PluginPrivilege struct {
+ Name string `json:"name,omitempty"`
+ Description string `json:"description,omitempty"`
+ Value []string `json:"value,omitempty"`
+}
+
+var (
+ ErrInvalidLengthPlugin = fmt.Errorf("proto: negative length found during unmarshaling") // Deprecated: this error was only used internally and is no longer used.
+ ErrIntOverflowPlugin = fmt.Errorf("proto: integer overflow") // Deprecated: this error was only used internally and is no longer used.
+ ErrUnexpectedEndOfGroupPlugin = fmt.Errorf("proto: unexpected end of group") // Deprecated: this error was only used internally and is no longer used.
+)
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/swarm/task.go b/hack/tools/vendor/github.com/docker/docker/api/types/swarm/task.go
index 4dc95e8b1dde..e143f844fa8f 100644
--- a/hack/tools/vendor/github.com/docker/docker/api/types/swarm/task.go
+++ b/hack/tools/vendor/github.com/docker/docker/api/types/swarm/task.go
@@ -4,7 +4,6 @@ import (
"time"
"github.com/docker/docker/api/types/filters"
- "github.com/docker/docker/api/types/swarm/runtime"
)
// TaskState represents the state of a task.
@@ -77,7 +76,7 @@ type TaskSpec struct {
// NetworkAttachmentSpec is used if the `Runtime` field is set to
// `attachment`.
ContainerSpec *ContainerSpec `json:",omitempty"`
- PluginSpec *runtime.PluginSpec `json:",omitempty"`
+ PluginSpec *RuntimeSpec `json:",omitempty"`
NetworkAttachmentSpec *NetworkAttachmentSpec `json:",omitempty"`
Resources *ResourceRequirements `json:",omitempty"`
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/system/disk_usage.go b/hack/tools/vendor/github.com/docker/docker/api/types/system/disk_usage.go
deleted file mode 100644
index 99078cf196d0..000000000000
--- a/hack/tools/vendor/github.com/docker/docker/api/types/system/disk_usage.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package system
-
-import (
- "github.com/docker/docker/api/types/build"
- "github.com/docker/docker/api/types/container"
- "github.com/docker/docker/api/types/image"
- "github.com/docker/docker/api/types/volume"
-)
-
-// DiskUsage contains response of Engine API for API 1.49 and greater:
-// GET "/system/df"
-type DiskUsage struct {
- Images *image.DiskUsage
- Containers *container.DiskUsage
- Volumes *volume.DiskUsage
- BuildCache *build.CacheDiskUsage
-}
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/system/info.go b/hack/tools/vendor/github.com/docker/docker/api/types/system/info.go
index 047639ed91e2..0f39099d8ab5 100644
--- a/hack/tools/vendor/github.com/docker/docker/api/types/system/info.go
+++ b/hack/tools/vendor/github.com/docker/docker/api/types/system/info.go
@@ -9,19 +9,23 @@ import (
// Info contains response of Engine API:
// GET "/info"
type Info struct {
- ID string
- Containers int
- ContainersRunning int
- ContainersPaused int
- ContainersStopped int
- Images int
- Driver string
- DriverStatus [][2]string
- SystemStatus [][2]string `json:",omitempty"` // SystemStatus is only propagated by the Swarm standalone API
- Plugins PluginsInfo
- MemoryLimit bool
- SwapLimit bool
- KernelMemory bool `json:",omitempty"` // Deprecated: kernel 5.4 deprecated kmem.limit_in_bytes
+ ID string
+ Containers int
+ ContainersRunning int
+ ContainersPaused int
+ ContainersStopped int
+ Images int
+ Driver string
+ DriverStatus [][2]string
+ SystemStatus [][2]string `json:",omitempty"` // SystemStatus is only propagated by the Swarm standalone API
+ Plugins PluginsInfo
+ MemoryLimit bool
+ SwapLimit bool
+ KernelMemory bool `json:",omitempty"` // Deprecated: kernel 5.4 deprecated kmem.limit_in_bytes
+ // KernelMemoryLimit is not supported on cgroups v2.
+ //
+ // Deprecated: This field is deprecated and will be removed in the next release.
+ // Starting with kernel 6.12, the kernel has deprecated kernel memory tcp accounting
KernelMemoryTCP bool `json:",omitempty"` // KernelMemoryTCP is not supported on cgroups v2.
CPUCfsPeriod bool `json:"CpuCfsPeriod"`
CPUCfsQuota bool `json:"CpuCfsQuota"`
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/types_deprecated.go b/hack/tools/vendor/github.com/docker/docker/api/types/types_deprecated.go
index 8456a45607e2..c9c20b873604 100644
--- a/hack/tools/vendor/github.com/docker/docker/api/types/types_deprecated.go
+++ b/hack/tools/vendor/github.com/docker/docker/api/types/types_deprecated.go
@@ -46,15 +46,16 @@ type NetworkSettings = container.NetworkSettings
// NetworkSettingsBase holds networking state for a container when inspecting it.
//
-// Deprecated: use [container.NetworkSettingsBase].
-type NetworkSettingsBase = container.NetworkSettingsBase
+// Deprecated: [container.NetworkSettingsBase] will be removed in v29. Prefer
+// accessing the fields it contains through [container.NetworkSettings].
+type NetworkSettingsBase = container.NetworkSettingsBase //nolint:staticcheck // ignore SA1019: NetworkSettingsBase is deprecated in v28.4.
// DefaultNetworkSettings holds network information
// during the 2 release deprecation period.
// It will be removed in Docker 1.11.
//
// Deprecated: use [container.DefaultNetworkSettings].
-type DefaultNetworkSettings = container.DefaultNetworkSettings
+type DefaultNetworkSettings = container.DefaultNetworkSettings //nolint:staticcheck // ignore SA1019: DefaultNetworkSettings is deprecated in v28.4.
// SummaryNetworkSettings provides a summary of container's networks
// in /containers/json.
diff --git a/hack/tools/vendor/github.com/docker/docker/api/types/volume/disk_usage.go b/hack/tools/vendor/github.com/docker/docker/api/types/volume/disk_usage.go
index 3d716c6e00d9..88974303a0b0 100644
--- a/hack/tools/vendor/github.com/docker/docker/api/types/volume/disk_usage.go
+++ b/hack/tools/vendor/github.com/docker/docker/api/types/volume/disk_usage.go
@@ -1,6 +1,8 @@
package volume
// DiskUsage contains disk usage for volumes.
+//
+// Deprecated: this type is no longer used and will be removed in the next release.
type DiskUsage struct {
TotalSize int64
Reclaimable int64
diff --git a/hack/tools/vendor/github.com/docker/docker/client/client.go b/hack/tools/vendor/github.com/docker/docker/client/client.go
index d6e014dddf81..8acfb7f490e4 100644
--- a/hack/tools/vendor/github.com/docker/docker/client/client.go
+++ b/hack/tools/vendor/github.com/docker/docker/client/client.go
@@ -463,7 +463,9 @@ func (cli *Client) dialer() func(context.Context) (net.Conn, error) {
case "unix":
return net.Dial(cli.proto, cli.addr)
case "npipe":
- return sockets.DialPipe(cli.addr, 32*time.Second)
+ ctx, cancel := context.WithTimeout(ctx, 32*time.Second)
+ defer cancel()
+ return dialPipeContext(ctx, cli.addr)
default:
if tlsConfig := cli.tlsConfig(); tlsConfig != nil {
return tls.Dial(cli.proto, cli.addr, tlsConfig)
diff --git a/hack/tools/vendor/github.com/docker/docker/client/client_unix.go b/hack/tools/vendor/github.com/docker/docker/client/client_unix.go
index e5b921b40642..1fb9fbfb9e55 100644
--- a/hack/tools/vendor/github.com/docker/docker/client/client_unix.go
+++ b/hack/tools/vendor/github.com/docker/docker/client/client_unix.go
@@ -2,6 +2,17 @@
package client
+import (
+ "context"
+ "net"
+ "syscall"
+)
+
// DefaultDockerHost defines OS-specific default host if the DOCKER_HOST
// (EnvOverrideHost) environment variable is unset or empty.
const DefaultDockerHost = "unix:///var/run/docker.sock"
+
+// dialPipeContext connects to a Windows named pipe. It is not supported on non-Windows.
+func dialPipeContext(_ context.Context, _ string) (net.Conn, error) {
+ return nil, syscall.EAFNOSUPPORT
+}
diff --git a/hack/tools/vendor/github.com/docker/docker/client/client_windows.go b/hack/tools/vendor/github.com/docker/docker/client/client_windows.go
index 19b954b2fd78..b471c0612403 100644
--- a/hack/tools/vendor/github.com/docker/docker/client/client_windows.go
+++ b/hack/tools/vendor/github.com/docker/docker/client/client_windows.go
@@ -1,5 +1,17 @@
package client
+import (
+ "context"
+ "net"
+
+ "github.com/Microsoft/go-winio"
+)
+
// DefaultDockerHost defines OS-specific default host if the DOCKER_HOST
// (EnvOverrideHost) environment variable is unset or empty.
const DefaultDockerHost = "npipe:////./pipe/docker_engine"
+
+// dialPipeContext connects to a Windows named pipe. It is not supported on non-Windows.
+func dialPipeContext(ctx context.Context, addr string) (net.Conn, error) {
+ return winio.DialPipeContext(ctx, addr)
+}
diff --git a/hack/tools/vendor/github.com/docker/docker/client/container_stats.go b/hack/tools/vendor/github.com/docker/docker/client/container_stats.go
index 2244e0f4b94a..076954f4c3e8 100644
--- a/hack/tools/vendor/github.com/docker/docker/client/container_stats.go
+++ b/hack/tools/vendor/github.com/docker/docker/client/container_stats.go
@@ -28,7 +28,7 @@ func (cli *Client) ContainerStats(ctx context.Context, containerID string, strea
return container.StatsResponseReader{
Body: resp.Body,
- OSType: getDockerOS(resp.Header.Get("Server")),
+ OSType: resp.Header.Get("Ostype"),
}, nil
}
@@ -51,6 +51,6 @@ func (cli *Client) ContainerStatsOneShot(ctx context.Context, containerID string
return container.StatsResponseReader{
Body: resp.Body,
- OSType: getDockerOS(resp.Header.Get("Server")),
+ OSType: resp.Header.Get("Ostype"),
}, nil
}
diff --git a/hack/tools/vendor/github.com/docker/docker/client/image_build.go b/hack/tools/vendor/github.com/docker/docker/client/image_build.go
index 66ca75e4af28..1ed0878bfdb2 100644
--- a/hack/tools/vendor/github.com/docker/docker/client/image_build.go
+++ b/hack/tools/vendor/github.com/docker/docker/client/image_build.go
@@ -40,7 +40,7 @@ func (cli *Client) ImageBuild(ctx context.Context, buildContext io.Reader, optio
return build.ImageBuildResponse{
Body: resp.Body,
- OSType: getDockerOS(resp.Header.Get("Server")),
+ OSType: resp.Header.Get("Ostype"),
}, nil
}
diff --git a/hack/tools/vendor/github.com/docker/docker/client/utils.go b/hack/tools/vendor/github.com/docker/docker/client/utils.go
index 67e1e6934b59..7b82f185ac58 100644
--- a/hack/tools/vendor/github.com/docker/docker/client/utils.go
+++ b/hack/tools/vendor/github.com/docker/docker/client/utils.go
@@ -8,12 +8,9 @@ import (
cerrdefs "github.com/containerd/errdefs"
"github.com/docker/docker/api/types/filters"
- "github.com/docker/docker/internal/lazyregexp"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)
-var headerRegexp = lazyregexp.New(`\ADocker/.+\s\((.+)\)\z`)
-
type emptyIDError string
func (e emptyIDError) InvalidParameter() {}
@@ -31,16 +28,6 @@ func trimID(objType, id string) (string, error) {
return id, nil
}
-// getDockerOS returns the operating system based on the server header from the daemon.
-func getDockerOS(serverHeader string) string {
- var osType string
- matches := headerRegexp.FindStringSubmatch(serverHeader)
- if len(matches) > 0 {
- osType = matches[1]
- }
- return osType
-}
-
// getFiltersQuery returns a url query with "filters" query term, based on the
// filters provided.
func getFiltersQuery(f filters.Args) (url.Values, error) {
diff --git a/hack/tools/vendor/github.com/docker/docker/internal/lazyregexp/lazyregexp.go b/hack/tools/vendor/github.com/docker/docker/internal/lazyregexp/lazyregexp.go
deleted file mode 100644
index 6334edb60dca..000000000000
--- a/hack/tools/vendor/github.com/docker/docker/internal/lazyregexp/lazyregexp.go
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2018 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Code below was largely copied from golang.org/x/mod@v0.22;
-// https://github.com/golang/mod/blob/v0.22.0/internal/lazyregexp/lazyre.go
-// with some additional methods added.
-
-// Package lazyregexp is a thin wrapper over regexp, allowing the use of global
-// regexp variables without forcing them to be compiled at init.
-package lazyregexp
-
-import (
- "os"
- "regexp"
- "strings"
- "sync"
-)
-
-// Regexp is a wrapper around [regexp.Regexp], where the underlying regexp will be
-// compiled the first time it is needed.
-type Regexp struct {
- str string
- once sync.Once
- rx *regexp.Regexp
-}
-
-func (r *Regexp) re() *regexp.Regexp {
- r.once.Do(r.build)
- return r.rx
-}
-
-func (r *Regexp) build() {
- r.rx = regexp.MustCompile(r.str)
- r.str = ""
-}
-
-func (r *Regexp) FindSubmatch(s []byte) [][]byte {
- return r.re().FindSubmatch(s)
-}
-
-func (r *Regexp) FindAllStringSubmatch(s string, n int) [][]string {
- return r.re().FindAllStringSubmatch(s, n)
-}
-
-func (r *Regexp) FindStringSubmatch(s string) []string {
- return r.re().FindStringSubmatch(s)
-}
-
-func (r *Regexp) FindStringSubmatchIndex(s string) []int {
- return r.re().FindStringSubmatchIndex(s)
-}
-
-func (r *Regexp) ReplaceAllString(src, repl string) string {
- return r.re().ReplaceAllString(src, repl)
-}
-
-func (r *Regexp) FindString(s string) string {
- return r.re().FindString(s)
-}
-
-func (r *Regexp) FindAllString(s string, n int) []string {
- return r.re().FindAllString(s, n)
-}
-
-func (r *Regexp) MatchString(s string) bool {
- return r.re().MatchString(s)
-}
-
-func (r *Regexp) ReplaceAllStringFunc(src string, repl func(string) string) string {
- return r.re().ReplaceAllStringFunc(src, repl)
-}
-
-func (r *Regexp) SubexpNames() []string {
- return r.re().SubexpNames()
-}
-
-var inTest = len(os.Args) > 0 && strings.HasSuffix(strings.TrimSuffix(os.Args[0], ".exe"), ".test")
-
-// New creates a new lazy regexp, delaying the compiling work until it is first
-// needed. If the code is being run as part of tests, the regexp compiling will
-// happen immediately.
-func New(str string) *Regexp {
- lr := &Regexp{str: str}
- if inTest {
- // In tests, always compile the regexps early.
- lr.re()
- }
- return lr
-}
diff --git a/hack/tools/vendor/github.com/docker/docker/internal/multierror/multierror.go b/hack/tools/vendor/github.com/docker/docker/internal/multierror/multierror.go
deleted file mode 100644
index e899f4de85c9..000000000000
--- a/hack/tools/vendor/github.com/docker/docker/internal/multierror/multierror.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package multierror
-
-import (
- "strings"
-)
-
-// Join is a drop-in replacement for errors.Join with better formatting.
-func Join(errs ...error) error {
- n := 0
- for _, err := range errs {
- if err != nil {
- n++
- }
- }
- if n == 0 {
- return nil
- }
- e := &joinError{
- errs: make([]error, 0, n),
- }
- for _, err := range errs {
- if err != nil {
- e.errs = append(e.errs, err)
- }
- }
- return e
-}
-
-type joinError struct {
- errs []error
-}
-
-func (e *joinError) Error() string {
- if len(e.errs) == 1 {
- return strings.TrimSpace(e.errs[0].Error())
- }
- stringErrs := make([]string, 0, len(e.errs))
- for _, subErr := range e.errs {
- stringErrs = append(stringErrs, strings.ReplaceAll(subErr.Error(), "\n", "\n\t"))
- }
- return "* " + strings.Join(stringErrs, "\n* ")
-}
-
-func (e *joinError) Unwrap() []error {
- return e.errs
-}
diff --git a/hack/tools/vendor/github.com/docker/go-connections/nat/nat.go b/hack/tools/vendor/github.com/docker/go-connections/nat/nat.go
index 4049d780c54a..1ffe0355dc15 100644
--- a/hack/tools/vendor/github.com/docker/go-connections/nat/nat.go
+++ b/hack/tools/vendor/github.com/docker/go-connections/nat/nat.go
@@ -2,6 +2,7 @@
package nat
import (
+ "errors"
"fmt"
"net"
"strconv"
@@ -43,19 +44,19 @@ func NewPort(proto, port string) (Port, error) {
// ParsePort parses the port number string and returns an int
func ParsePort(rawPort string) (int, error) {
- if len(rawPort) == 0 {
+ if rawPort == "" {
return 0, nil
}
port, err := strconv.ParseUint(rawPort, 10, 16)
if err != nil {
- return 0, err
+ return 0, fmt.Errorf("invalid port '%s': %w", rawPort, errors.Unwrap(err))
}
return int(port), nil
}
// ParsePortRangeToInt parses the port range string and returns start/end ints
func ParsePortRangeToInt(rawPort string) (int, int, error) {
- if len(rawPort) == 0 {
+ if rawPort == "" {
return 0, 0, nil
}
start, end, err := ParsePortRange(rawPort)
@@ -91,29 +92,31 @@ func (p Port) Range() (int, int, error) {
return ParsePortRangeToInt(p.Port())
}
-// SplitProtoPort splits a port in the format of proto/port
-func SplitProtoPort(rawPort string) (string, string) {
- parts := strings.Split(rawPort, "/")
- l := len(parts)
- if len(rawPort) == 0 || l == 0 || len(parts[0]) == 0 {
+// SplitProtoPort splits a port(range) and protocol, formatted as "/[]"
+// "/[]". It returns an empty string for both if
+// no port(range) is provided. If a port(range) is provided, but no protocol,
+// the default ("tcp") protocol is returned.
+//
+// SplitProtoPort does not validate or normalize the returned values.
+func SplitProtoPort(rawPort string) (proto string, port string) {
+ port, proto, _ = strings.Cut(rawPort, "/")
+ if port == "" {
return "", ""
}
- if l == 1 {
- return "tcp", rawPort
+ if proto == "" {
+ proto = "tcp"
}
- if len(parts[1]) == 0 {
- return "tcp", parts[0]
- }
- return parts[1], parts[0]
+ return proto, port
}
-func validateProto(proto string) bool {
- for _, availableProto := range []string{"tcp", "udp", "sctp"} {
- if availableProto == proto {
- return true
- }
+func validateProto(proto string) error {
+ switch proto {
+ case "tcp", "udp", "sctp":
+ // All good
+ return nil
+ default:
+ return errors.New("invalid proto: " + proto)
}
- return false
}
// ParsePortSpecs receives port specs in the format of ip:public:private/proto and parses
@@ -123,22 +126,18 @@ func ParsePortSpecs(ports []string) (map[Port]struct{}, map[Port][]PortBinding,
exposedPorts = make(map[Port]struct{}, len(ports))
bindings = make(map[Port][]PortBinding)
)
- for _, rawPort := range ports {
- portMappings, err := ParsePortSpec(rawPort)
+ for _, p := range ports {
+ portMappings, err := ParsePortSpec(p)
if err != nil {
return nil, nil, err
}
- for _, portMapping := range portMappings {
- port := portMapping.Port
- if _, exists := exposedPorts[port]; !exists {
+ for _, pm := range portMappings {
+ port := pm.Port
+ if _, ok := exposedPorts[port]; !ok {
exposedPorts[port] = struct{}{}
}
- bslice, exists := bindings[port]
- if !exists {
- bslice = []PortBinding{}
- }
- bindings[port] = append(bslice, portMapping.Binding)
+ bindings[port] = append(bindings[port], pm.Binding)
}
}
return exposedPorts, bindings, nil
@@ -150,28 +149,34 @@ type PortMapping struct {
Binding PortBinding
}
-func splitParts(rawport string) (string, string, string) {
+func (p *PortMapping) String() string {
+ return net.JoinHostPort(p.Binding.HostIP, p.Binding.HostPort+":"+string(p.Port))
+}
+
+func splitParts(rawport string) (hostIP, hostPort, containerPort string) {
parts := strings.Split(rawport, ":")
- n := len(parts)
- containerPort := parts[n-1]
- switch n {
+ switch len(parts) {
case 1:
- return "", "", containerPort
+ return "", "", parts[0]
case 2:
- return "", parts[0], containerPort
+ return "", parts[0], parts[1]
case 3:
- return parts[0], parts[1], containerPort
+ return parts[0], parts[1], parts[2]
default:
- return strings.Join(parts[:n-2], ":"), parts[n-2], containerPort
+ n := len(parts)
+ return strings.Join(parts[:n-2], ":"), parts[n-2], parts[n-1]
}
}
// ParsePortSpec parses a port specification string into a slice of PortMappings
func ParsePortSpec(rawPort string) ([]PortMapping, error) {
- var proto string
ip, hostPort, containerPort := splitParts(rawPort)
- proto, containerPort = SplitProtoPort(containerPort)
+ proto, containerPort := SplitProtoPort(containerPort)
+ proto = strings.ToLower(proto)
+ if err := validateProto(proto); err != nil {
+ return nil, err
+ }
if ip != "" && ip[0] == '[' {
// Strip [] from IPV6 addresses
@@ -182,7 +187,7 @@ func ParsePortSpec(rawPort string) ([]PortMapping, error) {
ip = rawIP
}
if ip != "" && net.ParseIP(ip) == nil {
- return nil, fmt.Errorf("invalid IP address: %s", ip)
+ return nil, errors.New("invalid IP address: " + ip)
}
if containerPort == "" {
return nil, fmt.Errorf("no port specified: %s", rawPort)
@@ -190,51 +195,43 @@ func ParsePortSpec(rawPort string) ([]PortMapping, error) {
startPort, endPort, err := ParsePortRange(containerPort)
if err != nil {
- return nil, fmt.Errorf("invalid containerPort: %s", containerPort)
+ return nil, errors.New("invalid containerPort: " + containerPort)
}
- var startHostPort, endHostPort uint64 = 0, 0
- if len(hostPort) > 0 {
+ var startHostPort, endHostPort uint64
+ if hostPort != "" {
startHostPort, endHostPort, err = ParsePortRange(hostPort)
if err != nil {
- return nil, fmt.Errorf("invalid hostPort: %s", hostPort)
+ return nil, errors.New("invalid hostPort: " + hostPort)
}
- }
-
- if hostPort != "" && (endPort-startPort) != (endHostPort-startHostPort) {
- // Allow host port range iff containerPort is not a range.
- // In this case, use the host port range as the dynamic
- // host port range to allocate into.
- if endPort != startPort {
- return nil, fmt.Errorf("invalid ranges specified for container and host Ports: %s and %s", containerPort, hostPort)
+ if (endPort - startPort) != (endHostPort - startHostPort) {
+ // Allow host port range iff containerPort is not a range.
+ // In this case, use the host port range as the dynamic
+ // host port range to allocate into.
+ if endPort != startPort {
+ return nil, fmt.Errorf("invalid ranges specified for container and host Ports: %s and %s", containerPort, hostPort)
+ }
}
}
- if !validateProto(strings.ToLower(proto)) {
- return nil, fmt.Errorf("invalid proto: %s", proto)
- }
-
- ports := []PortMapping{}
- for i := uint64(0); i <= (endPort - startPort); i++ {
- containerPort = strconv.FormatUint(startPort+i, 10)
- if len(hostPort) > 0 {
- hostPort = strconv.FormatUint(startHostPort+i, 10)
- }
- // Set hostPort to a range only if there is a single container port
- // and a dynamic host port.
- if startPort == endPort && startHostPort != endHostPort {
- hostPort = fmt.Sprintf("%s-%s", hostPort, strconv.FormatUint(endHostPort, 10))
- }
- port, err := NewPort(strings.ToLower(proto), containerPort)
- if err != nil {
- return nil, err
- }
+ count := endPort - startPort + 1
+ ports := make([]PortMapping, 0, count)
- binding := PortBinding{
- HostIP: ip,
- HostPort: hostPort,
+ for i := uint64(0); i < count; i++ {
+ cPort := Port(strconv.FormatUint(startPort+i, 10) + "/" + proto)
+ hPort := ""
+ if hostPort != "" {
+ hPort = strconv.FormatUint(startHostPort+i, 10)
+ // Set hostPort to a range only if there is a single container port
+ // and a dynamic host port.
+ if count == 1 && startHostPort != endHostPort {
+ hPort += "-" + strconv.FormatUint(endHostPort, 10)
+ }
}
- ports = append(ports, PortMapping{Port: port, Binding: binding})
+ ports = append(ports, PortMapping{
+ Port: cPort,
+ Binding: PortBinding{HostIP: ip, HostPort: hPort},
+ })
}
return ports, nil
}
diff --git a/hack/tools/vendor/github.com/docker/go-connections/nat/parse.go b/hack/tools/vendor/github.com/docker/go-connections/nat/parse.go
index e4b53e8a3242..64affa2a904c 100644
--- a/hack/tools/vendor/github.com/docker/go-connections/nat/parse.go
+++ b/hack/tools/vendor/github.com/docker/go-connections/nat/parse.go
@@ -1,7 +1,7 @@
package nat
import (
- "fmt"
+ "errors"
"strconv"
"strings"
)
@@ -9,7 +9,7 @@ import (
// ParsePortRange parses and validates the specified string as a port-range (8000-9000)
func ParsePortRange(ports string) (uint64, uint64, error) {
if ports == "" {
- return 0, 0, fmt.Errorf("empty string specified for ports")
+ return 0, 0, errors.New("empty string specified for ports")
}
if !strings.Contains(ports, "-") {
start, err := strconv.ParseUint(ports, 10, 16)
@@ -27,7 +27,7 @@ func ParsePortRange(ports string) (uint64, uint64, error) {
return 0, 0, err
}
if end < start {
- return 0, 0, fmt.Errorf("invalid range specified for port: %s", ports)
+ return 0, 0, errors.New("invalid range specified for port: " + ports)
}
return start, end, nil
}
diff --git a/hack/tools/vendor/github.com/docker/go-connections/sockets/README.md b/hack/tools/vendor/github.com/docker/go-connections/sockets/README.md
deleted file mode 100644
index e69de29bb2d1..000000000000
diff --git a/hack/tools/vendor/github.com/docker/go-connections/sockets/proxy.go b/hack/tools/vendor/github.com/docker/go-connections/sockets/proxy.go
index c897cb02adea..f04980e40a5a 100644
--- a/hack/tools/vendor/github.com/docker/go-connections/sockets/proxy.go
+++ b/hack/tools/vendor/github.com/docker/go-connections/sockets/proxy.go
@@ -9,6 +9,8 @@ import (
// GetProxyEnv allows access to the uppercase and the lowercase forms of
// proxy-related variables. See the Go specification for details on these
// variables. https://golang.org/pkg/net/http/
+//
+// Deprecated: this function was used as helper for [DialerFromEnvironment] and is no longer used. It will be removed in the next release.
func GetProxyEnv(key string) string {
proxyValue := os.Getenv(strings.ToUpper(key))
if proxyValue == "" {
@@ -19,10 +21,11 @@ func GetProxyEnv(key string) string {
// DialerFromEnvironment was previously used to configure a net.Dialer to route
// connections through a SOCKS proxy.
-// DEPRECATED: SOCKS proxies are now supported by configuring only
+//
+// Deprecated: SOCKS proxies are now supported by configuring only
// http.Transport.Proxy, and no longer require changing http.Transport.Dial.
-// Therefore, only sockets.ConfigureTransport() needs to be called, and any
-// sockets.DialerFromEnvironment() calls can be dropped.
+// Therefore, only [sockets.ConfigureTransport] needs to be called, and any
+// [sockets.DialerFromEnvironment] calls can be dropped.
func DialerFromEnvironment(direct *net.Dialer) (*net.Dialer, error) {
return direct, nil
}
diff --git a/hack/tools/vendor/github.com/docker/go-connections/sockets/sockets.go b/hack/tools/vendor/github.com/docker/go-connections/sockets/sockets.go
index b0eae239d2c5..6117297860db 100644
--- a/hack/tools/vendor/github.com/docker/go-connections/sockets/sockets.go
+++ b/hack/tools/vendor/github.com/docker/go-connections/sockets/sockets.go
@@ -2,13 +2,19 @@
package sockets
import (
+ "context"
"errors"
+ "fmt"
"net"
"net/http"
+ "syscall"
"time"
)
-const defaultTimeout = 10 * time.Second
+const (
+ defaultTimeout = 10 * time.Second
+ maxUnixSocketPathSize = len(syscall.RawSockaddrUnix{}.Path)
+)
// ErrProtocolNotAvailable is returned when a given transport protocol is not provided by the operating system.
var ErrProtocolNotAvailable = errors.New("protocol not available")
@@ -35,3 +41,26 @@ func ConfigureTransport(tr *http.Transport, proto, addr string) error {
}
return nil
}
+
+// DialPipe connects to a Windows named pipe. It is not supported on
+// non-Windows platforms.
+//
+// Deprecated: use [github.com/Microsoft/go-winio.DialPipe] or [github.com/Microsoft/go-winio.DialPipeContext].
+func DialPipe(addr string, timeout time.Duration) (net.Conn, error) {
+ return dialPipe(addr, timeout)
+}
+
+func configureUnixTransport(tr *http.Transport, proto, addr string) error {
+ if len(addr) > maxUnixSocketPathSize {
+ return fmt.Errorf("unix socket path %q is too long", addr)
+ }
+ // No need for compression in local communications.
+ tr.DisableCompression = true
+ dialer := &net.Dialer{
+ Timeout: defaultTimeout,
+ }
+ tr.DialContext = func(ctx context.Context, _, _ string) (net.Conn, error) {
+ return dialer.DialContext(ctx, proto, addr)
+ }
+ return nil
+}
diff --git a/hack/tools/vendor/github.com/docker/go-connections/sockets/sockets_unix.go b/hack/tools/vendor/github.com/docker/go-connections/sockets/sockets_unix.go
index 78a34a980d28..913d2f00dd2f 100644
--- a/hack/tools/vendor/github.com/docker/go-connections/sockets/sockets_unix.go
+++ b/hack/tools/vendor/github.com/docker/go-connections/sockets/sockets_unix.go
@@ -3,37 +3,16 @@
package sockets
import (
- "context"
- "fmt"
"net"
"net/http"
"syscall"
"time"
)
-const maxUnixSocketPathSize = len(syscall.RawSockaddrUnix{}.Path)
-
-func configureUnixTransport(tr *http.Transport, proto, addr string) error {
- if len(addr) > maxUnixSocketPathSize {
- return fmt.Errorf("unix socket path %q is too long", addr)
- }
- // No need for compression in local communications.
- tr.DisableCompression = true
- dialer := &net.Dialer{
- Timeout: defaultTimeout,
- }
- tr.DialContext = func(ctx context.Context, _, _ string) (net.Conn, error) {
- return dialer.DialContext(ctx, proto, addr)
- }
- return nil
-}
-
func configureNpipeTransport(tr *http.Transport, proto, addr string) error {
return ErrProtocolNotAvailable
}
-// DialPipe connects to a Windows named pipe.
-// This is not supported on other OSes.
-func DialPipe(_ string, _ time.Duration) (net.Conn, error) {
+func dialPipe(_ string, _ time.Duration) (net.Conn, error) {
return nil, syscall.EAFNOSUPPORT
}
diff --git a/hack/tools/vendor/github.com/docker/go-connections/sockets/sockets_windows.go b/hack/tools/vendor/github.com/docker/go-connections/sockets/sockets_windows.go
index 7acafc5a2ad8..6d6beb3855c0 100644
--- a/hack/tools/vendor/github.com/docker/go-connections/sockets/sockets_windows.go
+++ b/hack/tools/vendor/github.com/docker/go-connections/sockets/sockets_windows.go
@@ -9,10 +9,6 @@ import (
"github.com/Microsoft/go-winio"
)
-func configureUnixTransport(tr *http.Transport, proto, addr string) error {
- return ErrProtocolNotAvailable
-}
-
func configureNpipeTransport(tr *http.Transport, proto, addr string) error {
// No need for compression in local communications.
tr.DisableCompression = true
@@ -22,7 +18,6 @@ func configureNpipeTransport(tr *http.Transport, proto, addr string) error {
return nil
}
-// DialPipe connects to a Windows named pipe.
-func DialPipe(addr string, timeout time.Duration) (net.Conn, error) {
+func dialPipe(addr string, timeout time.Duration) (net.Conn, error) {
return winio.DialPipe(addr, &timeout)
}
diff --git a/hack/tools/vendor/github.com/docker/go-connections/sockets/unix_socket.go b/hack/tools/vendor/github.com/docker/go-connections/sockets/unix_socket.go
index b9233521e49a..e736f71d38b1 100644
--- a/hack/tools/vendor/github.com/docker/go-connections/sockets/unix_socket.go
+++ b/hack/tools/vendor/github.com/docker/go-connections/sockets/unix_socket.go
@@ -1,5 +1,3 @@
-//go:build !windows
-
/*
Package sockets is a simple unix domain socket wrapper.
@@ -57,26 +55,6 @@ import (
// SockOption sets up socket file's creating option
type SockOption func(string) error
-// WithChown modifies the socket file's uid and gid
-func WithChown(uid, gid int) SockOption {
- return func(path string) error {
- if err := os.Chown(path, uid, gid); err != nil {
- return err
- }
- return nil
- }
-}
-
-// WithChmod modifies socket file's access mode.
-func WithChmod(mask os.FileMode) SockOption {
- return func(path string) error {
- if err := os.Chmod(path, mask); err != nil {
- return err
- }
- return nil
- }
-}
-
// NewUnixSocketWithOpts creates a unix socket with the specified options.
// By default, socket permissions are 0000 (i.e.: no access for anyone); pass
// WithChmod() and WithChown() to set the desired ownership and permissions.
@@ -90,22 +68,7 @@ func NewUnixSocketWithOpts(path string, opts ...SockOption) (net.Listener, error
return nil, err
}
- // net.Listen does not allow for permissions to be set. As a result, when
- // specifying custom permissions ("WithChmod()"), there is a short time
- // between creating the socket and applying the permissions, during which
- // the socket permissions are Less restrictive than desired.
- //
- // To work around this limitation of net.Listen(), we temporarily set the
- // umask to 0777, which forces the socket to be created with 000 permissions
- // (i.e.: no access for anyone). After that, WithChmod() must be used to set
- // the desired permissions.
- //
- // We don't use "defer" here, to reset the umask to its original value as soon
- // as possible. Ideally we'd be able to detect if WithChmod() was passed as
- // an option, and skip changing umask if default permissions are used.
- origUmask := syscall.Umask(0o777)
- l, err := net.Listen("unix", path)
- syscall.Umask(origUmask)
+ l, err := listenUnix(path)
if err != nil {
return nil, err
}
@@ -119,8 +82,3 @@ func NewUnixSocketWithOpts(path string, opts ...SockOption) (net.Listener, error
return l, nil
}
-
-// NewUnixSocket creates a unix socket with the specified path and group.
-func NewUnixSocket(path string, gid int) (net.Listener, error) {
- return NewUnixSocketWithOpts(path, WithChown(0, gid), WithChmod(0o660))
-}
diff --git a/hack/tools/vendor/github.com/docker/go-connections/sockets/unix_socket_unix.go b/hack/tools/vendor/github.com/docker/go-connections/sockets/unix_socket_unix.go
new file mode 100644
index 000000000000..a41a71654742
--- /dev/null
+++ b/hack/tools/vendor/github.com/docker/go-connections/sockets/unix_socket_unix.go
@@ -0,0 +1,54 @@
+//go:build !windows
+
+package sockets
+
+import (
+ "net"
+ "os"
+ "syscall"
+)
+
+// WithChown modifies the socket file's uid and gid
+func WithChown(uid, gid int) SockOption {
+ return func(path string) error {
+ if err := os.Chown(path, uid, gid); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// WithChmod modifies socket file's access mode.
+func WithChmod(mask os.FileMode) SockOption {
+ return func(path string) error {
+ if err := os.Chmod(path, mask); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// NewUnixSocket creates a unix socket with the specified path and group.
+func NewUnixSocket(path string, gid int) (net.Listener, error) {
+ return NewUnixSocketWithOpts(path, WithChown(0, gid), WithChmod(0o660))
+}
+
+func listenUnix(path string) (net.Listener, error) {
+ // net.Listen does not allow for permissions to be set. As a result, when
+ // specifying custom permissions ("WithChmod()"), there is a short time
+ // between creating the socket and applying the permissions, during which
+ // the socket permissions are Less restrictive than desired.
+ //
+ // To work around this limitation of net.Listen(), we temporarily set the
+ // umask to 0777, which forces the socket to be created with 000 permissions
+ // (i.e.: no access for anyone). After that, WithChmod() must be used to set
+ // the desired permissions.
+ //
+ // We don't use "defer" here, to reset the umask to its original value as soon
+ // as possible. Ideally we'd be able to detect if WithChmod() was passed as
+ // an option, and skip changing umask if default permissions are used.
+ origUmask := syscall.Umask(0o777)
+ l, err := net.Listen("unix", path)
+ syscall.Umask(origUmask)
+ return l, err
+}
diff --git a/hack/tools/vendor/github.com/docker/go-connections/sockets/unix_socket_windows.go b/hack/tools/vendor/github.com/docker/go-connections/sockets/unix_socket_windows.go
new file mode 100644
index 000000000000..5ec29e059e78
--- /dev/null
+++ b/hack/tools/vendor/github.com/docker/go-connections/sockets/unix_socket_windows.go
@@ -0,0 +1,7 @@
+package sockets
+
+import "net"
+
+func listenUnix(path string) (net.Listener, error) {
+ return net.Listen("unix", path)
+}
diff --git a/hack/tools/vendor/github.com/docker/go-connections/tlsconfig/config.go b/hack/tools/vendor/github.com/docker/go-connections/tlsconfig/config.go
index 606c98a38b51..8b0264f68b75 100644
--- a/hack/tools/vendor/github.com/docker/go-connections/tlsconfig/config.go
+++ b/hack/tools/vendor/github.com/docker/go-connections/tlsconfig/config.go
@@ -34,51 +34,37 @@ type Options struct {
// the system pool will be used.
ExclusiveRootPools bool
MinVersion uint16
- // If Passphrase is set, it will be used to decrypt a TLS private key
- // if the key is encrypted.
- //
- // Deprecated: Use of encrypted TLS private keys has been deprecated, and
- // will be removed in a future release. Golang has deprecated support for
- // legacy PEM encryption (as specified in RFC 1423), as it is insecure by
- // design (see https://go-review.googlesource.com/c/go/+/264159).
- Passphrase string
-}
-
-// Extra (server-side) accepted CBC cipher suites - will phase out in the future
-var acceptedCBCCiphers = []uint16{
- tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
- tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
- tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
- tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
}
// DefaultServerAcceptedCiphers should be uses by code which already has a crypto/tls
// options struct but wants to use a commonly accepted set of TLS cipher suites, with
// known weak algorithms removed.
-var DefaultServerAcceptedCiphers = append(clientCipherSuites, acceptedCBCCiphers...)
+var DefaultServerAcceptedCiphers = defaultCipherSuites
+
+// defaultCipherSuites is shared by both client and server as the default set.
+var defaultCipherSuites = []uint16{
+ tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
+ tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
+ tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
+ tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
+}
// ServerDefault returns a secure-enough TLS configuration for the server TLS configuration.
func ServerDefault(ops ...func(*tls.Config)) *tls.Config {
- tlsConfig := &tls.Config{
- // Avoid fallback by default to SSL protocols < TLS1.2
- MinVersion: tls.VersionTLS12,
- PreferServerCipherSuites: true,
- CipherSuites: DefaultServerAcceptedCiphers,
- }
-
- for _, op := range ops {
- op(tlsConfig)
- }
-
- return tlsConfig
+ return defaultConfig(ops...)
}
// ClientDefault returns a secure-enough TLS configuration for the client TLS configuration.
func ClientDefault(ops ...func(*tls.Config)) *tls.Config {
+ return defaultConfig(ops...)
+}
+
+// defaultConfig is the default config used by both client and server TLS configuration.
+func defaultConfig(ops ...func(*tls.Config)) *tls.Config {
tlsConfig := &tls.Config{
- // Prefer TLS1.2 as the client minimum
+ // Avoid fallback by default to SSL protocols < TLS1.2
MinVersion: tls.VersionTLS12,
- CipherSuites: clientCipherSuites,
+ CipherSuites: defaultCipherSuites,
}
for _, op := range ops {
@@ -92,13 +78,13 @@ func ClientDefault(ops ...func(*tls.Config)) *tls.Config {
func certPool(caFile string, exclusivePool bool) (*x509.CertPool, error) {
// If we should verify the server, we need to load a trusted ca
var (
- certPool *x509.CertPool
- err error
+ pool *x509.CertPool
+ err error
)
if exclusivePool {
- certPool = x509.NewCertPool()
+ pool = x509.NewCertPool()
} else {
- certPool, err = SystemCertPool()
+ pool, err = SystemCertPool()
if err != nil {
return nil, fmt.Errorf("failed to read system certificates: %v", err)
}
@@ -107,10 +93,10 @@ func certPool(caFile string, exclusivePool bool) (*x509.CertPool, error) {
if err != nil {
return nil, fmt.Errorf("could not read CA certificate %q: %v", caFile, err)
}
- if !certPool.AppendCertsFromPEM(pemData) {
+ if !pool.AppendCertsFromPEM(pemData) {
return nil, fmt.Errorf("failed to append certificates from PEM file: %q", caFile)
}
- return certPool, nil
+ return pool, nil
}
// allTLSVersions lists all the TLS versions and is used by the code that validates
@@ -144,34 +130,32 @@ func adjustMinVersion(options Options, config *tls.Config) error {
return nil
}
-// IsErrEncryptedKey returns true if the 'err' is an error of incorrect
-// password when trying to decrypt a TLS private key.
+// errEncryptedKeyDeprecated is produced when we encounter an encrypted
+// (password-protected) key. From https://go-review.googlesource.com/c/go/+/264159;
//
-// Deprecated: Use of encrypted TLS private keys has been deprecated, and
-// will be removed in a future release. Golang has deprecated support for
-// legacy PEM encryption (as specified in RFC 1423), as it is insecure by
-// design (see https://go-review.googlesource.com/c/go/+/264159).
-func IsErrEncryptedKey(err error) bool {
- return errors.Is(err, x509.IncorrectPasswordError)
-}
+// > Legacy PEM encryption as specified in RFC 1423 is insecure by design. Since
+// > it does not authenticate the ciphertext, it is vulnerable to padding oracle
+// > attacks that can let an attacker recover the plaintext
+// >
+// > It's unfortunate that we don't implement PKCS#8 encryption so we can't
+// > recommend an alternative but PEM encryption is so broken that it's worth
+// > deprecating outright.
+//
+// Also see https://docs.docker.com/go/deprecated/
+var errEncryptedKeyDeprecated = errors.New("private key is encrypted; encrypted private keys are obsolete, and not supported")
// getPrivateKey returns the private key in 'keyBytes', in PEM-encoded format.
-// If the private key is encrypted, 'passphrase' is used to decrypted the
-// private key.
-func getPrivateKey(keyBytes []byte, passphrase string) ([]byte, error) {
+// It returns an error if the file could not be decoded or was protected by
+// a passphrase.
+func getPrivateKey(keyBytes []byte) ([]byte, error) {
// this section makes some small changes to code from notary/tuf/utils/x509.go
pemBlock, _ := pem.Decode(keyBytes)
if pemBlock == nil {
return nil, fmt.Errorf("no valid private key found")
}
- var err error
if x509.IsEncryptedPEMBlock(pemBlock) { //nolint:staticcheck // Ignore SA1019 (IsEncryptedPEMBlock is deprecated)
- keyBytes, err = x509.DecryptPEMBlock(pemBlock, []byte(passphrase)) //nolint:staticcheck // Ignore SA1019 (DecryptPEMBlock is deprecated)
- if err != nil {
- return nil, fmt.Errorf("private key is encrypted, but could not decrypt it: %w", err)
- }
- keyBytes = pem.EncodeToMemory(&pem.Block{Type: pemBlock.Type, Bytes: keyBytes})
+ return nil, errEncryptedKeyDeprecated
}
return keyBytes, nil
@@ -195,7 +179,7 @@ func getCert(options Options) ([]tls.Certificate, error) {
return nil, err
}
- prKeyBytes, err = getPrivateKey(prKeyBytes, options.Passphrase)
+ prKeyBytes, err = getPrivateKey(prKeyBytes)
if err != nil {
return nil, err
}
@@ -210,7 +194,7 @@ func getCert(options Options) ([]tls.Certificate, error) {
// Client returns a TLS configuration meant to be used by a client.
func Client(options Options) (*tls.Config, error) {
- tlsConfig := ClientDefault()
+ tlsConfig := defaultConfig()
tlsConfig.InsecureSkipVerify = options.InsecureSkipVerify
if !options.InsecureSkipVerify && options.CAFile != "" {
CAs, err := certPool(options.CAFile, options.ExclusiveRootPools)
@@ -235,7 +219,7 @@ func Client(options Options) (*tls.Config, error) {
// Server returns a TLS configuration meant to be used by a server.
func Server(options Options) (*tls.Config, error) {
- tlsConfig := ServerDefault()
+ tlsConfig := defaultConfig()
tlsConfig.ClientAuth = options.ClientAuth
tlsCert, err := tls.LoadX509KeyPair(options.CertFile, options.KeyFile)
if err != nil {
diff --git a/hack/tools/vendor/github.com/docker/go-connections/tlsconfig/config_client_ciphers.go b/hack/tools/vendor/github.com/docker/go-connections/tlsconfig/config_client_ciphers.go
deleted file mode 100644
index a82f9fa52e2e..000000000000
--- a/hack/tools/vendor/github.com/docker/go-connections/tlsconfig/config_client_ciphers.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers.
-package tlsconfig
-
-import (
- "crypto/tls"
-)
-
-// Client TLS cipher suites (dropping CBC ciphers for client preferred suite set)
-var clientCipherSuites = []uint16{
- tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
- tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
- tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
- tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
-}
diff --git a/hack/tools/vendor/github.com/emicklei/go-restful/v3/.travis.yml b/hack/tools/vendor/github.com/emicklei/go-restful/v3/.travis.yml
deleted file mode 100644
index 3a0bf5ff1b81..000000000000
--- a/hack/tools/vendor/github.com/emicklei/go-restful/v3/.travis.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-language: go
-
-go:
- - 1.x
-
-before_install:
- - go test -v
-
-script:
- - go test -race -coverprofile=coverage.txt -covermode=atomic
-
-after_success:
- - bash <(curl -s https://codecov.io/bash)
\ No newline at end of file
diff --git a/hack/tools/vendor/github.com/emicklei/go-restful/v3/CHANGES.md b/hack/tools/vendor/github.com/emicklei/go-restful/v3/CHANGES.md
index 6f24dfff562e..4fcd920abea4 100644
--- a/hack/tools/vendor/github.com/emicklei/go-restful/v3/CHANGES.md
+++ b/hack/tools/vendor/github.com/emicklei/go-restful/v3/CHANGES.md
@@ -1,5 +1,9 @@
# Change history of go-restful
+## [v3.13.0] - 2025-08-14
+
+- optimize performance of path matching in CurlyRouter ( thanks @wenhuang, Wen Huang)
+
## [v3.12.2] - 2025-02-21
- allow empty payloads in post,put,patch, issue #580 ( thanks @liggitt, Jordan Liggitt)
diff --git a/hack/tools/vendor/github.com/emicklei/go-restful/v3/README.md b/hack/tools/vendor/github.com/emicklei/go-restful/v3/README.md
index 3fb40d198087..50a79ab692d7 100644
--- a/hack/tools/vendor/github.com/emicklei/go-restful/v3/README.md
+++ b/hack/tools/vendor/github.com/emicklei/go-restful/v3/README.md
@@ -84,6 +84,7 @@ func (u UserResource) findUser(request *restful.Request, response *restful.Respo
- Configurable (trace) logging
- Customizable gzip/deflate readers and writers using CompressorProvider registration
- Inject your own http.Handler using the `HttpMiddlewareHandlerToFilter` function
+- Added `SetPathTokenCacheEnabled` and `SetCustomVerbCacheEnabled` to disable regexp caching (default=true)
## How to customize
There are several hooks to customize the behavior of the go-restful package.
diff --git a/hack/tools/vendor/github.com/emicklei/go-restful/v3/curly.go b/hack/tools/vendor/github.com/emicklei/go-restful/v3/curly.go
index 6fd2bcd5a117..eec43bfd0674 100644
--- a/hack/tools/vendor/github.com/emicklei/go-restful/v3/curly.go
+++ b/hack/tools/vendor/github.com/emicklei/go-restful/v3/curly.go
@@ -9,11 +9,35 @@ import (
"regexp"
"sort"
"strings"
+ "sync"
)
// CurlyRouter expects Routes with paths that contain zero or more parameters in curly brackets.
type CurlyRouter struct{}
+var (
+ regexCache sync.Map // Cache for compiled regex patterns
+ pathTokenCacheEnabled = true // Enable/disable path token regex caching
+)
+
+// SetPathTokenCacheEnabled enables or disables path token regex caching for CurlyRouter.
+// When disabled, regex patterns will be compiled on every request.
+// When enabled (default), compiled regex patterns are cached for better performance.
+func SetPathTokenCacheEnabled(enabled bool) {
+ pathTokenCacheEnabled = enabled
+}
+
+// getCachedRegexp retrieves a compiled regex from the cache if found and valid.
+// Returns the regex and true if found and valid, nil and false otherwise.
+func getCachedRegexp(cache *sync.Map, pattern string) (*regexp.Regexp, bool) {
+ if cached, found := cache.Load(pattern); found {
+ if regex, ok := cached.(*regexp.Regexp); ok {
+ return regex, true
+ }
+ }
+ return nil, false
+}
+
// SelectRoute is part of the Router interface and returns the best match
// for the WebService and its Route for the given Request.
func (c CurlyRouter) SelectRoute(
@@ -113,8 +137,28 @@ func (c CurlyRouter) regularMatchesPathToken(routeToken string, colon int, reque
}
return true, true
}
- matched, err := regexp.MatchString(regPart, requestToken)
- return (matched && err == nil), false
+
+ // Check cache first (if enabled)
+ if pathTokenCacheEnabled {
+ if regex, found := getCachedRegexp(®exCache, regPart); found {
+ matched := regex.MatchString(requestToken)
+ return matched, false
+ }
+ }
+
+ // Compile the regex
+ regex, err := regexp.Compile(regPart)
+ if err != nil {
+ return false, false
+ }
+
+ // Cache the regex (if enabled)
+ if pathTokenCacheEnabled {
+ regexCache.Store(regPart, regex)
+ }
+
+ matched := regex.MatchString(requestToken)
+ return matched, false
}
var jsr311Router = RouterJSR311{}
@@ -168,7 +212,7 @@ func (c CurlyRouter) computeWebserviceScore(requestTokens []string, routeTokens
if matchesToken {
score++ // extra score for regex match
}
- }
+ }
} else {
// not a parameter
if eachRequestToken != eachRouteToken {
diff --git a/hack/tools/vendor/github.com/emicklei/go-restful/v3/custom_verb.go b/hack/tools/vendor/github.com/emicklei/go-restful/v3/custom_verb.go
index bfc17efde80f..0b98eeb091cd 100644
--- a/hack/tools/vendor/github.com/emicklei/go-restful/v3/custom_verb.go
+++ b/hack/tools/vendor/github.com/emicklei/go-restful/v3/custom_verb.go
@@ -1,14 +1,28 @@
package restful
+// Copyright 2025 Ernest Micklei. All rights reserved.
+// Use of this source code is governed by a license
+// that can be found in the LICENSE file.
+
import (
"fmt"
"regexp"
+ "sync"
)
var (
- customVerbReg = regexp.MustCompile(":([A-Za-z]+)$")
+ customVerbReg = regexp.MustCompile(":([A-Za-z]+)$")
+ customVerbCache sync.Map // Cache for compiled custom verb regexes
+ customVerbCacheEnabled = true // Enable/disable custom verb regex caching
)
+// SetCustomVerbCacheEnabled enables or disables custom verb regex caching.
+// When disabled, custom verb regex patterns will be compiled on every request.
+// When enabled (default), compiled custom verb regex patterns are cached for better performance.
+func SetCustomVerbCacheEnabled(enabled bool) {
+ customVerbCacheEnabled = enabled
+}
+
func hasCustomVerb(routeToken string) bool {
return customVerbReg.MatchString(routeToken)
}
@@ -20,7 +34,23 @@ func isMatchCustomVerb(routeToken string, pathToken string) bool {
}
customVerb := rs[1]
- specificVerbReg := regexp.MustCompile(fmt.Sprintf(":%s$", customVerb))
+ regexPattern := fmt.Sprintf(":%s$", customVerb)
+
+ // Check cache first (if enabled)
+ if customVerbCacheEnabled {
+ if specificVerbReg, found := getCachedRegexp(&customVerbCache, regexPattern); found {
+ return specificVerbReg.MatchString(pathToken)
+ }
+ }
+
+ // Compile the regex
+ specificVerbReg := regexp.MustCompile(regexPattern)
+
+ // Cache the regex (if enabled)
+ if customVerbCacheEnabled {
+ customVerbCache.Store(regexPattern, specificVerbReg)
+ }
+
return specificVerbReg.MatchString(pathToken)
}
diff --git a/hack/tools/vendor/github.com/emicklei/go-restful/v3/doc.go b/hack/tools/vendor/github.com/emicklei/go-restful/v3/doc.go
index 69b13057d017..80809225b8d5 100644
--- a/hack/tools/vendor/github.com/emicklei/go-restful/v3/doc.go
+++ b/hack/tools/vendor/github.com/emicklei/go-restful/v3/doc.go
@@ -1,7 +1,7 @@
/*
Package restful , a lean package for creating REST-style WebServices without magic.
-WebServices and Routes
+### WebServices and Routes
A WebService has a collection of Route objects that dispatch incoming Http Requests to a function calls.
Typically, a WebService has a root path (e.g. /users) and defines common MIME types for its routes.
@@ -30,14 +30,14 @@ The (*Request, *Response) arguments provide functions for reading information fr
See the example https://github.com/emicklei/go-restful/blob/v3/examples/user-resource/restful-user-resource.go with a full implementation.
-Regular expression matching Routes
+### Regular expression matching Routes
A Route parameter can be specified using the format "uri/{var[:regexp]}" or the special version "uri/{var:*}" for matching the tail of the path.
For example, /persons/{name:[A-Z][A-Z]} can be used to restrict values for the parameter "name" to only contain capital alphabetic characters.
Regular expressions must use the standard Go syntax as described in the regexp package. (https://code.google.com/p/re2/wiki/Syntax)
This feature requires the use of a CurlyRouter.
-Containers
+### Containers
A Container holds a collection of WebServices, Filters and a http.ServeMux for multiplexing http requests.
Using the statements "restful.Add(...) and restful.Filter(...)" will register WebServices and Filters to the Default Container.
@@ -47,7 +47,7 @@ You can create your own Container and create a new http.Server for that particul
container := restful.NewContainer()
server := &http.Server{Addr: ":8081", Handler: container}
-Filters
+### Filters
A filter dynamically intercepts requests and responses to transform or use the information contained in the requests or responses.
You can use filters to perform generic logging, measurement, authentication, redirect, set response headers etc.
@@ -60,22 +60,21 @@ Use the following statement to pass the request,response pair to the next filter
chain.ProcessFilter(req, resp)
-Container Filters
+### Container Filters
These are processed before any registered WebService.
// install a (global) filter for the default container (processed before any webservice)
restful.Filter(globalLogging)
-WebService Filters
+### WebService Filters
These are processed before any Route of a WebService.
// install a webservice filter (processed before any route)
ws.Filter(webserviceLogging).Filter(measureTime)
-
-Route Filters
+### Route Filters
These are processed before calling the function associated with the Route.
@@ -84,7 +83,7 @@ These are processed before calling the function associated with the Route.
See the example https://github.com/emicklei/go-restful/blob/v3/examples/filters/restful-filters.go with full implementations.
-Response Encoding
+### Response Encoding
Two encodings are supported: gzip and deflate. To enable this for all responses:
@@ -95,20 +94,20 @@ Alternatively, you can create a Filter that performs the encoding and install it
See the example https://github.com/emicklei/go-restful/blob/v3/examples/encoding/restful-encoding-filter.go
-OPTIONS support
+### OPTIONS support
By installing a pre-defined container filter, your Webservice(s) can respond to the OPTIONS Http request.
Filter(OPTIONSFilter())
-CORS
+### CORS
By installing the filter of a CrossOriginResourceSharing (CORS), your WebService(s) can handle CORS requests.
cors := CrossOriginResourceSharing{ExposeHeaders: []string{"X-My-Header"}, CookiesAllowed: false, Container: DefaultContainer}
Filter(cors.Filter)
-Error Handling
+### Error Handling
Unexpected things happen. If a request cannot be processed because of a failure, your service needs to tell via the response what happened and why.
For this reason HTTP status codes exist and it is important to use the correct code in every exceptional situation.
@@ -137,11 +136,11 @@ The request does not have or has an unknown Accept Header set for this operation
The request does not have or has an unknown Content-Type Header set for this operation.
-ServiceError
+### ServiceError
In addition to setting the correct (error) Http status code, you can choose to write a ServiceError message on the response.
-Performance options
+### Performance options
This package has several options that affect the performance of your service. It is important to understand them and how you can change it.
@@ -156,30 +155,27 @@ Default value is true
If content encoding is enabled then the default strategy for getting new gzip/zlib writers and readers is to use a sync.Pool.
Because writers are expensive structures, performance is even more improved when using a preloaded cache. You can also inject your own implementation.
-Trouble shooting
+### Trouble shooting
This package has the means to produce detail logging of the complete Http request matching process and filter invocation.
Enabling this feature requires you to set an implementation of restful.StdLogger (e.g. log.Logger) instance such as:
restful.TraceLogger(log.New(os.Stdout, "[restful] ", log.LstdFlags|log.Lshortfile))
-Logging
+### Logging
The restful.SetLogger() method allows you to override the logger used by the package. By default restful
uses the standard library `log` package and logs to stdout. Different logging packages are supported as
long as they conform to `StdLogger` interface defined in the `log` sub-package, writing an adapter for your
preferred package is simple.
-Resources
+### Resources
-[project]: https://github.com/emicklei/go-restful
+(c) 2012-2025, http://ernestmicklei.com. MIT License
+[project]: https://github.com/emicklei/go-restful
[examples]: https://github.com/emicklei/go-restful/blob/master/examples
-
-[design]: http://ernestmicklei.com/2012/11/11/go-restful-api-design/
-
+[design]: http://ernestmicklei.com/2012/11/11/go-restful-api-design/
[showcases]: https://github.com/emicklei/mora, https://github.com/emicklei/landskape
-
-(c) 2012-2015, http://ernestmicklei.com. MIT License
*/
package restful
diff --git a/hack/tools/vendor/github.com/fsnotify/fsnotify/.cirrus.yml b/hack/tools/vendor/github.com/fsnotify/fsnotify/.cirrus.yml
index f4e7dbf37b36..7f257e99ac9e 100644
--- a/hack/tools/vendor/github.com/fsnotify/fsnotify/.cirrus.yml
+++ b/hack/tools/vendor/github.com/fsnotify/fsnotify/.cirrus.yml
@@ -1,7 +1,7 @@
freebsd_task:
name: 'FreeBSD'
freebsd_instance:
- image_family: freebsd-14-1
+ image_family: freebsd-14-2
install_script:
- pkg update -f
- pkg install -y go
diff --git a/hack/tools/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md b/hack/tools/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md
index fa854785d0f5..6468d2cf400f 100644
--- a/hack/tools/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md
+++ b/hack/tools/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md
@@ -1,6 +1,39 @@
# Changelog
-1.8.0 2023-10-31
+1.9.0 2024-04-04
+----------------
+
+### Changes and fixes
+
+- all: make BufferedWatcher buffered again ([#657])
+
+- inotify: fix race when adding/removing watches while a watched path is being
+ deleted ([#678], [#686])
+
+- inotify: don't send empty event if a watched path is unmounted ([#655])
+
+- inotify: don't register duplicate watches when watching both a symlink and its
+ target; previously that would get "half-added" and removing the second would
+ panic ([#679])
+
+- kqueue: fix watching relative symlinks ([#681])
+
+- kqueue: correctly mark pre-existing entries when watching a link to a dir on
+ kqueue ([#682])
+
+- illumos: don't send error if changed file is deleted while processing the
+ event ([#678])
+
+
+[#657]: https://github.com/fsnotify/fsnotify/pull/657
+[#678]: https://github.com/fsnotify/fsnotify/pull/678
+[#686]: https://github.com/fsnotify/fsnotify/pull/686
+[#655]: https://github.com/fsnotify/fsnotify/pull/655
+[#681]: https://github.com/fsnotify/fsnotify/pull/681
+[#679]: https://github.com/fsnotify/fsnotify/pull/679
+[#682]: https://github.com/fsnotify/fsnotify/pull/682
+
+1.8.0 2024-10-31
----------------
### Additions
diff --git a/hack/tools/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md b/hack/tools/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md
index e4ac2a2fffdc..4cc40fa597d8 100644
--- a/hack/tools/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md
+++ b/hack/tools/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md
@@ -77,6 +77,7 @@ End-of-line escapes with `\` are not supported.
debug [yes/no] # Enable/disable FSNOTIFY_DEBUG (tests are run in
parallel by default, so -parallel=1 is probably a good
idea).
+ print [any strings] # Print text to stdout; for debugging.
touch path
mkdir [-p] dir
diff --git a/hack/tools/vendor/github.com/fsnotify/fsnotify/README.md b/hack/tools/vendor/github.com/fsnotify/fsnotify/README.md
index e480733d16cb..1f4eb583d50b 100644
--- a/hack/tools/vendor/github.com/fsnotify/fsnotify/README.md
+++ b/hack/tools/vendor/github.com/fsnotify/fsnotify/README.md
@@ -15,7 +15,6 @@ Platform support:
| ReadDirectoryChangesW | Windows | Supported |
| FEN | illumos | Supported |
| fanotify | Linux 5.9+ | [Not yet](https://github.com/fsnotify/fsnotify/issues/114) |
-| AHAFS | AIX | [aix branch]; experimental due to lack of maintainer and test environment |
| FSEvents | macOS | [Needs support in x/sys/unix][fsevents] |
| USN Journals | Windows | [Needs support in x/sys/windows][usn] |
| Polling | *All* | [Not yet](https://github.com/fsnotify/fsnotify/issues/9) |
@@ -25,7 +24,6 @@ untested.
[fsevents]: https://github.com/fsnotify/fsnotify/issues/11#issuecomment-1279133120
[usn]: https://github.com/fsnotify/fsnotify/issues/53#issuecomment-1279829847
-[aix branch]: https://github.com/fsnotify/fsnotify/issues/353#issuecomment-1284590129
Usage
-----
diff --git a/hack/tools/vendor/github.com/fsnotify/fsnotify/backend_fen.go b/hack/tools/vendor/github.com/fsnotify/fsnotify/backend_fen.go
index c349c326c718..57fc69284845 100644
--- a/hack/tools/vendor/github.com/fsnotify/fsnotify/backend_fen.go
+++ b/hack/tools/vendor/github.com/fsnotify/fsnotify/backend_fen.go
@@ -9,6 +9,7 @@ package fsnotify
import (
"errors"
"fmt"
+ "io/fs"
"os"
"path/filepath"
"sync"
@@ -19,27 +20,25 @@ import (
)
type fen struct {
+ *shared
Events chan Event
Errors chan error
mu sync.Mutex
port *unix.EventPort
- done chan struct{} // Channel for sending a "quit message" to the reader goroutine
dirs map[string]Op // Explicitly watched directories
watches map[string]Op // Explicitly watched non-directories
}
-func newBackend(ev chan Event, errs chan error) (backend, error) {
- return newBufferedBackend(0, ev, errs)
-}
+var defaultBufferSize = 0
-func newBufferedBackend(sz uint, ev chan Event, errs chan error) (backend, error) {
+func newBackend(ev chan Event, errs chan error) (backend, error) {
w := &fen{
+ shared: newShared(ev, errs),
Events: ev,
Errors: errs,
dirs: make(map[string]Op),
watches: make(map[string]Op),
- done: make(chan struct{}),
}
var err error
@@ -52,49 +51,10 @@ func newBufferedBackend(sz uint, ev chan Event, errs chan error) (backend, error
return w, nil
}
-// sendEvent attempts to send an event to the user, returning true if the event
-// was put in the channel successfully and false if the watcher has been closed.
-func (w *fen) sendEvent(name string, op Op) (sent bool) {
- select {
- case <-w.done:
- return false
- case w.Events <- Event{Name: name, Op: op}:
- return true
- }
-}
-
-// sendError attempts to send an error to the user, returning true if the error
-// was put in the channel successfully and false if the watcher has been closed.
-func (w *fen) sendError(err error) (sent bool) {
- if err == nil {
- return true
- }
- select {
- case <-w.done:
- return false
- case w.Errors <- err:
- return true
- }
-}
-
-func (w *fen) isClosed() bool {
- select {
- case <-w.done:
- return true
- default:
- return false
- }
-}
-
func (w *fen) Close() error {
- // Take the lock used by associateFile to prevent lingering events from
- // being processed after the close
- w.mu.Lock()
- defer w.mu.Unlock()
- if w.isClosed() {
+ if w.shared.close() {
return nil
}
- close(w.done)
return w.port.Close()
}
@@ -209,7 +169,7 @@ func (w *fen) readEvents() {
return
}
// There was an error not caused by calling w.Close()
- if !w.sendError(err) {
+ if !w.sendError(fmt.Errorf("port.Get: %w", err)) {
return
}
}
@@ -277,13 +237,13 @@ func (w *fen) handleEvent(event *unix.PortEvent) error {
isWatched := watchedDir || watchedPath
if events&unix.FILE_DELETE != 0 {
- if !w.sendEvent(path, Remove) {
+ if !w.sendEvent(Event{Name: path, Op: Remove}) {
return nil
}
reRegister = false
}
if events&unix.FILE_RENAME_FROM != 0 {
- if !w.sendEvent(path, Rename) {
+ if !w.sendEvent(Event{Name: path, Op: Rename}) {
return nil
}
// Don't keep watching the new file name
@@ -297,7 +257,7 @@ func (w *fen) handleEvent(event *unix.PortEvent) error {
// inotify reports a Remove event in this case, so we simulate this
// here.
- if !w.sendEvent(path, Remove) {
+ if !w.sendEvent(Event{Name: path, Op: Remove}) {
return nil
}
// Don't keep watching the file that was removed
@@ -331,7 +291,7 @@ func (w *fen) handleEvent(event *unix.PortEvent) error {
// get here, the sudirectory is already gone. Clearly we were watching
// this path but now it is gone. Let's tell the user that it was
// removed.
- if !w.sendEvent(path, Remove) {
+ if !w.sendEvent(Event{Name: path, Op: Remove}) {
return nil
}
// Suppress extra write events on removed directories; they are not
@@ -346,7 +306,7 @@ func (w *fen) handleEvent(event *unix.PortEvent) error {
if err != nil {
// The symlink still exists, but the target is gone. Report the
// Remove similar to above.
- if !w.sendEvent(path, Remove) {
+ if !w.sendEvent(Event{Name: path, Op: Remove}) {
return nil
}
// Don't return the error
@@ -359,7 +319,7 @@ func (w *fen) handleEvent(event *unix.PortEvent) error {
return err
}
} else {
- if !w.sendEvent(path, Write) {
+ if !w.sendEvent(Event{Name: path, Op: Write}) {
return nil
}
}
@@ -367,7 +327,7 @@ func (w *fen) handleEvent(event *unix.PortEvent) error {
if events&unix.FILE_ATTRIB != 0 && stat != nil {
// Only send Chmod if perms changed
if stat.Mode().Perm() != fmode.Perm() {
- if !w.sendEvent(path, Chmod) {
+ if !w.sendEvent(Event{Name: path, Op: Chmod}) {
return nil
}
}
@@ -376,17 +336,27 @@ func (w *fen) handleEvent(event *unix.PortEvent) error {
if stat != nil {
// If we get here, it means we've hit an event above that requires us to
// continue watching the file or directory
- return w.associateFile(path, stat, isWatched)
+ err := w.associateFile(path, stat, isWatched)
+ if errors.Is(err, fs.ErrNotExist) {
+ // Path may have been removed since the stat.
+ err = nil
+ }
+ return err
}
return nil
}
+// The directory was modified, so we must find unwatched entities and watch
+// them. If something was removed from the directory, nothing will happen, as
+// everything else should still be watched.
func (w *fen) updateDirectory(path string) error {
- // The directory was modified, so we must find unwatched entities and watch
- // them. If something was removed from the directory, nothing will happen,
- // as everything else should still be watched.
files, err := os.ReadDir(path)
if err != nil {
+ // Directory no longer exists: probably just deleted since we got the
+ // event.
+ if errors.Is(err, fs.ErrNotExist) {
+ return nil
+ }
return err
}
@@ -401,10 +371,15 @@ func (w *fen) updateDirectory(path string) error {
return err
}
err = w.associateFile(path, finfo, false)
+ if errors.Is(err, fs.ErrNotExist) {
+ // File may have disappeared between getting the dir listing and
+ // adding the port: that's okay to ignore.
+ continue
+ }
if !w.sendError(err) {
return nil
}
- if !w.sendEvent(path, Create) {
+ if !w.sendEvent(Event{Name: path, Op: Create}) {
return nil
}
}
@@ -430,7 +405,7 @@ func (w *fen) associateFile(path string, stat os.FileInfo, follow bool) error {
// has fired but we haven't processed it yet.
err := w.port.DissociatePath(path)
if err != nil && !errors.Is(err, unix.ENOENT) {
- return err
+ return fmt.Errorf("port.DissociatePath(%q): %w", path, err)
}
}
@@ -446,14 +421,22 @@ func (w *fen) associateFile(path string, stat os.FileInfo, follow bool) error {
if true {
events |= unix.FILE_ATTRIB
}
- return w.port.AssociatePath(path, stat, events, stat.Mode())
+ err := w.port.AssociatePath(path, stat, events, stat.Mode())
+ if err != nil {
+ return fmt.Errorf("port.AssociatePath(%q): %w", path, err)
+ }
+ return nil
}
func (w *fen) dissociateFile(path string, stat os.FileInfo, unused bool) error {
if !w.port.PathIsWatched(path) {
return nil
}
- return w.port.DissociatePath(path)
+ err := w.port.DissociatePath(path)
+ if err != nil {
+ return fmt.Errorf("port.DissociatePath(%q): %w", path, err)
+ }
+ return nil
}
func (w *fen) WatchList() []string {
diff --git a/hack/tools/vendor/github.com/fsnotify/fsnotify/backend_inotify.go b/hack/tools/vendor/github.com/fsnotify/fsnotify/backend_inotify.go
index 36c311694cd5..a36cb89d7361 100644
--- a/hack/tools/vendor/github.com/fsnotify/fsnotify/backend_inotify.go
+++ b/hack/tools/vendor/github.com/fsnotify/fsnotify/backend_inotify.go
@@ -19,6 +19,7 @@ import (
)
type inotify struct {
+ *shared
Events chan Event
Errors chan error
@@ -27,8 +28,6 @@ type inotify struct {
fd int
inotifyFile *os.File
watches *watches
- done chan struct{} // Channel for sending a "quit message" to the reader goroutine
- doneMu sync.Mutex
doneResp chan struct{} // Channel to respond to Close
// Store rename cookies in an array, with the index wrapping to 0. Almost
@@ -52,7 +51,6 @@ type inotify struct {
type (
watches struct {
- mu sync.RWMutex
wd map[uint32]*watch // wd → watch
path map[string]uint32 // pathname → wd
}
@@ -75,34 +73,13 @@ func newWatches() *watches {
}
}
-func (w *watches) len() int {
- w.mu.RLock()
- defer w.mu.RUnlock()
- return len(w.wd)
-}
-
-func (w *watches) add(ww *watch) {
- w.mu.Lock()
- defer w.mu.Unlock()
- w.wd[ww.wd] = ww
- w.path[ww.path] = ww.wd
-}
-
-func (w *watches) remove(wd uint32) {
- w.mu.Lock()
- defer w.mu.Unlock()
- watch := w.wd[wd] // Could have had Remove() called. See #616.
- if watch == nil {
- return
- }
- delete(w.path, watch.path)
- delete(w.wd, wd)
-}
+func (w *watches) byPath(path string) *watch { return w.wd[w.path[path]] }
+func (w *watches) byWd(wd uint32) *watch { return w.wd[wd] }
+func (w *watches) len() int { return len(w.wd) }
+func (w *watches) add(ww *watch) { w.wd[ww.wd] = ww; w.path[ww.path] = ww.wd }
+func (w *watches) remove(watch *watch) { delete(w.path, watch.path); delete(w.wd, watch.wd) }
func (w *watches) removePath(path string) ([]uint32, error) {
- w.mu.Lock()
- defer w.mu.Unlock()
-
path, recurse := recursivePath(path)
wd, ok := w.path[path]
if !ok {
@@ -123,7 +100,7 @@ func (w *watches) removePath(path string) ([]uint32, error) {
wds := make([]uint32, 0, 8)
wds = append(wds, wd)
for p, rwd := range w.path {
- if filepath.HasPrefix(p, path) {
+ if strings.HasPrefix(p, path) {
delete(w.path, p)
delete(w.wd, rwd)
wds = append(wds, rwd)
@@ -132,22 +109,7 @@ func (w *watches) removePath(path string) ([]uint32, error) {
return wds, nil
}
-func (w *watches) byPath(path string) *watch {
- w.mu.RLock()
- defer w.mu.RUnlock()
- return w.wd[w.path[path]]
-}
-
-func (w *watches) byWd(wd uint32) *watch {
- w.mu.RLock()
- defer w.mu.RUnlock()
- return w.wd[wd]
-}
-
func (w *watches) updatePath(path string, f func(*watch) (*watch, error)) error {
- w.mu.Lock()
- defer w.mu.Unlock()
-
var existing *watch
wd, ok := w.path[path]
if ok {
@@ -170,11 +132,9 @@ func (w *watches) updatePath(path string, f func(*watch) (*watch, error)) error
return nil
}
-func newBackend(ev chan Event, errs chan error) (backend, error) {
- return newBufferedBackend(0, ev, errs)
-}
+var defaultBufferSize = 0
-func newBufferedBackend(sz uint, ev chan Event, errs chan error) (backend, error) {
+func newBackend(ev chan Event, errs chan error) (backend, error) {
// Need to set nonblocking mode for SetDeadline to work, otherwise blocking
// I/O operations won't terminate on close.
fd, errno := unix.InotifyInit1(unix.IN_CLOEXEC | unix.IN_NONBLOCK)
@@ -183,12 +143,12 @@ func newBufferedBackend(sz uint, ev chan Event, errs chan error) (backend, error
}
w := &inotify{
+ shared: newShared(ev, errs),
Events: ev,
Errors: errs,
fd: fd,
inotifyFile: os.NewFile(uintptr(fd), ""),
watches: newWatches(),
- done: make(chan struct{}),
doneResp: make(chan struct{}),
}
@@ -196,46 +156,10 @@ func newBufferedBackend(sz uint, ev chan Event, errs chan error) (backend, error
return w, nil
}
-// Returns true if the event was sent, or false if watcher is closed.
-func (w *inotify) sendEvent(e Event) bool {
- select {
- case <-w.done:
- return false
- case w.Events <- e:
- return true
- }
-}
-
-// Returns true if the error was sent, or false if watcher is closed.
-func (w *inotify) sendError(err error) bool {
- if err == nil {
- return true
- }
- select {
- case <-w.done:
- return false
- case w.Errors <- err:
- return true
- }
-}
-
-func (w *inotify) isClosed() bool {
- select {
- case <-w.done:
- return true
- default:
- return false
- }
-}
-
func (w *inotify) Close() error {
- w.doneMu.Lock()
- if w.isClosed() {
- w.doneMu.Unlock()
+ if w.shared.close() {
return nil
}
- close(w.done)
- w.doneMu.Unlock()
// Causes any blocking reads to return with an error, provided the file
// still supports deadline operations.
@@ -244,9 +168,7 @@ func (w *inotify) Close() error {
return err
}
- // Wait for goroutine to close
- <-w.doneResp
-
+ <-w.doneResp // Wait for readEvents() to finish.
return nil
}
@@ -266,6 +188,43 @@ func (w *inotify) AddWith(path string, opts ...addOpt) error {
return fmt.Errorf("%w: %s", xErrUnsupported, with.op)
}
+ add := func(path string, with withOpts, recurse bool) error {
+ var flags uint32
+ if with.noFollow {
+ flags |= unix.IN_DONT_FOLLOW
+ }
+ if with.op.Has(Create) {
+ flags |= unix.IN_CREATE
+ }
+ if with.op.Has(Write) {
+ flags |= unix.IN_MODIFY
+ }
+ if with.op.Has(Remove) {
+ flags |= unix.IN_DELETE | unix.IN_DELETE_SELF
+ }
+ if with.op.Has(Rename) {
+ flags |= unix.IN_MOVED_TO | unix.IN_MOVED_FROM | unix.IN_MOVE_SELF
+ }
+ if with.op.Has(Chmod) {
+ flags |= unix.IN_ATTRIB
+ }
+ if with.op.Has(xUnportableOpen) {
+ flags |= unix.IN_OPEN
+ }
+ if with.op.Has(xUnportableRead) {
+ flags |= unix.IN_ACCESS
+ }
+ if with.op.Has(xUnportableCloseWrite) {
+ flags |= unix.IN_CLOSE_WRITE
+ }
+ if with.op.Has(xUnportableCloseRead) {
+ flags |= unix.IN_CLOSE_NOWRITE
+ }
+ return w.register(path, flags, recurse)
+ }
+
+ w.mu.Lock()
+ defer w.mu.Unlock()
path, recurse := recursivePath(path)
if recurse {
return filepath.WalkDir(path, func(root string, d fs.DirEntry, err error) error {
@@ -289,46 +248,11 @@ func (w *inotify) AddWith(path string, opts ...addOpt) error {
w.sendEvent(Event{Name: root, Op: Create})
}
- return w.add(root, with, true)
+ return add(root, with, true)
})
}
- return w.add(path, with, false)
-}
-
-func (w *inotify) add(path string, with withOpts, recurse bool) error {
- var flags uint32
- if with.noFollow {
- flags |= unix.IN_DONT_FOLLOW
- }
- if with.op.Has(Create) {
- flags |= unix.IN_CREATE
- }
- if with.op.Has(Write) {
- flags |= unix.IN_MODIFY
- }
- if with.op.Has(Remove) {
- flags |= unix.IN_DELETE | unix.IN_DELETE_SELF
- }
- if with.op.Has(Rename) {
- flags |= unix.IN_MOVED_TO | unix.IN_MOVED_FROM | unix.IN_MOVE_SELF
- }
- if with.op.Has(Chmod) {
- flags |= unix.IN_ATTRIB
- }
- if with.op.Has(xUnportableOpen) {
- flags |= unix.IN_OPEN
- }
- if with.op.Has(xUnportableRead) {
- flags |= unix.IN_ACCESS
- }
- if with.op.Has(xUnportableCloseWrite) {
- flags |= unix.IN_CLOSE_WRITE
- }
- if with.op.Has(xUnportableCloseRead) {
- flags |= unix.IN_CLOSE_NOWRITE
- }
- return w.register(path, flags, recurse)
+ return add(path, with, false)
}
func (w *inotify) register(path string, flags uint32, recurse bool) error {
@@ -342,6 +266,10 @@ func (w *inotify) register(path string, flags uint32, recurse bool) error {
return nil, err
}
+ if e, ok := w.watches.wd[uint32(wd)]; ok {
+ return e, nil
+ }
+
if existing == nil {
return &watch{
wd: uint32(wd),
@@ -365,6 +293,9 @@ func (w *inotify) Remove(name string) error {
fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s Remove(%q)\n",
time.Now().Format("15:04:05.000000000"), name)
}
+
+ w.mu.Lock()
+ defer w.mu.Unlock()
return w.remove(filepath.Clean(name))
}
@@ -399,13 +330,12 @@ func (w *inotify) WatchList() []string {
return nil
}
+ w.mu.Lock()
+ defer w.mu.Unlock()
entries := make([]string, 0, w.watches.len())
- w.watches.mu.RLock()
for pathname := range w.watches.path {
entries = append(entries, pathname)
}
- w.watches.mu.RUnlock()
-
return entries
}
@@ -418,21 +348,17 @@ func (w *inotify) readEvents() {
close(w.Events)
}()
- var (
- buf [unix.SizeofInotifyEvent * 4096]byte // Buffer for a maximum of 4096 raw events
- errno error // Syscall errno
- )
+ var buf [unix.SizeofInotifyEvent * 4096]byte // Buffer for a maximum of 4096 raw events
for {
- // See if we have been closed.
if w.isClosed() {
return
}
n, err := w.inotifyFile.Read(buf[:])
- switch {
- case errors.Unwrap(err) == os.ErrClosed:
- return
- case err != nil:
+ if err != nil {
+ if errors.Is(err, os.ErrClosed) {
+ return
+ }
if !w.sendError(err) {
return
}
@@ -440,13 +366,9 @@ func (w *inotify) readEvents() {
}
if n < unix.SizeofInotifyEvent {
- var err error
+ err := errors.New("notify: short read in readEvents()") // Read was too short.
if n == 0 {
err = io.EOF // If EOF is received. This should really never happen.
- } else if n < 0 {
- err = errno // If an error occurred while reading.
- } else {
- err = errors.New("notify: short read in readEvents()") // Read was too short.
}
if !w.sendError(err) {
return
@@ -454,132 +376,135 @@ func (w *inotify) readEvents() {
continue
}
- // We don't know how many events we just read into the buffer
- // While the offset points to at least one whole event...
+ // We don't know how many events we just read into the buffer While the
+ // offset points to at least one whole event.
var offset uint32
for offset <= uint32(n-unix.SizeofInotifyEvent) {
- var (
- // Point "raw" to the event in the buffer
- raw = (*unix.InotifyEvent)(unsafe.Pointer(&buf[offset]))
- mask = uint32(raw.Mask)
- nameLen = uint32(raw.Len)
- // Move to the next event in the buffer
- next = func() { offset += unix.SizeofInotifyEvent + nameLen }
- )
-
- if mask&unix.IN_Q_OVERFLOW != 0 {
+ // Point to the event in the buffer.
+ inEvent := (*unix.InotifyEvent)(unsafe.Pointer(&buf[offset]))
+
+ if inEvent.Mask&unix.IN_Q_OVERFLOW != 0 {
if !w.sendError(ErrEventOverflow) {
return
}
}
- /// If the event happened to the watched directory or the watched
- /// file, the kernel doesn't append the filename to the event, but
- /// we would like to always fill the the "Name" field with a valid
- /// filename. We retrieve the path of the watch from the "paths"
- /// map.
- watch := w.watches.byWd(uint32(raw.Wd))
- /// Can be nil if Remove() was called in another goroutine for this
- /// path inbetween reading the events from the kernel and reading
- /// the internal state. Not much we can do about it, so just skip.
- /// See #616.
- if watch == nil {
- next()
- continue
+ ev, ok := w.handleEvent(inEvent, &buf, offset)
+ if !ok {
+ return
}
-
- name := watch.path
- if nameLen > 0 {
- /// Point "bytes" at the first byte of the filename
- bytes := (*[unix.PathMax]byte)(unsafe.Pointer(&buf[offset+unix.SizeofInotifyEvent]))[:nameLen:nameLen]
- /// The filename is padded with NULL bytes. TrimRight() gets rid of those.
- name += "/" + strings.TrimRight(string(bytes[0:nameLen]), "\000")
+ if !w.sendEvent(ev) {
+ return
}
- if debug {
- internal.Debug(name, raw.Mask, raw.Cookie)
- }
+ // Move to the next event in the buffer
+ offset += unix.SizeofInotifyEvent + inEvent.Len
+ }
+ }
+}
- if mask&unix.IN_IGNORED != 0 { //&& event.Op != 0
- next()
- continue
- }
+func (w *inotify) handleEvent(inEvent *unix.InotifyEvent, buf *[65536]byte, offset uint32) (Event, bool) {
+ w.mu.Lock()
+ defer w.mu.Unlock()
- // inotify will automatically remove the watch on deletes; just need
- // to clean our state here.
- if mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF {
- w.watches.remove(watch.wd)
- }
+ /// If the event happened to the watched directory or the watched file, the
+ /// kernel doesn't append the filename to the event, but we would like to
+ /// always fill the the "Name" field with a valid filename. We retrieve the
+ /// path of the watch from the "paths" map.
+ ///
+ /// Can be nil if Remove() was called in another goroutine for this path
+ /// inbetween reading the events from the kernel and reading the internal
+ /// state. Not much we can do about it, so just skip. See #616.
+ watch := w.watches.byWd(uint32(inEvent.Wd))
+ if watch == nil {
+ return Event{}, true
+ }
- // We can't really update the state when a watched path is moved;
- // only IN_MOVE_SELF is sent and not IN_MOVED_{FROM,TO}. So remove
- // the watch.
- if mask&unix.IN_MOVE_SELF == unix.IN_MOVE_SELF {
- if watch.recurse {
- next() // Do nothing
- continue
- }
+ var (
+ name = watch.path
+ nameLen = uint32(inEvent.Len)
+ )
+ if nameLen > 0 {
+ /// Point "bytes" at the first byte of the filename
+ bb := *buf
+ bytes := (*[unix.PathMax]byte)(unsafe.Pointer(&bb[offset+unix.SizeofInotifyEvent]))[:nameLen:nameLen]
+ /// The filename is padded with NULL bytes. TrimRight() gets rid of those.
+ name += "/" + strings.TrimRight(string(bytes[0:nameLen]), "\x00")
+ }
- err := w.remove(watch.path)
- if err != nil && !errors.Is(err, ErrNonExistentWatch) {
- if !w.sendError(err) {
- return
- }
- }
+ if debug {
+ internal.Debug(name, inEvent.Mask, inEvent.Cookie)
+ }
+
+ if inEvent.Mask&unix.IN_IGNORED != 0 || inEvent.Mask&unix.IN_UNMOUNT != 0 {
+ w.watches.remove(watch)
+ return Event{}, true
+ }
+
+ // inotify will automatically remove the watch on deletes; just need
+ // to clean our state here.
+ if inEvent.Mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF {
+ w.watches.remove(watch)
+ }
+
+ // We can't really update the state when a watched path is moved; only
+ // IN_MOVE_SELF is sent and not IN_MOVED_{FROM,TO}. So remove the watch.
+ if inEvent.Mask&unix.IN_MOVE_SELF == unix.IN_MOVE_SELF {
+ if watch.recurse { // Do nothing
+ return Event{}, true
+ }
+
+ err := w.remove(watch.path)
+ if err != nil && !errors.Is(err, ErrNonExistentWatch) {
+ if !w.sendError(err) {
+ return Event{}, false
}
+ }
+ }
- /// Skip if we're watching both this path and the parent; the parent
- /// will already send a delete so no need to do it twice.
- if mask&unix.IN_DELETE_SELF != 0 {
- if _, ok := w.watches.path[filepath.Dir(watch.path)]; ok {
- next()
- continue
- }
+ /// Skip if we're watching both this path and the parent; the parent will
+ /// already send a delete so no need to do it twice.
+ if inEvent.Mask&unix.IN_DELETE_SELF != 0 {
+ _, ok := w.watches.path[filepath.Dir(watch.path)]
+ if ok {
+ return Event{}, true
+ }
+ }
+
+ ev := w.newEvent(name, inEvent.Mask, inEvent.Cookie)
+ // Need to update watch path for recurse.
+ if watch.recurse {
+ isDir := inEvent.Mask&unix.IN_ISDIR == unix.IN_ISDIR
+ /// New directory created: set up watch on it.
+ if isDir && ev.Has(Create) {
+ err := w.register(ev.Name, watch.flags, true)
+ if !w.sendError(err) {
+ return Event{}, false
}
- ev := w.newEvent(name, mask, raw.Cookie)
- // Need to update watch path for recurse.
- if watch.recurse {
- isDir := mask&unix.IN_ISDIR == unix.IN_ISDIR
- /// New directory created: set up watch on it.
- if isDir && ev.Has(Create) {
- err := w.register(ev.Name, watch.flags, true)
- if !w.sendError(err) {
- return
+ // This was a directory rename, so we need to update all the
+ // children.
+ //
+ // TODO: this is of course pretty slow; we should use a better data
+ // structure for storing all of this, e.g. store children in the
+ // watch. I have some code for this in my kqueue refactor we can use
+ // in the future. For now I'm okay with this as it's not publicly
+ // available. Correctness first, performance second.
+ if ev.renamedFrom != "" {
+ for k, ww := range w.watches.wd {
+ if k == watch.wd || ww.path == ev.Name {
+ continue
}
-
- // This was a directory rename, so we need to update all
- // the children.
- //
- // TODO: this is of course pretty slow; we should use a
- // better data structure for storing all of this, e.g. store
- // children in the watch. I have some code for this in my
- // kqueue refactor we can use in the future. For now I'm
- // okay with this as it's not publicly available.
- // Correctness first, performance second.
- if ev.renamedFrom != "" {
- w.watches.mu.Lock()
- for k, ww := range w.watches.wd {
- if k == watch.wd || ww.path == ev.Name {
- continue
- }
- if strings.HasPrefix(ww.path, ev.renamedFrom) {
- ww.path = strings.Replace(ww.path, ev.renamedFrom, ev.Name, 1)
- w.watches.wd[k] = ww
- }
- }
- w.watches.mu.Unlock()
+ if strings.HasPrefix(ww.path, ev.renamedFrom) {
+ ww.path = strings.Replace(ww.path, ev.renamedFrom, ev.Name, 1)
+ w.watches.wd[k] = ww
}
}
}
-
- /// Send the events that are not ignored on the events channel
- if !w.sendEvent(ev) {
- return
- }
- next()
}
}
+
+ return ev, true
}
func (w *inotify) isRecursive(path string) bool {
@@ -650,8 +575,8 @@ func (w *inotify) xSupports(op Op) bool {
}
func (w *inotify) state() {
- w.watches.mu.Lock()
- defer w.watches.mu.Unlock()
+ w.mu.Lock()
+ defer w.mu.Unlock()
for wd, ww := range w.watches.wd {
fmt.Fprintf(os.Stderr, "%4d: recurse=%t %q\n", wd, ww.recurse, ww.path)
}
diff --git a/hack/tools/vendor/github.com/fsnotify/fsnotify/backend_kqueue.go b/hack/tools/vendor/github.com/fsnotify/fsnotify/backend_kqueue.go
index d8de5ab76fdd..340aeec061c1 100644
--- a/hack/tools/vendor/github.com/fsnotify/fsnotify/backend_kqueue.go
+++ b/hack/tools/vendor/github.com/fsnotify/fsnotify/backend_kqueue.go
@@ -16,14 +16,13 @@ import (
)
type kqueue struct {
+ *shared
Events chan Event
Errors chan error
kq int // File descriptor (as returned by the kqueue() syscall).
closepipe [2]int // Pipe used for closing kq.
watches *watches
- done chan struct{}
- doneMu sync.Mutex
}
type (
@@ -132,14 +131,18 @@ func (w *watches) byPath(path string) (watch, bool) {
return info, ok
}
-func (w *watches) updateDirFlags(path string, flags uint32) {
+func (w *watches) updateDirFlags(path string, flags uint32) bool {
w.mu.Lock()
defer w.mu.Unlock()
- fd := w.path[path]
+ fd, ok := w.path[path]
+ if !ok { // Already deleted: don't re-set it here.
+ return false
+ }
info := w.wd[fd]
info.dirFlags = flags
w.wd[fd] = info
+ return true
}
func (w *watches) remove(fd int, path string) bool {
@@ -179,22 +182,20 @@ func (w *watches) seenBefore(path string) bool {
return ok
}
-func newBackend(ev chan Event, errs chan error) (backend, error) {
- return newBufferedBackend(0, ev, errs)
-}
+var defaultBufferSize = 0
-func newBufferedBackend(sz uint, ev chan Event, errs chan error) (backend, error) {
+func newBackend(ev chan Event, errs chan error) (backend, error) {
kq, closepipe, err := newKqueue()
if err != nil {
return nil, err
}
w := &kqueue{
+ shared: newShared(ev, errs),
Events: ev,
Errors: errs,
kq: kq,
closepipe: closepipe,
- done: make(chan struct{}),
watches: newWatches(),
}
@@ -210,7 +211,7 @@ func newBufferedBackend(sz uint, ev chan Event, errs chan error) (backend, error
// all.
func newKqueue() (kq int, closepipe [2]int, err error) {
kq, err = unix.Kqueue()
- if kq == -1 {
+ if err != nil {
return kq, closepipe, err
}
@@ -239,54 +240,17 @@ func newKqueue() (kq int, closepipe [2]int, err error) {
return kq, closepipe, nil
}
-// Returns true if the event was sent, or false if watcher is closed.
-func (w *kqueue) sendEvent(e Event) bool {
- select {
- case <-w.done:
- return false
- case w.Events <- e:
- return true
- }
-}
-
-// Returns true if the error was sent, or false if watcher is closed.
-func (w *kqueue) sendError(err error) bool {
- if err == nil {
- return true
- }
- select {
- case <-w.done:
- return false
- case w.Errors <- err:
- return true
- }
-}
-
-func (w *kqueue) isClosed() bool {
- select {
- case <-w.done:
- return true
- default:
- return false
- }
-}
-
func (w *kqueue) Close() error {
- w.doneMu.Lock()
- if w.isClosed() {
- w.doneMu.Unlock()
+ if w.shared.close() {
return nil
}
- close(w.done)
- w.doneMu.Unlock()
pathsToRemove := w.watches.listPaths(false)
for _, name := range pathsToRemove {
w.Remove(name)
}
- // Send "quit" message to the reader goroutine.
- unix.Close(w.closepipe[1])
+ unix.Close(w.closepipe[1]) // Send "quit" message to readEvents
return nil
}
@@ -303,7 +267,7 @@ func (w *kqueue) AddWith(name string, opts ...addOpt) error {
return fmt.Errorf("%w: %s", xErrUnsupported, with.op)
}
- _, err := w.addWatch(name, noteAllEvents)
+ _, err := w.addWatch(name, noteAllEvents, false)
if err != nil {
return err
}
@@ -366,7 +330,7 @@ const noteAllEvents = unix.NOTE_DELETE | unix.NOTE_WRITE | unix.NOTE_ATTRIB | un
// described in kevent(2).
//
// Returns the real path to the file which was added, with symlinks resolved.
-func (w *kqueue) addWatch(name string, flags uint32) (string, error) {
+func (w *kqueue) addWatch(name string, flags uint32, listDir bool) (string, error) {
if w.isClosed() {
return "", ErrClosed
}
@@ -385,15 +349,15 @@ func (w *kqueue) addWatch(name string, flags uint32) (string, error) {
return "", nil
}
- // Follow symlinks.
- if fi.Mode()&os.ModeSymlink == os.ModeSymlink {
+ // Follow symlinks, but only for paths added with Add(), and not paths
+ // we're adding from internalWatch from a listdir.
+ if !listDir && fi.Mode()&os.ModeSymlink == os.ModeSymlink {
link, err := os.Readlink(name)
if err != nil {
- // Return nil because Linux can add unresolvable symlinks to the
- // watch list without problems, so maintain consistency with
- // that. There will be no file events for broken symlinks.
- // TODO: more specific check; returns os.PathError; ENOENT?
- return "", nil
+ return "", err
+ }
+ if !filepath.IsAbs(link) {
+ link = filepath.Join(filepath.Dir(name), link)
}
_, alreadyWatching = w.watches.byPath(link)
@@ -408,7 +372,7 @@ func (w *kqueue) addWatch(name string, flags uint32) (string, error) {
name = link
fi, err = os.Lstat(name)
if err != nil {
- return "", nil
+ return "", err
}
}
@@ -422,7 +386,6 @@ func (w *kqueue) addWatch(name string, flags uint32) (string, error) {
if errors.Is(err, unix.EINTR) {
continue
}
-
return "", err
}
@@ -444,10 +407,16 @@ func (w *kqueue) addWatch(name string, flags uint32) (string, error) {
if info.isDir {
watchDir := (flags&unix.NOTE_WRITE) == unix.NOTE_WRITE &&
(!alreadyWatching || (info.dirFlags&unix.NOTE_WRITE) != unix.NOTE_WRITE)
- w.watches.updateDirFlags(name, flags)
+ if !w.watches.updateDirFlags(name, flags) {
+ return "", nil
+ }
if watchDir {
- if err := w.watchDirectoryFiles(name); err != nil {
+ d := name
+ if info.linkName != "" {
+ d = info.linkName
+ }
+ if err := w.watchDirectoryFiles(d); err != nil {
return "", err
}
}
@@ -644,19 +613,22 @@ func (w *kqueue) dirChange(dir string) error {
if errors.Is(err, os.ErrNotExist) {
return nil
}
- return fmt.Errorf("fsnotify.dirChange: %w", err)
+ return fmt.Errorf("fsnotify.dirChange %q: %w", dir, err)
}
for _, f := range files {
fi, err := f.Info()
if err != nil {
+ if errors.Is(err, os.ErrNotExist) {
+ return nil
+ }
return fmt.Errorf("fsnotify.dirChange: %w", err)
}
err = w.sendCreateIfNew(filepath.Join(dir, fi.Name()), fi)
if err != nil {
// Don't need to send an error if this file isn't readable.
- if errors.Is(err, unix.EACCES) || errors.Is(err, unix.EPERM) {
+ if errors.Is(err, unix.EACCES) || errors.Is(err, unix.EPERM) || errors.Is(err, os.ErrNotExist) {
return nil
}
return fmt.Errorf("fsnotify.dirChange: %w", err)
@@ -688,11 +660,11 @@ func (w *kqueue) internalWatch(name string, fi os.FileInfo) (string, error) {
// mimic Linux providing delete events for subdirectories, but preserve
// the flags used if currently watching subdirectory
info, _ := w.watches.byPath(name)
- return w.addWatch(name, info.dirFlags|unix.NOTE_DELETE|unix.NOTE_RENAME)
+ return w.addWatch(name, info.dirFlags|unix.NOTE_DELETE|unix.NOTE_RENAME, true)
}
- // watch file to mimic Linux inotify
- return w.addWatch(name, noteAllEvents)
+ // Watch file to mimic Linux inotify.
+ return w.addWatch(name, noteAllEvents, true)
}
// Register events with the queue.
@@ -722,9 +694,9 @@ func (w *kqueue) read(events []unix.Kevent_t) ([]unix.Kevent_t, error) {
}
func (w *kqueue) xSupports(op Op) bool {
- if runtime.GOOS == "freebsd" {
- //return true // Supports everything.
- }
+ //if runtime.GOOS == "freebsd" {
+ // return true // Supports everything.
+ //}
if op.Has(xUnportableOpen) || op.Has(xUnportableRead) ||
op.Has(xUnportableCloseWrite) || op.Has(xUnportableCloseRead) {
return false
diff --git a/hack/tools/vendor/github.com/fsnotify/fsnotify/backend_other.go b/hack/tools/vendor/github.com/fsnotify/fsnotify/backend_other.go
index 5eb5dbc66f26..b8c0ad722675 100644
--- a/hack/tools/vendor/github.com/fsnotify/fsnotify/backend_other.go
+++ b/hack/tools/vendor/github.com/fsnotify/fsnotify/backend_other.go
@@ -9,12 +9,11 @@ type other struct {
Errors chan error
}
+var defaultBufferSize = 0
+
func newBackend(ev chan Event, errs chan error) (backend, error) {
return nil, errors.New("fsnotify not supported on the current platform")
}
-func newBufferedBackend(sz uint, ev chan Event, errs chan error) (backend, error) {
- return newBackend(ev, errs)
-}
func (w *other) Close() error { return nil }
func (w *other) WatchList() []string { return nil }
func (w *other) Add(name string) error { return nil }
diff --git a/hack/tools/vendor/github.com/fsnotify/fsnotify/backend_windows.go b/hack/tools/vendor/github.com/fsnotify/fsnotify/backend_windows.go
index c54a63083835..3433642d6419 100644
--- a/hack/tools/vendor/github.com/fsnotify/fsnotify/backend_windows.go
+++ b/hack/tools/vendor/github.com/fsnotify/fsnotify/backend_windows.go
@@ -28,18 +28,16 @@ type readDirChangesW struct {
port windows.Handle // Handle to completion port
input chan *input // Inputs to the reader are sent on this channel
- quit chan chan<- error
+ done chan chan<- error
mu sync.Mutex // Protects access to watches, closed
watches watchMap // Map of watches (key: i-number)
closed bool // Set to true when Close() is first called
}
-func newBackend(ev chan Event, errs chan error) (backend, error) {
- return newBufferedBackend(50, ev, errs)
-}
+var defaultBufferSize = 50
-func newBufferedBackend(sz uint, ev chan Event, errs chan error) (backend, error) {
+func newBackend(ev chan Event, errs chan error) (backend, error) {
port, err := windows.CreateIoCompletionPort(windows.InvalidHandle, 0, 0, 0)
if err != nil {
return nil, os.NewSyscallError("CreateIoCompletionPort", err)
@@ -50,7 +48,7 @@ func newBufferedBackend(sz uint, ev chan Event, errs chan error) (backend, error
port: port,
watches: make(watchMap),
input: make(chan *input, 1),
- quit: make(chan chan<- error, 1),
+ done: make(chan chan<- error, 1),
}
go w.readEvents()
return w, nil
@@ -70,8 +68,8 @@ func (w *readDirChangesW) sendEvent(name, renamedFrom string, mask uint64) bool
event := w.newEvent(name, uint32(mask))
event.renamedFrom = renamedFrom
select {
- case ch := <-w.quit:
- w.quit <- ch
+ case ch := <-w.done:
+ w.done <- ch
case w.Events <- event:
}
return true
@@ -83,10 +81,10 @@ func (w *readDirChangesW) sendError(err error) bool {
return true
}
select {
+ case <-w.done:
+ return false
case w.Errors <- err:
return true
- case <-w.quit:
- return false
}
}
@@ -99,9 +97,9 @@ func (w *readDirChangesW) Close() error {
w.closed = true
w.mu.Unlock()
- // Send "quit" message to the reader goroutine
+ // Send "done" message to the reader goroutine
ch := make(chan error)
- w.quit <- ch
+ w.done <- ch
if err := w.wakeupReader(); err != nil {
return err
}
@@ -495,7 +493,7 @@ func (w *readDirChangesW) readEvents() {
watch := (*watch)(unsafe.Pointer(ov))
if watch == nil {
select {
- case ch := <-w.quit:
+ case ch := <-w.done:
w.mu.Lock()
var indexes []indexMap
for _, index := range w.watches {
diff --git a/hack/tools/vendor/github.com/fsnotify/fsnotify/fsnotify.go b/hack/tools/vendor/github.com/fsnotify/fsnotify/fsnotify.go
index 0760efe91600..f64be4bf98ee 100644
--- a/hack/tools/vendor/github.com/fsnotify/fsnotify/fsnotify.go
+++ b/hack/tools/vendor/github.com/fsnotify/fsnotify/fsnotify.go
@@ -244,12 +244,13 @@ var (
// ErrUnsupported is returned by AddWith() when WithOps() specified an
// Unportable event that's not supported on this platform.
+ //lint:ignore ST1012 not relevant
xErrUnsupported = errors.New("fsnotify: not supported with this backend")
)
// NewWatcher creates a new Watcher.
func NewWatcher() (*Watcher, error) {
- ev, errs := make(chan Event), make(chan error)
+ ev, errs := make(chan Event, defaultBufferSize), make(chan error)
b, err := newBackend(ev, errs)
if err != nil {
return nil, err
@@ -266,8 +267,8 @@ func NewWatcher() (*Watcher, error) {
// cases, and whenever possible you will be better off increasing the kernel
// buffers instead of adding a large userspace buffer.
func NewBufferedWatcher(sz uint) (*Watcher, error) {
- ev, errs := make(chan Event), make(chan error)
- b, err := newBufferedBackend(sz, ev, errs)
+ ev, errs := make(chan Event, sz), make(chan error)
+ b, err := newBackend(ev, errs)
if err != nil {
return nil, err
}
@@ -337,7 +338,8 @@ func (w *Watcher) Close() error { return w.b.Close() }
// WatchList returns all paths explicitly added with [Watcher.Add] (and are not
// yet removed).
//
-// Returns nil if [Watcher.Close] was called.
+// The order is undefined, and may differ per call. Returns nil if
+// [Watcher.Close] was called.
func (w *Watcher) WatchList() []string { return w.b.WatchList() }
// Supports reports if all the listed operations are supported by this platform.
diff --git a/hack/tools/vendor/github.com/fsnotify/fsnotify/internal/darwin.go b/hack/tools/vendor/github.com/fsnotify/fsnotify/internal/darwin.go
index b0eab10090d3..0b01bc182a1e 100644
--- a/hack/tools/vendor/github.com/fsnotify/fsnotify/internal/darwin.go
+++ b/hack/tools/vendor/github.com/fsnotify/fsnotify/internal/darwin.go
@@ -9,14 +9,14 @@ import (
)
var (
- SyscallEACCES = syscall.EACCES
- UnixEACCES = unix.EACCES
+ ErrSyscallEACCES = syscall.EACCES
+ ErrUnixEACCES = unix.EACCES
)
var maxfiles uint64
-// Go 1.19 will do this automatically: https://go-review.googlesource.com/c/go/+/393354/
func SetRlimit() {
+ // Go 1.19 will do this automatically: https://go-review.googlesource.com/c/go/+/393354/
var l syscall.Rlimit
err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &l)
if err == nil && l.Cur != l.Max {
diff --git a/hack/tools/vendor/github.com/fsnotify/fsnotify/internal/freebsd.go b/hack/tools/vendor/github.com/fsnotify/fsnotify/internal/freebsd.go
index 547df1df84b5..5ac8b507978f 100644
--- a/hack/tools/vendor/github.com/fsnotify/fsnotify/internal/freebsd.go
+++ b/hack/tools/vendor/github.com/fsnotify/fsnotify/internal/freebsd.go
@@ -9,8 +9,8 @@ import (
)
var (
- SyscallEACCES = syscall.EACCES
- UnixEACCES = unix.EACCES
+ ErrSyscallEACCES = syscall.EACCES
+ ErrUnixEACCES = unix.EACCES
)
var maxfiles uint64
diff --git a/hack/tools/vendor/github.com/fsnotify/fsnotify/internal/unix.go b/hack/tools/vendor/github.com/fsnotify/fsnotify/internal/unix.go
index 30976ce97395..b251fb803869 100644
--- a/hack/tools/vendor/github.com/fsnotify/fsnotify/internal/unix.go
+++ b/hack/tools/vendor/github.com/fsnotify/fsnotify/internal/unix.go
@@ -1,4 +1,4 @@
-//go:build !windows && !darwin && !freebsd
+//go:build !windows && !darwin && !freebsd && !plan9
package internal
@@ -9,8 +9,8 @@ import (
)
var (
- SyscallEACCES = syscall.EACCES
- UnixEACCES = unix.EACCES
+ ErrSyscallEACCES = syscall.EACCES
+ ErrUnixEACCES = unix.EACCES
)
var maxfiles uint64
diff --git a/hack/tools/vendor/github.com/fsnotify/fsnotify/internal/windows.go b/hack/tools/vendor/github.com/fsnotify/fsnotify/internal/windows.go
index a72c64954905..896bc2e5a2f3 100644
--- a/hack/tools/vendor/github.com/fsnotify/fsnotify/internal/windows.go
+++ b/hack/tools/vendor/github.com/fsnotify/fsnotify/internal/windows.go
@@ -10,8 +10,8 @@ import (
// Just a dummy.
var (
- SyscallEACCES = errors.New("dummy")
- UnixEACCES = errors.New("dummy")
+ ErrSyscallEACCES = errors.New("dummy")
+ ErrUnixEACCES = errors.New("dummy")
)
func SetRlimit() {}
diff --git a/hack/tools/vendor/github.com/fsnotify/fsnotify/shared.go b/hack/tools/vendor/github.com/fsnotify/fsnotify/shared.go
new file mode 100644
index 000000000000..3ee9b58f1d2b
--- /dev/null
+++ b/hack/tools/vendor/github.com/fsnotify/fsnotify/shared.go
@@ -0,0 +1,64 @@
+package fsnotify
+
+import "sync"
+
+type shared struct {
+ Events chan Event
+ Errors chan error
+ done chan struct{}
+ mu sync.Mutex
+}
+
+func newShared(ev chan Event, errs chan error) *shared {
+ return &shared{
+ Events: ev,
+ Errors: errs,
+ done: make(chan struct{}),
+ }
+}
+
+// Returns true if the event was sent, or false if watcher is closed.
+func (w *shared) sendEvent(e Event) bool {
+ if e.Op == 0 {
+ return true
+ }
+ select {
+ case <-w.done:
+ return false
+ case w.Events <- e:
+ return true
+ }
+}
+
+// Returns true if the error was sent, or false if watcher is closed.
+func (w *shared) sendError(err error) bool {
+ if err == nil {
+ return true
+ }
+ select {
+ case <-w.done:
+ return false
+ case w.Errors <- err:
+ return true
+ }
+}
+
+func (w *shared) isClosed() bool {
+ select {
+ case <-w.done:
+ return true
+ default:
+ return false
+ }
+}
+
+// Mark as closed; returns true if it was already closed.
+func (w *shared) close() bool {
+ w.mu.Lock()
+ defer w.mu.Unlock()
+ if w.isClosed() {
+ return true
+ }
+ close(w.done)
+ return false
+}
diff --git a/hack/tools/vendor/github.com/fsnotify/fsnotify/staticcheck.conf b/hack/tools/vendor/github.com/fsnotify/fsnotify/staticcheck.conf
new file mode 100644
index 000000000000..8fa7351f0c24
--- /dev/null
+++ b/hack/tools/vendor/github.com/fsnotify/fsnotify/staticcheck.conf
@@ -0,0 +1,3 @@
+checks = ['all',
+ '-U1000', # Don't complain about unused functions.
+]
diff --git a/hack/tools/vendor/github.com/fxamacker/cbor/v2/README.md b/hack/tools/vendor/github.com/fxamacker/cbor/v2/README.md
index af0a79507e59..d072b81c7300 100644
--- a/hack/tools/vendor/github.com/fxamacker/cbor/v2/README.md
+++ b/hack/tools/vendor/github.com/fxamacker/cbor/v2/README.md
@@ -1,30 +1,31 @@
-# CBOR Codec in Go
-
-
+CBOR Codec
[fxamacker/cbor](https://github.com/fxamacker/cbor) is a library for encoding and decoding [CBOR](https://www.rfc-editor.org/info/std94) and [CBOR Sequences](https://www.rfc-editor.org/rfc/rfc8742.html).
CBOR is a [trusted alternative](https://www.rfc-editor.org/rfc/rfc8949.html#name-comparison-of-other-binary-) to JSON, MessagePack, Protocol Buffers, etc. CBOR is an Internet Standard defined by [IETF STD 94 (RFC 8949)](https://www.rfc-editor.org/info/std94) and is designed to be relevant for decades.
-`fxamacker/cbor` is used in projects by Arm Ltd., Cisco, EdgeX Foundry, Flow Foundation, Fraunhofer‑AISEC, Kubernetes, Let's Encrypt (ISRG), Linux Foundation, Microsoft, Mozilla, Oasis Protocol, Tailscale, Teleport, [etc](https://github.com/fxamacker/cbor#who-uses-fxamackercbor).
+`fxamacker/cbor` is used in projects by Arm Ltd., EdgeX Foundry, Flow Foundation, Fraunhofer‑AISEC, IBM, Kubernetes[*](https://github.com/search?q=org%3Akubernetes%20fxamacker%2Fcbor&type=code), Let's Encrypt, Linux Foundation, Microsoft, Oasis Protocol, Red Hat[*](https://github.com/search?q=org%3Aopenshift+fxamacker%2Fcbor&type=code), Tailscale[*](https://github.com/search?q=org%3Atailscale+fxamacker%2Fcbor&type=code), Veraison[*](https://github.com/search?q=org%3Averaison+fxamacker%2Fcbor&type=code), [etc](https://github.com/fxamacker/cbor#who-uses-fxamackercbor).
-See [Quick Start](#quick-start) and [Releases](https://github.com/fxamacker/cbor/releases/). 🆕 `UnmarshalFirst` and `DiagnoseFirst` can decode CBOR Sequences. `cbor.MarshalToBuffer()` and `UserBufferEncMode` accepts user-specified buffer.
+See [Quick Start](#quick-start) and [Releases](https://github.com/fxamacker/cbor/releases/). 🆕 `UnmarshalFirst` and `DiagnoseFirst` can decode CBOR Sequences. `MarshalToBuffer` and `UserBufferEncMode` accepts user-specified buffer.
## fxamacker/cbor
[](https://github.com/fxamacker/cbor/actions?query=workflow%3Aci)
-[](https://github.com/fxamacker/cbor/actions?query=workflow%3A%22cover+%E2%89%A596%25%22)
+[](https://github.com/fxamacker/cbor/actions?query=workflow%3A%22cover+%E2%89%A597%25%22)
[](https://github.com/fxamacker/cbor/actions/workflows/codeql-analysis.yml)
[](#fuzzing-and-code-coverage)
[](https://goreportcard.com/report/github.com/fxamacker/cbor)
+[](https://github.com/fxamacker/cbor#fuzzing-and-code-coverage)
`fxamacker/cbor` is a CBOR codec in full conformance with [IETF STD 94 (RFC 8949)](https://www.rfc-editor.org/info/std94). It also supports CBOR Sequences ([RFC 8742](https://www.rfc-editor.org/rfc/rfc8742.html)) and Extended Diagnostic Notation ([Appendix G of RFC 8610](https://www.rfc-editor.org/rfc/rfc8610.html#appendix-G)).
Features include full support for CBOR tags, [Core Deterministic Encoding](https://www.rfc-editor.org/rfc/rfc8949.html#name-core-deterministic-encoding), duplicate map key detection, etc.
+API is mostly same as `encoding/json`, plus interfaces that simplify concurrency and CBOR options.
+
Design balances trade-offs between security, speed, concurrency, encoded data size, usability, etc.
-Highlights
+ 🔎 Highlights
__🚀 Speed__
@@ -38,7 +39,7 @@ Codec passed multiple confidential security assessments in 2022. No vulnerabili
__🗜️ Data Size__
-Struct tags (`toarray`, `keyasint`, `omitempty`) automatically reduce size of encoded structs. Encoding optionally shrinks float64→32→16 when values fit.
+Struct tag options (`toarray`, `keyasint`, `omitempty`, `omitzero`) and field tag "-" automatically reduce size of encoded structs. Encoding optionally shrinks float64→32→16 when values fit.
__:jigsaw: Usability__
@@ -58,164 +59,205 @@ Features include CBOR [extension points](https://www.rfc-editor.org/rfc/rfc8949.
`fxamacker/cbor` has configurable limits, etc. that defend against malicious CBOR data.
-By contrast, `encoding/gob` is [not designed to be hardened against adversarial inputs](https://pkg.go.dev/encoding/gob#hdr-Security).
-
-Example decoding with encoding/gob 💥 fatal error (out of memory)
-
-```Go
-// Example of encoding/gob having "fatal error: runtime: out of memory"
-// while decoding 181 bytes.
-package main
-import (
- "bytes"
- "encoding/gob"
- "encoding/hex"
- "fmt"
-)
-
-// Example data is from https://github.com/golang/go/issues/24446
-// (shortened to 181 bytes).
-const data = "4dffb503010102303001ff30000109010130010800010130010800010130" +
- "01ffb80001014a01ffb60001014b01ff860001013001ff860001013001ff" +
- "860001013001ff860001013001ffb80000001eff850401010e3030303030" +
- "30303030303030303001ff3000010c0104000016ffb70201010830303030" +
- "3030303001ff3000010c000030ffb6040405fcff00303030303030303030" +
- "303030303030303030303030303030303030303030303030303030303030" +
- "30"
-
-type X struct {
- J *X
- K map[string]int
-}
-
-func main() {
- raw, _ := hex.DecodeString(data)
- decoder := gob.NewDecoder(bytes.NewReader(raw))
-
- var x X
- decoder.Decode(&x) // fatal error: runtime: out of memory
- fmt.Println("Decoding finished.")
-}
-```
-
-
-
-
-
-`fxamacker/cbor` is fast at rejecting malformed CBOR data. E.g. attempts to
-decode 10 bytes of malicious CBOR data to `[]byte` (with default settings):
-
-| Codec | Speed (ns/op) | Memory | Allocs |
-| :---- | ------------: | -----: | -----: |
-| fxamacker/cbor 2.5.0 | 44 ± 5% | 32 B/op | 2 allocs/op |
-| ugorji/go 1.2.11 | 5353261 ± 4% | 67111321 B/op | 13 allocs/op |
-
-Benchmark details
-
-Latest comparison used:
-- Input: `[]byte{0x9B, 0x00, 0x00, 0x42, 0xFA, 0x42, 0xFA, 0x42, 0xFA, 0x42}`
-- go1.19.10, linux/amd64, i5-13600K (disabled all e-cores, DDR4 @2933)
-- go test -bench=. -benchmem -count=20
-
-#### Prior comparisons
-
-| Codec | Speed (ns/op) | Memory | Allocs |
-| :---- | ------------: | -----: | -----: |
-| fxamacker/cbor 2.5.0-beta2 | 44.33 ± 2% | 32 B/op | 2 allocs/op |
-| fxamacker/cbor 0.1.0 - 2.4.0 | ~44.68 ± 6% | 32 B/op | 2 allocs/op |
-| ugorji/go 1.2.10 | 5524792.50 ± 3% | 67110491 B/op | 12 allocs/op |
-| ugorji/go 1.1.0 - 1.2.6 | 💥 runtime: | out of memory: | cannot allocate |
-
-- Input: `[]byte{0x9B, 0x00, 0x00, 0x42, 0xFA, 0x42, 0xFA, 0x42, 0xFA, 0x42}`
-- go1.19.6, linux/amd64, i5-13600K (DDR4)
-- go test -bench=. -benchmem -count=20
-
-
-
-
-
-### Smaller Encodings with Struct Tags
-
-Struct tags (`toarray`, `keyasint`, `omitempty`) reduce encoded size of structs.
-
-Example encoding 3-level nested Go struct to 1 byte CBOR
-
-https://go.dev/play/p/YxwvfPdFQG2
-
-```Go
-// Example encoding nested struct (with omitempty tag)
-// - encoding/json: 18 byte JSON
-// - fxamacker/cbor: 1 byte CBOR
-package main
-
-import (
- "encoding/hex"
- "encoding/json"
- "fmt"
-
- "github.com/fxamacker/cbor/v2"
-)
-
-type GrandChild struct {
- Quux int `json:",omitempty"`
-}
-
-type Child struct {
- Baz int `json:",omitempty"`
- Qux GrandChild `json:",omitempty"`
-}
-
-type Parent struct {
- Foo Child `json:",omitempty"`
- Bar int `json:",omitempty"`
-}
-
-func cb() {
- results, _ := cbor.Marshal(Parent{})
- fmt.Println("hex(CBOR): " + hex.EncodeToString(results))
-
- text, _ := cbor.Diagnose(results) // Diagnostic Notation
- fmt.Println("DN: " + text)
-}
-
-func js() {
- results, _ := json.Marshal(Parent{})
- fmt.Println("hex(JSON): " + hex.EncodeToString(results))
-
- text := string(results) // JSON
- fmt.Println("JSON: " + text)
-}
-
-func main() {
- cb()
- fmt.Println("-------------")
- js()
-}
-```
-
-Output (DN is Diagnostic Notation):
-```
-hex(CBOR): a0
-DN: {}
--------------
-hex(JSON): 7b22466f6f223a7b22517578223a7b7d7d7d
-JSON: {"Foo":{"Qux":{}}}
-```
-
-
-
-
-
-Example using different struct tags together:
+Notably, `fxamacker/cbor` is fast at rejecting malformed CBOR data.
+
+> [!NOTE]
+> Benchmarks rejecting 10 bytes of malicious CBOR data decoding to `[]byte`:
+>
+> | Codec | Speed (ns/op) | Memory | Allocs |
+> | :---- | ------------: | -----: | -----: |
+> | fxamacker/cbor 2.7.0 | 47 ± 7% | 32 B/op | 2 allocs/op |
+> | ugorji/go 1.2.12 | 5878187 ± 3% | 67111556 B/op | 13 allocs/op |
+>
+> Faster hardware (overclocked DDR4 or DDR5) can reduce speed difference.
+>
+> 🔎 Benchmark details
+>
+> Latest comparison for decoding CBOR data to Go `[]byte`:
+> - Input: `[]byte{0x9B, 0x00, 0x00, 0x42, 0xFA, 0x42, 0xFA, 0x42, 0xFA, 0x42}`
+> - go1.22.7, linux/amd64, i5-13600K (DDR4-2933, disabled e-cores)
+> - go test -bench=. -benchmem -count=20
+>
+> #### Prior comparisons
+>
+> | Codec | Speed (ns/op) | Memory | Allocs |
+> | :---- | ------------: | -----: | -----: |
+> | fxamacker/cbor 2.5.0-beta2 | 44.33 ± 2% | 32 B/op | 2 allocs/op |
+> | fxamacker/cbor 0.1.0 - 2.4.0 | ~44.68 ± 6% | 32 B/op | 2 allocs/op |
+> | ugorji/go 1.2.10 | 5524792.50 ± 3% | 67110491 B/op | 12 allocs/op |
+> | ugorji/go 1.1.0 - 1.2.6 | 💥 runtime: | out of memory: | cannot allocate |
+>
+> - Input: `[]byte{0x9B, 0x00, 0x00, 0x42, 0xFA, 0x42, 0xFA, 0x42, 0xFA, 0x42}`
+> - go1.19.6, linux/amd64, i5-13600K (DDR4)
+> - go test -bench=. -benchmem -count=20
+>
+>
+
+In contrast, some codecs can crash or use excessive resources while decoding bad data.
+
+> [!WARNING]
+> Go's `encoding/gob` is [not designed to be hardened against adversarial inputs](https://pkg.go.dev/encoding/gob#hdr-Security).
+>
+> 🔎 gob fatal error (out of memory) 💥 decoding 181 bytes
+>
+> ```Go
+> // Example of encoding/gob having "fatal error: runtime: out of memory"
+> // while decoding 181 bytes (all Go versions as of Dec. 8, 2024).
+> package main
+> import (
+> "bytes"
+> "encoding/gob"
+> "encoding/hex"
+> "fmt"
+> )
+>
+> // Example data is from https://github.com/golang/go/issues/24446
+> // (shortened to 181 bytes).
+> const data = "4dffb503010102303001ff30000109010130010800010130010800010130" +
+> "01ffb80001014a01ffb60001014b01ff860001013001ff860001013001ff" +
+> "860001013001ff860001013001ffb80000001eff850401010e3030303030" +
+> "30303030303030303001ff3000010c0104000016ffb70201010830303030" +
+> "3030303001ff3000010c000030ffb6040405fcff00303030303030303030" +
+> "303030303030303030303030303030303030303030303030303030303030" +
+> "30"
+>
+> type X struct {
+> J *X
+> K map[string]int
+> }
+>
+> func main() {
+> raw, _ := hex.DecodeString(data)
+> decoder := gob.NewDecoder(bytes.NewReader(raw))
+>
+> var x X
+> decoder.Decode(&x) // fatal error: runtime: out of memory
+> fmt.Println("Decoding finished.")
+> }
+> ```
+>
+>
+>
+
+### Smaller Encodings with Struct Tag Options
+
+Struct tags automatically reduce encoded size of structs and improve speed.
+
+We can write less code by using struct tag options:
+- `toarray`: encode without field names (decode back to original struct)
+- `keyasint`: encode field names as integers (decode back to original struct)
+- `omitempty`: omit empty field when encoding
+- `omitzero`: omit zero-value field when encoding
+
+As a special case, struct field tag "-" omits the field.
+
+NOTE: When a struct uses `toarray`, the encoder will ignore `omitempty` and `omitzero` to prevent position of encoded array elements from changing. This allows decoder to match encoded elements to their Go struct field.

-API is mostly same as `encoding/json`, plus interfaces that simplify concurrency for CBOR options.
+> [!NOTE]
+> `fxamacker/cbor` can encode a 3-level nested Go struct to 1 byte!
+> - `encoding/json`: 18 bytes of JSON
+> - `fxamacker/cbor`: 1 byte of CBOR
+>
+> 🔎 Encoding 3-level nested Go struct with omitempty
+>
+> https://go.dev/play/p/YxwvfPdFQG2
+>
+> ```Go
+> // Example encoding nested struct (with omitempty tag)
+> // - encoding/json: 18 byte JSON
+> // - fxamacker/cbor: 1 byte CBOR
+>
+> package main
+>
+> import (
+> "encoding/hex"
+> "encoding/json"
+> "fmt"
+>
+> "github.com/fxamacker/cbor/v2"
+> )
+>
+> type GrandChild struct {
+> Quux int `json:",omitempty"`
+> }
+>
+> type Child struct {
+> Baz int `json:",omitempty"`
+> Qux GrandChild `json:",omitempty"`
+> }
+>
+> type Parent struct {
+> Foo Child `json:",omitempty"`
+> Bar int `json:",omitempty"`
+> }
+>
+> func cb() {
+> results, _ := cbor.Marshal(Parent{})
+> fmt.Println("hex(CBOR): " + hex.EncodeToString(results))
+>
+> text, _ := cbor.Diagnose(results) // Diagnostic Notation
+> fmt.Println("DN: " + text)
+> }
+>
+> func js() {
+> results, _ := json.Marshal(Parent{})
+> fmt.Println("hex(JSON): " + hex.EncodeToString(results))
+>
+> text := string(results) // JSON
+> fmt.Println("JSON: " + text)
+> }
+>
+> func main() {
+> cb()
+> fmt.Println("-------------")
+> js()
+> }
+> ```
+>
+> Output (DN is Diagnostic Notation):
+> ```
+> hex(CBOR): a0
+> DN: {}
+> -------------
+> hex(JSON): 7b22466f6f223a7b22517578223a7b7d7d7d
+> JSON: {"Foo":{"Qux":{}}}
+> ```
+>
+>
+
## Quick Start
__Install__: `go get github.com/fxamacker/cbor/v2` and `import "github.com/fxamacker/cbor/v2"`.
+> [!TIP]
+>
+> Tinygo users can try beta/experimental branch [feature/cbor-tinygo-beta](https://github.com/fxamacker/cbor/tree/feature/cbor-tinygo-beta).
+>
+> 🔎 More about tinygo feature branch
+>
+> ### Tinygo
+>
+> Branch [feature/cbor-tinygo-beta](https://github.com/fxamacker/cbor/tree/feature/cbor-tinygo-beta) is based on fxamacker/cbor v2.7.0 and it can be compiled using tinygo v0.33 (also compiles with golang/go).
+>
+> It passes unit tests (with both go1.22 and tinygo v0.33) and is considered beta/experimental for tinygo.
+>
+> :warning: The `feature/cbor-tinygo-beta` branch does not get fuzz tested yet.
+>
+> Changes in this feature branch only affect tinygo compiled software. Summary of changes:
+> - default `DecOptions.MaxNestedLevels` is reduced to 16 (was 32). User can specify higher limit but 24+ crashes tests when compiled with tinygo v0.33.
+> - disabled decoding CBOR tag data to Go interface because tinygo v0.33 is missing needed feature.
+> - encoding error message can be different when encoding function type.
+>
+> Related tinygo issues:
+> - https://github.com/tinygo-org/tinygo/issues/4277
+> - https://github.com/tinygo-org/tinygo/issues/4458
+>
+>
+
+
### Key Points
This library can encode and decode CBOR (RFC 8949) and CBOR Sequences (RFC 8742).
@@ -252,16 +294,17 @@ rest, err = cbor.UnmarshalFirst(b, &v) // decode []byte b to v
// DiagnoseFirst translates first CBOR data item to text and returns remaining bytes.
text, rest, err = cbor.DiagnoseFirst(b) // decode []byte b to Diagnostic Notation text
-// NOTE: Unmarshal returns ExtraneousDataError if there are remaining bytes,
-// but new funcs UnmarshalFirst and DiagnoseFirst do not.
+// NOTE: Unmarshal() returns ExtraneousDataError if there are remaining bytes, but
+// UnmarshalFirst() and DiagnoseFirst() allow trailing bytes.
```
-__IMPORTANT__: 👉 CBOR settings allow trade-offs between speed, security, encoding size, etc.
-
-- Different CBOR libraries may use different default settings.
-- CBOR-based formats or protocols usually require specific settings.
-
-For example, WebAuthn uses "CTAP2 Canonical CBOR" which is available as a preset.
+> [!IMPORTANT]
+> CBOR settings allow trade-offs between speed, security, encoding size, etc.
+>
+> - Different CBOR libraries may use different default settings.
+> - CBOR-based formats or protocols usually require specific settings.
+>
+> For example, WebAuthn uses "CTAP2 Canonical CBOR" which is available as a preset.
### Presets
@@ -312,9 +355,63 @@ err = em.MarshalToBuffer(v, &buf) // encode v to provided buf
### Struct Tags
-Struct tags (`toarray`, `keyasint`, `omitempty`) reduce encoded size of structs.
+Struct tag options (`toarray`, `keyasint`, `omitempty`, `omitzero`) reduce encoded size of structs.
+
+As a special case, struct field tag "-" omits the field.
+
+ 🔎 Example encoding with struct field tag "-"
+
+https://go.dev/play/p/aWEIFxd7InX
+
+```Go
+// https://github.com/fxamacker/cbor/issues/652
+package main
+
+import (
+ "encoding/json"
+ "fmt"
+
+ "github.com/fxamacker/cbor/v2"
+)
+
+// The `cbor:"-"` tag omits the Type field when encoding to CBOR.
+type Entity struct {
+ _ struct{} `cbor:",toarray"`
+ ID uint64 `json:"id"`
+ Type string `cbor:"-" json:"typeOf"`
+ Name string `json:"name"`
+}
+
+func main() {
+ entity := Entity{
+ ID: 1,
+ Type: "int64",
+ Name: "Identifier",
+ }
+
+ c, _ := cbor.Marshal(entity)
+ diag, _ := cbor.Diagnose(c)
+ fmt.Printf("CBOR in hex: %x\n", c)
+ fmt.Printf("CBOR in edn: %s\n", diag)
+
+ j, _ := json.Marshal(entity)
+ fmt.Printf("JSON: %s\n", string(j))
+
+ fmt.Printf("JSON encoding is %d bytes\n", len(j))
+ fmt.Printf("CBOR encoding is %d bytes\n", len(c))
+
+ // Output:
+ // CBOR in hex: 82016a4964656e746966696572
+ // CBOR in edn: [1, "Identifier"]
+ // JSON: {"id":1,"typeOf":"int64","name":"Identifier"}
+ // JSON encoding is 45 bytes
+ // CBOR encoding is 13 bytes
+}
+```
+
+
-Example encoding 3-level nested Go struct to 1 byte CBOR
+ 🔎 Example encoding 3-level nested Go struct to 1 byte CBOR
https://go.dev/play/p/YxwvfPdFQG2
@@ -382,13 +479,13 @@ JSON: {"Foo":{"Qux":{}}}
-Example using several struct tags
+ 🔎 Example using struct tag options

-Struct tags simplify use of CBOR-based protocols that require CBOR arrays or maps with integer keys.
+Struct tag options simplify use of CBOR-based protocols that require CBOR arrays or maps with integer keys.
### CBOR Tags
@@ -404,7 +501,7 @@ em, err := opts.EncModeWithSharedTags(ts) // mutable shared CBOR tags
`TagSet` and modes using it are safe for concurrent use. Equivalent API is available for `DecMode`.
-Example using TagSet and TagOptions
+ 🔎 Example using TagSet and TagOptions
```go
// Use signedCWT struct defined in "Decoding CWT" example.
@@ -430,16 +527,149 @@ if err := dm.Unmarshal(data, &v); err != nil {
em, _ := cbor.EncOptions{}.EncModeWithTags(tags)
// Marshal signedCWT with tag number.
-if data, err := cbor.Marshal(v); err != nil {
+if data, err := em.Marshal(v); err != nil {
return err
}
```
+👉 `fxamacker/cbor` allows user apps to use almost any current or future CBOR tag number by implementing `cbor.Marshaler` and `cbor.Unmarshaler` interfaces.
+
+Basically, `MarshalCBOR` and `UnmarshalCBOR` functions can be implemented by user apps and those functions will automatically be called by this CBOR codec's `Marshal`, `Unmarshal`, etc.
+
+The following [example](https://github.com/fxamacker/cbor/blob/master/example_embedded_json_tag_for_cbor_test.go) shows how to encode and decode a tagged CBOR data item with tag number 262. The tag content is a JSON object "embedded" as a CBOR byte string (major type 2).
+
+ 🔎 Example using Embedded JSON Tag for CBOR (tag 262)
+
+```go
+// https://github.com/fxamacker/cbor/issues/657
+
+package cbor_test
+
+// NOTE: RFC 8949 does not mention tag number 262. IANA assigned
+// CBOR tag number 262 as "Embedded JSON Object" specified by the
+// document Embedded JSON Tag for CBOR:
+//
+// "Tag 262 can be applied to a byte string (major type 2) to indicate
+// that the byte string is a JSON Object. The length of the byte string
+// indicates the content."
+//
+// For more info, see Embedded JSON Tag for CBOR at:
+// https://github.com/toravir/CBOR-Tag-Specs/blob/master/embeddedJSON.md
+
+import (
+ "bytes"
+ "encoding/json"
+ "fmt"
+
+ "github.com/fxamacker/cbor/v2"
+)
+
+// cborTagNumForEmbeddedJSON is the CBOR tag number 262.
+const cborTagNumForEmbeddedJSON = 262
+
+// EmbeddedJSON represents a Go value to be encoded as a tagged CBOR data item
+// with tag number 262 and the tag content is a JSON object "embedded" as a
+// CBOR byte string (major type 2).
+type EmbeddedJSON struct {
+ any
+}
+
+func NewEmbeddedJSON(val any) EmbeddedJSON {
+ return EmbeddedJSON{val}
+}
+
+// MarshalCBOR encodes EmbeddedJSON to a tagged CBOR data item with the
+// tag number 262 and the tag content is a JSON object that is
+// "embedded" as a CBOR byte string.
+func (v EmbeddedJSON) MarshalCBOR() ([]byte, error) {
+ // Encode v to JSON object.
+ data, err := json.Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+
+ // Create cbor.Tag representing a tagged CBOR data item.
+ tag := cbor.Tag{
+ Number: cborTagNumForEmbeddedJSON,
+ Content: data,
+ }
+
+ // Marshal to a tagged CBOR data item.
+ return cbor.Marshal(tag)
+}
+
+// UnmarshalCBOR decodes a tagged CBOR data item to EmbeddedJSON.
+// The byte slice provided to this function must contain a single
+// tagged CBOR data item with the tag number 262 and tag content
+// must be a JSON object "embedded" as a CBOR byte string.
+func (v *EmbeddedJSON) UnmarshalCBOR(b []byte) error {
+ // Unmarshal tagged CBOR data item.
+ var tag cbor.Tag
+ if err := cbor.Unmarshal(b, &tag); err != nil {
+ return err
+ }
+
+ // Check tag number.
+ if tag.Number != cborTagNumForEmbeddedJSON {
+ return fmt.Errorf("got tag number %d, expect tag number %d", tag.Number, cborTagNumForEmbeddedJSON)
+ }
+
+ // Check tag content.
+ jsonData, isByteString := tag.Content.([]byte)
+ if !isByteString {
+ return fmt.Errorf("got tag content type %T, expect tag content []byte", tag.Content)
+ }
+
+ // Unmarshal JSON object.
+ return json.Unmarshal(jsonData, v)
+}
+
+// MarshalJSON encodes EmbeddedJSON to a JSON object.
+func (v EmbeddedJSON) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.any)
+}
+
+// UnmarshalJSON decodes a JSON object.
+func (v *EmbeddedJSON) UnmarshalJSON(b []byte) error {
+ dec := json.NewDecoder(bytes.NewReader(b))
+ dec.UseNumber()
+ return dec.Decode(&v.any)
+}
+
+func Example_embeddedJSONTagForCBOR() {
+ value := NewEmbeddedJSON(map[string]any{
+ "name": "gopher",
+ "id": json.Number("42"),
+ })
+
+ data, err := cbor.Marshal(value)
+ if err != nil {
+ panic(err)
+ }
+
+ fmt.Printf("cbor: %x\n", data)
+
+ var v EmbeddedJSON
+ err = cbor.Unmarshal(data, &v)
+ if err != nil {
+ panic(err)
+ }
+
+ fmt.Printf("%+v\n", v.any)
+ for k, v := range v.any.(map[string]any) {
+ fmt.Printf(" %s: %v (%T)\n", k, v, v)
+ }
+}
+```
+
+
+
+
### Functions and Interfaces
-Functions and interfaces at a glance
+ 🔎 Functions and interfaces at a glance
Common functions with same API as `encoding/json`:
- `Marshal`, `Unmarshal`
@@ -453,7 +683,7 @@ because RFC 8949 treats CBOR data item with remaining bytes as malformed.
Other useful functions:
- `Diagnose`, `DiagnoseFirst` produce human-readable [Extended Diagnostic Notation](https://www.rfc-editor.org/rfc/rfc8610.html#appendix-G) from CBOR data.
- `UnmarshalFirst` decodes first CBOR data item and return any remaining bytes.
-- `Wellformed` returns true if the the CBOR data item is well-formed.
+- `Wellformed` returns true if the CBOR data item is well-formed.
Interfaces identical or comparable to Go `encoding` packages include:
`Marshaler`, `Unmarshaler`, `BinaryMarshaler`, and `BinaryUnmarshaler`.
@@ -472,15 +702,28 @@ Default limits may need to be increased for systems handling very large data (e.
## Status
-v2.7.0 (June 23, 2024) adds features and improvements that help large projects (e.g. Kubernetes) use CBOR as an alternative to JSON and Protocol Buffers. Other improvements include speedups, improved memory use, bug fixes, new serialization options, etc. It passed fuzz tests (5+ billion executions) and is production quality.
+[v2.9.0](https://github.com/fxamacker/cbor/releases/tag/v2.9.0) (Jul 13, 2025) improved interoperability/transcoding between CBOR & JSON, refactored tests, and improved docs.
+- Add opt-in support for `encoding.TextMarshaler` and `encoding.TextUnmarshaler` to encode and decode from CBOR text string.
+- Add opt-in support for `json.Marshaler` and `json.Unmarshaler` via user-provided transcoding function.
+- Update docs for TimeMode, Tag, RawTag, and add example for Embedded JSON Tag for CBOR.
+
+v2.9.0 passed fuzz tests and is production quality.
+
+The minimum version of Go required to build:
+- v2.8.0 and newer releases require go 1.20+.
+- v2.7.1 and older releases require go 1.17+.
For more details, see [release notes](https://github.com/fxamacker/cbor/releases).
-### Prior Release
+### Prior Releases
+
+[v2.8.0](https://github.com/fxamacker/cbor/releases/tag/v2.8.0) (March 30, 2025) is a small release primarily to add `omitzero` option to struct field tags and fix bugs. It passed fuzz tests (billions of executions) and is production quality.
+
+[v2.7.0](https://github.com/fxamacker/cbor/releases/tag/v2.7.0) (June 23, 2024) adds features and improvements that help large projects (e.g. Kubernetes) use CBOR as an alternative to JSON and Protocol Buffers. Other improvements include speedups, improved memory use, bug fixes, new serialization options, etc. It passed fuzz tests (5+ billion executions) and is production quality.
[v2.6.0](https://github.com/fxamacker/cbor/releases/tag/v2.6.0) (February 2024) adds important new features, optimizations, and bug fixes. It is especially useful to systems that need to convert data between CBOR and JSON. New options and optimizations improve handling of bignum, integers, maps, and strings.
-v2.5.0 was released on Sunday, August 13, 2023 with new features and important bug fixes. It is fuzz tested and production quality after extended beta [v2.5.0-beta](https://github.com/fxamacker/cbor/releases/tag/v2.5.0-beta) (Dec 2022) -> [v2.5.0](https://github.com/fxamacker/cbor/releases/tag/v2.5.0) (Aug 2023).
+[v2.5.0](https://github.com/fxamacker/cbor/releases/tag/v2.5.0) was released on Sunday, August 13, 2023 with new features and important bug fixes. It is fuzz tested and production quality after extended beta [v2.5.0-beta](https://github.com/fxamacker/cbor/releases/tag/v2.5.0-beta) (Dec 2022) -> [v2.5.0](https://github.com/fxamacker/cbor/releases/tag/v2.5.0) (Aug 2023).
__IMPORTANT__: 👉 Before upgrading from v2.4 or older release, please read the notable changes highlighted in the release notes. v2.5.0 is a large release with bug fixes to error handling for extraneous data in `Unmarshal`, etc. that should be reviewed before upgrading.
@@ -489,7 +732,7 @@ See [v2.5.0 release notes](https://github.com/fxamacker/cbor/releases/tag/v2.5.0
See ["Version and API Changes"](https://github.com/fxamacker/cbor#versions-and-api-changes) section for more info about version numbering, etc.
+## [1.37.0/0.59.0/0.13.0] 2025-06-25
+
+### Added
+
+- The `go.opentelemetry.io/otel/semconv/v1.33.0` package.
+ The package contains semantic conventions from the `v1.33.0` version of the OpenTelemetry Semantic Conventions.
+ See the [migration documentation](./semconv/v1.33.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.32.0.`(#6799)
+- The `go.opentelemetry.io/otel/semconv/v1.34.0` package.
+ The package contains semantic conventions from the `v1.34.0` version of the OpenTelemetry Semantic Conventions. (#6812)
+- Add metric's schema URL as `otel_scope_schema_url` label in `go.opentelemetry.io/otel/exporters/prometheus`. (#5947)
+- Add metric's scope attributes as `otel_scope_[attribute]` labels in `go.opentelemetry.io/otel/exporters/prometheus`. (#5947)
+- Add `EventName` to `EnabledParameters` in `go.opentelemetry.io/otel/log`. (#6825)
+- Add `EventName` to `EnabledParameters` in `go.opentelemetry.io/otel/sdk/log`. (#6825)
+- Changed handling of `go.opentelemetry.io/otel/exporters/prometheus` metric renaming to add unit suffixes when it doesn't match one of the pre-defined values in the unit suffix map. (#6839)
+
+### Changed
+
+- The semantic conventions have been upgraded from `v1.26.0` to `v1.34.0` in `go.opentelemetry.io/otel/bridge/opentracing`. (#6827)
+- The semantic conventions have been upgraded from `v1.26.0` to `v1.34.0` in `go.opentelemetry.io/otel/exporters/zipkin`. (#6829)
+- The semantic conventions have been upgraded from `v1.26.0` to `v1.34.0` in `go.opentelemetry.io/otel/metric`. (#6832)
+- The semantic conventions have been upgraded from `v1.26.0` to `v1.34.0` in `go.opentelemetry.io/otel/sdk/resource`. (#6834)
+- The semantic conventions have been upgraded from `v1.26.0` to `v1.34.0` in `go.opentelemetry.io/otel/sdk/trace`. (#6835)
+- The semantic conventions have been upgraded from `v1.26.0` to `v1.34.0` in `go.opentelemetry.io/otel/trace`. (#6836)
+- `Record.Resource` now returns `*resource.Resource` instead of `resource.Resource` in `go.opentelemetry.io/otel/sdk/log`. (#6864)
+- Retry now shows error cause for context timeout in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`, `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`, `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`, `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`, `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`, `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#6898)
+
+### Fixed
+
+- Stop stripping trailing slashes from configured endpoint URL in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#6710)
+- Stop stripping trailing slashes from configured endpoint URL in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#6710)
+- Stop stripping trailing slashes from configured endpoint URL in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#6710)
+- Stop stripping trailing slashes from configured endpoint URL in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#6710)
+- Validate exponential histogram scale range for Prometheus compatibility in `go.opentelemetry.io/otel/exporters/prometheus`. (#6822)
+- Context cancellation during metric pipeline produce does not corrupt data in `go.opentelemetry.io/otel/sdk/metric`. (#6914)
+
+### Removed
+
+- `go.opentelemetry.io/otel/exporters/prometheus` no longer exports `otel_scope_info` metric. (#6770)
+
+## [0.12.2] 2025-05-22
+
+### Fixed
+
+- Retract `v0.12.0` release of `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc` module that contains invalid dependencies. (#6804)
+- Retract `v0.12.0` release of `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` module that contains invalid dependencies. (#6804)
+- Retract `v0.12.0` release of `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` module that contains invalid dependencies. (#6804)
+
+## [0.12.1] 2025-05-21
+
+### Fixes
+
+- Use the proper dependency version of `go.opentelemetry.io/otel/sdk/log/logtest` in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. (#6800)
+- Use the proper dependency version of `go.opentelemetry.io/otel/sdk/log/logtest` in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#6800)
+- Use the proper dependency version of `go.opentelemetry.io/otel/sdk/log/logtest` in `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. (#6800)
+
## [1.36.0/0.58.0/0.12.0] 2025-05-20
### Added
@@ -3288,7 +3343,10 @@ It contains api and sdk for trace and meter.
- CircleCI build CI manifest files.
- CODEOWNERS file to track owners of this project.
-[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.36.0...HEAD
+[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.37.0...HEAD
+[1.37.0/0.59.0/0.13.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.37.0
+[0.12.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/log/v0.12.2
+[0.12.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/log/v0.12.1
[1.36.0/0.58.0/0.12.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.36.0
[1.35.0/0.57.0/0.11.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.35.0
[1.34.0/0.56.0/0.10.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.34.0
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md b/hack/tools/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md
index 1902dac057a6..f9ddc281fc7f 100644
--- a/hack/tools/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md
@@ -109,10 +109,9 @@ A PR is considered **ready to merge** when:
This is not enforced through automation, but needs to be validated by the
maintainer merging.
- * The qualified approvals need to be from [Approver]s/[Maintainer]s
- affiliated with different companies. Two qualified approvals from
- [Approver]s or [Maintainer]s affiliated with the same company counts as a
- single qualified approval.
+ * At least one of the qualified approvals need to be from an
+ [Approver]/[Maintainer] affiliated with a different company than the author
+ of the PR.
* PRs introducing changes that have already been discussed and consensus
reached only need one qualified approval. The discussion and resolution
needs to be linked to the PR.
@@ -650,11 +649,11 @@ should be canceled.
### Maintainers
-- [Damien Mathieu](https://github.com/dmathieu), Elastic
-- [David Ashpole](https://github.com/dashpole), Google
-- [Robert Pająk](https://github.com/pellared), Splunk
-- [Sam Xie](https://github.com/XSAM), Cisco/AppDynamics
-- [Tyler Yahn](https://github.com/MrAlias), Splunk
+- [Damien Mathieu](https://github.com/dmathieu), Elastic ([GPG](https://keys.openpgp.org/search?q=5A126B972A81A6CE443E5E1B408B8E44F0873832))
+- [David Ashpole](https://github.com/dashpole), Google ([GPG](https://keys.openpgp.org/search?q=C0D1BDDCAAEAE573673085F176327DA4D864DC70))
+- [Robert Pająk](https://github.com/pellared), Splunk ([GPG](https://keys.openpgp.org/search?q=CDAD3A60476A3DE599AA5092E5F7C35A4DBE90C2))
+- [Sam Xie](https://github.com/XSAM), Splunk ([GPG](https://keys.openpgp.org/search?q=AEA033782371ABB18EE39188B8044925D6FEEBEA))
+- [Tyler Yahn](https://github.com/MrAlias), Splunk ([GPG](https://keys.openpgp.org/search?q=0x46B0F3E1A8B1BA5A))
### Emeritus
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/Makefile b/hack/tools/vendor/go.opentelemetry.io/otel/Makefile
index 62a56f4d341d..4fa423ca02d2 100644
--- a/hack/tools/vendor/go.opentelemetry.io/otel/Makefile
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/Makefile
@@ -293,7 +293,7 @@ semconv-generate: $(SEMCONVKIT)
--param tag=$(TAG) \
go \
/home/weaver/target
- $(SEMCONVKIT) -output "$(SEMCONVPKG)/$(TAG)" -tag "$(TAG)"
+ $(SEMCONVKIT) -semconv "$(SEMCONVPKG)" -tag "$(TAG)"
.PHONY: gorelease
gorelease: $(OTEL_GO_MOD_DIRS:%=gorelease/%)
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/README.md b/hack/tools/vendor/go.opentelemetry.io/otel/README.md
index b60078812125..5fa1b75c60e3 100644
--- a/hack/tools/vendor/go.opentelemetry.io/otel/README.md
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/README.md
@@ -7,6 +7,7 @@
[](https://scorecard.dev/viewer/?uri=github.com/open-telemetry/opentelemetry-go)
[](https://www.bestpractices.dev/projects/9996)
[](https://issues.oss-fuzz.com/issues?q=project:opentelemetry-go)
+[](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-go?ref=badge_shield&issueType=license)
[](https://cloud-native.slack.com/archives/C01NPAXACKT)
OpenTelemetry-Go is the [Go](https://golang.org/) implementation of [OpenTelemetry](https://opentelemetry.io/).
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/RELEASING.md b/hack/tools/vendor/go.opentelemetry.io/otel/RELEASING.md
index 7c1a9119dccf..1ddcdef0396b 100644
--- a/hack/tools/vendor/go.opentelemetry.io/otel/RELEASING.md
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/RELEASING.md
@@ -112,6 +112,29 @@ It is critical you make sure the version you push upstream is correct.
Finally create a Release for the new `` on GitHub.
The release body should include all the release notes from the Changelog for this release.
+### Sign the Release Artifact
+
+To ensure we comply with CNCF best practices, we need to sign the release artifact.
+The tarball attached to the GitHub release needs to be signed with your GPG key.
+
+Follow [these steps] to sign the release artifact and upload it to GitHub.
+You can use [this script] to verify the contents of the tarball before signing it.
+
+Be sure to use the correct GPG key when signing the release artifact.
+
+```terminal
+gpg --local-user --armor --detach-sign opentelemetry-go-.tar.gz
+```
+
+You can verify the signature with:
+
+```terminal
+gpg --verify opentelemetry-go-.tar.gz.asc opentelemetry-go-.tar.gz
+```
+
+[these steps]: https://wiki.debian.org/Creating%20signed%20GitHub%20releases
+[this script]: https://github.com/MrAlias/attest-sh
+
## Post-Release
### Contrib Repository
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/dependencies.Dockerfile b/hack/tools/vendor/go.opentelemetry.io/otel/dependencies.Dockerfile
index 51fb76b30d07..935bd487631d 100644
--- a/hack/tools/vendor/go.opentelemetry.io/otel/dependencies.Dockerfile
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/dependencies.Dockerfile
@@ -1,4 +1,4 @@
# This is a renovate-friendly source of Docker images.
-FROM python:3.13.3-slim-bullseye@sha256:9e3f9243e06fd68eb9519074b49878eda20ad39a855fac51aaffb741de20726e AS python
-FROM otel/weaver:v0.15.0@sha256:1cf1c72eaed57dad813c2e359133b8a15bd4facf305aae5b13bdca6d3eccff56 AS weaver
+FROM python:3.13.5-slim-bullseye@sha256:5b9fc0d8ef79cfb5f300e61cb516e0c668067bbf77646762c38c94107e230dbc AS python
+FROM otel/weaver:v0.15.2@sha256:b13acea09f721774daba36344861f689ac4bb8d6ecd94c4600b4d590c8fb34b9 AS weaver
FROM avtodev/markdown-lint:v1@sha256:6aeedc2f49138ce7a1cd0adffc1b1c0321b841dc2102408967d9301c031949ee AS markdown
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/sdk/metric/periodic_reader.go b/hack/tools/vendor/go.opentelemetry.io/otel/sdk/metric/periodic_reader.go
index ebb9a0463b3f..0a48aed74dda 100644
--- a/hack/tools/vendor/go.opentelemetry.io/otel/sdk/metric/periodic_reader.go
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/sdk/metric/periodic_reader.go
@@ -202,7 +202,7 @@ func (r *PeriodicReader) aggregation(
// collectAndExport gather all metric data related to the periodicReader r from
// the SDK and exports it with r's exporter.
func (r *PeriodicReader) collectAndExport(ctx context.Context) error {
- ctx, cancel := context.WithTimeout(ctx, r.timeout)
+ ctx, cancel := context.WithTimeoutCause(ctx, r.timeout, errors.New("reader collect and export timeout"))
defer cancel()
// TODO (#3047): Use a sync.Pool or persistent pointer instead of allocating rm every Collect.
@@ -278,7 +278,7 @@ func (r *PeriodicReader) ForceFlush(ctx context.Context) error {
// Prioritize the ctx timeout if it is set.
if _, ok := ctx.Deadline(); !ok {
var cancel context.CancelFunc
- ctx, cancel = context.WithTimeout(ctx, r.timeout)
+ ctx, cancel = context.WithTimeoutCause(ctx, r.timeout, errors.New("reader force flush timeout"))
defer cancel()
}
@@ -311,7 +311,7 @@ func (r *PeriodicReader) Shutdown(ctx context.Context) error {
// Prioritize the ctx timeout if it is set.
if _, ok := ctx.Deadline(); !ok {
var cancel context.CancelFunc
- ctx, cancel = context.WithTimeout(ctx, r.timeout)
+ ctx, cancel = context.WithTimeoutCause(ctx, r.timeout, errors.New("reader shutdown timeout"))
defer cancel()
}
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/sdk/metric/pipeline.go b/hack/tools/vendor/go.opentelemetry.io/otel/sdk/metric/pipeline.go
index 2240c26e9b4f..7bdb699cae05 100644
--- a/hack/tools/vendor/go.opentelemetry.io/otel/sdk/metric/pipeline.go
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/sdk/metric/pipeline.go
@@ -121,6 +121,14 @@ func (p *pipeline) addMultiCallback(c multiCallback) (unregister func()) {
//
// This method is safe to call concurrently.
func (p *pipeline) produce(ctx context.Context, rm *metricdata.ResourceMetrics) error {
+ // Only check if context is already cancelled before starting, not inside or after callback loops.
+ // If this method returns after executing some callbacks but before running all aggregations,
+ // internal aggregation state can be corrupted and result in incorrect data returned
+ // by future produce calls.
+ if err := ctx.Err(); err != nil {
+ return err
+ }
+
p.Lock()
defer p.Unlock()
@@ -130,12 +138,6 @@ func (p *pipeline) produce(ctx context.Context, rm *metricdata.ResourceMetrics)
if e := c(ctx); e != nil {
err = errors.Join(err, e)
}
- if err := ctx.Err(); err != nil {
- rm.Resource = nil
- clear(rm.ScopeMetrics) // Erase elements to let GC collect objects.
- rm.ScopeMetrics = rm.ScopeMetrics[:0]
- return err
- }
}
for e := p.multiCallbacks.Front(); e != nil; e = e.Next() {
// TODO make the callbacks parallel. ( #3034 )
@@ -143,13 +145,6 @@ func (p *pipeline) produce(ctx context.Context, rm *metricdata.ResourceMetrics)
if e := f(ctx); e != nil {
err = errors.Join(err, e)
}
- if err := ctx.Err(); err != nil {
- // This means the context expired before we finished running callbacks.
- rm.Resource = nil
- clear(rm.ScopeMetrics) // Erase elements to let GC collect objects.
- rm.ScopeMetrics = rm.ScopeMetrics[:0]
- return err
- }
}
rm.Resource = p.resource
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/sdk/metric/version.go b/hack/tools/vendor/go.opentelemetry.io/otel/sdk/metric/version.go
index cda142c7ea23..0e5adc1a7665 100644
--- a/hack/tools/vendor/go.opentelemetry.io/otel/sdk/metric/version.go
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/sdk/metric/version.go
@@ -5,5 +5,5 @@ package metric // import "go.opentelemetry.io/otel/sdk/metric"
// version is the current release version of the metric SDK in use.
func version() string {
- return "1.36.0"
+ return "1.37.0"
}
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go b/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go
index cf3c88e15cd6..cefe4ab914af 100644
--- a/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go
@@ -13,7 +13,7 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk"
- semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.34.0"
)
type (
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/container.go b/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/container.go
index 5ecd859a52d8..0d8619715e62 100644
--- a/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/container.go
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/container.go
@@ -11,7 +11,7 @@ import (
"os"
"regexp"
- semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.34.0"
)
type containerIDProvider func() (string, error)
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/env.go b/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/env.go
index 813f05624244..16a062ad8cb3 100644
--- a/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/env.go
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/env.go
@@ -12,7 +12,7 @@ import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
- semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.34.0"
)
const (
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go b/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go
index 2d0f65498a07..781903923858 100644
--- a/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go
@@ -8,7 +8,7 @@ import (
"errors"
"strings"
- semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.34.0"
)
type hostIDProvider func() (string, error)
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/os.go b/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/os.go
index 8a48ab4fa32e..01b4d27a0383 100644
--- a/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/os.go
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/os.go
@@ -8,7 +8,7 @@ import (
"strings"
"go.opentelemetry.io/otel/attribute"
- semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.34.0"
)
type osDescriptionProvider func() (string, error)
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/process.go b/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/process.go
index 085fe68fd770..6712ce80d5c4 100644
--- a/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/process.go
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/sdk/resource/process.go
@@ -11,7 +11,7 @@ import (
"path/filepath"
"runtime"
- semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.34.0"
)
type (
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/sdk/version.go b/hack/tools/vendor/go.opentelemetry.io/otel/sdk/version.go
index 1af257449ac4..c0217af6b9af 100644
--- a/hack/tools/vendor/go.opentelemetry.io/otel/sdk/version.go
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/sdk/version.go
@@ -6,5 +6,5 @@ package sdk // import "go.opentelemetry.io/otel/sdk"
// Version is the current release version of the OpenTelemetry SDK in use.
func Version() string {
- return "1.36.0"
+ return "1.37.0"
}
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/MIGRATION.md b/hack/tools/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/MIGRATION.md
new file mode 100644
index 000000000000..02b56115e3c6
--- /dev/null
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/MIGRATION.md
@@ -0,0 +1,4 @@
+
+# Migration from v1.33.0 to v1.34.0
+
+The `go.opentelemetry.io/otel/semconv/v1.34.0` package should be a drop-in replacement for `go.opentelemetry.io/otel/semconv/v1.33.0`.
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/README.md b/hack/tools/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/README.md
new file mode 100644
index 000000000000..fab06c975266
--- /dev/null
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/README.md
@@ -0,0 +1,3 @@
+# Semconv v1.34.0
+
+[](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.34.0)
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/attribute_group.go b/hack/tools/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/attribute_group.go
new file mode 100644
index 000000000000..5b56662573a5
--- /dev/null
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/attribute_group.go
@@ -0,0 +1,13851 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Code generated from semantic convention specification. DO NOT EDIT.
+
+package semconv // import "go.opentelemetry.io/otel/semconv/v1.34.0"
+
+import "go.opentelemetry.io/otel/attribute"
+
+// Namespace: android
+const (
+ // AndroidAppStateKey is the attribute Key conforming to the "android.app.state"
+ // semantic conventions. It represents the this attribute represents the state
+ // of the application.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "created"
+ // Note: The Android lifecycle states are defined in
+ // [Activity lifecycle callbacks], and from which the `OS identifiers` are
+ // derived.
+ //
+ // [Activity lifecycle callbacks]: https://developer.android.com/guide/components/activities/activity-lifecycle#lc
+ AndroidAppStateKey = attribute.Key("android.app.state")
+
+ // AndroidOSAPILevelKey is the attribute Key conforming to the
+ // "android.os.api_level" semantic conventions. It represents the uniquely
+ // identifies the framework API revision offered by a version (`os.version`) of
+ // the android operating system. More information can be found [here].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "33", "32"
+ //
+ // [here]: https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels
+ AndroidOSAPILevelKey = attribute.Key("android.os.api_level")
+)
+
+// AndroidOSAPILevel returns an attribute KeyValue conforming to the
+// "android.os.api_level" semantic conventions. It represents the uniquely
+// identifies the framework API revision offered by a version (`os.version`) of
+// the android operating system. More information can be found [here].
+//
+// [here]: https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels
+func AndroidOSAPILevel(val string) attribute.KeyValue {
+ return AndroidOSAPILevelKey.String(val)
+}
+
+// Enum values for android.app.state
+var (
+ // Any time before Activity.onResume() or, if the app has no Activity,
+ // Context.startService() has been called in the app for the first time.
+ //
+ // Stability: development
+ AndroidAppStateCreated = AndroidAppStateKey.String("created")
+ // Any time after Activity.onPause() or, if the app has no Activity,
+ // Context.stopService() has been called when the app was in the foreground
+ // state.
+ //
+ // Stability: development
+ AndroidAppStateBackground = AndroidAppStateKey.String("background")
+ // Any time after Activity.onResume() or, if the app has no Activity,
+ // Context.startService() has been called when the app was in either the created
+ // or background states.
+ //
+ // Stability: development
+ AndroidAppStateForeground = AndroidAppStateKey.String("foreground")
+)
+
+// Namespace: app
+const (
+ // AppInstallationIDKey is the attribute Key conforming to the
+ // "app.installation.id" semantic conventions. It represents a unique identifier
+ // representing the installation of an application on a specific device.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2ab2916d-a51f-4ac8-80ee-45ac31a28092"
+ // Note: Its value SHOULD persist across launches of the same application
+ // installation, including through application upgrades.
+ // It SHOULD change if the application is uninstalled or if all applications of
+ // the vendor are uninstalled.
+ // Additionally, users might be able to reset this value (e.g. by clearing
+ // application data).
+ // If an app is installed multiple times on the same device (e.g. in different
+ // accounts on Android), each `app.installation.id` SHOULD have a different
+ // value.
+ // If multiple OpenTelemetry SDKs are used within the same application, they
+ // SHOULD use the same value for `app.installation.id`.
+ // Hardware IDs (e.g. serial number, IMEI, MAC address) MUST NOT be used as the
+ // `app.installation.id`.
+ //
+ // For iOS, this value SHOULD be equal to the [vendor identifier].
+ //
+ // For Android, examples of `app.installation.id` implementations include:
+ //
+ // - [Firebase Installation ID].
+ // - A globally unique UUID which is persisted across sessions in your
+ // application.
+ // - [App set ID].
+ // - [`Settings.getString(Settings.Secure.ANDROID_ID)`].
+ //
+ // More information about Android identifier best practices can be found [here]
+ // .
+ //
+ // [vendor identifier]: https://developer.apple.com/documentation/uikit/uidevice/identifierforvendor
+ // [Firebase Installation ID]: https://firebase.google.com/docs/projects/manage-installations
+ // [App set ID]: https://developer.android.com/identity/app-set-id
+ // [`Settings.getString(Settings.Secure.ANDROID_ID)`]: https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID
+ // [here]: https://developer.android.com/training/articles/user-data-ids
+ AppInstallationIDKey = attribute.Key("app.installation.id")
+
+ // AppScreenCoordinateXKey is the attribute Key conforming to the
+ // "app.screen.coordinate.x" semantic conventions. It represents the x
+ // (horizontal) coordinate of a screen coordinate, in screen pixels.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 0, 131
+ AppScreenCoordinateXKey = attribute.Key("app.screen.coordinate.x")
+
+ // AppScreenCoordinateYKey is the attribute Key conforming to the
+ // "app.screen.coordinate.y" semantic conventions. It represents the y
+ // (vertical) component of a screen coordinate, in screen pixels.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 12, 99
+ AppScreenCoordinateYKey = attribute.Key("app.screen.coordinate.y")
+
+ // AppWidgetIDKey is the attribute Key conforming to the "app.widget.id"
+ // semantic conventions. It represents an identifier that uniquely
+ // differentiates this widget from other widgets in the same application.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "f9bc787d-ff05-48ad-90e1-fca1d46130b3", "submit_order_1829"
+ // Note: A widget is an application component, typically an on-screen visual GUI
+ // element.
+ AppWidgetIDKey = attribute.Key("app.widget.id")
+
+ // AppWidgetNameKey is the attribute Key conforming to the "app.widget.name"
+ // semantic conventions. It represents the name of an application widget.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "submit", "attack", "Clear Cart"
+ // Note: A widget is an application component, typically an on-screen visual GUI
+ // element.
+ AppWidgetNameKey = attribute.Key("app.widget.name")
+)
+
+// AppInstallationID returns an attribute KeyValue conforming to the
+// "app.installation.id" semantic conventions. It represents a unique identifier
+// representing the installation of an application on a specific device.
+func AppInstallationID(val string) attribute.KeyValue {
+ return AppInstallationIDKey.String(val)
+}
+
+// AppScreenCoordinateX returns an attribute KeyValue conforming to the
+// "app.screen.coordinate.x" semantic conventions. It represents the x
+// (horizontal) coordinate of a screen coordinate, in screen pixels.
+func AppScreenCoordinateX(val int) attribute.KeyValue {
+ return AppScreenCoordinateXKey.Int(val)
+}
+
+// AppScreenCoordinateY returns an attribute KeyValue conforming to the
+// "app.screen.coordinate.y" semantic conventions. It represents the y (vertical)
+// component of a screen coordinate, in screen pixels.
+func AppScreenCoordinateY(val int) attribute.KeyValue {
+ return AppScreenCoordinateYKey.Int(val)
+}
+
+// AppWidgetID returns an attribute KeyValue conforming to the "app.widget.id"
+// semantic conventions. It represents an identifier that uniquely differentiates
+// this widget from other widgets in the same application.
+func AppWidgetID(val string) attribute.KeyValue {
+ return AppWidgetIDKey.String(val)
+}
+
+// AppWidgetName returns an attribute KeyValue conforming to the
+// "app.widget.name" semantic conventions. It represents the name of an
+// application widget.
+func AppWidgetName(val string) attribute.KeyValue {
+ return AppWidgetNameKey.String(val)
+}
+
+// Namespace: artifact
+const (
+ // ArtifactAttestationFilenameKey is the attribute Key conforming to the
+ // "artifact.attestation.filename" semantic conventions. It represents the
+ // provenance filename of the built attestation which directly relates to the
+ // build artifact filename. This filename SHOULD accompany the artifact at
+ // publish time. See the [SLSA Relationship] specification for more information.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "golang-binary-amd64-v0.1.0.attestation",
+ // "docker-image-amd64-v0.1.0.intoto.json1", "release-1.tar.gz.attestation",
+ // "file-name-package.tar.gz.intoto.json1"
+ //
+ // [SLSA Relationship]: https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations
+ ArtifactAttestationFilenameKey = attribute.Key("artifact.attestation.filename")
+
+ // ArtifactAttestationHashKey is the attribute Key conforming to the
+ // "artifact.attestation.hash" semantic conventions. It represents the full
+ // [hash value (see glossary)], of the built attestation. Some envelopes in the
+ // [software attestation space] also refer to this as the **digest**.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1b31dfcd5b7f9267bf2ff47651df1cfb9147b9e4df1f335accf65b4cda498408"
+ //
+ // [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
+ // [software attestation space]: https://github.com/in-toto/attestation/tree/main/spec
+ ArtifactAttestationHashKey = attribute.Key("artifact.attestation.hash")
+
+ // ArtifactAttestationIDKey is the attribute Key conforming to the
+ // "artifact.attestation.id" semantic conventions. It represents the id of the
+ // build [software attestation].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "123"
+ //
+ // [software attestation]: https://slsa.dev/attestation-model
+ ArtifactAttestationIDKey = attribute.Key("artifact.attestation.id")
+
+ // ArtifactFilenameKey is the attribute Key conforming to the
+ // "artifact.filename" semantic conventions. It represents the human readable
+ // file name of the artifact, typically generated during build and release
+ // processes. Often includes the package name and version in the file name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "golang-binary-amd64-v0.1.0", "docker-image-amd64-v0.1.0",
+ // "release-1.tar.gz", "file-name-package.tar.gz"
+ // Note: This file name can also act as the [Package Name]
+ // in cases where the package ecosystem maps accordingly.
+ // Additionally, the artifact [can be published]
+ // for others, but that is not a guarantee.
+ //
+ // [Package Name]: https://slsa.dev/spec/v1.0/terminology#package-model
+ // [can be published]: https://slsa.dev/spec/v1.0/terminology#software-supply-chain
+ ArtifactFilenameKey = attribute.Key("artifact.filename")
+
+ // ArtifactHashKey is the attribute Key conforming to the "artifact.hash"
+ // semantic conventions. It represents the full [hash value (see glossary)],
+ // often found in checksum.txt on a release of the artifact and used to verify
+ // package integrity.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "9ff4c52759e2c4ac70b7d517bc7fcdc1cda631ca0045271ddd1b192544f8a3e9"
+ // Note: The specific algorithm used to create the cryptographic hash value is
+ // not defined. In situations where an artifact has multiple
+ // cryptographic hashes, it is up to the implementer to choose which
+ // hash value to set here; this should be the most secure hash algorithm
+ // that is suitable for the situation and consistent with the
+ // corresponding attestation. The implementer can then provide the other
+ // hash values through an additional set of attribute extensions as they
+ // deem necessary.
+ //
+ // [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
+ ArtifactHashKey = attribute.Key("artifact.hash")
+
+ // ArtifactPurlKey is the attribute Key conforming to the "artifact.purl"
+ // semantic conventions. It represents the [Package URL] of the
+ // [package artifact] provides a standard way to identify and locate the
+ // packaged artifact.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "pkg:github/package-url/purl-spec@1209109710924",
+ // "pkg:npm/foo@12.12.3"
+ //
+ // [Package URL]: https://github.com/package-url/purl-spec
+ // [package artifact]: https://slsa.dev/spec/v1.0/terminology#package-model
+ ArtifactPurlKey = attribute.Key("artifact.purl")
+
+ // ArtifactVersionKey is the attribute Key conforming to the "artifact.version"
+ // semantic conventions. It represents the version of the artifact.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "v0.1.0", "1.2.1", "122691-build"
+ ArtifactVersionKey = attribute.Key("artifact.version")
+)
+
+// ArtifactAttestationFilename returns an attribute KeyValue conforming to the
+// "artifact.attestation.filename" semantic conventions. It represents the
+// provenance filename of the built attestation which directly relates to the
+// build artifact filename. This filename SHOULD accompany the artifact at
+// publish time. See the [SLSA Relationship] specification for more information.
+//
+// [SLSA Relationship]: https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations
+func ArtifactAttestationFilename(val string) attribute.KeyValue {
+ return ArtifactAttestationFilenameKey.String(val)
+}
+
+// ArtifactAttestationHash returns an attribute KeyValue conforming to the
+// "artifact.attestation.hash" semantic conventions. It represents the full
+// [hash value (see glossary)], of the built attestation. Some envelopes in the
+// [software attestation space] also refer to this as the **digest**.
+//
+// [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
+// [software attestation space]: https://github.com/in-toto/attestation/tree/main/spec
+func ArtifactAttestationHash(val string) attribute.KeyValue {
+ return ArtifactAttestationHashKey.String(val)
+}
+
+// ArtifactAttestationID returns an attribute KeyValue conforming to the
+// "artifact.attestation.id" semantic conventions. It represents the id of the
+// build [software attestation].
+//
+// [software attestation]: https://slsa.dev/attestation-model
+func ArtifactAttestationID(val string) attribute.KeyValue {
+ return ArtifactAttestationIDKey.String(val)
+}
+
+// ArtifactFilename returns an attribute KeyValue conforming to the
+// "artifact.filename" semantic conventions. It represents the human readable
+// file name of the artifact, typically generated during build and release
+// processes. Often includes the package name and version in the file name.
+func ArtifactFilename(val string) attribute.KeyValue {
+ return ArtifactFilenameKey.String(val)
+}
+
+// ArtifactHash returns an attribute KeyValue conforming to the "artifact.hash"
+// semantic conventions. It represents the full [hash value (see glossary)],
+// often found in checksum.txt on a release of the artifact and used to verify
+// package integrity.
+//
+// [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
+func ArtifactHash(val string) attribute.KeyValue {
+ return ArtifactHashKey.String(val)
+}
+
+// ArtifactPurl returns an attribute KeyValue conforming to the "artifact.purl"
+// semantic conventions. It represents the [Package URL] of the
+// [package artifact] provides a standard way to identify and locate the packaged
+// artifact.
+//
+// [Package URL]: https://github.com/package-url/purl-spec
+// [package artifact]: https://slsa.dev/spec/v1.0/terminology#package-model
+func ArtifactPurl(val string) attribute.KeyValue {
+ return ArtifactPurlKey.String(val)
+}
+
+// ArtifactVersion returns an attribute KeyValue conforming to the
+// "artifact.version" semantic conventions. It represents the version of the
+// artifact.
+func ArtifactVersion(val string) attribute.KeyValue {
+ return ArtifactVersionKey.String(val)
+}
+
+// Namespace: aws
+const (
+ // AWSBedrockGuardrailIDKey is the attribute Key conforming to the
+ // "aws.bedrock.guardrail.id" semantic conventions. It represents the unique
+ // identifier of the AWS Bedrock Guardrail. A [guardrail] helps safeguard and
+ // prevent unwanted behavior from model responses or user messages.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "sgi5gkybzqak"
+ //
+ // [guardrail]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html
+ AWSBedrockGuardrailIDKey = attribute.Key("aws.bedrock.guardrail.id")
+
+ // AWSBedrockKnowledgeBaseIDKey is the attribute Key conforming to the
+ // "aws.bedrock.knowledge_base.id" semantic conventions. It represents the
+ // unique identifier of the AWS Bedrock Knowledge base. A [knowledge base] is a
+ // bank of information that can be queried by models to generate more relevant
+ // responses and augment prompts.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "XFWUPB9PAW"
+ //
+ // [knowledge base]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html
+ AWSBedrockKnowledgeBaseIDKey = attribute.Key("aws.bedrock.knowledge_base.id")
+
+ // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to the
+ // "aws.dynamodb.attribute_definitions" semantic conventions. It represents the
+ // JSON-serialized value of each item in the `AttributeDefinitions` request
+ // field.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "{ "AttributeName": "string", "AttributeType": "string" }"
+ AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions")
+
+ // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the
+ // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
+ // value of the `AttributesToGet` request parameter.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "lives", "id"
+ AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get")
+
+ // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the
+ // "aws.dynamodb.consistent_read" semantic conventions. It represents the value
+ // of the `ConsistentRead` request parameter.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read")
+
+ // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the
+ // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
+ // JSON-serialized value of each item in the `ConsumedCapacity` response field.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "{ "CapacityUnits": number, "GlobalSecondaryIndexes": { "string" :
+ // { "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits":
+ // number } }, "LocalSecondaryIndexes": { "string" : { "CapacityUnits": number,
+ // "ReadCapacityUnits": number, "WriteCapacityUnits": number } },
+ // "ReadCapacityUnits": number, "Table": { "CapacityUnits": number,
+ // "ReadCapacityUnits": number, "WriteCapacityUnits": number }, "TableName":
+ // "string", "WriteCapacityUnits": number }"
+ AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity")
+
+ // AWSDynamoDBCountKey is the attribute Key conforming to the
+ // "aws.dynamodb.count" semantic conventions. It represents the value of the
+ // `Count` response parameter.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 10
+ AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count")
+
+ // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the
+ // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents the
+ // value of the `ExclusiveStartTableName` request parameter.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Users", "CatsTable"
+ AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table")
+
+ // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key conforming to
+ // the "aws.dynamodb.global_secondary_index_updates" semantic conventions. It
+ // represents the JSON-serialized value of each item in the
+ // `GlobalSecondaryIndexUpdates` request field.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "{ "Create": { "IndexName": "string", "KeySchema": [ {
+ // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
+ // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" },
+ // "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits":
+ // number } }"
+ AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates")
+
+ // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to the
+ // "aws.dynamodb.global_secondary_indexes" semantic conventions. It represents
+ // the JSON-serialized value of each item of the `GlobalSecondaryIndexes`
+ // request field.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "{ "IndexName": "string", "KeySchema": [ { "AttributeName":
+ // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [
+ // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": {
+ // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }"
+ AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes")
+
+ // AWSDynamoDBIndexNameKey is the attribute Key conforming to the
+ // "aws.dynamodb.index_name" semantic conventions. It represents the value of
+ // the `IndexName` request parameter.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "name_to_group"
+ AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name")
+
+ // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to the
+ // "aws.dynamodb.item_collection_metrics" semantic conventions. It represents
+ // the JSON-serialized value of the `ItemCollectionMetrics` response field.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "{ "string" : [ { "ItemCollectionKey": { "string" : { "B": blob,
+ // "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { "string" :
+ // "AttributeValue" }, "N": "string", "NS": [ "string" ], "NULL": boolean, "S":
+ // "string", "SS": [ "string" ] } }, "SizeEstimateRangeGB": [ number ] } ] }"
+ AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics")
+
+ // AWSDynamoDBLimitKey is the attribute Key conforming to the
+ // "aws.dynamodb.limit" semantic conventions. It represents the value of the
+ // `Limit` request parameter.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 10
+ AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit")
+
+ // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to the
+ // "aws.dynamodb.local_secondary_indexes" semantic conventions. It represents
+ // the JSON-serialized value of each item of the `LocalSecondaryIndexes` request
+ // field.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "{ "IndexArn": "string", "IndexName": "string", "IndexSizeBytes":
+ // number, "ItemCount": number, "KeySchema": [ { "AttributeName": "string",
+ // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ],
+ // "ProjectionType": "string" } }"
+ AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes")
+
+ // AWSDynamoDBProjectionKey is the attribute Key conforming to the
+ // "aws.dynamodb.projection" semantic conventions. It represents the value of
+ // the `ProjectionExpression` request parameter.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Title", "Title, Price, Color", "Title, Description, RelatedItems,
+ // ProductReviews"
+ AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection")
+
+ // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to the
+ // "aws.dynamodb.provisioned_read_capacity" semantic conventions. It represents
+ // the value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.
+ //
+ // Type: double
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 1.0, 2.0
+ AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity")
+
+ // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming to the
+ // "aws.dynamodb.provisioned_write_capacity" semantic conventions. It represents
+ // the value of the `ProvisionedThroughput.WriteCapacityUnits` request
+ // parameter.
+ //
+ // Type: double
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 1.0, 2.0
+ AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity")
+
+ // AWSDynamoDBScanForwardKey is the attribute Key conforming to the
+ // "aws.dynamodb.scan_forward" semantic conventions. It represents the value of
+ // the `ScanIndexForward` request parameter.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward")
+
+ // AWSDynamoDBScannedCountKey is the attribute Key conforming to the
+ // "aws.dynamodb.scanned_count" semantic conventions. It represents the value of
+ // the `ScannedCount` response parameter.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 50
+ AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count")
+
+ // AWSDynamoDBSegmentKey is the attribute Key conforming to the
+ // "aws.dynamodb.segment" semantic conventions. It represents the value of the
+ // `Segment` request parameter.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 10
+ AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment")
+
+ // AWSDynamoDBSelectKey is the attribute Key conforming to the
+ // "aws.dynamodb.select" semantic conventions. It represents the value of the
+ // `Select` request parameter.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "ALL_ATTRIBUTES", "COUNT"
+ AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select")
+
+ // AWSDynamoDBTableCountKey is the attribute Key conforming to the
+ // "aws.dynamodb.table_count" semantic conventions. It represents the number of
+ // items in the `TableNames` response parameter.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 20
+ AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count")
+
+ // AWSDynamoDBTableNamesKey is the attribute Key conforming to the
+ // "aws.dynamodb.table_names" semantic conventions. It represents the keys in
+ // the `RequestItems` object field.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Users", "Cats"
+ AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names")
+
+ // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the
+ // "aws.dynamodb.total_segments" semantic conventions. It represents the value
+ // of the `TotalSegments` request parameter.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 100
+ AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments")
+
+ // AWSECSClusterARNKey is the attribute Key conforming to the
+ // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an
+ // [ECS cluster].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster"
+ //
+ // [ECS cluster]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html
+ AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn")
+
+ // AWSECSContainerARNKey is the attribute Key conforming to the
+ // "aws.ecs.container.arn" semantic conventions. It represents the Amazon
+ // Resource Name (ARN) of an [ECS container instance].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9"
+ //
+ // [ECS container instance]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html
+ AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn")
+
+ // AWSECSLaunchtypeKey is the attribute Key conforming to the
+ // "aws.ecs.launchtype" semantic conventions. It represents the [launch type]
+ // for an ECS task.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ //
+ // [launch type]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html
+ AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype")
+
+ // AWSECSTaskARNKey is the attribute Key conforming to the "aws.ecs.task.arn"
+ // semantic conventions. It represents the ARN of a running [ECS task].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b",
+ // "arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task-id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd"
+ //
+ // [ECS task]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids
+ AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn")
+
+ // AWSECSTaskFamilyKey is the attribute Key conforming to the
+ // "aws.ecs.task.family" semantic conventions. It represents the family name of
+ // the [ECS task definition] used to create the ECS task.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "opentelemetry-family"
+ //
+ // [ECS task definition]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html
+ AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family")
+
+ // AWSECSTaskIDKey is the attribute Key conforming to the "aws.ecs.task.id"
+ // semantic conventions. It represents the ID of a running ECS task. The ID MUST
+ // be extracted from `task.arn`.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "10838bed-421f-43ef-870a-f43feacbbb5b",
+ // "23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd"
+ AWSECSTaskIDKey = attribute.Key("aws.ecs.task.id")
+
+ // AWSECSTaskRevisionKey is the attribute Key conforming to the
+ // "aws.ecs.task.revision" semantic conventions. It represents the revision for
+ // the task definition used to create the ECS task.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "8", "26"
+ AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision")
+
+ // AWSEKSClusterARNKey is the attribute Key conforming to the
+ // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS
+ // cluster.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster"
+ AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn")
+
+ // AWSExtendedRequestIDKey is the attribute Key conforming to the
+ // "aws.extended_request_id" semantic conventions. It represents the AWS
+ // extended request ID as returned in the response header `x-amz-id-2`.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ="
+ AWSExtendedRequestIDKey = attribute.Key("aws.extended_request_id")
+
+ // AWSKinesisStreamNameKey is the attribute Key conforming to the
+ // "aws.kinesis.stream_name" semantic conventions. It represents the name of the
+ // AWS Kinesis [stream] the request refers to. Corresponds to the
+ // `--stream-name` parameter of the Kinesis [describe-stream] operation.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "some-stream-name"
+ //
+ // [stream]: https://docs.aws.amazon.com/streams/latest/dev/introduction.html
+ // [describe-stream]: https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html
+ AWSKinesisStreamNameKey = attribute.Key("aws.kinesis.stream_name")
+
+ // AWSLambdaInvokedARNKey is the attribute Key conforming to the
+ // "aws.lambda.invoked_arn" semantic conventions. It represents the full invoked
+ // ARN as provided on the `Context` passed to the function (
+ // `Lambda-Runtime-Invoked-Function-Arn` header on the
+ // `/runtime/invocation/next` applicable).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "arn:aws:lambda:us-east-1:123456:function:myfunction:myalias"
+ // Note: This may be different from `cloud.resource_id` if an alias is involved.
+ AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn")
+
+ // AWSLambdaResourceMappingIDKey is the attribute Key conforming to the
+ // "aws.lambda.resource_mapping.id" semantic conventions. It represents the UUID
+ // of the [AWS Lambda EvenSource Mapping]. An event source is mapped to a lambda
+ // function. It's contents are read by Lambda and used to trigger a function.
+ // This isn't available in the lambda execution context or the lambda runtime
+ // environtment. This is going to be populated by the AWS SDK for each language
+ // when that UUID is present. Some of these operations are
+ // Create/Delete/Get/List/Update EventSourceMapping.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "587ad24b-03b9-4413-8202-bbd56b36e5b7"
+ //
+ // [AWS Lambda EvenSource Mapping]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html
+ AWSLambdaResourceMappingIDKey = attribute.Key("aws.lambda.resource_mapping.id")
+
+ // AWSLogGroupARNsKey is the attribute Key conforming to the
+ // "aws.log.group.arns" semantic conventions. It represents the Amazon Resource
+ // Name(s) (ARN) of the AWS log group(s).
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*"
+ // Note: See the [log group ARN format documentation].
+ //
+ // [log group ARN format documentation]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format
+ AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns")
+
+ // AWSLogGroupNamesKey is the attribute Key conforming to the
+ // "aws.log.group.names" semantic conventions. It represents the name(s) of the
+ // AWS log group(s) an application is writing to.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/aws/lambda/my-function", "opentelemetry-service"
+ // Note: Multiple log groups must be supported for cases like multi-container
+ // applications, where a single application has sidecar containers, and each
+ // write to their own log group.
+ AWSLogGroupNamesKey = attribute.Key("aws.log.group.names")
+
+ // AWSLogStreamARNsKey is the attribute Key conforming to the
+ // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the
+ // AWS log stream(s).
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b"
+ // Note: See the [log stream ARN format documentation]. One log group can
+ // contain several log streams, so these ARNs necessarily identify both a log
+ // group and a log stream.
+ //
+ // [log stream ARN format documentation]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format
+ AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns")
+
+ // AWSLogStreamNamesKey is the attribute Key conforming to the
+ // "aws.log.stream.names" semantic conventions. It represents the name(s) of the
+ // AWS log stream(s) an application is writing to.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "logs/main/10838bed-421f-43ef-870a-f43feacbbb5b"
+ AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names")
+
+ // AWSRequestIDKey is the attribute Key conforming to the "aws.request_id"
+ // semantic conventions. It represents the AWS request ID as returned in the
+ // response headers `x-amzn-requestid`, `x-amzn-request-id` or
+ // `x-amz-request-id`.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "79b9da39-b7ae-508a-a6bc-864b2829c622", "C9ER4AJX75574TDJ"
+ AWSRequestIDKey = attribute.Key("aws.request_id")
+
+ // AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket"
+ // semantic conventions. It represents the S3 bucket name the request refers to.
+ // Corresponds to the `--bucket` parameter of the [S3 API] operations.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "some-bucket-name"
+ // Note: The `bucket` attribute is applicable to all S3 operations that
+ // reference a bucket, i.e. that require the bucket name as a mandatory
+ // parameter.
+ // This applies to almost all S3 operations except `list-buckets`.
+ //
+ // [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html
+ AWSS3BucketKey = attribute.Key("aws.s3.bucket")
+
+ // AWSS3CopySourceKey is the attribute Key conforming to the
+ // "aws.s3.copy_source" semantic conventions. It represents the source object
+ // (in the form `bucket`/`key`) for the copy operation.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "someFile.yml"
+ // Note: The `copy_source` attribute applies to S3 copy operations and
+ // corresponds to the `--copy-source` parameter
+ // of the [copy-object operation within the S3 API].
+ // This applies in particular to the following operations:
+ //
+ // - [copy-object]
+ // - [upload-part-copy]
+ //
+ //
+ // [copy-object operation within the S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html
+ // [copy-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html
+ // [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html
+ AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source")
+
+ // AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete"
+ // semantic conventions. It represents the delete request container that
+ // specifies the objects to be deleted.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "Objects=[{Key=string,VersionId=string},{Key=string,VersionId=string}],Quiet=boolean"
+ // Note: The `delete` attribute is only applicable to the [delete-object]
+ // operation.
+ // The `delete` attribute corresponds to the `--delete` parameter of the
+ // [delete-objects operation within the S3 API].
+ //
+ // [delete-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html
+ // [delete-objects operation within the S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html
+ AWSS3DeleteKey = attribute.Key("aws.s3.delete")
+
+ // AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic
+ // conventions. It represents the S3 object key the request refers to.
+ // Corresponds to the `--key` parameter of the [S3 API] operations.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "someFile.yml"
+ // Note: The `key` attribute is applicable to all object-related S3 operations,
+ // i.e. that require the object key as a mandatory parameter.
+ // This applies in particular to the following operations:
+ //
+ // - [copy-object]
+ // - [delete-object]
+ // - [get-object]
+ // - [head-object]
+ // - [put-object]
+ // - [restore-object]
+ // - [select-object-content]
+ // - [abort-multipart-upload]
+ // - [complete-multipart-upload]
+ // - [create-multipart-upload]
+ // - [list-parts]
+ // - [upload-part]
+ // - [upload-part-copy]
+ //
+ //
+ // [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html
+ // [copy-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html
+ // [delete-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html
+ // [get-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html
+ // [head-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html
+ // [put-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html
+ // [restore-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html
+ // [select-object-content]: https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html
+ // [abort-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html
+ // [complete-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html
+ // [create-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html
+ // [list-parts]: https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html
+ // [upload-part]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html
+ // [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html
+ AWSS3KeyKey = attribute.Key("aws.s3.key")
+
+ // AWSS3PartNumberKey is the attribute Key conforming to the
+ // "aws.s3.part_number" semantic conventions. It represents the part number of
+ // the part being uploaded in a multipart-upload operation. This is a positive
+ // integer between 1 and 10,000.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 3456
+ // Note: The `part_number` attribute is only applicable to the [upload-part]
+ // and [upload-part-copy] operations.
+ // The `part_number` attribute corresponds to the `--part-number` parameter of
+ // the
+ // [upload-part operation within the S3 API].
+ //
+ // [upload-part]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html
+ // [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html
+ // [upload-part operation within the S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html
+ AWSS3PartNumberKey = attribute.Key("aws.s3.part_number")
+
+ // AWSS3UploadIDKey is the attribute Key conforming to the "aws.s3.upload_id"
+ // semantic conventions. It represents the upload ID that identifies the
+ // multipart upload.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ"
+ // Note: The `upload_id` attribute applies to S3 multipart-upload operations and
+ // corresponds to the `--upload-id` parameter
+ // of the [S3 API] multipart operations.
+ // This applies in particular to the following operations:
+ //
+ // - [abort-multipart-upload]
+ // - [complete-multipart-upload]
+ // - [list-parts]
+ // - [upload-part]
+ // - [upload-part-copy]
+ //
+ //
+ // [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html
+ // [abort-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html
+ // [complete-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html
+ // [list-parts]: https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html
+ // [upload-part]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html
+ // [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html
+ AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id")
+
+ // AWSSecretsmanagerSecretARNKey is the attribute Key conforming to the
+ // "aws.secretsmanager.secret.arn" semantic conventions. It represents the ARN
+ // of the Secret stored in the Secrets Mangger.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "arn:aws:secretsmanager:us-east-1:123456789012:secret:SecretName-6RandomCharacters"
+ AWSSecretsmanagerSecretARNKey = attribute.Key("aws.secretsmanager.secret.arn")
+
+ // AWSSNSTopicARNKey is the attribute Key conforming to the "aws.sns.topic.arn"
+ // semantic conventions. It represents the ARN of the AWS SNS Topic. An Amazon
+ // SNS [topic] is a logical access point that acts as a communication channel.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "arn:aws:sns:us-east-1:123456789012:mystack-mytopic-NZJ5JSMVGFIE"
+ //
+ // [topic]: https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html
+ AWSSNSTopicARNKey = attribute.Key("aws.sns.topic.arn")
+
+ // AWSSQSQueueURLKey is the attribute Key conforming to the "aws.sqs.queue.url"
+ // semantic conventions. It represents the URL of the AWS SQS Queue. It's a
+ // unique identifier for a queue in Amazon Simple Queue Service (SQS) and is
+ // used to access the queue and perform actions on it.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "https://sqs.us-east-1.amazonaws.com/123456789012/MyQueue"
+ AWSSQSQueueURLKey = attribute.Key("aws.sqs.queue.url")
+
+ // AWSStepFunctionsActivityARNKey is the attribute Key conforming to the
+ // "aws.step_functions.activity.arn" semantic conventions. It represents the ARN
+ // of the AWS Step Functions Activity.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "arn:aws:states:us-east-1:123456789012:activity:get-greeting"
+ AWSStepFunctionsActivityARNKey = attribute.Key("aws.step_functions.activity.arn")
+
+ // AWSStepFunctionsStateMachineARNKey is the attribute Key conforming to the
+ // "aws.step_functions.state_machine.arn" semantic conventions. It represents
+ // the ARN of the AWS Step Functions State Machine.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "arn:aws:states:us-east-1:123456789012:stateMachine:myStateMachine:1"
+ AWSStepFunctionsStateMachineARNKey = attribute.Key("aws.step_functions.state_machine.arn")
+)
+
+// AWSBedrockGuardrailID returns an attribute KeyValue conforming to the
+// "aws.bedrock.guardrail.id" semantic conventions. It represents the unique
+// identifier of the AWS Bedrock Guardrail. A [guardrail] helps safeguard and
+// prevent unwanted behavior from model responses or user messages.
+//
+// [guardrail]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html
+func AWSBedrockGuardrailID(val string) attribute.KeyValue {
+ return AWSBedrockGuardrailIDKey.String(val)
+}
+
+// AWSBedrockKnowledgeBaseID returns an attribute KeyValue conforming to the
+// "aws.bedrock.knowledge_base.id" semantic conventions. It represents the unique
+// identifier of the AWS Bedrock Knowledge base. A [knowledge base] is a bank of
+// information that can be queried by models to generate more relevant responses
+// and augment prompts.
+//
+// [knowledge base]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html
+func AWSBedrockKnowledgeBaseID(val string) attribute.KeyValue {
+ return AWSBedrockKnowledgeBaseIDKey.String(val)
+}
+
+// AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming to
+// the "aws.dynamodb.attribute_definitions" semantic conventions. It represents
+// the JSON-serialized value of each item in the `AttributeDefinitions` request
+// field.
+func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue {
+ return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val)
+}
+
+// AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to the
+// "aws.dynamodb.attributes_to_get" semantic conventions. It represents the value
+// of the `AttributesToGet` request parameter.
+func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue {
+ return AWSDynamoDBAttributesToGetKey.StringSlice(val)
+}
+
+// AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the
+// "aws.dynamodb.consistent_read" semantic conventions. It represents the value
+// of the `ConsistentRead` request parameter.
+func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue {
+ return AWSDynamoDBConsistentReadKey.Bool(val)
+}
+
+// AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to the
+// "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
+// JSON-serialized value of each item in the `ConsumedCapacity` response field.
+func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue {
+ return AWSDynamoDBConsumedCapacityKey.StringSlice(val)
+}
+
+// AWSDynamoDBCount returns an attribute KeyValue conforming to the
+// "aws.dynamodb.count" semantic conventions. It represents the value of the
+// `Count` response parameter.
+func AWSDynamoDBCount(val int) attribute.KeyValue {
+ return AWSDynamoDBCountKey.Int(val)
+}
+
+// AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming to the
+// "aws.dynamodb.exclusive_start_table" semantic conventions. It represents the
+// value of the `ExclusiveStartTableName` request parameter.
+func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue {
+ return AWSDynamoDBExclusiveStartTableKey.String(val)
+}
+
+// AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue
+// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
+// conventions. It represents the JSON-serialized value of each item in the
+// `GlobalSecondaryIndexUpdates` request field.
+func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue {
+ return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val)
+}
+
+// AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue conforming to
+// the "aws.dynamodb.global_secondary_indexes" semantic conventions. It
+// represents the JSON-serialized value of each item of the
+// `GlobalSecondaryIndexes` request field.
+func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue {
+ return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val)
+}
+
+// AWSDynamoDBIndexName returns an attribute KeyValue conforming to the
+// "aws.dynamodb.index_name" semantic conventions. It represents the value of the
+// `IndexName` request parameter.
+func AWSDynamoDBIndexName(val string) attribute.KeyValue {
+ return AWSDynamoDBIndexNameKey.String(val)
+}
+
+// AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming to
+// the "aws.dynamodb.item_collection_metrics" semantic conventions. It represents
+// the JSON-serialized value of the `ItemCollectionMetrics` response field.
+func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue {
+ return AWSDynamoDBItemCollectionMetricsKey.String(val)
+}
+
+// AWSDynamoDBLimit returns an attribute KeyValue conforming to the
+// "aws.dynamodb.limit" semantic conventions. It represents the value of the
+// `Limit` request parameter.
+func AWSDynamoDBLimit(val int) attribute.KeyValue {
+ return AWSDynamoDBLimitKey.Int(val)
+}
+
+// AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming to
+// the "aws.dynamodb.local_secondary_indexes" semantic conventions. It represents
+// the JSON-serialized value of each item of the `LocalSecondaryIndexes` request
+// field.
+func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue {
+ return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val)
+}
+
+// AWSDynamoDBProjection returns an attribute KeyValue conforming to the
+// "aws.dynamodb.projection" semantic conventions. It represents the value of the
+// `ProjectionExpression` request parameter.
+func AWSDynamoDBProjection(val string) attribute.KeyValue {
+ return AWSDynamoDBProjectionKey.String(val)
+}
+
+// AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue conforming to
+// the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It
+// represents the value of the `ProvisionedThroughput.ReadCapacityUnits` request
+// parameter.
+func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue {
+ return AWSDynamoDBProvisionedReadCapacityKey.Float64(val)
+}
+
+// AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue conforming
+// to the "aws.dynamodb.provisioned_write_capacity" semantic conventions. It
+// represents the value of the `ProvisionedThroughput.WriteCapacityUnits` request
+// parameter.
+func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue {
+ return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val)
+}
+
+// AWSDynamoDBScanForward returns an attribute KeyValue conforming to the
+// "aws.dynamodb.scan_forward" semantic conventions. It represents the value of
+// the `ScanIndexForward` request parameter.
+func AWSDynamoDBScanForward(val bool) attribute.KeyValue {
+ return AWSDynamoDBScanForwardKey.Bool(val)
+}
+
+// AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the
+// "aws.dynamodb.scanned_count" semantic conventions. It represents the value of
+// the `ScannedCount` response parameter.
+func AWSDynamoDBScannedCount(val int) attribute.KeyValue {
+ return AWSDynamoDBScannedCountKey.Int(val)
+}
+
+// AWSDynamoDBSegment returns an attribute KeyValue conforming to the
+// "aws.dynamodb.segment" semantic conventions. It represents the value of the
+// `Segment` request parameter.
+func AWSDynamoDBSegment(val int) attribute.KeyValue {
+ return AWSDynamoDBSegmentKey.Int(val)
+}
+
+// AWSDynamoDBSelect returns an attribute KeyValue conforming to the
+// "aws.dynamodb.select" semantic conventions. It represents the value of the
+// `Select` request parameter.
+func AWSDynamoDBSelect(val string) attribute.KeyValue {
+ return AWSDynamoDBSelectKey.String(val)
+}
+
+// AWSDynamoDBTableCount returns an attribute KeyValue conforming to the
+// "aws.dynamodb.table_count" semantic conventions. It represents the number of
+// items in the `TableNames` response parameter.
+func AWSDynamoDBTableCount(val int) attribute.KeyValue {
+ return AWSDynamoDBTableCountKey.Int(val)
+}
+
+// AWSDynamoDBTableNames returns an attribute KeyValue conforming to the
+// "aws.dynamodb.table_names" semantic conventions. It represents the keys in the
+// `RequestItems` object field.
+func AWSDynamoDBTableNames(val ...string) attribute.KeyValue {
+ return AWSDynamoDBTableNamesKey.StringSlice(val)
+}
+
+// AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the
+// "aws.dynamodb.total_segments" semantic conventions. It represents the value of
+// the `TotalSegments` request parameter.
+func AWSDynamoDBTotalSegments(val int) attribute.KeyValue {
+ return AWSDynamoDBTotalSegmentsKey.Int(val)
+}
+
+// AWSECSClusterARN returns an attribute KeyValue conforming to the
+// "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an
+// [ECS cluster].
+//
+// [ECS cluster]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html
+func AWSECSClusterARN(val string) attribute.KeyValue {
+ return AWSECSClusterARNKey.String(val)
+}
+
+// AWSECSContainerARN returns an attribute KeyValue conforming to the
+// "aws.ecs.container.arn" semantic conventions. It represents the Amazon
+// Resource Name (ARN) of an [ECS container instance].
+//
+// [ECS container instance]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html
+func AWSECSContainerARN(val string) attribute.KeyValue {
+ return AWSECSContainerARNKey.String(val)
+}
+
+// AWSECSTaskARN returns an attribute KeyValue conforming to the
+// "aws.ecs.task.arn" semantic conventions. It represents the ARN of a running
+// [ECS task].
+//
+// [ECS task]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids
+func AWSECSTaskARN(val string) attribute.KeyValue {
+ return AWSECSTaskARNKey.String(val)
+}
+
+// AWSECSTaskFamily returns an attribute KeyValue conforming to the
+// "aws.ecs.task.family" semantic conventions. It represents the family name of
+// the [ECS task definition] used to create the ECS task.
+//
+// [ECS task definition]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html
+func AWSECSTaskFamily(val string) attribute.KeyValue {
+ return AWSECSTaskFamilyKey.String(val)
+}
+
+// AWSECSTaskID returns an attribute KeyValue conforming to the "aws.ecs.task.id"
+// semantic conventions. It represents the ID of a running ECS task. The ID MUST
+// be extracted from `task.arn`.
+func AWSECSTaskID(val string) attribute.KeyValue {
+ return AWSECSTaskIDKey.String(val)
+}
+
+// AWSECSTaskRevision returns an attribute KeyValue conforming to the
+// "aws.ecs.task.revision" semantic conventions. It represents the revision for
+// the task definition used to create the ECS task.
+func AWSECSTaskRevision(val string) attribute.KeyValue {
+ return AWSECSTaskRevisionKey.String(val)
+}
+
+// AWSEKSClusterARN returns an attribute KeyValue conforming to the
+// "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS
+// cluster.
+func AWSEKSClusterARN(val string) attribute.KeyValue {
+ return AWSEKSClusterARNKey.String(val)
+}
+
+// AWSExtendedRequestID returns an attribute KeyValue conforming to the
+// "aws.extended_request_id" semantic conventions. It represents the AWS extended
+// request ID as returned in the response header `x-amz-id-2`.
+func AWSExtendedRequestID(val string) attribute.KeyValue {
+ return AWSExtendedRequestIDKey.String(val)
+}
+
+// AWSKinesisStreamName returns an attribute KeyValue conforming to the
+// "aws.kinesis.stream_name" semantic conventions. It represents the name of the
+// AWS Kinesis [stream] the request refers to. Corresponds to the `--stream-name`
+// parameter of the Kinesis [describe-stream] operation.
+//
+// [stream]: https://docs.aws.amazon.com/streams/latest/dev/introduction.html
+// [describe-stream]: https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html
+func AWSKinesisStreamName(val string) attribute.KeyValue {
+ return AWSKinesisStreamNameKey.String(val)
+}
+
+// AWSLambdaInvokedARN returns an attribute KeyValue conforming to the
+// "aws.lambda.invoked_arn" semantic conventions. It represents the full invoked
+// ARN as provided on the `Context` passed to the function (
+// `Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next`
+// applicable).
+func AWSLambdaInvokedARN(val string) attribute.KeyValue {
+ return AWSLambdaInvokedARNKey.String(val)
+}
+
+// AWSLambdaResourceMappingID returns an attribute KeyValue conforming to the
+// "aws.lambda.resource_mapping.id" semantic conventions. It represents the UUID
+// of the [AWS Lambda EvenSource Mapping]. An event source is mapped to a lambda
+// function. It's contents are read by Lambda and used to trigger a function.
+// This isn't available in the lambda execution context or the lambda runtime
+// environtment. This is going to be populated by the AWS SDK for each language
+// when that UUID is present. Some of these operations are
+// Create/Delete/Get/List/Update EventSourceMapping.
+//
+// [AWS Lambda EvenSource Mapping]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html
+func AWSLambdaResourceMappingID(val string) attribute.KeyValue {
+ return AWSLambdaResourceMappingIDKey.String(val)
+}
+
+// AWSLogGroupARNs returns an attribute KeyValue conforming to the
+// "aws.log.group.arns" semantic conventions. It represents the Amazon Resource
+// Name(s) (ARN) of the AWS log group(s).
+func AWSLogGroupARNs(val ...string) attribute.KeyValue {
+ return AWSLogGroupARNsKey.StringSlice(val)
+}
+
+// AWSLogGroupNames returns an attribute KeyValue conforming to the
+// "aws.log.group.names" semantic conventions. It represents the name(s) of the
+// AWS log group(s) an application is writing to.
+func AWSLogGroupNames(val ...string) attribute.KeyValue {
+ return AWSLogGroupNamesKey.StringSlice(val)
+}
+
+// AWSLogStreamARNs returns an attribute KeyValue conforming to the
+// "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the
+// AWS log stream(s).
+func AWSLogStreamARNs(val ...string) attribute.KeyValue {
+ return AWSLogStreamARNsKey.StringSlice(val)
+}
+
+// AWSLogStreamNames returns an attribute KeyValue conforming to the
+// "aws.log.stream.names" semantic conventions. It represents the name(s) of the
+// AWS log stream(s) an application is writing to.
+func AWSLogStreamNames(val ...string) attribute.KeyValue {
+ return AWSLogStreamNamesKey.StringSlice(val)
+}
+
+// AWSRequestID returns an attribute KeyValue conforming to the "aws.request_id"
+// semantic conventions. It represents the AWS request ID as returned in the
+// response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`
+// .
+func AWSRequestID(val string) attribute.KeyValue {
+ return AWSRequestIDKey.String(val)
+}
+
+// AWSS3Bucket returns an attribute KeyValue conforming to the "aws.s3.bucket"
+// semantic conventions. It represents the S3 bucket name the request refers to.
+// Corresponds to the `--bucket` parameter of the [S3 API] operations.
+//
+// [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html
+func AWSS3Bucket(val string) attribute.KeyValue {
+ return AWSS3BucketKey.String(val)
+}
+
+// AWSS3CopySource returns an attribute KeyValue conforming to the
+// "aws.s3.copy_source" semantic conventions. It represents the source object (in
+// the form `bucket`/`key`) for the copy operation.
+func AWSS3CopySource(val string) attribute.KeyValue {
+ return AWSS3CopySourceKey.String(val)
+}
+
+// AWSS3Delete returns an attribute KeyValue conforming to the "aws.s3.delete"
+// semantic conventions. It represents the delete request container that
+// specifies the objects to be deleted.
+func AWSS3Delete(val string) attribute.KeyValue {
+ return AWSS3DeleteKey.String(val)
+}
+
+// AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key" semantic
+// conventions. It represents the S3 object key the request refers to.
+// Corresponds to the `--key` parameter of the [S3 API] operations.
+//
+// [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html
+func AWSS3Key(val string) attribute.KeyValue {
+ return AWSS3KeyKey.String(val)
+}
+
+// AWSS3PartNumber returns an attribute KeyValue conforming to the
+// "aws.s3.part_number" semantic conventions. It represents the part number of
+// the part being uploaded in a multipart-upload operation. This is a positive
+// integer between 1 and 10,000.
+func AWSS3PartNumber(val int) attribute.KeyValue {
+ return AWSS3PartNumberKey.Int(val)
+}
+
+// AWSS3UploadID returns an attribute KeyValue conforming to the
+// "aws.s3.upload_id" semantic conventions. It represents the upload ID that
+// identifies the multipart upload.
+func AWSS3UploadID(val string) attribute.KeyValue {
+ return AWSS3UploadIDKey.String(val)
+}
+
+// AWSSecretsmanagerSecretARN returns an attribute KeyValue conforming to the
+// "aws.secretsmanager.secret.arn" semantic conventions. It represents the ARN of
+// the Secret stored in the Secrets Mangger.
+func AWSSecretsmanagerSecretARN(val string) attribute.KeyValue {
+ return AWSSecretsmanagerSecretARNKey.String(val)
+}
+
+// AWSSNSTopicARN returns an attribute KeyValue conforming to the
+// "aws.sns.topic.arn" semantic conventions. It represents the ARN of the AWS SNS
+// Topic. An Amazon SNS [topic] is a logical access point that acts as a
+// communication channel.
+//
+// [topic]: https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html
+func AWSSNSTopicARN(val string) attribute.KeyValue {
+ return AWSSNSTopicARNKey.String(val)
+}
+
+// AWSSQSQueueURL returns an attribute KeyValue conforming to the
+// "aws.sqs.queue.url" semantic conventions. It represents the URL of the AWS SQS
+// Queue. It's a unique identifier for a queue in Amazon Simple Queue Service
+// (SQS) and is used to access the queue and perform actions on it.
+func AWSSQSQueueURL(val string) attribute.KeyValue {
+ return AWSSQSQueueURLKey.String(val)
+}
+
+// AWSStepFunctionsActivityARN returns an attribute KeyValue conforming to the
+// "aws.step_functions.activity.arn" semantic conventions. It represents the ARN
+// of the AWS Step Functions Activity.
+func AWSStepFunctionsActivityARN(val string) attribute.KeyValue {
+ return AWSStepFunctionsActivityARNKey.String(val)
+}
+
+// AWSStepFunctionsStateMachineARN returns an attribute KeyValue conforming to
+// the "aws.step_functions.state_machine.arn" semantic conventions. It represents
+// the ARN of the AWS Step Functions State Machine.
+func AWSStepFunctionsStateMachineARN(val string) attribute.KeyValue {
+ return AWSStepFunctionsStateMachineARNKey.String(val)
+}
+
+// Enum values for aws.ecs.launchtype
+var (
+ // ec2
+ // Stability: development
+ AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2")
+ // fargate
+ // Stability: development
+ AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate")
+)
+
+// Namespace: az
+const (
+ // AzNamespaceKey is the attribute Key conforming to the "az.namespace" semantic
+ // conventions. It represents the [Azure Resource Provider Namespace] as
+ // recognized by the client.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Microsoft.Storage", "Microsoft.KeyVault", "Microsoft.ServiceBus"
+ //
+ // [Azure Resource Provider Namespace]: https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers
+ AzNamespaceKey = attribute.Key("az.namespace")
+
+ // AzServiceRequestIDKey is the attribute Key conforming to the
+ // "az.service_request_id" semantic conventions. It represents the unique
+ // identifier of the service request. It's generated by the Azure service and
+ // returned with the response.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "00000000-0000-0000-0000-000000000000"
+ AzServiceRequestIDKey = attribute.Key("az.service_request_id")
+)
+
+// AzNamespace returns an attribute KeyValue conforming to the "az.namespace"
+// semantic conventions. It represents the [Azure Resource Provider Namespace] as
+// recognized by the client.
+//
+// [Azure Resource Provider Namespace]: https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers
+func AzNamespace(val string) attribute.KeyValue {
+ return AzNamespaceKey.String(val)
+}
+
+// AzServiceRequestID returns an attribute KeyValue conforming to the
+// "az.service_request_id" semantic conventions. It represents the unique
+// identifier of the service request. It's generated by the Azure service and
+// returned with the response.
+func AzServiceRequestID(val string) attribute.KeyValue {
+ return AzServiceRequestIDKey.String(val)
+}
+
+// Namespace: azure
+const (
+ // AzureClientIDKey is the attribute Key conforming to the "azure.client.id"
+ // semantic conventions. It represents the unique identifier of the client
+ // instance.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "3ba4827d-4422-483f-b59f-85b74211c11d", "storage-client-1"
+ AzureClientIDKey = attribute.Key("azure.client.id")
+
+ // AzureCosmosDBConnectionModeKey is the attribute Key conforming to the
+ // "azure.cosmosdb.connection.mode" semantic conventions. It represents the
+ // cosmos client connection mode.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ AzureCosmosDBConnectionModeKey = attribute.Key("azure.cosmosdb.connection.mode")
+
+ // AzureCosmosDBConsistencyLevelKey is the attribute Key conforming to the
+ // "azure.cosmosdb.consistency.level" semantic conventions. It represents the
+ // account or request [consistency level].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Eventual", "ConsistentPrefix", "BoundedStaleness", "Strong",
+ // "Session"
+ //
+ // [consistency level]: https://learn.microsoft.com/azure/cosmos-db/consistency-levels
+ AzureCosmosDBConsistencyLevelKey = attribute.Key("azure.cosmosdb.consistency.level")
+
+ // AzureCosmosDBOperationContactedRegionsKey is the attribute Key conforming to
+ // the "azure.cosmosdb.operation.contacted_regions" semantic conventions. It
+ // represents the list of regions contacted during operation in the order that
+ // they were contacted. If there is more than one region listed, it indicates
+ // that the operation was performed on multiple regions i.e. cross-regional
+ // call.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "North Central US", "Australia East", "Australia Southeast"
+ // Note: Region name matches the format of `displayName` in [Azure Location API]
+ //
+ // [Azure Location API]: https://learn.microsoft.com/rest/api/subscription/subscriptions/list-locations?view=rest-subscription-2021-10-01&tabs=HTTP#location
+ AzureCosmosDBOperationContactedRegionsKey = attribute.Key("azure.cosmosdb.operation.contacted_regions")
+
+ // AzureCosmosDBOperationRequestChargeKey is the attribute Key conforming to the
+ // "azure.cosmosdb.operation.request_charge" semantic conventions. It represents
+ // the number of request units consumed by the operation.
+ //
+ // Type: double
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 46.18, 1.0
+ AzureCosmosDBOperationRequestChargeKey = attribute.Key("azure.cosmosdb.operation.request_charge")
+
+ // AzureCosmosDBRequestBodySizeKey is the attribute Key conforming to the
+ // "azure.cosmosdb.request.body.size" semantic conventions. It represents the
+ // request payload size in bytes.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ AzureCosmosDBRequestBodySizeKey = attribute.Key("azure.cosmosdb.request.body.size")
+
+ // AzureCosmosDBResponseSubStatusCodeKey is the attribute Key conforming to the
+ // "azure.cosmosdb.response.sub_status_code" semantic conventions. It represents
+ // the cosmos DB sub status code.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 1000, 1002
+ AzureCosmosDBResponseSubStatusCodeKey = attribute.Key("azure.cosmosdb.response.sub_status_code")
+)
+
+// AzureClientID returns an attribute KeyValue conforming to the
+// "azure.client.id" semantic conventions. It represents the unique identifier of
+// the client instance.
+func AzureClientID(val string) attribute.KeyValue {
+ return AzureClientIDKey.String(val)
+}
+
+// AzureCosmosDBOperationContactedRegions returns an attribute KeyValue
+// conforming to the "azure.cosmosdb.operation.contacted_regions" semantic
+// conventions. It represents the list of regions contacted during operation in
+// the order that they were contacted. If there is more than one region listed,
+// it indicates that the operation was performed on multiple regions i.e.
+// cross-regional call.
+func AzureCosmosDBOperationContactedRegions(val ...string) attribute.KeyValue {
+ return AzureCosmosDBOperationContactedRegionsKey.StringSlice(val)
+}
+
+// AzureCosmosDBOperationRequestCharge returns an attribute KeyValue conforming
+// to the "azure.cosmosdb.operation.request_charge" semantic conventions. It
+// represents the number of request units consumed by the operation.
+func AzureCosmosDBOperationRequestCharge(val float64) attribute.KeyValue {
+ return AzureCosmosDBOperationRequestChargeKey.Float64(val)
+}
+
+// AzureCosmosDBRequestBodySize returns an attribute KeyValue conforming to the
+// "azure.cosmosdb.request.body.size" semantic conventions. It represents the
+// request payload size in bytes.
+func AzureCosmosDBRequestBodySize(val int) attribute.KeyValue {
+ return AzureCosmosDBRequestBodySizeKey.Int(val)
+}
+
+// AzureCosmosDBResponseSubStatusCode returns an attribute KeyValue conforming to
+// the "azure.cosmosdb.response.sub_status_code" semantic conventions. It
+// represents the cosmos DB sub status code.
+func AzureCosmosDBResponseSubStatusCode(val int) attribute.KeyValue {
+ return AzureCosmosDBResponseSubStatusCodeKey.Int(val)
+}
+
+// Enum values for azure.cosmosdb.connection.mode
+var (
+ // Gateway (HTTP) connection.
+ // Stability: development
+ AzureCosmosDBConnectionModeGateway = AzureCosmosDBConnectionModeKey.String("gateway")
+ // Direct connection.
+ // Stability: development
+ AzureCosmosDBConnectionModeDirect = AzureCosmosDBConnectionModeKey.String("direct")
+)
+
+// Enum values for azure.cosmosdb.consistency.level
+var (
+ // strong
+ // Stability: development
+ AzureCosmosDBConsistencyLevelStrong = AzureCosmosDBConsistencyLevelKey.String("Strong")
+ // bounded_staleness
+ // Stability: development
+ AzureCosmosDBConsistencyLevelBoundedStaleness = AzureCosmosDBConsistencyLevelKey.String("BoundedStaleness")
+ // session
+ // Stability: development
+ AzureCosmosDBConsistencyLevelSession = AzureCosmosDBConsistencyLevelKey.String("Session")
+ // eventual
+ // Stability: development
+ AzureCosmosDBConsistencyLevelEventual = AzureCosmosDBConsistencyLevelKey.String("Eventual")
+ // consistent_prefix
+ // Stability: development
+ AzureCosmosDBConsistencyLevelConsistentPrefix = AzureCosmosDBConsistencyLevelKey.String("ConsistentPrefix")
+)
+
+// Namespace: browser
+const (
+ // BrowserBrandsKey is the attribute Key conforming to the "browser.brands"
+ // semantic conventions. It represents the array of brand name and version
+ // separated by a space.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: " Not A;Brand 99", "Chromium 99", "Chrome 99"
+ // Note: This value is intended to be taken from the [UA client hints API] (
+ // `navigator.userAgentData.brands`).
+ //
+ // [UA client hints API]: https://wicg.github.io/ua-client-hints/#interface
+ BrowserBrandsKey = attribute.Key("browser.brands")
+
+ // BrowserLanguageKey is the attribute Key conforming to the "browser.language"
+ // semantic conventions. It represents the preferred language of the user using
+ // the browser.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "en", "en-US", "fr", "fr-FR"
+ // Note: This value is intended to be taken from the Navigator API
+ // `navigator.language`.
+ BrowserLanguageKey = attribute.Key("browser.language")
+
+ // BrowserMobileKey is the attribute Key conforming to the "browser.mobile"
+ // semantic conventions. It represents a boolean that is true if the browser is
+ // running on a mobile device.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: This value is intended to be taken from the [UA client hints API] (
+ // `navigator.userAgentData.mobile`). If unavailable, this attribute SHOULD be
+ // left unset.
+ //
+ // [UA client hints API]: https://wicg.github.io/ua-client-hints/#interface
+ BrowserMobileKey = attribute.Key("browser.mobile")
+
+ // BrowserPlatformKey is the attribute Key conforming to the "browser.platform"
+ // semantic conventions. It represents the platform on which the browser is
+ // running.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Windows", "macOS", "Android"
+ // Note: This value is intended to be taken from the [UA client hints API] (
+ // `navigator.userAgentData.platform`). If unavailable, the legacy
+ // `navigator.platform` API SHOULD NOT be used instead and this attribute SHOULD
+ // be left unset in order for the values to be consistent.
+ // The list of possible values is defined in the
+ // [W3C User-Agent Client Hints specification]. Note that some (but not all) of
+ // these values can overlap with values in the
+ // [`os.type` and `os.name` attributes]. However, for consistency, the values in
+ // the `browser.platform` attribute should capture the exact value that the user
+ // agent provides.
+ //
+ // [UA client hints API]: https://wicg.github.io/ua-client-hints/#interface
+ // [W3C User-Agent Client Hints specification]: https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform
+ // [`os.type` and `os.name` attributes]: ./os.md
+ BrowserPlatformKey = attribute.Key("browser.platform")
+)
+
+// BrowserBrands returns an attribute KeyValue conforming to the "browser.brands"
+// semantic conventions. It represents the array of brand name and version
+// separated by a space.
+func BrowserBrands(val ...string) attribute.KeyValue {
+ return BrowserBrandsKey.StringSlice(val)
+}
+
+// BrowserLanguage returns an attribute KeyValue conforming to the
+// "browser.language" semantic conventions. It represents the preferred language
+// of the user using the browser.
+func BrowserLanguage(val string) attribute.KeyValue {
+ return BrowserLanguageKey.String(val)
+}
+
+// BrowserMobile returns an attribute KeyValue conforming to the "browser.mobile"
+// semantic conventions. It represents a boolean that is true if the browser is
+// running on a mobile device.
+func BrowserMobile(val bool) attribute.KeyValue {
+ return BrowserMobileKey.Bool(val)
+}
+
+// BrowserPlatform returns an attribute KeyValue conforming to the
+// "browser.platform" semantic conventions. It represents the platform on which
+// the browser is running.
+func BrowserPlatform(val string) attribute.KeyValue {
+ return BrowserPlatformKey.String(val)
+}
+
+// Namespace: cassandra
+const (
+ // CassandraConsistencyLevelKey is the attribute Key conforming to the
+ // "cassandra.consistency.level" semantic conventions. It represents the
+ // consistency level of the query. Based on consistency values from [CQL].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ //
+ // [CQL]: https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html
+ CassandraConsistencyLevelKey = attribute.Key("cassandra.consistency.level")
+
+ // CassandraCoordinatorDCKey is the attribute Key conforming to the
+ // "cassandra.coordinator.dc" semantic conventions. It represents the data
+ // center of the coordinating node for a query.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: us-west-2
+ CassandraCoordinatorDCKey = attribute.Key("cassandra.coordinator.dc")
+
+ // CassandraCoordinatorIDKey is the attribute Key conforming to the
+ // "cassandra.coordinator.id" semantic conventions. It represents the ID of the
+ // coordinating node for a query.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: be13faa2-8574-4d71-926d-27f16cf8a7af
+ CassandraCoordinatorIDKey = attribute.Key("cassandra.coordinator.id")
+
+ // CassandraPageSizeKey is the attribute Key conforming to the
+ // "cassandra.page.size" semantic conventions. It represents the fetch size used
+ // for paging, i.e. how many rows will be returned at once.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 5000
+ CassandraPageSizeKey = attribute.Key("cassandra.page.size")
+
+ // CassandraQueryIdempotentKey is the attribute Key conforming to the
+ // "cassandra.query.idempotent" semantic conventions. It represents the whether
+ // or not the query is idempotent.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ CassandraQueryIdempotentKey = attribute.Key("cassandra.query.idempotent")
+
+ // CassandraSpeculativeExecutionCountKey is the attribute Key conforming to the
+ // "cassandra.speculative_execution.count" semantic conventions. It represents
+ // the number of times a query was speculatively executed. Not set or `0` if the
+ // query was not executed speculatively.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 0, 2
+ CassandraSpeculativeExecutionCountKey = attribute.Key("cassandra.speculative_execution.count")
+)
+
+// CassandraCoordinatorDC returns an attribute KeyValue conforming to the
+// "cassandra.coordinator.dc" semantic conventions. It represents the data center
+// of the coordinating node for a query.
+func CassandraCoordinatorDC(val string) attribute.KeyValue {
+ return CassandraCoordinatorDCKey.String(val)
+}
+
+// CassandraCoordinatorID returns an attribute KeyValue conforming to the
+// "cassandra.coordinator.id" semantic conventions. It represents the ID of the
+// coordinating node for a query.
+func CassandraCoordinatorID(val string) attribute.KeyValue {
+ return CassandraCoordinatorIDKey.String(val)
+}
+
+// CassandraPageSize returns an attribute KeyValue conforming to the
+// "cassandra.page.size" semantic conventions. It represents the fetch size used
+// for paging, i.e. how many rows will be returned at once.
+func CassandraPageSize(val int) attribute.KeyValue {
+ return CassandraPageSizeKey.Int(val)
+}
+
+// CassandraQueryIdempotent returns an attribute KeyValue conforming to the
+// "cassandra.query.idempotent" semantic conventions. It represents the whether
+// or not the query is idempotent.
+func CassandraQueryIdempotent(val bool) attribute.KeyValue {
+ return CassandraQueryIdempotentKey.Bool(val)
+}
+
+// CassandraSpeculativeExecutionCount returns an attribute KeyValue conforming to
+// the "cassandra.speculative_execution.count" semantic conventions. It
+// represents the number of times a query was speculatively executed. Not set or
+// `0` if the query was not executed speculatively.
+func CassandraSpeculativeExecutionCount(val int) attribute.KeyValue {
+ return CassandraSpeculativeExecutionCountKey.Int(val)
+}
+
+// Enum values for cassandra.consistency.level
+var (
+ // all
+ // Stability: development
+ CassandraConsistencyLevelAll = CassandraConsistencyLevelKey.String("all")
+ // each_quorum
+ // Stability: development
+ CassandraConsistencyLevelEachQuorum = CassandraConsistencyLevelKey.String("each_quorum")
+ // quorum
+ // Stability: development
+ CassandraConsistencyLevelQuorum = CassandraConsistencyLevelKey.String("quorum")
+ // local_quorum
+ // Stability: development
+ CassandraConsistencyLevelLocalQuorum = CassandraConsistencyLevelKey.String("local_quorum")
+ // one
+ // Stability: development
+ CassandraConsistencyLevelOne = CassandraConsistencyLevelKey.String("one")
+ // two
+ // Stability: development
+ CassandraConsistencyLevelTwo = CassandraConsistencyLevelKey.String("two")
+ // three
+ // Stability: development
+ CassandraConsistencyLevelThree = CassandraConsistencyLevelKey.String("three")
+ // local_one
+ // Stability: development
+ CassandraConsistencyLevelLocalOne = CassandraConsistencyLevelKey.String("local_one")
+ // any
+ // Stability: development
+ CassandraConsistencyLevelAny = CassandraConsistencyLevelKey.String("any")
+ // serial
+ // Stability: development
+ CassandraConsistencyLevelSerial = CassandraConsistencyLevelKey.String("serial")
+ // local_serial
+ // Stability: development
+ CassandraConsistencyLevelLocalSerial = CassandraConsistencyLevelKey.String("local_serial")
+)
+
+// Namespace: cicd
+const (
+ // CICDPipelineActionNameKey is the attribute Key conforming to the
+ // "cicd.pipeline.action.name" semantic conventions. It represents the kind of
+ // action a pipeline run is performing.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "BUILD", "RUN", "SYNC"
+ CICDPipelineActionNameKey = attribute.Key("cicd.pipeline.action.name")
+
+ // CICDPipelineNameKey is the attribute Key conforming to the
+ // "cicd.pipeline.name" semantic conventions. It represents the human readable
+ // name of the pipeline within a CI/CD system.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Build and Test", "Lint", "Deploy Go Project",
+ // "deploy_to_environment"
+ CICDPipelineNameKey = attribute.Key("cicd.pipeline.name")
+
+ // CICDPipelineResultKey is the attribute Key conforming to the
+ // "cicd.pipeline.result" semantic conventions. It represents the result of a
+ // pipeline run.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "success", "failure", "timeout", "skipped"
+ CICDPipelineResultKey = attribute.Key("cicd.pipeline.result")
+
+ // CICDPipelineRunIDKey is the attribute Key conforming to the
+ // "cicd.pipeline.run.id" semantic conventions. It represents the unique
+ // identifier of a pipeline run within a CI/CD system.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "120912"
+ CICDPipelineRunIDKey = attribute.Key("cicd.pipeline.run.id")
+
+ // CICDPipelineRunStateKey is the attribute Key conforming to the
+ // "cicd.pipeline.run.state" semantic conventions. It represents the pipeline
+ // run goes through these states during its lifecycle.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "pending", "executing", "finalizing"
+ CICDPipelineRunStateKey = attribute.Key("cicd.pipeline.run.state")
+
+ // CICDPipelineRunURLFullKey is the attribute Key conforming to the
+ // "cicd.pipeline.run.url.full" semantic conventions. It represents the [URL] of
+ // the pipeline run, providing the complete address in order to locate and
+ // identify the pipeline run.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763?pr=1075"
+ //
+ // [URL]: https://wikipedia.org/wiki/URL
+ CICDPipelineRunURLFullKey = attribute.Key("cicd.pipeline.run.url.full")
+
+ // CICDPipelineTaskNameKey is the attribute Key conforming to the
+ // "cicd.pipeline.task.name" semantic conventions. It represents the human
+ // readable name of a task within a pipeline. Task here most closely aligns with
+ // a [computing process] in a pipeline. Other terms for tasks include commands,
+ // steps, and procedures.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Run GoLang Linter", "Go Build", "go-test", "deploy_binary"
+ //
+ // [computing process]: https://wikipedia.org/wiki/Pipeline_(computing)
+ CICDPipelineTaskNameKey = attribute.Key("cicd.pipeline.task.name")
+
+ // CICDPipelineTaskRunIDKey is the attribute Key conforming to the
+ // "cicd.pipeline.task.run.id" semantic conventions. It represents the unique
+ // identifier of a task run within a pipeline.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "12097"
+ CICDPipelineTaskRunIDKey = attribute.Key("cicd.pipeline.task.run.id")
+
+ // CICDPipelineTaskRunResultKey is the attribute Key conforming to the
+ // "cicd.pipeline.task.run.result" semantic conventions. It represents the
+ // result of a task run.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "success", "failure", "timeout", "skipped"
+ CICDPipelineTaskRunResultKey = attribute.Key("cicd.pipeline.task.run.result")
+
+ // CICDPipelineTaskRunURLFullKey is the attribute Key conforming to the
+ // "cicd.pipeline.task.run.url.full" semantic conventions. It represents the
+ // [URL] of the pipeline task run, providing the complete address in order to
+ // locate and identify the pipeline task run.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763/job/26920038674?pr=1075"
+ //
+ // [URL]: https://wikipedia.org/wiki/URL
+ CICDPipelineTaskRunURLFullKey = attribute.Key("cicd.pipeline.task.run.url.full")
+
+ // CICDPipelineTaskTypeKey is the attribute Key conforming to the
+ // "cicd.pipeline.task.type" semantic conventions. It represents the type of the
+ // task within a pipeline.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "build", "test", "deploy"
+ CICDPipelineTaskTypeKey = attribute.Key("cicd.pipeline.task.type")
+
+ // CICDSystemComponentKey is the attribute Key conforming to the
+ // "cicd.system.component" semantic conventions. It represents the name of a
+ // component of the CICD system.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "controller", "scheduler", "agent"
+ CICDSystemComponentKey = attribute.Key("cicd.system.component")
+
+ // CICDWorkerIDKey is the attribute Key conforming to the "cicd.worker.id"
+ // semantic conventions. It represents the unique identifier of a worker within
+ // a CICD system.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "abc123", "10.0.1.2", "controller"
+ CICDWorkerIDKey = attribute.Key("cicd.worker.id")
+
+ // CICDWorkerNameKey is the attribute Key conforming to the "cicd.worker.name"
+ // semantic conventions. It represents the name of a worker within a CICD
+ // system.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "agent-abc", "controller", "Ubuntu LTS"
+ CICDWorkerNameKey = attribute.Key("cicd.worker.name")
+
+ // CICDWorkerStateKey is the attribute Key conforming to the "cicd.worker.state"
+ // semantic conventions. It represents the state of a CICD worker / agent.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "idle", "busy", "down"
+ CICDWorkerStateKey = attribute.Key("cicd.worker.state")
+
+ // CICDWorkerURLFullKey is the attribute Key conforming to the
+ // "cicd.worker.url.full" semantic conventions. It represents the [URL] of the
+ // worker, providing the complete address in order to locate and identify the
+ // worker.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "https://cicd.example.org/worker/abc123"
+ //
+ // [URL]: https://wikipedia.org/wiki/URL
+ CICDWorkerURLFullKey = attribute.Key("cicd.worker.url.full")
+)
+
+// CICDPipelineName returns an attribute KeyValue conforming to the
+// "cicd.pipeline.name" semantic conventions. It represents the human readable
+// name of the pipeline within a CI/CD system.
+func CICDPipelineName(val string) attribute.KeyValue {
+ return CICDPipelineNameKey.String(val)
+}
+
+// CICDPipelineRunID returns an attribute KeyValue conforming to the
+// "cicd.pipeline.run.id" semantic conventions. It represents the unique
+// identifier of a pipeline run within a CI/CD system.
+func CICDPipelineRunID(val string) attribute.KeyValue {
+ return CICDPipelineRunIDKey.String(val)
+}
+
+// CICDPipelineRunURLFull returns an attribute KeyValue conforming to the
+// "cicd.pipeline.run.url.full" semantic conventions. It represents the [URL] of
+// the pipeline run, providing the complete address in order to locate and
+// identify the pipeline run.
+//
+// [URL]: https://wikipedia.org/wiki/URL
+func CICDPipelineRunURLFull(val string) attribute.KeyValue {
+ return CICDPipelineRunURLFullKey.String(val)
+}
+
+// CICDPipelineTaskName returns an attribute KeyValue conforming to the
+// "cicd.pipeline.task.name" semantic conventions. It represents the human
+// readable name of a task within a pipeline. Task here most closely aligns with
+// a [computing process] in a pipeline. Other terms for tasks include commands,
+// steps, and procedures.
+//
+// [computing process]: https://wikipedia.org/wiki/Pipeline_(computing)
+func CICDPipelineTaskName(val string) attribute.KeyValue {
+ return CICDPipelineTaskNameKey.String(val)
+}
+
+// CICDPipelineTaskRunID returns an attribute KeyValue conforming to the
+// "cicd.pipeline.task.run.id" semantic conventions. It represents the unique
+// identifier of a task run within a pipeline.
+func CICDPipelineTaskRunID(val string) attribute.KeyValue {
+ return CICDPipelineTaskRunIDKey.String(val)
+}
+
+// CICDPipelineTaskRunURLFull returns an attribute KeyValue conforming to the
+// "cicd.pipeline.task.run.url.full" semantic conventions. It represents the
+// [URL] of the pipeline task run, providing the complete address in order to
+// locate and identify the pipeline task run.
+//
+// [URL]: https://wikipedia.org/wiki/URL
+func CICDPipelineTaskRunURLFull(val string) attribute.KeyValue {
+ return CICDPipelineTaskRunURLFullKey.String(val)
+}
+
+// CICDSystemComponent returns an attribute KeyValue conforming to the
+// "cicd.system.component" semantic conventions. It represents the name of a
+// component of the CICD system.
+func CICDSystemComponent(val string) attribute.KeyValue {
+ return CICDSystemComponentKey.String(val)
+}
+
+// CICDWorkerID returns an attribute KeyValue conforming to the "cicd.worker.id"
+// semantic conventions. It represents the unique identifier of a worker within a
+// CICD system.
+func CICDWorkerID(val string) attribute.KeyValue {
+ return CICDWorkerIDKey.String(val)
+}
+
+// CICDWorkerName returns an attribute KeyValue conforming to the
+// "cicd.worker.name" semantic conventions. It represents the name of a worker
+// within a CICD system.
+func CICDWorkerName(val string) attribute.KeyValue {
+ return CICDWorkerNameKey.String(val)
+}
+
+// CICDWorkerURLFull returns an attribute KeyValue conforming to the
+// "cicd.worker.url.full" semantic conventions. It represents the [URL] of the
+// worker, providing the complete address in order to locate and identify the
+// worker.
+//
+// [URL]: https://wikipedia.org/wiki/URL
+func CICDWorkerURLFull(val string) attribute.KeyValue {
+ return CICDWorkerURLFullKey.String(val)
+}
+
+// Enum values for cicd.pipeline.action.name
+var (
+ // The pipeline run is executing a build.
+ // Stability: development
+ CICDPipelineActionNameBuild = CICDPipelineActionNameKey.String("BUILD")
+ // The pipeline run is executing.
+ // Stability: development
+ CICDPipelineActionNameRun = CICDPipelineActionNameKey.String("RUN")
+ // The pipeline run is executing a sync.
+ // Stability: development
+ CICDPipelineActionNameSync = CICDPipelineActionNameKey.String("SYNC")
+)
+
+// Enum values for cicd.pipeline.result
+var (
+ // The pipeline run finished successfully.
+ // Stability: development
+ CICDPipelineResultSuccess = CICDPipelineResultKey.String("success")
+ // The pipeline run did not finish successfully, eg. due to a compile error or a
+ // failing test. Such failures are usually detected by non-zero exit codes of
+ // the tools executed in the pipeline run.
+ // Stability: development
+ CICDPipelineResultFailure = CICDPipelineResultKey.String("failure")
+ // The pipeline run failed due to an error in the CICD system, eg. due to the
+ // worker being killed.
+ // Stability: development
+ CICDPipelineResultError = CICDPipelineResultKey.String("error")
+ // A timeout caused the pipeline run to be interrupted.
+ // Stability: development
+ CICDPipelineResultTimeout = CICDPipelineResultKey.String("timeout")
+ // The pipeline run was cancelled, eg. by a user manually cancelling the
+ // pipeline run.
+ // Stability: development
+ CICDPipelineResultCancellation = CICDPipelineResultKey.String("cancellation")
+ // The pipeline run was skipped, eg. due to a precondition not being met.
+ // Stability: development
+ CICDPipelineResultSkip = CICDPipelineResultKey.String("skip")
+)
+
+// Enum values for cicd.pipeline.run.state
+var (
+ // The run pending state spans from the event triggering the pipeline run until
+ // the execution of the run starts (eg. time spent in a queue, provisioning
+ // agents, creating run resources).
+ //
+ // Stability: development
+ CICDPipelineRunStatePending = CICDPipelineRunStateKey.String("pending")
+ // The executing state spans the execution of any run tasks (eg. build, test).
+ // Stability: development
+ CICDPipelineRunStateExecuting = CICDPipelineRunStateKey.String("executing")
+ // The finalizing state spans from when the run has finished executing (eg.
+ // cleanup of run resources).
+ // Stability: development
+ CICDPipelineRunStateFinalizing = CICDPipelineRunStateKey.String("finalizing")
+)
+
+// Enum values for cicd.pipeline.task.run.result
+var (
+ // The task run finished successfully.
+ // Stability: development
+ CICDPipelineTaskRunResultSuccess = CICDPipelineTaskRunResultKey.String("success")
+ // The task run did not finish successfully, eg. due to a compile error or a
+ // failing test. Such failures are usually detected by non-zero exit codes of
+ // the tools executed in the task run.
+ // Stability: development
+ CICDPipelineTaskRunResultFailure = CICDPipelineTaskRunResultKey.String("failure")
+ // The task run failed due to an error in the CICD system, eg. due to the worker
+ // being killed.
+ // Stability: development
+ CICDPipelineTaskRunResultError = CICDPipelineTaskRunResultKey.String("error")
+ // A timeout caused the task run to be interrupted.
+ // Stability: development
+ CICDPipelineTaskRunResultTimeout = CICDPipelineTaskRunResultKey.String("timeout")
+ // The task run was cancelled, eg. by a user manually cancelling the task run.
+ // Stability: development
+ CICDPipelineTaskRunResultCancellation = CICDPipelineTaskRunResultKey.String("cancellation")
+ // The task run was skipped, eg. due to a precondition not being met.
+ // Stability: development
+ CICDPipelineTaskRunResultSkip = CICDPipelineTaskRunResultKey.String("skip")
+)
+
+// Enum values for cicd.pipeline.task.type
+var (
+ // build
+ // Stability: development
+ CICDPipelineTaskTypeBuild = CICDPipelineTaskTypeKey.String("build")
+ // test
+ // Stability: development
+ CICDPipelineTaskTypeTest = CICDPipelineTaskTypeKey.String("test")
+ // deploy
+ // Stability: development
+ CICDPipelineTaskTypeDeploy = CICDPipelineTaskTypeKey.String("deploy")
+)
+
+// Enum values for cicd.worker.state
+var (
+ // The worker is not performing work for the CICD system. It is available to the
+ // CICD system to perform work on (online / idle).
+ // Stability: development
+ CICDWorkerStateAvailable = CICDWorkerStateKey.String("available")
+ // The worker is performing work for the CICD system.
+ // Stability: development
+ CICDWorkerStateBusy = CICDWorkerStateKey.String("busy")
+ // The worker is not available to the CICD system (disconnected / down).
+ // Stability: development
+ CICDWorkerStateOffline = CICDWorkerStateKey.String("offline")
+)
+
+// Namespace: client
+const (
+ // ClientAddressKey is the attribute Key conforming to the "client.address"
+ // semantic conventions. It represents the client address - domain name if
+ // available without reverse DNS lookup; otherwise, IP address or Unix domain
+ // socket name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "client.example.com", "10.1.2.80", "/tmp/my.sock"
+ // Note: When observed from the server side, and when communicating through an
+ // intermediary, `client.address` SHOULD represent the client address behind any
+ // intermediaries, for example proxies, if it's available.
+ ClientAddressKey = attribute.Key("client.address")
+
+ // ClientPortKey is the attribute Key conforming to the "client.port" semantic
+ // conventions. It represents the client port number.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: 65123
+ // Note: When observed from the server side, and when communicating through an
+ // intermediary, `client.port` SHOULD represent the client port behind any
+ // intermediaries, for example proxies, if it's available.
+ ClientPortKey = attribute.Key("client.port")
+)
+
+// ClientAddress returns an attribute KeyValue conforming to the "client.address"
+// semantic conventions. It represents the client address - domain name if
+// available without reverse DNS lookup; otherwise, IP address or Unix domain
+// socket name.
+func ClientAddress(val string) attribute.KeyValue {
+ return ClientAddressKey.String(val)
+}
+
+// ClientPort returns an attribute KeyValue conforming to the "client.port"
+// semantic conventions. It represents the client port number.
+func ClientPort(val int) attribute.KeyValue {
+ return ClientPortKey.Int(val)
+}
+
+// Namespace: cloud
+const (
+ // CloudAccountIDKey is the attribute Key conforming to the "cloud.account.id"
+ // semantic conventions. It represents the cloud account ID the resource is
+ // assigned to.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "111111111111", "opentelemetry"
+ CloudAccountIDKey = attribute.Key("cloud.account.id")
+
+ // CloudAvailabilityZoneKey is the attribute Key conforming to the
+ // "cloud.availability_zone" semantic conventions. It represents the cloud
+ // regions often have multiple, isolated locations known as zones to increase
+ // availability. Availability zone represents the zone where the resource is
+ // running.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "us-east-1c"
+ // Note: Availability zones are called "zones" on Alibaba Cloud and Google
+ // Cloud.
+ CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone")
+
+ // CloudPlatformKey is the attribute Key conforming to the "cloud.platform"
+ // semantic conventions. It represents the cloud platform in use.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: The prefix of the service SHOULD match the one specified in
+ // `cloud.provider`.
+ CloudPlatformKey = attribute.Key("cloud.platform")
+
+ // CloudProviderKey is the attribute Key conforming to the "cloud.provider"
+ // semantic conventions. It represents the name of the cloud provider.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ CloudProviderKey = attribute.Key("cloud.provider")
+
+ // CloudRegionKey is the attribute Key conforming to the "cloud.region" semantic
+ // conventions. It represents the geographical region within a cloud provider.
+ // When associated with a resource, this attribute specifies the region where
+ // the resource operates. When calling services or APIs deployed on a cloud,
+ // this attribute identifies the region where the called destination is
+ // deployed.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "us-central1", "us-east-1"
+ // Note: Refer to your provider's docs to see the available regions, for example
+ // [Alibaba Cloud regions], [AWS regions], [Azure regions],
+ // [Google Cloud regions], or [Tencent Cloud regions].
+ //
+ // [Alibaba Cloud regions]: https://www.alibabacloud.com/help/doc-detail/40654.htm
+ // [AWS regions]: https://aws.amazon.com/about-aws/global-infrastructure/regions_az/
+ // [Azure regions]: https://azure.microsoft.com/global-infrastructure/geographies/
+ // [Google Cloud regions]: https://cloud.google.com/about/locations
+ // [Tencent Cloud regions]: https://www.tencentcloud.com/document/product/213/6091
+ CloudRegionKey = attribute.Key("cloud.region")
+
+ // CloudResourceIDKey is the attribute Key conforming to the "cloud.resource_id"
+ // semantic conventions. It represents the cloud provider-specific native
+ // identifier of the monitored cloud resource (e.g. an [ARN] on AWS, a
+ // [fully qualified resource ID] on Azure, a [full resource name] on GCP).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function",
+ // "//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID",
+ // "/subscriptions//resourceGroups/
+ // /providers/Microsoft.Web/sites//functions/"
+ // Note: On some cloud providers, it may not be possible to determine the full
+ // ID at startup,
+ // so it may be necessary to set `cloud.resource_id` as a span attribute
+ // instead.
+ //
+ // The exact value to use for `cloud.resource_id` depends on the cloud provider.
+ // The following well-known definitions MUST be used if you set this attribute
+ // and they apply:
+ //
+ // - **AWS Lambda:** The function [ARN].
+ // Take care not to use the "invoked ARN" directly but replace any
+ // [alias suffix]
+ // with the resolved function version, as the same runtime instance may be
+ // invocable with
+ // multiple different aliases.
+ // - **GCP:** The [URI of the resource]
+ // - **Azure:** The [Fully Qualified Resource ID] of the invoked function,
+ // *not* the function app, having the form
+ //
+ // `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`
+ // .
+ // This means that a span attribute MUST be used, as an Azure function app
+ // can host multiple functions that would usually share
+ // a TracerProvider.
+ //
+ //
+ // [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
+ // [fully qualified resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id
+ // [full resource name]: https://google.aip.dev/122#full-resource-names
+ // [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
+ // [alias suffix]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html
+ // [URI of the resource]: https://cloud.google.com/iam/docs/full-resource-names
+ // [Fully Qualified Resource ID]: https://docs.microsoft.com/rest/api/resources/resources/get-by-id
+ CloudResourceIDKey = attribute.Key("cloud.resource_id")
+)
+
+// CloudAccountID returns an attribute KeyValue conforming to the
+// "cloud.account.id" semantic conventions. It represents the cloud account ID
+// the resource is assigned to.
+func CloudAccountID(val string) attribute.KeyValue {
+ return CloudAccountIDKey.String(val)
+}
+
+// CloudAvailabilityZone returns an attribute KeyValue conforming to the
+// "cloud.availability_zone" semantic conventions. It represents the cloud
+// regions often have multiple, isolated locations known as zones to increase
+// availability. Availability zone represents the zone where the resource is
+// running.
+func CloudAvailabilityZone(val string) attribute.KeyValue {
+ return CloudAvailabilityZoneKey.String(val)
+}
+
+// CloudRegion returns an attribute KeyValue conforming to the "cloud.region"
+// semantic conventions. It represents the geographical region within a cloud
+// provider. When associated with a resource, this attribute specifies the region
+// where the resource operates. When calling services or APIs deployed on a
+// cloud, this attribute identifies the region where the called destination is
+// deployed.
+func CloudRegion(val string) attribute.KeyValue {
+ return CloudRegionKey.String(val)
+}
+
+// CloudResourceID returns an attribute KeyValue conforming to the
+// "cloud.resource_id" semantic conventions. It represents the cloud
+// provider-specific native identifier of the monitored cloud resource (e.g. an
+// [ARN] on AWS, a [fully qualified resource ID] on Azure, a [full resource name]
+// on GCP).
+//
+// [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
+// [fully qualified resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id
+// [full resource name]: https://google.aip.dev/122#full-resource-names
+func CloudResourceID(val string) attribute.KeyValue {
+ return CloudResourceIDKey.String(val)
+}
+
+// Enum values for cloud.platform
+var (
+ // Alibaba Cloud Elastic Compute Service
+ // Stability: development
+ CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs")
+ // Alibaba Cloud Function Compute
+ // Stability: development
+ CloudPlatformAlibabaCloudFC = CloudPlatformKey.String("alibaba_cloud_fc")
+ // Red Hat OpenShift on Alibaba Cloud
+ // Stability: development
+ CloudPlatformAlibabaCloudOpenShift = CloudPlatformKey.String("alibaba_cloud_openshift")
+ // AWS Elastic Compute Cloud
+ // Stability: development
+ CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2")
+ // AWS Elastic Container Service
+ // Stability: development
+ CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs")
+ // AWS Elastic Kubernetes Service
+ // Stability: development
+ CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks")
+ // AWS Lambda
+ // Stability: development
+ CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda")
+ // AWS Elastic Beanstalk
+ // Stability: development
+ CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk")
+ // AWS App Runner
+ // Stability: development
+ CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner")
+ // Red Hat OpenShift on AWS (ROSA)
+ // Stability: development
+ CloudPlatformAWSOpenShift = CloudPlatformKey.String("aws_openshift")
+ // Azure Virtual Machines
+ // Stability: development
+ CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm")
+ // Azure Container Apps
+ // Stability: development
+ CloudPlatformAzureContainerApps = CloudPlatformKey.String("azure_container_apps")
+ // Azure Container Instances
+ // Stability: development
+ CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances")
+ // Azure Kubernetes Service
+ // Stability: development
+ CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks")
+ // Azure Functions
+ // Stability: development
+ CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions")
+ // Azure App Service
+ // Stability: development
+ CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service")
+ // Azure Red Hat OpenShift
+ // Stability: development
+ CloudPlatformAzureOpenShift = CloudPlatformKey.String("azure_openshift")
+ // Google Bare Metal Solution (BMS)
+ // Stability: development
+ CloudPlatformGCPBareMetalSolution = CloudPlatformKey.String("gcp_bare_metal_solution")
+ // Google Cloud Compute Engine (GCE)
+ // Stability: development
+ CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine")
+ // Google Cloud Run
+ // Stability: development
+ CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run")
+ // Google Cloud Kubernetes Engine (GKE)
+ // Stability: development
+ CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine")
+ // Google Cloud Functions (GCF)
+ // Stability: development
+ CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions")
+ // Google Cloud App Engine (GAE)
+ // Stability: development
+ CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine")
+ // Red Hat OpenShift on Google Cloud
+ // Stability: development
+ CloudPlatformGCPOpenShift = CloudPlatformKey.String("gcp_openshift")
+ // Red Hat OpenShift on IBM Cloud
+ // Stability: development
+ CloudPlatformIBMCloudOpenShift = CloudPlatformKey.String("ibm_cloud_openshift")
+ // Compute on Oracle Cloud Infrastructure (OCI)
+ // Stability: development
+ CloudPlatformOracleCloudCompute = CloudPlatformKey.String("oracle_cloud_compute")
+ // Kubernetes Engine (OKE) on Oracle Cloud Infrastructure (OCI)
+ // Stability: development
+ CloudPlatformOracleCloudOKE = CloudPlatformKey.String("oracle_cloud_oke")
+ // Tencent Cloud Cloud Virtual Machine (CVM)
+ // Stability: development
+ CloudPlatformTencentCloudCVM = CloudPlatformKey.String("tencent_cloud_cvm")
+ // Tencent Cloud Elastic Kubernetes Service (EKS)
+ // Stability: development
+ CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks")
+ // Tencent Cloud Serverless Cloud Function (SCF)
+ // Stability: development
+ CloudPlatformTencentCloudSCF = CloudPlatformKey.String("tencent_cloud_scf")
+)
+
+// Enum values for cloud.provider
+var (
+ // Alibaba Cloud
+ // Stability: development
+ CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud")
+ // Amazon Web Services
+ // Stability: development
+ CloudProviderAWS = CloudProviderKey.String("aws")
+ // Microsoft Azure
+ // Stability: development
+ CloudProviderAzure = CloudProviderKey.String("azure")
+ // Google Cloud Platform
+ // Stability: development
+ CloudProviderGCP = CloudProviderKey.String("gcp")
+ // Heroku Platform as a Service
+ // Stability: development
+ CloudProviderHeroku = CloudProviderKey.String("heroku")
+ // IBM Cloud
+ // Stability: development
+ CloudProviderIBMCloud = CloudProviderKey.String("ibm_cloud")
+ // Oracle Cloud Infrastructure (OCI)
+ // Stability: development
+ CloudProviderOracleCloud = CloudProviderKey.String("oracle_cloud")
+ // Tencent Cloud
+ // Stability: development
+ CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud")
+)
+
+// Namespace: cloudevents
+const (
+ // CloudEventsEventIDKey is the attribute Key conforming to the
+ // "cloudevents.event_id" semantic conventions. It represents the [event_id]
+ // uniquely identifies the event.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "123e4567-e89b-12d3-a456-426614174000", "0001"
+ //
+ // [event_id]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id
+ CloudEventsEventIDKey = attribute.Key("cloudevents.event_id")
+
+ // CloudEventsEventSourceKey is the attribute Key conforming to the
+ // "cloudevents.event_source" semantic conventions. It represents the [source]
+ // identifies the context in which an event happened.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "https://github.com/cloudevents", "/cloudevents/spec/pull/123",
+ // "my-service"
+ //
+ // [source]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1
+ CloudEventsEventSourceKey = attribute.Key("cloudevents.event_source")
+
+ // CloudEventsEventSpecVersionKey is the attribute Key conforming to the
+ // "cloudevents.event_spec_version" semantic conventions. It represents the
+ // [version of the CloudEvents specification] which the event uses.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 1.0
+ //
+ // [version of the CloudEvents specification]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion
+ CloudEventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version")
+
+ // CloudEventsEventSubjectKey is the attribute Key conforming to the
+ // "cloudevents.event_subject" semantic conventions. It represents the [subject]
+ // of the event in the context of the event producer (identified by source).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: mynewfile.jpg
+ //
+ // [subject]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject
+ CloudEventsEventSubjectKey = attribute.Key("cloudevents.event_subject")
+
+ // CloudEventsEventTypeKey is the attribute Key conforming to the
+ // "cloudevents.event_type" semantic conventions. It represents the [event_type]
+ // contains a value describing the type of event related to the originating
+ // occurrence.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "com.github.pull_request.opened", "com.example.object.deleted.v2"
+ //
+ // [event_type]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type
+ CloudEventsEventTypeKey = attribute.Key("cloudevents.event_type")
+)
+
+// CloudEventsEventID returns an attribute KeyValue conforming to the
+// "cloudevents.event_id" semantic conventions. It represents the [event_id]
+// uniquely identifies the event.
+//
+// [event_id]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id
+func CloudEventsEventID(val string) attribute.KeyValue {
+ return CloudEventsEventIDKey.String(val)
+}
+
+// CloudEventsEventSource returns an attribute KeyValue conforming to the
+// "cloudevents.event_source" semantic conventions. It represents the [source]
+// identifies the context in which an event happened.
+//
+// [source]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1
+func CloudEventsEventSource(val string) attribute.KeyValue {
+ return CloudEventsEventSourceKey.String(val)
+}
+
+// CloudEventsEventSpecVersion returns an attribute KeyValue conforming to the
+// "cloudevents.event_spec_version" semantic conventions. It represents the
+// [version of the CloudEvents specification] which the event uses.
+//
+// [version of the CloudEvents specification]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion
+func CloudEventsEventSpecVersion(val string) attribute.KeyValue {
+ return CloudEventsEventSpecVersionKey.String(val)
+}
+
+// CloudEventsEventSubject returns an attribute KeyValue conforming to the
+// "cloudevents.event_subject" semantic conventions. It represents the [subject]
+// of the event in the context of the event producer (identified by source).
+//
+// [subject]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject
+func CloudEventsEventSubject(val string) attribute.KeyValue {
+ return CloudEventsEventSubjectKey.String(val)
+}
+
+// CloudEventsEventType returns an attribute KeyValue conforming to the
+// "cloudevents.event_type" semantic conventions. It represents the [event_type]
+// contains a value describing the type of event related to the originating
+// occurrence.
+//
+// [event_type]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type
+func CloudEventsEventType(val string) attribute.KeyValue {
+ return CloudEventsEventTypeKey.String(val)
+}
+
+// Namespace: cloudfoundry
+const (
+ // CloudFoundryAppIDKey is the attribute Key conforming to the
+ // "cloudfoundry.app.id" semantic conventions. It represents the guid of the
+ // application.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d"
+ // Note: Application instrumentation should use the value from environment
+ // variable `VCAP_APPLICATION.application_id`. This is the same value as
+ // reported by `cf app --guid`.
+ CloudFoundryAppIDKey = attribute.Key("cloudfoundry.app.id")
+
+ // CloudFoundryAppInstanceIDKey is the attribute Key conforming to the
+ // "cloudfoundry.app.instance.id" semantic conventions. It represents the index
+ // of the application instance. 0 when just one instance is active.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "0", "1"
+ // Note: CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope]
+ // .
+ // It is used for logs and metrics emitted by CloudFoundry. It is
+ // supposed to contain the application instance index for applications
+ // deployed on the runtime.
+ //
+ // Application instrumentation should use the value from environment
+ // variable `CF_INSTANCE_INDEX`.
+ //
+ // [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope
+ CloudFoundryAppInstanceIDKey = attribute.Key("cloudfoundry.app.instance.id")
+
+ // CloudFoundryAppNameKey is the attribute Key conforming to the
+ // "cloudfoundry.app.name" semantic conventions. It represents the name of the
+ // application.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-app-name"
+ // Note: Application instrumentation should use the value from environment
+ // variable `VCAP_APPLICATION.application_name`. This is the same value
+ // as reported by `cf apps`.
+ CloudFoundryAppNameKey = attribute.Key("cloudfoundry.app.name")
+
+ // CloudFoundryOrgIDKey is the attribute Key conforming to the
+ // "cloudfoundry.org.id" semantic conventions. It represents the guid of the
+ // CloudFoundry org the application is running in.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d"
+ // Note: Application instrumentation should use the value from environment
+ // variable `VCAP_APPLICATION.org_id`. This is the same value as
+ // reported by `cf org --guid`.
+ CloudFoundryOrgIDKey = attribute.Key("cloudfoundry.org.id")
+
+ // CloudFoundryOrgNameKey is the attribute Key conforming to the
+ // "cloudfoundry.org.name" semantic conventions. It represents the name of the
+ // CloudFoundry organization the app is running in.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-org-name"
+ // Note: Application instrumentation should use the value from environment
+ // variable `VCAP_APPLICATION.org_name`. This is the same value as
+ // reported by `cf orgs`.
+ CloudFoundryOrgNameKey = attribute.Key("cloudfoundry.org.name")
+
+ // CloudFoundryProcessIDKey is the attribute Key conforming to the
+ // "cloudfoundry.process.id" semantic conventions. It represents the UID
+ // identifying the process.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d"
+ // Note: Application instrumentation should use the value from environment
+ // variable `VCAP_APPLICATION.process_id`. It is supposed to be equal to
+ // `VCAP_APPLICATION.app_id` for applications deployed to the runtime.
+ // For system components, this could be the actual PID.
+ CloudFoundryProcessIDKey = attribute.Key("cloudfoundry.process.id")
+
+ // CloudFoundryProcessTypeKey is the attribute Key conforming to the
+ // "cloudfoundry.process.type" semantic conventions. It represents the type of
+ // process.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "web"
+ // Note: CloudFoundry applications can consist of multiple jobs. Usually the
+ // main process will be of type `web`. There can be additional background
+ // tasks or side-cars with different process types.
+ CloudFoundryProcessTypeKey = attribute.Key("cloudfoundry.process.type")
+
+ // CloudFoundrySpaceIDKey is the attribute Key conforming to the
+ // "cloudfoundry.space.id" semantic conventions. It represents the guid of the
+ // CloudFoundry space the application is running in.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d"
+ // Note: Application instrumentation should use the value from environment
+ // variable `VCAP_APPLICATION.space_id`. This is the same value as
+ // reported by `cf space --guid`.
+ CloudFoundrySpaceIDKey = attribute.Key("cloudfoundry.space.id")
+
+ // CloudFoundrySpaceNameKey is the attribute Key conforming to the
+ // "cloudfoundry.space.name" semantic conventions. It represents the name of the
+ // CloudFoundry space the application is running in.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-space-name"
+ // Note: Application instrumentation should use the value from environment
+ // variable `VCAP_APPLICATION.space_name`. This is the same value as
+ // reported by `cf spaces`.
+ CloudFoundrySpaceNameKey = attribute.Key("cloudfoundry.space.name")
+
+ // CloudFoundrySystemIDKey is the attribute Key conforming to the
+ // "cloudfoundry.system.id" semantic conventions. It represents a guid or
+ // another name describing the event source.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "cf/gorouter"
+ // Note: CloudFoundry defines the `source_id` in the [Loggregator v2 envelope].
+ // It is used for logs and metrics emitted by CloudFoundry. It is
+ // supposed to contain the component name, e.g. "gorouter", for
+ // CloudFoundry components.
+ //
+ // When system components are instrumented, values from the
+ // [Bosh spec]
+ // should be used. The `system.id` should be set to
+ // `spec.deployment/spec.name`.
+ //
+ // [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope
+ // [Bosh spec]: https://bosh.io/docs/jobs/#properties-spec
+ CloudFoundrySystemIDKey = attribute.Key("cloudfoundry.system.id")
+
+ // CloudFoundrySystemInstanceIDKey is the attribute Key conforming to the
+ // "cloudfoundry.system.instance.id" semantic conventions. It represents a guid
+ // describing the concrete instance of the event source.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d"
+ // Note: CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope]
+ // .
+ // It is used for logs and metrics emitted by CloudFoundry. It is
+ // supposed to contain the vm id for CloudFoundry components.
+ //
+ // When system components are instrumented, values from the
+ // [Bosh spec]
+ // should be used. The `system.instance.id` should be set to `spec.id`.
+ //
+ // [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope
+ // [Bosh spec]: https://bosh.io/docs/jobs/#properties-spec
+ CloudFoundrySystemInstanceIDKey = attribute.Key("cloudfoundry.system.instance.id")
+)
+
+// CloudFoundryAppID returns an attribute KeyValue conforming to the
+// "cloudfoundry.app.id" semantic conventions. It represents the guid of the
+// application.
+func CloudFoundryAppID(val string) attribute.KeyValue {
+ return CloudFoundryAppIDKey.String(val)
+}
+
+// CloudFoundryAppInstanceID returns an attribute KeyValue conforming to the
+// "cloudfoundry.app.instance.id" semantic conventions. It represents the index
+// of the application instance. 0 when just one instance is active.
+func CloudFoundryAppInstanceID(val string) attribute.KeyValue {
+ return CloudFoundryAppInstanceIDKey.String(val)
+}
+
+// CloudFoundryAppName returns an attribute KeyValue conforming to the
+// "cloudfoundry.app.name" semantic conventions. It represents the name of the
+// application.
+func CloudFoundryAppName(val string) attribute.KeyValue {
+ return CloudFoundryAppNameKey.String(val)
+}
+
+// CloudFoundryOrgID returns an attribute KeyValue conforming to the
+// "cloudfoundry.org.id" semantic conventions. It represents the guid of the
+// CloudFoundry org the application is running in.
+func CloudFoundryOrgID(val string) attribute.KeyValue {
+ return CloudFoundryOrgIDKey.String(val)
+}
+
+// CloudFoundryOrgName returns an attribute KeyValue conforming to the
+// "cloudfoundry.org.name" semantic conventions. It represents the name of the
+// CloudFoundry organization the app is running in.
+func CloudFoundryOrgName(val string) attribute.KeyValue {
+ return CloudFoundryOrgNameKey.String(val)
+}
+
+// CloudFoundryProcessID returns an attribute KeyValue conforming to the
+// "cloudfoundry.process.id" semantic conventions. It represents the UID
+// identifying the process.
+func CloudFoundryProcessID(val string) attribute.KeyValue {
+ return CloudFoundryProcessIDKey.String(val)
+}
+
+// CloudFoundryProcessType returns an attribute KeyValue conforming to the
+// "cloudfoundry.process.type" semantic conventions. It represents the type of
+// process.
+func CloudFoundryProcessType(val string) attribute.KeyValue {
+ return CloudFoundryProcessTypeKey.String(val)
+}
+
+// CloudFoundrySpaceID returns an attribute KeyValue conforming to the
+// "cloudfoundry.space.id" semantic conventions. It represents the guid of the
+// CloudFoundry space the application is running in.
+func CloudFoundrySpaceID(val string) attribute.KeyValue {
+ return CloudFoundrySpaceIDKey.String(val)
+}
+
+// CloudFoundrySpaceName returns an attribute KeyValue conforming to the
+// "cloudfoundry.space.name" semantic conventions. It represents the name of the
+// CloudFoundry space the application is running in.
+func CloudFoundrySpaceName(val string) attribute.KeyValue {
+ return CloudFoundrySpaceNameKey.String(val)
+}
+
+// CloudFoundrySystemID returns an attribute KeyValue conforming to the
+// "cloudfoundry.system.id" semantic conventions. It represents a guid or another
+// name describing the event source.
+func CloudFoundrySystemID(val string) attribute.KeyValue {
+ return CloudFoundrySystemIDKey.String(val)
+}
+
+// CloudFoundrySystemInstanceID returns an attribute KeyValue conforming to the
+// "cloudfoundry.system.instance.id" semantic conventions. It represents a guid
+// describing the concrete instance of the event source.
+func CloudFoundrySystemInstanceID(val string) attribute.KeyValue {
+ return CloudFoundrySystemInstanceIDKey.String(val)
+}
+
+// Namespace: code
+const (
+ // CodeColumnNumberKey is the attribute Key conforming to the
+ // "code.column.number" semantic conventions. It represents the column number in
+ // `code.file.path` best representing the operation. It SHOULD point within the
+ // code unit named in `code.function.name`. This attribute MUST NOT be used on
+ // the Profile signal since the data is already captured in 'message Line'. This
+ // constraint is imposed to prevent redundancy and maintain data integrity.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ CodeColumnNumberKey = attribute.Key("code.column.number")
+
+ // CodeFilePathKey is the attribute Key conforming to the "code.file.path"
+ // semantic conventions. It represents the source code file name that identifies
+ // the code unit as uniquely as possible (preferably an absolute file path).
+ // This attribute MUST NOT be used on the Profile signal since the data is
+ // already captured in 'message Function'. This constraint is imposed to prevent
+ // redundancy and maintain data integrity.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: /usr/local/MyApplication/content_root/app/index.php
+ CodeFilePathKey = attribute.Key("code.file.path")
+
+ // CodeFunctionNameKey is the attribute Key conforming to the
+ // "code.function.name" semantic conventions. It represents the method or
+ // function fully-qualified name without arguments. The value should fit the
+ // natural representation of the language runtime, which is also likely the same
+ // used within `code.stacktrace` attribute value. This attribute MUST NOT be
+ // used on the Profile signal since the data is already captured in 'message
+ // Function'. This constraint is imposed to prevent redundancy and maintain data
+ // integrity.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "com.example.MyHttpService.serveRequest",
+ // "GuzzleHttp\Client::transfer", "fopen"
+ // Note: Values and format depends on each language runtime, thus it is
+ // impossible to provide an exhaustive list of examples.
+ // The values are usually the same (or prefixes of) the ones found in native
+ // stack trace representation stored in
+ // `code.stacktrace` without information on arguments.
+ //
+ // Examples:
+ //
+ // - Java method: `com.example.MyHttpService.serveRequest`
+ // - Java anonymous class method: `com.mycompany.Main$1.myMethod`
+ // - Java lambda method:
+ // `com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod`
+ // - PHP function: `GuzzleHttp\Client::transfer`
+ // - Go function: `github.com/my/repo/pkg.foo.func5`
+ // - Elixir: `OpenTelemetry.Ctx.new`
+ // - Erlang: `opentelemetry_ctx:new`
+ // - Rust: `playground::my_module::my_cool_func`
+ // - C function: `fopen`
+ CodeFunctionNameKey = attribute.Key("code.function.name")
+
+ // CodeLineNumberKey is the attribute Key conforming to the "code.line.number"
+ // semantic conventions. It represents the line number in `code.file.path` best
+ // representing the operation. It SHOULD point within the code unit named in
+ // `code.function.name`. This attribute MUST NOT be used on the Profile signal
+ // since the data is already captured in 'message Line'. This constraint is
+ // imposed to prevent redundancy and maintain data integrity.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ CodeLineNumberKey = attribute.Key("code.line.number")
+
+ // CodeStacktraceKey is the attribute Key conforming to the "code.stacktrace"
+ // semantic conventions. It represents a stacktrace as a string in the natural
+ // representation for the language runtime. The representation is identical to
+ // [`exception.stacktrace`]. This attribute MUST NOT be used on the Profile
+ // signal since the data is already captured in 'message Location'. This
+ // constraint is imposed to prevent redundancy and maintain data integrity.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at
+ // com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at
+ // com.example.GenerateTrace.main(GenerateTrace.java:5)
+ //
+ // [`exception.stacktrace`]: /docs/exceptions/exceptions-spans.md#stacktrace-representation
+ CodeStacktraceKey = attribute.Key("code.stacktrace")
+)
+
+// CodeColumnNumber returns an attribute KeyValue conforming to the
+// "code.column.number" semantic conventions. It represents the column number in
+// `code.file.path` best representing the operation. It SHOULD point within the
+// code unit named in `code.function.name`. This attribute MUST NOT be used on
+// the Profile signal since the data is already captured in 'message Line'. This
+// constraint is imposed to prevent redundancy and maintain data integrity.
+func CodeColumnNumber(val int) attribute.KeyValue {
+ return CodeColumnNumberKey.Int(val)
+}
+
+// CodeFilePath returns an attribute KeyValue conforming to the "code.file.path"
+// semantic conventions. It represents the source code file name that identifies
+// the code unit as uniquely as possible (preferably an absolute file path). This
+// attribute MUST NOT be used on the Profile signal since the data is already
+// captured in 'message Function'. This constraint is imposed to prevent
+// redundancy and maintain data integrity.
+func CodeFilePath(val string) attribute.KeyValue {
+ return CodeFilePathKey.String(val)
+}
+
+// CodeFunctionName returns an attribute KeyValue conforming to the
+// "code.function.name" semantic conventions. It represents the method or
+// function fully-qualified name without arguments. The value should fit the
+// natural representation of the language runtime, which is also likely the same
+// used within `code.stacktrace` attribute value. This attribute MUST NOT be used
+// on the Profile signal since the data is already captured in 'message
+// Function'. This constraint is imposed to prevent redundancy and maintain data
+// integrity.
+func CodeFunctionName(val string) attribute.KeyValue {
+ return CodeFunctionNameKey.String(val)
+}
+
+// CodeLineNumber returns an attribute KeyValue conforming to the
+// "code.line.number" semantic conventions. It represents the line number in
+// `code.file.path` best representing the operation. It SHOULD point within the
+// code unit named in `code.function.name`. This attribute MUST NOT be used on
+// the Profile signal since the data is already captured in 'message Line'. This
+// constraint is imposed to prevent redundancy and maintain data integrity.
+func CodeLineNumber(val int) attribute.KeyValue {
+ return CodeLineNumberKey.Int(val)
+}
+
+// CodeStacktrace returns an attribute KeyValue conforming to the
+// "code.stacktrace" semantic conventions. It represents a stacktrace as a string
+// in the natural representation for the language runtime. The representation is
+// identical to [`exception.stacktrace`]. This attribute MUST NOT be used on the
+// Profile signal since the data is already captured in 'message Location'. This
+// constraint is imposed to prevent redundancy and maintain data integrity.
+//
+// [`exception.stacktrace`]: /docs/exceptions/exceptions-spans.md#stacktrace-representation
+func CodeStacktrace(val string) attribute.KeyValue {
+ return CodeStacktraceKey.String(val)
+}
+
+// Namespace: container
+const (
+ // ContainerCommandKey is the attribute Key conforming to the
+ // "container.command" semantic conventions. It represents the command used to
+ // run the container (i.e. the command name).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "otelcontribcol"
+ // Note: If using embedded credentials or sensitive data, it is recommended to
+ // remove them to prevent potential leakage.
+ ContainerCommandKey = attribute.Key("container.command")
+
+ // ContainerCommandArgsKey is the attribute Key conforming to the
+ // "container.command_args" semantic conventions. It represents the all the
+ // command arguments (including the command/executable itself) run by the
+ // container.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "otelcontribcol", "--config", "config.yaml"
+ ContainerCommandArgsKey = attribute.Key("container.command_args")
+
+ // ContainerCommandLineKey is the attribute Key conforming to the
+ // "container.command_line" semantic conventions. It represents the full command
+ // run by the container as a single string representing the full command.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "otelcontribcol --config config.yaml"
+ ContainerCommandLineKey = attribute.Key("container.command_line")
+
+ // ContainerCSIPluginNameKey is the attribute Key conforming to the
+ // "container.csi.plugin.name" semantic conventions. It represents the name of
+ // the CSI ([Container Storage Interface]) plugin used by the volume.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "pd.csi.storage.gke.io"
+ // Note: This can sometimes be referred to as a "driver" in CSI implementations.
+ // This should represent the `name` field of the GetPluginInfo RPC.
+ //
+ // [Container Storage Interface]: https://github.com/container-storage-interface/spec
+ ContainerCSIPluginNameKey = attribute.Key("container.csi.plugin.name")
+
+ // ContainerCSIVolumeIDKey is the attribute Key conforming to the
+ // "container.csi.volume.id" semantic conventions. It represents the unique
+ // volume ID returned by the CSI ([Container Storage Interface]) plugin.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk"
+ // Note: This can sometimes be referred to as a "volume handle" in CSI
+ // implementations. This should represent the `Volume.volume_id` field in CSI
+ // spec.
+ //
+ // [Container Storage Interface]: https://github.com/container-storage-interface/spec
+ ContainerCSIVolumeIDKey = attribute.Key("container.csi.volume.id")
+
+ // ContainerIDKey is the attribute Key conforming to the "container.id" semantic
+ // conventions. It represents the container ID. Usually a UUID, as for example
+ // used to [identify Docker containers]. The UUID might be abbreviated.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "a3bf90e006b2"
+ //
+ // [identify Docker containers]: https://docs.docker.com/engine/containers/run/#container-identification
+ ContainerIDKey = attribute.Key("container.id")
+
+ // ContainerImageIDKey is the attribute Key conforming to the
+ // "container.image.id" semantic conventions. It represents the runtime specific
+ // image identifier. Usually a hash algorithm followed by a UUID.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f"
+ // Note: Docker defines a sha256 of the image id; `container.image.id`
+ // corresponds to the `Image` field from the Docker container inspect [API]
+ // endpoint.
+ // K8s defines a link to the container registry repository with digest
+ // `"imageID": "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`
+ // .
+ // The ID is assigned by the container runtime and can vary in different
+ // environments. Consider using `oci.manifest.digest` if it is important to
+ // identify the same image in different environments/runtimes.
+ //
+ // [API]: https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect
+ ContainerImageIDKey = attribute.Key("container.image.id")
+
+ // ContainerImageNameKey is the attribute Key conforming to the
+ // "container.image.name" semantic conventions. It represents the name of the
+ // image the container was built on.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "gcr.io/opentelemetry/operator"
+ ContainerImageNameKey = attribute.Key("container.image.name")
+
+ // ContainerImageRepoDigestsKey is the attribute Key conforming to the
+ // "container.image.repo_digests" semantic conventions. It represents the repo
+ // digests of the container image as provided by the container runtime.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb",
+ // "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578"
+ // Note: [Docker] and [CRI] report those under the `RepoDigests` field.
+ //
+ // [Docker]: https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect
+ // [CRI]: https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238
+ ContainerImageRepoDigestsKey = attribute.Key("container.image.repo_digests")
+
+ // ContainerImageTagsKey is the attribute Key conforming to the
+ // "container.image.tags" semantic conventions. It represents the container
+ // image tags. An example can be found in [Docker Image Inspect]. Should be only
+ // the `` section of the full name for example from
+ // `registry.example.com/my-org/my-image:`.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "v1.27.1", "3.5.7-0"
+ //
+ // [Docker Image Inspect]: https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect
+ ContainerImageTagsKey = attribute.Key("container.image.tags")
+
+ // ContainerNameKey is the attribute Key conforming to the "container.name"
+ // semantic conventions. It represents the container name used by container
+ // runtime.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "opentelemetry-autoconf"
+ ContainerNameKey = attribute.Key("container.name")
+
+ // ContainerRuntimeKey is the attribute Key conforming to the
+ // "container.runtime" semantic conventions. It represents the container runtime
+ // managing this container.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "docker", "containerd", "rkt"
+ ContainerRuntimeKey = attribute.Key("container.runtime")
+)
+
+// ContainerCommand returns an attribute KeyValue conforming to the
+// "container.command" semantic conventions. It represents the command used to
+// run the container (i.e. the command name).
+func ContainerCommand(val string) attribute.KeyValue {
+ return ContainerCommandKey.String(val)
+}
+
+// ContainerCommandArgs returns an attribute KeyValue conforming to the
+// "container.command_args" semantic conventions. It represents the all the
+// command arguments (including the command/executable itself) run by the
+// container.
+func ContainerCommandArgs(val ...string) attribute.KeyValue {
+ return ContainerCommandArgsKey.StringSlice(val)
+}
+
+// ContainerCommandLine returns an attribute KeyValue conforming to the
+// "container.command_line" semantic conventions. It represents the full command
+// run by the container as a single string representing the full command.
+func ContainerCommandLine(val string) attribute.KeyValue {
+ return ContainerCommandLineKey.String(val)
+}
+
+// ContainerCSIPluginName returns an attribute KeyValue conforming to the
+// "container.csi.plugin.name" semantic conventions. It represents the name of
+// the CSI ([Container Storage Interface]) plugin used by the volume.
+//
+// [Container Storage Interface]: https://github.com/container-storage-interface/spec
+func ContainerCSIPluginName(val string) attribute.KeyValue {
+ return ContainerCSIPluginNameKey.String(val)
+}
+
+// ContainerCSIVolumeID returns an attribute KeyValue conforming to the
+// "container.csi.volume.id" semantic conventions. It represents the unique
+// volume ID returned by the CSI ([Container Storage Interface]) plugin.
+//
+// [Container Storage Interface]: https://github.com/container-storage-interface/spec
+func ContainerCSIVolumeID(val string) attribute.KeyValue {
+ return ContainerCSIVolumeIDKey.String(val)
+}
+
+// ContainerID returns an attribute KeyValue conforming to the "container.id"
+// semantic conventions. It represents the container ID. Usually a UUID, as for
+// example used to [identify Docker containers]. The UUID might be abbreviated.
+//
+// [identify Docker containers]: https://docs.docker.com/engine/containers/run/#container-identification
+func ContainerID(val string) attribute.KeyValue {
+ return ContainerIDKey.String(val)
+}
+
+// ContainerImageID returns an attribute KeyValue conforming to the
+// "container.image.id" semantic conventions. It represents the runtime specific
+// image identifier. Usually a hash algorithm followed by a UUID.
+func ContainerImageID(val string) attribute.KeyValue {
+ return ContainerImageIDKey.String(val)
+}
+
+// ContainerImageName returns an attribute KeyValue conforming to the
+// "container.image.name" semantic conventions. It represents the name of the
+// image the container was built on.
+func ContainerImageName(val string) attribute.KeyValue {
+ return ContainerImageNameKey.String(val)
+}
+
+// ContainerImageRepoDigests returns an attribute KeyValue conforming to the
+// "container.image.repo_digests" semantic conventions. It represents the repo
+// digests of the container image as provided by the container runtime.
+func ContainerImageRepoDigests(val ...string) attribute.KeyValue {
+ return ContainerImageRepoDigestsKey.StringSlice(val)
+}
+
+// ContainerImageTags returns an attribute KeyValue conforming to the
+// "container.image.tags" semantic conventions. It represents the container image
+// tags. An example can be found in [Docker Image Inspect]. Should be only the
+// `` section of the full name for example from
+// `registry.example.com/my-org/my-image:`.
+//
+// [Docker Image Inspect]: https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect
+func ContainerImageTags(val ...string) attribute.KeyValue {
+ return ContainerImageTagsKey.StringSlice(val)
+}
+
+// ContainerName returns an attribute KeyValue conforming to the "container.name"
+// semantic conventions. It represents the container name used by container
+// runtime.
+func ContainerName(val string) attribute.KeyValue {
+ return ContainerNameKey.String(val)
+}
+
+// ContainerRuntime returns an attribute KeyValue conforming to the
+// "container.runtime" semantic conventions. It represents the container runtime
+// managing this container.
+func ContainerRuntime(val string) attribute.KeyValue {
+ return ContainerRuntimeKey.String(val)
+}
+
+// Namespace: cpu
+const (
+ // CPULogicalNumberKey is the attribute Key conforming to the
+ // "cpu.logical_number" semantic conventions. It represents the logical CPU
+ // number [0..n-1].
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 1
+ CPULogicalNumberKey = attribute.Key("cpu.logical_number")
+
+ // CPUModeKey is the attribute Key conforming to the "cpu.mode" semantic
+ // conventions. It represents the mode of the CPU.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "user", "system"
+ CPUModeKey = attribute.Key("cpu.mode")
+)
+
+// CPULogicalNumber returns an attribute KeyValue conforming to the
+// "cpu.logical_number" semantic conventions. It represents the logical CPU
+// number [0..n-1].
+func CPULogicalNumber(val int) attribute.KeyValue {
+ return CPULogicalNumberKey.Int(val)
+}
+
+// Enum values for cpu.mode
+var (
+ // user
+ // Stability: development
+ CPUModeUser = CPUModeKey.String("user")
+ // system
+ // Stability: development
+ CPUModeSystem = CPUModeKey.String("system")
+ // nice
+ // Stability: development
+ CPUModeNice = CPUModeKey.String("nice")
+ // idle
+ // Stability: development
+ CPUModeIdle = CPUModeKey.String("idle")
+ // iowait
+ // Stability: development
+ CPUModeIOWait = CPUModeKey.String("iowait")
+ // interrupt
+ // Stability: development
+ CPUModeInterrupt = CPUModeKey.String("interrupt")
+ // steal
+ // Stability: development
+ CPUModeSteal = CPUModeKey.String("steal")
+ // kernel
+ // Stability: development
+ CPUModeKernel = CPUModeKey.String("kernel")
+)
+
+// Namespace: db
+const (
+ // DBClientConnectionPoolNameKey is the attribute Key conforming to the
+ // "db.client.connection.pool.name" semantic conventions. It represents the name
+ // of the connection pool; unique within the instrumented application. In case
+ // the connection pool implementation doesn't provide a name, instrumentation
+ // SHOULD use a combination of parameters that would make the name unique, for
+ // example, combining attributes `server.address`, `server.port`, and
+ // `db.namespace`, formatted as `server.address:server.port/db.namespace`.
+ // Instrumentations that generate connection pool name following different
+ // patterns SHOULD document it.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "myDataSource"
+ DBClientConnectionPoolNameKey = attribute.Key("db.client.connection.pool.name")
+
+ // DBClientConnectionStateKey is the attribute Key conforming to the
+ // "db.client.connection.state" semantic conventions. It represents the state of
+ // a connection in the pool.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "idle"
+ DBClientConnectionStateKey = attribute.Key("db.client.connection.state")
+
+ // DBCollectionNameKey is the attribute Key conforming to the
+ // "db.collection.name" semantic conventions. It represents the name of a
+ // collection (table, container) within the database.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "public.users", "customers"
+ // Note: It is RECOMMENDED to capture the value as provided by the application
+ // without attempting to do any case normalization.
+ //
+ // The collection name SHOULD NOT be extracted from `db.query.text`,
+ // when the database system supports query text with multiple collections
+ // in non-batch operations.
+ //
+ // For batch operations, if the individual operations are known to have the same
+ // collection name then that collection name SHOULD be used.
+ DBCollectionNameKey = attribute.Key("db.collection.name")
+
+ // DBNamespaceKey is the attribute Key conforming to the "db.namespace" semantic
+ // conventions. It represents the name of the database, fully qualified within
+ // the server address and port.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "customers", "test.users"
+ // Note: If a database system has multiple namespace components, they SHOULD be
+ // concatenated from the most general to the most specific namespace component,
+ // using `|` as a separator between the components. Any missing components (and
+ // their associated separators) SHOULD be omitted.
+ // Semantic conventions for individual database systems SHOULD document what
+ // `db.namespace` means in the context of that system.
+ // It is RECOMMENDED to capture the value as provided by the application without
+ // attempting to do any case normalization.
+ DBNamespaceKey = attribute.Key("db.namespace")
+
+ // DBOperationBatchSizeKey is the attribute Key conforming to the
+ // "db.operation.batch.size" semantic conventions. It represents the number of
+ // queries included in a batch operation.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: 2, 3, 4
+ // Note: Operations are only considered batches when they contain two or more
+ // operations, and so `db.operation.batch.size` SHOULD never be `1`.
+ DBOperationBatchSizeKey = attribute.Key("db.operation.batch.size")
+
+ // DBOperationNameKey is the attribute Key conforming to the "db.operation.name"
+ // semantic conventions. It represents the name of the operation or command
+ // being executed.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "findAndModify", "HMSET", "SELECT"
+ // Note: It is RECOMMENDED to capture the value as provided by the application
+ // without attempting to do any case normalization.
+ //
+ // The operation name SHOULD NOT be extracted from `db.query.text`,
+ // when the database system supports query text with multiple operations
+ // in non-batch operations.
+ //
+ // If spaces can occur in the operation name, multiple consecutive spaces
+ // SHOULD be normalized to a single space.
+ //
+ // For batch operations, if the individual operations are known to have the same
+ // operation name
+ // then that operation name SHOULD be used prepended by `BATCH `,
+ // otherwise `db.operation.name` SHOULD be `BATCH` or some other database
+ // system specific term if more applicable.
+ DBOperationNameKey = attribute.Key("db.operation.name")
+
+ // DBQuerySummaryKey is the attribute Key conforming to the "db.query.summary"
+ // semantic conventions. It represents the low cardinality summary of a database
+ // query.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "SELECT wuser_table", "INSERT shipping_details SELECT orders", "get
+ // user by id"
+ // Note: The query summary describes a class of database queries and is useful
+ // as a grouping key, especially when analyzing telemetry for database
+ // calls involving complex queries.
+ //
+ // Summary may be available to the instrumentation through
+ // instrumentation hooks or other means. If it is not available,
+ // instrumentations
+ // that support query parsing SHOULD generate a summary following
+ // [Generating query summary]
+ // section.
+ //
+ // [Generating query summary]: /docs/database/database-spans.md#generating-a-summary-of-the-query
+ DBQuerySummaryKey = attribute.Key("db.query.summary")
+
+ // DBQueryTextKey is the attribute Key conforming to the "db.query.text"
+ // semantic conventions. It represents the database query being executed.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "SELECT * FROM wuser_table where username = ?", "SET mykey ?"
+ // Note: For sanitization see [Sanitization of `db.query.text`].
+ // For batch operations, if the individual operations are known to have the same
+ // query text then that query text SHOULD be used, otherwise all of the
+ // individual query texts SHOULD be concatenated with separator `; ` or some
+ // other database system specific separator if more applicable.
+ // Parameterized query text SHOULD NOT be sanitized. Even though parameterized
+ // query text can potentially have sensitive data, by using a parameterized
+ // query the user is giving a strong signal that any sensitive data will be
+ // passed as parameter values, and the benefit to observability of capturing the
+ // static part of the query text by default outweighs the risk.
+ //
+ // [Sanitization of `db.query.text`]: /docs/database/database-spans.md#sanitization-of-dbquerytext
+ DBQueryTextKey = attribute.Key("db.query.text")
+
+ // DBResponseReturnedRowsKey is the attribute Key conforming to the
+ // "db.response.returned_rows" semantic conventions. It represents the number of
+ // rows returned by the operation.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 10, 30, 1000
+ DBResponseReturnedRowsKey = attribute.Key("db.response.returned_rows")
+
+ // DBResponseStatusCodeKey is the attribute Key conforming to the
+ // "db.response.status_code" semantic conventions. It represents the database
+ // response status code.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "102", "ORA-17002", "08P01", "404"
+ // Note: The status code returned by the database. Usually it represents an
+ // error code, but may also represent partial success, warning, or differentiate
+ // between various types of successful outcomes.
+ // Semantic conventions for individual database systems SHOULD document what
+ // `db.response.status_code` means in the context of that system.
+ DBResponseStatusCodeKey = attribute.Key("db.response.status_code")
+
+ // DBStoredProcedureNameKey is the attribute Key conforming to the
+ // "db.stored_procedure.name" semantic conventions. It represents the name of a
+ // stored procedure within the database.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "GetCustomer"
+ // Note: It is RECOMMENDED to capture the value as provided by the application
+ // without attempting to do any case normalization.
+ //
+ // For batch operations, if the individual operations are known to have the same
+ // stored procedure name then that stored procedure name SHOULD be used.
+ DBStoredProcedureNameKey = attribute.Key("db.stored_procedure.name")
+
+ // DBSystemNameKey is the attribute Key conforming to the "db.system.name"
+ // semantic conventions. It represents the database management system (DBMS)
+ // product as identified by the client instrumentation.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples:
+ // Note: The actual DBMS may differ from the one identified by the client. For
+ // example, when using PostgreSQL client libraries to connect to a CockroachDB,
+ // the `db.system.name` is set to `postgresql` based on the instrumentation's
+ // best knowledge.
+ DBSystemNameKey = attribute.Key("db.system.name")
+)
+
+// DBClientConnectionPoolName returns an attribute KeyValue conforming to the
+// "db.client.connection.pool.name" semantic conventions. It represents the name
+// of the connection pool; unique within the instrumented application. In case
+// the connection pool implementation doesn't provide a name, instrumentation
+// SHOULD use a combination of parameters that would make the name unique, for
+// example, combining attributes `server.address`, `server.port`, and
+// `db.namespace`, formatted as `server.address:server.port/db.namespace`.
+// Instrumentations that generate connection pool name following different
+// patterns SHOULD document it.
+func DBClientConnectionPoolName(val string) attribute.KeyValue {
+ return DBClientConnectionPoolNameKey.String(val)
+}
+
+// DBCollectionName returns an attribute KeyValue conforming to the
+// "db.collection.name" semantic conventions. It represents the name of a
+// collection (table, container) within the database.
+func DBCollectionName(val string) attribute.KeyValue {
+ return DBCollectionNameKey.String(val)
+}
+
+// DBNamespace returns an attribute KeyValue conforming to the "db.namespace"
+// semantic conventions. It represents the name of the database, fully qualified
+// within the server address and port.
+func DBNamespace(val string) attribute.KeyValue {
+ return DBNamespaceKey.String(val)
+}
+
+// DBOperationBatchSize returns an attribute KeyValue conforming to the
+// "db.operation.batch.size" semantic conventions. It represents the number of
+// queries included in a batch operation.
+func DBOperationBatchSize(val int) attribute.KeyValue {
+ return DBOperationBatchSizeKey.Int(val)
+}
+
+// DBOperationName returns an attribute KeyValue conforming to the
+// "db.operation.name" semantic conventions. It represents the name of the
+// operation or command being executed.
+func DBOperationName(val string) attribute.KeyValue {
+ return DBOperationNameKey.String(val)
+}
+
+// DBQuerySummary returns an attribute KeyValue conforming to the
+// "db.query.summary" semantic conventions. It represents the low cardinality
+// summary of a database query.
+func DBQuerySummary(val string) attribute.KeyValue {
+ return DBQuerySummaryKey.String(val)
+}
+
+// DBQueryText returns an attribute KeyValue conforming to the "db.query.text"
+// semantic conventions. It represents the database query being executed.
+func DBQueryText(val string) attribute.KeyValue {
+ return DBQueryTextKey.String(val)
+}
+
+// DBResponseReturnedRows returns an attribute KeyValue conforming to the
+// "db.response.returned_rows" semantic conventions. It represents the number of
+// rows returned by the operation.
+func DBResponseReturnedRows(val int) attribute.KeyValue {
+ return DBResponseReturnedRowsKey.Int(val)
+}
+
+// DBResponseStatusCode returns an attribute KeyValue conforming to the
+// "db.response.status_code" semantic conventions. It represents the database
+// response status code.
+func DBResponseStatusCode(val string) attribute.KeyValue {
+ return DBResponseStatusCodeKey.String(val)
+}
+
+// DBStoredProcedureName returns an attribute KeyValue conforming to the
+// "db.stored_procedure.name" semantic conventions. It represents the name of a
+// stored procedure within the database.
+func DBStoredProcedureName(val string) attribute.KeyValue {
+ return DBStoredProcedureNameKey.String(val)
+}
+
+// Enum values for db.client.connection.state
+var (
+ // idle
+ // Stability: development
+ DBClientConnectionStateIdle = DBClientConnectionStateKey.String("idle")
+ // used
+ // Stability: development
+ DBClientConnectionStateUsed = DBClientConnectionStateKey.String("used")
+)
+
+// Enum values for db.system.name
+var (
+ // Some other SQL database. Fallback only.
+ // Stability: development
+ DBSystemNameOtherSQL = DBSystemNameKey.String("other_sql")
+ // [Adabas (Adaptable Database System)]
+ // Stability: development
+ //
+ // [Adabas (Adaptable Database System)]: https://documentation.softwareag.com/?pf=adabas
+ DBSystemNameSoftwareagAdabas = DBSystemNameKey.String("softwareag.adabas")
+ // [Actian Ingres]
+ // Stability: development
+ //
+ // [Actian Ingres]: https://www.actian.com/databases/ingres/
+ DBSystemNameActianIngres = DBSystemNameKey.String("actian.ingres")
+ // [Amazon DynamoDB]
+ // Stability: development
+ //
+ // [Amazon DynamoDB]: https://aws.amazon.com/pm/dynamodb/
+ DBSystemNameAWSDynamoDB = DBSystemNameKey.String("aws.dynamodb")
+ // [Amazon Redshift]
+ // Stability: development
+ //
+ // [Amazon Redshift]: https://aws.amazon.com/redshift/
+ DBSystemNameAWSRedshift = DBSystemNameKey.String("aws.redshift")
+ // [Azure Cosmos DB]
+ // Stability: development
+ //
+ // [Azure Cosmos DB]: https://learn.microsoft.com/azure/cosmos-db
+ DBSystemNameAzureCosmosDB = DBSystemNameKey.String("azure.cosmosdb")
+ // [InterSystems Caché]
+ // Stability: development
+ //
+ // [InterSystems Caché]: https://www.intersystems.com/products/cache/
+ DBSystemNameIntersystemsCache = DBSystemNameKey.String("intersystems.cache")
+ // [Apache Cassandra]
+ // Stability: development
+ //
+ // [Apache Cassandra]: https://cassandra.apache.org/
+ DBSystemNameCassandra = DBSystemNameKey.String("cassandra")
+ // [ClickHouse]
+ // Stability: development
+ //
+ // [ClickHouse]: https://clickhouse.com/
+ DBSystemNameClickHouse = DBSystemNameKey.String("clickhouse")
+ // [CockroachDB]
+ // Stability: development
+ //
+ // [CockroachDB]: https://www.cockroachlabs.com/
+ DBSystemNameCockroachDB = DBSystemNameKey.String("cockroachdb")
+ // [Couchbase]
+ // Stability: development
+ //
+ // [Couchbase]: https://www.couchbase.com/
+ DBSystemNameCouchbase = DBSystemNameKey.String("couchbase")
+ // [Apache CouchDB]
+ // Stability: development
+ //
+ // [Apache CouchDB]: https://couchdb.apache.org/
+ DBSystemNameCouchDB = DBSystemNameKey.String("couchdb")
+ // [Apache Derby]
+ // Stability: development
+ //
+ // [Apache Derby]: https://db.apache.org/derby/
+ DBSystemNameDerby = DBSystemNameKey.String("derby")
+ // [Elasticsearch]
+ // Stability: development
+ //
+ // [Elasticsearch]: https://www.elastic.co/elasticsearch
+ DBSystemNameElasticsearch = DBSystemNameKey.String("elasticsearch")
+ // [Firebird]
+ // Stability: development
+ //
+ // [Firebird]: https://www.firebirdsql.org/
+ DBSystemNameFirebirdSQL = DBSystemNameKey.String("firebirdsql")
+ // [Google Cloud Spanner]
+ // Stability: development
+ //
+ // [Google Cloud Spanner]: https://cloud.google.com/spanner
+ DBSystemNameGCPSpanner = DBSystemNameKey.String("gcp.spanner")
+ // [Apache Geode]
+ // Stability: development
+ //
+ // [Apache Geode]: https://geode.apache.org/
+ DBSystemNameGeode = DBSystemNameKey.String("geode")
+ // [H2 Database]
+ // Stability: development
+ //
+ // [H2 Database]: https://h2database.com/
+ DBSystemNameH2database = DBSystemNameKey.String("h2database")
+ // [Apache HBase]
+ // Stability: development
+ //
+ // [Apache HBase]: https://hbase.apache.org/
+ DBSystemNameHBase = DBSystemNameKey.String("hbase")
+ // [Apache Hive]
+ // Stability: development
+ //
+ // [Apache Hive]: https://hive.apache.org/
+ DBSystemNameHive = DBSystemNameKey.String("hive")
+ // [HyperSQL Database]
+ // Stability: development
+ //
+ // [HyperSQL Database]: https://hsqldb.org/
+ DBSystemNameHSQLDB = DBSystemNameKey.String("hsqldb")
+ // [IBM Db2]
+ // Stability: development
+ //
+ // [IBM Db2]: https://www.ibm.com/db2
+ DBSystemNameIBMDB2 = DBSystemNameKey.String("ibm.db2")
+ // [IBM Informix]
+ // Stability: development
+ //
+ // [IBM Informix]: https://www.ibm.com/products/informix
+ DBSystemNameIBMInformix = DBSystemNameKey.String("ibm.informix")
+ // [IBM Netezza]
+ // Stability: development
+ //
+ // [IBM Netezza]: https://www.ibm.com/products/netezza
+ DBSystemNameIBMNetezza = DBSystemNameKey.String("ibm.netezza")
+ // [InfluxDB]
+ // Stability: development
+ //
+ // [InfluxDB]: https://www.influxdata.com/
+ DBSystemNameInfluxDB = DBSystemNameKey.String("influxdb")
+ // [Instant]
+ // Stability: development
+ //
+ // [Instant]: https://www.instantdb.com/
+ DBSystemNameInstantDB = DBSystemNameKey.String("instantdb")
+ // [MariaDB]
+ // Stability: stable
+ //
+ // [MariaDB]: https://mariadb.org/
+ DBSystemNameMariaDB = DBSystemNameKey.String("mariadb")
+ // [Memcached]
+ // Stability: development
+ //
+ // [Memcached]: https://memcached.org/
+ DBSystemNameMemcached = DBSystemNameKey.String("memcached")
+ // [MongoDB]
+ // Stability: development
+ //
+ // [MongoDB]: https://www.mongodb.com/
+ DBSystemNameMongoDB = DBSystemNameKey.String("mongodb")
+ // [Microsoft SQL Server]
+ // Stability: stable
+ //
+ // [Microsoft SQL Server]: https://www.microsoft.com/sql-server
+ DBSystemNameMicrosoftSQLServer = DBSystemNameKey.String("microsoft.sql_server")
+ // [MySQL]
+ // Stability: stable
+ //
+ // [MySQL]: https://www.mysql.com/
+ DBSystemNameMySQL = DBSystemNameKey.String("mysql")
+ // [Neo4j]
+ // Stability: development
+ //
+ // [Neo4j]: https://neo4j.com/
+ DBSystemNameNeo4j = DBSystemNameKey.String("neo4j")
+ // [OpenSearch]
+ // Stability: development
+ //
+ // [OpenSearch]: https://opensearch.org/
+ DBSystemNameOpenSearch = DBSystemNameKey.String("opensearch")
+ // [Oracle Database]
+ // Stability: development
+ //
+ // [Oracle Database]: https://www.oracle.com/database/
+ DBSystemNameOracleDB = DBSystemNameKey.String("oracle.db")
+ // [PostgreSQL]
+ // Stability: stable
+ //
+ // [PostgreSQL]: https://www.postgresql.org/
+ DBSystemNamePostgreSQL = DBSystemNameKey.String("postgresql")
+ // [Redis]
+ // Stability: development
+ //
+ // [Redis]: https://redis.io/
+ DBSystemNameRedis = DBSystemNameKey.String("redis")
+ // [SAP HANA]
+ // Stability: development
+ //
+ // [SAP HANA]: https://www.sap.com/products/technology-platform/hana/what-is-sap-hana.html
+ DBSystemNameSAPHANA = DBSystemNameKey.String("sap.hana")
+ // [SAP MaxDB]
+ // Stability: development
+ //
+ // [SAP MaxDB]: https://maxdb.sap.com/
+ DBSystemNameSAPMaxDB = DBSystemNameKey.String("sap.maxdb")
+ // [SQLite]
+ // Stability: development
+ //
+ // [SQLite]: https://www.sqlite.org/
+ DBSystemNameSQLite = DBSystemNameKey.String("sqlite")
+ // [Teradata]
+ // Stability: development
+ //
+ // [Teradata]: https://www.teradata.com/
+ DBSystemNameTeradata = DBSystemNameKey.String("teradata")
+ // [Trino]
+ // Stability: development
+ //
+ // [Trino]: https://trino.io/
+ DBSystemNameTrino = DBSystemNameKey.String("trino")
+)
+
+// Namespace: deployment
+const (
+ // DeploymentEnvironmentNameKey is the attribute Key conforming to the
+ // "deployment.environment.name" semantic conventions. It represents the name of
+ // the [deployment environment] (aka deployment tier).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "staging", "production"
+ // Note: `deployment.environment.name` does not affect the uniqueness
+ // constraints defined through
+ // the `service.namespace`, `service.name` and `service.instance.id` resource
+ // attributes.
+ // This implies that resources carrying the following attribute combinations
+ // MUST be
+ // considered to be identifying the same service:
+ //
+ // - `service.name=frontend`, `deployment.environment.name=production`
+ // - `service.name=frontend`, `deployment.environment.name=staging`.
+ //
+ //
+ // [deployment environment]: https://wikipedia.org/wiki/Deployment_environment
+ DeploymentEnvironmentNameKey = attribute.Key("deployment.environment.name")
+
+ // DeploymentIDKey is the attribute Key conforming to the "deployment.id"
+ // semantic conventions. It represents the id of the deployment.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1208"
+ DeploymentIDKey = attribute.Key("deployment.id")
+
+ // DeploymentNameKey is the attribute Key conforming to the "deployment.name"
+ // semantic conventions. It represents the name of the deployment.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "deploy my app", "deploy-frontend"
+ DeploymentNameKey = attribute.Key("deployment.name")
+
+ // DeploymentStatusKey is the attribute Key conforming to the
+ // "deployment.status" semantic conventions. It represents the status of the
+ // deployment.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ DeploymentStatusKey = attribute.Key("deployment.status")
+)
+
+// DeploymentEnvironmentName returns an attribute KeyValue conforming to the
+// "deployment.environment.name" semantic conventions. It represents the name of
+// the [deployment environment] (aka deployment tier).
+//
+// [deployment environment]: https://wikipedia.org/wiki/Deployment_environment
+func DeploymentEnvironmentName(val string) attribute.KeyValue {
+ return DeploymentEnvironmentNameKey.String(val)
+}
+
+// DeploymentID returns an attribute KeyValue conforming to the "deployment.id"
+// semantic conventions. It represents the id of the deployment.
+func DeploymentID(val string) attribute.KeyValue {
+ return DeploymentIDKey.String(val)
+}
+
+// DeploymentName returns an attribute KeyValue conforming to the
+// "deployment.name" semantic conventions. It represents the name of the
+// deployment.
+func DeploymentName(val string) attribute.KeyValue {
+ return DeploymentNameKey.String(val)
+}
+
+// Enum values for deployment.status
+var (
+ // failed
+ // Stability: development
+ DeploymentStatusFailed = DeploymentStatusKey.String("failed")
+ // succeeded
+ // Stability: development
+ DeploymentStatusSucceeded = DeploymentStatusKey.String("succeeded")
+)
+
+// Namespace: destination
+const (
+ // DestinationAddressKey is the attribute Key conforming to the
+ // "destination.address" semantic conventions. It represents the destination
+ // address - domain name if available without reverse DNS lookup; otherwise, IP
+ // address or Unix domain socket name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "destination.example.com", "10.1.2.80", "/tmp/my.sock"
+ // Note: When observed from the source side, and when communicating through an
+ // intermediary, `destination.address` SHOULD represent the destination address
+ // behind any intermediaries, for example proxies, if it's available.
+ DestinationAddressKey = attribute.Key("destination.address")
+
+ // DestinationPortKey is the attribute Key conforming to the "destination.port"
+ // semantic conventions. It represents the destination port number.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 3389, 2888
+ DestinationPortKey = attribute.Key("destination.port")
+)
+
+// DestinationAddress returns an attribute KeyValue conforming to the
+// "destination.address" semantic conventions. It represents the destination
+// address - domain name if available without reverse DNS lookup; otherwise, IP
+// address or Unix domain socket name.
+func DestinationAddress(val string) attribute.KeyValue {
+ return DestinationAddressKey.String(val)
+}
+
+// DestinationPort returns an attribute KeyValue conforming to the
+// "destination.port" semantic conventions. It represents the destination port
+// number.
+func DestinationPort(val int) attribute.KeyValue {
+ return DestinationPortKey.Int(val)
+}
+
+// Namespace: device
+const (
+ // DeviceIDKey is the attribute Key conforming to the "device.id" semantic
+ // conventions. It represents a unique identifier representing the device.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "123456789012345", "01:23:45:67:89:AB"
+ // Note: Its value SHOULD be identical for all apps on a device and it SHOULD
+ // NOT change if an app is uninstalled and re-installed.
+ // However, it might be resettable by the user for all apps on a device.
+ // Hardware IDs (e.g. vendor-specific serial number, IMEI or MAC address) MAY be
+ // used as values.
+ //
+ // More information about Android identifier best practices can be found [here]
+ // .
+ //
+ // > [!WARNING]> This attribute may contain sensitive (PII) information. Caution
+ // > should be taken when storing personal data or anything which can identify a
+ // > user. GDPR and data protection laws may apply,
+ // > ensure you do your own due diligence.> Due to these reasons, this
+ // > identifier is not recommended for consumer applications and will likely
+ // > result in rejection from both Google Play and App Store.
+ // > However, it may be appropriate for specific enterprise scenarios, such as
+ // > kiosk devices or enterprise-managed devices, with appropriate compliance
+ // > clearance.
+ // > Any instrumentation providing this identifier MUST implement it as an
+ // > opt-in feature.> See [`app.installation.id`]> for a more
+ // > privacy-preserving alternative.
+ //
+ // [here]: https://developer.android.com/training/articles/user-data-ids
+ // [`app.installation.id`]: /docs/registry/attributes/app.md#app-installation-id
+ DeviceIDKey = attribute.Key("device.id")
+
+ // DeviceManufacturerKey is the attribute Key conforming to the
+ // "device.manufacturer" semantic conventions. It represents the name of the
+ // device manufacturer.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Apple", "Samsung"
+ // Note: The Android OS provides this field via [Build]. iOS apps SHOULD
+ // hardcode the value `Apple`.
+ //
+ // [Build]: https://developer.android.com/reference/android/os/Build#MANUFACTURER
+ DeviceManufacturerKey = attribute.Key("device.manufacturer")
+
+ // DeviceModelIdentifierKey is the attribute Key conforming to the
+ // "device.model.identifier" semantic conventions. It represents the model
+ // identifier for the device.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "iPhone3,4", "SM-G920F"
+ // Note: It's recommended this value represents a machine-readable version of
+ // the model identifier rather than the market or consumer-friendly name of the
+ // device.
+ DeviceModelIdentifierKey = attribute.Key("device.model.identifier")
+
+ // DeviceModelNameKey is the attribute Key conforming to the "device.model.name"
+ // semantic conventions. It represents the marketing name for the device model.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "iPhone 6s Plus", "Samsung Galaxy S6"
+ // Note: It's recommended this value represents a human-readable version of the
+ // device model rather than a machine-readable alternative.
+ DeviceModelNameKey = attribute.Key("device.model.name")
+)
+
+// DeviceID returns an attribute KeyValue conforming to the "device.id" semantic
+// conventions. It represents a unique identifier representing the device.
+func DeviceID(val string) attribute.KeyValue {
+ return DeviceIDKey.String(val)
+}
+
+// DeviceManufacturer returns an attribute KeyValue conforming to the
+// "device.manufacturer" semantic conventions. It represents the name of the
+// device manufacturer.
+func DeviceManufacturer(val string) attribute.KeyValue {
+ return DeviceManufacturerKey.String(val)
+}
+
+// DeviceModelIdentifier returns an attribute KeyValue conforming to the
+// "device.model.identifier" semantic conventions. It represents the model
+// identifier for the device.
+func DeviceModelIdentifier(val string) attribute.KeyValue {
+ return DeviceModelIdentifierKey.String(val)
+}
+
+// DeviceModelName returns an attribute KeyValue conforming to the
+// "device.model.name" semantic conventions. It represents the marketing name for
+// the device model.
+func DeviceModelName(val string) attribute.KeyValue {
+ return DeviceModelNameKey.String(val)
+}
+
+// Namespace: disk
+const (
+ // DiskIODirectionKey is the attribute Key conforming to the "disk.io.direction"
+ // semantic conventions. It represents the disk IO operation direction.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "read"
+ DiskIODirectionKey = attribute.Key("disk.io.direction")
+)
+
+// Enum values for disk.io.direction
+var (
+ // read
+ // Stability: development
+ DiskIODirectionRead = DiskIODirectionKey.String("read")
+ // write
+ // Stability: development
+ DiskIODirectionWrite = DiskIODirectionKey.String("write")
+)
+
+// Namespace: dns
+const (
+ // DNSQuestionNameKey is the attribute Key conforming to the "dns.question.name"
+ // semantic conventions. It represents the name being queried.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "www.example.com", "opentelemetry.io"
+ // Note: If the name field contains non-printable characters (below 32 or above
+ // 126), those characters should be represented as escaped base 10 integers
+ // (\DDD). Back slashes and quotes should be escaped. Tabs, carriage returns,
+ // and line feeds should be converted to \t, \r, and \n respectively.
+ DNSQuestionNameKey = attribute.Key("dns.question.name")
+)
+
+// DNSQuestionName returns an attribute KeyValue conforming to the
+// "dns.question.name" semantic conventions. It represents the name being
+// queried.
+func DNSQuestionName(val string) attribute.KeyValue {
+ return DNSQuestionNameKey.String(val)
+}
+
+// Namespace: elasticsearch
+const (
+ // ElasticsearchNodeNameKey is the attribute Key conforming to the
+ // "elasticsearch.node.name" semantic conventions. It represents the represents
+ // the human-readable identifier of the node/instance to which a request was
+ // routed.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "instance-0000000001"
+ ElasticsearchNodeNameKey = attribute.Key("elasticsearch.node.name")
+)
+
+// ElasticsearchNodeName returns an attribute KeyValue conforming to the
+// "elasticsearch.node.name" semantic conventions. It represents the represents
+// the human-readable identifier of the node/instance to which a request was
+// routed.
+func ElasticsearchNodeName(val string) attribute.KeyValue {
+ return ElasticsearchNodeNameKey.String(val)
+}
+
+// Namespace: enduser
+const (
+ // EnduserIDKey is the attribute Key conforming to the "enduser.id" semantic
+ // conventions. It represents the unique identifier of an end user in the
+ // system. It maybe a username, email address, or other identifier.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "username"
+ // Note: Unique identifier of an end user in the system.
+ //
+ // > [!Warning]
+ // > This field contains sensitive (PII) information.
+ EnduserIDKey = attribute.Key("enduser.id")
+
+ // EnduserPseudoIDKey is the attribute Key conforming to the "enduser.pseudo.id"
+ // semantic conventions. It represents the pseudonymous identifier of an end
+ // user. This identifier should be a random value that is not directly linked or
+ // associated with the end user's actual identity.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "QdH5CAWJgqVT4rOr0qtumf"
+ // Note: Pseudonymous identifier of an end user.
+ //
+ // > [!Warning]
+ // > This field contains sensitive (linkable PII) information.
+ EnduserPseudoIDKey = attribute.Key("enduser.pseudo.id")
+)
+
+// EnduserID returns an attribute KeyValue conforming to the "enduser.id"
+// semantic conventions. It represents the unique identifier of an end user in
+// the system. It maybe a username, email address, or other identifier.
+func EnduserID(val string) attribute.KeyValue {
+ return EnduserIDKey.String(val)
+}
+
+// EnduserPseudoID returns an attribute KeyValue conforming to the
+// "enduser.pseudo.id" semantic conventions. It represents the pseudonymous
+// identifier of an end user. This identifier should be a random value that is
+// not directly linked or associated with the end user's actual identity.
+func EnduserPseudoID(val string) attribute.KeyValue {
+ return EnduserPseudoIDKey.String(val)
+}
+
+// Namespace: error
+const (
+ // ErrorMessageKey is the attribute Key conforming to the "error.message"
+ // semantic conventions. It represents a message providing more detail about an
+ // error in human-readable form.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Unexpected input type: string", "The user has exceeded their
+ // storage quota"
+ // Note: `error.message` should provide additional context and detail about an
+ // error.
+ // It is NOT RECOMMENDED to duplicate the value of `error.type` in
+ // `error.message`.
+ // It is also NOT RECOMMENDED to duplicate the value of `exception.message` in
+ // `error.message`.
+ //
+ // `error.message` is NOT RECOMMENDED for metrics or spans due to its unbounded
+ // cardinality and overlap with span status.
+ ErrorMessageKey = attribute.Key("error.message")
+
+ // ErrorTypeKey is the attribute Key conforming to the "error.type" semantic
+ // conventions. It represents the describes a class of error the operation ended
+ // with.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "timeout", "java.net.UnknownHostException",
+ // "server_certificate_invalid", "500"
+ // Note: The `error.type` SHOULD be predictable, and SHOULD have low
+ // cardinality.
+ //
+ // When `error.type` is set to a type (e.g., an exception type), its
+ // canonical class name identifying the type within the artifact SHOULD be used.
+ //
+ // Instrumentations SHOULD document the list of errors they report.
+ //
+ // The cardinality of `error.type` within one instrumentation library SHOULD be
+ // low.
+ // Telemetry consumers that aggregate data from multiple instrumentation
+ // libraries and applications
+ // should be prepared for `error.type` to have high cardinality at query time
+ // when no
+ // additional filters are applied.
+ //
+ // If the operation has completed successfully, instrumentations SHOULD NOT set
+ // `error.type`.
+ //
+ // If a specific domain defines its own set of error identifiers (such as HTTP
+ // or gRPC status codes),
+ // it's RECOMMENDED to:
+ //
+ // - Use a domain-specific attribute
+ // - Set `error.type` to capture all errors, regardless of whether they are
+ // defined within the domain-specific set or not.
+ ErrorTypeKey = attribute.Key("error.type")
+)
+
+// ErrorMessage returns an attribute KeyValue conforming to the "error.message"
+// semantic conventions. It represents a message providing more detail about an
+// error in human-readable form.
+func ErrorMessage(val string) attribute.KeyValue {
+ return ErrorMessageKey.String(val)
+}
+
+// Enum values for error.type
+var (
+ // A fallback error value to be used when the instrumentation doesn't define a
+ // custom value.
+ //
+ // Stability: stable
+ ErrorTypeOther = ErrorTypeKey.String("_OTHER")
+)
+
+// Namespace: exception
+const (
+ // ExceptionMessageKey is the attribute Key conforming to the
+ // "exception.message" semantic conventions. It represents the exception
+ // message.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "Division by zero", "Can't convert 'int' object to str implicitly"
+ ExceptionMessageKey = attribute.Key("exception.message")
+
+ // ExceptionStacktraceKey is the attribute Key conforming to the
+ // "exception.stacktrace" semantic conventions. It represents a stacktrace as a
+ // string in the natural representation for the language runtime. The
+ // representation is to be determined and documented by each language SIG.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: Exception in thread "main" java.lang.RuntimeException: Test
+ // exception\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at
+ // com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at
+ // com.example.GenerateTrace.main(GenerateTrace.java:5)
+ ExceptionStacktraceKey = attribute.Key("exception.stacktrace")
+
+ // ExceptionTypeKey is the attribute Key conforming to the "exception.type"
+ // semantic conventions. It represents the type of the exception (its
+ // fully-qualified class name, if applicable). The dynamic type of the exception
+ // should be preferred over the static type in languages that support it.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "java.net.ConnectException", "OSError"
+ ExceptionTypeKey = attribute.Key("exception.type")
+)
+
+// ExceptionMessage returns an attribute KeyValue conforming to the
+// "exception.message" semantic conventions. It represents the exception message.
+func ExceptionMessage(val string) attribute.KeyValue {
+ return ExceptionMessageKey.String(val)
+}
+
+// ExceptionStacktrace returns an attribute KeyValue conforming to the
+// "exception.stacktrace" semantic conventions. It represents a stacktrace as a
+// string in the natural representation for the language runtime. The
+// representation is to be determined and documented by each language SIG.
+func ExceptionStacktrace(val string) attribute.KeyValue {
+ return ExceptionStacktraceKey.String(val)
+}
+
+// ExceptionType returns an attribute KeyValue conforming to the "exception.type"
+// semantic conventions. It represents the type of the exception (its
+// fully-qualified class name, if applicable). The dynamic type of the exception
+// should be preferred over the static type in languages that support it.
+func ExceptionType(val string) attribute.KeyValue {
+ return ExceptionTypeKey.String(val)
+}
+
+// Namespace: faas
+const (
+ // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart"
+ // semantic conventions. It represents a boolean that is true if the serverless
+ // function is executed for the first time (aka cold-start).
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ FaaSColdstartKey = attribute.Key("faas.coldstart")
+
+ // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic
+ // conventions. It represents a string containing the schedule period as
+ // [Cron Expression].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 0/5 * * * ? *
+ //
+ // [Cron Expression]: https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm
+ FaaSCronKey = attribute.Key("faas.cron")
+
+ // FaaSDocumentCollectionKey is the attribute Key conforming to the
+ // "faas.document.collection" semantic conventions. It represents the name of
+ // the source on which the triggering operation was performed. For example, in
+ // Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the
+ // database name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "myBucketName", "myDbName"
+ FaaSDocumentCollectionKey = attribute.Key("faas.document.collection")
+
+ // FaaSDocumentNameKey is the attribute Key conforming to the
+ // "faas.document.name" semantic conventions. It represents the document
+ // name/table subjected to the operation. For example, in Cloud Storage or S3 is
+ // the name of the file, and in Cosmos DB the table name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "myFile.txt", "myTableName"
+ FaaSDocumentNameKey = attribute.Key("faas.document.name")
+
+ // FaaSDocumentOperationKey is the attribute Key conforming to the
+ // "faas.document.operation" semantic conventions. It represents the describes
+ // the type of the operation that was performed on the data.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ FaaSDocumentOperationKey = attribute.Key("faas.document.operation")
+
+ // FaaSDocumentTimeKey is the attribute Key conforming to the
+ // "faas.document.time" semantic conventions. It represents a string containing
+ // the time when the data was accessed in the [ISO 8601] format expressed in
+ // [UTC].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 2020-01-23T13:47:06Z
+ //
+ // [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html
+ // [UTC]: https://www.w3.org/TR/NOTE-datetime
+ FaaSDocumentTimeKey = attribute.Key("faas.document.time")
+
+ // FaaSInstanceKey is the attribute Key conforming to the "faas.instance"
+ // semantic conventions. It represents the execution environment ID as a string,
+ // that will be potentially reused for other invocations to the same
+ // function/function version.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de"
+ // Note: - **AWS Lambda:** Use the (full) log stream name.
+ FaaSInstanceKey = attribute.Key("faas.instance")
+
+ // FaaSInvocationIDKey is the attribute Key conforming to the
+ // "faas.invocation_id" semantic conventions. It represents the invocation ID of
+ // the current function invocation.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: af9d5aa4-a685-4c5f-a22b-444f80b3cc28
+ FaaSInvocationIDKey = attribute.Key("faas.invocation_id")
+
+ // FaaSInvokedNameKey is the attribute Key conforming to the "faas.invoked_name"
+ // semantic conventions. It represents the name of the invoked function.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: my-function
+ // Note: SHOULD be equal to the `faas.name` resource attribute of the invoked
+ // function.
+ FaaSInvokedNameKey = attribute.Key("faas.invoked_name")
+
+ // FaaSInvokedProviderKey is the attribute Key conforming to the
+ // "faas.invoked_provider" semantic conventions. It represents the cloud
+ // provider of the invoked function.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: SHOULD be equal to the `cloud.provider` resource attribute of the
+ // invoked function.
+ FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider")
+
+ // FaaSInvokedRegionKey is the attribute Key conforming to the
+ // "faas.invoked_region" semantic conventions. It represents the cloud region of
+ // the invoked function.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: eu-central-1
+ // Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked
+ // function.
+ FaaSInvokedRegionKey = attribute.Key("faas.invoked_region")
+
+ // FaaSMaxMemoryKey is the attribute Key conforming to the "faas.max_memory"
+ // semantic conventions. It represents the amount of memory available to the
+ // serverless function converted to Bytes.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Note: It's recommended to set this attribute since e.g. too little memory can
+ // easily stop a Java AWS Lambda function from working correctly. On AWS Lambda,
+ // the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this
+ // information (which must be multiplied by 1,048,576).
+ FaaSMaxMemoryKey = attribute.Key("faas.max_memory")
+
+ // FaaSNameKey is the attribute Key conforming to the "faas.name" semantic
+ // conventions. It represents the name of the single function that this runtime
+ // instance executes.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-function", "myazurefunctionapp/some-function-name"
+ // Note: This is the name of the function as configured/deployed on the FaaS
+ // platform and is usually different from the name of the callback
+ // function (which may be stored in the
+ // [`code.namespace`/`code.function.name`]
+ // span attributes).
+ //
+ // For some cloud providers, the above definition is ambiguous. The following
+ // definition of function name MUST be used for this attribute
+ // (and consequently the span name) for the listed cloud providers/products:
+ //
+ // - **Azure:** The full name `/`, i.e., function app name
+ // followed by a forward slash followed by the function name (this form
+ // can also be seen in the resource JSON for the function).
+ // This means that a span attribute MUST be used, as an Azure function
+ // app can host multiple functions that would usually share
+ // a TracerProvider (see also the `cloud.resource_id` attribute).
+ //
+ //
+ // [`code.namespace`/`code.function.name`]: /docs/general/attributes.md#source-code-attributes
+ FaaSNameKey = attribute.Key("faas.name")
+
+ // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic
+ // conventions. It represents a string containing the function invocation time
+ // in the [ISO 8601] format expressed in [UTC].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 2020-01-23T13:47:06Z
+ //
+ // [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html
+ // [UTC]: https://www.w3.org/TR/NOTE-datetime
+ FaaSTimeKey = attribute.Key("faas.time")
+
+ // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger" semantic
+ // conventions. It represents the type of the trigger which caused this function
+ // invocation.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ FaaSTriggerKey = attribute.Key("faas.trigger")
+
+ // FaaSVersionKey is the attribute Key conforming to the "faas.version" semantic
+ // conventions. It represents the immutable version of the function being
+ // executed.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "26", "pinkfroid-00002"
+ // Note: Depending on the cloud provider and platform, use:
+ //
+ // - **AWS Lambda:** The [function version]
+ // (an integer represented as a decimal string).
+ // - **Google Cloud Run (Services):** The [revision]
+ // (i.e., the function name plus the revision suffix).
+ // - **Google Cloud Functions:** The value of the
+ // [`K_REVISION` environment variable].
+ // - **Azure Functions:** Not applicable. Do not set this attribute.
+ //
+ //
+ // [function version]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html
+ // [revision]: https://cloud.google.com/run/docs/managing/revisions
+ // [`K_REVISION` environment variable]: https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically
+ FaaSVersionKey = attribute.Key("faas.version")
+)
+
+// FaaSColdstart returns an attribute KeyValue conforming to the "faas.coldstart"
+// semantic conventions. It represents a boolean that is true if the serverless
+// function is executed for the first time (aka cold-start).
+func FaaSColdstart(val bool) attribute.KeyValue {
+ return FaaSColdstartKey.Bool(val)
+}
+
+// FaaSCron returns an attribute KeyValue conforming to the "faas.cron" semantic
+// conventions. It represents a string containing the schedule period as
+// [Cron Expression].
+//
+// [Cron Expression]: https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm
+func FaaSCron(val string) attribute.KeyValue {
+ return FaaSCronKey.String(val)
+}
+
+// FaaSDocumentCollection returns an attribute KeyValue conforming to the
+// "faas.document.collection" semantic conventions. It represents the name of the
+// source on which the triggering operation was performed. For example, in Cloud
+// Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database
+// name.
+func FaaSDocumentCollection(val string) attribute.KeyValue {
+ return FaaSDocumentCollectionKey.String(val)
+}
+
+// FaaSDocumentName returns an attribute KeyValue conforming to the
+// "faas.document.name" semantic conventions. It represents the document
+// name/table subjected to the operation. For example, in Cloud Storage or S3 is
+// the name of the file, and in Cosmos DB the table name.
+func FaaSDocumentName(val string) attribute.KeyValue {
+ return FaaSDocumentNameKey.String(val)
+}
+
+// FaaSDocumentTime returns an attribute KeyValue conforming to the
+// "faas.document.time" semantic conventions. It represents a string containing
+// the time when the data was accessed in the [ISO 8601] format expressed in
+// [UTC].
+//
+// [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html
+// [UTC]: https://www.w3.org/TR/NOTE-datetime
+func FaaSDocumentTime(val string) attribute.KeyValue {
+ return FaaSDocumentTimeKey.String(val)
+}
+
+// FaaSInstance returns an attribute KeyValue conforming to the "faas.instance"
+// semantic conventions. It represents the execution environment ID as a string,
+// that will be potentially reused for other invocations to the same
+// function/function version.
+func FaaSInstance(val string) attribute.KeyValue {
+ return FaaSInstanceKey.String(val)
+}
+
+// FaaSInvocationID returns an attribute KeyValue conforming to the
+// "faas.invocation_id" semantic conventions. It represents the invocation ID of
+// the current function invocation.
+func FaaSInvocationID(val string) attribute.KeyValue {
+ return FaaSInvocationIDKey.String(val)
+}
+
+// FaaSInvokedName returns an attribute KeyValue conforming to the
+// "faas.invoked_name" semantic conventions. It represents the name of the
+// invoked function.
+func FaaSInvokedName(val string) attribute.KeyValue {
+ return FaaSInvokedNameKey.String(val)
+}
+
+// FaaSInvokedRegion returns an attribute KeyValue conforming to the
+// "faas.invoked_region" semantic conventions. It represents the cloud region of
+// the invoked function.
+func FaaSInvokedRegion(val string) attribute.KeyValue {
+ return FaaSInvokedRegionKey.String(val)
+}
+
+// FaaSMaxMemory returns an attribute KeyValue conforming to the
+// "faas.max_memory" semantic conventions. It represents the amount of memory
+// available to the serverless function converted to Bytes.
+func FaaSMaxMemory(val int) attribute.KeyValue {
+ return FaaSMaxMemoryKey.Int(val)
+}
+
+// FaaSName returns an attribute KeyValue conforming to the "faas.name" semantic
+// conventions. It represents the name of the single function that this runtime
+// instance executes.
+func FaaSName(val string) attribute.KeyValue {
+ return FaaSNameKey.String(val)
+}
+
+// FaaSTime returns an attribute KeyValue conforming to the "faas.time" semantic
+// conventions. It represents a string containing the function invocation time in
+// the [ISO 8601] format expressed in [UTC].
+//
+// [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html
+// [UTC]: https://www.w3.org/TR/NOTE-datetime
+func FaaSTime(val string) attribute.KeyValue {
+ return FaaSTimeKey.String(val)
+}
+
+// FaaSVersion returns an attribute KeyValue conforming to the "faas.version"
+// semantic conventions. It represents the immutable version of the function
+// being executed.
+func FaaSVersion(val string) attribute.KeyValue {
+ return FaaSVersionKey.String(val)
+}
+
+// Enum values for faas.document.operation
+var (
+ // When a new object is created.
+ // Stability: development
+ FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert")
+ // When an object is modified.
+ // Stability: development
+ FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit")
+ // When an object is deleted.
+ // Stability: development
+ FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete")
+)
+
+// Enum values for faas.invoked_provider
+var (
+ // Alibaba Cloud
+ // Stability: development
+ FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud")
+ // Amazon Web Services
+ // Stability: development
+ FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws")
+ // Microsoft Azure
+ // Stability: development
+ FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure")
+ // Google Cloud Platform
+ // Stability: development
+ FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp")
+ // Tencent Cloud
+ // Stability: development
+ FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud")
+)
+
+// Enum values for faas.trigger
+var (
+ // A response to some data source operation such as a database or filesystem
+ // read/write
+ // Stability: development
+ FaaSTriggerDatasource = FaaSTriggerKey.String("datasource")
+ // To provide an answer to an inbound HTTP request
+ // Stability: development
+ FaaSTriggerHTTP = FaaSTriggerKey.String("http")
+ // A function is set to be executed when messages are sent to a messaging system
+ // Stability: development
+ FaaSTriggerPubSub = FaaSTriggerKey.String("pubsub")
+ // A function is scheduled to be executed regularly
+ // Stability: development
+ FaaSTriggerTimer = FaaSTriggerKey.String("timer")
+ // If none of the others apply
+ // Stability: development
+ FaaSTriggerOther = FaaSTriggerKey.String("other")
+)
+
+// Namespace: feature_flag
+const (
+ // FeatureFlagContextIDKey is the attribute Key conforming to the
+ // "feature_flag.context.id" semantic conventions. It represents the unique
+ // identifier for the flag evaluation context. For example, the targeting key.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "5157782b-2203-4c80-a857-dbbd5e7761db"
+ FeatureFlagContextIDKey = attribute.Key("feature_flag.context.id")
+
+ // FeatureFlagKeyKey is the attribute Key conforming to the "feature_flag.key"
+ // semantic conventions. It represents the lookup key of the feature flag.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "logo-color"
+ FeatureFlagKeyKey = attribute.Key("feature_flag.key")
+
+ // FeatureFlagProviderNameKey is the attribute Key conforming to the
+ // "feature_flag.provider.name" semantic conventions. It represents the
+ // identifies the feature flag provider.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Flag Manager"
+ FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider.name")
+
+ // FeatureFlagResultReasonKey is the attribute Key conforming to the
+ // "feature_flag.result.reason" semantic conventions. It represents the reason
+ // code which shows how a feature flag value was determined.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "static", "targeting_match", "error", "default"
+ FeatureFlagResultReasonKey = attribute.Key("feature_flag.result.reason")
+
+ // FeatureFlagResultValueKey is the attribute Key conforming to the
+ // "feature_flag.result.value" semantic conventions. It represents the evaluated
+ // value of the feature flag.
+ //
+ // Type: any
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "#ff0000", true, 3
+ // Note: With some feature flag providers, feature flag results can be quite
+ // large or contain private or sensitive details.
+ // Because of this, `feature_flag.result.variant` is often the preferred
+ // attribute if it is available.
+ //
+ // It may be desirable to redact or otherwise limit the size and scope of
+ // `feature_flag.result.value` if possible.
+ // Because the evaluated flag value is unstructured and may be any type, it is
+ // left to the instrumentation author to determine how best to achieve this.
+ FeatureFlagResultValueKey = attribute.Key("feature_flag.result.value")
+
+ // FeatureFlagResultVariantKey is the attribute Key conforming to the
+ // "feature_flag.result.variant" semantic conventions. It represents a semantic
+ // identifier for an evaluated flag value.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "red", "true", "on"
+ // Note: A semantic identifier, commonly referred to as a variant, provides a
+ // means
+ // for referring to a value without including the value itself. This can
+ // provide additional context for understanding the meaning behind a value.
+ // For example, the variant `red` maybe be used for the value `#c05543`.
+ FeatureFlagResultVariantKey = attribute.Key("feature_flag.result.variant")
+
+ // FeatureFlagSetIDKey is the attribute Key conforming to the
+ // "feature_flag.set.id" semantic conventions. It represents the identifier of
+ // the [flag set] to which the feature flag belongs.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "proj-1", "ab98sgs", "service1/dev"
+ //
+ // [flag set]: https://openfeature.dev/specification/glossary/#flag-set
+ FeatureFlagSetIDKey = attribute.Key("feature_flag.set.id")
+
+ // FeatureFlagVersionKey is the attribute Key conforming to the
+ // "feature_flag.version" semantic conventions. It represents the version of the
+ // ruleset used during the evaluation. This may be any stable value which
+ // uniquely identifies the ruleset.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1", "01ABCDEF"
+ FeatureFlagVersionKey = attribute.Key("feature_flag.version")
+)
+
+// FeatureFlagContextID returns an attribute KeyValue conforming to the
+// "feature_flag.context.id" semantic conventions. It represents the unique
+// identifier for the flag evaluation context. For example, the targeting key.
+func FeatureFlagContextID(val string) attribute.KeyValue {
+ return FeatureFlagContextIDKey.String(val)
+}
+
+// FeatureFlagKey returns an attribute KeyValue conforming to the
+// "feature_flag.key" semantic conventions. It represents the lookup key of the
+// feature flag.
+func FeatureFlagKey(val string) attribute.KeyValue {
+ return FeatureFlagKeyKey.String(val)
+}
+
+// FeatureFlagProviderName returns an attribute KeyValue conforming to the
+// "feature_flag.provider.name" semantic conventions. It represents the
+// identifies the feature flag provider.
+func FeatureFlagProviderName(val string) attribute.KeyValue {
+ return FeatureFlagProviderNameKey.String(val)
+}
+
+// FeatureFlagResultVariant returns an attribute KeyValue conforming to the
+// "feature_flag.result.variant" semantic conventions. It represents a semantic
+// identifier for an evaluated flag value.
+func FeatureFlagResultVariant(val string) attribute.KeyValue {
+ return FeatureFlagResultVariantKey.String(val)
+}
+
+// FeatureFlagSetID returns an attribute KeyValue conforming to the
+// "feature_flag.set.id" semantic conventions. It represents the identifier of
+// the [flag set] to which the feature flag belongs.
+//
+// [flag set]: https://openfeature.dev/specification/glossary/#flag-set
+func FeatureFlagSetID(val string) attribute.KeyValue {
+ return FeatureFlagSetIDKey.String(val)
+}
+
+// FeatureFlagVersion returns an attribute KeyValue conforming to the
+// "feature_flag.version" semantic conventions. It represents the version of the
+// ruleset used during the evaluation. This may be any stable value which
+// uniquely identifies the ruleset.
+func FeatureFlagVersion(val string) attribute.KeyValue {
+ return FeatureFlagVersionKey.String(val)
+}
+
+// Enum values for feature_flag.result.reason
+var (
+ // The resolved value is static (no dynamic evaluation).
+ // Stability: development
+ FeatureFlagResultReasonStatic = FeatureFlagResultReasonKey.String("static")
+ // The resolved value fell back to a pre-configured value (no dynamic evaluation
+ // occurred or dynamic evaluation yielded no result).
+ // Stability: development
+ FeatureFlagResultReasonDefault = FeatureFlagResultReasonKey.String("default")
+ // The resolved value was the result of a dynamic evaluation, such as a rule or
+ // specific user-targeting.
+ // Stability: development
+ FeatureFlagResultReasonTargetingMatch = FeatureFlagResultReasonKey.String("targeting_match")
+ // The resolved value was the result of pseudorandom assignment.
+ // Stability: development
+ FeatureFlagResultReasonSplit = FeatureFlagResultReasonKey.String("split")
+ // The resolved value was retrieved from cache.
+ // Stability: development
+ FeatureFlagResultReasonCached = FeatureFlagResultReasonKey.String("cached")
+ // The resolved value was the result of the flag being disabled in the
+ // management system.
+ // Stability: development
+ FeatureFlagResultReasonDisabled = FeatureFlagResultReasonKey.String("disabled")
+ // The reason for the resolved value could not be determined.
+ // Stability: development
+ FeatureFlagResultReasonUnknown = FeatureFlagResultReasonKey.String("unknown")
+ // The resolved value is non-authoritative or possibly out of date
+ // Stability: development
+ FeatureFlagResultReasonStale = FeatureFlagResultReasonKey.String("stale")
+ // The resolved value was the result of an error.
+ // Stability: development
+ FeatureFlagResultReasonError = FeatureFlagResultReasonKey.String("error")
+)
+
+// Namespace: file
+const (
+ // FileAccessedKey is the attribute Key conforming to the "file.accessed"
+ // semantic conventions. It represents the time when the file was last accessed,
+ // in ISO 8601 format.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2021-01-01T12:00:00Z"
+ // Note: This attribute might not be supported by some file systems — NFS,
+ // FAT32, in embedded OS, etc.
+ FileAccessedKey = attribute.Key("file.accessed")
+
+ // FileAttributesKey is the attribute Key conforming to the "file.attributes"
+ // semantic conventions. It represents the array of file attributes.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "readonly", "hidden"
+ // Note: Attributes names depend on the OS or file system. Here’s a
+ // non-exhaustive list of values expected for this attribute: `archive`,
+ // `compressed`, `directory`, `encrypted`, `execute`, `hidden`, `immutable`,
+ // `journaled`, `read`, `readonly`, `symbolic link`, `system`, `temporary`,
+ // `write`.
+ FileAttributesKey = attribute.Key("file.attributes")
+
+ // FileChangedKey is the attribute Key conforming to the "file.changed" semantic
+ // conventions. It represents the time when the file attributes or metadata was
+ // last changed, in ISO 8601 format.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2021-01-01T12:00:00Z"
+ // Note: `file.changed` captures the time when any of the file's properties or
+ // attributes (including the content) are changed, while `file.modified`
+ // captures the timestamp when the file content is modified.
+ FileChangedKey = attribute.Key("file.changed")
+
+ // FileCreatedKey is the attribute Key conforming to the "file.created" semantic
+ // conventions. It represents the time when the file was created, in ISO 8601
+ // format.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2021-01-01T12:00:00Z"
+ // Note: This attribute might not be supported by some file systems — NFS,
+ // FAT32, in embedded OS, etc.
+ FileCreatedKey = attribute.Key("file.created")
+
+ // FileDirectoryKey is the attribute Key conforming to the "file.directory"
+ // semantic conventions. It represents the directory where the file is located.
+ // It should include the drive letter, when appropriate.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/home/user", "C:\Program Files\MyApp"
+ FileDirectoryKey = attribute.Key("file.directory")
+
+ // FileExtensionKey is the attribute Key conforming to the "file.extension"
+ // semantic conventions. It represents the file extension, excluding the leading
+ // dot.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "png", "gz"
+ // Note: When the file name has multiple extensions (example.tar.gz), only the
+ // last one should be captured ("gz", not "tar.gz").
+ FileExtensionKey = attribute.Key("file.extension")
+
+ // FileForkNameKey is the attribute Key conforming to the "file.fork_name"
+ // semantic conventions. It represents the name of the fork. A fork is
+ // additional data associated with a filesystem object.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Zone.Identifer"
+ // Note: On Linux, a resource fork is used to store additional data with a
+ // filesystem object. A file always has at least one fork for the data portion,
+ // and additional forks may exist.
+ // On NTFS, this is analogous to an Alternate Data Stream (ADS), and the default
+ // data stream for a file is just called $DATA. Zone.Identifier is commonly used
+ // by Windows to track contents downloaded from the Internet. An ADS is
+ // typically of the form: C:\path\to\filename.extension:some_fork_name, and
+ // some_fork_name is the value that should populate `fork_name`.
+ // `filename.extension` should populate `file.name`, and `extension` should
+ // populate `file.extension`. The full path, `file.path`, will include the fork
+ // name.
+ FileForkNameKey = attribute.Key("file.fork_name")
+
+ // FileGroupIDKey is the attribute Key conforming to the "file.group.id"
+ // semantic conventions. It represents the primary Group ID (GID) of the file.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1000"
+ FileGroupIDKey = attribute.Key("file.group.id")
+
+ // FileGroupNameKey is the attribute Key conforming to the "file.group.name"
+ // semantic conventions. It represents the primary group name of the file.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "users"
+ FileGroupNameKey = attribute.Key("file.group.name")
+
+ // FileInodeKey is the attribute Key conforming to the "file.inode" semantic
+ // conventions. It represents the inode representing the file in the filesystem.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "256383"
+ FileInodeKey = attribute.Key("file.inode")
+
+ // FileModeKey is the attribute Key conforming to the "file.mode" semantic
+ // conventions. It represents the mode of the file in octal representation.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "0640"
+ FileModeKey = attribute.Key("file.mode")
+
+ // FileModifiedKey is the attribute Key conforming to the "file.modified"
+ // semantic conventions. It represents the time when the file content was last
+ // modified, in ISO 8601 format.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2021-01-01T12:00:00Z"
+ FileModifiedKey = attribute.Key("file.modified")
+
+ // FileNameKey is the attribute Key conforming to the "file.name" semantic
+ // conventions. It represents the name of the file including the extension,
+ // without the directory.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "example.png"
+ FileNameKey = attribute.Key("file.name")
+
+ // FileOwnerIDKey is the attribute Key conforming to the "file.owner.id"
+ // semantic conventions. It represents the user ID (UID) or security identifier
+ // (SID) of the file owner.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1000"
+ FileOwnerIDKey = attribute.Key("file.owner.id")
+
+ // FileOwnerNameKey is the attribute Key conforming to the "file.owner.name"
+ // semantic conventions. It represents the username of the file owner.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "root"
+ FileOwnerNameKey = attribute.Key("file.owner.name")
+
+ // FilePathKey is the attribute Key conforming to the "file.path" semantic
+ // conventions. It represents the full path to the file, including the file
+ // name. It should include the drive letter, when appropriate.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/home/alice/example.png", "C:\Program Files\MyApp\myapp.exe"
+ FilePathKey = attribute.Key("file.path")
+
+ // FileSizeKey is the attribute Key conforming to the "file.size" semantic
+ // conventions. It represents the file size in bytes.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ FileSizeKey = attribute.Key("file.size")
+
+ // FileSymbolicLinkTargetPathKey is the attribute Key conforming to the
+ // "file.symbolic_link.target_path" semantic conventions. It represents the path
+ // to the target of a symbolic link.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/usr/bin/python3"
+ // Note: This attribute is only applicable to symbolic links.
+ FileSymbolicLinkTargetPathKey = attribute.Key("file.symbolic_link.target_path")
+)
+
+// FileAccessed returns an attribute KeyValue conforming to the "file.accessed"
+// semantic conventions. It represents the time when the file was last accessed,
+// in ISO 8601 format.
+func FileAccessed(val string) attribute.KeyValue {
+ return FileAccessedKey.String(val)
+}
+
+// FileAttributes returns an attribute KeyValue conforming to the
+// "file.attributes" semantic conventions. It represents the array of file
+// attributes.
+func FileAttributes(val ...string) attribute.KeyValue {
+ return FileAttributesKey.StringSlice(val)
+}
+
+// FileChanged returns an attribute KeyValue conforming to the "file.changed"
+// semantic conventions. It represents the time when the file attributes or
+// metadata was last changed, in ISO 8601 format.
+func FileChanged(val string) attribute.KeyValue {
+ return FileChangedKey.String(val)
+}
+
+// FileCreated returns an attribute KeyValue conforming to the "file.created"
+// semantic conventions. It represents the time when the file was created, in ISO
+// 8601 format.
+func FileCreated(val string) attribute.KeyValue {
+ return FileCreatedKey.String(val)
+}
+
+// FileDirectory returns an attribute KeyValue conforming to the "file.directory"
+// semantic conventions. It represents the directory where the file is located.
+// It should include the drive letter, when appropriate.
+func FileDirectory(val string) attribute.KeyValue {
+ return FileDirectoryKey.String(val)
+}
+
+// FileExtension returns an attribute KeyValue conforming to the "file.extension"
+// semantic conventions. It represents the file extension, excluding the leading
+// dot.
+func FileExtension(val string) attribute.KeyValue {
+ return FileExtensionKey.String(val)
+}
+
+// FileForkName returns an attribute KeyValue conforming to the "file.fork_name"
+// semantic conventions. It represents the name of the fork. A fork is additional
+// data associated with a filesystem object.
+func FileForkName(val string) attribute.KeyValue {
+ return FileForkNameKey.String(val)
+}
+
+// FileGroupID returns an attribute KeyValue conforming to the "file.group.id"
+// semantic conventions. It represents the primary Group ID (GID) of the file.
+func FileGroupID(val string) attribute.KeyValue {
+ return FileGroupIDKey.String(val)
+}
+
+// FileGroupName returns an attribute KeyValue conforming to the
+// "file.group.name" semantic conventions. It represents the primary group name
+// of the file.
+func FileGroupName(val string) attribute.KeyValue {
+ return FileGroupNameKey.String(val)
+}
+
+// FileInode returns an attribute KeyValue conforming to the "file.inode"
+// semantic conventions. It represents the inode representing the file in the
+// filesystem.
+func FileInode(val string) attribute.KeyValue {
+ return FileInodeKey.String(val)
+}
+
+// FileMode returns an attribute KeyValue conforming to the "file.mode" semantic
+// conventions. It represents the mode of the file in octal representation.
+func FileMode(val string) attribute.KeyValue {
+ return FileModeKey.String(val)
+}
+
+// FileModified returns an attribute KeyValue conforming to the "file.modified"
+// semantic conventions. It represents the time when the file content was last
+// modified, in ISO 8601 format.
+func FileModified(val string) attribute.KeyValue {
+ return FileModifiedKey.String(val)
+}
+
+// FileName returns an attribute KeyValue conforming to the "file.name" semantic
+// conventions. It represents the name of the file including the extension,
+// without the directory.
+func FileName(val string) attribute.KeyValue {
+ return FileNameKey.String(val)
+}
+
+// FileOwnerID returns an attribute KeyValue conforming to the "file.owner.id"
+// semantic conventions. It represents the user ID (UID) or security identifier
+// (SID) of the file owner.
+func FileOwnerID(val string) attribute.KeyValue {
+ return FileOwnerIDKey.String(val)
+}
+
+// FileOwnerName returns an attribute KeyValue conforming to the
+// "file.owner.name" semantic conventions. It represents the username of the file
+// owner.
+func FileOwnerName(val string) attribute.KeyValue {
+ return FileOwnerNameKey.String(val)
+}
+
+// FilePath returns an attribute KeyValue conforming to the "file.path" semantic
+// conventions. It represents the full path to the file, including the file name.
+// It should include the drive letter, when appropriate.
+func FilePath(val string) attribute.KeyValue {
+ return FilePathKey.String(val)
+}
+
+// FileSize returns an attribute KeyValue conforming to the "file.size" semantic
+// conventions. It represents the file size in bytes.
+func FileSize(val int) attribute.KeyValue {
+ return FileSizeKey.Int(val)
+}
+
+// FileSymbolicLinkTargetPath returns an attribute KeyValue conforming to the
+// "file.symbolic_link.target_path" semantic conventions. It represents the path
+// to the target of a symbolic link.
+func FileSymbolicLinkTargetPath(val string) attribute.KeyValue {
+ return FileSymbolicLinkTargetPathKey.String(val)
+}
+
+// Namespace: gcp
+const (
+ // GCPAppHubApplicationContainerKey is the attribute Key conforming to the
+ // "gcp.apphub.application.container" semantic conventions. It represents the
+ // container within GCP where the AppHub application is defined.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "projects/my-container-project"
+ GCPAppHubApplicationContainerKey = attribute.Key("gcp.apphub.application.container")
+
+ // GCPAppHubApplicationIDKey is the attribute Key conforming to the
+ // "gcp.apphub.application.id" semantic conventions. It represents the name of
+ // the application as configured in AppHub.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-application"
+ GCPAppHubApplicationIDKey = attribute.Key("gcp.apphub.application.id")
+
+ // GCPAppHubApplicationLocationKey is the attribute Key conforming to the
+ // "gcp.apphub.application.location" semantic conventions. It represents the GCP
+ // zone or region where the application is defined.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "us-central1"
+ GCPAppHubApplicationLocationKey = attribute.Key("gcp.apphub.application.location")
+
+ // GCPAppHubServiceCriticalityTypeKey is the attribute Key conforming to the
+ // "gcp.apphub.service.criticality_type" semantic conventions. It represents the
+ // criticality of a service indicates its importance to the business.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: [See AppHub type enum]
+ //
+ // [See AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type
+ GCPAppHubServiceCriticalityTypeKey = attribute.Key("gcp.apphub.service.criticality_type")
+
+ // GCPAppHubServiceEnvironmentTypeKey is the attribute Key conforming to the
+ // "gcp.apphub.service.environment_type" semantic conventions. It represents the
+ // environment of a service is the stage of a software lifecycle.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: [See AppHub environment type]
+ //
+ // [See AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1
+ GCPAppHubServiceEnvironmentTypeKey = attribute.Key("gcp.apphub.service.environment_type")
+
+ // GCPAppHubServiceIDKey is the attribute Key conforming to the
+ // "gcp.apphub.service.id" semantic conventions. It represents the name of the
+ // service as configured in AppHub.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-service"
+ GCPAppHubServiceIDKey = attribute.Key("gcp.apphub.service.id")
+
+ // GCPAppHubWorkloadCriticalityTypeKey is the attribute Key conforming to the
+ // "gcp.apphub.workload.criticality_type" semantic conventions. It represents
+ // the criticality of a workload indicates its importance to the business.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: [See AppHub type enum]
+ //
+ // [See AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type
+ GCPAppHubWorkloadCriticalityTypeKey = attribute.Key("gcp.apphub.workload.criticality_type")
+
+ // GCPAppHubWorkloadEnvironmentTypeKey is the attribute Key conforming to the
+ // "gcp.apphub.workload.environment_type" semantic conventions. It represents
+ // the environment of a workload is the stage of a software lifecycle.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: [See AppHub environment type]
+ //
+ // [See AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1
+ GCPAppHubWorkloadEnvironmentTypeKey = attribute.Key("gcp.apphub.workload.environment_type")
+
+ // GCPAppHubWorkloadIDKey is the attribute Key conforming to the
+ // "gcp.apphub.workload.id" semantic conventions. It represents the name of the
+ // workload as configured in AppHub.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-workload"
+ GCPAppHubWorkloadIDKey = attribute.Key("gcp.apphub.workload.id")
+
+ // GCPClientServiceKey is the attribute Key conforming to the
+ // "gcp.client.service" semantic conventions. It represents the identifies the
+ // Google Cloud service for which the official client library is intended.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "appengine", "run", "firestore", "alloydb", "spanner"
+ // Note: Intended to be a stable identifier for Google Cloud client libraries
+ // that is uniform across implementation languages. The value should be derived
+ // from the canonical service domain for the service; for example,
+ // 'foo.googleapis.com' should result in a value of 'foo'.
+ GCPClientServiceKey = attribute.Key("gcp.client.service")
+
+ // GCPCloudRunJobExecutionKey is the attribute Key conforming to the
+ // "gcp.cloud_run.job.execution" semantic conventions. It represents the name of
+ // the Cloud Run [execution] being run for the Job, as set by the
+ // [`CLOUD_RUN_EXECUTION`] environment variable.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "job-name-xxxx", "sample-job-mdw84"
+ //
+ // [execution]: https://cloud.google.com/run/docs/managing/job-executions
+ // [`CLOUD_RUN_EXECUTION`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars
+ GCPCloudRunJobExecutionKey = attribute.Key("gcp.cloud_run.job.execution")
+
+ // GCPCloudRunJobTaskIndexKey is the attribute Key conforming to the
+ // "gcp.cloud_run.job.task_index" semantic conventions. It represents the index
+ // for a task within an execution as provided by the [`CLOUD_RUN_TASK_INDEX`]
+ // environment variable.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 0, 1
+ //
+ // [`CLOUD_RUN_TASK_INDEX`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars
+ GCPCloudRunJobTaskIndexKey = attribute.Key("gcp.cloud_run.job.task_index")
+
+ // GCPGCEInstanceHostnameKey is the attribute Key conforming to the
+ // "gcp.gce.instance.hostname" semantic conventions. It represents the hostname
+ // of a GCE instance. This is the full value of the default or [custom hostname]
+ // .
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-host1234.example.com",
+ // "sample-vm.us-west1-b.c.my-project.internal"
+ //
+ // [custom hostname]: https://cloud.google.com/compute/docs/instances/custom-hostname-vm
+ GCPGCEInstanceHostnameKey = attribute.Key("gcp.gce.instance.hostname")
+
+ // GCPGCEInstanceNameKey is the attribute Key conforming to the
+ // "gcp.gce.instance.name" semantic conventions. It represents the instance name
+ // of a GCE instance. This is the value provided by `host.name`, the visible
+ // name of the instance in the Cloud Console UI, and the prefix for the default
+ // hostname of the instance as defined by the [default internal DNS name].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "instance-1", "my-vm-name"
+ //
+ // [default internal DNS name]: https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names
+ GCPGCEInstanceNameKey = attribute.Key("gcp.gce.instance.name")
+)
+
+// GCPAppHubApplicationContainer returns an attribute KeyValue conforming to the
+// "gcp.apphub.application.container" semantic conventions. It represents the
+// container within GCP where the AppHub application is defined.
+func GCPAppHubApplicationContainer(val string) attribute.KeyValue {
+ return GCPAppHubApplicationContainerKey.String(val)
+}
+
+// GCPAppHubApplicationID returns an attribute KeyValue conforming to the
+// "gcp.apphub.application.id" semantic conventions. It represents the name of
+// the application as configured in AppHub.
+func GCPAppHubApplicationID(val string) attribute.KeyValue {
+ return GCPAppHubApplicationIDKey.String(val)
+}
+
+// GCPAppHubApplicationLocation returns an attribute KeyValue conforming to the
+// "gcp.apphub.application.location" semantic conventions. It represents the GCP
+// zone or region where the application is defined.
+func GCPAppHubApplicationLocation(val string) attribute.KeyValue {
+ return GCPAppHubApplicationLocationKey.String(val)
+}
+
+// GCPAppHubServiceID returns an attribute KeyValue conforming to the
+// "gcp.apphub.service.id" semantic conventions. It represents the name of the
+// service as configured in AppHub.
+func GCPAppHubServiceID(val string) attribute.KeyValue {
+ return GCPAppHubServiceIDKey.String(val)
+}
+
+// GCPAppHubWorkloadID returns an attribute KeyValue conforming to the
+// "gcp.apphub.workload.id" semantic conventions. It represents the name of the
+// workload as configured in AppHub.
+func GCPAppHubWorkloadID(val string) attribute.KeyValue {
+ return GCPAppHubWorkloadIDKey.String(val)
+}
+
+// GCPClientService returns an attribute KeyValue conforming to the
+// "gcp.client.service" semantic conventions. It represents the identifies the
+// Google Cloud service for which the official client library is intended.
+func GCPClientService(val string) attribute.KeyValue {
+ return GCPClientServiceKey.String(val)
+}
+
+// GCPCloudRunJobExecution returns an attribute KeyValue conforming to the
+// "gcp.cloud_run.job.execution" semantic conventions. It represents the name of
+// the Cloud Run [execution] being run for the Job, as set by the
+// [`CLOUD_RUN_EXECUTION`] environment variable.
+//
+// [execution]: https://cloud.google.com/run/docs/managing/job-executions
+// [`CLOUD_RUN_EXECUTION`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars
+func GCPCloudRunJobExecution(val string) attribute.KeyValue {
+ return GCPCloudRunJobExecutionKey.String(val)
+}
+
+// GCPCloudRunJobTaskIndex returns an attribute KeyValue conforming to the
+// "gcp.cloud_run.job.task_index" semantic conventions. It represents the index
+// for a task within an execution as provided by the [`CLOUD_RUN_TASK_INDEX`]
+// environment variable.
+//
+// [`CLOUD_RUN_TASK_INDEX`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars
+func GCPCloudRunJobTaskIndex(val int) attribute.KeyValue {
+ return GCPCloudRunJobTaskIndexKey.Int(val)
+}
+
+// GCPGCEInstanceHostname returns an attribute KeyValue conforming to the
+// "gcp.gce.instance.hostname" semantic conventions. It represents the hostname
+// of a GCE instance. This is the full value of the default or [custom hostname]
+// .
+//
+// [custom hostname]: https://cloud.google.com/compute/docs/instances/custom-hostname-vm
+func GCPGCEInstanceHostname(val string) attribute.KeyValue {
+ return GCPGCEInstanceHostnameKey.String(val)
+}
+
+// GCPGCEInstanceName returns an attribute KeyValue conforming to the
+// "gcp.gce.instance.name" semantic conventions. It represents the instance name
+// of a GCE instance. This is the value provided by `host.name`, the visible name
+// of the instance in the Cloud Console UI, and the prefix for the default
+// hostname of the instance as defined by the [default internal DNS name].
+//
+// [default internal DNS name]: https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names
+func GCPGCEInstanceName(val string) attribute.KeyValue {
+ return GCPGCEInstanceNameKey.String(val)
+}
+
+// Enum values for gcp.apphub.service.criticality_type
+var (
+ // Mission critical service.
+ // Stability: development
+ GCPAppHubServiceCriticalityTypeMissionCritical = GCPAppHubServiceCriticalityTypeKey.String("MISSION_CRITICAL")
+ // High impact.
+ // Stability: development
+ GCPAppHubServiceCriticalityTypeHigh = GCPAppHubServiceCriticalityTypeKey.String("HIGH")
+ // Medium impact.
+ // Stability: development
+ GCPAppHubServiceCriticalityTypeMedium = GCPAppHubServiceCriticalityTypeKey.String("MEDIUM")
+ // Low impact.
+ // Stability: development
+ GCPAppHubServiceCriticalityTypeLow = GCPAppHubServiceCriticalityTypeKey.String("LOW")
+)
+
+// Enum values for gcp.apphub.service.environment_type
+var (
+ // Production environment.
+ // Stability: development
+ GCPAppHubServiceEnvironmentTypeProduction = GCPAppHubServiceEnvironmentTypeKey.String("PRODUCTION")
+ // Staging environment.
+ // Stability: development
+ GCPAppHubServiceEnvironmentTypeStaging = GCPAppHubServiceEnvironmentTypeKey.String("STAGING")
+ // Test environment.
+ // Stability: development
+ GCPAppHubServiceEnvironmentTypeTest = GCPAppHubServiceEnvironmentTypeKey.String("TEST")
+ // Development environment.
+ // Stability: development
+ GCPAppHubServiceEnvironmentTypeDevelopment = GCPAppHubServiceEnvironmentTypeKey.String("DEVELOPMENT")
+)
+
+// Enum values for gcp.apphub.workload.criticality_type
+var (
+ // Mission critical service.
+ // Stability: development
+ GCPAppHubWorkloadCriticalityTypeMissionCritical = GCPAppHubWorkloadCriticalityTypeKey.String("MISSION_CRITICAL")
+ // High impact.
+ // Stability: development
+ GCPAppHubWorkloadCriticalityTypeHigh = GCPAppHubWorkloadCriticalityTypeKey.String("HIGH")
+ // Medium impact.
+ // Stability: development
+ GCPAppHubWorkloadCriticalityTypeMedium = GCPAppHubWorkloadCriticalityTypeKey.String("MEDIUM")
+ // Low impact.
+ // Stability: development
+ GCPAppHubWorkloadCriticalityTypeLow = GCPAppHubWorkloadCriticalityTypeKey.String("LOW")
+)
+
+// Enum values for gcp.apphub.workload.environment_type
+var (
+ // Production environment.
+ // Stability: development
+ GCPAppHubWorkloadEnvironmentTypeProduction = GCPAppHubWorkloadEnvironmentTypeKey.String("PRODUCTION")
+ // Staging environment.
+ // Stability: development
+ GCPAppHubWorkloadEnvironmentTypeStaging = GCPAppHubWorkloadEnvironmentTypeKey.String("STAGING")
+ // Test environment.
+ // Stability: development
+ GCPAppHubWorkloadEnvironmentTypeTest = GCPAppHubWorkloadEnvironmentTypeKey.String("TEST")
+ // Development environment.
+ // Stability: development
+ GCPAppHubWorkloadEnvironmentTypeDevelopment = GCPAppHubWorkloadEnvironmentTypeKey.String("DEVELOPMENT")
+)
+
+// Namespace: gen_ai
+const (
+ // GenAIAgentDescriptionKey is the attribute Key conforming to the
+ // "gen_ai.agent.description" semantic conventions. It represents the free-form
+ // description of the GenAI agent provided by the application.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Helps with math problems", "Generates fiction stories"
+ GenAIAgentDescriptionKey = attribute.Key("gen_ai.agent.description")
+
+ // GenAIAgentIDKey is the attribute Key conforming to the "gen_ai.agent.id"
+ // semantic conventions. It represents the unique identifier of the GenAI agent.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "asst_5j66UpCpwteGg4YSxUnt7lPY"
+ GenAIAgentIDKey = attribute.Key("gen_ai.agent.id")
+
+ // GenAIAgentNameKey is the attribute Key conforming to the "gen_ai.agent.name"
+ // semantic conventions. It represents the human-readable name of the GenAI
+ // agent provided by the application.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Math Tutor", "Fiction Writer"
+ GenAIAgentNameKey = attribute.Key("gen_ai.agent.name")
+
+ // GenAIConversationIDKey is the attribute Key conforming to the
+ // "gen_ai.conversation.id" semantic conventions. It represents the unique
+ // identifier for a conversation (session, thread), used to store and correlate
+ // messages within this conversation.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "conv_5j66UpCpwteGg4YSxUnt7lPY"
+ GenAIConversationIDKey = attribute.Key("gen_ai.conversation.id")
+
+ // GenAIDataSourceIDKey is the attribute Key conforming to the
+ // "gen_ai.data_source.id" semantic conventions. It represents the data source
+ // identifier.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "H7STPQYOND"
+ // Note: Data sources are used by AI agents and RAG applications to store
+ // grounding data. A data source may be an external database, object store,
+ // document collection, website, or any other storage system used by the GenAI
+ // agent or application. The `gen_ai.data_source.id` SHOULD match the identifier
+ // used by the GenAI system rather than a name specific to the external storage,
+ // such as a database or object store. Semantic conventions referencing
+ // `gen_ai.data_source.id` MAY also leverage additional attributes, such as
+ // `db.*`, to further identify and describe the data source.
+ GenAIDataSourceIDKey = attribute.Key("gen_ai.data_source.id")
+
+ // GenAIOpenAIRequestServiceTierKey is the attribute Key conforming to the
+ // "gen_ai.openai.request.service_tier" semantic conventions. It represents the
+ // service tier requested. May be a specific tier, default, or auto.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "auto", "default"
+ GenAIOpenAIRequestServiceTierKey = attribute.Key("gen_ai.openai.request.service_tier")
+
+ // GenAIOpenAIResponseServiceTierKey is the attribute Key conforming to the
+ // "gen_ai.openai.response.service_tier" semantic conventions. It represents the
+ // service tier used for the response.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "scale", "default"
+ GenAIOpenAIResponseServiceTierKey = attribute.Key("gen_ai.openai.response.service_tier")
+
+ // GenAIOpenAIResponseSystemFingerprintKey is the attribute Key conforming to
+ // the "gen_ai.openai.response.system_fingerprint" semantic conventions. It
+ // represents a fingerprint to track any eventual change in the Generative AI
+ // environment.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "fp_44709d6fcb"
+ GenAIOpenAIResponseSystemFingerprintKey = attribute.Key("gen_ai.openai.response.system_fingerprint")
+
+ // GenAIOperationNameKey is the attribute Key conforming to the
+ // "gen_ai.operation.name" semantic conventions. It represents the name of the
+ // operation being performed.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: If one of the predefined values applies, but specific system uses a
+ // different name it's RECOMMENDED to document it in the semantic conventions
+ // for specific GenAI system and use system-specific name in the
+ // instrumentation. If a different name is not documented, instrumentation
+ // libraries SHOULD use applicable predefined value.
+ GenAIOperationNameKey = attribute.Key("gen_ai.operation.name")
+
+ // GenAIOutputTypeKey is the attribute Key conforming to the
+ // "gen_ai.output.type" semantic conventions. It represents the represents the
+ // content type requested by the client.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: This attribute SHOULD be used when the client requests output of a
+ // specific type. The model may return zero or more outputs of this type.
+ // This attribute specifies the output modality and not the actual output
+ // format. For example, if an image is requested, the actual output could be a
+ // URL pointing to an image file.
+ // Additional output format details may be recorded in the future in the
+ // `gen_ai.output.{type}.*` attributes.
+ GenAIOutputTypeKey = attribute.Key("gen_ai.output.type")
+
+ // GenAIRequestChoiceCountKey is the attribute Key conforming to the
+ // "gen_ai.request.choice.count" semantic conventions. It represents the target
+ // number of candidate completions to return.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 3
+ GenAIRequestChoiceCountKey = attribute.Key("gen_ai.request.choice.count")
+
+ // GenAIRequestEncodingFormatsKey is the attribute Key conforming to the
+ // "gen_ai.request.encoding_formats" semantic conventions. It represents the
+ // encoding formats requested in an embeddings operation, if specified.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "base64"], ["float", "binary"
+ // Note: In some GenAI systems the encoding formats are called embedding types.
+ // Also, some GenAI systems only accept a single format per request.
+ GenAIRequestEncodingFormatsKey = attribute.Key("gen_ai.request.encoding_formats")
+
+ // GenAIRequestFrequencyPenaltyKey is the attribute Key conforming to the
+ // "gen_ai.request.frequency_penalty" semantic conventions. It represents the
+ // frequency penalty setting for the GenAI request.
+ //
+ // Type: double
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 0.1
+ GenAIRequestFrequencyPenaltyKey = attribute.Key("gen_ai.request.frequency_penalty")
+
+ // GenAIRequestMaxTokensKey is the attribute Key conforming to the
+ // "gen_ai.request.max_tokens" semantic conventions. It represents the maximum
+ // number of tokens the model generates for a request.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 100
+ GenAIRequestMaxTokensKey = attribute.Key("gen_ai.request.max_tokens")
+
+ // GenAIRequestModelKey is the attribute Key conforming to the
+ // "gen_ai.request.model" semantic conventions. It represents the name of the
+ // GenAI model a request is being made to.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: gpt-4
+ GenAIRequestModelKey = attribute.Key("gen_ai.request.model")
+
+ // GenAIRequestPresencePenaltyKey is the attribute Key conforming to the
+ // "gen_ai.request.presence_penalty" semantic conventions. It represents the
+ // presence penalty setting for the GenAI request.
+ //
+ // Type: double
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 0.1
+ GenAIRequestPresencePenaltyKey = attribute.Key("gen_ai.request.presence_penalty")
+
+ // GenAIRequestSeedKey is the attribute Key conforming to the
+ // "gen_ai.request.seed" semantic conventions. It represents the requests with
+ // same seed value more likely to return same result.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 100
+ GenAIRequestSeedKey = attribute.Key("gen_ai.request.seed")
+
+ // GenAIRequestStopSequencesKey is the attribute Key conforming to the
+ // "gen_ai.request.stop_sequences" semantic conventions. It represents the list
+ // of sequences that the model will use to stop generating further tokens.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "forest", "lived"
+ GenAIRequestStopSequencesKey = attribute.Key("gen_ai.request.stop_sequences")
+
+ // GenAIRequestTemperatureKey is the attribute Key conforming to the
+ // "gen_ai.request.temperature" semantic conventions. It represents the
+ // temperature setting for the GenAI request.
+ //
+ // Type: double
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 0.0
+ GenAIRequestTemperatureKey = attribute.Key("gen_ai.request.temperature")
+
+ // GenAIRequestTopKKey is the attribute Key conforming to the
+ // "gen_ai.request.top_k" semantic conventions. It represents the top_k sampling
+ // setting for the GenAI request.
+ //
+ // Type: double
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 1.0
+ GenAIRequestTopKKey = attribute.Key("gen_ai.request.top_k")
+
+ // GenAIRequestTopPKey is the attribute Key conforming to the
+ // "gen_ai.request.top_p" semantic conventions. It represents the top_p sampling
+ // setting for the GenAI request.
+ //
+ // Type: double
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 1.0
+ GenAIRequestTopPKey = attribute.Key("gen_ai.request.top_p")
+
+ // GenAIResponseFinishReasonsKey is the attribute Key conforming to the
+ // "gen_ai.response.finish_reasons" semantic conventions. It represents the
+ // array of reasons the model stopped generating tokens, corresponding to each
+ // generation received.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "stop"], ["stop", "length"
+ GenAIResponseFinishReasonsKey = attribute.Key("gen_ai.response.finish_reasons")
+
+ // GenAIResponseIDKey is the attribute Key conforming to the
+ // "gen_ai.response.id" semantic conventions. It represents the unique
+ // identifier for the completion.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "chatcmpl-123"
+ GenAIResponseIDKey = attribute.Key("gen_ai.response.id")
+
+ // GenAIResponseModelKey is the attribute Key conforming to the
+ // "gen_ai.response.model" semantic conventions. It represents the name of the
+ // model that generated the response.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "gpt-4-0613"
+ GenAIResponseModelKey = attribute.Key("gen_ai.response.model")
+
+ // GenAISystemKey is the attribute Key conforming to the "gen_ai.system"
+ // semantic conventions. It represents the Generative AI product as identified
+ // by the client or server instrumentation.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: openai
+ // Note: The `gen_ai.system` describes a family of GenAI models with specific
+ // model identified
+ // by `gen_ai.request.model` and `gen_ai.response.model` attributes.
+ //
+ // The actual GenAI product may differ from the one identified by the client.
+ // Multiple systems, including Azure OpenAI and Gemini, are accessible by OpenAI
+ // client
+ // libraries. In such cases, the `gen_ai.system` is set to `openai` based on the
+ // instrumentation's best knowledge, instead of the actual system. The
+ // `server.address`
+ // attribute may help identify the actual system in use for `openai`.
+ //
+ // For custom model, a custom friendly name SHOULD be used.
+ // If none of these options apply, the `gen_ai.system` SHOULD be set to `_OTHER`
+ // .
+ GenAISystemKey = attribute.Key("gen_ai.system")
+
+ // GenAITokenTypeKey is the attribute Key conforming to the "gen_ai.token.type"
+ // semantic conventions. It represents the type of token being counted.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "input", "output"
+ GenAITokenTypeKey = attribute.Key("gen_ai.token.type")
+
+ // GenAIToolCallIDKey is the attribute Key conforming to the
+ // "gen_ai.tool.call.id" semantic conventions. It represents the tool call
+ // identifier.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "call_mszuSIzqtI65i1wAUOE8w5H4"
+ GenAIToolCallIDKey = attribute.Key("gen_ai.tool.call.id")
+
+ // GenAIToolDescriptionKey is the attribute Key conforming to the
+ // "gen_ai.tool.description" semantic conventions. It represents the tool
+ // description.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Multiply two numbers"
+ GenAIToolDescriptionKey = attribute.Key("gen_ai.tool.description")
+
+ // GenAIToolNameKey is the attribute Key conforming to the "gen_ai.tool.name"
+ // semantic conventions. It represents the name of the tool utilized by the
+ // agent.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Flights"
+ GenAIToolNameKey = attribute.Key("gen_ai.tool.name")
+
+ // GenAIToolTypeKey is the attribute Key conforming to the "gen_ai.tool.type"
+ // semantic conventions. It represents the type of the tool utilized by the
+ // agent.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "function", "extension", "datastore"
+ // Note: Extension: A tool executed on the agent-side to directly call external
+ // APIs, bridging the gap between the agent and real-world systems.
+ // Agent-side operations involve actions that are performed by the agent on the
+ // server or within the agent's controlled environment.
+ // Function: A tool executed on the client-side, where the agent generates
+ // parameters for a predefined function, and the client executes the logic.
+ // Client-side operations are actions taken on the user's end or within the
+ // client application.
+ // Datastore: A tool used by the agent to access and query structured or
+ // unstructured external data for retrieval-augmented tasks or knowledge
+ // updates.
+ GenAIToolTypeKey = attribute.Key("gen_ai.tool.type")
+
+ // GenAIUsageInputTokensKey is the attribute Key conforming to the
+ // "gen_ai.usage.input_tokens" semantic conventions. It represents the number of
+ // tokens used in the GenAI input (prompt).
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 100
+ GenAIUsageInputTokensKey = attribute.Key("gen_ai.usage.input_tokens")
+
+ // GenAIUsageOutputTokensKey is the attribute Key conforming to the
+ // "gen_ai.usage.output_tokens" semantic conventions. It represents the number
+ // of tokens used in the GenAI response (completion).
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 180
+ GenAIUsageOutputTokensKey = attribute.Key("gen_ai.usage.output_tokens")
+)
+
+// GenAIAgentDescription returns an attribute KeyValue conforming to the
+// "gen_ai.agent.description" semantic conventions. It represents the free-form
+// description of the GenAI agent provided by the application.
+func GenAIAgentDescription(val string) attribute.KeyValue {
+ return GenAIAgentDescriptionKey.String(val)
+}
+
+// GenAIAgentID returns an attribute KeyValue conforming to the "gen_ai.agent.id"
+// semantic conventions. It represents the unique identifier of the GenAI agent.
+func GenAIAgentID(val string) attribute.KeyValue {
+ return GenAIAgentIDKey.String(val)
+}
+
+// GenAIAgentName returns an attribute KeyValue conforming to the
+// "gen_ai.agent.name" semantic conventions. It represents the human-readable
+// name of the GenAI agent provided by the application.
+func GenAIAgentName(val string) attribute.KeyValue {
+ return GenAIAgentNameKey.String(val)
+}
+
+// GenAIConversationID returns an attribute KeyValue conforming to the
+// "gen_ai.conversation.id" semantic conventions. It represents the unique
+// identifier for a conversation (session, thread), used to store and correlate
+// messages within this conversation.
+func GenAIConversationID(val string) attribute.KeyValue {
+ return GenAIConversationIDKey.String(val)
+}
+
+// GenAIDataSourceID returns an attribute KeyValue conforming to the
+// "gen_ai.data_source.id" semantic conventions. It represents the data source
+// identifier.
+func GenAIDataSourceID(val string) attribute.KeyValue {
+ return GenAIDataSourceIDKey.String(val)
+}
+
+// GenAIOpenAIResponseServiceTier returns an attribute KeyValue conforming to the
+// "gen_ai.openai.response.service_tier" semantic conventions. It represents the
+// service tier used for the response.
+func GenAIOpenAIResponseServiceTier(val string) attribute.KeyValue {
+ return GenAIOpenAIResponseServiceTierKey.String(val)
+}
+
+// GenAIOpenAIResponseSystemFingerprint returns an attribute KeyValue conforming
+// to the "gen_ai.openai.response.system_fingerprint" semantic conventions. It
+// represents a fingerprint to track any eventual change in the Generative AI
+// environment.
+func GenAIOpenAIResponseSystemFingerprint(val string) attribute.KeyValue {
+ return GenAIOpenAIResponseSystemFingerprintKey.String(val)
+}
+
+// GenAIRequestChoiceCount returns an attribute KeyValue conforming to the
+// "gen_ai.request.choice.count" semantic conventions. It represents the target
+// number of candidate completions to return.
+func GenAIRequestChoiceCount(val int) attribute.KeyValue {
+ return GenAIRequestChoiceCountKey.Int(val)
+}
+
+// GenAIRequestEncodingFormats returns an attribute KeyValue conforming to the
+// "gen_ai.request.encoding_formats" semantic conventions. It represents the
+// encoding formats requested in an embeddings operation, if specified.
+func GenAIRequestEncodingFormats(val ...string) attribute.KeyValue {
+ return GenAIRequestEncodingFormatsKey.StringSlice(val)
+}
+
+// GenAIRequestFrequencyPenalty returns an attribute KeyValue conforming to the
+// "gen_ai.request.frequency_penalty" semantic conventions. It represents the
+// frequency penalty setting for the GenAI request.
+func GenAIRequestFrequencyPenalty(val float64) attribute.KeyValue {
+ return GenAIRequestFrequencyPenaltyKey.Float64(val)
+}
+
+// GenAIRequestMaxTokens returns an attribute KeyValue conforming to the
+// "gen_ai.request.max_tokens" semantic conventions. It represents the maximum
+// number of tokens the model generates for a request.
+func GenAIRequestMaxTokens(val int) attribute.KeyValue {
+ return GenAIRequestMaxTokensKey.Int(val)
+}
+
+// GenAIRequestModel returns an attribute KeyValue conforming to the
+// "gen_ai.request.model" semantic conventions. It represents the name of the
+// GenAI model a request is being made to.
+func GenAIRequestModel(val string) attribute.KeyValue {
+ return GenAIRequestModelKey.String(val)
+}
+
+// GenAIRequestPresencePenalty returns an attribute KeyValue conforming to the
+// "gen_ai.request.presence_penalty" semantic conventions. It represents the
+// presence penalty setting for the GenAI request.
+func GenAIRequestPresencePenalty(val float64) attribute.KeyValue {
+ return GenAIRequestPresencePenaltyKey.Float64(val)
+}
+
+// GenAIRequestSeed returns an attribute KeyValue conforming to the
+// "gen_ai.request.seed" semantic conventions. It represents the requests with
+// same seed value more likely to return same result.
+func GenAIRequestSeed(val int) attribute.KeyValue {
+ return GenAIRequestSeedKey.Int(val)
+}
+
+// GenAIRequestStopSequences returns an attribute KeyValue conforming to the
+// "gen_ai.request.stop_sequences" semantic conventions. It represents the list
+// of sequences that the model will use to stop generating further tokens.
+func GenAIRequestStopSequences(val ...string) attribute.KeyValue {
+ return GenAIRequestStopSequencesKey.StringSlice(val)
+}
+
+// GenAIRequestTemperature returns an attribute KeyValue conforming to the
+// "gen_ai.request.temperature" semantic conventions. It represents the
+// temperature setting for the GenAI request.
+func GenAIRequestTemperature(val float64) attribute.KeyValue {
+ return GenAIRequestTemperatureKey.Float64(val)
+}
+
+// GenAIRequestTopK returns an attribute KeyValue conforming to the
+// "gen_ai.request.top_k" semantic conventions. It represents the top_k sampling
+// setting for the GenAI request.
+func GenAIRequestTopK(val float64) attribute.KeyValue {
+ return GenAIRequestTopKKey.Float64(val)
+}
+
+// GenAIRequestTopP returns an attribute KeyValue conforming to the
+// "gen_ai.request.top_p" semantic conventions. It represents the top_p sampling
+// setting for the GenAI request.
+func GenAIRequestTopP(val float64) attribute.KeyValue {
+ return GenAIRequestTopPKey.Float64(val)
+}
+
+// GenAIResponseFinishReasons returns an attribute KeyValue conforming to the
+// "gen_ai.response.finish_reasons" semantic conventions. It represents the array
+// of reasons the model stopped generating tokens, corresponding to each
+// generation received.
+func GenAIResponseFinishReasons(val ...string) attribute.KeyValue {
+ return GenAIResponseFinishReasonsKey.StringSlice(val)
+}
+
+// GenAIResponseID returns an attribute KeyValue conforming to the
+// "gen_ai.response.id" semantic conventions. It represents the unique identifier
+// for the completion.
+func GenAIResponseID(val string) attribute.KeyValue {
+ return GenAIResponseIDKey.String(val)
+}
+
+// GenAIResponseModel returns an attribute KeyValue conforming to the
+// "gen_ai.response.model" semantic conventions. It represents the name of the
+// model that generated the response.
+func GenAIResponseModel(val string) attribute.KeyValue {
+ return GenAIResponseModelKey.String(val)
+}
+
+// GenAIToolCallID returns an attribute KeyValue conforming to the
+// "gen_ai.tool.call.id" semantic conventions. It represents the tool call
+// identifier.
+func GenAIToolCallID(val string) attribute.KeyValue {
+ return GenAIToolCallIDKey.String(val)
+}
+
+// GenAIToolDescription returns an attribute KeyValue conforming to the
+// "gen_ai.tool.description" semantic conventions. It represents the tool
+// description.
+func GenAIToolDescription(val string) attribute.KeyValue {
+ return GenAIToolDescriptionKey.String(val)
+}
+
+// GenAIToolName returns an attribute KeyValue conforming to the
+// "gen_ai.tool.name" semantic conventions. It represents the name of the tool
+// utilized by the agent.
+func GenAIToolName(val string) attribute.KeyValue {
+ return GenAIToolNameKey.String(val)
+}
+
+// GenAIToolType returns an attribute KeyValue conforming to the
+// "gen_ai.tool.type" semantic conventions. It represents the type of the tool
+// utilized by the agent.
+func GenAIToolType(val string) attribute.KeyValue {
+ return GenAIToolTypeKey.String(val)
+}
+
+// GenAIUsageInputTokens returns an attribute KeyValue conforming to the
+// "gen_ai.usage.input_tokens" semantic conventions. It represents the number of
+// tokens used in the GenAI input (prompt).
+func GenAIUsageInputTokens(val int) attribute.KeyValue {
+ return GenAIUsageInputTokensKey.Int(val)
+}
+
+// GenAIUsageOutputTokens returns an attribute KeyValue conforming to the
+// "gen_ai.usage.output_tokens" semantic conventions. It represents the number of
+// tokens used in the GenAI response (completion).
+func GenAIUsageOutputTokens(val int) attribute.KeyValue {
+ return GenAIUsageOutputTokensKey.Int(val)
+}
+
+// Enum values for gen_ai.openai.request.service_tier
+var (
+ // The system will utilize scale tier credits until they are exhausted.
+ // Stability: development
+ GenAIOpenAIRequestServiceTierAuto = GenAIOpenAIRequestServiceTierKey.String("auto")
+ // The system will utilize the default scale tier.
+ // Stability: development
+ GenAIOpenAIRequestServiceTierDefault = GenAIOpenAIRequestServiceTierKey.String("default")
+)
+
+// Enum values for gen_ai.operation.name
+var (
+ // Chat completion operation such as [OpenAI Chat API]
+ // Stability: development
+ //
+ // [OpenAI Chat API]: https://platform.openai.com/docs/api-reference/chat
+ GenAIOperationNameChat = GenAIOperationNameKey.String("chat")
+ // Multimodal content generation operation such as [Gemini Generate Content]
+ // Stability: development
+ //
+ // [Gemini Generate Content]: https://ai.google.dev/api/generate-content
+ GenAIOperationNameGenerateContent = GenAIOperationNameKey.String("generate_content")
+ // Text completions operation such as [OpenAI Completions API (Legacy)]
+ // Stability: development
+ //
+ // [OpenAI Completions API (Legacy)]: https://platform.openai.com/docs/api-reference/completions
+ GenAIOperationNameTextCompletion = GenAIOperationNameKey.String("text_completion")
+ // Embeddings operation such as [OpenAI Create embeddings API]
+ // Stability: development
+ //
+ // [OpenAI Create embeddings API]: https://platform.openai.com/docs/api-reference/embeddings/create
+ GenAIOperationNameEmbeddings = GenAIOperationNameKey.String("embeddings")
+ // Create GenAI agent
+ // Stability: development
+ GenAIOperationNameCreateAgent = GenAIOperationNameKey.String("create_agent")
+ // Invoke GenAI agent
+ // Stability: development
+ GenAIOperationNameInvokeAgent = GenAIOperationNameKey.String("invoke_agent")
+ // Execute a tool
+ // Stability: development
+ GenAIOperationNameExecuteTool = GenAIOperationNameKey.String("execute_tool")
+)
+
+// Enum values for gen_ai.output.type
+var (
+ // Plain text
+ // Stability: development
+ GenAIOutputTypeText = GenAIOutputTypeKey.String("text")
+ // JSON object with known or unknown schema
+ // Stability: development
+ GenAIOutputTypeJSON = GenAIOutputTypeKey.String("json")
+ // Image
+ // Stability: development
+ GenAIOutputTypeImage = GenAIOutputTypeKey.String("image")
+ // Speech
+ // Stability: development
+ GenAIOutputTypeSpeech = GenAIOutputTypeKey.String("speech")
+)
+
+// Enum values for gen_ai.system
+var (
+ // OpenAI
+ // Stability: development
+ GenAISystemOpenAI = GenAISystemKey.String("openai")
+ // Any Google generative AI endpoint
+ // Stability: development
+ GenAISystemGCPGenAI = GenAISystemKey.String("gcp.gen_ai")
+ // Vertex AI
+ // Stability: development
+ GenAISystemGCPVertexAI = GenAISystemKey.String("gcp.vertex_ai")
+ // Gemini
+ // Stability: development
+ GenAISystemGCPGemini = GenAISystemKey.String("gcp.gemini")
+ // Deprecated: Use 'gcp.vertex_ai' instead.
+ GenAISystemVertexAI = GenAISystemKey.String("vertex_ai")
+ // Deprecated: Use 'gcp.gemini' instead.
+ GenAISystemGemini = GenAISystemKey.String("gemini")
+ // Anthropic
+ // Stability: development
+ GenAISystemAnthropic = GenAISystemKey.String("anthropic")
+ // Cohere
+ // Stability: development
+ GenAISystemCohere = GenAISystemKey.String("cohere")
+ // Azure AI Inference
+ // Stability: development
+ GenAISystemAzAIInference = GenAISystemKey.String("az.ai.inference")
+ // Azure OpenAI
+ // Stability: development
+ GenAISystemAzAIOpenAI = GenAISystemKey.String("az.ai.openai")
+ // IBM Watsonx AI
+ // Stability: development
+ GenAISystemIBMWatsonxAI = GenAISystemKey.String("ibm.watsonx.ai")
+ // AWS Bedrock
+ // Stability: development
+ GenAISystemAWSBedrock = GenAISystemKey.String("aws.bedrock")
+ // Perplexity
+ // Stability: development
+ GenAISystemPerplexity = GenAISystemKey.String("perplexity")
+ // xAI
+ // Stability: development
+ GenAISystemXai = GenAISystemKey.String("xai")
+ // DeepSeek
+ // Stability: development
+ GenAISystemDeepseek = GenAISystemKey.String("deepseek")
+ // Groq
+ // Stability: development
+ GenAISystemGroq = GenAISystemKey.String("groq")
+ // Mistral AI
+ // Stability: development
+ GenAISystemMistralAI = GenAISystemKey.String("mistral_ai")
+)
+
+// Enum values for gen_ai.token.type
+var (
+ // Input tokens (prompt, input, etc.)
+ // Stability: development
+ GenAITokenTypeInput = GenAITokenTypeKey.String("input")
+ // Deprecated: Replaced by `output`.
+ GenAITokenTypeCompletion = GenAITokenTypeKey.String("output")
+ // Output tokens (completion, response, etc.)
+ // Stability: development
+ GenAITokenTypeOutput = GenAITokenTypeKey.String("output")
+)
+
+// Namespace: geo
+const (
+ // GeoContinentCodeKey is the attribute Key conforming to the
+ // "geo.continent.code" semantic conventions. It represents the two-letter code
+ // representing continent’s name.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ GeoContinentCodeKey = attribute.Key("geo.continent.code")
+
+ // GeoCountryISOCodeKey is the attribute Key conforming to the
+ // "geo.country.iso_code" semantic conventions. It represents the two-letter ISO
+ // Country Code ([ISO 3166-1 alpha2]).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "CA"
+ //
+ // [ISO 3166-1 alpha2]: https://wikipedia.org/wiki/ISO_3166-1#Codes
+ GeoCountryISOCodeKey = attribute.Key("geo.country.iso_code")
+
+ // GeoLocalityNameKey is the attribute Key conforming to the "geo.locality.name"
+ // semantic conventions. It represents the locality name. Represents the name of
+ // a city, town, village, or similar populated place.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Montreal", "Berlin"
+ GeoLocalityNameKey = attribute.Key("geo.locality.name")
+
+ // GeoLocationLatKey is the attribute Key conforming to the "geo.location.lat"
+ // semantic conventions. It represents the latitude of the geo location in
+ // [WGS84].
+ //
+ // Type: double
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 45.505918
+ //
+ // [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84
+ GeoLocationLatKey = attribute.Key("geo.location.lat")
+
+ // GeoLocationLonKey is the attribute Key conforming to the "geo.location.lon"
+ // semantic conventions. It represents the longitude of the geo location in
+ // [WGS84].
+ //
+ // Type: double
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: -73.61483
+ //
+ // [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84
+ GeoLocationLonKey = attribute.Key("geo.location.lon")
+
+ // GeoPostalCodeKey is the attribute Key conforming to the "geo.postal_code"
+ // semantic conventions. It represents the postal code associated with the
+ // location. Values appropriate for this field may also be known as a postcode
+ // or ZIP code and will vary widely from country to country.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "94040"
+ GeoPostalCodeKey = attribute.Key("geo.postal_code")
+
+ // GeoRegionISOCodeKey is the attribute Key conforming to the
+ // "geo.region.iso_code" semantic conventions. It represents the region ISO code
+ // ([ISO 3166-2]).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "CA-QC"
+ //
+ // [ISO 3166-2]: https://wikipedia.org/wiki/ISO_3166-2
+ GeoRegionISOCodeKey = attribute.Key("geo.region.iso_code")
+)
+
+// GeoCountryISOCode returns an attribute KeyValue conforming to the
+// "geo.country.iso_code" semantic conventions. It represents the two-letter ISO
+// Country Code ([ISO 3166-1 alpha2]).
+//
+// [ISO 3166-1 alpha2]: https://wikipedia.org/wiki/ISO_3166-1#Codes
+func GeoCountryISOCode(val string) attribute.KeyValue {
+ return GeoCountryISOCodeKey.String(val)
+}
+
+// GeoLocalityName returns an attribute KeyValue conforming to the
+// "geo.locality.name" semantic conventions. It represents the locality name.
+// Represents the name of a city, town, village, or similar populated place.
+func GeoLocalityName(val string) attribute.KeyValue {
+ return GeoLocalityNameKey.String(val)
+}
+
+// GeoLocationLat returns an attribute KeyValue conforming to the
+// "geo.location.lat" semantic conventions. It represents the latitude of the geo
+// location in [WGS84].
+//
+// [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84
+func GeoLocationLat(val float64) attribute.KeyValue {
+ return GeoLocationLatKey.Float64(val)
+}
+
+// GeoLocationLon returns an attribute KeyValue conforming to the
+// "geo.location.lon" semantic conventions. It represents the longitude of the
+// geo location in [WGS84].
+//
+// [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84
+func GeoLocationLon(val float64) attribute.KeyValue {
+ return GeoLocationLonKey.Float64(val)
+}
+
+// GeoPostalCode returns an attribute KeyValue conforming to the
+// "geo.postal_code" semantic conventions. It represents the postal code
+// associated with the location. Values appropriate for this field may also be
+// known as a postcode or ZIP code and will vary widely from country to country.
+func GeoPostalCode(val string) attribute.KeyValue {
+ return GeoPostalCodeKey.String(val)
+}
+
+// GeoRegionISOCode returns an attribute KeyValue conforming to the
+// "geo.region.iso_code" semantic conventions. It represents the region ISO code
+// ([ISO 3166-2]).
+//
+// [ISO 3166-2]: https://wikipedia.org/wiki/ISO_3166-2
+func GeoRegionISOCode(val string) attribute.KeyValue {
+ return GeoRegionISOCodeKey.String(val)
+}
+
+// Enum values for geo.continent.code
+var (
+ // Africa
+ // Stability: development
+ GeoContinentCodeAf = GeoContinentCodeKey.String("AF")
+ // Antarctica
+ // Stability: development
+ GeoContinentCodeAn = GeoContinentCodeKey.String("AN")
+ // Asia
+ // Stability: development
+ GeoContinentCodeAs = GeoContinentCodeKey.String("AS")
+ // Europe
+ // Stability: development
+ GeoContinentCodeEu = GeoContinentCodeKey.String("EU")
+ // North America
+ // Stability: development
+ GeoContinentCodeNa = GeoContinentCodeKey.String("NA")
+ // Oceania
+ // Stability: development
+ GeoContinentCodeOc = GeoContinentCodeKey.String("OC")
+ // South America
+ // Stability: development
+ GeoContinentCodeSa = GeoContinentCodeKey.String("SA")
+)
+
+// Namespace: go
+const (
+ // GoMemoryTypeKey is the attribute Key conforming to the "go.memory.type"
+ // semantic conventions. It represents the type of memory.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "other", "stack"
+ GoMemoryTypeKey = attribute.Key("go.memory.type")
+)
+
+// Enum values for go.memory.type
+var (
+ // Memory allocated from the heap that is reserved for stack space, whether or
+ // not it is currently in-use.
+ // Stability: development
+ GoMemoryTypeStack = GoMemoryTypeKey.String("stack")
+ // Memory used by the Go runtime, excluding other categories of memory usage
+ // described in this enumeration.
+ // Stability: development
+ GoMemoryTypeOther = GoMemoryTypeKey.String("other")
+)
+
+// Namespace: graphql
+const (
+ // GraphQLDocumentKey is the attribute Key conforming to the "graphql.document"
+ // semantic conventions. It represents the GraphQL document being executed.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: query findBookById { bookById(id: ?) { name } }
+ // Note: The value may be sanitized to exclude sensitive information.
+ GraphQLDocumentKey = attribute.Key("graphql.document")
+
+ // GraphQLOperationNameKey is the attribute Key conforming to the
+ // "graphql.operation.name" semantic conventions. It represents the name of the
+ // operation being executed.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: findBookById
+ GraphQLOperationNameKey = attribute.Key("graphql.operation.name")
+
+ // GraphQLOperationTypeKey is the attribute Key conforming to the
+ // "graphql.operation.type" semantic conventions. It represents the type of the
+ // operation being executed.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "query", "mutation", "subscription"
+ GraphQLOperationTypeKey = attribute.Key("graphql.operation.type")
+)
+
+// GraphQLDocument returns an attribute KeyValue conforming to the
+// "graphql.document" semantic conventions. It represents the GraphQL document
+// being executed.
+func GraphQLDocument(val string) attribute.KeyValue {
+ return GraphQLDocumentKey.String(val)
+}
+
+// GraphQLOperationName returns an attribute KeyValue conforming to the
+// "graphql.operation.name" semantic conventions. It represents the name of the
+// operation being executed.
+func GraphQLOperationName(val string) attribute.KeyValue {
+ return GraphQLOperationNameKey.String(val)
+}
+
+// Enum values for graphql.operation.type
+var (
+ // GraphQL query
+ // Stability: development
+ GraphQLOperationTypeQuery = GraphQLOperationTypeKey.String("query")
+ // GraphQL mutation
+ // Stability: development
+ GraphQLOperationTypeMutation = GraphQLOperationTypeKey.String("mutation")
+ // GraphQL subscription
+ // Stability: development
+ GraphQLOperationTypeSubscription = GraphQLOperationTypeKey.String("subscription")
+)
+
+// Namespace: heroku
+const (
+ // HerokuAppIDKey is the attribute Key conforming to the "heroku.app.id"
+ // semantic conventions. It represents the unique identifier for the
+ // application.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2daa2797-e42b-4624-9322-ec3f968df4da"
+ HerokuAppIDKey = attribute.Key("heroku.app.id")
+
+ // HerokuReleaseCommitKey is the attribute Key conforming to the
+ // "heroku.release.commit" semantic conventions. It represents the commit hash
+ // for the current release.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "e6134959463efd8966b20e75b913cafe3f5ec"
+ HerokuReleaseCommitKey = attribute.Key("heroku.release.commit")
+
+ // HerokuReleaseCreationTimestampKey is the attribute Key conforming to the
+ // "heroku.release.creation_timestamp" semantic conventions. It represents the
+ // time and date the release was created.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2022-10-23T18:00:42Z"
+ HerokuReleaseCreationTimestampKey = attribute.Key("heroku.release.creation_timestamp")
+)
+
+// HerokuAppID returns an attribute KeyValue conforming to the "heroku.app.id"
+// semantic conventions. It represents the unique identifier for the application.
+func HerokuAppID(val string) attribute.KeyValue {
+ return HerokuAppIDKey.String(val)
+}
+
+// HerokuReleaseCommit returns an attribute KeyValue conforming to the
+// "heroku.release.commit" semantic conventions. It represents the commit hash
+// for the current release.
+func HerokuReleaseCommit(val string) attribute.KeyValue {
+ return HerokuReleaseCommitKey.String(val)
+}
+
+// HerokuReleaseCreationTimestamp returns an attribute KeyValue conforming to the
+// "heroku.release.creation_timestamp" semantic conventions. It represents the
+// time and date the release was created.
+func HerokuReleaseCreationTimestamp(val string) attribute.KeyValue {
+ return HerokuReleaseCreationTimestampKey.String(val)
+}
+
+// Namespace: host
+const (
+ // HostArchKey is the attribute Key conforming to the "host.arch" semantic
+ // conventions. It represents the CPU architecture the host system is running
+ // on.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ HostArchKey = attribute.Key("host.arch")
+
+ // HostCPUCacheL2SizeKey is the attribute Key conforming to the
+ // "host.cpu.cache.l2.size" semantic conventions. It represents the amount of
+ // level 2 memory cache available to the processor (in Bytes).
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 12288000
+ HostCPUCacheL2SizeKey = attribute.Key("host.cpu.cache.l2.size")
+
+ // HostCPUFamilyKey is the attribute Key conforming to the "host.cpu.family"
+ // semantic conventions. It represents the family or generation of the CPU.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "6", "PA-RISC 1.1e"
+ HostCPUFamilyKey = attribute.Key("host.cpu.family")
+
+ // HostCPUModelIDKey is the attribute Key conforming to the "host.cpu.model.id"
+ // semantic conventions. It represents the model identifier. It provides more
+ // granular information about the CPU, distinguishing it from other CPUs within
+ // the same family.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "6", "9000/778/B180L"
+ HostCPUModelIDKey = attribute.Key("host.cpu.model.id")
+
+ // HostCPUModelNameKey is the attribute Key conforming to the
+ // "host.cpu.model.name" semantic conventions. It represents the model
+ // designation of the processor.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz"
+ HostCPUModelNameKey = attribute.Key("host.cpu.model.name")
+
+ // HostCPUSteppingKey is the attribute Key conforming to the "host.cpu.stepping"
+ // semantic conventions. It represents the stepping or core revisions.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1", "r1p1"
+ HostCPUSteppingKey = attribute.Key("host.cpu.stepping")
+
+ // HostCPUVendorIDKey is the attribute Key conforming to the
+ // "host.cpu.vendor.id" semantic conventions. It represents the processor
+ // manufacturer identifier. A maximum 12-character string.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "GenuineIntel"
+ // Note: [CPUID] command returns the vendor ID string in EBX, EDX and ECX
+ // registers. Writing these to memory in this order results in a 12-character
+ // string.
+ //
+ // [CPUID]: https://wiki.osdev.org/CPUID
+ HostCPUVendorIDKey = attribute.Key("host.cpu.vendor.id")
+
+ // HostIDKey is the attribute Key conforming to the "host.id" semantic
+ // conventions. It represents the unique host ID. For Cloud, this must be the
+ // instance_id assigned by the cloud provider. For non-containerized systems,
+ // this should be the `machine-id`. See the table below for the sources to use
+ // to determine the `machine-id` based on operating system.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "fdbf79e8af94cb7f9e8df36789187052"
+ HostIDKey = attribute.Key("host.id")
+
+ // HostImageIDKey is the attribute Key conforming to the "host.image.id"
+ // semantic conventions. It represents the VM image ID or host OS image ID. For
+ // Cloud, this value is from the provider.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "ami-07b06b442921831e5"
+ HostImageIDKey = attribute.Key("host.image.id")
+
+ // HostImageNameKey is the attribute Key conforming to the "host.image.name"
+ // semantic conventions. It represents the name of the VM image or OS install
+ // the host was instantiated from.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "infra-ami-eks-worker-node-7d4ec78312", "CentOS-8-x86_64-1905"
+ HostImageNameKey = attribute.Key("host.image.name")
+
+ // HostImageVersionKey is the attribute Key conforming to the
+ // "host.image.version" semantic conventions. It represents the version string
+ // of the VM image or host OS as defined in [Version Attributes].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "0.1"
+ //
+ // [Version Attributes]: /docs/resource/README.md#version-attributes
+ HostImageVersionKey = attribute.Key("host.image.version")
+
+ // HostIPKey is the attribute Key conforming to the "host.ip" semantic
+ // conventions. It represents the available IP addresses of the host, excluding
+ // loopback interfaces.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "192.168.1.140", "fe80::abc2:4a28:737a:609e"
+ // Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6
+ // addresses MUST be specified in the [RFC 5952] format.
+ //
+ // [RFC 5952]: https://www.rfc-editor.org/rfc/rfc5952.html
+ HostIPKey = attribute.Key("host.ip")
+
+ // HostMacKey is the attribute Key conforming to the "host.mac" semantic
+ // conventions. It represents the available MAC addresses of the host, excluding
+ // loopback interfaces.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "AC-DE-48-23-45-67", "AC-DE-48-23-45-67-01-9F"
+ // Note: MAC Addresses MUST be represented in [IEEE RA hexadecimal form]: as
+ // hyphen-separated octets in uppercase hexadecimal form from most to least
+ // significant.
+ //
+ // [IEEE RA hexadecimal form]: https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf
+ HostMacKey = attribute.Key("host.mac")
+
+ // HostNameKey is the attribute Key conforming to the "host.name" semantic
+ // conventions. It represents the name of the host. On Unix systems, it may
+ // contain what the hostname command returns, or the fully qualified hostname,
+ // or another name specified by the user.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "opentelemetry-test"
+ HostNameKey = attribute.Key("host.name")
+
+ // HostTypeKey is the attribute Key conforming to the "host.type" semantic
+ // conventions. It represents the type of host. For Cloud, this must be the
+ // machine type.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "n1-standard-1"
+ HostTypeKey = attribute.Key("host.type")
+)
+
+// HostCPUCacheL2Size returns an attribute KeyValue conforming to the
+// "host.cpu.cache.l2.size" semantic conventions. It represents the amount of
+// level 2 memory cache available to the processor (in Bytes).
+func HostCPUCacheL2Size(val int) attribute.KeyValue {
+ return HostCPUCacheL2SizeKey.Int(val)
+}
+
+// HostCPUFamily returns an attribute KeyValue conforming to the
+// "host.cpu.family" semantic conventions. It represents the family or generation
+// of the CPU.
+func HostCPUFamily(val string) attribute.KeyValue {
+ return HostCPUFamilyKey.String(val)
+}
+
+// HostCPUModelID returns an attribute KeyValue conforming to the
+// "host.cpu.model.id" semantic conventions. It represents the model identifier.
+// It provides more granular information about the CPU, distinguishing it from
+// other CPUs within the same family.
+func HostCPUModelID(val string) attribute.KeyValue {
+ return HostCPUModelIDKey.String(val)
+}
+
+// HostCPUModelName returns an attribute KeyValue conforming to the
+// "host.cpu.model.name" semantic conventions. It represents the model
+// designation of the processor.
+func HostCPUModelName(val string) attribute.KeyValue {
+ return HostCPUModelNameKey.String(val)
+}
+
+// HostCPUStepping returns an attribute KeyValue conforming to the
+// "host.cpu.stepping" semantic conventions. It represents the stepping or core
+// revisions.
+func HostCPUStepping(val string) attribute.KeyValue {
+ return HostCPUSteppingKey.String(val)
+}
+
+// HostCPUVendorID returns an attribute KeyValue conforming to the
+// "host.cpu.vendor.id" semantic conventions. It represents the processor
+// manufacturer identifier. A maximum 12-character string.
+func HostCPUVendorID(val string) attribute.KeyValue {
+ return HostCPUVendorIDKey.String(val)
+}
+
+// HostID returns an attribute KeyValue conforming to the "host.id" semantic
+// conventions. It represents the unique host ID. For Cloud, this must be the
+// instance_id assigned by the cloud provider. For non-containerized systems,
+// this should be the `machine-id`. See the table below for the sources to use to
+// determine the `machine-id` based on operating system.
+func HostID(val string) attribute.KeyValue {
+ return HostIDKey.String(val)
+}
+
+// HostImageID returns an attribute KeyValue conforming to the "host.image.id"
+// semantic conventions. It represents the VM image ID or host OS image ID. For
+// Cloud, this value is from the provider.
+func HostImageID(val string) attribute.KeyValue {
+ return HostImageIDKey.String(val)
+}
+
+// HostImageName returns an attribute KeyValue conforming to the
+// "host.image.name" semantic conventions. It represents the name of the VM image
+// or OS install the host was instantiated from.
+func HostImageName(val string) attribute.KeyValue {
+ return HostImageNameKey.String(val)
+}
+
+// HostImageVersion returns an attribute KeyValue conforming to the
+// "host.image.version" semantic conventions. It represents the version string of
+// the VM image or host OS as defined in [Version Attributes].
+//
+// [Version Attributes]: /docs/resource/README.md#version-attributes
+func HostImageVersion(val string) attribute.KeyValue {
+ return HostImageVersionKey.String(val)
+}
+
+// HostIP returns an attribute KeyValue conforming to the "host.ip" semantic
+// conventions. It represents the available IP addresses of the host, excluding
+// loopback interfaces.
+func HostIP(val ...string) attribute.KeyValue {
+ return HostIPKey.StringSlice(val)
+}
+
+// HostMac returns an attribute KeyValue conforming to the "host.mac" semantic
+// conventions. It represents the available MAC addresses of the host, excluding
+// loopback interfaces.
+func HostMac(val ...string) attribute.KeyValue {
+ return HostMacKey.StringSlice(val)
+}
+
+// HostName returns an attribute KeyValue conforming to the "host.name" semantic
+// conventions. It represents the name of the host. On Unix systems, it may
+// contain what the hostname command returns, or the fully qualified hostname, or
+// another name specified by the user.
+func HostName(val string) attribute.KeyValue {
+ return HostNameKey.String(val)
+}
+
+// HostType returns an attribute KeyValue conforming to the "host.type" semantic
+// conventions. It represents the type of host. For Cloud, this must be the
+// machine type.
+func HostType(val string) attribute.KeyValue {
+ return HostTypeKey.String(val)
+}
+
+// Enum values for host.arch
+var (
+ // AMD64
+ // Stability: development
+ HostArchAMD64 = HostArchKey.String("amd64")
+ // ARM32
+ // Stability: development
+ HostArchARM32 = HostArchKey.String("arm32")
+ // ARM64
+ // Stability: development
+ HostArchARM64 = HostArchKey.String("arm64")
+ // Itanium
+ // Stability: development
+ HostArchIA64 = HostArchKey.String("ia64")
+ // 32-bit PowerPC
+ // Stability: development
+ HostArchPPC32 = HostArchKey.String("ppc32")
+ // 64-bit PowerPC
+ // Stability: development
+ HostArchPPC64 = HostArchKey.String("ppc64")
+ // IBM z/Architecture
+ // Stability: development
+ HostArchS390x = HostArchKey.String("s390x")
+ // 32-bit x86
+ // Stability: development
+ HostArchX86 = HostArchKey.String("x86")
+)
+
+// Namespace: http
+const (
+ // HTTPConnectionStateKey is the attribute Key conforming to the
+ // "http.connection.state" semantic conventions. It represents the state of the
+ // HTTP connection in the HTTP connection pool.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "active", "idle"
+ HTTPConnectionStateKey = attribute.Key("http.connection.state")
+
+ // HTTPRequestBodySizeKey is the attribute Key conforming to the
+ // "http.request.body.size" semantic conventions. It represents the size of the
+ // request payload body in bytes. This is the number of bytes transferred
+ // excluding headers and is often, but not always, present as the
+ // [Content-Length] header. For requests using transport encoding, this should
+ // be the compressed size.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length
+ HTTPRequestBodySizeKey = attribute.Key("http.request.body.size")
+
+ // HTTPRequestMethodKey is the attribute Key conforming to the
+ // "http.request.method" semantic conventions. It represents the HTTP request
+ // method.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "GET", "POST", "HEAD"
+ // Note: HTTP request method value SHOULD be "known" to the instrumentation.
+ // By default, this convention defines "known" methods as the ones listed in
+ // [RFC9110]
+ // and the PATCH method defined in [RFC5789].
+ //
+ // If the HTTP request method is not known to instrumentation, it MUST set the
+ // `http.request.method` attribute to `_OTHER`.
+ //
+ // If the HTTP instrumentation could end up converting valid HTTP request
+ // methods to `_OTHER`, then it MUST provide a way to override
+ // the list of known HTTP methods. If this override is done via environment
+ // variable, then the environment variable MUST be named
+ // OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of
+ // case-sensitive known HTTP methods
+ // (this list MUST be a full override of the default known method, it is not a
+ // list of known methods in addition to the defaults).
+ //
+ // HTTP method names are case-sensitive and `http.request.method` attribute
+ // value MUST match a known HTTP method name exactly.
+ // Instrumentations for specific web frameworks that consider HTTP methods to be
+ // case insensitive, SHOULD populate a canonical equivalent.
+ // Tracing instrumentations that do so, MUST also set
+ // `http.request.method_original` to the original value.
+ //
+ // [RFC9110]: https://www.rfc-editor.org/rfc/rfc9110.html#name-methods
+ // [RFC5789]: https://www.rfc-editor.org/rfc/rfc5789.html
+ HTTPRequestMethodKey = attribute.Key("http.request.method")
+
+ // HTTPRequestMethodOriginalKey is the attribute Key conforming to the
+ // "http.request.method_original" semantic conventions. It represents the
+ // original HTTP method sent by the client in the request line.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "GeT", "ACL", "foo"
+ HTTPRequestMethodOriginalKey = attribute.Key("http.request.method_original")
+
+ // HTTPRequestResendCountKey is the attribute Key conforming to the
+ // "http.request.resend_count" semantic conventions. It represents the ordinal
+ // number of request resending attempt (for any reason, including redirects).
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Note: The resend count SHOULD be updated each time an HTTP request gets
+ // resent by the client, regardless of what was the cause of the resending (e.g.
+ // redirection, authorization failure, 503 Server Unavailable, network issues,
+ // or any other).
+ HTTPRequestResendCountKey = attribute.Key("http.request.resend_count")
+
+ // HTTPRequestSizeKey is the attribute Key conforming to the "http.request.size"
+ // semantic conventions. It represents the total size of the request in bytes.
+ // This should be the total number of bytes sent over the wire, including the
+ // request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and request
+ // body if any.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ HTTPRequestSizeKey = attribute.Key("http.request.size")
+
+ // HTTPResponseBodySizeKey is the attribute Key conforming to the
+ // "http.response.body.size" semantic conventions. It represents the size of the
+ // response payload body in bytes. This is the number of bytes transferred
+ // excluding headers and is often, but not always, present as the
+ // [Content-Length] header. For requests using transport encoding, this should
+ // be the compressed size.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length
+ HTTPResponseBodySizeKey = attribute.Key("http.response.body.size")
+
+ // HTTPResponseSizeKey is the attribute Key conforming to the
+ // "http.response.size" semantic conventions. It represents the total size of
+ // the response in bytes. This should be the total number of bytes sent over the
+ // wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3),
+ // headers, and response body and trailers if any.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ HTTPResponseSizeKey = attribute.Key("http.response.size")
+
+ // HTTPResponseStatusCodeKey is the attribute Key conforming to the
+ // "http.response.status_code" semantic conventions. It represents the
+ // [HTTP response status code].
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: 200
+ //
+ // [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6
+ HTTPResponseStatusCodeKey = attribute.Key("http.response.status_code")
+
+ // HTTPRouteKey is the attribute Key conforming to the "http.route" semantic
+ // conventions. It represents the matched route, that is, the path template in
+ // the format used by the respective server framework.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "/users/:userID?", "{controller}/{action}/{id?}"
+ // Note: MUST NOT be populated when this is not supported by the HTTP server
+ // framework as the route attribute should have low-cardinality and the URI path
+ // can NOT substitute it.
+ // SHOULD include the [application root] if there is one.
+ //
+ // [application root]: /docs/http/http-spans.md#http-server-definitions
+ HTTPRouteKey = attribute.Key("http.route")
+)
+
+// HTTPRequestBodySize returns an attribute KeyValue conforming to the
+// "http.request.body.size" semantic conventions. It represents the size of the
+// request payload body in bytes. This is the number of bytes transferred
+// excluding headers and is often, but not always, present as the
+// [Content-Length] header. For requests using transport encoding, this should be
+// the compressed size.
+//
+// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length
+func HTTPRequestBodySize(val int) attribute.KeyValue {
+ return HTTPRequestBodySizeKey.Int(val)
+}
+
+// HTTPRequestMethodOriginal returns an attribute KeyValue conforming to the
+// "http.request.method_original" semantic conventions. It represents the
+// original HTTP method sent by the client in the request line.
+func HTTPRequestMethodOriginal(val string) attribute.KeyValue {
+ return HTTPRequestMethodOriginalKey.String(val)
+}
+
+// HTTPRequestResendCount returns an attribute KeyValue conforming to the
+// "http.request.resend_count" semantic conventions. It represents the ordinal
+// number of request resending attempt (for any reason, including redirects).
+func HTTPRequestResendCount(val int) attribute.KeyValue {
+ return HTTPRequestResendCountKey.Int(val)
+}
+
+// HTTPRequestSize returns an attribute KeyValue conforming to the
+// "http.request.size" semantic conventions. It represents the total size of the
+// request in bytes. This should be the total number of bytes sent over the wire,
+// including the request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers,
+// and request body if any.
+func HTTPRequestSize(val int) attribute.KeyValue {
+ return HTTPRequestSizeKey.Int(val)
+}
+
+// HTTPResponseBodySize returns an attribute KeyValue conforming to the
+// "http.response.body.size" semantic conventions. It represents the size of the
+// response payload body in bytes. This is the number of bytes transferred
+// excluding headers and is often, but not always, present as the
+// [Content-Length] header. For requests using transport encoding, this should be
+// the compressed size.
+//
+// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length
+func HTTPResponseBodySize(val int) attribute.KeyValue {
+ return HTTPResponseBodySizeKey.Int(val)
+}
+
+// HTTPResponseSize returns an attribute KeyValue conforming to the
+// "http.response.size" semantic conventions. It represents the total size of the
+// response in bytes. This should be the total number of bytes sent over the
+// wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3),
+// headers, and response body and trailers if any.
+func HTTPResponseSize(val int) attribute.KeyValue {
+ return HTTPResponseSizeKey.Int(val)
+}
+
+// HTTPResponseStatusCode returns an attribute KeyValue conforming to the
+// "http.response.status_code" semantic conventions. It represents the
+// [HTTP response status code].
+//
+// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6
+func HTTPResponseStatusCode(val int) attribute.KeyValue {
+ return HTTPResponseStatusCodeKey.Int(val)
+}
+
+// HTTPRoute returns an attribute KeyValue conforming to the "http.route"
+// semantic conventions. It represents the matched route, that is, the path
+// template in the format used by the respective server framework.
+func HTTPRoute(val string) attribute.KeyValue {
+ return HTTPRouteKey.String(val)
+}
+
+// Enum values for http.connection.state
+var (
+ // active state.
+ // Stability: development
+ HTTPConnectionStateActive = HTTPConnectionStateKey.String("active")
+ // idle state.
+ // Stability: development
+ HTTPConnectionStateIdle = HTTPConnectionStateKey.String("idle")
+)
+
+// Enum values for http.request.method
+var (
+ // CONNECT method.
+ // Stability: stable
+ HTTPRequestMethodConnect = HTTPRequestMethodKey.String("CONNECT")
+ // DELETE method.
+ // Stability: stable
+ HTTPRequestMethodDelete = HTTPRequestMethodKey.String("DELETE")
+ // GET method.
+ // Stability: stable
+ HTTPRequestMethodGet = HTTPRequestMethodKey.String("GET")
+ // HEAD method.
+ // Stability: stable
+ HTTPRequestMethodHead = HTTPRequestMethodKey.String("HEAD")
+ // OPTIONS method.
+ // Stability: stable
+ HTTPRequestMethodOptions = HTTPRequestMethodKey.String("OPTIONS")
+ // PATCH method.
+ // Stability: stable
+ HTTPRequestMethodPatch = HTTPRequestMethodKey.String("PATCH")
+ // POST method.
+ // Stability: stable
+ HTTPRequestMethodPost = HTTPRequestMethodKey.String("POST")
+ // PUT method.
+ // Stability: stable
+ HTTPRequestMethodPut = HTTPRequestMethodKey.String("PUT")
+ // TRACE method.
+ // Stability: stable
+ HTTPRequestMethodTrace = HTTPRequestMethodKey.String("TRACE")
+ // Any HTTP method that the instrumentation has no prior knowledge of.
+ // Stability: stable
+ HTTPRequestMethodOther = HTTPRequestMethodKey.String("_OTHER")
+)
+
+// Namespace: hw
+const (
+ // HwIDKey is the attribute Key conforming to the "hw.id" semantic conventions.
+ // It represents an identifier for the hardware component, unique within the
+ // monitored host.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "win32battery_battery_testsysa33_1"
+ HwIDKey = attribute.Key("hw.id")
+
+ // HwNameKey is the attribute Key conforming to the "hw.name" semantic
+ // conventions. It represents an easily-recognizable name for the hardware
+ // component.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "eth0"
+ HwNameKey = attribute.Key("hw.name")
+
+ // HwParentKey is the attribute Key conforming to the "hw.parent" semantic
+ // conventions. It represents the unique identifier of the parent component
+ // (typically the `hw.id` attribute of the enclosure, or disk controller).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "dellStorage_perc_0"
+ HwParentKey = attribute.Key("hw.parent")
+
+ // HwStateKey is the attribute Key conforming to the "hw.state" semantic
+ // conventions. It represents the current state of the component.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ HwStateKey = attribute.Key("hw.state")
+
+ // HwTypeKey is the attribute Key conforming to the "hw.type" semantic
+ // conventions. It represents the type of the component.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: Describes the category of the hardware component for which `hw.state`
+ // is being reported. For example, `hw.type=temperature` along with
+ // `hw.state=degraded` would indicate that the temperature of the hardware
+ // component has been reported as `degraded`.
+ HwTypeKey = attribute.Key("hw.type")
+)
+
+// HwID returns an attribute KeyValue conforming to the "hw.id" semantic
+// conventions. It represents an identifier for the hardware component, unique
+// within the monitored host.
+func HwID(val string) attribute.KeyValue {
+ return HwIDKey.String(val)
+}
+
+// HwName returns an attribute KeyValue conforming to the "hw.name" semantic
+// conventions. It represents an easily-recognizable name for the hardware
+// component.
+func HwName(val string) attribute.KeyValue {
+ return HwNameKey.String(val)
+}
+
+// HwParent returns an attribute KeyValue conforming to the "hw.parent" semantic
+// conventions. It represents the unique identifier of the parent component
+// (typically the `hw.id` attribute of the enclosure, or disk controller).
+func HwParent(val string) attribute.KeyValue {
+ return HwParentKey.String(val)
+}
+
+// Enum values for hw.state
+var (
+ // Ok
+ // Stability: development
+ HwStateOk = HwStateKey.String("ok")
+ // Degraded
+ // Stability: development
+ HwStateDegraded = HwStateKey.String("degraded")
+ // Failed
+ // Stability: development
+ HwStateFailed = HwStateKey.String("failed")
+)
+
+// Enum values for hw.type
+var (
+ // Battery
+ // Stability: development
+ HwTypeBattery = HwTypeKey.String("battery")
+ // CPU
+ // Stability: development
+ HwTypeCPU = HwTypeKey.String("cpu")
+ // Disk controller
+ // Stability: development
+ HwTypeDiskController = HwTypeKey.String("disk_controller")
+ // Enclosure
+ // Stability: development
+ HwTypeEnclosure = HwTypeKey.String("enclosure")
+ // Fan
+ // Stability: development
+ HwTypeFan = HwTypeKey.String("fan")
+ // GPU
+ // Stability: development
+ HwTypeGpu = HwTypeKey.String("gpu")
+ // Logical disk
+ // Stability: development
+ HwTypeLogicalDisk = HwTypeKey.String("logical_disk")
+ // Memory
+ // Stability: development
+ HwTypeMemory = HwTypeKey.String("memory")
+ // Network
+ // Stability: development
+ HwTypeNetwork = HwTypeKey.String("network")
+ // Physical disk
+ // Stability: development
+ HwTypePhysicalDisk = HwTypeKey.String("physical_disk")
+ // Power supply
+ // Stability: development
+ HwTypePowerSupply = HwTypeKey.String("power_supply")
+ // Tape drive
+ // Stability: development
+ HwTypeTapeDrive = HwTypeKey.String("tape_drive")
+ // Temperature
+ // Stability: development
+ HwTypeTemperature = HwTypeKey.String("temperature")
+ // Voltage
+ // Stability: development
+ HwTypeVoltage = HwTypeKey.String("voltage")
+)
+
+// Namespace: ios
+const (
+ // IOSAppStateKey is the attribute Key conforming to the "ios.app.state"
+ // semantic conventions. It represents the this attribute represents the state
+ // of the application.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: The iOS lifecycle states are defined in the
+ // [UIApplicationDelegate documentation], and from which the `OS terminology`
+ // column values are derived.
+ //
+ // [UIApplicationDelegate documentation]: https://developer.apple.com/documentation/uikit/uiapplicationdelegate
+ IOSAppStateKey = attribute.Key("ios.app.state")
+)
+
+// Enum values for ios.app.state
+var (
+ // The app has become `active`. Associated with UIKit notification
+ // `applicationDidBecomeActive`.
+ //
+ // Stability: development
+ IOSAppStateActive = IOSAppStateKey.String("active")
+ // The app is now `inactive`. Associated with UIKit notification
+ // `applicationWillResignActive`.
+ //
+ // Stability: development
+ IOSAppStateInactive = IOSAppStateKey.String("inactive")
+ // The app is now in the background. This value is associated with UIKit
+ // notification `applicationDidEnterBackground`.
+ //
+ // Stability: development
+ IOSAppStateBackground = IOSAppStateKey.String("background")
+ // The app is now in the foreground. This value is associated with UIKit
+ // notification `applicationWillEnterForeground`.
+ //
+ // Stability: development
+ IOSAppStateForeground = IOSAppStateKey.String("foreground")
+ // The app is about to terminate. Associated with UIKit notification
+ // `applicationWillTerminate`.
+ //
+ // Stability: development
+ IOSAppStateTerminate = IOSAppStateKey.String("terminate")
+)
+
+// Namespace: k8s
+const (
+ // K8SClusterNameKey is the attribute Key conforming to the "k8s.cluster.name"
+ // semantic conventions. It represents the name of the cluster.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "opentelemetry-cluster"
+ K8SClusterNameKey = attribute.Key("k8s.cluster.name")
+
+ // K8SClusterUIDKey is the attribute Key conforming to the "k8s.cluster.uid"
+ // semantic conventions. It represents a pseudo-ID for the cluster, set to the
+ // UID of the `kube-system` namespace.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d"
+ // Note: K8s doesn't have support for obtaining a cluster ID. If this is ever
+ // added, we will recommend collecting the `k8s.cluster.uid` through the
+ // official APIs. In the meantime, we are able to use the `uid` of the
+ // `kube-system` namespace as a proxy for cluster ID. Read on for the
+ // rationale.
+ //
+ // Every object created in a K8s cluster is assigned a distinct UID. The
+ // `kube-system` namespace is used by Kubernetes itself and will exist
+ // for the lifetime of the cluster. Using the `uid` of the `kube-system`
+ // namespace is a reasonable proxy for the K8s ClusterID as it will only
+ // change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are
+ // UUIDs as standardized by
+ // [ISO/IEC 9834-8 and ITU-T X.667].
+ // Which states:
+ //
+ // > If generated according to one of the mechanisms defined in Rec.
+ // > ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be
+ // > different from all other UUIDs generated before 3603 A.D., or is
+ // > extremely likely to be different (depending on the mechanism chosen).
+ //
+ // Therefore, UIDs between clusters should be extremely unlikely to
+ // conflict.
+ //
+ // [ISO/IEC 9834-8 and ITU-T X.667]: https://www.itu.int/ITU-T/studygroups/com17/oid.html
+ K8SClusterUIDKey = attribute.Key("k8s.cluster.uid")
+
+ // K8SContainerNameKey is the attribute Key conforming to the
+ // "k8s.container.name" semantic conventions. It represents the name of the
+ // Container from Pod specification, must be unique within a Pod. Container
+ // runtime usually uses different globally unique name (`container.name`).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "redis"
+ K8SContainerNameKey = attribute.Key("k8s.container.name")
+
+ // K8SContainerRestartCountKey is the attribute Key conforming to the
+ // "k8s.container.restart_count" semantic conventions. It represents the number
+ // of times the container was restarted. This attribute can be used to identify
+ // a particular container (running or stopped) within a container spec.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count")
+
+ // K8SContainerStatusLastTerminatedReasonKey is the attribute Key conforming to
+ // the "k8s.container.status.last_terminated_reason" semantic conventions. It
+ // represents the last terminated reason of the Container.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Evicted", "Error"
+ K8SContainerStatusLastTerminatedReasonKey = attribute.Key("k8s.container.status.last_terminated_reason")
+
+ // K8SCronJobNameKey is the attribute Key conforming to the "k8s.cronjob.name"
+ // semantic conventions. It represents the name of the CronJob.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "opentelemetry"
+ K8SCronJobNameKey = attribute.Key("k8s.cronjob.name")
+
+ // K8SCronJobUIDKey is the attribute Key conforming to the "k8s.cronjob.uid"
+ // semantic conventions. It represents the UID of the CronJob.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid")
+
+ // K8SDaemonSetNameKey is the attribute Key conforming to the
+ // "k8s.daemonset.name" semantic conventions. It represents the name of the
+ // DaemonSet.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "opentelemetry"
+ K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name")
+
+ // K8SDaemonSetUIDKey is the attribute Key conforming to the "k8s.daemonset.uid"
+ // semantic conventions. It represents the UID of the DaemonSet.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid")
+
+ // K8SDeploymentNameKey is the attribute Key conforming to the
+ // "k8s.deployment.name" semantic conventions. It represents the name of the
+ // Deployment.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "opentelemetry"
+ K8SDeploymentNameKey = attribute.Key("k8s.deployment.name")
+
+ // K8SDeploymentUIDKey is the attribute Key conforming to the
+ // "k8s.deployment.uid" semantic conventions. It represents the UID of the
+ // Deployment.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid")
+
+ // K8SHPANameKey is the attribute Key conforming to the "k8s.hpa.name" semantic
+ // conventions. It represents the name of the horizontal pod autoscaler.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "opentelemetry"
+ K8SHPANameKey = attribute.Key("k8s.hpa.name")
+
+ // K8SHPAUIDKey is the attribute Key conforming to the "k8s.hpa.uid" semantic
+ // conventions. It represents the UID of the horizontal pod autoscaler.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SHPAUIDKey = attribute.Key("k8s.hpa.uid")
+
+ // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name" semantic
+ // conventions. It represents the name of the Job.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "opentelemetry"
+ K8SJobNameKey = attribute.Key("k8s.job.name")
+
+ // K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid" semantic
+ // conventions. It represents the UID of the Job.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SJobUIDKey = attribute.Key("k8s.job.uid")
+
+ // K8SNamespaceNameKey is the attribute Key conforming to the
+ // "k8s.namespace.name" semantic conventions. It represents the name of the
+ // namespace that the pod is running in.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "default"
+ K8SNamespaceNameKey = attribute.Key("k8s.namespace.name")
+
+ // K8SNamespacePhaseKey is the attribute Key conforming to the
+ // "k8s.namespace.phase" semantic conventions. It represents the phase of the
+ // K8s namespace.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "active", "terminating"
+ // Note: This attribute aligns with the `phase` field of the
+ // [K8s NamespaceStatus]
+ //
+ // [K8s NamespaceStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#namespacestatus-v1-core
+ K8SNamespacePhaseKey = attribute.Key("k8s.namespace.phase")
+
+ // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name"
+ // semantic conventions. It represents the name of the Node.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "node-1"
+ K8SNodeNameKey = attribute.Key("k8s.node.name")
+
+ // K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid" semantic
+ // conventions. It represents the UID of the Node.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2"
+ K8SNodeUIDKey = attribute.Key("k8s.node.uid")
+
+ // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name" semantic
+ // conventions. It represents the name of the Pod.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "opentelemetry-pod-autoconf"
+ K8SPodNameKey = attribute.Key("k8s.pod.name")
+
+ // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid" semantic
+ // conventions. It represents the UID of the Pod.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SPodUIDKey = attribute.Key("k8s.pod.uid")
+
+ // K8SReplicaSetNameKey is the attribute Key conforming to the
+ // "k8s.replicaset.name" semantic conventions. It represents the name of the
+ // ReplicaSet.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "opentelemetry"
+ K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name")
+
+ // K8SReplicaSetUIDKey is the attribute Key conforming to the
+ // "k8s.replicaset.uid" semantic conventions. It represents the UID of the
+ // ReplicaSet.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid")
+
+ // K8SReplicationControllerNameKey is the attribute Key conforming to the
+ // "k8s.replicationcontroller.name" semantic conventions. It represents the name
+ // of the replication controller.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "opentelemetry"
+ K8SReplicationControllerNameKey = attribute.Key("k8s.replicationcontroller.name")
+
+ // K8SReplicationControllerUIDKey is the attribute Key conforming to the
+ // "k8s.replicationcontroller.uid" semantic conventions. It represents the UID
+ // of the replication controller.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SReplicationControllerUIDKey = attribute.Key("k8s.replicationcontroller.uid")
+
+ // K8SResourceQuotaNameKey is the attribute Key conforming to the
+ // "k8s.resourcequota.name" semantic conventions. It represents the name of the
+ // resource quota.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "opentelemetry"
+ K8SResourceQuotaNameKey = attribute.Key("k8s.resourcequota.name")
+
+ // K8SResourceQuotaUIDKey is the attribute Key conforming to the
+ // "k8s.resourcequota.uid" semantic conventions. It represents the UID of the
+ // resource quota.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SResourceQuotaUIDKey = attribute.Key("k8s.resourcequota.uid")
+
+ // K8SStatefulSetNameKey is the attribute Key conforming to the
+ // "k8s.statefulset.name" semantic conventions. It represents the name of the
+ // StatefulSet.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "opentelemetry"
+ K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name")
+
+ // K8SStatefulSetUIDKey is the attribute Key conforming to the
+ // "k8s.statefulset.uid" semantic conventions. It represents the UID of the
+ // StatefulSet.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid")
+
+ // K8SVolumeNameKey is the attribute Key conforming to the "k8s.volume.name"
+ // semantic conventions. It represents the name of the K8s volume.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "volume0"
+ K8SVolumeNameKey = attribute.Key("k8s.volume.name")
+
+ // K8SVolumeTypeKey is the attribute Key conforming to the "k8s.volume.type"
+ // semantic conventions. It represents the type of the K8s volume.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "emptyDir", "persistentVolumeClaim"
+ K8SVolumeTypeKey = attribute.Key("k8s.volume.type")
+)
+
+// K8SClusterName returns an attribute KeyValue conforming to the
+// "k8s.cluster.name" semantic conventions. It represents the name of the
+// cluster.
+func K8SClusterName(val string) attribute.KeyValue {
+ return K8SClusterNameKey.String(val)
+}
+
+// K8SClusterUID returns an attribute KeyValue conforming to the
+// "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for the
+// cluster, set to the UID of the `kube-system` namespace.
+func K8SClusterUID(val string) attribute.KeyValue {
+ return K8SClusterUIDKey.String(val)
+}
+
+// K8SContainerName returns an attribute KeyValue conforming to the
+// "k8s.container.name" semantic conventions. It represents the name of the
+// Container from Pod specification, must be unique within a Pod. Container
+// runtime usually uses different globally unique name (`container.name`).
+func K8SContainerName(val string) attribute.KeyValue {
+ return K8SContainerNameKey.String(val)
+}
+
+// K8SContainerRestartCount returns an attribute KeyValue conforming to the
+// "k8s.container.restart_count" semantic conventions. It represents the number
+// of times the container was restarted. This attribute can be used to identify a
+// particular container (running or stopped) within a container spec.
+func K8SContainerRestartCount(val int) attribute.KeyValue {
+ return K8SContainerRestartCountKey.Int(val)
+}
+
+// K8SContainerStatusLastTerminatedReason returns an attribute KeyValue
+// conforming to the "k8s.container.status.last_terminated_reason" semantic
+// conventions. It represents the last terminated reason of the Container.
+func K8SContainerStatusLastTerminatedReason(val string) attribute.KeyValue {
+ return K8SContainerStatusLastTerminatedReasonKey.String(val)
+}
+
+// K8SCronJobName returns an attribute KeyValue conforming to the
+// "k8s.cronjob.name" semantic conventions. It represents the name of the
+// CronJob.
+func K8SCronJobName(val string) attribute.KeyValue {
+ return K8SCronJobNameKey.String(val)
+}
+
+// K8SCronJobUID returns an attribute KeyValue conforming to the
+// "k8s.cronjob.uid" semantic conventions. It represents the UID of the CronJob.
+func K8SCronJobUID(val string) attribute.KeyValue {
+ return K8SCronJobUIDKey.String(val)
+}
+
+// K8SDaemonSetName returns an attribute KeyValue conforming to the
+// "k8s.daemonset.name" semantic conventions. It represents the name of the
+// DaemonSet.
+func K8SDaemonSetName(val string) attribute.KeyValue {
+ return K8SDaemonSetNameKey.String(val)
+}
+
+// K8SDaemonSetUID returns an attribute KeyValue conforming to the
+// "k8s.daemonset.uid" semantic conventions. It represents the UID of the
+// DaemonSet.
+func K8SDaemonSetUID(val string) attribute.KeyValue {
+ return K8SDaemonSetUIDKey.String(val)
+}
+
+// K8SDeploymentName returns an attribute KeyValue conforming to the
+// "k8s.deployment.name" semantic conventions. It represents the name of the
+// Deployment.
+func K8SDeploymentName(val string) attribute.KeyValue {
+ return K8SDeploymentNameKey.String(val)
+}
+
+// K8SDeploymentUID returns an attribute KeyValue conforming to the
+// "k8s.deployment.uid" semantic conventions. It represents the UID of the
+// Deployment.
+func K8SDeploymentUID(val string) attribute.KeyValue {
+ return K8SDeploymentUIDKey.String(val)
+}
+
+// K8SHPAName returns an attribute KeyValue conforming to the "k8s.hpa.name"
+// semantic conventions. It represents the name of the horizontal pod autoscaler.
+func K8SHPAName(val string) attribute.KeyValue {
+ return K8SHPANameKey.String(val)
+}
+
+// K8SHPAUID returns an attribute KeyValue conforming to the "k8s.hpa.uid"
+// semantic conventions. It represents the UID of the horizontal pod autoscaler.
+func K8SHPAUID(val string) attribute.KeyValue {
+ return K8SHPAUIDKey.String(val)
+}
+
+// K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name"
+// semantic conventions. It represents the name of the Job.
+func K8SJobName(val string) attribute.KeyValue {
+ return K8SJobNameKey.String(val)
+}
+
+// K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid"
+// semantic conventions. It represents the UID of the Job.
+func K8SJobUID(val string) attribute.KeyValue {
+ return K8SJobUIDKey.String(val)
+}
+
+// K8SNamespaceName returns an attribute KeyValue conforming to the
+// "k8s.namespace.name" semantic conventions. It represents the name of the
+// namespace that the pod is running in.
+func K8SNamespaceName(val string) attribute.KeyValue {
+ return K8SNamespaceNameKey.String(val)
+}
+
+// K8SNodeName returns an attribute KeyValue conforming to the "k8s.node.name"
+// semantic conventions. It represents the name of the Node.
+func K8SNodeName(val string) attribute.KeyValue {
+ return K8SNodeNameKey.String(val)
+}
+
+// K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid"
+// semantic conventions. It represents the UID of the Node.
+func K8SNodeUID(val string) attribute.KeyValue {
+ return K8SNodeUIDKey.String(val)
+}
+
+// K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name"
+// semantic conventions. It represents the name of the Pod.
+func K8SPodName(val string) attribute.KeyValue {
+ return K8SPodNameKey.String(val)
+}
+
+// K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid"
+// semantic conventions. It represents the UID of the Pod.
+func K8SPodUID(val string) attribute.KeyValue {
+ return K8SPodUIDKey.String(val)
+}
+
+// K8SReplicaSetName returns an attribute KeyValue conforming to the
+// "k8s.replicaset.name" semantic conventions. It represents the name of the
+// ReplicaSet.
+func K8SReplicaSetName(val string) attribute.KeyValue {
+ return K8SReplicaSetNameKey.String(val)
+}
+
+// K8SReplicaSetUID returns an attribute KeyValue conforming to the
+// "k8s.replicaset.uid" semantic conventions. It represents the UID of the
+// ReplicaSet.
+func K8SReplicaSetUID(val string) attribute.KeyValue {
+ return K8SReplicaSetUIDKey.String(val)
+}
+
+// K8SReplicationControllerName returns an attribute KeyValue conforming to the
+// "k8s.replicationcontroller.name" semantic conventions. It represents the name
+// of the replication controller.
+func K8SReplicationControllerName(val string) attribute.KeyValue {
+ return K8SReplicationControllerNameKey.String(val)
+}
+
+// K8SReplicationControllerUID returns an attribute KeyValue conforming to the
+// "k8s.replicationcontroller.uid" semantic conventions. It represents the UID of
+// the replication controller.
+func K8SReplicationControllerUID(val string) attribute.KeyValue {
+ return K8SReplicationControllerUIDKey.String(val)
+}
+
+// K8SResourceQuotaName returns an attribute KeyValue conforming to the
+// "k8s.resourcequota.name" semantic conventions. It represents the name of the
+// resource quota.
+func K8SResourceQuotaName(val string) attribute.KeyValue {
+ return K8SResourceQuotaNameKey.String(val)
+}
+
+// K8SResourceQuotaUID returns an attribute KeyValue conforming to the
+// "k8s.resourcequota.uid" semantic conventions. It represents the UID of the
+// resource quota.
+func K8SResourceQuotaUID(val string) attribute.KeyValue {
+ return K8SResourceQuotaUIDKey.String(val)
+}
+
+// K8SStatefulSetName returns an attribute KeyValue conforming to the
+// "k8s.statefulset.name" semantic conventions. It represents the name of the
+// StatefulSet.
+func K8SStatefulSetName(val string) attribute.KeyValue {
+ return K8SStatefulSetNameKey.String(val)
+}
+
+// K8SStatefulSetUID returns an attribute KeyValue conforming to the
+// "k8s.statefulset.uid" semantic conventions. It represents the UID of the
+// StatefulSet.
+func K8SStatefulSetUID(val string) attribute.KeyValue {
+ return K8SStatefulSetUIDKey.String(val)
+}
+
+// K8SVolumeName returns an attribute KeyValue conforming to the
+// "k8s.volume.name" semantic conventions. It represents the name of the K8s
+// volume.
+func K8SVolumeName(val string) attribute.KeyValue {
+ return K8SVolumeNameKey.String(val)
+}
+
+// Enum values for k8s.namespace.phase
+var (
+ // Active namespace phase as described by [K8s API]
+ // Stability: development
+ //
+ // [K8s API]: https://pkg.go.dev/k8s.io/api@v0.31.3/core/v1#NamespacePhase
+ K8SNamespacePhaseActive = K8SNamespacePhaseKey.String("active")
+ // Terminating namespace phase as described by [K8s API]
+ // Stability: development
+ //
+ // [K8s API]: https://pkg.go.dev/k8s.io/api@v0.31.3/core/v1#NamespacePhase
+ K8SNamespacePhaseTerminating = K8SNamespacePhaseKey.String("terminating")
+)
+
+// Enum values for k8s.volume.type
+var (
+ // A [persistentVolumeClaim] volume
+ // Stability: development
+ //
+ // [persistentVolumeClaim]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#persistentvolumeclaim
+ K8SVolumeTypePersistentVolumeClaim = K8SVolumeTypeKey.String("persistentVolumeClaim")
+ // A [configMap] volume
+ // Stability: development
+ //
+ // [configMap]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#configmap
+ K8SVolumeTypeConfigMap = K8SVolumeTypeKey.String("configMap")
+ // A [downwardAPI] volume
+ // Stability: development
+ //
+ // [downwardAPI]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#downwardapi
+ K8SVolumeTypeDownwardAPI = K8SVolumeTypeKey.String("downwardAPI")
+ // An [emptyDir] volume
+ // Stability: development
+ //
+ // [emptyDir]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#emptydir
+ K8SVolumeTypeEmptyDir = K8SVolumeTypeKey.String("emptyDir")
+ // A [secret] volume
+ // Stability: development
+ //
+ // [secret]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#secret
+ K8SVolumeTypeSecret = K8SVolumeTypeKey.String("secret")
+ // A [local] volume
+ // Stability: development
+ //
+ // [local]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#local
+ K8SVolumeTypeLocal = K8SVolumeTypeKey.String("local")
+)
+
+// Namespace: linux
+const (
+ // LinuxMemorySlabStateKey is the attribute Key conforming to the
+ // "linux.memory.slab.state" semantic conventions. It represents the Linux Slab
+ // memory state.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "reclaimable", "unreclaimable"
+ LinuxMemorySlabStateKey = attribute.Key("linux.memory.slab.state")
+)
+
+// Enum values for linux.memory.slab.state
+var (
+ // reclaimable
+ // Stability: development
+ LinuxMemorySlabStateReclaimable = LinuxMemorySlabStateKey.String("reclaimable")
+ // unreclaimable
+ // Stability: development
+ LinuxMemorySlabStateUnreclaimable = LinuxMemorySlabStateKey.String("unreclaimable")
+)
+
+// Namespace: log
+const (
+ // LogFileNameKey is the attribute Key conforming to the "log.file.name"
+ // semantic conventions. It represents the basename of the file.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "audit.log"
+ LogFileNameKey = attribute.Key("log.file.name")
+
+ // LogFileNameResolvedKey is the attribute Key conforming to the
+ // "log.file.name_resolved" semantic conventions. It represents the basename of
+ // the file, with symlinks resolved.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "uuid.log"
+ LogFileNameResolvedKey = attribute.Key("log.file.name_resolved")
+
+ // LogFilePathKey is the attribute Key conforming to the "log.file.path"
+ // semantic conventions. It represents the full path to the file.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/var/log/mysql/audit.log"
+ LogFilePathKey = attribute.Key("log.file.path")
+
+ // LogFilePathResolvedKey is the attribute Key conforming to the
+ // "log.file.path_resolved" semantic conventions. It represents the full path to
+ // the file, with symlinks resolved.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/var/lib/docker/uuid.log"
+ LogFilePathResolvedKey = attribute.Key("log.file.path_resolved")
+
+ // LogIostreamKey is the attribute Key conforming to the "log.iostream" semantic
+ // conventions. It represents the stream associated with the log. See below for
+ // a list of well-known values.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ LogIostreamKey = attribute.Key("log.iostream")
+
+ // LogRecordOriginalKey is the attribute Key conforming to the
+ // "log.record.original" semantic conventions. It represents the complete
+ // original Log Record.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - -
+ // Something happened", "[INFO] 8/3/24 12:34:56 Something happened"
+ // Note: This value MAY be added when processing a Log Record which was
+ // originally transmitted as a string or equivalent data type AND the Body field
+ // of the Log Record does not contain the same value. (e.g. a syslog or a log
+ // record read from a file.)
+ LogRecordOriginalKey = attribute.Key("log.record.original")
+
+ // LogRecordUIDKey is the attribute Key conforming to the "log.record.uid"
+ // semantic conventions. It represents a unique identifier for the Log Record.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "01ARZ3NDEKTSV4RRFFQ69G5FAV"
+ // Note: If an id is provided, other log records with the same id will be
+ // considered duplicates and can be removed safely. This means, that two
+ // distinguishable log records MUST have different values.
+ // The id MAY be an
+ // [Universally Unique Lexicographically Sortable Identifier (ULID)], but other
+ // identifiers (e.g. UUID) may be used as needed.
+ //
+ // [Universally Unique Lexicographically Sortable Identifier (ULID)]: https://github.com/ulid/spec
+ LogRecordUIDKey = attribute.Key("log.record.uid")
+)
+
+// LogFileName returns an attribute KeyValue conforming to the "log.file.name"
+// semantic conventions. It represents the basename of the file.
+func LogFileName(val string) attribute.KeyValue {
+ return LogFileNameKey.String(val)
+}
+
+// LogFileNameResolved returns an attribute KeyValue conforming to the
+// "log.file.name_resolved" semantic conventions. It represents the basename of
+// the file, with symlinks resolved.
+func LogFileNameResolved(val string) attribute.KeyValue {
+ return LogFileNameResolvedKey.String(val)
+}
+
+// LogFilePath returns an attribute KeyValue conforming to the "log.file.path"
+// semantic conventions. It represents the full path to the file.
+func LogFilePath(val string) attribute.KeyValue {
+ return LogFilePathKey.String(val)
+}
+
+// LogFilePathResolved returns an attribute KeyValue conforming to the
+// "log.file.path_resolved" semantic conventions. It represents the full path to
+// the file, with symlinks resolved.
+func LogFilePathResolved(val string) attribute.KeyValue {
+ return LogFilePathResolvedKey.String(val)
+}
+
+// LogRecordOriginal returns an attribute KeyValue conforming to the
+// "log.record.original" semantic conventions. It represents the complete
+// original Log Record.
+func LogRecordOriginal(val string) attribute.KeyValue {
+ return LogRecordOriginalKey.String(val)
+}
+
+// LogRecordUID returns an attribute KeyValue conforming to the "log.record.uid"
+// semantic conventions. It represents a unique identifier for the Log Record.
+func LogRecordUID(val string) attribute.KeyValue {
+ return LogRecordUIDKey.String(val)
+}
+
+// Enum values for log.iostream
+var (
+ // Logs from stdout stream
+ // Stability: development
+ LogIostreamStdout = LogIostreamKey.String("stdout")
+ // Events from stderr stream
+ // Stability: development
+ LogIostreamStderr = LogIostreamKey.String("stderr")
+)
+
+// Namespace: messaging
+const (
+ // MessagingBatchMessageCountKey is the attribute Key conforming to the
+ // "messaging.batch.message_count" semantic conventions. It represents the
+ // number of messages sent, received, or processed in the scope of the batching
+ // operation.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 0, 1, 2
+ // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on
+ // spans that operate with a single message. When a messaging client library
+ // supports both batch and single-message API for the same operation,
+ // instrumentations SHOULD use `messaging.batch.message_count` for batching APIs
+ // and SHOULD NOT use it for single-message APIs.
+ MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count")
+
+ // MessagingClientIDKey is the attribute Key conforming to the
+ // "messaging.client.id" semantic conventions. It represents a unique identifier
+ // for the client that consumes or produces a message.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "client-5", "myhost@8742@s8083jm"
+ MessagingClientIDKey = attribute.Key("messaging.client.id")
+
+ // MessagingConsumerGroupNameKey is the attribute Key conforming to the
+ // "messaging.consumer.group.name" semantic conventions. It represents the name
+ // of the consumer group with which a consumer is associated.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-group", "indexer"
+ // Note: Semantic conventions for individual messaging systems SHOULD document
+ // whether `messaging.consumer.group.name` is applicable and what it means in
+ // the context of that system.
+ MessagingConsumerGroupNameKey = attribute.Key("messaging.consumer.group.name")
+
+ // MessagingDestinationAnonymousKey is the attribute Key conforming to the
+ // "messaging.destination.anonymous" semantic conventions. It represents a
+ // boolean that is true if the message destination is anonymous (could be
+ // unnamed or have auto-generated name).
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous")
+
+ // MessagingDestinationNameKey is the attribute Key conforming to the
+ // "messaging.destination.name" semantic conventions. It represents the message
+ // destination name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "MyQueue", "MyTopic"
+ // Note: Destination name SHOULD uniquely identify a specific queue, topic or
+ // other entity within the broker. If
+ // the broker doesn't have such notion, the destination name SHOULD uniquely
+ // identify the broker.
+ MessagingDestinationNameKey = attribute.Key("messaging.destination.name")
+
+ // MessagingDestinationPartitionIDKey is the attribute Key conforming to the
+ // "messaging.destination.partition.id" semantic conventions. It represents the
+ // identifier of the partition messages are sent to or received from, unique
+ // within the `messaging.destination.name`.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 1
+ MessagingDestinationPartitionIDKey = attribute.Key("messaging.destination.partition.id")
+
+ // MessagingDestinationSubscriptionNameKey is the attribute Key conforming to
+ // the "messaging.destination.subscription.name" semantic conventions. It
+ // represents the name of the destination subscription from which a message is
+ // consumed.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "subscription-a"
+ // Note: Semantic conventions for individual messaging systems SHOULD document
+ // whether `messaging.destination.subscription.name` is applicable and what it
+ // means in the context of that system.
+ MessagingDestinationSubscriptionNameKey = attribute.Key("messaging.destination.subscription.name")
+
+ // MessagingDestinationTemplateKey is the attribute Key conforming to the
+ // "messaging.destination.template" semantic conventions. It represents the low
+ // cardinality representation of the messaging destination name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/customers/{customerId}"
+ // Note: Destination names could be constructed from templates. An example would
+ // be a destination name involving a user name or product id. Although the
+ // destination name in this case is of high cardinality, the underlying template
+ // is of low cardinality and can be effectively used for grouping and
+ // aggregation.
+ MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template")
+
+ // MessagingDestinationTemporaryKey is the attribute Key conforming to the
+ // "messaging.destination.temporary" semantic conventions. It represents a
+ // boolean that is true if the message destination is temporary and might not
+ // exist anymore after messages are processed.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary")
+
+ // MessagingEventHubsMessageEnqueuedTimeKey is the attribute Key conforming to
+ // the "messaging.eventhubs.message.enqueued_time" semantic conventions. It
+ // represents the UTC epoch seconds at which the message has been accepted and
+ // stored in the entity.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ MessagingEventHubsMessageEnqueuedTimeKey = attribute.Key("messaging.eventhubs.message.enqueued_time")
+
+ // MessagingGCPPubSubMessageAckDeadlineKey is the attribute Key conforming to
+ // the "messaging.gcp_pubsub.message.ack_deadline" semantic conventions. It
+ // represents the ack deadline in seconds set for the modify ack deadline
+ // request.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ MessagingGCPPubSubMessageAckDeadlineKey = attribute.Key("messaging.gcp_pubsub.message.ack_deadline")
+
+ // MessagingGCPPubSubMessageAckIDKey is the attribute Key conforming to the
+ // "messaging.gcp_pubsub.message.ack_id" semantic conventions. It represents the
+ // ack id for a given message.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: ack_id
+ MessagingGCPPubSubMessageAckIDKey = attribute.Key("messaging.gcp_pubsub.message.ack_id")
+
+ // MessagingGCPPubSubMessageDeliveryAttemptKey is the attribute Key conforming
+ // to the "messaging.gcp_pubsub.message.delivery_attempt" semantic conventions.
+ // It represents the delivery attempt for a given message.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ MessagingGCPPubSubMessageDeliveryAttemptKey = attribute.Key("messaging.gcp_pubsub.message.delivery_attempt")
+
+ // MessagingGCPPubSubMessageOrderingKeyKey is the attribute Key conforming to
+ // the "messaging.gcp_pubsub.message.ordering_key" semantic conventions. It
+ // represents the ordering key for a given message. If the attribute is not
+ // present, the message does not have an ordering key.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: ordering_key
+ MessagingGCPPubSubMessageOrderingKeyKey = attribute.Key("messaging.gcp_pubsub.message.ordering_key")
+
+ // MessagingKafkaMessageKeyKey is the attribute Key conforming to the
+ // "messaging.kafka.message.key" semantic conventions. It represents the message
+ // keys in Kafka are used for grouping alike messages to ensure they're
+ // processed on the same partition. They differ from `messaging.message.id` in
+ // that they're not unique. If the key is `null`, the attribute MUST NOT be set.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: myKey
+ // Note: If the key type is not string, it's string representation has to be
+ // supplied for the attribute. If the key has no unambiguous, canonical string
+ // form, don't include its value.
+ MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key")
+
+ // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the
+ // "messaging.kafka.message.tombstone" semantic conventions. It represents a
+ // boolean that is true if the message is a tombstone.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone")
+
+ // MessagingKafkaOffsetKey is the attribute Key conforming to the
+ // "messaging.kafka.offset" semantic conventions. It represents the offset of a
+ // record in the corresponding Kafka partition.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ MessagingKafkaOffsetKey = attribute.Key("messaging.kafka.offset")
+
+ // MessagingMessageBodySizeKey is the attribute Key conforming to the
+ // "messaging.message.body.size" semantic conventions. It represents the size of
+ // the message body in bytes.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Note: This can refer to both the compressed or uncompressed body size. If
+ // both sizes are known, the uncompressed
+ // body size should be used.
+ MessagingMessageBodySizeKey = attribute.Key("messaging.message.body.size")
+
+ // MessagingMessageConversationIDKey is the attribute Key conforming to the
+ // "messaging.message.conversation_id" semantic conventions. It represents the
+ // conversation ID identifying the conversation to which the message belongs,
+ // represented as a string. Sometimes called "Correlation ID".
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: MyConversationId
+ MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id")
+
+ // MessagingMessageEnvelopeSizeKey is the attribute Key conforming to the
+ // "messaging.message.envelope.size" semantic conventions. It represents the
+ // size of the message body and metadata in bytes.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Note: This can refer to both the compressed or uncompressed size. If both
+ // sizes are known, the uncompressed
+ // size should be used.
+ MessagingMessageEnvelopeSizeKey = attribute.Key("messaging.message.envelope.size")
+
+ // MessagingMessageIDKey is the attribute Key conforming to the
+ // "messaging.message.id" semantic conventions. It represents a value used by
+ // the messaging system as an identifier for the message, represented as a
+ // string.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 452a7c7c7c7048c2f887f61572b18fc2
+ MessagingMessageIDKey = attribute.Key("messaging.message.id")
+
+ // MessagingOperationNameKey is the attribute Key conforming to the
+ // "messaging.operation.name" semantic conventions. It represents the
+ // system-specific name of the messaging operation.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "ack", "nack", "send"
+ MessagingOperationNameKey = attribute.Key("messaging.operation.name")
+
+ // MessagingOperationTypeKey is the attribute Key conforming to the
+ // "messaging.operation.type" semantic conventions. It represents a string
+ // identifying the type of the messaging operation.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: If a custom value is used, it MUST be of low cardinality.
+ MessagingOperationTypeKey = attribute.Key("messaging.operation.type")
+
+ // MessagingRabbitMQDestinationRoutingKeyKey is the attribute Key conforming to
+ // the "messaging.rabbitmq.destination.routing_key" semantic conventions. It
+ // represents the rabbitMQ message routing key.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: myKey
+ MessagingRabbitMQDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key")
+
+ // MessagingRabbitMQMessageDeliveryTagKey is the attribute Key conforming to the
+ // "messaging.rabbitmq.message.delivery_tag" semantic conventions. It represents
+ // the rabbitMQ message delivery tag.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ MessagingRabbitMQMessageDeliveryTagKey = attribute.Key("messaging.rabbitmq.message.delivery_tag")
+
+ // MessagingRocketMQConsumptionModelKey is the attribute Key conforming to the
+ // "messaging.rocketmq.consumption_model" semantic conventions. It represents
+ // the model of message consumption. This only applies to consumer spans.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ MessagingRocketMQConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model")
+
+ // MessagingRocketMQMessageDelayTimeLevelKey is the attribute Key conforming to
+ // the "messaging.rocketmq.message.delay_time_level" semantic conventions. It
+ // represents the delay time level for delay message, which determines the
+ // message delay time.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ MessagingRocketMQMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level")
+
+ // MessagingRocketMQMessageDeliveryTimestampKey is the attribute Key conforming
+ // to the "messaging.rocketmq.message.delivery_timestamp" semantic conventions.
+ // It represents the timestamp in milliseconds that the delay message is
+ // expected to be delivered to consumer.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ MessagingRocketMQMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp")
+
+ // MessagingRocketMQMessageGroupKey is the attribute Key conforming to the
+ // "messaging.rocketmq.message.group" semantic conventions. It represents the it
+ // is essential for FIFO message. Messages that belong to the same message group
+ // are always processed one by one within the same consumer group.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: myMessageGroup
+ MessagingRocketMQMessageGroupKey = attribute.Key("messaging.rocketmq.message.group")
+
+ // MessagingRocketMQMessageKeysKey is the attribute Key conforming to the
+ // "messaging.rocketmq.message.keys" semantic conventions. It represents the
+ // key(s) of message, another way to mark message besides message id.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "keyA", "keyB"
+ MessagingRocketMQMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys")
+
+ // MessagingRocketMQMessageTagKey is the attribute Key conforming to the
+ // "messaging.rocketmq.message.tag" semantic conventions. It represents the
+ // secondary classifier of message besides topic.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: tagA
+ MessagingRocketMQMessageTagKey = attribute.Key("messaging.rocketmq.message.tag")
+
+ // MessagingRocketMQMessageTypeKey is the attribute Key conforming to the
+ // "messaging.rocketmq.message.type" semantic conventions. It represents the
+ // type of message.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ MessagingRocketMQMessageTypeKey = attribute.Key("messaging.rocketmq.message.type")
+
+ // MessagingRocketMQNamespaceKey is the attribute Key conforming to the
+ // "messaging.rocketmq.namespace" semantic conventions. It represents the
+ // namespace of RocketMQ resources, resources in different namespaces are
+ // individual.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: myNamespace
+ MessagingRocketMQNamespaceKey = attribute.Key("messaging.rocketmq.namespace")
+
+ // MessagingServiceBusDispositionStatusKey is the attribute Key conforming to
+ // the "messaging.servicebus.disposition_status" semantic conventions. It
+ // represents the describes the [settlement type].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ //
+ // [settlement type]: https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock
+ MessagingServiceBusDispositionStatusKey = attribute.Key("messaging.servicebus.disposition_status")
+
+ // MessagingServiceBusMessageDeliveryCountKey is the attribute Key conforming to
+ // the "messaging.servicebus.message.delivery_count" semantic conventions. It
+ // represents the number of deliveries that have been attempted for this
+ // message.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ MessagingServiceBusMessageDeliveryCountKey = attribute.Key("messaging.servicebus.message.delivery_count")
+
+ // MessagingServiceBusMessageEnqueuedTimeKey is the attribute Key conforming to
+ // the "messaging.servicebus.message.enqueued_time" semantic conventions. It
+ // represents the UTC epoch seconds at which the message has been accepted and
+ // stored in the entity.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ MessagingServiceBusMessageEnqueuedTimeKey = attribute.Key("messaging.servicebus.message.enqueued_time")
+
+ // MessagingSystemKey is the attribute Key conforming to the "messaging.system"
+ // semantic conventions. It represents the messaging system as identified by the
+ // client instrumentation.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: The actual messaging system may differ from the one known by the
+ // client. For example, when using Kafka client libraries to communicate with
+ // Azure Event Hubs, the `messaging.system` is set to `kafka` based on the
+ // instrumentation's best knowledge.
+ MessagingSystemKey = attribute.Key("messaging.system")
+)
+
+// MessagingBatchMessageCount returns an attribute KeyValue conforming to the
+// "messaging.batch.message_count" semantic conventions. It represents the number
+// of messages sent, received, or processed in the scope of the batching
+// operation.
+func MessagingBatchMessageCount(val int) attribute.KeyValue {
+ return MessagingBatchMessageCountKey.Int(val)
+}
+
+// MessagingClientID returns an attribute KeyValue conforming to the
+// "messaging.client.id" semantic conventions. It represents a unique identifier
+// for the client that consumes or produces a message.
+func MessagingClientID(val string) attribute.KeyValue {
+ return MessagingClientIDKey.String(val)
+}
+
+// MessagingConsumerGroupName returns an attribute KeyValue conforming to the
+// "messaging.consumer.group.name" semantic conventions. It represents the name
+// of the consumer group with which a consumer is associated.
+func MessagingConsumerGroupName(val string) attribute.KeyValue {
+ return MessagingConsumerGroupNameKey.String(val)
+}
+
+// MessagingDestinationAnonymous returns an attribute KeyValue conforming to the
+// "messaging.destination.anonymous" semantic conventions. It represents a
+// boolean that is true if the message destination is anonymous (could be unnamed
+// or have auto-generated name).
+func MessagingDestinationAnonymous(val bool) attribute.KeyValue {
+ return MessagingDestinationAnonymousKey.Bool(val)
+}
+
+// MessagingDestinationName returns an attribute KeyValue conforming to the
+// "messaging.destination.name" semantic conventions. It represents the message
+// destination name.
+func MessagingDestinationName(val string) attribute.KeyValue {
+ return MessagingDestinationNameKey.String(val)
+}
+
+// MessagingDestinationPartitionID returns an attribute KeyValue conforming to
+// the "messaging.destination.partition.id" semantic conventions. It represents
+// the identifier of the partition messages are sent to or received from, unique
+// within the `messaging.destination.name`.
+func MessagingDestinationPartitionID(val string) attribute.KeyValue {
+ return MessagingDestinationPartitionIDKey.String(val)
+}
+
+// MessagingDestinationSubscriptionName returns an attribute KeyValue conforming
+// to the "messaging.destination.subscription.name" semantic conventions. It
+// represents the name of the destination subscription from which a message is
+// consumed.
+func MessagingDestinationSubscriptionName(val string) attribute.KeyValue {
+ return MessagingDestinationSubscriptionNameKey.String(val)
+}
+
+// MessagingDestinationTemplate returns an attribute KeyValue conforming to the
+// "messaging.destination.template" semantic conventions. It represents the low
+// cardinality representation of the messaging destination name.
+func MessagingDestinationTemplate(val string) attribute.KeyValue {
+ return MessagingDestinationTemplateKey.String(val)
+}
+
+// MessagingDestinationTemporary returns an attribute KeyValue conforming to the
+// "messaging.destination.temporary" semantic conventions. It represents a
+// boolean that is true if the message destination is temporary and might not
+// exist anymore after messages are processed.
+func MessagingDestinationTemporary(val bool) attribute.KeyValue {
+ return MessagingDestinationTemporaryKey.Bool(val)
+}
+
+// MessagingEventHubsMessageEnqueuedTime returns an attribute KeyValue conforming
+// to the "messaging.eventhubs.message.enqueued_time" semantic conventions. It
+// represents the UTC epoch seconds at which the message has been accepted and
+// stored in the entity.
+func MessagingEventHubsMessageEnqueuedTime(val int) attribute.KeyValue {
+ return MessagingEventHubsMessageEnqueuedTimeKey.Int(val)
+}
+
+// MessagingGCPPubSubMessageAckDeadline returns an attribute KeyValue conforming
+// to the "messaging.gcp_pubsub.message.ack_deadline" semantic conventions. It
+// represents the ack deadline in seconds set for the modify ack deadline
+// request.
+func MessagingGCPPubSubMessageAckDeadline(val int) attribute.KeyValue {
+ return MessagingGCPPubSubMessageAckDeadlineKey.Int(val)
+}
+
+// MessagingGCPPubSubMessageAckID returns an attribute KeyValue conforming to the
+// "messaging.gcp_pubsub.message.ack_id" semantic conventions. It represents the
+// ack id for a given message.
+func MessagingGCPPubSubMessageAckID(val string) attribute.KeyValue {
+ return MessagingGCPPubSubMessageAckIDKey.String(val)
+}
+
+// MessagingGCPPubSubMessageDeliveryAttempt returns an attribute KeyValue
+// conforming to the "messaging.gcp_pubsub.message.delivery_attempt" semantic
+// conventions. It represents the delivery attempt for a given message.
+func MessagingGCPPubSubMessageDeliveryAttempt(val int) attribute.KeyValue {
+ return MessagingGCPPubSubMessageDeliveryAttemptKey.Int(val)
+}
+
+// MessagingGCPPubSubMessageOrderingKey returns an attribute KeyValue conforming
+// to the "messaging.gcp_pubsub.message.ordering_key" semantic conventions. It
+// represents the ordering key for a given message. If the attribute is not
+// present, the message does not have an ordering key.
+func MessagingGCPPubSubMessageOrderingKey(val string) attribute.KeyValue {
+ return MessagingGCPPubSubMessageOrderingKeyKey.String(val)
+}
+
+// MessagingKafkaMessageKey returns an attribute KeyValue conforming to the
+// "messaging.kafka.message.key" semantic conventions. It represents the message
+// keys in Kafka are used for grouping alike messages to ensure they're processed
+// on the same partition. They differ from `messaging.message.id` in that they're
+// not unique. If the key is `null`, the attribute MUST NOT be set.
+func MessagingKafkaMessageKey(val string) attribute.KeyValue {
+ return MessagingKafkaMessageKeyKey.String(val)
+}
+
+// MessagingKafkaMessageTombstone returns an attribute KeyValue conforming to the
+// "messaging.kafka.message.tombstone" semantic conventions. It represents a
+// boolean that is true if the message is a tombstone.
+func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue {
+ return MessagingKafkaMessageTombstoneKey.Bool(val)
+}
+
+// MessagingKafkaOffset returns an attribute KeyValue conforming to the
+// "messaging.kafka.offset" semantic conventions. It represents the offset of a
+// record in the corresponding Kafka partition.
+func MessagingKafkaOffset(val int) attribute.KeyValue {
+ return MessagingKafkaOffsetKey.Int(val)
+}
+
+// MessagingMessageBodySize returns an attribute KeyValue conforming to the
+// "messaging.message.body.size" semantic conventions. It represents the size of
+// the message body in bytes.
+func MessagingMessageBodySize(val int) attribute.KeyValue {
+ return MessagingMessageBodySizeKey.Int(val)
+}
+
+// MessagingMessageConversationID returns an attribute KeyValue conforming to the
+// "messaging.message.conversation_id" semantic conventions. It represents the
+// conversation ID identifying the conversation to which the message belongs,
+// represented as a string. Sometimes called "Correlation ID".
+func MessagingMessageConversationID(val string) attribute.KeyValue {
+ return MessagingMessageConversationIDKey.String(val)
+}
+
+// MessagingMessageEnvelopeSize returns an attribute KeyValue conforming to the
+// "messaging.message.envelope.size" semantic conventions. It represents the size
+// of the message body and metadata in bytes.
+func MessagingMessageEnvelopeSize(val int) attribute.KeyValue {
+ return MessagingMessageEnvelopeSizeKey.Int(val)
+}
+
+// MessagingMessageID returns an attribute KeyValue conforming to the
+// "messaging.message.id" semantic conventions. It represents a value used by the
+// messaging system as an identifier for the message, represented as a string.
+func MessagingMessageID(val string) attribute.KeyValue {
+ return MessagingMessageIDKey.String(val)
+}
+
+// MessagingOperationName returns an attribute KeyValue conforming to the
+// "messaging.operation.name" semantic conventions. It represents the
+// system-specific name of the messaging operation.
+func MessagingOperationName(val string) attribute.KeyValue {
+ return MessagingOperationNameKey.String(val)
+}
+
+// MessagingRabbitMQDestinationRoutingKey returns an attribute KeyValue
+// conforming to the "messaging.rabbitmq.destination.routing_key" semantic
+// conventions. It represents the rabbitMQ message routing key.
+func MessagingRabbitMQDestinationRoutingKey(val string) attribute.KeyValue {
+ return MessagingRabbitMQDestinationRoutingKeyKey.String(val)
+}
+
+// MessagingRabbitMQMessageDeliveryTag returns an attribute KeyValue conforming
+// to the "messaging.rabbitmq.message.delivery_tag" semantic conventions. It
+// represents the rabbitMQ message delivery tag.
+func MessagingRabbitMQMessageDeliveryTag(val int) attribute.KeyValue {
+ return MessagingRabbitMQMessageDeliveryTagKey.Int(val)
+}
+
+// MessagingRocketMQMessageDelayTimeLevel returns an attribute KeyValue
+// conforming to the "messaging.rocketmq.message.delay_time_level" semantic
+// conventions. It represents the delay time level for delay message, which
+// determines the message delay time.
+func MessagingRocketMQMessageDelayTimeLevel(val int) attribute.KeyValue {
+ return MessagingRocketMQMessageDelayTimeLevelKey.Int(val)
+}
+
+// MessagingRocketMQMessageDeliveryTimestamp returns an attribute KeyValue
+// conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic
+// conventions. It represents the timestamp in milliseconds that the delay
+// message is expected to be delivered to consumer.
+func MessagingRocketMQMessageDeliveryTimestamp(val int) attribute.KeyValue {
+ return MessagingRocketMQMessageDeliveryTimestampKey.Int(val)
+}
+
+// MessagingRocketMQMessageGroup returns an attribute KeyValue conforming to the
+// "messaging.rocketmq.message.group" semantic conventions. It represents the it
+// is essential for FIFO message. Messages that belong to the same message group
+// are always processed one by one within the same consumer group.
+func MessagingRocketMQMessageGroup(val string) attribute.KeyValue {
+ return MessagingRocketMQMessageGroupKey.String(val)
+}
+
+// MessagingRocketMQMessageKeys returns an attribute KeyValue conforming to the
+// "messaging.rocketmq.message.keys" semantic conventions. It represents the
+// key(s) of message, another way to mark message besides message id.
+func MessagingRocketMQMessageKeys(val ...string) attribute.KeyValue {
+ return MessagingRocketMQMessageKeysKey.StringSlice(val)
+}
+
+// MessagingRocketMQMessageTag returns an attribute KeyValue conforming to the
+// "messaging.rocketmq.message.tag" semantic conventions. It represents the
+// secondary classifier of message besides topic.
+func MessagingRocketMQMessageTag(val string) attribute.KeyValue {
+ return MessagingRocketMQMessageTagKey.String(val)
+}
+
+// MessagingRocketMQNamespace returns an attribute KeyValue conforming to the
+// "messaging.rocketmq.namespace" semantic conventions. It represents the
+// namespace of RocketMQ resources, resources in different namespaces are
+// individual.
+func MessagingRocketMQNamespace(val string) attribute.KeyValue {
+ return MessagingRocketMQNamespaceKey.String(val)
+}
+
+// MessagingServiceBusMessageDeliveryCount returns an attribute KeyValue
+// conforming to the "messaging.servicebus.message.delivery_count" semantic
+// conventions. It represents the number of deliveries that have been attempted
+// for this message.
+func MessagingServiceBusMessageDeliveryCount(val int) attribute.KeyValue {
+ return MessagingServiceBusMessageDeliveryCountKey.Int(val)
+}
+
+// MessagingServiceBusMessageEnqueuedTime returns an attribute KeyValue
+// conforming to the "messaging.servicebus.message.enqueued_time" semantic
+// conventions. It represents the UTC epoch seconds at which the message has been
+// accepted and stored in the entity.
+func MessagingServiceBusMessageEnqueuedTime(val int) attribute.KeyValue {
+ return MessagingServiceBusMessageEnqueuedTimeKey.Int(val)
+}
+
+// Enum values for messaging.operation.type
+var (
+ // A message is created. "Create" spans always refer to a single message and are
+ // used to provide a unique creation context for messages in batch sending
+ // scenarios.
+ //
+ // Stability: development
+ MessagingOperationTypeCreate = MessagingOperationTypeKey.String("create")
+ // One or more messages are provided for sending to an intermediary. If a single
+ // message is sent, the context of the "Send" span can be used as the creation
+ // context and no "Create" span needs to be created.
+ //
+ // Stability: development
+ MessagingOperationTypeSend = MessagingOperationTypeKey.String("send")
+ // One or more messages are requested by a consumer. This operation refers to
+ // pull-based scenarios, where consumers explicitly call methods of messaging
+ // SDKs to receive messages.
+ //
+ // Stability: development
+ MessagingOperationTypeReceive = MessagingOperationTypeKey.String("receive")
+ // One or more messages are processed by a consumer.
+ //
+ // Stability: development
+ MessagingOperationTypeProcess = MessagingOperationTypeKey.String("process")
+ // One or more messages are settled.
+ //
+ // Stability: development
+ MessagingOperationTypeSettle = MessagingOperationTypeKey.String("settle")
+ // Deprecated: Replaced by `process`.
+ MessagingOperationTypeDeliver = MessagingOperationTypeKey.String("deliver")
+ // Deprecated: Replaced by `send`.
+ MessagingOperationTypePublish = MessagingOperationTypeKey.String("publish")
+)
+
+// Enum values for messaging.rocketmq.consumption_model
+var (
+ // Clustering consumption model
+ // Stability: development
+ MessagingRocketMQConsumptionModelClustering = MessagingRocketMQConsumptionModelKey.String("clustering")
+ // Broadcasting consumption model
+ // Stability: development
+ MessagingRocketMQConsumptionModelBroadcasting = MessagingRocketMQConsumptionModelKey.String("broadcasting")
+)
+
+// Enum values for messaging.rocketmq.message.type
+var (
+ // Normal message
+ // Stability: development
+ MessagingRocketMQMessageTypeNormal = MessagingRocketMQMessageTypeKey.String("normal")
+ // FIFO message
+ // Stability: development
+ MessagingRocketMQMessageTypeFifo = MessagingRocketMQMessageTypeKey.String("fifo")
+ // Delay message
+ // Stability: development
+ MessagingRocketMQMessageTypeDelay = MessagingRocketMQMessageTypeKey.String("delay")
+ // Transaction message
+ // Stability: development
+ MessagingRocketMQMessageTypeTransaction = MessagingRocketMQMessageTypeKey.String("transaction")
+)
+
+// Enum values for messaging.servicebus.disposition_status
+var (
+ // Message is completed
+ // Stability: development
+ MessagingServiceBusDispositionStatusComplete = MessagingServiceBusDispositionStatusKey.String("complete")
+ // Message is abandoned
+ // Stability: development
+ MessagingServiceBusDispositionStatusAbandon = MessagingServiceBusDispositionStatusKey.String("abandon")
+ // Message is sent to dead letter queue
+ // Stability: development
+ MessagingServiceBusDispositionStatusDeadLetter = MessagingServiceBusDispositionStatusKey.String("dead_letter")
+ // Message is deferred
+ // Stability: development
+ MessagingServiceBusDispositionStatusDefer = MessagingServiceBusDispositionStatusKey.String("defer")
+)
+
+// Enum values for messaging.system
+var (
+ // Apache ActiveMQ
+ // Stability: development
+ MessagingSystemActiveMQ = MessagingSystemKey.String("activemq")
+ // Amazon Simple Queue Service (SQS)
+ // Stability: development
+ MessagingSystemAWSSQS = MessagingSystemKey.String("aws_sqs")
+ // Azure Event Grid
+ // Stability: development
+ MessagingSystemEventGrid = MessagingSystemKey.String("eventgrid")
+ // Azure Event Hubs
+ // Stability: development
+ MessagingSystemEventHubs = MessagingSystemKey.String("eventhubs")
+ // Azure Service Bus
+ // Stability: development
+ MessagingSystemServiceBus = MessagingSystemKey.String("servicebus")
+ // Google Cloud Pub/Sub
+ // Stability: development
+ MessagingSystemGCPPubSub = MessagingSystemKey.String("gcp_pubsub")
+ // Java Message Service
+ // Stability: development
+ MessagingSystemJMS = MessagingSystemKey.String("jms")
+ // Apache Kafka
+ // Stability: development
+ MessagingSystemKafka = MessagingSystemKey.String("kafka")
+ // RabbitMQ
+ // Stability: development
+ MessagingSystemRabbitMQ = MessagingSystemKey.String("rabbitmq")
+ // Apache RocketMQ
+ // Stability: development
+ MessagingSystemRocketMQ = MessagingSystemKey.String("rocketmq")
+ // Apache Pulsar
+ // Stability: development
+ MessagingSystemPulsar = MessagingSystemKey.String("pulsar")
+)
+
+// Namespace: network
+const (
+ // NetworkCarrierICCKey is the attribute Key conforming to the
+ // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
+ // alpha-2 2-character country code associated with the mobile carrier network.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: DE
+ NetworkCarrierICCKey = attribute.Key("network.carrier.icc")
+
+ // NetworkCarrierMCCKey is the attribute Key conforming to the
+ // "network.carrier.mcc" semantic conventions. It represents the mobile carrier
+ // country code.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 310
+ NetworkCarrierMCCKey = attribute.Key("network.carrier.mcc")
+
+ // NetworkCarrierMNCKey is the attribute Key conforming to the
+ // "network.carrier.mnc" semantic conventions. It represents the mobile carrier
+ // network code.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 001
+ NetworkCarrierMNCKey = attribute.Key("network.carrier.mnc")
+
+ // NetworkCarrierNameKey is the attribute Key conforming to the
+ // "network.carrier.name" semantic conventions. It represents the name of the
+ // mobile carrier.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: sprint
+ NetworkCarrierNameKey = attribute.Key("network.carrier.name")
+
+ // NetworkConnectionStateKey is the attribute Key conforming to the
+ // "network.connection.state" semantic conventions. It represents the state of
+ // network connection.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "close_wait"
+ // Note: Connection states are defined as part of the [rfc9293]
+ //
+ // [rfc9293]: https://datatracker.ietf.org/doc/html/rfc9293#section-3.3.2
+ NetworkConnectionStateKey = attribute.Key("network.connection.state")
+
+ // NetworkConnectionSubtypeKey is the attribute Key conforming to the
+ // "network.connection.subtype" semantic conventions. It represents the this
+ // describes more details regarding the connection.type. It may be the type of
+ // cell technology connection, but it could be used for describing details about
+ // a wifi connection.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: LTE
+ NetworkConnectionSubtypeKey = attribute.Key("network.connection.subtype")
+
+ // NetworkConnectionTypeKey is the attribute Key conforming to the
+ // "network.connection.type" semantic conventions. It represents the internet
+ // connection type.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: wifi
+ NetworkConnectionTypeKey = attribute.Key("network.connection.type")
+
+ // NetworkInterfaceNameKey is the attribute Key conforming to the
+ // "network.interface.name" semantic conventions. It represents the network
+ // interface name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "lo", "eth0"
+ NetworkInterfaceNameKey = attribute.Key("network.interface.name")
+
+ // NetworkIODirectionKey is the attribute Key conforming to the
+ // "network.io.direction" semantic conventions. It represents the network IO
+ // operation direction.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "transmit"
+ NetworkIODirectionKey = attribute.Key("network.io.direction")
+
+ // NetworkLocalAddressKey is the attribute Key conforming to the
+ // "network.local.address" semantic conventions. It represents the local address
+ // of the network connection - IP address or Unix domain socket name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "10.1.2.80", "/tmp/my.sock"
+ NetworkLocalAddressKey = attribute.Key("network.local.address")
+
+ // NetworkLocalPortKey is the attribute Key conforming to the
+ // "network.local.port" semantic conventions. It represents the local port
+ // number of the network connection.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: 65123
+ NetworkLocalPortKey = attribute.Key("network.local.port")
+
+ // NetworkPeerAddressKey is the attribute Key conforming to the
+ // "network.peer.address" semantic conventions. It represents the peer address
+ // of the network connection - IP address or Unix domain socket name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "10.1.2.80", "/tmp/my.sock"
+ NetworkPeerAddressKey = attribute.Key("network.peer.address")
+
+ // NetworkPeerPortKey is the attribute Key conforming to the "network.peer.port"
+ // semantic conventions. It represents the peer port number of the network
+ // connection.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: 65123
+ NetworkPeerPortKey = attribute.Key("network.peer.port")
+
+ // NetworkProtocolNameKey is the attribute Key conforming to the
+ // "network.protocol.name" semantic conventions. It represents the
+ // [OSI application layer] or non-OSI equivalent.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "amqp", "http", "mqtt"
+ // Note: The value SHOULD be normalized to lowercase.
+ //
+ // [OSI application layer]: https://wikipedia.org/wiki/Application_layer
+ NetworkProtocolNameKey = attribute.Key("network.protocol.name")
+
+ // NetworkProtocolVersionKey is the attribute Key conforming to the
+ // "network.protocol.version" semantic conventions. It represents the actual
+ // version of the protocol used for network communication.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "1.1", "2"
+ // Note: If protocol version is subject to negotiation (for example using [ALPN]
+ // ), this attribute SHOULD be set to the negotiated version. If the actual
+ // protocol version is not known, this attribute SHOULD NOT be set.
+ //
+ // [ALPN]: https://www.rfc-editor.org/rfc/rfc7301.html
+ NetworkProtocolVersionKey = attribute.Key("network.protocol.version")
+
+ // NetworkTransportKey is the attribute Key conforming to the
+ // "network.transport" semantic conventions. It represents the
+ // [OSI transport layer] or [inter-process communication method].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "tcp", "udp"
+ // Note: The value SHOULD be normalized to lowercase.
+ //
+ // Consider always setting the transport when setting a port number, since
+ // a port number is ambiguous without knowing the transport. For example
+ // different processes could be listening on TCP port 12345 and UDP port 12345.
+ //
+ // [OSI transport layer]: https://wikipedia.org/wiki/Transport_layer
+ // [inter-process communication method]: https://wikipedia.org/wiki/Inter-process_communication
+ NetworkTransportKey = attribute.Key("network.transport")
+
+ // NetworkTypeKey is the attribute Key conforming to the "network.type" semantic
+ // conventions. It represents the [OSI network layer] or non-OSI equivalent.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "ipv4", "ipv6"
+ // Note: The value SHOULD be normalized to lowercase.
+ //
+ // [OSI network layer]: https://wikipedia.org/wiki/Network_layer
+ NetworkTypeKey = attribute.Key("network.type")
+)
+
+// NetworkCarrierICC returns an attribute KeyValue conforming to the
+// "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
+// alpha-2 2-character country code associated with the mobile carrier network.
+func NetworkCarrierICC(val string) attribute.KeyValue {
+ return NetworkCarrierICCKey.String(val)
+}
+
+// NetworkCarrierMCC returns an attribute KeyValue conforming to the
+// "network.carrier.mcc" semantic conventions. It represents the mobile carrier
+// country code.
+func NetworkCarrierMCC(val string) attribute.KeyValue {
+ return NetworkCarrierMCCKey.String(val)
+}
+
+// NetworkCarrierMNC returns an attribute KeyValue conforming to the
+// "network.carrier.mnc" semantic conventions. It represents the mobile carrier
+// network code.
+func NetworkCarrierMNC(val string) attribute.KeyValue {
+ return NetworkCarrierMNCKey.String(val)
+}
+
+// NetworkCarrierName returns an attribute KeyValue conforming to the
+// "network.carrier.name" semantic conventions. It represents the name of the
+// mobile carrier.
+func NetworkCarrierName(val string) attribute.KeyValue {
+ return NetworkCarrierNameKey.String(val)
+}
+
+// NetworkInterfaceName returns an attribute KeyValue conforming to the
+// "network.interface.name" semantic conventions. It represents the network
+// interface name.
+func NetworkInterfaceName(val string) attribute.KeyValue {
+ return NetworkInterfaceNameKey.String(val)
+}
+
+// NetworkLocalAddress returns an attribute KeyValue conforming to the
+// "network.local.address" semantic conventions. It represents the local address
+// of the network connection - IP address or Unix domain socket name.
+func NetworkLocalAddress(val string) attribute.KeyValue {
+ return NetworkLocalAddressKey.String(val)
+}
+
+// NetworkLocalPort returns an attribute KeyValue conforming to the
+// "network.local.port" semantic conventions. It represents the local port number
+// of the network connection.
+func NetworkLocalPort(val int) attribute.KeyValue {
+ return NetworkLocalPortKey.Int(val)
+}
+
+// NetworkPeerAddress returns an attribute KeyValue conforming to the
+// "network.peer.address" semantic conventions. It represents the peer address of
+// the network connection - IP address or Unix domain socket name.
+func NetworkPeerAddress(val string) attribute.KeyValue {
+ return NetworkPeerAddressKey.String(val)
+}
+
+// NetworkPeerPort returns an attribute KeyValue conforming to the
+// "network.peer.port" semantic conventions. It represents the peer port number
+// of the network connection.
+func NetworkPeerPort(val int) attribute.KeyValue {
+ return NetworkPeerPortKey.Int(val)
+}
+
+// NetworkProtocolName returns an attribute KeyValue conforming to the
+// "network.protocol.name" semantic conventions. It represents the
+// [OSI application layer] or non-OSI equivalent.
+//
+// [OSI application layer]: https://wikipedia.org/wiki/Application_layer
+func NetworkProtocolName(val string) attribute.KeyValue {
+ return NetworkProtocolNameKey.String(val)
+}
+
+// NetworkProtocolVersion returns an attribute KeyValue conforming to the
+// "network.protocol.version" semantic conventions. It represents the actual
+// version of the protocol used for network communication.
+func NetworkProtocolVersion(val string) attribute.KeyValue {
+ return NetworkProtocolVersionKey.String(val)
+}
+
+// Enum values for network.connection.state
+var (
+ // closed
+ // Stability: development
+ NetworkConnectionStateClosed = NetworkConnectionStateKey.String("closed")
+ // close_wait
+ // Stability: development
+ NetworkConnectionStateCloseWait = NetworkConnectionStateKey.String("close_wait")
+ // closing
+ // Stability: development
+ NetworkConnectionStateClosing = NetworkConnectionStateKey.String("closing")
+ // established
+ // Stability: development
+ NetworkConnectionStateEstablished = NetworkConnectionStateKey.String("established")
+ // fin_wait_1
+ // Stability: development
+ NetworkConnectionStateFinWait1 = NetworkConnectionStateKey.String("fin_wait_1")
+ // fin_wait_2
+ // Stability: development
+ NetworkConnectionStateFinWait2 = NetworkConnectionStateKey.String("fin_wait_2")
+ // last_ack
+ // Stability: development
+ NetworkConnectionStateLastAck = NetworkConnectionStateKey.String("last_ack")
+ // listen
+ // Stability: development
+ NetworkConnectionStateListen = NetworkConnectionStateKey.String("listen")
+ // syn_received
+ // Stability: development
+ NetworkConnectionStateSynReceived = NetworkConnectionStateKey.String("syn_received")
+ // syn_sent
+ // Stability: development
+ NetworkConnectionStateSynSent = NetworkConnectionStateKey.String("syn_sent")
+ // time_wait
+ // Stability: development
+ NetworkConnectionStateTimeWait = NetworkConnectionStateKey.String("time_wait")
+)
+
+// Enum values for network.connection.subtype
+var (
+ // GPRS
+ // Stability: development
+ NetworkConnectionSubtypeGprs = NetworkConnectionSubtypeKey.String("gprs")
+ // EDGE
+ // Stability: development
+ NetworkConnectionSubtypeEdge = NetworkConnectionSubtypeKey.String("edge")
+ // UMTS
+ // Stability: development
+ NetworkConnectionSubtypeUmts = NetworkConnectionSubtypeKey.String("umts")
+ // CDMA
+ // Stability: development
+ NetworkConnectionSubtypeCdma = NetworkConnectionSubtypeKey.String("cdma")
+ // EVDO Rel. 0
+ // Stability: development
+ NetworkConnectionSubtypeEvdo0 = NetworkConnectionSubtypeKey.String("evdo_0")
+ // EVDO Rev. A
+ // Stability: development
+ NetworkConnectionSubtypeEvdoA = NetworkConnectionSubtypeKey.String("evdo_a")
+ // CDMA2000 1XRTT
+ // Stability: development
+ NetworkConnectionSubtypeCdma20001xrtt = NetworkConnectionSubtypeKey.String("cdma2000_1xrtt")
+ // HSDPA
+ // Stability: development
+ NetworkConnectionSubtypeHsdpa = NetworkConnectionSubtypeKey.String("hsdpa")
+ // HSUPA
+ // Stability: development
+ NetworkConnectionSubtypeHsupa = NetworkConnectionSubtypeKey.String("hsupa")
+ // HSPA
+ // Stability: development
+ NetworkConnectionSubtypeHspa = NetworkConnectionSubtypeKey.String("hspa")
+ // IDEN
+ // Stability: development
+ NetworkConnectionSubtypeIden = NetworkConnectionSubtypeKey.String("iden")
+ // EVDO Rev. B
+ // Stability: development
+ NetworkConnectionSubtypeEvdoB = NetworkConnectionSubtypeKey.String("evdo_b")
+ // LTE
+ // Stability: development
+ NetworkConnectionSubtypeLte = NetworkConnectionSubtypeKey.String("lte")
+ // EHRPD
+ // Stability: development
+ NetworkConnectionSubtypeEhrpd = NetworkConnectionSubtypeKey.String("ehrpd")
+ // HSPAP
+ // Stability: development
+ NetworkConnectionSubtypeHspap = NetworkConnectionSubtypeKey.String("hspap")
+ // GSM
+ // Stability: development
+ NetworkConnectionSubtypeGsm = NetworkConnectionSubtypeKey.String("gsm")
+ // TD-SCDMA
+ // Stability: development
+ NetworkConnectionSubtypeTdScdma = NetworkConnectionSubtypeKey.String("td_scdma")
+ // IWLAN
+ // Stability: development
+ NetworkConnectionSubtypeIwlan = NetworkConnectionSubtypeKey.String("iwlan")
+ // 5G NR (New Radio)
+ // Stability: development
+ NetworkConnectionSubtypeNr = NetworkConnectionSubtypeKey.String("nr")
+ // 5G NRNSA (New Radio Non-Standalone)
+ // Stability: development
+ NetworkConnectionSubtypeNrnsa = NetworkConnectionSubtypeKey.String("nrnsa")
+ // LTE CA
+ // Stability: development
+ NetworkConnectionSubtypeLteCa = NetworkConnectionSubtypeKey.String("lte_ca")
+)
+
+// Enum values for network.connection.type
+var (
+ // wifi
+ // Stability: development
+ NetworkConnectionTypeWifi = NetworkConnectionTypeKey.String("wifi")
+ // wired
+ // Stability: development
+ NetworkConnectionTypeWired = NetworkConnectionTypeKey.String("wired")
+ // cell
+ // Stability: development
+ NetworkConnectionTypeCell = NetworkConnectionTypeKey.String("cell")
+ // unavailable
+ // Stability: development
+ NetworkConnectionTypeUnavailable = NetworkConnectionTypeKey.String("unavailable")
+ // unknown
+ // Stability: development
+ NetworkConnectionTypeUnknown = NetworkConnectionTypeKey.String("unknown")
+)
+
+// Enum values for network.io.direction
+var (
+ // transmit
+ // Stability: development
+ NetworkIODirectionTransmit = NetworkIODirectionKey.String("transmit")
+ // receive
+ // Stability: development
+ NetworkIODirectionReceive = NetworkIODirectionKey.String("receive")
+)
+
+// Enum values for network.transport
+var (
+ // TCP
+ // Stability: stable
+ NetworkTransportTCP = NetworkTransportKey.String("tcp")
+ // UDP
+ // Stability: stable
+ NetworkTransportUDP = NetworkTransportKey.String("udp")
+ // Named or anonymous pipe.
+ // Stability: stable
+ NetworkTransportPipe = NetworkTransportKey.String("pipe")
+ // Unix domain socket
+ // Stability: stable
+ NetworkTransportUnix = NetworkTransportKey.String("unix")
+ // QUIC
+ // Stability: stable
+ NetworkTransportQUIC = NetworkTransportKey.String("quic")
+)
+
+// Enum values for network.type
+var (
+ // IPv4
+ // Stability: stable
+ NetworkTypeIPv4 = NetworkTypeKey.String("ipv4")
+ // IPv6
+ // Stability: stable
+ NetworkTypeIPv6 = NetworkTypeKey.String("ipv6")
+)
+
+// Namespace: oci
+const (
+ // OCIManifestDigestKey is the attribute Key conforming to the
+ // "oci.manifest.digest" semantic conventions. It represents the digest of the
+ // OCI image manifest. For container images specifically is the digest by which
+ // the container image is known.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4"
+ // Note: Follows [OCI Image Manifest Specification], and specifically the
+ // [Digest property].
+ // An example can be found in [Example Image Manifest].
+ //
+ // [OCI Image Manifest Specification]: https://github.com/opencontainers/image-spec/blob/main/manifest.md
+ // [Digest property]: https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests
+ // [Example Image Manifest]: https://github.com/opencontainers/image-spec/blob/main/manifest.md#example-image-manifest
+ OCIManifestDigestKey = attribute.Key("oci.manifest.digest")
+)
+
+// OCIManifestDigest returns an attribute KeyValue conforming to the
+// "oci.manifest.digest" semantic conventions. It represents the digest of the
+// OCI image manifest. For container images specifically is the digest by which
+// the container image is known.
+func OCIManifestDigest(val string) attribute.KeyValue {
+ return OCIManifestDigestKey.String(val)
+}
+
+// Namespace: opentracing
+const (
+ // OpenTracingRefTypeKey is the attribute Key conforming to the
+ // "opentracing.ref_type" semantic conventions. It represents the parent-child
+ // Reference type.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: The causal relationship between a child Span and a parent Span.
+ OpenTracingRefTypeKey = attribute.Key("opentracing.ref_type")
+)
+
+// Enum values for opentracing.ref_type
+var (
+ // The parent Span depends on the child Span in some capacity
+ // Stability: development
+ OpenTracingRefTypeChildOf = OpenTracingRefTypeKey.String("child_of")
+ // The parent Span doesn't depend in any way on the result of the child Span
+ // Stability: development
+ OpenTracingRefTypeFollowsFrom = OpenTracingRefTypeKey.String("follows_from")
+)
+
+// Namespace: os
+const (
+ // OSBuildIDKey is the attribute Key conforming to the "os.build_id" semantic
+ // conventions. It represents the unique identifier for a particular build or
+ // compilation of the operating system.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "TQ3C.230805.001.B2", "20E247", "22621"
+ OSBuildIDKey = attribute.Key("os.build_id")
+
+ // OSDescriptionKey is the attribute Key conforming to the "os.description"
+ // semantic conventions. It represents the human readable (not intended to be
+ // parsed) OS version information, like e.g. reported by `ver` or
+ // `lsb_release -a` commands.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Microsoft Windows [Version 10.0.18363.778]", "Ubuntu 18.04.1 LTS"
+ OSDescriptionKey = attribute.Key("os.description")
+
+ // OSNameKey is the attribute Key conforming to the "os.name" semantic
+ // conventions. It represents the human readable operating system name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "iOS", "Android", "Ubuntu"
+ OSNameKey = attribute.Key("os.name")
+
+ // OSTypeKey is the attribute Key conforming to the "os.type" semantic
+ // conventions. It represents the operating system type.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ OSTypeKey = attribute.Key("os.type")
+
+ // OSVersionKey is the attribute Key conforming to the "os.version" semantic
+ // conventions. It represents the version string of the operating system as
+ // defined in [Version Attributes].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "14.2.1", "18.04.1"
+ //
+ // [Version Attributes]: /docs/resource/README.md#version-attributes
+ OSVersionKey = attribute.Key("os.version")
+)
+
+// OSBuildID returns an attribute KeyValue conforming to the "os.build_id"
+// semantic conventions. It represents the unique identifier for a particular
+// build or compilation of the operating system.
+func OSBuildID(val string) attribute.KeyValue {
+ return OSBuildIDKey.String(val)
+}
+
+// OSDescription returns an attribute KeyValue conforming to the "os.description"
+// semantic conventions. It represents the human readable (not intended to be
+// parsed) OS version information, like e.g. reported by `ver` or
+// `lsb_release -a` commands.
+func OSDescription(val string) attribute.KeyValue {
+ return OSDescriptionKey.String(val)
+}
+
+// OSName returns an attribute KeyValue conforming to the "os.name" semantic
+// conventions. It represents the human readable operating system name.
+func OSName(val string) attribute.KeyValue {
+ return OSNameKey.String(val)
+}
+
+// OSVersion returns an attribute KeyValue conforming to the "os.version"
+// semantic conventions. It represents the version string of the operating system
+// as defined in [Version Attributes].
+//
+// [Version Attributes]: /docs/resource/README.md#version-attributes
+func OSVersion(val string) attribute.KeyValue {
+ return OSVersionKey.String(val)
+}
+
+// Enum values for os.type
+var (
+ // Microsoft Windows
+ // Stability: development
+ OSTypeWindows = OSTypeKey.String("windows")
+ // Linux
+ // Stability: development
+ OSTypeLinux = OSTypeKey.String("linux")
+ // Apple Darwin
+ // Stability: development
+ OSTypeDarwin = OSTypeKey.String("darwin")
+ // FreeBSD
+ // Stability: development
+ OSTypeFreeBSD = OSTypeKey.String("freebsd")
+ // NetBSD
+ // Stability: development
+ OSTypeNetBSD = OSTypeKey.String("netbsd")
+ // OpenBSD
+ // Stability: development
+ OSTypeOpenBSD = OSTypeKey.String("openbsd")
+ // DragonFly BSD
+ // Stability: development
+ OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd")
+ // HP-UX (Hewlett Packard Unix)
+ // Stability: development
+ OSTypeHPUX = OSTypeKey.String("hpux")
+ // AIX (Advanced Interactive eXecutive)
+ // Stability: development
+ OSTypeAIX = OSTypeKey.String("aix")
+ // SunOS, Oracle Solaris
+ // Stability: development
+ OSTypeSolaris = OSTypeKey.String("solaris")
+ // IBM z/OS
+ // Stability: development
+ OSTypeZOS = OSTypeKey.String("z_os")
+)
+
+// Namespace: otel
+const (
+ // OTelComponentNameKey is the attribute Key conforming to the
+ // "otel.component.name" semantic conventions. It represents a name uniquely
+ // identifying the instance of the OpenTelemetry component within its containing
+ // SDK instance.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "otlp_grpc_span_exporter/0", "custom-name"
+ // Note: Implementations SHOULD ensure a low cardinality for this attribute,
+ // even across application or SDK restarts.
+ // E.g. implementations MUST NOT use UUIDs as values for this attribute.
+ //
+ // Implementations MAY achieve these goals by following a
+ // `/` pattern, e.g.
+ // `batching_span_processor/0`.
+ // Hereby `otel.component.type` refers to the corresponding attribute value of
+ // the component.
+ //
+ // The value of `instance-counter` MAY be automatically assigned by the
+ // component and uniqueness within the enclosing SDK instance MUST be
+ // guaranteed.
+ // For example, `` MAY be implemented by using a monotonically
+ // increasing counter (starting with `0`), which is incremented every time an
+ // instance of the given component type is started.
+ //
+ // With this implementation, for example the first Batching Span Processor would
+ // have `batching_span_processor/0`
+ // as `otel.component.name`, the second one `batching_span_processor/1` and so
+ // on.
+ // These values will therefore be reused in the case of an application restart.
+ OTelComponentNameKey = attribute.Key("otel.component.name")
+
+ // OTelComponentTypeKey is the attribute Key conforming to the
+ // "otel.component.type" semantic conventions. It represents a name identifying
+ // the type of the OpenTelemetry component.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "batching_span_processor", "com.example.MySpanExporter"
+ // Note: If none of the standardized values apply, implementations SHOULD use
+ // the language-defined name of the type.
+ // E.g. for Java the fully qualified classname SHOULD be used in this case.
+ OTelComponentTypeKey = attribute.Key("otel.component.type")
+
+ // OTelScopeNameKey is the attribute Key conforming to the "otel.scope.name"
+ // semantic conventions. It represents the name of the instrumentation scope - (
+ // `InstrumentationScope.Name` in OTLP).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "io.opentelemetry.contrib.mongodb"
+ OTelScopeNameKey = attribute.Key("otel.scope.name")
+
+ // OTelScopeVersionKey is the attribute Key conforming to the
+ // "otel.scope.version" semantic conventions. It represents the version of the
+ // instrumentation scope - (`InstrumentationScope.Version` in OTLP).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "1.0.0"
+ OTelScopeVersionKey = attribute.Key("otel.scope.version")
+
+ // OTelSpanSamplingResultKey is the attribute Key conforming to the
+ // "otel.span.sampling_result" semantic conventions. It represents the result
+ // value of the sampler for this span.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ OTelSpanSamplingResultKey = attribute.Key("otel.span.sampling_result")
+
+ // OTelStatusCodeKey is the attribute Key conforming to the "otel.status_code"
+ // semantic conventions. It represents the name of the code, either "OK" or
+ // "ERROR". MUST NOT be set if the status code is UNSET.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples:
+ OTelStatusCodeKey = attribute.Key("otel.status_code")
+
+ // OTelStatusDescriptionKey is the attribute Key conforming to the
+ // "otel.status_description" semantic conventions. It represents the description
+ // of the Status if it has a value, otherwise not set.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "resource not found"
+ OTelStatusDescriptionKey = attribute.Key("otel.status_description")
+)
+
+// OTelComponentName returns an attribute KeyValue conforming to the
+// "otel.component.name" semantic conventions. It represents a name uniquely
+// identifying the instance of the OpenTelemetry component within its containing
+// SDK instance.
+func OTelComponentName(val string) attribute.KeyValue {
+ return OTelComponentNameKey.String(val)
+}
+
+// OTelScopeName returns an attribute KeyValue conforming to the
+// "otel.scope.name" semantic conventions. It represents the name of the
+// instrumentation scope - (`InstrumentationScope.Name` in OTLP).
+func OTelScopeName(val string) attribute.KeyValue {
+ return OTelScopeNameKey.String(val)
+}
+
+// OTelScopeVersion returns an attribute KeyValue conforming to the
+// "otel.scope.version" semantic conventions. It represents the version of the
+// instrumentation scope - (`InstrumentationScope.Version` in OTLP).
+func OTelScopeVersion(val string) attribute.KeyValue {
+ return OTelScopeVersionKey.String(val)
+}
+
+// OTelStatusDescription returns an attribute KeyValue conforming to the
+// "otel.status_description" semantic conventions. It represents the description
+// of the Status if it has a value, otherwise not set.
+func OTelStatusDescription(val string) attribute.KeyValue {
+ return OTelStatusDescriptionKey.String(val)
+}
+
+// Enum values for otel.component.type
+var (
+ // The builtin SDK batching span processor
+ //
+ // Stability: development
+ OTelComponentTypeBatchingSpanProcessor = OTelComponentTypeKey.String("batching_span_processor")
+ // The builtin SDK simple span processor
+ //
+ // Stability: development
+ OTelComponentTypeSimpleSpanProcessor = OTelComponentTypeKey.String("simple_span_processor")
+ // The builtin SDK batching log record processor
+ //
+ // Stability: development
+ OTelComponentTypeBatchingLogProcessor = OTelComponentTypeKey.String("batching_log_processor")
+ // The builtin SDK simple log record processor
+ //
+ // Stability: development
+ OTelComponentTypeSimpleLogProcessor = OTelComponentTypeKey.String("simple_log_processor")
+ // OTLP span exporter over gRPC with protobuf serialization
+ //
+ // Stability: development
+ OTelComponentTypeOtlpGRPCSpanExporter = OTelComponentTypeKey.String("otlp_grpc_span_exporter")
+ // OTLP span exporter over HTTP with protobuf serialization
+ //
+ // Stability: development
+ OTelComponentTypeOtlpHTTPSpanExporter = OTelComponentTypeKey.String("otlp_http_span_exporter")
+ // OTLP span exporter over HTTP with JSON serialization
+ //
+ // Stability: development
+ OTelComponentTypeOtlpHTTPJSONSpanExporter = OTelComponentTypeKey.String("otlp_http_json_span_exporter")
+ // OTLP log record exporter over gRPC with protobuf serialization
+ //
+ // Stability: development
+ OTelComponentTypeOtlpGRPCLogExporter = OTelComponentTypeKey.String("otlp_grpc_log_exporter")
+ // OTLP log record exporter over HTTP with protobuf serialization
+ //
+ // Stability: development
+ OTelComponentTypeOtlpHTTPLogExporter = OTelComponentTypeKey.String("otlp_http_log_exporter")
+ // OTLP log record exporter over HTTP with JSON serialization
+ //
+ // Stability: development
+ OTelComponentTypeOtlpHTTPJSONLogExporter = OTelComponentTypeKey.String("otlp_http_json_log_exporter")
+ // The builtin SDK periodically exporting metric reader
+ //
+ // Stability: development
+ OTelComponentTypePeriodicMetricReader = OTelComponentTypeKey.String("periodic_metric_reader")
+ // OTLP metric exporter over gRPC with protobuf serialization
+ //
+ // Stability: development
+ OTelComponentTypeOtlpGRPCMetricExporter = OTelComponentTypeKey.String("otlp_grpc_metric_exporter")
+ // OTLP metric exporter over HTTP with protobuf serialization
+ //
+ // Stability: development
+ OTelComponentTypeOtlpHTTPMetricExporter = OTelComponentTypeKey.String("otlp_http_metric_exporter")
+ // OTLP metric exporter over HTTP with JSON serialization
+ //
+ // Stability: development
+ OTelComponentTypeOtlpHTTPJSONMetricExporter = OTelComponentTypeKey.String("otlp_http_json_metric_exporter")
+)
+
+// Enum values for otel.span.sampling_result
+var (
+ // The span is not sampled and not recording
+ // Stability: development
+ OTelSpanSamplingResultDrop = OTelSpanSamplingResultKey.String("DROP")
+ // The span is not sampled, but recording
+ // Stability: development
+ OTelSpanSamplingResultRecordOnly = OTelSpanSamplingResultKey.String("RECORD_ONLY")
+ // The span is sampled and recording
+ // Stability: development
+ OTelSpanSamplingResultRecordAndSample = OTelSpanSamplingResultKey.String("RECORD_AND_SAMPLE")
+)
+
+// Enum values for otel.status_code
+var (
+ // The operation has been validated by an Application developer or Operator to
+ // have completed successfully.
+ // Stability: stable
+ OTelStatusCodeOk = OTelStatusCodeKey.String("OK")
+ // The operation contains an error.
+ // Stability: stable
+ OTelStatusCodeError = OTelStatusCodeKey.String("ERROR")
+)
+
+// Namespace: peer
+const (
+ // PeerServiceKey is the attribute Key conforming to the "peer.service" semantic
+ // conventions. It represents the [`service.name`] of the remote service. SHOULD
+ // be equal to the actual `service.name` resource attribute of the remote
+ // service if any.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: AuthTokenCache
+ //
+ // [`service.name`]: /docs/resource/README.md#service
+ PeerServiceKey = attribute.Key("peer.service")
+)
+
+// PeerService returns an attribute KeyValue conforming to the "peer.service"
+// semantic conventions. It represents the [`service.name`] of the remote
+// service. SHOULD be equal to the actual `service.name` resource attribute of
+// the remote service if any.
+//
+// [`service.name`]: /docs/resource/README.md#service
+func PeerService(val string) attribute.KeyValue {
+ return PeerServiceKey.String(val)
+}
+
+// Namespace: process
+const (
+ // ProcessArgsCountKey is the attribute Key conforming to the
+ // "process.args_count" semantic conventions. It represents the length of the
+ // process.command_args array.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 4
+ // Note: This field can be useful for querying or performing bucket analysis on
+ // how many arguments were provided to start a process. More arguments may be an
+ // indication of suspicious activity.
+ ProcessArgsCountKey = attribute.Key("process.args_count")
+
+ // ProcessCommandKey is the attribute Key conforming to the "process.command"
+ // semantic conventions. It represents the command used to launch the process
+ // (i.e. the command name). On Linux based systems, can be set to the zeroth
+ // string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter
+ // extracted from `GetCommandLineW`.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "cmd/otelcol"
+ ProcessCommandKey = attribute.Key("process.command")
+
+ // ProcessCommandArgsKey is the attribute Key conforming to the
+ // "process.command_args" semantic conventions. It represents the all the
+ // command arguments (including the command/executable itself) as received by
+ // the process. On Linux-based systems (and some other Unixoid systems
+ // supporting procfs), can be set according to the list of null-delimited
+ // strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this
+ // would be the full argv vector passed to `main`. SHOULD NOT be collected by
+ // default unless there is sanitization that excludes sensitive data.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "cmd/otecol", "--config=config.yaml"
+ ProcessCommandArgsKey = attribute.Key("process.command_args")
+
+ // ProcessCommandLineKey is the attribute Key conforming to the
+ // "process.command_line" semantic conventions. It represents the full command
+ // used to launch the process as a single string representing the full command.
+ // On Windows, can be set to the result of `GetCommandLineW`. Do not set this if
+ // you have to assemble it just for monitoring; use `process.command_args`
+ // instead. SHOULD NOT be collected by default unless there is sanitization that
+ // excludes sensitive data.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "C:\cmd\otecol --config="my directory\config.yaml""
+ ProcessCommandLineKey = attribute.Key("process.command_line")
+
+ // ProcessContextSwitchTypeKey is the attribute Key conforming to the
+ // "process.context_switch_type" semantic conventions. It represents the
+ // specifies whether the context switches for this data point were voluntary or
+ // involuntary.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ ProcessContextSwitchTypeKey = attribute.Key("process.context_switch_type")
+
+ // ProcessCreationTimeKey is the attribute Key conforming to the
+ // "process.creation.time" semantic conventions. It represents the date and time
+ // the process was created, in ISO 8601 format.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2023-11-21T09:25:34.853Z"
+ ProcessCreationTimeKey = attribute.Key("process.creation.time")
+
+ // ProcessExecutableBuildIDGNUKey is the attribute Key conforming to the
+ // "process.executable.build_id.gnu" semantic conventions. It represents the GNU
+ // build ID as found in the `.note.gnu.build-id` ELF section (hex string).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "c89b11207f6479603b0d49bf291c092c2b719293"
+ ProcessExecutableBuildIDGNUKey = attribute.Key("process.executable.build_id.gnu")
+
+ // ProcessExecutableBuildIDGoKey is the attribute Key conforming to the
+ // "process.executable.build_id.go" semantic conventions. It represents the Go
+ // build ID as retrieved by `go tool buildid `.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "foh3mEXu7BLZjsN9pOwG/kATcXlYVCDEFouRMQed_/WwRFB1hPo9LBkekthSPG/x8hMC8emW2cCjXD0_1aY"
+ ProcessExecutableBuildIDGoKey = attribute.Key("process.executable.build_id.go")
+
+ // ProcessExecutableBuildIDHtlhashKey is the attribute Key conforming to the
+ // "process.executable.build_id.htlhash" semantic conventions. It represents the
+ // profiling specific build ID for executables. See the OTel specification for
+ // Profiles for more information.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "600DCAFE4A110000F2BF38C493F5FB92"
+ ProcessExecutableBuildIDHtlhashKey = attribute.Key("process.executable.build_id.htlhash")
+
+ // ProcessExecutableNameKey is the attribute Key conforming to the
+ // "process.executable.name" semantic conventions. It represents the name of the
+ // process executable. On Linux based systems, this SHOULD be set to the base
+ // name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to
+ // the base name of `GetProcessImageFileNameW`.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "otelcol"
+ ProcessExecutableNameKey = attribute.Key("process.executable.name")
+
+ // ProcessExecutablePathKey is the attribute Key conforming to the
+ // "process.executable.path" semantic conventions. It represents the full path
+ // to the process executable. On Linux based systems, can be set to the target
+ // of `proc/[pid]/exe`. On Windows, can be set to the result of
+ // `GetProcessImageFileNameW`.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/usr/bin/cmd/otelcol"
+ ProcessExecutablePathKey = attribute.Key("process.executable.path")
+
+ // ProcessExitCodeKey is the attribute Key conforming to the "process.exit.code"
+ // semantic conventions. It represents the exit code of the process.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 127
+ ProcessExitCodeKey = attribute.Key("process.exit.code")
+
+ // ProcessExitTimeKey is the attribute Key conforming to the "process.exit.time"
+ // semantic conventions. It represents the date and time the process exited, in
+ // ISO 8601 format.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2023-11-21T09:26:12.315Z"
+ ProcessExitTimeKey = attribute.Key("process.exit.time")
+
+ // ProcessGroupLeaderPIDKey is the attribute Key conforming to the
+ // "process.group_leader.pid" semantic conventions. It represents the PID of the
+ // process's group leader. This is also the process group ID (PGID) of the
+ // process.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 23
+ ProcessGroupLeaderPIDKey = attribute.Key("process.group_leader.pid")
+
+ // ProcessInteractiveKey is the attribute Key conforming to the
+ // "process.interactive" semantic conventions. It represents the whether the
+ // process is connected to an interactive shell.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ ProcessInteractiveKey = attribute.Key("process.interactive")
+
+ // ProcessLinuxCgroupKey is the attribute Key conforming to the
+ // "process.linux.cgroup" semantic conventions. It represents the control group
+ // associated with the process.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1:name=systemd:/user.slice/user-1000.slice/session-3.scope",
+ // "0::/user.slice/user-1000.slice/user@1000.service/tmux-spawn-0267755b-4639-4a27-90ed-f19f88e53748.scope"
+ // Note: Control groups (cgroups) are a kernel feature used to organize and
+ // manage process resources. This attribute provides the path(s) to the
+ // cgroup(s) associated with the process, which should match the contents of the
+ // [/proc/[PID]/cgroup] file.
+ //
+ // [/proc/[PID]/cgroup]: https://man7.org/linux/man-pages/man7/cgroups.7.html
+ ProcessLinuxCgroupKey = attribute.Key("process.linux.cgroup")
+
+ // ProcessOwnerKey is the attribute Key conforming to the "process.owner"
+ // semantic conventions. It represents the username of the user that owns the
+ // process.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "root"
+ ProcessOwnerKey = attribute.Key("process.owner")
+
+ // ProcessPagingFaultTypeKey is the attribute Key conforming to the
+ // "process.paging.fault_type" semantic conventions. It represents the type of
+ // page fault for this data point. Type `major` is for major/hard page faults,
+ // and `minor` is for minor/soft page faults.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ ProcessPagingFaultTypeKey = attribute.Key("process.paging.fault_type")
+
+ // ProcessParentPIDKey is the attribute Key conforming to the
+ // "process.parent_pid" semantic conventions. It represents the parent Process
+ // identifier (PPID).
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 111
+ ProcessParentPIDKey = attribute.Key("process.parent_pid")
+
+ // ProcessPIDKey is the attribute Key conforming to the "process.pid" semantic
+ // conventions. It represents the process identifier (PID).
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 1234
+ ProcessPIDKey = attribute.Key("process.pid")
+
+ // ProcessRealUserIDKey is the attribute Key conforming to the
+ // "process.real_user.id" semantic conventions. It represents the real user ID
+ // (RUID) of the process.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 1000
+ ProcessRealUserIDKey = attribute.Key("process.real_user.id")
+
+ // ProcessRealUserNameKey is the attribute Key conforming to the
+ // "process.real_user.name" semantic conventions. It represents the username of
+ // the real user of the process.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "operator"
+ ProcessRealUserNameKey = attribute.Key("process.real_user.name")
+
+ // ProcessRuntimeDescriptionKey is the attribute Key conforming to the
+ // "process.runtime.description" semantic conventions. It represents an
+ // additional description about the runtime of the process, for example a
+ // specific vendor customization of the runtime environment.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0
+ ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description")
+
+ // ProcessRuntimeNameKey is the attribute Key conforming to the
+ // "process.runtime.name" semantic conventions. It represents the name of the
+ // runtime of this process.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "OpenJDK Runtime Environment"
+ ProcessRuntimeNameKey = attribute.Key("process.runtime.name")
+
+ // ProcessRuntimeVersionKey is the attribute Key conforming to the
+ // "process.runtime.version" semantic conventions. It represents the version of
+ // the runtime of this process, as returned by the runtime without modification.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 14.0.2
+ ProcessRuntimeVersionKey = attribute.Key("process.runtime.version")
+
+ // ProcessSavedUserIDKey is the attribute Key conforming to the
+ // "process.saved_user.id" semantic conventions. It represents the saved user ID
+ // (SUID) of the process.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 1002
+ ProcessSavedUserIDKey = attribute.Key("process.saved_user.id")
+
+ // ProcessSavedUserNameKey is the attribute Key conforming to the
+ // "process.saved_user.name" semantic conventions. It represents the username of
+ // the saved user.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "operator"
+ ProcessSavedUserNameKey = attribute.Key("process.saved_user.name")
+
+ // ProcessSessionLeaderPIDKey is the attribute Key conforming to the
+ // "process.session_leader.pid" semantic conventions. It represents the PID of
+ // the process's session leader. This is also the session ID (SID) of the
+ // process.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 14
+ ProcessSessionLeaderPIDKey = attribute.Key("process.session_leader.pid")
+
+ // ProcessTitleKey is the attribute Key conforming to the "process.title"
+ // semantic conventions. It represents the process title (proctitle).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "cat /etc/hostname", "xfce4-session", "bash"
+ // Note: In many Unix-like systems, process title (proctitle), is the string
+ // that represents the name or command line of a running process, displayed by
+ // system monitoring tools like ps, top, and htop.
+ ProcessTitleKey = attribute.Key("process.title")
+
+ // ProcessUserIDKey is the attribute Key conforming to the "process.user.id"
+ // semantic conventions. It represents the effective user ID (EUID) of the
+ // process.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 1001
+ ProcessUserIDKey = attribute.Key("process.user.id")
+
+ // ProcessUserNameKey is the attribute Key conforming to the "process.user.name"
+ // semantic conventions. It represents the username of the effective user of the
+ // process.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "root"
+ ProcessUserNameKey = attribute.Key("process.user.name")
+
+ // ProcessVpidKey is the attribute Key conforming to the "process.vpid" semantic
+ // conventions. It represents the virtual process identifier.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 12
+ // Note: The process ID within a PID namespace. This is not necessarily unique
+ // across all processes on the host but it is unique within the process
+ // namespace that the process exists within.
+ ProcessVpidKey = attribute.Key("process.vpid")
+
+ // ProcessWorkingDirectoryKey is the attribute Key conforming to the
+ // "process.working_directory" semantic conventions. It represents the working
+ // directory of the process.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/root"
+ ProcessWorkingDirectoryKey = attribute.Key("process.working_directory")
+)
+
+// ProcessArgsCount returns an attribute KeyValue conforming to the
+// "process.args_count" semantic conventions. It represents the length of the
+// process.command_args array.
+func ProcessArgsCount(val int) attribute.KeyValue {
+ return ProcessArgsCountKey.Int(val)
+}
+
+// ProcessCommand returns an attribute KeyValue conforming to the
+// "process.command" semantic conventions. It represents the command used to
+// launch the process (i.e. the command name). On Linux based systems, can be set
+// to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the
+// first parameter extracted from `GetCommandLineW`.
+func ProcessCommand(val string) attribute.KeyValue {
+ return ProcessCommandKey.String(val)
+}
+
+// ProcessCommandArgs returns an attribute KeyValue conforming to the
+// "process.command_args" semantic conventions. It represents the all the command
+// arguments (including the command/executable itself) as received by the
+// process. On Linux-based systems (and some other Unixoid systems supporting
+// procfs), can be set according to the list of null-delimited strings extracted
+// from `proc/[pid]/cmdline`. For libc-based executables, this would be the full
+// argv vector passed to `main`. SHOULD NOT be collected by default unless there
+// is sanitization that excludes sensitive data.
+func ProcessCommandArgs(val ...string) attribute.KeyValue {
+ return ProcessCommandArgsKey.StringSlice(val)
+}
+
+// ProcessCommandLine returns an attribute KeyValue conforming to the
+// "process.command_line" semantic conventions. It represents the full command
+// used to launch the process as a single string representing the full command.
+// On Windows, can be set to the result of `GetCommandLineW`. Do not set this if
+// you have to assemble it just for monitoring; use `process.command_args`
+// instead. SHOULD NOT be collected by default unless there is sanitization that
+// excludes sensitive data.
+func ProcessCommandLine(val string) attribute.KeyValue {
+ return ProcessCommandLineKey.String(val)
+}
+
+// ProcessCreationTime returns an attribute KeyValue conforming to the
+// "process.creation.time" semantic conventions. It represents the date and time
+// the process was created, in ISO 8601 format.
+func ProcessCreationTime(val string) attribute.KeyValue {
+ return ProcessCreationTimeKey.String(val)
+}
+
+// ProcessExecutableBuildIDGNU returns an attribute KeyValue conforming to the
+// "process.executable.build_id.gnu" semantic conventions. It represents the GNU
+// build ID as found in the `.note.gnu.build-id` ELF section (hex string).
+func ProcessExecutableBuildIDGNU(val string) attribute.KeyValue {
+ return ProcessExecutableBuildIDGNUKey.String(val)
+}
+
+// ProcessExecutableBuildIDGo returns an attribute KeyValue conforming to the
+// "process.executable.build_id.go" semantic conventions. It represents the Go
+// build ID as retrieved by `go tool buildid `.
+func ProcessExecutableBuildIDGo(val string) attribute.KeyValue {
+ return ProcessExecutableBuildIDGoKey.String(val)
+}
+
+// ProcessExecutableBuildIDHtlhash returns an attribute KeyValue conforming to
+// the "process.executable.build_id.htlhash" semantic conventions. It represents
+// the profiling specific build ID for executables. See the OTel specification
+// for Profiles for more information.
+func ProcessExecutableBuildIDHtlhash(val string) attribute.KeyValue {
+ return ProcessExecutableBuildIDHtlhashKey.String(val)
+}
+
+// ProcessExecutableName returns an attribute KeyValue conforming to the
+// "process.executable.name" semantic conventions. It represents the name of the
+// process executable. On Linux based systems, this SHOULD be set to the base
+// name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the
+// base name of `GetProcessImageFileNameW`.
+func ProcessExecutableName(val string) attribute.KeyValue {
+ return ProcessExecutableNameKey.String(val)
+}
+
+// ProcessExecutablePath returns an attribute KeyValue conforming to the
+// "process.executable.path" semantic conventions. It represents the full path to
+// the process executable. On Linux based systems, can be set to the target of
+// `proc/[pid]/exe`. On Windows, can be set to the result of
+// `GetProcessImageFileNameW`.
+func ProcessExecutablePath(val string) attribute.KeyValue {
+ return ProcessExecutablePathKey.String(val)
+}
+
+// ProcessExitCode returns an attribute KeyValue conforming to the
+// "process.exit.code" semantic conventions. It represents the exit code of the
+// process.
+func ProcessExitCode(val int) attribute.KeyValue {
+ return ProcessExitCodeKey.Int(val)
+}
+
+// ProcessExitTime returns an attribute KeyValue conforming to the
+// "process.exit.time" semantic conventions. It represents the date and time the
+// process exited, in ISO 8601 format.
+func ProcessExitTime(val string) attribute.KeyValue {
+ return ProcessExitTimeKey.String(val)
+}
+
+// ProcessGroupLeaderPID returns an attribute KeyValue conforming to the
+// "process.group_leader.pid" semantic conventions. It represents the PID of the
+// process's group leader. This is also the process group ID (PGID) of the
+// process.
+func ProcessGroupLeaderPID(val int) attribute.KeyValue {
+ return ProcessGroupLeaderPIDKey.Int(val)
+}
+
+// ProcessInteractive returns an attribute KeyValue conforming to the
+// "process.interactive" semantic conventions. It represents the whether the
+// process is connected to an interactive shell.
+func ProcessInteractive(val bool) attribute.KeyValue {
+ return ProcessInteractiveKey.Bool(val)
+}
+
+// ProcessLinuxCgroup returns an attribute KeyValue conforming to the
+// "process.linux.cgroup" semantic conventions. It represents the control group
+// associated with the process.
+func ProcessLinuxCgroup(val string) attribute.KeyValue {
+ return ProcessLinuxCgroupKey.String(val)
+}
+
+// ProcessOwner returns an attribute KeyValue conforming to the "process.owner"
+// semantic conventions. It represents the username of the user that owns the
+// process.
+func ProcessOwner(val string) attribute.KeyValue {
+ return ProcessOwnerKey.String(val)
+}
+
+// ProcessParentPID returns an attribute KeyValue conforming to the
+// "process.parent_pid" semantic conventions. It represents the parent Process
+// identifier (PPID).
+func ProcessParentPID(val int) attribute.KeyValue {
+ return ProcessParentPIDKey.Int(val)
+}
+
+// ProcessPID returns an attribute KeyValue conforming to the "process.pid"
+// semantic conventions. It represents the process identifier (PID).
+func ProcessPID(val int) attribute.KeyValue {
+ return ProcessPIDKey.Int(val)
+}
+
+// ProcessRealUserID returns an attribute KeyValue conforming to the
+// "process.real_user.id" semantic conventions. It represents the real user ID
+// (RUID) of the process.
+func ProcessRealUserID(val int) attribute.KeyValue {
+ return ProcessRealUserIDKey.Int(val)
+}
+
+// ProcessRealUserName returns an attribute KeyValue conforming to the
+// "process.real_user.name" semantic conventions. It represents the username of
+// the real user of the process.
+func ProcessRealUserName(val string) attribute.KeyValue {
+ return ProcessRealUserNameKey.String(val)
+}
+
+// ProcessRuntimeDescription returns an attribute KeyValue conforming to the
+// "process.runtime.description" semantic conventions. It represents an
+// additional description about the runtime of the process, for example a
+// specific vendor customization of the runtime environment.
+func ProcessRuntimeDescription(val string) attribute.KeyValue {
+ return ProcessRuntimeDescriptionKey.String(val)
+}
+
+// ProcessRuntimeName returns an attribute KeyValue conforming to the
+// "process.runtime.name" semantic conventions. It represents the name of the
+// runtime of this process.
+func ProcessRuntimeName(val string) attribute.KeyValue {
+ return ProcessRuntimeNameKey.String(val)
+}
+
+// ProcessRuntimeVersion returns an attribute KeyValue conforming to the
+// "process.runtime.version" semantic conventions. It represents the version of
+// the runtime of this process, as returned by the runtime without modification.
+func ProcessRuntimeVersion(val string) attribute.KeyValue {
+ return ProcessRuntimeVersionKey.String(val)
+}
+
+// ProcessSavedUserID returns an attribute KeyValue conforming to the
+// "process.saved_user.id" semantic conventions. It represents the saved user ID
+// (SUID) of the process.
+func ProcessSavedUserID(val int) attribute.KeyValue {
+ return ProcessSavedUserIDKey.Int(val)
+}
+
+// ProcessSavedUserName returns an attribute KeyValue conforming to the
+// "process.saved_user.name" semantic conventions. It represents the username of
+// the saved user.
+func ProcessSavedUserName(val string) attribute.KeyValue {
+ return ProcessSavedUserNameKey.String(val)
+}
+
+// ProcessSessionLeaderPID returns an attribute KeyValue conforming to the
+// "process.session_leader.pid" semantic conventions. It represents the PID of
+// the process's session leader. This is also the session ID (SID) of the
+// process.
+func ProcessSessionLeaderPID(val int) attribute.KeyValue {
+ return ProcessSessionLeaderPIDKey.Int(val)
+}
+
+// ProcessTitle returns an attribute KeyValue conforming to the "process.title"
+// semantic conventions. It represents the process title (proctitle).
+func ProcessTitle(val string) attribute.KeyValue {
+ return ProcessTitleKey.String(val)
+}
+
+// ProcessUserID returns an attribute KeyValue conforming to the
+// "process.user.id" semantic conventions. It represents the effective user ID
+// (EUID) of the process.
+func ProcessUserID(val int) attribute.KeyValue {
+ return ProcessUserIDKey.Int(val)
+}
+
+// ProcessUserName returns an attribute KeyValue conforming to the
+// "process.user.name" semantic conventions. It represents the username of the
+// effective user of the process.
+func ProcessUserName(val string) attribute.KeyValue {
+ return ProcessUserNameKey.String(val)
+}
+
+// ProcessVpid returns an attribute KeyValue conforming to the "process.vpid"
+// semantic conventions. It represents the virtual process identifier.
+func ProcessVpid(val int) attribute.KeyValue {
+ return ProcessVpidKey.Int(val)
+}
+
+// ProcessWorkingDirectory returns an attribute KeyValue conforming to the
+// "process.working_directory" semantic conventions. It represents the working
+// directory of the process.
+func ProcessWorkingDirectory(val string) attribute.KeyValue {
+ return ProcessWorkingDirectoryKey.String(val)
+}
+
+// Enum values for process.context_switch_type
+var (
+ // voluntary
+ // Stability: development
+ ProcessContextSwitchTypeVoluntary = ProcessContextSwitchTypeKey.String("voluntary")
+ // involuntary
+ // Stability: development
+ ProcessContextSwitchTypeInvoluntary = ProcessContextSwitchTypeKey.String("involuntary")
+)
+
+// Enum values for process.paging.fault_type
+var (
+ // major
+ // Stability: development
+ ProcessPagingFaultTypeMajor = ProcessPagingFaultTypeKey.String("major")
+ // minor
+ // Stability: development
+ ProcessPagingFaultTypeMinor = ProcessPagingFaultTypeKey.String("minor")
+)
+
+// Namespace: profile
+const (
+ // ProfileFrameTypeKey is the attribute Key conforming to the
+ // "profile.frame.type" semantic conventions. It represents the describes the
+ // interpreter or compiler of a single frame.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "cpython"
+ ProfileFrameTypeKey = attribute.Key("profile.frame.type")
+)
+
+// Enum values for profile.frame.type
+var (
+ // [.NET]
+ //
+ // Stability: development
+ //
+ // [.NET]: https://wikipedia.org/wiki/.NET
+ ProfileFrameTypeDotnet = ProfileFrameTypeKey.String("dotnet")
+ // [JVM]
+ //
+ // Stability: development
+ //
+ // [JVM]: https://wikipedia.org/wiki/Java_virtual_machine
+ ProfileFrameTypeJVM = ProfileFrameTypeKey.String("jvm")
+ // [Kernel]
+ //
+ // Stability: development
+ //
+ // [Kernel]: https://wikipedia.org/wiki/Kernel_(operating_system)
+ ProfileFrameTypeKernel = ProfileFrameTypeKey.String("kernel")
+ // Can be one of but not limited to [C], [C++], [Go] or [Rust]. If possible, a
+ // more precise value MUST be used.
+ //
+ // Stability: development
+ //
+ // [C]: https://wikipedia.org/wiki/C_(programming_language)
+ // [C++]: https://wikipedia.org/wiki/C%2B%2B
+ // [Go]: https://wikipedia.org/wiki/Go_(programming_language)
+ // [Rust]: https://wikipedia.org/wiki/Rust_(programming_language)
+ ProfileFrameTypeNative = ProfileFrameTypeKey.String("native")
+ // [Perl]
+ //
+ // Stability: development
+ //
+ // [Perl]: https://wikipedia.org/wiki/Perl
+ ProfileFrameTypePerl = ProfileFrameTypeKey.String("perl")
+ // [PHP]
+ //
+ // Stability: development
+ //
+ // [PHP]: https://wikipedia.org/wiki/PHP
+ ProfileFrameTypePHP = ProfileFrameTypeKey.String("php")
+ // [Python]
+ //
+ // Stability: development
+ //
+ // [Python]: https://wikipedia.org/wiki/Python_(programming_language)
+ ProfileFrameTypeCpython = ProfileFrameTypeKey.String("cpython")
+ // [Ruby]
+ //
+ // Stability: development
+ //
+ // [Ruby]: https://wikipedia.org/wiki/Ruby_(programming_language)
+ ProfileFrameTypeRuby = ProfileFrameTypeKey.String("ruby")
+ // [V8JS]
+ //
+ // Stability: development
+ //
+ // [V8JS]: https://wikipedia.org/wiki/V8_(JavaScript_engine)
+ ProfileFrameTypeV8JS = ProfileFrameTypeKey.String("v8js")
+ // [Erlang]
+ //
+ // Stability: development
+ //
+ // [Erlang]: https://en.wikipedia.org/wiki/BEAM_(Erlang_virtual_machine)
+ ProfileFrameTypeBeam = ProfileFrameTypeKey.String("beam")
+ // [Go],
+ //
+ // Stability: development
+ //
+ // [Go]: https://wikipedia.org/wiki/Go_(programming_language)
+ ProfileFrameTypeGo = ProfileFrameTypeKey.String("go")
+ // [Rust]
+ //
+ // Stability: development
+ //
+ // [Rust]: https://wikipedia.org/wiki/Rust_(programming_language)
+ ProfileFrameTypeRust = ProfileFrameTypeKey.String("rust")
+)
+
+// Namespace: rpc
+const (
+ // RPCConnectRPCErrorCodeKey is the attribute Key conforming to the
+ // "rpc.connect_rpc.error_code" semantic conventions. It represents the
+ // [error codes] of the Connect request. Error codes are always string values.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ //
+ // [error codes]: https://connectrpc.com//docs/protocol/#error-codes
+ RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code")
+
+ // RPCGRPCStatusCodeKey is the attribute Key conforming to the
+ // "rpc.grpc.status_code" semantic conventions. It represents the
+ // [numeric status code] of the gRPC request.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ //
+ // [numeric status code]: https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md
+ RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code")
+
+ // RPCJSONRPCErrorCodeKey is the attribute Key conforming to the
+ // "rpc.jsonrpc.error_code" semantic conventions. It represents the `error.code`
+ // property of response if it is an error response.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: -32700, 100
+ RPCJSONRPCErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code")
+
+ // RPCJSONRPCErrorMessageKey is the attribute Key conforming to the
+ // "rpc.jsonrpc.error_message" semantic conventions. It represents the
+ // `error.message` property of response if it is an error response.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Parse error", "User already exists"
+ RPCJSONRPCErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message")
+
+ // RPCJSONRPCRequestIDKey is the attribute Key conforming to the
+ // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
+ // property of request or response. Since protocol allows id to be int, string,
+ // `null` or missing (for notifications), value is expected to be cast to string
+ // for simplicity. Use empty string in case of `null` value. Omit entirely if
+ // this is a notification.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "10", "request-7", ""
+ RPCJSONRPCRequestIDKey = attribute.Key("rpc.jsonrpc.request_id")
+
+ // RPCJSONRPCVersionKey is the attribute Key conforming to the
+ // "rpc.jsonrpc.version" semantic conventions. It represents the protocol
+ // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
+ // doesn't specify this, the value can be omitted.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2.0", "1.0"
+ RPCJSONRPCVersionKey = attribute.Key("rpc.jsonrpc.version")
+
+ // RPCMessageCompressedSizeKey is the attribute Key conforming to the
+ // "rpc.message.compressed_size" semantic conventions. It represents the
+ // compressed size of the message in bytes.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ RPCMessageCompressedSizeKey = attribute.Key("rpc.message.compressed_size")
+
+ // RPCMessageIDKey is the attribute Key conforming to the "rpc.message.id"
+ // semantic conventions. It MUST be calculated as two different counters
+ // starting from `1` one for sent messages and one for received message..
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: This way we guarantee that the values will be consistent between
+ // different implementations.
+ RPCMessageIDKey = attribute.Key("rpc.message.id")
+
+ // RPCMessageTypeKey is the attribute Key conforming to the "rpc.message.type"
+ // semantic conventions. It represents the whether this is a received or sent
+ // message.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ RPCMessageTypeKey = attribute.Key("rpc.message.type")
+
+ // RPCMessageUncompressedSizeKey is the attribute Key conforming to the
+ // "rpc.message.uncompressed_size" semantic conventions. It represents the
+ // uncompressed size of the message in bytes.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ RPCMessageUncompressedSizeKey = attribute.Key("rpc.message.uncompressed_size")
+
+ // RPCMethodKey is the attribute Key conforming to the "rpc.method" semantic
+ // conventions. It represents the name of the (logical) method being called,
+ // must be equal to the $method part in the span name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: exampleMethod
+ // Note: This is the logical name of the method from the RPC interface
+ // perspective, which can be different from the name of any implementing
+ // method/function. The `code.function.name` attribute may be used to store the
+ // latter (e.g., method actually executing the call on the server side, RPC
+ // client stub method on the client side).
+ RPCMethodKey = attribute.Key("rpc.method")
+
+ // RPCServiceKey is the attribute Key conforming to the "rpc.service" semantic
+ // conventions. It represents the full (logical) name of the service being
+ // called, including its package name, if applicable.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: myservice.EchoService
+ // Note: This is the logical name of the service from the RPC interface
+ // perspective, which can be different from the name of any implementing class.
+ // The `code.namespace` attribute may be used to store the latter (despite the
+ // attribute name, it may include a class name; e.g., class with method actually
+ // executing the call on the server side, RPC client stub class on the client
+ // side).
+ RPCServiceKey = attribute.Key("rpc.service")
+
+ // RPCSystemKey is the attribute Key conforming to the "rpc.system" semantic
+ // conventions. It represents a string identifying the remoting system. See
+ // below for a list of well-known identifiers.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ RPCSystemKey = attribute.Key("rpc.system")
+)
+
+// RPCJSONRPCErrorCode returns an attribute KeyValue conforming to the
+// "rpc.jsonrpc.error_code" semantic conventions. It represents the `error.code`
+// property of response if it is an error response.
+func RPCJSONRPCErrorCode(val int) attribute.KeyValue {
+ return RPCJSONRPCErrorCodeKey.Int(val)
+}
+
+// RPCJSONRPCErrorMessage returns an attribute KeyValue conforming to the
+// "rpc.jsonrpc.error_message" semantic conventions. It represents the
+// `error.message` property of response if it is an error response.
+func RPCJSONRPCErrorMessage(val string) attribute.KeyValue {
+ return RPCJSONRPCErrorMessageKey.String(val)
+}
+
+// RPCJSONRPCRequestID returns an attribute KeyValue conforming to the
+// "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` property
+// of request or response. Since protocol allows id to be int, string, `null` or
+// missing (for notifications), value is expected to be cast to string for
+// simplicity. Use empty string in case of `null` value. Omit entirely if this is
+// a notification.
+func RPCJSONRPCRequestID(val string) attribute.KeyValue {
+ return RPCJSONRPCRequestIDKey.String(val)
+}
+
+// RPCJSONRPCVersion returns an attribute KeyValue conforming to the
+// "rpc.jsonrpc.version" semantic conventions. It represents the protocol version
+// as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 doesn't
+// specify this, the value can be omitted.
+func RPCJSONRPCVersion(val string) attribute.KeyValue {
+ return RPCJSONRPCVersionKey.String(val)
+}
+
+// RPCMessageCompressedSize returns an attribute KeyValue conforming to the
+// "rpc.message.compressed_size" semantic conventions. It represents the
+// compressed size of the message in bytes.
+func RPCMessageCompressedSize(val int) attribute.KeyValue {
+ return RPCMessageCompressedSizeKey.Int(val)
+}
+
+// RPCMessageID returns an attribute KeyValue conforming to the "rpc.message.id"
+// semantic conventions. It MUST be calculated as two different counters starting
+// from `1` one for sent messages and one for received message..
+func RPCMessageID(val int) attribute.KeyValue {
+ return RPCMessageIDKey.Int(val)
+}
+
+// RPCMessageUncompressedSize returns an attribute KeyValue conforming to the
+// "rpc.message.uncompressed_size" semantic conventions. It represents the
+// uncompressed size of the message in bytes.
+func RPCMessageUncompressedSize(val int) attribute.KeyValue {
+ return RPCMessageUncompressedSizeKey.Int(val)
+}
+
+// RPCMethod returns an attribute KeyValue conforming to the "rpc.method"
+// semantic conventions. It represents the name of the (logical) method being
+// called, must be equal to the $method part in the span name.
+func RPCMethod(val string) attribute.KeyValue {
+ return RPCMethodKey.String(val)
+}
+
+// RPCService returns an attribute KeyValue conforming to the "rpc.service"
+// semantic conventions. It represents the full (logical) name of the service
+// being called, including its package name, if applicable.
+func RPCService(val string) attribute.KeyValue {
+ return RPCServiceKey.String(val)
+}
+
+// Enum values for rpc.connect_rpc.error_code
+var (
+ // cancelled
+ // Stability: development
+ RPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String("cancelled")
+ // unknown
+ // Stability: development
+ RPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String("unknown")
+ // invalid_argument
+ // Stability: development
+ RPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String("invalid_argument")
+ // deadline_exceeded
+ // Stability: development
+ RPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String("deadline_exceeded")
+ // not_found
+ // Stability: development
+ RPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String("not_found")
+ // already_exists
+ // Stability: development
+ RPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String("already_exists")
+ // permission_denied
+ // Stability: development
+ RPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String("permission_denied")
+ // resource_exhausted
+ // Stability: development
+ RPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String("resource_exhausted")
+ // failed_precondition
+ // Stability: development
+ RPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String("failed_precondition")
+ // aborted
+ // Stability: development
+ RPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String("aborted")
+ // out_of_range
+ // Stability: development
+ RPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String("out_of_range")
+ // unimplemented
+ // Stability: development
+ RPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String("unimplemented")
+ // internal
+ // Stability: development
+ RPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String("internal")
+ // unavailable
+ // Stability: development
+ RPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String("unavailable")
+ // data_loss
+ // Stability: development
+ RPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String("data_loss")
+ // unauthenticated
+ // Stability: development
+ RPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String("unauthenticated")
+)
+
+// Enum values for rpc.grpc.status_code
+var (
+ // OK
+ // Stability: development
+ RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0)
+ // CANCELLED
+ // Stability: development
+ RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1)
+ // UNKNOWN
+ // Stability: development
+ RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2)
+ // INVALID_ARGUMENT
+ // Stability: development
+ RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3)
+ // DEADLINE_EXCEEDED
+ // Stability: development
+ RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4)
+ // NOT_FOUND
+ // Stability: development
+ RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5)
+ // ALREADY_EXISTS
+ // Stability: development
+ RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6)
+ // PERMISSION_DENIED
+ // Stability: development
+ RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7)
+ // RESOURCE_EXHAUSTED
+ // Stability: development
+ RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8)
+ // FAILED_PRECONDITION
+ // Stability: development
+ RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9)
+ // ABORTED
+ // Stability: development
+ RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10)
+ // OUT_OF_RANGE
+ // Stability: development
+ RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11)
+ // UNIMPLEMENTED
+ // Stability: development
+ RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12)
+ // INTERNAL
+ // Stability: development
+ RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13)
+ // UNAVAILABLE
+ // Stability: development
+ RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14)
+ // DATA_LOSS
+ // Stability: development
+ RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15)
+ // UNAUTHENTICATED
+ // Stability: development
+ RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16)
+)
+
+// Enum values for rpc.message.type
+var (
+ // sent
+ // Stability: development
+ RPCMessageTypeSent = RPCMessageTypeKey.String("SENT")
+ // received
+ // Stability: development
+ RPCMessageTypeReceived = RPCMessageTypeKey.String("RECEIVED")
+)
+
+// Enum values for rpc.system
+var (
+ // gRPC
+ // Stability: development
+ RPCSystemGRPC = RPCSystemKey.String("grpc")
+ // Java RMI
+ // Stability: development
+ RPCSystemJavaRmi = RPCSystemKey.String("java_rmi")
+ // .NET WCF
+ // Stability: development
+ RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf")
+ // Apache Dubbo
+ // Stability: development
+ RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo")
+ // Connect RPC
+ // Stability: development
+ RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc")
+)
+
+// Namespace: security_rule
+const (
+ // SecurityRuleCategoryKey is the attribute Key conforming to the
+ // "security_rule.category" semantic conventions. It represents a categorization
+ // value keyword used by the entity using the rule for detection of this event.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Attempted Information Leak"
+ SecurityRuleCategoryKey = attribute.Key("security_rule.category")
+
+ // SecurityRuleDescriptionKey is the attribute Key conforming to the
+ // "security_rule.description" semantic conventions. It represents the
+ // description of the rule generating the event.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Block requests to public DNS over HTTPS / TLS protocols"
+ SecurityRuleDescriptionKey = attribute.Key("security_rule.description")
+
+ // SecurityRuleLicenseKey is the attribute Key conforming to the
+ // "security_rule.license" semantic conventions. It represents the name of the
+ // license under which the rule used to generate this event is made available.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Apache 2.0"
+ SecurityRuleLicenseKey = attribute.Key("security_rule.license")
+
+ // SecurityRuleNameKey is the attribute Key conforming to the
+ // "security_rule.name" semantic conventions. It represents the name of the rule
+ // or signature generating the event.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "BLOCK_DNS_over_TLS"
+ SecurityRuleNameKey = attribute.Key("security_rule.name")
+
+ // SecurityRuleReferenceKey is the attribute Key conforming to the
+ // "security_rule.reference" semantic conventions. It represents the reference
+ // URL to additional information about the rule used to generate this event.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "https://en.wikipedia.org/wiki/DNS_over_TLS"
+ // Note: The URL can point to the vendor’s documentation about the rule. If
+ // that’s not available, it can also be a link to a more general page
+ // describing this type of alert.
+ SecurityRuleReferenceKey = attribute.Key("security_rule.reference")
+
+ // SecurityRuleRulesetNameKey is the attribute Key conforming to the
+ // "security_rule.ruleset.name" semantic conventions. It represents the name of
+ // the ruleset, policy, group, or parent category in which the rule used to
+ // generate this event is a member.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Standard_Protocol_Filters"
+ SecurityRuleRulesetNameKey = attribute.Key("security_rule.ruleset.name")
+
+ // SecurityRuleUUIDKey is the attribute Key conforming to the
+ // "security_rule.uuid" semantic conventions. It represents a rule ID that is
+ // unique within the scope of a set or group of agents, observers, or other
+ // entities using the rule for detection of this event.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "550e8400-e29b-41d4-a716-446655440000", "1100110011"
+ SecurityRuleUUIDKey = attribute.Key("security_rule.uuid")
+
+ // SecurityRuleVersionKey is the attribute Key conforming to the
+ // "security_rule.version" semantic conventions. It represents the version /
+ // revision of the rule being used for analysis.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1.0.0"
+ SecurityRuleVersionKey = attribute.Key("security_rule.version")
+)
+
+// SecurityRuleCategory returns an attribute KeyValue conforming to the
+// "security_rule.category" semantic conventions. It represents a categorization
+// value keyword used by the entity using the rule for detection of this event.
+func SecurityRuleCategory(val string) attribute.KeyValue {
+ return SecurityRuleCategoryKey.String(val)
+}
+
+// SecurityRuleDescription returns an attribute KeyValue conforming to the
+// "security_rule.description" semantic conventions. It represents the
+// description of the rule generating the event.
+func SecurityRuleDescription(val string) attribute.KeyValue {
+ return SecurityRuleDescriptionKey.String(val)
+}
+
+// SecurityRuleLicense returns an attribute KeyValue conforming to the
+// "security_rule.license" semantic conventions. It represents the name of the
+// license under which the rule used to generate this event is made available.
+func SecurityRuleLicense(val string) attribute.KeyValue {
+ return SecurityRuleLicenseKey.String(val)
+}
+
+// SecurityRuleName returns an attribute KeyValue conforming to the
+// "security_rule.name" semantic conventions. It represents the name of the rule
+// or signature generating the event.
+func SecurityRuleName(val string) attribute.KeyValue {
+ return SecurityRuleNameKey.String(val)
+}
+
+// SecurityRuleReference returns an attribute KeyValue conforming to the
+// "security_rule.reference" semantic conventions. It represents the reference
+// URL to additional information about the rule used to generate this event.
+func SecurityRuleReference(val string) attribute.KeyValue {
+ return SecurityRuleReferenceKey.String(val)
+}
+
+// SecurityRuleRulesetName returns an attribute KeyValue conforming to the
+// "security_rule.ruleset.name" semantic conventions. It represents the name of
+// the ruleset, policy, group, or parent category in which the rule used to
+// generate this event is a member.
+func SecurityRuleRulesetName(val string) attribute.KeyValue {
+ return SecurityRuleRulesetNameKey.String(val)
+}
+
+// SecurityRuleUUID returns an attribute KeyValue conforming to the
+// "security_rule.uuid" semantic conventions. It represents a rule ID that is
+// unique within the scope of a set or group of agents, observers, or other
+// entities using the rule for detection of this event.
+func SecurityRuleUUID(val string) attribute.KeyValue {
+ return SecurityRuleUUIDKey.String(val)
+}
+
+// SecurityRuleVersion returns an attribute KeyValue conforming to the
+// "security_rule.version" semantic conventions. It represents the version /
+// revision of the rule being used for analysis.
+func SecurityRuleVersion(val string) attribute.KeyValue {
+ return SecurityRuleVersionKey.String(val)
+}
+
+// Namespace: server
+const (
+ // ServerAddressKey is the attribute Key conforming to the "server.address"
+ // semantic conventions. It represents the server domain name if available
+ // without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "example.com", "10.1.2.80", "/tmp/my.sock"
+ // Note: When observed from the client side, and when communicating through an
+ // intermediary, `server.address` SHOULD represent the server address behind any
+ // intermediaries, for example proxies, if it's available.
+ ServerAddressKey = attribute.Key("server.address")
+
+ // ServerPortKey is the attribute Key conforming to the "server.port" semantic
+ // conventions. It represents the server port number.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: 80, 8080, 443
+ // Note: When observed from the client side, and when communicating through an
+ // intermediary, `server.port` SHOULD represent the server port behind any
+ // intermediaries, for example proxies, if it's available.
+ ServerPortKey = attribute.Key("server.port")
+)
+
+// ServerAddress returns an attribute KeyValue conforming to the "server.address"
+// semantic conventions. It represents the server domain name if available
+// without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func ServerAddress(val string) attribute.KeyValue {
+ return ServerAddressKey.String(val)
+}
+
+// ServerPort returns an attribute KeyValue conforming to the "server.port"
+// semantic conventions. It represents the server port number.
+func ServerPort(val int) attribute.KeyValue {
+ return ServerPortKey.Int(val)
+}
+
+// Namespace: service
+const (
+ // ServiceInstanceIDKey is the attribute Key conforming to the
+ // "service.instance.id" semantic conventions. It represents the string ID of
+ // the service instance.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "627cc493-f310-47de-96bd-71410b7dec09"
+ // Note: MUST be unique for each instance of the same
+ // `service.namespace,service.name` pair (in other words
+ // `service.namespace,service.name,service.instance.id` triplet MUST be globally
+ // unique). The ID helps to
+ // distinguish instances of the same service that exist at the same time (e.g.
+ // instances of a horizontally scaled
+ // service).
+ //
+ // Implementations, such as SDKs, are recommended to generate a random Version 1
+ // or Version 4 [RFC
+ // 4122] UUID, but are free to use an inherent unique ID as
+ // the source of
+ // this value if stability is desirable. In that case, the ID SHOULD be used as
+ // source of a UUID Version 5 and
+ // SHOULD use the following UUID as the namespace:
+ // `4d63009a-8d0f-11ee-aad7-4c796ed8e320`.
+ //
+ // UUIDs are typically recommended, as only an opaque value for the purposes of
+ // identifying a service instance is
+ // needed. Similar to what can be seen in the man page for the
+ // [`/etc/machine-id`] file, the underlying
+ // data, such as pod name and namespace should be treated as confidential, being
+ // the user's choice to expose it
+ // or not via another resource attribute.
+ //
+ // For applications running behind an application server (like unicorn), we do
+ // not recommend using one identifier
+ // for all processes participating in the application. Instead, it's recommended
+ // each division (e.g. a worker
+ // thread in unicorn) to have its own instance.id.
+ //
+ // It's not recommended for a Collector to set `service.instance.id` if it can't
+ // unambiguously determine the
+ // service instance that is generating that telemetry. For instance, creating an
+ // UUID based on `pod.name` will
+ // likely be wrong, as the Collector might not know from which container within
+ // that pod the telemetry originated.
+ // However, Collectors can set the `service.instance.id` if they can
+ // unambiguously determine the service instance
+ // for that telemetry. This is typically the case for scraping receivers, as
+ // they know the target address and
+ // port.
+ //
+ // [RFC
+ // 4122]: https://www.ietf.org/rfc/rfc4122.txt
+ // [`/etc/machine-id`]: https://www.freedesktop.org/software/systemd/man/latest/machine-id.html
+ ServiceInstanceIDKey = attribute.Key("service.instance.id")
+
+ // ServiceNameKey is the attribute Key conforming to the "service.name" semantic
+ // conventions. It represents the logical name of the service.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "shoppingcart"
+ // Note: MUST be the same for all instances of horizontally scaled services. If
+ // the value was not specified, SDKs MUST fallback to `unknown_service:`
+ // concatenated with [`process.executable.name`], e.g. `unknown_service:bash`.
+ // If `process.executable.name` is not available, the value MUST be set to
+ // `unknown_service`.
+ //
+ // [`process.executable.name`]: process.md
+ ServiceNameKey = attribute.Key("service.name")
+
+ // ServiceNamespaceKey is the attribute Key conforming to the
+ // "service.namespace" semantic conventions. It represents a namespace for
+ // `service.name`.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Shop"
+ // Note: A string value having a meaning that helps to distinguish a group of
+ // services, for example the team name that owns a group of services.
+ // `service.name` is expected to be unique within the same namespace. If
+ // `service.namespace` is not specified in the Resource then `service.name` is
+ // expected to be unique for all services that have no explicit namespace
+ // defined (so the empty/unspecified namespace is simply one more valid
+ // namespace). Zero-length namespace string is assumed equal to unspecified
+ // namespace.
+ ServiceNamespaceKey = attribute.Key("service.namespace")
+
+ // ServiceVersionKey is the attribute Key conforming to the "service.version"
+ // semantic conventions. It represents the version string of the service API or
+ // implementation. The format is not defined by these conventions.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "2.0.0", "a01dbef8a"
+ ServiceVersionKey = attribute.Key("service.version")
+)
+
+// ServiceInstanceID returns an attribute KeyValue conforming to the
+// "service.instance.id" semantic conventions. It represents the string ID of the
+// service instance.
+func ServiceInstanceID(val string) attribute.KeyValue {
+ return ServiceInstanceIDKey.String(val)
+}
+
+// ServiceName returns an attribute KeyValue conforming to the "service.name"
+// semantic conventions. It represents the logical name of the service.
+func ServiceName(val string) attribute.KeyValue {
+ return ServiceNameKey.String(val)
+}
+
+// ServiceNamespace returns an attribute KeyValue conforming to the
+// "service.namespace" semantic conventions. It represents a namespace for
+// `service.name`.
+func ServiceNamespace(val string) attribute.KeyValue {
+ return ServiceNamespaceKey.String(val)
+}
+
+// ServiceVersion returns an attribute KeyValue conforming to the
+// "service.version" semantic conventions. It represents the version string of
+// the service API or implementation. The format is not defined by these
+// conventions.
+func ServiceVersion(val string) attribute.KeyValue {
+ return ServiceVersionKey.String(val)
+}
+
+// Namespace: session
+const (
+ // SessionIDKey is the attribute Key conforming to the "session.id" semantic
+ // conventions. It represents a unique id to identify a session.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 00112233-4455-6677-8899-aabbccddeeff
+ SessionIDKey = attribute.Key("session.id")
+
+ // SessionPreviousIDKey is the attribute Key conforming to the
+ // "session.previous_id" semantic conventions. It represents the previous
+ // `session.id` for this user, when known.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 00112233-4455-6677-8899-aabbccddeeff
+ SessionPreviousIDKey = attribute.Key("session.previous_id")
+)
+
+// SessionID returns an attribute KeyValue conforming to the "session.id"
+// semantic conventions. It represents a unique id to identify a session.
+func SessionID(val string) attribute.KeyValue {
+ return SessionIDKey.String(val)
+}
+
+// SessionPreviousID returns an attribute KeyValue conforming to the
+// "session.previous_id" semantic conventions. It represents the previous
+// `session.id` for this user, when known.
+func SessionPreviousID(val string) attribute.KeyValue {
+ return SessionPreviousIDKey.String(val)
+}
+
+// Namespace: signalr
+const (
+ // SignalRConnectionStatusKey is the attribute Key conforming to the
+ // "signalr.connection.status" semantic conventions. It represents the signalR
+ // HTTP connection closure status.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "app_shutdown", "timeout"
+ SignalRConnectionStatusKey = attribute.Key("signalr.connection.status")
+
+ // SignalRTransportKey is the attribute Key conforming to the
+ // "signalr.transport" semantic conventions. It represents the
+ // [SignalR transport type].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "web_sockets", "long_polling"
+ //
+ // [SignalR transport type]: https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md
+ SignalRTransportKey = attribute.Key("signalr.transport")
+)
+
+// Enum values for signalr.connection.status
+var (
+ // The connection was closed normally.
+ // Stability: stable
+ SignalRConnectionStatusNormalClosure = SignalRConnectionStatusKey.String("normal_closure")
+ // The connection was closed due to a timeout.
+ // Stability: stable
+ SignalRConnectionStatusTimeout = SignalRConnectionStatusKey.String("timeout")
+ // The connection was closed because the app is shutting down.
+ // Stability: stable
+ SignalRConnectionStatusAppShutdown = SignalRConnectionStatusKey.String("app_shutdown")
+)
+
+// Enum values for signalr.transport
+var (
+ // ServerSentEvents protocol
+ // Stability: stable
+ SignalRTransportServerSentEvents = SignalRTransportKey.String("server_sent_events")
+ // LongPolling protocol
+ // Stability: stable
+ SignalRTransportLongPolling = SignalRTransportKey.String("long_polling")
+ // WebSockets protocol
+ // Stability: stable
+ SignalRTransportWebSockets = SignalRTransportKey.String("web_sockets")
+)
+
+// Namespace: source
+const (
+ // SourceAddressKey is the attribute Key conforming to the "source.address"
+ // semantic conventions. It represents the source address - domain name if
+ // available without reverse DNS lookup; otherwise, IP address or Unix domain
+ // socket name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "source.example.com", "10.1.2.80", "/tmp/my.sock"
+ // Note: When observed from the destination side, and when communicating through
+ // an intermediary, `source.address` SHOULD represent the source address behind
+ // any intermediaries, for example proxies, if it's available.
+ SourceAddressKey = attribute.Key("source.address")
+
+ // SourcePortKey is the attribute Key conforming to the "source.port" semantic
+ // conventions. It represents the source port number.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 3389, 2888
+ SourcePortKey = attribute.Key("source.port")
+)
+
+// SourceAddress returns an attribute KeyValue conforming to the "source.address"
+// semantic conventions. It represents the source address - domain name if
+// available without reverse DNS lookup; otherwise, IP address or Unix domain
+// socket name.
+func SourceAddress(val string) attribute.KeyValue {
+ return SourceAddressKey.String(val)
+}
+
+// SourcePort returns an attribute KeyValue conforming to the "source.port"
+// semantic conventions. It represents the source port number.
+func SourcePort(val int) attribute.KeyValue {
+ return SourcePortKey.Int(val)
+}
+
+// Namespace: system
+const (
+ // SystemCPULogicalNumberKey is the attribute Key conforming to the
+ // "system.cpu.logical_number" semantic conventions. It represents the
+ // deprecated, use `cpu.logical_number` instead.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 1
+ SystemCPULogicalNumberKey = attribute.Key("system.cpu.logical_number")
+
+ // SystemDeviceKey is the attribute Key conforming to the "system.device"
+ // semantic conventions. It represents the device identifier.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "(identifier)"
+ SystemDeviceKey = attribute.Key("system.device")
+
+ // SystemFilesystemModeKey is the attribute Key conforming to the
+ // "system.filesystem.mode" semantic conventions. It represents the filesystem
+ // mode.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "rw, ro"
+ SystemFilesystemModeKey = attribute.Key("system.filesystem.mode")
+
+ // SystemFilesystemMountpointKey is the attribute Key conforming to the
+ // "system.filesystem.mountpoint" semantic conventions. It represents the
+ // filesystem mount path.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/mnt/data"
+ SystemFilesystemMountpointKey = attribute.Key("system.filesystem.mountpoint")
+
+ // SystemFilesystemStateKey is the attribute Key conforming to the
+ // "system.filesystem.state" semantic conventions. It represents the filesystem
+ // state.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "used"
+ SystemFilesystemStateKey = attribute.Key("system.filesystem.state")
+
+ // SystemFilesystemTypeKey is the attribute Key conforming to the
+ // "system.filesystem.type" semantic conventions. It represents the filesystem
+ // type.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "ext4"
+ SystemFilesystemTypeKey = attribute.Key("system.filesystem.type")
+
+ // SystemMemoryStateKey is the attribute Key conforming to the
+ // "system.memory.state" semantic conventions. It represents the memory state.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "free", "cached"
+ SystemMemoryStateKey = attribute.Key("system.memory.state")
+
+ // SystemPagingDirectionKey is the attribute Key conforming to the
+ // "system.paging.direction" semantic conventions. It represents the paging
+ // access direction.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "in"
+ SystemPagingDirectionKey = attribute.Key("system.paging.direction")
+
+ // SystemPagingStateKey is the attribute Key conforming to the
+ // "system.paging.state" semantic conventions. It represents the memory paging
+ // state.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "free"
+ SystemPagingStateKey = attribute.Key("system.paging.state")
+
+ // SystemPagingTypeKey is the attribute Key conforming to the
+ // "system.paging.type" semantic conventions. It represents the memory paging
+ // type.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "minor"
+ SystemPagingTypeKey = attribute.Key("system.paging.type")
+
+ // SystemProcessStatusKey is the attribute Key conforming to the
+ // "system.process.status" semantic conventions. It represents the process
+ // state, e.g., [Linux Process State Codes].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "running"
+ //
+ // [Linux Process State Codes]: https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES
+ SystemProcessStatusKey = attribute.Key("system.process.status")
+)
+
+// SystemCPULogicalNumber returns an attribute KeyValue conforming to the
+// "system.cpu.logical_number" semantic conventions. It represents the
+// deprecated, use `cpu.logical_number` instead.
+func SystemCPULogicalNumber(val int) attribute.KeyValue {
+ return SystemCPULogicalNumberKey.Int(val)
+}
+
+// SystemDevice returns an attribute KeyValue conforming to the "system.device"
+// semantic conventions. It represents the device identifier.
+func SystemDevice(val string) attribute.KeyValue {
+ return SystemDeviceKey.String(val)
+}
+
+// SystemFilesystemMode returns an attribute KeyValue conforming to the
+// "system.filesystem.mode" semantic conventions. It represents the filesystem
+// mode.
+func SystemFilesystemMode(val string) attribute.KeyValue {
+ return SystemFilesystemModeKey.String(val)
+}
+
+// SystemFilesystemMountpoint returns an attribute KeyValue conforming to the
+// "system.filesystem.mountpoint" semantic conventions. It represents the
+// filesystem mount path.
+func SystemFilesystemMountpoint(val string) attribute.KeyValue {
+ return SystemFilesystemMountpointKey.String(val)
+}
+
+// Enum values for system.filesystem.state
+var (
+ // used
+ // Stability: development
+ SystemFilesystemStateUsed = SystemFilesystemStateKey.String("used")
+ // free
+ // Stability: development
+ SystemFilesystemStateFree = SystemFilesystemStateKey.String("free")
+ // reserved
+ // Stability: development
+ SystemFilesystemStateReserved = SystemFilesystemStateKey.String("reserved")
+)
+
+// Enum values for system.filesystem.type
+var (
+ // fat32
+ // Stability: development
+ SystemFilesystemTypeFat32 = SystemFilesystemTypeKey.String("fat32")
+ // exfat
+ // Stability: development
+ SystemFilesystemTypeExfat = SystemFilesystemTypeKey.String("exfat")
+ // ntfs
+ // Stability: development
+ SystemFilesystemTypeNtfs = SystemFilesystemTypeKey.String("ntfs")
+ // refs
+ // Stability: development
+ SystemFilesystemTypeRefs = SystemFilesystemTypeKey.String("refs")
+ // hfsplus
+ // Stability: development
+ SystemFilesystemTypeHfsplus = SystemFilesystemTypeKey.String("hfsplus")
+ // ext4
+ // Stability: development
+ SystemFilesystemTypeExt4 = SystemFilesystemTypeKey.String("ext4")
+)
+
+// Enum values for system.memory.state
+var (
+ // used
+ // Stability: development
+ SystemMemoryStateUsed = SystemMemoryStateKey.String("used")
+ // free
+ // Stability: development
+ SystemMemoryStateFree = SystemMemoryStateKey.String("free")
+ // Deprecated: Removed, report shared memory usage with
+ // `metric.system.memory.shared` metric.
+ SystemMemoryStateShared = SystemMemoryStateKey.String("shared")
+ // buffers
+ // Stability: development
+ SystemMemoryStateBuffers = SystemMemoryStateKey.String("buffers")
+ // cached
+ // Stability: development
+ SystemMemoryStateCached = SystemMemoryStateKey.String("cached")
+)
+
+// Enum values for system.paging.direction
+var (
+ // in
+ // Stability: development
+ SystemPagingDirectionIn = SystemPagingDirectionKey.String("in")
+ // out
+ // Stability: development
+ SystemPagingDirectionOut = SystemPagingDirectionKey.String("out")
+)
+
+// Enum values for system.paging.state
+var (
+ // used
+ // Stability: development
+ SystemPagingStateUsed = SystemPagingStateKey.String("used")
+ // free
+ // Stability: development
+ SystemPagingStateFree = SystemPagingStateKey.String("free")
+)
+
+// Enum values for system.paging.type
+var (
+ // major
+ // Stability: development
+ SystemPagingTypeMajor = SystemPagingTypeKey.String("major")
+ // minor
+ // Stability: development
+ SystemPagingTypeMinor = SystemPagingTypeKey.String("minor")
+)
+
+// Enum values for system.process.status
+var (
+ // running
+ // Stability: development
+ SystemProcessStatusRunning = SystemProcessStatusKey.String("running")
+ // sleeping
+ // Stability: development
+ SystemProcessStatusSleeping = SystemProcessStatusKey.String("sleeping")
+ // stopped
+ // Stability: development
+ SystemProcessStatusStopped = SystemProcessStatusKey.String("stopped")
+ // defunct
+ // Stability: development
+ SystemProcessStatusDefunct = SystemProcessStatusKey.String("defunct")
+)
+
+// Namespace: telemetry
+const (
+ // TelemetryDistroNameKey is the attribute Key conforming to the
+ // "telemetry.distro.name" semantic conventions. It represents the name of the
+ // auto instrumentation agent or distribution, if used.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "parts-unlimited-java"
+ // Note: Official auto instrumentation agents and distributions SHOULD set the
+ // `telemetry.distro.name` attribute to
+ // a string starting with `opentelemetry-`, e.g.
+ // `opentelemetry-java-instrumentation`.
+ TelemetryDistroNameKey = attribute.Key("telemetry.distro.name")
+
+ // TelemetryDistroVersionKey is the attribute Key conforming to the
+ // "telemetry.distro.version" semantic conventions. It represents the version
+ // string of the auto instrumentation agent or distribution, if used.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1.2.3"
+ TelemetryDistroVersionKey = attribute.Key("telemetry.distro.version")
+
+ // TelemetrySDKLanguageKey is the attribute Key conforming to the
+ // "telemetry.sdk.language" semantic conventions. It represents the language of
+ // the telemetry SDK.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples:
+ TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language")
+
+ // TelemetrySDKNameKey is the attribute Key conforming to the
+ // "telemetry.sdk.name" semantic conventions. It represents the name of the
+ // telemetry SDK as defined above.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "opentelemetry"
+ // Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute to
+ // `opentelemetry`.
+ // If another SDK, like a fork or a vendor-provided implementation, is used,
+ // this SDK MUST set the
+ // `telemetry.sdk.name` attribute to the fully-qualified class or module name of
+ // this SDK's main entry point
+ // or another suitable identifier depending on the language.
+ // The identifier `opentelemetry` is reserved and MUST NOT be used in this case.
+ // All custom identifiers SHOULD be stable across different versions of an
+ // implementation.
+ TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name")
+
+ // TelemetrySDKVersionKey is the attribute Key conforming to the
+ // "telemetry.sdk.version" semantic conventions. It represents the version
+ // string of the telemetry SDK.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "1.2.3"
+ TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version")
+)
+
+// TelemetryDistroName returns an attribute KeyValue conforming to the
+// "telemetry.distro.name" semantic conventions. It represents the name of the
+// auto instrumentation agent or distribution, if used.
+func TelemetryDistroName(val string) attribute.KeyValue {
+ return TelemetryDistroNameKey.String(val)
+}
+
+// TelemetryDistroVersion returns an attribute KeyValue conforming to the
+// "telemetry.distro.version" semantic conventions. It represents the version
+// string of the auto instrumentation agent or distribution, if used.
+func TelemetryDistroVersion(val string) attribute.KeyValue {
+ return TelemetryDistroVersionKey.String(val)
+}
+
+// TelemetrySDKName returns an attribute KeyValue conforming to the
+// "telemetry.sdk.name" semantic conventions. It represents the name of the
+// telemetry SDK as defined above.
+func TelemetrySDKName(val string) attribute.KeyValue {
+ return TelemetrySDKNameKey.String(val)
+}
+
+// TelemetrySDKVersion returns an attribute KeyValue conforming to the
+// "telemetry.sdk.version" semantic conventions. It represents the version string
+// of the telemetry SDK.
+func TelemetrySDKVersion(val string) attribute.KeyValue {
+ return TelemetrySDKVersionKey.String(val)
+}
+
+// Enum values for telemetry.sdk.language
+var (
+ // cpp
+ // Stability: stable
+ TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp")
+ // dotnet
+ // Stability: stable
+ TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet")
+ // erlang
+ // Stability: stable
+ TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang")
+ // go
+ // Stability: stable
+ TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go")
+ // java
+ // Stability: stable
+ TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java")
+ // nodejs
+ // Stability: stable
+ TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs")
+ // php
+ // Stability: stable
+ TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php")
+ // python
+ // Stability: stable
+ TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python")
+ // ruby
+ // Stability: stable
+ TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby")
+ // rust
+ // Stability: stable
+ TelemetrySDKLanguageRust = TelemetrySDKLanguageKey.String("rust")
+ // swift
+ // Stability: stable
+ TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift")
+ // webjs
+ // Stability: stable
+ TelemetrySDKLanguageWebJS = TelemetrySDKLanguageKey.String("webjs")
+)
+
+// Namespace: test
+const (
+ // TestCaseNameKey is the attribute Key conforming to the "test.case.name"
+ // semantic conventions. It represents the fully qualified human readable name
+ // of the [test case].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "org.example.TestCase1.test1", "example/tests/TestCase1.test1",
+ // "ExampleTestCase1_test1"
+ //
+ // [test case]: https://wikipedia.org/wiki/Test_case
+ TestCaseNameKey = attribute.Key("test.case.name")
+
+ // TestCaseResultStatusKey is the attribute Key conforming to the
+ // "test.case.result.status" semantic conventions. It represents the status of
+ // the actual test case result from test execution.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "pass", "fail"
+ TestCaseResultStatusKey = attribute.Key("test.case.result.status")
+
+ // TestSuiteNameKey is the attribute Key conforming to the "test.suite.name"
+ // semantic conventions. It represents the human readable name of a [test suite]
+ // .
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "TestSuite1"
+ //
+ // [test suite]: https://wikipedia.org/wiki/Test_suite
+ TestSuiteNameKey = attribute.Key("test.suite.name")
+
+ // TestSuiteRunStatusKey is the attribute Key conforming to the
+ // "test.suite.run.status" semantic conventions. It represents the status of the
+ // test suite run.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "success", "failure", "skipped", "aborted", "timed_out",
+ // "in_progress"
+ TestSuiteRunStatusKey = attribute.Key("test.suite.run.status")
+)
+
+// TestCaseName returns an attribute KeyValue conforming to the "test.case.name"
+// semantic conventions. It represents the fully qualified human readable name of
+// the [test case].
+//
+// [test case]: https://wikipedia.org/wiki/Test_case
+func TestCaseName(val string) attribute.KeyValue {
+ return TestCaseNameKey.String(val)
+}
+
+// TestSuiteName returns an attribute KeyValue conforming to the
+// "test.suite.name" semantic conventions. It represents the human readable name
+// of a [test suite].
+//
+// [test suite]: https://wikipedia.org/wiki/Test_suite
+func TestSuiteName(val string) attribute.KeyValue {
+ return TestSuiteNameKey.String(val)
+}
+
+// Enum values for test.case.result.status
+var (
+ // pass
+ // Stability: development
+ TestCaseResultStatusPass = TestCaseResultStatusKey.String("pass")
+ // fail
+ // Stability: development
+ TestCaseResultStatusFail = TestCaseResultStatusKey.String("fail")
+)
+
+// Enum values for test.suite.run.status
+var (
+ // success
+ // Stability: development
+ TestSuiteRunStatusSuccess = TestSuiteRunStatusKey.String("success")
+ // failure
+ // Stability: development
+ TestSuiteRunStatusFailure = TestSuiteRunStatusKey.String("failure")
+ // skipped
+ // Stability: development
+ TestSuiteRunStatusSkipped = TestSuiteRunStatusKey.String("skipped")
+ // aborted
+ // Stability: development
+ TestSuiteRunStatusAborted = TestSuiteRunStatusKey.String("aborted")
+ // timed_out
+ // Stability: development
+ TestSuiteRunStatusTimedOut = TestSuiteRunStatusKey.String("timed_out")
+ // in_progress
+ // Stability: development
+ TestSuiteRunStatusInProgress = TestSuiteRunStatusKey.String("in_progress")
+)
+
+// Namespace: thread
+const (
+ // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic
+ // conventions. It represents the current "managed" thread ID (as opposed to OS
+ // thread ID).
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ ThreadIDKey = attribute.Key("thread.id")
+
+ // ThreadNameKey is the attribute Key conforming to the "thread.name" semantic
+ // conventions. It represents the current thread name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: main
+ ThreadNameKey = attribute.Key("thread.name")
+)
+
+// ThreadID returns an attribute KeyValue conforming to the "thread.id" semantic
+// conventions. It represents the current "managed" thread ID (as opposed to OS
+// thread ID).
+func ThreadID(val int) attribute.KeyValue {
+ return ThreadIDKey.Int(val)
+}
+
+// ThreadName returns an attribute KeyValue conforming to the "thread.name"
+// semantic conventions. It represents the current thread name.
+func ThreadName(val string) attribute.KeyValue {
+ return ThreadNameKey.String(val)
+}
+
+// Namespace: tls
+const (
+ // TLSCipherKey is the attribute Key conforming to the "tls.cipher" semantic
+ // conventions. It represents the string indicating the [cipher] used during the
+ // current connection.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "TLS_RSA_WITH_3DES_EDE_CBC_SHA",
+ // "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"
+ // Note: The values allowed for `tls.cipher` MUST be one of the `Descriptions`
+ // of the [registered TLS Cipher Suits].
+ //
+ // [cipher]: https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5
+ // [registered TLS Cipher Suits]: https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4
+ TLSCipherKey = attribute.Key("tls.cipher")
+
+ // TLSClientCertificateKey is the attribute Key conforming to the
+ // "tls.client.certificate" semantic conventions. It represents the PEM-encoded
+ // stand-alone certificate offered by the client. This is usually
+ // mutually-exclusive of `client.certificate_chain` since this value also exists
+ // in that list.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "MII..."
+ TLSClientCertificateKey = attribute.Key("tls.client.certificate")
+
+ // TLSClientCertificateChainKey is the attribute Key conforming to the
+ // "tls.client.certificate_chain" semantic conventions. It represents the array
+ // of PEM-encoded certificates that make up the certificate chain offered by the
+ // client. This is usually mutually-exclusive of `client.certificate` since that
+ // value should be the first certificate in the chain.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "MII...", "MI..."
+ TLSClientCertificateChainKey = attribute.Key("tls.client.certificate_chain")
+
+ // TLSClientHashMd5Key is the attribute Key conforming to the
+ // "tls.client.hash.md5" semantic conventions. It represents the certificate
+ // fingerprint using the MD5 digest of DER-encoded version of certificate
+ // offered by the client. For consistency with other hash values, this value
+ // should be formatted as an uppercase hash.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC"
+ TLSClientHashMd5Key = attribute.Key("tls.client.hash.md5")
+
+ // TLSClientHashSha1Key is the attribute Key conforming to the
+ // "tls.client.hash.sha1" semantic conventions. It represents the certificate
+ // fingerprint using the SHA1 digest of DER-encoded version of certificate
+ // offered by the client. For consistency with other hash values, this value
+ // should be formatted as an uppercase hash.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "9E393D93138888D288266C2D915214D1D1CCEB2A"
+ TLSClientHashSha1Key = attribute.Key("tls.client.hash.sha1")
+
+ // TLSClientHashSha256Key is the attribute Key conforming to the
+ // "tls.client.hash.sha256" semantic conventions. It represents the certificate
+ // fingerprint using the SHA256 digest of DER-encoded version of certificate
+ // offered by the client. For consistency with other hash values, this value
+ // should be formatted as an uppercase hash.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0"
+ TLSClientHashSha256Key = attribute.Key("tls.client.hash.sha256")
+
+ // TLSClientIssuerKey is the attribute Key conforming to the "tls.client.issuer"
+ // semantic conventions. It represents the distinguished name of [subject] of
+ // the issuer of the x.509 certificate presented by the client.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com"
+ //
+ // [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6
+ TLSClientIssuerKey = attribute.Key("tls.client.issuer")
+
+ // TLSClientJa3Key is the attribute Key conforming to the "tls.client.ja3"
+ // semantic conventions. It represents a hash that identifies clients based on
+ // how they perform an SSL/TLS handshake.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "d4e5b18d6b55c71272893221c96ba240"
+ TLSClientJa3Key = attribute.Key("tls.client.ja3")
+
+ // TLSClientNotAfterKey is the attribute Key conforming to the
+ // "tls.client.not_after" semantic conventions. It represents the date/Time
+ // indicating when client certificate is no longer considered valid.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2021-01-01T00:00:00.000Z"
+ TLSClientNotAfterKey = attribute.Key("tls.client.not_after")
+
+ // TLSClientNotBeforeKey is the attribute Key conforming to the
+ // "tls.client.not_before" semantic conventions. It represents the date/Time
+ // indicating when client certificate is first considered valid.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1970-01-01T00:00:00.000Z"
+ TLSClientNotBeforeKey = attribute.Key("tls.client.not_before")
+
+ // TLSClientSubjectKey is the attribute Key conforming to the
+ // "tls.client.subject" semantic conventions. It represents the distinguished
+ // name of subject of the x.509 certificate presented by the client.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "CN=myclient, OU=Documentation Team, DC=example, DC=com"
+ TLSClientSubjectKey = attribute.Key("tls.client.subject")
+
+ // TLSClientSupportedCiphersKey is the attribute Key conforming to the
+ // "tls.client.supported_ciphers" semantic conventions. It represents the array
+ // of ciphers offered by the client during the client hello.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+ // "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"
+ TLSClientSupportedCiphersKey = attribute.Key("tls.client.supported_ciphers")
+
+ // TLSCurveKey is the attribute Key conforming to the "tls.curve" semantic
+ // conventions. It represents the string indicating the curve used for the given
+ // cipher, when applicable.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "secp256r1"
+ TLSCurveKey = attribute.Key("tls.curve")
+
+ // TLSEstablishedKey is the attribute Key conforming to the "tls.established"
+ // semantic conventions. It represents the boolean flag indicating if the TLS
+ // negotiation was successful and transitioned to an encrypted tunnel.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: true
+ TLSEstablishedKey = attribute.Key("tls.established")
+
+ // TLSNextProtocolKey is the attribute Key conforming to the "tls.next_protocol"
+ // semantic conventions. It represents the string indicating the protocol being
+ // tunneled. Per the values in the [IANA registry], this string should be lower
+ // case.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "http/1.1"
+ //
+ // [IANA registry]: https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
+ TLSNextProtocolKey = attribute.Key("tls.next_protocol")
+
+ // TLSProtocolNameKey is the attribute Key conforming to the "tls.protocol.name"
+ // semantic conventions. It represents the normalized lowercase protocol name
+ // parsed from original string of the negotiated [SSL/TLS protocol version].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ //
+ // [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values
+ TLSProtocolNameKey = attribute.Key("tls.protocol.name")
+
+ // TLSProtocolVersionKey is the attribute Key conforming to the
+ // "tls.protocol.version" semantic conventions. It represents the numeric part
+ // of the version parsed from the original string of the negotiated
+ // [SSL/TLS protocol version].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1.2", "3"
+ //
+ // [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values
+ TLSProtocolVersionKey = attribute.Key("tls.protocol.version")
+
+ // TLSResumedKey is the attribute Key conforming to the "tls.resumed" semantic
+ // conventions. It represents the boolean flag indicating if this TLS connection
+ // was resumed from an existing TLS negotiation.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: true
+ TLSResumedKey = attribute.Key("tls.resumed")
+
+ // TLSServerCertificateKey is the attribute Key conforming to the
+ // "tls.server.certificate" semantic conventions. It represents the PEM-encoded
+ // stand-alone certificate offered by the server. This is usually
+ // mutually-exclusive of `server.certificate_chain` since this value also exists
+ // in that list.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "MII..."
+ TLSServerCertificateKey = attribute.Key("tls.server.certificate")
+
+ // TLSServerCertificateChainKey is the attribute Key conforming to the
+ // "tls.server.certificate_chain" semantic conventions. It represents the array
+ // of PEM-encoded certificates that make up the certificate chain offered by the
+ // server. This is usually mutually-exclusive of `server.certificate` since that
+ // value should be the first certificate in the chain.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "MII...", "MI..."
+ TLSServerCertificateChainKey = attribute.Key("tls.server.certificate_chain")
+
+ // TLSServerHashMd5Key is the attribute Key conforming to the
+ // "tls.server.hash.md5" semantic conventions. It represents the certificate
+ // fingerprint using the MD5 digest of DER-encoded version of certificate
+ // offered by the server. For consistency with other hash values, this value
+ // should be formatted as an uppercase hash.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC"
+ TLSServerHashMd5Key = attribute.Key("tls.server.hash.md5")
+
+ // TLSServerHashSha1Key is the attribute Key conforming to the
+ // "tls.server.hash.sha1" semantic conventions. It represents the certificate
+ // fingerprint using the SHA1 digest of DER-encoded version of certificate
+ // offered by the server. For consistency with other hash values, this value
+ // should be formatted as an uppercase hash.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "9E393D93138888D288266C2D915214D1D1CCEB2A"
+ TLSServerHashSha1Key = attribute.Key("tls.server.hash.sha1")
+
+ // TLSServerHashSha256Key is the attribute Key conforming to the
+ // "tls.server.hash.sha256" semantic conventions. It represents the certificate
+ // fingerprint using the SHA256 digest of DER-encoded version of certificate
+ // offered by the server. For consistency with other hash values, this value
+ // should be formatted as an uppercase hash.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0"
+ TLSServerHashSha256Key = attribute.Key("tls.server.hash.sha256")
+
+ // TLSServerIssuerKey is the attribute Key conforming to the "tls.server.issuer"
+ // semantic conventions. It represents the distinguished name of [subject] of
+ // the issuer of the x.509 certificate presented by the client.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com"
+ //
+ // [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6
+ TLSServerIssuerKey = attribute.Key("tls.server.issuer")
+
+ // TLSServerJa3sKey is the attribute Key conforming to the "tls.server.ja3s"
+ // semantic conventions. It represents a hash that identifies servers based on
+ // how they perform an SSL/TLS handshake.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "d4e5b18d6b55c71272893221c96ba240"
+ TLSServerJa3sKey = attribute.Key("tls.server.ja3s")
+
+ // TLSServerNotAfterKey is the attribute Key conforming to the
+ // "tls.server.not_after" semantic conventions. It represents the date/Time
+ // indicating when server certificate is no longer considered valid.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2021-01-01T00:00:00.000Z"
+ TLSServerNotAfterKey = attribute.Key("tls.server.not_after")
+
+ // TLSServerNotBeforeKey is the attribute Key conforming to the
+ // "tls.server.not_before" semantic conventions. It represents the date/Time
+ // indicating when server certificate is first considered valid.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1970-01-01T00:00:00.000Z"
+ TLSServerNotBeforeKey = attribute.Key("tls.server.not_before")
+
+ // TLSServerSubjectKey is the attribute Key conforming to the
+ // "tls.server.subject" semantic conventions. It represents the distinguished
+ // name of subject of the x.509 certificate presented by the server.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "CN=myserver, OU=Documentation Team, DC=example, DC=com"
+ TLSServerSubjectKey = attribute.Key("tls.server.subject")
+)
+
+// TLSCipher returns an attribute KeyValue conforming to the "tls.cipher"
+// semantic conventions. It represents the string indicating the [cipher] used
+// during the current connection.
+//
+// [cipher]: https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5
+func TLSCipher(val string) attribute.KeyValue {
+ return TLSCipherKey.String(val)
+}
+
+// TLSClientCertificate returns an attribute KeyValue conforming to the
+// "tls.client.certificate" semantic conventions. It represents the PEM-encoded
+// stand-alone certificate offered by the client. This is usually
+// mutually-exclusive of `client.certificate_chain` since this value also exists
+// in that list.
+func TLSClientCertificate(val string) attribute.KeyValue {
+ return TLSClientCertificateKey.String(val)
+}
+
+// TLSClientCertificateChain returns an attribute KeyValue conforming to the
+// "tls.client.certificate_chain" semantic conventions. It represents the array
+// of PEM-encoded certificates that make up the certificate chain offered by the
+// client. This is usually mutually-exclusive of `client.certificate` since that
+// value should be the first certificate in the chain.
+func TLSClientCertificateChain(val ...string) attribute.KeyValue {
+ return TLSClientCertificateChainKey.StringSlice(val)
+}
+
+// TLSClientHashMd5 returns an attribute KeyValue conforming to the
+// "tls.client.hash.md5" semantic conventions. It represents the certificate
+// fingerprint using the MD5 digest of DER-encoded version of certificate offered
+// by the client. For consistency with other hash values, this value should be
+// formatted as an uppercase hash.
+func TLSClientHashMd5(val string) attribute.KeyValue {
+ return TLSClientHashMd5Key.String(val)
+}
+
+// TLSClientHashSha1 returns an attribute KeyValue conforming to the
+// "tls.client.hash.sha1" semantic conventions. It represents the certificate
+// fingerprint using the SHA1 digest of DER-encoded version of certificate
+// offered by the client. For consistency with other hash values, this value
+// should be formatted as an uppercase hash.
+func TLSClientHashSha1(val string) attribute.KeyValue {
+ return TLSClientHashSha1Key.String(val)
+}
+
+// TLSClientHashSha256 returns an attribute KeyValue conforming to the
+// "tls.client.hash.sha256" semantic conventions. It represents the certificate
+// fingerprint using the SHA256 digest of DER-encoded version of certificate
+// offered by the client. For consistency with other hash values, this value
+// should be formatted as an uppercase hash.
+func TLSClientHashSha256(val string) attribute.KeyValue {
+ return TLSClientHashSha256Key.String(val)
+}
+
+// TLSClientIssuer returns an attribute KeyValue conforming to the
+// "tls.client.issuer" semantic conventions. It represents the distinguished name
+// of [subject] of the issuer of the x.509 certificate presented by the client.
+//
+// [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6
+func TLSClientIssuer(val string) attribute.KeyValue {
+ return TLSClientIssuerKey.String(val)
+}
+
+// TLSClientJa3 returns an attribute KeyValue conforming to the "tls.client.ja3"
+// semantic conventions. It represents a hash that identifies clients based on
+// how they perform an SSL/TLS handshake.
+func TLSClientJa3(val string) attribute.KeyValue {
+ return TLSClientJa3Key.String(val)
+}
+
+// TLSClientNotAfter returns an attribute KeyValue conforming to the
+// "tls.client.not_after" semantic conventions. It represents the date/Time
+// indicating when client certificate is no longer considered valid.
+func TLSClientNotAfter(val string) attribute.KeyValue {
+ return TLSClientNotAfterKey.String(val)
+}
+
+// TLSClientNotBefore returns an attribute KeyValue conforming to the
+// "tls.client.not_before" semantic conventions. It represents the date/Time
+// indicating when client certificate is first considered valid.
+func TLSClientNotBefore(val string) attribute.KeyValue {
+ return TLSClientNotBeforeKey.String(val)
+}
+
+// TLSClientSubject returns an attribute KeyValue conforming to the
+// "tls.client.subject" semantic conventions. It represents the distinguished
+// name of subject of the x.509 certificate presented by the client.
+func TLSClientSubject(val string) attribute.KeyValue {
+ return TLSClientSubjectKey.String(val)
+}
+
+// TLSClientSupportedCiphers returns an attribute KeyValue conforming to the
+// "tls.client.supported_ciphers" semantic conventions. It represents the array
+// of ciphers offered by the client during the client hello.
+func TLSClientSupportedCiphers(val ...string) attribute.KeyValue {
+ return TLSClientSupportedCiphersKey.StringSlice(val)
+}
+
+// TLSCurve returns an attribute KeyValue conforming to the "tls.curve" semantic
+// conventions. It represents the string indicating the curve used for the given
+// cipher, when applicable.
+func TLSCurve(val string) attribute.KeyValue {
+ return TLSCurveKey.String(val)
+}
+
+// TLSEstablished returns an attribute KeyValue conforming to the
+// "tls.established" semantic conventions. It represents the boolean flag
+// indicating if the TLS negotiation was successful and transitioned to an
+// encrypted tunnel.
+func TLSEstablished(val bool) attribute.KeyValue {
+ return TLSEstablishedKey.Bool(val)
+}
+
+// TLSNextProtocol returns an attribute KeyValue conforming to the
+// "tls.next_protocol" semantic conventions. It represents the string indicating
+// the protocol being tunneled. Per the values in the [IANA registry], this
+// string should be lower case.
+//
+// [IANA registry]: https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
+func TLSNextProtocol(val string) attribute.KeyValue {
+ return TLSNextProtocolKey.String(val)
+}
+
+// TLSProtocolVersion returns an attribute KeyValue conforming to the
+// "tls.protocol.version" semantic conventions. It represents the numeric part of
+// the version parsed from the original string of the negotiated
+// [SSL/TLS protocol version].
+//
+// [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values
+func TLSProtocolVersion(val string) attribute.KeyValue {
+ return TLSProtocolVersionKey.String(val)
+}
+
+// TLSResumed returns an attribute KeyValue conforming to the "tls.resumed"
+// semantic conventions. It represents the boolean flag indicating if this TLS
+// connection was resumed from an existing TLS negotiation.
+func TLSResumed(val bool) attribute.KeyValue {
+ return TLSResumedKey.Bool(val)
+}
+
+// TLSServerCertificate returns an attribute KeyValue conforming to the
+// "tls.server.certificate" semantic conventions. It represents the PEM-encoded
+// stand-alone certificate offered by the server. This is usually
+// mutually-exclusive of `server.certificate_chain` since this value also exists
+// in that list.
+func TLSServerCertificate(val string) attribute.KeyValue {
+ return TLSServerCertificateKey.String(val)
+}
+
+// TLSServerCertificateChain returns an attribute KeyValue conforming to the
+// "tls.server.certificate_chain" semantic conventions. It represents the array
+// of PEM-encoded certificates that make up the certificate chain offered by the
+// server. This is usually mutually-exclusive of `server.certificate` since that
+// value should be the first certificate in the chain.
+func TLSServerCertificateChain(val ...string) attribute.KeyValue {
+ return TLSServerCertificateChainKey.StringSlice(val)
+}
+
+// TLSServerHashMd5 returns an attribute KeyValue conforming to the
+// "tls.server.hash.md5" semantic conventions. It represents the certificate
+// fingerprint using the MD5 digest of DER-encoded version of certificate offered
+// by the server. For consistency with other hash values, this value should be
+// formatted as an uppercase hash.
+func TLSServerHashMd5(val string) attribute.KeyValue {
+ return TLSServerHashMd5Key.String(val)
+}
+
+// TLSServerHashSha1 returns an attribute KeyValue conforming to the
+// "tls.server.hash.sha1" semantic conventions. It represents the certificate
+// fingerprint using the SHA1 digest of DER-encoded version of certificate
+// offered by the server. For consistency with other hash values, this value
+// should be formatted as an uppercase hash.
+func TLSServerHashSha1(val string) attribute.KeyValue {
+ return TLSServerHashSha1Key.String(val)
+}
+
+// TLSServerHashSha256 returns an attribute KeyValue conforming to the
+// "tls.server.hash.sha256" semantic conventions. It represents the certificate
+// fingerprint using the SHA256 digest of DER-encoded version of certificate
+// offered by the server. For consistency with other hash values, this value
+// should be formatted as an uppercase hash.
+func TLSServerHashSha256(val string) attribute.KeyValue {
+ return TLSServerHashSha256Key.String(val)
+}
+
+// TLSServerIssuer returns an attribute KeyValue conforming to the
+// "tls.server.issuer" semantic conventions. It represents the distinguished name
+// of [subject] of the issuer of the x.509 certificate presented by the client.
+//
+// [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6
+func TLSServerIssuer(val string) attribute.KeyValue {
+ return TLSServerIssuerKey.String(val)
+}
+
+// TLSServerJa3s returns an attribute KeyValue conforming to the
+// "tls.server.ja3s" semantic conventions. It represents a hash that identifies
+// servers based on how they perform an SSL/TLS handshake.
+func TLSServerJa3s(val string) attribute.KeyValue {
+ return TLSServerJa3sKey.String(val)
+}
+
+// TLSServerNotAfter returns an attribute KeyValue conforming to the
+// "tls.server.not_after" semantic conventions. It represents the date/Time
+// indicating when server certificate is no longer considered valid.
+func TLSServerNotAfter(val string) attribute.KeyValue {
+ return TLSServerNotAfterKey.String(val)
+}
+
+// TLSServerNotBefore returns an attribute KeyValue conforming to the
+// "tls.server.not_before" semantic conventions. It represents the date/Time
+// indicating when server certificate is first considered valid.
+func TLSServerNotBefore(val string) attribute.KeyValue {
+ return TLSServerNotBeforeKey.String(val)
+}
+
+// TLSServerSubject returns an attribute KeyValue conforming to the
+// "tls.server.subject" semantic conventions. It represents the distinguished
+// name of subject of the x.509 certificate presented by the server.
+func TLSServerSubject(val string) attribute.KeyValue {
+ return TLSServerSubjectKey.String(val)
+}
+
+// Enum values for tls.protocol.name
+var (
+ // ssl
+ // Stability: development
+ TLSProtocolNameSsl = TLSProtocolNameKey.String("ssl")
+ // tls
+ // Stability: development
+ TLSProtocolNameTLS = TLSProtocolNameKey.String("tls")
+)
+
+// Namespace: url
+const (
+ // URLDomainKey is the attribute Key conforming to the "url.domain" semantic
+ // conventions. It represents the domain extracted from the `url.full`, such as
+ // "opentelemetry.io".
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "www.foo.bar", "opentelemetry.io", "3.12.167.2",
+ // "[1080:0:0:0:8:800:200C:417A]"
+ // Note: In some cases a URL may refer to an IP and/or port directly, without a
+ // domain name. In this case, the IP address would go to the domain field. If
+ // the URL contains a [literal IPv6 address] enclosed by `[` and `]`, the `[`
+ // and `]` characters should also be captured in the domain field.
+ //
+ // [literal IPv6 address]: https://www.rfc-editor.org/rfc/rfc2732#section-2
+ URLDomainKey = attribute.Key("url.domain")
+
+ // URLExtensionKey is the attribute Key conforming to the "url.extension"
+ // semantic conventions. It represents the file extension extracted from the
+ // `url.full`, excluding the leading dot.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "png", "gz"
+ // Note: The file extension is only set if it exists, as not every url has a
+ // file extension. When the file name has multiple extensions `example.tar.gz`,
+ // only the last one should be captured `gz`, not `tar.gz`.
+ URLExtensionKey = attribute.Key("url.extension")
+
+ // URLFragmentKey is the attribute Key conforming to the "url.fragment" semantic
+ // conventions. It represents the [URI fragment] component.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "SemConv"
+ //
+ // [URI fragment]: https://www.rfc-editor.org/rfc/rfc3986#section-3.5
+ URLFragmentKey = attribute.Key("url.fragment")
+
+ // URLFullKey is the attribute Key conforming to the "url.full" semantic
+ // conventions. It represents the absolute URL describing a network resource
+ // according to [RFC3986].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "https://www.foo.bar/search?q=OpenTelemetry#SemConv", "//localhost"
+ // Note: For network calls, URL usually has
+ // `scheme://host[:port][path][?query][#fragment]` format, where the fragment
+ // is not transmitted over HTTP, but if it is known, it SHOULD be included
+ // nevertheless.
+ //
+ // `url.full` MUST NOT contain credentials passed via URL in form of
+ // `https://username:password@www.example.com/`.
+ // In such case username and password SHOULD be redacted and attribute's value
+ // SHOULD be `https://REDACTED:REDACTED@www.example.com/`.
+ //
+ // `url.full` SHOULD capture the absolute URL when it is available (or can be
+ // reconstructed).
+ //
+ // Sensitive content provided in `url.full` SHOULD be scrubbed when
+ // instrumentations can identify it.
+ //
+ //
+ // Query string values for the following keys SHOULD be redacted by default and
+ // replaced by the
+ // value `REDACTED`:
+ //
+ // - [`AWSAccessKeyId`]
+ // - [`Signature`]
+ // - [`sig`]
+ // - [`X-Goog-Signature`]
+ //
+ // This list is subject to change over time.
+ //
+ // When a query string value is redacted, the query string key SHOULD still be
+ // preserved, e.g.
+ // `https://www.example.com/path?color=blue&sig=REDACTED`.
+ //
+ // [RFC3986]: https://www.rfc-editor.org/rfc/rfc3986
+ // [`AWSAccessKeyId`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth
+ // [`Signature`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth
+ // [`sig`]: https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token
+ // [`X-Goog-Signature`]: https://cloud.google.com/storage/docs/access-control/signed-urls
+ URLFullKey = attribute.Key("url.full")
+
+ // URLOriginalKey is the attribute Key conforming to the "url.original" semantic
+ // conventions. It represents the unmodified original URL as seen in the event
+ // source.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "https://www.foo.bar/search?q=OpenTelemetry#SemConv",
+ // "search?q=OpenTelemetry"
+ // Note: In network monitoring, the observed URL may be a full URL, whereas in
+ // access logs, the URL is often just represented as a path. This field is meant
+ // to represent the URL as it was observed, complete or not.
+ // `url.original` might contain credentials passed via URL in form of
+ // `https://username:password@www.example.com/`. In such case password and
+ // username SHOULD NOT be redacted and attribute's value SHOULD remain the same.
+ URLOriginalKey = attribute.Key("url.original")
+
+ // URLPathKey is the attribute Key conforming to the "url.path" semantic
+ // conventions. It represents the [URI path] component.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "/search"
+ // Note: Sensitive content provided in `url.path` SHOULD be scrubbed when
+ // instrumentations can identify it.
+ //
+ // [URI path]: https://www.rfc-editor.org/rfc/rfc3986#section-3.3
+ URLPathKey = attribute.Key("url.path")
+
+ // URLPortKey is the attribute Key conforming to the "url.port" semantic
+ // conventions. It represents the port extracted from the `url.full`.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 443
+ URLPortKey = attribute.Key("url.port")
+
+ // URLQueryKey is the attribute Key conforming to the "url.query" semantic
+ // conventions. It represents the [URI query] component.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "q=OpenTelemetry"
+ // Note: Sensitive content provided in `url.query` SHOULD be scrubbed when
+ // instrumentations can identify it.
+ //
+ //
+ // Query string values for the following keys SHOULD be redacted by default and
+ // replaced by the value `REDACTED`:
+ //
+ // - [`AWSAccessKeyId`]
+ // - [`Signature`]
+ // - [`sig`]
+ // - [`X-Goog-Signature`]
+ //
+ // This list is subject to change over time.
+ //
+ // When a query string value is redacted, the query string key SHOULD still be
+ // preserved, e.g.
+ // `q=OpenTelemetry&sig=REDACTED`.
+ //
+ // [URI query]: https://www.rfc-editor.org/rfc/rfc3986#section-3.4
+ // [`AWSAccessKeyId`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth
+ // [`Signature`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth
+ // [`sig`]: https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token
+ // [`X-Goog-Signature`]: https://cloud.google.com/storage/docs/access-control/signed-urls
+ URLQueryKey = attribute.Key("url.query")
+
+ // URLRegisteredDomainKey is the attribute Key conforming to the
+ // "url.registered_domain" semantic conventions. It represents the highest
+ // registered url domain, stripped of the subdomain.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "example.com", "foo.co.uk"
+ // Note: This value can be determined precisely with the [public suffix list].
+ // For example, the registered domain for `foo.example.com` is `example.com`.
+ // Trying to approximate this by simply taking the last two labels will not work
+ // well for TLDs such as `co.uk`.
+ //
+ // [public suffix list]: https://publicsuffix.org/
+ URLRegisteredDomainKey = attribute.Key("url.registered_domain")
+
+ // URLSchemeKey is the attribute Key conforming to the "url.scheme" semantic
+ // conventions. It represents the [URI scheme] component identifying the used
+ // protocol.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "https", "ftp", "telnet"
+ //
+ // [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1
+ URLSchemeKey = attribute.Key("url.scheme")
+
+ // URLSubdomainKey is the attribute Key conforming to the "url.subdomain"
+ // semantic conventions. It represents the subdomain portion of a fully
+ // qualified domain name includes all of the names except the host name under
+ // the registered_domain. In a partially qualified domain, or if the
+ // qualification level of the full name cannot be determined, subdomain contains
+ // all of the names below the registered domain.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "east", "sub2.sub1"
+ // Note: The subdomain portion of `www.east.mydomain.co.uk` is `east`. If the
+ // domain has multiple levels of subdomain, such as `sub2.sub1.example.com`, the
+ // subdomain field should contain `sub2.sub1`, with no trailing period.
+ URLSubdomainKey = attribute.Key("url.subdomain")
+
+ // URLTemplateKey is the attribute Key conforming to the "url.template" semantic
+ // conventions. It represents the low-cardinality template of an
+ // [absolute path reference].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/users/{id}", "/users/:id", "/users?id={id}"
+ //
+ // [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2
+ URLTemplateKey = attribute.Key("url.template")
+
+ // URLTopLevelDomainKey is the attribute Key conforming to the
+ // "url.top_level_domain" semantic conventions. It represents the effective top
+ // level domain (eTLD), also known as the domain suffix, is the last part of the
+ // domain name. For example, the top level domain for example.com is `com`.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "com", "co.uk"
+ // Note: This value can be determined precisely with the [public suffix list].
+ //
+ // [public suffix list]: https://publicsuffix.org/
+ URLTopLevelDomainKey = attribute.Key("url.top_level_domain")
+)
+
+// URLDomain returns an attribute KeyValue conforming to the "url.domain"
+// semantic conventions. It represents the domain extracted from the `url.full`,
+// such as "opentelemetry.io".
+func URLDomain(val string) attribute.KeyValue {
+ return URLDomainKey.String(val)
+}
+
+// URLExtension returns an attribute KeyValue conforming to the "url.extension"
+// semantic conventions. It represents the file extension extracted from the
+// `url.full`, excluding the leading dot.
+func URLExtension(val string) attribute.KeyValue {
+ return URLExtensionKey.String(val)
+}
+
+// URLFragment returns an attribute KeyValue conforming to the "url.fragment"
+// semantic conventions. It represents the [URI fragment] component.
+//
+// [URI fragment]: https://www.rfc-editor.org/rfc/rfc3986#section-3.5
+func URLFragment(val string) attribute.KeyValue {
+ return URLFragmentKey.String(val)
+}
+
+// URLFull returns an attribute KeyValue conforming to the "url.full" semantic
+// conventions. It represents the absolute URL describing a network resource
+// according to [RFC3986].
+//
+// [RFC3986]: https://www.rfc-editor.org/rfc/rfc3986
+func URLFull(val string) attribute.KeyValue {
+ return URLFullKey.String(val)
+}
+
+// URLOriginal returns an attribute KeyValue conforming to the "url.original"
+// semantic conventions. It represents the unmodified original URL as seen in the
+// event source.
+func URLOriginal(val string) attribute.KeyValue {
+ return URLOriginalKey.String(val)
+}
+
+// URLPath returns an attribute KeyValue conforming to the "url.path" semantic
+// conventions. It represents the [URI path] component.
+//
+// [URI path]: https://www.rfc-editor.org/rfc/rfc3986#section-3.3
+func URLPath(val string) attribute.KeyValue {
+ return URLPathKey.String(val)
+}
+
+// URLPort returns an attribute KeyValue conforming to the "url.port" semantic
+// conventions. It represents the port extracted from the `url.full`.
+func URLPort(val int) attribute.KeyValue {
+ return URLPortKey.Int(val)
+}
+
+// URLQuery returns an attribute KeyValue conforming to the "url.query" semantic
+// conventions. It represents the [URI query] component.
+//
+// [URI query]: https://www.rfc-editor.org/rfc/rfc3986#section-3.4
+func URLQuery(val string) attribute.KeyValue {
+ return URLQueryKey.String(val)
+}
+
+// URLRegisteredDomain returns an attribute KeyValue conforming to the
+// "url.registered_domain" semantic conventions. It represents the highest
+// registered url domain, stripped of the subdomain.
+func URLRegisteredDomain(val string) attribute.KeyValue {
+ return URLRegisteredDomainKey.String(val)
+}
+
+// URLScheme returns an attribute KeyValue conforming to the "url.scheme"
+// semantic conventions. It represents the [URI scheme] component identifying the
+// used protocol.
+//
+// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1
+func URLScheme(val string) attribute.KeyValue {
+ return URLSchemeKey.String(val)
+}
+
+// URLSubdomain returns an attribute KeyValue conforming to the "url.subdomain"
+// semantic conventions. It represents the subdomain portion of a fully qualified
+// domain name includes all of the names except the host name under the
+// registered_domain. In a partially qualified domain, or if the qualification
+// level of the full name cannot be determined, subdomain contains all of the
+// names below the registered domain.
+func URLSubdomain(val string) attribute.KeyValue {
+ return URLSubdomainKey.String(val)
+}
+
+// URLTemplate returns an attribute KeyValue conforming to the "url.template"
+// semantic conventions. It represents the low-cardinality template of an
+// [absolute path reference].
+//
+// [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2
+func URLTemplate(val string) attribute.KeyValue {
+ return URLTemplateKey.String(val)
+}
+
+// URLTopLevelDomain returns an attribute KeyValue conforming to the
+// "url.top_level_domain" semantic conventions. It represents the effective top
+// level domain (eTLD), also known as the domain suffix, is the last part of the
+// domain name. For example, the top level domain for example.com is `com`.
+func URLTopLevelDomain(val string) attribute.KeyValue {
+ return URLTopLevelDomainKey.String(val)
+}
+
+// Namespace: user
+const (
+ // UserEmailKey is the attribute Key conforming to the "user.email" semantic
+ // conventions. It represents the user email address.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "a.einstein@example.com"
+ UserEmailKey = attribute.Key("user.email")
+
+ // UserFullNameKey is the attribute Key conforming to the "user.full_name"
+ // semantic conventions. It represents the user's full name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Albert Einstein"
+ UserFullNameKey = attribute.Key("user.full_name")
+
+ // UserHashKey is the attribute Key conforming to the "user.hash" semantic
+ // conventions. It represents the unique user hash to correlate information for
+ // a user in anonymized form.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "364fc68eaf4c8acec74a4e52d7d1feaa"
+ // Note: Useful if `user.id` or `user.name` contain confidential information and
+ // cannot be used.
+ UserHashKey = attribute.Key("user.hash")
+
+ // UserIDKey is the attribute Key conforming to the "user.id" semantic
+ // conventions. It represents the unique identifier of the user.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "S-1-5-21-202424912787-2692429404-2351956786-1000"
+ UserIDKey = attribute.Key("user.id")
+
+ // UserNameKey is the attribute Key conforming to the "user.name" semantic
+ // conventions. It represents the short name or login/username of the user.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "a.einstein"
+ UserNameKey = attribute.Key("user.name")
+
+ // UserRolesKey is the attribute Key conforming to the "user.roles" semantic
+ // conventions. It represents the array of user roles at the time of the event.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "admin", "reporting_user"
+ UserRolesKey = attribute.Key("user.roles")
+)
+
+// UserEmail returns an attribute KeyValue conforming to the "user.email"
+// semantic conventions. It represents the user email address.
+func UserEmail(val string) attribute.KeyValue {
+ return UserEmailKey.String(val)
+}
+
+// UserFullName returns an attribute KeyValue conforming to the "user.full_name"
+// semantic conventions. It represents the user's full name.
+func UserFullName(val string) attribute.KeyValue {
+ return UserFullNameKey.String(val)
+}
+
+// UserHash returns an attribute KeyValue conforming to the "user.hash" semantic
+// conventions. It represents the unique user hash to correlate information for a
+// user in anonymized form.
+func UserHash(val string) attribute.KeyValue {
+ return UserHashKey.String(val)
+}
+
+// UserID returns an attribute KeyValue conforming to the "user.id" semantic
+// conventions. It represents the unique identifier of the user.
+func UserID(val string) attribute.KeyValue {
+ return UserIDKey.String(val)
+}
+
+// UserName returns an attribute KeyValue conforming to the "user.name" semantic
+// conventions. It represents the short name or login/username of the user.
+func UserName(val string) attribute.KeyValue {
+ return UserNameKey.String(val)
+}
+
+// UserRoles returns an attribute KeyValue conforming to the "user.roles"
+// semantic conventions. It represents the array of user roles at the time of the
+// event.
+func UserRoles(val ...string) attribute.KeyValue {
+ return UserRolesKey.StringSlice(val)
+}
+
+// Namespace: user_agent
+const (
+ // UserAgentNameKey is the attribute Key conforming to the "user_agent.name"
+ // semantic conventions. It represents the name of the user-agent extracted from
+ // original. Usually refers to the browser's name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Safari", "YourApp"
+ // Note: [Example] of extracting browser's name from original string. In the
+ // case of using a user-agent for non-browser products, such as microservices
+ // with multiple names/versions inside the `user_agent.original`, the most
+ // significant name SHOULD be selected. In such a scenario it should align with
+ // `user_agent.version`
+ //
+ // [Example]: https://www.whatsmyua.info
+ UserAgentNameKey = attribute.Key("user_agent.name")
+
+ // UserAgentOriginalKey is the attribute Key conforming to the
+ // "user_agent.original" semantic conventions. It represents the value of the
+ // [HTTP User-Agent] header sent by the client.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "CERN-LineMode/2.15 libwww/2.17b3", "Mozilla/5.0 (iPhone; CPU
+ // iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko)
+ // Version/14.1.2 Mobile/15E148 Safari/604.1", "YourApp/1.0.0
+ // grpc-java-okhttp/1.27.2"
+ //
+ // [HTTP User-Agent]: https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent
+ UserAgentOriginalKey = attribute.Key("user_agent.original")
+
+ // UserAgentOSNameKey is the attribute Key conforming to the
+ // "user_agent.os.name" semantic conventions. It represents the human readable
+ // operating system name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "iOS", "Android", "Ubuntu"
+ // Note: For mapping user agent strings to OS names, libraries such as
+ // [ua-parser] can be utilized.
+ //
+ // [ua-parser]: https://github.com/ua-parser
+ UserAgentOSNameKey = attribute.Key("user_agent.os.name")
+
+ // UserAgentOSVersionKey is the attribute Key conforming to the
+ // "user_agent.os.version" semantic conventions. It represents the version
+ // string of the operating system as defined in [Version Attributes].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "14.2.1", "18.04.1"
+ // Note: For mapping user agent strings to OS versions, libraries such as
+ // [ua-parser] can be utilized.
+ //
+ // [Version Attributes]: /docs/resource/README.md#version-attributes
+ // [ua-parser]: https://github.com/ua-parser
+ UserAgentOSVersionKey = attribute.Key("user_agent.os.version")
+
+ // UserAgentSyntheticTypeKey is the attribute Key conforming to the
+ // "user_agent.synthetic.type" semantic conventions. It represents the specifies
+ // the category of synthetic traffic, such as tests or bots.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: This attribute MAY be derived from the contents of the
+ // `user_agent.original` attribute. Components that populate the attribute are
+ // responsible for determining what they consider to be synthetic bot or test
+ // traffic. This attribute can either be set for self-identification purposes,
+ // or on telemetry detected to be generated as a result of a synthetic request.
+ // This attribute is useful for distinguishing between genuine client traffic
+ // and synthetic traffic generated by bots or tests.
+ UserAgentSyntheticTypeKey = attribute.Key("user_agent.synthetic.type")
+
+ // UserAgentVersionKey is the attribute Key conforming to the
+ // "user_agent.version" semantic conventions. It represents the version of the
+ // user-agent extracted from original. Usually refers to the browser's version.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "14.1.2", "1.0.0"
+ // Note: [Example] of extracting browser's version from original string. In the
+ // case of using a user-agent for non-browser products, such as microservices
+ // with multiple names/versions inside the `user_agent.original`, the most
+ // significant version SHOULD be selected. In such a scenario it should align
+ // with `user_agent.name`
+ //
+ // [Example]: https://www.whatsmyua.info
+ UserAgentVersionKey = attribute.Key("user_agent.version")
+)
+
+// UserAgentName returns an attribute KeyValue conforming to the
+// "user_agent.name" semantic conventions. It represents the name of the
+// user-agent extracted from original. Usually refers to the browser's name.
+func UserAgentName(val string) attribute.KeyValue {
+ return UserAgentNameKey.String(val)
+}
+
+// UserAgentOriginal returns an attribute KeyValue conforming to the
+// "user_agent.original" semantic conventions. It represents the value of the
+// [HTTP User-Agent] header sent by the client.
+//
+// [HTTP User-Agent]: https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent
+func UserAgentOriginal(val string) attribute.KeyValue {
+ return UserAgentOriginalKey.String(val)
+}
+
+// UserAgentOSName returns an attribute KeyValue conforming to the
+// "user_agent.os.name" semantic conventions. It represents the human readable
+// operating system name.
+func UserAgentOSName(val string) attribute.KeyValue {
+ return UserAgentOSNameKey.String(val)
+}
+
+// UserAgentOSVersion returns an attribute KeyValue conforming to the
+// "user_agent.os.version" semantic conventions. It represents the version string
+// of the operating system as defined in [Version Attributes].
+//
+// [Version Attributes]: /docs/resource/README.md#version-attributes
+func UserAgentOSVersion(val string) attribute.KeyValue {
+ return UserAgentOSVersionKey.String(val)
+}
+
+// UserAgentVersion returns an attribute KeyValue conforming to the
+// "user_agent.version" semantic conventions. It represents the version of the
+// user-agent extracted from original. Usually refers to the browser's version.
+func UserAgentVersion(val string) attribute.KeyValue {
+ return UserAgentVersionKey.String(val)
+}
+
+// Enum values for user_agent.synthetic.type
+var (
+ // Bot source.
+ // Stability: development
+ UserAgentSyntheticTypeBot = UserAgentSyntheticTypeKey.String("bot")
+ // Synthetic test source.
+ // Stability: development
+ UserAgentSyntheticTypeTest = UserAgentSyntheticTypeKey.String("test")
+)
+
+// Namespace: vcs
+const (
+ // VCSChangeIDKey is the attribute Key conforming to the "vcs.change.id"
+ // semantic conventions. It represents the ID of the change (pull request/merge
+ // request/changelist) if applicable. This is usually a unique (within
+ // repository) identifier generated by the VCS system.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "123"
+ VCSChangeIDKey = attribute.Key("vcs.change.id")
+
+ // VCSChangeStateKey is the attribute Key conforming to the "vcs.change.state"
+ // semantic conventions. It represents the state of the change (pull
+ // request/merge request/changelist).
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "open", "closed", "merged"
+ VCSChangeStateKey = attribute.Key("vcs.change.state")
+
+ // VCSChangeTitleKey is the attribute Key conforming to the "vcs.change.title"
+ // semantic conventions. It represents the human readable title of the change
+ // (pull request/merge request/changelist). This title is often a brief summary
+ // of the change and may get merged in to a ref as the commit summary.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Fixes broken thing", "feat: add my new feature", "[chore] update
+ // dependency"
+ VCSChangeTitleKey = attribute.Key("vcs.change.title")
+
+ // VCSLineChangeTypeKey is the attribute Key conforming to the
+ // "vcs.line_change.type" semantic conventions. It represents the type of line
+ // change being measured on a branch or change.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "added", "removed"
+ VCSLineChangeTypeKey = attribute.Key("vcs.line_change.type")
+
+ // VCSOwnerNameKey is the attribute Key conforming to the "vcs.owner.name"
+ // semantic conventions. It represents the group owner within the version
+ // control system.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-org", "myteam", "business-unit"
+ VCSOwnerNameKey = attribute.Key("vcs.owner.name")
+
+ // VCSProviderNameKey is the attribute Key conforming to the "vcs.provider.name"
+ // semantic conventions. It represents the name of the version control system
+ // provider.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "github", "gitlab", "gitea", "bitbucket"
+ VCSProviderNameKey = attribute.Key("vcs.provider.name")
+
+ // VCSRefBaseNameKey is the attribute Key conforming to the "vcs.ref.base.name"
+ // semantic conventions. It represents the name of the [reference] such as
+ // **branch** or **tag** in the repository.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-feature-branch", "tag-1-test"
+ // Note: `base` refers to the starting point of a change. For example, `main`
+ // would be the base reference of type branch if you've created a new
+ // reference of type branch from it and created new commits.
+ //
+ // [reference]: https://git-scm.com/docs/gitglossary#def_ref
+ VCSRefBaseNameKey = attribute.Key("vcs.ref.base.name")
+
+ // VCSRefBaseRevisionKey is the attribute Key conforming to the
+ // "vcs.ref.base.revision" semantic conventions. It represents the revision,
+ // literally [revised version], The revision most often refers to a commit
+ // object in Git, or a revision number in SVN.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc",
+ // "main", "123", "HEAD"
+ // Note: `base` refers to the starting point of a change. For example, `main`
+ // would be the base reference of type branch if you've created a new
+ // reference of type branch from it and created new commits. The
+ // revision can be a full [hash value (see
+ // glossary)],
+ // of the recorded change to a ref within a repository pointing to a
+ // commit [commit] object. It does
+ // not necessarily have to be a hash; it can simply define a [revision
+ // number]
+ // which is an integer that is monotonically increasing. In cases where
+ // it is identical to the `ref.base.name`, it SHOULD still be included.
+ // It is up to the implementer to decide which value to set as the
+ // revision based on the VCS system and situational context.
+ //
+ // [revised version]: https://www.merriam-webster.com/dictionary/revision
+ // [hash value (see
+ // glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
+ // [commit]: https://git-scm.com/docs/git-commit
+ // [revision
+ // number]: https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html
+ VCSRefBaseRevisionKey = attribute.Key("vcs.ref.base.revision")
+
+ // VCSRefBaseTypeKey is the attribute Key conforming to the "vcs.ref.base.type"
+ // semantic conventions. It represents the type of the [reference] in the
+ // repository.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "branch", "tag"
+ // Note: `base` refers to the starting point of a change. For example, `main`
+ // would be the base reference of type branch if you've created a new
+ // reference of type branch from it and created new commits.
+ //
+ // [reference]: https://git-scm.com/docs/gitglossary#def_ref
+ VCSRefBaseTypeKey = attribute.Key("vcs.ref.base.type")
+
+ // VCSRefHeadNameKey is the attribute Key conforming to the "vcs.ref.head.name"
+ // semantic conventions. It represents the name of the [reference] such as
+ // **branch** or **tag** in the repository.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-feature-branch", "tag-1-test"
+ // Note: `head` refers to where you are right now; the current reference at a
+ // given time.
+ //
+ // [reference]: https://git-scm.com/docs/gitglossary#def_ref
+ VCSRefHeadNameKey = attribute.Key("vcs.ref.head.name")
+
+ // VCSRefHeadRevisionKey is the attribute Key conforming to the
+ // "vcs.ref.head.revision" semantic conventions. It represents the revision,
+ // literally [revised version], The revision most often refers to a commit
+ // object in Git, or a revision number in SVN.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc",
+ // "main", "123", "HEAD"
+ // Note: `head` refers to where you are right now; the current reference at a
+ // given time.The revision can be a full [hash value (see
+ // glossary)],
+ // of the recorded change to a ref within a repository pointing to a
+ // commit [commit] object. It does
+ // not necessarily have to be a hash; it can simply define a [revision
+ // number]
+ // which is an integer that is monotonically increasing. In cases where
+ // it is identical to the `ref.head.name`, it SHOULD still be included.
+ // It is up to the implementer to decide which value to set as the
+ // revision based on the VCS system and situational context.
+ //
+ // [revised version]: https://www.merriam-webster.com/dictionary/revision
+ // [hash value (see
+ // glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
+ // [commit]: https://git-scm.com/docs/git-commit
+ // [revision
+ // number]: https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html
+ VCSRefHeadRevisionKey = attribute.Key("vcs.ref.head.revision")
+
+ // VCSRefHeadTypeKey is the attribute Key conforming to the "vcs.ref.head.type"
+ // semantic conventions. It represents the type of the [reference] in the
+ // repository.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "branch", "tag"
+ // Note: `head` refers to where you are right now; the current reference at a
+ // given time.
+ //
+ // [reference]: https://git-scm.com/docs/gitglossary#def_ref
+ VCSRefHeadTypeKey = attribute.Key("vcs.ref.head.type")
+
+ // VCSRefTypeKey is the attribute Key conforming to the "vcs.ref.type" semantic
+ // conventions. It represents the type of the [reference] in the repository.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "branch", "tag"
+ //
+ // [reference]: https://git-scm.com/docs/gitglossary#def_ref
+ VCSRefTypeKey = attribute.Key("vcs.ref.type")
+
+ // VCSRepositoryNameKey is the attribute Key conforming to the
+ // "vcs.repository.name" semantic conventions. It represents the human readable
+ // name of the repository. It SHOULD NOT include any additional identifier like
+ // Group/SubGroup in GitLab or organization in GitHub.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "semantic-conventions", "my-cool-repo"
+ // Note: Due to it only being the name, it can clash with forks of the same
+ // repository if collecting telemetry across multiple orgs or groups in
+ // the same backends.
+ VCSRepositoryNameKey = attribute.Key("vcs.repository.name")
+
+ // VCSRepositoryURLFullKey is the attribute Key conforming to the
+ // "vcs.repository.url.full" semantic conventions. It represents the
+ // [canonical URL] of the repository providing the complete HTTP(S) address in
+ // order to locate and identify the repository through a browser.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "https://github.com/opentelemetry/open-telemetry-collector-contrib",
+ // "https://gitlab.com/my-org/my-project/my-projects-project/repo"
+ // Note: In Git Version Control Systems, the canonical URL SHOULD NOT include
+ // the `.git` extension.
+ //
+ // [canonical URL]: https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.
+ VCSRepositoryURLFullKey = attribute.Key("vcs.repository.url.full")
+
+ // VCSRevisionDeltaDirectionKey is the attribute Key conforming to the
+ // "vcs.revision_delta.direction" semantic conventions. It represents the type
+ // of revision comparison.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "ahead", "behind"
+ VCSRevisionDeltaDirectionKey = attribute.Key("vcs.revision_delta.direction")
+)
+
+// VCSChangeID returns an attribute KeyValue conforming to the "vcs.change.id"
+// semantic conventions. It represents the ID of the change (pull request/merge
+// request/changelist) if applicable. This is usually a unique (within
+// repository) identifier generated by the VCS system.
+func VCSChangeID(val string) attribute.KeyValue {
+ return VCSChangeIDKey.String(val)
+}
+
+// VCSChangeTitle returns an attribute KeyValue conforming to the
+// "vcs.change.title" semantic conventions. It represents the human readable
+// title of the change (pull request/merge request/changelist). This title is
+// often a brief summary of the change and may get merged in to a ref as the
+// commit summary.
+func VCSChangeTitle(val string) attribute.KeyValue {
+ return VCSChangeTitleKey.String(val)
+}
+
+// VCSOwnerName returns an attribute KeyValue conforming to the "vcs.owner.name"
+// semantic conventions. It represents the group owner within the version control
+// system.
+func VCSOwnerName(val string) attribute.KeyValue {
+ return VCSOwnerNameKey.String(val)
+}
+
+// VCSRefBaseName returns an attribute KeyValue conforming to the
+// "vcs.ref.base.name" semantic conventions. It represents the name of the
+// [reference] such as **branch** or **tag** in the repository.
+//
+// [reference]: https://git-scm.com/docs/gitglossary#def_ref
+func VCSRefBaseName(val string) attribute.KeyValue {
+ return VCSRefBaseNameKey.String(val)
+}
+
+// VCSRefBaseRevision returns an attribute KeyValue conforming to the
+// "vcs.ref.base.revision" semantic conventions. It represents the revision,
+// literally [revised version], The revision most often refers to a commit object
+// in Git, or a revision number in SVN.
+//
+// [revised version]: https://www.merriam-webster.com/dictionary/revision
+func VCSRefBaseRevision(val string) attribute.KeyValue {
+ return VCSRefBaseRevisionKey.String(val)
+}
+
+// VCSRefHeadName returns an attribute KeyValue conforming to the
+// "vcs.ref.head.name" semantic conventions. It represents the name of the
+// [reference] such as **branch** or **tag** in the repository.
+//
+// [reference]: https://git-scm.com/docs/gitglossary#def_ref
+func VCSRefHeadName(val string) attribute.KeyValue {
+ return VCSRefHeadNameKey.String(val)
+}
+
+// VCSRefHeadRevision returns an attribute KeyValue conforming to the
+// "vcs.ref.head.revision" semantic conventions. It represents the revision,
+// literally [revised version], The revision most often refers to a commit object
+// in Git, or a revision number in SVN.
+//
+// [revised version]: https://www.merriam-webster.com/dictionary/revision
+func VCSRefHeadRevision(val string) attribute.KeyValue {
+ return VCSRefHeadRevisionKey.String(val)
+}
+
+// VCSRepositoryName returns an attribute KeyValue conforming to the
+// "vcs.repository.name" semantic conventions. It represents the human readable
+// name of the repository. It SHOULD NOT include any additional identifier like
+// Group/SubGroup in GitLab or organization in GitHub.
+func VCSRepositoryName(val string) attribute.KeyValue {
+ return VCSRepositoryNameKey.String(val)
+}
+
+// VCSRepositoryURLFull returns an attribute KeyValue conforming to the
+// "vcs.repository.url.full" semantic conventions. It represents the
+// [canonical URL] of the repository providing the complete HTTP(S) address in
+// order to locate and identify the repository through a browser.
+//
+// [canonical URL]: https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.
+func VCSRepositoryURLFull(val string) attribute.KeyValue {
+ return VCSRepositoryURLFullKey.String(val)
+}
+
+// Enum values for vcs.change.state
+var (
+ // Open means the change is currently active and under review. It hasn't been
+ // merged into the target branch yet, and it's still possible to make changes or
+ // add comments.
+ // Stability: development
+ VCSChangeStateOpen = VCSChangeStateKey.String("open")
+ // WIP (work-in-progress, draft) means the change is still in progress and not
+ // yet ready for a full review. It might still undergo significant changes.
+ // Stability: development
+ VCSChangeStateWip = VCSChangeStateKey.String("wip")
+ // Closed means the merge request has been closed without merging. This can
+ // happen for various reasons, such as the changes being deemed unnecessary, the
+ // issue being resolved in another way, or the author deciding to withdraw the
+ // request.
+ // Stability: development
+ VCSChangeStateClosed = VCSChangeStateKey.String("closed")
+ // Merged indicates that the change has been successfully integrated into the
+ // target codebase.
+ // Stability: development
+ VCSChangeStateMerged = VCSChangeStateKey.String("merged")
+)
+
+// Enum values for vcs.line_change.type
+var (
+ // How many lines were added.
+ // Stability: development
+ VCSLineChangeTypeAdded = VCSLineChangeTypeKey.String("added")
+ // How many lines were removed.
+ // Stability: development
+ VCSLineChangeTypeRemoved = VCSLineChangeTypeKey.String("removed")
+)
+
+// Enum values for vcs.provider.name
+var (
+ // [GitHub]
+ // Stability: development
+ //
+ // [GitHub]: https://github.com
+ VCSProviderNameGithub = VCSProviderNameKey.String("github")
+ // [GitLab]
+ // Stability: development
+ //
+ // [GitLab]: https://gitlab.com
+ VCSProviderNameGitlab = VCSProviderNameKey.String("gitlab")
+ // Deprecated: Replaced by `gitea`.
+ VCSProviderNameGittea = VCSProviderNameKey.String("gittea")
+ // [Gitea]
+ // Stability: development
+ //
+ // [Gitea]: https://gitea.io
+ VCSProviderNameGitea = VCSProviderNameKey.String("gitea")
+ // [Bitbucket]
+ // Stability: development
+ //
+ // [Bitbucket]: https://bitbucket.org
+ VCSProviderNameBitbucket = VCSProviderNameKey.String("bitbucket")
+)
+
+// Enum values for vcs.ref.base.type
+var (
+ // [branch]
+ // Stability: development
+ //
+ // [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch
+ VCSRefBaseTypeBranch = VCSRefBaseTypeKey.String("branch")
+ // [tag]
+ // Stability: development
+ //
+ // [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag
+ VCSRefBaseTypeTag = VCSRefBaseTypeKey.String("tag")
+)
+
+// Enum values for vcs.ref.head.type
+var (
+ // [branch]
+ // Stability: development
+ //
+ // [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch
+ VCSRefHeadTypeBranch = VCSRefHeadTypeKey.String("branch")
+ // [tag]
+ // Stability: development
+ //
+ // [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag
+ VCSRefHeadTypeTag = VCSRefHeadTypeKey.String("tag")
+)
+
+// Enum values for vcs.ref.type
+var (
+ // [branch]
+ // Stability: development
+ //
+ // [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch
+ VCSRefTypeBranch = VCSRefTypeKey.String("branch")
+ // [tag]
+ // Stability: development
+ //
+ // [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag
+ VCSRefTypeTag = VCSRefTypeKey.String("tag")
+)
+
+// Enum values for vcs.revision_delta.direction
+var (
+ // How many revisions the change is behind the target ref.
+ // Stability: development
+ VCSRevisionDeltaDirectionBehind = VCSRevisionDeltaDirectionKey.String("behind")
+ // How many revisions the change is ahead of the target ref.
+ // Stability: development
+ VCSRevisionDeltaDirectionAhead = VCSRevisionDeltaDirectionKey.String("ahead")
+)
+
+// Namespace: webengine
+const (
+ // WebEngineDescriptionKey is the attribute Key conforming to the
+ // "webengine.description" semantic conventions. It represents the additional
+ // description of the web engine (e.g. detailed version and edition
+ // information).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) -
+ // 2.2.2.Final"
+ WebEngineDescriptionKey = attribute.Key("webengine.description")
+
+ // WebEngineNameKey is the attribute Key conforming to the "webengine.name"
+ // semantic conventions. It represents the name of the web engine.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "WildFly"
+ WebEngineNameKey = attribute.Key("webengine.name")
+
+ // WebEngineVersionKey is the attribute Key conforming to the
+ // "webengine.version" semantic conventions. It represents the version of the
+ // web engine.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "21.0.0"
+ WebEngineVersionKey = attribute.Key("webengine.version")
+)
+
+// WebEngineDescription returns an attribute KeyValue conforming to the
+// "webengine.description" semantic conventions. It represents the additional
+// description of the web engine (e.g. detailed version and edition information).
+func WebEngineDescription(val string) attribute.KeyValue {
+ return WebEngineDescriptionKey.String(val)
+}
+
+// WebEngineName returns an attribute KeyValue conforming to the "webengine.name"
+// semantic conventions. It represents the name of the web engine.
+func WebEngineName(val string) attribute.KeyValue {
+ return WebEngineNameKey.String(val)
+}
+
+// WebEngineVersion returns an attribute KeyValue conforming to the
+// "webengine.version" semantic conventions. It represents the version of the web
+// engine.
+func WebEngineVersion(val string) attribute.KeyValue {
+ return WebEngineVersionKey.String(val)
+}
\ No newline at end of file
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/doc.go b/hack/tools/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/doc.go
new file mode 100644
index 000000000000..2c5c7ebd041d
--- /dev/null
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/doc.go
@@ -0,0 +1,9 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Package semconv implements OpenTelemetry semantic conventions.
+//
+// OpenTelemetry semantic conventions are agreed standardized naming
+// patterns for OpenTelemetry things. This package represents the v1.34.0
+// version of the OpenTelemetry semantic conventions.
+package semconv // import "go.opentelemetry.io/otel/semconv/v1.34.0"
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/exception.go b/hack/tools/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/exception.go
new file mode 100644
index 000000000000..88a998f1e561
--- /dev/null
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/exception.go
@@ -0,0 +1,9 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package semconv // import "go.opentelemetry.io/otel/semconv/v1.34.0"
+
+const (
+ // ExceptionEventName is the name of the Span event representing an exception.
+ ExceptionEventName = "exception"
+)
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/schema.go b/hack/tools/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/schema.go
new file mode 100644
index 000000000000..3c23d4592549
--- /dev/null
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/schema.go
@@ -0,0 +1,9 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package semconv // import "go.opentelemetry.io/otel/semconv/v1.34.0"
+
+// SchemaURL is the schema URL that matches the version of the semantic conventions
+// that this package defines. Semconv packages starting from v1.4.0 must declare
+// non-empty schema URL in the form https://opentelemetry.io/schemas/
+const SchemaURL = "https://opentelemetry.io/schemas/1.34.0"
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/trace/auto.go b/hack/tools/vendor/go.opentelemetry.io/otel/trace/auto.go
index d90af8f673c5..f3aa398138e4 100644
--- a/hack/tools/vendor/go.opentelemetry.io/otel/trace/auto.go
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/trace/auto.go
@@ -20,7 +20,7 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
- semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.34.0"
"go.opentelemetry.io/otel/trace/embedded"
"go.opentelemetry.io/otel/trace/internal/telemetry"
)
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/version.go b/hack/tools/vendor/go.opentelemetry.io/otel/version.go
index ac3c0b15da25..7afe92b59814 100644
--- a/hack/tools/vendor/go.opentelemetry.io/otel/version.go
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/version.go
@@ -5,5 +5,5 @@ package otel // import "go.opentelemetry.io/otel"
// Version is the current release version of OpenTelemetry in use.
func Version() string {
- return "1.36.0"
+ return "1.37.0"
}
diff --git a/hack/tools/vendor/go.opentelemetry.io/otel/versions.yaml b/hack/tools/vendor/go.opentelemetry.io/otel/versions.yaml
index 79f82f3d058f..9d4742a1764f 100644
--- a/hack/tools/vendor/go.opentelemetry.io/otel/versions.yaml
+++ b/hack/tools/vendor/go.opentelemetry.io/otel/versions.yaml
@@ -3,13 +3,12 @@
module-sets:
stable-v1:
- version: v1.36.0
+ version: v1.37.0
modules:
- go.opentelemetry.io/otel
- go.opentelemetry.io/otel/bridge/opencensus
- go.opentelemetry.io/otel/bridge/opencensus/test
- go.opentelemetry.io/otel/bridge/opentracing
- - go.opentelemetry.io/otel/bridge/opentracing/test
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp
- go.opentelemetry.io/otel/exporters/otlp/otlptrace
@@ -23,14 +22,16 @@ module-sets:
- go.opentelemetry.io/otel/sdk/metric
- go.opentelemetry.io/otel/trace
experimental-metrics:
- version: v0.58.0
+ version: v0.59.0
modules:
- go.opentelemetry.io/otel/exporters/prometheus
experimental-logs:
- version: v0.12.0
+ version: v0.13.0
modules:
- go.opentelemetry.io/otel/log
+ - go.opentelemetry.io/otel/log/logtest
- go.opentelemetry.io/otel/sdk/log
+ - go.opentelemetry.io/otel/sdk/log/logtest
- go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc
- go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp
- go.opentelemetry.io/otel/exporters/stdout/stdoutlog
@@ -40,6 +41,4 @@ module-sets:
- go.opentelemetry.io/otel/schema
excluded-modules:
- go.opentelemetry.io/otel/internal/tools
- - go.opentelemetry.io/otel/log/logtest
- - go.opentelemetry.io/otel/sdk/log/logtest
- go.opentelemetry.io/otel/trace/internal/telemetry/test
diff --git a/hack/tools/vendor/go.uber.org/multierr/.codecov.yml b/hack/tools/vendor/go.uber.org/multierr/.codecov.yml
deleted file mode 100644
index 6d4d1be7b574..000000000000
--- a/hack/tools/vendor/go.uber.org/multierr/.codecov.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-coverage:
- range: 80..100
- round: down
- precision: 2
-
- status:
- project: # measuring the overall project coverage
- default: # context, you can create multiple ones with custom titles
- enabled: yes # must be yes|true to enable this status
- target: 100 # specify the target coverage for each commit status
- # option: "auto" (must increase from parent commit or pull request base)
- # option: "X%" a static target percentage to hit
- if_not_found: success # if parent is not found report status as success, error, or failure
- if_ci_failed: error # if ci fails report status as success, error, or failure
-
diff --git a/hack/tools/vendor/go.uber.org/multierr/.gitignore b/hack/tools/vendor/go.uber.org/multierr/.gitignore
deleted file mode 100644
index b9a05e3da0d2..000000000000
--- a/hack/tools/vendor/go.uber.org/multierr/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-/vendor
-cover.html
-cover.out
-/bin
diff --git a/hack/tools/vendor/go.uber.org/multierr/CHANGELOG.md b/hack/tools/vendor/go.uber.org/multierr/CHANGELOG.md
deleted file mode 100644
index f8177b978ca3..000000000000
--- a/hack/tools/vendor/go.uber.org/multierr/CHANGELOG.md
+++ /dev/null
@@ -1,95 +0,0 @@
-Releases
-========
-
-v1.11.0 (2023-03-28)
-====================
-- `Errors` now supports any error that implements multiple-error
- interface.
-- Add `Every` function to allow checking if all errors in the chain
- satisfies `errors.Is` against the target error.
-
-v1.10.0 (2023-03-08)
-====================
-
-- Comply with Go 1.20's multiple-error interface.
-- Drop Go 1.18 support.
- Per the support policy, only Go 1.19 and 1.20 are supported now.
-- Drop all non-test external dependencies.
-
-v1.9.0 (2022-12-12)
-===================
-
-- Add `AppendFunc` that allow passsing functions to similar to
- `AppendInvoke`.
-
-- Bump up yaml.v3 dependency to 3.0.1.
-
-v1.8.0 (2022-02-28)
-===================
-
-- `Combine`: perform zero allocations when there are no errors.
-
-
-v1.7.0 (2021-05-06)
-===================
-
-- Add `AppendInvoke` to append into errors from `defer` blocks.
-
-
-v1.6.0 (2020-09-14)
-===================
-
-- Actually drop library dependency on development-time tooling.
-
-
-v1.5.0 (2020-02-24)
-===================
-
-- Drop library dependency on development-time tooling.
-
-
-v1.4.0 (2019-11-04)
-===================
-
-- Add `AppendInto` function to more ergonomically build errors inside a
- loop.
-
-
-v1.3.0 (2019-10-29)
-===================
-
-- Switch to Go modules.
-
-
-v1.2.0 (2019-09-26)
-===================
-
-- Support extracting and matching against wrapped errors with `errors.As`
- and `errors.Is`.
-
-
-v1.1.0 (2017-06-30)
-===================
-
-- Added an `Errors(error) []error` function to extract the underlying list of
- errors for a multierr error.
-
-
-v1.0.0 (2017-05-31)
-===================
-
-No changes since v0.2.0. This release is committing to making no breaking
-changes to the current API in the 1.X series.
-
-
-v0.2.0 (2017-04-11)
-===================
-
-- Repeatedly appending to the same error is now faster due to fewer
- allocations.
-
-
-v0.1.0 (2017-31-03)
-===================
-
-- Initial release
diff --git a/hack/tools/vendor/go.uber.org/multierr/LICENSE.txt b/hack/tools/vendor/go.uber.org/multierr/LICENSE.txt
deleted file mode 100644
index 413e30f7ce21..000000000000
--- a/hack/tools/vendor/go.uber.org/multierr/LICENSE.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2017-2021 Uber Technologies, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/hack/tools/vendor/go.uber.org/multierr/Makefile b/hack/tools/vendor/go.uber.org/multierr/Makefile
deleted file mode 100644
index dcb6fe723c05..000000000000
--- a/hack/tools/vendor/go.uber.org/multierr/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-# Directory to put `go install`ed binaries in.
-export GOBIN ?= $(shell pwd)/bin
-
-GO_FILES := $(shell \
- find . '(' -path '*/.*' -o -path './vendor' ')' -prune \
- -o -name '*.go' -print | cut -b3-)
-
-.PHONY: build
-build:
- go build ./...
-
-.PHONY: test
-test:
- go test -race ./...
-
-.PHONY: gofmt
-gofmt:
- $(eval FMT_LOG := $(shell mktemp -t gofmt.XXXXX))
- @gofmt -e -s -l $(GO_FILES) > $(FMT_LOG) || true
- @[ ! -s "$(FMT_LOG)" ] || (echo "gofmt failed:" | cat - $(FMT_LOG) && false)
-
-.PHONY: golint
-golint:
- @cd tools && go install golang.org/x/lint/golint
- @$(GOBIN)/golint ./...
-
-.PHONY: staticcheck
-staticcheck:
- @cd tools && go install honnef.co/go/tools/cmd/staticcheck
- @$(GOBIN)/staticcheck ./...
-
-.PHONY: lint
-lint: gofmt golint staticcheck
-
-.PHONY: cover
-cover:
- go test -race -coverprofile=cover.out -coverpkg=./... -v ./...
- go tool cover -html=cover.out -o cover.html
diff --git a/hack/tools/vendor/go.uber.org/multierr/README.md b/hack/tools/vendor/go.uber.org/multierr/README.md
deleted file mode 100644
index 5ab6ac40f404..000000000000
--- a/hack/tools/vendor/go.uber.org/multierr/README.md
+++ /dev/null
@@ -1,43 +0,0 @@
-# multierr [![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov]
-
-`multierr` allows combining one or more Go `error`s together.
-
-## Features
-
-- **Idiomatic**:
- multierr follows best practices in Go, and keeps your code idiomatic.
- - It keeps the underlying error type hidden,
- allowing you to deal in `error` values exclusively.
- - It provides APIs to safely append into an error from a `defer` statement.
-- **Performant**:
- multierr is optimized for performance:
- - It avoids allocations where possible.
- - It utilizes slice resizing semantics to optimize common cases
- like appending into the same error object from a loop.
-- **Interoperable**:
- multierr interoperates with the Go standard library's error APIs seamlessly:
- - The `errors.Is` and `errors.As` functions *just work*.
-- **Lightweight**:
- multierr comes with virtually no dependencies.
-
-## Installation
-
-```bash
-go get -u go.uber.org/multierr@latest
-```
-
-## Status
-
-Stable: No breaking changes will be made before 2.0.
-
--------------------------------------------------------------------------------
-
-Released under the [MIT License].
-
-[MIT License]: LICENSE.txt
-[doc-img]: https://pkg.go.dev/badge/go.uber.org/multierr
-[doc]: https://pkg.go.dev/go.uber.org/multierr
-[ci-img]: https://github.com/uber-go/multierr/actions/workflows/go.yml/badge.svg
-[cov-img]: https://codecov.io/gh/uber-go/multierr/branch/master/graph/badge.svg
-[ci]: https://github.com/uber-go/multierr/actions/workflows/go.yml
-[cov]: https://codecov.io/gh/uber-go/multierr
diff --git a/hack/tools/vendor/go.uber.org/multierr/error.go b/hack/tools/vendor/go.uber.org/multierr/error.go
deleted file mode 100644
index 3a828b2dff8c..000000000000
--- a/hack/tools/vendor/go.uber.org/multierr/error.go
+++ /dev/null
@@ -1,646 +0,0 @@
-// Copyright (c) 2017-2023 Uber Technologies, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-// Package multierr allows combining one or more errors together.
-//
-// # Overview
-//
-// Errors can be combined with the use of the Combine function.
-//
-// multierr.Combine(
-// reader.Close(),
-// writer.Close(),
-// conn.Close(),
-// )
-//
-// If only two errors are being combined, the Append function may be used
-// instead.
-//
-// err = multierr.Append(reader.Close(), writer.Close())
-//
-// The underlying list of errors for a returned error object may be retrieved
-// with the Errors function.
-//
-// errors := multierr.Errors(err)
-// if len(errors) > 0 {
-// fmt.Println("The following errors occurred:", errors)
-// }
-//
-// # Appending from a loop
-//
-// You sometimes need to append into an error from a loop.
-//
-// var err error
-// for _, item := range items {
-// err = multierr.Append(err, process(item))
-// }
-//
-// Cases like this may require knowledge of whether an individual instance
-// failed. This usually requires introduction of a new variable.
-//
-// var err error
-// for _, item := range items {
-// if perr := process(item); perr != nil {
-// log.Warn("skipping item", item)
-// err = multierr.Append(err, perr)
-// }
-// }
-//
-// multierr includes AppendInto to simplify cases like this.
-//
-// var err error
-// for _, item := range items {
-// if multierr.AppendInto(&err, process(item)) {
-// log.Warn("skipping item", item)
-// }
-// }
-//
-// This will append the error into the err variable, and return true if that
-// individual error was non-nil.
-//
-// See [AppendInto] for more information.
-//
-// # Deferred Functions
-//
-// Go makes it possible to modify the return value of a function in a defer
-// block if the function was using named returns. This makes it possible to
-// record resource cleanup failures from deferred blocks.
-//
-// func sendRequest(req Request) (err error) {
-// conn, err := openConnection()
-// if err != nil {
-// return err
-// }
-// defer func() {
-// err = multierr.Append(err, conn.Close())
-// }()
-// // ...
-// }
-//
-// multierr provides the Invoker type and AppendInvoke function to make cases
-// like the above simpler and obviate the need for a closure. The following is
-// roughly equivalent to the example above.
-//
-// func sendRequest(req Request) (err error) {
-// conn, err := openConnection()
-// if err != nil {
-// return err
-// }
-// defer multierr.AppendInvoke(&err, multierr.Close(conn))
-// // ...
-// }
-//
-// See [AppendInvoke] and [Invoker] for more information.
-//
-// NOTE: If you're modifying an error from inside a defer, you MUST use a named
-// return value for that function.
-//
-// # Advanced Usage
-//
-// Errors returned by Combine and Append MAY implement the following
-// interface.
-//
-// type errorGroup interface {
-// // Returns a slice containing the underlying list of errors.
-// //
-// // This slice MUST NOT be modified by the caller.
-// Errors() []error
-// }
-//
-// Note that if you need access to list of errors behind a multierr error, you
-// should prefer using the Errors function. That said, if you need cheap
-// read-only access to the underlying errors slice, you can attempt to cast
-// the error to this interface. You MUST handle the failure case gracefully
-// because errors returned by Combine and Append are not guaranteed to
-// implement this interface.
-//
-// var errors []error
-// group, ok := err.(errorGroup)
-// if ok {
-// errors = group.Errors()
-// } else {
-// errors = []error{err}
-// }
-package multierr // import "go.uber.org/multierr"
-
-import (
- "bytes"
- "errors"
- "fmt"
- "io"
- "strings"
- "sync"
- "sync/atomic"
-)
-
-var (
- // Separator for single-line error messages.
- _singlelineSeparator = []byte("; ")
-
- // Prefix for multi-line messages
- _multilinePrefix = []byte("the following errors occurred:")
-
- // Prefix for the first and following lines of an item in a list of
- // multi-line error messages.
- //
- // For example, if a single item is:
- //
- // foo
- // bar
- //
- // It will become,
- //
- // - foo
- // bar
- _multilineSeparator = []byte("\n - ")
- _multilineIndent = []byte(" ")
-)
-
-// _bufferPool is a pool of bytes.Buffers.
-var _bufferPool = sync.Pool{
- New: func() interface{} {
- return &bytes.Buffer{}
- },
-}
-
-type errorGroup interface {
- Errors() []error
-}
-
-// Errors returns a slice containing zero or more errors that the supplied
-// error is composed of. If the error is nil, a nil slice is returned.
-//
-// err := multierr.Append(r.Close(), w.Close())
-// errors := multierr.Errors(err)
-//
-// If the error is not composed of other errors, the returned slice contains
-// just the error that was passed in.
-//
-// Callers of this function are free to modify the returned slice.
-func Errors(err error) []error {
- return extractErrors(err)
-}
-
-// multiError is an error that holds one or more errors.
-//
-// An instance of this is guaranteed to be non-empty and flattened. That is,
-// none of the errors inside multiError are other multiErrors.
-//
-// multiError formats to a semi-colon delimited list of error messages with
-// %v and with a more readable multi-line format with %+v.
-type multiError struct {
- copyNeeded atomic.Bool
- errors []error
-}
-
-// Errors returns the list of underlying errors.
-//
-// This slice MUST NOT be modified.
-func (merr *multiError) Errors() []error {
- if merr == nil {
- return nil
- }
- return merr.errors
-}
-
-func (merr *multiError) Error() string {
- if merr == nil {
- return ""
- }
-
- buff := _bufferPool.Get().(*bytes.Buffer)
- buff.Reset()
-
- merr.writeSingleline(buff)
-
- result := buff.String()
- _bufferPool.Put(buff)
- return result
-}
-
-// Every compares every error in the given err against the given target error
-// using [errors.Is], and returns true only if every comparison returned true.
-func Every(err error, target error) bool {
- for _, e := range extractErrors(err) {
- if !errors.Is(e, target) {
- return false
- }
- }
- return true
-}
-
-func (merr *multiError) Format(f fmt.State, c rune) {
- if c == 'v' && f.Flag('+') {
- merr.writeMultiline(f)
- } else {
- merr.writeSingleline(f)
- }
-}
-
-func (merr *multiError) writeSingleline(w io.Writer) {
- first := true
- for _, item := range merr.errors {
- if first {
- first = false
- } else {
- w.Write(_singlelineSeparator)
- }
- io.WriteString(w, item.Error())
- }
-}
-
-func (merr *multiError) writeMultiline(w io.Writer) {
- w.Write(_multilinePrefix)
- for _, item := range merr.errors {
- w.Write(_multilineSeparator)
- writePrefixLine(w, _multilineIndent, fmt.Sprintf("%+v", item))
- }
-}
-
-// Writes s to the writer with the given prefix added before each line after
-// the first.
-func writePrefixLine(w io.Writer, prefix []byte, s string) {
- first := true
- for len(s) > 0 {
- if first {
- first = false
- } else {
- w.Write(prefix)
- }
-
- idx := strings.IndexByte(s, '\n')
- if idx < 0 {
- idx = len(s) - 1
- }
-
- io.WriteString(w, s[:idx+1])
- s = s[idx+1:]
- }
-}
-
-type inspectResult struct {
- // Number of top-level non-nil errors
- Count int
-
- // Total number of errors including multiErrors
- Capacity int
-
- // Index of the first non-nil error in the list. Value is meaningless if
- // Count is zero.
- FirstErrorIdx int
-
- // Whether the list contains at least one multiError
- ContainsMultiError bool
-}
-
-// Inspects the given slice of errors so that we can efficiently allocate
-// space for it.
-func inspect(errors []error) (res inspectResult) {
- first := true
- for i, err := range errors {
- if err == nil {
- continue
- }
-
- res.Count++
- if first {
- first = false
- res.FirstErrorIdx = i
- }
-
- if merr, ok := err.(*multiError); ok {
- res.Capacity += len(merr.errors)
- res.ContainsMultiError = true
- } else {
- res.Capacity++
- }
- }
- return
-}
-
-// fromSlice converts the given list of errors into a single error.
-func fromSlice(errors []error) error {
- // Don't pay to inspect small slices.
- switch len(errors) {
- case 0:
- return nil
- case 1:
- return errors[0]
- }
-
- res := inspect(errors)
- switch res.Count {
- case 0:
- return nil
- case 1:
- // only one non-nil entry
- return errors[res.FirstErrorIdx]
- case len(errors):
- if !res.ContainsMultiError {
- // Error list is flat. Make a copy of it
- // Otherwise "errors" escapes to the heap
- // unconditionally for all other cases.
- // This lets us optimize for the "no errors" case.
- out := append(([]error)(nil), errors...)
- return &multiError{errors: out}
- }
- }
-
- nonNilErrs := make([]error, 0, res.Capacity)
- for _, err := range errors[res.FirstErrorIdx:] {
- if err == nil {
- continue
- }
-
- if nested, ok := err.(*multiError); ok {
- nonNilErrs = append(nonNilErrs, nested.errors...)
- } else {
- nonNilErrs = append(nonNilErrs, err)
- }
- }
-
- return &multiError{errors: nonNilErrs}
-}
-
-// Combine combines the passed errors into a single error.
-//
-// If zero arguments were passed or if all items are nil, a nil error is
-// returned.
-//
-// Combine(nil, nil) // == nil
-//
-// If only a single error was passed, it is returned as-is.
-//
-// Combine(err) // == err
-//
-// Combine skips over nil arguments so this function may be used to combine
-// together errors from operations that fail independently of each other.
-//
-// multierr.Combine(
-// reader.Close(),
-// writer.Close(),
-// pipe.Close(),
-// )
-//
-// If any of the passed errors is a multierr error, it will be flattened along
-// with the other errors.
-//
-// multierr.Combine(multierr.Combine(err1, err2), err3)
-// // is the same as
-// multierr.Combine(err1, err2, err3)
-//
-// The returned error formats into a readable multi-line error message if
-// formatted with %+v.
-//
-// fmt.Sprintf("%+v", multierr.Combine(err1, err2))
-func Combine(errors ...error) error {
- return fromSlice(errors)
-}
-
-// Append appends the given errors together. Either value may be nil.
-//
-// This function is a specialization of Combine for the common case where
-// there are only two errors.
-//
-// err = multierr.Append(reader.Close(), writer.Close())
-//
-// The following pattern may also be used to record failure of deferred
-// operations without losing information about the original error.
-//
-// func doSomething(..) (err error) {
-// f := acquireResource()
-// defer func() {
-// err = multierr.Append(err, f.Close())
-// }()
-//
-// Note that the variable MUST be a named return to append an error to it from
-// the defer statement. See also [AppendInvoke].
-func Append(left error, right error) error {
- switch {
- case left == nil:
- return right
- case right == nil:
- return left
- }
-
- if _, ok := right.(*multiError); !ok {
- if l, ok := left.(*multiError); ok && !l.copyNeeded.Swap(true) {
- // Common case where the error on the left is constantly being
- // appended to.
- errs := append(l.errors, right)
- return &multiError{errors: errs}
- } else if !ok {
- // Both errors are single errors.
- return &multiError{errors: []error{left, right}}
- }
- }
-
- // Either right or both, left and right, are multiErrors. Rely on usual
- // expensive logic.
- errors := [2]error{left, right}
- return fromSlice(errors[0:])
-}
-
-// AppendInto appends an error into the destination of an error pointer and
-// returns whether the error being appended was non-nil.
-//
-// var err error
-// multierr.AppendInto(&err, r.Close())
-// multierr.AppendInto(&err, w.Close())
-//
-// The above is equivalent to,
-//
-// err := multierr.Append(r.Close(), w.Close())
-//
-// As AppendInto reports whether the provided error was non-nil, it may be
-// used to build a multierr error in a loop more ergonomically. For example:
-//
-// var err error
-// for line := range lines {
-// var item Item
-// if multierr.AppendInto(&err, parse(line, &item)) {
-// continue
-// }
-// items = append(items, item)
-// }
-//
-// Compare this with a version that relies solely on Append:
-//
-// var err error
-// for line := range lines {
-// var item Item
-// if parseErr := parse(line, &item); parseErr != nil {
-// err = multierr.Append(err, parseErr)
-// continue
-// }
-// items = append(items, item)
-// }
-func AppendInto(into *error, err error) (errored bool) {
- if into == nil {
- // We panic if 'into' is nil. This is not documented above
- // because suggesting that the pointer must be non-nil may
- // confuse users into thinking that the error that it points
- // to must be non-nil.
- panic("misuse of multierr.AppendInto: into pointer must not be nil")
- }
-
- if err == nil {
- return false
- }
- *into = Append(*into, err)
- return true
-}
-
-// Invoker is an operation that may fail with an error. Use it with
-// AppendInvoke to append the result of calling the function into an error.
-// This allows you to conveniently defer capture of failing operations.
-//
-// See also, [Close] and [Invoke].
-type Invoker interface {
- Invoke() error
-}
-
-// Invoke wraps a function which may fail with an error to match the Invoker
-// interface. Use it to supply functions matching this signature to
-// AppendInvoke.
-//
-// For example,
-//
-// func processReader(r io.Reader) (err error) {
-// scanner := bufio.NewScanner(r)
-// defer multierr.AppendInvoke(&err, multierr.Invoke(scanner.Err))
-// for scanner.Scan() {
-// // ...
-// }
-// // ...
-// }
-//
-// In this example, the following line will construct the Invoker right away,
-// but defer the invocation of scanner.Err() until the function returns.
-//
-// defer multierr.AppendInvoke(&err, multierr.Invoke(scanner.Err))
-//
-// Note that the error you're appending to from the defer statement MUST be a
-// named return.
-type Invoke func() error
-
-// Invoke calls the supplied function and returns its result.
-func (i Invoke) Invoke() error { return i() }
-
-// Close builds an Invoker that closes the provided io.Closer. Use it with
-// AppendInvoke to close io.Closers and append their results into an error.
-//
-// For example,
-//
-// func processFile(path string) (err error) {
-// f, err := os.Open(path)
-// if err != nil {
-// return err
-// }
-// defer multierr.AppendInvoke(&err, multierr.Close(f))
-// return processReader(f)
-// }
-//
-// In this example, multierr.Close will construct the Invoker right away, but
-// defer the invocation of f.Close until the function returns.
-//
-// defer multierr.AppendInvoke(&err, multierr.Close(f))
-//
-// Note that the error you're appending to from the defer statement MUST be a
-// named return.
-func Close(closer io.Closer) Invoker {
- return Invoke(closer.Close)
-}
-
-// AppendInvoke appends the result of calling the given Invoker into the
-// provided error pointer. Use it with named returns to safely defer
-// invocation of fallible operations until a function returns, and capture the
-// resulting errors.
-//
-// func doSomething(...) (err error) {
-// // ...
-// f, err := openFile(..)
-// if err != nil {
-// return err
-// }
-//
-// // multierr will call f.Close() when this function returns and
-// // if the operation fails, its append its error into the
-// // returned error.
-// defer multierr.AppendInvoke(&err, multierr.Close(f))
-//
-// scanner := bufio.NewScanner(f)
-// // Similarly, this scheduled scanner.Err to be called and
-// // inspected when the function returns and append its error
-// // into the returned error.
-// defer multierr.AppendInvoke(&err, multierr.Invoke(scanner.Err))
-//
-// // ...
-// }
-//
-// NOTE: If used with a defer, the error variable MUST be a named return.
-//
-// Without defer, AppendInvoke behaves exactly like AppendInto.
-//
-// err := // ...
-// multierr.AppendInvoke(&err, mutltierr.Invoke(foo))
-//
-// // ...is roughly equivalent to...
-//
-// err := // ...
-// multierr.AppendInto(&err, foo())
-//
-// The advantage of the indirection introduced by Invoker is to make it easy
-// to defer the invocation of a function. Without this indirection, the
-// invoked function will be evaluated at the time of the defer block rather
-// than when the function returns.
-//
-// // BAD: This is likely not what the caller intended. This will evaluate
-// // foo() right away and append its result into the error when the
-// // function returns.
-// defer multierr.AppendInto(&err, foo())
-//
-// // GOOD: This will defer invocation of foo unutil the function returns.
-// defer multierr.AppendInvoke(&err, multierr.Invoke(foo))
-//
-// multierr provides a few Invoker implementations out of the box for
-// convenience. See [Invoker] for more information.
-func AppendInvoke(into *error, invoker Invoker) {
- AppendInto(into, invoker.Invoke())
-}
-
-// AppendFunc is a shorthand for [AppendInvoke].
-// It allows using function or method value directly
-// without having to wrap it into an [Invoker] interface.
-//
-// func doSomething(...) (err error) {
-// w, err := startWorker(...)
-// if err != nil {
-// return err
-// }
-//
-// // multierr will call w.Stop() when this function returns and
-// // if the operation fails, it appends its error into the
-// // returned error.
-// defer multierr.AppendFunc(&err, w.Stop)
-// }
-func AppendFunc(into *error, fn func() error) {
- AppendInvoke(into, Invoke(fn))
-}
diff --git a/hack/tools/vendor/go.uber.org/multierr/error_post_go120.go b/hack/tools/vendor/go.uber.org/multierr/error_post_go120.go
deleted file mode 100644
index a173f9c25152..000000000000
--- a/hack/tools/vendor/go.uber.org/multierr/error_post_go120.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2017-2023 Uber Technologies, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-//go:build go1.20
-// +build go1.20
-
-package multierr
-
-// Unwrap returns a list of errors wrapped by this multierr.
-func (merr *multiError) Unwrap() []error {
- return merr.Errors()
-}
-
-type multipleErrors interface {
- Unwrap() []error
-}
-
-func extractErrors(err error) []error {
- if err == nil {
- return nil
- }
-
- // check if the given err is an Unwrapable error that
- // implements multipleErrors interface.
- eg, ok := err.(multipleErrors)
- if !ok {
- return []error{err}
- }
-
- return append(([]error)(nil), eg.Unwrap()...)
-}
diff --git a/hack/tools/vendor/go.uber.org/multierr/error_pre_go120.go b/hack/tools/vendor/go.uber.org/multierr/error_pre_go120.go
deleted file mode 100644
index 93872a3fcd13..000000000000
--- a/hack/tools/vendor/go.uber.org/multierr/error_pre_go120.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 2017-2023 Uber Technologies, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-//go:build !go1.20
-// +build !go1.20
-
-package multierr
-
-import "errors"
-
-// Versions of Go before 1.20 did not support the Unwrap() []error method.
-// This provides a similar behavior by implementing the Is(..) and As(..)
-// methods.
-// See the errors.Join proposal for details:
-// https://github.com/golang/go/issues/53435
-
-// As attempts to find the first error in the error list that matches the type
-// of the value that target points to.
-//
-// This function allows errors.As to traverse the values stored on the
-// multierr error.
-func (merr *multiError) As(target interface{}) bool {
- for _, err := range merr.Errors() {
- if errors.As(err, target) {
- return true
- }
- }
- return false
-}
-
-// Is attempts to match the provided error against errors in the error list.
-//
-// This function allows errors.Is to traverse the values stored on the
-// multierr error.
-func (merr *multiError) Is(target error) bool {
- for _, err := range merr.Errors() {
- if errors.Is(err, target) {
- return true
- }
- }
- return false
-}
-
-func extractErrors(err error) []error {
- if err == nil {
- return nil
- }
-
- // Note that we're casting to multiError, not errorGroup. Our contract is
- // that returned errors MAY implement errorGroup. Errors, however, only
- // has special behavior for multierr-specific error objects.
- //
- // This behavior can be expanded in the future but I think it's prudent to
- // start with as little as possible in terms of contract and possibility
- // of misuse.
- eg, ok := err.(*multiError)
- if !ok {
- return []error{err}
- }
-
- return append(([]error)(nil), eg.Errors()...)
-}
diff --git a/hack/tools/vendor/golang.org/x/crypto/argon2/argon2.go b/hack/tools/vendor/golang.org/x/crypto/argon2/argon2.go
index 29f0a2de4514..2b65ec91ac39 100644
--- a/hack/tools/vendor/golang.org/x/crypto/argon2/argon2.go
+++ b/hack/tools/vendor/golang.org/x/crypto/argon2/argon2.go
@@ -6,7 +6,7 @@
// Argon2 was selected as the winner of the Password Hashing Competition and can
// be used to derive cryptographic keys from passwords.
//
-// For a detailed specification of Argon2 see [1].
+// For a detailed specification of Argon2 see [argon2-specs.pdf].
//
// If you aren't sure which function you need, use Argon2id (IDKey) and
// the parameter recommendations for your scenario.
@@ -17,7 +17,7 @@
// It uses data-independent memory access, which is preferred for password
// hashing and password-based key derivation. Argon2i requires more passes over
// memory than Argon2id to protect from trade-off attacks. The recommended
-// parameters (taken from [2]) for non-interactive operations are time=3 and to
+// parameters (taken from [RFC 9106 Section 7.3]) for non-interactive operations are time=3 and to
// use the maximum available memory.
//
// # Argon2id
@@ -27,11 +27,11 @@
// half of the first iteration over the memory and data-dependent memory access
// for the rest. Argon2id is side-channel resistant and provides better brute-
// force cost savings due to time-memory tradeoffs than Argon2i. The recommended
-// parameters for non-interactive operations (taken from [2]) are time=1 and to
+// parameters for non-interactive operations (taken from [RFC 9106 Section 7.3]) are time=1 and to
// use the maximum available memory.
//
-// [1] https://github.com/P-H-C/phc-winner-argon2/blob/master/argon2-specs.pdf
-// [2] https://tools.ietf.org/html/draft-irtf-cfrg-argon2-03#section-9.3
+// [argon2-specs.pdf]: https://github.com/P-H-C/phc-winner-argon2/blob/master/argon2-specs.pdf
+// [RFC 9106 Section 7.3]: https://www.rfc-editor.org/rfc/rfc9106.html#section-7.3
package argon2
import (
@@ -59,7 +59,7 @@ const (
//
// key := argon2.Key([]byte("some password"), salt, 3, 32*1024, 4, 32)
//
-// The draft RFC recommends[2] time=3, and memory=32*1024 is a sensible number.
+// [RFC 9106 Section 7.3] recommends time=3, and memory=32*1024 as a sensible number.
// If using that amount of memory (32 MB) is not possible in some contexts then
// the time parameter can be increased to compensate.
//
@@ -69,6 +69,8 @@ const (
// adjusted to the number of available CPUs. The cost parameters should be
// increased as memory latency and CPU parallelism increases. Remember to get a
// good random salt.
+//
+// [RFC 9106 Section 7.3]: https://www.rfc-editor.org/rfc/rfc9106.html#section-7.3
func Key(password, salt []byte, time, memory uint32, threads uint8, keyLen uint32) []byte {
return deriveKey(argon2i, password, salt, nil, nil, time, memory, threads, keyLen)
}
@@ -83,7 +85,7 @@ func Key(password, salt []byte, time, memory uint32, threads uint8, keyLen uint3
//
// key := argon2.IDKey([]byte("some password"), salt, 1, 64*1024, 4, 32)
//
-// The draft RFC recommends[2] time=1, and memory=64*1024 is a sensible number.
+// [RFC 9106 Section 7.3] recommends time=1, and memory=64*1024 as a sensible number.
// If using that amount of memory (64 MB) is not possible in some contexts then
// the time parameter can be increased to compensate.
//
@@ -93,6 +95,8 @@ func Key(password, salt []byte, time, memory uint32, threads uint8, keyLen uint3
// adjusted to the numbers of available CPUs. The cost parameters should be
// increased as memory latency and CPU parallelism increases. Remember to get a
// good random salt.
+//
+// [RFC 9106 Section 7.3]: https://www.rfc-editor.org/rfc/rfc9106.html#section-7.3
func IDKey(password, salt []byte, time, memory uint32, threads uint8, keyLen uint32) []byte {
return deriveKey(argon2id, password, salt, nil, nil, time, memory, threads, keyLen)
}
diff --git a/hack/tools/vendor/golang.org/x/crypto/chacha20/chacha_arm64.s b/hack/tools/vendor/golang.org/x/crypto/chacha20/chacha_arm64.s
index 7dd2638e88ad..769af387e2e5 100644
--- a/hack/tools/vendor/golang.org/x/crypto/chacha20/chacha_arm64.s
+++ b/hack/tools/vendor/golang.org/x/crypto/chacha20/chacha_arm64.s
@@ -29,7 +29,7 @@ loop:
MOVD $NUM_ROUNDS, R21
VLD1 (R11), [V30.S4, V31.S4]
- // load contants
+ // load constants
// VLD4R (R10), [V0.S4, V1.S4, V2.S4, V3.S4]
WORD $0x4D60E940
diff --git a/hack/tools/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.go b/hack/tools/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.go
index 50695a14f62d..b850e772e165 100644
--- a/hack/tools/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.go
+++ b/hack/tools/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.go
@@ -56,7 +56,10 @@ func (c *chacha20poly1305) seal(dst, nonce, plaintext, additionalData []byte) []
ret, out := sliceForAppend(dst, len(plaintext)+16)
if alias.InexactOverlap(out, plaintext) {
- panic("chacha20poly1305: invalid buffer overlap")
+ panic("chacha20poly1305: invalid buffer overlap of output and input")
+ }
+ if alias.AnyOverlap(out, additionalData) {
+ panic("chacha20poly1305: invalid buffer overlap of output and additional data")
}
chacha20Poly1305Seal(out[:], state[:], plaintext, additionalData)
return ret
@@ -73,7 +76,10 @@ func (c *chacha20poly1305) open(dst, nonce, ciphertext, additionalData []byte) (
ciphertext = ciphertext[:len(ciphertext)-16]
ret, out := sliceForAppend(dst, len(ciphertext))
if alias.InexactOverlap(out, ciphertext) {
- panic("chacha20poly1305: invalid buffer overlap")
+ panic("chacha20poly1305: invalid buffer overlap of output and input")
+ }
+ if alias.AnyOverlap(out, additionalData) {
+ panic("chacha20poly1305: invalid buffer overlap of output and additional data")
}
if !chacha20Poly1305Open(out, state[:], ciphertext, additionalData) {
for i := range out {
diff --git a/hack/tools/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_generic.go b/hack/tools/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_generic.go
index 6313898f0a75..2ecc840fca2c 100644
--- a/hack/tools/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_generic.go
+++ b/hack/tools/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_generic.go
@@ -31,7 +31,10 @@ func (c *chacha20poly1305) sealGeneric(dst, nonce, plaintext, additionalData []b
ret, out := sliceForAppend(dst, len(plaintext)+poly1305.TagSize)
ciphertext, tag := out[:len(plaintext)], out[len(plaintext):]
if alias.InexactOverlap(out, plaintext) {
- panic("chacha20poly1305: invalid buffer overlap")
+ panic("chacha20poly1305: invalid buffer overlap of output and input")
+ }
+ if alias.AnyOverlap(out, additionalData) {
+ panic("chacha20poly1305: invalid buffer overlap of output and additional data")
}
var polyKey [32]byte
@@ -67,7 +70,10 @@ func (c *chacha20poly1305) openGeneric(dst, nonce, ciphertext, additionalData []
ret, out := sliceForAppend(dst, len(ciphertext))
if alias.InexactOverlap(out, ciphertext) {
- panic("chacha20poly1305: invalid buffer overlap")
+ panic("chacha20poly1305: invalid buffer overlap of output and input")
+ }
+ if alias.AnyOverlap(out, additionalData) {
+ panic("chacha20poly1305: invalid buffer overlap of output and additional data")
}
if !p.Verify(tag) {
for i := range out {
diff --git a/hack/tools/vendor/golang.org/x/crypto/curve25519/curve25519.go b/hack/tools/vendor/golang.org/x/crypto/curve25519/curve25519.go
index 21ca3b2ee4b9..048faef3a5dc 100644
--- a/hack/tools/vendor/golang.org/x/crypto/curve25519/curve25519.go
+++ b/hack/tools/vendor/golang.org/x/crypto/curve25519/curve25519.go
@@ -3,11 +3,14 @@
// license that can be found in the LICENSE file.
// Package curve25519 provides an implementation of the X25519 function, which
-// performs scalar multiplication on the elliptic curve known as Curve25519.
-// See RFC 7748.
+// performs scalar multiplication on the elliptic curve known as Curve25519
+// according to [RFC 7748].
//
-// This package is a wrapper for the X25519 implementation
-// in the crypto/ecdh package.
+// The curve25519 package is a wrapper for the X25519 implementation in the
+// crypto/ecdh package. It is [frozen] and is not accepting new features.
+//
+// [RFC 7748]: https://datatracker.ietf.org/doc/html/rfc7748
+// [frozen]: https://go.dev/wiki/Frozen
package curve25519
import "crypto/ecdh"
@@ -36,7 +39,7 @@ func ScalarBaseMult(dst, scalar *[32]byte) {
curve := ecdh.X25519()
priv, err := curve.NewPrivateKey(scalar[:])
if err != nil {
- panic("curve25519: internal error: scalarBaseMult was not 32 bytes")
+ panic("curve25519: " + err.Error())
}
copy(dst[:], priv.PublicKey().Bytes())
}
diff --git a/hack/tools/vendor/golang.org/x/crypto/sha3/doc.go b/hack/tools/vendor/golang.org/x/crypto/sha3/doc.go
deleted file mode 100644
index bbf391fe6e59..000000000000
--- a/hack/tools/vendor/golang.org/x/crypto/sha3/doc.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package sha3 implements the SHA-3 fixed-output-length hash functions and
-// the SHAKE variable-output-length hash functions defined by FIPS-202.
-//
-// All types in this package also implement [encoding.BinaryMarshaler],
-// [encoding.BinaryAppender] and [encoding.BinaryUnmarshaler] to marshal and
-// unmarshal the internal state of the hash.
-//
-// Both types of hash function use the "sponge" construction and the Keccak
-// permutation. For a detailed specification see http://keccak.noekeon.org/
-//
-// # Guidance
-//
-// If you aren't sure what function you need, use SHAKE256 with at least 64
-// bytes of output. The SHAKE instances are faster than the SHA3 instances;
-// the latter have to allocate memory to conform to the hash.Hash interface.
-//
-// If you need a secret-key MAC (message authentication code), prepend the
-// secret key to the input, hash with SHAKE256 and read at least 32 bytes of
-// output.
-//
-// # Security strengths
-//
-// The SHA3-x (x equals 224, 256, 384, or 512) functions have a security
-// strength against preimage attacks of x bits. Since they only produce "x"
-// bits of output, their collision-resistance is only "x/2" bits.
-//
-// The SHAKE-256 and -128 functions have a generic security strength of 256 and
-// 128 bits against all attacks, provided that at least 2x bits of their output
-// is used. Requesting more than 64 or 32 bytes of output, respectively, does
-// not increase the collision-resistance of the SHAKE functions.
-//
-// # The sponge construction
-//
-// A sponge builds a pseudo-random function from a public pseudo-random
-// permutation, by applying the permutation to a state of "rate + capacity"
-// bytes, but hiding "capacity" of the bytes.
-//
-// A sponge starts out with a zero state. To hash an input using a sponge, up
-// to "rate" bytes of the input are XORed into the sponge's state. The sponge
-// is then "full" and the permutation is applied to "empty" it. This process is
-// repeated until all the input has been "absorbed". The input is then padded.
-// The digest is "squeezed" from the sponge in the same way, except that output
-// is copied out instead of input being XORed in.
-//
-// A sponge is parameterized by its generic security strength, which is equal
-// to half its capacity; capacity + rate is equal to the permutation's width.
-// Since the KeccakF-1600 permutation is 1600 bits (200 bytes) wide, this means
-// that the security strength of a sponge instance is equal to (1600 - bitrate) / 2.
-//
-// # Recommendations
-//
-// The SHAKE functions are recommended for most new uses. They can produce
-// output of arbitrary length. SHAKE256, with an output length of at least
-// 64 bytes, provides 256-bit security against all attacks. The Keccak team
-// recommends it for most applications upgrading from SHA2-512. (NIST chose a
-// much stronger, but much slower, sponge instance for SHA3-512.)
-//
-// The SHA-3 functions are "drop-in" replacements for the SHA-2 functions.
-// They produce output of the same length, with the same security strengths
-// against all attacks. This means, in particular, that SHA3-256 only has
-// 128-bit collision resistance, because its output length is 32 bytes.
-package sha3
diff --git a/hack/tools/vendor/golang.org/x/crypto/sha3/hashes.go b/hack/tools/vendor/golang.org/x/crypto/sha3/hashes.go
index 31fffbe04408..a51269d91aaa 100644
--- a/hack/tools/vendor/golang.org/x/crypto/sha3/hashes.go
+++ b/hack/tools/vendor/golang.org/x/crypto/sha3/hashes.go
@@ -2,127 +2,94 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Package sha3 implements the SHA-3 hash algorithms and the SHAKE extendable
+// output functions defined in FIPS 202.
+//
+// Most of this package is a wrapper around the crypto/sha3 package in the
+// standard library. The only exception is the legacy Keccak hash functions.
package sha3
-// This file provides functions for creating instances of the SHA-3
-// and SHAKE hash functions, as well as utility functions for hashing
-// bytes.
-
import (
- "crypto"
+ "crypto/sha3"
"hash"
)
// New224 creates a new SHA3-224 hash.
// Its generic security strength is 224 bits against preimage attacks,
// and 112 bits against collision attacks.
+//
+// It is a wrapper for the [sha3.New224] function in the standard library.
+//
+//go:fix inline
func New224() hash.Hash {
- return new224()
+ return sha3.New224()
}
// New256 creates a new SHA3-256 hash.
// Its generic security strength is 256 bits against preimage attacks,
// and 128 bits against collision attacks.
+//
+// It is a wrapper for the [sha3.New256] function in the standard library.
+//
+//go:fix inline
func New256() hash.Hash {
- return new256()
+ return sha3.New256()
}
// New384 creates a new SHA3-384 hash.
// Its generic security strength is 384 bits against preimage attacks,
// and 192 bits against collision attacks.
+//
+// It is a wrapper for the [sha3.New384] function in the standard library.
+//
+//go:fix inline
func New384() hash.Hash {
- return new384()
+ return sha3.New384()
}
// New512 creates a new SHA3-512 hash.
// Its generic security strength is 512 bits against preimage attacks,
// and 256 bits against collision attacks.
-func New512() hash.Hash {
- return new512()
-}
-
-func init() {
- crypto.RegisterHash(crypto.SHA3_224, New224)
- crypto.RegisterHash(crypto.SHA3_256, New256)
- crypto.RegisterHash(crypto.SHA3_384, New384)
- crypto.RegisterHash(crypto.SHA3_512, New512)
-}
-
-const (
- dsbyteSHA3 = 0b00000110
- dsbyteKeccak = 0b00000001
- dsbyteShake = 0b00011111
- dsbyteCShake = 0b00000100
-
- // rateK[c] is the rate in bytes for Keccak[c] where c is the capacity in
- // bits. Given the sponge size is 1600 bits, the rate is 1600 - c bits.
- rateK256 = (1600 - 256) / 8
- rateK448 = (1600 - 448) / 8
- rateK512 = (1600 - 512) / 8
- rateK768 = (1600 - 768) / 8
- rateK1024 = (1600 - 1024) / 8
-)
-
-func new224Generic() *state {
- return &state{rate: rateK448, outputLen: 28, dsbyte: dsbyteSHA3}
-}
-
-func new256Generic() *state {
- return &state{rate: rateK512, outputLen: 32, dsbyte: dsbyteSHA3}
-}
-
-func new384Generic() *state {
- return &state{rate: rateK768, outputLen: 48, dsbyte: dsbyteSHA3}
-}
-
-func new512Generic() *state {
- return &state{rate: rateK1024, outputLen: 64, dsbyte: dsbyteSHA3}
-}
-
-// NewLegacyKeccak256 creates a new Keccak-256 hash.
//
-// Only use this function if you require compatibility with an existing cryptosystem
-// that uses non-standard padding. All other users should use New256 instead.
-func NewLegacyKeccak256() hash.Hash {
- return &state{rate: rateK512, outputLen: 32, dsbyte: dsbyteKeccak}
-}
-
-// NewLegacyKeccak512 creates a new Keccak-512 hash.
+// It is a wrapper for the [sha3.New512] function in the standard library.
//
-// Only use this function if you require compatibility with an existing cryptosystem
-// that uses non-standard padding. All other users should use New512 instead.
-func NewLegacyKeccak512() hash.Hash {
- return &state{rate: rateK1024, outputLen: 64, dsbyte: dsbyteKeccak}
+//go:fix inline
+func New512() hash.Hash {
+ return sha3.New512()
}
// Sum224 returns the SHA3-224 digest of the data.
-func Sum224(data []byte) (digest [28]byte) {
- h := New224()
- h.Write(data)
- h.Sum(digest[:0])
- return
+//
+// It is a wrapper for the [sha3.Sum224] function in the standard library.
+//
+//go:fix inline
+func Sum224(data []byte) [28]byte {
+ return sha3.Sum224(data)
}
// Sum256 returns the SHA3-256 digest of the data.
-func Sum256(data []byte) (digest [32]byte) {
- h := New256()
- h.Write(data)
- h.Sum(digest[:0])
- return
+//
+// It is a wrapper for the [sha3.Sum256] function in the standard library.
+//
+//go:fix inline
+func Sum256(data []byte) [32]byte {
+ return sha3.Sum256(data)
}
// Sum384 returns the SHA3-384 digest of the data.
-func Sum384(data []byte) (digest [48]byte) {
- h := New384()
- h.Write(data)
- h.Sum(digest[:0])
- return
+//
+// It is a wrapper for the [sha3.Sum384] function in the standard library.
+//
+//go:fix inline
+func Sum384(data []byte) [48]byte {
+ return sha3.Sum384(data)
}
// Sum512 returns the SHA3-512 digest of the data.
-func Sum512(data []byte) (digest [64]byte) {
- h := New512()
- h.Write(data)
- h.Sum(digest[:0])
- return
+//
+// It is a wrapper for the [sha3.Sum512] function in the standard library.
+//
+//go:fix inline
+func Sum512(data []byte) [64]byte {
+ return sha3.Sum512(data)
}
diff --git a/hack/tools/vendor/golang.org/x/crypto/sha3/hashes_noasm.go b/hack/tools/vendor/golang.org/x/crypto/sha3/hashes_noasm.go
deleted file mode 100644
index 9d85fb621446..000000000000
--- a/hack/tools/vendor/golang.org/x/crypto/sha3/hashes_noasm.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2023 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build !gc || purego || !s390x
-
-package sha3
-
-func new224() *state {
- return new224Generic()
-}
-
-func new256() *state {
- return new256Generic()
-}
-
-func new384() *state {
- return new384Generic()
-}
-
-func new512() *state {
- return new512Generic()
-}
diff --git a/hack/tools/vendor/golang.org/x/crypto/sha3/keccakf.go b/hack/tools/vendor/golang.org/x/crypto/sha3/keccakf.go
deleted file mode 100644
index ce48b1dd3edd..000000000000
--- a/hack/tools/vendor/golang.org/x/crypto/sha3/keccakf.go
+++ /dev/null
@@ -1,414 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build !amd64 || purego || !gc
-
-package sha3
-
-import "math/bits"
-
-// rc stores the round constants for use in the ι step.
-var rc = [24]uint64{
- 0x0000000000000001,
- 0x0000000000008082,
- 0x800000000000808A,
- 0x8000000080008000,
- 0x000000000000808B,
- 0x0000000080000001,
- 0x8000000080008081,
- 0x8000000000008009,
- 0x000000000000008A,
- 0x0000000000000088,
- 0x0000000080008009,
- 0x000000008000000A,
- 0x000000008000808B,
- 0x800000000000008B,
- 0x8000000000008089,
- 0x8000000000008003,
- 0x8000000000008002,
- 0x8000000000000080,
- 0x000000000000800A,
- 0x800000008000000A,
- 0x8000000080008081,
- 0x8000000000008080,
- 0x0000000080000001,
- 0x8000000080008008,
-}
-
-// keccakF1600 applies the Keccak permutation to a 1600b-wide
-// state represented as a slice of 25 uint64s.
-func keccakF1600(a *[25]uint64) {
- // Implementation translated from Keccak-inplace.c
- // in the keccak reference code.
- var t, bc0, bc1, bc2, bc3, bc4, d0, d1, d2, d3, d4 uint64
-
- for i := 0; i < 24; i += 4 {
- // Combines the 5 steps in each round into 2 steps.
- // Unrolls 4 rounds per loop and spreads some steps across rounds.
-
- // Round 1
- bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
- bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
- bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
- bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
- bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
- d0 = bc4 ^ (bc1<<1 | bc1>>63)
- d1 = bc0 ^ (bc2<<1 | bc2>>63)
- d2 = bc1 ^ (bc3<<1 | bc3>>63)
- d3 = bc2 ^ (bc4<<1 | bc4>>63)
- d4 = bc3 ^ (bc0<<1 | bc0>>63)
-
- bc0 = a[0] ^ d0
- t = a[6] ^ d1
- bc1 = bits.RotateLeft64(t, 44)
- t = a[12] ^ d2
- bc2 = bits.RotateLeft64(t, 43)
- t = a[18] ^ d3
- bc3 = bits.RotateLeft64(t, 21)
- t = a[24] ^ d4
- bc4 = bits.RotateLeft64(t, 14)
- a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i]
- a[6] = bc1 ^ (bc3 &^ bc2)
- a[12] = bc2 ^ (bc4 &^ bc3)
- a[18] = bc3 ^ (bc0 &^ bc4)
- a[24] = bc4 ^ (bc1 &^ bc0)
-
- t = a[10] ^ d0
- bc2 = bits.RotateLeft64(t, 3)
- t = a[16] ^ d1
- bc3 = bits.RotateLeft64(t, 45)
- t = a[22] ^ d2
- bc4 = bits.RotateLeft64(t, 61)
- t = a[3] ^ d3
- bc0 = bits.RotateLeft64(t, 28)
- t = a[9] ^ d4
- bc1 = bits.RotateLeft64(t, 20)
- a[10] = bc0 ^ (bc2 &^ bc1)
- a[16] = bc1 ^ (bc3 &^ bc2)
- a[22] = bc2 ^ (bc4 &^ bc3)
- a[3] = bc3 ^ (bc0 &^ bc4)
- a[9] = bc4 ^ (bc1 &^ bc0)
-
- t = a[20] ^ d0
- bc4 = bits.RotateLeft64(t, 18)
- t = a[1] ^ d1
- bc0 = bits.RotateLeft64(t, 1)
- t = a[7] ^ d2
- bc1 = bits.RotateLeft64(t, 6)
- t = a[13] ^ d3
- bc2 = bits.RotateLeft64(t, 25)
- t = a[19] ^ d4
- bc3 = bits.RotateLeft64(t, 8)
- a[20] = bc0 ^ (bc2 &^ bc1)
- a[1] = bc1 ^ (bc3 &^ bc2)
- a[7] = bc2 ^ (bc4 &^ bc3)
- a[13] = bc3 ^ (bc0 &^ bc4)
- a[19] = bc4 ^ (bc1 &^ bc0)
-
- t = a[5] ^ d0
- bc1 = bits.RotateLeft64(t, 36)
- t = a[11] ^ d1
- bc2 = bits.RotateLeft64(t, 10)
- t = a[17] ^ d2
- bc3 = bits.RotateLeft64(t, 15)
- t = a[23] ^ d3
- bc4 = bits.RotateLeft64(t, 56)
- t = a[4] ^ d4
- bc0 = bits.RotateLeft64(t, 27)
- a[5] = bc0 ^ (bc2 &^ bc1)
- a[11] = bc1 ^ (bc3 &^ bc2)
- a[17] = bc2 ^ (bc4 &^ bc3)
- a[23] = bc3 ^ (bc0 &^ bc4)
- a[4] = bc4 ^ (bc1 &^ bc0)
-
- t = a[15] ^ d0
- bc3 = bits.RotateLeft64(t, 41)
- t = a[21] ^ d1
- bc4 = bits.RotateLeft64(t, 2)
- t = a[2] ^ d2
- bc0 = bits.RotateLeft64(t, 62)
- t = a[8] ^ d3
- bc1 = bits.RotateLeft64(t, 55)
- t = a[14] ^ d4
- bc2 = bits.RotateLeft64(t, 39)
- a[15] = bc0 ^ (bc2 &^ bc1)
- a[21] = bc1 ^ (bc3 &^ bc2)
- a[2] = bc2 ^ (bc4 &^ bc3)
- a[8] = bc3 ^ (bc0 &^ bc4)
- a[14] = bc4 ^ (bc1 &^ bc0)
-
- // Round 2
- bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
- bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
- bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
- bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
- bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
- d0 = bc4 ^ (bc1<<1 | bc1>>63)
- d1 = bc0 ^ (bc2<<1 | bc2>>63)
- d2 = bc1 ^ (bc3<<1 | bc3>>63)
- d3 = bc2 ^ (bc4<<1 | bc4>>63)
- d4 = bc3 ^ (bc0<<1 | bc0>>63)
-
- bc0 = a[0] ^ d0
- t = a[16] ^ d1
- bc1 = bits.RotateLeft64(t, 44)
- t = a[7] ^ d2
- bc2 = bits.RotateLeft64(t, 43)
- t = a[23] ^ d3
- bc3 = bits.RotateLeft64(t, 21)
- t = a[14] ^ d4
- bc4 = bits.RotateLeft64(t, 14)
- a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i+1]
- a[16] = bc1 ^ (bc3 &^ bc2)
- a[7] = bc2 ^ (bc4 &^ bc3)
- a[23] = bc3 ^ (bc0 &^ bc4)
- a[14] = bc4 ^ (bc1 &^ bc0)
-
- t = a[20] ^ d0
- bc2 = bits.RotateLeft64(t, 3)
- t = a[11] ^ d1
- bc3 = bits.RotateLeft64(t, 45)
- t = a[2] ^ d2
- bc4 = bits.RotateLeft64(t, 61)
- t = a[18] ^ d3
- bc0 = bits.RotateLeft64(t, 28)
- t = a[9] ^ d4
- bc1 = bits.RotateLeft64(t, 20)
- a[20] = bc0 ^ (bc2 &^ bc1)
- a[11] = bc1 ^ (bc3 &^ bc2)
- a[2] = bc2 ^ (bc4 &^ bc3)
- a[18] = bc3 ^ (bc0 &^ bc4)
- a[9] = bc4 ^ (bc1 &^ bc0)
-
- t = a[15] ^ d0
- bc4 = bits.RotateLeft64(t, 18)
- t = a[6] ^ d1
- bc0 = bits.RotateLeft64(t, 1)
- t = a[22] ^ d2
- bc1 = bits.RotateLeft64(t, 6)
- t = a[13] ^ d3
- bc2 = bits.RotateLeft64(t, 25)
- t = a[4] ^ d4
- bc3 = bits.RotateLeft64(t, 8)
- a[15] = bc0 ^ (bc2 &^ bc1)
- a[6] = bc1 ^ (bc3 &^ bc2)
- a[22] = bc2 ^ (bc4 &^ bc3)
- a[13] = bc3 ^ (bc0 &^ bc4)
- a[4] = bc4 ^ (bc1 &^ bc0)
-
- t = a[10] ^ d0
- bc1 = bits.RotateLeft64(t, 36)
- t = a[1] ^ d1
- bc2 = bits.RotateLeft64(t, 10)
- t = a[17] ^ d2
- bc3 = bits.RotateLeft64(t, 15)
- t = a[8] ^ d3
- bc4 = bits.RotateLeft64(t, 56)
- t = a[24] ^ d4
- bc0 = bits.RotateLeft64(t, 27)
- a[10] = bc0 ^ (bc2 &^ bc1)
- a[1] = bc1 ^ (bc3 &^ bc2)
- a[17] = bc2 ^ (bc4 &^ bc3)
- a[8] = bc3 ^ (bc0 &^ bc4)
- a[24] = bc4 ^ (bc1 &^ bc0)
-
- t = a[5] ^ d0
- bc3 = bits.RotateLeft64(t, 41)
- t = a[21] ^ d1
- bc4 = bits.RotateLeft64(t, 2)
- t = a[12] ^ d2
- bc0 = bits.RotateLeft64(t, 62)
- t = a[3] ^ d3
- bc1 = bits.RotateLeft64(t, 55)
- t = a[19] ^ d4
- bc2 = bits.RotateLeft64(t, 39)
- a[5] = bc0 ^ (bc2 &^ bc1)
- a[21] = bc1 ^ (bc3 &^ bc2)
- a[12] = bc2 ^ (bc4 &^ bc3)
- a[3] = bc3 ^ (bc0 &^ bc4)
- a[19] = bc4 ^ (bc1 &^ bc0)
-
- // Round 3
- bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
- bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
- bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
- bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
- bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
- d0 = bc4 ^ (bc1<<1 | bc1>>63)
- d1 = bc0 ^ (bc2<<1 | bc2>>63)
- d2 = bc1 ^ (bc3<<1 | bc3>>63)
- d3 = bc2 ^ (bc4<<1 | bc4>>63)
- d4 = bc3 ^ (bc0<<1 | bc0>>63)
-
- bc0 = a[0] ^ d0
- t = a[11] ^ d1
- bc1 = bits.RotateLeft64(t, 44)
- t = a[22] ^ d2
- bc2 = bits.RotateLeft64(t, 43)
- t = a[8] ^ d3
- bc3 = bits.RotateLeft64(t, 21)
- t = a[19] ^ d4
- bc4 = bits.RotateLeft64(t, 14)
- a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i+2]
- a[11] = bc1 ^ (bc3 &^ bc2)
- a[22] = bc2 ^ (bc4 &^ bc3)
- a[8] = bc3 ^ (bc0 &^ bc4)
- a[19] = bc4 ^ (bc1 &^ bc0)
-
- t = a[15] ^ d0
- bc2 = bits.RotateLeft64(t, 3)
- t = a[1] ^ d1
- bc3 = bits.RotateLeft64(t, 45)
- t = a[12] ^ d2
- bc4 = bits.RotateLeft64(t, 61)
- t = a[23] ^ d3
- bc0 = bits.RotateLeft64(t, 28)
- t = a[9] ^ d4
- bc1 = bits.RotateLeft64(t, 20)
- a[15] = bc0 ^ (bc2 &^ bc1)
- a[1] = bc1 ^ (bc3 &^ bc2)
- a[12] = bc2 ^ (bc4 &^ bc3)
- a[23] = bc3 ^ (bc0 &^ bc4)
- a[9] = bc4 ^ (bc1 &^ bc0)
-
- t = a[5] ^ d0
- bc4 = bits.RotateLeft64(t, 18)
- t = a[16] ^ d1
- bc0 = bits.RotateLeft64(t, 1)
- t = a[2] ^ d2
- bc1 = bits.RotateLeft64(t, 6)
- t = a[13] ^ d3
- bc2 = bits.RotateLeft64(t, 25)
- t = a[24] ^ d4
- bc3 = bits.RotateLeft64(t, 8)
- a[5] = bc0 ^ (bc2 &^ bc1)
- a[16] = bc1 ^ (bc3 &^ bc2)
- a[2] = bc2 ^ (bc4 &^ bc3)
- a[13] = bc3 ^ (bc0 &^ bc4)
- a[24] = bc4 ^ (bc1 &^ bc0)
-
- t = a[20] ^ d0
- bc1 = bits.RotateLeft64(t, 36)
- t = a[6] ^ d1
- bc2 = bits.RotateLeft64(t, 10)
- t = a[17] ^ d2
- bc3 = bits.RotateLeft64(t, 15)
- t = a[3] ^ d3
- bc4 = bits.RotateLeft64(t, 56)
- t = a[14] ^ d4
- bc0 = bits.RotateLeft64(t, 27)
- a[20] = bc0 ^ (bc2 &^ bc1)
- a[6] = bc1 ^ (bc3 &^ bc2)
- a[17] = bc2 ^ (bc4 &^ bc3)
- a[3] = bc3 ^ (bc0 &^ bc4)
- a[14] = bc4 ^ (bc1 &^ bc0)
-
- t = a[10] ^ d0
- bc3 = bits.RotateLeft64(t, 41)
- t = a[21] ^ d1
- bc4 = bits.RotateLeft64(t, 2)
- t = a[7] ^ d2
- bc0 = bits.RotateLeft64(t, 62)
- t = a[18] ^ d3
- bc1 = bits.RotateLeft64(t, 55)
- t = a[4] ^ d4
- bc2 = bits.RotateLeft64(t, 39)
- a[10] = bc0 ^ (bc2 &^ bc1)
- a[21] = bc1 ^ (bc3 &^ bc2)
- a[7] = bc2 ^ (bc4 &^ bc3)
- a[18] = bc3 ^ (bc0 &^ bc4)
- a[4] = bc4 ^ (bc1 &^ bc0)
-
- // Round 4
- bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
- bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
- bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
- bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
- bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
- d0 = bc4 ^ (bc1<<1 | bc1>>63)
- d1 = bc0 ^ (bc2<<1 | bc2>>63)
- d2 = bc1 ^ (bc3<<1 | bc3>>63)
- d3 = bc2 ^ (bc4<<1 | bc4>>63)
- d4 = bc3 ^ (bc0<<1 | bc0>>63)
-
- bc0 = a[0] ^ d0
- t = a[1] ^ d1
- bc1 = bits.RotateLeft64(t, 44)
- t = a[2] ^ d2
- bc2 = bits.RotateLeft64(t, 43)
- t = a[3] ^ d3
- bc3 = bits.RotateLeft64(t, 21)
- t = a[4] ^ d4
- bc4 = bits.RotateLeft64(t, 14)
- a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i+3]
- a[1] = bc1 ^ (bc3 &^ bc2)
- a[2] = bc2 ^ (bc4 &^ bc3)
- a[3] = bc3 ^ (bc0 &^ bc4)
- a[4] = bc4 ^ (bc1 &^ bc0)
-
- t = a[5] ^ d0
- bc2 = bits.RotateLeft64(t, 3)
- t = a[6] ^ d1
- bc3 = bits.RotateLeft64(t, 45)
- t = a[7] ^ d2
- bc4 = bits.RotateLeft64(t, 61)
- t = a[8] ^ d3
- bc0 = bits.RotateLeft64(t, 28)
- t = a[9] ^ d4
- bc1 = bits.RotateLeft64(t, 20)
- a[5] = bc0 ^ (bc2 &^ bc1)
- a[6] = bc1 ^ (bc3 &^ bc2)
- a[7] = bc2 ^ (bc4 &^ bc3)
- a[8] = bc3 ^ (bc0 &^ bc4)
- a[9] = bc4 ^ (bc1 &^ bc0)
-
- t = a[10] ^ d0
- bc4 = bits.RotateLeft64(t, 18)
- t = a[11] ^ d1
- bc0 = bits.RotateLeft64(t, 1)
- t = a[12] ^ d2
- bc1 = bits.RotateLeft64(t, 6)
- t = a[13] ^ d3
- bc2 = bits.RotateLeft64(t, 25)
- t = a[14] ^ d4
- bc3 = bits.RotateLeft64(t, 8)
- a[10] = bc0 ^ (bc2 &^ bc1)
- a[11] = bc1 ^ (bc3 &^ bc2)
- a[12] = bc2 ^ (bc4 &^ bc3)
- a[13] = bc3 ^ (bc0 &^ bc4)
- a[14] = bc4 ^ (bc1 &^ bc0)
-
- t = a[15] ^ d0
- bc1 = bits.RotateLeft64(t, 36)
- t = a[16] ^ d1
- bc2 = bits.RotateLeft64(t, 10)
- t = a[17] ^ d2
- bc3 = bits.RotateLeft64(t, 15)
- t = a[18] ^ d3
- bc4 = bits.RotateLeft64(t, 56)
- t = a[19] ^ d4
- bc0 = bits.RotateLeft64(t, 27)
- a[15] = bc0 ^ (bc2 &^ bc1)
- a[16] = bc1 ^ (bc3 &^ bc2)
- a[17] = bc2 ^ (bc4 &^ bc3)
- a[18] = bc3 ^ (bc0 &^ bc4)
- a[19] = bc4 ^ (bc1 &^ bc0)
-
- t = a[20] ^ d0
- bc3 = bits.RotateLeft64(t, 41)
- t = a[21] ^ d1
- bc4 = bits.RotateLeft64(t, 2)
- t = a[22] ^ d2
- bc0 = bits.RotateLeft64(t, 62)
- t = a[23] ^ d3
- bc1 = bits.RotateLeft64(t, 55)
- t = a[24] ^ d4
- bc2 = bits.RotateLeft64(t, 39)
- a[20] = bc0 ^ (bc2 &^ bc1)
- a[21] = bc1 ^ (bc3 &^ bc2)
- a[22] = bc2 ^ (bc4 &^ bc3)
- a[23] = bc3 ^ (bc0 &^ bc4)
- a[24] = bc4 ^ (bc1 &^ bc0)
- }
-}
diff --git a/hack/tools/vendor/golang.org/x/crypto/sha3/keccakf_amd64.go b/hack/tools/vendor/golang.org/x/crypto/sha3/keccakf_amd64.go
deleted file mode 100644
index b908696be58f..000000000000
--- a/hack/tools/vendor/golang.org/x/crypto/sha3/keccakf_amd64.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build amd64 && !purego && gc
-
-package sha3
-
-// This function is implemented in keccakf_amd64.s.
-
-//go:noescape
-
-func keccakF1600(a *[25]uint64)
diff --git a/hack/tools/vendor/golang.org/x/crypto/sha3/keccakf_amd64.s b/hack/tools/vendor/golang.org/x/crypto/sha3/keccakf_amd64.s
deleted file mode 100644
index 99e2f16e9719..000000000000
--- a/hack/tools/vendor/golang.org/x/crypto/sha3/keccakf_amd64.s
+++ /dev/null
@@ -1,5419 +0,0 @@
-// Code generated by command: go run keccakf_amd64_asm.go -out ../keccakf_amd64.s -pkg sha3. DO NOT EDIT.
-
-//go:build amd64 && !purego && gc
-
-// func keccakF1600(a *[25]uint64)
-TEXT ·keccakF1600(SB), $200-8
- MOVQ a+0(FP), DI
-
- // Convert the user state into an internal state
- NOTQ 8(DI)
- NOTQ 16(DI)
- NOTQ 64(DI)
- NOTQ 96(DI)
- NOTQ 136(DI)
- NOTQ 160(DI)
-
- // Execute the KeccakF permutation
- MOVQ (DI), SI
- MOVQ 8(DI), BP
- MOVQ 32(DI), R15
- XORQ 40(DI), SI
- XORQ 48(DI), BP
- XORQ 72(DI), R15
- XORQ 80(DI), SI
- XORQ 88(DI), BP
- XORQ 112(DI), R15
- XORQ 120(DI), SI
- XORQ 128(DI), BP
- XORQ 152(DI), R15
- XORQ 160(DI), SI
- XORQ 168(DI), BP
- MOVQ 176(DI), DX
- MOVQ 184(DI), R8
- XORQ 192(DI), R15
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x0000000000000001, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x0000000000008082, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x800000000000808a, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x8000000080008000, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x000000000000808b, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x0000000080000001, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x8000000080008081, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x8000000000008009, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x000000000000008a, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x0000000000000088, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x0000000080008009, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x000000008000000a, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x000000008000808b, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x800000000000008b, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x8000000000008089, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x8000000000008003, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x8000000000008002, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x8000000000000080, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x000000000000800a, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x800000008000000a, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x8000000080008081, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x8000000000008080, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x0000000080000001, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x8000000080008008, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- NOP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- NOP
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- NOP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- NOP
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- NOP
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- NOP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- NOP
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- NOP
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- NOP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- NOP
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- NOP
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- NOP
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- NOP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Revert the internal state to the user state
- NOTQ 8(DI)
- NOTQ 16(DI)
- NOTQ 64(DI)
- NOTQ 96(DI)
- NOTQ 136(DI)
- NOTQ 160(DI)
- RET
diff --git a/hack/tools/vendor/golang.org/x/crypto/sha3/legacy_hash.go b/hack/tools/vendor/golang.org/x/crypto/sha3/legacy_hash.go
new file mode 100644
index 000000000000..b8784536e017
--- /dev/null
+++ b/hack/tools/vendor/golang.org/x/crypto/sha3/legacy_hash.go
@@ -0,0 +1,263 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package sha3
+
+// This implementation is only used for NewLegacyKeccak256 and
+// NewLegacyKeccak512, which are not implemented by crypto/sha3.
+// All other functions in this package are wrappers around crypto/sha3.
+
+import (
+ "crypto/subtle"
+ "encoding/binary"
+ "errors"
+ "hash"
+ "unsafe"
+
+ "golang.org/x/sys/cpu"
+)
+
+const (
+ dsbyteKeccak = 0b00000001
+
+ // rateK[c] is the rate in bytes for Keccak[c] where c is the capacity in
+ // bits. Given the sponge size is 1600 bits, the rate is 1600 - c bits.
+ rateK256 = (1600 - 256) / 8
+ rateK512 = (1600 - 512) / 8
+ rateK1024 = (1600 - 1024) / 8
+)
+
+// NewLegacyKeccak256 creates a new Keccak-256 hash.
+//
+// Only use this function if you require compatibility with an existing cryptosystem
+// that uses non-standard padding. All other users should use New256 instead.
+func NewLegacyKeccak256() hash.Hash {
+ return &state{rate: rateK512, outputLen: 32, dsbyte: dsbyteKeccak}
+}
+
+// NewLegacyKeccak512 creates a new Keccak-512 hash.
+//
+// Only use this function if you require compatibility with an existing cryptosystem
+// that uses non-standard padding. All other users should use New512 instead.
+func NewLegacyKeccak512() hash.Hash {
+ return &state{rate: rateK1024, outputLen: 64, dsbyte: dsbyteKeccak}
+}
+
+// spongeDirection indicates the direction bytes are flowing through the sponge.
+type spongeDirection int
+
+const (
+ // spongeAbsorbing indicates that the sponge is absorbing input.
+ spongeAbsorbing spongeDirection = iota
+ // spongeSqueezing indicates that the sponge is being squeezed.
+ spongeSqueezing
+)
+
+type state struct {
+ a [1600 / 8]byte // main state of the hash
+
+ // a[n:rate] is the buffer. If absorbing, it's the remaining space to XOR
+ // into before running the permutation. If squeezing, it's the remaining
+ // output to produce before running the permutation.
+ n, rate int
+
+ // dsbyte contains the "domain separation" bits and the first bit of
+ // the padding. Sections 6.1 and 6.2 of [1] separate the outputs of the
+ // SHA-3 and SHAKE functions by appending bitstrings to the message.
+ // Using a little-endian bit-ordering convention, these are "01" for SHA-3
+ // and "1111" for SHAKE, or 00000010b and 00001111b, respectively. Then the
+ // padding rule from section 5.1 is applied to pad the message to a multiple
+ // of the rate, which involves adding a "1" bit, zero or more "0" bits, and
+ // a final "1" bit. We merge the first "1" bit from the padding into dsbyte,
+ // giving 00000110b (0x06) and 00011111b (0x1f).
+ // [1] http://csrc.nist.gov/publications/drafts/fips-202/fips_202_draft.pdf
+ // "Draft FIPS 202: SHA-3 Standard: Permutation-Based Hash and
+ // Extendable-Output Functions (May 2014)"
+ dsbyte byte
+
+ outputLen int // the default output size in bytes
+ state spongeDirection // whether the sponge is absorbing or squeezing
+}
+
+// BlockSize returns the rate of sponge underlying this hash function.
+func (d *state) BlockSize() int { return d.rate }
+
+// Size returns the output size of the hash function in bytes.
+func (d *state) Size() int { return d.outputLen }
+
+// Reset clears the internal state by zeroing the sponge state and
+// the buffer indexes, and setting Sponge.state to absorbing.
+func (d *state) Reset() {
+ // Zero the permutation's state.
+ for i := range d.a {
+ d.a[i] = 0
+ }
+ d.state = spongeAbsorbing
+ d.n = 0
+}
+
+func (d *state) clone() *state {
+ ret := *d
+ return &ret
+}
+
+// permute applies the KeccakF-1600 permutation.
+func (d *state) permute() {
+ var a *[25]uint64
+ if cpu.IsBigEndian {
+ a = new([25]uint64)
+ for i := range a {
+ a[i] = binary.LittleEndian.Uint64(d.a[i*8:])
+ }
+ } else {
+ a = (*[25]uint64)(unsafe.Pointer(&d.a))
+ }
+
+ keccakF1600(a)
+ d.n = 0
+
+ if cpu.IsBigEndian {
+ for i := range a {
+ binary.LittleEndian.PutUint64(d.a[i*8:], a[i])
+ }
+ }
+}
+
+// pads appends the domain separation bits in dsbyte, applies
+// the multi-bitrate 10..1 padding rule, and permutes the state.
+func (d *state) padAndPermute() {
+ // Pad with this instance's domain-separator bits. We know that there's
+ // at least one byte of space in the sponge because, if it were full,
+ // permute would have been called to empty it. dsbyte also contains the
+ // first one bit for the padding. See the comment in the state struct.
+ d.a[d.n] ^= d.dsbyte
+ // This adds the final one bit for the padding. Because of the way that
+ // bits are numbered from the LSB upwards, the final bit is the MSB of
+ // the last byte.
+ d.a[d.rate-1] ^= 0x80
+ // Apply the permutation
+ d.permute()
+ d.state = spongeSqueezing
+}
+
+// Write absorbs more data into the hash's state. It panics if any
+// output has already been read.
+func (d *state) Write(p []byte) (n int, err error) {
+ if d.state != spongeAbsorbing {
+ panic("sha3: Write after Read")
+ }
+
+ n = len(p)
+
+ for len(p) > 0 {
+ x := subtle.XORBytes(d.a[d.n:d.rate], d.a[d.n:d.rate], p)
+ d.n += x
+ p = p[x:]
+
+ // If the sponge is full, apply the permutation.
+ if d.n == d.rate {
+ d.permute()
+ }
+ }
+
+ return
+}
+
+// Read squeezes an arbitrary number of bytes from the sponge.
+func (d *state) Read(out []byte) (n int, err error) {
+ // If we're still absorbing, pad and apply the permutation.
+ if d.state == spongeAbsorbing {
+ d.padAndPermute()
+ }
+
+ n = len(out)
+
+ // Now, do the squeezing.
+ for len(out) > 0 {
+ // Apply the permutation if we've squeezed the sponge dry.
+ if d.n == d.rate {
+ d.permute()
+ }
+
+ x := copy(out, d.a[d.n:d.rate])
+ d.n += x
+ out = out[x:]
+ }
+
+ return
+}
+
+// Sum applies padding to the hash state and then squeezes out the desired
+// number of output bytes. It panics if any output has already been read.
+func (d *state) Sum(in []byte) []byte {
+ if d.state != spongeAbsorbing {
+ panic("sha3: Sum after Read")
+ }
+
+ // Make a copy of the original hash so that caller can keep writing
+ // and summing.
+ dup := d.clone()
+ hash := make([]byte, dup.outputLen, 64) // explicit cap to allow stack allocation
+ dup.Read(hash)
+ return append(in, hash...)
+}
+
+const (
+ magicKeccak = "sha\x0b"
+ // magic || rate || main state || n || sponge direction
+ marshaledSize = len(magicKeccak) + 1 + 200 + 1 + 1
+)
+
+func (d *state) MarshalBinary() ([]byte, error) {
+ return d.AppendBinary(make([]byte, 0, marshaledSize))
+}
+
+func (d *state) AppendBinary(b []byte) ([]byte, error) {
+ switch d.dsbyte {
+ case dsbyteKeccak:
+ b = append(b, magicKeccak...)
+ default:
+ panic("unknown dsbyte")
+ }
+ // rate is at most 168, and n is at most rate.
+ b = append(b, byte(d.rate))
+ b = append(b, d.a[:]...)
+ b = append(b, byte(d.n), byte(d.state))
+ return b, nil
+}
+
+func (d *state) UnmarshalBinary(b []byte) error {
+ if len(b) != marshaledSize {
+ return errors.New("sha3: invalid hash state")
+ }
+
+ magic := string(b[:len(magicKeccak)])
+ b = b[len(magicKeccak):]
+ switch {
+ case magic == magicKeccak && d.dsbyte == dsbyteKeccak:
+ default:
+ return errors.New("sha3: invalid hash state identifier")
+ }
+
+ rate := int(b[0])
+ b = b[1:]
+ if rate != d.rate {
+ return errors.New("sha3: invalid hash state function")
+ }
+
+ copy(d.a[:], b)
+ b = b[len(d.a):]
+
+ n, state := int(b[0]), spongeDirection(b[1])
+ if n > d.rate {
+ return errors.New("sha3: invalid hash state")
+ }
+ d.n = n
+ if state != spongeAbsorbing && state != spongeSqueezing {
+ return errors.New("sha3: invalid hash state")
+ }
+ d.state = state
+
+ return nil
+}
diff --git a/hack/tools/vendor/golang.org/x/crypto/sha3/legacy_keccakf.go b/hack/tools/vendor/golang.org/x/crypto/sha3/legacy_keccakf.go
new file mode 100644
index 000000000000..101588c16cce
--- /dev/null
+++ b/hack/tools/vendor/golang.org/x/crypto/sha3/legacy_keccakf.go
@@ -0,0 +1,416 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package sha3
+
+// This implementation is only used for NewLegacyKeccak256 and
+// NewLegacyKeccak512, which are not implemented by crypto/sha3.
+// All other functions in this package are wrappers around crypto/sha3.
+
+import "math/bits"
+
+// rc stores the round constants for use in the ι step.
+var rc = [24]uint64{
+ 0x0000000000000001,
+ 0x0000000000008082,
+ 0x800000000000808A,
+ 0x8000000080008000,
+ 0x000000000000808B,
+ 0x0000000080000001,
+ 0x8000000080008081,
+ 0x8000000000008009,
+ 0x000000000000008A,
+ 0x0000000000000088,
+ 0x0000000080008009,
+ 0x000000008000000A,
+ 0x000000008000808B,
+ 0x800000000000008B,
+ 0x8000000000008089,
+ 0x8000000000008003,
+ 0x8000000000008002,
+ 0x8000000000000080,
+ 0x000000000000800A,
+ 0x800000008000000A,
+ 0x8000000080008081,
+ 0x8000000000008080,
+ 0x0000000080000001,
+ 0x8000000080008008,
+}
+
+// keccakF1600 applies the Keccak permutation to a 1600b-wide
+// state represented as a slice of 25 uint64s.
+func keccakF1600(a *[25]uint64) {
+ // Implementation translated from Keccak-inplace.c
+ // in the keccak reference code.
+ var t, bc0, bc1, bc2, bc3, bc4, d0, d1, d2, d3, d4 uint64
+
+ for i := 0; i < 24; i += 4 {
+ // Combines the 5 steps in each round into 2 steps.
+ // Unrolls 4 rounds per loop and spreads some steps across rounds.
+
+ // Round 1
+ bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
+ bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
+ bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
+ bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
+ bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
+ d0 = bc4 ^ (bc1<<1 | bc1>>63)
+ d1 = bc0 ^ (bc2<<1 | bc2>>63)
+ d2 = bc1 ^ (bc3<<1 | bc3>>63)
+ d3 = bc2 ^ (bc4<<1 | bc4>>63)
+ d4 = bc3 ^ (bc0<<1 | bc0>>63)
+
+ bc0 = a[0] ^ d0
+ t = a[6] ^ d1
+ bc1 = bits.RotateLeft64(t, 44)
+ t = a[12] ^ d2
+ bc2 = bits.RotateLeft64(t, 43)
+ t = a[18] ^ d3
+ bc3 = bits.RotateLeft64(t, 21)
+ t = a[24] ^ d4
+ bc4 = bits.RotateLeft64(t, 14)
+ a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i]
+ a[6] = bc1 ^ (bc3 &^ bc2)
+ a[12] = bc2 ^ (bc4 &^ bc3)
+ a[18] = bc3 ^ (bc0 &^ bc4)
+ a[24] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[10] ^ d0
+ bc2 = bits.RotateLeft64(t, 3)
+ t = a[16] ^ d1
+ bc3 = bits.RotateLeft64(t, 45)
+ t = a[22] ^ d2
+ bc4 = bits.RotateLeft64(t, 61)
+ t = a[3] ^ d3
+ bc0 = bits.RotateLeft64(t, 28)
+ t = a[9] ^ d4
+ bc1 = bits.RotateLeft64(t, 20)
+ a[10] = bc0 ^ (bc2 &^ bc1)
+ a[16] = bc1 ^ (bc3 &^ bc2)
+ a[22] = bc2 ^ (bc4 &^ bc3)
+ a[3] = bc3 ^ (bc0 &^ bc4)
+ a[9] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[20] ^ d0
+ bc4 = bits.RotateLeft64(t, 18)
+ t = a[1] ^ d1
+ bc0 = bits.RotateLeft64(t, 1)
+ t = a[7] ^ d2
+ bc1 = bits.RotateLeft64(t, 6)
+ t = a[13] ^ d3
+ bc2 = bits.RotateLeft64(t, 25)
+ t = a[19] ^ d4
+ bc3 = bits.RotateLeft64(t, 8)
+ a[20] = bc0 ^ (bc2 &^ bc1)
+ a[1] = bc1 ^ (bc3 &^ bc2)
+ a[7] = bc2 ^ (bc4 &^ bc3)
+ a[13] = bc3 ^ (bc0 &^ bc4)
+ a[19] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[5] ^ d0
+ bc1 = bits.RotateLeft64(t, 36)
+ t = a[11] ^ d1
+ bc2 = bits.RotateLeft64(t, 10)
+ t = a[17] ^ d2
+ bc3 = bits.RotateLeft64(t, 15)
+ t = a[23] ^ d3
+ bc4 = bits.RotateLeft64(t, 56)
+ t = a[4] ^ d4
+ bc0 = bits.RotateLeft64(t, 27)
+ a[5] = bc0 ^ (bc2 &^ bc1)
+ a[11] = bc1 ^ (bc3 &^ bc2)
+ a[17] = bc2 ^ (bc4 &^ bc3)
+ a[23] = bc3 ^ (bc0 &^ bc4)
+ a[4] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[15] ^ d0
+ bc3 = bits.RotateLeft64(t, 41)
+ t = a[21] ^ d1
+ bc4 = bits.RotateLeft64(t, 2)
+ t = a[2] ^ d2
+ bc0 = bits.RotateLeft64(t, 62)
+ t = a[8] ^ d3
+ bc1 = bits.RotateLeft64(t, 55)
+ t = a[14] ^ d4
+ bc2 = bits.RotateLeft64(t, 39)
+ a[15] = bc0 ^ (bc2 &^ bc1)
+ a[21] = bc1 ^ (bc3 &^ bc2)
+ a[2] = bc2 ^ (bc4 &^ bc3)
+ a[8] = bc3 ^ (bc0 &^ bc4)
+ a[14] = bc4 ^ (bc1 &^ bc0)
+
+ // Round 2
+ bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
+ bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
+ bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
+ bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
+ bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
+ d0 = bc4 ^ (bc1<<1 | bc1>>63)
+ d1 = bc0 ^ (bc2<<1 | bc2>>63)
+ d2 = bc1 ^ (bc3<<1 | bc3>>63)
+ d3 = bc2 ^ (bc4<<1 | bc4>>63)
+ d4 = bc3 ^ (bc0<<1 | bc0>>63)
+
+ bc0 = a[0] ^ d0
+ t = a[16] ^ d1
+ bc1 = bits.RotateLeft64(t, 44)
+ t = a[7] ^ d2
+ bc2 = bits.RotateLeft64(t, 43)
+ t = a[23] ^ d3
+ bc3 = bits.RotateLeft64(t, 21)
+ t = a[14] ^ d4
+ bc4 = bits.RotateLeft64(t, 14)
+ a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i+1]
+ a[16] = bc1 ^ (bc3 &^ bc2)
+ a[7] = bc2 ^ (bc4 &^ bc3)
+ a[23] = bc3 ^ (bc0 &^ bc4)
+ a[14] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[20] ^ d0
+ bc2 = bits.RotateLeft64(t, 3)
+ t = a[11] ^ d1
+ bc3 = bits.RotateLeft64(t, 45)
+ t = a[2] ^ d2
+ bc4 = bits.RotateLeft64(t, 61)
+ t = a[18] ^ d3
+ bc0 = bits.RotateLeft64(t, 28)
+ t = a[9] ^ d4
+ bc1 = bits.RotateLeft64(t, 20)
+ a[20] = bc0 ^ (bc2 &^ bc1)
+ a[11] = bc1 ^ (bc3 &^ bc2)
+ a[2] = bc2 ^ (bc4 &^ bc3)
+ a[18] = bc3 ^ (bc0 &^ bc4)
+ a[9] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[15] ^ d0
+ bc4 = bits.RotateLeft64(t, 18)
+ t = a[6] ^ d1
+ bc0 = bits.RotateLeft64(t, 1)
+ t = a[22] ^ d2
+ bc1 = bits.RotateLeft64(t, 6)
+ t = a[13] ^ d3
+ bc2 = bits.RotateLeft64(t, 25)
+ t = a[4] ^ d4
+ bc3 = bits.RotateLeft64(t, 8)
+ a[15] = bc0 ^ (bc2 &^ bc1)
+ a[6] = bc1 ^ (bc3 &^ bc2)
+ a[22] = bc2 ^ (bc4 &^ bc3)
+ a[13] = bc3 ^ (bc0 &^ bc4)
+ a[4] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[10] ^ d0
+ bc1 = bits.RotateLeft64(t, 36)
+ t = a[1] ^ d1
+ bc2 = bits.RotateLeft64(t, 10)
+ t = a[17] ^ d2
+ bc3 = bits.RotateLeft64(t, 15)
+ t = a[8] ^ d3
+ bc4 = bits.RotateLeft64(t, 56)
+ t = a[24] ^ d4
+ bc0 = bits.RotateLeft64(t, 27)
+ a[10] = bc0 ^ (bc2 &^ bc1)
+ a[1] = bc1 ^ (bc3 &^ bc2)
+ a[17] = bc2 ^ (bc4 &^ bc3)
+ a[8] = bc3 ^ (bc0 &^ bc4)
+ a[24] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[5] ^ d0
+ bc3 = bits.RotateLeft64(t, 41)
+ t = a[21] ^ d1
+ bc4 = bits.RotateLeft64(t, 2)
+ t = a[12] ^ d2
+ bc0 = bits.RotateLeft64(t, 62)
+ t = a[3] ^ d3
+ bc1 = bits.RotateLeft64(t, 55)
+ t = a[19] ^ d4
+ bc2 = bits.RotateLeft64(t, 39)
+ a[5] = bc0 ^ (bc2 &^ bc1)
+ a[21] = bc1 ^ (bc3 &^ bc2)
+ a[12] = bc2 ^ (bc4 &^ bc3)
+ a[3] = bc3 ^ (bc0 &^ bc4)
+ a[19] = bc4 ^ (bc1 &^ bc0)
+
+ // Round 3
+ bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
+ bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
+ bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
+ bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
+ bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
+ d0 = bc4 ^ (bc1<<1 | bc1>>63)
+ d1 = bc0 ^ (bc2<<1 | bc2>>63)
+ d2 = bc1 ^ (bc3<<1 | bc3>>63)
+ d3 = bc2 ^ (bc4<<1 | bc4>>63)
+ d4 = bc3 ^ (bc0<<1 | bc0>>63)
+
+ bc0 = a[0] ^ d0
+ t = a[11] ^ d1
+ bc1 = bits.RotateLeft64(t, 44)
+ t = a[22] ^ d2
+ bc2 = bits.RotateLeft64(t, 43)
+ t = a[8] ^ d3
+ bc3 = bits.RotateLeft64(t, 21)
+ t = a[19] ^ d4
+ bc4 = bits.RotateLeft64(t, 14)
+ a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i+2]
+ a[11] = bc1 ^ (bc3 &^ bc2)
+ a[22] = bc2 ^ (bc4 &^ bc3)
+ a[8] = bc3 ^ (bc0 &^ bc4)
+ a[19] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[15] ^ d0
+ bc2 = bits.RotateLeft64(t, 3)
+ t = a[1] ^ d1
+ bc3 = bits.RotateLeft64(t, 45)
+ t = a[12] ^ d2
+ bc4 = bits.RotateLeft64(t, 61)
+ t = a[23] ^ d3
+ bc0 = bits.RotateLeft64(t, 28)
+ t = a[9] ^ d4
+ bc1 = bits.RotateLeft64(t, 20)
+ a[15] = bc0 ^ (bc2 &^ bc1)
+ a[1] = bc1 ^ (bc3 &^ bc2)
+ a[12] = bc2 ^ (bc4 &^ bc3)
+ a[23] = bc3 ^ (bc0 &^ bc4)
+ a[9] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[5] ^ d0
+ bc4 = bits.RotateLeft64(t, 18)
+ t = a[16] ^ d1
+ bc0 = bits.RotateLeft64(t, 1)
+ t = a[2] ^ d2
+ bc1 = bits.RotateLeft64(t, 6)
+ t = a[13] ^ d3
+ bc2 = bits.RotateLeft64(t, 25)
+ t = a[24] ^ d4
+ bc3 = bits.RotateLeft64(t, 8)
+ a[5] = bc0 ^ (bc2 &^ bc1)
+ a[16] = bc1 ^ (bc3 &^ bc2)
+ a[2] = bc2 ^ (bc4 &^ bc3)
+ a[13] = bc3 ^ (bc0 &^ bc4)
+ a[24] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[20] ^ d0
+ bc1 = bits.RotateLeft64(t, 36)
+ t = a[6] ^ d1
+ bc2 = bits.RotateLeft64(t, 10)
+ t = a[17] ^ d2
+ bc3 = bits.RotateLeft64(t, 15)
+ t = a[3] ^ d3
+ bc4 = bits.RotateLeft64(t, 56)
+ t = a[14] ^ d4
+ bc0 = bits.RotateLeft64(t, 27)
+ a[20] = bc0 ^ (bc2 &^ bc1)
+ a[6] = bc1 ^ (bc3 &^ bc2)
+ a[17] = bc2 ^ (bc4 &^ bc3)
+ a[3] = bc3 ^ (bc0 &^ bc4)
+ a[14] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[10] ^ d0
+ bc3 = bits.RotateLeft64(t, 41)
+ t = a[21] ^ d1
+ bc4 = bits.RotateLeft64(t, 2)
+ t = a[7] ^ d2
+ bc0 = bits.RotateLeft64(t, 62)
+ t = a[18] ^ d3
+ bc1 = bits.RotateLeft64(t, 55)
+ t = a[4] ^ d4
+ bc2 = bits.RotateLeft64(t, 39)
+ a[10] = bc0 ^ (bc2 &^ bc1)
+ a[21] = bc1 ^ (bc3 &^ bc2)
+ a[7] = bc2 ^ (bc4 &^ bc3)
+ a[18] = bc3 ^ (bc0 &^ bc4)
+ a[4] = bc4 ^ (bc1 &^ bc0)
+
+ // Round 4
+ bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
+ bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
+ bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
+ bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
+ bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
+ d0 = bc4 ^ (bc1<<1 | bc1>>63)
+ d1 = bc0 ^ (bc2<<1 | bc2>>63)
+ d2 = bc1 ^ (bc3<<1 | bc3>>63)
+ d3 = bc2 ^ (bc4<<1 | bc4>>63)
+ d4 = bc3 ^ (bc0<<1 | bc0>>63)
+
+ bc0 = a[0] ^ d0
+ t = a[1] ^ d1
+ bc1 = bits.RotateLeft64(t, 44)
+ t = a[2] ^ d2
+ bc2 = bits.RotateLeft64(t, 43)
+ t = a[3] ^ d3
+ bc3 = bits.RotateLeft64(t, 21)
+ t = a[4] ^ d4
+ bc4 = bits.RotateLeft64(t, 14)
+ a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i+3]
+ a[1] = bc1 ^ (bc3 &^ bc2)
+ a[2] = bc2 ^ (bc4 &^ bc3)
+ a[3] = bc3 ^ (bc0 &^ bc4)
+ a[4] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[5] ^ d0
+ bc2 = bits.RotateLeft64(t, 3)
+ t = a[6] ^ d1
+ bc3 = bits.RotateLeft64(t, 45)
+ t = a[7] ^ d2
+ bc4 = bits.RotateLeft64(t, 61)
+ t = a[8] ^ d3
+ bc0 = bits.RotateLeft64(t, 28)
+ t = a[9] ^ d4
+ bc1 = bits.RotateLeft64(t, 20)
+ a[5] = bc0 ^ (bc2 &^ bc1)
+ a[6] = bc1 ^ (bc3 &^ bc2)
+ a[7] = bc2 ^ (bc4 &^ bc3)
+ a[8] = bc3 ^ (bc0 &^ bc4)
+ a[9] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[10] ^ d0
+ bc4 = bits.RotateLeft64(t, 18)
+ t = a[11] ^ d1
+ bc0 = bits.RotateLeft64(t, 1)
+ t = a[12] ^ d2
+ bc1 = bits.RotateLeft64(t, 6)
+ t = a[13] ^ d3
+ bc2 = bits.RotateLeft64(t, 25)
+ t = a[14] ^ d4
+ bc3 = bits.RotateLeft64(t, 8)
+ a[10] = bc0 ^ (bc2 &^ bc1)
+ a[11] = bc1 ^ (bc3 &^ bc2)
+ a[12] = bc2 ^ (bc4 &^ bc3)
+ a[13] = bc3 ^ (bc0 &^ bc4)
+ a[14] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[15] ^ d0
+ bc1 = bits.RotateLeft64(t, 36)
+ t = a[16] ^ d1
+ bc2 = bits.RotateLeft64(t, 10)
+ t = a[17] ^ d2
+ bc3 = bits.RotateLeft64(t, 15)
+ t = a[18] ^ d3
+ bc4 = bits.RotateLeft64(t, 56)
+ t = a[19] ^ d4
+ bc0 = bits.RotateLeft64(t, 27)
+ a[15] = bc0 ^ (bc2 &^ bc1)
+ a[16] = bc1 ^ (bc3 &^ bc2)
+ a[17] = bc2 ^ (bc4 &^ bc3)
+ a[18] = bc3 ^ (bc0 &^ bc4)
+ a[19] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[20] ^ d0
+ bc3 = bits.RotateLeft64(t, 41)
+ t = a[21] ^ d1
+ bc4 = bits.RotateLeft64(t, 2)
+ t = a[22] ^ d2
+ bc0 = bits.RotateLeft64(t, 62)
+ t = a[23] ^ d3
+ bc1 = bits.RotateLeft64(t, 55)
+ t = a[24] ^ d4
+ bc2 = bits.RotateLeft64(t, 39)
+ a[20] = bc0 ^ (bc2 &^ bc1)
+ a[21] = bc1 ^ (bc3 &^ bc2)
+ a[22] = bc2 ^ (bc4 &^ bc3)
+ a[23] = bc3 ^ (bc0 &^ bc4)
+ a[24] = bc4 ^ (bc1 &^ bc0)
+ }
+}
diff --git a/hack/tools/vendor/golang.org/x/crypto/sha3/sha3.go b/hack/tools/vendor/golang.org/x/crypto/sha3/sha3.go
deleted file mode 100644
index 6658c44479b6..000000000000
--- a/hack/tools/vendor/golang.org/x/crypto/sha3/sha3.go
+++ /dev/null
@@ -1,244 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package sha3
-
-import (
- "crypto/subtle"
- "encoding/binary"
- "errors"
- "unsafe"
-
- "golang.org/x/sys/cpu"
-)
-
-// spongeDirection indicates the direction bytes are flowing through the sponge.
-type spongeDirection int
-
-const (
- // spongeAbsorbing indicates that the sponge is absorbing input.
- spongeAbsorbing spongeDirection = iota
- // spongeSqueezing indicates that the sponge is being squeezed.
- spongeSqueezing
-)
-
-type state struct {
- a [1600 / 8]byte // main state of the hash
-
- // a[n:rate] is the buffer. If absorbing, it's the remaining space to XOR
- // into before running the permutation. If squeezing, it's the remaining
- // output to produce before running the permutation.
- n, rate int
-
- // dsbyte contains the "domain separation" bits and the first bit of
- // the padding. Sections 6.1 and 6.2 of [1] separate the outputs of the
- // SHA-3 and SHAKE functions by appending bitstrings to the message.
- // Using a little-endian bit-ordering convention, these are "01" for SHA-3
- // and "1111" for SHAKE, or 00000010b and 00001111b, respectively. Then the
- // padding rule from section 5.1 is applied to pad the message to a multiple
- // of the rate, which involves adding a "1" bit, zero or more "0" bits, and
- // a final "1" bit. We merge the first "1" bit from the padding into dsbyte,
- // giving 00000110b (0x06) and 00011111b (0x1f).
- // [1] http://csrc.nist.gov/publications/drafts/fips-202/fips_202_draft.pdf
- // "Draft FIPS 202: SHA-3 Standard: Permutation-Based Hash and
- // Extendable-Output Functions (May 2014)"
- dsbyte byte
-
- outputLen int // the default output size in bytes
- state spongeDirection // whether the sponge is absorbing or squeezing
-}
-
-// BlockSize returns the rate of sponge underlying this hash function.
-func (d *state) BlockSize() int { return d.rate }
-
-// Size returns the output size of the hash function in bytes.
-func (d *state) Size() int { return d.outputLen }
-
-// Reset clears the internal state by zeroing the sponge state and
-// the buffer indexes, and setting Sponge.state to absorbing.
-func (d *state) Reset() {
- // Zero the permutation's state.
- for i := range d.a {
- d.a[i] = 0
- }
- d.state = spongeAbsorbing
- d.n = 0
-}
-
-func (d *state) clone() *state {
- ret := *d
- return &ret
-}
-
-// permute applies the KeccakF-1600 permutation.
-func (d *state) permute() {
- var a *[25]uint64
- if cpu.IsBigEndian {
- a = new([25]uint64)
- for i := range a {
- a[i] = binary.LittleEndian.Uint64(d.a[i*8:])
- }
- } else {
- a = (*[25]uint64)(unsafe.Pointer(&d.a))
- }
-
- keccakF1600(a)
- d.n = 0
-
- if cpu.IsBigEndian {
- for i := range a {
- binary.LittleEndian.PutUint64(d.a[i*8:], a[i])
- }
- }
-}
-
-// pads appends the domain separation bits in dsbyte, applies
-// the multi-bitrate 10..1 padding rule, and permutes the state.
-func (d *state) padAndPermute() {
- // Pad with this instance's domain-separator bits. We know that there's
- // at least one byte of space in the sponge because, if it were full,
- // permute would have been called to empty it. dsbyte also contains the
- // first one bit for the padding. See the comment in the state struct.
- d.a[d.n] ^= d.dsbyte
- // This adds the final one bit for the padding. Because of the way that
- // bits are numbered from the LSB upwards, the final bit is the MSB of
- // the last byte.
- d.a[d.rate-1] ^= 0x80
- // Apply the permutation
- d.permute()
- d.state = spongeSqueezing
-}
-
-// Write absorbs more data into the hash's state. It panics if any
-// output has already been read.
-func (d *state) Write(p []byte) (n int, err error) {
- if d.state != spongeAbsorbing {
- panic("sha3: Write after Read")
- }
-
- n = len(p)
-
- for len(p) > 0 {
- x := subtle.XORBytes(d.a[d.n:d.rate], d.a[d.n:d.rate], p)
- d.n += x
- p = p[x:]
-
- // If the sponge is full, apply the permutation.
- if d.n == d.rate {
- d.permute()
- }
- }
-
- return
-}
-
-// Read squeezes an arbitrary number of bytes from the sponge.
-func (d *state) Read(out []byte) (n int, err error) {
- // If we're still absorbing, pad and apply the permutation.
- if d.state == spongeAbsorbing {
- d.padAndPermute()
- }
-
- n = len(out)
-
- // Now, do the squeezing.
- for len(out) > 0 {
- // Apply the permutation if we've squeezed the sponge dry.
- if d.n == d.rate {
- d.permute()
- }
-
- x := copy(out, d.a[d.n:d.rate])
- d.n += x
- out = out[x:]
- }
-
- return
-}
-
-// Sum applies padding to the hash state and then squeezes out the desired
-// number of output bytes. It panics if any output has already been read.
-func (d *state) Sum(in []byte) []byte {
- if d.state != spongeAbsorbing {
- panic("sha3: Sum after Read")
- }
-
- // Make a copy of the original hash so that caller can keep writing
- // and summing.
- dup := d.clone()
- hash := make([]byte, dup.outputLen, 64) // explicit cap to allow stack allocation
- dup.Read(hash)
- return append(in, hash...)
-}
-
-const (
- magicSHA3 = "sha\x08"
- magicShake = "sha\x09"
- magicCShake = "sha\x0a"
- magicKeccak = "sha\x0b"
- // magic || rate || main state || n || sponge direction
- marshaledSize = len(magicSHA3) + 1 + 200 + 1 + 1
-)
-
-func (d *state) MarshalBinary() ([]byte, error) {
- return d.AppendBinary(make([]byte, 0, marshaledSize))
-}
-
-func (d *state) AppendBinary(b []byte) ([]byte, error) {
- switch d.dsbyte {
- case dsbyteSHA3:
- b = append(b, magicSHA3...)
- case dsbyteShake:
- b = append(b, magicShake...)
- case dsbyteCShake:
- b = append(b, magicCShake...)
- case dsbyteKeccak:
- b = append(b, magicKeccak...)
- default:
- panic("unknown dsbyte")
- }
- // rate is at most 168, and n is at most rate.
- b = append(b, byte(d.rate))
- b = append(b, d.a[:]...)
- b = append(b, byte(d.n), byte(d.state))
- return b, nil
-}
-
-func (d *state) UnmarshalBinary(b []byte) error {
- if len(b) != marshaledSize {
- return errors.New("sha3: invalid hash state")
- }
-
- magic := string(b[:len(magicSHA3)])
- b = b[len(magicSHA3):]
- switch {
- case magic == magicSHA3 && d.dsbyte == dsbyteSHA3:
- case magic == magicShake && d.dsbyte == dsbyteShake:
- case magic == magicCShake && d.dsbyte == dsbyteCShake:
- case magic == magicKeccak && d.dsbyte == dsbyteKeccak:
- default:
- return errors.New("sha3: invalid hash state identifier")
- }
-
- rate := int(b[0])
- b = b[1:]
- if rate != d.rate {
- return errors.New("sha3: invalid hash state function")
- }
-
- copy(d.a[:], b)
- b = b[len(d.a):]
-
- n, state := int(b[0]), spongeDirection(b[1])
- if n > d.rate {
- return errors.New("sha3: invalid hash state")
- }
- d.n = n
- if state != spongeAbsorbing && state != spongeSqueezing {
- return errors.New("sha3: invalid hash state")
- }
- d.state = state
-
- return nil
-}
diff --git a/hack/tools/vendor/golang.org/x/crypto/sha3/sha3_s390x.go b/hack/tools/vendor/golang.org/x/crypto/sha3/sha3_s390x.go
deleted file mode 100644
index 00d8034ae627..000000000000
--- a/hack/tools/vendor/golang.org/x/crypto/sha3/sha3_s390x.go
+++ /dev/null
@@ -1,303 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build gc && !purego
-
-package sha3
-
-// This file contains code for using the 'compute intermediate
-// message digest' (KIMD) and 'compute last message digest' (KLMD)
-// instructions to compute SHA-3 and SHAKE hashes on IBM Z.
-
-import (
- "hash"
-
- "golang.org/x/sys/cpu"
-)
-
-// codes represent 7-bit KIMD/KLMD function codes as defined in
-// the Principles of Operation.
-type code uint64
-
-const (
- // function codes for KIMD/KLMD
- sha3_224 code = 32
- sha3_256 = 33
- sha3_384 = 34
- sha3_512 = 35
- shake_128 = 36
- shake_256 = 37
- nopad = 0x100
-)
-
-// kimd is a wrapper for the 'compute intermediate message digest' instruction.
-// src must be a multiple of the rate for the given function code.
-//
-//go:noescape
-func kimd(function code, chain *[200]byte, src []byte)
-
-// klmd is a wrapper for the 'compute last message digest' instruction.
-// src padding is handled by the instruction.
-//
-//go:noescape
-func klmd(function code, chain *[200]byte, dst, src []byte)
-
-type asmState struct {
- a [200]byte // 1600 bit state
- buf []byte // care must be taken to ensure cap(buf) is a multiple of rate
- rate int // equivalent to block size
- storage [3072]byte // underlying storage for buf
- outputLen int // output length for full security
- function code // KIMD/KLMD function code
- state spongeDirection // whether the sponge is absorbing or squeezing
-}
-
-func newAsmState(function code) *asmState {
- var s asmState
- s.function = function
- switch function {
- case sha3_224:
- s.rate = 144
- s.outputLen = 28
- case sha3_256:
- s.rate = 136
- s.outputLen = 32
- case sha3_384:
- s.rate = 104
- s.outputLen = 48
- case sha3_512:
- s.rate = 72
- s.outputLen = 64
- case shake_128:
- s.rate = 168
- s.outputLen = 32
- case shake_256:
- s.rate = 136
- s.outputLen = 64
- default:
- panic("sha3: unrecognized function code")
- }
-
- // limit s.buf size to a multiple of s.rate
- s.resetBuf()
- return &s
-}
-
-func (s *asmState) clone() *asmState {
- c := *s
- c.buf = c.storage[:len(s.buf):cap(s.buf)]
- return &c
-}
-
-// copyIntoBuf copies b into buf. It will panic if there is not enough space to
-// store all of b.
-func (s *asmState) copyIntoBuf(b []byte) {
- bufLen := len(s.buf)
- s.buf = s.buf[:len(s.buf)+len(b)]
- copy(s.buf[bufLen:], b)
-}
-
-// resetBuf points buf at storage, sets the length to 0 and sets cap to be a
-// multiple of the rate.
-func (s *asmState) resetBuf() {
- max := (cap(s.storage) / s.rate) * s.rate
- s.buf = s.storage[:0:max]
-}
-
-// Write (via the embedded io.Writer interface) adds more data to the running hash.
-// It never returns an error.
-func (s *asmState) Write(b []byte) (int, error) {
- if s.state != spongeAbsorbing {
- panic("sha3: Write after Read")
- }
- length := len(b)
- for len(b) > 0 {
- if len(s.buf) == 0 && len(b) >= cap(s.buf) {
- // Hash the data directly and push any remaining bytes
- // into the buffer.
- remainder := len(b) % s.rate
- kimd(s.function, &s.a, b[:len(b)-remainder])
- if remainder != 0 {
- s.copyIntoBuf(b[len(b)-remainder:])
- }
- return length, nil
- }
-
- if len(s.buf) == cap(s.buf) {
- // flush the buffer
- kimd(s.function, &s.a, s.buf)
- s.buf = s.buf[:0]
- }
-
- // copy as much as we can into the buffer
- n := len(b)
- if len(b) > cap(s.buf)-len(s.buf) {
- n = cap(s.buf) - len(s.buf)
- }
- s.copyIntoBuf(b[:n])
- b = b[n:]
- }
- return length, nil
-}
-
-// Read squeezes an arbitrary number of bytes from the sponge.
-func (s *asmState) Read(out []byte) (n int, err error) {
- // The 'compute last message digest' instruction only stores the digest
- // at the first operand (dst) for SHAKE functions.
- if s.function != shake_128 && s.function != shake_256 {
- panic("sha3: can only call Read for SHAKE functions")
- }
-
- n = len(out)
-
- // need to pad if we were absorbing
- if s.state == spongeAbsorbing {
- s.state = spongeSqueezing
-
- // write hash directly into out if possible
- if len(out)%s.rate == 0 {
- klmd(s.function, &s.a, out, s.buf) // len(out) may be 0
- s.buf = s.buf[:0]
- return
- }
-
- // write hash into buffer
- max := cap(s.buf)
- if max > len(out) {
- max = (len(out)/s.rate)*s.rate + s.rate
- }
- klmd(s.function, &s.a, s.buf[:max], s.buf)
- s.buf = s.buf[:max]
- }
-
- for len(out) > 0 {
- // flush the buffer
- if len(s.buf) != 0 {
- c := copy(out, s.buf)
- out = out[c:]
- s.buf = s.buf[c:]
- continue
- }
-
- // write hash directly into out if possible
- if len(out)%s.rate == 0 {
- klmd(s.function|nopad, &s.a, out, nil)
- return
- }
-
- // write hash into buffer
- s.resetBuf()
- if cap(s.buf) > len(out) {
- s.buf = s.buf[:(len(out)/s.rate)*s.rate+s.rate]
- }
- klmd(s.function|nopad, &s.a, s.buf, nil)
- }
- return
-}
-
-// Sum appends the current hash to b and returns the resulting slice.
-// It does not change the underlying hash state.
-func (s *asmState) Sum(b []byte) []byte {
- if s.state != spongeAbsorbing {
- panic("sha3: Sum after Read")
- }
-
- // Copy the state to preserve the original.
- a := s.a
-
- // Hash the buffer. Note that we don't clear it because we
- // aren't updating the state.
- switch s.function {
- case sha3_224, sha3_256, sha3_384, sha3_512:
- klmd(s.function, &a, nil, s.buf)
- return append(b, a[:s.outputLen]...)
- case shake_128, shake_256:
- d := make([]byte, s.outputLen, 64)
- klmd(s.function, &a, d, s.buf)
- return append(b, d[:s.outputLen]...)
- default:
- panic("sha3: unknown function")
- }
-}
-
-// Reset resets the Hash to its initial state.
-func (s *asmState) Reset() {
- for i := range s.a {
- s.a[i] = 0
- }
- s.resetBuf()
- s.state = spongeAbsorbing
-}
-
-// Size returns the number of bytes Sum will return.
-func (s *asmState) Size() int {
- return s.outputLen
-}
-
-// BlockSize returns the hash's underlying block size.
-// The Write method must be able to accept any amount
-// of data, but it may operate more efficiently if all writes
-// are a multiple of the block size.
-func (s *asmState) BlockSize() int {
- return s.rate
-}
-
-// Clone returns a copy of the ShakeHash in its current state.
-func (s *asmState) Clone() ShakeHash {
- return s.clone()
-}
-
-// new224 returns an assembly implementation of SHA3-224 if available,
-// otherwise it returns a generic implementation.
-func new224() hash.Hash {
- if cpu.S390X.HasSHA3 {
- return newAsmState(sha3_224)
- }
- return new224Generic()
-}
-
-// new256 returns an assembly implementation of SHA3-256 if available,
-// otherwise it returns a generic implementation.
-func new256() hash.Hash {
- if cpu.S390X.HasSHA3 {
- return newAsmState(sha3_256)
- }
- return new256Generic()
-}
-
-// new384 returns an assembly implementation of SHA3-384 if available,
-// otherwise it returns a generic implementation.
-func new384() hash.Hash {
- if cpu.S390X.HasSHA3 {
- return newAsmState(sha3_384)
- }
- return new384Generic()
-}
-
-// new512 returns an assembly implementation of SHA3-512 if available,
-// otherwise it returns a generic implementation.
-func new512() hash.Hash {
- if cpu.S390X.HasSHA3 {
- return newAsmState(sha3_512)
- }
- return new512Generic()
-}
-
-// newShake128 returns an assembly implementation of SHAKE-128 if available,
-// otherwise it returns a generic implementation.
-func newShake128() ShakeHash {
- if cpu.S390X.HasSHA3 {
- return newAsmState(shake_128)
- }
- return newShake128Generic()
-}
-
-// newShake256 returns an assembly implementation of SHAKE-256 if available,
-// otherwise it returns a generic implementation.
-func newShake256() ShakeHash {
- if cpu.S390X.HasSHA3 {
- return newAsmState(shake_256)
- }
- return newShake256Generic()
-}
diff --git a/hack/tools/vendor/golang.org/x/crypto/sha3/sha3_s390x.s b/hack/tools/vendor/golang.org/x/crypto/sha3/sha3_s390x.s
deleted file mode 100644
index 826b862c7796..000000000000
--- a/hack/tools/vendor/golang.org/x/crypto/sha3/sha3_s390x.s
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build gc && !purego
-
-#include "textflag.h"
-
-// func kimd(function code, chain *[200]byte, src []byte)
-TEXT ·kimd(SB), NOFRAME|NOSPLIT, $0-40
- MOVD function+0(FP), R0
- MOVD chain+8(FP), R1
- LMG src+16(FP), R2, R3 // R2=base, R3=len
-
-continue:
- WORD $0xB93E0002 // KIMD --, R2
- BVS continue // continue if interrupted
- MOVD $0, R0 // reset R0 for pre-go1.8 compilers
- RET
-
-// func klmd(function code, chain *[200]byte, dst, src []byte)
-TEXT ·klmd(SB), NOFRAME|NOSPLIT, $0-64
- // TODO: SHAKE support
- MOVD function+0(FP), R0
- MOVD chain+8(FP), R1
- LMG dst+16(FP), R2, R3 // R2=base, R3=len
- LMG src+40(FP), R4, R5 // R4=base, R5=len
-
-continue:
- WORD $0xB93F0024 // KLMD R2, R4
- BVS continue // continue if interrupted
- MOVD $0, R0 // reset R0 for pre-go1.8 compilers
- RET
diff --git a/hack/tools/vendor/golang.org/x/crypto/sha3/shake.go b/hack/tools/vendor/golang.org/x/crypto/sha3/shake.go
index a6b3a4281f5b..6f3f70c2656c 100644
--- a/hack/tools/vendor/golang.org/x/crypto/sha3/shake.go
+++ b/hack/tools/vendor/golang.org/x/crypto/sha3/shake.go
@@ -4,24 +4,10 @@
package sha3
-// This file defines the ShakeHash interface, and provides
-// functions for creating SHAKE and cSHAKE instances, as well as utility
-// functions for hashing bytes to arbitrary-length output.
-//
-//
-// SHAKE implementation is based on FIPS PUB 202 [1]
-// cSHAKE implementations is based on NIST SP 800-185 [2]
-//
-// [1] https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf
-// [2] https://doi.org/10.6028/NIST.SP.800-185
-
import (
- "bytes"
- "encoding/binary"
- "errors"
+ "crypto/sha3"
"hash"
"io"
- "math/bits"
)
// ShakeHash defines the interface to hash functions that support
@@ -32,7 +18,7 @@ type ShakeHash interface {
hash.Hash
// Read reads more output from the hash; reading affects the hash's
- // state. (ShakeHash.Read is thus very different from Hash.Sum)
+ // state. (ShakeHash.Read is thus very different from Hash.Sum.)
// It never returns an error, but subsequent calls to Write or Sum
// will panic.
io.Reader
@@ -41,115 +27,18 @@ type ShakeHash interface {
Clone() ShakeHash
}
-// cSHAKE specific context
-type cshakeState struct {
- *state // SHA-3 state context and Read/Write operations
-
- // initBlock is the cSHAKE specific initialization set of bytes. It is initialized
- // by newCShake function and stores concatenation of N followed by S, encoded
- // by the method specified in 3.3 of [1].
- // It is stored here in order for Reset() to be able to put context into
- // initial state.
- initBlock []byte
-}
-
-func bytepad(data []byte, rate int) []byte {
- out := make([]byte, 0, 9+len(data)+rate-1)
- out = append(out, leftEncode(uint64(rate))...)
- out = append(out, data...)
- if padlen := rate - len(out)%rate; padlen < rate {
- out = append(out, make([]byte, padlen)...)
- }
- return out
-}
-
-func leftEncode(x uint64) []byte {
- // Let n be the smallest positive integer for which 2^(8n) > x.
- n := (bits.Len64(x) + 7) / 8
- if n == 0 {
- n = 1
- }
- // Return n || x with n as a byte and x an n bytes in big-endian order.
- b := make([]byte, 9)
- binary.BigEndian.PutUint64(b[1:], x)
- b = b[9-n-1:]
- b[0] = byte(n)
- return b
-}
-
-func newCShake(N, S []byte, rate, outputLen int, dsbyte byte) ShakeHash {
- c := cshakeState{state: &state{rate: rate, outputLen: outputLen, dsbyte: dsbyte}}
- c.initBlock = make([]byte, 0, 9+len(N)+9+len(S)) // leftEncode returns max 9 bytes
- c.initBlock = append(c.initBlock, leftEncode(uint64(len(N))*8)...)
- c.initBlock = append(c.initBlock, N...)
- c.initBlock = append(c.initBlock, leftEncode(uint64(len(S))*8)...)
- c.initBlock = append(c.initBlock, S...)
- c.Write(bytepad(c.initBlock, c.rate))
- return &c
-}
-
-// Reset resets the hash to initial state.
-func (c *cshakeState) Reset() {
- c.state.Reset()
- c.Write(bytepad(c.initBlock, c.rate))
-}
-
-// Clone returns copy of a cSHAKE context within its current state.
-func (c *cshakeState) Clone() ShakeHash {
- b := make([]byte, len(c.initBlock))
- copy(b, c.initBlock)
- return &cshakeState{state: c.clone(), initBlock: b}
-}
-
-// Clone returns copy of SHAKE context within its current state.
-func (c *state) Clone() ShakeHash {
- return c.clone()
-}
-
-func (c *cshakeState) MarshalBinary() ([]byte, error) {
- return c.AppendBinary(make([]byte, 0, marshaledSize+len(c.initBlock)))
-}
-
-func (c *cshakeState) AppendBinary(b []byte) ([]byte, error) {
- b, err := c.state.AppendBinary(b)
- if err != nil {
- return nil, err
- }
- b = append(b, c.initBlock...)
- return b, nil
-}
-
-func (c *cshakeState) UnmarshalBinary(b []byte) error {
- if len(b) <= marshaledSize {
- return errors.New("sha3: invalid hash state")
- }
- if err := c.state.UnmarshalBinary(b[:marshaledSize]); err != nil {
- return err
- }
- c.initBlock = bytes.Clone(b[marshaledSize:])
- return nil
-}
-
// NewShake128 creates a new SHAKE128 variable-output-length ShakeHash.
// Its generic security strength is 128 bits against all attacks if at
// least 32 bytes of its output are used.
func NewShake128() ShakeHash {
- return newShake128()
+ return &shakeWrapper{sha3.NewSHAKE128(), 32, false, sha3.NewSHAKE128}
}
// NewShake256 creates a new SHAKE256 variable-output-length ShakeHash.
// Its generic security strength is 256 bits against all attacks if
// at least 64 bytes of its output are used.
func NewShake256() ShakeHash {
- return newShake256()
-}
-
-func newShake128Generic() *state {
- return &state{rate: rateK256, outputLen: 32, dsbyte: dsbyteShake}
-}
-
-func newShake256Generic() *state {
- return &state{rate: rateK512, outputLen: 64, dsbyte: dsbyteShake}
+ return &shakeWrapper{sha3.NewSHAKE256(), 64, false, sha3.NewSHAKE256}
}
// NewCShake128 creates a new instance of cSHAKE128 variable-output-length ShakeHash,
@@ -159,10 +48,9 @@ func newShake256Generic() *state {
// computations on same input with different S yield unrelated outputs.
// When N and S are both empty, this is equivalent to NewShake128.
func NewCShake128(N, S []byte) ShakeHash {
- if len(N) == 0 && len(S) == 0 {
- return NewShake128()
- }
- return newCShake(N, S, rateK256, 32, dsbyteCShake)
+ return &shakeWrapper{sha3.NewCSHAKE128(N, S), 32, false, func() *sha3.SHAKE {
+ return sha3.NewCSHAKE128(N, S)
+ }}
}
// NewCShake256 creates a new instance of cSHAKE256 variable-output-length ShakeHash,
@@ -172,10 +60,9 @@ func NewCShake128(N, S []byte) ShakeHash {
// computations on same input with different S yield unrelated outputs.
// When N and S are both empty, this is equivalent to NewShake256.
func NewCShake256(N, S []byte) ShakeHash {
- if len(N) == 0 && len(S) == 0 {
- return NewShake256()
- }
- return newCShake(N, S, rateK512, 64, dsbyteCShake)
+ return &shakeWrapper{sha3.NewCSHAKE256(N, S), 64, false, func() *sha3.SHAKE {
+ return sha3.NewCSHAKE256(N, S)
+ }}
}
// ShakeSum128 writes an arbitrary-length digest of data into hash.
@@ -191,3 +78,42 @@ func ShakeSum256(hash, data []byte) {
h.Write(data)
h.Read(hash)
}
+
+// shakeWrapper adds the Size, Sum, and Clone methods to a sha3.SHAKE
+// to implement the ShakeHash interface.
+type shakeWrapper struct {
+ *sha3.SHAKE
+ outputLen int
+ squeezing bool
+ newSHAKE func() *sha3.SHAKE
+}
+
+func (w *shakeWrapper) Read(p []byte) (n int, err error) {
+ w.squeezing = true
+ return w.SHAKE.Read(p)
+}
+
+func (w *shakeWrapper) Clone() ShakeHash {
+ s := w.newSHAKE()
+ b, err := w.MarshalBinary()
+ if err != nil {
+ panic(err) // unreachable
+ }
+ if err := s.UnmarshalBinary(b); err != nil {
+ panic(err) // unreachable
+ }
+ return &shakeWrapper{s, w.outputLen, w.squeezing, w.newSHAKE}
+}
+
+func (w *shakeWrapper) Size() int { return w.outputLen }
+
+func (w *shakeWrapper) Sum(b []byte) []byte {
+ if w.squeezing {
+ panic("sha3: Sum after Read")
+ }
+ out := make([]byte, w.outputLen)
+ // Clone the state so that we don't affect future Write calls.
+ s := w.Clone()
+ s.Read(out)
+ return append(b, out...)
+}
diff --git a/hack/tools/vendor/golang.org/x/crypto/sha3/shake_noasm.go b/hack/tools/vendor/golang.org/x/crypto/sha3/shake_noasm.go
deleted file mode 100644
index 4276ba4ab2c4..000000000000
--- a/hack/tools/vendor/golang.org/x/crypto/sha3/shake_noasm.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2023 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build !gc || purego || !s390x
-
-package sha3
-
-func newShake128() *state {
- return newShake128Generic()
-}
-
-func newShake256() *state {
- return newShake256Generic()
-}
diff --git a/hack/tools/vendor/golang.org/x/crypto/ssh/agent/client.go b/hack/tools/vendor/golang.org/x/crypto/ssh/agent/client.go
index 37525e1a187b..b357e18b0a15 100644
--- a/hack/tools/vendor/golang.org/x/crypto/ssh/agent/client.go
+++ b/hack/tools/vendor/golang.org/x/crypto/ssh/agent/client.go
@@ -430,8 +430,9 @@ func (c *client) List() ([]*Key, error) {
return keys, nil
case *failureAgentMsg:
return nil, errors.New("agent: failed to list keys")
+ default:
+ return nil, fmt.Errorf("agent: failed to list keys, unexpected message type %T", msg)
}
- panic("unreachable")
}
// Sign has the agent sign the data using a protocol 2 key as defined
@@ -462,8 +463,9 @@ func (c *client) SignWithFlags(key ssh.PublicKey, data []byte, flags SignatureFl
return &sig, nil
case *failureAgentMsg:
return nil, errors.New("agent: failed to sign challenge")
+ default:
+ return nil, fmt.Errorf("agent: failed to sign challenge, unexpected message type %T", msg)
}
- panic("unreachable")
}
// unmarshal parses an agent message in packet, returning the parsed
diff --git a/hack/tools/vendor/golang.org/x/crypto/ssh/agent/keyring.go b/hack/tools/vendor/golang.org/x/crypto/ssh/agent/keyring.go
index c1b43610873f..d12987551007 100644
--- a/hack/tools/vendor/golang.org/x/crypto/ssh/agent/keyring.go
+++ b/hack/tools/vendor/golang.org/x/crypto/ssh/agent/keyring.go
@@ -112,7 +112,7 @@ func (r *keyring) Unlock(passphrase []byte) error {
}
// expireKeysLocked removes expired keys from the keyring. If a key was added
-// with a lifetimesecs contraint and seconds >= lifetimesecs seconds have
+// with a lifetimesecs constraint and seconds >= lifetimesecs seconds have
// elapsed, it is removed. The caller *must* be holding the keyring mutex.
func (r *keyring) expireKeysLocked() {
for _, k := range r.keys {
diff --git a/hack/tools/vendor/golang.org/x/crypto/ssh/agent/server.go b/hack/tools/vendor/golang.org/x/crypto/ssh/agent/server.go
index 88ce4da6c44e..4e8ff86b6192 100644
--- a/hack/tools/vendor/golang.org/x/crypto/ssh/agent/server.go
+++ b/hack/tools/vendor/golang.org/x/crypto/ssh/agent/server.go
@@ -203,6 +203,9 @@ func parseConstraints(constraints []byte) (lifetimeSecs uint32, confirmBeforeUse
for len(constraints) != 0 {
switch constraints[0] {
case agentConstrainLifetime:
+ if len(constraints) < 5 {
+ return 0, false, nil, io.ErrUnexpectedEOF
+ }
lifetimeSecs = binary.BigEndian.Uint32(constraints[1:5])
constraints = constraints[5:]
case agentConstrainConfirm:
diff --git a/hack/tools/vendor/golang.org/x/crypto/ssh/cipher.go b/hack/tools/vendor/golang.org/x/crypto/ssh/cipher.go
index 6a5b582aa91e..7554ed57a991 100644
--- a/hack/tools/vendor/golang.org/x/crypto/ssh/cipher.go
+++ b/hack/tools/vendor/golang.org/x/crypto/ssh/cipher.go
@@ -8,6 +8,7 @@ import (
"crypto/aes"
"crypto/cipher"
"crypto/des"
+ "crypto/fips140"
"crypto/rc4"
"crypto/subtle"
"encoding/binary"
@@ -15,6 +16,7 @@ import (
"fmt"
"hash"
"io"
+ "slices"
"golang.org/x/crypto/chacha20"
"golang.org/x/crypto/internal/poly1305"
@@ -93,41 +95,41 @@ func streamCipherMode(skip int, createFunc func(key, iv []byte) (cipher.Stream,
}
// cipherModes documents properties of supported ciphers. Ciphers not included
-// are not supported and will not be negotiated, even if explicitly requested in
-// ClientConfig.Crypto.Ciphers.
-var cipherModes = map[string]*cipherMode{
- // Ciphers from RFC 4344, which introduced many CTR-based ciphers. Algorithms
- // are defined in the order specified in the RFC.
- CipherAES128CTR: {16, aes.BlockSize, streamCipherMode(0, newAESCTR)},
- CipherAES192CTR: {24, aes.BlockSize, streamCipherMode(0, newAESCTR)},
- CipherAES256CTR: {32, aes.BlockSize, streamCipherMode(0, newAESCTR)},
-
- // Ciphers from RFC 4345, which introduces security-improved arcfour ciphers.
- // They are defined in the order specified in the RFC.
- InsecureCipherRC4128: {16, 0, streamCipherMode(1536, newRC4)},
- InsecureCipherRC4256: {32, 0, streamCipherMode(1536, newRC4)},
-
- // Cipher defined in RFC 4253, which describes SSH Transport Layer Protocol.
- // Note that this cipher is not safe, as stated in RFC 4253: "Arcfour (and
- // RC4) has problems with weak keys, and should be used with caution."
- // RFC 4345 introduces improved versions of Arcfour.
- InsecureCipherRC4: {16, 0, streamCipherMode(0, newRC4)},
-
- // AEAD ciphers
- CipherAES128GCM: {16, 12, newGCMCipher},
- CipherAES256GCM: {32, 12, newGCMCipher},
- CipherChaCha20Poly1305: {64, 0, newChaCha20Cipher},
-
+// are not supported and will not be negotiated, even if explicitly configured.
+// When FIPS mode is enabled, only FIPS-approved algorithms are included.
+var cipherModes = map[string]*cipherMode{}
+
+func init() {
+ cipherModes[CipherAES128CTR] = &cipherMode{16, aes.BlockSize, streamCipherMode(0, newAESCTR)}
+ cipherModes[CipherAES192CTR] = &cipherMode{24, aes.BlockSize, streamCipherMode(0, newAESCTR)}
+ cipherModes[CipherAES256CTR] = &cipherMode{32, aes.BlockSize, streamCipherMode(0, newAESCTR)}
+ // Use of GCM with arbitrary IVs is not allowed in FIPS 140-only mode,
+ // we'll wire it up to NewGCMForSSH in Go 1.26.
+ //
+ // For now it means we'll work with fips140=on but not fips140=only.
+ cipherModes[CipherAES128GCM] = &cipherMode{16, 12, newGCMCipher}
+ cipherModes[CipherAES256GCM] = &cipherMode{32, 12, newGCMCipher}
+
+ if fips140.Enabled() {
+ defaultCiphers = slices.DeleteFunc(defaultCiphers, func(algo string) bool {
+ _, ok := cipherModes[algo]
+ return !ok
+ })
+ return
+ }
+
+ cipherModes[CipherChaCha20Poly1305] = &cipherMode{64, 0, newChaCha20Cipher}
+ // Insecure ciphers not included in the default configuration.
+ cipherModes[InsecureCipherRC4128] = &cipherMode{16, 0, streamCipherMode(1536, newRC4)}
+ cipherModes[InsecureCipherRC4256] = &cipherMode{32, 0, streamCipherMode(1536, newRC4)}
+ cipherModes[InsecureCipherRC4] = &cipherMode{16, 0, streamCipherMode(0, newRC4)}
// CBC mode is insecure and so is not included in the default config.
// (See https://www.ieee-security.org/TC/SP2013/papers/4977a526.pdf). If absolutely
// needed, it's possible to specify a custom Config to enable it.
// You should expect that an active attacker can recover plaintext if
// you do.
- InsecureCipherAES128CBC: {16, aes.BlockSize, newAESCBCCipher},
-
- // 3des-cbc is insecure and is not included in the default
- // config.
- InsecureCipherTripleDESCBC: {24, des.BlockSize, newTripleDESCBCCipher},
+ cipherModes[InsecureCipherAES128CBC] = &cipherMode{16, aes.BlockSize, newAESCBCCipher}
+ cipherModes[InsecureCipherTripleDESCBC] = &cipherMode{24, des.BlockSize, newTripleDESCBCCipher}
}
// prefixLen is the length of the packet prefix that contains the packet length
diff --git a/hack/tools/vendor/golang.org/x/crypto/ssh/client_auth.go b/hack/tools/vendor/golang.org/x/crypto/ssh/client_auth.go
index c12818fdc5c7..3127e4990363 100644
--- a/hack/tools/vendor/golang.org/x/crypto/ssh/client_auth.go
+++ b/hack/tools/vendor/golang.org/x/crypto/ssh/client_auth.go
@@ -9,6 +9,7 @@ import (
"errors"
"fmt"
"io"
+ "slices"
"strings"
)
@@ -83,7 +84,7 @@ func (c *connection) clientAuthenticate(config *ClientConfig) error {
// success
return nil
} else if ok == authFailure {
- if m := auth.method(); !contains(tried, m) {
+ if m := auth.method(); !slices.Contains(tried, m) {
tried = append(tried, m)
}
}
@@ -97,7 +98,7 @@ func (c *connection) clientAuthenticate(config *ClientConfig) error {
findNext:
for _, a := range config.Auth {
candidateMethod := a.method()
- if contains(tried, candidateMethod) {
+ if slices.Contains(tried, candidateMethod) {
continue
}
for _, meth := range methods {
@@ -117,15 +118,6 @@ func (c *connection) clientAuthenticate(config *ClientConfig) error {
return fmt.Errorf("ssh: unable to authenticate, attempted methods %v, no supported methods remain", tried)
}
-func contains(list []string, e string) bool {
- for _, s := range list {
- if s == e {
- return true
- }
- }
- return false
-}
-
// An AuthMethod represents an instance of an RFC 4252 authentication method.
type AuthMethod interface {
// auth authenticates user over transport t.
@@ -255,7 +247,7 @@ func pickSignatureAlgorithm(signer Signer, extensions map[string][]byte) (MultiA
// Fallback to use if there is no "server-sig-algs" extension or a
// common algorithm cannot be found. We use the public key format if the
// MultiAlgorithmSigner supports it, otherwise we return an error.
- if !contains(as.Algorithms(), underlyingAlgo(keyFormat)) {
+ if !slices.Contains(as.Algorithms(), underlyingAlgo(keyFormat)) {
return "", fmt.Errorf("ssh: no common public key signature algorithm, server only supports %q for key type %q, signer only supports %v",
underlyingAlgo(keyFormat), keyFormat, as.Algorithms())
}
@@ -284,7 +276,7 @@ func pickSignatureAlgorithm(signer Signer, extensions map[string][]byte) (MultiA
// Filter algorithms based on those supported by MultiAlgorithmSigner.
var keyAlgos []string
for _, algo := range algorithmsForKeyFormat(keyFormat) {
- if contains(as.Algorithms(), underlyingAlgo(algo)) {
+ if slices.Contains(as.Algorithms(), underlyingAlgo(algo)) {
keyAlgos = append(keyAlgos, algo)
}
}
@@ -334,7 +326,7 @@ func (cb publicKeyCallback) auth(session []byte, user string, c packetConn, rand
// the key try to use the obtained algorithm as if "server-sig-algs" had
// not been implemented if supported from the algorithm signer.
if !ok && idx < origSignersLen && isRSACert(algo) && algo != CertAlgoRSAv01 {
- if contains(as.Algorithms(), KeyAlgoRSA) {
+ if slices.Contains(as.Algorithms(), KeyAlgoRSA) {
// We retry using the compat algorithm after all signers have
// been tried normally.
signers = append(signers, &multiAlgorithmSigner{
@@ -385,7 +377,7 @@ func (cb publicKeyCallback) auth(session []byte, user string, c packetConn, rand
// contain the "publickey" method, do not attempt to authenticate with any
// other keys. According to RFC 4252 Section 7, the latter can occur when
// additional authentication methods are required.
- if success == authSuccess || !contains(methods, cb.method()) {
+ if success == authSuccess || !slices.Contains(methods, cb.method()) {
return success, methods, err
}
}
@@ -434,7 +426,7 @@ func confirmKeyAck(key PublicKey, c packetConn) (bool, error) {
// servers send the key type instead. OpenSSH allows any algorithm
// that matches the public key, so we do the same.
// https://github.com/openssh/openssh-portable/blob/86bdd385/sshconnect2.c#L709
- if !contains(algorithmsForKeyFormat(key.Type()), msg.Algo) {
+ if !slices.Contains(algorithmsForKeyFormat(key.Type()), msg.Algo) {
return false, nil
}
if !bytes.Equal(msg.PubKey, pubKey) {
diff --git a/hack/tools/vendor/golang.org/x/crypto/ssh/common.go b/hack/tools/vendor/golang.org/x/crypto/ssh/common.go
index f2ec0896c293..2e44e9c9ec62 100644
--- a/hack/tools/vendor/golang.org/x/crypto/ssh/common.go
+++ b/hack/tools/vendor/golang.org/x/crypto/ssh/common.go
@@ -6,6 +6,7 @@ package ssh
import (
"crypto"
+ "crypto/fips140"
"crypto/rand"
"fmt"
"io"
@@ -83,6 +84,7 @@ var (
// supportedKexAlgos specifies key-exchange algorithms implemented by this
// package in preference order, excluding those with security issues.
supportedKexAlgos = []string{
+ KeyExchangeMLKEM768X25519,
KeyExchangeCurve25519,
KeyExchangeECDHP256,
KeyExchangeECDHP384,
@@ -94,6 +96,7 @@ var (
// defaultKexAlgos specifies the default preference for key-exchange
// algorithms in preference order.
defaultKexAlgos = []string{
+ KeyExchangeMLKEM768X25519,
KeyExchangeCurve25519,
KeyExchangeECDHP256,
KeyExchangeECDHP384,
@@ -254,6 +257,40 @@ type Algorithms struct {
PublicKeyAuths []string
}
+func init() {
+ if fips140.Enabled() {
+ defaultHostKeyAlgos = slices.DeleteFunc(defaultHostKeyAlgos, func(algo string) bool {
+ _, err := hashFunc(underlyingAlgo(algo))
+ return err != nil
+ })
+ defaultPubKeyAuthAlgos = slices.DeleteFunc(defaultPubKeyAuthAlgos, func(algo string) bool {
+ _, err := hashFunc(underlyingAlgo(algo))
+ return err != nil
+ })
+ }
+}
+
+func hashFunc(format string) (crypto.Hash, error) {
+ switch format {
+ case KeyAlgoRSASHA256, KeyAlgoECDSA256, KeyAlgoSKED25519, KeyAlgoSKECDSA256:
+ return crypto.SHA256, nil
+ case KeyAlgoECDSA384:
+ return crypto.SHA384, nil
+ case KeyAlgoRSASHA512, KeyAlgoECDSA521:
+ return crypto.SHA512, nil
+ case KeyAlgoED25519:
+ // KeyAlgoED25519 doesn't pre-hash.
+ return 0, nil
+ case KeyAlgoRSA, InsecureKeyAlgoDSA:
+ if fips140.Enabled() {
+ return 0, fmt.Errorf("ssh: hash algorithm for format %q not allowed in FIPS 140 mode", format)
+ }
+ return crypto.SHA1, nil
+ default:
+ return 0, fmt.Errorf("ssh: hash algorithm for format %q not mapped", format)
+ }
+}
+
// SupportedAlgorithms returns algorithms currently implemented by this package,
// excluding those with security issues, which are returned by
// InsecureAlgorithms. The algorithms listed here are in preference order.
@@ -281,21 +318,6 @@ func InsecureAlgorithms() Algorithms {
var supportedCompressions = []string{compressionNone}
-// hashFuncs keeps the mapping of supported signature algorithms to their
-// respective hashes needed for signing and verification.
-var hashFuncs = map[string]crypto.Hash{
- KeyAlgoRSA: crypto.SHA1,
- KeyAlgoRSASHA256: crypto.SHA256,
- KeyAlgoRSASHA512: crypto.SHA512,
- InsecureKeyAlgoDSA: crypto.SHA1,
- KeyAlgoECDSA256: crypto.SHA256,
- KeyAlgoECDSA384: crypto.SHA384,
- KeyAlgoECDSA521: crypto.SHA512,
- // KeyAlgoED25519 doesn't pre-hash.
- KeyAlgoSKECDSA256: crypto.SHA256,
- KeyAlgoSKED25519: crypto.SHA256,
-}
-
// algorithmsForKeyFormat returns the supported signature algorithms for a given
// public key format (PublicKey.Type), in order of preference. See RFC 8332,
// Section 2. See also the note in sendKexInit on backwards compatibility.
@@ -310,11 +332,40 @@ func algorithmsForKeyFormat(keyFormat string) []string {
}
}
+// keyFormatForAlgorithm returns the key format corresponding to the given
+// signature algorithm. It returns an empty string if the signature algorithm is
+// invalid or unsupported.
+func keyFormatForAlgorithm(sigAlgo string) string {
+ switch sigAlgo {
+ case KeyAlgoRSA, KeyAlgoRSASHA256, KeyAlgoRSASHA512:
+ return KeyAlgoRSA
+ case CertAlgoRSAv01, CertAlgoRSASHA256v01, CertAlgoRSASHA512v01:
+ return CertAlgoRSAv01
+ case KeyAlgoED25519,
+ KeyAlgoSKED25519,
+ KeyAlgoSKECDSA256,
+ KeyAlgoECDSA256,
+ KeyAlgoECDSA384,
+ KeyAlgoECDSA521,
+ InsecureKeyAlgoDSA,
+ InsecureCertAlgoDSAv01,
+ CertAlgoECDSA256v01,
+ CertAlgoECDSA384v01,
+ CertAlgoECDSA521v01,
+ CertAlgoSKECDSA256v01,
+ CertAlgoED25519v01,
+ CertAlgoSKED25519v01:
+ return sigAlgo
+ default:
+ return ""
+ }
+}
+
// isRSA returns whether algo is a supported RSA algorithm, including certificate
// algorithms.
func isRSA(algo string) bool {
algos := algorithmsForKeyFormat(KeyAlgoRSA)
- return contains(algos, underlyingAlgo(algo))
+ return slices.Contains(algos, underlyingAlgo(algo))
}
func isRSACert(algo string) bool {
@@ -513,7 +564,7 @@ func (c *Config) SetDefaults() {
if kexAlgoMap[k] != nil {
// Ignore the KEX if we have no kexAlgoMap definition.
kexs = append(kexs, k)
- if k == KeyExchangeCurve25519 && !contains(c.KeyExchanges, keyExchangeCurve25519LibSSH) {
+ if k == KeyExchangeCurve25519 && !slices.Contains(c.KeyExchanges, keyExchangeCurve25519LibSSH) {
kexs = append(kexs, keyExchangeCurve25519LibSSH)
}
}
diff --git a/hack/tools/vendor/golang.org/x/crypto/ssh/doc.go b/hack/tools/vendor/golang.org/x/crypto/ssh/doc.go
index 04ccce346176..5b4de9effcb1 100644
--- a/hack/tools/vendor/golang.org/x/crypto/ssh/doc.go
+++ b/hack/tools/vendor/golang.org/x/crypto/ssh/doc.go
@@ -17,8 +17,18 @@ References:
[PROTOCOL.certkeys]: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.certkeys?rev=HEAD
[SSH-PARAMETERS]: http://www.iana.org/assignments/ssh-parameters/ssh-parameters.xml#ssh-parameters-1
[SSH-CERTS]: https://datatracker.ietf.org/doc/html/draft-miller-ssh-cert-01
+ [FIPS 140-3 mode]: https://go.dev/doc/security/fips140
This package does not fall under the stability promise of the Go language itself,
so its API may be changed when pressing needs arise.
+
+# FIPS 140-3 mode
+
+When the program is in [FIPS 140-3 mode], this package behaves as if only SP
+800-140C and SP 800-140D approved cipher suites, signature algorithms,
+certificate public key types and sizes, and key exchange and derivation
+algorithms were implemented. Others are silently ignored and not negotiated, or
+rejected. This set may depend on the algorithms supported by the FIPS 140-3 Go
+Cryptographic Module selected with GOFIPS140, and may change across Go versions.
*/
package ssh
diff --git a/hack/tools/vendor/golang.org/x/crypto/ssh/handshake.go b/hack/tools/vendor/golang.org/x/crypto/ssh/handshake.go
index a90bfe331c8c..4be3cbb6de31 100644
--- a/hack/tools/vendor/golang.org/x/crypto/ssh/handshake.go
+++ b/hack/tools/vendor/golang.org/x/crypto/ssh/handshake.go
@@ -10,6 +10,7 @@ import (
"io"
"log"
"net"
+ "slices"
"strings"
"sync"
)
@@ -527,7 +528,7 @@ func (t *handshakeTransport) sendKexInit() error {
switch s := k.(type) {
case MultiAlgorithmSigner:
for _, algo := range algorithmsForKeyFormat(keyFormat) {
- if contains(s.Algorithms(), underlyingAlgo(algo)) {
+ if slices.Contains(s.Algorithms(), underlyingAlgo(algo)) {
msg.ServerHostKeyAlgos = append(msg.ServerHostKeyAlgos, algo)
}
}
@@ -679,7 +680,7 @@ func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error {
return err
}
- if t.sessionID == nil && ((isClient && contains(serverInit.KexAlgos, kexStrictServer)) || (!isClient && contains(clientInit.KexAlgos, kexStrictClient))) {
+ if t.sessionID == nil && ((isClient && slices.Contains(serverInit.KexAlgos, kexStrictServer)) || (!isClient && slices.Contains(clientInit.KexAlgos, kexStrictClient))) {
t.strictMode = true
if err := t.conn.setStrictMode(); err != nil {
return err
@@ -736,7 +737,7 @@ func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error {
// On the server side, after the first SSH_MSG_NEWKEYS, send a SSH_MSG_EXT_INFO
// message with the server-sig-algs extension if the client supports it. See
// RFC 8308, Sections 2.4 and 3.1, and [PROTOCOL], Section 1.9.
- if !isClient && firstKeyExchange && contains(clientInit.KexAlgos, "ext-info-c") {
+ if !isClient && firstKeyExchange && slices.Contains(clientInit.KexAlgos, "ext-info-c") {
supportedPubKeyAuthAlgosList := strings.Join(t.publicKeyAuthAlgorithms, ",")
extInfo := &extInfoMsg{
NumExtensions: 2,
@@ -790,7 +791,7 @@ func (a algorithmSignerWrapper) SignWithAlgorithm(rand io.Reader, data []byte, a
func pickHostKey(hostKeys []Signer, algo string) AlgorithmSigner {
for _, k := range hostKeys {
if s, ok := k.(MultiAlgorithmSigner); ok {
- if !contains(s.Algorithms(), underlyingAlgo(algo)) {
+ if !slices.Contains(s.Algorithms(), underlyingAlgo(algo)) {
continue
}
}
diff --git a/hack/tools/vendor/golang.org/x/crypto/ssh/kex.go b/hack/tools/vendor/golang.org/x/crypto/ssh/kex.go
index cf388a92aa3a..5f7fdd85142f 100644
--- a/hack/tools/vendor/golang.org/x/crypto/ssh/kex.go
+++ b/hack/tools/vendor/golang.org/x/crypto/ssh/kex.go
@@ -8,13 +8,14 @@ import (
"crypto"
"crypto/ecdsa"
"crypto/elliptic"
+ "crypto/fips140"
"crypto/rand"
- "crypto/subtle"
"encoding/binary"
"errors"
"fmt"
"io"
"math/big"
+ "slices"
"golang.org/x/crypto/curve25519"
)
@@ -396,9 +397,27 @@ func ecHash(curve elliptic.Curve) crypto.Hash {
return crypto.SHA512
}
+// kexAlgoMap defines the supported KEXs. KEXs not included are not supported
+// and will not be negotiated, even if explicitly configured. When FIPS mode is
+// enabled, only FIPS-approved algorithms are included.
var kexAlgoMap = map[string]kexAlgorithm{}
func init() {
+ // mlkem768x25519-sha256 we'll work with fips140=on but not fips140=only
+ // until Go 1.26.
+ kexAlgoMap[KeyExchangeMLKEM768X25519] = &mlkem768WithCurve25519sha256{}
+ kexAlgoMap[KeyExchangeECDHP521] = &ecdh{elliptic.P521()}
+ kexAlgoMap[KeyExchangeECDHP384] = &ecdh{elliptic.P384()}
+ kexAlgoMap[KeyExchangeECDHP256] = &ecdh{elliptic.P256()}
+
+ if fips140.Enabled() {
+ defaultKexAlgos = slices.DeleteFunc(defaultKexAlgos, func(algo string) bool {
+ _, ok := kexAlgoMap[algo]
+ return !ok
+ })
+ return
+ }
+
p, _ := new(big.Int).SetString(oakleyGroup2, 16)
kexAlgoMap[InsecureKeyExchangeDH1SHA1] = &dhGroup{
g: new(big.Int).SetInt64(2),
@@ -432,9 +451,6 @@ func init() {
hashFunc: crypto.SHA512,
}
- kexAlgoMap[KeyExchangeECDHP521] = &ecdh{elliptic.P521()}
- kexAlgoMap[KeyExchangeECDHP384] = &ecdh{elliptic.P384()}
- kexAlgoMap[KeyExchangeECDHP256] = &ecdh{elliptic.P256()}
kexAlgoMap[KeyExchangeCurve25519] = &curve25519sha256{}
kexAlgoMap[keyExchangeCurve25519LibSSH] = &curve25519sha256{}
kexAlgoMap[InsecureKeyExchangeDHGEXSHA1] = &dhGEXSHA{hashFunc: crypto.SHA1}
@@ -454,15 +470,17 @@ func (kp *curve25519KeyPair) generate(rand io.Reader) error {
if _, err := io.ReadFull(rand, kp.priv[:]); err != nil {
return err
}
- curve25519.ScalarBaseMult(&kp.pub, &kp.priv)
+ p, err := curve25519.X25519(kp.priv[:], curve25519.Basepoint)
+ if err != nil {
+ return fmt.Errorf("curve25519: %w", err)
+ }
+ if len(p) != 32 {
+ return fmt.Errorf("curve25519: internal error: X25519 returned %d bytes, expected 32", len(p))
+ }
+ copy(kp.pub[:], p)
return nil
}
-// curve25519Zeros is just an array of 32 zero bytes so that we have something
-// convenient to compare against in order to reject curve25519 points with the
-// wrong order.
-var curve25519Zeros [32]byte
-
func (kex *curve25519sha256) Client(c packetConn, rand io.Reader, magics *handshakeMagics) (*kexResult, error) {
var kp curve25519KeyPair
if err := kp.generate(rand); err != nil {
@@ -485,11 +503,9 @@ func (kex *curve25519sha256) Client(c packetConn, rand io.Reader, magics *handsh
return nil, errors.New("ssh: peer's curve25519 public value has wrong length")
}
- var servPub, secret [32]byte
- copy(servPub[:], reply.EphemeralPubKey)
- curve25519.ScalarMult(&secret, &kp.priv, &servPub)
- if subtle.ConstantTimeCompare(secret[:], curve25519Zeros[:]) == 1 {
- return nil, errors.New("ssh: peer's curve25519 public value has wrong order")
+ secret, err := curve25519.X25519(kp.priv[:], reply.EphemeralPubKey)
+ if err != nil {
+ return nil, fmt.Errorf("ssh: peer's curve25519 public value is not valid: %w", err)
}
h := crypto.SHA256.New()
@@ -531,11 +547,9 @@ func (kex *curve25519sha256) Server(c packetConn, rand io.Reader, magics *handsh
return nil, err
}
- var clientPub, secret [32]byte
- copy(clientPub[:], kexInit.ClientPubKey)
- curve25519.ScalarMult(&secret, &kp.priv, &clientPub)
- if subtle.ConstantTimeCompare(secret[:], curve25519Zeros[:]) == 1 {
- return nil, errors.New("ssh: peer's curve25519 public value has wrong order")
+ secret, err := curve25519.X25519(kp.priv[:], kexInit.ClientPubKey)
+ if err != nil {
+ return nil, fmt.Errorf("ssh: peer's curve25519 public value is not valid: %w", err)
}
hostKeyBytes := priv.PublicKey().Marshal()
diff --git a/hack/tools/vendor/golang.org/x/crypto/ssh/keys.go b/hack/tools/vendor/golang.org/x/crypto/ssh/keys.go
index a28c0de50332..47a07539d90c 100644
--- a/hack/tools/vendor/golang.org/x/crypto/ssh/keys.go
+++ b/hack/tools/vendor/golang.org/x/crypto/ssh/keys.go
@@ -27,6 +27,7 @@ import (
"fmt"
"io"
"math/big"
+ "slices"
"strings"
"golang.org/x/crypto/ssh/internal/bcrypt_pbkdf"
@@ -89,6 +90,11 @@ func parsePubKey(in []byte, algo string) (pubKey PublicKey, rest []byte, err err
}
return cert, nil, nil
}
+ if keyFormat := keyFormatForAlgorithm(algo); keyFormat != "" {
+ return nil, nil, fmt.Errorf("ssh: signature algorithm %q isn't a key format; key is malformed and should be re-encoded with type %q",
+ algo, keyFormat)
+ }
+
return nil, nil, fmt.Errorf("ssh: unknown key algorithm: %v", algo)
}
@@ -191,9 +197,10 @@ func ParseKnownHosts(in []byte) (marker string, hosts []string, pubKey PublicKey
return "", nil, nil, "", nil, io.EOF
}
-// ParseAuthorizedKey parses a public key from an authorized_keys
-// file used in OpenSSH according to the sshd(8) manual page.
+// ParseAuthorizedKey parses a public key from an authorized_keys file used in
+// OpenSSH according to the sshd(8) manual page. Invalid lines are ignored.
func ParseAuthorizedKey(in []byte) (out PublicKey, comment string, options []string, rest []byte, err error) {
+ var lastErr error
for len(in) > 0 {
end := bytes.IndexByte(in, '\n')
if end != -1 {
@@ -222,6 +229,8 @@ func ParseAuthorizedKey(in []byte) (out PublicKey, comment string, options []str
if out, comment, err = parseAuthorizedKey(in[i:]); err == nil {
return out, comment, options, rest, nil
+ } else {
+ lastErr = err
}
// No key type recognised. Maybe there's an options field at
@@ -264,12 +273,18 @@ func ParseAuthorizedKey(in []byte) (out PublicKey, comment string, options []str
if out, comment, err = parseAuthorizedKey(in[i:]); err == nil {
options = candidateOptions
return out, comment, options, rest, nil
+ } else {
+ lastErr = err
}
in = rest
continue
}
+ if lastErr != nil {
+ return nil, "", nil, nil, fmt.Errorf("ssh: no key found; last parsing error for ignored line: %w", lastErr)
+ }
+
return nil, "", nil, nil, errors.New("ssh: no key found")
}
@@ -395,11 +410,11 @@ func NewSignerWithAlgorithms(signer AlgorithmSigner, algorithms []string) (Multi
}
for _, algo := range algorithms {
- if !contains(supportedAlgos, algo) {
+ if !slices.Contains(supportedAlgos, algo) {
return nil, fmt.Errorf("ssh: algorithm %q is not supported for key type %q",
algo, signer.PublicKey().Type())
}
- if !contains(signerAlgos, algo) {
+ if !slices.Contains(signerAlgos, algo) {
return nil, fmt.Errorf("ssh: algorithm %q is restricted for the provided signer", algo)
}
}
@@ -486,10 +501,13 @@ func (r *rsaPublicKey) Marshal() []byte {
func (r *rsaPublicKey) Verify(data []byte, sig *Signature) error {
supportedAlgos := algorithmsForKeyFormat(r.Type())
- if !contains(supportedAlgos, sig.Format) {
+ if !slices.Contains(supportedAlgos, sig.Format) {
return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, r.Type())
}
- hash := hashFuncs[sig.Format]
+ hash, err := hashFunc(sig.Format)
+ if err != nil {
+ return err
+ }
h := hash.New()
h.Write(data)
digest := h.Sum(nil)
@@ -606,7 +624,11 @@ func (k *dsaPublicKey) Verify(data []byte, sig *Signature) error {
if sig.Format != k.Type() {
return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, k.Type())
}
- h := hashFuncs[sig.Format].New()
+ hash, err := hashFunc(sig.Format)
+ if err != nil {
+ return err
+ }
+ h := hash.New()
h.Write(data)
digest := h.Sum(nil)
@@ -651,7 +673,11 @@ func (k *dsaPrivateKey) SignWithAlgorithm(rand io.Reader, data []byte, algorithm
return nil, fmt.Errorf("ssh: unsupported signature algorithm %s", algorithm)
}
- h := hashFuncs[k.PublicKey().Type()].New()
+ hash, err := hashFunc(k.PublicKey().Type())
+ if err != nil {
+ return nil, err
+ }
+ h := hash.New()
h.Write(data)
digest := h.Sum(nil)
r, s, err := dsa.Sign(rand, k.PrivateKey, digest)
@@ -801,8 +827,11 @@ func (k *ecdsaPublicKey) Verify(data []byte, sig *Signature) error {
if sig.Format != k.Type() {
return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, k.Type())
}
-
- h := hashFuncs[sig.Format].New()
+ hash, err := hashFunc(sig.Format)
+ if err != nil {
+ return err
+ }
+ h := hash.New()
h.Write(data)
digest := h.Sum(nil)
@@ -905,8 +934,11 @@ func (k *skECDSAPublicKey) Verify(data []byte, sig *Signature) error {
if sig.Format != k.Type() {
return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, k.Type())
}
-
- h := hashFuncs[sig.Format].New()
+ hash, err := hashFunc(sig.Format)
+ if err != nil {
+ return err
+ }
+ h := hash.New()
h.Write([]byte(k.application))
appDigest := h.Sum(nil)
@@ -1009,7 +1041,11 @@ func (k *skEd25519PublicKey) Verify(data []byte, sig *Signature) error {
return fmt.Errorf("invalid size %d for Ed25519 public key", l)
}
- h := hashFuncs[sig.Format].New()
+ hash, err := hashFunc(sig.Format)
+ if err != nil {
+ return err
+ }
+ h := hash.New()
h.Write([]byte(k.application))
appDigest := h.Sum(nil)
@@ -1112,11 +1148,14 @@ func (s *wrappedSigner) SignWithAlgorithm(rand io.Reader, data []byte, algorithm
algorithm = s.pubKey.Type()
}
- if !contains(s.Algorithms(), algorithm) {
+ if !slices.Contains(s.Algorithms(), algorithm) {
return nil, fmt.Errorf("ssh: unsupported signature algorithm %q for key format %q", algorithm, s.pubKey.Type())
}
- hashFunc := hashFuncs[algorithm]
+ hashFunc, err := hashFunc(algorithm)
+ if err != nil {
+ return nil, err
+ }
var digest []byte
if hashFunc != 0 {
h := hashFunc.New()
@@ -1451,6 +1490,7 @@ type openSSHEncryptedPrivateKey struct {
NumKeys uint32
PubKey []byte
PrivKeyBlock []byte
+ Rest []byte `ssh:"rest"`
}
type openSSHPrivateKey struct {
diff --git a/hack/tools/vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts.go b/hack/tools/vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts.go
index c022e411f028..1ebd7e6da2e1 100644
--- a/hack/tools/vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts.go
+++ b/hack/tools/vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts.go
@@ -421,20 +421,26 @@ func New(files ...string) (ssh.HostKeyCallback, error) {
return certChecker.CheckHostKey, nil
}
-// Normalize normalizes an address into the form used in known_hosts
+// Normalize normalizes an address into the form used in known_hosts. Supports
+// IPv4, hostnames, bracketed IPv6. Any other non-standard formats are returned
+// with minimal transformation.
func Normalize(address string) string {
+ const defaultSSHPort = "22"
+
host, port, err := net.SplitHostPort(address)
if err != nil {
host = address
- port = "22"
+ port = defaultSSHPort
+ }
+
+ if strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") {
+ host = host[1 : len(host)-1]
}
- entry := host
- if port != "22" {
- entry = "[" + entry + "]:" + port
- } else if strings.Contains(host, ":") && !strings.HasPrefix(host, "[") {
- entry = "[" + entry + "]"
+
+ if port == defaultSSHPort {
+ return host
}
- return entry
+ return "[" + host + "]:" + port
}
// Line returns a line to add append to the known_hosts files.
diff --git a/hack/tools/vendor/golang.org/x/crypto/ssh/mac.go b/hack/tools/vendor/golang.org/x/crypto/ssh/mac.go
index de2639d57f87..87d626fbbf7c 100644
--- a/hack/tools/vendor/golang.org/x/crypto/ssh/mac.go
+++ b/hack/tools/vendor/golang.org/x/crypto/ssh/mac.go
@@ -7,11 +7,13 @@ package ssh
// Message authentication support
import (
+ "crypto/fips140"
"crypto/hmac"
"crypto/sha1"
"crypto/sha256"
"crypto/sha512"
"hash"
+ "slices"
)
type macMode struct {
@@ -46,23 +48,37 @@ func (t truncatingMAC) Size() int {
func (t truncatingMAC) BlockSize() int { return t.hmac.BlockSize() }
-var macModes = map[string]*macMode{
- HMACSHA512ETM: {64, true, func(key []byte) hash.Hash {
+// macModes defines the supported MACs. MACs not included are not supported
+// and will not be negotiated, even if explicitly configured. When FIPS mode is
+// enabled, only FIPS-approved algorithms are included.
+var macModes = map[string]*macMode{}
+
+func init() {
+ macModes[HMACSHA512ETM] = &macMode{64, true, func(key []byte) hash.Hash {
return hmac.New(sha512.New, key)
- }},
- HMACSHA256ETM: {32, true, func(key []byte) hash.Hash {
+ }}
+ macModes[HMACSHA256ETM] = &macMode{32, true, func(key []byte) hash.Hash {
return hmac.New(sha256.New, key)
- }},
- HMACSHA512: {64, false, func(key []byte) hash.Hash {
+ }}
+ macModes[HMACSHA512] = &macMode{64, false, func(key []byte) hash.Hash {
return hmac.New(sha512.New, key)
- }},
- HMACSHA256: {32, false, func(key []byte) hash.Hash {
+ }}
+ macModes[HMACSHA256] = &macMode{32, false, func(key []byte) hash.Hash {
return hmac.New(sha256.New, key)
- }},
- HMACSHA1: {20, false, func(key []byte) hash.Hash {
+ }}
+
+ if fips140.Enabled() {
+ defaultMACs = slices.DeleteFunc(defaultMACs, func(algo string) bool {
+ _, ok := macModes[algo]
+ return !ok
+ })
+ return
+ }
+
+ macModes[HMACSHA1] = &macMode{20, false, func(key []byte) hash.Hash {
return hmac.New(sha1.New, key)
- }},
- InsecureHMACSHA196: {20, false, func(key []byte) hash.Hash {
+ }}
+ macModes[InsecureHMACSHA196] = &macMode{20, false, func(key []byte) hash.Hash {
return truncatingMAC{12, hmac.New(sha1.New, key)}
- }},
+ }}
}
diff --git a/hack/tools/vendor/golang.org/x/crypto/ssh/messages.go b/hack/tools/vendor/golang.org/x/crypto/ssh/messages.go
index 251b9d06a324..ab22c3d38db8 100644
--- a/hack/tools/vendor/golang.org/x/crypto/ssh/messages.go
+++ b/hack/tools/vendor/golang.org/x/crypto/ssh/messages.go
@@ -792,7 +792,7 @@ func marshalString(to []byte, s []byte) []byte {
return to[len(s):]
}
-var bigIntType = reflect.TypeOf((*big.Int)(nil))
+var bigIntType = reflect.TypeFor[*big.Int]()
// Decode a packet into its corresponding message.
func decode(packet []byte) (interface{}, error) {
diff --git a/hack/tools/vendor/golang.org/x/crypto/ssh/mlkem.go b/hack/tools/vendor/golang.org/x/crypto/ssh/mlkem.go
index 657e1079d4be..ddc0ed1fc0ac 100644
--- a/hack/tools/vendor/golang.org/x/crypto/ssh/mlkem.go
+++ b/hack/tools/vendor/golang.org/x/crypto/ssh/mlkem.go
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build go1.24
-
package ssh
import (
@@ -13,23 +11,10 @@ import (
"errors"
"fmt"
"io"
- "runtime"
- "slices"
"golang.org/x/crypto/curve25519"
)
-func init() {
- // After Go 1.24rc1 mlkem swapped the order of return values of Encapsulate.
- // See #70950.
- if runtime.Version() == "go1.24rc1" {
- return
- }
- supportedKexAlgos = slices.Insert(supportedKexAlgos, 0, KeyExchangeMLKEM768X25519)
- defaultKexAlgos = slices.Insert(defaultKexAlgos, 0, KeyExchangeMLKEM768X25519)
- kexAlgoMap[KeyExchangeMLKEM768X25519] = &mlkem768WithCurve25519sha256{}
-}
-
// mlkem768WithCurve25519sha256 implements the hybrid ML-KEM768 with
// curve25519-sha256 key exchange method, as described by
// draft-kampanakis-curdle-ssh-pq-ke-05 section 2.3.3.
diff --git a/hack/tools/vendor/golang.org/x/crypto/ssh/server.go b/hack/tools/vendor/golang.org/x/crypto/ssh/server.go
index 98679ba5b6ed..064dcbaf5aef 100644
--- a/hack/tools/vendor/golang.org/x/crypto/ssh/server.go
+++ b/hack/tools/vendor/golang.org/x/crypto/ssh/server.go
@@ -10,6 +10,7 @@ import (
"fmt"
"io"
"net"
+ "slices"
"strings"
)
@@ -43,6 +44,9 @@ type Permissions struct {
// pass data from the authentication callbacks to the server
// application layer.
Extensions map[string]string
+
+ // ExtraData allows to store user defined data.
+ ExtraData map[any]any
}
type GSSAPIWithMICConfig struct {
@@ -126,6 +130,21 @@ type ServerConfig struct {
// Permissions.Extensions entry.
PublicKeyCallback func(conn ConnMetadata, key PublicKey) (*Permissions, error)
+ // VerifiedPublicKeyCallback, if non-nil, is called after a client
+ // successfully confirms having control over a key that was previously
+ // approved by PublicKeyCallback. The permissions object passed to the
+ // callback is the one returned by PublicKeyCallback for the given public
+ // key and its ownership is transferred to the callback. The returned
+ // Permissions object can be the same object, optionally modified, or a
+ // completely new object. If VerifiedPublicKeyCallback is non-nil,
+ // PublicKeyCallback is not allowed to return a PartialSuccessError, which
+ // can instead be returned by VerifiedPublicKeyCallback.
+ //
+ // VerifiedPublicKeyCallback does not affect which authentication methods
+ // are included in the list of methods that can be attempted by the client.
+ VerifiedPublicKeyCallback func(conn ConnMetadata, key PublicKey, permissions *Permissions,
+ signatureAlgorithm string) (*Permissions, error)
+
// KeyboardInteractiveCallback, if non-nil, is called when
// keyboard-interactive authentication is selected (RFC
// 4256). The client object's Challenge function should be
@@ -246,7 +265,7 @@ func NewServerConn(c net.Conn, config *ServerConfig) (*ServerConn, <-chan NewCha
fullConf.PublicKeyAuthAlgorithms = defaultPubKeyAuthAlgos
} else {
for _, algo := range fullConf.PublicKeyAuthAlgorithms {
- if !contains(SupportedAlgorithms().PublicKeyAuths, algo) && !contains(InsecureAlgorithms().PublicKeyAuths, algo) {
+ if !slices.Contains(SupportedAlgorithms().PublicKeyAuths, algo) && !slices.Contains(InsecureAlgorithms().PublicKeyAuths, algo) {
c.Close()
return nil, nil, nil, fmt.Errorf("ssh: unsupported public key authentication algorithm %s", algo)
}
@@ -631,7 +650,7 @@ userAuthLoop:
return nil, parseError(msgUserAuthRequest)
}
algo := string(algoBytes)
- if !contains(config.PublicKeyAuthAlgorithms, underlyingAlgo(algo)) {
+ if !slices.Contains(config.PublicKeyAuthAlgorithms, underlyingAlgo(algo)) {
authErr = fmt.Errorf("ssh: algorithm %q not accepted", algo)
break
}
@@ -652,6 +671,9 @@ userAuthLoop:
candidate.pubKeyData = pubKeyData
candidate.perms, candidate.result = authConfig.PublicKeyCallback(s, pubKey)
_, isPartialSuccessError := candidate.result.(*PartialSuccessError)
+ if isPartialSuccessError && config.VerifiedPublicKeyCallback != nil {
+ return nil, errors.New("ssh: invalid library usage: PublicKeyCallback must not return partial success when VerifiedPublicKeyCallback is defined")
+ }
if (candidate.result == nil || isPartialSuccessError) &&
candidate.perms != nil &&
@@ -695,7 +717,7 @@ userAuthLoop:
// ssh-rsa-cert-v01@openssh.com algorithm with ssh-rsa public
// key type. The algorithm and public key type must be
// consistent: both must be certificate algorithms, or neither.
- if !contains(algorithmsForKeyFormat(pubKey.Type()), algo) {
+ if !slices.Contains(algorithmsForKeyFormat(pubKey.Type()), algo) {
authErr = fmt.Errorf("ssh: public key type %q not compatible with selected algorithm %q",
pubKey.Type(), algo)
break
@@ -705,7 +727,7 @@ userAuthLoop:
// algorithm name that corresponds to algo with
// sig.Format. This is usually the same, but
// for certs, the names differ.
- if !contains(config.PublicKeyAuthAlgorithms, sig.Format) {
+ if !slices.Contains(config.PublicKeyAuthAlgorithms, sig.Format) {
authErr = fmt.Errorf("ssh: algorithm %q not accepted", sig.Format)
break
}
@@ -722,6 +744,12 @@ userAuthLoop:
authErr = candidate.result
perms = candidate.perms
+ if authErr == nil && config.VerifiedPublicKeyCallback != nil {
+ // Only call VerifiedPublicKeyCallback after the key has been accepted
+ // and successfully verified. If authErr is non-nil, the key is not
+ // considered verified and the callback must not run.
+ perms, authErr = config.VerifiedPublicKeyCallback(s, pubKey, perms, algo)
+ }
}
case "gssapi-with-mic":
if authConfig.GSSAPIWithMICConfig == nil {
diff --git a/hack/tools/vendor/golang.org/x/crypto/ssh/ssh_gss.go b/hack/tools/vendor/golang.org/x/crypto/ssh/ssh_gss.go
index 24bd7c8e8304..a6249a1227b5 100644
--- a/hack/tools/vendor/golang.org/x/crypto/ssh/ssh_gss.go
+++ b/hack/tools/vendor/golang.org/x/crypto/ssh/ssh_gss.go
@@ -106,6 +106,13 @@ func parseGSSAPIPayload(payload []byte) (*userAuthRequestGSSAPI, error) {
if !ok {
return nil, errors.New("parse uint32 failed")
}
+ // Each ASN.1 encoded OID must have a minimum
+ // of 2 bytes; 64 maximum mechanisms is an
+ // arbitrary, but reasonable ceiling.
+ const maxMechs = 64
+ if n > maxMechs || int(n)*2 > len(rest) {
+ return nil, errors.New("invalid mechanism count")
+ }
s := &userAuthRequestGSSAPI{
N: n,
OIDS: make([]asn1.ObjectIdentifier, n),
@@ -122,7 +129,6 @@ func parseGSSAPIPayload(payload []byte) (*userAuthRequestGSSAPI, error) {
if rest, err = asn1.Unmarshal(desiredMech, &s.OIDS[i]); err != nil {
return nil, err
}
-
}
return s, nil
}
diff --git a/hack/tools/vendor/golang.org/x/crypto/ssh/streamlocal.go b/hack/tools/vendor/golang.org/x/crypto/ssh/streamlocal.go
index b171b330bc38..152470fcb796 100644
--- a/hack/tools/vendor/golang.org/x/crypto/ssh/streamlocal.go
+++ b/hack/tools/vendor/golang.org/x/crypto/ssh/streamlocal.go
@@ -44,7 +44,7 @@ func (c *Client) ListenUnix(socketPath string) (net.Listener, error) {
if !ok {
return nil, errors.New("ssh: streamlocal-forward@openssh.com request denied by peer")
}
- ch := c.forwards.add(&net.UnixAddr{Name: socketPath, Net: "unix"})
+ ch := c.forwards.add("unix", socketPath)
return &unixListener{socketPath, c, ch}, nil
}
@@ -96,7 +96,7 @@ func (l *unixListener) Accept() (net.Conn, error) {
// Close closes the listener.
func (l *unixListener) Close() error {
// this also closes the listener.
- l.conn.forwards.remove(&net.UnixAddr{Name: l.socketPath, Net: "unix"})
+ l.conn.forwards.remove("unix", l.socketPath)
m := streamLocalChannelForwardMsg{
l.socketPath,
}
diff --git a/hack/tools/vendor/golang.org/x/crypto/ssh/tcpip.go b/hack/tools/vendor/golang.org/x/crypto/ssh/tcpip.go
index 93d844f03516..78c41fe5a126 100644
--- a/hack/tools/vendor/golang.org/x/crypto/ssh/tcpip.go
+++ b/hack/tools/vendor/golang.org/x/crypto/ssh/tcpip.go
@@ -11,6 +11,7 @@ import (
"io"
"math/rand"
"net"
+ "net/netip"
"strconv"
"strings"
"sync"
@@ -22,14 +23,21 @@ import (
// the returned net.Listener. The listener must be serviced, or the
// SSH connection may hang.
// N must be "tcp", "tcp4", "tcp6", or "unix".
+//
+// If the address is a hostname, it is sent to the remote peer as-is, without
+// being resolved locally, and the Listener Addr method will return a zero IP.
func (c *Client) Listen(n, addr string) (net.Listener, error) {
switch n {
case "tcp", "tcp4", "tcp6":
- laddr, err := net.ResolveTCPAddr(n, addr)
+ host, portStr, err := net.SplitHostPort(addr)
+ if err != nil {
+ return nil, err
+ }
+ port, err := strconv.ParseInt(portStr, 10, 32)
if err != nil {
return nil, err
}
- return c.ListenTCP(laddr)
+ return c.listenTCPInternal(host, int(port))
case "unix":
return c.ListenUnix(addr)
default:
@@ -102,15 +110,24 @@ func (c *Client) handleForwards() {
// ListenTCP requests the remote peer open a listening socket
// on laddr. Incoming connections will be available by calling
// Accept on the returned net.Listener.
+//
+// ListenTCP accepts an IP address, to provide a hostname use [Client.Listen]
+// with "tcp", "tcp4", or "tcp6" network instead.
func (c *Client) ListenTCP(laddr *net.TCPAddr) (net.Listener, error) {
c.handleForwardsOnce.Do(c.handleForwards)
if laddr.Port == 0 && isBrokenOpenSSHVersion(string(c.ServerVersion())) {
return c.autoPortListenWorkaround(laddr)
}
+ return c.listenTCPInternal(laddr.IP.String(), laddr.Port)
+}
+
+func (c *Client) listenTCPInternal(host string, port int) (net.Listener, error) {
+ c.handleForwardsOnce.Do(c.handleForwards)
+
m := channelForwardMsg{
- laddr.IP.String(),
- uint32(laddr.Port),
+ host,
+ uint32(port),
}
// send message
ok, resp, err := c.SendRequest("tcpip-forward", true, Marshal(&m))
@@ -123,20 +140,33 @@ func (c *Client) ListenTCP(laddr *net.TCPAddr) (net.Listener, error) {
// If the original port was 0, then the remote side will
// supply a real port number in the response.
- if laddr.Port == 0 {
+ if port == 0 {
var p struct {
Port uint32
}
if err := Unmarshal(resp, &p); err != nil {
return nil, err
}
- laddr.Port = int(p.Port)
+ port = int(p.Port)
}
+ // Construct a local address placeholder for the remote listener. If the
+ // original host is an IP address, preserve it so that Listener.Addr()
+ // reports the same IP. If the host is a hostname or cannot be parsed as an
+ // IP, fall back to IPv4zero. The port field is always set, even if the
+ // original port was 0, because in that case the remote server will assign
+ // one, allowing callers to determine which port was selected.
+ ip := net.IPv4zero
+ if parsed, err := netip.ParseAddr(host); err == nil {
+ ip = net.IP(parsed.AsSlice())
+ }
+ laddr := &net.TCPAddr{
+ IP: ip,
+ Port: port,
+ }
+ addr := net.JoinHostPort(host, strconv.FormatInt(int64(port), 10))
+ ch := c.forwards.add("tcp", addr)
- // Register this forward, using the port number we obtained.
- ch := c.forwards.add(laddr)
-
- return &tcpListener{laddr, c, ch}, nil
+ return &tcpListener{laddr, addr, c, ch}, nil
}
// forwardList stores a mapping between remote
@@ -149,8 +179,9 @@ type forwardList struct {
// forwardEntry represents an established mapping of a laddr on a
// remote ssh server to a channel connected to a tcpListener.
type forwardEntry struct {
- laddr net.Addr
- c chan forward
+ addr string // host:port or socket path
+ network string // tcp or unix
+ c chan forward
}
// forward represents an incoming forwarded tcpip connection. The
@@ -161,12 +192,13 @@ type forward struct {
raddr net.Addr // the raddr of the incoming connection
}
-func (l *forwardList) add(addr net.Addr) chan forward {
+func (l *forwardList) add(n, addr string) chan forward {
l.Lock()
defer l.Unlock()
f := forwardEntry{
- laddr: addr,
- c: make(chan forward, 1),
+ addr: addr,
+ network: n,
+ c: make(chan forward, 1),
}
l.entries = append(l.entries, f)
return f.c
@@ -185,19 +217,20 @@ func parseTCPAddr(addr string, port uint32) (*net.TCPAddr, error) {
if port == 0 || port > 65535 {
return nil, fmt.Errorf("ssh: port number out of range: %d", port)
}
- ip := net.ParseIP(string(addr))
- if ip == nil {
+ ip, err := netip.ParseAddr(addr)
+ if err != nil {
return nil, fmt.Errorf("ssh: cannot parse IP address %q", addr)
}
- return &net.TCPAddr{IP: ip, Port: int(port)}, nil
+ return &net.TCPAddr{IP: net.IP(ip.AsSlice()), Port: int(port)}, nil
}
func (l *forwardList) handleChannels(in <-chan NewChannel) {
for ch := range in {
var (
- laddr net.Addr
- raddr net.Addr
- err error
+ addr string
+ network string
+ raddr net.Addr
+ err error
)
switch channelType := ch.ChannelType(); channelType {
case "forwarded-tcpip":
@@ -207,40 +240,34 @@ func (l *forwardList) handleChannels(in <-chan NewChannel) {
continue
}
- // RFC 4254 section 7.2 specifies that incoming
- // addresses should list the address, in string
- // format. It is implied that this should be an IP
- // address, as it would be impossible to connect to it
- // otherwise.
- laddr, err = parseTCPAddr(payload.Addr, payload.Port)
- if err != nil {
- ch.Reject(ConnectionFailed, err.Error())
- continue
- }
+ // RFC 4254 section 7.2 specifies that incoming addresses should
+ // list the address that was connected, in string format. It is the
+ // same address used in the tcpip-forward request. The originator
+ // address is an IP address instead.
+ addr = net.JoinHostPort(payload.Addr, strconv.FormatUint(uint64(payload.Port), 10))
+
raddr, err = parseTCPAddr(payload.OriginAddr, payload.OriginPort)
if err != nil {
ch.Reject(ConnectionFailed, err.Error())
continue
}
-
+ network = "tcp"
case "forwarded-streamlocal@openssh.com":
var payload forwardedStreamLocalPayload
if err = Unmarshal(ch.ExtraData(), &payload); err != nil {
ch.Reject(ConnectionFailed, "could not parse forwarded-streamlocal@openssh.com payload: "+err.Error())
continue
}
- laddr = &net.UnixAddr{
- Name: payload.SocketPath,
- Net: "unix",
- }
+ addr = payload.SocketPath
raddr = &net.UnixAddr{
Name: "@",
Net: "unix",
}
+ network = "unix"
default:
panic(fmt.Errorf("ssh: unknown channel type %s", channelType))
}
- if ok := l.forward(laddr, raddr, ch); !ok {
+ if ok := l.forward(network, addr, raddr, ch); !ok {
// Section 7.2, implementations MUST reject spurious incoming
// connections.
ch.Reject(Prohibited, "no forward for address")
@@ -252,11 +279,11 @@ func (l *forwardList) handleChannels(in <-chan NewChannel) {
// remove removes the forward entry, and the channel feeding its
// listener.
-func (l *forwardList) remove(addr net.Addr) {
+func (l *forwardList) remove(n, addr string) {
l.Lock()
defer l.Unlock()
for i, f := range l.entries {
- if addr.Network() == f.laddr.Network() && addr.String() == f.laddr.String() {
+ if n == f.network && addr == f.addr {
l.entries = append(l.entries[:i], l.entries[i+1:]...)
close(f.c)
return
@@ -274,11 +301,11 @@ func (l *forwardList) closeAll() {
l.entries = nil
}
-func (l *forwardList) forward(laddr, raddr net.Addr, ch NewChannel) bool {
+func (l *forwardList) forward(n, addr string, raddr net.Addr, ch NewChannel) bool {
l.Lock()
defer l.Unlock()
for _, f := range l.entries {
- if laddr.Network() == f.laddr.Network() && laddr.String() == f.laddr.String() {
+ if n == f.network && addr == f.addr {
f.c <- forward{newCh: ch, raddr: raddr}
return true
}
@@ -288,6 +315,7 @@ func (l *forwardList) forward(laddr, raddr net.Addr, ch NewChannel) bool {
type tcpListener struct {
laddr *net.TCPAddr
+ addr string
conn *Client
in <-chan forward
@@ -314,13 +342,21 @@ func (l *tcpListener) Accept() (net.Conn, error) {
// Close closes the listener.
func (l *tcpListener) Close() error {
+ host, port, err := net.SplitHostPort(l.addr)
+ if err != nil {
+ return err
+ }
+ rport, err := strconv.ParseUint(port, 10, 32)
+ if err != nil {
+ return err
+ }
m := channelForwardMsg{
- l.laddr.IP.String(),
- uint32(l.laddr.Port),
+ host,
+ uint32(rport),
}
// this also closes the listener.
- l.conn.forwards.remove(l.laddr)
+ l.conn.forwards.remove("tcp", l.addr)
ok, _, err := l.conn.SendRequest("cancel-tcpip-forward", true, Marshal(&m))
if err == nil && !ok {
err = errors.New("ssh: cancel-tcpip-forward failed")
diff --git a/hack/tools/vendor/golang.org/x/crypto/ssh/transport.go b/hack/tools/vendor/golang.org/x/crypto/ssh/transport.go
index 663619845c79..fa3dd6a4299b 100644
--- a/hack/tools/vendor/golang.org/x/crypto/ssh/transport.go
+++ b/hack/tools/vendor/golang.org/x/crypto/ssh/transport.go
@@ -8,6 +8,7 @@ import (
"bufio"
"bytes"
"errors"
+ "fmt"
"io"
"log"
)
@@ -254,6 +255,9 @@ var (
// (to setup server->client keys) or clientKeys (for client->server keys).
func newPacketCipher(d direction, algs DirectionAlgorithms, kex *kexResult) (packetCipher, error) {
cipherMode := cipherModes[algs.Cipher]
+ if cipherMode == nil {
+ return nil, fmt.Errorf("ssh: unsupported cipher %v", algs.Cipher)
+ }
iv := make([]byte, cipherMode.ivSize)
key := make([]byte, cipherMode.keySize)
diff --git a/hack/tools/vendor/golang.org/x/net/context/context.go b/hack/tools/vendor/golang.org/x/net/context/context.go
index db1c95fab1d5..24cea6882049 100644
--- a/hack/tools/vendor/golang.org/x/net/context/context.go
+++ b/hack/tools/vendor/golang.org/x/net/context/context.go
@@ -2,44 +2,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Package context defines the Context type, which carries deadlines,
-// cancellation signals, and other request-scoped values across API boundaries
-// and between processes.
-// As of Go 1.7 this package is available in the standard library under the
-// name [context], and migrating to it can be done automatically with [go fix].
-//
-// Incoming requests to a server should create a [Context], and outgoing
-// calls to servers should accept a Context. The chain of function
-// calls between them must propagate the Context, optionally replacing
-// it with a derived Context created using [WithCancel], [WithDeadline],
-// [WithTimeout], or [WithValue].
-//
-// Programs that use Contexts should follow these rules to keep interfaces
-// consistent across packages and enable static analysis tools to check context
-// propagation:
-//
-// Do not store Contexts inside a struct type; instead, pass a Context
-// explicitly to each function that needs it. This is discussed further in
-// https://go.dev/blog/context-and-structs. The Context should be the first
-// parameter, typically named ctx:
-//
-// func DoSomething(ctx context.Context, arg Arg) error {
-// // ... use ctx ...
-// }
-//
-// Do not pass a nil [Context], even if a function permits it. Pass [context.TODO]
-// if you are unsure about which Context to use.
-//
-// Use context Values only for request-scoped data that transits processes and
-// APIs, not for passing optional parameters to functions.
+// Package context has been superseded by the standard library [context] package.
//
-// The same Context may be passed to functions running in different goroutines;
-// Contexts are safe for simultaneous use by multiple goroutines.
-//
-// See https://go.dev/blog/context for example code for a server that uses
-// Contexts.
-//
-// [go fix]: https://go.dev/cmd/go#hdr-Update_packages_to_use_new_APIs
+// Deprecated: Use the standard library context package instead.
package context
import (
@@ -51,36 +16,37 @@ import (
// API boundaries.
//
// Context's methods may be called by multiple goroutines simultaneously.
+//
+//go:fix inline
type Context = context.Context
// Canceled is the error returned by [Context.Err] when the context is canceled
// for some reason other than its deadline passing.
+//
+//go:fix inline
var Canceled = context.Canceled
// DeadlineExceeded is the error returned by [Context.Err] when the context is canceled
// due to its deadline passing.
+//
+//go:fix inline
var DeadlineExceeded = context.DeadlineExceeded
// Background returns a non-nil, empty Context. It is never canceled, has no
// values, and has no deadline. It is typically used by the main function,
// initialization, and tests, and as the top-level Context for incoming
// requests.
-func Background() Context {
- return background
-}
+//
+//go:fix inline
+func Background() Context { return context.Background() }
// TODO returns a non-nil, empty Context. Code should use context.TODO when
// it's unclear which Context to use or it is not yet available (because the
// surrounding function has not yet been extended to accept a Context
// parameter).
-func TODO() Context {
- return todo
-}
-
-var (
- background = context.Background()
- todo = context.TODO()
-)
+//
+//go:fix inline
+func TODO() Context { return context.TODO() }
// A CancelFunc tells an operation to abandon its work.
// A CancelFunc does not wait for the work to stop.
@@ -95,6 +61,8 @@ type CancelFunc = context.CancelFunc
//
// Canceling this context releases resources associated with it, so code should
// call cancel as soon as the operations running in this [Context] complete.
+//
+//go:fix inline
func WithCancel(parent Context) (ctx Context, cancel CancelFunc) {
return context.WithCancel(parent)
}
@@ -108,6 +76,8 @@ func WithCancel(parent Context) (ctx Context, cancel CancelFunc) {
//
// Canceling this context releases resources associated with it, so code should
// call cancel as soon as the operations running in this [Context] complete.
+//
+//go:fix inline
func WithDeadline(parent Context, d time.Time) (Context, CancelFunc) {
return context.WithDeadline(parent, d)
}
@@ -122,6 +92,8 @@ func WithDeadline(parent Context, d time.Time) (Context, CancelFunc) {
// defer cancel() // releases resources if slowOperation completes before timeout elapses
// return slowOperation(ctx)
// }
+//
+//go:fix inline
func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) {
return context.WithTimeout(parent, timeout)
}
@@ -139,6 +111,8 @@ func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) {
// interface{}, context keys often have concrete type
// struct{}. Alternatively, exported context key variables' static
// type should be a pointer or interface.
+//
+//go:fix inline
func WithValue(parent Context, key, val interface{}) Context {
return context.WithValue(parent, key, val)
}
diff --git a/hack/tools/vendor/golang.org/x/net/html/escape.go b/hack/tools/vendor/golang.org/x/net/html/escape.go
index 04c6bec21073..12f227370625 100644
--- a/hack/tools/vendor/golang.org/x/net/html/escape.go
+++ b/hack/tools/vendor/golang.org/x/net/html/escape.go
@@ -299,7 +299,7 @@ func escape(w writer, s string) error {
case '\r':
esc = "
"
default:
- panic("unrecognized escape character")
+ panic("html: unrecognized escape character")
}
s = s[i+1:]
if _, err := w.WriteString(esc); err != nil {
diff --git a/hack/tools/vendor/golang.org/x/net/html/parse.go b/hack/tools/vendor/golang.org/x/net/html/parse.go
index 518ee4c94e74..88fc0056a347 100644
--- a/hack/tools/vendor/golang.org/x/net/html/parse.go
+++ b/hack/tools/vendor/golang.org/x/net/html/parse.go
@@ -136,7 +136,7 @@ func (p *parser) indexOfElementInScope(s scope, matchTags ...a.Atom) int {
return -1
}
default:
- panic("unreachable")
+ panic(fmt.Sprintf("html: internal error: indexOfElementInScope unknown scope: %d", s))
}
}
switch s {
@@ -179,7 +179,7 @@ func (p *parser) clearStackToContext(s scope) {
return
}
default:
- panic("unreachable")
+ panic(fmt.Sprintf("html: internal error: clearStackToContext unknown scope: %d", s))
}
}
}
@@ -231,7 +231,14 @@ func (p *parser) addChild(n *Node) {
}
if n.Type == ElementNode {
- p.oe = append(p.oe, n)
+ p.insertOpenElement(n)
+ }
+}
+
+func (p *parser) insertOpenElement(n *Node) {
+ p.oe = append(p.oe, n)
+ if len(p.oe) > 512 {
+ panic("html: open stack of elements exceeds 512 nodes")
}
}
@@ -810,7 +817,7 @@ func afterHeadIM(p *parser) bool {
p.im = inFramesetIM
return true
case a.Base, a.Basefont, a.Bgsound, a.Link, a.Meta, a.Noframes, a.Script, a.Style, a.Template, a.Title:
- p.oe = append(p.oe, p.head)
+ p.insertOpenElement(p.head)
defer p.oe.remove(p.head)
return inHeadIM(p)
case a.Head:
@@ -1678,7 +1685,7 @@ func inTableBodyIM(p *parser) bool {
return inTableIM(p)
}
-// Section 12.2.6.4.14.
+// Section 13.2.6.4.14.
func inRowIM(p *parser) bool {
switch p.tok.Type {
case StartTagToken:
@@ -1690,7 +1697,9 @@ func inRowIM(p *parser) bool {
p.im = inCellIM
return true
case a.Caption, a.Col, a.Colgroup, a.Tbody, a.Tfoot, a.Thead, a.Tr:
- if p.popUntil(tableScope, a.Tr) {
+ if p.elementInScope(tableScope, a.Tr) {
+ p.clearStackToContext(tableRowScope)
+ p.oe.pop()
p.im = inTableBodyIM
return false
}
@@ -1700,22 +1709,28 @@ func inRowIM(p *parser) bool {
case EndTagToken:
switch p.tok.DataAtom {
case a.Tr:
- if p.popUntil(tableScope, a.Tr) {
+ if p.elementInScope(tableScope, a.Tr) {
+ p.clearStackToContext(tableRowScope)
+ p.oe.pop()
p.im = inTableBodyIM
return true
}
// Ignore the token.
return true
case a.Table:
- if p.popUntil(tableScope, a.Tr) {
+ if p.elementInScope(tableScope, a.Tr) {
+ p.clearStackToContext(tableRowScope)
+ p.oe.pop()
p.im = inTableBodyIM
return false
}
// Ignore the token.
return true
case a.Tbody, a.Tfoot, a.Thead:
- if p.elementInScope(tableScope, p.tok.DataAtom) {
- p.parseImpliedToken(EndTagToken, a.Tr, a.Tr.String())
+ if p.elementInScope(tableScope, p.tok.DataAtom) && p.elementInScope(tableScope, a.Tr) {
+ p.clearStackToContext(tableRowScope)
+ p.oe.pop()
+ p.im = inTableBodyIM
return false
}
// Ignore the token.
@@ -2222,16 +2237,20 @@ func parseForeignContent(p *parser) bool {
p.acknowledgeSelfClosingTag()
}
case EndTagToken:
+ if strings.EqualFold(p.oe[len(p.oe)-1].Data, p.tok.Data) {
+ p.oe = p.oe[:len(p.oe)-1]
+ return true
+ }
for i := len(p.oe) - 1; i >= 0; i-- {
- if p.oe[i].Namespace == "" {
- return p.im(p)
- }
if strings.EqualFold(p.oe[i].Data, p.tok.Data) {
p.oe = p.oe[:i]
+ return true
+ }
+ if i > 0 && p.oe[i-1].Namespace == "" {
break
}
}
- return true
+ return p.im(p)
default:
// Ignore the token.
}
@@ -2312,9 +2331,13 @@ func (p *parser) parseCurrentToken() {
}
}
-func (p *parser) parse() error {
+func (p *parser) parse() (err error) {
+ defer func() {
+ if panicErr := recover(); panicErr != nil {
+ err = fmt.Errorf("%s", panicErr)
+ }
+ }()
// Iterate until EOF. Any other error will cause an early return.
- var err error
for err != io.EOF {
// CDATA sections are allowed only in foreign content.
n := p.oe.top()
@@ -2343,6 +2366,8 @@ func (p *parser) parse() error {
// s. Conversely, explicit s in r's data can be silently dropped,
// with no corresponding node in the resulting tree.
//
+// Parse will reject HTML that is nested deeper than 512 elements.
+//
// The input is assumed to be UTF-8 encoded.
func Parse(r io.Reader) (*Node, error) {
return ParseWithOptions(r)
diff --git a/hack/tools/vendor/golang.org/x/net/html/render.go b/hack/tools/vendor/golang.org/x/net/html/render.go
index e8c12334553d..0157d89e1fda 100644
--- a/hack/tools/vendor/golang.org/x/net/html/render.go
+++ b/hack/tools/vendor/golang.org/x/net/html/render.go
@@ -184,7 +184,7 @@ func render1(w writer, n *Node) error {
return err
}
- // Add initial newline where there is danger of a newline beging ignored.
+ // Add initial newline where there is danger of a newline being ignored.
if c := n.FirstChild; c != nil && c.Type == TextNode && strings.HasPrefix(c.Data, "\n") {
switch n.Data {
case "pre", "listing", "textarea":
diff --git a/hack/tools/vendor/golang.org/x/net/http2/config.go b/hack/tools/vendor/golang.org/x/net/http2/config.go
index ca645d9a1aff..8a7a89d016ed 100644
--- a/hack/tools/vendor/golang.org/x/net/http2/config.go
+++ b/hack/tools/vendor/golang.org/x/net/http2/config.go
@@ -27,6 +27,7 @@ import (
// - If the resulting value is zero or out of range, use a default.
type http2Config struct {
MaxConcurrentStreams uint32
+ StrictMaxConcurrentRequests bool
MaxDecoderHeaderTableSize uint32
MaxEncoderHeaderTableSize uint32
MaxReadFrameSize uint32
@@ -55,7 +56,7 @@ func configFromServer(h1 *http.Server, h2 *Server) http2Config {
PermitProhibitedCipherSuites: h2.PermitProhibitedCipherSuites,
CountError: h2.CountError,
}
- fillNetHTTPServerConfig(&conf, h1)
+ fillNetHTTPConfig(&conf, h1.HTTP2)
setConfigDefaults(&conf, true)
return conf
}
@@ -64,12 +65,13 @@ func configFromServer(h1 *http.Server, h2 *Server) http2Config {
// (the net/http Transport).
func configFromTransport(h2 *Transport) http2Config {
conf := http2Config{
- MaxEncoderHeaderTableSize: h2.MaxEncoderHeaderTableSize,
- MaxDecoderHeaderTableSize: h2.MaxDecoderHeaderTableSize,
- MaxReadFrameSize: h2.MaxReadFrameSize,
- SendPingTimeout: h2.ReadIdleTimeout,
- PingTimeout: h2.PingTimeout,
- WriteByteTimeout: h2.WriteByteTimeout,
+ StrictMaxConcurrentRequests: h2.StrictMaxConcurrentStreams,
+ MaxEncoderHeaderTableSize: h2.MaxEncoderHeaderTableSize,
+ MaxDecoderHeaderTableSize: h2.MaxDecoderHeaderTableSize,
+ MaxReadFrameSize: h2.MaxReadFrameSize,
+ SendPingTimeout: h2.ReadIdleTimeout,
+ PingTimeout: h2.PingTimeout,
+ WriteByteTimeout: h2.WriteByteTimeout,
}
// Unlike most config fields, where out-of-range values revert to the default,
@@ -81,7 +83,7 @@ func configFromTransport(h2 *Transport) http2Config {
}
if h2.t1 != nil {
- fillNetHTTPTransportConfig(&conf, h2.t1)
+ fillNetHTTPConfig(&conf, h2.t1.HTTP2)
}
setConfigDefaults(&conf, false)
return conf
@@ -120,3 +122,48 @@ func adjustHTTP1MaxHeaderSize(n int64) int64 {
const typicalHeaders = 10 // conservative
return n + typicalHeaders*perFieldOverhead
}
+
+func fillNetHTTPConfig(conf *http2Config, h2 *http.HTTP2Config) {
+ if h2 == nil {
+ return
+ }
+ if h2.MaxConcurrentStreams != 0 {
+ conf.MaxConcurrentStreams = uint32(h2.MaxConcurrentStreams)
+ }
+ if http2ConfigStrictMaxConcurrentRequests(h2) {
+ conf.StrictMaxConcurrentRequests = true
+ }
+ if h2.MaxEncoderHeaderTableSize != 0 {
+ conf.MaxEncoderHeaderTableSize = uint32(h2.MaxEncoderHeaderTableSize)
+ }
+ if h2.MaxDecoderHeaderTableSize != 0 {
+ conf.MaxDecoderHeaderTableSize = uint32(h2.MaxDecoderHeaderTableSize)
+ }
+ if h2.MaxConcurrentStreams != 0 {
+ conf.MaxConcurrentStreams = uint32(h2.MaxConcurrentStreams)
+ }
+ if h2.MaxReadFrameSize != 0 {
+ conf.MaxReadFrameSize = uint32(h2.MaxReadFrameSize)
+ }
+ if h2.MaxReceiveBufferPerConnection != 0 {
+ conf.MaxUploadBufferPerConnection = int32(h2.MaxReceiveBufferPerConnection)
+ }
+ if h2.MaxReceiveBufferPerStream != 0 {
+ conf.MaxUploadBufferPerStream = int32(h2.MaxReceiveBufferPerStream)
+ }
+ if h2.SendPingTimeout != 0 {
+ conf.SendPingTimeout = h2.SendPingTimeout
+ }
+ if h2.PingTimeout != 0 {
+ conf.PingTimeout = h2.PingTimeout
+ }
+ if h2.WriteByteTimeout != 0 {
+ conf.WriteByteTimeout = h2.WriteByteTimeout
+ }
+ if h2.PermitProhibitedCipherSuites {
+ conf.PermitProhibitedCipherSuites = true
+ }
+ if h2.CountError != nil {
+ conf.CountError = h2.CountError
+ }
+}
diff --git a/hack/tools/vendor/golang.org/x/net/http2/config_go124.go b/hack/tools/vendor/golang.org/x/net/http2/config_go124.go
deleted file mode 100644
index 5b516c55fffd..000000000000
--- a/hack/tools/vendor/golang.org/x/net/http2/config_go124.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2024 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build go1.24
-
-package http2
-
-import "net/http"
-
-// fillNetHTTPServerConfig sets fields in conf from srv.HTTP2.
-func fillNetHTTPServerConfig(conf *http2Config, srv *http.Server) {
- fillNetHTTPConfig(conf, srv.HTTP2)
-}
-
-// fillNetHTTPTransportConfig sets fields in conf from tr.HTTP2.
-func fillNetHTTPTransportConfig(conf *http2Config, tr *http.Transport) {
- fillNetHTTPConfig(conf, tr.HTTP2)
-}
-
-func fillNetHTTPConfig(conf *http2Config, h2 *http.HTTP2Config) {
- if h2 == nil {
- return
- }
- if h2.MaxConcurrentStreams != 0 {
- conf.MaxConcurrentStreams = uint32(h2.MaxConcurrentStreams)
- }
- if h2.MaxEncoderHeaderTableSize != 0 {
- conf.MaxEncoderHeaderTableSize = uint32(h2.MaxEncoderHeaderTableSize)
- }
- if h2.MaxDecoderHeaderTableSize != 0 {
- conf.MaxDecoderHeaderTableSize = uint32(h2.MaxDecoderHeaderTableSize)
- }
- if h2.MaxConcurrentStreams != 0 {
- conf.MaxConcurrentStreams = uint32(h2.MaxConcurrentStreams)
- }
- if h2.MaxReadFrameSize != 0 {
- conf.MaxReadFrameSize = uint32(h2.MaxReadFrameSize)
- }
- if h2.MaxReceiveBufferPerConnection != 0 {
- conf.MaxUploadBufferPerConnection = int32(h2.MaxReceiveBufferPerConnection)
- }
- if h2.MaxReceiveBufferPerStream != 0 {
- conf.MaxUploadBufferPerStream = int32(h2.MaxReceiveBufferPerStream)
- }
- if h2.SendPingTimeout != 0 {
- conf.SendPingTimeout = h2.SendPingTimeout
- }
- if h2.PingTimeout != 0 {
- conf.PingTimeout = h2.PingTimeout
- }
- if h2.WriteByteTimeout != 0 {
- conf.WriteByteTimeout = h2.WriteByteTimeout
- }
- if h2.PermitProhibitedCipherSuites {
- conf.PermitProhibitedCipherSuites = true
- }
- if h2.CountError != nil {
- conf.CountError = h2.CountError
- }
-}
diff --git a/hack/tools/vendor/golang.org/x/net/http2/config_go125.go b/hack/tools/vendor/golang.org/x/net/http2/config_go125.go
new file mode 100644
index 000000000000..b4373fe33c3d
--- /dev/null
+++ b/hack/tools/vendor/golang.org/x/net/http2/config_go125.go
@@ -0,0 +1,15 @@
+// Copyright 2025 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !go1.26
+
+package http2
+
+import (
+ "net/http"
+)
+
+func http2ConfigStrictMaxConcurrentRequests(h2 *http.HTTP2Config) bool {
+ return false
+}
diff --git a/hack/tools/vendor/golang.org/x/net/http2/config_go126.go b/hack/tools/vendor/golang.org/x/net/http2/config_go126.go
new file mode 100644
index 000000000000..6b071c149d22
--- /dev/null
+++ b/hack/tools/vendor/golang.org/x/net/http2/config_go126.go
@@ -0,0 +1,15 @@
+// Copyright 2025 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build go1.26
+
+package http2
+
+import (
+ "net/http"
+)
+
+func http2ConfigStrictMaxConcurrentRequests(h2 *http.HTTP2Config) bool {
+ return h2.StrictMaxConcurrentRequests
+}
diff --git a/hack/tools/vendor/golang.org/x/net/http2/config_pre_go124.go b/hack/tools/vendor/golang.org/x/net/http2/config_pre_go124.go
deleted file mode 100644
index 060fd6c64c6c..000000000000
--- a/hack/tools/vendor/golang.org/x/net/http2/config_pre_go124.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2024 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build !go1.24
-
-package http2
-
-import "net/http"
-
-// Pre-Go 1.24 fallback.
-// The Server.HTTP2 and Transport.HTTP2 config fields were added in Go 1.24.
-
-func fillNetHTTPServerConfig(conf *http2Config, srv *http.Server) {}
-
-func fillNetHTTPTransportConfig(conf *http2Config, tr *http.Transport) {}
diff --git a/hack/tools/vendor/golang.org/x/net/http2/frame.go b/hack/tools/vendor/golang.org/x/net/http2/frame.go
index db3264da8cc8..9a4bd123c95e 100644
--- a/hack/tools/vendor/golang.org/x/net/http2/frame.go
+++ b/hack/tools/vendor/golang.org/x/net/http2/frame.go
@@ -280,6 +280,8 @@ type Framer struct {
// lastHeaderStream is non-zero if the last frame was an
// unfinished HEADERS/CONTINUATION.
lastHeaderStream uint32
+ // lastFrameType holds the type of the last frame for verifying frame order.
+ lastFrameType FrameType
maxReadSize uint32
headerBuf [frameHeaderLen]byte
@@ -347,7 +349,7 @@ func (fr *Framer) maxHeaderListSize() uint32 {
func (f *Framer) startWrite(ftype FrameType, flags Flags, streamID uint32) {
// Write the FrameHeader.
f.wbuf = append(f.wbuf[:0],
- 0, // 3 bytes of length, filled in in endWrite
+ 0, // 3 bytes of length, filled in endWrite
0,
0,
byte(ftype),
@@ -488,30 +490,41 @@ func terminalReadFrameError(err error) bool {
return err != nil
}
-// ReadFrame reads a single frame. The returned Frame is only valid
-// until the next call to ReadFrame.
+// ReadFrameHeader reads the header of the next frame.
+// It reads the 9-byte fixed frame header, and does not read any portion of the
+// frame payload. The caller is responsible for consuming the payload, either
+// with ReadFrameForHeader or directly from the Framer's io.Reader.
//
-// If the frame is larger than previously set with SetMaxReadFrameSize, the
-// returned error is ErrFrameTooLarge. Other errors may be of type
-// ConnectionError, StreamError, or anything else from the underlying
-// reader.
+// If the frame is larger than previously set with SetMaxReadFrameSize, it
+// returns the frame header and ErrFrameTooLarge.
//
-// If ReadFrame returns an error and a non-nil Frame, the Frame's StreamID
-// indicates the stream responsible for the error.
-func (fr *Framer) ReadFrame() (Frame, error) {
+// If the returned FrameHeader.StreamID is non-zero, it indicates the stream
+// responsible for the error.
+func (fr *Framer) ReadFrameHeader() (FrameHeader, error) {
fr.errDetail = nil
- if fr.lastFrame != nil {
- fr.lastFrame.invalidate()
- }
fh, err := readFrameHeader(fr.headerBuf[:], fr.r)
if err != nil {
- return nil, err
+ return fh, err
}
if fh.Length > fr.maxReadSize {
if fh == invalidHTTP1LookingFrameHeader() {
- return nil, fmt.Errorf("http2: failed reading the frame payload: %w, note that the frame header looked like an HTTP/1.1 header", ErrFrameTooLarge)
+ return fh, fmt.Errorf("http2: failed reading the frame payload: %w, note that the frame header looked like an HTTP/1.1 header", ErrFrameTooLarge)
}
- return nil, ErrFrameTooLarge
+ return fh, ErrFrameTooLarge
+ }
+ if err := fr.checkFrameOrder(fh); err != nil {
+ return fh, err
+ }
+ return fh, nil
+}
+
+// ReadFrameForHeader reads the payload for the frame with the given FrameHeader.
+//
+// It behaves identically to ReadFrame, other than not checking the maximum
+// frame size.
+func (fr *Framer) ReadFrameForHeader(fh FrameHeader) (Frame, error) {
+ if fr.lastFrame != nil {
+ fr.lastFrame.invalidate()
}
payload := fr.getReadBuf(fh.Length)
if _, err := io.ReadFull(fr.r, payload); err != nil {
@@ -527,9 +540,7 @@ func (fr *Framer) ReadFrame() (Frame, error) {
}
return nil, err
}
- if err := fr.checkFrameOrder(f); err != nil {
- return nil, err
- }
+ fr.lastFrame = f
if fr.logReads {
fr.debugReadLoggerf("http2: Framer %p: read %v", fr, summarizeFrame(f))
}
@@ -539,6 +550,24 @@ func (fr *Framer) ReadFrame() (Frame, error) {
return f, nil
}
+// ReadFrame reads a single frame. The returned Frame is only valid
+// until the next call to ReadFrame or ReadFrameBodyForHeader.
+//
+// If the frame is larger than previously set with SetMaxReadFrameSize, the
+// returned error is ErrFrameTooLarge. Other errors may be of type
+// ConnectionError, StreamError, or anything else from the underlying
+// reader.
+//
+// If ReadFrame returns an error and a non-nil Frame, the Frame's StreamID
+// indicates the stream responsible for the error.
+func (fr *Framer) ReadFrame() (Frame, error) {
+ fh, err := fr.ReadFrameHeader()
+ if err != nil {
+ return nil, err
+ }
+ return fr.ReadFrameForHeader(fh)
+}
+
// connError returns ConnectionError(code) but first
// stashes away a public reason to the caller can optionally relay it
// to the peer before hanging up on them. This might help others debug
@@ -551,20 +580,19 @@ func (fr *Framer) connError(code ErrCode, reason string) error {
// checkFrameOrder reports an error if f is an invalid frame to return
// next from ReadFrame. Mostly it checks whether HEADERS and
// CONTINUATION frames are contiguous.
-func (fr *Framer) checkFrameOrder(f Frame) error {
- last := fr.lastFrame
- fr.lastFrame = f
+func (fr *Framer) checkFrameOrder(fh FrameHeader) error {
+ lastType := fr.lastFrameType
+ fr.lastFrameType = fh.Type
if fr.AllowIllegalReads {
return nil
}
- fh := f.Header()
if fr.lastHeaderStream != 0 {
if fh.Type != FrameContinuation {
return fr.connError(ErrCodeProtocol,
fmt.Sprintf("got %s for stream %d; expected CONTINUATION following %s for stream %d",
fh.Type, fh.StreamID,
- last.Header().Type, fr.lastHeaderStream))
+ lastType, fr.lastHeaderStream))
}
if fh.StreamID != fr.lastHeaderStream {
return fr.connError(ErrCodeProtocol,
@@ -1152,7 +1180,16 @@ type PriorityFrame struct {
PriorityParam
}
-// PriorityParam are the stream prioritzation parameters.
+var defaultRFC9218Priority = PriorityParam{
+ incremental: 0,
+ urgency: 3,
+}
+
+// Note that HTTP/2 has had two different prioritization schemes, and
+// PriorityParam struct below is a superset of both schemes. The exported
+// symbols are from RFC 7540 and the non-exported ones are from RFC 9218.
+
+// PriorityParam are the stream prioritization parameters.
type PriorityParam struct {
// StreamDep is a 31-bit stream identifier for the
// stream that this stream depends on. Zero means no
@@ -1167,6 +1204,20 @@ type PriorityParam struct {
// the spec, "Add one to the value to obtain a weight between
// 1 and 256."
Weight uint8
+
+ // "The urgency (u) parameter value is Integer (see Section 3.3.1 of
+ // [STRUCTURED-FIELDS]), between 0 and 7 inclusive, in descending order of
+ // priority. The default is 3."
+ urgency uint8
+
+ // "The incremental (i) parameter value is Boolean (see Section 3.3.6 of
+ // [STRUCTURED-FIELDS]). It indicates if an HTTP response can be processed
+ // incrementally, i.e., provide some meaningful output as chunks of the
+ // response arrive."
+ //
+ // We use uint8 (i.e. 0 is false, 1 is true) instead of bool so we can
+ // avoid unnecessary type conversions and because either type takes 1 byte.
+ incremental uint8
}
func (p PriorityParam) IsZero() bool {
diff --git a/hack/tools/vendor/golang.org/x/net/http2/gotrack.go b/hack/tools/vendor/golang.org/x/net/http2/gotrack.go
index 9933c9f8c748..9921ca096d39 100644
--- a/hack/tools/vendor/golang.org/x/net/http2/gotrack.go
+++ b/hack/tools/vendor/golang.org/x/net/http2/gotrack.go
@@ -15,21 +15,32 @@ import (
"runtime"
"strconv"
"sync"
+ "sync/atomic"
)
var DebugGoroutines = os.Getenv("DEBUG_HTTP2_GOROUTINES") == "1"
+// Setting DebugGoroutines to false during a test to disable goroutine debugging
+// results in race detector complaints when a test leaves goroutines running before
+// returning. Tests shouldn't do this, of course, but when they do it generally shows
+// up as infrequent, hard-to-debug flakes. (See #66519.)
+//
+// Disable goroutine debugging during individual tests with an atomic bool.
+// (Note that it's safe to enable/disable debugging mid-test, so the actual race condition
+// here is harmless.)
+var disableDebugGoroutines atomic.Bool
+
type goroutineLock uint64
func newGoroutineLock() goroutineLock {
- if !DebugGoroutines {
+ if !DebugGoroutines || disableDebugGoroutines.Load() {
return 0
}
return goroutineLock(curGoroutineID())
}
func (g goroutineLock) check() {
- if !DebugGoroutines {
+ if !DebugGoroutines || disableDebugGoroutines.Load() {
return
}
if curGoroutineID() != uint64(g) {
@@ -38,7 +49,7 @@ func (g goroutineLock) check() {
}
func (g goroutineLock) checkNotOn() {
- if !DebugGoroutines {
+ if !DebugGoroutines || disableDebugGoroutines.Load() {
return
}
if curGoroutineID() == uint64(g) {
diff --git a/hack/tools/vendor/golang.org/x/net/http2/http2.go b/hack/tools/vendor/golang.org/x/net/http2/http2.go
index 6c18ea230be0..105fe12fefaa 100644
--- a/hack/tools/vendor/golang.org/x/net/http2/http2.go
+++ b/hack/tools/vendor/golang.org/x/net/http2/http2.go
@@ -11,13 +11,10 @@
// requires Go 1.6 or later)
//
// See https://http2.github.io/ for more information on HTTP/2.
-//
-// See https://http2.golang.org/ for a test server running this code.
package http2 // import "golang.org/x/net/http2"
import (
"bufio"
- "context"
"crypto/tls"
"errors"
"fmt"
@@ -37,7 +34,6 @@ var (
VerboseLogs bool
logFrameWrites bool
logFrameReads bool
- inTests bool
// Enabling extended CONNECT by causes browsers to attempt to use
// WebSockets-over-HTTP/2. This results in problems when the server's websocket
@@ -257,15 +253,13 @@ func (cw closeWaiter) Wait() {
// idle memory usage with many connections.
type bufferedWriter struct {
_ incomparable
- group synctestGroupInterface // immutable
- conn net.Conn // immutable
- bw *bufio.Writer // non-nil when data is buffered
- byteTimeout time.Duration // immutable, WriteByteTimeout
+ conn net.Conn // immutable
+ bw *bufio.Writer // non-nil when data is buffered
+ byteTimeout time.Duration // immutable, WriteByteTimeout
}
-func newBufferedWriter(group synctestGroupInterface, conn net.Conn, timeout time.Duration) *bufferedWriter {
+func newBufferedWriter(conn net.Conn, timeout time.Duration) *bufferedWriter {
return &bufferedWriter{
- group: group,
conn: conn,
byteTimeout: timeout,
}
@@ -316,24 +310,18 @@ func (w *bufferedWriter) Flush() error {
type bufferedWriterTimeoutWriter bufferedWriter
func (w *bufferedWriterTimeoutWriter) Write(p []byte) (n int, err error) {
- return writeWithByteTimeout(w.group, w.conn, w.byteTimeout, p)
+ return writeWithByteTimeout(w.conn, w.byteTimeout, p)
}
// writeWithByteTimeout writes to conn.
// If more than timeout passes without any bytes being written to the connection,
// the write fails.
-func writeWithByteTimeout(group synctestGroupInterface, conn net.Conn, timeout time.Duration, p []byte) (n int, err error) {
+func writeWithByteTimeout(conn net.Conn, timeout time.Duration, p []byte) (n int, err error) {
if timeout <= 0 {
return conn.Write(p)
}
for {
- var now time.Time
- if group == nil {
- now = time.Now()
- } else {
- now = group.Now()
- }
- conn.SetWriteDeadline(now.Add(timeout))
+ conn.SetWriteDeadline(time.Now().Add(timeout))
nn, err := conn.Write(p[n:])
n += nn
if n == len(p) || nn == 0 || !errors.Is(err, os.ErrDeadlineExceeded) {
@@ -419,14 +407,3 @@ func (s *sorter) SortStrings(ss []string) {
// makes that struct also non-comparable, and generally doesn't add
// any size (as long as it's first).
type incomparable [0]func()
-
-// synctestGroupInterface is the methods of synctestGroup used by Server and Transport.
-// It's defined as an interface here to let us keep synctestGroup entirely test-only
-// and not a part of non-test builds.
-type synctestGroupInterface interface {
- Join()
- Now() time.Time
- NewTimer(d time.Duration) timer
- AfterFunc(d time.Duration, f func()) timer
- ContextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc)
-}
diff --git a/hack/tools/vendor/golang.org/x/net/http2/server.go b/hack/tools/vendor/golang.org/x/net/http2/server.go
index 51fca38f61d7..bdc5520ebd3e 100644
--- a/hack/tools/vendor/golang.org/x/net/http2/server.go
+++ b/hack/tools/vendor/golang.org/x/net/http2/server.go
@@ -176,44 +176,15 @@ type Server struct {
// so that we don't embed a Mutex in this struct, which will make the
// struct non-copyable, which might break some callers.
state *serverInternalState
-
- // Synchronization group used for testing.
- // Outside of tests, this is nil.
- group synctestGroupInterface
-}
-
-func (s *Server) markNewGoroutine() {
- if s.group != nil {
- s.group.Join()
- }
-}
-
-func (s *Server) now() time.Time {
- if s.group != nil {
- return s.group.Now()
- }
- return time.Now()
-}
-
-// newTimer creates a new time.Timer, or a synthetic timer in tests.
-func (s *Server) newTimer(d time.Duration) timer {
- if s.group != nil {
- return s.group.NewTimer(d)
- }
- return timeTimer{time.NewTimer(d)}
-}
-
-// afterFunc creates a new time.AfterFunc timer, or a synthetic timer in tests.
-func (s *Server) afterFunc(d time.Duration, f func()) timer {
- if s.group != nil {
- return s.group.AfterFunc(d, f)
- }
- return timeTimer{time.AfterFunc(d, f)}
}
type serverInternalState struct {
mu sync.Mutex
activeConns map[*serverConn]struct{}
+
+ // Pool of error channels. This is per-Server rather than global
+ // because channels can't be reused across synctest bubbles.
+ errChanPool sync.Pool
}
func (s *serverInternalState) registerConn(sc *serverConn) {
@@ -245,6 +216,27 @@ func (s *serverInternalState) startGracefulShutdown() {
s.mu.Unlock()
}
+// Global error channel pool used for uninitialized Servers.
+// We use a per-Server pool when possible to avoid using channels across synctest bubbles.
+var errChanPool = sync.Pool{
+ New: func() any { return make(chan error, 1) },
+}
+
+func (s *serverInternalState) getErrChan() chan error {
+ if s == nil {
+ return errChanPool.Get().(chan error) // Server used without calling ConfigureServer
+ }
+ return s.errChanPool.Get().(chan error)
+}
+
+func (s *serverInternalState) putErrChan(ch chan error) {
+ if s == nil {
+ errChanPool.Put(ch) // Server used without calling ConfigureServer
+ return
+ }
+ s.errChanPool.Put(ch)
+}
+
// ConfigureServer adds HTTP/2 support to a net/http Server.
//
// The configuration conf may be nil.
@@ -257,7 +249,10 @@ func ConfigureServer(s *http.Server, conf *Server) error {
if conf == nil {
conf = new(Server)
}
- conf.state = &serverInternalState{activeConns: make(map[*serverConn]struct{})}
+ conf.state = &serverInternalState{
+ activeConns: make(map[*serverConn]struct{}),
+ errChanPool: sync.Pool{New: func() any { return make(chan error, 1) }},
+ }
if h1, h2 := s, conf; h2.IdleTimeout == 0 {
if h1.IdleTimeout != 0 {
h2.IdleTimeout = h1.IdleTimeout
@@ -423,6 +418,9 @@ func (o *ServeConnOpts) handler() http.Handler {
//
// The opts parameter is optional. If nil, default values are used.
func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
+ if opts == nil {
+ opts = &ServeConnOpts{}
+ }
s.serveConn(c, opts, nil)
}
@@ -438,7 +436,7 @@ func (s *Server) serveConn(c net.Conn, opts *ServeConnOpts, newf func(*serverCon
conn: c,
baseCtx: baseCtx,
remoteAddrStr: c.RemoteAddr().String(),
- bw: newBufferedWriter(s.group, c, conf.WriteByteTimeout),
+ bw: newBufferedWriter(c, conf.WriteByteTimeout),
handler: opts.handler(),
streams: make(map[uint32]*stream),
readFrameCh: make(chan readFrameResult),
@@ -638,11 +636,11 @@ type serverConn struct {
pingSent bool
sentPingData [8]byte
goAwayCode ErrCode
- shutdownTimer timer // nil until used
- idleTimer timer // nil if unused
+ shutdownTimer *time.Timer // nil until used
+ idleTimer *time.Timer // nil if unused
readIdleTimeout time.Duration
pingTimeout time.Duration
- readIdleTimer timer // nil if unused
+ readIdleTimer *time.Timer // nil if unused
// Owned by the writeFrameAsync goroutine:
headerWriteBuf bytes.Buffer
@@ -687,12 +685,12 @@ type stream struct {
flow outflow // limits writing from Handler to client
inflow inflow // what the client is allowed to POST/etc to us
state streamState
- resetQueued bool // RST_STREAM queued for write; set by sc.resetStream
- gotTrailerHeader bool // HEADER frame for trailers was seen
- wroteHeaders bool // whether we wrote headers (not status 100)
- readDeadline timer // nil if unused
- writeDeadline timer // nil if unused
- closeErr error // set before cw is closed
+ resetQueued bool // RST_STREAM queued for write; set by sc.resetStream
+ gotTrailerHeader bool // HEADER frame for trailers was seen
+ wroteHeaders bool // whether we wrote headers (not status 100)
+ readDeadline *time.Timer // nil if unused
+ writeDeadline *time.Timer // nil if unused
+ closeErr error // set before cw is closed
trailer http.Header // accumulated trailers
reqTrailer http.Header // handler's Request.Trailer
@@ -848,7 +846,6 @@ type readFrameResult struct {
// consumer is done with the frame.
// It's run on its own goroutine.
func (sc *serverConn) readFrames() {
- sc.srv.markNewGoroutine()
gate := make(chan struct{})
gateDone := func() { gate <- struct{}{} }
for {
@@ -881,7 +878,6 @@ type frameWriteResult struct {
// At most one goroutine can be running writeFrameAsync at a time per
// serverConn.
func (sc *serverConn) writeFrameAsync(wr FrameWriteRequest, wd *writeData) {
- sc.srv.markNewGoroutine()
var err error
if wd == nil {
err = wr.write.writeFrame(sc)
@@ -965,22 +961,22 @@ func (sc *serverConn) serve(conf http2Config) {
sc.setConnState(http.StateIdle)
if sc.srv.IdleTimeout > 0 {
- sc.idleTimer = sc.srv.afterFunc(sc.srv.IdleTimeout, sc.onIdleTimer)
+ sc.idleTimer = time.AfterFunc(sc.srv.IdleTimeout, sc.onIdleTimer)
defer sc.idleTimer.Stop()
}
if conf.SendPingTimeout > 0 {
sc.readIdleTimeout = conf.SendPingTimeout
- sc.readIdleTimer = sc.srv.afterFunc(conf.SendPingTimeout, sc.onReadIdleTimer)
+ sc.readIdleTimer = time.AfterFunc(conf.SendPingTimeout, sc.onReadIdleTimer)
defer sc.readIdleTimer.Stop()
}
go sc.readFrames() // closed by defer sc.conn.Close above
- settingsTimer := sc.srv.afterFunc(firstSettingsTimeout, sc.onSettingsTimer)
+ settingsTimer := time.AfterFunc(firstSettingsTimeout, sc.onSettingsTimer)
defer settingsTimer.Stop()
- lastFrameTime := sc.srv.now()
+ lastFrameTime := time.Now()
loopNum := 0
for {
loopNum++
@@ -994,7 +990,7 @@ func (sc *serverConn) serve(conf http2Config) {
case res := <-sc.wroteFrameCh:
sc.wroteFrame(res)
case res := <-sc.readFrameCh:
- lastFrameTime = sc.srv.now()
+ lastFrameTime = time.Now()
// Process any written frames before reading new frames from the client since a
// written frame could have triggered a new stream to be started.
if sc.writingFrameAsync {
@@ -1077,7 +1073,7 @@ func (sc *serverConn) handlePingTimer(lastFrameReadTime time.Time) {
}
pingAt := lastFrameReadTime.Add(sc.readIdleTimeout)
- now := sc.srv.now()
+ now := time.Now()
if pingAt.After(now) {
// We received frames since arming the ping timer.
// Reset it for the next possible timeout.
@@ -1141,10 +1137,10 @@ func (sc *serverConn) readPreface() error {
errc <- nil
}
}()
- timer := sc.srv.newTimer(prefaceTimeout) // TODO: configurable on *Server?
+ timer := time.NewTimer(prefaceTimeout) // TODO: configurable on *Server?
defer timer.Stop()
select {
- case <-timer.C():
+ case <-timer.C:
return errPrefaceTimeout
case err := <-errc:
if err == nil {
@@ -1156,10 +1152,6 @@ func (sc *serverConn) readPreface() error {
}
}
-var errChanPool = sync.Pool{
- New: func() interface{} { return make(chan error, 1) },
-}
-
var writeDataPool = sync.Pool{
New: func() interface{} { return new(writeData) },
}
@@ -1167,7 +1159,7 @@ var writeDataPool = sync.Pool{
// writeDataFromHandler writes DATA response frames from a handler on
// the given stream.
func (sc *serverConn) writeDataFromHandler(stream *stream, data []byte, endStream bool) error {
- ch := errChanPool.Get().(chan error)
+ ch := sc.srv.state.getErrChan()
writeArg := writeDataPool.Get().(*writeData)
*writeArg = writeData{stream.id, data, endStream}
err := sc.writeFrameFromHandler(FrameWriteRequest{
@@ -1199,7 +1191,7 @@ func (sc *serverConn) writeDataFromHandler(stream *stream, data []byte, endStrea
return errStreamClosed
}
}
- errChanPool.Put(ch)
+ sc.srv.state.putErrChan(ch)
if frameWriteDone {
writeDataPool.Put(writeArg)
}
@@ -1513,7 +1505,7 @@ func (sc *serverConn) goAway(code ErrCode) {
func (sc *serverConn) shutDownIn(d time.Duration) {
sc.serveG.check()
- sc.shutdownTimer = sc.srv.afterFunc(d, sc.onShutdownTimer)
+ sc.shutdownTimer = time.AfterFunc(d, sc.onShutdownTimer)
}
func (sc *serverConn) resetStream(se StreamError) {
@@ -2118,7 +2110,7 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
// (in Go 1.8), though. That's a more sane option anyway.
if sc.hs.ReadTimeout > 0 {
sc.conn.SetReadDeadline(time.Time{})
- st.readDeadline = sc.srv.afterFunc(sc.hs.ReadTimeout, st.onReadTimeout)
+ st.readDeadline = time.AfterFunc(sc.hs.ReadTimeout, st.onReadTimeout)
}
return sc.scheduleHandler(id, rw, req, handler)
@@ -2216,7 +2208,7 @@ func (sc *serverConn) newStream(id, pusherID uint32, state streamState) *stream
st.flow.add(sc.initialStreamSendWindowSize)
st.inflow.init(sc.initialStreamRecvWindowSize)
if sc.hs.WriteTimeout > 0 {
- st.writeDeadline = sc.srv.afterFunc(sc.hs.WriteTimeout, st.onWriteTimeout)
+ st.writeDeadline = time.AfterFunc(sc.hs.WriteTimeout, st.onWriteTimeout)
}
sc.streams[id] = st
@@ -2405,7 +2397,6 @@ func (sc *serverConn) handlerDone() {
// Run on its own goroutine.
func (sc *serverConn) runHandler(rw *responseWriter, req *http.Request, handler func(http.ResponseWriter, *http.Request)) {
- sc.srv.markNewGoroutine()
defer sc.sendServeMsg(handlerDoneMsg)
didPanic := true
defer func() {
@@ -2454,7 +2445,7 @@ func (sc *serverConn) writeHeaders(st *stream, headerData *writeResHeaders) erro
// waiting for this frame to be written, so an http.Flush mid-handler
// writes out the correct value of keys, before a handler later potentially
// mutates it.
- errc = errChanPool.Get().(chan error)
+ errc = sc.srv.state.getErrChan()
}
if err := sc.writeFrameFromHandler(FrameWriteRequest{
write: headerData,
@@ -2466,7 +2457,7 @@ func (sc *serverConn) writeHeaders(st *stream, headerData *writeResHeaders) erro
if errc != nil {
select {
case err := <-errc:
- errChanPool.Put(errc)
+ sc.srv.state.putErrChan(errc)
return err
case <-sc.doneServing:
return errClientDisconnected
@@ -2573,7 +2564,7 @@ func (b *requestBody) Read(p []byte) (n int, err error) {
if err == io.EOF {
b.sawEOF = true
}
- if b.conn == nil && inTests {
+ if b.conn == nil {
return
}
b.conn.noteBodyReadFromHandler(b.stream, n, err)
@@ -2702,7 +2693,7 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {
var date string
if _, ok := rws.snapHeader["Date"]; !ok {
// TODO(bradfitz): be faster here, like net/http? measure.
- date = rws.conn.srv.now().UTC().Format(http.TimeFormat)
+ date = time.Now().UTC().Format(http.TimeFormat)
}
for _, v := range rws.snapHeader["Trailer"] {
@@ -2824,7 +2815,7 @@ func (rws *responseWriterState) promoteUndeclaredTrailers() {
func (w *responseWriter) SetReadDeadline(deadline time.Time) error {
st := w.rws.stream
- if !deadline.IsZero() && deadline.Before(w.rws.conn.srv.now()) {
+ if !deadline.IsZero() && deadline.Before(time.Now()) {
// If we're setting a deadline in the past, reset the stream immediately
// so writes after SetWriteDeadline returns will fail.
st.onReadTimeout()
@@ -2840,9 +2831,9 @@ func (w *responseWriter) SetReadDeadline(deadline time.Time) error {
if deadline.IsZero() {
st.readDeadline = nil
} else if st.readDeadline == nil {
- st.readDeadline = sc.srv.afterFunc(deadline.Sub(sc.srv.now()), st.onReadTimeout)
+ st.readDeadline = time.AfterFunc(deadline.Sub(time.Now()), st.onReadTimeout)
} else {
- st.readDeadline.Reset(deadline.Sub(sc.srv.now()))
+ st.readDeadline.Reset(deadline.Sub(time.Now()))
}
})
return nil
@@ -2850,7 +2841,7 @@ func (w *responseWriter) SetReadDeadline(deadline time.Time) error {
func (w *responseWriter) SetWriteDeadline(deadline time.Time) error {
st := w.rws.stream
- if !deadline.IsZero() && deadline.Before(w.rws.conn.srv.now()) {
+ if !deadline.IsZero() && deadline.Before(time.Now()) {
// If we're setting a deadline in the past, reset the stream immediately
// so writes after SetWriteDeadline returns will fail.
st.onWriteTimeout()
@@ -2866,9 +2857,9 @@ func (w *responseWriter) SetWriteDeadline(deadline time.Time) error {
if deadline.IsZero() {
st.writeDeadline = nil
} else if st.writeDeadline == nil {
- st.writeDeadline = sc.srv.afterFunc(deadline.Sub(sc.srv.now()), st.onWriteTimeout)
+ st.writeDeadline = time.AfterFunc(deadline.Sub(time.Now()), st.onWriteTimeout)
} else {
- st.writeDeadline.Reset(deadline.Sub(sc.srv.now()))
+ st.writeDeadline.Reset(deadline.Sub(time.Now()))
}
})
return nil
@@ -3147,7 +3138,7 @@ func (w *responseWriter) Push(target string, opts *http.PushOptions) error {
method: opts.Method,
url: u,
header: cloneHeader(opts.Header),
- done: errChanPool.Get().(chan error),
+ done: sc.srv.state.getErrChan(),
}
select {
@@ -3164,7 +3155,7 @@ func (w *responseWriter) Push(target string, opts *http.PushOptions) error {
case <-st.cw:
return errStreamClosed
case err := <-msg.done:
- errChanPool.Put(msg.done)
+ sc.srv.state.putErrChan(msg.done)
return err
}
}
diff --git a/hack/tools/vendor/golang.org/x/net/http2/timer.go b/hack/tools/vendor/golang.org/x/net/http2/timer.go
deleted file mode 100644
index 0b1c17b81296..000000000000
--- a/hack/tools/vendor/golang.org/x/net/http2/timer.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2024 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-package http2
-
-import "time"
-
-// A timer is a time.Timer, as an interface which can be replaced in tests.
-type timer = interface {
- C() <-chan time.Time
- Reset(d time.Duration) bool
- Stop() bool
-}
-
-// timeTimer adapts a time.Timer to the timer interface.
-type timeTimer struct {
- *time.Timer
-}
-
-func (t timeTimer) C() <-chan time.Time { return t.Timer.C }
diff --git a/hack/tools/vendor/golang.org/x/net/http2/transport.go b/hack/tools/vendor/golang.org/x/net/http2/transport.go
index f26356b9cd91..1965913e543b 100644
--- a/hack/tools/vendor/golang.org/x/net/http2/transport.go
+++ b/hack/tools/vendor/golang.org/x/net/http2/transport.go
@@ -9,6 +9,7 @@ package http2
import (
"bufio"
"bytes"
+ "compress/flate"
"compress/gzip"
"context"
"crypto/rand"
@@ -193,50 +194,6 @@ type Transport struct {
type transportTestHooks struct {
newclientconn func(*ClientConn)
- group synctestGroupInterface
-}
-
-func (t *Transport) markNewGoroutine() {
- if t != nil && t.transportTestHooks != nil {
- t.transportTestHooks.group.Join()
- }
-}
-
-func (t *Transport) now() time.Time {
- if t != nil && t.transportTestHooks != nil {
- return t.transportTestHooks.group.Now()
- }
- return time.Now()
-}
-
-func (t *Transport) timeSince(when time.Time) time.Duration {
- if t != nil && t.transportTestHooks != nil {
- return t.now().Sub(when)
- }
- return time.Since(when)
-}
-
-// newTimer creates a new time.Timer, or a synthetic timer in tests.
-func (t *Transport) newTimer(d time.Duration) timer {
- if t.transportTestHooks != nil {
- return t.transportTestHooks.group.NewTimer(d)
- }
- return timeTimer{time.NewTimer(d)}
-}
-
-// afterFunc creates a new time.AfterFunc timer, or a synthetic timer in tests.
-func (t *Transport) afterFunc(d time.Duration, f func()) timer {
- if t.transportTestHooks != nil {
- return t.transportTestHooks.group.AfterFunc(d, f)
- }
- return timeTimer{time.AfterFunc(d, f)}
-}
-
-func (t *Transport) contextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc) {
- if t.transportTestHooks != nil {
- return t.transportTestHooks.group.ContextWithTimeout(ctx, d)
- }
- return context.WithTimeout(ctx, d)
}
func (t *Transport) maxHeaderListSize() uint32 {
@@ -366,7 +323,7 @@ type ClientConn struct {
readerErr error // set before readerDone is closed
idleTimeout time.Duration // or 0 for never
- idleTimer timer
+ idleTimer *time.Timer
mu sync.Mutex // guards following
cond *sync.Cond // hold mu; broadcast on flow/closed changes
@@ -399,6 +356,7 @@ type ClientConn struct {
readIdleTimeout time.Duration
pingTimeout time.Duration
extendedConnectAllowed bool
+ strictMaxConcurrentStreams bool
// rstStreamPingsBlocked works around an unfortunate gRPC behavior.
// gRPC strictly limits the number of PING frames that it will receive.
@@ -534,14 +492,12 @@ func (cs *clientStream) closeReqBodyLocked() {
cs.reqBodyClosed = make(chan struct{})
reqBodyClosed := cs.reqBodyClosed
go func() {
- cs.cc.t.markNewGoroutine()
cs.reqBody.Close()
close(reqBodyClosed)
}()
}
type stickyErrWriter struct {
- group synctestGroupInterface
conn net.Conn
timeout time.Duration
err *error
@@ -551,7 +507,7 @@ func (sew stickyErrWriter) Write(p []byte) (n int, err error) {
if *sew.err != nil {
return 0, *sew.err
}
- n, err = writeWithByteTimeout(sew.group, sew.conn, sew.timeout, p)
+ n, err = writeWithByteTimeout(sew.conn, sew.timeout, p)
*sew.err = err
return n, err
}
@@ -650,9 +606,9 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res
backoff := float64(uint(1) << (uint(retry) - 1))
backoff += backoff * (0.1 * mathrand.Float64())
d := time.Second * time.Duration(backoff)
- tm := t.newTimer(d)
+ tm := time.NewTimer(d)
select {
- case <-tm.C():
+ case <-tm.C:
t.vlogf("RoundTrip retrying after failure: %v", roundTripErr)
continue
case <-req.Context().Done():
@@ -699,6 +655,7 @@ var (
errClientConnUnusable = errors.New("http2: client conn not usable")
errClientConnNotEstablished = errors.New("http2: client conn could not be established")
errClientConnGotGoAway = errors.New("http2: Transport received Server's graceful shutdown GOAWAY")
+ errClientConnForceClosed = errors.New("http2: client connection force closed via ClientConn.Close")
)
// shouldRetryRequest is called by RoundTrip when a request fails to get
@@ -829,7 +786,8 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro
initialWindowSize: 65535, // spec default
initialStreamRecvWindowSize: conf.MaxUploadBufferPerStream,
maxConcurrentStreams: initialMaxConcurrentStreams, // "infinite", per spec. Use a smaller value until we have received server settings.
- peerMaxHeaderListSize: 0xffffffffffffffff, // "infinite", per spec. Use 2^64-1 instead.
+ strictMaxConcurrentStreams: conf.StrictMaxConcurrentRequests,
+ peerMaxHeaderListSize: 0xffffffffffffffff, // "infinite", per spec. Use 2^64-1 instead.
streams: make(map[uint32]*clientStream),
singleUse: singleUse,
seenSettingsChan: make(chan struct{}),
@@ -838,14 +796,11 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro
pingTimeout: conf.PingTimeout,
pings: make(map[[8]byte]chan struct{}),
reqHeaderMu: make(chan struct{}, 1),
- lastActive: t.now(),
+ lastActive: time.Now(),
}
- var group synctestGroupInterface
if t.transportTestHooks != nil {
- t.markNewGoroutine()
t.transportTestHooks.newclientconn(cc)
c = cc.tconn
- group = t.group
}
if VerboseLogs {
t.vlogf("http2: Transport creating client conn %p to %v", cc, c.RemoteAddr())
@@ -857,7 +812,6 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro
// TODO: adjust this writer size to account for frame size +
// MTU + crypto/tls record padding.
cc.bw = bufio.NewWriter(stickyErrWriter{
- group: group,
conn: c,
timeout: conf.WriteByteTimeout,
err: &cc.werr,
@@ -906,7 +860,7 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro
// Start the idle timer after the connection is fully initialized.
if d := t.idleConnTimeout(); d != 0 {
cc.idleTimeout = d
- cc.idleTimer = t.afterFunc(d, cc.onIdleTimeout)
+ cc.idleTimer = time.AfterFunc(d, cc.onIdleTimeout)
}
go cc.readLoop()
@@ -917,7 +871,7 @@ func (cc *ClientConn) healthCheck() {
pingTimeout := cc.pingTimeout
// We don't need to periodically ping in the health check, because the readLoop of ClientConn will
// trigger the healthCheck again if there is no frame received.
- ctx, cancel := cc.t.contextWithTimeout(context.Background(), pingTimeout)
+ ctx, cancel := context.WithTimeout(context.Background(), pingTimeout)
defer cancel()
cc.vlogf("http2: Transport sending health check")
err := cc.Ping(ctx)
@@ -1067,7 +1021,7 @@ func (cc *ClientConn) idleStateLocked() (st clientConnIdleState) {
return
}
var maxConcurrentOkay bool
- if cc.t.StrictMaxConcurrentStreams {
+ if cc.strictMaxConcurrentStreams {
// We'll tell the caller we can take a new request to
// prevent the caller from dialing a new TCP
// connection, but then we'll block later before
@@ -1120,7 +1074,7 @@ func (cc *ClientConn) tooIdleLocked() bool {
// times are compared based on their wall time. We don't want
// to reuse a connection that's been sitting idle during
// VM/laptop suspend if monotonic time was also frozen.
- return cc.idleTimeout != 0 && !cc.lastIdle.IsZero() && cc.t.timeSince(cc.lastIdle.Round(0)) > cc.idleTimeout
+ return cc.idleTimeout != 0 && !cc.lastIdle.IsZero() && time.Since(cc.lastIdle.Round(0)) > cc.idleTimeout
}
// onIdleTimeout is called from a time.AfterFunc goroutine. It will
@@ -1186,7 +1140,6 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error {
done := make(chan struct{})
cancelled := false // guarded by cc.mu
go func() {
- cc.t.markNewGoroutine()
cc.mu.Lock()
defer cc.mu.Unlock()
for {
@@ -1257,8 +1210,7 @@ func (cc *ClientConn) closeForError(err error) {
//
// In-flight requests are interrupted. For a graceful shutdown, use Shutdown instead.
func (cc *ClientConn) Close() error {
- err := errors.New("http2: client connection force closed via ClientConn.Close")
- cc.closeForError(err)
+ cc.closeForError(errClientConnForceClosed)
return nil
}
@@ -1427,7 +1379,6 @@ func (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream))
//
// It sends the request and performs post-request cleanup (closing Request.Body, etc.).
func (cs *clientStream) doRequest(req *http.Request, streamf func(*clientStream)) {
- cs.cc.t.markNewGoroutine()
err := cs.writeRequest(req, streamf)
cs.cleanupWriteRequest(err)
}
@@ -1558,9 +1509,9 @@ func (cs *clientStream) writeRequest(req *http.Request, streamf func(*clientStre
var respHeaderTimer <-chan time.Time
var respHeaderRecv chan struct{}
if d := cc.responseHeaderTimeout(); d != 0 {
- timer := cc.t.newTimer(d)
+ timer := time.NewTimer(d)
defer timer.Stop()
- respHeaderTimer = timer.C()
+ respHeaderTimer = timer.C
respHeaderRecv = cs.respHeaderRecv
}
// Wait until the peer half-closes its end of the stream,
@@ -1753,7 +1704,7 @@ func (cc *ClientConn) awaitOpenSlotForStreamLocked(cs *clientStream) error {
// Return a fatal error which aborts the retry loop.
return errClientConnNotEstablished
}
- cc.lastActive = cc.t.now()
+ cc.lastActive = time.Now()
if cc.closed || !cc.canTakeNewRequestLocked() {
return errClientConnUnusable
}
@@ -2092,10 +2043,10 @@ func (cc *ClientConn) forgetStreamID(id uint32) {
if len(cc.streams) != slen-1 {
panic("forgetting unknown stream id")
}
- cc.lastActive = cc.t.now()
+ cc.lastActive = time.Now()
if len(cc.streams) == 0 && cc.idleTimer != nil {
cc.idleTimer.Reset(cc.idleTimeout)
- cc.lastIdle = cc.t.now()
+ cc.lastIdle = time.Now()
}
// Wake up writeRequestBody via clientStream.awaitFlowControl and
// wake up RoundTrip if there is a pending request.
@@ -2121,7 +2072,6 @@ type clientConnReadLoop struct {
// readLoop runs in its own goroutine and reads and dispatches frames.
func (cc *ClientConn) readLoop() {
- cc.t.markNewGoroutine()
rl := &clientConnReadLoop{cc: cc}
defer rl.cleanup()
cc.readerErr = rl.run()
@@ -2188,9 +2138,9 @@ func (rl *clientConnReadLoop) cleanup() {
if cc.idleTimeout > 0 && unusedWaitTime > cc.idleTimeout {
unusedWaitTime = cc.idleTimeout
}
- idleTime := cc.t.now().Sub(cc.lastActive)
+ idleTime := time.Now().Sub(cc.lastActive)
if atomic.LoadUint32(&cc.atomicReused) == 0 && idleTime < unusedWaitTime && !cc.closedOnIdle {
- cc.idleTimer = cc.t.afterFunc(unusedWaitTime-idleTime, func() {
+ cc.idleTimer = time.AfterFunc(unusedWaitTime-idleTime, func() {
cc.t.connPool().MarkDead(cc)
})
} else {
@@ -2250,9 +2200,9 @@ func (rl *clientConnReadLoop) run() error {
cc := rl.cc
gotSettings := false
readIdleTimeout := cc.readIdleTimeout
- var t timer
+ var t *time.Timer
if readIdleTimeout != 0 {
- t = cc.t.afterFunc(readIdleTimeout, cc.healthCheck)
+ t = time.AfterFunc(readIdleTimeout, cc.healthCheck)
}
for {
f, err := cc.fr.ReadFrame()
@@ -2998,7 +2948,6 @@ func (cc *ClientConn) Ping(ctx context.Context) error {
var pingError error
errc := make(chan struct{})
go func() {
- cc.t.markNewGoroutine()
cc.wmu.Lock()
defer cc.wmu.Unlock()
if pingError = cc.fr.WritePing(false, p); pingError != nil {
@@ -3128,35 +3077,102 @@ type erringRoundTripper struct{ err error }
func (rt erringRoundTripper) RoundTripErr() error { return rt.err }
func (rt erringRoundTripper) RoundTrip(*http.Request) (*http.Response, error) { return nil, rt.err }
+var errConcurrentReadOnResBody = errors.New("http2: concurrent read on response body")
+
// gzipReader wraps a response body so it can lazily
-// call gzip.NewReader on the first call to Read
+// get gzip.Reader from the pool on the first call to Read.
+// After Close is called it puts gzip.Reader to the pool immediately
+// if there is no Read in progress or later when Read completes.
type gzipReader struct {
_ incomparable
body io.ReadCloser // underlying Response.Body
- zr *gzip.Reader // lazily-initialized gzip reader
- zerr error // sticky error
+ mu sync.Mutex // guards zr and zerr
+ zr *gzip.Reader // stores gzip reader from the pool between reads
+ zerr error // sticky gzip reader init error or sentinel value to detect concurrent read and read after close
}
-func (gz *gzipReader) Read(p []byte) (n int, err error) {
+type eofReader struct{}
+
+func (eofReader) Read([]byte) (int, error) { return 0, io.EOF }
+func (eofReader) ReadByte() (byte, error) { return 0, io.EOF }
+
+var gzipPool = sync.Pool{New: func() any { return new(gzip.Reader) }}
+
+// gzipPoolGet gets a gzip.Reader from the pool and resets it to read from r.
+func gzipPoolGet(r io.Reader) (*gzip.Reader, error) {
+ zr := gzipPool.Get().(*gzip.Reader)
+ if err := zr.Reset(r); err != nil {
+ gzipPoolPut(zr)
+ return nil, err
+ }
+ return zr, nil
+}
+
+// gzipPoolPut puts a gzip.Reader back into the pool.
+func gzipPoolPut(zr *gzip.Reader) {
+ // Reset will allocate bufio.Reader if we pass it anything
+ // other than a flate.Reader, so ensure that it's getting one.
+ var r flate.Reader = eofReader{}
+ zr.Reset(r)
+ gzipPool.Put(zr)
+}
+
+// acquire returns a gzip.Reader for reading response body.
+// The reader must be released after use.
+func (gz *gzipReader) acquire() (*gzip.Reader, error) {
+ gz.mu.Lock()
+ defer gz.mu.Unlock()
if gz.zerr != nil {
- return 0, gz.zerr
+ return nil, gz.zerr
}
if gz.zr == nil {
- gz.zr, err = gzip.NewReader(gz.body)
- if err != nil {
- gz.zerr = err
- return 0, err
+ gz.zr, gz.zerr = gzipPoolGet(gz.body)
+ if gz.zerr != nil {
+ return nil, gz.zerr
}
}
- return gz.zr.Read(p)
+ ret := gz.zr
+ gz.zr, gz.zerr = nil, errConcurrentReadOnResBody
+ return ret, nil
}
-func (gz *gzipReader) Close() error {
- if err := gz.body.Close(); err != nil {
- return err
+// release returns the gzip.Reader to the pool if Close was called during Read.
+func (gz *gzipReader) release(zr *gzip.Reader) {
+ gz.mu.Lock()
+ defer gz.mu.Unlock()
+ if gz.zerr == errConcurrentReadOnResBody {
+ gz.zr, gz.zerr = zr, nil
+ } else { // fs.ErrClosed
+ gzipPoolPut(zr)
+ }
+}
+
+// close returns the gzip.Reader to the pool immediately or
+// signals release to do so after Read completes.
+func (gz *gzipReader) close() {
+ gz.mu.Lock()
+ defer gz.mu.Unlock()
+ if gz.zerr == nil && gz.zr != nil {
+ gzipPoolPut(gz.zr)
+ gz.zr = nil
}
gz.zerr = fs.ErrClosed
- return nil
+}
+
+func (gz *gzipReader) Read(p []byte) (n int, err error) {
+ zr, err := gz.acquire()
+ if err != nil {
+ return 0, err
+ }
+ defer gz.release(zr)
+
+ return zr.Read(p)
+}
+
+func (gz *gzipReader) Close() error {
+ gz.close()
+
+ return gz.body.Close()
}
type errorReader struct{ err error }
@@ -3228,7 +3244,7 @@ func traceGotConn(req *http.Request, cc *ClientConn, reused bool) {
cc.mu.Lock()
ci.WasIdle = len(cc.streams) == 0 && reused
if ci.WasIdle && !cc.lastActive.IsZero() {
- ci.IdleTime = cc.t.timeSince(cc.lastActive)
+ ci.IdleTime = time.Since(cc.lastActive)
}
cc.mu.Unlock()
diff --git a/hack/tools/vendor/golang.org/x/net/http2/writesched.go b/hack/tools/vendor/golang.org/x/net/http2/writesched.go
index cc893adc29af..7de27be52509 100644
--- a/hack/tools/vendor/golang.org/x/net/http2/writesched.go
+++ b/hack/tools/vendor/golang.org/x/net/http2/writesched.go
@@ -42,6 +42,8 @@ type OpenStreamOptions struct {
// PusherID is zero if the stream was initiated by the client. Otherwise,
// PusherID names the stream that pushed the newly opened stream.
PusherID uint32
+ // priority is used to set the priority of the newly opened stream.
+ priority PriorityParam
}
// FrameWriteRequest is a request to write a frame.
@@ -183,45 +185,75 @@ func (wr *FrameWriteRequest) replyToWriter(err error) {
}
// writeQueue is used by implementations of WriteScheduler.
+//
+// Each writeQueue contains a queue of FrameWriteRequests, meant to store all
+// FrameWriteRequests associated with a given stream. This is implemented as a
+// two-stage queue: currQueue[currPos:] and nextQueue. Removing an item is done
+// by incrementing currPos of currQueue. Adding an item is done by appending it
+// to the nextQueue. If currQueue is empty when trying to remove an item, we
+// can swap currQueue and nextQueue to remedy the situation.
+// This two-stage queue is analogous to the use of two lists in Okasaki's
+// purely functional queue but without the overhead of reversing the list when
+// swapping stages.
+//
+// writeQueue also contains prev and next, this can be used by implementations
+// of WriteScheduler to construct data structures that represent the order of
+// writing between different streams (e.g. circular linked list).
type writeQueue struct {
- s []FrameWriteRequest
+ currQueue []FrameWriteRequest
+ nextQueue []FrameWriteRequest
+ currPos int
+
prev, next *writeQueue
}
-func (q *writeQueue) empty() bool { return len(q.s) == 0 }
+func (q *writeQueue) empty() bool {
+ return (len(q.currQueue) - q.currPos + len(q.nextQueue)) == 0
+}
func (q *writeQueue) push(wr FrameWriteRequest) {
- q.s = append(q.s, wr)
+ q.nextQueue = append(q.nextQueue, wr)
}
func (q *writeQueue) shift() FrameWriteRequest {
- if len(q.s) == 0 {
+ if q.empty() {
panic("invalid use of queue")
}
- wr := q.s[0]
- // TODO: less copy-happy queue.
- copy(q.s, q.s[1:])
- q.s[len(q.s)-1] = FrameWriteRequest{}
- q.s = q.s[:len(q.s)-1]
+ if q.currPos >= len(q.currQueue) {
+ q.currQueue, q.currPos, q.nextQueue = q.nextQueue, 0, q.currQueue[:0]
+ }
+ wr := q.currQueue[q.currPos]
+ q.currQueue[q.currPos] = FrameWriteRequest{}
+ q.currPos++
return wr
}
+func (q *writeQueue) peek() *FrameWriteRequest {
+ if q.currPos < len(q.currQueue) {
+ return &q.currQueue[q.currPos]
+ }
+ if len(q.nextQueue) > 0 {
+ return &q.nextQueue[0]
+ }
+ return nil
+}
+
// consume consumes up to n bytes from q.s[0]. If the frame is
// entirely consumed, it is removed from the queue. If the frame
// is partially consumed, the frame is kept with the consumed
// bytes removed. Returns true iff any bytes were consumed.
func (q *writeQueue) consume(n int32) (FrameWriteRequest, bool) {
- if len(q.s) == 0 {
+ if q.empty() {
return FrameWriteRequest{}, false
}
- consumed, rest, numresult := q.s[0].Consume(n)
+ consumed, rest, numresult := q.peek().Consume(n)
switch numresult {
case 0:
return FrameWriteRequest{}, false
case 1:
q.shift()
case 2:
- q.s[0] = rest
+ *q.peek() = rest
}
return consumed, true
}
@@ -230,10 +262,15 @@ type writeQueuePool []*writeQueue
// put inserts an unused writeQueue into the pool.
func (p *writeQueuePool) put(q *writeQueue) {
- for i := range q.s {
- q.s[i] = FrameWriteRequest{}
+ for i := range q.currQueue {
+ q.currQueue[i] = FrameWriteRequest{}
+ }
+ for i := range q.nextQueue {
+ q.nextQueue[i] = FrameWriteRequest{}
}
- q.s = q.s[:0]
+ q.currQueue = q.currQueue[:0]
+ q.nextQueue = q.nextQueue[:0]
+ q.currPos = 0
*p = append(*p, q)
}
diff --git a/hack/tools/vendor/golang.org/x/net/http2/writesched_priority.go b/hack/tools/vendor/golang.org/x/net/http2/writesched_priority.go
deleted file mode 100644
index f6783339d11e..000000000000
--- a/hack/tools/vendor/golang.org/x/net/http2/writesched_priority.go
+++ /dev/null
@@ -1,451 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package http2
-
-import (
- "fmt"
- "math"
- "sort"
-)
-
-// RFC 7540, Section 5.3.5: the default weight is 16.
-const priorityDefaultWeight = 15 // 16 = 15 + 1
-
-// PriorityWriteSchedulerConfig configures a priorityWriteScheduler.
-type PriorityWriteSchedulerConfig struct {
- // MaxClosedNodesInTree controls the maximum number of closed streams to
- // retain in the priority tree. Setting this to zero saves a small amount
- // of memory at the cost of performance.
- //
- // See RFC 7540, Section 5.3.4:
- // "It is possible for a stream to become closed while prioritization
- // information ... is in transit. ... This potentially creates suboptimal
- // prioritization, since the stream could be given a priority that is
- // different from what is intended. To avoid these problems, an endpoint
- // SHOULD retain stream prioritization state for a period after streams
- // become closed. The longer state is retained, the lower the chance that
- // streams are assigned incorrect or default priority values."
- MaxClosedNodesInTree int
-
- // MaxIdleNodesInTree controls the maximum number of idle streams to
- // retain in the priority tree. Setting this to zero saves a small amount
- // of memory at the cost of performance.
- //
- // See RFC 7540, Section 5.3.4:
- // Similarly, streams that are in the "idle" state can be assigned
- // priority or become a parent of other streams. This allows for the
- // creation of a grouping node in the dependency tree, which enables
- // more flexible expressions of priority. Idle streams begin with a
- // default priority (Section 5.3.5).
- MaxIdleNodesInTree int
-
- // ThrottleOutOfOrderWrites enables write throttling to help ensure that
- // data is delivered in priority order. This works around a race where
- // stream B depends on stream A and both streams are about to call Write
- // to queue DATA frames. If B wins the race, a naive scheduler would eagerly
- // write as much data from B as possible, but this is suboptimal because A
- // is a higher-priority stream. With throttling enabled, we write a small
- // amount of data from B to minimize the amount of bandwidth that B can
- // steal from A.
- ThrottleOutOfOrderWrites bool
-}
-
-// NewPriorityWriteScheduler constructs a WriteScheduler that schedules
-// frames by following HTTP/2 priorities as described in RFC 7540 Section 5.3.
-// If cfg is nil, default options are used.
-func NewPriorityWriteScheduler(cfg *PriorityWriteSchedulerConfig) WriteScheduler {
- if cfg == nil {
- // For justification of these defaults, see:
- // https://docs.google.com/document/d/1oLhNg1skaWD4_DtaoCxdSRN5erEXrH-KnLrMwEpOtFY
- cfg = &PriorityWriteSchedulerConfig{
- MaxClosedNodesInTree: 10,
- MaxIdleNodesInTree: 10,
- ThrottleOutOfOrderWrites: false,
- }
- }
-
- ws := &priorityWriteScheduler{
- nodes: make(map[uint32]*priorityNode),
- maxClosedNodesInTree: cfg.MaxClosedNodesInTree,
- maxIdleNodesInTree: cfg.MaxIdleNodesInTree,
- enableWriteThrottle: cfg.ThrottleOutOfOrderWrites,
- }
- ws.nodes[0] = &ws.root
- if cfg.ThrottleOutOfOrderWrites {
- ws.writeThrottleLimit = 1024
- } else {
- ws.writeThrottleLimit = math.MaxInt32
- }
- return ws
-}
-
-type priorityNodeState int
-
-const (
- priorityNodeOpen priorityNodeState = iota
- priorityNodeClosed
- priorityNodeIdle
-)
-
-// priorityNode is a node in an HTTP/2 priority tree.
-// Each node is associated with a single stream ID.
-// See RFC 7540, Section 5.3.
-type priorityNode struct {
- q writeQueue // queue of pending frames to write
- id uint32 // id of the stream, or 0 for the root of the tree
- weight uint8 // the actual weight is weight+1, so the value is in [1,256]
- state priorityNodeState // open | closed | idle
- bytes int64 // number of bytes written by this node, or 0 if closed
- subtreeBytes int64 // sum(node.bytes) of all nodes in this subtree
-
- // These links form the priority tree.
- parent *priorityNode
- kids *priorityNode // start of the kids list
- prev, next *priorityNode // doubly-linked list of siblings
-}
-
-func (n *priorityNode) setParent(parent *priorityNode) {
- if n == parent {
- panic("setParent to self")
- }
- if n.parent == parent {
- return
- }
- // Unlink from current parent.
- if parent := n.parent; parent != nil {
- if n.prev == nil {
- parent.kids = n.next
- } else {
- n.prev.next = n.next
- }
- if n.next != nil {
- n.next.prev = n.prev
- }
- }
- // Link to new parent.
- // If parent=nil, remove n from the tree.
- // Always insert at the head of parent.kids (this is assumed by walkReadyInOrder).
- n.parent = parent
- if parent == nil {
- n.next = nil
- n.prev = nil
- } else {
- n.next = parent.kids
- n.prev = nil
- if n.next != nil {
- n.next.prev = n
- }
- parent.kids = n
- }
-}
-
-func (n *priorityNode) addBytes(b int64) {
- n.bytes += b
- for ; n != nil; n = n.parent {
- n.subtreeBytes += b
- }
-}
-
-// walkReadyInOrder iterates over the tree in priority order, calling f for each node
-// with a non-empty write queue. When f returns true, this function returns true and the
-// walk halts. tmp is used as scratch space for sorting.
-//
-// f(n, openParent) takes two arguments: the node to visit, n, and a bool that is true
-// if any ancestor p of n is still open (ignoring the root node).
-func (n *priorityNode) walkReadyInOrder(openParent bool, tmp *[]*priorityNode, f func(*priorityNode, bool) bool) bool {
- if !n.q.empty() && f(n, openParent) {
- return true
- }
- if n.kids == nil {
- return false
- }
-
- // Don't consider the root "open" when updating openParent since
- // we can't send data frames on the root stream (only control frames).
- if n.id != 0 {
- openParent = openParent || (n.state == priorityNodeOpen)
- }
-
- // Common case: only one kid or all kids have the same weight.
- // Some clients don't use weights; other clients (like web browsers)
- // use mostly-linear priority trees.
- w := n.kids.weight
- needSort := false
- for k := n.kids.next; k != nil; k = k.next {
- if k.weight != w {
- needSort = true
- break
- }
- }
- if !needSort {
- for k := n.kids; k != nil; k = k.next {
- if k.walkReadyInOrder(openParent, tmp, f) {
- return true
- }
- }
- return false
- }
-
- // Uncommon case: sort the child nodes. We remove the kids from the parent,
- // then re-insert after sorting so we can reuse tmp for future sort calls.
- *tmp = (*tmp)[:0]
- for n.kids != nil {
- *tmp = append(*tmp, n.kids)
- n.kids.setParent(nil)
- }
- sort.Sort(sortPriorityNodeSiblings(*tmp))
- for i := len(*tmp) - 1; i >= 0; i-- {
- (*tmp)[i].setParent(n) // setParent inserts at the head of n.kids
- }
- for k := n.kids; k != nil; k = k.next {
- if k.walkReadyInOrder(openParent, tmp, f) {
- return true
- }
- }
- return false
-}
-
-type sortPriorityNodeSiblings []*priorityNode
-
-func (z sortPriorityNodeSiblings) Len() int { return len(z) }
-func (z sortPriorityNodeSiblings) Swap(i, k int) { z[i], z[k] = z[k], z[i] }
-func (z sortPriorityNodeSiblings) Less(i, k int) bool {
- // Prefer the subtree that has sent fewer bytes relative to its weight.
- // See sections 5.3.2 and 5.3.4.
- wi, bi := float64(z[i].weight+1), float64(z[i].subtreeBytes)
- wk, bk := float64(z[k].weight+1), float64(z[k].subtreeBytes)
- if bi == 0 && bk == 0 {
- return wi >= wk
- }
- if bk == 0 {
- return false
- }
- return bi/bk <= wi/wk
-}
-
-type priorityWriteScheduler struct {
- // root is the root of the priority tree, where root.id = 0.
- // The root queues control frames that are not associated with any stream.
- root priorityNode
-
- // nodes maps stream ids to priority tree nodes.
- nodes map[uint32]*priorityNode
-
- // maxID is the maximum stream id in nodes.
- maxID uint32
-
- // lists of nodes that have been closed or are idle, but are kept in
- // the tree for improved prioritization. When the lengths exceed either
- // maxClosedNodesInTree or maxIdleNodesInTree, old nodes are discarded.
- closedNodes, idleNodes []*priorityNode
-
- // From the config.
- maxClosedNodesInTree int
- maxIdleNodesInTree int
- writeThrottleLimit int32
- enableWriteThrottle bool
-
- // tmp is scratch space for priorityNode.walkReadyInOrder to reduce allocations.
- tmp []*priorityNode
-
- // pool of empty queues for reuse.
- queuePool writeQueuePool
-}
-
-func (ws *priorityWriteScheduler) OpenStream(streamID uint32, options OpenStreamOptions) {
- // The stream may be currently idle but cannot be opened or closed.
- if curr := ws.nodes[streamID]; curr != nil {
- if curr.state != priorityNodeIdle {
- panic(fmt.Sprintf("stream %d already opened", streamID))
- }
- curr.state = priorityNodeOpen
- return
- }
-
- // RFC 7540, Section 5.3.5:
- // "All streams are initially assigned a non-exclusive dependency on stream 0x0.
- // Pushed streams initially depend on their associated stream. In both cases,
- // streams are assigned a default weight of 16."
- parent := ws.nodes[options.PusherID]
- if parent == nil {
- parent = &ws.root
- }
- n := &priorityNode{
- q: *ws.queuePool.get(),
- id: streamID,
- weight: priorityDefaultWeight,
- state: priorityNodeOpen,
- }
- n.setParent(parent)
- ws.nodes[streamID] = n
- if streamID > ws.maxID {
- ws.maxID = streamID
- }
-}
-
-func (ws *priorityWriteScheduler) CloseStream(streamID uint32) {
- if streamID == 0 {
- panic("violation of WriteScheduler interface: cannot close stream 0")
- }
- if ws.nodes[streamID] == nil {
- panic(fmt.Sprintf("violation of WriteScheduler interface: unknown stream %d", streamID))
- }
- if ws.nodes[streamID].state != priorityNodeOpen {
- panic(fmt.Sprintf("violation of WriteScheduler interface: stream %d already closed", streamID))
- }
-
- n := ws.nodes[streamID]
- n.state = priorityNodeClosed
- n.addBytes(-n.bytes)
-
- q := n.q
- ws.queuePool.put(&q)
- n.q.s = nil
- if ws.maxClosedNodesInTree > 0 {
- ws.addClosedOrIdleNode(&ws.closedNodes, ws.maxClosedNodesInTree, n)
- } else {
- ws.removeNode(n)
- }
-}
-
-func (ws *priorityWriteScheduler) AdjustStream(streamID uint32, priority PriorityParam) {
- if streamID == 0 {
- panic("adjustPriority on root")
- }
-
- // If streamID does not exist, there are two cases:
- // - A closed stream that has been removed (this will have ID <= maxID)
- // - An idle stream that is being used for "grouping" (this will have ID > maxID)
- n := ws.nodes[streamID]
- if n == nil {
- if streamID <= ws.maxID || ws.maxIdleNodesInTree == 0 {
- return
- }
- ws.maxID = streamID
- n = &priorityNode{
- q: *ws.queuePool.get(),
- id: streamID,
- weight: priorityDefaultWeight,
- state: priorityNodeIdle,
- }
- n.setParent(&ws.root)
- ws.nodes[streamID] = n
- ws.addClosedOrIdleNode(&ws.idleNodes, ws.maxIdleNodesInTree, n)
- }
-
- // Section 5.3.1: A dependency on a stream that is not currently in the tree
- // results in that stream being given a default priority (Section 5.3.5).
- parent := ws.nodes[priority.StreamDep]
- if parent == nil {
- n.setParent(&ws.root)
- n.weight = priorityDefaultWeight
- return
- }
-
- // Ignore if the client tries to make a node its own parent.
- if n == parent {
- return
- }
-
- // Section 5.3.3:
- // "If a stream is made dependent on one of its own dependencies, the
- // formerly dependent stream is first moved to be dependent on the
- // reprioritized stream's previous parent. The moved dependency retains
- // its weight."
- //
- // That is: if parent depends on n, move parent to depend on n.parent.
- for x := parent.parent; x != nil; x = x.parent {
- if x == n {
- parent.setParent(n.parent)
- break
- }
- }
-
- // Section 5.3.3: The exclusive flag causes the stream to become the sole
- // dependency of its parent stream, causing other dependencies to become
- // dependent on the exclusive stream.
- if priority.Exclusive {
- k := parent.kids
- for k != nil {
- next := k.next
- if k != n {
- k.setParent(n)
- }
- k = next
- }
- }
-
- n.setParent(parent)
- n.weight = priority.Weight
-}
-
-func (ws *priorityWriteScheduler) Push(wr FrameWriteRequest) {
- var n *priorityNode
- if wr.isControl() {
- n = &ws.root
- } else {
- id := wr.StreamID()
- n = ws.nodes[id]
- if n == nil {
- // id is an idle or closed stream. wr should not be a HEADERS or
- // DATA frame. In other case, we push wr onto the root, rather
- // than creating a new priorityNode.
- if wr.DataSize() > 0 {
- panic("add DATA on non-open stream")
- }
- n = &ws.root
- }
- }
- n.q.push(wr)
-}
-
-func (ws *priorityWriteScheduler) Pop() (wr FrameWriteRequest, ok bool) {
- ws.root.walkReadyInOrder(false, &ws.tmp, func(n *priorityNode, openParent bool) bool {
- limit := int32(math.MaxInt32)
- if openParent {
- limit = ws.writeThrottleLimit
- }
- wr, ok = n.q.consume(limit)
- if !ok {
- return false
- }
- n.addBytes(int64(wr.DataSize()))
- // If B depends on A and B continuously has data available but A
- // does not, gradually increase the throttling limit to allow B to
- // steal more and more bandwidth from A.
- if openParent {
- ws.writeThrottleLimit += 1024
- if ws.writeThrottleLimit < 0 {
- ws.writeThrottleLimit = math.MaxInt32
- }
- } else if ws.enableWriteThrottle {
- ws.writeThrottleLimit = 1024
- }
- return true
- })
- return wr, ok
-}
-
-func (ws *priorityWriteScheduler) addClosedOrIdleNode(list *[]*priorityNode, maxSize int, n *priorityNode) {
- if maxSize == 0 {
- return
- }
- if len(*list) == maxSize {
- // Remove the oldest node, then shift left.
- ws.removeNode((*list)[0])
- x := (*list)[1:]
- copy(*list, x)
- *list = (*list)[:len(x)]
- }
- *list = append(*list, n)
-}
-
-func (ws *priorityWriteScheduler) removeNode(n *priorityNode) {
- for n.kids != nil {
- n.kids.setParent(n.parent)
- }
- n.setParent(nil)
- delete(ws.nodes, n.id)
-}
diff --git a/hack/tools/vendor/golang.org/x/net/http2/writesched_priority_rfc7540.go b/hack/tools/vendor/golang.org/x/net/http2/writesched_priority_rfc7540.go
new file mode 100644
index 000000000000..4e33c29a2445
--- /dev/null
+++ b/hack/tools/vendor/golang.org/x/net/http2/writesched_priority_rfc7540.go
@@ -0,0 +1,450 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package http2
+
+import (
+ "fmt"
+ "math"
+ "sort"
+)
+
+// RFC 7540, Section 5.3.5: the default weight is 16.
+const priorityDefaultWeightRFC7540 = 15 // 16 = 15 + 1
+
+// PriorityWriteSchedulerConfig configures a priorityWriteScheduler.
+type PriorityWriteSchedulerConfig struct {
+ // MaxClosedNodesInTree controls the maximum number of closed streams to
+ // retain in the priority tree. Setting this to zero saves a small amount
+ // of memory at the cost of performance.
+ //
+ // See RFC 7540, Section 5.3.4:
+ // "It is possible for a stream to become closed while prioritization
+ // information ... is in transit. ... This potentially creates suboptimal
+ // prioritization, since the stream could be given a priority that is
+ // different from what is intended. To avoid these problems, an endpoint
+ // SHOULD retain stream prioritization state for a period after streams
+ // become closed. The longer state is retained, the lower the chance that
+ // streams are assigned incorrect or default priority values."
+ MaxClosedNodesInTree int
+
+ // MaxIdleNodesInTree controls the maximum number of idle streams to
+ // retain in the priority tree. Setting this to zero saves a small amount
+ // of memory at the cost of performance.
+ //
+ // See RFC 7540, Section 5.3.4:
+ // Similarly, streams that are in the "idle" state can be assigned
+ // priority or become a parent of other streams. This allows for the
+ // creation of a grouping node in the dependency tree, which enables
+ // more flexible expressions of priority. Idle streams begin with a
+ // default priority (Section 5.3.5).
+ MaxIdleNodesInTree int
+
+ // ThrottleOutOfOrderWrites enables write throttling to help ensure that
+ // data is delivered in priority order. This works around a race where
+ // stream B depends on stream A and both streams are about to call Write
+ // to queue DATA frames. If B wins the race, a naive scheduler would eagerly
+ // write as much data from B as possible, but this is suboptimal because A
+ // is a higher-priority stream. With throttling enabled, we write a small
+ // amount of data from B to minimize the amount of bandwidth that B can
+ // steal from A.
+ ThrottleOutOfOrderWrites bool
+}
+
+// NewPriorityWriteScheduler constructs a WriteScheduler that schedules
+// frames by following HTTP/2 priorities as described in RFC 7540 Section 5.3.
+// If cfg is nil, default options are used.
+func NewPriorityWriteScheduler(cfg *PriorityWriteSchedulerConfig) WriteScheduler {
+ if cfg == nil {
+ // For justification of these defaults, see:
+ // https://docs.google.com/document/d/1oLhNg1skaWD4_DtaoCxdSRN5erEXrH-KnLrMwEpOtFY
+ cfg = &PriorityWriteSchedulerConfig{
+ MaxClosedNodesInTree: 10,
+ MaxIdleNodesInTree: 10,
+ ThrottleOutOfOrderWrites: false,
+ }
+ }
+
+ ws := &priorityWriteSchedulerRFC7540{
+ nodes: make(map[uint32]*priorityNodeRFC7540),
+ maxClosedNodesInTree: cfg.MaxClosedNodesInTree,
+ maxIdleNodesInTree: cfg.MaxIdleNodesInTree,
+ enableWriteThrottle: cfg.ThrottleOutOfOrderWrites,
+ }
+ ws.nodes[0] = &ws.root
+ if cfg.ThrottleOutOfOrderWrites {
+ ws.writeThrottleLimit = 1024
+ } else {
+ ws.writeThrottleLimit = math.MaxInt32
+ }
+ return ws
+}
+
+type priorityNodeStateRFC7540 int
+
+const (
+ priorityNodeOpenRFC7540 priorityNodeStateRFC7540 = iota
+ priorityNodeClosedRFC7540
+ priorityNodeIdleRFC7540
+)
+
+// priorityNodeRFC7540 is a node in an HTTP/2 priority tree.
+// Each node is associated with a single stream ID.
+// See RFC 7540, Section 5.3.
+type priorityNodeRFC7540 struct {
+ q writeQueue // queue of pending frames to write
+ id uint32 // id of the stream, or 0 for the root of the tree
+ weight uint8 // the actual weight is weight+1, so the value is in [1,256]
+ state priorityNodeStateRFC7540 // open | closed | idle
+ bytes int64 // number of bytes written by this node, or 0 if closed
+ subtreeBytes int64 // sum(node.bytes) of all nodes in this subtree
+
+ // These links form the priority tree.
+ parent *priorityNodeRFC7540
+ kids *priorityNodeRFC7540 // start of the kids list
+ prev, next *priorityNodeRFC7540 // doubly-linked list of siblings
+}
+
+func (n *priorityNodeRFC7540) setParent(parent *priorityNodeRFC7540) {
+ if n == parent {
+ panic("setParent to self")
+ }
+ if n.parent == parent {
+ return
+ }
+ // Unlink from current parent.
+ if parent := n.parent; parent != nil {
+ if n.prev == nil {
+ parent.kids = n.next
+ } else {
+ n.prev.next = n.next
+ }
+ if n.next != nil {
+ n.next.prev = n.prev
+ }
+ }
+ // Link to new parent.
+ // If parent=nil, remove n from the tree.
+ // Always insert at the head of parent.kids (this is assumed by walkReadyInOrder).
+ n.parent = parent
+ if parent == nil {
+ n.next = nil
+ n.prev = nil
+ } else {
+ n.next = parent.kids
+ n.prev = nil
+ if n.next != nil {
+ n.next.prev = n
+ }
+ parent.kids = n
+ }
+}
+
+func (n *priorityNodeRFC7540) addBytes(b int64) {
+ n.bytes += b
+ for ; n != nil; n = n.parent {
+ n.subtreeBytes += b
+ }
+}
+
+// walkReadyInOrder iterates over the tree in priority order, calling f for each node
+// with a non-empty write queue. When f returns true, this function returns true and the
+// walk halts. tmp is used as scratch space for sorting.
+//
+// f(n, openParent) takes two arguments: the node to visit, n, and a bool that is true
+// if any ancestor p of n is still open (ignoring the root node).
+func (n *priorityNodeRFC7540) walkReadyInOrder(openParent bool, tmp *[]*priorityNodeRFC7540, f func(*priorityNodeRFC7540, bool) bool) bool {
+ if !n.q.empty() && f(n, openParent) {
+ return true
+ }
+ if n.kids == nil {
+ return false
+ }
+
+ // Don't consider the root "open" when updating openParent since
+ // we can't send data frames on the root stream (only control frames).
+ if n.id != 0 {
+ openParent = openParent || (n.state == priorityNodeOpenRFC7540)
+ }
+
+ // Common case: only one kid or all kids have the same weight.
+ // Some clients don't use weights; other clients (like web browsers)
+ // use mostly-linear priority trees.
+ w := n.kids.weight
+ needSort := false
+ for k := n.kids.next; k != nil; k = k.next {
+ if k.weight != w {
+ needSort = true
+ break
+ }
+ }
+ if !needSort {
+ for k := n.kids; k != nil; k = k.next {
+ if k.walkReadyInOrder(openParent, tmp, f) {
+ return true
+ }
+ }
+ return false
+ }
+
+ // Uncommon case: sort the child nodes. We remove the kids from the parent,
+ // then re-insert after sorting so we can reuse tmp for future sort calls.
+ *tmp = (*tmp)[:0]
+ for n.kids != nil {
+ *tmp = append(*tmp, n.kids)
+ n.kids.setParent(nil)
+ }
+ sort.Sort(sortPriorityNodeSiblingsRFC7540(*tmp))
+ for i := len(*tmp) - 1; i >= 0; i-- {
+ (*tmp)[i].setParent(n) // setParent inserts at the head of n.kids
+ }
+ for k := n.kids; k != nil; k = k.next {
+ if k.walkReadyInOrder(openParent, tmp, f) {
+ return true
+ }
+ }
+ return false
+}
+
+type sortPriorityNodeSiblingsRFC7540 []*priorityNodeRFC7540
+
+func (z sortPriorityNodeSiblingsRFC7540) Len() int { return len(z) }
+func (z sortPriorityNodeSiblingsRFC7540) Swap(i, k int) { z[i], z[k] = z[k], z[i] }
+func (z sortPriorityNodeSiblingsRFC7540) Less(i, k int) bool {
+ // Prefer the subtree that has sent fewer bytes relative to its weight.
+ // See sections 5.3.2 and 5.3.4.
+ wi, bi := float64(z[i].weight)+1, float64(z[i].subtreeBytes)
+ wk, bk := float64(z[k].weight)+1, float64(z[k].subtreeBytes)
+ if bi == 0 && bk == 0 {
+ return wi >= wk
+ }
+ if bk == 0 {
+ return false
+ }
+ return bi/bk <= wi/wk
+}
+
+type priorityWriteSchedulerRFC7540 struct {
+ // root is the root of the priority tree, where root.id = 0.
+ // The root queues control frames that are not associated with any stream.
+ root priorityNodeRFC7540
+
+ // nodes maps stream ids to priority tree nodes.
+ nodes map[uint32]*priorityNodeRFC7540
+
+ // maxID is the maximum stream id in nodes.
+ maxID uint32
+
+ // lists of nodes that have been closed or are idle, but are kept in
+ // the tree for improved prioritization. When the lengths exceed either
+ // maxClosedNodesInTree or maxIdleNodesInTree, old nodes are discarded.
+ closedNodes, idleNodes []*priorityNodeRFC7540
+
+ // From the config.
+ maxClosedNodesInTree int
+ maxIdleNodesInTree int
+ writeThrottleLimit int32
+ enableWriteThrottle bool
+
+ // tmp is scratch space for priorityNode.walkReadyInOrder to reduce allocations.
+ tmp []*priorityNodeRFC7540
+
+ // pool of empty queues for reuse.
+ queuePool writeQueuePool
+}
+
+func (ws *priorityWriteSchedulerRFC7540) OpenStream(streamID uint32, options OpenStreamOptions) {
+ // The stream may be currently idle but cannot be opened or closed.
+ if curr := ws.nodes[streamID]; curr != nil {
+ if curr.state != priorityNodeIdleRFC7540 {
+ panic(fmt.Sprintf("stream %d already opened", streamID))
+ }
+ curr.state = priorityNodeOpenRFC7540
+ return
+ }
+
+ // RFC 7540, Section 5.3.5:
+ // "All streams are initially assigned a non-exclusive dependency on stream 0x0.
+ // Pushed streams initially depend on their associated stream. In both cases,
+ // streams are assigned a default weight of 16."
+ parent := ws.nodes[options.PusherID]
+ if parent == nil {
+ parent = &ws.root
+ }
+ n := &priorityNodeRFC7540{
+ q: *ws.queuePool.get(),
+ id: streamID,
+ weight: priorityDefaultWeightRFC7540,
+ state: priorityNodeOpenRFC7540,
+ }
+ n.setParent(parent)
+ ws.nodes[streamID] = n
+ if streamID > ws.maxID {
+ ws.maxID = streamID
+ }
+}
+
+func (ws *priorityWriteSchedulerRFC7540) CloseStream(streamID uint32) {
+ if streamID == 0 {
+ panic("violation of WriteScheduler interface: cannot close stream 0")
+ }
+ if ws.nodes[streamID] == nil {
+ panic(fmt.Sprintf("violation of WriteScheduler interface: unknown stream %d", streamID))
+ }
+ if ws.nodes[streamID].state != priorityNodeOpenRFC7540 {
+ panic(fmt.Sprintf("violation of WriteScheduler interface: stream %d already closed", streamID))
+ }
+
+ n := ws.nodes[streamID]
+ n.state = priorityNodeClosedRFC7540
+ n.addBytes(-n.bytes)
+
+ q := n.q
+ ws.queuePool.put(&q)
+ if ws.maxClosedNodesInTree > 0 {
+ ws.addClosedOrIdleNode(&ws.closedNodes, ws.maxClosedNodesInTree, n)
+ } else {
+ ws.removeNode(n)
+ }
+}
+
+func (ws *priorityWriteSchedulerRFC7540) AdjustStream(streamID uint32, priority PriorityParam) {
+ if streamID == 0 {
+ panic("adjustPriority on root")
+ }
+
+ // If streamID does not exist, there are two cases:
+ // - A closed stream that has been removed (this will have ID <= maxID)
+ // - An idle stream that is being used for "grouping" (this will have ID > maxID)
+ n := ws.nodes[streamID]
+ if n == nil {
+ if streamID <= ws.maxID || ws.maxIdleNodesInTree == 0 {
+ return
+ }
+ ws.maxID = streamID
+ n = &priorityNodeRFC7540{
+ q: *ws.queuePool.get(),
+ id: streamID,
+ weight: priorityDefaultWeightRFC7540,
+ state: priorityNodeIdleRFC7540,
+ }
+ n.setParent(&ws.root)
+ ws.nodes[streamID] = n
+ ws.addClosedOrIdleNode(&ws.idleNodes, ws.maxIdleNodesInTree, n)
+ }
+
+ // Section 5.3.1: A dependency on a stream that is not currently in the tree
+ // results in that stream being given a default priority (Section 5.3.5).
+ parent := ws.nodes[priority.StreamDep]
+ if parent == nil {
+ n.setParent(&ws.root)
+ n.weight = priorityDefaultWeightRFC7540
+ return
+ }
+
+ // Ignore if the client tries to make a node its own parent.
+ if n == parent {
+ return
+ }
+
+ // Section 5.3.3:
+ // "If a stream is made dependent on one of its own dependencies, the
+ // formerly dependent stream is first moved to be dependent on the
+ // reprioritized stream's previous parent. The moved dependency retains
+ // its weight."
+ //
+ // That is: if parent depends on n, move parent to depend on n.parent.
+ for x := parent.parent; x != nil; x = x.parent {
+ if x == n {
+ parent.setParent(n.parent)
+ break
+ }
+ }
+
+ // Section 5.3.3: The exclusive flag causes the stream to become the sole
+ // dependency of its parent stream, causing other dependencies to become
+ // dependent on the exclusive stream.
+ if priority.Exclusive {
+ k := parent.kids
+ for k != nil {
+ next := k.next
+ if k != n {
+ k.setParent(n)
+ }
+ k = next
+ }
+ }
+
+ n.setParent(parent)
+ n.weight = priority.Weight
+}
+
+func (ws *priorityWriteSchedulerRFC7540) Push(wr FrameWriteRequest) {
+ var n *priorityNodeRFC7540
+ if wr.isControl() {
+ n = &ws.root
+ } else {
+ id := wr.StreamID()
+ n = ws.nodes[id]
+ if n == nil {
+ // id is an idle or closed stream. wr should not be a HEADERS or
+ // DATA frame. In other case, we push wr onto the root, rather
+ // than creating a new priorityNode.
+ if wr.DataSize() > 0 {
+ panic("add DATA on non-open stream")
+ }
+ n = &ws.root
+ }
+ }
+ n.q.push(wr)
+}
+
+func (ws *priorityWriteSchedulerRFC7540) Pop() (wr FrameWriteRequest, ok bool) {
+ ws.root.walkReadyInOrder(false, &ws.tmp, func(n *priorityNodeRFC7540, openParent bool) bool {
+ limit := int32(math.MaxInt32)
+ if openParent {
+ limit = ws.writeThrottleLimit
+ }
+ wr, ok = n.q.consume(limit)
+ if !ok {
+ return false
+ }
+ n.addBytes(int64(wr.DataSize()))
+ // If B depends on A and B continuously has data available but A
+ // does not, gradually increase the throttling limit to allow B to
+ // steal more and more bandwidth from A.
+ if openParent {
+ ws.writeThrottleLimit += 1024
+ if ws.writeThrottleLimit < 0 {
+ ws.writeThrottleLimit = math.MaxInt32
+ }
+ } else if ws.enableWriteThrottle {
+ ws.writeThrottleLimit = 1024
+ }
+ return true
+ })
+ return wr, ok
+}
+
+func (ws *priorityWriteSchedulerRFC7540) addClosedOrIdleNode(list *[]*priorityNodeRFC7540, maxSize int, n *priorityNodeRFC7540) {
+ if maxSize == 0 {
+ return
+ }
+ if len(*list) == maxSize {
+ // Remove the oldest node, then shift left.
+ ws.removeNode((*list)[0])
+ x := (*list)[1:]
+ copy(*list, x)
+ *list = (*list)[:len(x)]
+ }
+ *list = append(*list, n)
+}
+
+func (ws *priorityWriteSchedulerRFC7540) removeNode(n *priorityNodeRFC7540) {
+ for n.kids != nil {
+ n.kids.setParent(n.parent)
+ }
+ n.setParent(nil)
+ delete(ws.nodes, n.id)
+}
diff --git a/hack/tools/vendor/golang.org/x/net/http2/writesched_priority_rfc9218.go b/hack/tools/vendor/golang.org/x/net/http2/writesched_priority_rfc9218.go
new file mode 100644
index 000000000000..cb4cadc32d79
--- /dev/null
+++ b/hack/tools/vendor/golang.org/x/net/http2/writesched_priority_rfc9218.go
@@ -0,0 +1,209 @@
+// Copyright 2025 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package http2
+
+import (
+ "fmt"
+ "math"
+)
+
+type streamMetadata struct {
+ location *writeQueue
+ priority PriorityParam
+}
+
+type priorityWriteSchedulerRFC9218 struct {
+ // control contains control frames (SETTINGS, PING, etc.).
+ control writeQueue
+
+ // heads contain the head of a circular list of streams.
+ // We put these heads within a nested array that represents urgency and
+ // incremental, as defined in
+ // https://www.rfc-editor.org/rfc/rfc9218.html#name-priority-parameters.
+ // 8 represents u=0 up to u=7, and 2 represents i=false and i=true.
+ heads [8][2]*writeQueue
+
+ // streams contains a mapping between each stream ID and their metadata, so
+ // we can quickly locate them when needing to, for example, adjust their
+ // priority.
+ streams map[uint32]streamMetadata
+
+ // queuePool are empty queues for reuse.
+ queuePool writeQueuePool
+
+ // prioritizeIncremental is used to determine whether we should prioritize
+ // incremental streams or not, when urgency is the same in a given Pop()
+ // call.
+ prioritizeIncremental bool
+}
+
+func newPriorityWriteSchedulerRFC9218() WriteScheduler {
+ ws := &priorityWriteSchedulerRFC9218{
+ streams: make(map[uint32]streamMetadata),
+ }
+ return ws
+}
+
+func (ws *priorityWriteSchedulerRFC9218) OpenStream(streamID uint32, opt OpenStreamOptions) {
+ if ws.streams[streamID].location != nil {
+ panic(fmt.Errorf("stream %d already opened", streamID))
+ }
+ q := ws.queuePool.get()
+ ws.streams[streamID] = streamMetadata{
+ location: q,
+ priority: opt.priority,
+ }
+
+ u, i := opt.priority.urgency, opt.priority.incremental
+ if ws.heads[u][i] == nil {
+ ws.heads[u][i] = q
+ q.next = q
+ q.prev = q
+ } else {
+ // Queues are stored in a ring.
+ // Insert the new stream before ws.head, putting it at the end of the list.
+ q.prev = ws.heads[u][i].prev
+ q.next = ws.heads[u][i]
+ q.prev.next = q
+ q.next.prev = q
+ }
+}
+
+func (ws *priorityWriteSchedulerRFC9218) CloseStream(streamID uint32) {
+ metadata := ws.streams[streamID]
+ q, u, i := metadata.location, metadata.priority.urgency, metadata.priority.incremental
+ if q == nil {
+ return
+ }
+ if q.next == q {
+ // This was the only open stream.
+ ws.heads[u][i] = nil
+ } else {
+ q.prev.next = q.next
+ q.next.prev = q.prev
+ if ws.heads[u][i] == q {
+ ws.heads[u][i] = q.next
+ }
+ }
+ delete(ws.streams, streamID)
+ ws.queuePool.put(q)
+}
+
+func (ws *priorityWriteSchedulerRFC9218) AdjustStream(streamID uint32, priority PriorityParam) {
+ metadata := ws.streams[streamID]
+ q, u, i := metadata.location, metadata.priority.urgency, metadata.priority.incremental
+ if q == nil {
+ return
+ }
+
+ // Remove stream from current location.
+ if q.next == q {
+ // This was the only open stream.
+ ws.heads[u][i] = nil
+ } else {
+ q.prev.next = q.next
+ q.next.prev = q.prev
+ if ws.heads[u][i] == q {
+ ws.heads[u][i] = q.next
+ }
+ }
+
+ // Insert stream to the new queue.
+ u, i = priority.urgency, priority.incremental
+ if ws.heads[u][i] == nil {
+ ws.heads[u][i] = q
+ q.next = q
+ q.prev = q
+ } else {
+ // Queues are stored in a ring.
+ // Insert the new stream before ws.head, putting it at the end of the list.
+ q.prev = ws.heads[u][i].prev
+ q.next = ws.heads[u][i]
+ q.prev.next = q
+ q.next.prev = q
+ }
+
+ // Update the metadata.
+ ws.streams[streamID] = streamMetadata{
+ location: q,
+ priority: priority,
+ }
+}
+
+func (ws *priorityWriteSchedulerRFC9218) Push(wr FrameWriteRequest) {
+ if wr.isControl() {
+ ws.control.push(wr)
+ return
+ }
+ q := ws.streams[wr.StreamID()].location
+ if q == nil {
+ // This is a closed stream.
+ // wr should not be a HEADERS or DATA frame.
+ // We push the request onto the control queue.
+ if wr.DataSize() > 0 {
+ panic("add DATA on non-open stream")
+ }
+ ws.control.push(wr)
+ return
+ }
+ q.push(wr)
+}
+
+func (ws *priorityWriteSchedulerRFC9218) Pop() (FrameWriteRequest, bool) {
+ // Control and RST_STREAM frames first.
+ if !ws.control.empty() {
+ return ws.control.shift(), true
+ }
+
+ // On the next Pop(), we want to prioritize incremental if we prioritized
+ // non-incremental request of the same urgency this time. Vice-versa.
+ // i.e. when there are incremental and non-incremental requests at the same
+ // priority, we give 50% of our bandwidth to the incremental ones in
+ // aggregate and 50% to the first non-incremental one (since
+ // non-incremental streams do not use round-robin writes).
+ ws.prioritizeIncremental = !ws.prioritizeIncremental
+
+ // Always prioritize lowest u (i.e. highest urgency level).
+ for u := range ws.heads {
+ for i := range ws.heads[u] {
+ // When we want to prioritize incremental, we try to pop i=true
+ // first before i=false when u is the same.
+ if ws.prioritizeIncremental {
+ i = (i + 1) % 2
+ }
+ q := ws.heads[u][i]
+ if q == nil {
+ continue
+ }
+ for {
+ if wr, ok := q.consume(math.MaxInt32); ok {
+ if i == 1 {
+ // For incremental streams, we update head to q.next so
+ // we can round-robin between multiple streams that can
+ // immediately benefit from partial writes.
+ ws.heads[u][i] = q.next
+ } else {
+ // For non-incremental streams, we try to finish one to
+ // completion rather than doing round-robin. However,
+ // we update head here so that if q.consume() is !ok
+ // (e.g. the stream has no more frame to consume), head
+ // is updated to the next q that has frames to consume
+ // on future iterations. This way, we do not prioritize
+ // writing to unavailable stream on next Pop() calls,
+ // preventing head-of-line blocking.
+ ws.heads[u][i] = q
+ }
+ return wr, true
+ }
+ q = q.next
+ if q == ws.heads[u][i] {
+ break
+ }
+ }
+
+ }
+ }
+ return FrameWriteRequest{}, false
+}
diff --git a/hack/tools/vendor/golang.org/x/net/http2/writesched_roundrobin.go b/hack/tools/vendor/golang.org/x/net/http2/writesched_roundrobin.go
index 54fe86322d2f..737cff9ecbd8 100644
--- a/hack/tools/vendor/golang.org/x/net/http2/writesched_roundrobin.go
+++ b/hack/tools/vendor/golang.org/x/net/http2/writesched_roundrobin.go
@@ -25,7 +25,7 @@ type roundRobinWriteScheduler struct {
}
// newRoundRobinWriteScheduler constructs a new write scheduler.
-// The round robin scheduler priorizes control frames
+// The round robin scheduler prioritizes control frames
// like SETTINGS and PING over DATA frames.
// When there are no control frames to send, it performs a round-robin
// selection from the ready streams.
diff --git a/hack/tools/vendor/golang.org/x/net/internal/httpcommon/request.go b/hack/tools/vendor/golang.org/x/net/internal/httpcommon/request.go
index 4b705531793c..1e10f89ebf71 100644
--- a/hack/tools/vendor/golang.org/x/net/internal/httpcommon/request.go
+++ b/hack/tools/vendor/golang.org/x/net/internal/httpcommon/request.go
@@ -51,7 +51,7 @@ type EncodeHeadersParam struct {
DefaultUserAgent string
}
-// EncodeHeadersParam is the result of EncodeHeaders.
+// EncodeHeadersResult is the result of EncodeHeaders.
type EncodeHeadersResult struct {
HasBody bool
HasTrailers bool
@@ -399,7 +399,7 @@ type ServerRequestResult struct {
// If the request should be rejected, this is a short string suitable for passing
// to the http2 package's CountError function.
- // It might be a bit odd to return errors this way rather than returing an error,
+ // It might be a bit odd to return errors this way rather than returning an error,
// but this ensures we don't forget to include a CountError reason.
InvalidReason string
}
diff --git a/hack/tools/vendor/golang.org/x/net/internal/socks/socks.go b/hack/tools/vendor/golang.org/x/net/internal/socks/socks.go
index 84fcc32b634b..8eedb84cecc5 100644
--- a/hack/tools/vendor/golang.org/x/net/internal/socks/socks.go
+++ b/hack/tools/vendor/golang.org/x/net/internal/socks/socks.go
@@ -297,7 +297,7 @@ func (up *UsernamePassword) Authenticate(ctx context.Context, rw io.ReadWriter,
b = append(b, up.Username...)
b = append(b, byte(len(up.Password)))
b = append(b, up.Password...)
- // TODO(mikio): handle IO deadlines and cancelation if
+ // TODO(mikio): handle IO deadlines and cancellation if
// necessary
if _, err := rw.Write(b); err != nil {
return err
diff --git a/hack/tools/vendor/golang.org/x/oauth2/deviceauth.go b/hack/tools/vendor/golang.org/x/oauth2/deviceauth.go
index e99c92f39c78..e783a9437482 100644
--- a/hack/tools/vendor/golang.org/x/oauth2/deviceauth.go
+++ b/hack/tools/vendor/golang.org/x/oauth2/deviceauth.go
@@ -6,6 +6,7 @@ import (
"errors"
"fmt"
"io"
+ "mime"
"net/http"
"net/url"
"strings"
@@ -116,10 +117,38 @@ func retrieveDeviceAuth(ctx context.Context, c *Config, v url.Values) (*DeviceAu
return nil, fmt.Errorf("oauth2: cannot auth device: %v", err)
}
if code := r.StatusCode; code < 200 || code > 299 {
- return nil, &RetrieveError{
+ retrieveError := &RetrieveError{
Response: r,
Body: body,
}
+
+ content, _, _ := mime.ParseMediaType(r.Header.Get("Content-Type"))
+ switch content {
+ case "application/x-www-form-urlencoded", "text/plain":
+ // some endpoints return a query string
+ vals, err := url.ParseQuery(string(body))
+ if err != nil {
+ return nil, retrieveError
+ }
+ retrieveError.ErrorCode = vals.Get("error")
+ retrieveError.ErrorDescription = vals.Get("error_description")
+ retrieveError.ErrorURI = vals.Get("error_uri")
+ default:
+ var tj struct {
+ // https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
+ ErrorCode string `json:"error"`
+ ErrorDescription string `json:"error_description"`
+ ErrorURI string `json:"error_uri"`
+ }
+ if json.Unmarshal(body, &tj) != nil {
+ return nil, retrieveError
+ }
+ retrieveError.ErrorCode = tj.ErrorCode
+ retrieveError.ErrorDescription = tj.ErrorDescription
+ retrieveError.ErrorURI = tj.ErrorURI
+ }
+
+ return nil, retrieveError
}
da := &DeviceAuthResponse{}
diff --git a/hack/tools/vendor/golang.org/x/oauth2/google/externalaccount/aws.go b/hack/tools/vendor/golang.org/x/oauth2/google/externalaccount/aws.go
index e1a735e01b7e..f62ec99a5f01 100644
--- a/hack/tools/vendor/golang.org/x/oauth2/google/externalaccount/aws.go
+++ b/hack/tools/vendor/golang.org/x/oauth2/google/externalaccount/aws.go
@@ -5,7 +5,6 @@
package externalaccount
import (
- "bytes"
"context"
"crypto/hmac"
"crypto/sha256"
@@ -148,13 +147,13 @@ func canonicalHeaders(req *http.Request) (string, string) {
}
sort.Strings(headers)
- var fullHeaders bytes.Buffer
+ var fullHeaders strings.Builder
for _, header := range headers {
headerValue := strings.Join(lowerCaseHeaders[header], ",")
fullHeaders.WriteString(header)
- fullHeaders.WriteRune(':')
+ fullHeaders.WriteByte(':')
fullHeaders.WriteString(headerValue)
- fullHeaders.WriteRune('\n')
+ fullHeaders.WriteByte('\n')
}
return strings.Join(headers, ";"), fullHeaders.String()
diff --git a/hack/tools/vendor/golang.org/x/oauth2/google/google.go b/hack/tools/vendor/golang.org/x/oauth2/google/google.go
index e2eb9c927206..7d1fdd31d343 100644
--- a/hack/tools/vendor/golang.org/x/oauth2/google/google.go
+++ b/hack/tools/vendor/golang.org/x/oauth2/google/google.go
@@ -252,7 +252,7 @@ func (f *credentialsFile) tokenSource(ctx context.Context, params CredentialsPar
// Further information about retrieving access tokens from the GCE metadata
// server can be found at https://cloud.google.com/compute/docs/authentication.
func ComputeTokenSource(account string, scope ...string) oauth2.TokenSource {
- // refresh 3 minutes and 45 seconds early. The shortest MDS cache is currently 4 minutes, so any
+ // Refresh 3 minutes and 45 seconds early. The shortest MDS cache is currently 4 minutes, so any
// refreshes earlier are a waste of compute.
earlyExpirySecs := 225 * time.Second
return computeTokenSource(account, earlyExpirySecs, scope...)
diff --git a/hack/tools/vendor/golang.org/x/oauth2/oauth2.go b/hack/tools/vendor/golang.org/x/oauth2/oauth2.go
index de34feb84422..5c527d31fd38 100644
--- a/hack/tools/vendor/golang.org/x/oauth2/oauth2.go
+++ b/hack/tools/vendor/golang.org/x/oauth2/oauth2.go
@@ -9,7 +9,6 @@
package oauth2 // import "golang.org/x/oauth2"
import (
- "bytes"
"context"
"errors"
"net/http"
@@ -99,7 +98,7 @@ const (
// in the POST body as application/x-www-form-urlencoded parameters.
AuthStyleInParams AuthStyle = 1
- // AuthStyleInHeader sends the client_id and client_password
+ // AuthStyleInHeader sends the client_id and client_secret
// using HTTP Basic Authorization. This is an optional style
// described in the OAuth2 RFC 6749 section 2.3.1.
AuthStyleInHeader AuthStyle = 2
@@ -158,7 +157,7 @@ func SetAuthURLParam(key, value string) AuthCodeOption {
// PKCE), https://www.oauth.com/oauth2-servers/pkce/ and
// https://www.ietf.org/archive/id/draft-ietf-oauth-v2-1-09.html#name-cross-site-request-forgery (describing both approaches)
func (c *Config) AuthCodeURL(state string, opts ...AuthCodeOption) string {
- var buf bytes.Buffer
+ var buf strings.Builder
buf.WriteString(c.Endpoint.AuthURL)
v := url.Values{
"response_type": {"code"},
diff --git a/hack/tools/vendor/golang.org/x/oauth2/pkce.go b/hack/tools/vendor/golang.org/x/oauth2/pkce.go
index cea8374d51bf..f99384f0f5c7 100644
--- a/hack/tools/vendor/golang.org/x/oauth2/pkce.go
+++ b/hack/tools/vendor/golang.org/x/oauth2/pkce.go
@@ -51,7 +51,7 @@ func S256ChallengeFromVerifier(verifier string) string {
return base64.RawURLEncoding.EncodeToString(sha[:])
}
-// S256ChallengeOption derives a PKCE code challenge derived from verifier with
+// S256ChallengeOption derives a PKCE code challenge from the verifier with
// method S256. It should be passed to [Config.AuthCodeURL] or [Config.DeviceAuth]
// only.
func S256ChallengeOption(verifier string) AuthCodeOption {
diff --git a/hack/tools/vendor/golang.org/x/oauth2/token.go b/hack/tools/vendor/golang.org/x/oauth2/token.go
index 239ec329620f..e995eebb5e17 100644
--- a/hack/tools/vendor/golang.org/x/oauth2/token.go
+++ b/hack/tools/vendor/golang.org/x/oauth2/token.go
@@ -103,7 +103,7 @@ func (t *Token) WithExtra(extra any) *Token {
}
// Extra returns an extra field.
-// Extra fields are key-value pairs returned by the server as a
+// Extra fields are key-value pairs returned by the server as
// part of the token retrieval response.
func (t *Token) Extra(key string) any {
if raw, ok := t.raw.(map[string]any); ok {
diff --git a/hack/tools/vendor/golang.org/x/oauth2/transport.go b/hack/tools/vendor/golang.org/x/oauth2/transport.go
index 8bbebbac9ee7..9922ec331648 100644
--- a/hack/tools/vendor/golang.org/x/oauth2/transport.go
+++ b/hack/tools/vendor/golang.org/x/oauth2/transport.go
@@ -58,7 +58,7 @@ func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) {
var cancelOnce sync.Once
// CancelRequest does nothing. It used to be a legacy cancellation mechanism
-// but now only it only logs on first use to warn that it's deprecated.
+// but now only logs on first use to warn that it's deprecated.
//
// Deprecated: use contexts for cancellation instead.
func (t *Transport) CancelRequest(req *http.Request) {
diff --git a/hack/tools/vendor/golang.org/x/sync/errgroup/errgroup.go b/hack/tools/vendor/golang.org/x/sync/errgroup/errgroup.go
index 1d8cffae8cfc..2f45dbc86e53 100644
--- a/hack/tools/vendor/golang.org/x/sync/errgroup/errgroup.go
+++ b/hack/tools/vendor/golang.org/x/sync/errgroup/errgroup.go
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// Package errgroup provides synchronization, error propagation, and Context
-// cancelation for groups of goroutines working on subtasks of a common task.
+// cancellation for groups of goroutines working on subtasks of a common task.
//
// [errgroup.Group] is related to [sync.WaitGroup] but adds handling of tasks
// returning errors.
diff --git a/hack/tools/vendor/golang.org/x/sys/cpu/cpu.go b/hack/tools/vendor/golang.org/x/sys/cpu/cpu.go
index 63541994ef03..34c9ae76efd4 100644
--- a/hack/tools/vendor/golang.org/x/sys/cpu/cpu.go
+++ b/hack/tools/vendor/golang.org/x/sys/cpu/cpu.go
@@ -92,6 +92,9 @@ var ARM64 struct {
HasSHA2 bool // SHA2 hardware implementation
HasCRC32 bool // CRC32 hardware implementation
HasATOMICS bool // Atomic memory operation instruction set
+ HasHPDS bool // Hierarchical permission disables in translations tables
+ HasLOR bool // Limited ordering regions
+ HasPAN bool // Privileged access never
HasFPHP bool // Half precision floating-point instruction set
HasASIMDHP bool // Advanced SIMD half precision instruction set
HasCPUID bool // CPUID identification scheme registers
diff --git a/hack/tools/vendor/golang.org/x/sys/cpu/cpu_arm64.go b/hack/tools/vendor/golang.org/x/sys/cpu/cpu_arm64.go
index af2aa99f9f06..f449c679fe46 100644
--- a/hack/tools/vendor/golang.org/x/sys/cpu/cpu_arm64.go
+++ b/hack/tools/vendor/golang.org/x/sys/cpu/cpu_arm64.go
@@ -65,10 +65,10 @@ func setMinimalFeatures() {
func readARM64Registers() {
Initialized = true
- parseARM64SystemRegisters(getisar0(), getisar1(), getpfr0())
+ parseARM64SystemRegisters(getisar0(), getisar1(), getmmfr1(), getpfr0())
}
-func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) {
+func parseARM64SystemRegisters(isar0, isar1, mmfr1, pfr0 uint64) {
// ID_AA64ISAR0_EL1
switch extractBits(isar0, 4, 7) {
case 1:
@@ -152,6 +152,22 @@ func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) {
ARM64.HasI8MM = true
}
+ // ID_AA64MMFR1_EL1
+ switch extractBits(mmfr1, 12, 15) {
+ case 1, 2:
+ ARM64.HasHPDS = true
+ }
+
+ switch extractBits(mmfr1, 16, 19) {
+ case 1:
+ ARM64.HasLOR = true
+ }
+
+ switch extractBits(mmfr1, 20, 23) {
+ case 1, 2, 3:
+ ARM64.HasPAN = true
+ }
+
// ID_AA64PFR0_EL1
switch extractBits(pfr0, 16, 19) {
case 0:
diff --git a/hack/tools/vendor/golang.org/x/sys/cpu/cpu_arm64.s b/hack/tools/vendor/golang.org/x/sys/cpu/cpu_arm64.s
index 22cc99844a75..a4f24b3b0c8f 100644
--- a/hack/tools/vendor/golang.org/x/sys/cpu/cpu_arm64.s
+++ b/hack/tools/vendor/golang.org/x/sys/cpu/cpu_arm64.s
@@ -9,31 +9,34 @@
// func getisar0() uint64
TEXT ·getisar0(SB),NOSPLIT,$0-8
// get Instruction Set Attributes 0 into x0
- // mrs x0, ID_AA64ISAR0_EL1 = d5380600
- WORD $0xd5380600
+ MRS ID_AA64ISAR0_EL1, R0
MOVD R0, ret+0(FP)
RET
// func getisar1() uint64
TEXT ·getisar1(SB),NOSPLIT,$0-8
// get Instruction Set Attributes 1 into x0
- // mrs x0, ID_AA64ISAR1_EL1 = d5380620
- WORD $0xd5380620
+ MRS ID_AA64ISAR1_EL1, R0
+ MOVD R0, ret+0(FP)
+ RET
+
+// func getmmfr1() uint64
+TEXT ·getmmfr1(SB),NOSPLIT,$0-8
+ // get Memory Model Feature Register 1 into x0
+ MRS ID_AA64MMFR1_EL1, R0
MOVD R0, ret+0(FP)
RET
// func getpfr0() uint64
TEXT ·getpfr0(SB),NOSPLIT,$0-8
// get Processor Feature Register 0 into x0
- // mrs x0, ID_AA64PFR0_EL1 = d5380400
- WORD $0xd5380400
+ MRS ID_AA64PFR0_EL1, R0
MOVD R0, ret+0(FP)
RET
// func getzfr0() uint64
TEXT ·getzfr0(SB),NOSPLIT,$0-8
// get SVE Feature Register 0 into x0
- // mrs x0, ID_AA64ZFR0_EL1 = d5380480
- WORD $0xd5380480
+ MRS ID_AA64ZFR0_EL1, R0
MOVD R0, ret+0(FP)
RET
diff --git a/hack/tools/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go b/hack/tools/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go
index 6ac6e1efb208..e3fc5a8d31ca 100644
--- a/hack/tools/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go
+++ b/hack/tools/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go
@@ -8,5 +8,6 @@ package cpu
func getisar0() uint64
func getisar1() uint64
+func getmmfr1() uint64
func getpfr0() uint64
func getzfr0() uint64
diff --git a/hack/tools/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go b/hack/tools/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go
index 7f1946780bd3..8df2079e15f9 100644
--- a/hack/tools/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go
+++ b/hack/tools/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go
@@ -8,4 +8,5 @@ package cpu
func getisar0() uint64 { return 0 }
func getisar1() uint64 { return 0 }
+func getmmfr1() uint64 { return 0 }
func getpfr0() uint64 { return 0 }
diff --git a/hack/tools/vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go b/hack/tools/vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go
index ebfb3fc8e76d..19aea0633e8e 100644
--- a/hack/tools/vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go
+++ b/hack/tools/vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go
@@ -167,7 +167,7 @@ func doinit() {
setMinimalFeatures()
return
}
- parseARM64SystemRegisters(cpuid.aa64isar0, cpuid.aa64isar1, cpuid.aa64pfr0)
+ parseARM64SystemRegisters(cpuid.aa64isar0, cpuid.aa64isar1, cpuid.aa64mmfr1, cpuid.aa64pfr0)
Initialized = true
}
diff --git a/hack/tools/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go b/hack/tools/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go
index 85b64d5ccb73..87fd3a778076 100644
--- a/hack/tools/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go
+++ b/hack/tools/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go
@@ -59,7 +59,7 @@ func doinit() {
if !ok {
return
}
- parseARM64SystemRegisters(isar0, isar1, 0)
+ parseARM64SystemRegisters(isar0, isar1, 0, 0)
Initialized = true
}
diff --git a/hack/tools/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go b/hack/tools/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go
deleted file mode 100644
index 73687de748ad..000000000000
--- a/hack/tools/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build go1.5
-
-package plan9
-
-import "syscall"
-
-func fixwd() {
- syscall.Fixwd()
-}
-
-func Getwd() (wd string, err error) {
- return syscall.Getwd()
-}
-
-func Chdir(path string) error {
- return syscall.Chdir(path)
-}
diff --git a/hack/tools/vendor/golang.org/x/sys/plan9/pwd_plan9.go b/hack/tools/vendor/golang.org/x/sys/plan9/pwd_plan9.go
index fb945821847a..7a76489db161 100644
--- a/hack/tools/vendor/golang.org/x/sys/plan9/pwd_plan9.go
+++ b/hack/tools/vendor/golang.org/x/sys/plan9/pwd_plan9.go
@@ -2,22 +2,18 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !go1.5
-
package plan9
+import "syscall"
+
func fixwd() {
+ syscall.Fixwd()
}
func Getwd() (wd string, err error) {
- fd, err := open(".", O_RDONLY)
- if err != nil {
- return "", err
- }
- defer Close(fd)
- return Fd2path(fd)
+ return syscall.Getwd()
}
func Chdir(path string) error {
- return chdir(path)
+ return syscall.Chdir(path)
}
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/affinity_linux.go b/hack/tools/vendor/golang.org/x/sys/unix/affinity_linux.go
index 6e5c81acd049..3ea470387bcf 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/affinity_linux.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/affinity_linux.go
@@ -38,8 +38,15 @@ func SchedSetaffinity(pid int, set *CPUSet) error {
// Zero clears the set s, so that it contains no CPUs.
func (s *CPUSet) Zero() {
+ clear(s[:])
+}
+
+// Fill adds all possible CPU bits to the set s. On Linux, [SchedSetaffinity]
+// will silently ignore any invalid CPU bits in [CPUSet] so this is an
+// efficient way of resetting the CPU affinity of a process.
+func (s *CPUSet) Fill() {
for i := range s {
- s[i] = 0
+ s[i] = ^cpuMask(0)
}
}
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/fdset.go b/hack/tools/vendor/golang.org/x/sys/unix/fdset.go
index 9e83d18cd042..62ed12645f48 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/fdset.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/fdset.go
@@ -23,7 +23,5 @@ func (fds *FdSet) IsSet(fd int) bool {
// Zero clears the set fds.
func (fds *FdSet) Zero() {
- for i := range fds.Bits {
- fds.Bits[i] = 0
- }
+ clear(fds.Bits[:])
}
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/ifreq_linux.go b/hack/tools/vendor/golang.org/x/sys/unix/ifreq_linux.go
index 848840ae4c75..309f5a2b0c76 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/ifreq_linux.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/ifreq_linux.go
@@ -111,9 +111,7 @@ func (ifr *Ifreq) SetUint32(v uint32) {
// clear zeroes the ifreq's union field to prevent trailing garbage data from
// being sent to the kernel if an ifreq is reused.
func (ifr *Ifreq) clear() {
- for i := range ifr.raw.Ifru {
- ifr.raw.Ifru[i] = 0
- }
+ clear(ifr.raw.Ifru[:])
}
// TODO(mdlayher): export as IfreqData? For now we can provide helpers such as
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/mkall.sh b/hack/tools/vendor/golang.org/x/sys/unix/mkall.sh
index e6f31d374df5..d0ed61191292 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/mkall.sh
+++ b/hack/tools/vendor/golang.org/x/sys/unix/mkall.sh
@@ -49,6 +49,7 @@ esac
if [[ "$GOOS" = "linux" ]]; then
# Use the Docker-based build system
# Files generated through docker (use $cmd so you can Ctl-C the build or run)
+ set -e
$cmd docker build --tag generate:$GOOS $GOOS
$cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")/.." && pwd):/build generate:$GOOS
exit
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/mkerrors.sh b/hack/tools/vendor/golang.org/x/sys/unix/mkerrors.sh
index 6ab02b6c3122..42517077c437 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/hack/tools/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -226,6 +226,7 @@ struct ltchars {
#include
#include
#include
+#include
#include
#include
#include
@@ -349,6 +350,9 @@ struct ltchars {
#define _HIDIOCGRAWPHYS HIDIOCGRAWPHYS(_HIDIOCGRAWPHYS_LEN)
#define _HIDIOCGRAWUNIQ HIDIOCGRAWUNIQ(_HIDIOCGRAWUNIQ_LEN)
+// Renamed in v6.16, commit c6d732c38f93 ("net: ethtool: remove duplicate defines for family info")
+#define ETHTOOL_FAMILY_NAME ETHTOOL_GENL_NAME
+#define ETHTOOL_FAMILY_VERSION ETHTOOL_GENL_VERSION
'
includes_NetBSD='
@@ -526,6 +530,7 @@ ccflags="$@"
$2 ~ /^O[CNPFPL][A-Z]+[^_][A-Z]+$/ ||
$2 ~ /^(NL|CR|TAB|BS|VT|FF)DLY$/ ||
$2 ~ /^(NL|CR|TAB|BS|VT|FF)[0-9]$/ ||
+ $2 ~ /^(DT|EI|ELF|EV|NN|NT|PF|SHF|SHN|SHT|STB|STT|VER)_/ ||
$2 ~ /^O?XTABS$/ ||
$2 ~ /^TC[IO](ON|OFF)$/ ||
$2 ~ /^IN_/ ||
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/syscall_darwin.go b/hack/tools/vendor/golang.org/x/sys/unix/syscall_darwin.go
index 798f61ad3bf9..7838ca5db200 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/syscall_darwin.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/syscall_darwin.go
@@ -602,14 +602,9 @@ func Connectx(fd int, srcIf uint32, srcAddr, dstAddr Sockaddr, associd SaeAssocI
return
}
-// sys connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error)
const minIovec = 8
func Readv(fd int, iovs [][]byte) (n int, err error) {
- if !darwinKernelVersionMin(11, 0, 0) {
- return 0, ENOSYS
- }
-
iovecs := make([]Iovec, 0, minIovec)
iovecs = appendBytes(iovecs, iovs)
n, err = readv(fd, iovecs)
@@ -618,9 +613,6 @@ func Readv(fd int, iovs [][]byte) (n int, err error) {
}
func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) {
- if !darwinKernelVersionMin(11, 0, 0) {
- return 0, ENOSYS
- }
iovecs := make([]Iovec, 0, minIovec)
iovecs = appendBytes(iovecs, iovs)
n, err = preadv(fd, iovecs, offset)
@@ -629,10 +621,6 @@ func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) {
}
func Writev(fd int, iovs [][]byte) (n int, err error) {
- if !darwinKernelVersionMin(11, 0, 0) {
- return 0, ENOSYS
- }
-
iovecs := make([]Iovec, 0, minIovec)
iovecs = appendBytes(iovecs, iovs)
if raceenabled {
@@ -644,10 +632,6 @@ func Writev(fd int, iovs [][]byte) (n int, err error) {
}
func Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error) {
- if !darwinKernelVersionMin(11, 0, 0) {
- return 0, ENOSYS
- }
-
iovecs := make([]Iovec, 0, minIovec)
iovecs = appendBytes(iovecs, iovs)
if raceenabled {
@@ -707,45 +691,7 @@ func readvRacedetect(iovecs []Iovec, n int, err error) {
}
}
-func darwinMajorMinPatch() (maj, min, patch int, err error) {
- var un Utsname
- err = Uname(&un)
- if err != nil {
- return
- }
-
- var mmp [3]int
- c := 0
-Loop:
- for _, b := range un.Release[:] {
- switch {
- case b >= '0' && b <= '9':
- mmp[c] = 10*mmp[c] + int(b-'0')
- case b == '.':
- c++
- if c > 2 {
- return 0, 0, 0, ENOTSUP
- }
- case b == 0:
- break Loop
- default:
- return 0, 0, 0, ENOTSUP
- }
- }
- if c != 2 {
- return 0, 0, 0, ENOTSUP
- }
- return mmp[0], mmp[1], mmp[2], nil
-}
-
-func darwinKernelVersionMin(maj, min, patch int) bool {
- actualMaj, actualMin, actualPatch, err := darwinMajorMinPatch()
- if err != nil {
- return false
- }
- return actualMaj > maj || actualMaj == maj && (actualMin > min || actualMin == min && actualPatch >= patch)
-}
-
+//sys connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error)
//sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/syscall_linux.go b/hack/tools/vendor/golang.org/x/sys/unix/syscall_linux.go
index 4958a657085b..06c0eea6fb6a 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -801,9 +801,7 @@ func (sa *SockaddrPPPoE) sockaddr() (unsafe.Pointer, _Socklen, error) {
// one. The kernel expects SID to be in network byte order.
binary.BigEndian.PutUint16(sa.raw[6:8], sa.SID)
copy(sa.raw[8:14], sa.Remote)
- for i := 14; i < 14+IFNAMSIZ; i++ {
- sa.raw[i] = 0
- }
+ clear(sa.raw[14 : 14+IFNAMSIZ])
copy(sa.raw[14:], sa.Dev)
return unsafe.Pointer(&sa.raw), SizeofSockaddrPPPoX, nil
}
@@ -2645,3 +2643,9 @@ func SchedGetAttr(pid int, flags uint) (*SchedAttr, error) {
//sys Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error)
//sys Mseal(b []byte, flags uint) (err error)
+
+//sys setMemPolicy(mode int, mask *CPUSet, size int) (err error) = SYS_SET_MEMPOLICY
+
+func SetMemPolicy(mode int, mask *CPUSet) error {
+ return setMemPolicy(mode, mask, _CPU_SETSIZE)
+}
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/hack/tools/vendor/golang.org/x/sys/unix/syscall_netbsd.go
index 88162099af54..34a467697304 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/syscall_netbsd.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/syscall_netbsd.go
@@ -248,6 +248,23 @@ func Statvfs(path string, buf *Statvfs_t) (err error) {
return Statvfs1(path, buf, ST_WAIT)
}
+func Getvfsstat(buf []Statvfs_t, flags int) (n int, err error) {
+ var (
+ _p0 unsafe.Pointer
+ bufsize uintptr
+ )
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ bufsize = unsafe.Sizeof(Statvfs_t{}) * uintptr(len(buf))
+ }
+ r0, _, e1 := Syscall(SYS_GETVFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
/*
* Exposed directly
*/
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/syscall_solaris.go b/hack/tools/vendor/golang.org/x/sys/unix/syscall_solaris.go
index abc3955477c7..18a3d9bdabc1 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/syscall_solaris.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/syscall_solaris.go
@@ -629,7 +629,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Kill(pid int, signum syscall.Signal) (err error)
//sys Lchown(path string, uid int, gid int) (err error)
//sys Link(path string, link string) (err error)
-//sys Listen(s int, backlog int) (err error) = libsocket.__xnet_llisten
+//sys Listen(s int, backlog int) (err error) = libsocket.__xnet_listen
//sys Lstat(path string, stat *Stat_t) (err error)
//sys Madvise(b []byte, advice int) (err error)
//sys Mkdir(path string, mode uint32) (err error)
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux.go b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux.go
index 9e7a6c5a4fca..d0a75da572c9 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux.go
@@ -328,6 +328,8 @@ const (
AUDIT_KERNEL = 0x7d0
AUDIT_KERNEL_OTHER = 0x524
AUDIT_KERN_MODULE = 0x532
+ AUDIT_LANDLOCK_ACCESS = 0x58f
+ AUDIT_LANDLOCK_DOMAIN = 0x590
AUDIT_LAST_FEATURE = 0x1
AUDIT_LAST_KERN_ANOM_MSG = 0x707
AUDIT_LAST_USER_MSG = 0x4af
@@ -492,6 +494,7 @@ const (
BPF_F_BEFORE = 0x8
BPF_F_ID = 0x20
BPF_F_NETFILTER_IP_DEFRAG = 0x1
+ BPF_F_PREORDER = 0x40
BPF_F_QUERY_EFFECTIVE = 0x1
BPF_F_REDIRECT_FLAGS = 0x19
BPF_F_REPLACE = 0x4
@@ -528,6 +531,7 @@ const (
BPF_LDX = 0x1
BPF_LEN = 0x80
BPF_LL_OFF = -0x200000
+ BPF_LOAD_ACQ = 0x100
BPF_LSH = 0x60
BPF_MAJOR_VERSION = 0x1
BPF_MAXINSNS = 0x1000
@@ -555,6 +559,7 @@ const (
BPF_RET = 0x6
BPF_RSH = 0x70
BPF_ST = 0x2
+ BPF_STORE_REL = 0x110
BPF_STX = 0x3
BPF_SUB = 0x10
BPF_TAG_SIZE = 0x8
@@ -844,24 +849,90 @@ const (
DM_UUID_FLAG = 0x4000
DM_UUID_LEN = 0x81
DM_VERSION = 0xc138fd00
- DM_VERSION_EXTRA = "-ioctl (2025-01-17)"
+ DM_VERSION_EXTRA = "-ioctl (2025-04-28)"
DM_VERSION_MAJOR = 0x4
- DM_VERSION_MINOR = 0x31
+ DM_VERSION_MINOR = 0x32
DM_VERSION_PATCHLEVEL = 0x0
+ DT_ADDRRNGHI = 0x6ffffeff
+ DT_ADDRRNGLO = 0x6ffffe00
DT_BLK = 0x6
DT_CHR = 0x2
+ DT_DEBUG = 0x15
DT_DIR = 0x4
+ DT_ENCODING = 0x20
DT_FIFO = 0x1
+ DT_FINI = 0xd
+ DT_FLAGS_1 = 0x6ffffffb
+ DT_GNU_HASH = 0x6ffffef5
+ DT_HASH = 0x4
+ DT_HIOS = 0x6ffff000
+ DT_HIPROC = 0x7fffffff
+ DT_INIT = 0xc
+ DT_JMPREL = 0x17
DT_LNK = 0xa
+ DT_LOOS = 0x6000000d
+ DT_LOPROC = 0x70000000
+ DT_NEEDED = 0x1
+ DT_NULL = 0x0
+ DT_PLTGOT = 0x3
+ DT_PLTREL = 0x14
+ DT_PLTRELSZ = 0x2
DT_REG = 0x8
+ DT_REL = 0x11
+ DT_RELA = 0x7
+ DT_RELACOUNT = 0x6ffffff9
+ DT_RELAENT = 0x9
+ DT_RELASZ = 0x8
+ DT_RELCOUNT = 0x6ffffffa
+ DT_RELENT = 0x13
+ DT_RELSZ = 0x12
+ DT_RPATH = 0xf
DT_SOCK = 0xc
+ DT_SONAME = 0xe
+ DT_STRSZ = 0xa
+ DT_STRTAB = 0x5
+ DT_SYMBOLIC = 0x10
+ DT_SYMENT = 0xb
+ DT_SYMTAB = 0x6
+ DT_TEXTREL = 0x16
DT_UNKNOWN = 0x0
+ DT_VALRNGHI = 0x6ffffdff
+ DT_VALRNGLO = 0x6ffffd00
+ DT_VERDEF = 0x6ffffffc
+ DT_VERDEFNUM = 0x6ffffffd
+ DT_VERNEED = 0x6ffffffe
+ DT_VERNEEDNUM = 0x6fffffff
+ DT_VERSYM = 0x6ffffff0
DT_WHT = 0xe
ECHO = 0x8
ECRYPTFS_SUPER_MAGIC = 0xf15f
EFD_SEMAPHORE = 0x1
EFIVARFS_MAGIC = 0xde5e81e4
EFS_SUPER_MAGIC = 0x414a53
+ EI_CLASS = 0x4
+ EI_DATA = 0x5
+ EI_MAG0 = 0x0
+ EI_MAG1 = 0x1
+ EI_MAG2 = 0x2
+ EI_MAG3 = 0x3
+ EI_NIDENT = 0x10
+ EI_OSABI = 0x7
+ EI_PAD = 0x8
+ EI_VERSION = 0x6
+ ELFCLASS32 = 0x1
+ ELFCLASS64 = 0x2
+ ELFCLASSNONE = 0x0
+ ELFCLASSNUM = 0x3
+ ELFDATA2LSB = 0x1
+ ELFDATA2MSB = 0x2
+ ELFDATANONE = 0x0
+ ELFMAG = "\177ELF"
+ ELFMAG0 = 0x7f
+ ELFMAG1 = 'E'
+ ELFMAG2 = 'L'
+ ELFMAG3 = 'F'
+ ELFOSABI_LINUX = 0x3
+ ELFOSABI_NONE = 0x0
EM_386 = 0x3
EM_486 = 0x6
EM_68K = 0x4
@@ -937,9 +1008,6 @@ const (
EPOLL_CTL_MOD = 0x3
EPOLL_IOC_TYPE = 0x8a
EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ESP_V4_FLOW = 0xa
- ESP_V6_FLOW = 0xc
- ETHER_FLOW = 0x12
ETHTOOL_BUSINFO_LEN = 0x20
ETHTOOL_EROMVERS_LEN = 0x20
ETHTOOL_FAMILY_NAME = "ethtool"
@@ -1150,14 +1218,24 @@ const (
ETH_P_WCCP = 0x883e
ETH_P_X25 = 0x805
ETH_P_XDSA = 0xf8
+ ET_CORE = 0x4
+ ET_DYN = 0x3
+ ET_EXEC = 0x2
+ ET_HIPROC = 0xffff
+ ET_LOPROC = 0xff00
+ ET_NONE = 0x0
+ ET_REL = 0x1
EV_ABS = 0x3
EV_CNT = 0x20
+ EV_CURRENT = 0x1
EV_FF = 0x15
EV_FF_STATUS = 0x17
EV_KEY = 0x1
EV_LED = 0x11
EV_MAX = 0x1f
EV_MSC = 0x4
+ EV_NONE = 0x0
+ EV_NUM = 0x2
EV_PWR = 0x16
EV_REL = 0x2
EV_REP = 0x14
@@ -1213,6 +1291,7 @@ const (
FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2
FAN_EVENT_INFO_TYPE_ERROR = 0x5
FAN_EVENT_INFO_TYPE_FID = 0x1
+ FAN_EVENT_INFO_TYPE_MNT = 0x7
FAN_EVENT_INFO_TYPE_NEW_DFID_NAME = 0xc
FAN_EVENT_INFO_TYPE_OLD_DFID_NAME = 0xa
FAN_EVENT_INFO_TYPE_PIDFD = 0x4
@@ -1231,9 +1310,12 @@ const (
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
FAN_MARK_IGNORE_SURV = 0x440
FAN_MARK_INODE = 0x0
+ FAN_MARK_MNTNS = 0x110
FAN_MARK_MOUNT = 0x10
FAN_MARK_ONLYDIR = 0x8
FAN_MARK_REMOVE = 0x2
+ FAN_MNT_ATTACH = 0x1000000
+ FAN_MNT_DETACH = 0x2000000
FAN_MODIFY = 0x2
FAN_MOVE = 0xc0
FAN_MOVED_FROM = 0x40
@@ -1255,6 +1337,7 @@ const (
FAN_REPORT_DIR_FID = 0x400
FAN_REPORT_FD_ERROR = 0x2000
FAN_REPORT_FID = 0x200
+ FAN_REPORT_MNT = 0x4000
FAN_REPORT_NAME = 0x800
FAN_REPORT_PIDFD = 0x80
FAN_REPORT_TARGET_FID = 0x1000
@@ -1274,6 +1357,7 @@ const (
FIB_RULE_PERMANENT = 0x1
FIB_RULE_UNRESOLVED = 0x4
FIDEDUPERANGE = 0xc0189436
+ FSCRYPT_ADD_KEY_FLAG_HW_WRAPPED = 0x1
FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
@@ -1582,7 +1666,6 @@ const (
IPV6_DONTFRAG = 0x3e
IPV6_DROP_MEMBERSHIP = 0x15
IPV6_DSTOPTS = 0x3b
- IPV6_FLOW = 0x11
IPV6_FREEBIND = 0x4e
IPV6_HDRINCL = 0x24
IPV6_HOPLIMIT = 0x34
@@ -1633,7 +1716,6 @@ const (
IPV6_TRANSPARENT = 0x4b
IPV6_UNICAST_HOPS = 0x10
IPV6_UNICAST_IF = 0x4c
- IPV6_USER_FLOW = 0xe
IPV6_V6ONLY = 0x1a
IPV6_VERSION = 0x60
IPV6_VERSION_MASK = 0xf0
@@ -1695,7 +1777,6 @@ const (
IP_TTL = 0x2
IP_UNBLOCK_SOURCE = 0x25
IP_UNICAST_IF = 0x32
- IP_USER_FLOW = 0xd
IP_XFRM_POLICY = 0x11
ISOFS_SUPER_MAGIC = 0x9660
ISTRIP = 0x20
@@ -1817,7 +1898,11 @@ const (
LANDLOCK_ACCESS_FS_WRITE_FILE = 0x2
LANDLOCK_ACCESS_NET_BIND_TCP = 0x1
LANDLOCK_ACCESS_NET_CONNECT_TCP = 0x2
+ LANDLOCK_CREATE_RULESET_ERRATA = 0x2
LANDLOCK_CREATE_RULESET_VERSION = 0x1
+ LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON = 0x2
+ LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF = 0x1
+ LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF = 0x4
LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET = 0x1
LANDLOCK_SCOPE_SIGNAL = 0x2
LINUX_REBOOT_CMD_CAD_OFF = 0x0
@@ -2267,7 +2352,167 @@ const (
NLM_F_REPLACE = 0x100
NLM_F_REQUEST = 0x1
NLM_F_ROOT = 0x100
+ NN_386_IOPERM = "LINUX"
+ NN_386_TLS = "LINUX"
+ NN_ARC_V2 = "LINUX"
+ NN_ARM_FPMR = "LINUX"
+ NN_ARM_GCS = "LINUX"
+ NN_ARM_HW_BREAK = "LINUX"
+ NN_ARM_HW_WATCH = "LINUX"
+ NN_ARM_PACA_KEYS = "LINUX"
+ NN_ARM_PACG_KEYS = "LINUX"
+ NN_ARM_PAC_ENABLED_KEYS = "LINUX"
+ NN_ARM_PAC_MASK = "LINUX"
+ NN_ARM_POE = "LINUX"
+ NN_ARM_SSVE = "LINUX"
+ NN_ARM_SVE = "LINUX"
+ NN_ARM_SYSTEM_CALL = "LINUX"
+ NN_ARM_TAGGED_ADDR_CTRL = "LINUX"
+ NN_ARM_TLS = "LINUX"
+ NN_ARM_VFP = "LINUX"
+ NN_ARM_ZA = "LINUX"
+ NN_ARM_ZT = "LINUX"
+ NN_AUXV = "CORE"
+ NN_FILE = "CORE"
+ NN_GNU_PROPERTY_TYPE_0 = "GNU"
+ NN_LOONGARCH_CPUCFG = "LINUX"
+ NN_LOONGARCH_CSR = "LINUX"
+ NN_LOONGARCH_HW_BREAK = "LINUX"
+ NN_LOONGARCH_HW_WATCH = "LINUX"
+ NN_LOONGARCH_LASX = "LINUX"
+ NN_LOONGARCH_LBT = "LINUX"
+ NN_LOONGARCH_LSX = "LINUX"
+ NN_MIPS_DSP = "LINUX"
+ NN_MIPS_FP_MODE = "LINUX"
+ NN_MIPS_MSA = "LINUX"
+ NN_PPC_DEXCR = "LINUX"
+ NN_PPC_DSCR = "LINUX"
+ NN_PPC_EBB = "LINUX"
+ NN_PPC_HASHKEYR = "LINUX"
+ NN_PPC_PKEY = "LINUX"
+ NN_PPC_PMU = "LINUX"
+ NN_PPC_PPR = "LINUX"
+ NN_PPC_SPE = "LINUX"
+ NN_PPC_TAR = "LINUX"
+ NN_PPC_TM_CDSCR = "LINUX"
+ NN_PPC_TM_CFPR = "LINUX"
+ NN_PPC_TM_CGPR = "LINUX"
+ NN_PPC_TM_CPPR = "LINUX"
+ NN_PPC_TM_CTAR = "LINUX"
+ NN_PPC_TM_CVMX = "LINUX"
+ NN_PPC_TM_CVSX = "LINUX"
+ NN_PPC_TM_SPR = "LINUX"
+ NN_PPC_VMX = "LINUX"
+ NN_PPC_VSX = "LINUX"
+ NN_PRFPREG = "CORE"
+ NN_PRPSINFO = "CORE"
+ NN_PRSTATUS = "CORE"
+ NN_PRXFPREG = "LINUX"
+ NN_RISCV_CSR = "LINUX"
+ NN_RISCV_TAGGED_ADDR_CTRL = "LINUX"
+ NN_RISCV_VECTOR = "LINUX"
+ NN_S390_CTRS = "LINUX"
+ NN_S390_GS_BC = "LINUX"
+ NN_S390_GS_CB = "LINUX"
+ NN_S390_HIGH_GPRS = "LINUX"
+ NN_S390_LAST_BREAK = "LINUX"
+ NN_S390_PREFIX = "LINUX"
+ NN_S390_PV_CPU_DATA = "LINUX"
+ NN_S390_RI_CB = "LINUX"
+ NN_S390_SYSTEM_CALL = "LINUX"
+ NN_S390_TDB = "LINUX"
+ NN_S390_TIMER = "LINUX"
+ NN_S390_TODCMP = "LINUX"
+ NN_S390_TODPREG = "LINUX"
+ NN_S390_VXRS_HIGH = "LINUX"
+ NN_S390_VXRS_LOW = "LINUX"
+ NN_SIGINFO = "CORE"
+ NN_TASKSTRUCT = "CORE"
+ NN_VMCOREDD = "LINUX"
+ NN_X86_SHSTK = "LINUX"
+ NN_X86_XSAVE_LAYOUT = "LINUX"
+ NN_X86_XSTATE = "LINUX"
NSFS_MAGIC = 0x6e736673
+ NT_386_IOPERM = 0x201
+ NT_386_TLS = 0x200
+ NT_ARC_V2 = 0x600
+ NT_ARM_FPMR = 0x40e
+ NT_ARM_GCS = 0x410
+ NT_ARM_HW_BREAK = 0x402
+ NT_ARM_HW_WATCH = 0x403
+ NT_ARM_PACA_KEYS = 0x407
+ NT_ARM_PACG_KEYS = 0x408
+ NT_ARM_PAC_ENABLED_KEYS = 0x40a
+ NT_ARM_PAC_MASK = 0x406
+ NT_ARM_POE = 0x40f
+ NT_ARM_SSVE = 0x40b
+ NT_ARM_SVE = 0x405
+ NT_ARM_SYSTEM_CALL = 0x404
+ NT_ARM_TAGGED_ADDR_CTRL = 0x409
+ NT_ARM_TLS = 0x401
+ NT_ARM_VFP = 0x400
+ NT_ARM_ZA = 0x40c
+ NT_ARM_ZT = 0x40d
+ NT_AUXV = 0x6
+ NT_FILE = 0x46494c45
+ NT_GNU_PROPERTY_TYPE_0 = 0x5
+ NT_LOONGARCH_CPUCFG = 0xa00
+ NT_LOONGARCH_CSR = 0xa01
+ NT_LOONGARCH_HW_BREAK = 0xa05
+ NT_LOONGARCH_HW_WATCH = 0xa06
+ NT_LOONGARCH_LASX = 0xa03
+ NT_LOONGARCH_LBT = 0xa04
+ NT_LOONGARCH_LSX = 0xa02
+ NT_MIPS_DSP = 0x800
+ NT_MIPS_FP_MODE = 0x801
+ NT_MIPS_MSA = 0x802
+ NT_PPC_DEXCR = 0x111
+ NT_PPC_DSCR = 0x105
+ NT_PPC_EBB = 0x106
+ NT_PPC_HASHKEYR = 0x112
+ NT_PPC_PKEY = 0x110
+ NT_PPC_PMU = 0x107
+ NT_PPC_PPR = 0x104
+ NT_PPC_SPE = 0x101
+ NT_PPC_TAR = 0x103
+ NT_PPC_TM_CDSCR = 0x10f
+ NT_PPC_TM_CFPR = 0x109
+ NT_PPC_TM_CGPR = 0x108
+ NT_PPC_TM_CPPR = 0x10e
+ NT_PPC_TM_CTAR = 0x10d
+ NT_PPC_TM_CVMX = 0x10a
+ NT_PPC_TM_CVSX = 0x10b
+ NT_PPC_TM_SPR = 0x10c
+ NT_PPC_VMX = 0x100
+ NT_PPC_VSX = 0x102
+ NT_PRFPREG = 0x2
+ NT_PRPSINFO = 0x3
+ NT_PRSTATUS = 0x1
+ NT_PRXFPREG = 0x46e62b7f
+ NT_RISCV_CSR = 0x900
+ NT_RISCV_TAGGED_ADDR_CTRL = 0x902
+ NT_RISCV_VECTOR = 0x901
+ NT_S390_CTRS = 0x304
+ NT_S390_GS_BC = 0x30c
+ NT_S390_GS_CB = 0x30b
+ NT_S390_HIGH_GPRS = 0x300
+ NT_S390_LAST_BREAK = 0x306
+ NT_S390_PREFIX = 0x305
+ NT_S390_PV_CPU_DATA = 0x30e
+ NT_S390_RI_CB = 0x30d
+ NT_S390_SYSTEM_CALL = 0x307
+ NT_S390_TDB = 0x308
+ NT_S390_TIMER = 0x301
+ NT_S390_TODCMP = 0x302
+ NT_S390_TODPREG = 0x303
+ NT_S390_VXRS_HIGH = 0x30a
+ NT_S390_VXRS_LOW = 0x309
+ NT_SIGINFO = 0x53494749
+ NT_TASKSTRUCT = 0x4
+ NT_VMCOREDD = 0x700
+ NT_X86_SHSTK = 0x204
+ NT_X86_XSAVE_LAYOUT = 0x205
+ NT_X86_XSTATE = 0x202
OCFS2_SUPER_MAGIC = 0x7461636f
OCRNL = 0x8
OFDEL = 0x80
@@ -2454,6 +2699,59 @@ const (
PERF_RECORD_MISC_USER = 0x2
PERF_SAMPLE_BRANCH_PLM_ALL = 0x7
PERF_SAMPLE_WEIGHT_TYPE = 0x1004000
+ PF_ALG = 0x26
+ PF_APPLETALK = 0x5
+ PF_ASH = 0x12
+ PF_ATMPVC = 0x8
+ PF_ATMSVC = 0x14
+ PF_AX25 = 0x3
+ PF_BLUETOOTH = 0x1f
+ PF_BRIDGE = 0x7
+ PF_CAIF = 0x25
+ PF_CAN = 0x1d
+ PF_DECnet = 0xc
+ PF_ECONET = 0x13
+ PF_FILE = 0x1
+ PF_IB = 0x1b
+ PF_IEEE802154 = 0x24
+ PF_INET = 0x2
+ PF_INET6 = 0xa
+ PF_IPX = 0x4
+ PF_IRDA = 0x17
+ PF_ISDN = 0x22
+ PF_IUCV = 0x20
+ PF_KCM = 0x29
+ PF_KEY = 0xf
+ PF_LLC = 0x1a
+ PF_LOCAL = 0x1
+ PF_MAX = 0x2e
+ PF_MCTP = 0x2d
+ PF_MPLS = 0x1c
+ PF_NETBEUI = 0xd
+ PF_NETLINK = 0x10
+ PF_NETROM = 0x6
+ PF_NFC = 0x27
+ PF_PACKET = 0x11
+ PF_PHONET = 0x23
+ PF_PPPOX = 0x18
+ PF_QIPCRTR = 0x2a
+ PF_R = 0x4
+ PF_RDS = 0x15
+ PF_ROSE = 0xb
+ PF_ROUTE = 0x10
+ PF_RXRPC = 0x21
+ PF_SECURITY = 0xe
+ PF_SMC = 0x2b
+ PF_SNA = 0x16
+ PF_TIPC = 0x1e
+ PF_UNIX = 0x1
+ PF_UNSPEC = 0x0
+ PF_VSOCK = 0x28
+ PF_W = 0x2
+ PF_WANPIPE = 0x19
+ PF_X = 0x1
+ PF_X25 = 0x9
+ PF_XDP = 0x2c
PID_FS_MAGIC = 0x50494446
PIPEFS_MAGIC = 0x50495045
PPPIOCGNPMODE = 0xc008744c
@@ -2493,6 +2791,10 @@ const (
PR_FP_EXC_UND = 0x40000
PR_FP_MODE_FR = 0x1
PR_FP_MODE_FRE = 0x2
+ PR_FUTEX_HASH = 0x4e
+ PR_FUTEX_HASH_GET_IMMUTABLE = 0x3
+ PR_FUTEX_HASH_GET_SLOTS = 0x2
+ PR_FUTEX_HASH_SET_SLOTS = 0x1
PR_GET_AUXV = 0x41555856
PR_GET_CHILD_SUBREAPER = 0x25
PR_GET_DUMPABLE = 0x3
@@ -2652,6 +2954,10 @@ const (
PR_TAGGED_ADDR_ENABLE = 0x1
PR_TASK_PERF_EVENTS_DISABLE = 0x1f
PR_TASK_PERF_EVENTS_ENABLE = 0x20
+ PR_TIMER_CREATE_RESTORE_IDS = 0x4d
+ PR_TIMER_CREATE_RESTORE_IDS_GET = 0x2
+ PR_TIMER_CREATE_RESTORE_IDS_OFF = 0x0
+ PR_TIMER_CREATE_RESTORE_IDS_ON = 0x1
PR_TIMING_STATISTICAL = 0x0
PR_TIMING_TIMESTAMP = 0x1
PR_TSC_ENABLE = 0x1
@@ -2732,6 +3038,7 @@ const (
PTRACE_SETREGSET = 0x4205
PTRACE_SETSIGINFO = 0x4203
PTRACE_SETSIGMASK = 0x420b
+ PTRACE_SET_SYSCALL_INFO = 0x4212
PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG = 0x4210
PTRACE_SINGLESTEP = 0x9
PTRACE_SYSCALL = 0x18
@@ -2740,6 +3047,23 @@ const (
PTRACE_SYSCALL_INFO_NONE = 0x0
PTRACE_SYSCALL_INFO_SECCOMP = 0x3
PTRACE_TRACEME = 0x0
+ PT_AARCH64_MEMTAG_MTE = 0x70000002
+ PT_DYNAMIC = 0x2
+ PT_GNU_EH_FRAME = 0x6474e550
+ PT_GNU_PROPERTY = 0x6474e553
+ PT_GNU_RELRO = 0x6474e552
+ PT_GNU_STACK = 0x6474e551
+ PT_HIOS = 0x6fffffff
+ PT_HIPROC = 0x7fffffff
+ PT_INTERP = 0x3
+ PT_LOAD = 0x1
+ PT_LOOS = 0x60000000
+ PT_LOPROC = 0x70000000
+ PT_NOTE = 0x4
+ PT_NULL = 0x0
+ PT_PHDR = 0x6
+ PT_SHLIB = 0x5
+ PT_TLS = 0x7
P_ALL = 0x0
P_PGID = 0x2
P_PID = 0x1
@@ -2982,6 +3306,7 @@ const (
RTPROT_NTK = 0xf
RTPROT_OPENR = 0x63
RTPROT_OSPF = 0xbc
+ RTPROT_OVN = 0x54
RTPROT_RA = 0x9
RTPROT_REDIRECT = 0x1
RTPROT_RIP = 0xbd
@@ -3072,6 +3397,47 @@ const (
SEEK_MAX = 0x4
SEEK_SET = 0x0
SELINUX_MAGIC = 0xf97cff8c
+ SHF_ALLOC = 0x2
+ SHF_EXCLUDE = 0x8000000
+ SHF_EXECINSTR = 0x4
+ SHF_GROUP = 0x200
+ SHF_INFO_LINK = 0x40
+ SHF_LINK_ORDER = 0x80
+ SHF_MASKOS = 0xff00000
+ SHF_MASKPROC = 0xf0000000
+ SHF_MERGE = 0x10
+ SHF_ORDERED = 0x4000000
+ SHF_OS_NONCONFORMING = 0x100
+ SHF_RELA_LIVEPATCH = 0x100000
+ SHF_RO_AFTER_INIT = 0x200000
+ SHF_STRINGS = 0x20
+ SHF_TLS = 0x400
+ SHF_WRITE = 0x1
+ SHN_ABS = 0xfff1
+ SHN_COMMON = 0xfff2
+ SHN_HIPROC = 0xff1f
+ SHN_HIRESERVE = 0xffff
+ SHN_LIVEPATCH = 0xff20
+ SHN_LOPROC = 0xff00
+ SHN_LORESERVE = 0xff00
+ SHN_UNDEF = 0x0
+ SHT_DYNAMIC = 0x6
+ SHT_DYNSYM = 0xb
+ SHT_HASH = 0x5
+ SHT_HIPROC = 0x7fffffff
+ SHT_HIUSER = 0xffffffff
+ SHT_LOPROC = 0x70000000
+ SHT_LOUSER = 0x80000000
+ SHT_NOBITS = 0x8
+ SHT_NOTE = 0x7
+ SHT_NULL = 0x0
+ SHT_NUM = 0xc
+ SHT_PROGBITS = 0x1
+ SHT_REL = 0x9
+ SHT_RELA = 0x4
+ SHT_SHLIB = 0xa
+ SHT_STRTAB = 0x3
+ SHT_SYMTAB = 0x2
SHUT_RD = 0x0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
@@ -3298,6 +3664,16 @@ const (
STATX_UID = 0x8
STATX_WRITE_ATOMIC = 0x10000
STATX__RESERVED = 0x80000000
+ STB_GLOBAL = 0x1
+ STB_LOCAL = 0x0
+ STB_WEAK = 0x2
+ STT_COMMON = 0x5
+ STT_FILE = 0x4
+ STT_FUNC = 0x2
+ STT_NOTYPE = 0x0
+ STT_OBJECT = 0x1
+ STT_SECTION = 0x3
+ STT_TLS = 0x6
SYNC_FILE_RANGE_WAIT_AFTER = 0x4
SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
SYNC_FILE_RANGE_WRITE = 0x2
@@ -3336,7 +3712,7 @@ const (
TASKSTATS_GENL_NAME = "TASKSTATS"
TASKSTATS_GENL_VERSION = 0x1
TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0xf
+ TASKSTATS_VERSION = 0x10
TCIFLUSH = 0x0
TCIOFF = 0x2
TCIOFLUSH = 0x2
@@ -3406,8 +3782,6 @@ const (
TCP_TX_DELAY = 0x25
TCP_ULP = 0x1f
TCP_USER_TIMEOUT = 0x12
- TCP_V4_FLOW = 0x1
- TCP_V6_FLOW = 0x5
TCP_WINDOW_CLAMP = 0xa
TCP_ZEROCOPY_RECEIVE = 0x23
TFD_TIMER_ABSTIME = 0x1
@@ -3530,14 +3904,14 @@ const (
UDP_NO_CHECK6_RX = 0x66
UDP_NO_CHECK6_TX = 0x65
UDP_SEGMENT = 0x67
- UDP_V4_FLOW = 0x2
- UDP_V6_FLOW = 0x6
UMOUNT_NOFOLLOW = 0x8
USBDEVICE_SUPER_MAGIC = 0x9fa2
UTIME_NOW = 0x3fffffff
UTIME_OMIT = 0x3ffffffe
V9FS_MAGIC = 0x1021997
VERASE = 0x2
+ VER_FLG_BASE = 0x1
+ VER_FLG_WEAK = 0x2
VINTR = 0x0
VKILL = 0x3
VLNEXT = 0xf
@@ -3574,7 +3948,7 @@ const (
WDIOS_TEMPPANIC = 0x4
WDIOS_UNKNOWN = -0x1
WEXITED = 0x4
- WGALLOWEDIP_A_MAX = 0x3
+ WGALLOWEDIP_A_MAX = 0x4
WGDEVICE_A_MAX = 0x8
WGPEER_A_MAX = 0xa
WG_CMD_MAX = 0x1
@@ -3688,6 +4062,7 @@ const (
XDP_SHARED_UMEM = 0x1
XDP_STATISTICS = 0x7
XDP_TXMD_FLAGS_CHECKSUM = 0x2
+ XDP_TXMD_FLAGS_LAUNCH_TIME = 0x4
XDP_TXMD_FLAGS_TIMESTAMP = 0x1
XDP_TX_METADATA = 0x2
XDP_TX_RING = 0x3
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
index a8c421e29b5e..1c37f9fbc45c 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
@@ -68,6 +68,7 @@ const (
CS8 = 0x30
CSIZE = 0x30
CSTOPB = 0x40
+ DM_MPATH_PROBE_PATHS = 0xfd12
ECCGETLAYOUT = 0x81484d11
ECCGETSTATS = 0x80104d12
ECHOCTL = 0x200
@@ -360,6 +361,7 @@ const (
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10
SO_PASSPIDFD = 0x4c
+ SO_PASSRIGHTS = 0x53
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x11
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
index 9a88d18130fe..6f54d34aefc9 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
@@ -68,6 +68,7 @@ const (
CS8 = 0x30
CSIZE = 0x30
CSTOPB = 0x40
+ DM_MPATH_PROBE_PATHS = 0xfd12
ECCGETLAYOUT = 0x81484d11
ECCGETSTATS = 0x80104d12
ECHOCTL = 0x200
@@ -361,6 +362,7 @@ const (
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10
SO_PASSPIDFD = 0x4c
+ SO_PASSRIGHTS = 0x53
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x11
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
index 7cb6a867efd5..783ec5c126f0 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
@@ -68,6 +68,7 @@ const (
CS8 = 0x30
CSIZE = 0x30
CSTOPB = 0x40
+ DM_MPATH_PROBE_PATHS = 0xfd12
ECCGETLAYOUT = 0x81484d11
ECCGETSTATS = 0x80104d12
ECHOCTL = 0x200
@@ -366,6 +367,7 @@ const (
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10
SO_PASSPIDFD = 0x4c
+ SO_PASSRIGHTS = 0x53
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x11
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
index d0ecd2c583bf..ca83d3ba162c 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
@@ -68,6 +68,7 @@ const (
CS8 = 0x30
CSIZE = 0x30
CSTOPB = 0x40
+ DM_MPATH_PROBE_PATHS = 0xfd12
ECCGETLAYOUT = 0x81484d11
ECCGETSTATS = 0x80104d12
ECHOCTL = 0x200
@@ -359,6 +360,7 @@ const (
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10
SO_PASSPIDFD = 0x4c
+ SO_PASSRIGHTS = 0x53
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x11
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
index 7a2940ae0a35..607e611c0cbe 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
@@ -68,6 +68,7 @@ const (
CS8 = 0x30
CSIZE = 0x30
CSTOPB = 0x40
+ DM_MPATH_PROBE_PATHS = 0xfd12
ECCGETLAYOUT = 0x81484d11
ECCGETSTATS = 0x80104d12
ECHOCTL = 0x200
@@ -353,6 +354,7 @@ const (
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10
SO_PASSPIDFD = 0x4c
+ SO_PASSRIGHTS = 0x53
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x11
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
index d14ca8f2ecf7..b9cb5bd3c09e 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
@@ -68,6 +68,7 @@ const (
CS8 = 0x30
CSIZE = 0x30
CSTOPB = 0x40
+ DM_MPATH_PROBE_PATHS = 0x2000fd12
ECCGETLAYOUT = 0x41484d11
ECCGETSTATS = 0x40104d12
ECHOCTL = 0x200
@@ -359,6 +360,7 @@ const (
SO_OOBINLINE = 0x100
SO_PASSCRED = 0x11
SO_PASSPIDFD = 0x4c
+ SO_PASSRIGHTS = 0x53
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x12
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
index 2da1bac1e3da..65b078a6382e 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
@@ -68,6 +68,7 @@ const (
CS8 = 0x30
CSIZE = 0x30
CSTOPB = 0x40
+ DM_MPATH_PROBE_PATHS = 0x2000fd12
ECCGETLAYOUT = 0x41484d11
ECCGETSTATS = 0x40104d12
ECHOCTL = 0x200
@@ -359,6 +360,7 @@ const (
SO_OOBINLINE = 0x100
SO_PASSCRED = 0x11
SO_PASSPIDFD = 0x4c
+ SO_PASSRIGHTS = 0x53
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x12
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
index 28727514b5f2..5298a3033d0a 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
@@ -68,6 +68,7 @@ const (
CS8 = 0x30
CSIZE = 0x30
CSTOPB = 0x40
+ DM_MPATH_PROBE_PATHS = 0x2000fd12
ECCGETLAYOUT = 0x41484d11
ECCGETSTATS = 0x40104d12
ECHOCTL = 0x200
@@ -359,6 +360,7 @@ const (
SO_OOBINLINE = 0x100
SO_PASSCRED = 0x11
SO_PASSPIDFD = 0x4c
+ SO_PASSRIGHTS = 0x53
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x12
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
index 7f287b54b5dd..7bc557c87618 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
@@ -68,6 +68,7 @@ const (
CS8 = 0x30
CSIZE = 0x30
CSTOPB = 0x40
+ DM_MPATH_PROBE_PATHS = 0x2000fd12
ECCGETLAYOUT = 0x41484d11
ECCGETSTATS = 0x40104d12
ECHOCTL = 0x200
@@ -359,6 +360,7 @@ const (
SO_OOBINLINE = 0x100
SO_PASSCRED = 0x11
SO_PASSPIDFD = 0x4c
+ SO_PASSRIGHTS = 0x53
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x12
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
index 7e5f9e6aa8de..152399bb04a1 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
@@ -68,6 +68,7 @@ const (
CS8 = 0x300
CSIZE = 0x300
CSTOPB = 0x400
+ DM_MPATH_PROBE_PATHS = 0x2000fd12
ECCGETLAYOUT = 0x41484d11
ECCGETSTATS = 0x40104d12
ECHOCTL = 0x40
@@ -414,6 +415,7 @@ const (
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x14
SO_PASSPIDFD = 0x4c
+ SO_PASSRIGHTS = 0x53
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x15
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
index 37c87952fcb6..1a1ce2409cf0 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
@@ -68,6 +68,7 @@ const (
CS8 = 0x300
CSIZE = 0x300
CSTOPB = 0x400
+ DM_MPATH_PROBE_PATHS = 0x2000fd12
ECCGETLAYOUT = 0x41484d11
ECCGETSTATS = 0x40104d12
ECHOCTL = 0x40
@@ -418,6 +419,7 @@ const (
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x14
SO_PASSPIDFD = 0x4c
+ SO_PASSRIGHTS = 0x53
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x15
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
index 5220133613a9..4231a1fb5787 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
@@ -68,6 +68,7 @@ const (
CS8 = 0x300
CSIZE = 0x300
CSTOPB = 0x400
+ DM_MPATH_PROBE_PATHS = 0x2000fd12
ECCGETLAYOUT = 0x41484d11
ECCGETSTATS = 0x40104d12
ECHOCTL = 0x40
@@ -418,6 +419,7 @@ const (
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x14
SO_PASSPIDFD = 0x4c
+ SO_PASSRIGHTS = 0x53
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x15
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
index 4bfe2b5b6e6b..21c0e9526656 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
@@ -68,6 +68,7 @@ const (
CS8 = 0x30
CSIZE = 0x30
CSTOPB = 0x40
+ DM_MPATH_PROBE_PATHS = 0xfd12
ECCGETLAYOUT = 0x81484d11
ECCGETSTATS = 0x80104d12
ECHOCTL = 0x200
@@ -350,6 +351,7 @@ const (
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10
SO_PASSPIDFD = 0x4c
+ SO_PASSRIGHTS = 0x53
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x11
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
index e3cffb869a3d..f00d1cd7cf48 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
@@ -68,6 +68,7 @@ const (
CS8 = 0x30
CSIZE = 0x30
CSTOPB = 0x40
+ DM_MPATH_PROBE_PATHS = 0xfd12
ECCGETLAYOUT = 0x81484d11
ECCGETSTATS = 0x80104d12
ECHOCTL = 0x200
@@ -422,6 +423,7 @@ const (
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10
SO_PASSPIDFD = 0x4c
+ SO_PASSRIGHTS = 0x53
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x11
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
index c219c8db3960..bc8d539e6af7 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
@@ -71,6 +71,7 @@ const (
CS8 = 0x30
CSIZE = 0x30
CSTOPB = 0x40
+ DM_MPATH_PROBE_PATHS = 0x2000fd12
ECCGETLAYOUT = 0x41484d11
ECCGETSTATS = 0x40104d12
ECHOCTL = 0x200
@@ -461,6 +462,7 @@ const (
SO_OOBINLINE = 0x100
SO_PASSCRED = 0x2
SO_PASSPIDFD = 0x55
+ SO_PASSRIGHTS = 0x5c
SO_PASSSEC = 0x1f
SO_PEEK_OFF = 0x26
SO_PEERCRED = 0x40
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/hack/tools/vendor/golang.org/x/sys/unix/zsyscall_linux.go
index 5cc1e8eb2f35..8935d10a31ce 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zsyscall_linux.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zsyscall_linux.go
@@ -2238,3 +2238,13 @@ func Mseal(b []byte, flags uint) (err error) {
}
return
}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setMemPolicy(mode int, mask *CPUSet, size int) (err error) {
+ _, _, e1 := Syscall(SYS_SET_MEMPOLICY, uintptr(mode), uintptr(unsafe.Pointer(mask)), uintptr(size))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/hack/tools/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
index c6545413c45b..b4609c20c24d 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
@@ -72,7 +72,7 @@ import (
//go:cgo_import_dynamic libc_kill kill "libc.so"
//go:cgo_import_dynamic libc_lchown lchown "libc.so"
//go:cgo_import_dynamic libc_link link "libc.so"
-//go:cgo_import_dynamic libc___xnet_llisten __xnet_llisten "libsocket.so"
+//go:cgo_import_dynamic libc___xnet_listen __xnet_listen "libsocket.so"
//go:cgo_import_dynamic libc_lstat lstat "libc.so"
//go:cgo_import_dynamic libc_madvise madvise "libc.so"
//go:cgo_import_dynamic libc_mkdir mkdir "libc.so"
@@ -221,7 +221,7 @@ import (
//go:linkname procKill libc_kill
//go:linkname procLchown libc_lchown
//go:linkname procLink libc_link
-//go:linkname proc__xnet_llisten libc___xnet_llisten
+//go:linkname proc__xnet_listen libc___xnet_listen
//go:linkname procLstat libc_lstat
//go:linkname procMadvise libc_madvise
//go:linkname procMkdir libc_mkdir
@@ -371,7 +371,7 @@ var (
procKill,
procLchown,
procLink,
- proc__xnet_llisten,
+ proc__xnet_listen,
procLstat,
procMadvise,
procMkdir,
@@ -1178,7 +1178,7 @@ func Link(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_llisten)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0)
+ _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_listen)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
index c79aaff306ae..aca56ee49474 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
@@ -462,4 +462,5 @@ const (
SYS_GETXATTRAT = 464
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
+ SYS_OPEN_TREE_ATTR = 467
)
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
index 5eb450695e95..2ea1ef58c3ec 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
@@ -385,4 +385,5 @@ const (
SYS_GETXATTRAT = 464
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
+ SYS_OPEN_TREE_ATTR = 467
)
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
index 05e502974458..d22c8af31968 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
@@ -426,4 +426,5 @@ const (
SYS_GETXATTRAT = 464
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
+ SYS_OPEN_TREE_ATTR = 467
)
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
index 38c53ec51bb3..5ee264ae9743 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
@@ -329,4 +329,5 @@ const (
SYS_GETXATTRAT = 464
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
+ SYS_OPEN_TREE_ATTR = 467
)
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
index 31d2e71a18e1..f9f03ebf5fa1 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
@@ -325,4 +325,5 @@ const (
SYS_GETXATTRAT = 464
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
+ SYS_OPEN_TREE_ATTR = 467
)
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
index f4184a336b0e..87c2118e8496 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
@@ -446,4 +446,5 @@ const (
SYS_GETXATTRAT = 4464
SYS_LISTXATTRAT = 4465
SYS_REMOVEXATTRAT = 4466
+ SYS_OPEN_TREE_ATTR = 4467
)
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
index 05b9962278f2..391ad102fb68 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
@@ -376,4 +376,5 @@ const (
SYS_GETXATTRAT = 5464
SYS_LISTXATTRAT = 5465
SYS_REMOVEXATTRAT = 5466
+ SYS_OPEN_TREE_ATTR = 5467
)
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
index 43a256e9e675..5656157757a9 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
@@ -376,4 +376,5 @@ const (
SYS_GETXATTRAT = 5464
SYS_LISTXATTRAT = 5465
SYS_REMOVEXATTRAT = 5466
+ SYS_OPEN_TREE_ATTR = 5467
)
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
index eea5ddfc2207..0482b52e3c38 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
@@ -446,4 +446,5 @@ const (
SYS_GETXATTRAT = 4464
SYS_LISTXATTRAT = 4465
SYS_REMOVEXATTRAT = 4466
+ SYS_OPEN_TREE_ATTR = 4467
)
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
index 0d777bfbb140..71806f08f387 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
@@ -453,4 +453,5 @@ const (
SYS_GETXATTRAT = 464
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
+ SYS_OPEN_TREE_ATTR = 467
)
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
index b44636502561..e35a7105829d 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
@@ -425,4 +425,5 @@ const (
SYS_GETXATTRAT = 464
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
+ SYS_OPEN_TREE_ATTR = 467
)
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
index 0c7d21c18816..2aea476705e1 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
@@ -425,4 +425,5 @@ const (
SYS_GETXATTRAT = 464
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
+ SYS_OPEN_TREE_ATTR = 467
)
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
index 840539169878..6c9bb4e56078 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
@@ -330,4 +330,5 @@ const (
SYS_GETXATTRAT = 464
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
+ SYS_OPEN_TREE_ATTR = 467
)
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
index fcf1b790d6cf..680bc9915a31 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
@@ -391,4 +391,5 @@ const (
SYS_GETXATTRAT = 464
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
+ SYS_OPEN_TREE_ATTR = 467
)
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
index 52d15b5f9d45..620f271052f9 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
@@ -404,4 +404,5 @@ const (
SYS_GETXATTRAT = 464
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
+ SYS_OPEN_TREE_ATTR = 467
)
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux.go b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux.go
index 8bcac2835f6a..c1a467017198 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux.go
@@ -115,7 +115,9 @@ type Statx_t struct {
Atomic_write_unit_max uint32
Atomic_write_segments_max uint32
Dio_read_offset_align uint32
- _ [9]uint64
+ Atomic_write_unit_max_opt uint32
+ _ [1]uint32
+ _ [8]uint64
}
type Fsid struct {
@@ -199,7 +201,8 @@ type FscryptAddKeyArg struct {
Key_spec FscryptKeySpecifier
Raw_size uint32
Key_id uint32
- _ [8]uint32
+ Flags uint32
+ _ [7]uint32
}
type FscryptRemoveKeyArg struct {
@@ -629,6 +632,8 @@ const (
IFA_FLAGS = 0x8
IFA_RT_PRIORITY = 0x9
IFA_TARGET_NETNSID = 0xa
+ IFAL_LABEL = 0x2
+ IFAL_ADDRESS = 0x1
RT_SCOPE_UNIVERSE = 0x0
RT_SCOPE_SITE = 0xc8
RT_SCOPE_LINK = 0xfd
@@ -686,6 +691,7 @@ const (
SizeofRtAttr = 0x4
SizeofIfInfomsg = 0x10
SizeofIfAddrmsg = 0x8
+ SizeofIfAddrlblmsg = 0xc
SizeofIfaCacheinfo = 0x10
SizeofRtMsg = 0xc
SizeofRtNexthop = 0x8
@@ -737,6 +743,15 @@ type IfAddrmsg struct {
Index uint32
}
+type IfAddrlblmsg struct {
+ Family uint8
+ _ uint8
+ Prefixlen uint8
+ Flags uint8
+ Index uint32
+ Seq uint32
+}
+
type IfaCacheinfo struct {
Prefered uint32
Valid uint32
@@ -2317,6 +2332,11 @@ const (
NFT_CT_AVGPKT = 0x10
NFT_CT_ZONE = 0x11
NFT_CT_EVENTMASK = 0x12
+ NFT_CT_SRC_IP = 0x13
+ NFT_CT_DST_IP = 0x14
+ NFT_CT_SRC_IP6 = 0x15
+ NFT_CT_DST_IP6 = 0x16
+ NFT_CT_ID = 0x17
NFTA_CT_UNSPEC = 0x0
NFTA_CT_DREG = 0x1
NFTA_CT_KEY = 0x2
@@ -2597,8 +2617,8 @@ const (
SOF_TIMESTAMPING_BIND_PHC = 0x8000
SOF_TIMESTAMPING_OPT_ID_TCP = 0x10000
- SOF_TIMESTAMPING_LAST = 0x20000
- SOF_TIMESTAMPING_MASK = 0x3ffff
+ SOF_TIMESTAMPING_LAST = 0x40000
+ SOF_TIMESTAMPING_MASK = 0x7ffff
SCM_TSTAMP_SND = 0x0
SCM_TSTAMP_SCHED = 0x1
@@ -3044,6 +3064,23 @@ const (
)
const (
+ TCA_UNSPEC = 0x0
+ TCA_KIND = 0x1
+ TCA_OPTIONS = 0x2
+ TCA_STATS = 0x3
+ TCA_XSTATS = 0x4
+ TCA_RATE = 0x5
+ TCA_FCNT = 0x6
+ TCA_STATS2 = 0x7
+ TCA_STAB = 0x8
+ TCA_PAD = 0x9
+ TCA_DUMP_INVISIBLE = 0xa
+ TCA_CHAIN = 0xb
+ TCA_HW_OFFLOAD = 0xc
+ TCA_INGRESS_BLOCK = 0xd
+ TCA_EGRESS_BLOCK = 0xe
+ TCA_DUMP_FLAGS = 0xf
+ TCA_EXT_WARN_MSG = 0x10
RTNLGRP_NONE = 0x0
RTNLGRP_LINK = 0x1
RTNLGRP_NOTIFY = 0x2
@@ -3078,6 +3115,18 @@ const (
RTNLGRP_IPV6_MROUTE_R = 0x1f
RTNLGRP_NEXTHOP = 0x20
RTNLGRP_BRVLAN = 0x21
+ RTNLGRP_MCTP_IFADDR = 0x22
+ RTNLGRP_TUNNEL = 0x23
+ RTNLGRP_STATS = 0x24
+ RTNLGRP_IPV4_MCADDR = 0x25
+ RTNLGRP_IPV6_MCADDR = 0x26
+ RTNLGRP_IPV6_ACADDR = 0x27
+ TCA_ROOT_UNSPEC = 0x0
+ TCA_ROOT_TAB = 0x1
+ TCA_ROOT_FLAGS = 0x2
+ TCA_ROOT_COUNT = 0x3
+ TCA_ROOT_TIME_DELTA = 0x4
+ TCA_ROOT_EXT_WARN_MSG = 0x5
)
type CapUserHeader struct {
@@ -3541,6 +3590,8 @@ type Nhmsg struct {
Flags uint32
}
+const SizeofNhmsg = 0x8
+
type NexthopGrp struct {
Id uint32
Weight uint8
@@ -3548,6 +3599,8 @@ type NexthopGrp struct {
Resvd2 uint16
}
+const SizeofNexthopGrp = 0x8
+
const (
NHA_UNSPEC = 0x0
NHA_ID = 0x1
@@ -4044,7 +4097,7 @@ const (
ETHTOOL_A_TSINFO_PHC_INDEX = 0x5
ETHTOOL_A_TSINFO_STATS = 0x6
ETHTOOL_A_TSINFO_HWTSTAMP_PROVIDER = 0x7
- ETHTOOL_A_TSINFO_MAX = 0x7
+ ETHTOOL_A_TSINFO_MAX = 0x9
ETHTOOL_A_CABLE_TEST_UNSPEC = 0x0
ETHTOOL_A_CABLE_TEST_HEADER = 0x1
ETHTOOL_A_CABLE_TEST_MAX = 0x1
@@ -4130,6 +4183,19 @@ const (
ETHTOOL_A_TUNNEL_INFO_MAX = 0x2
)
+const (
+ TCP_V4_FLOW = 0x1
+ UDP_V4_FLOW = 0x2
+ TCP_V6_FLOW = 0x5
+ UDP_V6_FLOW = 0x6
+ ESP_V4_FLOW = 0xa
+ ESP_V6_FLOW = 0xc
+ IP_USER_FLOW = 0xd
+ IPV6_USER_FLOW = 0xe
+ IPV6_FLOW = 0x11
+ ETHER_FLOW = 0x12
+)
+
const SPEED_UNKNOWN = -0x1
type EthtoolDrvinfo struct {
@@ -4780,7 +4846,7 @@ const (
NL80211_ATTR_MAC_HINT = 0xc8
NL80211_ATTR_MAC_MASK = 0xd7
NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca
- NL80211_ATTR_MAX = 0x150
+ NL80211_ATTR_MAX = 0x151
NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4
NL80211_ATTR_MAX_CSA_COUNTERS = 0xce
NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS = 0x143
@@ -5414,7 +5480,7 @@ const (
NL80211_FREQUENCY_ATTR_GO_CONCURRENT = 0xf
NL80211_FREQUENCY_ATTR_INDOOR_ONLY = 0xe
NL80211_FREQUENCY_ATTR_IR_CONCURRENT = 0xf
- NL80211_FREQUENCY_ATTR_MAX = 0x21
+ NL80211_FREQUENCY_ATTR_MAX = 0x22
NL80211_FREQUENCY_ATTR_MAX_TX_POWER = 0x6
NL80211_FREQUENCY_ATTR_NO_10MHZ = 0x11
NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc
@@ -5530,7 +5596,7 @@ const (
NL80211_MAX_SUPP_SELECTORS = 0x80
NL80211_MBSSID_CONFIG_ATTR_EMA = 0x5
NL80211_MBSSID_CONFIG_ATTR_INDEX = 0x3
- NL80211_MBSSID_CONFIG_ATTR_MAX = 0x5
+ NL80211_MBSSID_CONFIG_ATTR_MAX = 0x6
NL80211_MBSSID_CONFIG_ATTR_MAX_EMA_PROFILE_PERIODICITY = 0x2
NL80211_MBSSID_CONFIG_ATTR_MAX_INTERFACES = 0x1
NL80211_MBSSID_CONFIG_ATTR_TX_IFINDEX = 0x4
@@ -6270,3 +6336,30 @@ type SockDiagReq struct {
}
const RTM_NEWNVLAN = 0x70
+
+const (
+ MPOL_BIND = 0x2
+ MPOL_DEFAULT = 0x0
+ MPOL_F_ADDR = 0x2
+ MPOL_F_MEMS_ALLOWED = 0x4
+ MPOL_F_MOF = 0x8
+ MPOL_F_MORON = 0x10
+ MPOL_F_NODE = 0x1
+ MPOL_F_NUMA_BALANCING = 0x2000
+ MPOL_F_RELATIVE_NODES = 0x4000
+ MPOL_F_SHARED = 0x1
+ MPOL_F_STATIC_NODES = 0x8000
+ MPOL_INTERLEAVE = 0x3
+ MPOL_LOCAL = 0x4
+ MPOL_MAX = 0x7
+ MPOL_MF_INTERNAL = 0x10
+ MPOL_MF_LAZY = 0x8
+ MPOL_MF_MOVE_ALL = 0x4
+ MPOL_MF_MOVE = 0x2
+ MPOL_MF_STRICT = 0x1
+ MPOL_MF_VALID = 0x7
+ MPOL_MODE_FLAGS = 0xe000
+ MPOL_PREFERRED = 0x1
+ MPOL_PREFERRED_MANY = 0x5
+ MPOL_WEIGHTED_INTERLEAVE = 0x6
+)
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
index 62db85f6cb72..485f2d3a1bc8 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
@@ -282,19 +282,13 @@ type Taskstats struct {
Ac_exitcode uint32
Ac_flag uint8
Ac_nice uint8
- _ [4]byte
+ _ [6]byte
Cpu_count uint64
Cpu_delay_total uint64
- Cpu_delay_max uint64
- Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
- Blkio_delay_max uint64
- Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
- Swapin_delay_max uint64
- Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]int8
@@ -330,17 +324,11 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
- Freepages_delay_max uint64
- Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
- Thrashing_delay_max uint64
- Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
- Compact_delay_max uint64
- Compact_delay_min uint64
Ac_tgid uint32
_ [4]byte
Ac_tgetime uint64
@@ -348,10 +336,22 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
- Wpcopy_delay_max uint64
- Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
+ Cpu_delay_max uint64
+ Cpu_delay_min uint64
+ Blkio_delay_max uint64
+ Blkio_delay_min uint64
+ Swapin_delay_max uint64
+ Swapin_delay_min uint64
+ Freepages_delay_max uint64
+ Freepages_delay_min uint64
+ Thrashing_delay_max uint64
+ Thrashing_delay_min uint64
+ Compact_delay_max uint64
+ Compact_delay_min uint64
+ Wpcopy_delay_max uint64
+ Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
index 7d89d648d9aa..ecbd1ad8bc54 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
@@ -300,16 +300,10 @@ type Taskstats struct {
Ac_nice uint8
Cpu_count uint64
Cpu_delay_total uint64
- Cpu_delay_max uint64
- Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
- Blkio_delay_max uint64
- Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
- Swapin_delay_max uint64
- Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]int8
@@ -344,27 +338,33 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
- Freepages_delay_max uint64
- Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
- Thrashing_delay_max uint64
- Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
- Compact_delay_max uint64
- Compact_delay_min uint64
Ac_tgid uint32
Ac_tgetime uint64
Ac_exe_dev uint64
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
- Wpcopy_delay_max uint64
- Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
+ Cpu_delay_max uint64
+ Cpu_delay_min uint64
+ Blkio_delay_max uint64
+ Blkio_delay_min uint64
+ Swapin_delay_max uint64
+ Swapin_delay_min uint64
+ Freepages_delay_max uint64
+ Freepages_delay_min uint64
+ Thrashing_delay_max uint64
+ Thrashing_delay_min uint64
+ Compact_delay_max uint64
+ Compact_delay_min uint64
+ Wpcopy_delay_max uint64
+ Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
index 9c0b39eec761..02f0463a44b2 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
@@ -91,7 +91,7 @@ type Stat_t struct {
Gid uint32
Rdev uint64
_ uint16
- _ [4]byte
+ _ [6]byte
Size int64
Blksize int32
_ [4]byte
@@ -273,19 +273,13 @@ type Taskstats struct {
Ac_exitcode uint32
Ac_flag uint8
Ac_nice uint8
- _ [4]byte
+ _ [6]byte
Cpu_count uint64
Cpu_delay_total uint64
- Cpu_delay_max uint64
- Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
- Blkio_delay_max uint64
- Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
- Swapin_delay_max uint64
- Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]uint8
@@ -321,17 +315,11 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
- Freepages_delay_max uint64
- Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
- Thrashing_delay_max uint64
- Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
- Compact_delay_max uint64
- Compact_delay_min uint64
Ac_tgid uint32
_ [4]byte
Ac_tgetime uint64
@@ -339,10 +327,22 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
- Wpcopy_delay_max uint64
- Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
+ Cpu_delay_max uint64
+ Cpu_delay_min uint64
+ Blkio_delay_max uint64
+ Blkio_delay_min uint64
+ Swapin_delay_max uint64
+ Swapin_delay_min uint64
+ Freepages_delay_max uint64
+ Freepages_delay_min uint64
+ Thrashing_delay_max uint64
+ Thrashing_delay_min uint64
+ Compact_delay_max uint64
+ Compact_delay_min uint64
+ Wpcopy_delay_max uint64
+ Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
index de9c7ff36cfe..6f4d400d2417 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
@@ -279,16 +279,10 @@ type Taskstats struct {
Ac_nice uint8
Cpu_count uint64
Cpu_delay_total uint64
- Cpu_delay_max uint64
- Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
- Blkio_delay_max uint64
- Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
- Swapin_delay_max uint64
- Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]int8
@@ -323,27 +317,33 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
- Freepages_delay_max uint64
- Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
- Thrashing_delay_max uint64
- Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
- Compact_delay_max uint64
- Compact_delay_min uint64
Ac_tgid uint32
Ac_tgetime uint64
Ac_exe_dev uint64
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
- Wpcopy_delay_max uint64
- Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
+ Cpu_delay_max uint64
+ Cpu_delay_min uint64
+ Blkio_delay_max uint64
+ Blkio_delay_min uint64
+ Swapin_delay_max uint64
+ Swapin_delay_min uint64
+ Freepages_delay_max uint64
+ Freepages_delay_min uint64
+ Thrashing_delay_max uint64
+ Thrashing_delay_min uint64
+ Compact_delay_max uint64
+ Compact_delay_min uint64
+ Wpcopy_delay_max uint64
+ Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
index 2336bd2bf099..cd532cfa5589 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
@@ -280,16 +280,10 @@ type Taskstats struct {
Ac_nice uint8
Cpu_count uint64
Cpu_delay_total uint64
- Cpu_delay_max uint64
- Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
- Blkio_delay_max uint64
- Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
- Swapin_delay_max uint64
- Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]int8
@@ -324,27 +318,33 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
- Freepages_delay_max uint64
- Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
- Thrashing_delay_max uint64
- Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
- Compact_delay_max uint64
- Compact_delay_min uint64
Ac_tgid uint32
Ac_tgetime uint64
Ac_exe_dev uint64
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
- Wpcopy_delay_max uint64
- Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
+ Cpu_delay_max uint64
+ Cpu_delay_min uint64
+ Blkio_delay_max uint64
+ Blkio_delay_min uint64
+ Swapin_delay_max uint64
+ Swapin_delay_min uint64
+ Freepages_delay_max uint64
+ Freepages_delay_min uint64
+ Thrashing_delay_max uint64
+ Thrashing_delay_min uint64
+ Compact_delay_max uint64
+ Compact_delay_min uint64
+ Wpcopy_delay_max uint64
+ Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
index 4711f0be16d5..413362085175 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
@@ -278,19 +278,13 @@ type Taskstats struct {
Ac_exitcode uint32
Ac_flag uint8
Ac_nice uint8
- _ [4]byte
+ _ [6]byte
Cpu_count uint64
Cpu_delay_total uint64
- Cpu_delay_max uint64
- Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
- Blkio_delay_max uint64
- Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
- Swapin_delay_max uint64
- Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]int8
@@ -326,17 +320,11 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
- Freepages_delay_max uint64
- Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
- Thrashing_delay_max uint64
- Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
- Compact_delay_max uint64
- Compact_delay_min uint64
Ac_tgid uint32
_ [4]byte
Ac_tgetime uint64
@@ -344,10 +332,22 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
- Wpcopy_delay_max uint64
- Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
+ Cpu_delay_max uint64
+ Cpu_delay_min uint64
+ Blkio_delay_max uint64
+ Blkio_delay_min uint64
+ Swapin_delay_max uint64
+ Swapin_delay_min uint64
+ Freepages_delay_max uint64
+ Freepages_delay_min uint64
+ Thrashing_delay_max uint64
+ Thrashing_delay_min uint64
+ Compact_delay_max uint64
+ Compact_delay_min uint64
+ Wpcopy_delay_max uint64
+ Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
index ab99a34b9965..eaa37eb718e2 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
@@ -282,16 +282,10 @@ type Taskstats struct {
Ac_nice uint8
Cpu_count uint64
Cpu_delay_total uint64
- Cpu_delay_max uint64
- Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
- Blkio_delay_max uint64
- Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
- Swapin_delay_max uint64
- Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]int8
@@ -326,27 +320,33 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
- Freepages_delay_max uint64
- Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
- Thrashing_delay_max uint64
- Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
- Compact_delay_max uint64
- Compact_delay_min uint64
Ac_tgid uint32
Ac_tgetime uint64
Ac_exe_dev uint64
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
- Wpcopy_delay_max uint64
- Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
+ Cpu_delay_max uint64
+ Cpu_delay_min uint64
+ Blkio_delay_max uint64
+ Blkio_delay_min uint64
+ Swapin_delay_max uint64
+ Swapin_delay_min uint64
+ Freepages_delay_max uint64
+ Freepages_delay_min uint64
+ Thrashing_delay_max uint64
+ Thrashing_delay_min uint64
+ Compact_delay_max uint64
+ Compact_delay_min uint64
+ Wpcopy_delay_max uint64
+ Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
index 04c9866e3cf8..98ae6a1e4ac4 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
@@ -282,16 +282,10 @@ type Taskstats struct {
Ac_nice uint8
Cpu_count uint64
Cpu_delay_total uint64
- Cpu_delay_max uint64
- Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
- Blkio_delay_max uint64
- Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
- Swapin_delay_max uint64
- Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]int8
@@ -326,27 +320,33 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
- Freepages_delay_max uint64
- Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
- Thrashing_delay_max uint64
- Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
- Compact_delay_max uint64
- Compact_delay_min uint64
Ac_tgid uint32
Ac_tgetime uint64
Ac_exe_dev uint64
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
- Wpcopy_delay_max uint64
- Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
+ Cpu_delay_max uint64
+ Cpu_delay_min uint64
+ Blkio_delay_max uint64
+ Blkio_delay_min uint64
+ Swapin_delay_max uint64
+ Swapin_delay_min uint64
+ Freepages_delay_max uint64
+ Freepages_delay_min uint64
+ Thrashing_delay_max uint64
+ Thrashing_delay_min uint64
+ Compact_delay_max uint64
+ Compact_delay_min uint64
+ Wpcopy_delay_max uint64
+ Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
index 60aa69f618c7..cae1961594d2 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
@@ -278,19 +278,13 @@ type Taskstats struct {
Ac_exitcode uint32
Ac_flag uint8
Ac_nice uint8
- _ [4]byte
+ _ [6]byte
Cpu_count uint64
Cpu_delay_total uint64
- Cpu_delay_max uint64
- Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
- Blkio_delay_max uint64
- Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
- Swapin_delay_max uint64
- Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]int8
@@ -326,17 +320,11 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
- Freepages_delay_max uint64
- Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
- Thrashing_delay_max uint64
- Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
- Compact_delay_max uint64
- Compact_delay_min uint64
Ac_tgid uint32
_ [4]byte
Ac_tgetime uint64
@@ -344,10 +332,22 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
- Wpcopy_delay_max uint64
- Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
+ Cpu_delay_max uint64
+ Cpu_delay_min uint64
+ Blkio_delay_max uint64
+ Blkio_delay_min uint64
+ Swapin_delay_max uint64
+ Swapin_delay_min uint64
+ Freepages_delay_max uint64
+ Freepages_delay_min uint64
+ Thrashing_delay_max uint64
+ Thrashing_delay_min uint64
+ Compact_delay_max uint64
+ Compact_delay_min uint64
+ Wpcopy_delay_max uint64
+ Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
index cb4fad785d13..6ce3b4e02830 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
@@ -90,7 +90,7 @@ type Stat_t struct {
Gid uint32
Rdev uint64
_ uint16
- _ [4]byte
+ _ [6]byte
Size int64
Blksize int32
_ [4]byte
@@ -285,19 +285,13 @@ type Taskstats struct {
Ac_exitcode uint32
Ac_flag uint8
Ac_nice uint8
- _ [4]byte
+ _ [6]byte
Cpu_count uint64
Cpu_delay_total uint64
- Cpu_delay_max uint64
- Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
- Blkio_delay_max uint64
- Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
- Swapin_delay_max uint64
- Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]uint8
@@ -333,17 +327,11 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
- Freepages_delay_max uint64
- Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
- Thrashing_delay_max uint64
- Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
- Compact_delay_max uint64
- Compact_delay_min uint64
Ac_tgid uint32
_ [4]byte
Ac_tgetime uint64
@@ -351,10 +339,22 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
- Wpcopy_delay_max uint64
- Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
+ Cpu_delay_max uint64
+ Cpu_delay_min uint64
+ Blkio_delay_max uint64
+ Blkio_delay_min uint64
+ Swapin_delay_max uint64
+ Swapin_delay_min uint64
+ Freepages_delay_max uint64
+ Freepages_delay_min uint64
+ Thrashing_delay_max uint64
+ Thrashing_delay_min uint64
+ Compact_delay_max uint64
+ Compact_delay_min uint64
+ Wpcopy_delay_max uint64
+ Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
index 60272cfce86b..c7429c6a1461 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
@@ -289,16 +289,10 @@ type Taskstats struct {
Ac_nice uint8
Cpu_count uint64
Cpu_delay_total uint64
- Cpu_delay_max uint64
- Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
- Blkio_delay_max uint64
- Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
- Swapin_delay_max uint64
- Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]uint8
@@ -333,27 +327,33 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
- Freepages_delay_max uint64
- Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
- Thrashing_delay_max uint64
- Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
- Compact_delay_max uint64
- Compact_delay_min uint64
Ac_tgid uint32
Ac_tgetime uint64
Ac_exe_dev uint64
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
- Wpcopy_delay_max uint64
- Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
+ Cpu_delay_max uint64
+ Cpu_delay_min uint64
+ Blkio_delay_max uint64
+ Blkio_delay_min uint64
+ Swapin_delay_max uint64
+ Swapin_delay_min uint64
+ Freepages_delay_max uint64
+ Freepages_delay_min uint64
+ Thrashing_delay_max uint64
+ Thrashing_delay_min uint64
+ Compact_delay_max uint64
+ Compact_delay_min uint64
+ Wpcopy_delay_max uint64
+ Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
index 3f5b91bc0d50..4bf4baf4cac5 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
@@ -289,16 +289,10 @@ type Taskstats struct {
Ac_nice uint8
Cpu_count uint64
Cpu_delay_total uint64
- Cpu_delay_max uint64
- Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
- Blkio_delay_max uint64
- Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
- Swapin_delay_max uint64
- Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]uint8
@@ -333,27 +327,33 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
- Freepages_delay_max uint64
- Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
- Thrashing_delay_max uint64
- Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
- Compact_delay_max uint64
- Compact_delay_min uint64
Ac_tgid uint32
Ac_tgetime uint64
Ac_exe_dev uint64
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
- Wpcopy_delay_max uint64
- Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
+ Cpu_delay_max uint64
+ Cpu_delay_min uint64
+ Blkio_delay_max uint64
+ Blkio_delay_min uint64
+ Swapin_delay_max uint64
+ Swapin_delay_min uint64
+ Freepages_delay_max uint64
+ Freepages_delay_min uint64
+ Thrashing_delay_max uint64
+ Thrashing_delay_min uint64
+ Compact_delay_max uint64
+ Compact_delay_min uint64
+ Wpcopy_delay_max uint64
+ Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
index 51550f15a637..e9709d70afbd 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
@@ -307,16 +307,10 @@ type Taskstats struct {
Ac_nice uint8
Cpu_count uint64
Cpu_delay_total uint64
- Cpu_delay_max uint64
- Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
- Blkio_delay_max uint64
- Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
- Swapin_delay_max uint64
- Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]uint8
@@ -351,27 +345,33 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
- Freepages_delay_max uint64
- Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
- Thrashing_delay_max uint64
- Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
- Compact_delay_max uint64
- Compact_delay_min uint64
Ac_tgid uint32
Ac_tgetime uint64
Ac_exe_dev uint64
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
- Wpcopy_delay_max uint64
- Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
+ Cpu_delay_max uint64
+ Cpu_delay_min uint64
+ Blkio_delay_max uint64
+ Blkio_delay_min uint64
+ Swapin_delay_max uint64
+ Swapin_delay_min uint64
+ Freepages_delay_max uint64
+ Freepages_delay_min uint64
+ Thrashing_delay_max uint64
+ Thrashing_delay_min uint64
+ Compact_delay_max uint64
+ Compact_delay_min uint64
+ Wpcopy_delay_max uint64
+ Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
index 3239e50e0e22..fb44268ca7da 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
@@ -302,16 +302,10 @@ type Taskstats struct {
Ac_nice uint8
Cpu_count uint64
Cpu_delay_total uint64
- Cpu_delay_max uint64
- Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
- Blkio_delay_max uint64
- Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
- Swapin_delay_max uint64
- Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]int8
@@ -346,27 +340,33 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
- Freepages_delay_max uint64
- Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
- Thrashing_delay_max uint64
- Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
- Compact_delay_max uint64
- Compact_delay_min uint64
Ac_tgid uint32
Ac_tgetime uint64
Ac_exe_dev uint64
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
- Wpcopy_delay_max uint64
- Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
+ Cpu_delay_max uint64
+ Cpu_delay_min uint64
+ Blkio_delay_max uint64
+ Blkio_delay_min uint64
+ Swapin_delay_max uint64
+ Swapin_delay_min uint64
+ Freepages_delay_max uint64
+ Freepages_delay_min uint64
+ Thrashing_delay_max uint64
+ Thrashing_delay_min uint64
+ Compact_delay_max uint64
+ Compact_delay_min uint64
+ Wpcopy_delay_max uint64
+ Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
diff --git a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
index faf20027831a..9c38265c74af 100644
--- a/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
+++ b/hack/tools/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
@@ -284,16 +284,10 @@ type Taskstats struct {
Ac_nice uint8
Cpu_count uint64
Cpu_delay_total uint64
- Cpu_delay_max uint64
- Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
- Blkio_delay_max uint64
- Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
- Swapin_delay_max uint64
- Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]int8
@@ -328,27 +322,33 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
- Freepages_delay_max uint64
- Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
- Thrashing_delay_max uint64
- Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
- Compact_delay_max uint64
- Compact_delay_min uint64
Ac_tgid uint32
Ac_tgetime uint64
Ac_exe_dev uint64
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
- Wpcopy_delay_max uint64
- Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
+ Cpu_delay_max uint64
+ Cpu_delay_min uint64
+ Blkio_delay_max uint64
+ Blkio_delay_min uint64
+ Swapin_delay_max uint64
+ Swapin_delay_min uint64
+ Freepages_delay_max uint64
+ Freepages_delay_min uint64
+ Thrashing_delay_max uint64
+ Thrashing_delay_min uint64
+ Compact_delay_max uint64
+ Compact_delay_min uint64
+ Wpcopy_delay_max uint64
+ Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
diff --git a/hack/tools/vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go b/hack/tools/vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go
index fc1835d8a233..bc1ce4360b6a 100644
--- a/hack/tools/vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go
+++ b/hack/tools/vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go
@@ -52,7 +52,7 @@ var (
)
func regConnectRegistry(machinename *uint16, key syscall.Handle, result *syscall.Handle) (regerrno error) {
- r0, _, _ := syscall.Syscall(procRegConnectRegistryW.Addr(), 3, uintptr(unsafe.Pointer(machinename)), uintptr(key), uintptr(unsafe.Pointer(result)))
+ r0, _, _ := syscall.SyscallN(procRegConnectRegistryW.Addr(), uintptr(unsafe.Pointer(machinename)), uintptr(key), uintptr(unsafe.Pointer(result)))
if r0 != 0 {
regerrno = syscall.Errno(r0)
}
@@ -60,7 +60,7 @@ func regConnectRegistry(machinename *uint16, key syscall.Handle, result *syscall
}
func regCreateKeyEx(key syscall.Handle, subkey *uint16, reserved uint32, class *uint16, options uint32, desired uint32, sa *syscall.SecurityAttributes, result *syscall.Handle, disposition *uint32) (regerrno error) {
- r0, _, _ := syscall.Syscall9(procRegCreateKeyExW.Addr(), 9, uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(reserved), uintptr(unsafe.Pointer(class)), uintptr(options), uintptr(desired), uintptr(unsafe.Pointer(sa)), uintptr(unsafe.Pointer(result)), uintptr(unsafe.Pointer(disposition)))
+ r0, _, _ := syscall.SyscallN(procRegCreateKeyExW.Addr(), uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(reserved), uintptr(unsafe.Pointer(class)), uintptr(options), uintptr(desired), uintptr(unsafe.Pointer(sa)), uintptr(unsafe.Pointer(result)), uintptr(unsafe.Pointer(disposition)))
if r0 != 0 {
regerrno = syscall.Errno(r0)
}
@@ -68,7 +68,7 @@ func regCreateKeyEx(key syscall.Handle, subkey *uint16, reserved uint32, class *
}
func regDeleteKey(key syscall.Handle, subkey *uint16) (regerrno error) {
- r0, _, _ := syscall.Syscall(procRegDeleteKeyW.Addr(), 2, uintptr(key), uintptr(unsafe.Pointer(subkey)), 0)
+ r0, _, _ := syscall.SyscallN(procRegDeleteKeyW.Addr(), uintptr(key), uintptr(unsafe.Pointer(subkey)))
if r0 != 0 {
regerrno = syscall.Errno(r0)
}
@@ -76,7 +76,7 @@ func regDeleteKey(key syscall.Handle, subkey *uint16) (regerrno error) {
}
func regDeleteValue(key syscall.Handle, name *uint16) (regerrno error) {
- r0, _, _ := syscall.Syscall(procRegDeleteValueW.Addr(), 2, uintptr(key), uintptr(unsafe.Pointer(name)), 0)
+ r0, _, _ := syscall.SyscallN(procRegDeleteValueW.Addr(), uintptr(key), uintptr(unsafe.Pointer(name)))
if r0 != 0 {
regerrno = syscall.Errno(r0)
}
@@ -84,7 +84,7 @@ func regDeleteValue(key syscall.Handle, name *uint16) (regerrno error) {
}
func regEnumValue(key syscall.Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) {
- r0, _, _ := syscall.Syscall9(procRegEnumValueW.Addr(), 8, uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen)), 0)
+ r0, _, _ := syscall.SyscallN(procRegEnumValueW.Addr(), uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen)))
if r0 != 0 {
regerrno = syscall.Errno(r0)
}
@@ -92,7 +92,7 @@ func regEnumValue(key syscall.Handle, index uint32, name *uint16, nameLen *uint3
}
func regLoadMUIString(key syscall.Handle, name *uint16, buf *uint16, buflen uint32, buflenCopied *uint32, flags uint32, dir *uint16) (regerrno error) {
- r0, _, _ := syscall.Syscall9(procRegLoadMUIStringW.Addr(), 7, uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(unsafe.Pointer(buflenCopied)), uintptr(flags), uintptr(unsafe.Pointer(dir)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procRegLoadMUIStringW.Addr(), uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(unsafe.Pointer(buflenCopied)), uintptr(flags), uintptr(unsafe.Pointer(dir)))
if r0 != 0 {
regerrno = syscall.Errno(r0)
}
@@ -100,7 +100,7 @@ func regLoadMUIString(key syscall.Handle, name *uint16, buf *uint16, buflen uint
}
func regSetValueEx(key syscall.Handle, valueName *uint16, reserved uint32, vtype uint32, buf *byte, bufsize uint32) (regerrno error) {
- r0, _, _ := syscall.Syscall6(procRegSetValueExW.Addr(), 6, uintptr(key), uintptr(unsafe.Pointer(valueName)), uintptr(reserved), uintptr(vtype), uintptr(unsafe.Pointer(buf)), uintptr(bufsize))
+ r0, _, _ := syscall.SyscallN(procRegSetValueExW.Addr(), uintptr(key), uintptr(unsafe.Pointer(valueName)), uintptr(reserved), uintptr(vtype), uintptr(unsafe.Pointer(buf)), uintptr(bufsize))
if r0 != 0 {
regerrno = syscall.Errno(r0)
}
@@ -108,7 +108,7 @@ func regSetValueEx(key syscall.Handle, valueName *uint16, reserved uint32, vtype
}
func expandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procExpandEnvironmentStringsW.Addr(), 3, uintptr(unsafe.Pointer(src)), uintptr(unsafe.Pointer(dst)), uintptr(size))
+ r0, _, e1 := syscall.SyscallN(procExpandEnvironmentStringsW.Addr(), uintptr(unsafe.Pointer(src)), uintptr(unsafe.Pointer(dst)), uintptr(size))
n = uint32(r0)
if n == 0 {
err = errnoErr(e1)
diff --git a/hack/tools/vendor/golang.org/x/sys/windows/syscall_windows.go b/hack/tools/vendor/golang.org/x/sys/windows/syscall_windows.go
index 640f6b153f00..69439df2a468 100644
--- a/hack/tools/vendor/golang.org/x/sys/windows/syscall_windows.go
+++ b/hack/tools/vendor/golang.org/x/sys/windows/syscall_windows.go
@@ -321,6 +321,8 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys SetConsoleOutputCP(cp uint32) (err error) = kernel32.SetConsoleOutputCP
//sys WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW
//sys ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW
+//sys GetNumberOfConsoleInputEvents(console Handle, numevents *uint32) (err error) = kernel32.GetNumberOfConsoleInputEvents
+//sys FlushConsoleInputBuffer(console Handle) (err error) = kernel32.FlushConsoleInputBuffer
//sys resizePseudoConsole(pconsole Handle, size uint32) (hr error) = kernel32.ResizePseudoConsole
//sys CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.CreateToolhelp32Snapshot
//sys Module32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) = kernel32.Module32FirstW
@@ -890,8 +892,12 @@ const socket_error = uintptr(^uint32(0))
//sys MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) = kernel32.MultiByteToWideChar
//sys getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcode error) = iphlpapi.GetBestInterfaceEx
//sys GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) = iphlpapi.GetIfEntry2Ex
+//sys GetIpForwardEntry2(row *MibIpForwardRow2) (errcode error) = iphlpapi.GetIpForwardEntry2
+//sys GetIpForwardTable2(family uint16, table **MibIpForwardTable2) (errcode error) = iphlpapi.GetIpForwardTable2
//sys GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) = iphlpapi.GetUnicastIpAddressEntry
+//sys FreeMibTable(memory unsafe.Pointer) = iphlpapi.FreeMibTable
//sys NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyIpInterfaceChange
+//sys NotifyRouteChange2(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyRouteChange2
//sys NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyUnicastIpAddressChange
//sys CancelMibChangeNotify2(notificationHandle Handle) (errcode error) = iphlpapi.CancelMibChangeNotify2
@@ -914,6 +920,17 @@ type RawSockaddrInet6 struct {
Scope_id uint32
}
+// RawSockaddrInet is a union that contains an IPv4, an IPv6 address, or an address family. See
+// https://learn.microsoft.com/en-us/windows/win32/api/ws2ipdef/ns-ws2ipdef-sockaddr_inet.
+//
+// A [*RawSockaddrInet] may be converted to a [*RawSockaddrInet4] or [*RawSockaddrInet6] using
+// unsafe, depending on the address family.
+type RawSockaddrInet struct {
+ Family uint16
+ Port uint16
+ Data [6]uint32
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
diff --git a/hack/tools/vendor/golang.org/x/sys/windows/types_windows.go b/hack/tools/vendor/golang.org/x/sys/windows/types_windows.go
index 958bcf47a386..6e4f50eb4835 100644
--- a/hack/tools/vendor/golang.org/x/sys/windows/types_windows.go
+++ b/hack/tools/vendor/golang.org/x/sys/windows/types_windows.go
@@ -65,6 +65,22 @@ var signals = [...]string{
15: "terminated",
}
+// File flags for [os.OpenFile]. The O_ prefix is used to indicate
+// that these flags are specific to the OpenFile function.
+const (
+ O_FILE_FLAG_OPEN_NO_RECALL = FILE_FLAG_OPEN_NO_RECALL
+ O_FILE_FLAG_OPEN_REPARSE_POINT = FILE_FLAG_OPEN_REPARSE_POINT
+ O_FILE_FLAG_SESSION_AWARE = FILE_FLAG_SESSION_AWARE
+ O_FILE_FLAG_POSIX_SEMANTICS = FILE_FLAG_POSIX_SEMANTICS
+ O_FILE_FLAG_BACKUP_SEMANTICS = FILE_FLAG_BACKUP_SEMANTICS
+ O_FILE_FLAG_DELETE_ON_CLOSE = FILE_FLAG_DELETE_ON_CLOSE
+ O_FILE_FLAG_SEQUENTIAL_SCAN = FILE_FLAG_SEQUENTIAL_SCAN
+ O_FILE_FLAG_RANDOM_ACCESS = FILE_FLAG_RANDOM_ACCESS
+ O_FILE_FLAG_NO_BUFFERING = FILE_FLAG_NO_BUFFERING
+ O_FILE_FLAG_OVERLAPPED = FILE_FLAG_OVERLAPPED
+ O_FILE_FLAG_WRITE_THROUGH = FILE_FLAG_WRITE_THROUGH
+)
+
const (
FILE_READ_DATA = 0x00000001
FILE_READ_ATTRIBUTES = 0x00000080
@@ -1976,6 +1992,12 @@ const (
SYMBOLIC_LINK_FLAG_DIRECTORY = 0x1
)
+// FILE_ZERO_DATA_INFORMATION from winioctl.h
+type FileZeroDataInformation struct {
+ FileOffset int64
+ BeyondFinalZero int64
+}
+
const (
ComputerNameNetBIOS = 0
ComputerNameDnsHostname = 1
@@ -2298,6 +2320,82 @@ type MibIfRow2 struct {
OutQLen uint64
}
+// IP_ADDRESS_PREFIX stores an IP address prefix. See
+// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-ip_address_prefix.
+type IpAddressPrefix struct {
+ Prefix RawSockaddrInet
+ PrefixLength uint8
+}
+
+// NL_ROUTE_ORIGIN enumeration from nldef.h or
+// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_route_origin.
+const (
+ NlroManual = 0
+ NlroWellKnown = 1
+ NlroDHCP = 2
+ NlroRouterAdvertisement = 3
+ Nlro6to4 = 4
+)
+
+// NL_ROUTE_ORIGIN enumeration from nldef.h or
+// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_route_protocol.
+const (
+ MIB_IPPROTO_OTHER = 1
+ MIB_IPPROTO_LOCAL = 2
+ MIB_IPPROTO_NETMGMT = 3
+ MIB_IPPROTO_ICMP = 4
+ MIB_IPPROTO_EGP = 5
+ MIB_IPPROTO_GGP = 6
+ MIB_IPPROTO_HELLO = 7
+ MIB_IPPROTO_RIP = 8
+ MIB_IPPROTO_IS_IS = 9
+ MIB_IPPROTO_ES_IS = 10
+ MIB_IPPROTO_CISCO = 11
+ MIB_IPPROTO_BBN = 12
+ MIB_IPPROTO_OSPF = 13
+ MIB_IPPROTO_BGP = 14
+ MIB_IPPROTO_IDPR = 15
+ MIB_IPPROTO_EIGRP = 16
+ MIB_IPPROTO_DVMRP = 17
+ MIB_IPPROTO_RPL = 18
+ MIB_IPPROTO_DHCP = 19
+ MIB_IPPROTO_NT_AUTOSTATIC = 10002
+ MIB_IPPROTO_NT_STATIC = 10006
+ MIB_IPPROTO_NT_STATIC_NON_DOD = 10007
+)
+
+// MIB_IPFORWARD_ROW2 stores information about an IP route entry. See
+// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_ipforward_row2.
+type MibIpForwardRow2 struct {
+ InterfaceLuid uint64
+ InterfaceIndex uint32
+ DestinationPrefix IpAddressPrefix
+ NextHop RawSockaddrInet
+ SitePrefixLength uint8
+ ValidLifetime uint32
+ PreferredLifetime uint32
+ Metric uint32
+ Protocol uint32
+ Loopback uint8
+ AutoconfigureAddress uint8
+ Publish uint8
+ Immortal uint8
+ Age uint32
+ Origin uint32
+}
+
+// MIB_IPFORWARD_TABLE2 contains a table of IP route entries. See
+// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_ipforward_table2.
+type MibIpForwardTable2 struct {
+ NumEntries uint32
+ Table [1]MibIpForwardRow2
+}
+
+// Rows returns the IP route entries in the table.
+func (t *MibIpForwardTable2) Rows() []MibIpForwardRow2 {
+ return unsafe.Slice(&t.Table[0], t.NumEntries)
+}
+
// MIB_UNICASTIPADDRESS_ROW stores information about a unicast IP address. See
// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_unicastipaddress_row.
type MibUnicastIpAddressRow struct {
diff --git a/hack/tools/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/hack/tools/vendor/golang.org/x/sys/windows/zsyscall_windows.go
index a58bc48b8ede..f25b7308a1f3 100644
--- a/hack/tools/vendor/golang.org/x/sys/windows/zsyscall_windows.go
+++ b/hack/tools/vendor/golang.org/x/sys/windows/zsyscall_windows.go
@@ -182,13 +182,17 @@ var (
procDwmGetWindowAttribute = moddwmapi.NewProc("DwmGetWindowAttribute")
procDwmSetWindowAttribute = moddwmapi.NewProc("DwmSetWindowAttribute")
procCancelMibChangeNotify2 = modiphlpapi.NewProc("CancelMibChangeNotify2")
+ procFreeMibTable = modiphlpapi.NewProc("FreeMibTable")
procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses")
procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo")
procGetBestInterfaceEx = modiphlpapi.NewProc("GetBestInterfaceEx")
procGetIfEntry = modiphlpapi.NewProc("GetIfEntry")
procGetIfEntry2Ex = modiphlpapi.NewProc("GetIfEntry2Ex")
+ procGetIpForwardEntry2 = modiphlpapi.NewProc("GetIpForwardEntry2")
+ procGetIpForwardTable2 = modiphlpapi.NewProc("GetIpForwardTable2")
procGetUnicastIpAddressEntry = modiphlpapi.NewProc("GetUnicastIpAddressEntry")
procNotifyIpInterfaceChange = modiphlpapi.NewProc("NotifyIpInterfaceChange")
+ procNotifyRouteChange2 = modiphlpapi.NewProc("NotifyRouteChange2")
procNotifyUnicastIpAddressChange = modiphlpapi.NewProc("NotifyUnicastIpAddressChange")
procAddDllDirectory = modkernel32.NewProc("AddDllDirectory")
procAssignProcessToJobObject = modkernel32.NewProc("AssignProcessToJobObject")
@@ -238,6 +242,7 @@ var (
procFindResourceW = modkernel32.NewProc("FindResourceW")
procFindVolumeClose = modkernel32.NewProc("FindVolumeClose")
procFindVolumeMountPointClose = modkernel32.NewProc("FindVolumeMountPointClose")
+ procFlushConsoleInputBuffer = modkernel32.NewProc("FlushConsoleInputBuffer")
procFlushFileBuffers = modkernel32.NewProc("FlushFileBuffers")
procFlushViewOfFile = modkernel32.NewProc("FlushViewOfFile")
procFormatMessageW = modkernel32.NewProc("FormatMessageW")
@@ -284,6 +289,7 @@ var (
procGetNamedPipeHandleStateW = modkernel32.NewProc("GetNamedPipeHandleStateW")
procGetNamedPipeInfo = modkernel32.NewProc("GetNamedPipeInfo")
procGetNamedPipeServerProcessId = modkernel32.NewProc("GetNamedPipeServerProcessId")
+ procGetNumberOfConsoleInputEvents = modkernel32.NewProc("GetNumberOfConsoleInputEvents")
procGetOverlappedResult = modkernel32.NewProc("GetOverlappedResult")
procGetPriorityClass = modkernel32.NewProc("GetPriorityClass")
procGetProcAddress = modkernel32.NewProc("GetProcAddress")
@@ -546,25 +552,25 @@ var (
)
func cm_Get_DevNode_Status(status *uint32, problemNumber *uint32, devInst DEVINST, flags uint32) (ret CONFIGRET) {
- r0, _, _ := syscall.Syscall6(procCM_Get_DevNode_Status.Addr(), 4, uintptr(unsafe.Pointer(status)), uintptr(unsafe.Pointer(problemNumber)), uintptr(devInst), uintptr(flags), 0, 0)
+ r0, _, _ := syscall.SyscallN(procCM_Get_DevNode_Status.Addr(), uintptr(unsafe.Pointer(status)), uintptr(unsafe.Pointer(problemNumber)), uintptr(devInst), uintptr(flags))
ret = CONFIGRET(r0)
return
}
func cm_Get_Device_Interface_List(interfaceClass *GUID, deviceID *uint16, buffer *uint16, bufferLen uint32, flags uint32) (ret CONFIGRET) {
- r0, _, _ := syscall.Syscall6(procCM_Get_Device_Interface_ListW.Addr(), 5, uintptr(unsafe.Pointer(interfaceClass)), uintptr(unsafe.Pointer(deviceID)), uintptr(unsafe.Pointer(buffer)), uintptr(bufferLen), uintptr(flags), 0)
+ r0, _, _ := syscall.SyscallN(procCM_Get_Device_Interface_ListW.Addr(), uintptr(unsafe.Pointer(interfaceClass)), uintptr(unsafe.Pointer(deviceID)), uintptr(unsafe.Pointer(buffer)), uintptr(bufferLen), uintptr(flags))
ret = CONFIGRET(r0)
return
}
func cm_Get_Device_Interface_List_Size(len *uint32, interfaceClass *GUID, deviceID *uint16, flags uint32) (ret CONFIGRET) {
- r0, _, _ := syscall.Syscall6(procCM_Get_Device_Interface_List_SizeW.Addr(), 4, uintptr(unsafe.Pointer(len)), uintptr(unsafe.Pointer(interfaceClass)), uintptr(unsafe.Pointer(deviceID)), uintptr(flags), 0, 0)
+ r0, _, _ := syscall.SyscallN(procCM_Get_Device_Interface_List_SizeW.Addr(), uintptr(unsafe.Pointer(len)), uintptr(unsafe.Pointer(interfaceClass)), uintptr(unsafe.Pointer(deviceID)), uintptr(flags))
ret = CONFIGRET(r0)
return
}
func cm_MapCrToWin32Err(configRet CONFIGRET, defaultWin32Error Errno) (ret Errno) {
- r0, _, _ := syscall.Syscall(procCM_MapCrToWin32Err.Addr(), 2, uintptr(configRet), uintptr(defaultWin32Error), 0)
+ r0, _, _ := syscall.SyscallN(procCM_MapCrToWin32Err.Addr(), uintptr(configRet), uintptr(defaultWin32Error))
ret = Errno(r0)
return
}
@@ -574,7 +580,7 @@ func AdjustTokenGroups(token Token, resetToDefault bool, newstate *Tokengroups,
if resetToDefault {
_p0 = 1
}
- r1, _, e1 := syscall.Syscall6(procAdjustTokenGroups.Addr(), 6, uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen)))
+ r1, _, e1 := syscall.SyscallN(procAdjustTokenGroups.Addr(), uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -586,7 +592,7 @@ func AdjustTokenPrivileges(token Token, disableAllPrivileges bool, newstate *Tok
if disableAllPrivileges {
_p0 = 1
}
- r1, _, e1 := syscall.Syscall6(procAdjustTokenPrivileges.Addr(), 6, uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen)))
+ r1, _, e1 := syscall.SyscallN(procAdjustTokenPrivileges.Addr(), uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -594,7 +600,7 @@ func AdjustTokenPrivileges(token Token, disableAllPrivileges bool, newstate *Tok
}
func AllocateAndInitializeSid(identAuth *SidIdentifierAuthority, subAuth byte, subAuth0 uint32, subAuth1 uint32, subAuth2 uint32, subAuth3 uint32, subAuth4 uint32, subAuth5 uint32, subAuth6 uint32, subAuth7 uint32, sid **SID) (err error) {
- r1, _, e1 := syscall.Syscall12(procAllocateAndInitializeSid.Addr(), 11, uintptr(unsafe.Pointer(identAuth)), uintptr(subAuth), uintptr(subAuth0), uintptr(subAuth1), uintptr(subAuth2), uintptr(subAuth3), uintptr(subAuth4), uintptr(subAuth5), uintptr(subAuth6), uintptr(subAuth7), uintptr(unsafe.Pointer(sid)), 0)
+ r1, _, e1 := syscall.SyscallN(procAllocateAndInitializeSid.Addr(), uintptr(unsafe.Pointer(identAuth)), uintptr(subAuth), uintptr(subAuth0), uintptr(subAuth1), uintptr(subAuth2), uintptr(subAuth3), uintptr(subAuth4), uintptr(subAuth5), uintptr(subAuth6), uintptr(subAuth7), uintptr(unsafe.Pointer(sid)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -602,7 +608,7 @@ func AllocateAndInitializeSid(identAuth *SidIdentifierAuthority, subAuth byte, s
}
func buildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, countAccessEntries uint32, accessEntries *EXPLICIT_ACCESS, countAuditEntries uint32, auditEntries *EXPLICIT_ACCESS, oldSecurityDescriptor *SECURITY_DESCRIPTOR, sizeNewSecurityDescriptor *uint32, newSecurityDescriptor **SECURITY_DESCRIPTOR) (ret error) {
- r0, _, _ := syscall.Syscall9(procBuildSecurityDescriptorW.Addr(), 9, uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(countAccessEntries), uintptr(unsafe.Pointer(accessEntries)), uintptr(countAuditEntries), uintptr(unsafe.Pointer(auditEntries)), uintptr(unsafe.Pointer(oldSecurityDescriptor)), uintptr(unsafe.Pointer(sizeNewSecurityDescriptor)), uintptr(unsafe.Pointer(newSecurityDescriptor)))
+ r0, _, _ := syscall.SyscallN(procBuildSecurityDescriptorW.Addr(), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(countAccessEntries), uintptr(unsafe.Pointer(accessEntries)), uintptr(countAuditEntries), uintptr(unsafe.Pointer(auditEntries)), uintptr(unsafe.Pointer(oldSecurityDescriptor)), uintptr(unsafe.Pointer(sizeNewSecurityDescriptor)), uintptr(unsafe.Pointer(newSecurityDescriptor)))
if r0 != 0 {
ret = syscall.Errno(r0)
}
@@ -610,7 +616,7 @@ func buildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, countAccessEntries
}
func ChangeServiceConfig2(service Handle, infoLevel uint32, info *byte) (err error) {
- r1, _, e1 := syscall.Syscall(procChangeServiceConfig2W.Addr(), 3, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(info)))
+ r1, _, e1 := syscall.SyscallN(procChangeServiceConfig2W.Addr(), uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(info)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -618,7 +624,7 @@ func ChangeServiceConfig2(service Handle, infoLevel uint32, info *byte) (err err
}
func ChangeServiceConfig(service Handle, serviceType uint32, startType uint32, errorControl uint32, binaryPathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16, displayName *uint16) (err error) {
- r1, _, e1 := syscall.Syscall12(procChangeServiceConfigW.Addr(), 11, uintptr(service), uintptr(serviceType), uintptr(startType), uintptr(errorControl), uintptr(unsafe.Pointer(binaryPathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)), uintptr(unsafe.Pointer(displayName)), 0)
+ r1, _, e1 := syscall.SyscallN(procChangeServiceConfigW.Addr(), uintptr(service), uintptr(serviceType), uintptr(startType), uintptr(errorControl), uintptr(unsafe.Pointer(binaryPathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)), uintptr(unsafe.Pointer(displayName)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -626,7 +632,7 @@ func ChangeServiceConfig(service Handle, serviceType uint32, startType uint32, e
}
func checkTokenMembership(tokenHandle Token, sidToCheck *SID, isMember *int32) (err error) {
- r1, _, e1 := syscall.Syscall(procCheckTokenMembership.Addr(), 3, uintptr(tokenHandle), uintptr(unsafe.Pointer(sidToCheck)), uintptr(unsafe.Pointer(isMember)))
+ r1, _, e1 := syscall.SyscallN(procCheckTokenMembership.Addr(), uintptr(tokenHandle), uintptr(unsafe.Pointer(sidToCheck)), uintptr(unsafe.Pointer(isMember)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -634,7 +640,7 @@ func checkTokenMembership(tokenHandle Token, sidToCheck *SID, isMember *int32) (
}
func CloseServiceHandle(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procCloseServiceHandle.Addr(), 1, uintptr(handle), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procCloseServiceHandle.Addr(), uintptr(handle))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -642,7 +648,7 @@ func CloseServiceHandle(handle Handle) (err error) {
}
func ControlService(service Handle, control uint32, status *SERVICE_STATUS) (err error) {
- r1, _, e1 := syscall.Syscall(procControlService.Addr(), 3, uintptr(service), uintptr(control), uintptr(unsafe.Pointer(status)))
+ r1, _, e1 := syscall.SyscallN(procControlService.Addr(), uintptr(service), uintptr(control), uintptr(unsafe.Pointer(status)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -650,7 +656,7 @@ func ControlService(service Handle, control uint32, status *SERVICE_STATUS) (err
}
func convertSecurityDescriptorToStringSecurityDescriptor(sd *SECURITY_DESCRIPTOR, revision uint32, securityInformation SECURITY_INFORMATION, str **uint16, strLen *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procConvertSecurityDescriptorToStringSecurityDescriptorW.Addr(), 5, uintptr(unsafe.Pointer(sd)), uintptr(revision), uintptr(securityInformation), uintptr(unsafe.Pointer(str)), uintptr(unsafe.Pointer(strLen)), 0)
+ r1, _, e1 := syscall.SyscallN(procConvertSecurityDescriptorToStringSecurityDescriptorW.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(revision), uintptr(securityInformation), uintptr(unsafe.Pointer(str)), uintptr(unsafe.Pointer(strLen)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -658,7 +664,7 @@ func convertSecurityDescriptorToStringSecurityDescriptor(sd *SECURITY_DESCRIPTOR
}
func ConvertSidToStringSid(sid *SID, stringSid **uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procConvertSidToStringSidW.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(stringSid)), 0)
+ r1, _, e1 := syscall.SyscallN(procConvertSidToStringSidW.Addr(), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(stringSid)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -675,7 +681,7 @@ func convertStringSecurityDescriptorToSecurityDescriptor(str string, revision ui
}
func _convertStringSecurityDescriptorToSecurityDescriptor(str *uint16, revision uint32, sd **SECURITY_DESCRIPTOR, size *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procConvertStringSecurityDescriptorToSecurityDescriptorW.Addr(), 4, uintptr(unsafe.Pointer(str)), uintptr(revision), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(size)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procConvertStringSecurityDescriptorToSecurityDescriptorW.Addr(), uintptr(unsafe.Pointer(str)), uintptr(revision), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(size)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -683,7 +689,7 @@ func _convertStringSecurityDescriptorToSecurityDescriptor(str *uint16, revision
}
func ConvertStringSidToSid(stringSid *uint16, sid **SID) (err error) {
- r1, _, e1 := syscall.Syscall(procConvertStringSidToSidW.Addr(), 2, uintptr(unsafe.Pointer(stringSid)), uintptr(unsafe.Pointer(sid)), 0)
+ r1, _, e1 := syscall.SyscallN(procConvertStringSidToSidW.Addr(), uintptr(unsafe.Pointer(stringSid)), uintptr(unsafe.Pointer(sid)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -691,7 +697,7 @@ func ConvertStringSidToSid(stringSid *uint16, sid **SID) (err error) {
}
func CopySid(destSidLen uint32, destSid *SID, srcSid *SID) (err error) {
- r1, _, e1 := syscall.Syscall(procCopySid.Addr(), 3, uintptr(destSidLen), uintptr(unsafe.Pointer(destSid)), uintptr(unsafe.Pointer(srcSid)))
+ r1, _, e1 := syscall.SyscallN(procCopySid.Addr(), uintptr(destSidLen), uintptr(unsafe.Pointer(destSid)), uintptr(unsafe.Pointer(srcSid)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -703,7 +709,7 @@ func CreateProcessAsUser(token Token, appName *uint16, commandLine *uint16, proc
if inheritHandles {
_p0 = 1
}
- r1, _, e1 := syscall.Syscall12(procCreateProcessAsUserW.Addr(), 11, uintptr(token), uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)), 0)
+ r1, _, e1 := syscall.SyscallN(procCreateProcessAsUserW.Addr(), uintptr(token), uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -711,7 +717,7 @@ func CreateProcessAsUser(token Token, appName *uint16, commandLine *uint16, proc
}
func CreateService(mgr Handle, serviceName *uint16, displayName *uint16, access uint32, srvType uint32, startType uint32, errCtl uint32, pathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall15(procCreateServiceW.Addr(), 13, uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(unsafe.Pointer(displayName)), uintptr(access), uintptr(srvType), uintptr(startType), uintptr(errCtl), uintptr(unsafe.Pointer(pathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procCreateServiceW.Addr(), uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(unsafe.Pointer(displayName)), uintptr(access), uintptr(srvType), uintptr(startType), uintptr(errCtl), uintptr(unsafe.Pointer(pathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)))
handle = Handle(r0)
if handle == 0 {
err = errnoErr(e1)
@@ -720,7 +726,7 @@ func CreateService(mgr Handle, serviceName *uint16, displayName *uint16, access
}
func createWellKnownSid(sidType WELL_KNOWN_SID_TYPE, domainSid *SID, sid *SID, sizeSid *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procCreateWellKnownSid.Addr(), 4, uintptr(sidType), uintptr(unsafe.Pointer(domainSid)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sizeSid)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procCreateWellKnownSid.Addr(), uintptr(sidType), uintptr(unsafe.Pointer(domainSid)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sizeSid)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -728,7 +734,7 @@ func createWellKnownSid(sidType WELL_KNOWN_SID_TYPE, domainSid *SID, sid *SID, s
}
func CryptAcquireContext(provhandle *Handle, container *uint16, provider *uint16, provtype uint32, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procCryptAcquireContextW.Addr(), 5, uintptr(unsafe.Pointer(provhandle)), uintptr(unsafe.Pointer(container)), uintptr(unsafe.Pointer(provider)), uintptr(provtype), uintptr(flags), 0)
+ r1, _, e1 := syscall.SyscallN(procCryptAcquireContextW.Addr(), uintptr(unsafe.Pointer(provhandle)), uintptr(unsafe.Pointer(container)), uintptr(unsafe.Pointer(provider)), uintptr(provtype), uintptr(flags))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -736,7 +742,7 @@ func CryptAcquireContext(provhandle *Handle, container *uint16, provider *uint16
}
func CryptGenRandom(provhandle Handle, buflen uint32, buf *byte) (err error) {
- r1, _, e1 := syscall.Syscall(procCryptGenRandom.Addr(), 3, uintptr(provhandle), uintptr(buflen), uintptr(unsafe.Pointer(buf)))
+ r1, _, e1 := syscall.SyscallN(procCryptGenRandom.Addr(), uintptr(provhandle), uintptr(buflen), uintptr(unsafe.Pointer(buf)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -744,7 +750,7 @@ func CryptGenRandom(provhandle Handle, buflen uint32, buf *byte) (err error) {
}
func CryptReleaseContext(provhandle Handle, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procCryptReleaseContext.Addr(), 2, uintptr(provhandle), uintptr(flags), 0)
+ r1, _, e1 := syscall.SyscallN(procCryptReleaseContext.Addr(), uintptr(provhandle), uintptr(flags))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -752,7 +758,7 @@ func CryptReleaseContext(provhandle Handle, flags uint32) (err error) {
}
func DeleteService(service Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procDeleteService.Addr(), 1, uintptr(service), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procDeleteService.Addr(), uintptr(service))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -760,7 +766,7 @@ func DeleteService(service Handle) (err error) {
}
func DeregisterEventSource(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procDeregisterEventSource.Addr(), 1, uintptr(handle), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procDeregisterEventSource.Addr(), uintptr(handle))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -768,7 +774,7 @@ func DeregisterEventSource(handle Handle) (err error) {
}
func DuplicateTokenEx(existingToken Token, desiredAccess uint32, tokenAttributes *SecurityAttributes, impersonationLevel uint32, tokenType uint32, newToken *Token) (err error) {
- r1, _, e1 := syscall.Syscall6(procDuplicateTokenEx.Addr(), 6, uintptr(existingToken), uintptr(desiredAccess), uintptr(unsafe.Pointer(tokenAttributes)), uintptr(impersonationLevel), uintptr(tokenType), uintptr(unsafe.Pointer(newToken)))
+ r1, _, e1 := syscall.SyscallN(procDuplicateTokenEx.Addr(), uintptr(existingToken), uintptr(desiredAccess), uintptr(unsafe.Pointer(tokenAttributes)), uintptr(impersonationLevel), uintptr(tokenType), uintptr(unsafe.Pointer(newToken)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -776,7 +782,7 @@ func DuplicateTokenEx(existingToken Token, desiredAccess uint32, tokenAttributes
}
func EnumDependentServices(service Handle, activityState uint32, services *ENUM_SERVICE_STATUS, buffSize uint32, bytesNeeded *uint32, servicesReturned *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procEnumDependentServicesW.Addr(), 6, uintptr(service), uintptr(activityState), uintptr(unsafe.Pointer(services)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned)))
+ r1, _, e1 := syscall.SyscallN(procEnumDependentServicesW.Addr(), uintptr(service), uintptr(activityState), uintptr(unsafe.Pointer(services)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -784,7 +790,7 @@ func EnumDependentServices(service Handle, activityState uint32, services *ENUM_
}
func EnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serviceState uint32, services *byte, bufSize uint32, bytesNeeded *uint32, servicesReturned *uint32, resumeHandle *uint32, groupName *uint16) (err error) {
- r1, _, e1 := syscall.Syscall12(procEnumServicesStatusExW.Addr(), 10, uintptr(mgr), uintptr(infoLevel), uintptr(serviceType), uintptr(serviceState), uintptr(unsafe.Pointer(services)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned)), uintptr(unsafe.Pointer(resumeHandle)), uintptr(unsafe.Pointer(groupName)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procEnumServicesStatusExW.Addr(), uintptr(mgr), uintptr(infoLevel), uintptr(serviceType), uintptr(serviceState), uintptr(unsafe.Pointer(services)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned)), uintptr(unsafe.Pointer(resumeHandle)), uintptr(unsafe.Pointer(groupName)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -792,13 +798,13 @@ func EnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serv
}
func EqualSid(sid1 *SID, sid2 *SID) (isEqual bool) {
- r0, _, _ := syscall.Syscall(procEqualSid.Addr(), 2, uintptr(unsafe.Pointer(sid1)), uintptr(unsafe.Pointer(sid2)), 0)
+ r0, _, _ := syscall.SyscallN(procEqualSid.Addr(), uintptr(unsafe.Pointer(sid1)), uintptr(unsafe.Pointer(sid2)))
isEqual = r0 != 0
return
}
func FreeSid(sid *SID) (err error) {
- r1, _, e1 := syscall.Syscall(procFreeSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procFreeSid.Addr(), uintptr(unsafe.Pointer(sid)))
if r1 != 0 {
err = errnoErr(e1)
}
@@ -806,7 +812,7 @@ func FreeSid(sid *SID) (err error) {
}
func GetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (err error) {
- r1, _, e1 := syscall.Syscall(procGetAce.Addr(), 3, uintptr(unsafe.Pointer(acl)), uintptr(aceIndex), uintptr(unsafe.Pointer(pAce)))
+ r1, _, e1 := syscall.SyscallN(procGetAce.Addr(), uintptr(unsafe.Pointer(acl)), uintptr(aceIndex), uintptr(unsafe.Pointer(pAce)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -814,7 +820,7 @@ func GetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (err error) {
}
func GetLengthSid(sid *SID) (len uint32) {
- r0, _, _ := syscall.Syscall(procGetLengthSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procGetLengthSid.Addr(), uintptr(unsafe.Pointer(sid)))
len = uint32(r0)
return
}
@@ -829,7 +835,7 @@ func getNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, security
}
func _getNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {
- r0, _, _ := syscall.Syscall9(procGetNamedSecurityInfoW.Addr(), 8, uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)), 0)
+ r0, _, _ := syscall.SyscallN(procGetNamedSecurityInfoW.Addr(), uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)))
if r0 != 0 {
ret = syscall.Errno(r0)
}
@@ -837,7 +843,7 @@ func _getNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securi
}
func getSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, control *SECURITY_DESCRIPTOR_CONTROL, revision *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorControl.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(control)), uintptr(unsafe.Pointer(revision)))
+ r1, _, e1 := syscall.SyscallN(procGetSecurityDescriptorControl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(control)), uintptr(unsafe.Pointer(revision)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -853,7 +859,7 @@ func getSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent *bool, dacl
if *daclDefaulted {
_p1 = 1
}
- r1, _, e1 := syscall.Syscall6(procGetSecurityDescriptorDacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(&_p1)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procGetSecurityDescriptorDacl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(&_p1)))
*daclPresent = _p0 != 0
*daclDefaulted = _p1 != 0
if r1 == 0 {
@@ -867,7 +873,7 @@ func getSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group **SID, groupDefau
if *groupDefaulted {
_p0 = 1
}
- r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorGroup.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(&_p0)))
+ r1, _, e1 := syscall.SyscallN(procGetSecurityDescriptorGroup.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(&_p0)))
*groupDefaulted = _p0 != 0
if r1 == 0 {
err = errnoErr(e1)
@@ -876,7 +882,7 @@ func getSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group **SID, groupDefau
}
func getSecurityDescriptorLength(sd *SECURITY_DESCRIPTOR) (len uint32) {
- r0, _, _ := syscall.Syscall(procGetSecurityDescriptorLength.Addr(), 1, uintptr(unsafe.Pointer(sd)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procGetSecurityDescriptorLength.Addr(), uintptr(unsafe.Pointer(sd)))
len = uint32(r0)
return
}
@@ -886,7 +892,7 @@ func getSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner **SID, ownerDefau
if *ownerDefaulted {
_p0 = 1
}
- r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorOwner.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(&_p0)))
+ r1, _, e1 := syscall.SyscallN(procGetSecurityDescriptorOwner.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(&_p0)))
*ownerDefaulted = _p0 != 0
if r1 == 0 {
err = errnoErr(e1)
@@ -895,7 +901,7 @@ func getSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner **SID, ownerDefau
}
func getSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) (ret error) {
- r0, _, _ := syscall.Syscall(procGetSecurityDescriptorRMControl.Addr(), 2, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)), 0)
+ r0, _, _ := syscall.SyscallN(procGetSecurityDescriptorRMControl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)))
if r0 != 0 {
ret = syscall.Errno(r0)
}
@@ -911,7 +917,7 @@ func getSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent *bool, sacl
if *saclDefaulted {
_p1 = 1
}
- r1, _, e1 := syscall.Syscall6(procGetSecurityDescriptorSacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(&_p1)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procGetSecurityDescriptorSacl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(&_p1)))
*saclPresent = _p0 != 0
*saclDefaulted = _p1 != 0
if r1 == 0 {
@@ -921,7 +927,7 @@ func getSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent *bool, sacl
}
func getSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {
- r0, _, _ := syscall.Syscall9(procGetSecurityInfo.Addr(), 8, uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)), 0)
+ r0, _, _ := syscall.SyscallN(procGetSecurityInfo.Addr(), uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)))
if r0 != 0 {
ret = syscall.Errno(r0)
}
@@ -929,25 +935,25 @@ func getSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformati
}
func getSidIdentifierAuthority(sid *SID) (authority *SidIdentifierAuthority) {
- r0, _, _ := syscall.Syscall(procGetSidIdentifierAuthority.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procGetSidIdentifierAuthority.Addr(), uintptr(unsafe.Pointer(sid)))
authority = (*SidIdentifierAuthority)(unsafe.Pointer(r0))
return
}
func getSidSubAuthority(sid *SID, index uint32) (subAuthority *uint32) {
- r0, _, _ := syscall.Syscall(procGetSidSubAuthority.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(index), 0)
+ r0, _, _ := syscall.SyscallN(procGetSidSubAuthority.Addr(), uintptr(unsafe.Pointer(sid)), uintptr(index))
subAuthority = (*uint32)(unsafe.Pointer(r0))
return
}
func getSidSubAuthorityCount(sid *SID) (count *uint8) {
- r0, _, _ := syscall.Syscall(procGetSidSubAuthorityCount.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procGetSidSubAuthorityCount.Addr(), uintptr(unsafe.Pointer(sid)))
count = (*uint8)(unsafe.Pointer(r0))
return
}
func GetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32, returnedLen *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetTokenInformation.Addr(), 5, uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), uintptr(unsafe.Pointer(returnedLen)), 0)
+ r1, _, e1 := syscall.SyscallN(procGetTokenInformation.Addr(), uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), uintptr(unsafe.Pointer(returnedLen)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -955,7 +961,7 @@ func GetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint
}
func ImpersonateSelf(impersonationlevel uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procImpersonateSelf.Addr(), 1, uintptr(impersonationlevel), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procImpersonateSelf.Addr(), uintptr(impersonationlevel))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -963,7 +969,7 @@ func ImpersonateSelf(impersonationlevel uint32) (err error) {
}
func initializeSecurityDescriptor(absoluteSD *SECURITY_DESCRIPTOR, revision uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procInitializeSecurityDescriptor.Addr(), 2, uintptr(unsafe.Pointer(absoluteSD)), uintptr(revision), 0)
+ r1, _, e1 := syscall.SyscallN(procInitializeSecurityDescriptor.Addr(), uintptr(unsafe.Pointer(absoluteSD)), uintptr(revision))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -979,7 +985,7 @@ func InitiateSystemShutdownEx(machineName *uint16, message *uint16, timeout uint
if rebootAfterShutdown {
_p1 = 1
}
- r1, _, e1 := syscall.Syscall6(procInitiateSystemShutdownExW.Addr(), 6, uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(message)), uintptr(timeout), uintptr(_p0), uintptr(_p1), uintptr(reason))
+ r1, _, e1 := syscall.SyscallN(procInitiateSystemShutdownExW.Addr(), uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(message)), uintptr(timeout), uintptr(_p0), uintptr(_p1), uintptr(reason))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -987,7 +993,7 @@ func InitiateSystemShutdownEx(machineName *uint16, message *uint16, timeout uint
}
func isTokenRestricted(tokenHandle Token) (ret bool, err error) {
- r0, _, e1 := syscall.Syscall(procIsTokenRestricted.Addr(), 1, uintptr(tokenHandle), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procIsTokenRestricted.Addr(), uintptr(tokenHandle))
ret = r0 != 0
if !ret {
err = errnoErr(e1)
@@ -996,25 +1002,25 @@ func isTokenRestricted(tokenHandle Token) (ret bool, err error) {
}
func isValidSecurityDescriptor(sd *SECURITY_DESCRIPTOR) (isValid bool) {
- r0, _, _ := syscall.Syscall(procIsValidSecurityDescriptor.Addr(), 1, uintptr(unsafe.Pointer(sd)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procIsValidSecurityDescriptor.Addr(), uintptr(unsafe.Pointer(sd)))
isValid = r0 != 0
return
}
func isValidSid(sid *SID) (isValid bool) {
- r0, _, _ := syscall.Syscall(procIsValidSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procIsValidSid.Addr(), uintptr(unsafe.Pointer(sid)))
isValid = r0 != 0
return
}
func isWellKnownSid(sid *SID, sidType WELL_KNOWN_SID_TYPE) (isWellKnown bool) {
- r0, _, _ := syscall.Syscall(procIsWellKnownSid.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(sidType), 0)
+ r0, _, _ := syscall.SyscallN(procIsWellKnownSid.Addr(), uintptr(unsafe.Pointer(sid)), uintptr(sidType))
isWellKnown = r0 != 0
return
}
func LookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) {
- r1, _, e1 := syscall.Syscall9(procLookupAccountNameW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(accountName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sidLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procLookupAccountNameW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(accountName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sidLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1022,7 +1028,7 @@ func LookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen
}
func LookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) {
- r1, _, e1 := syscall.Syscall9(procLookupAccountSidW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procLookupAccountSidW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1030,7 +1036,7 @@ func LookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint3
}
func LookupPrivilegeValue(systemname *uint16, name *uint16, luid *LUID) (err error) {
- r1, _, e1 := syscall.Syscall(procLookupPrivilegeValueW.Addr(), 3, uintptr(unsafe.Pointer(systemname)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(luid)))
+ r1, _, e1 := syscall.SyscallN(procLookupPrivilegeValueW.Addr(), uintptr(unsafe.Pointer(systemname)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(luid)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1038,7 +1044,7 @@ func LookupPrivilegeValue(systemname *uint16, name *uint16, luid *LUID) (err err
}
func makeAbsoluteSD(selfRelativeSD *SECURITY_DESCRIPTOR, absoluteSD *SECURITY_DESCRIPTOR, absoluteSDSize *uint32, dacl *ACL, daclSize *uint32, sacl *ACL, saclSize *uint32, owner *SID, ownerSize *uint32, group *SID, groupSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall12(procMakeAbsoluteSD.Addr(), 11, uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(absoluteSDSize)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(daclSize)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(saclSize)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(ownerSize)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(groupSize)), 0)
+ r1, _, e1 := syscall.SyscallN(procMakeAbsoluteSD.Addr(), uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(absoluteSDSize)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(daclSize)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(saclSize)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(ownerSize)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(groupSize)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1046,7 +1052,7 @@ func makeAbsoluteSD(selfRelativeSD *SECURITY_DESCRIPTOR, absoluteSD *SECURITY_DE
}
func makeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURITY_DESCRIPTOR, selfRelativeSDSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procMakeSelfRelativeSD.Addr(), 3, uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(selfRelativeSDSize)))
+ r1, _, e1 := syscall.SyscallN(procMakeSelfRelativeSD.Addr(), uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(selfRelativeSDSize)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1054,7 +1060,7 @@ func makeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURIT
}
func NotifyServiceStatusChange(service Handle, notifyMask uint32, notifier *SERVICE_NOTIFY) (ret error) {
- r0, _, _ := syscall.Syscall(procNotifyServiceStatusChangeW.Addr(), 3, uintptr(service), uintptr(notifyMask), uintptr(unsafe.Pointer(notifier)))
+ r0, _, _ := syscall.SyscallN(procNotifyServiceStatusChangeW.Addr(), uintptr(service), uintptr(notifyMask), uintptr(unsafe.Pointer(notifier)))
if r0 != 0 {
ret = syscall.Errno(r0)
}
@@ -1062,7 +1068,7 @@ func NotifyServiceStatusChange(service Handle, notifyMask uint32, notifier *SERV
}
func OpenProcessToken(process Handle, access uint32, token *Token) (err error) {
- r1, _, e1 := syscall.Syscall(procOpenProcessToken.Addr(), 3, uintptr(process), uintptr(access), uintptr(unsafe.Pointer(token)))
+ r1, _, e1 := syscall.SyscallN(procOpenProcessToken.Addr(), uintptr(process), uintptr(access), uintptr(unsafe.Pointer(token)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1070,7 +1076,7 @@ func OpenProcessToken(process Handle, access uint32, token *Token) (err error) {
}
func OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procOpenSCManagerW.Addr(), 3, uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(databaseName)), uintptr(access))
+ r0, _, e1 := syscall.SyscallN(procOpenSCManagerW.Addr(), uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(databaseName)), uintptr(access))
handle = Handle(r0)
if handle == 0 {
err = errnoErr(e1)
@@ -1079,7 +1085,7 @@ func OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (ha
}
func OpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procOpenServiceW.Addr(), 3, uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(access))
+ r0, _, e1 := syscall.SyscallN(procOpenServiceW.Addr(), uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(access))
handle = Handle(r0)
if handle == 0 {
err = errnoErr(e1)
@@ -1092,7 +1098,7 @@ func OpenThreadToken(thread Handle, access uint32, openAsSelf bool, token *Token
if openAsSelf {
_p0 = 1
}
- r1, _, e1 := syscall.Syscall6(procOpenThreadToken.Addr(), 4, uintptr(thread), uintptr(access), uintptr(_p0), uintptr(unsafe.Pointer(token)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procOpenThreadToken.Addr(), uintptr(thread), uintptr(access), uintptr(_p0), uintptr(unsafe.Pointer(token)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1100,7 +1106,7 @@ func OpenThreadToken(thread Handle, access uint32, openAsSelf bool, token *Token
}
func QueryServiceConfig2(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procQueryServiceConfig2W.Addr(), 5, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), 0)
+ r1, _, e1 := syscall.SyscallN(procQueryServiceConfig2W.Addr(), uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1108,7 +1114,7 @@ func QueryServiceConfig2(service Handle, infoLevel uint32, buff *byte, buffSize
}
func QueryServiceConfig(service Handle, serviceConfig *QUERY_SERVICE_CONFIG, bufSize uint32, bytesNeeded *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procQueryServiceConfigW.Addr(), 4, uintptr(service), uintptr(unsafe.Pointer(serviceConfig)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procQueryServiceConfigW.Addr(), uintptr(service), uintptr(unsafe.Pointer(serviceConfig)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1120,7 +1126,7 @@ func QueryServiceDynamicInformation(service Handle, infoLevel uint32, dynamicInf
if err != nil {
return
}
- r1, _, e1 := syscall.Syscall(procQueryServiceDynamicInformation.Addr(), 3, uintptr(service), uintptr(infoLevel), uintptr(dynamicInfo))
+ r1, _, e1 := syscall.SyscallN(procQueryServiceDynamicInformation.Addr(), uintptr(service), uintptr(infoLevel), uintptr(dynamicInfo))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1128,7 +1134,7 @@ func QueryServiceDynamicInformation(service Handle, infoLevel uint32, dynamicInf
}
func QueryServiceLockStatus(mgr Handle, lockStatus *QUERY_SERVICE_LOCK_STATUS, bufSize uint32, bytesNeeded *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procQueryServiceLockStatusW.Addr(), 4, uintptr(mgr), uintptr(unsafe.Pointer(lockStatus)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procQueryServiceLockStatusW.Addr(), uintptr(mgr), uintptr(unsafe.Pointer(lockStatus)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1136,7 +1142,7 @@ func QueryServiceLockStatus(mgr Handle, lockStatus *QUERY_SERVICE_LOCK_STATUS, b
}
func QueryServiceStatus(service Handle, status *SERVICE_STATUS) (err error) {
- r1, _, e1 := syscall.Syscall(procQueryServiceStatus.Addr(), 2, uintptr(service), uintptr(unsafe.Pointer(status)), 0)
+ r1, _, e1 := syscall.SyscallN(procQueryServiceStatus.Addr(), uintptr(service), uintptr(unsafe.Pointer(status)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1144,7 +1150,7 @@ func QueryServiceStatus(service Handle, status *SERVICE_STATUS) (err error) {
}
func QueryServiceStatusEx(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procQueryServiceStatusEx.Addr(), 5, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), 0)
+ r1, _, e1 := syscall.SyscallN(procQueryServiceStatusEx.Addr(), uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1152,7 +1158,7 @@ func QueryServiceStatusEx(service Handle, infoLevel uint32, buff *byte, buffSize
}
func RegCloseKey(key Handle) (regerrno error) {
- r0, _, _ := syscall.Syscall(procRegCloseKey.Addr(), 1, uintptr(key), 0, 0)
+ r0, _, _ := syscall.SyscallN(procRegCloseKey.Addr(), uintptr(key))
if r0 != 0 {
regerrno = syscall.Errno(r0)
}
@@ -1160,7 +1166,7 @@ func RegCloseKey(key Handle) (regerrno error) {
}
func RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) {
- r0, _, _ := syscall.Syscall9(procRegEnumKeyExW.Addr(), 8, uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(lastWriteTime)), 0)
+ r0, _, _ := syscall.SyscallN(procRegEnumKeyExW.Addr(), uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(lastWriteTime)))
if r0 != 0 {
regerrno = syscall.Errno(r0)
}
@@ -1176,7 +1182,7 @@ func RegNotifyChangeKeyValue(key Handle, watchSubtree bool, notifyFilter uint32,
if asynchronous {
_p1 = 1
}
- r0, _, _ := syscall.Syscall6(procRegNotifyChangeKeyValue.Addr(), 5, uintptr(key), uintptr(_p0), uintptr(notifyFilter), uintptr(event), uintptr(_p1), 0)
+ r0, _, _ := syscall.SyscallN(procRegNotifyChangeKeyValue.Addr(), uintptr(key), uintptr(_p0), uintptr(notifyFilter), uintptr(event), uintptr(_p1))
if r0 != 0 {
regerrno = syscall.Errno(r0)
}
@@ -1184,7 +1190,7 @@ func RegNotifyChangeKeyValue(key Handle, watchSubtree bool, notifyFilter uint32,
}
func RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint32, result *Handle) (regerrno error) {
- r0, _, _ := syscall.Syscall6(procRegOpenKeyExW.Addr(), 5, uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(options), uintptr(desiredAccess), uintptr(unsafe.Pointer(result)), 0)
+ r0, _, _ := syscall.SyscallN(procRegOpenKeyExW.Addr(), uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(options), uintptr(desiredAccess), uintptr(unsafe.Pointer(result)))
if r0 != 0 {
regerrno = syscall.Errno(r0)
}
@@ -1192,7 +1198,7 @@ func RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint
}
func RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) {
- r0, _, _ := syscall.Syscall12(procRegQueryInfoKeyW.Addr(), 12, uintptr(key), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(subkeysLen)), uintptr(unsafe.Pointer(maxSubkeyLen)), uintptr(unsafe.Pointer(maxClassLen)), uintptr(unsafe.Pointer(valuesLen)), uintptr(unsafe.Pointer(maxValueNameLen)), uintptr(unsafe.Pointer(maxValueLen)), uintptr(unsafe.Pointer(saLen)), uintptr(unsafe.Pointer(lastWriteTime)))
+ r0, _, _ := syscall.SyscallN(procRegQueryInfoKeyW.Addr(), uintptr(key), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(subkeysLen)), uintptr(unsafe.Pointer(maxSubkeyLen)), uintptr(unsafe.Pointer(maxClassLen)), uintptr(unsafe.Pointer(valuesLen)), uintptr(unsafe.Pointer(maxValueNameLen)), uintptr(unsafe.Pointer(maxValueLen)), uintptr(unsafe.Pointer(saLen)), uintptr(unsafe.Pointer(lastWriteTime)))
if r0 != 0 {
regerrno = syscall.Errno(r0)
}
@@ -1200,7 +1206,7 @@ func RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint
}
func RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) {
- r0, _, _ := syscall.Syscall6(procRegQueryValueExW.Addr(), 6, uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen)))
+ r0, _, _ := syscall.SyscallN(procRegQueryValueExW.Addr(), uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen)))
if r0 != 0 {
regerrno = syscall.Errno(r0)
}
@@ -1208,7 +1214,7 @@ func RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32
}
func RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procRegisterEventSourceW.Addr(), 2, uintptr(unsafe.Pointer(uncServerName)), uintptr(unsafe.Pointer(sourceName)), 0)
+ r0, _, e1 := syscall.SyscallN(procRegisterEventSourceW.Addr(), uintptr(unsafe.Pointer(uncServerName)), uintptr(unsafe.Pointer(sourceName)))
handle = Handle(r0)
if handle == 0 {
err = errnoErr(e1)
@@ -1217,7 +1223,7 @@ func RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Hand
}
func RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, context uintptr) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procRegisterServiceCtrlHandlerExW.Addr(), 3, uintptr(unsafe.Pointer(serviceName)), uintptr(handlerProc), uintptr(context))
+ r0, _, e1 := syscall.SyscallN(procRegisterServiceCtrlHandlerExW.Addr(), uintptr(unsafe.Pointer(serviceName)), uintptr(handlerProc), uintptr(context))
handle = Handle(r0)
if handle == 0 {
err = errnoErr(e1)
@@ -1226,7 +1232,7 @@ func RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, cont
}
func ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) {
- r1, _, e1 := syscall.Syscall9(procReportEventW.Addr(), 9, uintptr(log), uintptr(etype), uintptr(category), uintptr(eventId), uintptr(usrSId), uintptr(numStrings), uintptr(dataSize), uintptr(unsafe.Pointer(strings)), uintptr(unsafe.Pointer(rawData)))
+ r1, _, e1 := syscall.SyscallN(procReportEventW.Addr(), uintptr(log), uintptr(etype), uintptr(category), uintptr(eventId), uintptr(usrSId), uintptr(numStrings), uintptr(dataSize), uintptr(unsafe.Pointer(strings)), uintptr(unsafe.Pointer(rawData)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1234,7 +1240,7 @@ func ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrS
}
func RevertToSelf() (err error) {
- r1, _, e1 := syscall.Syscall(procRevertToSelf.Addr(), 0, 0, 0, 0)
+ r1, _, e1 := syscall.SyscallN(procRevertToSelf.Addr())
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1242,7 +1248,7 @@ func RevertToSelf() (err error) {
}
func setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCESS, oldACL *ACL, newACL **ACL) (ret error) {
- r0, _, _ := syscall.Syscall6(procSetEntriesInAclW.Addr(), 4, uintptr(countExplicitEntries), uintptr(unsafe.Pointer(explicitEntries)), uintptr(unsafe.Pointer(oldACL)), uintptr(unsafe.Pointer(newACL)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procSetEntriesInAclW.Addr(), uintptr(countExplicitEntries), uintptr(unsafe.Pointer(explicitEntries)), uintptr(unsafe.Pointer(oldACL)), uintptr(unsafe.Pointer(newACL)))
if r0 != 0 {
ret = syscall.Errno(r0)
}
@@ -1250,7 +1256,7 @@ func setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCE
}
func SetKernelObjectSecurity(handle Handle, securityInformation SECURITY_INFORMATION, securityDescriptor *SECURITY_DESCRIPTOR) (err error) {
- r1, _, e1 := syscall.Syscall(procSetKernelObjectSecurity.Addr(), 3, uintptr(handle), uintptr(securityInformation), uintptr(unsafe.Pointer(securityDescriptor)))
+ r1, _, e1 := syscall.SyscallN(procSetKernelObjectSecurity.Addr(), uintptr(handle), uintptr(securityInformation), uintptr(unsafe.Pointer(securityDescriptor)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1267,7 +1273,7 @@ func SetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, security
}
func _SetNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) {
- r0, _, _ := syscall.Syscall9(procSetNamedSecurityInfoW.Addr(), 7, uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procSetNamedSecurityInfoW.Addr(), uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)))
if r0 != 0 {
ret = syscall.Errno(r0)
}
@@ -1275,7 +1281,7 @@ func _SetNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securi
}
func setSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, controlBitsOfInterest SECURITY_DESCRIPTOR_CONTROL, controlBitsToSet SECURITY_DESCRIPTOR_CONTROL) (err error) {
- r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorControl.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(controlBitsOfInterest), uintptr(controlBitsToSet))
+ r1, _, e1 := syscall.SyscallN(procSetSecurityDescriptorControl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(controlBitsOfInterest), uintptr(controlBitsToSet))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1291,7 +1297,7 @@ func setSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent bool, dacl *
if daclDefaulted {
_p1 = 1
}
- r1, _, e1 := syscall.Syscall6(procSetSecurityDescriptorDacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(dacl)), uintptr(_p1), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procSetSecurityDescriptorDacl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(dacl)), uintptr(_p1))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1303,7 +1309,7 @@ func setSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group *SID, groupDefaul
if groupDefaulted {
_p0 = 1
}
- r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorGroup.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(_p0))
+ r1, _, e1 := syscall.SyscallN(procSetSecurityDescriptorGroup.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(_p0))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1315,7 +1321,7 @@ func setSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner *SID, ownerDefaul
if ownerDefaulted {
_p0 = 1
}
- r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorOwner.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(_p0))
+ r1, _, e1 := syscall.SyscallN(procSetSecurityDescriptorOwner.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(_p0))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1323,7 +1329,7 @@ func setSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner *SID, ownerDefaul
}
func setSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) {
- syscall.Syscall(procSetSecurityDescriptorRMControl.Addr(), 2, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)), 0)
+ syscall.SyscallN(procSetSecurityDescriptorRMControl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)))
return
}
@@ -1336,7 +1342,7 @@ func setSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent bool, sacl *
if saclDefaulted {
_p1 = 1
}
- r1, _, e1 := syscall.Syscall6(procSetSecurityDescriptorSacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(sacl)), uintptr(_p1), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procSetSecurityDescriptorSacl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(sacl)), uintptr(_p1))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1344,7 +1350,7 @@ func setSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent bool, sacl *
}
func SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) {
- r0, _, _ := syscall.Syscall9(procSetSecurityInfo.Addr(), 7, uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procSetSecurityInfo.Addr(), uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)))
if r0 != 0 {
ret = syscall.Errno(r0)
}
@@ -1352,7 +1358,7 @@ func SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformati
}
func SetServiceStatus(service Handle, serviceStatus *SERVICE_STATUS) (err error) {
- r1, _, e1 := syscall.Syscall(procSetServiceStatus.Addr(), 2, uintptr(service), uintptr(unsafe.Pointer(serviceStatus)), 0)
+ r1, _, e1 := syscall.SyscallN(procSetServiceStatus.Addr(), uintptr(service), uintptr(unsafe.Pointer(serviceStatus)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1360,7 +1366,7 @@ func SetServiceStatus(service Handle, serviceStatus *SERVICE_STATUS) (err error)
}
func SetThreadToken(thread *Handle, token Token) (err error) {
- r1, _, e1 := syscall.Syscall(procSetThreadToken.Addr(), 2, uintptr(unsafe.Pointer(thread)), uintptr(token), 0)
+ r1, _, e1 := syscall.SyscallN(procSetThreadToken.Addr(), uintptr(unsafe.Pointer(thread)), uintptr(token))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1368,7 +1374,7 @@ func SetThreadToken(thread *Handle, token Token) (err error) {
}
func SetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procSetTokenInformation.Addr(), 4, uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procSetTokenInformation.Addr(), uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1376,7 +1382,7 @@ func SetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint
}
func StartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error) {
- r1, _, e1 := syscall.Syscall(procStartServiceCtrlDispatcherW.Addr(), 1, uintptr(unsafe.Pointer(serviceTable)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procStartServiceCtrlDispatcherW.Addr(), uintptr(unsafe.Pointer(serviceTable)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1384,7 +1390,7 @@ func StartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error) {
}
func StartService(service Handle, numArgs uint32, argVectors **uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procStartServiceW.Addr(), 3, uintptr(service), uintptr(numArgs), uintptr(unsafe.Pointer(argVectors)))
+ r1, _, e1 := syscall.SyscallN(procStartServiceW.Addr(), uintptr(service), uintptr(numArgs), uintptr(unsafe.Pointer(argVectors)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1392,7 +1398,7 @@ func StartService(service Handle, numArgs uint32, argVectors **uint16) (err erro
}
func CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) {
- r1, _, e1 := syscall.Syscall6(procCertAddCertificateContextToStore.Addr(), 4, uintptr(store), uintptr(unsafe.Pointer(certContext)), uintptr(addDisposition), uintptr(unsafe.Pointer(storeContext)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procCertAddCertificateContextToStore.Addr(), uintptr(store), uintptr(unsafe.Pointer(certContext)), uintptr(addDisposition), uintptr(unsafe.Pointer(storeContext)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1400,7 +1406,7 @@ func CertAddCertificateContextToStore(store Handle, certContext *CertContext, ad
}
func CertCloseStore(store Handle, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procCertCloseStore.Addr(), 2, uintptr(store), uintptr(flags), 0)
+ r1, _, e1 := syscall.SyscallN(procCertCloseStore.Addr(), uintptr(store), uintptr(flags))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1408,7 +1414,7 @@ func CertCloseStore(store Handle, flags uint32) (err error) {
}
func CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) {
- r0, _, e1 := syscall.Syscall(procCertCreateCertificateContext.Addr(), 3, uintptr(certEncodingType), uintptr(unsafe.Pointer(certEncoded)), uintptr(encodedLen))
+ r0, _, e1 := syscall.SyscallN(procCertCreateCertificateContext.Addr(), uintptr(certEncodingType), uintptr(unsafe.Pointer(certEncoded)), uintptr(encodedLen))
context = (*CertContext)(unsafe.Pointer(r0))
if context == nil {
err = errnoErr(e1)
@@ -1417,7 +1423,7 @@ func CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, en
}
func CertDeleteCertificateFromStore(certContext *CertContext) (err error) {
- r1, _, e1 := syscall.Syscall(procCertDeleteCertificateFromStore.Addr(), 1, uintptr(unsafe.Pointer(certContext)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procCertDeleteCertificateFromStore.Addr(), uintptr(unsafe.Pointer(certContext)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1425,13 +1431,13 @@ func CertDeleteCertificateFromStore(certContext *CertContext) (err error) {
}
func CertDuplicateCertificateContext(certContext *CertContext) (dupContext *CertContext) {
- r0, _, _ := syscall.Syscall(procCertDuplicateCertificateContext.Addr(), 1, uintptr(unsafe.Pointer(certContext)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procCertDuplicateCertificateContext.Addr(), uintptr(unsafe.Pointer(certContext)))
dupContext = (*CertContext)(unsafe.Pointer(r0))
return
}
func CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) {
- r0, _, e1 := syscall.Syscall(procCertEnumCertificatesInStore.Addr(), 2, uintptr(store), uintptr(unsafe.Pointer(prevContext)), 0)
+ r0, _, e1 := syscall.SyscallN(procCertEnumCertificatesInStore.Addr(), uintptr(store), uintptr(unsafe.Pointer(prevContext)))
context = (*CertContext)(unsafe.Pointer(r0))
if context == nil {
err = errnoErr(e1)
@@ -1440,7 +1446,7 @@ func CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (contex
}
func CertFindCertificateInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevCertContext *CertContext) (cert *CertContext, err error) {
- r0, _, e1 := syscall.Syscall6(procCertFindCertificateInStore.Addr(), 6, uintptr(store), uintptr(certEncodingType), uintptr(findFlags), uintptr(findType), uintptr(findPara), uintptr(unsafe.Pointer(prevCertContext)))
+ r0, _, e1 := syscall.SyscallN(procCertFindCertificateInStore.Addr(), uintptr(store), uintptr(certEncodingType), uintptr(findFlags), uintptr(findType), uintptr(findPara), uintptr(unsafe.Pointer(prevCertContext)))
cert = (*CertContext)(unsafe.Pointer(r0))
if cert == nil {
err = errnoErr(e1)
@@ -1449,7 +1455,7 @@ func CertFindCertificateInStore(store Handle, certEncodingType uint32, findFlags
}
func CertFindChainInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevChainContext *CertChainContext) (certchain *CertChainContext, err error) {
- r0, _, e1 := syscall.Syscall6(procCertFindChainInStore.Addr(), 6, uintptr(store), uintptr(certEncodingType), uintptr(findFlags), uintptr(findType), uintptr(findPara), uintptr(unsafe.Pointer(prevChainContext)))
+ r0, _, e1 := syscall.SyscallN(procCertFindChainInStore.Addr(), uintptr(store), uintptr(certEncodingType), uintptr(findFlags), uintptr(findType), uintptr(findPara), uintptr(unsafe.Pointer(prevChainContext)))
certchain = (*CertChainContext)(unsafe.Pointer(r0))
if certchain == nil {
err = errnoErr(e1)
@@ -1458,18 +1464,18 @@ func CertFindChainInStore(store Handle, certEncodingType uint32, findFlags uint3
}
func CertFindExtension(objId *byte, countExtensions uint32, extensions *CertExtension) (ret *CertExtension) {
- r0, _, _ := syscall.Syscall(procCertFindExtension.Addr(), 3, uintptr(unsafe.Pointer(objId)), uintptr(countExtensions), uintptr(unsafe.Pointer(extensions)))
+ r0, _, _ := syscall.SyscallN(procCertFindExtension.Addr(), uintptr(unsafe.Pointer(objId)), uintptr(countExtensions), uintptr(unsafe.Pointer(extensions)))
ret = (*CertExtension)(unsafe.Pointer(r0))
return
}
func CertFreeCertificateChain(ctx *CertChainContext) {
- syscall.Syscall(procCertFreeCertificateChain.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0)
+ syscall.SyscallN(procCertFreeCertificateChain.Addr(), uintptr(unsafe.Pointer(ctx)))
return
}
func CertFreeCertificateContext(ctx *CertContext) (err error) {
- r1, _, e1 := syscall.Syscall(procCertFreeCertificateContext.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procCertFreeCertificateContext.Addr(), uintptr(unsafe.Pointer(ctx)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1477,7 +1483,7 @@ func CertFreeCertificateContext(ctx *CertContext) (err error) {
}
func CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) {
- r1, _, e1 := syscall.Syscall9(procCertGetCertificateChain.Addr(), 8, uintptr(engine), uintptr(unsafe.Pointer(leaf)), uintptr(unsafe.Pointer(time)), uintptr(additionalStore), uintptr(unsafe.Pointer(para)), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(chainCtx)), 0)
+ r1, _, e1 := syscall.SyscallN(procCertGetCertificateChain.Addr(), uintptr(engine), uintptr(unsafe.Pointer(leaf)), uintptr(unsafe.Pointer(time)), uintptr(additionalStore), uintptr(unsafe.Pointer(para)), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(chainCtx)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1485,13 +1491,13 @@ func CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, a
}
func CertGetNameString(certContext *CertContext, nameType uint32, flags uint32, typePara unsafe.Pointer, name *uint16, size uint32) (chars uint32) {
- r0, _, _ := syscall.Syscall6(procCertGetNameStringW.Addr(), 6, uintptr(unsafe.Pointer(certContext)), uintptr(nameType), uintptr(flags), uintptr(typePara), uintptr(unsafe.Pointer(name)), uintptr(size))
+ r0, _, _ := syscall.SyscallN(procCertGetNameStringW.Addr(), uintptr(unsafe.Pointer(certContext)), uintptr(nameType), uintptr(flags), uintptr(typePara), uintptr(unsafe.Pointer(name)), uintptr(size))
chars = uint32(r0)
return
}
func CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall6(procCertOpenStore.Addr(), 5, uintptr(storeProvider), uintptr(msgAndCertEncodingType), uintptr(cryptProv), uintptr(flags), uintptr(para), 0)
+ r0, _, e1 := syscall.SyscallN(procCertOpenStore.Addr(), uintptr(storeProvider), uintptr(msgAndCertEncodingType), uintptr(cryptProv), uintptr(flags), uintptr(para))
handle = Handle(r0)
if handle == 0 {
err = errnoErr(e1)
@@ -1500,7 +1506,7 @@ func CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptPr
}
func CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) {
- r0, _, e1 := syscall.Syscall(procCertOpenSystemStoreW.Addr(), 2, uintptr(hprov), uintptr(unsafe.Pointer(name)), 0)
+ r0, _, e1 := syscall.SyscallN(procCertOpenSystemStoreW.Addr(), uintptr(hprov), uintptr(unsafe.Pointer(name)))
store = Handle(r0)
if store == 0 {
err = errnoErr(e1)
@@ -1509,7 +1515,7 @@ func CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) {
}
func CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) {
- r1, _, e1 := syscall.Syscall6(procCertVerifyCertificateChainPolicy.Addr(), 4, uintptr(policyOID), uintptr(unsafe.Pointer(chain)), uintptr(unsafe.Pointer(para)), uintptr(unsafe.Pointer(status)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procCertVerifyCertificateChainPolicy.Addr(), uintptr(policyOID), uintptr(unsafe.Pointer(chain)), uintptr(unsafe.Pointer(para)), uintptr(unsafe.Pointer(status)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1521,7 +1527,7 @@ func CryptAcquireCertificatePrivateKey(cert *CertContext, flags uint32, paramete
if *callerFreeProvOrNCryptKey {
_p0 = 1
}
- r1, _, e1 := syscall.Syscall6(procCryptAcquireCertificatePrivateKey.Addr(), 6, uintptr(unsafe.Pointer(cert)), uintptr(flags), uintptr(parameters), uintptr(unsafe.Pointer(cryptProvOrNCryptKey)), uintptr(unsafe.Pointer(keySpec)), uintptr(unsafe.Pointer(&_p0)))
+ r1, _, e1 := syscall.SyscallN(procCryptAcquireCertificatePrivateKey.Addr(), uintptr(unsafe.Pointer(cert)), uintptr(flags), uintptr(parameters), uintptr(unsafe.Pointer(cryptProvOrNCryptKey)), uintptr(unsafe.Pointer(keySpec)), uintptr(unsafe.Pointer(&_p0)))
*callerFreeProvOrNCryptKey = _p0 != 0
if r1 == 0 {
err = errnoErr(e1)
@@ -1530,7 +1536,7 @@ func CryptAcquireCertificatePrivateKey(cert *CertContext, flags uint32, paramete
}
func CryptDecodeObject(encodingType uint32, structType *byte, encodedBytes *byte, lenEncodedBytes uint32, flags uint32, decoded unsafe.Pointer, decodedLen *uint32) (err error) {
- r1, _, e1 := syscall.Syscall9(procCryptDecodeObject.Addr(), 7, uintptr(encodingType), uintptr(unsafe.Pointer(structType)), uintptr(unsafe.Pointer(encodedBytes)), uintptr(lenEncodedBytes), uintptr(flags), uintptr(decoded), uintptr(unsafe.Pointer(decodedLen)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procCryptDecodeObject.Addr(), uintptr(encodingType), uintptr(unsafe.Pointer(structType)), uintptr(unsafe.Pointer(encodedBytes)), uintptr(lenEncodedBytes), uintptr(flags), uintptr(decoded), uintptr(unsafe.Pointer(decodedLen)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1538,7 +1544,7 @@ func CryptDecodeObject(encodingType uint32, structType *byte, encodedBytes *byte
}
func CryptProtectData(dataIn *DataBlob, name *uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) {
- r1, _, e1 := syscall.Syscall9(procCryptProtectData.Addr(), 7, uintptr(unsafe.Pointer(dataIn)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(optionalEntropy)), uintptr(reserved), uintptr(unsafe.Pointer(promptStruct)), uintptr(flags), uintptr(unsafe.Pointer(dataOut)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procCryptProtectData.Addr(), uintptr(unsafe.Pointer(dataIn)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(optionalEntropy)), uintptr(reserved), uintptr(unsafe.Pointer(promptStruct)), uintptr(flags), uintptr(unsafe.Pointer(dataOut)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1546,7 +1552,7 @@ func CryptProtectData(dataIn *DataBlob, name *uint16, optionalEntropy *DataBlob,
}
func CryptQueryObject(objectType uint32, object unsafe.Pointer, expectedContentTypeFlags uint32, expectedFormatTypeFlags uint32, flags uint32, msgAndCertEncodingType *uint32, contentType *uint32, formatType *uint32, certStore *Handle, msg *Handle, context *unsafe.Pointer) (err error) {
- r1, _, e1 := syscall.Syscall12(procCryptQueryObject.Addr(), 11, uintptr(objectType), uintptr(object), uintptr(expectedContentTypeFlags), uintptr(expectedFormatTypeFlags), uintptr(flags), uintptr(unsafe.Pointer(msgAndCertEncodingType)), uintptr(unsafe.Pointer(contentType)), uintptr(unsafe.Pointer(formatType)), uintptr(unsafe.Pointer(certStore)), uintptr(unsafe.Pointer(msg)), uintptr(unsafe.Pointer(context)), 0)
+ r1, _, e1 := syscall.SyscallN(procCryptQueryObject.Addr(), uintptr(objectType), uintptr(object), uintptr(expectedContentTypeFlags), uintptr(expectedFormatTypeFlags), uintptr(flags), uintptr(unsafe.Pointer(msgAndCertEncodingType)), uintptr(unsafe.Pointer(contentType)), uintptr(unsafe.Pointer(formatType)), uintptr(unsafe.Pointer(certStore)), uintptr(unsafe.Pointer(msg)), uintptr(unsafe.Pointer(context)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1554,7 +1560,7 @@ func CryptQueryObject(objectType uint32, object unsafe.Pointer, expectedContentT
}
func CryptUnprotectData(dataIn *DataBlob, name **uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) {
- r1, _, e1 := syscall.Syscall9(procCryptUnprotectData.Addr(), 7, uintptr(unsafe.Pointer(dataIn)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(optionalEntropy)), uintptr(reserved), uintptr(unsafe.Pointer(promptStruct)), uintptr(flags), uintptr(unsafe.Pointer(dataOut)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procCryptUnprotectData.Addr(), uintptr(unsafe.Pointer(dataIn)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(optionalEntropy)), uintptr(reserved), uintptr(unsafe.Pointer(promptStruct)), uintptr(flags), uintptr(unsafe.Pointer(dataOut)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1562,7 +1568,7 @@ func CryptUnprotectData(dataIn *DataBlob, name **uint16, optionalEntropy *DataBl
}
func PFXImportCertStore(pfx *CryptDataBlob, password *uint16, flags uint32) (store Handle, err error) {
- r0, _, e1 := syscall.Syscall(procPFXImportCertStore.Addr(), 3, uintptr(unsafe.Pointer(pfx)), uintptr(unsafe.Pointer(password)), uintptr(flags))
+ r0, _, e1 := syscall.SyscallN(procPFXImportCertStore.Addr(), uintptr(unsafe.Pointer(pfx)), uintptr(unsafe.Pointer(password)), uintptr(flags))
store = Handle(r0)
if store == 0 {
err = errnoErr(e1)
@@ -1571,7 +1577,7 @@ func PFXImportCertStore(pfx *CryptDataBlob, password *uint16, flags uint32) (sto
}
func DnsNameCompare(name1 *uint16, name2 *uint16) (same bool) {
- r0, _, _ := syscall.Syscall(procDnsNameCompare_W.Addr(), 2, uintptr(unsafe.Pointer(name1)), uintptr(unsafe.Pointer(name2)), 0)
+ r0, _, _ := syscall.SyscallN(procDnsNameCompare_W.Addr(), uintptr(unsafe.Pointer(name1)), uintptr(unsafe.Pointer(name2)))
same = r0 != 0
return
}
@@ -1586,7 +1592,7 @@ func DnsQuery(name string, qtype uint16, options uint32, extra *byte, qrs **DNSR
}
func _DnsQuery(name *uint16, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) {
- r0, _, _ := syscall.Syscall6(procDnsQuery_W.Addr(), 6, uintptr(unsafe.Pointer(name)), uintptr(qtype), uintptr(options), uintptr(unsafe.Pointer(extra)), uintptr(unsafe.Pointer(qrs)), uintptr(unsafe.Pointer(pr)))
+ r0, _, _ := syscall.SyscallN(procDnsQuery_W.Addr(), uintptr(unsafe.Pointer(name)), uintptr(qtype), uintptr(options), uintptr(unsafe.Pointer(extra)), uintptr(unsafe.Pointer(qrs)), uintptr(unsafe.Pointer(pr)))
if r0 != 0 {
status = syscall.Errno(r0)
}
@@ -1594,12 +1600,12 @@ func _DnsQuery(name *uint16, qtype uint16, options uint32, extra *byte, qrs **DN
}
func DnsRecordListFree(rl *DNSRecord, freetype uint32) {
- syscall.Syscall(procDnsRecordListFree.Addr(), 2, uintptr(unsafe.Pointer(rl)), uintptr(freetype), 0)
+ syscall.SyscallN(procDnsRecordListFree.Addr(), uintptr(unsafe.Pointer(rl)), uintptr(freetype))
return
}
func DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) {
- r0, _, _ := syscall.Syscall6(procDwmGetWindowAttribute.Addr(), 4, uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size), 0, 0)
+ r0, _, _ := syscall.SyscallN(procDwmGetWindowAttribute.Addr(), uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size))
if r0 != 0 {
ret = syscall.Errno(r0)
}
@@ -1607,7 +1613,7 @@ func DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, si
}
func DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) {
- r0, _, _ := syscall.Syscall6(procDwmSetWindowAttribute.Addr(), 4, uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size), 0, 0)
+ r0, _, _ := syscall.SyscallN(procDwmSetWindowAttribute.Addr(), uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size))
if r0 != 0 {
ret = syscall.Errno(r0)
}
@@ -1615,15 +1621,20 @@ func DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, si
}
func CancelMibChangeNotify2(notificationHandle Handle) (errcode error) {
- r0, _, _ := syscall.Syscall(procCancelMibChangeNotify2.Addr(), 1, uintptr(notificationHandle), 0, 0)
+ r0, _, _ := syscall.SyscallN(procCancelMibChangeNotify2.Addr(), uintptr(notificationHandle))
if r0 != 0 {
errcode = syscall.Errno(r0)
}
return
}
+func FreeMibTable(memory unsafe.Pointer) {
+ syscall.SyscallN(procFreeMibTable.Addr(), uintptr(memory))
+ return
+}
+
func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) {
- r0, _, _ := syscall.Syscall6(procGetAdaptersAddresses.Addr(), 5, uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)), 0)
+ r0, _, _ := syscall.SyscallN(procGetAdaptersAddresses.Addr(), uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)))
if r0 != 0 {
errcode = syscall.Errno(r0)
}
@@ -1631,7 +1642,7 @@ func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapter
}
func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) {
- r0, _, _ := syscall.Syscall(procGetAdaptersInfo.Addr(), 2, uintptr(unsafe.Pointer(ai)), uintptr(unsafe.Pointer(ol)), 0)
+ r0, _, _ := syscall.SyscallN(procGetAdaptersInfo.Addr(), uintptr(unsafe.Pointer(ai)), uintptr(unsafe.Pointer(ol)))
if r0 != 0 {
errcode = syscall.Errno(r0)
}
@@ -1639,7 +1650,7 @@ func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) {
}
func getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcode error) {
- r0, _, _ := syscall.Syscall(procGetBestInterfaceEx.Addr(), 2, uintptr(sockaddr), uintptr(unsafe.Pointer(pdwBestIfIndex)), 0)
+ r0, _, _ := syscall.SyscallN(procGetBestInterfaceEx.Addr(), uintptr(sockaddr), uintptr(unsafe.Pointer(pdwBestIfIndex)))
if r0 != 0 {
errcode = syscall.Errno(r0)
}
@@ -1647,7 +1658,7 @@ func getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcod
}
func GetIfEntry(pIfRow *MibIfRow) (errcode error) {
- r0, _, _ := syscall.Syscall(procGetIfEntry.Addr(), 1, uintptr(unsafe.Pointer(pIfRow)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procGetIfEntry.Addr(), uintptr(unsafe.Pointer(pIfRow)))
if r0 != 0 {
errcode = syscall.Errno(r0)
}
@@ -1655,7 +1666,23 @@ func GetIfEntry(pIfRow *MibIfRow) (errcode error) {
}
func GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) {
- r0, _, _ := syscall.Syscall(procGetIfEntry2Ex.Addr(), 2, uintptr(level), uintptr(unsafe.Pointer(row)), 0)
+ r0, _, _ := syscall.SyscallN(procGetIfEntry2Ex.Addr(), uintptr(level), uintptr(unsafe.Pointer(row)))
+ if r0 != 0 {
+ errcode = syscall.Errno(r0)
+ }
+ return
+}
+
+func GetIpForwardEntry2(row *MibIpForwardRow2) (errcode error) {
+ r0, _, _ := syscall.SyscallN(procGetIpForwardEntry2.Addr(), uintptr(unsafe.Pointer(row)))
+ if r0 != 0 {
+ errcode = syscall.Errno(r0)
+ }
+ return
+}
+
+func GetIpForwardTable2(family uint16, table **MibIpForwardTable2) (errcode error) {
+ r0, _, _ := syscall.SyscallN(procGetIpForwardTable2.Addr(), uintptr(family), uintptr(unsafe.Pointer(table)))
if r0 != 0 {
errcode = syscall.Errno(r0)
}
@@ -1663,7 +1690,7 @@ func GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) {
}
func GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) {
- r0, _, _ := syscall.Syscall(procGetUnicastIpAddressEntry.Addr(), 1, uintptr(unsafe.Pointer(row)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procGetUnicastIpAddressEntry.Addr(), uintptr(unsafe.Pointer(row)))
if r0 != 0 {
errcode = syscall.Errno(r0)
}
@@ -1675,7 +1702,19 @@ func NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsa
if initialNotification {
_p0 = 1
}
- r0, _, _ := syscall.Syscall6(procNotifyIpInterfaceChange.Addr(), 5, uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)), 0)
+ r0, _, _ := syscall.SyscallN(procNotifyIpInterfaceChange.Addr(), uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)))
+ if r0 != 0 {
+ errcode = syscall.Errno(r0)
+ }
+ return
+}
+
+func NotifyRouteChange2(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) {
+ var _p0 uint32
+ if initialNotification {
+ _p0 = 1
+ }
+ r0, _, _ := syscall.SyscallN(procNotifyRouteChange2.Addr(), uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)))
if r0 != 0 {
errcode = syscall.Errno(r0)
}
@@ -1687,7 +1726,7 @@ func NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext
if initialNotification {
_p0 = 1
}
- r0, _, _ := syscall.Syscall6(procNotifyUnicastIpAddressChange.Addr(), 5, uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)), 0)
+ r0, _, _ := syscall.SyscallN(procNotifyUnicastIpAddressChange.Addr(), uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)))
if r0 != 0 {
errcode = syscall.Errno(r0)
}
@@ -1695,7 +1734,7 @@ func NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext
}
func AddDllDirectory(path *uint16) (cookie uintptr, err error) {
- r0, _, e1 := syscall.Syscall(procAddDllDirectory.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procAddDllDirectory.Addr(), uintptr(unsafe.Pointer(path)))
cookie = uintptr(r0)
if cookie == 0 {
err = errnoErr(e1)
@@ -1704,7 +1743,7 @@ func AddDllDirectory(path *uint16) (cookie uintptr, err error) {
}
func AssignProcessToJobObject(job Handle, process Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procAssignProcessToJobObject.Addr(), 2, uintptr(job), uintptr(process), 0)
+ r1, _, e1 := syscall.SyscallN(procAssignProcessToJobObject.Addr(), uintptr(job), uintptr(process))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1712,7 +1751,7 @@ func AssignProcessToJobObject(job Handle, process Handle) (err error) {
}
func CancelIo(s Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procCancelIo.Addr(), 1, uintptr(s), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procCancelIo.Addr(), uintptr(s))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1720,7 +1759,7 @@ func CancelIo(s Handle) (err error) {
}
func CancelIoEx(s Handle, o *Overlapped) (err error) {
- r1, _, e1 := syscall.Syscall(procCancelIoEx.Addr(), 2, uintptr(s), uintptr(unsafe.Pointer(o)), 0)
+ r1, _, e1 := syscall.SyscallN(procCancelIoEx.Addr(), uintptr(s), uintptr(unsafe.Pointer(o)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1728,7 +1767,7 @@ func CancelIoEx(s Handle, o *Overlapped) (err error) {
}
func ClearCommBreak(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procClearCommBreak.Addr(), 1, uintptr(handle), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procClearCommBreak.Addr(), uintptr(handle))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1736,7 +1775,7 @@ func ClearCommBreak(handle Handle) (err error) {
}
func ClearCommError(handle Handle, lpErrors *uint32, lpStat *ComStat) (err error) {
- r1, _, e1 := syscall.Syscall(procClearCommError.Addr(), 3, uintptr(handle), uintptr(unsafe.Pointer(lpErrors)), uintptr(unsafe.Pointer(lpStat)))
+ r1, _, e1 := syscall.SyscallN(procClearCommError.Addr(), uintptr(handle), uintptr(unsafe.Pointer(lpErrors)), uintptr(unsafe.Pointer(lpStat)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1744,7 +1783,7 @@ func ClearCommError(handle Handle, lpErrors *uint32, lpStat *ComStat) (err error
}
func CloseHandle(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procCloseHandle.Addr(), 1, uintptr(handle), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procCloseHandle.Addr(), uintptr(handle))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1752,12 +1791,12 @@ func CloseHandle(handle Handle) (err error) {
}
func ClosePseudoConsole(console Handle) {
- syscall.Syscall(procClosePseudoConsole.Addr(), 1, uintptr(console), 0, 0)
+ syscall.SyscallN(procClosePseudoConsole.Addr(), uintptr(console))
return
}
func ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error) {
- r1, _, e1 := syscall.Syscall(procConnectNamedPipe.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(overlapped)), 0)
+ r1, _, e1 := syscall.SyscallN(procConnectNamedPipe.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(overlapped)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1765,7 +1804,7 @@ func ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error) {
}
func CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) {
- r1, _, e1 := syscall.Syscall(procCreateDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(sa)), 0)
+ r1, _, e1 := syscall.SyscallN(procCreateDirectoryW.Addr(), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(sa)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1773,7 +1812,7 @@ func CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) {
}
func CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall6(procCreateEventExW.Addr(), 4, uintptr(unsafe.Pointer(eventAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procCreateEventExW.Addr(), uintptr(unsafe.Pointer(eventAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess))
handle = Handle(r0)
if handle == 0 || e1 == ERROR_ALREADY_EXISTS {
err = errnoErr(e1)
@@ -1782,7 +1821,7 @@ func CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, d
}
func CreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall6(procCreateEventW.Addr(), 4, uintptr(unsafe.Pointer(eventAttrs)), uintptr(manualReset), uintptr(initialState), uintptr(unsafe.Pointer(name)), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procCreateEventW.Addr(), uintptr(unsafe.Pointer(eventAttrs)), uintptr(manualReset), uintptr(initialState), uintptr(unsafe.Pointer(name)))
handle = Handle(r0)
if handle == 0 || e1 == ERROR_ALREADY_EXISTS {
err = errnoErr(e1)
@@ -1791,7 +1830,7 @@ func CreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialStat
}
func CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall6(procCreateFileMappingW.Addr(), 6, uintptr(fhandle), uintptr(unsafe.Pointer(sa)), uintptr(prot), uintptr(maxSizeHigh), uintptr(maxSizeLow), uintptr(unsafe.Pointer(name)))
+ r0, _, e1 := syscall.SyscallN(procCreateFileMappingW.Addr(), uintptr(fhandle), uintptr(unsafe.Pointer(sa)), uintptr(prot), uintptr(maxSizeHigh), uintptr(maxSizeLow), uintptr(unsafe.Pointer(name)))
handle = Handle(r0)
if handle == 0 || e1 == ERROR_ALREADY_EXISTS {
err = errnoErr(e1)
@@ -1800,7 +1839,7 @@ func CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxS
}
func CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile Handle) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall9(procCreateFileW.Addr(), 7, uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procCreateFileW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile))
handle = Handle(r0)
if handle == InvalidHandle {
err = errnoErr(e1)
@@ -1809,7 +1848,7 @@ func CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes
}
func CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr) (err error) {
- r1, _, e1 := syscall.Syscall(procCreateHardLinkW.Addr(), 3, uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(existingfilename)), uintptr(reserved))
+ r1, _, e1 := syscall.SyscallN(procCreateHardLinkW.Addr(), uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(existingfilename)), uintptr(reserved))
if r1&0xff == 0 {
err = errnoErr(e1)
}
@@ -1817,7 +1856,7 @@ func CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr
}
func CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uintptr, threadcnt uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall6(procCreateIoCompletionPort.Addr(), 4, uintptr(filehandle), uintptr(cphandle), uintptr(key), uintptr(threadcnt), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procCreateIoCompletionPort.Addr(), uintptr(filehandle), uintptr(cphandle), uintptr(key), uintptr(threadcnt))
handle = Handle(r0)
if handle == 0 {
err = errnoErr(e1)
@@ -1826,7 +1865,7 @@ func CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uintptr, thr
}
func CreateJobObject(jobAttr *SecurityAttributes, name *uint16) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procCreateJobObjectW.Addr(), 2, uintptr(unsafe.Pointer(jobAttr)), uintptr(unsafe.Pointer(name)), 0)
+ r0, _, e1 := syscall.SyscallN(procCreateJobObjectW.Addr(), uintptr(unsafe.Pointer(jobAttr)), uintptr(unsafe.Pointer(name)))
handle = Handle(r0)
if handle == 0 {
err = errnoErr(e1)
@@ -1835,7 +1874,7 @@ func CreateJobObject(jobAttr *SecurityAttributes, name *uint16) (handle Handle,
}
func CreateMutexEx(mutexAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall6(procCreateMutexExW.Addr(), 4, uintptr(unsafe.Pointer(mutexAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procCreateMutexExW.Addr(), uintptr(unsafe.Pointer(mutexAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess))
handle = Handle(r0)
if handle == 0 || e1 == ERROR_ALREADY_EXISTS {
err = errnoErr(e1)
@@ -1848,7 +1887,7 @@ func CreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16
if initialOwner {
_p0 = 1
}
- r0, _, e1 := syscall.Syscall(procCreateMutexW.Addr(), 3, uintptr(unsafe.Pointer(mutexAttrs)), uintptr(_p0), uintptr(unsafe.Pointer(name)))
+ r0, _, e1 := syscall.SyscallN(procCreateMutexW.Addr(), uintptr(unsafe.Pointer(mutexAttrs)), uintptr(_p0), uintptr(unsafe.Pointer(name)))
handle = Handle(r0)
if handle == 0 || e1 == ERROR_ALREADY_EXISTS {
err = errnoErr(e1)
@@ -1857,7 +1896,7 @@ func CreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16
}
func CreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *SecurityAttributes) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall9(procCreateNamedPipeW.Addr(), 8, uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(pipeMode), uintptr(maxInstances), uintptr(outSize), uintptr(inSize), uintptr(defaultTimeout), uintptr(unsafe.Pointer(sa)), 0)
+ r0, _, e1 := syscall.SyscallN(procCreateNamedPipeW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(pipeMode), uintptr(maxInstances), uintptr(outSize), uintptr(inSize), uintptr(defaultTimeout), uintptr(unsafe.Pointer(sa)))
handle = Handle(r0)
if handle == InvalidHandle {
err = errnoErr(e1)
@@ -1866,7 +1905,7 @@ func CreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances u
}
func CreatePipe(readhandle *Handle, writehandle *Handle, sa *SecurityAttributes, size uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procCreatePipe.Addr(), 4, uintptr(unsafe.Pointer(readhandle)), uintptr(unsafe.Pointer(writehandle)), uintptr(unsafe.Pointer(sa)), uintptr(size), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procCreatePipe.Addr(), uintptr(unsafe.Pointer(readhandle)), uintptr(unsafe.Pointer(writehandle)), uintptr(unsafe.Pointer(sa)), uintptr(size))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1878,7 +1917,7 @@ func CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityA
if inheritHandles {
_p0 = 1
}
- r1, _, e1 := syscall.Syscall12(procCreateProcessW.Addr(), 10, uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procCreateProcessW.Addr(), uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1886,7 +1925,7 @@ func CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityA
}
func createPseudoConsole(size uint32, in Handle, out Handle, flags uint32, pconsole *Handle) (hr error) {
- r0, _, _ := syscall.Syscall6(procCreatePseudoConsole.Addr(), 5, uintptr(size), uintptr(in), uintptr(out), uintptr(flags), uintptr(unsafe.Pointer(pconsole)), 0)
+ r0, _, _ := syscall.SyscallN(procCreatePseudoConsole.Addr(), uintptr(size), uintptr(in), uintptr(out), uintptr(flags), uintptr(unsafe.Pointer(pconsole)))
if r0 != 0 {
hr = syscall.Errno(r0)
}
@@ -1894,7 +1933,7 @@ func createPseudoConsole(size uint32, in Handle, out Handle, flags uint32, pcons
}
func CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procCreateSymbolicLinkW.Addr(), 3, uintptr(unsafe.Pointer(symlinkfilename)), uintptr(unsafe.Pointer(targetfilename)), uintptr(flags))
+ r1, _, e1 := syscall.SyscallN(procCreateSymbolicLinkW.Addr(), uintptr(unsafe.Pointer(symlinkfilename)), uintptr(unsafe.Pointer(targetfilename)), uintptr(flags))
if r1&0xff == 0 {
err = errnoErr(e1)
}
@@ -1902,7 +1941,7 @@ func CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags u
}
func CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procCreateToolhelp32Snapshot.Addr(), 2, uintptr(flags), uintptr(processId), 0)
+ r0, _, e1 := syscall.SyscallN(procCreateToolhelp32Snapshot.Addr(), uintptr(flags), uintptr(processId))
handle = Handle(r0)
if handle == InvalidHandle {
err = errnoErr(e1)
@@ -1911,7 +1950,7 @@ func CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, er
}
func DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procDefineDosDeviceW.Addr(), 3, uintptr(flags), uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)))
+ r1, _, e1 := syscall.SyscallN(procDefineDosDeviceW.Addr(), uintptr(flags), uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1919,7 +1958,7 @@ func DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err
}
func DeleteFile(path *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procDeleteFileW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procDeleteFileW.Addr(), uintptr(unsafe.Pointer(path)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1927,12 +1966,12 @@ func DeleteFile(path *uint16) (err error) {
}
func deleteProcThreadAttributeList(attrlist *ProcThreadAttributeList) {
- syscall.Syscall(procDeleteProcThreadAttributeList.Addr(), 1, uintptr(unsafe.Pointer(attrlist)), 0, 0)
+ syscall.SyscallN(procDeleteProcThreadAttributeList.Addr(), uintptr(unsafe.Pointer(attrlist)))
return
}
func DeleteVolumeMountPoint(volumeMountPoint *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procDeleteVolumeMountPointW.Addr(), 1, uintptr(unsafe.Pointer(volumeMountPoint)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procDeleteVolumeMountPointW.Addr(), uintptr(unsafe.Pointer(volumeMountPoint)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1940,7 +1979,7 @@ func DeleteVolumeMountPoint(volumeMountPoint *uint16) (err error) {
}
func DeviceIoControl(handle Handle, ioControlCode uint32, inBuffer *byte, inBufferSize uint32, outBuffer *byte, outBufferSize uint32, bytesReturned *uint32, overlapped *Overlapped) (err error) {
- r1, _, e1 := syscall.Syscall9(procDeviceIoControl.Addr(), 8, uintptr(handle), uintptr(ioControlCode), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferSize), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferSize), uintptr(unsafe.Pointer(bytesReturned)), uintptr(unsafe.Pointer(overlapped)), 0)
+ r1, _, e1 := syscall.SyscallN(procDeviceIoControl.Addr(), uintptr(handle), uintptr(ioControlCode), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferSize), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferSize), uintptr(unsafe.Pointer(bytesReturned)), uintptr(unsafe.Pointer(overlapped)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1948,7 +1987,7 @@ func DeviceIoControl(handle Handle, ioControlCode uint32, inBuffer *byte, inBuff
}
func DisconnectNamedPipe(pipe Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procDisconnectNamedPipe.Addr(), 1, uintptr(pipe), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procDisconnectNamedPipe.Addr(), uintptr(pipe))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1960,7 +1999,7 @@ func DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetP
if bInheritHandle {
_p0 = 1
}
- r1, _, e1 := syscall.Syscall9(procDuplicateHandle.Addr(), 7, uintptr(hSourceProcessHandle), uintptr(hSourceHandle), uintptr(hTargetProcessHandle), uintptr(unsafe.Pointer(lpTargetHandle)), uintptr(dwDesiredAccess), uintptr(_p0), uintptr(dwOptions), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procDuplicateHandle.Addr(), uintptr(hSourceProcessHandle), uintptr(hSourceHandle), uintptr(hTargetProcessHandle), uintptr(unsafe.Pointer(lpTargetHandle)), uintptr(dwDesiredAccess), uintptr(_p0), uintptr(dwOptions))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1968,7 +2007,7 @@ func DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetP
}
func EscapeCommFunction(handle Handle, dwFunc uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procEscapeCommFunction.Addr(), 2, uintptr(handle), uintptr(dwFunc), 0)
+ r1, _, e1 := syscall.SyscallN(procEscapeCommFunction.Addr(), uintptr(handle), uintptr(dwFunc))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1976,12 +2015,12 @@ func EscapeCommFunction(handle Handle, dwFunc uint32) (err error) {
}
func ExitProcess(exitcode uint32) {
- syscall.Syscall(procExitProcess.Addr(), 1, uintptr(exitcode), 0, 0)
+ syscall.SyscallN(procExitProcess.Addr(), uintptr(exitcode))
return
}
func ExpandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procExpandEnvironmentStringsW.Addr(), 3, uintptr(unsafe.Pointer(src)), uintptr(unsafe.Pointer(dst)), uintptr(size))
+ r0, _, e1 := syscall.SyscallN(procExpandEnvironmentStringsW.Addr(), uintptr(unsafe.Pointer(src)), uintptr(unsafe.Pointer(dst)), uintptr(size))
n = uint32(r0)
if n == 0 {
err = errnoErr(e1)
@@ -1990,7 +2029,7 @@ func ExpandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32,
}
func FindClose(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procFindClose.Addr(), 1, uintptr(handle), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procFindClose.Addr(), uintptr(handle))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -1998,7 +2037,7 @@ func FindClose(handle Handle) (err error) {
}
func FindCloseChangeNotification(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procFindCloseChangeNotification.Addr(), 1, uintptr(handle), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procFindCloseChangeNotification.Addr(), uintptr(handle))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2019,7 +2058,7 @@ func _FindFirstChangeNotification(path *uint16, watchSubtree bool, notifyFilter
if watchSubtree {
_p1 = 1
}
- r0, _, e1 := syscall.Syscall(procFindFirstChangeNotificationW.Addr(), 3, uintptr(unsafe.Pointer(path)), uintptr(_p1), uintptr(notifyFilter))
+ r0, _, e1 := syscall.SyscallN(procFindFirstChangeNotificationW.Addr(), uintptr(unsafe.Pointer(path)), uintptr(_p1), uintptr(notifyFilter))
handle = Handle(r0)
if handle == InvalidHandle {
err = errnoErr(e1)
@@ -2028,7 +2067,7 @@ func _FindFirstChangeNotification(path *uint16, watchSubtree bool, notifyFilter
}
func findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procFindFirstFileW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(data)), 0)
+ r0, _, e1 := syscall.SyscallN(procFindFirstFileW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(data)))
handle = Handle(r0)
if handle == InvalidHandle {
err = errnoErr(e1)
@@ -2037,7 +2076,7 @@ func findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err erro
}
func FindFirstVolumeMountPoint(rootPathName *uint16, volumeMountPoint *uint16, bufferLength uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procFindFirstVolumeMountPointW.Addr(), 3, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength))
+ r0, _, e1 := syscall.SyscallN(procFindFirstVolumeMountPointW.Addr(), uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength))
handle = Handle(r0)
if handle == InvalidHandle {
err = errnoErr(e1)
@@ -2046,7 +2085,7 @@ func FindFirstVolumeMountPoint(rootPathName *uint16, volumeMountPoint *uint16, b
}
func FindFirstVolume(volumeName *uint16, bufferLength uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procFindFirstVolumeW.Addr(), 2, uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength), 0)
+ r0, _, e1 := syscall.SyscallN(procFindFirstVolumeW.Addr(), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength))
handle = Handle(r0)
if handle == InvalidHandle {
err = errnoErr(e1)
@@ -2055,7 +2094,7 @@ func FindFirstVolume(volumeName *uint16, bufferLength uint32) (handle Handle, er
}
func FindNextChangeNotification(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procFindNextChangeNotification.Addr(), 1, uintptr(handle), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procFindNextChangeNotification.Addr(), uintptr(handle))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2063,7 +2102,7 @@ func FindNextChangeNotification(handle Handle) (err error) {
}
func findNextFile1(handle Handle, data *win32finddata1) (err error) {
- r1, _, e1 := syscall.Syscall(procFindNextFileW.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0)
+ r1, _, e1 := syscall.SyscallN(procFindNextFileW.Addr(), uintptr(handle), uintptr(unsafe.Pointer(data)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2071,7 +2110,7 @@ func findNextFile1(handle Handle, data *win32finddata1) (err error) {
}
func FindNextVolumeMountPoint(findVolumeMountPoint Handle, volumeMountPoint *uint16, bufferLength uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procFindNextVolumeMountPointW.Addr(), 3, uintptr(findVolumeMountPoint), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength))
+ r1, _, e1 := syscall.SyscallN(procFindNextVolumeMountPointW.Addr(), uintptr(findVolumeMountPoint), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2079,7 +2118,7 @@ func FindNextVolumeMountPoint(findVolumeMountPoint Handle, volumeMountPoint *uin
}
func FindNextVolume(findVolume Handle, volumeName *uint16, bufferLength uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procFindNextVolumeW.Addr(), 3, uintptr(findVolume), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength))
+ r1, _, e1 := syscall.SyscallN(procFindNextVolumeW.Addr(), uintptr(findVolume), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2087,7 +2126,7 @@ func FindNextVolume(findVolume Handle, volumeName *uint16, bufferLength uint32)
}
func findResource(module Handle, name uintptr, resType uintptr) (resInfo Handle, err error) {
- r0, _, e1 := syscall.Syscall(procFindResourceW.Addr(), 3, uintptr(module), uintptr(name), uintptr(resType))
+ r0, _, e1 := syscall.SyscallN(procFindResourceW.Addr(), uintptr(module), uintptr(name), uintptr(resType))
resInfo = Handle(r0)
if resInfo == 0 {
err = errnoErr(e1)
@@ -2096,7 +2135,7 @@ func findResource(module Handle, name uintptr, resType uintptr) (resInfo Handle,
}
func FindVolumeClose(findVolume Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procFindVolumeClose.Addr(), 1, uintptr(findVolume), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procFindVolumeClose.Addr(), uintptr(findVolume))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2104,7 +2143,15 @@ func FindVolumeClose(findVolume Handle) (err error) {
}
func FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procFindVolumeMountPointClose.Addr(), 1, uintptr(findVolumeMountPoint), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procFindVolumeMountPointClose.Addr(), uintptr(findVolumeMountPoint))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func FlushConsoleInputBuffer(console Handle) (err error) {
+ r1, _, e1 := syscall.SyscallN(procFlushConsoleInputBuffer.Addr(), uintptr(console))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2112,7 +2159,7 @@ func FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error) {
}
func FlushFileBuffers(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procFlushFileBuffers.Addr(), 1, uintptr(handle), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procFlushFileBuffers.Addr(), uintptr(handle))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2120,7 +2167,7 @@ func FlushFileBuffers(handle Handle) (err error) {
}
func FlushViewOfFile(addr uintptr, length uintptr) (err error) {
- r1, _, e1 := syscall.Syscall(procFlushViewOfFile.Addr(), 2, uintptr(addr), uintptr(length), 0)
+ r1, _, e1 := syscall.SyscallN(procFlushViewOfFile.Addr(), uintptr(addr), uintptr(length))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2132,7 +2179,7 @@ func FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, bu
if len(buf) > 0 {
_p0 = &buf[0]
}
- r0, _, e1 := syscall.Syscall9(procFormatMessageW.Addr(), 7, uintptr(flags), uintptr(msgsrc), uintptr(msgid), uintptr(langid), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(args)), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procFormatMessageW.Addr(), uintptr(flags), uintptr(msgsrc), uintptr(msgid), uintptr(langid), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(args)))
n = uint32(r0)
if n == 0 {
err = errnoErr(e1)
@@ -2141,7 +2188,7 @@ func FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, bu
}
func FreeEnvironmentStrings(envs *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procFreeEnvironmentStringsW.Addr(), 1, uintptr(unsafe.Pointer(envs)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procFreeEnvironmentStringsW.Addr(), uintptr(unsafe.Pointer(envs)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2149,7 +2196,7 @@ func FreeEnvironmentStrings(envs *uint16) (err error) {
}
func FreeLibrary(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procFreeLibrary.Addr(), 1, uintptr(handle), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procFreeLibrary.Addr(), uintptr(handle))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2157,7 +2204,7 @@ func FreeLibrary(handle Handle) (err error) {
}
func GenerateConsoleCtrlEvent(ctrlEvent uint32, processGroupID uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGenerateConsoleCtrlEvent.Addr(), 2, uintptr(ctrlEvent), uintptr(processGroupID), 0)
+ r1, _, e1 := syscall.SyscallN(procGenerateConsoleCtrlEvent.Addr(), uintptr(ctrlEvent), uintptr(processGroupID))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2165,19 +2212,19 @@ func GenerateConsoleCtrlEvent(ctrlEvent uint32, processGroupID uint32) (err erro
}
func GetACP() (acp uint32) {
- r0, _, _ := syscall.Syscall(procGetACP.Addr(), 0, 0, 0, 0)
+ r0, _, _ := syscall.SyscallN(procGetACP.Addr())
acp = uint32(r0)
return
}
func GetActiveProcessorCount(groupNumber uint16) (ret uint32) {
- r0, _, _ := syscall.Syscall(procGetActiveProcessorCount.Addr(), 1, uintptr(groupNumber), 0, 0)
+ r0, _, _ := syscall.SyscallN(procGetActiveProcessorCount.Addr(), uintptr(groupNumber))
ret = uint32(r0)
return
}
func GetCommModemStatus(handle Handle, lpModemStat *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetCommModemStatus.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(lpModemStat)), 0)
+ r1, _, e1 := syscall.SyscallN(procGetCommModemStatus.Addr(), uintptr(handle), uintptr(unsafe.Pointer(lpModemStat)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2185,7 +2232,7 @@ func GetCommModemStatus(handle Handle, lpModemStat *uint32) (err error) {
}
func GetCommState(handle Handle, lpDCB *DCB) (err error) {
- r1, _, e1 := syscall.Syscall(procGetCommState.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(lpDCB)), 0)
+ r1, _, e1 := syscall.SyscallN(procGetCommState.Addr(), uintptr(handle), uintptr(unsafe.Pointer(lpDCB)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2193,7 +2240,7 @@ func GetCommState(handle Handle, lpDCB *DCB) (err error) {
}
func GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) {
- r1, _, e1 := syscall.Syscall(procGetCommTimeouts.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(timeouts)), 0)
+ r1, _, e1 := syscall.SyscallN(procGetCommTimeouts.Addr(), uintptr(handle), uintptr(unsafe.Pointer(timeouts)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2201,13 +2248,13 @@ func GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) {
}
func GetCommandLine() (cmd *uint16) {
- r0, _, _ := syscall.Syscall(procGetCommandLineW.Addr(), 0, 0, 0, 0)
+ r0, _, _ := syscall.SyscallN(procGetCommandLineW.Addr())
cmd = (*uint16)(unsafe.Pointer(r0))
return
}
func GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetComputerNameExW.Addr(), 3, uintptr(nametype), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)))
+ r1, _, e1 := syscall.SyscallN(procGetComputerNameExW.Addr(), uintptr(nametype), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2215,7 +2262,7 @@ func GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) {
}
func GetComputerName(buf *uint16, n *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetComputerNameW.Addr(), 2, uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)), 0)
+ r1, _, e1 := syscall.SyscallN(procGetComputerNameW.Addr(), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2223,7 +2270,7 @@ func GetComputerName(buf *uint16, n *uint32) (err error) {
}
func GetConsoleCP() (cp uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetConsoleCP.Addr(), 0, 0, 0, 0)
+ r0, _, e1 := syscall.SyscallN(procGetConsoleCP.Addr())
cp = uint32(r0)
if cp == 0 {
err = errnoErr(e1)
@@ -2232,7 +2279,7 @@ func GetConsoleCP() (cp uint32, err error) {
}
func GetConsoleMode(console Handle, mode *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(mode)), 0)
+ r1, _, e1 := syscall.SyscallN(procGetConsoleMode.Addr(), uintptr(console), uintptr(unsafe.Pointer(mode)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2240,7 +2287,7 @@ func GetConsoleMode(console Handle, mode *uint32) (err error) {
}
func GetConsoleOutputCP() (cp uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetConsoleOutputCP.Addr(), 0, 0, 0, 0)
+ r0, _, e1 := syscall.SyscallN(procGetConsoleOutputCP.Addr())
cp = uint32(r0)
if cp == 0 {
err = errnoErr(e1)
@@ -2249,7 +2296,7 @@ func GetConsoleOutputCP() (cp uint32, err error) {
}
func GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) {
- r1, _, e1 := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(info)), 0)
+ r1, _, e1 := syscall.SyscallN(procGetConsoleScreenBufferInfo.Addr(), uintptr(console), uintptr(unsafe.Pointer(info)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2257,7 +2304,7 @@ func GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (
}
func GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetCurrentDirectoryW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0)
+ r0, _, e1 := syscall.SyscallN(procGetCurrentDirectoryW.Addr(), uintptr(buflen), uintptr(unsafe.Pointer(buf)))
n = uint32(r0)
if n == 0 {
err = errnoErr(e1)
@@ -2266,19 +2313,19 @@ func GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) {
}
func GetCurrentProcessId() (pid uint32) {
- r0, _, _ := syscall.Syscall(procGetCurrentProcessId.Addr(), 0, 0, 0, 0)
+ r0, _, _ := syscall.SyscallN(procGetCurrentProcessId.Addr())
pid = uint32(r0)
return
}
func GetCurrentThreadId() (id uint32) {
- r0, _, _ := syscall.Syscall(procGetCurrentThreadId.Addr(), 0, 0, 0, 0)
+ r0, _, _ := syscall.SyscallN(procGetCurrentThreadId.Addr())
id = uint32(r0)
return
}
func GetDiskFreeSpaceEx(directoryName *uint16, freeBytesAvailableToCaller *uint64, totalNumberOfBytes *uint64, totalNumberOfFreeBytes *uint64) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetDiskFreeSpaceExW.Addr(), 4, uintptr(unsafe.Pointer(directoryName)), uintptr(unsafe.Pointer(freeBytesAvailableToCaller)), uintptr(unsafe.Pointer(totalNumberOfBytes)), uintptr(unsafe.Pointer(totalNumberOfFreeBytes)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procGetDiskFreeSpaceExW.Addr(), uintptr(unsafe.Pointer(directoryName)), uintptr(unsafe.Pointer(freeBytesAvailableToCaller)), uintptr(unsafe.Pointer(totalNumberOfBytes)), uintptr(unsafe.Pointer(totalNumberOfFreeBytes)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2286,13 +2333,13 @@ func GetDiskFreeSpaceEx(directoryName *uint16, freeBytesAvailableToCaller *uint6
}
func GetDriveType(rootPathName *uint16) (driveType uint32) {
- r0, _, _ := syscall.Syscall(procGetDriveTypeW.Addr(), 1, uintptr(unsafe.Pointer(rootPathName)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procGetDriveTypeW.Addr(), uintptr(unsafe.Pointer(rootPathName)))
driveType = uint32(r0)
return
}
func GetEnvironmentStrings() (envs *uint16, err error) {
- r0, _, e1 := syscall.Syscall(procGetEnvironmentStringsW.Addr(), 0, 0, 0, 0)
+ r0, _, e1 := syscall.SyscallN(procGetEnvironmentStringsW.Addr())
envs = (*uint16)(unsafe.Pointer(r0))
if envs == nil {
err = errnoErr(e1)
@@ -2301,7 +2348,7 @@ func GetEnvironmentStrings() (envs *uint16, err error) {
}
func GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetEnvironmentVariableW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buffer)), uintptr(size))
+ r0, _, e1 := syscall.SyscallN(procGetEnvironmentVariableW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buffer)), uintptr(size))
n = uint32(r0)
if n == 0 {
err = errnoErr(e1)
@@ -2310,7 +2357,7 @@ func GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32
}
func GetExitCodeProcess(handle Handle, exitcode *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetExitCodeProcess.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(exitcode)), 0)
+ r1, _, e1 := syscall.SyscallN(procGetExitCodeProcess.Addr(), uintptr(handle), uintptr(unsafe.Pointer(exitcode)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2318,7 +2365,7 @@ func GetExitCodeProcess(handle Handle, exitcode *uint32) (err error) {
}
func GetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) {
- r1, _, e1 := syscall.Syscall(procGetFileAttributesExW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(level), uintptr(unsafe.Pointer(info)))
+ r1, _, e1 := syscall.SyscallN(procGetFileAttributesExW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(level), uintptr(unsafe.Pointer(info)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2326,7 +2373,7 @@ func GetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) {
}
func GetFileAttributes(name *uint16) (attrs uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetFileAttributesW.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procGetFileAttributesW.Addr(), uintptr(unsafe.Pointer(name)))
attrs = uint32(r0)
if attrs == INVALID_FILE_ATTRIBUTES {
err = errnoErr(e1)
@@ -2335,7 +2382,7 @@ func GetFileAttributes(name *uint16) (attrs uint32, err error) {
}
func GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (err error) {
- r1, _, e1 := syscall.Syscall(procGetFileInformationByHandle.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0)
+ r1, _, e1 := syscall.SyscallN(procGetFileInformationByHandle.Addr(), uintptr(handle), uintptr(unsafe.Pointer(data)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2343,7 +2390,7 @@ func GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (e
}
func GetFileInformationByHandleEx(handle Handle, class uint32, outBuffer *byte, outBufferLen uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetFileInformationByHandleEx.Addr(), 4, uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferLen), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procGetFileInformationByHandleEx.Addr(), uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferLen))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2351,7 +2398,7 @@ func GetFileInformationByHandleEx(handle Handle, class uint32, outBuffer *byte,
}
func GetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetFileTime.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procGetFileTime.Addr(), uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2359,7 +2406,7 @@ func GetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetim
}
func GetFileType(filehandle Handle) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetFileType.Addr(), 1, uintptr(filehandle), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procGetFileType.Addr(), uintptr(filehandle))
n = uint32(r0)
if n == 0 {
err = errnoErr(e1)
@@ -2368,7 +2415,7 @@ func GetFileType(filehandle Handle) (n uint32, err error) {
}
func GetFinalPathNameByHandle(file Handle, filePath *uint16, filePathSize uint32, flags uint32) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall6(procGetFinalPathNameByHandleW.Addr(), 4, uintptr(file), uintptr(unsafe.Pointer(filePath)), uintptr(filePathSize), uintptr(flags), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procGetFinalPathNameByHandleW.Addr(), uintptr(file), uintptr(unsafe.Pointer(filePath)), uintptr(filePathSize), uintptr(flags))
n = uint32(r0)
if n == 0 {
err = errnoErr(e1)
@@ -2377,7 +2424,7 @@ func GetFinalPathNameByHandle(file Handle, filePath *uint16, filePathSize uint32
}
func GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall6(procGetFullPathNameW.Addr(), 4, uintptr(unsafe.Pointer(path)), uintptr(buflen), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(fname)), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procGetFullPathNameW.Addr(), uintptr(unsafe.Pointer(path)), uintptr(buflen), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(fname)))
n = uint32(r0)
if n == 0 {
err = errnoErr(e1)
@@ -2386,13 +2433,13 @@ func GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (
}
func GetLargePageMinimum() (size uintptr) {
- r0, _, _ := syscall.Syscall(procGetLargePageMinimum.Addr(), 0, 0, 0, 0)
+ r0, _, _ := syscall.SyscallN(procGetLargePageMinimum.Addr())
size = uintptr(r0)
return
}
func GetLastError() (lasterr error) {
- r0, _, _ := syscall.Syscall(procGetLastError.Addr(), 0, 0, 0, 0)
+ r0, _, _ := syscall.SyscallN(procGetLastError.Addr())
if r0 != 0 {
lasterr = syscall.Errno(r0)
}
@@ -2400,7 +2447,7 @@ func GetLastError() (lasterr error) {
}
func GetLogicalDriveStrings(bufferLength uint32, buffer *uint16) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetLogicalDriveStringsW.Addr(), 2, uintptr(bufferLength), uintptr(unsafe.Pointer(buffer)), 0)
+ r0, _, e1 := syscall.SyscallN(procGetLogicalDriveStringsW.Addr(), uintptr(bufferLength), uintptr(unsafe.Pointer(buffer)))
n = uint32(r0)
if n == 0 {
err = errnoErr(e1)
@@ -2409,7 +2456,7 @@ func GetLogicalDriveStrings(bufferLength uint32, buffer *uint16) (n uint32, err
}
func GetLogicalDrives() (drivesBitMask uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetLogicalDrives.Addr(), 0, 0, 0, 0)
+ r0, _, e1 := syscall.SyscallN(procGetLogicalDrives.Addr())
drivesBitMask = uint32(r0)
if drivesBitMask == 0 {
err = errnoErr(e1)
@@ -2418,7 +2465,7 @@ func GetLogicalDrives() (drivesBitMask uint32, err error) {
}
func GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetLongPathNameW.Addr(), 3, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(buf)), uintptr(buflen))
+ r0, _, e1 := syscall.SyscallN(procGetLongPathNameW.Addr(), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(buf)), uintptr(buflen))
n = uint32(r0)
if n == 0 {
err = errnoErr(e1)
@@ -2427,13 +2474,13 @@ func GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err er
}
func GetMaximumProcessorCount(groupNumber uint16) (ret uint32) {
- r0, _, _ := syscall.Syscall(procGetMaximumProcessorCount.Addr(), 1, uintptr(groupNumber), 0, 0)
+ r0, _, _ := syscall.SyscallN(procGetMaximumProcessorCount.Addr(), uintptr(groupNumber))
ret = uint32(r0)
return
}
func GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetModuleFileNameW.Addr(), 3, uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size))
+ r0, _, e1 := syscall.SyscallN(procGetModuleFileNameW.Addr(), uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size))
n = uint32(r0)
if n == 0 {
err = errnoErr(e1)
@@ -2442,7 +2489,7 @@ func GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32,
}
func GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procGetModuleHandleExW.Addr(), 3, uintptr(flags), uintptr(unsafe.Pointer(moduleName)), uintptr(unsafe.Pointer(module)))
+ r1, _, e1 := syscall.SyscallN(procGetModuleHandleExW.Addr(), uintptr(flags), uintptr(unsafe.Pointer(moduleName)), uintptr(unsafe.Pointer(module)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2450,7 +2497,7 @@ func GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err er
}
func GetNamedPipeClientProcessId(pipe Handle, clientProcessID *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetNamedPipeClientProcessId.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(clientProcessID)), 0)
+ r1, _, e1 := syscall.SyscallN(procGetNamedPipeClientProcessId.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(clientProcessID)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2458,7 +2505,7 @@ func GetNamedPipeClientProcessId(pipe Handle, clientProcessID *uint32) (err erro
}
func GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) {
- r1, _, e1 := syscall.Syscall9(procGetNamedPipeHandleStateW.Addr(), 7, uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(curInstances)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), uintptr(unsafe.Pointer(userName)), uintptr(maxUserNameSize), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procGetNamedPipeHandleStateW.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(curInstances)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), uintptr(unsafe.Pointer(userName)), uintptr(maxUserNameSize))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2466,7 +2513,7 @@ func GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, m
}
func GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetNamedPipeInfo.Addr(), 5, uintptr(pipe), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(outSize)), uintptr(unsafe.Pointer(inSize)), uintptr(unsafe.Pointer(maxInstances)), 0)
+ r1, _, e1 := syscall.SyscallN(procGetNamedPipeInfo.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(outSize)), uintptr(unsafe.Pointer(inSize)), uintptr(unsafe.Pointer(maxInstances)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2474,7 +2521,15 @@ func GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint3
}
func GetNamedPipeServerProcessId(pipe Handle, serverProcessID *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetNamedPipeServerProcessId.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(serverProcessID)), 0)
+ r1, _, e1 := syscall.SyscallN(procGetNamedPipeServerProcessId.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(serverProcessID)))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func GetNumberOfConsoleInputEvents(console Handle, numevents *uint32) (err error) {
+ r1, _, e1 := syscall.SyscallN(procGetNumberOfConsoleInputEvents.Addr(), uintptr(console), uintptr(unsafe.Pointer(numevents)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2486,7 +2541,7 @@ func GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wa
if wait {
_p0 = 1
}
- r1, _, e1 := syscall.Syscall6(procGetOverlappedResult.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(done)), uintptr(_p0), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procGetOverlappedResult.Addr(), uintptr(handle), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(done)), uintptr(_p0))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2494,7 +2549,7 @@ func GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wa
}
func GetPriorityClass(process Handle) (ret uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetPriorityClass.Addr(), 1, uintptr(process), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procGetPriorityClass.Addr(), uintptr(process))
ret = uint32(r0)
if ret == 0 {
err = errnoErr(e1)
@@ -2512,7 +2567,7 @@ func GetProcAddress(module Handle, procname string) (proc uintptr, err error) {
}
func _GetProcAddress(module Handle, procname *byte) (proc uintptr, err error) {
- r0, _, e1 := syscall.Syscall(procGetProcAddress.Addr(), 2, uintptr(module), uintptr(unsafe.Pointer(procname)), 0)
+ r0, _, e1 := syscall.SyscallN(procGetProcAddress.Addr(), uintptr(module), uintptr(unsafe.Pointer(procname)))
proc = uintptr(r0)
if proc == 0 {
err = errnoErr(e1)
@@ -2521,7 +2576,7 @@ func _GetProcAddress(module Handle, procname *byte) (proc uintptr, err error) {
}
func GetProcessId(process Handle) (id uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetProcessId.Addr(), 1, uintptr(process), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procGetProcessId.Addr(), uintptr(process))
id = uint32(r0)
if id == 0 {
err = errnoErr(e1)
@@ -2530,7 +2585,7 @@ func GetProcessId(process Handle) (id uint32, err error) {
}
func getProcessPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetProcessPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procGetProcessPreferredUILanguages.Addr(), uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2538,7 +2593,7 @@ func getProcessPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uin
}
func GetProcessShutdownParameters(level *uint32, flags *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetProcessShutdownParameters.Addr(), 2, uintptr(unsafe.Pointer(level)), uintptr(unsafe.Pointer(flags)), 0)
+ r1, _, e1 := syscall.SyscallN(procGetProcessShutdownParameters.Addr(), uintptr(unsafe.Pointer(level)), uintptr(unsafe.Pointer(flags)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2546,7 +2601,7 @@ func GetProcessShutdownParameters(level *uint32, flags *uint32) (err error) {
}
func GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetProcessTimes.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(creationTime)), uintptr(unsafe.Pointer(exitTime)), uintptr(unsafe.Pointer(kernelTime)), uintptr(unsafe.Pointer(userTime)), 0)
+ r1, _, e1 := syscall.SyscallN(procGetProcessTimes.Addr(), uintptr(handle), uintptr(unsafe.Pointer(creationTime)), uintptr(unsafe.Pointer(exitTime)), uintptr(unsafe.Pointer(kernelTime)), uintptr(unsafe.Pointer(userTime)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2554,12 +2609,12 @@ func GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime,
}
func GetProcessWorkingSetSizeEx(hProcess Handle, lpMinimumWorkingSetSize *uintptr, lpMaximumWorkingSetSize *uintptr, flags *uint32) {
- syscall.Syscall6(procGetProcessWorkingSetSizeEx.Addr(), 4, uintptr(hProcess), uintptr(unsafe.Pointer(lpMinimumWorkingSetSize)), uintptr(unsafe.Pointer(lpMaximumWorkingSetSize)), uintptr(unsafe.Pointer(flags)), 0, 0)
+ syscall.SyscallN(procGetProcessWorkingSetSizeEx.Addr(), uintptr(hProcess), uintptr(unsafe.Pointer(lpMinimumWorkingSetSize)), uintptr(unsafe.Pointer(lpMaximumWorkingSetSize)), uintptr(unsafe.Pointer(flags)))
return
}
func GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uintptr, overlapped **Overlapped, timeout uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetQueuedCompletionStatus.Addr(), 5, uintptr(cphandle), uintptr(unsafe.Pointer(qty)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(overlapped)), uintptr(timeout), 0)
+ r1, _, e1 := syscall.SyscallN(procGetQueuedCompletionStatus.Addr(), uintptr(cphandle), uintptr(unsafe.Pointer(qty)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(overlapped)), uintptr(timeout))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2567,7 +2622,7 @@ func GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uintptr, overl
}
func GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetShortPathNameW.Addr(), 3, uintptr(unsafe.Pointer(longpath)), uintptr(unsafe.Pointer(shortpath)), uintptr(buflen))
+ r0, _, e1 := syscall.SyscallN(procGetShortPathNameW.Addr(), uintptr(unsafe.Pointer(longpath)), uintptr(unsafe.Pointer(shortpath)), uintptr(buflen))
n = uint32(r0)
if n == 0 {
err = errnoErr(e1)
@@ -2576,12 +2631,12 @@ func GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uin
}
func getStartupInfo(startupInfo *StartupInfo) {
- syscall.Syscall(procGetStartupInfoW.Addr(), 1, uintptr(unsafe.Pointer(startupInfo)), 0, 0)
+ syscall.SyscallN(procGetStartupInfoW.Addr(), uintptr(unsafe.Pointer(startupInfo)))
return
}
func GetStdHandle(stdhandle uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procGetStdHandle.Addr(), 1, uintptr(stdhandle), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procGetStdHandle.Addr(), uintptr(stdhandle))
handle = Handle(r0)
if handle == InvalidHandle {
err = errnoErr(e1)
@@ -2590,7 +2645,7 @@ func GetStdHandle(stdhandle uint32) (handle Handle, err error) {
}
func getSystemDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetSystemDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0)
+ r0, _, e1 := syscall.SyscallN(procGetSystemDirectoryW.Addr(), uintptr(unsafe.Pointer(dir)), uintptr(dirLen))
len = uint32(r0)
if len == 0 {
err = errnoErr(e1)
@@ -2599,7 +2654,7 @@ func getSystemDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
}
func getSystemPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetSystemPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procGetSystemPreferredUILanguages.Addr(), uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2607,17 +2662,17 @@ func getSystemPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint
}
func GetSystemTimeAsFileTime(time *Filetime) {
- syscall.Syscall(procGetSystemTimeAsFileTime.Addr(), 1, uintptr(unsafe.Pointer(time)), 0, 0)
+ syscall.SyscallN(procGetSystemTimeAsFileTime.Addr(), uintptr(unsafe.Pointer(time)))
return
}
func GetSystemTimePreciseAsFileTime(time *Filetime) {
- syscall.Syscall(procGetSystemTimePreciseAsFileTime.Addr(), 1, uintptr(unsafe.Pointer(time)), 0, 0)
+ syscall.SyscallN(procGetSystemTimePreciseAsFileTime.Addr(), uintptr(unsafe.Pointer(time)))
return
}
func getSystemWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetSystemWindowsDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0)
+ r0, _, e1 := syscall.SyscallN(procGetSystemWindowsDirectoryW.Addr(), uintptr(unsafe.Pointer(dir)), uintptr(dirLen))
len = uint32(r0)
if len == 0 {
err = errnoErr(e1)
@@ -2626,7 +2681,7 @@ func getSystemWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err erro
}
func GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetTempPathW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0)
+ r0, _, e1 := syscall.SyscallN(procGetTempPathW.Addr(), uintptr(buflen), uintptr(unsafe.Pointer(buf)))
n = uint32(r0)
if n == 0 {
err = errnoErr(e1)
@@ -2635,7 +2690,7 @@ func GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) {
}
func getThreadPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetThreadPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procGetThreadPreferredUILanguages.Addr(), uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2643,13 +2698,13 @@ func getThreadPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint
}
func getTickCount64() (ms uint64) {
- r0, _, _ := syscall.Syscall(procGetTickCount64.Addr(), 0, 0, 0, 0)
+ r0, _, _ := syscall.SyscallN(procGetTickCount64.Addr())
ms = uint64(r0)
return
}
func GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetTimeZoneInformation.Addr(), 1, uintptr(unsafe.Pointer(tzi)), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procGetTimeZoneInformation.Addr(), uintptr(unsafe.Pointer(tzi)))
rc = uint32(r0)
if rc == 0xffffffff {
err = errnoErr(e1)
@@ -2658,7 +2713,7 @@ func GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) {
}
func getUserPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetUserPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procGetUserPreferredUILanguages.Addr(), uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2666,7 +2721,7 @@ func getUserPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16
}
func GetVersion() (ver uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetVersion.Addr(), 0, 0, 0, 0)
+ r0, _, e1 := syscall.SyscallN(procGetVersion.Addr())
ver = uint32(r0)
if ver == 0 {
err = errnoErr(e1)
@@ -2675,7 +2730,7 @@ func GetVersion() (ver uint32, err error) {
}
func GetVolumeInformationByHandle(file Handle, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) {
- r1, _, e1 := syscall.Syscall9(procGetVolumeInformationByHandleW.Addr(), 8, uintptr(file), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize), 0)
+ r1, _, e1 := syscall.SyscallN(procGetVolumeInformationByHandleW.Addr(), uintptr(file), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2683,7 +2738,7 @@ func GetVolumeInformationByHandle(file Handle, volumeNameBuffer *uint16, volumeN
}
func GetVolumeInformation(rootPathName *uint16, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) {
- r1, _, e1 := syscall.Syscall9(procGetVolumeInformationW.Addr(), 8, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize), 0)
+ r1, _, e1 := syscall.SyscallN(procGetVolumeInformationW.Addr(), uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2691,7 +2746,7 @@ func GetVolumeInformation(rootPathName *uint16, volumeNameBuffer *uint16, volume
}
func GetVolumeNameForVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16, bufferlength uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetVolumeNameForVolumeMountPointW.Addr(), 3, uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferlength))
+ r1, _, e1 := syscall.SyscallN(procGetVolumeNameForVolumeMountPointW.Addr(), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferlength))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2699,7 +2754,7 @@ func GetVolumeNameForVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint
}
func GetVolumePathName(fileName *uint16, volumePathName *uint16, bufferLength uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetVolumePathNameW.Addr(), 3, uintptr(unsafe.Pointer(fileName)), uintptr(unsafe.Pointer(volumePathName)), uintptr(bufferLength))
+ r1, _, e1 := syscall.SyscallN(procGetVolumePathNameW.Addr(), uintptr(unsafe.Pointer(fileName)), uintptr(unsafe.Pointer(volumePathName)), uintptr(bufferLength))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2707,7 +2762,7 @@ func GetVolumePathName(fileName *uint16, volumePathName *uint16, bufferLength ui
}
func GetVolumePathNamesForVolumeName(volumeName *uint16, volumePathNames *uint16, bufferLength uint32, returnLength *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetVolumePathNamesForVolumeNameW.Addr(), 4, uintptr(unsafe.Pointer(volumeName)), uintptr(unsafe.Pointer(volumePathNames)), uintptr(bufferLength), uintptr(unsafe.Pointer(returnLength)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procGetVolumePathNamesForVolumeNameW.Addr(), uintptr(unsafe.Pointer(volumeName)), uintptr(unsafe.Pointer(volumePathNames)), uintptr(bufferLength), uintptr(unsafe.Pointer(returnLength)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2715,7 +2770,7 @@ func GetVolumePathNamesForVolumeName(volumeName *uint16, volumePathNames *uint16
}
func getWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetWindowsDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0)
+ r0, _, e1 := syscall.SyscallN(procGetWindowsDirectoryW.Addr(), uintptr(unsafe.Pointer(dir)), uintptr(dirLen))
len = uint32(r0)
if len == 0 {
err = errnoErr(e1)
@@ -2724,7 +2779,7 @@ func getWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
}
func initializeProcThreadAttributeList(attrlist *ProcThreadAttributeList, attrcount uint32, flags uint32, size *uintptr) (err error) {
- r1, _, e1 := syscall.Syscall6(procInitializeProcThreadAttributeList.Addr(), 4, uintptr(unsafe.Pointer(attrlist)), uintptr(attrcount), uintptr(flags), uintptr(unsafe.Pointer(size)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procInitializeProcThreadAttributeList.Addr(), uintptr(unsafe.Pointer(attrlist)), uintptr(attrcount), uintptr(flags), uintptr(unsafe.Pointer(size)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2736,7 +2791,7 @@ func IsWow64Process(handle Handle, isWow64 *bool) (err error) {
if *isWow64 {
_p0 = 1
}
- r1, _, e1 := syscall.Syscall(procIsWow64Process.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(&_p0)), 0)
+ r1, _, e1 := syscall.SyscallN(procIsWow64Process.Addr(), uintptr(handle), uintptr(unsafe.Pointer(&_p0)))
*isWow64 = _p0 != 0
if r1 == 0 {
err = errnoErr(e1)
@@ -2749,7 +2804,7 @@ func IsWow64Process2(handle Handle, processMachine *uint16, nativeMachine *uint1
if err != nil {
return
}
- r1, _, e1 := syscall.Syscall(procIsWow64Process2.Addr(), 3, uintptr(handle), uintptr(unsafe.Pointer(processMachine)), uintptr(unsafe.Pointer(nativeMachine)))
+ r1, _, e1 := syscall.SyscallN(procIsWow64Process2.Addr(), uintptr(handle), uintptr(unsafe.Pointer(processMachine)), uintptr(unsafe.Pointer(nativeMachine)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2766,7 +2821,7 @@ func LoadLibraryEx(libname string, zero Handle, flags uintptr) (handle Handle, e
}
func _LoadLibraryEx(libname *uint16, zero Handle, flags uintptr) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procLoadLibraryExW.Addr(), 3, uintptr(unsafe.Pointer(libname)), uintptr(zero), uintptr(flags))
+ r0, _, e1 := syscall.SyscallN(procLoadLibraryExW.Addr(), uintptr(unsafe.Pointer(libname)), uintptr(zero), uintptr(flags))
handle = Handle(r0)
if handle == 0 {
err = errnoErr(e1)
@@ -2784,7 +2839,7 @@ func LoadLibrary(libname string) (handle Handle, err error) {
}
func _LoadLibrary(libname *uint16) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procLoadLibraryW.Addr(), 1, uintptr(unsafe.Pointer(libname)), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procLoadLibraryW.Addr(), uintptr(unsafe.Pointer(libname)))
handle = Handle(r0)
if handle == 0 {
err = errnoErr(e1)
@@ -2793,7 +2848,7 @@ func _LoadLibrary(libname *uint16) (handle Handle, err error) {
}
func LoadResource(module Handle, resInfo Handle) (resData Handle, err error) {
- r0, _, e1 := syscall.Syscall(procLoadResource.Addr(), 2, uintptr(module), uintptr(resInfo), 0)
+ r0, _, e1 := syscall.SyscallN(procLoadResource.Addr(), uintptr(module), uintptr(resInfo))
resData = Handle(r0)
if resData == 0 {
err = errnoErr(e1)
@@ -2802,7 +2857,7 @@ func LoadResource(module Handle, resInfo Handle) (resData Handle, err error) {
}
func LocalAlloc(flags uint32, length uint32) (ptr uintptr, err error) {
- r0, _, e1 := syscall.Syscall(procLocalAlloc.Addr(), 2, uintptr(flags), uintptr(length), 0)
+ r0, _, e1 := syscall.SyscallN(procLocalAlloc.Addr(), uintptr(flags), uintptr(length))
ptr = uintptr(r0)
if ptr == 0 {
err = errnoErr(e1)
@@ -2811,7 +2866,7 @@ func LocalAlloc(flags uint32, length uint32) (ptr uintptr, err error) {
}
func LocalFree(hmem Handle) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procLocalFree.Addr(), 1, uintptr(hmem), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procLocalFree.Addr(), uintptr(hmem))
handle = Handle(r0)
if handle != 0 {
err = errnoErr(e1)
@@ -2820,7 +2875,7 @@ func LocalFree(hmem Handle) (handle Handle, err error) {
}
func LockFileEx(file Handle, flags uint32, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) {
- r1, _, e1 := syscall.Syscall6(procLockFileEx.Addr(), 6, uintptr(file), uintptr(flags), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped)))
+ r1, _, e1 := syscall.SyscallN(procLockFileEx.Addr(), uintptr(file), uintptr(flags), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2828,7 +2883,7 @@ func LockFileEx(file Handle, flags uint32, reserved uint32, bytesLow uint32, byt
}
func LockResource(resData Handle) (addr uintptr, err error) {
- r0, _, e1 := syscall.Syscall(procLockResource.Addr(), 1, uintptr(resData), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procLockResource.Addr(), uintptr(resData))
addr = uintptr(r0)
if addr == 0 {
err = errnoErr(e1)
@@ -2837,7 +2892,7 @@ func LockResource(resData Handle) (addr uintptr, err error) {
}
func MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error) {
- r0, _, e1 := syscall.Syscall6(procMapViewOfFile.Addr(), 5, uintptr(handle), uintptr(access), uintptr(offsetHigh), uintptr(offsetLow), uintptr(length), 0)
+ r0, _, e1 := syscall.SyscallN(procMapViewOfFile.Addr(), uintptr(handle), uintptr(access), uintptr(offsetHigh), uintptr(offsetLow), uintptr(length))
addr = uintptr(r0)
if addr == 0 {
err = errnoErr(e1)
@@ -2846,7 +2901,7 @@ func MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow ui
}
func Module32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) {
- r1, _, e1 := syscall.Syscall(procModule32FirstW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry)), 0)
+ r1, _, e1 := syscall.SyscallN(procModule32FirstW.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2854,7 +2909,7 @@ func Module32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) {
}
func Module32Next(snapshot Handle, moduleEntry *ModuleEntry32) (err error) {
- r1, _, e1 := syscall.Syscall(procModule32NextW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry)), 0)
+ r1, _, e1 := syscall.SyscallN(procModule32NextW.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2862,7 +2917,7 @@ func Module32Next(snapshot Handle, moduleEntry *ModuleEntry32) (err error) {
}
func MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procMoveFileExW.Addr(), 3, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), uintptr(flags))
+ r1, _, e1 := syscall.SyscallN(procMoveFileExW.Addr(), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), uintptr(flags))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2870,7 +2925,7 @@ func MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) {
}
func MoveFile(from *uint16, to *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procMoveFileW.Addr(), 2, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), 0)
+ r1, _, e1 := syscall.SyscallN(procMoveFileW.Addr(), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2878,7 +2933,7 @@ func MoveFile(from *uint16, to *uint16) (err error) {
}
func MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) {
- r0, _, e1 := syscall.Syscall6(procMultiByteToWideChar.Addr(), 6, uintptr(codePage), uintptr(dwFlags), uintptr(unsafe.Pointer(str)), uintptr(nstr), uintptr(unsafe.Pointer(wchar)), uintptr(nwchar))
+ r0, _, e1 := syscall.SyscallN(procMultiByteToWideChar.Addr(), uintptr(codePage), uintptr(dwFlags), uintptr(unsafe.Pointer(str)), uintptr(nstr), uintptr(unsafe.Pointer(wchar)), uintptr(nwchar))
nwrite = int32(r0)
if nwrite == 0 {
err = errnoErr(e1)
@@ -2891,7 +2946,7 @@ func OpenEvent(desiredAccess uint32, inheritHandle bool, name *uint16) (handle H
if inheritHandle {
_p0 = 1
}
- r0, _, e1 := syscall.Syscall(procOpenEventW.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name)))
+ r0, _, e1 := syscall.SyscallN(procOpenEventW.Addr(), uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name)))
handle = Handle(r0)
if handle == 0 {
err = errnoErr(e1)
@@ -2904,7 +2959,7 @@ func OpenMutex(desiredAccess uint32, inheritHandle bool, name *uint16) (handle H
if inheritHandle {
_p0 = 1
}
- r0, _, e1 := syscall.Syscall(procOpenMutexW.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name)))
+ r0, _, e1 := syscall.SyscallN(procOpenMutexW.Addr(), uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name)))
handle = Handle(r0)
if handle == 0 {
err = errnoErr(e1)
@@ -2917,7 +2972,7 @@ func OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (ha
if inheritHandle {
_p0 = 1
}
- r0, _, e1 := syscall.Syscall(procOpenProcess.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(processId))
+ r0, _, e1 := syscall.SyscallN(procOpenProcess.Addr(), uintptr(desiredAccess), uintptr(_p0), uintptr(processId))
handle = Handle(r0)
if handle == 0 {
err = errnoErr(e1)
@@ -2930,7 +2985,7 @@ func OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (hand
if inheritHandle {
_p0 = 1
}
- r0, _, e1 := syscall.Syscall(procOpenThread.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(threadId))
+ r0, _, e1 := syscall.SyscallN(procOpenThread.Addr(), uintptr(desiredAccess), uintptr(_p0), uintptr(threadId))
handle = Handle(r0)
if handle == 0 {
err = errnoErr(e1)
@@ -2939,7 +2994,7 @@ func OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (hand
}
func PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uintptr, overlapped *Overlapped) (err error) {
- r1, _, e1 := syscall.Syscall6(procPostQueuedCompletionStatus.Addr(), 4, uintptr(cphandle), uintptr(qty), uintptr(key), uintptr(unsafe.Pointer(overlapped)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procPostQueuedCompletionStatus.Addr(), uintptr(cphandle), uintptr(qty), uintptr(key), uintptr(unsafe.Pointer(overlapped)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2947,7 +3002,7 @@ func PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uintptr, overla
}
func Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) {
- r1, _, e1 := syscall.Syscall(procProcess32FirstW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)), 0)
+ r1, _, e1 := syscall.SyscallN(procProcess32FirstW.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2955,7 +3010,7 @@ func Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) {
}
func Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) {
- r1, _, e1 := syscall.Syscall(procProcess32NextW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)), 0)
+ r1, _, e1 := syscall.SyscallN(procProcess32NextW.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2963,7 +3018,7 @@ func Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) {
}
func ProcessIdToSessionId(pid uint32, sessionid *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procProcessIdToSessionId.Addr(), 2, uintptr(pid), uintptr(unsafe.Pointer(sessionid)), 0)
+ r1, _, e1 := syscall.SyscallN(procProcessIdToSessionId.Addr(), uintptr(pid), uintptr(unsafe.Pointer(sessionid)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2971,7 +3026,7 @@ func ProcessIdToSessionId(pid uint32, sessionid *uint32) (err error) {
}
func PulseEvent(event Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procPulseEvent.Addr(), 1, uintptr(event), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procPulseEvent.Addr(), uintptr(event))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2979,7 +3034,7 @@ func PulseEvent(event Handle) (err error) {
}
func PurgeComm(handle Handle, dwFlags uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procPurgeComm.Addr(), 2, uintptr(handle), uintptr(dwFlags), 0)
+ r1, _, e1 := syscall.SyscallN(procPurgeComm.Addr(), uintptr(handle), uintptr(dwFlags))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -2987,7 +3042,7 @@ func PurgeComm(handle Handle, dwFlags uint32) (err error) {
}
func QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procQueryDosDeviceW.Addr(), 3, uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)), uintptr(max))
+ r0, _, e1 := syscall.SyscallN(procQueryDosDeviceW.Addr(), uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)), uintptr(max))
n = uint32(r0)
if n == 0 {
err = errnoErr(e1)
@@ -2996,7 +3051,7 @@ func QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint3
}
func QueryFullProcessImageName(proc Handle, flags uint32, exeName *uint16, size *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procQueryFullProcessImageNameW.Addr(), 4, uintptr(proc), uintptr(flags), uintptr(unsafe.Pointer(exeName)), uintptr(unsafe.Pointer(size)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procQueryFullProcessImageNameW.Addr(), uintptr(proc), uintptr(flags), uintptr(unsafe.Pointer(exeName)), uintptr(unsafe.Pointer(size)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3004,7 +3059,7 @@ func QueryFullProcessImageName(proc Handle, flags uint32, exeName *uint16, size
}
func QueryInformationJobObject(job Handle, JobObjectInformationClass int32, JobObjectInformation uintptr, JobObjectInformationLength uint32, retlen *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procQueryInformationJobObject.Addr(), 5, uintptr(job), uintptr(JobObjectInformationClass), uintptr(JobObjectInformation), uintptr(JobObjectInformationLength), uintptr(unsafe.Pointer(retlen)), 0)
+ r1, _, e1 := syscall.SyscallN(procQueryInformationJobObject.Addr(), uintptr(job), uintptr(JobObjectInformationClass), uintptr(JobObjectInformation), uintptr(JobObjectInformationLength), uintptr(unsafe.Pointer(retlen)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3012,7 +3067,7 @@ func QueryInformationJobObject(job Handle, JobObjectInformationClass int32, JobO
}
func ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) {
- r1, _, e1 := syscall.Syscall6(procReadConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(toread), uintptr(unsafe.Pointer(read)), uintptr(unsafe.Pointer(inputControl)), 0)
+ r1, _, e1 := syscall.SyscallN(procReadConsoleW.Addr(), uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(toread), uintptr(unsafe.Pointer(read)), uintptr(unsafe.Pointer(inputControl)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3024,7 +3079,7 @@ func ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree
if watchSubTree {
_p0 = 1
}
- r1, _, e1 := syscall.Syscall9(procReadDirectoryChangesW.Addr(), 8, uintptr(handle), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(_p0), uintptr(mask), uintptr(unsafe.Pointer(retlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine), 0)
+ r1, _, e1 := syscall.SyscallN(procReadDirectoryChangesW.Addr(), uintptr(handle), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(_p0), uintptr(mask), uintptr(unsafe.Pointer(retlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3036,7 +3091,7 @@ func readFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (
if len(buf) > 0 {
_p0 = &buf[0]
}
- r1, _, e1 := syscall.Syscall6(procReadFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0)
+ r1, _, e1 := syscall.SyscallN(procReadFile.Addr(), uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3044,7 +3099,7 @@ func readFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (
}
func ReadProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesRead *uintptr) (err error) {
- r1, _, e1 := syscall.Syscall6(procReadProcessMemory.Addr(), 5, uintptr(process), uintptr(baseAddress), uintptr(unsafe.Pointer(buffer)), uintptr(size), uintptr(unsafe.Pointer(numberOfBytesRead)), 0)
+ r1, _, e1 := syscall.SyscallN(procReadProcessMemory.Addr(), uintptr(process), uintptr(baseAddress), uintptr(unsafe.Pointer(buffer)), uintptr(size), uintptr(unsafe.Pointer(numberOfBytesRead)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3052,7 +3107,7 @@ func ReadProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size u
}
func ReleaseMutex(mutex Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procReleaseMutex.Addr(), 1, uintptr(mutex), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procReleaseMutex.Addr(), uintptr(mutex))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3060,7 +3115,7 @@ func ReleaseMutex(mutex Handle) (err error) {
}
func RemoveDirectory(path *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procRemoveDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procRemoveDirectoryW.Addr(), uintptr(unsafe.Pointer(path)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3068,7 +3123,7 @@ func RemoveDirectory(path *uint16) (err error) {
}
func RemoveDllDirectory(cookie uintptr) (err error) {
- r1, _, e1 := syscall.Syscall(procRemoveDllDirectory.Addr(), 1, uintptr(cookie), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procRemoveDllDirectory.Addr(), uintptr(cookie))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3076,7 +3131,7 @@ func RemoveDllDirectory(cookie uintptr) (err error) {
}
func ResetEvent(event Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procResetEvent.Addr(), 1, uintptr(event), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procResetEvent.Addr(), uintptr(event))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3084,7 +3139,7 @@ func ResetEvent(event Handle) (err error) {
}
func resizePseudoConsole(pconsole Handle, size uint32) (hr error) {
- r0, _, _ := syscall.Syscall(procResizePseudoConsole.Addr(), 2, uintptr(pconsole), uintptr(size), 0)
+ r0, _, _ := syscall.SyscallN(procResizePseudoConsole.Addr(), uintptr(pconsole), uintptr(size))
if r0 != 0 {
hr = syscall.Errno(r0)
}
@@ -3092,7 +3147,7 @@ func resizePseudoConsole(pconsole Handle, size uint32) (hr error) {
}
func ResumeThread(thread Handle) (ret uint32, err error) {
- r0, _, e1 := syscall.Syscall(procResumeThread.Addr(), 1, uintptr(thread), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procResumeThread.Addr(), uintptr(thread))
ret = uint32(r0)
if ret == 0xffffffff {
err = errnoErr(e1)
@@ -3101,7 +3156,7 @@ func ResumeThread(thread Handle) (ret uint32, err error) {
}
func SetCommBreak(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procSetCommBreak.Addr(), 1, uintptr(handle), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procSetCommBreak.Addr(), uintptr(handle))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3109,7 +3164,7 @@ func SetCommBreak(handle Handle) (err error) {
}
func SetCommMask(handle Handle, dwEvtMask uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procSetCommMask.Addr(), 2, uintptr(handle), uintptr(dwEvtMask), 0)
+ r1, _, e1 := syscall.SyscallN(procSetCommMask.Addr(), uintptr(handle), uintptr(dwEvtMask))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3117,7 +3172,7 @@ func SetCommMask(handle Handle, dwEvtMask uint32) (err error) {
}
func SetCommState(handle Handle, lpDCB *DCB) (err error) {
- r1, _, e1 := syscall.Syscall(procSetCommState.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(lpDCB)), 0)
+ r1, _, e1 := syscall.SyscallN(procSetCommState.Addr(), uintptr(handle), uintptr(unsafe.Pointer(lpDCB)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3125,7 +3180,7 @@ func SetCommState(handle Handle, lpDCB *DCB) (err error) {
}
func SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) {
- r1, _, e1 := syscall.Syscall(procSetCommTimeouts.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(timeouts)), 0)
+ r1, _, e1 := syscall.SyscallN(procSetCommTimeouts.Addr(), uintptr(handle), uintptr(unsafe.Pointer(timeouts)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3133,7 +3188,7 @@ func SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) {
}
func SetConsoleCP(cp uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procSetConsoleCP.Addr(), 1, uintptr(cp), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procSetConsoleCP.Addr(), uintptr(cp))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3141,7 +3196,7 @@ func SetConsoleCP(cp uint32) (err error) {
}
func setConsoleCursorPosition(console Handle, position uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procSetConsoleCursorPosition.Addr(), 2, uintptr(console), uintptr(position), 0)
+ r1, _, e1 := syscall.SyscallN(procSetConsoleCursorPosition.Addr(), uintptr(console), uintptr(position))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3149,7 +3204,7 @@ func setConsoleCursorPosition(console Handle, position uint32) (err error) {
}
func SetConsoleMode(console Handle, mode uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(console), uintptr(mode), 0)
+ r1, _, e1 := syscall.SyscallN(procSetConsoleMode.Addr(), uintptr(console), uintptr(mode))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3157,7 +3212,7 @@ func SetConsoleMode(console Handle, mode uint32) (err error) {
}
func SetConsoleOutputCP(cp uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procSetConsoleOutputCP.Addr(), 1, uintptr(cp), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procSetConsoleOutputCP.Addr(), uintptr(cp))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3165,7 +3220,7 @@ func SetConsoleOutputCP(cp uint32) (err error) {
}
func SetCurrentDirectory(path *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procSetCurrentDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procSetCurrentDirectoryW.Addr(), uintptr(unsafe.Pointer(path)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3173,7 +3228,7 @@ func SetCurrentDirectory(path *uint16) (err error) {
}
func SetDefaultDllDirectories(directoryFlags uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procSetDefaultDllDirectories.Addr(), 1, uintptr(directoryFlags), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procSetDefaultDllDirectories.Addr(), uintptr(directoryFlags))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3190,7 +3245,7 @@ func SetDllDirectory(path string) (err error) {
}
func _SetDllDirectory(path *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procSetDllDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procSetDllDirectoryW.Addr(), uintptr(unsafe.Pointer(path)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3198,7 +3253,7 @@ func _SetDllDirectory(path *uint16) (err error) {
}
func SetEndOfFile(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procSetEndOfFile.Addr(), 1, uintptr(handle), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procSetEndOfFile.Addr(), uintptr(handle))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3206,7 +3261,7 @@ func SetEndOfFile(handle Handle) (err error) {
}
func SetEnvironmentVariable(name *uint16, value *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procSetEnvironmentVariableW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), 0)
+ r1, _, e1 := syscall.SyscallN(procSetEnvironmentVariableW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3214,13 +3269,13 @@ func SetEnvironmentVariable(name *uint16, value *uint16) (err error) {
}
func SetErrorMode(mode uint32) (ret uint32) {
- r0, _, _ := syscall.Syscall(procSetErrorMode.Addr(), 1, uintptr(mode), 0, 0)
+ r0, _, _ := syscall.SyscallN(procSetErrorMode.Addr(), uintptr(mode))
ret = uint32(r0)
return
}
func SetEvent(event Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procSetEvent.Addr(), 1, uintptr(event), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procSetEvent.Addr(), uintptr(event))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3228,7 +3283,7 @@ func SetEvent(event Handle) (err error) {
}
func SetFileAttributes(name *uint16, attrs uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procSetFileAttributesW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(attrs), 0)
+ r1, _, e1 := syscall.SyscallN(procSetFileAttributesW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(attrs))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3236,7 +3291,7 @@ func SetFileAttributes(name *uint16, attrs uint32) (err error) {
}
func SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) {
- r1, _, e1 := syscall.Syscall(procSetFileCompletionNotificationModes.Addr(), 2, uintptr(handle), uintptr(flags), 0)
+ r1, _, e1 := syscall.SyscallN(procSetFileCompletionNotificationModes.Addr(), uintptr(handle), uintptr(flags))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3244,7 +3299,7 @@ func SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error)
}
func SetFileInformationByHandle(handle Handle, class uint32, inBuffer *byte, inBufferLen uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procSetFileInformationByHandle.Addr(), 4, uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procSetFileInformationByHandle.Addr(), uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3252,7 +3307,7 @@ func SetFileInformationByHandle(handle Handle, class uint32, inBuffer *byte, inB
}
func SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) {
- r0, _, e1 := syscall.Syscall6(procSetFilePointer.Addr(), 4, uintptr(handle), uintptr(lowoffset), uintptr(unsafe.Pointer(highoffsetptr)), uintptr(whence), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procSetFilePointer.Addr(), uintptr(handle), uintptr(lowoffset), uintptr(unsafe.Pointer(highoffsetptr)), uintptr(whence))
newlowoffset = uint32(r0)
if newlowoffset == 0xffffffff {
err = errnoErr(e1)
@@ -3261,7 +3316,7 @@ func SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence
}
func SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) {
- r1, _, e1 := syscall.Syscall6(procSetFileTime.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procSetFileTime.Addr(), uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3269,7 +3324,7 @@ func SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetim
}
func SetFileValidData(handle Handle, validDataLength int64) (err error) {
- r1, _, e1 := syscall.Syscall(procSetFileValidData.Addr(), 2, uintptr(handle), uintptr(validDataLength), 0)
+ r1, _, e1 := syscall.SyscallN(procSetFileValidData.Addr(), uintptr(handle), uintptr(validDataLength))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3277,7 +3332,7 @@ func SetFileValidData(handle Handle, validDataLength int64) (err error) {
}
func SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procSetHandleInformation.Addr(), 3, uintptr(handle), uintptr(mask), uintptr(flags))
+ r1, _, e1 := syscall.SyscallN(procSetHandleInformation.Addr(), uintptr(handle), uintptr(mask), uintptr(flags))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3285,7 +3340,7 @@ func SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error)
}
func SetInformationJobObject(job Handle, JobObjectInformationClass uint32, JobObjectInformation uintptr, JobObjectInformationLength uint32) (ret int, err error) {
- r0, _, e1 := syscall.Syscall6(procSetInformationJobObject.Addr(), 4, uintptr(job), uintptr(JobObjectInformationClass), uintptr(JobObjectInformation), uintptr(JobObjectInformationLength), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procSetInformationJobObject.Addr(), uintptr(job), uintptr(JobObjectInformationClass), uintptr(JobObjectInformation), uintptr(JobObjectInformationLength))
ret = int(r0)
if ret == 0 {
err = errnoErr(e1)
@@ -3294,7 +3349,7 @@ func SetInformationJobObject(job Handle, JobObjectInformationClass uint32, JobOb
}
func SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procSetNamedPipeHandleState.Addr(), 4, uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procSetNamedPipeHandleState.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3302,7 +3357,7 @@ func SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uin
}
func SetPriorityClass(process Handle, priorityClass uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procSetPriorityClass.Addr(), 2, uintptr(process), uintptr(priorityClass), 0)
+ r1, _, e1 := syscall.SyscallN(procSetPriorityClass.Addr(), uintptr(process), uintptr(priorityClass))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3314,7 +3369,7 @@ func SetProcessPriorityBoost(process Handle, disable bool) (err error) {
if disable {
_p0 = 1
}
- r1, _, e1 := syscall.Syscall(procSetProcessPriorityBoost.Addr(), 2, uintptr(process), uintptr(_p0), 0)
+ r1, _, e1 := syscall.SyscallN(procSetProcessPriorityBoost.Addr(), uintptr(process), uintptr(_p0))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3322,7 +3377,7 @@ func SetProcessPriorityBoost(process Handle, disable bool) (err error) {
}
func SetProcessShutdownParameters(level uint32, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procSetProcessShutdownParameters.Addr(), 2, uintptr(level), uintptr(flags), 0)
+ r1, _, e1 := syscall.SyscallN(procSetProcessShutdownParameters.Addr(), uintptr(level), uintptr(flags))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3330,7 +3385,7 @@ func SetProcessShutdownParameters(level uint32, flags uint32) (err error) {
}
func SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr, dwMaximumWorkingSetSize uintptr, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procSetProcessWorkingSetSizeEx.Addr(), 4, uintptr(hProcess), uintptr(dwMinimumWorkingSetSize), uintptr(dwMaximumWorkingSetSize), uintptr(flags), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procSetProcessWorkingSetSizeEx.Addr(), uintptr(hProcess), uintptr(dwMinimumWorkingSetSize), uintptr(dwMaximumWorkingSetSize), uintptr(flags))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3338,7 +3393,7 @@ func SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr
}
func SetStdHandle(stdhandle uint32, handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procSetStdHandle.Addr(), 2, uintptr(stdhandle), uintptr(handle), 0)
+ r1, _, e1 := syscall.SyscallN(procSetStdHandle.Addr(), uintptr(stdhandle), uintptr(handle))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3346,7 +3401,7 @@ func SetStdHandle(stdhandle uint32, handle Handle) (err error) {
}
func SetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procSetVolumeLabelW.Addr(), 2, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeName)), 0)
+ r1, _, e1 := syscall.SyscallN(procSetVolumeLabelW.Addr(), uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeName)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3354,7 +3409,7 @@ func SetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) {
}
func SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procSetVolumeMountPointW.Addr(), 2, uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)), 0)
+ r1, _, e1 := syscall.SyscallN(procSetVolumeMountPointW.Addr(), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3362,7 +3417,7 @@ func SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err erro
}
func SetupComm(handle Handle, dwInQueue uint32, dwOutQueue uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procSetupComm.Addr(), 3, uintptr(handle), uintptr(dwInQueue), uintptr(dwOutQueue))
+ r1, _, e1 := syscall.SyscallN(procSetupComm.Addr(), uintptr(handle), uintptr(dwInQueue), uintptr(dwOutQueue))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3370,7 +3425,7 @@ func SetupComm(handle Handle, dwInQueue uint32, dwOutQueue uint32) (err error) {
}
func SizeofResource(module Handle, resInfo Handle) (size uint32, err error) {
- r0, _, e1 := syscall.Syscall(procSizeofResource.Addr(), 2, uintptr(module), uintptr(resInfo), 0)
+ r0, _, e1 := syscall.SyscallN(procSizeofResource.Addr(), uintptr(module), uintptr(resInfo))
size = uint32(r0)
if size == 0 {
err = errnoErr(e1)
@@ -3383,13 +3438,13 @@ func SleepEx(milliseconds uint32, alertable bool) (ret uint32) {
if alertable {
_p0 = 1
}
- r0, _, _ := syscall.Syscall(procSleepEx.Addr(), 2, uintptr(milliseconds), uintptr(_p0), 0)
+ r0, _, _ := syscall.SyscallN(procSleepEx.Addr(), uintptr(milliseconds), uintptr(_p0))
ret = uint32(r0)
return
}
func TerminateJobObject(job Handle, exitCode uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procTerminateJobObject.Addr(), 2, uintptr(job), uintptr(exitCode), 0)
+ r1, _, e1 := syscall.SyscallN(procTerminateJobObject.Addr(), uintptr(job), uintptr(exitCode))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3397,7 +3452,7 @@ func TerminateJobObject(job Handle, exitCode uint32) (err error) {
}
func TerminateProcess(handle Handle, exitcode uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procTerminateProcess.Addr(), 2, uintptr(handle), uintptr(exitcode), 0)
+ r1, _, e1 := syscall.SyscallN(procTerminateProcess.Addr(), uintptr(handle), uintptr(exitcode))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3405,7 +3460,7 @@ func TerminateProcess(handle Handle, exitcode uint32) (err error) {
}
func Thread32First(snapshot Handle, threadEntry *ThreadEntry32) (err error) {
- r1, _, e1 := syscall.Syscall(procThread32First.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry)), 0)
+ r1, _, e1 := syscall.SyscallN(procThread32First.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3413,7 +3468,7 @@ func Thread32First(snapshot Handle, threadEntry *ThreadEntry32) (err error) {
}
func Thread32Next(snapshot Handle, threadEntry *ThreadEntry32) (err error) {
- r1, _, e1 := syscall.Syscall(procThread32Next.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry)), 0)
+ r1, _, e1 := syscall.SyscallN(procThread32Next.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3421,7 +3476,7 @@ func Thread32Next(snapshot Handle, threadEntry *ThreadEntry32) (err error) {
}
func UnlockFileEx(file Handle, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) {
- r1, _, e1 := syscall.Syscall6(procUnlockFileEx.Addr(), 5, uintptr(file), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped)), 0)
+ r1, _, e1 := syscall.SyscallN(procUnlockFileEx.Addr(), uintptr(file), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3429,7 +3484,7 @@ func UnlockFileEx(file Handle, reserved uint32, bytesLow uint32, bytesHigh uint3
}
func UnmapViewOfFile(addr uintptr) (err error) {
- r1, _, e1 := syscall.Syscall(procUnmapViewOfFile.Addr(), 1, uintptr(addr), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procUnmapViewOfFile.Addr(), uintptr(addr))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3437,7 +3492,7 @@ func UnmapViewOfFile(addr uintptr) (err error) {
}
func updateProcThreadAttribute(attrlist *ProcThreadAttributeList, flags uint32, attr uintptr, value unsafe.Pointer, size uintptr, prevvalue unsafe.Pointer, returnedsize *uintptr) (err error) {
- r1, _, e1 := syscall.Syscall9(procUpdateProcThreadAttribute.Addr(), 7, uintptr(unsafe.Pointer(attrlist)), uintptr(flags), uintptr(attr), uintptr(value), uintptr(size), uintptr(prevvalue), uintptr(unsafe.Pointer(returnedsize)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procUpdateProcThreadAttribute.Addr(), uintptr(unsafe.Pointer(attrlist)), uintptr(flags), uintptr(attr), uintptr(value), uintptr(size), uintptr(prevvalue), uintptr(unsafe.Pointer(returnedsize)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3445,7 +3500,7 @@ func updateProcThreadAttribute(attrlist *ProcThreadAttributeList, flags uint32,
}
func VirtualAlloc(address uintptr, size uintptr, alloctype uint32, protect uint32) (value uintptr, err error) {
- r0, _, e1 := syscall.Syscall6(procVirtualAlloc.Addr(), 4, uintptr(address), uintptr(size), uintptr(alloctype), uintptr(protect), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procVirtualAlloc.Addr(), uintptr(address), uintptr(size), uintptr(alloctype), uintptr(protect))
value = uintptr(r0)
if value == 0 {
err = errnoErr(e1)
@@ -3454,7 +3509,7 @@ func VirtualAlloc(address uintptr, size uintptr, alloctype uint32, protect uint3
}
func VirtualFree(address uintptr, size uintptr, freetype uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procVirtualFree.Addr(), 3, uintptr(address), uintptr(size), uintptr(freetype))
+ r1, _, e1 := syscall.SyscallN(procVirtualFree.Addr(), uintptr(address), uintptr(size), uintptr(freetype))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3462,7 +3517,7 @@ func VirtualFree(address uintptr, size uintptr, freetype uint32) (err error) {
}
func VirtualLock(addr uintptr, length uintptr) (err error) {
- r1, _, e1 := syscall.Syscall(procVirtualLock.Addr(), 2, uintptr(addr), uintptr(length), 0)
+ r1, _, e1 := syscall.SyscallN(procVirtualLock.Addr(), uintptr(addr), uintptr(length))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3470,7 +3525,7 @@ func VirtualLock(addr uintptr, length uintptr) (err error) {
}
func VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procVirtualProtect.Addr(), 4, uintptr(address), uintptr(size), uintptr(newprotect), uintptr(unsafe.Pointer(oldprotect)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procVirtualProtect.Addr(), uintptr(address), uintptr(size), uintptr(newprotect), uintptr(unsafe.Pointer(oldprotect)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3478,7 +3533,7 @@ func VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect
}
func VirtualProtectEx(process Handle, address uintptr, size uintptr, newProtect uint32, oldProtect *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procVirtualProtectEx.Addr(), 5, uintptr(process), uintptr(address), uintptr(size), uintptr(newProtect), uintptr(unsafe.Pointer(oldProtect)), 0)
+ r1, _, e1 := syscall.SyscallN(procVirtualProtectEx.Addr(), uintptr(process), uintptr(address), uintptr(size), uintptr(newProtect), uintptr(unsafe.Pointer(oldProtect)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3486,7 +3541,7 @@ func VirtualProtectEx(process Handle, address uintptr, size uintptr, newProtect
}
func VirtualQuery(address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) {
- r1, _, e1 := syscall.Syscall(procVirtualQuery.Addr(), 3, uintptr(address), uintptr(unsafe.Pointer(buffer)), uintptr(length))
+ r1, _, e1 := syscall.SyscallN(procVirtualQuery.Addr(), uintptr(address), uintptr(unsafe.Pointer(buffer)), uintptr(length))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3494,7 +3549,7 @@ func VirtualQuery(address uintptr, buffer *MemoryBasicInformation, length uintpt
}
func VirtualQueryEx(process Handle, address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) {
- r1, _, e1 := syscall.Syscall6(procVirtualQueryEx.Addr(), 4, uintptr(process), uintptr(address), uintptr(unsafe.Pointer(buffer)), uintptr(length), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procVirtualQueryEx.Addr(), uintptr(process), uintptr(address), uintptr(unsafe.Pointer(buffer)), uintptr(length))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3502,7 +3557,7 @@ func VirtualQueryEx(process Handle, address uintptr, buffer *MemoryBasicInformat
}
func VirtualUnlock(addr uintptr, length uintptr) (err error) {
- r1, _, e1 := syscall.Syscall(procVirtualUnlock.Addr(), 2, uintptr(addr), uintptr(length), 0)
+ r1, _, e1 := syscall.SyscallN(procVirtualUnlock.Addr(), uintptr(addr), uintptr(length))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3510,13 +3565,13 @@ func VirtualUnlock(addr uintptr, length uintptr) (err error) {
}
func WTSGetActiveConsoleSessionId() (sessionID uint32) {
- r0, _, _ := syscall.Syscall(procWTSGetActiveConsoleSessionId.Addr(), 0, 0, 0, 0)
+ r0, _, _ := syscall.SyscallN(procWTSGetActiveConsoleSessionId.Addr())
sessionID = uint32(r0)
return
}
func WaitCommEvent(handle Handle, lpEvtMask *uint32, lpOverlapped *Overlapped) (err error) {
- r1, _, e1 := syscall.Syscall(procWaitCommEvent.Addr(), 3, uintptr(handle), uintptr(unsafe.Pointer(lpEvtMask)), uintptr(unsafe.Pointer(lpOverlapped)))
+ r1, _, e1 := syscall.SyscallN(procWaitCommEvent.Addr(), uintptr(handle), uintptr(unsafe.Pointer(lpEvtMask)), uintptr(unsafe.Pointer(lpOverlapped)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3528,7 +3583,7 @@ func waitForMultipleObjects(count uint32, handles uintptr, waitAll bool, waitMil
if waitAll {
_p0 = 1
}
- r0, _, e1 := syscall.Syscall6(procWaitForMultipleObjects.Addr(), 4, uintptr(count), uintptr(handles), uintptr(_p0), uintptr(waitMilliseconds), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procWaitForMultipleObjects.Addr(), uintptr(count), uintptr(handles), uintptr(_p0), uintptr(waitMilliseconds))
event = uint32(r0)
if event == 0xffffffff {
err = errnoErr(e1)
@@ -3537,7 +3592,7 @@ func waitForMultipleObjects(count uint32, handles uintptr, waitAll bool, waitMil
}
func WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) {
- r0, _, e1 := syscall.Syscall(procWaitForSingleObject.Addr(), 2, uintptr(handle), uintptr(waitMilliseconds), 0)
+ r0, _, e1 := syscall.SyscallN(procWaitForSingleObject.Addr(), uintptr(handle), uintptr(waitMilliseconds))
event = uint32(r0)
if event == 0xffffffff {
err = errnoErr(e1)
@@ -3546,7 +3601,7 @@ func WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32,
}
func WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) {
- r1, _, e1 := syscall.Syscall6(procWriteConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(towrite), uintptr(unsafe.Pointer(written)), uintptr(unsafe.Pointer(reserved)), 0)
+ r1, _, e1 := syscall.SyscallN(procWriteConsoleW.Addr(), uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(towrite), uintptr(unsafe.Pointer(written)), uintptr(unsafe.Pointer(reserved)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3558,7 +3613,7 @@ func writeFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped)
if len(buf) > 0 {
_p0 = &buf[0]
}
- r1, _, e1 := syscall.Syscall6(procWriteFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0)
+ r1, _, e1 := syscall.SyscallN(procWriteFile.Addr(), uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3566,7 +3621,7 @@ func writeFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped)
}
func WriteProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesWritten *uintptr) (err error) {
- r1, _, e1 := syscall.Syscall6(procWriteProcessMemory.Addr(), 5, uintptr(process), uintptr(baseAddress), uintptr(unsafe.Pointer(buffer)), uintptr(size), uintptr(unsafe.Pointer(numberOfBytesWritten)), 0)
+ r1, _, e1 := syscall.SyscallN(procWriteProcessMemory.Addr(), uintptr(process), uintptr(baseAddress), uintptr(unsafe.Pointer(buffer)), uintptr(size), uintptr(unsafe.Pointer(numberOfBytesWritten)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3574,7 +3629,7 @@ func WriteProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size
}
func AcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, recvd *uint32, overlapped *Overlapped) (err error) {
- r1, _, e1 := syscall.Syscall9(procAcceptEx.Addr(), 8, uintptr(ls), uintptr(as), uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(overlapped)), 0)
+ r1, _, e1 := syscall.SyscallN(procAcceptEx.Addr(), uintptr(ls), uintptr(as), uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(overlapped)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3582,12 +3637,12 @@ func AcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32
}
func GetAcceptExSockaddrs(buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, lrsa **RawSockaddrAny, lrsalen *int32, rrsa **RawSockaddrAny, rrsalen *int32) {
- syscall.Syscall9(procGetAcceptExSockaddrs.Addr(), 8, uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(lrsa)), uintptr(unsafe.Pointer(lrsalen)), uintptr(unsafe.Pointer(rrsa)), uintptr(unsafe.Pointer(rrsalen)), 0)
+ syscall.SyscallN(procGetAcceptExSockaddrs.Addr(), uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(lrsa)), uintptr(unsafe.Pointer(lrsalen)), uintptr(unsafe.Pointer(rrsa)), uintptr(unsafe.Pointer(rrsalen)))
return
}
func TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall9(procTransmitFile.Addr(), 7, uintptr(s), uintptr(handle), uintptr(bytesToWrite), uintptr(bytsPerSend), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(transmitFileBuf)), uintptr(flags), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procTransmitFile.Addr(), uintptr(s), uintptr(handle), uintptr(bytesToWrite), uintptr(bytsPerSend), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(transmitFileBuf)), uintptr(flags))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3595,7 +3650,7 @@ func TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint
}
func NetApiBufferFree(buf *byte) (neterr error) {
- r0, _, _ := syscall.Syscall(procNetApiBufferFree.Addr(), 1, uintptr(unsafe.Pointer(buf)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procNetApiBufferFree.Addr(), uintptr(unsafe.Pointer(buf)))
if r0 != 0 {
neterr = syscall.Errno(r0)
}
@@ -3603,7 +3658,7 @@ func NetApiBufferFree(buf *byte) (neterr error) {
}
func NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) {
- r0, _, _ := syscall.Syscall(procNetGetJoinInformation.Addr(), 3, uintptr(unsafe.Pointer(server)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bufType)))
+ r0, _, _ := syscall.SyscallN(procNetGetJoinInformation.Addr(), uintptr(unsafe.Pointer(server)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bufType)))
if r0 != 0 {
neterr = syscall.Errno(r0)
}
@@ -3611,7 +3666,7 @@ func NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (nete
}
func NetUserEnum(serverName *uint16, level uint32, filter uint32, buf **byte, prefMaxLen uint32, entriesRead *uint32, totalEntries *uint32, resumeHandle *uint32) (neterr error) {
- r0, _, _ := syscall.Syscall9(procNetUserEnum.Addr(), 8, uintptr(unsafe.Pointer(serverName)), uintptr(level), uintptr(filter), uintptr(unsafe.Pointer(buf)), uintptr(prefMaxLen), uintptr(unsafe.Pointer(entriesRead)), uintptr(unsafe.Pointer(totalEntries)), uintptr(unsafe.Pointer(resumeHandle)), 0)
+ r0, _, _ := syscall.SyscallN(procNetUserEnum.Addr(), uintptr(unsafe.Pointer(serverName)), uintptr(level), uintptr(filter), uintptr(unsafe.Pointer(buf)), uintptr(prefMaxLen), uintptr(unsafe.Pointer(entriesRead)), uintptr(unsafe.Pointer(totalEntries)), uintptr(unsafe.Pointer(resumeHandle)))
if r0 != 0 {
neterr = syscall.Errno(r0)
}
@@ -3619,7 +3674,7 @@ func NetUserEnum(serverName *uint16, level uint32, filter uint32, buf **byte, pr
}
func NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) {
- r0, _, _ := syscall.Syscall6(procNetUserGetInfo.Addr(), 4, uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(userName)), uintptr(level), uintptr(unsafe.Pointer(buf)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procNetUserGetInfo.Addr(), uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(userName)), uintptr(level), uintptr(unsafe.Pointer(buf)))
if r0 != 0 {
neterr = syscall.Errno(r0)
}
@@ -3627,7 +3682,7 @@ func NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **by
}
func NtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, allocationSize *int64, attributes uint32, share uint32, disposition uint32, options uint32, eabuffer uintptr, ealength uint32) (ntstatus error) {
- r0, _, _ := syscall.Syscall12(procNtCreateFile.Addr(), 11, uintptr(unsafe.Pointer(handle)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(allocationSize)), uintptr(attributes), uintptr(share), uintptr(disposition), uintptr(options), uintptr(eabuffer), uintptr(ealength), 0)
+ r0, _, _ := syscall.SyscallN(procNtCreateFile.Addr(), uintptr(unsafe.Pointer(handle)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(allocationSize)), uintptr(attributes), uintptr(share), uintptr(disposition), uintptr(options), uintptr(eabuffer), uintptr(ealength))
if r0 != 0 {
ntstatus = NTStatus(r0)
}
@@ -3635,7 +3690,7 @@ func NtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO
}
func NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (ntstatus error) {
- r0, _, _ := syscall.Syscall15(procNtCreateNamedPipeFile.Addr(), 14, uintptr(unsafe.Pointer(pipe)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(share), uintptr(disposition), uintptr(options), uintptr(typ), uintptr(readMode), uintptr(completionMode), uintptr(maxInstances), uintptr(inboundQuota), uintptr(outputQuota), uintptr(unsafe.Pointer(timeout)), 0)
+ r0, _, _ := syscall.SyscallN(procNtCreateNamedPipeFile.Addr(), uintptr(unsafe.Pointer(pipe)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(share), uintptr(disposition), uintptr(options), uintptr(typ), uintptr(readMode), uintptr(completionMode), uintptr(maxInstances), uintptr(inboundQuota), uintptr(outputQuota), uintptr(unsafe.Pointer(timeout)))
if r0 != 0 {
ntstatus = NTStatus(r0)
}
@@ -3643,7 +3698,7 @@ func NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, i
}
func NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32, retLen *uint32) (ntstatus error) {
- r0, _, _ := syscall.Syscall6(procNtQueryInformationProcess.Addr(), 5, uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen), uintptr(unsafe.Pointer(retLen)), 0)
+ r0, _, _ := syscall.SyscallN(procNtQueryInformationProcess.Addr(), uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen), uintptr(unsafe.Pointer(retLen)))
if r0 != 0 {
ntstatus = NTStatus(r0)
}
@@ -3651,7 +3706,7 @@ func NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe
}
func NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32, retLen *uint32) (ntstatus error) {
- r0, _, _ := syscall.Syscall6(procNtQuerySystemInformation.Addr(), 4, uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen), uintptr(unsafe.Pointer(retLen)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procNtQuerySystemInformation.Addr(), uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen), uintptr(unsafe.Pointer(retLen)))
if r0 != 0 {
ntstatus = NTStatus(r0)
}
@@ -3659,7 +3714,7 @@ func NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInf
}
func NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32, class uint32) (ntstatus error) {
- r0, _, _ := syscall.Syscall6(procNtSetInformationFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen), uintptr(class), 0)
+ r0, _, _ := syscall.SyscallN(procNtSetInformationFile.Addr(), uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen), uintptr(class))
if r0 != 0 {
ntstatus = NTStatus(r0)
}
@@ -3667,7 +3722,7 @@ func NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte,
}
func NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) {
- r0, _, _ := syscall.Syscall6(procNtSetInformationProcess.Addr(), 4, uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen), 0, 0)
+ r0, _, _ := syscall.SyscallN(procNtSetInformationProcess.Addr(), uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen))
if r0 != 0 {
ntstatus = NTStatus(r0)
}
@@ -3675,7 +3730,7 @@ func NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.P
}
func NtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32) (ntstatus error) {
- r0, _, _ := syscall.Syscall(procNtSetSystemInformation.Addr(), 3, uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen))
+ r0, _, _ := syscall.SyscallN(procNtSetSystemInformation.Addr(), uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen))
if r0 != 0 {
ntstatus = NTStatus(r0)
}
@@ -3683,13 +3738,13 @@ func NtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoL
}
func RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) {
- r0, _, _ := syscall.Syscall(procRtlAddFunctionTable.Addr(), 3, uintptr(unsafe.Pointer(functionTable)), uintptr(entryCount), uintptr(baseAddress))
+ r0, _, _ := syscall.SyscallN(procRtlAddFunctionTable.Addr(), uintptr(unsafe.Pointer(functionTable)), uintptr(entryCount), uintptr(baseAddress))
ret = r0 != 0
return
}
func RtlDefaultNpAcl(acl **ACL) (ntstatus error) {
- r0, _, _ := syscall.Syscall(procRtlDefaultNpAcl.Addr(), 1, uintptr(unsafe.Pointer(acl)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procRtlDefaultNpAcl.Addr(), uintptr(unsafe.Pointer(acl)))
if r0 != 0 {
ntstatus = NTStatus(r0)
}
@@ -3697,13 +3752,13 @@ func RtlDefaultNpAcl(acl **ACL) (ntstatus error) {
}
func RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) {
- r0, _, _ := syscall.Syscall(procRtlDeleteFunctionTable.Addr(), 1, uintptr(unsafe.Pointer(functionTable)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procRtlDeleteFunctionTable.Addr(), uintptr(unsafe.Pointer(functionTable)))
ret = r0 != 0
return
}
func RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) {
- r0, _, _ := syscall.Syscall6(procRtlDosPathNameToNtPathName_U_WithStatus.Addr(), 4, uintptr(unsafe.Pointer(dosName)), uintptr(unsafe.Pointer(ntName)), uintptr(unsafe.Pointer(ntFileNamePart)), uintptr(unsafe.Pointer(relativeName)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procRtlDosPathNameToNtPathName_U_WithStatus.Addr(), uintptr(unsafe.Pointer(dosName)), uintptr(unsafe.Pointer(ntName)), uintptr(unsafe.Pointer(ntFileNamePart)), uintptr(unsafe.Pointer(relativeName)))
if r0 != 0 {
ntstatus = NTStatus(r0)
}
@@ -3711,7 +3766,7 @@ func RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFile
}
func RtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) {
- r0, _, _ := syscall.Syscall6(procRtlDosPathNameToRelativeNtPathName_U_WithStatus.Addr(), 4, uintptr(unsafe.Pointer(dosName)), uintptr(unsafe.Pointer(ntName)), uintptr(unsafe.Pointer(ntFileNamePart)), uintptr(unsafe.Pointer(relativeName)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procRtlDosPathNameToRelativeNtPathName_U_WithStatus.Addr(), uintptr(unsafe.Pointer(dosName)), uintptr(unsafe.Pointer(ntName)), uintptr(unsafe.Pointer(ntFileNamePart)), uintptr(unsafe.Pointer(relativeName)))
if r0 != 0 {
ntstatus = NTStatus(r0)
}
@@ -3719,18 +3774,18 @@ func RtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString
}
func RtlGetCurrentPeb() (peb *PEB) {
- r0, _, _ := syscall.Syscall(procRtlGetCurrentPeb.Addr(), 0, 0, 0, 0)
+ r0, _, _ := syscall.SyscallN(procRtlGetCurrentPeb.Addr())
peb = (*PEB)(unsafe.Pointer(r0))
return
}
func rtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNumber *uint32) {
- syscall.Syscall(procRtlGetNtVersionNumbers.Addr(), 3, uintptr(unsafe.Pointer(majorVersion)), uintptr(unsafe.Pointer(minorVersion)), uintptr(unsafe.Pointer(buildNumber)))
+ syscall.SyscallN(procRtlGetNtVersionNumbers.Addr(), uintptr(unsafe.Pointer(majorVersion)), uintptr(unsafe.Pointer(minorVersion)), uintptr(unsafe.Pointer(buildNumber)))
return
}
func rtlGetVersion(info *OsVersionInfoEx) (ntstatus error) {
- r0, _, _ := syscall.Syscall(procRtlGetVersion.Addr(), 1, uintptr(unsafe.Pointer(info)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procRtlGetVersion.Addr(), uintptr(unsafe.Pointer(info)))
if r0 != 0 {
ntstatus = NTStatus(r0)
}
@@ -3738,23 +3793,23 @@ func rtlGetVersion(info *OsVersionInfoEx) (ntstatus error) {
}
func RtlInitString(destinationString *NTString, sourceString *byte) {
- syscall.Syscall(procRtlInitString.Addr(), 2, uintptr(unsafe.Pointer(destinationString)), uintptr(unsafe.Pointer(sourceString)), 0)
+ syscall.SyscallN(procRtlInitString.Addr(), uintptr(unsafe.Pointer(destinationString)), uintptr(unsafe.Pointer(sourceString)))
return
}
func RtlInitUnicodeString(destinationString *NTUnicodeString, sourceString *uint16) {
- syscall.Syscall(procRtlInitUnicodeString.Addr(), 2, uintptr(unsafe.Pointer(destinationString)), uintptr(unsafe.Pointer(sourceString)), 0)
+ syscall.SyscallN(procRtlInitUnicodeString.Addr(), uintptr(unsafe.Pointer(destinationString)), uintptr(unsafe.Pointer(sourceString)))
return
}
func rtlNtStatusToDosErrorNoTeb(ntstatus NTStatus) (ret syscall.Errno) {
- r0, _, _ := syscall.Syscall(procRtlNtStatusToDosErrorNoTeb.Addr(), 1, uintptr(ntstatus), 0, 0)
+ r0, _, _ := syscall.SyscallN(procRtlNtStatusToDosErrorNoTeb.Addr(), uintptr(ntstatus))
ret = syscall.Errno(r0)
return
}
func clsidFromString(lpsz *uint16, pclsid *GUID) (ret error) {
- r0, _, _ := syscall.Syscall(procCLSIDFromString.Addr(), 2, uintptr(unsafe.Pointer(lpsz)), uintptr(unsafe.Pointer(pclsid)), 0)
+ r0, _, _ := syscall.SyscallN(procCLSIDFromString.Addr(), uintptr(unsafe.Pointer(lpsz)), uintptr(unsafe.Pointer(pclsid)))
if r0 != 0 {
ret = syscall.Errno(r0)
}
@@ -3762,7 +3817,7 @@ func clsidFromString(lpsz *uint16, pclsid *GUID) (ret error) {
}
func coCreateGuid(pguid *GUID) (ret error) {
- r0, _, _ := syscall.Syscall(procCoCreateGuid.Addr(), 1, uintptr(unsafe.Pointer(pguid)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procCoCreateGuid.Addr(), uintptr(unsafe.Pointer(pguid)))
if r0 != 0 {
ret = syscall.Errno(r0)
}
@@ -3770,7 +3825,7 @@ func coCreateGuid(pguid *GUID) (ret error) {
}
func CoGetObject(name *uint16, bindOpts *BIND_OPTS3, guid *GUID, functionTable **uintptr) (ret error) {
- r0, _, _ := syscall.Syscall6(procCoGetObject.Addr(), 4, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bindOpts)), uintptr(unsafe.Pointer(guid)), uintptr(unsafe.Pointer(functionTable)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procCoGetObject.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bindOpts)), uintptr(unsafe.Pointer(guid)), uintptr(unsafe.Pointer(functionTable)))
if r0 != 0 {
ret = syscall.Errno(r0)
}
@@ -3778,7 +3833,7 @@ func CoGetObject(name *uint16, bindOpts *BIND_OPTS3, guid *GUID, functionTable *
}
func CoInitializeEx(reserved uintptr, coInit uint32) (ret error) {
- r0, _, _ := syscall.Syscall(procCoInitializeEx.Addr(), 2, uintptr(reserved), uintptr(coInit), 0)
+ r0, _, _ := syscall.SyscallN(procCoInitializeEx.Addr(), uintptr(reserved), uintptr(coInit))
if r0 != 0 {
ret = syscall.Errno(r0)
}
@@ -3786,23 +3841,23 @@ func CoInitializeEx(reserved uintptr, coInit uint32) (ret error) {
}
func CoTaskMemFree(address unsafe.Pointer) {
- syscall.Syscall(procCoTaskMemFree.Addr(), 1, uintptr(address), 0, 0)
+ syscall.SyscallN(procCoTaskMemFree.Addr(), uintptr(address))
return
}
func CoUninitialize() {
- syscall.Syscall(procCoUninitialize.Addr(), 0, 0, 0, 0)
+ syscall.SyscallN(procCoUninitialize.Addr())
return
}
func stringFromGUID2(rguid *GUID, lpsz *uint16, cchMax int32) (chars int32) {
- r0, _, _ := syscall.Syscall(procStringFromGUID2.Addr(), 3, uintptr(unsafe.Pointer(rguid)), uintptr(unsafe.Pointer(lpsz)), uintptr(cchMax))
+ r0, _, _ := syscall.SyscallN(procStringFromGUID2.Addr(), uintptr(unsafe.Pointer(rguid)), uintptr(unsafe.Pointer(lpsz)), uintptr(cchMax))
chars = int32(r0)
return
}
func EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procEnumProcessModules.Addr(), 4, uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procEnumProcessModules.Addr(), uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3810,7 +3865,7 @@ func EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uin
}
func EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *uint32, filterFlag uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procEnumProcessModulesEx.Addr(), 5, uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded)), uintptr(filterFlag), 0)
+ r1, _, e1 := syscall.SyscallN(procEnumProcessModulesEx.Addr(), uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded)), uintptr(filterFlag))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3818,7 +3873,7 @@ func EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *u
}
func enumProcesses(processIds *uint32, nSize uint32, bytesReturned *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procEnumProcesses.Addr(), 3, uintptr(unsafe.Pointer(processIds)), uintptr(nSize), uintptr(unsafe.Pointer(bytesReturned)))
+ r1, _, e1 := syscall.SyscallN(procEnumProcesses.Addr(), uintptr(unsafe.Pointer(processIds)), uintptr(nSize), uintptr(unsafe.Pointer(bytesReturned)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3826,7 +3881,7 @@ func enumProcesses(processIds *uint32, nSize uint32, bytesReturned *uint32) (err
}
func GetModuleBaseName(process Handle, module Handle, baseName *uint16, size uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetModuleBaseNameW.Addr(), 4, uintptr(process), uintptr(module), uintptr(unsafe.Pointer(baseName)), uintptr(size), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procGetModuleBaseNameW.Addr(), uintptr(process), uintptr(module), uintptr(unsafe.Pointer(baseName)), uintptr(size))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3834,7 +3889,7 @@ func GetModuleBaseName(process Handle, module Handle, baseName *uint16, size uin
}
func GetModuleFileNameEx(process Handle, module Handle, filename *uint16, size uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetModuleFileNameExW.Addr(), 4, uintptr(process), uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procGetModuleFileNameExW.Addr(), uintptr(process), uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3842,7 +3897,7 @@ func GetModuleFileNameEx(process Handle, module Handle, filename *uint16, size u
}
func GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetModuleInformation.Addr(), 4, uintptr(process), uintptr(module), uintptr(unsafe.Pointer(modinfo)), uintptr(cb), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procGetModuleInformation.Addr(), uintptr(process), uintptr(module), uintptr(unsafe.Pointer(modinfo)), uintptr(cb))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3850,7 +3905,7 @@ func GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb
}
func QueryWorkingSetEx(process Handle, pv uintptr, cb uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procQueryWorkingSetEx.Addr(), 3, uintptr(process), uintptr(pv), uintptr(cb))
+ r1, _, e1 := syscall.SyscallN(procQueryWorkingSetEx.Addr(), uintptr(process), uintptr(pv), uintptr(cb))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3862,7 +3917,7 @@ func SubscribeServiceChangeNotifications(service Handle, eventType uint32, callb
if ret != nil {
return
}
- r0, _, _ := syscall.Syscall6(procSubscribeServiceChangeNotifications.Addr(), 5, uintptr(service), uintptr(eventType), uintptr(callback), uintptr(callbackCtx), uintptr(unsafe.Pointer(subscription)), 0)
+ r0, _, _ := syscall.SyscallN(procSubscribeServiceChangeNotifications.Addr(), uintptr(service), uintptr(eventType), uintptr(callback), uintptr(callbackCtx), uintptr(unsafe.Pointer(subscription)))
if r0 != 0 {
ret = syscall.Errno(r0)
}
@@ -3874,12 +3929,12 @@ func UnsubscribeServiceChangeNotifications(subscription uintptr) (err error) {
if err != nil {
return
}
- syscall.Syscall(procUnsubscribeServiceChangeNotifications.Addr(), 1, uintptr(subscription), 0, 0)
+ syscall.SyscallN(procUnsubscribeServiceChangeNotifications.Addr(), uintptr(subscription))
return
}
func GetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetUserNameExW.Addr(), 3, uintptr(nameFormat), uintptr(unsafe.Pointer(nameBuffre)), uintptr(unsafe.Pointer(nSize)))
+ r1, _, e1 := syscall.SyscallN(procGetUserNameExW.Addr(), uintptr(nameFormat), uintptr(unsafe.Pointer(nameBuffre)), uintptr(unsafe.Pointer(nSize)))
if r1&0xff == 0 {
err = errnoErr(e1)
}
@@ -3887,7 +3942,7 @@ func GetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err er
}
func TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint32, translatedName *uint16, nSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procTranslateNameW.Addr(), 5, uintptr(unsafe.Pointer(accName)), uintptr(accNameFormat), uintptr(desiredNameFormat), uintptr(unsafe.Pointer(translatedName)), uintptr(unsafe.Pointer(nSize)), 0)
+ r1, _, e1 := syscall.SyscallN(procTranslateNameW.Addr(), uintptr(unsafe.Pointer(accName)), uintptr(accNameFormat), uintptr(desiredNameFormat), uintptr(unsafe.Pointer(translatedName)), uintptr(unsafe.Pointer(nSize)))
if r1&0xff == 0 {
err = errnoErr(e1)
}
@@ -3895,7 +3950,7 @@ func TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint
}
func SetupDiBuildDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) {
- r1, _, e1 := syscall.Syscall(procSetupDiBuildDriverInfoList.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType))
+ r1, _, e1 := syscall.SyscallN(procSetupDiBuildDriverInfoList.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3903,7 +3958,7 @@ func SetupDiBuildDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoDa
}
func SetupDiCallClassInstaller(installFunction DI_FUNCTION, deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) {
- r1, _, e1 := syscall.Syscall(procSetupDiCallClassInstaller.Addr(), 3, uintptr(installFunction), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)))
+ r1, _, e1 := syscall.SyscallN(procSetupDiCallClassInstaller.Addr(), uintptr(installFunction), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3911,7 +3966,7 @@ func SetupDiCallClassInstaller(installFunction DI_FUNCTION, deviceInfoSet DevInf
}
func SetupDiCancelDriverInfoSearch(deviceInfoSet DevInfo) (err error) {
- r1, _, e1 := syscall.Syscall(procSetupDiCancelDriverInfoSearch.Addr(), 1, uintptr(deviceInfoSet), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procSetupDiCancelDriverInfoSearch.Addr(), uintptr(deviceInfoSet))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3919,7 +3974,7 @@ func SetupDiCancelDriverInfoSearch(deviceInfoSet DevInfo) (err error) {
}
func setupDiClassGuidsFromNameEx(className *uint16, classGuidList *GUID, classGuidListSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) {
- r1, _, e1 := syscall.Syscall6(procSetupDiClassGuidsFromNameExW.Addr(), 6, uintptr(unsafe.Pointer(className)), uintptr(unsafe.Pointer(classGuidList)), uintptr(classGuidListSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(unsafe.Pointer(machineName)), uintptr(reserved))
+ r1, _, e1 := syscall.SyscallN(procSetupDiClassGuidsFromNameExW.Addr(), uintptr(unsafe.Pointer(className)), uintptr(unsafe.Pointer(classGuidList)), uintptr(classGuidListSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(unsafe.Pointer(machineName)), uintptr(reserved))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3927,7 +3982,7 @@ func setupDiClassGuidsFromNameEx(className *uint16, classGuidList *GUID, classGu
}
func setupDiClassNameFromGuidEx(classGUID *GUID, className *uint16, classNameSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) {
- r1, _, e1 := syscall.Syscall6(procSetupDiClassNameFromGuidExW.Addr(), 6, uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(className)), uintptr(classNameSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(unsafe.Pointer(machineName)), uintptr(reserved))
+ r1, _, e1 := syscall.SyscallN(procSetupDiClassNameFromGuidExW.Addr(), uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(className)), uintptr(classNameSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(unsafe.Pointer(machineName)), uintptr(reserved))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3935,7 +3990,7 @@ func setupDiClassNameFromGuidEx(classGUID *GUID, className *uint16, classNameSiz
}
func setupDiCreateDeviceInfoListEx(classGUID *GUID, hwndParent uintptr, machineName *uint16, reserved uintptr) (handle DevInfo, err error) {
- r0, _, e1 := syscall.Syscall6(procSetupDiCreateDeviceInfoListExW.Addr(), 4, uintptr(unsafe.Pointer(classGUID)), uintptr(hwndParent), uintptr(unsafe.Pointer(machineName)), uintptr(reserved), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procSetupDiCreateDeviceInfoListExW.Addr(), uintptr(unsafe.Pointer(classGUID)), uintptr(hwndParent), uintptr(unsafe.Pointer(machineName)), uintptr(reserved))
handle = DevInfo(r0)
if handle == DevInfo(InvalidHandle) {
err = errnoErr(e1)
@@ -3944,7 +3999,7 @@ func setupDiCreateDeviceInfoListEx(classGUID *GUID, hwndParent uintptr, machineN
}
func setupDiCreateDeviceInfo(deviceInfoSet DevInfo, DeviceName *uint16, classGUID *GUID, DeviceDescription *uint16, hwndParent uintptr, CreationFlags DICD, deviceInfoData *DevInfoData) (err error) {
- r1, _, e1 := syscall.Syscall9(procSetupDiCreateDeviceInfoW.Addr(), 7, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(DeviceName)), uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(DeviceDescription)), uintptr(hwndParent), uintptr(CreationFlags), uintptr(unsafe.Pointer(deviceInfoData)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procSetupDiCreateDeviceInfoW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(DeviceName)), uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(DeviceDescription)), uintptr(hwndParent), uintptr(CreationFlags), uintptr(unsafe.Pointer(deviceInfoData)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3952,7 +4007,7 @@ func setupDiCreateDeviceInfo(deviceInfoSet DevInfo, DeviceName *uint16, classGUI
}
func SetupDiDestroyDeviceInfoList(deviceInfoSet DevInfo) (err error) {
- r1, _, e1 := syscall.Syscall(procSetupDiDestroyDeviceInfoList.Addr(), 1, uintptr(deviceInfoSet), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procSetupDiDestroyDeviceInfoList.Addr(), uintptr(deviceInfoSet))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3960,7 +4015,7 @@ func SetupDiDestroyDeviceInfoList(deviceInfoSet DevInfo) (err error) {
}
func SetupDiDestroyDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) {
- r1, _, e1 := syscall.Syscall(procSetupDiDestroyDriverInfoList.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType))
+ r1, _, e1 := syscall.SyscallN(procSetupDiDestroyDriverInfoList.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3968,7 +4023,7 @@ func SetupDiDestroyDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfo
}
func setupDiEnumDeviceInfo(deviceInfoSet DevInfo, memberIndex uint32, deviceInfoData *DevInfoData) (err error) {
- r1, _, e1 := syscall.Syscall(procSetupDiEnumDeviceInfo.Addr(), 3, uintptr(deviceInfoSet), uintptr(memberIndex), uintptr(unsafe.Pointer(deviceInfoData)))
+ r1, _, e1 := syscall.SyscallN(procSetupDiEnumDeviceInfo.Addr(), uintptr(deviceInfoSet), uintptr(memberIndex), uintptr(unsafe.Pointer(deviceInfoData)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3976,7 +4031,7 @@ func setupDiEnumDeviceInfo(deviceInfoSet DevInfo, memberIndex uint32, deviceInfo
}
func setupDiEnumDriverInfo(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT, memberIndex uint32, driverInfoData *DrvInfoData) (err error) {
- r1, _, e1 := syscall.Syscall6(procSetupDiEnumDriverInfoW.Addr(), 5, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType), uintptr(memberIndex), uintptr(unsafe.Pointer(driverInfoData)), 0)
+ r1, _, e1 := syscall.SyscallN(procSetupDiEnumDriverInfoW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType), uintptr(memberIndex), uintptr(unsafe.Pointer(driverInfoData)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3984,7 +4039,7 @@ func setupDiEnumDriverInfo(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, d
}
func setupDiGetClassDevsEx(classGUID *GUID, Enumerator *uint16, hwndParent uintptr, Flags DIGCF, deviceInfoSet DevInfo, machineName *uint16, reserved uintptr) (handle DevInfo, err error) {
- r0, _, e1 := syscall.Syscall9(procSetupDiGetClassDevsExW.Addr(), 7, uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(Enumerator)), uintptr(hwndParent), uintptr(Flags), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(machineName)), uintptr(reserved), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procSetupDiGetClassDevsExW.Addr(), uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(Enumerator)), uintptr(hwndParent), uintptr(Flags), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(machineName)), uintptr(reserved))
handle = DevInfo(r0)
if handle == DevInfo(InvalidHandle) {
err = errnoErr(e1)
@@ -3993,7 +4048,7 @@ func setupDiGetClassDevsEx(classGUID *GUID, Enumerator *uint16, hwndParent uintp
}
func SetupDiGetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32, requiredSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procSetupDiGetClassInstallParamsW.Addr(), 5, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(classInstallParams)), uintptr(classInstallParamsSize), uintptr(unsafe.Pointer(requiredSize)), 0)
+ r1, _, e1 := syscall.SyscallN(procSetupDiGetClassInstallParamsW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(classInstallParams)), uintptr(classInstallParamsSize), uintptr(unsafe.Pointer(requiredSize)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4001,7 +4056,7 @@ func SetupDiGetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfo
}
func setupDiGetDeviceInfoListDetail(deviceInfoSet DevInfo, deviceInfoSetDetailData *DevInfoListDetailData) (err error) {
- r1, _, e1 := syscall.Syscall(procSetupDiGetDeviceInfoListDetailW.Addr(), 2, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoSetDetailData)), 0)
+ r1, _, e1 := syscall.SyscallN(procSetupDiGetDeviceInfoListDetailW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoSetDetailData)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4009,7 +4064,7 @@ func setupDiGetDeviceInfoListDetail(deviceInfoSet DevInfo, deviceInfoSetDetailDa
}
func setupDiGetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) {
- r1, _, e1 := syscall.Syscall(procSetupDiGetDeviceInstallParamsW.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(deviceInstallParams)))
+ r1, _, e1 := syscall.SyscallN(procSetupDiGetDeviceInstallParamsW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(deviceInstallParams)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4017,7 +4072,7 @@ func setupDiGetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInf
}
func setupDiGetDeviceInstanceId(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, instanceId *uint16, instanceIdSize uint32, instanceIdRequiredSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procSetupDiGetDeviceInstanceIdW.Addr(), 5, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(instanceId)), uintptr(instanceIdSize), uintptr(unsafe.Pointer(instanceIdRequiredSize)), 0)
+ r1, _, e1 := syscall.SyscallN(procSetupDiGetDeviceInstanceIdW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(instanceId)), uintptr(instanceIdSize), uintptr(unsafe.Pointer(instanceIdRequiredSize)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4025,7 +4080,7 @@ func setupDiGetDeviceInstanceId(deviceInfoSet DevInfo, deviceInfoData *DevInfoDa
}
func setupDiGetDeviceProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, propertyKey *DEVPROPKEY, propertyType *DEVPROPTYPE, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall9(procSetupDiGetDevicePropertyW.Addr(), 8, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(propertyKey)), uintptr(unsafe.Pointer(propertyType)), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(flags), 0)
+ r1, _, e1 := syscall.SyscallN(procSetupDiGetDevicePropertyW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(propertyKey)), uintptr(unsafe.Pointer(propertyType)), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(flags))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4033,7 +4088,7 @@ func setupDiGetDeviceProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData
}
func setupDiGetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyRegDataType *uint32, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall9(procSetupDiGetDeviceRegistryPropertyW.Addr(), 7, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(property), uintptr(unsafe.Pointer(propertyRegDataType)), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), uintptr(unsafe.Pointer(requiredSize)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procSetupDiGetDeviceRegistryPropertyW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(property), uintptr(unsafe.Pointer(propertyRegDataType)), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), uintptr(unsafe.Pointer(requiredSize)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4041,7 +4096,7 @@ func setupDiGetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *Dev
}
func setupDiGetDriverInfoDetail(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData, driverInfoDetailData *DrvInfoDetailData, driverInfoDetailDataSize uint32, requiredSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procSetupDiGetDriverInfoDetailW.Addr(), 6, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData)), uintptr(unsafe.Pointer(driverInfoDetailData)), uintptr(driverInfoDetailDataSize), uintptr(unsafe.Pointer(requiredSize)))
+ r1, _, e1 := syscall.SyscallN(procSetupDiGetDriverInfoDetailW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData)), uintptr(unsafe.Pointer(driverInfoDetailData)), uintptr(driverInfoDetailDataSize), uintptr(unsafe.Pointer(requiredSize)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4049,7 +4104,7 @@ func setupDiGetDriverInfoDetail(deviceInfoSet DevInfo, deviceInfoData *DevInfoDa
}
func setupDiGetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) {
- r1, _, e1 := syscall.Syscall(procSetupDiGetSelectedDevice.Addr(), 2, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), 0)
+ r1, _, e1 := syscall.SyscallN(procSetupDiGetSelectedDevice.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4057,7 +4112,7 @@ func setupDiGetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData
}
func setupDiGetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) {
- r1, _, e1 := syscall.Syscall(procSetupDiGetSelectedDriverW.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData)))
+ r1, _, e1 := syscall.SyscallN(procSetupDiGetSelectedDriverW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4065,7 +4120,7 @@ func setupDiGetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData
}
func SetupDiOpenDevRegKey(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, Scope DICS_FLAG, HwProfile uint32, KeyType DIREG, samDesired uint32) (key Handle, err error) {
- r0, _, e1 := syscall.Syscall6(procSetupDiOpenDevRegKey.Addr(), 6, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(Scope), uintptr(HwProfile), uintptr(KeyType), uintptr(samDesired))
+ r0, _, e1 := syscall.SyscallN(procSetupDiOpenDevRegKey.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(Scope), uintptr(HwProfile), uintptr(KeyType), uintptr(samDesired))
key = Handle(r0)
if key == InvalidHandle {
err = errnoErr(e1)
@@ -4074,7 +4129,7 @@ func SetupDiOpenDevRegKey(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, Sc
}
func SetupDiSetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procSetupDiSetClassInstallParamsW.Addr(), 4, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(classInstallParams)), uintptr(classInstallParamsSize), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procSetupDiSetClassInstallParamsW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(classInstallParams)), uintptr(classInstallParamsSize))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4082,7 +4137,7 @@ func SetupDiSetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfo
}
func SetupDiSetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) {
- r1, _, e1 := syscall.Syscall(procSetupDiSetDeviceInstallParamsW.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(deviceInstallParams)))
+ r1, _, e1 := syscall.SyscallN(procSetupDiSetDeviceInstallParamsW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(deviceInstallParams)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4090,7 +4145,7 @@ func SetupDiSetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInf
}
func setupDiSetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyBuffer *byte, propertyBufferSize uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procSetupDiSetDeviceRegistryPropertyW.Addr(), 5, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(property), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), 0)
+ r1, _, e1 := syscall.SyscallN(procSetupDiSetDeviceRegistryPropertyW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(property), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4098,7 +4153,7 @@ func setupDiSetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *Dev
}
func SetupDiSetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) {
- r1, _, e1 := syscall.Syscall(procSetupDiSetSelectedDevice.Addr(), 2, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), 0)
+ r1, _, e1 := syscall.SyscallN(procSetupDiSetSelectedDevice.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4106,7 +4161,7 @@ func SetupDiSetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData
}
func SetupDiSetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) {
- r1, _, e1 := syscall.Syscall(procSetupDiSetSelectedDriverW.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData)))
+ r1, _, e1 := syscall.SyscallN(procSetupDiSetSelectedDriverW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4114,7 +4169,7 @@ func SetupDiSetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData
}
func setupUninstallOEMInf(infFileName *uint16, flags SUOI, reserved uintptr) (err error) {
- r1, _, e1 := syscall.Syscall(procSetupUninstallOEMInfW.Addr(), 3, uintptr(unsafe.Pointer(infFileName)), uintptr(flags), uintptr(reserved))
+ r1, _, e1 := syscall.SyscallN(procSetupUninstallOEMInfW.Addr(), uintptr(unsafe.Pointer(infFileName)), uintptr(flags), uintptr(reserved))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4122,7 +4177,7 @@ func setupUninstallOEMInf(infFileName *uint16, flags SUOI, reserved uintptr) (er
}
func commandLineToArgv(cmd *uint16, argc *int32) (argv **uint16, err error) {
- r0, _, e1 := syscall.Syscall(procCommandLineToArgvW.Addr(), 2, uintptr(unsafe.Pointer(cmd)), uintptr(unsafe.Pointer(argc)), 0)
+ r0, _, e1 := syscall.SyscallN(procCommandLineToArgvW.Addr(), uintptr(unsafe.Pointer(cmd)), uintptr(unsafe.Pointer(argc)))
argv = (**uint16)(unsafe.Pointer(r0))
if argv == nil {
err = errnoErr(e1)
@@ -4131,7 +4186,7 @@ func commandLineToArgv(cmd *uint16, argc *int32) (argv **uint16, err error) {
}
func shGetKnownFolderPath(id *KNOWNFOLDERID, flags uint32, token Token, path **uint16) (ret error) {
- r0, _, _ := syscall.Syscall6(procSHGetKnownFolderPath.Addr(), 4, uintptr(unsafe.Pointer(id)), uintptr(flags), uintptr(token), uintptr(unsafe.Pointer(path)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procSHGetKnownFolderPath.Addr(), uintptr(unsafe.Pointer(id)), uintptr(flags), uintptr(token), uintptr(unsafe.Pointer(path)))
if r0 != 0 {
ret = syscall.Errno(r0)
}
@@ -4139,7 +4194,7 @@ func shGetKnownFolderPath(id *KNOWNFOLDERID, flags uint32, token Token, path **u
}
func ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) {
- r1, _, e1 := syscall.Syscall6(procShellExecuteW.Addr(), 6, uintptr(hwnd), uintptr(unsafe.Pointer(verb)), uintptr(unsafe.Pointer(file)), uintptr(unsafe.Pointer(args)), uintptr(unsafe.Pointer(cwd)), uintptr(showCmd))
+ r1, _, e1 := syscall.SyscallN(procShellExecuteW.Addr(), uintptr(hwnd), uintptr(unsafe.Pointer(verb)), uintptr(unsafe.Pointer(file)), uintptr(unsafe.Pointer(args)), uintptr(unsafe.Pointer(cwd)), uintptr(showCmd))
if r1 <= 32 {
err = errnoErr(e1)
}
@@ -4147,12 +4202,12 @@ func ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *ui
}
func EnumChildWindows(hwnd HWND, enumFunc uintptr, param unsafe.Pointer) {
- syscall.Syscall(procEnumChildWindows.Addr(), 3, uintptr(hwnd), uintptr(enumFunc), uintptr(param))
+ syscall.SyscallN(procEnumChildWindows.Addr(), uintptr(hwnd), uintptr(enumFunc), uintptr(param))
return
}
func EnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) {
- r1, _, e1 := syscall.Syscall(procEnumWindows.Addr(), 2, uintptr(enumFunc), uintptr(param), 0)
+ r1, _, e1 := syscall.SyscallN(procEnumWindows.Addr(), uintptr(enumFunc), uintptr(param))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4160,7 +4215,7 @@ func EnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) {
}
func ExitWindowsEx(flags uint32, reason uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procExitWindowsEx.Addr(), 2, uintptr(flags), uintptr(reason), 0)
+ r1, _, e1 := syscall.SyscallN(procExitWindowsEx.Addr(), uintptr(flags), uintptr(reason))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4168,7 +4223,7 @@ func ExitWindowsEx(flags uint32, reason uint32) (err error) {
}
func GetClassName(hwnd HWND, className *uint16, maxCount int32) (copied int32, err error) {
- r0, _, e1 := syscall.Syscall(procGetClassNameW.Addr(), 3, uintptr(hwnd), uintptr(unsafe.Pointer(className)), uintptr(maxCount))
+ r0, _, e1 := syscall.SyscallN(procGetClassNameW.Addr(), uintptr(hwnd), uintptr(unsafe.Pointer(className)), uintptr(maxCount))
copied = int32(r0)
if copied == 0 {
err = errnoErr(e1)
@@ -4177,19 +4232,19 @@ func GetClassName(hwnd HWND, className *uint16, maxCount int32) (copied int32, e
}
func GetDesktopWindow() (hwnd HWND) {
- r0, _, _ := syscall.Syscall(procGetDesktopWindow.Addr(), 0, 0, 0, 0)
+ r0, _, _ := syscall.SyscallN(procGetDesktopWindow.Addr())
hwnd = HWND(r0)
return
}
func GetForegroundWindow() (hwnd HWND) {
- r0, _, _ := syscall.Syscall(procGetForegroundWindow.Addr(), 0, 0, 0, 0)
+ r0, _, _ := syscall.SyscallN(procGetForegroundWindow.Addr())
hwnd = HWND(r0)
return
}
func GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) {
- r1, _, e1 := syscall.Syscall(procGetGUIThreadInfo.Addr(), 2, uintptr(thread), uintptr(unsafe.Pointer(info)), 0)
+ r1, _, e1 := syscall.SyscallN(procGetGUIThreadInfo.Addr(), uintptr(thread), uintptr(unsafe.Pointer(info)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4197,19 +4252,19 @@ func GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) {
}
func GetKeyboardLayout(tid uint32) (hkl Handle) {
- r0, _, _ := syscall.Syscall(procGetKeyboardLayout.Addr(), 1, uintptr(tid), 0, 0)
+ r0, _, _ := syscall.SyscallN(procGetKeyboardLayout.Addr(), uintptr(tid))
hkl = Handle(r0)
return
}
func GetShellWindow() (shellWindow HWND) {
- r0, _, _ := syscall.Syscall(procGetShellWindow.Addr(), 0, 0, 0, 0)
+ r0, _, _ := syscall.SyscallN(procGetShellWindow.Addr())
shellWindow = HWND(r0)
return
}
func GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetWindowThreadProcessId.Addr(), 2, uintptr(hwnd), uintptr(unsafe.Pointer(pid)), 0)
+ r0, _, e1 := syscall.SyscallN(procGetWindowThreadProcessId.Addr(), uintptr(hwnd), uintptr(unsafe.Pointer(pid)))
tid = uint32(r0)
if tid == 0 {
err = errnoErr(e1)
@@ -4218,25 +4273,25 @@ func GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) {
}
func IsWindow(hwnd HWND) (isWindow bool) {
- r0, _, _ := syscall.Syscall(procIsWindow.Addr(), 1, uintptr(hwnd), 0, 0)
+ r0, _, _ := syscall.SyscallN(procIsWindow.Addr(), uintptr(hwnd))
isWindow = r0 != 0
return
}
func IsWindowUnicode(hwnd HWND) (isUnicode bool) {
- r0, _, _ := syscall.Syscall(procIsWindowUnicode.Addr(), 1, uintptr(hwnd), 0, 0)
+ r0, _, _ := syscall.SyscallN(procIsWindowUnicode.Addr(), uintptr(hwnd))
isUnicode = r0 != 0
return
}
func IsWindowVisible(hwnd HWND) (isVisible bool) {
- r0, _, _ := syscall.Syscall(procIsWindowVisible.Addr(), 1, uintptr(hwnd), 0, 0)
+ r0, _, _ := syscall.SyscallN(procIsWindowVisible.Addr(), uintptr(hwnd))
isVisible = r0 != 0
return
}
func LoadKeyboardLayout(name *uint16, flags uint32) (hkl Handle, err error) {
- r0, _, e1 := syscall.Syscall(procLoadKeyboardLayoutW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(flags), 0)
+ r0, _, e1 := syscall.SyscallN(procLoadKeyboardLayoutW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(flags))
hkl = Handle(r0)
if hkl == 0 {
err = errnoErr(e1)
@@ -4245,7 +4300,7 @@ func LoadKeyboardLayout(name *uint16, flags uint32) (hkl Handle, err error) {
}
func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) {
- r0, _, e1 := syscall.Syscall6(procMessageBoxW.Addr(), 4, uintptr(hwnd), uintptr(unsafe.Pointer(text)), uintptr(unsafe.Pointer(caption)), uintptr(boxtype), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procMessageBoxW.Addr(), uintptr(hwnd), uintptr(unsafe.Pointer(text)), uintptr(unsafe.Pointer(caption)), uintptr(boxtype))
ret = int32(r0)
if ret == 0 {
err = errnoErr(e1)
@@ -4254,13 +4309,13 @@ func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret i
}
func ToUnicodeEx(vkey uint32, scancode uint32, keystate *byte, pwszBuff *uint16, cchBuff int32, flags uint32, hkl Handle) (ret int32) {
- r0, _, _ := syscall.Syscall9(procToUnicodeEx.Addr(), 7, uintptr(vkey), uintptr(scancode), uintptr(unsafe.Pointer(keystate)), uintptr(unsafe.Pointer(pwszBuff)), uintptr(cchBuff), uintptr(flags), uintptr(hkl), 0, 0)
+ r0, _, _ := syscall.SyscallN(procToUnicodeEx.Addr(), uintptr(vkey), uintptr(scancode), uintptr(unsafe.Pointer(keystate)), uintptr(unsafe.Pointer(pwszBuff)), uintptr(cchBuff), uintptr(flags), uintptr(hkl))
ret = int32(r0)
return
}
func UnloadKeyboardLayout(hkl Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procUnloadKeyboardLayout.Addr(), 1, uintptr(hkl), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procUnloadKeyboardLayout.Addr(), uintptr(hkl))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4272,7 +4327,7 @@ func CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (
if inheritExisting {
_p0 = 1
}
- r1, _, e1 := syscall.Syscall(procCreateEnvironmentBlock.Addr(), 3, uintptr(unsafe.Pointer(block)), uintptr(token), uintptr(_p0))
+ r1, _, e1 := syscall.SyscallN(procCreateEnvironmentBlock.Addr(), uintptr(unsafe.Pointer(block)), uintptr(token), uintptr(_p0))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4280,7 +4335,7 @@ func CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (
}
func DestroyEnvironmentBlock(block *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procDestroyEnvironmentBlock.Addr(), 1, uintptr(unsafe.Pointer(block)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procDestroyEnvironmentBlock.Addr(), uintptr(unsafe.Pointer(block)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4288,7 +4343,7 @@ func DestroyEnvironmentBlock(block *uint16) (err error) {
}
func GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetUserProfileDirectoryW.Addr(), 3, uintptr(t), uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen)))
+ r1, _, e1 := syscall.SyscallN(procGetUserProfileDirectoryW.Addr(), uintptr(t), uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4305,7 +4360,7 @@ func GetFileVersionInfoSize(filename string, zeroHandle *Handle) (bufSize uint32
}
func _GetFileVersionInfoSize(filename *uint16, zeroHandle *Handle) (bufSize uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetFileVersionInfoSizeW.Addr(), 2, uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(zeroHandle)), 0)
+ r0, _, e1 := syscall.SyscallN(procGetFileVersionInfoSizeW.Addr(), uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(zeroHandle)))
bufSize = uint32(r0)
if bufSize == 0 {
err = errnoErr(e1)
@@ -4323,7 +4378,7 @@ func GetFileVersionInfo(filename string, handle uint32, bufSize uint32, buffer u
}
func _GetFileVersionInfo(filename *uint16, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetFileVersionInfoW.Addr(), 4, uintptr(unsafe.Pointer(filename)), uintptr(handle), uintptr(bufSize), uintptr(buffer), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procGetFileVersionInfoW.Addr(), uintptr(unsafe.Pointer(filename)), uintptr(handle), uintptr(bufSize), uintptr(buffer))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4340,7 +4395,7 @@ func VerQueryValue(block unsafe.Pointer, subBlock string, pointerToBufferPointer
}
func _VerQueryValue(block unsafe.Pointer, subBlock *uint16, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procVerQueryValueW.Addr(), 4, uintptr(block), uintptr(unsafe.Pointer(subBlock)), uintptr(pointerToBufferPointer), uintptr(unsafe.Pointer(bufSize)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procVerQueryValueW.Addr(), uintptr(block), uintptr(unsafe.Pointer(subBlock)), uintptr(pointerToBufferPointer), uintptr(unsafe.Pointer(bufSize)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4348,7 +4403,7 @@ func _VerQueryValue(block unsafe.Pointer, subBlock *uint16, pointerToBufferPoint
}
func TimeBeginPeriod(period uint32) (err error) {
- r1, _, e1 := syscall.Syscall(proctimeBeginPeriod.Addr(), 1, uintptr(period), 0, 0)
+ r1, _, e1 := syscall.SyscallN(proctimeBeginPeriod.Addr(), uintptr(period))
if r1 != 0 {
err = errnoErr(e1)
}
@@ -4356,7 +4411,7 @@ func TimeBeginPeriod(period uint32) (err error) {
}
func TimeEndPeriod(period uint32) (err error) {
- r1, _, e1 := syscall.Syscall(proctimeEndPeriod.Addr(), 1, uintptr(period), 0, 0)
+ r1, _, e1 := syscall.SyscallN(proctimeEndPeriod.Addr(), uintptr(period))
if r1 != 0 {
err = errnoErr(e1)
}
@@ -4364,7 +4419,7 @@ func TimeEndPeriod(period uint32) (err error) {
}
func WinVerifyTrustEx(hwnd HWND, actionId *GUID, data *WinTrustData) (ret error) {
- r0, _, _ := syscall.Syscall(procWinVerifyTrustEx.Addr(), 3, uintptr(hwnd), uintptr(unsafe.Pointer(actionId)), uintptr(unsafe.Pointer(data)))
+ r0, _, _ := syscall.SyscallN(procWinVerifyTrustEx.Addr(), uintptr(hwnd), uintptr(unsafe.Pointer(actionId)), uintptr(unsafe.Pointer(data)))
if r0 != 0 {
ret = syscall.Errno(r0)
}
@@ -4372,12 +4427,12 @@ func WinVerifyTrustEx(hwnd HWND, actionId *GUID, data *WinTrustData) (ret error)
}
func FreeAddrInfoW(addrinfo *AddrinfoW) {
- syscall.Syscall(procFreeAddrInfoW.Addr(), 1, uintptr(unsafe.Pointer(addrinfo)), 0, 0)
+ syscall.SyscallN(procFreeAddrInfoW.Addr(), uintptr(unsafe.Pointer(addrinfo)))
return
}
func GetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, result **AddrinfoW) (sockerr error) {
- r0, _, _ := syscall.Syscall6(procGetAddrInfoW.Addr(), 4, uintptr(unsafe.Pointer(nodename)), uintptr(unsafe.Pointer(servicename)), uintptr(unsafe.Pointer(hints)), uintptr(unsafe.Pointer(result)), 0, 0)
+ r0, _, _ := syscall.SyscallN(procGetAddrInfoW.Addr(), uintptr(unsafe.Pointer(nodename)), uintptr(unsafe.Pointer(servicename)), uintptr(unsafe.Pointer(hints)), uintptr(unsafe.Pointer(result)))
if r0 != 0 {
sockerr = syscall.Errno(r0)
}
@@ -4385,7 +4440,7 @@ func GetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, resul
}
func WSACleanup() (err error) {
- r1, _, e1 := syscall.Syscall(procWSACleanup.Addr(), 0, 0, 0, 0)
+ r1, _, e1 := syscall.SyscallN(procWSACleanup.Addr())
if r1 == socket_error {
err = errnoErr(e1)
}
@@ -4393,7 +4448,7 @@ func WSACleanup() (err error) {
}
func WSADuplicateSocket(s Handle, processID uint32, info *WSAProtocolInfo) (err error) {
- r1, _, e1 := syscall.Syscall(procWSADuplicateSocketW.Addr(), 3, uintptr(s), uintptr(processID), uintptr(unsafe.Pointer(info)))
+ r1, _, e1 := syscall.SyscallN(procWSADuplicateSocketW.Addr(), uintptr(s), uintptr(processID), uintptr(unsafe.Pointer(info)))
if r1 != 0 {
err = errnoErr(e1)
}
@@ -4401,7 +4456,7 @@ func WSADuplicateSocket(s Handle, processID uint32, info *WSAProtocolInfo) (err
}
func WSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) {
- r0, _, e1 := syscall.Syscall(procWSAEnumProtocolsW.Addr(), 3, uintptr(unsafe.Pointer(protocols)), uintptr(unsafe.Pointer(protocolBuffer)), uintptr(unsafe.Pointer(bufferLength)))
+ r0, _, e1 := syscall.SyscallN(procWSAEnumProtocolsW.Addr(), uintptr(unsafe.Pointer(protocols)), uintptr(unsafe.Pointer(protocolBuffer)), uintptr(unsafe.Pointer(bufferLength)))
n = int32(r0)
if n == -1 {
err = errnoErr(e1)
@@ -4414,7 +4469,7 @@ func WSAGetOverlappedResult(h Handle, o *Overlapped, bytes *uint32, wait bool, f
if wait {
_p0 = 1
}
- r1, _, e1 := syscall.Syscall6(procWSAGetOverlappedResult.Addr(), 5, uintptr(h), uintptr(unsafe.Pointer(o)), uintptr(unsafe.Pointer(bytes)), uintptr(_p0), uintptr(unsafe.Pointer(flags)), 0)
+ r1, _, e1 := syscall.SyscallN(procWSAGetOverlappedResult.Addr(), uintptr(h), uintptr(unsafe.Pointer(o)), uintptr(unsafe.Pointer(bytes)), uintptr(_p0), uintptr(unsafe.Pointer(flags)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4422,7 +4477,7 @@ func WSAGetOverlappedResult(h Handle, o *Overlapped, bytes *uint32, wait bool, f
}
func WSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbob uint32, cbbr *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) {
- r1, _, e1 := syscall.Syscall9(procWSAIoctl.Addr(), 9, uintptr(s), uintptr(iocc), uintptr(unsafe.Pointer(inbuf)), uintptr(cbif), uintptr(unsafe.Pointer(outbuf)), uintptr(cbob), uintptr(unsafe.Pointer(cbbr)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine))
+ r1, _, e1 := syscall.SyscallN(procWSAIoctl.Addr(), uintptr(s), uintptr(iocc), uintptr(unsafe.Pointer(inbuf)), uintptr(cbif), uintptr(unsafe.Pointer(outbuf)), uintptr(cbob), uintptr(unsafe.Pointer(cbbr)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine))
if r1 == socket_error {
err = errnoErr(e1)
}
@@ -4430,7 +4485,7 @@ func WSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbo
}
func WSALookupServiceBegin(querySet *WSAQUERYSET, flags uint32, handle *Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procWSALookupServiceBeginW.Addr(), 3, uintptr(unsafe.Pointer(querySet)), uintptr(flags), uintptr(unsafe.Pointer(handle)))
+ r1, _, e1 := syscall.SyscallN(procWSALookupServiceBeginW.Addr(), uintptr(unsafe.Pointer(querySet)), uintptr(flags), uintptr(unsafe.Pointer(handle)))
if r1 == socket_error {
err = errnoErr(e1)
}
@@ -4438,7 +4493,7 @@ func WSALookupServiceBegin(querySet *WSAQUERYSET, flags uint32, handle *Handle)
}
func WSALookupServiceEnd(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procWSALookupServiceEnd.Addr(), 1, uintptr(handle), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procWSALookupServiceEnd.Addr(), uintptr(handle))
if r1 == socket_error {
err = errnoErr(e1)
}
@@ -4446,7 +4501,7 @@ func WSALookupServiceEnd(handle Handle) (err error) {
}
func WSALookupServiceNext(handle Handle, flags uint32, size *int32, querySet *WSAQUERYSET) (err error) {
- r1, _, e1 := syscall.Syscall6(procWSALookupServiceNextW.Addr(), 4, uintptr(handle), uintptr(flags), uintptr(unsafe.Pointer(size)), uintptr(unsafe.Pointer(querySet)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procWSALookupServiceNextW.Addr(), uintptr(handle), uintptr(flags), uintptr(unsafe.Pointer(size)), uintptr(unsafe.Pointer(querySet)))
if r1 == socket_error {
err = errnoErr(e1)
}
@@ -4454,7 +4509,7 @@ func WSALookupServiceNext(handle Handle, flags uint32, size *int32, querySet *WS
}
func WSARecv(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, overlapped *Overlapped, croutine *byte) (err error) {
- r1, _, e1 := syscall.Syscall9(procWSARecv.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procWSARecv.Addr(), uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
if r1 == socket_error {
err = errnoErr(e1)
}
@@ -4462,7 +4517,7 @@ func WSARecv(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32
}
func WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) {
- r1, _, e1 := syscall.Syscall9(procWSARecvFrom.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
+ r1, _, e1 := syscall.SyscallN(procWSARecvFrom.Addr(), uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
if r1 == socket_error {
err = errnoErr(e1)
}
@@ -4470,7 +4525,7 @@ func WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *ui
}
func WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) {
- r1, _, e1 := syscall.Syscall9(procWSASend.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procWSASend.Addr(), uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
if r1 == socket_error {
err = errnoErr(e1)
}
@@ -4478,7 +4533,7 @@ func WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32,
}
func WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) {
- r1, _, e1 := syscall.Syscall9(procWSASendTo.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(to)), uintptr(tolen), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
+ r1, _, e1 := syscall.SyscallN(procWSASendTo.Addr(), uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(to)), uintptr(tolen), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
if r1 == socket_error {
err = errnoErr(e1)
}
@@ -4486,7 +4541,7 @@ func WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32
}
func WSASocket(af int32, typ int32, protocol int32, protoInfo *WSAProtocolInfo, group uint32, flags uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall6(procWSASocketW.Addr(), 6, uintptr(af), uintptr(typ), uintptr(protocol), uintptr(unsafe.Pointer(protoInfo)), uintptr(group), uintptr(flags))
+ r0, _, e1 := syscall.SyscallN(procWSASocketW.Addr(), uintptr(af), uintptr(typ), uintptr(protocol), uintptr(unsafe.Pointer(protoInfo)), uintptr(group), uintptr(flags))
handle = Handle(r0)
if handle == InvalidHandle {
err = errnoErr(e1)
@@ -4495,7 +4550,7 @@ func WSASocket(af int32, typ int32, protocol int32, protoInfo *WSAProtocolInfo,
}
func WSAStartup(verreq uint32, data *WSAData) (sockerr error) {
- r0, _, _ := syscall.Syscall(procWSAStartup.Addr(), 2, uintptr(verreq), uintptr(unsafe.Pointer(data)), 0)
+ r0, _, _ := syscall.SyscallN(procWSAStartup.Addr(), uintptr(verreq), uintptr(unsafe.Pointer(data)))
if r0 != 0 {
sockerr = syscall.Errno(r0)
}
@@ -4503,7 +4558,7 @@ func WSAStartup(verreq uint32, data *WSAData) (sockerr error) {
}
func bind(s Handle, name unsafe.Pointer, namelen int32) (err error) {
- r1, _, e1 := syscall.Syscall(procbind.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen))
+ r1, _, e1 := syscall.SyscallN(procbind.Addr(), uintptr(s), uintptr(name), uintptr(namelen))
if r1 == socket_error {
err = errnoErr(e1)
}
@@ -4511,7 +4566,7 @@ func bind(s Handle, name unsafe.Pointer, namelen int32) (err error) {
}
func Closesocket(s Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procclosesocket.Addr(), 1, uintptr(s), 0, 0)
+ r1, _, e1 := syscall.SyscallN(procclosesocket.Addr(), uintptr(s))
if r1 == socket_error {
err = errnoErr(e1)
}
@@ -4519,7 +4574,7 @@ func Closesocket(s Handle) (err error) {
}
func connect(s Handle, name unsafe.Pointer, namelen int32) (err error) {
- r1, _, e1 := syscall.Syscall(procconnect.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen))
+ r1, _, e1 := syscall.SyscallN(procconnect.Addr(), uintptr(s), uintptr(name), uintptr(namelen))
if r1 == socket_error {
err = errnoErr(e1)
}
@@ -4536,7 +4591,7 @@ func GetHostByName(name string) (h *Hostent, err error) {
}
func _GetHostByName(name *byte) (h *Hostent, err error) {
- r0, _, e1 := syscall.Syscall(procgethostbyname.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procgethostbyname.Addr(), uintptr(unsafe.Pointer(name)))
h = (*Hostent)(unsafe.Pointer(r0))
if h == nil {
err = errnoErr(e1)
@@ -4545,7 +4600,7 @@ func _GetHostByName(name *byte) (h *Hostent, err error) {
}
func getpeername(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {
- r1, _, e1 := syscall.Syscall(procgetpeername.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ r1, _, e1 := syscall.SyscallN(procgetpeername.Addr(), uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if r1 == socket_error {
err = errnoErr(e1)
}
@@ -4562,7 +4617,7 @@ func GetProtoByName(name string) (p *Protoent, err error) {
}
func _GetProtoByName(name *byte) (p *Protoent, err error) {
- r0, _, e1 := syscall.Syscall(procgetprotobyname.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0)
+ r0, _, e1 := syscall.SyscallN(procgetprotobyname.Addr(), uintptr(unsafe.Pointer(name)))
p = (*Protoent)(unsafe.Pointer(r0))
if p == nil {
err = errnoErr(e1)
@@ -4585,7 +4640,7 @@ func GetServByName(name string, proto string) (s *Servent, err error) {
}
func _GetServByName(name *byte, proto *byte) (s *Servent, err error) {
- r0, _, e1 := syscall.Syscall(procgetservbyname.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(proto)), 0)
+ r0, _, e1 := syscall.SyscallN(procgetservbyname.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(proto)))
s = (*Servent)(unsafe.Pointer(r0))
if s == nil {
err = errnoErr(e1)
@@ -4594,7 +4649,7 @@ func _GetServByName(name *byte, proto *byte) (s *Servent, err error) {
}
func getsockname(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {
- r1, _, e1 := syscall.Syscall(procgetsockname.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ r1, _, e1 := syscall.SyscallN(procgetsockname.Addr(), uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if r1 == socket_error {
err = errnoErr(e1)
}
@@ -4602,7 +4657,7 @@ func getsockname(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {
}
func Getsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int32) (err error) {
- r1, _, e1 := syscall.Syscall6(procgetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(unsafe.Pointer(optlen)), 0)
+ r1, _, e1 := syscall.SyscallN(procgetsockopt.Addr(), uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(unsafe.Pointer(optlen)))
if r1 == socket_error {
err = errnoErr(e1)
}
@@ -4610,7 +4665,7 @@ func Getsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int3
}
func listen(s Handle, backlog int32) (err error) {
- r1, _, e1 := syscall.Syscall(proclisten.Addr(), 2, uintptr(s), uintptr(backlog), 0)
+ r1, _, e1 := syscall.SyscallN(proclisten.Addr(), uintptr(s), uintptr(backlog))
if r1 == socket_error {
err = errnoErr(e1)
}
@@ -4618,7 +4673,7 @@ func listen(s Handle, backlog int32) (err error) {
}
func Ntohs(netshort uint16) (u uint16) {
- r0, _, _ := syscall.Syscall(procntohs.Addr(), 1, uintptr(netshort), 0, 0)
+ r0, _, _ := syscall.SyscallN(procntohs.Addr(), uintptr(netshort))
u = uint16(r0)
return
}
@@ -4628,7 +4683,7 @@ func recvfrom(s Handle, buf []byte, flags int32, from *RawSockaddrAny, fromlen *
if len(buf) > 0 {
_p0 = &buf[0]
}
- r0, _, e1 := syscall.Syscall6(procrecvfrom.Addr(), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ r0, _, e1 := syscall.SyscallN(procrecvfrom.Addr(), uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
n = int32(r0)
if n == -1 {
err = errnoErr(e1)
@@ -4641,7 +4696,7 @@ func sendto(s Handle, buf []byte, flags int32, to unsafe.Pointer, tolen int32) (
if len(buf) > 0 {
_p0 = &buf[0]
}
- r1, _, e1 := syscall.Syscall6(procsendto.Addr(), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(tolen))
+ r1, _, e1 := syscall.SyscallN(procsendto.Addr(), uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(tolen))
if r1 == socket_error {
err = errnoErr(e1)
}
@@ -4649,7 +4704,7 @@ func sendto(s Handle, buf []byte, flags int32, to unsafe.Pointer, tolen int32) (
}
func Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32) (err error) {
- r1, _, e1 := syscall.Syscall6(procsetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(optlen), 0)
+ r1, _, e1 := syscall.SyscallN(procsetsockopt.Addr(), uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(optlen))
if r1 == socket_error {
err = errnoErr(e1)
}
@@ -4657,7 +4712,7 @@ func Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32
}
func shutdown(s Handle, how int32) (err error) {
- r1, _, e1 := syscall.Syscall(procshutdown.Addr(), 2, uintptr(s), uintptr(how), 0)
+ r1, _, e1 := syscall.SyscallN(procshutdown.Addr(), uintptr(s), uintptr(how))
if r1 == socket_error {
err = errnoErr(e1)
}
@@ -4665,7 +4720,7 @@ func shutdown(s Handle, how int32) (err error) {
}
func socket(af int32, typ int32, protocol int32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procsocket.Addr(), 3, uintptr(af), uintptr(typ), uintptr(protocol))
+ r0, _, e1 := syscall.SyscallN(procsocket.Addr(), uintptr(af), uintptr(typ), uintptr(protocol))
handle = Handle(r0)
if handle == InvalidHandle {
err = errnoErr(e1)
@@ -4674,7 +4729,7 @@ func socket(af int32, typ int32, protocol int32) (handle Handle, err error) {
}
func WTSEnumerateSessions(handle Handle, reserved uint32, version uint32, sessions **WTS_SESSION_INFO, count *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procWTSEnumerateSessionsW.Addr(), 5, uintptr(handle), uintptr(reserved), uintptr(version), uintptr(unsafe.Pointer(sessions)), uintptr(unsafe.Pointer(count)), 0)
+ r1, _, e1 := syscall.SyscallN(procWTSEnumerateSessionsW.Addr(), uintptr(handle), uintptr(reserved), uintptr(version), uintptr(unsafe.Pointer(sessions)), uintptr(unsafe.Pointer(count)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -4682,12 +4737,12 @@ func WTSEnumerateSessions(handle Handle, reserved uint32, version uint32, sessio
}
func WTSFreeMemory(ptr uintptr) {
- syscall.Syscall(procWTSFreeMemory.Addr(), 1, uintptr(ptr), 0, 0)
+ syscall.SyscallN(procWTSFreeMemory.Addr(), uintptr(ptr))
return
}
func WTSQueryUserToken(session uint32, token *Token) (err error) {
- r1, _, e1 := syscall.Syscall(procWTSQueryUserToken.Addr(), 2, uintptr(session), uintptr(unsafe.Pointer(token)), 0)
+ r1, _, e1 := syscall.SyscallN(procWTSQueryUserToken.Addr(), uintptr(session), uintptr(unsafe.Pointer(token)))
if r1 == 0 {
err = errnoErr(e1)
}
diff --git a/hack/tools/vendor/golang.org/x/term/term_windows.go b/hack/tools/vendor/golang.org/x/term/term_windows.go
index df6bf948e140..0ddd81c02a69 100644
--- a/hack/tools/vendor/golang.org/x/term/term_windows.go
+++ b/hack/tools/vendor/golang.org/x/term/term_windows.go
@@ -20,12 +20,14 @@ func isTerminal(fd int) bool {
return err == nil
}
+// This is intended to be used on a console input handle.
+// See https://learn.microsoft.com/en-us/windows/console/setconsolemode
func makeRaw(fd int) (*State, error) {
var st uint32
if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil {
return nil, err
}
- raw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT)
+ raw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT)
raw |= windows.ENABLE_VIRTUAL_TERMINAL_INPUT
if err := windows.SetConsoleMode(windows.Handle(fd), raw); err != nil {
return nil, err
diff --git a/hack/tools/vendor/golang.org/x/term/terminal.go b/hack/tools/vendor/golang.org/x/term/terminal.go
index 13e9a64ad10a..9255449b9b32 100644
--- a/hack/tools/vendor/golang.org/x/term/terminal.go
+++ b/hack/tools/vendor/golang.org/x/term/terminal.go
@@ -146,6 +146,7 @@ const (
keyCtrlD = 4
keyCtrlU = 21
keyEnter = '\r'
+ keyLF = '\n'
keyEscape = 27
keyBackspace = 127
keyUnknown = 0xd800 /* UTF-16 surrogate area */ + iota
@@ -412,7 +413,7 @@ func (t *Terminal) eraseNPreviousChars(n int) {
}
}
-// countToLeftWord returns then number of characters from the cursor to the
+// countToLeftWord returns the number of characters from the cursor to the
// start of the previous word.
func (t *Terminal) countToLeftWord() int {
if t.pos == 0 {
@@ -437,7 +438,7 @@ func (t *Terminal) countToLeftWord() int {
return t.pos - pos
}
-// countToRightWord returns then number of characters from the cursor to the
+// countToRightWord returns the number of characters from the cursor to the
// start of the next word.
func (t *Terminal) countToRightWord() int {
pos := t.pos
@@ -477,7 +478,7 @@ func visualLength(runes []rune) int {
return length
}
-// histroryAt unlocks the terminal and relocks it while calling History.At.
+// historyAt unlocks the terminal and relocks it while calling History.At.
func (t *Terminal) historyAt(idx int) (string, bool) {
t.lock.Unlock() // Unlock to avoid deadlock if History methods use the output writer.
defer t.lock.Lock() // panic in At (or Len) protection.
@@ -497,7 +498,7 @@ func (t *Terminal) historyAdd(entry string) {
// handleKey processes the given key and, optionally, returns a line of text
// that the user has entered.
func (t *Terminal) handleKey(key rune) (line string, ok bool) {
- if t.pasteActive && key != keyEnter {
+ if t.pasteActive && key != keyEnter && key != keyLF {
t.addKeyToLine(key)
return
}
@@ -567,7 +568,7 @@ func (t *Terminal) handleKey(key rune) (line string, ok bool) {
t.setLine(runes, len(runes))
}
}
- case keyEnter:
+ case keyEnter, keyLF:
t.moveCursorToPos(len(t.line))
t.queue([]rune("\r\n"))
line = string(t.line)
@@ -812,6 +813,10 @@ func (t *Terminal) readLine() (line string, err error) {
if !t.pasteActive {
lineIsPasted = false
}
+ // If we have CR, consume LF if present (CRLF sequence) to avoid returning an extra empty line.
+ if key == keyEnter && len(rest) > 0 && rest[0] == keyLF {
+ rest = rest[1:]
+ }
line, lineOk = t.handleKey(key)
}
if len(rest) > 0 {
diff --git a/hack/tools/vendor/golang.org/x/text/unicode/bidi/core.go b/hack/tools/vendor/golang.org/x/text/unicode/bidi/core.go
index 9d2ae547b5ed..fb8273236dde 100644
--- a/hack/tools/vendor/golang.org/x/text/unicode/bidi/core.go
+++ b/hack/tools/vendor/golang.org/x/text/unicode/bidi/core.go
@@ -427,13 +427,6 @@ type isolatingRunSequence struct {
func (i *isolatingRunSequence) Len() int { return len(i.indexes) }
-func maxLevel(a, b level) level {
- if a > b {
- return a
- }
- return b
-}
-
// Rule X10, second bullet: Determine the start-of-sequence (sos) and end-of-sequence (eos) types,
// either L or R, for each isolating run sequence.
func (p *paragraph) isolatingRunSequence(indexes []int) *isolatingRunSequence {
@@ -474,8 +467,8 @@ func (p *paragraph) isolatingRunSequence(indexes []int) *isolatingRunSequence {
indexes: indexes,
types: types,
level: level,
- sos: typeForLevel(maxLevel(prevLevel, level)),
- eos: typeForLevel(maxLevel(succLevel, level)),
+ sos: typeForLevel(max(prevLevel, level)),
+ eos: typeForLevel(max(succLevel, level)),
}
}
diff --git a/hack/tools/vendor/golang.org/x/time/rate/rate.go b/hack/tools/vendor/golang.org/x/time/rate/rate.go
index 794b2e32bfaa..563270c15494 100644
--- a/hack/tools/vendor/golang.org/x/time/rate/rate.go
+++ b/hack/tools/vendor/golang.org/x/time/rate/rate.go
@@ -195,7 +195,7 @@ func (r *Reservation) CancelAt(t time.Time) {
// update state
r.lim.last = t
r.lim.tokens = tokens
- if r.timeToAct == r.lim.lastEvent {
+ if r.timeToAct.Equal(r.lim.lastEvent) {
prevEvent := r.timeToAct.Add(r.limit.durationFromTokens(float64(-r.tokens)))
if !prevEvent.Before(t) {
r.lim.lastEvent = prevEvent
diff --git a/hack/tools/vendor/golang.org/x/tools/go/ast/edge/edge.go b/hack/tools/vendor/golang.org/x/tools/go/ast/edge/edge.go
new file mode 100644
index 000000000000..4f6ccfd6e5e2
--- /dev/null
+++ b/hack/tools/vendor/golang.org/x/tools/go/ast/edge/edge.go
@@ -0,0 +1,295 @@
+// Copyright 2025 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package edge defines identifiers for each field of an ast.Node
+// struct type that refers to another Node.
+package edge
+
+import (
+ "fmt"
+ "go/ast"
+ "reflect"
+)
+
+// A Kind describes a field of an ast.Node struct.
+type Kind uint8
+
+// String returns a description of the edge kind.
+func (k Kind) String() string {
+ if k == Invalid {
+ return ""
+ }
+ info := fieldInfos[k]
+ return fmt.Sprintf("%v.%s", info.nodeType.Elem().Name(), info.name)
+}
+
+// NodeType returns the pointer-to-struct type of the ast.Node implementation.
+func (k Kind) NodeType() reflect.Type { return fieldInfos[k].nodeType }
+
+// FieldName returns the name of the field.
+func (k Kind) FieldName() string { return fieldInfos[k].name }
+
+// FieldType returns the declared type of the field.
+func (k Kind) FieldType() reflect.Type { return fieldInfos[k].fieldType }
+
+// Get returns the direct child of n identified by (k, idx).
+// n's type must match k.NodeType().
+// idx must be a valid slice index, or -1 for a non-slice.
+func (k Kind) Get(n ast.Node, idx int) ast.Node {
+ if k.NodeType() != reflect.TypeOf(n) {
+ panic(fmt.Sprintf("%v.Get(%T): invalid node type", k, n))
+ }
+ v := reflect.ValueOf(n).Elem().Field(fieldInfos[k].index)
+ if idx != -1 {
+ v = v.Index(idx) // asserts valid index
+ } else {
+ // (The type assertion below asserts that v is not a slice.)
+ }
+ return v.Interface().(ast.Node) // may be nil
+}
+
+const (
+ Invalid Kind = iota // for nodes at the root of the traversal
+
+ // Kinds are sorted alphabetically.
+ // Numbering is not stable.
+ // Each is named Type_Field, where Type is the
+ // ast.Node struct type and Field is the name of the field
+
+ ArrayType_Elt
+ ArrayType_Len
+ AssignStmt_Lhs
+ AssignStmt_Rhs
+ BinaryExpr_X
+ BinaryExpr_Y
+ BlockStmt_List
+ BranchStmt_Label
+ CallExpr_Args
+ CallExpr_Fun
+ CaseClause_Body
+ CaseClause_List
+ ChanType_Value
+ CommClause_Body
+ CommClause_Comm
+ CommentGroup_List
+ CompositeLit_Elts
+ CompositeLit_Type
+ DeclStmt_Decl
+ DeferStmt_Call
+ Ellipsis_Elt
+ ExprStmt_X
+ FieldList_List
+ Field_Comment
+ Field_Doc
+ Field_Names
+ Field_Tag
+ Field_Type
+ File_Decls
+ File_Doc
+ File_Name
+ ForStmt_Body
+ ForStmt_Cond
+ ForStmt_Init
+ ForStmt_Post
+ FuncDecl_Body
+ FuncDecl_Doc
+ FuncDecl_Name
+ FuncDecl_Recv
+ FuncDecl_Type
+ FuncLit_Body
+ FuncLit_Type
+ FuncType_Params
+ FuncType_Results
+ FuncType_TypeParams
+ GenDecl_Doc
+ GenDecl_Specs
+ GoStmt_Call
+ IfStmt_Body
+ IfStmt_Cond
+ IfStmt_Else
+ IfStmt_Init
+ ImportSpec_Comment
+ ImportSpec_Doc
+ ImportSpec_Name
+ ImportSpec_Path
+ IncDecStmt_X
+ IndexExpr_Index
+ IndexExpr_X
+ IndexListExpr_Indices
+ IndexListExpr_X
+ InterfaceType_Methods
+ KeyValueExpr_Key
+ KeyValueExpr_Value
+ LabeledStmt_Label
+ LabeledStmt_Stmt
+ MapType_Key
+ MapType_Value
+ ParenExpr_X
+ RangeStmt_Body
+ RangeStmt_Key
+ RangeStmt_Value
+ RangeStmt_X
+ ReturnStmt_Results
+ SelectStmt_Body
+ SelectorExpr_Sel
+ SelectorExpr_X
+ SendStmt_Chan
+ SendStmt_Value
+ SliceExpr_High
+ SliceExpr_Low
+ SliceExpr_Max
+ SliceExpr_X
+ StarExpr_X
+ StructType_Fields
+ SwitchStmt_Body
+ SwitchStmt_Init
+ SwitchStmt_Tag
+ TypeAssertExpr_Type
+ TypeAssertExpr_X
+ TypeSpec_Comment
+ TypeSpec_Doc
+ TypeSpec_Name
+ TypeSpec_Type
+ TypeSpec_TypeParams
+ TypeSwitchStmt_Assign
+ TypeSwitchStmt_Body
+ TypeSwitchStmt_Init
+ UnaryExpr_X
+ ValueSpec_Comment
+ ValueSpec_Doc
+ ValueSpec_Names
+ ValueSpec_Type
+ ValueSpec_Values
+
+ maxKind
+)
+
+// Assert that the encoding fits in 7 bits,
+// as the inspector relies on this.
+// (We are currently at 104.)
+var _ = [1 << 7]struct{}{}[maxKind]
+
+type fieldInfo struct {
+ nodeType reflect.Type // pointer-to-struct type of ast.Node implementation
+ name string
+ index int
+ fieldType reflect.Type
+}
+
+func info[N ast.Node](fieldName string) fieldInfo {
+ nodePtrType := reflect.TypeFor[N]()
+ f, ok := nodePtrType.Elem().FieldByName(fieldName)
+ if !ok {
+ panic(fieldName)
+ }
+ return fieldInfo{nodePtrType, fieldName, f.Index[0], f.Type}
+}
+
+var fieldInfos = [...]fieldInfo{
+ Invalid: {},
+ ArrayType_Elt: info[*ast.ArrayType]("Elt"),
+ ArrayType_Len: info[*ast.ArrayType]("Len"),
+ AssignStmt_Lhs: info[*ast.AssignStmt]("Lhs"),
+ AssignStmt_Rhs: info[*ast.AssignStmt]("Rhs"),
+ BinaryExpr_X: info[*ast.BinaryExpr]("X"),
+ BinaryExpr_Y: info[*ast.BinaryExpr]("Y"),
+ BlockStmt_List: info[*ast.BlockStmt]("List"),
+ BranchStmt_Label: info[*ast.BranchStmt]("Label"),
+ CallExpr_Args: info[*ast.CallExpr]("Args"),
+ CallExpr_Fun: info[*ast.CallExpr]("Fun"),
+ CaseClause_Body: info[*ast.CaseClause]("Body"),
+ CaseClause_List: info[*ast.CaseClause]("List"),
+ ChanType_Value: info[*ast.ChanType]("Value"),
+ CommClause_Body: info[*ast.CommClause]("Body"),
+ CommClause_Comm: info[*ast.CommClause]("Comm"),
+ CommentGroup_List: info[*ast.CommentGroup]("List"),
+ CompositeLit_Elts: info[*ast.CompositeLit]("Elts"),
+ CompositeLit_Type: info[*ast.CompositeLit]("Type"),
+ DeclStmt_Decl: info[*ast.DeclStmt]("Decl"),
+ DeferStmt_Call: info[*ast.DeferStmt]("Call"),
+ Ellipsis_Elt: info[*ast.Ellipsis]("Elt"),
+ ExprStmt_X: info[*ast.ExprStmt]("X"),
+ FieldList_List: info[*ast.FieldList]("List"),
+ Field_Comment: info[*ast.Field]("Comment"),
+ Field_Doc: info[*ast.Field]("Doc"),
+ Field_Names: info[*ast.Field]("Names"),
+ Field_Tag: info[*ast.Field]("Tag"),
+ Field_Type: info[*ast.Field]("Type"),
+ File_Decls: info[*ast.File]("Decls"),
+ File_Doc: info[*ast.File]("Doc"),
+ File_Name: info[*ast.File]("Name"),
+ ForStmt_Body: info[*ast.ForStmt]("Body"),
+ ForStmt_Cond: info[*ast.ForStmt]("Cond"),
+ ForStmt_Init: info[*ast.ForStmt]("Init"),
+ ForStmt_Post: info[*ast.ForStmt]("Post"),
+ FuncDecl_Body: info[*ast.FuncDecl]("Body"),
+ FuncDecl_Doc: info[*ast.FuncDecl]("Doc"),
+ FuncDecl_Name: info[*ast.FuncDecl]("Name"),
+ FuncDecl_Recv: info[*ast.FuncDecl]("Recv"),
+ FuncDecl_Type: info[*ast.FuncDecl]("Type"),
+ FuncLit_Body: info[*ast.FuncLit]("Body"),
+ FuncLit_Type: info[*ast.FuncLit]("Type"),
+ FuncType_Params: info[*ast.FuncType]("Params"),
+ FuncType_Results: info[*ast.FuncType]("Results"),
+ FuncType_TypeParams: info[*ast.FuncType]("TypeParams"),
+ GenDecl_Doc: info[*ast.GenDecl]("Doc"),
+ GenDecl_Specs: info[*ast.GenDecl]("Specs"),
+ GoStmt_Call: info[*ast.GoStmt]("Call"),
+ IfStmt_Body: info[*ast.IfStmt]("Body"),
+ IfStmt_Cond: info[*ast.IfStmt]("Cond"),
+ IfStmt_Else: info[*ast.IfStmt]("Else"),
+ IfStmt_Init: info[*ast.IfStmt]("Init"),
+ ImportSpec_Comment: info[*ast.ImportSpec]("Comment"),
+ ImportSpec_Doc: info[*ast.ImportSpec]("Doc"),
+ ImportSpec_Name: info[*ast.ImportSpec]("Name"),
+ ImportSpec_Path: info[*ast.ImportSpec]("Path"),
+ IncDecStmt_X: info[*ast.IncDecStmt]("X"),
+ IndexExpr_Index: info[*ast.IndexExpr]("Index"),
+ IndexExpr_X: info[*ast.IndexExpr]("X"),
+ IndexListExpr_Indices: info[*ast.IndexListExpr]("Indices"),
+ IndexListExpr_X: info[*ast.IndexListExpr]("X"),
+ InterfaceType_Methods: info[*ast.InterfaceType]("Methods"),
+ KeyValueExpr_Key: info[*ast.KeyValueExpr]("Key"),
+ KeyValueExpr_Value: info[*ast.KeyValueExpr]("Value"),
+ LabeledStmt_Label: info[*ast.LabeledStmt]("Label"),
+ LabeledStmt_Stmt: info[*ast.LabeledStmt]("Stmt"),
+ MapType_Key: info[*ast.MapType]("Key"),
+ MapType_Value: info[*ast.MapType]("Value"),
+ ParenExpr_X: info[*ast.ParenExpr]("X"),
+ RangeStmt_Body: info[*ast.RangeStmt]("Body"),
+ RangeStmt_Key: info[*ast.RangeStmt]("Key"),
+ RangeStmt_Value: info[*ast.RangeStmt]("Value"),
+ RangeStmt_X: info[*ast.RangeStmt]("X"),
+ ReturnStmt_Results: info[*ast.ReturnStmt]("Results"),
+ SelectStmt_Body: info[*ast.SelectStmt]("Body"),
+ SelectorExpr_Sel: info[*ast.SelectorExpr]("Sel"),
+ SelectorExpr_X: info[*ast.SelectorExpr]("X"),
+ SendStmt_Chan: info[*ast.SendStmt]("Chan"),
+ SendStmt_Value: info[*ast.SendStmt]("Value"),
+ SliceExpr_High: info[*ast.SliceExpr]("High"),
+ SliceExpr_Low: info[*ast.SliceExpr]("Low"),
+ SliceExpr_Max: info[*ast.SliceExpr]("Max"),
+ SliceExpr_X: info[*ast.SliceExpr]("X"),
+ StarExpr_X: info[*ast.StarExpr]("X"),
+ StructType_Fields: info[*ast.StructType]("Fields"),
+ SwitchStmt_Body: info[*ast.SwitchStmt]("Body"),
+ SwitchStmt_Init: info[*ast.SwitchStmt]("Init"),
+ SwitchStmt_Tag: info[*ast.SwitchStmt]("Tag"),
+ TypeAssertExpr_Type: info[*ast.TypeAssertExpr]("Type"),
+ TypeAssertExpr_X: info[*ast.TypeAssertExpr]("X"),
+ TypeSpec_Comment: info[*ast.TypeSpec]("Comment"),
+ TypeSpec_Doc: info[*ast.TypeSpec]("Doc"),
+ TypeSpec_Name: info[*ast.TypeSpec]("Name"),
+ TypeSpec_Type: info[*ast.TypeSpec]("Type"),
+ TypeSpec_TypeParams: info[*ast.TypeSpec]("TypeParams"),
+ TypeSwitchStmt_Assign: info[*ast.TypeSwitchStmt]("Assign"),
+ TypeSwitchStmt_Body: info[*ast.TypeSwitchStmt]("Body"),
+ TypeSwitchStmt_Init: info[*ast.TypeSwitchStmt]("Init"),
+ UnaryExpr_X: info[*ast.UnaryExpr]("X"),
+ ValueSpec_Comment: info[*ast.ValueSpec]("Comment"),
+ ValueSpec_Doc: info[*ast.ValueSpec]("Doc"),
+ ValueSpec_Names: info[*ast.ValueSpec]("Names"),
+ ValueSpec_Type: info[*ast.ValueSpec]("Type"),
+ ValueSpec_Values: info[*ast.ValueSpec]("Values"),
+}
diff --git a/hack/tools/vendor/golang.org/x/tools/go/ast/inspector/cursor.go b/hack/tools/vendor/golang.org/x/tools/go/ast/inspector/cursor.go
new file mode 100644
index 000000000000..7e72d3c284b8
--- /dev/null
+++ b/hack/tools/vendor/golang.org/x/tools/go/ast/inspector/cursor.go
@@ -0,0 +1,502 @@
+// Copyright 2025 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package inspector
+
+import (
+ "fmt"
+ "go/ast"
+ "go/token"
+ "iter"
+ "reflect"
+
+ "golang.org/x/tools/go/ast/edge"
+)
+
+// A Cursor represents an [ast.Node]. It is immutable.
+//
+// Two Cursors compare equal if they represent the same node.
+//
+// Call [Inspector.Root] to obtain a valid cursor for the virtual root
+// node of the traversal.
+//
+// Use the following methods to navigate efficiently around the tree:
+// - for ancestors, use [Cursor.Parent] and [Cursor.Enclosing];
+// - for children, use [Cursor.Child], [Cursor.Children],
+// [Cursor.FirstChild], and [Cursor.LastChild];
+// - for siblings, use [Cursor.PrevSibling] and [Cursor.NextSibling];
+// - for descendants, use [Cursor.FindByPos], [Cursor.FindNode],
+// [Cursor.Inspect], and [Cursor.Preorder].
+//
+// Use the [Cursor.ChildAt] and [Cursor.ParentEdge] methods for
+// information about the edges in a tree: which field (and slice
+// element) of the parent node holds the child.
+type Cursor struct {
+ in *Inspector
+ index int32 // index of push node; -1 for virtual root node
+}
+
+// Root returns a cursor for the virtual root node,
+// whose children are the files provided to [New].
+//
+// Its [Cursor.Node] method return nil.
+func (in *Inspector) Root() Cursor {
+ return Cursor{in, -1}
+}
+
+// At returns the cursor at the specified index in the traversal,
+// which must have been obtained from [Cursor.Index] on a Cursor
+// belonging to the same Inspector (see [Cursor.Inspector]).
+func (in *Inspector) At(index int32) Cursor {
+ if index < 0 {
+ panic("negative index")
+ }
+ if int(index) >= len(in.events) {
+ panic("index out of range for this inspector")
+ }
+ if in.events[index].index < index {
+ panic("invalid index") // (a push, not a pop)
+ }
+ return Cursor{in, index}
+}
+
+// Inspector returns the cursor's Inspector.
+func (c Cursor) Inspector() *Inspector { return c.in }
+
+// Index returns the index of this cursor position within the package.
+//
+// Clients should not assume anything about the numeric Index value
+// except that it increases monotonically throughout the traversal.
+// It is provided for use with [At].
+//
+// Index must not be called on the Root node.
+func (c Cursor) Index() int32 {
+ if c.index < 0 {
+ panic("Index called on Root node")
+ }
+ return c.index
+}
+
+// Node returns the node at the current cursor position,
+// or nil for the cursor returned by [Inspector.Root].
+func (c Cursor) Node() ast.Node {
+ if c.index < 0 {
+ return nil
+ }
+ return c.in.events[c.index].node
+}
+
+// String returns information about the cursor's node, if any.
+func (c Cursor) String() string {
+ if c.in == nil {
+ return "(invalid)"
+ }
+ if c.index < 0 {
+ return "(root)"
+ }
+ return reflect.TypeOf(c.Node()).String()
+}
+
+// indices return the [start, end) half-open interval of event indices.
+func (c Cursor) indices() (int32, int32) {
+ if c.index < 0 {
+ return 0, int32(len(c.in.events)) // root: all events
+ } else {
+ return c.index, c.in.events[c.index].index + 1 // just one subtree
+ }
+}
+
+// Preorder returns an iterator over the nodes of the subtree
+// represented by c in depth-first order. Each node in the sequence is
+// represented by a Cursor that allows access to the Node, but may
+// also be used to start a new traversal, or to obtain the stack of
+// nodes enclosing the cursor.
+//
+// The traversal sequence is determined by [ast.Inspect]. The types
+// argument, if non-empty, enables type-based filtering of events. The
+// function f if is called only for nodes whose type matches an
+// element of the types slice.
+//
+// If you need control over descent into subtrees,
+// or need both pre- and post-order notifications, use [Cursor.Inspect]
+func (c Cursor) Preorder(types ...ast.Node) iter.Seq[Cursor] {
+ mask := maskOf(types)
+
+ return func(yield func(Cursor) bool) {
+ events := c.in.events
+
+ for i, limit := c.indices(); i < limit; {
+ ev := events[i]
+ if ev.index > i { // push?
+ if ev.typ&mask != 0 && !yield(Cursor{c.in, i}) {
+ break
+ }
+ pop := ev.index
+ if events[pop].typ&mask == 0 {
+ // Subtree does not contain types: skip.
+ i = pop + 1
+ continue
+ }
+ }
+ i++
+ }
+ }
+}
+
+// Inspect visits the nodes of the subtree represented by c in
+// depth-first order. It calls f(n) for each node n before it
+// visits n's children. If f returns true, Inspect invokes f
+// recursively for each of the non-nil children of the node.
+//
+// Each node is represented by a Cursor that allows access to the
+// Node, but may also be used to start a new traversal, or to obtain
+// the stack of nodes enclosing the cursor.
+//
+// The complete traversal sequence is determined by [ast.Inspect].
+// The types argument, if non-empty, enables type-based filtering of
+// events. The function f if is called only for nodes whose type
+// matches an element of the types slice.
+func (c Cursor) Inspect(types []ast.Node, f func(c Cursor) (descend bool)) {
+ mask := maskOf(types)
+ events := c.in.events
+ for i, limit := c.indices(); i < limit; {
+ ev := events[i]
+ if ev.index > i {
+ // push
+ pop := ev.index
+ if ev.typ&mask != 0 && !f(Cursor{c.in, i}) ||
+ events[pop].typ&mask == 0 {
+ // The user opted not to descend, or the
+ // subtree does not contain types:
+ // skip past the pop.
+ i = pop + 1
+ continue
+ }
+ }
+ i++
+ }
+}
+
+// Enclosing returns an iterator over the nodes enclosing the current
+// current node, starting with the Cursor itself.
+//
+// Enclosing must not be called on the Root node (whose [Cursor.Node] returns nil).
+//
+// The types argument, if non-empty, enables type-based filtering of
+// events: the sequence includes only enclosing nodes whose type
+// matches an element of the types slice.
+func (c Cursor) Enclosing(types ...ast.Node) iter.Seq[Cursor] {
+ if c.index < 0 {
+ panic("Cursor.Enclosing called on Root node")
+ }
+
+ mask := maskOf(types)
+
+ return func(yield func(Cursor) bool) {
+ events := c.in.events
+ for i := c.index; i >= 0; i = events[i].parent {
+ if events[i].typ&mask != 0 && !yield(Cursor{c.in, i}) {
+ break
+ }
+ }
+ }
+}
+
+// Parent returns the parent of the current node.
+//
+// Parent must not be called on the Root node (whose [Cursor.Node] returns nil).
+func (c Cursor) Parent() Cursor {
+ if c.index < 0 {
+ panic("Cursor.Parent called on Root node")
+ }
+
+ return Cursor{c.in, c.in.events[c.index].parent}
+}
+
+// ParentEdge returns the identity of the field in the parent node
+// that holds this cursor's node, and if it is a list, the index within it.
+//
+// For example, f(x, y) is a CallExpr whose three children are Idents.
+// f has edge kind [edge.CallExpr_Fun] and index -1.
+// x and y have kind [edge.CallExpr_Args] and indices 0 and 1, respectively.
+//
+// If called on a child of the Root node, it returns ([edge.Invalid], -1).
+//
+// ParentEdge must not be called on the Root node (whose [Cursor.Node] returns nil).
+func (c Cursor) ParentEdge() (edge.Kind, int) {
+ if c.index < 0 {
+ panic("Cursor.ParentEdge called on Root node")
+ }
+ events := c.in.events
+ pop := events[c.index].index
+ return unpackEdgeKindAndIndex(events[pop].parent)
+}
+
+// ChildAt returns the cursor for the child of the
+// current node identified by its edge and index.
+// The index must be -1 if the edge.Kind is not a slice.
+// The indicated child node must exist.
+//
+// ChildAt must not be called on the Root node (whose [Cursor.Node] returns nil).
+//
+// Invariant: c.Parent().ChildAt(c.ParentEdge()) == c.
+func (c Cursor) ChildAt(k edge.Kind, idx int) Cursor {
+ target := packEdgeKindAndIndex(k, idx)
+
+ // Unfortunately there's no shortcut to looping.
+ events := c.in.events
+ i := c.index + 1
+ for {
+ pop := events[i].index
+ if pop < i {
+ break
+ }
+ if events[pop].parent == target {
+ return Cursor{c.in, i}
+ }
+ i = pop + 1
+ }
+ panic(fmt.Sprintf("ChildAt(%v, %d): no such child of %v", k, idx, c))
+}
+
+// Child returns the cursor for n, which must be a direct child of c's Node.
+//
+// Child must not be called on the Root node (whose [Cursor.Node] returns nil).
+func (c Cursor) Child(n ast.Node) Cursor {
+ if c.index < 0 {
+ panic("Cursor.Child called on Root node")
+ }
+
+ if false {
+ // reference implementation
+ for child := range c.Children() {
+ if child.Node() == n {
+ return child
+ }
+ }
+
+ } else {
+ // optimized implementation
+ events := c.in.events
+ for i := c.index + 1; events[i].index > i; i = events[i].index + 1 {
+ if events[i].node == n {
+ return Cursor{c.in, i}
+ }
+ }
+ }
+ panic(fmt.Sprintf("Child(%T): not a child of %v", n, c))
+}
+
+// NextSibling returns the cursor for the next sibling node in the same list
+// (for example, of files, decls, specs, statements, fields, or expressions) as
+// the current node. It returns (zero, false) if the node is the last node in
+// the list, or is not part of a list.
+//
+// NextSibling must not be called on the Root node.
+//
+// See note at [Cursor.Children].
+func (c Cursor) NextSibling() (Cursor, bool) {
+ if c.index < 0 {
+ panic("Cursor.NextSibling called on Root node")
+ }
+
+ events := c.in.events
+ i := events[c.index].index + 1 // after corresponding pop
+ if i < int32(len(events)) {
+ if events[i].index > i { // push?
+ return Cursor{c.in, i}, true
+ }
+ }
+ return Cursor{}, false
+}
+
+// PrevSibling returns the cursor for the previous sibling node in the
+// same list (for example, of files, decls, specs, statements, fields,
+// or expressions) as the current node. It returns zero if the node is
+// the first node in the list, or is not part of a list.
+//
+// It must not be called on the Root node.
+//
+// See note at [Cursor.Children].
+func (c Cursor) PrevSibling() (Cursor, bool) {
+ if c.index < 0 {
+ panic("Cursor.PrevSibling called on Root node")
+ }
+
+ events := c.in.events
+ i := c.index - 1
+ if i >= 0 {
+ if j := events[i].index; j < i { // pop?
+ return Cursor{c.in, j}, true
+ }
+ }
+ return Cursor{}, false
+}
+
+// FirstChild returns the first direct child of the current node,
+// or zero if it has no children.
+func (c Cursor) FirstChild() (Cursor, bool) {
+ events := c.in.events
+ i := c.index + 1 // i=0 if c is root
+ if i < int32(len(events)) && events[i].index > i { // push?
+ return Cursor{c.in, i}, true
+ }
+ return Cursor{}, false
+}
+
+// LastChild returns the last direct child of the current node,
+// or zero if it has no children.
+func (c Cursor) LastChild() (Cursor, bool) {
+ events := c.in.events
+ if c.index < 0 { // root?
+ if len(events) > 0 {
+ // return push of final event (a pop)
+ return Cursor{c.in, events[len(events)-1].index}, true
+ }
+ } else {
+ j := events[c.index].index - 1 // before corresponding pop
+ // Inv: j == c.index if c has no children
+ // or j is last child's pop.
+ if j > c.index { // c has children
+ return Cursor{c.in, events[j].index}, true
+ }
+ }
+ return Cursor{}, false
+}
+
+// Children returns an iterator over the direct children of the
+// current node, if any.
+//
+// When using Children, NextChild, and PrevChild, bear in mind that a
+// Node's children may come from different fields, some of which may
+// be lists of nodes without a distinguished intervening container
+// such as [ast.BlockStmt].
+//
+// For example, [ast.CaseClause] has a field List of expressions and a
+// field Body of statements, so the children of a CaseClause are a mix
+// of expressions and statements. Other nodes that have "uncontained"
+// list fields include:
+//
+// - [ast.ValueSpec] (Names, Values)
+// - [ast.CompositeLit] (Type, Elts)
+// - [ast.IndexListExpr] (X, Indices)
+// - [ast.CallExpr] (Fun, Args)
+// - [ast.AssignStmt] (Lhs, Rhs)
+//
+// So, do not assume that the previous sibling of an ast.Stmt is also
+// an ast.Stmt, or if it is, that they are executed sequentially,
+// unless you have established that, say, its parent is a BlockStmt
+// or its [Cursor.ParentEdge] is [edge.BlockStmt_List].
+// For example, given "for S1; ; S2 {}", the predecessor of S2 is S1,
+// even though they are not executed in sequence.
+func (c Cursor) Children() iter.Seq[Cursor] {
+ return func(yield func(Cursor) bool) {
+ c, ok := c.FirstChild()
+ for ok && yield(c) {
+ c, ok = c.NextSibling()
+ }
+ }
+}
+
+// Contains reports whether c contains or is equal to c2.
+//
+// Both Cursors must belong to the same [Inspector];
+// neither may be its Root node.
+func (c Cursor) Contains(c2 Cursor) bool {
+ if c.in != c2.in {
+ panic("different inspectors")
+ }
+ events := c.in.events
+ return c.index <= c2.index && events[c2.index].index <= events[c.index].index
+}
+
+// FindNode returns the cursor for node n if it belongs to the subtree
+// rooted at c. It returns zero if n is not found.
+func (c Cursor) FindNode(n ast.Node) (Cursor, bool) {
+
+ // FindNode is equivalent to this code,
+ // but more convenient and 15-20% faster:
+ if false {
+ for candidate := range c.Preorder(n) {
+ if candidate.Node() == n {
+ return candidate, true
+ }
+ }
+ return Cursor{}, false
+ }
+
+ // TODO(adonovan): opt: should we assume Node.Pos is accurate
+ // and combine type-based filtering with position filtering
+ // like FindByPos?
+
+ mask := maskOf([]ast.Node{n})
+ events := c.in.events
+
+ for i, limit := c.indices(); i < limit; i++ {
+ ev := events[i]
+ if ev.index > i { // push?
+ if ev.typ&mask != 0 && ev.node == n {
+ return Cursor{c.in, i}, true
+ }
+ pop := ev.index
+ if events[pop].typ&mask == 0 {
+ // Subtree does not contain type of n: skip.
+ i = pop
+ }
+ }
+ }
+ return Cursor{}, false
+}
+
+// FindByPos returns the cursor for the innermost node n in the tree
+// rooted at c such that n.Pos() <= start && end <= n.End().
+// (For an *ast.File, it uses the bounds n.FileStart-n.FileEnd.)
+//
+// It returns zero if none is found.
+// Precondition: start <= end.
+//
+// See also [astutil.PathEnclosingInterval], which
+// tolerates adjoining whitespace.
+func (c Cursor) FindByPos(start, end token.Pos) (Cursor, bool) {
+ if end < start {
+ panic("end < start")
+ }
+ events := c.in.events
+
+ // This algorithm could be implemented using c.Inspect,
+ // but it is about 2.5x slower.
+
+ best := int32(-1) // push index of latest (=innermost) node containing range
+ for i, limit := c.indices(); i < limit; i++ {
+ ev := events[i]
+ if ev.index > i { // push?
+ n := ev.node
+ var nodeEnd token.Pos
+ if file, ok := n.(*ast.File); ok {
+ nodeEnd = file.FileEnd
+ // Note: files may be out of Pos order.
+ if file.FileStart > start {
+ i = ev.index // disjoint, after; skip to next file
+ continue
+ }
+ } else {
+ nodeEnd = n.End()
+ if n.Pos() > start {
+ break // disjoint, after; stop
+ }
+ }
+ // Inv: node.{Pos,FileStart} <= start
+ if end <= nodeEnd {
+ // node fully contains target range
+ best = i
+ } else if nodeEnd < start {
+ i = ev.index // disjoint, before; skip forward
+ }
+ }
+ }
+ if best >= 0 {
+ return Cursor{c.in, best}, true
+ }
+ return Cursor{}, false
+}
diff --git a/hack/tools/vendor/golang.org/x/tools/go/ast/inspector/inspector.go b/hack/tools/vendor/golang.org/x/tools/go/ast/inspector/inspector.go
new file mode 100644
index 000000000000..a703cdfcf909
--- /dev/null
+++ b/hack/tools/vendor/golang.org/x/tools/go/ast/inspector/inspector.go
@@ -0,0 +1,311 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package inspector provides helper functions for traversal over the
+// syntax trees of a package, including node filtering by type, and
+// materialization of the traversal stack.
+//
+// During construction, the inspector does a complete traversal and
+// builds a list of push/pop events and their node type. Subsequent
+// method calls that request a traversal scan this list, rather than walk
+// the AST, and perform type filtering using efficient bit sets.
+// This representation is sometimes called a "balanced parenthesis tree."
+//
+// Experiments suggest the inspector's traversals are about 2.5x faster
+// than [ast.Inspect], but it may take around 5 traversals for this
+// benefit to amortize the inspector's construction cost.
+// If efficiency is the primary concern, do not use Inspector for
+// one-off traversals.
+//
+// The [Cursor] type provides a more flexible API for efficient
+// navigation of syntax trees in all four "cardinal directions". For
+// example, traversals may be nested, so you can find each node of
+// type A and then search within it for nodes of type B. Or you can
+// traverse from a node to its immediate neighbors: its parent, its
+// previous and next sibling, or its first and last child. We
+// recommend using methods of Cursor in preference to Inspector where
+// possible.
+package inspector
+
+// There are four orthogonal features in a traversal:
+// 1 type filtering
+// 2 pruning
+// 3 postorder calls to f
+// 4 stack
+// Rather than offer all of them in the API,
+// only a few combinations are exposed:
+// - Preorder is the fastest and has fewest features,
+// but is the most commonly needed traversal.
+// - Nodes and WithStack both provide pruning and postorder calls,
+// even though few clients need it, because supporting two versions
+// is not justified.
+// More combinations could be supported by expressing them as
+// wrappers around a more generic traversal, but this was measured
+// and found to degrade performance significantly (30%).
+
+import (
+ "go/ast"
+
+ "golang.org/x/tools/go/ast/edge"
+)
+
+// An Inspector provides methods for inspecting
+// (traversing) the syntax trees of a package.
+type Inspector struct {
+ events []event
+}
+
+func packEdgeKindAndIndex(ek edge.Kind, index int) int32 {
+ return int32(uint32(index+1)<<7 | uint32(ek))
+}
+
+// unpackEdgeKindAndIndex unpacks the edge kind and edge index (within
+// an []ast.Node slice) from the parent field of a pop event.
+func unpackEdgeKindAndIndex(x int32) (edge.Kind, int) {
+ // The "parent" field of a pop node holds the
+ // edge Kind in the lower 7 bits and the index+1
+ // in the upper 25.
+ return edge.Kind(x & 0x7f), int(x>>7) - 1
+}
+
+// New returns an Inspector for the specified syntax trees.
+func New(files []*ast.File) *Inspector {
+ return &Inspector{traverse(files)}
+}
+
+// An event represents a push or a pop
+// of an ast.Node during a traversal.
+type event struct {
+ node ast.Node
+ typ uint64 // typeOf(node) on push event, or union of typ strictly between push and pop events on pop events
+ index int32 // index of corresponding push or pop event
+ parent int32 // index of parent's push node (push nodes only), or packed edge kind/index (pop nodes only)
+}
+
+// TODO: Experiment with storing only the second word of event.node (unsafe.Pointer).
+// Type can be recovered from the sole bit in typ.
+// [Tried this, wasn't faster. --adonovan]
+
+// Preorder visits all the nodes of the files supplied to New in
+// depth-first order. It calls f(n) for each node n before it visits
+// n's children.
+//
+// The complete traversal sequence is determined by [ast.Inspect].
+// The types argument, if non-empty, enables type-based filtering of
+// events. The function f is called only for nodes whose type
+// matches an element of the types slice.
+//
+// The [Cursor.Preorder] method provides a richer alternative interface.
+// Example:
+//
+// for c := range in.Root().Preorder(types) { ... }
+func (in *Inspector) Preorder(types []ast.Node, f func(ast.Node)) {
+ // Because it avoids postorder calls to f, and the pruning
+ // check, Preorder is almost twice as fast as Nodes. The two
+ // features seem to contribute similar slowdowns (~1.4x each).
+
+ // This function is equivalent to the PreorderSeq call below,
+ // but to avoid the additional dynamic call (which adds 13-35%
+ // to the benchmarks), we expand it out.
+ //
+ // in.PreorderSeq(types...)(func(n ast.Node) bool {
+ // f(n)
+ // return true
+ // })
+
+ mask := maskOf(types)
+ for i := int32(0); i < int32(len(in.events)); {
+ ev := in.events[i]
+ if ev.index > i {
+ // push
+ if ev.typ&mask != 0 {
+ f(ev.node)
+ }
+ pop := ev.index
+ if in.events[pop].typ&mask == 0 {
+ // Subtrees do not contain types: skip them and pop.
+ i = pop + 1
+ continue
+ }
+ }
+ i++
+ }
+}
+
+// Nodes visits the nodes of the files supplied to New in depth-first
+// order. It calls f(n, true) for each node n before it visits n's
+// children. If f returns true, Nodes invokes f recursively for each
+// of the non-nil children of the node, followed by a call of
+// f(n, false).
+//
+// The complete traversal sequence is determined by [ast.Inspect].
+// The types argument, if non-empty, enables type-based filtering of
+// events. The function f if is called only for nodes whose type
+// matches an element of the types slice.
+//
+// The [Cursor.Inspect] method provides a richer alternative interface.
+// Example:
+//
+// in.Root().Inspect(types, func(c Cursor) bool {
+// ...
+// return true
+// }
+func (in *Inspector) Nodes(types []ast.Node, f func(n ast.Node, push bool) (proceed bool)) {
+ mask := maskOf(types)
+ for i := int32(0); i < int32(len(in.events)); {
+ ev := in.events[i]
+ if ev.index > i {
+ // push
+ pop := ev.index
+ if ev.typ&mask != 0 {
+ if !f(ev.node, true) {
+ i = pop + 1 // jump to corresponding pop + 1
+ continue
+ }
+ }
+ if in.events[pop].typ&mask == 0 {
+ // Subtrees do not contain types: skip them.
+ i = pop
+ continue
+ }
+ } else {
+ // pop
+ push := ev.index
+ if in.events[push].typ&mask != 0 {
+ f(ev.node, false)
+ }
+ }
+ i++
+ }
+}
+
+// WithStack visits nodes in a similar manner to Nodes, but it
+// supplies each call to f an additional argument, the current
+// traversal stack. The stack's first element is the outermost node,
+// an *ast.File; its last is the innermost, n.
+//
+// The [Cursor.Inspect] method provides a richer alternative interface.
+// Example:
+//
+// in.Root().Inspect(types, func(c Cursor) bool {
+// stack := slices.Collect(c.Enclosing())
+// ...
+// return true
+// })
+func (in *Inspector) WithStack(types []ast.Node, f func(n ast.Node, push bool, stack []ast.Node) (proceed bool)) {
+ mask := maskOf(types)
+ var stack []ast.Node
+ for i := int32(0); i < int32(len(in.events)); {
+ ev := in.events[i]
+ if ev.index > i {
+ // push
+ pop := ev.index
+ stack = append(stack, ev.node)
+ if ev.typ&mask != 0 {
+ if !f(ev.node, true, stack) {
+ i = pop + 1
+ stack = stack[:len(stack)-1]
+ continue
+ }
+ }
+ if in.events[pop].typ&mask == 0 {
+ // Subtrees does not contain types: skip them.
+ i = pop
+ continue
+ }
+ } else {
+ // pop
+ push := ev.index
+ if in.events[push].typ&mask != 0 {
+ f(ev.node, false, stack)
+ }
+ stack = stack[:len(stack)-1]
+ }
+ i++
+ }
+}
+
+// traverse builds the table of events representing a traversal.
+func traverse(files []*ast.File) []event {
+ // Preallocate approximate number of events
+ // based on source file extent of the declarations.
+ // (We use End-Pos not FileStart-FileEnd to neglect
+ // the effect of long doc comments.)
+ // This makes traverse faster by 4x (!).
+ var extent int
+ for _, f := range files {
+ extent += int(f.End() - f.Pos())
+ }
+ // This estimate is based on the net/http package.
+ capacity := min(extent*33/100, 1e6) // impose some reasonable maximum (1M)
+
+ v := &visitor{
+ events: make([]event, 0, capacity),
+ stack: []item{{index: -1}}, // include an extra event so file nodes have a parent
+ }
+ for _, file := range files {
+ walk(v, edge.Invalid, -1, file)
+ }
+ return v.events
+}
+
+type visitor struct {
+ events []event
+ stack []item
+}
+
+type item struct {
+ index int32 // index of current node's push event
+ parentIndex int32 // index of parent node's push event
+ typAccum uint64 // accumulated type bits of current node's descendants
+ edgeKindAndIndex int32 // edge.Kind and index, bit packed
+}
+
+func (v *visitor) push(ek edge.Kind, eindex int, node ast.Node) {
+ var (
+ index = int32(len(v.events))
+ parentIndex = v.stack[len(v.stack)-1].index
+ )
+ v.events = append(v.events, event{
+ node: node,
+ parent: parentIndex,
+ typ: typeOf(node),
+ index: 0, // (pop index is set later by visitor.pop)
+ })
+ v.stack = append(v.stack, item{
+ index: index,
+ parentIndex: parentIndex,
+ edgeKindAndIndex: packEdgeKindAndIndex(ek, eindex),
+ })
+
+ // 2B nodes ought to be enough for anyone!
+ if int32(len(v.events)) < 0 {
+ panic("event index exceeded int32")
+ }
+
+ // 32M elements in an []ast.Node ought to be enough for anyone!
+ if ek2, eindex2 := unpackEdgeKindAndIndex(packEdgeKindAndIndex(ek, eindex)); ek2 != ek || eindex2 != eindex {
+ panic("Node slice index exceeded uint25")
+ }
+}
+
+func (v *visitor) pop(node ast.Node) {
+ top := len(v.stack) - 1
+ current := v.stack[top]
+
+ push := &v.events[current.index]
+ parent := &v.stack[top-1]
+
+ push.index = int32(len(v.events)) // make push event refer to pop
+ parent.typAccum |= current.typAccum | push.typ // accumulate type bits into parent
+
+ v.stack = v.stack[:top]
+
+ v.events = append(v.events, event{
+ node: node,
+ typ: current.typAccum,
+ index: current.index,
+ parent: current.edgeKindAndIndex, // see [unpackEdgeKindAndIndex]
+ })
+}
diff --git a/hack/tools/vendor/golang.org/x/tools/go/ast/inspector/iter.go b/hack/tools/vendor/golang.org/x/tools/go/ast/inspector/iter.go
new file mode 100644
index 000000000000..c576dc70ac70
--- /dev/null
+++ b/hack/tools/vendor/golang.org/x/tools/go/ast/inspector/iter.go
@@ -0,0 +1,85 @@
+// Copyright 2024 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build go1.23
+
+package inspector
+
+import (
+ "go/ast"
+ "iter"
+)
+
+// PreorderSeq returns an iterator that visits all the
+// nodes of the files supplied to New in depth-first order.
+// It visits each node n before n's children.
+// The complete traversal sequence is determined by ast.Inspect.
+//
+// The types argument, if non-empty, enables type-based
+// filtering of events: only nodes whose type matches an
+// element of the types slice are included in the sequence.
+func (in *Inspector) PreorderSeq(types ...ast.Node) iter.Seq[ast.Node] {
+
+ // This implementation is identical to Preorder,
+ // except that it supports breaking out of the loop.
+
+ return func(yield func(ast.Node) bool) {
+ mask := maskOf(types)
+ for i := int32(0); i < int32(len(in.events)); {
+ ev := in.events[i]
+ if ev.index > i {
+ // push
+ if ev.typ&mask != 0 {
+ if !yield(ev.node) {
+ break
+ }
+ }
+ pop := ev.index
+ if in.events[pop].typ&mask == 0 {
+ // Subtrees do not contain types: skip them and pop.
+ i = pop + 1
+ continue
+ }
+ }
+ i++
+ }
+ }
+}
+
+// All[N] returns an iterator over all the nodes of type N.
+// N must be a pointer-to-struct type that implements ast.Node.
+//
+// Example:
+//
+// for call := range All[*ast.CallExpr](in) { ... }
+func All[N interface {
+ *S
+ ast.Node
+}, S any](in *Inspector) iter.Seq[N] {
+
+ // To avoid additional dynamic call overheads,
+ // we duplicate rather than call the logic of PreorderSeq.
+
+ mask := typeOf((N)(nil))
+ return func(yield func(N) bool) {
+ for i := int32(0); i < int32(len(in.events)); {
+ ev := in.events[i]
+ if ev.index > i {
+ // push
+ if ev.typ&mask != 0 {
+ if !yield(ev.node.(N)) {
+ break
+ }
+ }
+ pop := ev.index
+ if in.events[pop].typ&mask == 0 {
+ // Subtrees do not contain types: skip them and pop.
+ i = pop + 1
+ continue
+ }
+ }
+ i++
+ }
+ }
+}
diff --git a/hack/tools/vendor/golang.org/x/tools/go/ast/inspector/typeof.go b/hack/tools/vendor/golang.org/x/tools/go/ast/inspector/typeof.go
new file mode 100644
index 000000000000..9852331a3dbe
--- /dev/null
+++ b/hack/tools/vendor/golang.org/x/tools/go/ast/inspector/typeof.go
@@ -0,0 +1,227 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package inspector
+
+// This file defines func typeOf(ast.Node) uint64.
+//
+// The initial map-based implementation was too slow;
+// see https://go-review.googlesource.com/c/tools/+/135655/1/go/ast/inspector/inspector.go#196
+
+import (
+ "go/ast"
+ "math"
+)
+
+const (
+ nArrayType = iota
+ nAssignStmt
+ nBadDecl
+ nBadExpr
+ nBadStmt
+ nBasicLit
+ nBinaryExpr
+ nBlockStmt
+ nBranchStmt
+ nCallExpr
+ nCaseClause
+ nChanType
+ nCommClause
+ nComment
+ nCommentGroup
+ nCompositeLit
+ nDeclStmt
+ nDeferStmt
+ nEllipsis
+ nEmptyStmt
+ nExprStmt
+ nField
+ nFieldList
+ nFile
+ nForStmt
+ nFuncDecl
+ nFuncLit
+ nFuncType
+ nGenDecl
+ nGoStmt
+ nIdent
+ nIfStmt
+ nImportSpec
+ nIncDecStmt
+ nIndexExpr
+ nIndexListExpr
+ nInterfaceType
+ nKeyValueExpr
+ nLabeledStmt
+ nMapType
+ nPackage
+ nParenExpr
+ nRangeStmt
+ nReturnStmt
+ nSelectStmt
+ nSelectorExpr
+ nSendStmt
+ nSliceExpr
+ nStarExpr
+ nStructType
+ nSwitchStmt
+ nTypeAssertExpr
+ nTypeSpec
+ nTypeSwitchStmt
+ nUnaryExpr
+ nValueSpec
+)
+
+// typeOf returns a distinct single-bit value that represents the type of n.
+//
+// Various implementations were benchmarked with BenchmarkNewInspector:
+//
+// GOGC=off
+// - type switch 4.9-5.5ms 2.1ms
+// - binary search over a sorted list of types 5.5-5.9ms 2.5ms
+// - linear scan, frequency-ordered list 5.9-6.1ms 2.7ms
+// - linear scan, unordered list 6.4ms 2.7ms
+// - hash table 6.5ms 3.1ms
+//
+// A perfect hash seemed like overkill.
+//
+// The compiler's switch statement is the clear winner
+// as it produces a binary tree in code,
+// with constant conditions and good branch prediction.
+// (Sadly it is the most verbose in source code.)
+// Binary search suffered from poor branch prediction.
+func typeOf(n ast.Node) uint64 {
+ // Fast path: nearly half of all nodes are identifiers.
+ if _, ok := n.(*ast.Ident); ok {
+ return 1 << nIdent
+ }
+
+ // These cases include all nodes encountered by ast.Inspect.
+ switch n.(type) {
+ case *ast.ArrayType:
+ return 1 << nArrayType
+ case *ast.AssignStmt:
+ return 1 << nAssignStmt
+ case *ast.BadDecl:
+ return 1 << nBadDecl
+ case *ast.BadExpr:
+ return 1 << nBadExpr
+ case *ast.BadStmt:
+ return 1 << nBadStmt
+ case *ast.BasicLit:
+ return 1 << nBasicLit
+ case *ast.BinaryExpr:
+ return 1 << nBinaryExpr
+ case *ast.BlockStmt:
+ return 1 << nBlockStmt
+ case *ast.BranchStmt:
+ return 1 << nBranchStmt
+ case *ast.CallExpr:
+ return 1 << nCallExpr
+ case *ast.CaseClause:
+ return 1 << nCaseClause
+ case *ast.ChanType:
+ return 1 << nChanType
+ case *ast.CommClause:
+ return 1 << nCommClause
+ case *ast.Comment:
+ return 1 << nComment
+ case *ast.CommentGroup:
+ return 1 << nCommentGroup
+ case *ast.CompositeLit:
+ return 1 << nCompositeLit
+ case *ast.DeclStmt:
+ return 1 << nDeclStmt
+ case *ast.DeferStmt:
+ return 1 << nDeferStmt
+ case *ast.Ellipsis:
+ return 1 << nEllipsis
+ case *ast.EmptyStmt:
+ return 1 << nEmptyStmt
+ case *ast.ExprStmt:
+ return 1 << nExprStmt
+ case *ast.Field:
+ return 1 << nField
+ case *ast.FieldList:
+ return 1 << nFieldList
+ case *ast.File:
+ return 1 << nFile
+ case *ast.ForStmt:
+ return 1 << nForStmt
+ case *ast.FuncDecl:
+ return 1 << nFuncDecl
+ case *ast.FuncLit:
+ return 1 << nFuncLit
+ case *ast.FuncType:
+ return 1 << nFuncType
+ case *ast.GenDecl:
+ return 1 << nGenDecl
+ case *ast.GoStmt:
+ return 1 << nGoStmt
+ case *ast.Ident:
+ return 1 << nIdent
+ case *ast.IfStmt:
+ return 1 << nIfStmt
+ case *ast.ImportSpec:
+ return 1 << nImportSpec
+ case *ast.IncDecStmt:
+ return 1 << nIncDecStmt
+ case *ast.IndexExpr:
+ return 1 << nIndexExpr
+ case *ast.IndexListExpr:
+ return 1 << nIndexListExpr
+ case *ast.InterfaceType:
+ return 1 << nInterfaceType
+ case *ast.KeyValueExpr:
+ return 1 << nKeyValueExpr
+ case *ast.LabeledStmt:
+ return 1 << nLabeledStmt
+ case *ast.MapType:
+ return 1 << nMapType
+ case *ast.Package:
+ return 1 << nPackage
+ case *ast.ParenExpr:
+ return 1 << nParenExpr
+ case *ast.RangeStmt:
+ return 1 << nRangeStmt
+ case *ast.ReturnStmt:
+ return 1 << nReturnStmt
+ case *ast.SelectStmt:
+ return 1 << nSelectStmt
+ case *ast.SelectorExpr:
+ return 1 << nSelectorExpr
+ case *ast.SendStmt:
+ return 1 << nSendStmt
+ case *ast.SliceExpr:
+ return 1 << nSliceExpr
+ case *ast.StarExpr:
+ return 1 << nStarExpr
+ case *ast.StructType:
+ return 1 << nStructType
+ case *ast.SwitchStmt:
+ return 1 << nSwitchStmt
+ case *ast.TypeAssertExpr:
+ return 1 << nTypeAssertExpr
+ case *ast.TypeSpec:
+ return 1 << nTypeSpec
+ case *ast.TypeSwitchStmt:
+ return 1 << nTypeSwitchStmt
+ case *ast.UnaryExpr:
+ return 1 << nUnaryExpr
+ case *ast.ValueSpec:
+ return 1 << nValueSpec
+ }
+ return 0
+}
+
+func maskOf(nodes []ast.Node) uint64 {
+ if len(nodes) == 0 {
+ return math.MaxUint64 // match all node types
+ }
+ var mask uint64
+ for _, n := range nodes {
+ mask |= typeOf(n)
+ }
+ return mask
+}
diff --git a/hack/tools/vendor/golang.org/x/tools/go/ast/inspector/walk.go b/hack/tools/vendor/golang.org/x/tools/go/ast/inspector/walk.go
new file mode 100644
index 000000000000..5f1c93c8a73c
--- /dev/null
+++ b/hack/tools/vendor/golang.org/x/tools/go/ast/inspector/walk.go
@@ -0,0 +1,341 @@
+// Copyright 2025 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package inspector
+
+// This file is a fork of ast.Inspect to reduce unnecessary dynamic
+// calls and to gather edge information.
+//
+// Consistency with the original is ensured by TestInspectAllNodes.
+
+import (
+ "fmt"
+ "go/ast"
+
+ "golang.org/x/tools/go/ast/edge"
+)
+
+func walkList[N ast.Node](v *visitor, ek edge.Kind, list []N) {
+ for i, node := range list {
+ walk(v, ek, i, node)
+ }
+}
+
+func walk(v *visitor, ek edge.Kind, index int, node ast.Node) {
+ v.push(ek, index, node)
+
+ // walk children
+ // (the order of the cases matches the order
+ // of the corresponding node types in ast.go)
+ switch n := node.(type) {
+ // Comments and fields
+ case *ast.Comment:
+ // nothing to do
+
+ case *ast.CommentGroup:
+ walkList(v, edge.CommentGroup_List, n.List)
+
+ case *ast.Field:
+ if n.Doc != nil {
+ walk(v, edge.Field_Doc, -1, n.Doc)
+ }
+ walkList(v, edge.Field_Names, n.Names)
+ if n.Type != nil {
+ walk(v, edge.Field_Type, -1, n.Type)
+ }
+ if n.Tag != nil {
+ walk(v, edge.Field_Tag, -1, n.Tag)
+ }
+ if n.Comment != nil {
+ walk(v, edge.Field_Comment, -1, n.Comment)
+ }
+
+ case *ast.FieldList:
+ walkList(v, edge.FieldList_List, n.List)
+
+ // Expressions
+ case *ast.BadExpr, *ast.Ident, *ast.BasicLit:
+ // nothing to do
+
+ case *ast.Ellipsis:
+ if n.Elt != nil {
+ walk(v, edge.Ellipsis_Elt, -1, n.Elt)
+ }
+
+ case *ast.FuncLit:
+ walk(v, edge.FuncLit_Type, -1, n.Type)
+ walk(v, edge.FuncLit_Body, -1, n.Body)
+
+ case *ast.CompositeLit:
+ if n.Type != nil {
+ walk(v, edge.CompositeLit_Type, -1, n.Type)
+ }
+ walkList(v, edge.CompositeLit_Elts, n.Elts)
+
+ case *ast.ParenExpr:
+ walk(v, edge.ParenExpr_X, -1, n.X)
+
+ case *ast.SelectorExpr:
+ walk(v, edge.SelectorExpr_X, -1, n.X)
+ walk(v, edge.SelectorExpr_Sel, -1, n.Sel)
+
+ case *ast.IndexExpr:
+ walk(v, edge.IndexExpr_X, -1, n.X)
+ walk(v, edge.IndexExpr_Index, -1, n.Index)
+
+ case *ast.IndexListExpr:
+ walk(v, edge.IndexListExpr_X, -1, n.X)
+ walkList(v, edge.IndexListExpr_Indices, n.Indices)
+
+ case *ast.SliceExpr:
+ walk(v, edge.SliceExpr_X, -1, n.X)
+ if n.Low != nil {
+ walk(v, edge.SliceExpr_Low, -1, n.Low)
+ }
+ if n.High != nil {
+ walk(v, edge.SliceExpr_High, -1, n.High)
+ }
+ if n.Max != nil {
+ walk(v, edge.SliceExpr_Max, -1, n.Max)
+ }
+
+ case *ast.TypeAssertExpr:
+ walk(v, edge.TypeAssertExpr_X, -1, n.X)
+ if n.Type != nil {
+ walk(v, edge.TypeAssertExpr_Type, -1, n.Type)
+ }
+
+ case *ast.CallExpr:
+ walk(v, edge.CallExpr_Fun, -1, n.Fun)
+ walkList(v, edge.CallExpr_Args, n.Args)
+
+ case *ast.StarExpr:
+ walk(v, edge.StarExpr_X, -1, n.X)
+
+ case *ast.UnaryExpr:
+ walk(v, edge.UnaryExpr_X, -1, n.X)
+
+ case *ast.BinaryExpr:
+ walk(v, edge.BinaryExpr_X, -1, n.X)
+ walk(v, edge.BinaryExpr_Y, -1, n.Y)
+
+ case *ast.KeyValueExpr:
+ walk(v, edge.KeyValueExpr_Key, -1, n.Key)
+ walk(v, edge.KeyValueExpr_Value, -1, n.Value)
+
+ // Types
+ case *ast.ArrayType:
+ if n.Len != nil {
+ walk(v, edge.ArrayType_Len, -1, n.Len)
+ }
+ walk(v, edge.ArrayType_Elt, -1, n.Elt)
+
+ case *ast.StructType:
+ walk(v, edge.StructType_Fields, -1, n.Fields)
+
+ case *ast.FuncType:
+ if n.TypeParams != nil {
+ walk(v, edge.FuncType_TypeParams, -1, n.TypeParams)
+ }
+ if n.Params != nil {
+ walk(v, edge.FuncType_Params, -1, n.Params)
+ }
+ if n.Results != nil {
+ walk(v, edge.FuncType_Results, -1, n.Results)
+ }
+
+ case *ast.InterfaceType:
+ walk(v, edge.InterfaceType_Methods, -1, n.Methods)
+
+ case *ast.MapType:
+ walk(v, edge.MapType_Key, -1, n.Key)
+ walk(v, edge.MapType_Value, -1, n.Value)
+
+ case *ast.ChanType:
+ walk(v, edge.ChanType_Value, -1, n.Value)
+
+ // Statements
+ case *ast.BadStmt:
+ // nothing to do
+
+ case *ast.DeclStmt:
+ walk(v, edge.DeclStmt_Decl, -1, n.Decl)
+
+ case *ast.EmptyStmt:
+ // nothing to do
+
+ case *ast.LabeledStmt:
+ walk(v, edge.LabeledStmt_Label, -1, n.Label)
+ walk(v, edge.LabeledStmt_Stmt, -1, n.Stmt)
+
+ case *ast.ExprStmt:
+ walk(v, edge.ExprStmt_X, -1, n.X)
+
+ case *ast.SendStmt:
+ walk(v, edge.SendStmt_Chan, -1, n.Chan)
+ walk(v, edge.SendStmt_Value, -1, n.Value)
+
+ case *ast.IncDecStmt:
+ walk(v, edge.IncDecStmt_X, -1, n.X)
+
+ case *ast.AssignStmt:
+ walkList(v, edge.AssignStmt_Lhs, n.Lhs)
+ walkList(v, edge.AssignStmt_Rhs, n.Rhs)
+
+ case *ast.GoStmt:
+ walk(v, edge.GoStmt_Call, -1, n.Call)
+
+ case *ast.DeferStmt:
+ walk(v, edge.DeferStmt_Call, -1, n.Call)
+
+ case *ast.ReturnStmt:
+ walkList(v, edge.ReturnStmt_Results, n.Results)
+
+ case *ast.BranchStmt:
+ if n.Label != nil {
+ walk(v, edge.BranchStmt_Label, -1, n.Label)
+ }
+
+ case *ast.BlockStmt:
+ walkList(v, edge.BlockStmt_List, n.List)
+
+ case *ast.IfStmt:
+ if n.Init != nil {
+ walk(v, edge.IfStmt_Init, -1, n.Init)
+ }
+ walk(v, edge.IfStmt_Cond, -1, n.Cond)
+ walk(v, edge.IfStmt_Body, -1, n.Body)
+ if n.Else != nil {
+ walk(v, edge.IfStmt_Else, -1, n.Else)
+ }
+
+ case *ast.CaseClause:
+ walkList(v, edge.CaseClause_List, n.List)
+ walkList(v, edge.CaseClause_Body, n.Body)
+
+ case *ast.SwitchStmt:
+ if n.Init != nil {
+ walk(v, edge.SwitchStmt_Init, -1, n.Init)
+ }
+ if n.Tag != nil {
+ walk(v, edge.SwitchStmt_Tag, -1, n.Tag)
+ }
+ walk(v, edge.SwitchStmt_Body, -1, n.Body)
+
+ case *ast.TypeSwitchStmt:
+ if n.Init != nil {
+ walk(v, edge.TypeSwitchStmt_Init, -1, n.Init)
+ }
+ walk(v, edge.TypeSwitchStmt_Assign, -1, n.Assign)
+ walk(v, edge.TypeSwitchStmt_Body, -1, n.Body)
+
+ case *ast.CommClause:
+ if n.Comm != nil {
+ walk(v, edge.CommClause_Comm, -1, n.Comm)
+ }
+ walkList(v, edge.CommClause_Body, n.Body)
+
+ case *ast.SelectStmt:
+ walk(v, edge.SelectStmt_Body, -1, n.Body)
+
+ case *ast.ForStmt:
+ if n.Init != nil {
+ walk(v, edge.ForStmt_Init, -1, n.Init)
+ }
+ if n.Cond != nil {
+ walk(v, edge.ForStmt_Cond, -1, n.Cond)
+ }
+ if n.Post != nil {
+ walk(v, edge.ForStmt_Post, -1, n.Post)
+ }
+ walk(v, edge.ForStmt_Body, -1, n.Body)
+
+ case *ast.RangeStmt:
+ if n.Key != nil {
+ walk(v, edge.RangeStmt_Key, -1, n.Key)
+ }
+ if n.Value != nil {
+ walk(v, edge.RangeStmt_Value, -1, n.Value)
+ }
+ walk(v, edge.RangeStmt_X, -1, n.X)
+ walk(v, edge.RangeStmt_Body, -1, n.Body)
+
+ // Declarations
+ case *ast.ImportSpec:
+ if n.Doc != nil {
+ walk(v, edge.ImportSpec_Doc, -1, n.Doc)
+ }
+ if n.Name != nil {
+ walk(v, edge.ImportSpec_Name, -1, n.Name)
+ }
+ walk(v, edge.ImportSpec_Path, -1, n.Path)
+ if n.Comment != nil {
+ walk(v, edge.ImportSpec_Comment, -1, n.Comment)
+ }
+
+ case *ast.ValueSpec:
+ if n.Doc != nil {
+ walk(v, edge.ValueSpec_Doc, -1, n.Doc)
+ }
+ walkList(v, edge.ValueSpec_Names, n.Names)
+ if n.Type != nil {
+ walk(v, edge.ValueSpec_Type, -1, n.Type)
+ }
+ walkList(v, edge.ValueSpec_Values, n.Values)
+ if n.Comment != nil {
+ walk(v, edge.ValueSpec_Comment, -1, n.Comment)
+ }
+
+ case *ast.TypeSpec:
+ if n.Doc != nil {
+ walk(v, edge.TypeSpec_Doc, -1, n.Doc)
+ }
+ walk(v, edge.TypeSpec_Name, -1, n.Name)
+ if n.TypeParams != nil {
+ walk(v, edge.TypeSpec_TypeParams, -1, n.TypeParams)
+ }
+ walk(v, edge.TypeSpec_Type, -1, n.Type)
+ if n.Comment != nil {
+ walk(v, edge.TypeSpec_Comment, -1, n.Comment)
+ }
+
+ case *ast.BadDecl:
+ // nothing to do
+
+ case *ast.GenDecl:
+ if n.Doc != nil {
+ walk(v, edge.GenDecl_Doc, -1, n.Doc)
+ }
+ walkList(v, edge.GenDecl_Specs, n.Specs)
+
+ case *ast.FuncDecl:
+ if n.Doc != nil {
+ walk(v, edge.FuncDecl_Doc, -1, n.Doc)
+ }
+ if n.Recv != nil {
+ walk(v, edge.FuncDecl_Recv, -1, n.Recv)
+ }
+ walk(v, edge.FuncDecl_Name, -1, n.Name)
+ walk(v, edge.FuncDecl_Type, -1, n.Type)
+ if n.Body != nil {
+ walk(v, edge.FuncDecl_Body, -1, n.Body)
+ }
+
+ case *ast.File:
+ if n.Doc != nil {
+ walk(v, edge.File_Doc, -1, n.Doc)
+ }
+ walk(v, edge.File_Name, -1, n.Name)
+ walkList(v, edge.File_Decls, n.Decls)
+ // don't walk n.Comments - they have been
+ // visited already through the individual
+ // nodes
+
+ default:
+ // (includes *ast.Package)
+ panic(fmt.Sprintf("Walk: unexpected node type %T", n))
+ }
+
+ v.pop(node)
+}
diff --git a/hack/tools/vendor/golang.org/x/tools/go/packages/doc.go b/hack/tools/vendor/golang.org/x/tools/go/packages/doc.go
index f1931d10eebe..366aab6b2ca0 100644
--- a/hack/tools/vendor/golang.org/x/tools/go/packages/doc.go
+++ b/hack/tools/vendor/golang.org/x/tools/go/packages/doc.go
@@ -76,6 +76,8 @@ uninterpreted to Load, so that it can interpret them
according to the conventions of the underlying build system.
See the Example function for typical usage.
+See also [golang.org/x/tools/go/packages/internal/linecount]
+for an example application.
# The driver protocol
diff --git a/hack/tools/vendor/golang.org/x/tools/go/packages/golist.go b/hack/tools/vendor/golang.org/x/tools/go/packages/golist.go
index 96e43cd80936..680a70ca8f0d 100644
--- a/hack/tools/vendor/golang.org/x/tools/go/packages/golist.go
+++ b/hack/tools/vendor/golang.org/x/tools/go/packages/golist.go
@@ -224,13 +224,22 @@ extractQueries:
return response.dr, nil
}
+// abs returns an absolute representation of path, based on cfg.Dir.
+func (cfg *Config) abs(path string) (string, error) {
+ if filepath.IsAbs(path) {
+ return path, nil
+ }
+ // In case cfg.Dir is relative, pass it to filepath.Abs.
+ return filepath.Abs(filepath.Join(cfg.Dir, path))
+}
+
func (state *golistState) runContainsQueries(response *responseDeduper, queries []string) error {
for _, query := range queries {
// TODO(matloob): Do only one query per directory.
fdir := filepath.Dir(query)
// Pass absolute path of directory to go list so that it knows to treat it as a directory,
// not a package path.
- pattern, err := filepath.Abs(fdir)
+ pattern, err := state.cfg.abs(fdir)
if err != nil {
return fmt.Errorf("could not determine absolute path of file= query path %q: %v", query, err)
}
@@ -355,12 +364,6 @@ type jsonPackage struct {
DepsErrors []*packagesinternal.PackageError
}
-type jsonPackageError struct {
- ImportStack []string
- Pos string
- Err string
-}
-
func otherFiles(p *jsonPackage) [][]string {
return [][]string{p.CFiles, p.CXXFiles, p.MFiles, p.HFiles, p.FFiles, p.SFiles, p.SwigFiles, p.SwigCXXFiles, p.SysoFiles}
}
@@ -703,9 +706,8 @@ func (state *golistState) getGoVersion() (int, error) {
// getPkgPath finds the package path of a directory if it's relative to a root
// directory.
func (state *golistState) getPkgPath(dir string) (string, bool, error) {
- absDir, err := filepath.Abs(dir)
- if err != nil {
- return "", false, err
+ if !filepath.IsAbs(dir) {
+ panic("non-absolute dir passed to getPkgPath")
}
roots, err := state.determineRootDirs()
if err != nil {
@@ -715,7 +717,7 @@ func (state *golistState) getPkgPath(dir string) (string, bool, error) {
for rdir, rpath := range roots {
// Make sure that the directory is in the module,
// to avoid creating a path relative to another module.
- if !strings.HasPrefix(absDir, rdir) {
+ if !strings.HasPrefix(dir, rdir) {
continue
}
// TODO(matloob): This doesn't properly handle symlinks.
diff --git a/hack/tools/vendor/golang.org/x/tools/go/packages/golist_overlay.go b/hack/tools/vendor/golang.org/x/tools/go/packages/golist_overlay.go
index d823c474ad3a..d9d5a45cd47a 100644
--- a/hack/tools/vendor/golang.org/x/tools/go/packages/golist_overlay.go
+++ b/hack/tools/vendor/golang.org/x/tools/go/packages/golist_overlay.go
@@ -55,7 +55,7 @@ func (state *golistState) determineRootDirsModules() (map[string]string, error)
}
if mod.Dir != "" && mod.Path != "" {
// This is a valid module; add it to the map.
- absDir, err := filepath.Abs(mod.Dir)
+ absDir, err := state.cfg.abs(mod.Dir)
if err != nil {
return nil, err
}
diff --git a/hack/tools/vendor/golang.org/x/tools/go/packages/visit.go b/hack/tools/vendor/golang.org/x/tools/go/packages/visit.go
index df14ffd94dc3..af6a60d75f87 100644
--- a/hack/tools/vendor/golang.org/x/tools/go/packages/visit.go
+++ b/hack/tools/vendor/golang.org/x/tools/go/packages/visit.go
@@ -5,9 +5,11 @@
package packages
import (
+ "cmp"
"fmt"
+ "iter"
"os"
- "sort"
+ "slices"
)
// Visit visits all the packages in the import graph whose roots are
@@ -16,6 +18,20 @@ import (
// package's dependencies have been visited (postorder).
// The boolean result of pre(pkg) determines whether
// the imports of package pkg are visited.
+//
+// Example:
+//
+// pkgs, err := Load(...)
+// if err != nil { ... }
+// Visit(pkgs, nil, func(pkg *Package) {
+// log.Println(pkg)
+// })
+//
+// In most cases, it is more convenient to use [Postorder]:
+//
+// for pkg := range Postorder(pkgs) {
+// log.Println(pkg)
+// }
func Visit(pkgs []*Package, pre func(*Package) bool, post func(*Package)) {
seen := make(map[*Package]bool)
var visit func(*Package)
@@ -24,13 +40,8 @@ func Visit(pkgs []*Package, pre func(*Package) bool, post func(*Package)) {
seen[pkg] = true
if pre == nil || pre(pkg) {
- paths := make([]string, 0, len(pkg.Imports))
- for path := range pkg.Imports {
- paths = append(paths, path)
- }
- sort.Strings(paths) // Imports is a map, this makes visit stable
- for _, path := range paths {
- visit(pkg.Imports[path])
+ for _, imp := range sorted(pkg.Imports) { // for determinism
+ visit(imp)
}
}
@@ -50,7 +61,7 @@ func Visit(pkgs []*Package, pre func(*Package) bool, post func(*Package)) {
func PrintErrors(pkgs []*Package) int {
var n int
errModules := make(map[*Module]bool)
- Visit(pkgs, nil, func(pkg *Package) {
+ for pkg := range Postorder(pkgs) {
for _, err := range pkg.Errors {
fmt.Fprintln(os.Stderr, err)
n++
@@ -63,6 +74,60 @@ func PrintErrors(pkgs []*Package) int {
fmt.Fprintln(os.Stderr, mod.Error.Err)
n++
}
- })
+ }
return n
}
+
+// Postorder returns an iterator over the the packages in
+// the import graph whose roots are pkg.
+// Packages are enumerated in dependencies-first order.
+func Postorder(pkgs []*Package) iter.Seq[*Package] {
+ return func(yield func(*Package) bool) {
+ seen := make(map[*Package]bool)
+ var visit func(*Package) bool
+ visit = func(pkg *Package) bool {
+ if !seen[pkg] {
+ seen[pkg] = true
+ for _, imp := range sorted(pkg.Imports) { // for determinism
+ if !visit(imp) {
+ return false
+ }
+ }
+ if !yield(pkg) {
+ return false
+ }
+ }
+ return true
+ }
+ for _, pkg := range pkgs {
+ if !visit(pkg) {
+ break
+ }
+ }
+ }
+}
+
+// -- copied from golang.org.x/tools/gopls/internal/util/moremaps --
+
+// sorted returns an iterator over the entries of m in key order.
+func sorted[M ~map[K]V, K cmp.Ordered, V any](m M) iter.Seq2[K, V] {
+ // TODO(adonovan): use maps.Sorted if proposal #68598 is accepted.
+ return func(yield func(K, V) bool) {
+ keys := keySlice(m)
+ slices.Sort(keys)
+ for _, k := range keys {
+ if !yield(k, m[k]) {
+ break
+ }
+ }
+ }
+}
+
+// KeySlice returns the keys of the map M, like slices.Collect(maps.Keys(m)).
+func keySlice[M ~map[K]V, K comparable, V any](m M) []K {
+ r := make([]K, 0, len(m))
+ for k := range m {
+ r = append(r, k)
+ }
+ return r
+}
diff --git a/hack/tools/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go b/hack/tools/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go
index d3c2913bef33..6c0c74968f35 100644
--- a/hack/tools/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go
+++ b/hack/tools/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go
@@ -698,7 +698,10 @@ func Object(pkg *types.Package, p Path) (types.Object, error) {
} else if false && aliases.Enabled() {
// The Enabled check is too expensive, so for now we
// simply assume that aliases are not enabled.
- // TODO(adonovan): replace with "if true {" when go1.24 is assured.
+ //
+ // Now that go1.24 is assured, we should be able to
+ // replace this with "if true {", but it causes tests
+ // to fail. TODO(adonovan): investigate.
return nil, fmt.Errorf("cannot apply %q to %s (got %T, want alias)", code, t, t)
}
diff --git a/hack/tools/vendor/golang.org/x/tools/go/types/typeutil/map.go b/hack/tools/vendor/golang.org/x/tools/go/types/typeutil/map.go
index b6d542c64ee6..f035a0b6be92 100644
--- a/hack/tools/vendor/golang.org/x/tools/go/types/typeutil/map.go
+++ b/hack/tools/vendor/golang.org/x/tools/go/types/typeutil/map.go
@@ -11,7 +11,6 @@ import (
"fmt"
"go/types"
"hash/maphash"
- "unsafe"
"golang.org/x/tools/internal/typeparams"
)
@@ -380,22 +379,8 @@ var theSeed = maphash.MakeSeed()
func (hasher) hashTypeName(tname *types.TypeName) uint32 {
// Since types.Identical uses == to compare TypeNames,
// the Hash function uses maphash.Comparable.
- // TODO(adonovan): or will, when it becomes available in go1.24.
- // In the meantime we use the pointer's numeric value.
- //
- // hash := maphash.Comparable(theSeed, tname)
- //
- // (Another approach would be to hash the name and package
- // path, and whether or not it is a package-level typename. It
- // is rare for a package to define multiple local types with
- // the same name.)
- ptr := uintptr(unsafe.Pointer(tname))
- if unsafe.Sizeof(ptr) == 8 {
- hash := uint64(ptr)
- return uint32(hash ^ (hash >> 32))
- } else {
- return uint32(ptr)
- }
+ hash := maphash.Comparable(theSeed, tname)
+ return uint32(hash ^ (hash >> 32))
}
// shallowHash computes a hash of t without looking at any of its
diff --git a/hack/tools/vendor/golang.org/x/tools/internal/event/core/event.go b/hack/tools/vendor/golang.org/x/tools/internal/event/core/event.go
index a6cf0e64a4b1..ade5d1e799d6 100644
--- a/hack/tools/vendor/golang.org/x/tools/internal/event/core/event.go
+++ b/hack/tools/vendor/golang.org/x/tools/internal/event/core/event.go
@@ -28,11 +28,6 @@ type Event struct {
dynamic []label.Label // dynamically sized storage for remaining labels
}
-// eventLabelMap implements label.Map for a the labels of an Event.
-type eventLabelMap struct {
- event Event
-}
-
func (ev Event) At() time.Time { return ev.at }
func (ev Event) Format(f fmt.State, r rune) {
diff --git a/hack/tools/vendor/golang.org/x/tools/internal/gcimporter/iexport.go b/hack/tools/vendor/golang.org/x/tools/internal/gcimporter/iexport.go
index 780873e3ae78..4a4357d2bd44 100644
--- a/hack/tools/vendor/golang.org/x/tools/internal/gcimporter/iexport.go
+++ b/hack/tools/vendor/golang.org/x/tools/internal/gcimporter/iexport.go
@@ -569,7 +569,6 @@ func (p *iexporter) exportName(obj types.Object) (res string) {
type iexporter struct {
fset *token.FileSet
- out *bytes.Buffer
version int
shallow bool // don't put types from other packages in the index
diff --git a/hack/tools/vendor/golang.org/x/tools/internal/gcimporter/iimport_go122.go b/hack/tools/vendor/golang.org/x/tools/internal/gcimporter/iimport_go122.go
deleted file mode 100644
index 7586bfaca603..000000000000
--- a/hack/tools/vendor/golang.org/x/tools/internal/gcimporter/iimport_go122.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2024 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build go1.22 && !go1.24
-
-package gcimporter
-
-import (
- "go/token"
- "go/types"
- "unsafe"
-)
-
-// TODO(rfindley): delete this workaround once go1.24 is assured.
-
-func init() {
- // Update markBlack so that it correctly sets the color
- // of imported TypeNames.
- //
- // See the doc comment for markBlack for details.
-
- type color uint32
- const (
- white color = iota
- black
- grey
- )
- type object struct {
- _ *types.Scope
- _ token.Pos
- _ *types.Package
- _ string
- _ types.Type
- _ uint32
- color_ color
- _ token.Pos
- }
- type typeName struct {
- object
- }
-
- // If the size of types.TypeName changes, this will fail to compile.
- const delta = int64(unsafe.Sizeof(typeName{})) - int64(unsafe.Sizeof(types.TypeName{}))
- var _ [-delta * delta]int
-
- markBlack = func(obj *types.TypeName) {
- type uP = unsafe.Pointer
- var ptr *typeName
- *(*uP)(uP(&ptr)) = uP(obj)
- ptr.color_ = black
- }
-}
diff --git a/hack/tools/vendor/golang.org/x/tools/internal/packagesinternal/packages.go b/hack/tools/vendor/golang.org/x/tools/internal/packagesinternal/packages.go
index 73eefa2a7d0b..929b470bebe5 100644
--- a/hack/tools/vendor/golang.org/x/tools/internal/packagesinternal/packages.go
+++ b/hack/tools/vendor/golang.org/x/tools/internal/packagesinternal/packages.go
@@ -5,6 +5,8 @@
// Package packagesinternal exposes internal-only fields from go/packages.
package packagesinternal
+import "fmt"
+
var GetDepsErrors = func(p any) []*PackageError { return nil }
type PackageError struct {
@@ -13,5 +15,9 @@ type PackageError struct {
Err string // the error itself
}
+func (err PackageError) String() string {
+ return fmt.Sprintf("%s: %s (import stack: %s)", err.Pos, err.Err, err.ImportStack)
+}
+
var TypecheckCgo int
var DepsErrors int // must be set as a LoadMode to call GetDepsErrors
diff --git a/hack/tools/vendor/golang.org/x/tools/internal/stdlib/deps.go b/hack/tools/vendor/golang.org/x/tools/internal/stdlib/deps.go
index 77cf8d2181ae..96ad6c582105 100644
--- a/hack/tools/vendor/golang.org/x/tools/internal/stdlib/deps.go
+++ b/hack/tools/vendor/golang.org/x/tools/internal/stdlib/deps.go
@@ -12,348 +12,354 @@ type pkginfo struct {
}
var deps = [...]pkginfo{
- {"archive/tar", "\x03j\x03E5\x01\v\x01#\x01\x01\x02\x05\n\x02\x01\x02\x02\v"},
- {"archive/zip", "\x02\x04`\a\x16\x0205\x01+\x05\x01\x11\x03\x02\r\x04"},
- {"bufio", "\x03j}F\x13"},
- {"bytes", "m+R\x03\fH\x02\x02"},
+ {"archive/tar", "\x03k\x03E;\x01\n\x01$\x01\x01\x02\x05\b\x02\x01\x02\x02\f"},
+ {"archive/zip", "\x02\x04a\a\x03\x12\x021;\x01+\x05\x01\x0f\x03\x02\x0e\x04"},
+ {"bufio", "\x03k\x83\x01D\x14"},
+ {"bytes", "n*Y\x03\fG\x02\x02"},
{"cmp", ""},
- {"compress/bzip2", "\x02\x02\xe6\x01C"},
- {"compress/flate", "\x02k\x03z\r\x025\x01\x03"},
- {"compress/gzip", "\x02\x04`\a\x03\x15eU"},
- {"compress/lzw", "\x02k\x03z"},
- {"compress/zlib", "\x02\x04`\a\x03\x13\x01f"},
- {"container/heap", "\xae\x02"},
+ {"compress/bzip2", "\x02\x02\xed\x01A"},
+ {"compress/flate", "\x02l\x03\x80\x01\f\x033\x01\x03"},
+ {"compress/gzip", "\x02\x04a\a\x03\x14lT"},
+ {"compress/lzw", "\x02l\x03\x80\x01"},
+ {"compress/zlib", "\x02\x04a\a\x03\x12\x01m"},
+ {"container/heap", "\xb3\x02"},
{"container/list", ""},
{"container/ring", ""},
- {"context", "m\\i\x01\f"},
- {"crypto", "\x83\x01gE"},
- {"crypto/aes", "\x10\n\a\x8e\x02"},
- {"crypto/cipher", "\x03\x1e\x01\x01\x1d\x11\x1c,Q"},
- {"crypto/des", "\x10\x13\x1d-,\x96\x01\x03"},
- {"crypto/dsa", "@\x04)}\x0e"},
- {"crypto/ecdh", "\x03\v\f\x0e\x04\x14\x04\r\x1c}"},
- {"crypto/ecdsa", "\x0e\x05\x03\x04\x01\x0e\x16\x01\x04\f\x01\x1c}\x0e\x04L\x01"},
- {"crypto/ed25519", "\x0e\x1c\x16\n\a\x1c}E"},
- {"crypto/elliptic", "0=}\x0e:"},
- {"crypto/fips140", " \x05\x90\x01"},
- {"crypto/hkdf", "-\x12\x01-\x16"},
- {"crypto/hmac", "\x1a\x14\x11\x01\x112"},
+ {"context", "n\\m\x01\r"},
+ {"crypto", "\x83\x01nC"},
+ {"crypto/aes", "\x10\n\a\x93\x02"},
+ {"crypto/cipher", "\x03\x1e\x01\x01\x1e\x11\x1c+X"},
+ {"crypto/des", "\x10\x13\x1e-+\x9b\x01\x03"},
+ {"crypto/dsa", "A\x04)\x83\x01\r"},
+ {"crypto/ecdh", "\x03\v\f\x0e\x04\x15\x04\r\x1c\x83\x01"},
+ {"crypto/ecdsa", "\x0e\x05\x03\x04\x01\x0e\a\v\x05\x01\x04\f\x01\x1c\x83\x01\r\x05K\x01"},
+ {"crypto/ed25519", "\x0e\x1c\x11\x06\n\a\x1c\x83\x01C"},
+ {"crypto/elliptic", "0>\x83\x01\r9"},
+ {"crypto/fips140", " \x05"},
+ {"crypto/hkdf", "-\x13\x01-\x15"},
+ {"crypto/hmac", "\x1a\x14\x12\x01\x111"},
{"crypto/internal/boring", "\x0e\x02\rf"},
- {"crypto/internal/boring/bbig", "\x1a\xde\x01M"},
- {"crypto/internal/boring/bcache", "\xb3\x02\x12"},
+ {"crypto/internal/boring/bbig", "\x1a\xe4\x01M"},
+ {"crypto/internal/boring/bcache", "\xb8\x02\x13"},
{"crypto/internal/boring/sig", ""},
- {"crypto/internal/cryptotest", "\x03\r\n)\x0e\x19\x06\x13\x12#\a\t\x11\x11\x11\x1b\x01\f\r\x05\n"},
- {"crypto/internal/entropy", "E"},
- {"crypto/internal/fips140", ">/}9\r\x15"},
- {"crypto/internal/fips140/aes", "\x03\x1d\x03\x02\x13\x04\x01\x01\x05*\x8c\x016"},
- {"crypto/internal/fips140/aes/gcm", " \x01\x02\x02\x02\x11\x04\x01\x06*\x8a\x01"},
- {"crypto/internal/fips140/alias", "\xc5\x02"},
- {"crypto/internal/fips140/bigmod", "%\x17\x01\x06*\x8c\x01"},
- {"crypto/internal/fips140/check", " \x0e\x06\b\x02\xac\x01["},
- {"crypto/internal/fips140/check/checktest", "%\xfe\x01\""},
- {"crypto/internal/fips140/drbg", "\x03\x1c\x01\x01\x04\x13\x04\b\x01(}\x0f9"},
- {"crypto/internal/fips140/ecdh", "\x03\x1d\x05\x02\t\f1}\x0f9"},
- {"crypto/internal/fips140/ecdsa", "\x03\x1d\x04\x01\x02\a\x02\x067}H"},
- {"crypto/internal/fips140/ed25519", "\x03\x1d\x05\x02\x04\v7\xc2\x01\x03"},
- {"crypto/internal/fips140/edwards25519", "%\a\f\x041\x8c\x019"},
- {"crypto/internal/fips140/edwards25519/field", "%\x13\x041\x8c\x01"},
- {"crypto/internal/fips140/hkdf", "\x03\x1d\x05\t\x069"},
- {"crypto/internal/fips140/hmac", "\x03\x1d\x14\x01\x017"},
- {"crypto/internal/fips140/mlkem", "\x03\x1d\x05\x02\x0e\x03\x041"},
- {"crypto/internal/fips140/nistec", "%\f\a\x041\x8c\x01*\x0f\x13"},
- {"crypto/internal/fips140/nistec/fiat", "%\x135\x8c\x01"},
- {"crypto/internal/fips140/pbkdf2", "\x03\x1d\x05\t\x069"},
- {"crypto/internal/fips140/rsa", "\x03\x1d\x04\x01\x02\r\x01\x01\x025}H"},
- {"crypto/internal/fips140/sha256", "\x03\x1d\x1c\x01\x06*\x8c\x01"},
- {"crypto/internal/fips140/sha3", "\x03\x1d\x18\x04\x010\x8c\x01L"},
- {"crypto/internal/fips140/sha512", "\x03\x1d\x1c\x01\x06*\x8c\x01"},
- {"crypto/internal/fips140/ssh", " \x05"},
- {"crypto/internal/fips140/subtle", "#"},
- {"crypto/internal/fips140/tls12", "\x03\x1d\x05\t\x06\x027"},
- {"crypto/internal/fips140/tls13", "\x03\x1d\x05\b\a\b1"},
+ {"crypto/internal/cryptotest", "\x03\r\n\x06$\x0e\x19\x06\x12\x12 \x04\a\t\x16\x01\x11\x11\x1b\x01\a\x05\b\x03\x05\v"},
+ {"crypto/internal/entropy", "F"},
+ {"crypto/internal/fips140", "?/\x15\xa7\x01\v\x16"},
+ {"crypto/internal/fips140/aes", "\x03\x1d\x03\x02\x13\x05\x01\x01\x05*\x92\x014"},
+ {"crypto/internal/fips140/aes/gcm", " \x01\x02\x02\x02\x11\x05\x01\x06*\x8f\x01"},
+ {"crypto/internal/fips140/alias", "\xcb\x02"},
+ {"crypto/internal/fips140/bigmod", "%\x18\x01\x06*\x92\x01"},
+ {"crypto/internal/fips140/check", " \x0e\x06\t\x02\xb2\x01Z"},
+ {"crypto/internal/fips140/check/checktest", "%\x85\x02!"},
+ {"crypto/internal/fips140/drbg", "\x03\x1c\x01\x01\x04\x13\x05\b\x01(\x83\x01\x0f7"},
+ {"crypto/internal/fips140/ecdh", "\x03\x1d\x05\x02\t\r1\x83\x01\x0f7"},
+ {"crypto/internal/fips140/ecdsa", "\x03\x1d\x04\x01\x02\a\x02\x068\x15nF"},
+ {"crypto/internal/fips140/ed25519", "\x03\x1d\x05\x02\x04\v8\xc6\x01\x03"},
+ {"crypto/internal/fips140/edwards25519", "%\a\f\x051\x92\x017"},
+ {"crypto/internal/fips140/edwards25519/field", "%\x13\x051\x92\x01"},
+ {"crypto/internal/fips140/hkdf", "\x03\x1d\x05\t\x06:\x15"},
+ {"crypto/internal/fips140/hmac", "\x03\x1d\x14\x01\x018\x15"},
+ {"crypto/internal/fips140/mlkem", "\x03\x1d\x05\x02\x0e\x03\x051"},
+ {"crypto/internal/fips140/nistec", "%\f\a\x051\x92\x01*\r\x14"},
+ {"crypto/internal/fips140/nistec/fiat", "%\x136\x92\x01"},
+ {"crypto/internal/fips140/pbkdf2", "\x03\x1d\x05\t\x06:\x15"},
+ {"crypto/internal/fips140/rsa", "\x03\x1d\x04\x01\x02\r\x01\x01\x026\x15nF"},
+ {"crypto/internal/fips140/sha256", "\x03\x1d\x1d\x01\x06*\x15}"},
+ {"crypto/internal/fips140/sha3", "\x03\x1d\x18\x05\x010\x92\x01K"},
+ {"crypto/internal/fips140/sha512", "\x03\x1d\x1d\x01\x06*\x15}"},
+ {"crypto/internal/fips140/ssh", "%^"},
+ {"crypto/internal/fips140/subtle", "#\x1a\xc3\x01"},
+ {"crypto/internal/fips140/tls12", "\x03\x1d\x05\t\x06\x028\x15"},
+ {"crypto/internal/fips140/tls13", "\x03\x1d\x05\b\a\t1\x15"},
+ {"crypto/internal/fips140cache", "\xaa\x02\r&"},
{"crypto/internal/fips140deps", ""},
{"crypto/internal/fips140deps/byteorder", "\x99\x01"},
- {"crypto/internal/fips140deps/cpu", "\xad\x01\a"},
- {"crypto/internal/fips140deps/godebug", "\xb5\x01"},
- {"crypto/internal/fips140hash", "5\x1a4\xc2\x01"},
- {"crypto/internal/fips140only", "'\r\x01\x01M25"},
+ {"crypto/internal/fips140deps/cpu", "\xae\x01\a"},
+ {"crypto/internal/fips140deps/godebug", "\xb6\x01"},
+ {"crypto/internal/fips140hash", "5\x1b3\xc8\x01"},
+ {"crypto/internal/fips140only", "'\r\x01\x01M3;"},
{"crypto/internal/fips140test", ""},
- {"crypto/internal/hpke", "\x0e\x01\x01\x03\x1a\x1d#,`N"},
- {"crypto/internal/impl", "\xb0\x02"},
- {"crypto/internal/randutil", "\xea\x01\x12"},
- {"crypto/internal/sysrand", "mi!\x1f\r\x0f\x01\x01\v\x06"},
- {"crypto/internal/sysrand/internal/seccomp", "m"},
- {"crypto/md5", "\x0e2-\x16\x16`"},
+ {"crypto/internal/hpke", "\x0e\x01\x01\x03\x053#+gM"},
+ {"crypto/internal/impl", "\xb5\x02"},
+ {"crypto/internal/randutil", "\xf1\x01\x12"},
+ {"crypto/internal/sysrand", "nn! \r\r\x01\x01\f\x06"},
+ {"crypto/internal/sysrand/internal/seccomp", "n"},
+ {"crypto/md5", "\x0e3-\x15\x16g"},
{"crypto/mlkem", "/"},
- {"crypto/pbkdf2", "2\r\x01-\x16"},
- {"crypto/rand", "\x1a\x06\a\x19\x04\x01(}\x0eM"},
- {"crypto/rc4", "#\x1d-\xc2\x01"},
- {"crypto/rsa", "\x0e\f\x01\t\x0f\f\x01\x04\x06\a\x1c\x03\x1325\r\x01"},
- {"crypto/sha1", "\x0e\f&-\x16\x16\x14L"},
+ {"crypto/pbkdf2", "2\x0e\x01-\x15"},
+ {"crypto/rand", "\x1a\x06\a\x1a\x04\x01(\x83\x01\rM"},
+ {"crypto/rc4", "#\x1e-\xc6\x01"},
+ {"crypto/rsa", "\x0e\f\x01\t\x0f\r\x01\x04\x06\a\x1c\x03\x123;\f\x01"},
+ {"crypto/sha1", "\x0e\f'\x03*\x15\x16\x15R"},
{"crypto/sha256", "\x0e\f\x1aO"},
- {"crypto/sha3", "\x0e'N\xc2\x01"},
+ {"crypto/sha3", "\x0e'N\xc8\x01"},
{"crypto/sha512", "\x0e\f\x1cM"},
- {"crypto/subtle", "8\x96\x01U"},
- {"crypto/tls", "\x03\b\x02\x01\x01\x01\x01\x02\x01\x01\x01\x03\x01\a\x01\v\x02\n\x01\b\x05\x03\x01\x01\x01\x01\x02\x01\x02\x01\x17\x02\x03\x13\x16\x14\b5\x16\x16\r\n\x01\x01\x01\x02\x01\f\x06\x02\x01"},
- {"crypto/tls/internal/fips140tls", " \x93\x02"},
- {"crypto/x509", "\x03\v\x01\x01\x01\x01\x01\x01\x01\x011\x03\x02\x01\x01\x02\x05\x0e\x06\x02\x02\x03E\x032\x01\x02\t\x01\x01\x01\a\x10\x05\x01\x06\x02\x05\f\x01\x02\r\x02\x01\x01\x02\x03\x01"},
- {"crypto/x509/pkix", "c\x06\a\x88\x01G"},
- {"database/sql", "\x03\nJ\x16\x03z\f\x06\"\x05\n\x02\x03\x01\f\x02\x02\x02"},
- {"database/sql/driver", "\r`\x03\xae\x01\x11\x10"},
- {"debug/buildinfo", "\x03W\x02\x01\x01\b\a\x03`\x18\x02\x01+\x0f "},
- {"debug/dwarf", "\x03c\a\x03z1\x13\x01\x01"},
- {"debug/elf", "\x03\x06P\r\a\x03`\x19\x01,\x19\x01\x15"},
- {"debug/gosym", "\x03c\n\xbe\x01\x01\x01\x02"},
- {"debug/macho", "\x03\x06P\r\n`\x1a,\x19\x01"},
- {"debug/pe", "\x03\x06P\r\a\x03`\x1a,\x19\x01\x15"},
- {"debug/plan9obj", "f\a\x03`\x1a,"},
- {"embed", "m+:\x18\x01T"},
+ {"crypto/subtle", "8\x9b\x01W"},
+ {"crypto/tls", "\x03\b\x02\x01\x01\x01\x01\x02\x01\x01\x01\x02\x01\x01\a\x01\r\n\x01\t\x05\x03\x01\x01\x01\x01\x02\x01\x02\x01\x17\x02\x03\x12\x16\x15\b;\x16\x16\r\b\x01\x01\x01\x02\x01\r\x06\x02\x01\x0f"},
+ {"crypto/tls/internal/fips140tls", "\x17\xa1\x02"},
+ {"crypto/x509", "\x03\v\x01\x01\x01\x01\x01\x01\x01\x012\x05\x01\x01\x02\x05\x0e\x06\x02\x02\x03E\x038\x01\x02\b\x01\x01\x02\a\x10\x05\x01\x06\x02\x05\n\x01\x02\x0e\x02\x01\x01\x02\x03\x01"},
+ {"crypto/x509/pkix", "d\x06\a\x8d\x01G"},
+ {"database/sql", "\x03\nK\x16\x03\x80\x01\v\a\"\x05\b\x02\x03\x01\r\x02\x02\x02"},
+ {"database/sql/driver", "\ra\x03\xb4\x01\x0f\x11"},
+ {"debug/buildinfo", "\x03X\x02\x01\x01\b\a\x03e\x19\x02\x01+\x0f\x1f"},
+ {"debug/dwarf", "\x03d\a\x03\x80\x011\x11\x01\x01"},
+ {"debug/elf", "\x03\x06Q\r\a\x03e\x1a\x01,\x17\x01\x16"},
+ {"debug/gosym", "\x03d\n\xc2\x01\x01\x01\x02"},
+ {"debug/macho", "\x03\x06Q\r\ne\x1b,\x17\x01"},
+ {"debug/pe", "\x03\x06Q\r\a\x03e\x1b,\x17\x01\x16"},
+ {"debug/plan9obj", "g\a\x03e\x1b,"},
+ {"embed", "n*@\x19\x01S"},
{"embed/internal/embedtest", ""},
{"encoding", ""},
- {"encoding/ascii85", "\xea\x01E"},
- {"encoding/asn1", "\x03j\x03\x87\x01\x01&\x0f\x02\x01\x0f\x03\x01"},
- {"encoding/base32", "\xea\x01C\x02"},
- {"encoding/base64", "\x99\x01QC\x02"},
- {"encoding/binary", "m}\r'\x0f\x05"},
- {"encoding/csv", "\x02\x01j\x03zF\x11\x02"},
- {"encoding/gob", "\x02_\x05\a\x03`\x1a\f\x01\x02\x1d\b\x14\x01\x0e\x02"},
- {"encoding/hex", "m\x03zC\x03"},
- {"encoding/json", "\x03\x01]\x04\b\x03z\r'\x0f\x02\x01\x02\x0f\x01\x01\x02"},
- {"encoding/pem", "\x03b\b}C\x03"},
- {"encoding/xml", "\x02\x01^\f\x03z4\x05\f\x01\x02\x0f\x02"},
- {"errors", "\xc9\x01|"},
- {"expvar", "jK9\t\n\x15\r\n\x02\x03\x01\x10"},
- {"flag", "a\f\x03z,\b\x05\n\x02\x01\x0f"},
- {"fmt", "mE8\r\x1f\b\x0f\x02\x03\x11"},
- {"go/ast", "\x03\x01l\x0f\x01j\x03)\b\x0f\x02\x01"},
- {"go/ast/internal/tests", ""},
- {"go/build", "\x02\x01j\x03\x01\x03\x02\a\x02\x01\x17\x1e\x04\x02\t\x14\x12\x01+\x01\x04\x01\a\n\x02\x01\x11\x02\x02"},
- {"go/build/constraint", "m\xc2\x01\x01\x11\x02"},
- {"go/constant", "p\x10w\x01\x016\x01\x02\x11"},
- {"go/doc", "\x04l\x01\x06\t=-1\x12\x02\x01\x11\x02"},
- {"go/doc/comment", "\x03m\xbd\x01\x01\x01\x01\x11\x02"},
- {"go/format", "\x03m\x01\f\x01\x02jF"},
- {"go/importer", "s\a\x01\x01\x04\x01i9"},
- {"go/internal/gccgoimporter", "\x02\x01W\x13\x03\x05\v\x01g\x02,\x01\x05\x13\x01\v\b"},
- {"go/internal/gcimporter", "\x02n\x10\x01/\x05\x0e',\x17\x03\x02"},
- {"go/internal/srcimporter", "p\x01\x02\n\x03\x01i,\x01\x05\x14\x02\x13"},
- {"go/parser", "\x03j\x03\x01\x03\v\x01j\x01+\x06\x14"},
- {"go/printer", "p\x01\x03\x03\tj\r\x1f\x17\x02\x01\x02\n\x05\x02"},
- {"go/scanner", "\x03m\x10j2\x12\x01\x12\x02"},
- {"go/token", "\x04l\xbd\x01\x02\x03\x01\x0e\x02"},
- {"go/types", "\x03\x01\x06c\x03\x01\x04\b\x03\x02\x15\x1e\x06+\x04\x03\n%\a\n\x01\x01\x01\x02\x01\x0e\x02\x02"},
- {"go/version", "\xba\x01v"},
- {"hash", "\xea\x01"},
- {"hash/adler32", "m\x16\x16"},
- {"hash/crc32", "m\x16\x16\x14\x85\x01\x01\x12"},
- {"hash/crc64", "m\x16\x16\x99\x01"},
- {"hash/fnv", "m\x16\x16`"},
- {"hash/maphash", "\x94\x01\x05\x1b\x03@N"},
- {"html", "\xb0\x02\x02\x11"},
- {"html/template", "\x03g\x06\x19,5\x01\v \x05\x01\x02\x03\x0e\x01\x02\v\x01\x03\x02"},
- {"image", "\x02k\x1f^\x0f6\x03\x01"},
+ {"encoding/ascii85", "\xf1\x01C"},
+ {"encoding/asn1", "\x03k\x03\x8c\x01\x01'\r\x02\x01\x10\x03\x01"},
+ {"encoding/base32", "\xf1\x01A\x02"},
+ {"encoding/base64", "\x99\x01XA\x02"},
+ {"encoding/binary", "n\x83\x01\f(\r\x05"},
+ {"encoding/csv", "\x02\x01k\x03\x80\x01D\x12\x02"},
+ {"encoding/gob", "\x02`\x05\a\x03e\x1b\v\x01\x03\x1d\b\x12\x01\x0f\x02"},
+ {"encoding/hex", "n\x03\x80\x01A\x03"},
+ {"encoding/json", "\x03\x01^\x04\b\x03\x80\x01\f(\r\x02\x01\x02\x10\x01\x01\x02"},
+ {"encoding/pem", "\x03c\b\x83\x01A\x03"},
+ {"encoding/xml", "\x02\x01_\f\x03\x80\x014\x05\n\x01\x02\x10\x02"},
+ {"errors", "\xca\x01\x81\x01"},
+ {"expvar", "kK?\b\v\x15\r\b\x02\x03\x01\x11"},
+ {"flag", "b\f\x03\x80\x01,\b\x05\b\x02\x01\x10"},
+ {"fmt", "nE>\f \b\r\x02\x03\x12"},
+ {"go/ast", "\x03\x01m\x0e\x01q\x03)\b\r\x02\x01"},
+ {"go/build", "\x02\x01k\x03\x01\x02\x02\a\x02\x01\x17\x1f\x04\x02\t\x19\x13\x01+\x01\x04\x01\a\b\x02\x01\x12\x02\x02"},
+ {"go/build/constraint", "n\xc6\x01\x01\x12\x02"},
+ {"go/constant", "q\x0f}\x01\x024\x01\x02\x12"},
+ {"go/doc", "\x04m\x01\x05\t>31\x10\x02\x01\x12\x02"},
+ {"go/doc/comment", "\x03n\xc1\x01\x01\x01\x01\x12\x02"},
+ {"go/format", "\x03n\x01\v\x01\x02qD"},
+ {"go/importer", "s\a\x01\x01\x04\x01p9"},
+ {"go/internal/gccgoimporter", "\x02\x01X\x13\x03\x04\v\x01n\x02,\x01\x05\x11\x01\f\b"},
+ {"go/internal/gcimporter", "\x02o\x0f\x010\x05\x0e-,\x15\x03\x02"},
+ {"go/internal/srcimporter", "q\x01\x01\n\x03\x01p,\x01\x05\x12\x02\x14"},
+ {"go/parser", "\x03k\x03\x01\x02\v\x01q\x01+\x06\x12"},
+ {"go/printer", "q\x01\x02\x03\tq\f \x15\x02\x01\x02\v\x05\x02"},
+ {"go/scanner", "\x03n\x0fq2\x10\x01\x13\x02"},
+ {"go/token", "\x04m\x83\x01>\x02\x03\x01\x0f\x02"},
+ {"go/types", "\x03\x01\x06d\x03\x01\x03\b\x03\x02\x15\x1f\x061\x04\x03\t \x06\a\b\x01\x01\x01\x02\x01\x0f\x02\x02"},
+ {"go/version", "\xbb\x01z"},
+ {"hash", "\xf1\x01"},
+ {"hash/adler32", "n\x15\x16"},
+ {"hash/crc32", "n\x15\x16\x15\x89\x01\x01\x13"},
+ {"hash/crc64", "n\x15\x16\x9e\x01"},
+ {"hash/fnv", "n\x15\x16g"},
+ {"hash/maphash", "\x83\x01\x11!\x03\x93\x01"},
+ {"html", "\xb5\x02\x02\x12"},
+ {"html/template", "\x03h\x06\x18-;\x01\n!\x05\x01\x02\x03\f\x01\x02\f\x01\x03\x02"},
+ {"image", "\x02l\x1ee\x0f4\x03\x01"},
{"image/color", ""},
{"image/color/palette", "\x8c\x01"},
{"image/draw", "\x8b\x01\x01\x04"},
- {"image/gif", "\x02\x01\x05e\x03\x1b\x01\x01\x01\vQ"},
+ {"image/gif", "\x02\x01\x05f\x03\x1a\x01\x01\x01\vX"},
{"image/internal/imageutil", "\x8b\x01"},
- {"image/jpeg", "\x02k\x1e\x01\x04Z"},
- {"image/png", "\x02\a]\n\x13\x02\x06\x01^E"},
- {"index/suffixarray", "\x03c\a}\r*\f\x01"},
- {"internal/abi", "\xb4\x01\x91\x01"},
- {"internal/asan", "\xc5\x02"},
- {"internal/bisect", "\xa3\x02\x0f\x01"},
- {"internal/buildcfg", "pG_\x06\x02\x05\f\x01"},
- {"internal/bytealg", "\xad\x01\x98\x01"},
+ {"image/jpeg", "\x02l\x1d\x01\x04a"},
+ {"image/png", "\x02\a^\n\x12\x02\x06\x01eC"},
+ {"index/suffixarray", "\x03d\a\x83\x01\f+\n\x01"},
+ {"internal/abi", "\xb5\x01\x96\x01"},
+ {"internal/asan", "\xcb\x02"},
+ {"internal/bisect", "\xaa\x02\r\x01"},
+ {"internal/buildcfg", "qGe\x06\x02\x05\n\x01"},
+ {"internal/bytealg", "\xae\x01\x9d\x01"},
{"internal/byteorder", ""},
{"internal/cfg", ""},
- {"internal/chacha8rand", "\x99\x01\x1b\x91\x01"},
+ {"internal/cgrouptest", "q[Q\x06\x0f\x02\x01\x04\x01"},
+ {"internal/chacha8rand", "\x99\x01\x15\a\x96\x01"},
{"internal/copyright", ""},
{"internal/coverage", ""},
{"internal/coverage/calloc", ""},
- {"internal/coverage/cfile", "j\x06\x17\x16\x01\x02\x01\x01\x01\x01\x01\x01\x01#\x01\x1f,\x06\a\f\x01\x03\f\x06"},
- {"internal/coverage/cformat", "\x04l-\x04I\f7\x01\x02\f"},
- {"internal/coverage/cmerge", "p-Z"},
- {"internal/coverage/decodecounter", "f\n-\v\x02@,\x19\x16"},
- {"internal/coverage/decodemeta", "\x02d\n\x17\x16\v\x02@,"},
- {"internal/coverage/encodecounter", "\x02d\n-\f\x01\x02>\f \x17"},
- {"internal/coverage/encodemeta", "\x02\x01c\n\x13\x04\x16\r\x02>,/"},
- {"internal/coverage/pods", "\x04l-y\x06\x05\f\x02\x01"},
- {"internal/coverage/rtcov", "\xc5\x02"},
- {"internal/coverage/slicereader", "f\nz["},
- {"internal/coverage/slicewriter", "pz"},
- {"internal/coverage/stringtab", "p8\x04>"},
+ {"internal/coverage/cfile", "k\x06\x16\x17\x01\x02\x01\x01\x01\x01\x01\x01\x01#\x02$,\x06\a\n\x01\x03\r\x06"},
+ {"internal/coverage/cformat", "\x04m-\x04O\v6\x01\x02\r"},
+ {"internal/coverage/cmerge", "q-_"},
+ {"internal/coverage/decodecounter", "g\n-\v\x02F,\x17\x17"},
+ {"internal/coverage/decodemeta", "\x02e\n\x16\x17\v\x02F,"},
+ {"internal/coverage/encodecounter", "\x02e\n-\f\x01\x02D\v!\x15"},
+ {"internal/coverage/encodemeta", "\x02\x01d\n\x12\x04\x17\r\x02D,."},
+ {"internal/coverage/pods", "\x04m-\x7f\x06\x05\n\x02\x01"},
+ {"internal/coverage/rtcov", "\xcb\x02"},
+ {"internal/coverage/slicereader", "g\n\x80\x01Z"},
+ {"internal/coverage/slicewriter", "q\x80\x01"},
+ {"internal/coverage/stringtab", "q8\x04D"},
{"internal/coverage/test", ""},
{"internal/coverage/uleb128", ""},
- {"internal/cpu", "\xc5\x02"},
- {"internal/dag", "\x04l\xbd\x01\x03"},
- {"internal/diff", "\x03m\xbe\x01\x02"},
- {"internal/exportdata", "\x02\x01j\x03\x03]\x1a,\x01\x05\x13\x01\x02"},
- {"internal/filepathlite", "m+:\x19B"},
- {"internal/fmtsort", "\x04\x9a\x02\x0f"},
- {"internal/fuzz", "\x03\nA\x18\x04\x03\x03\x01\f\x0355\r\x02\x1d\x01\x05\x02\x05\f\x01\x02\x01\x01\v\x04\x02"},
+ {"internal/cpu", "\xcb\x02"},
+ {"internal/dag", "\x04m\xc1\x01\x03"},
+ {"internal/diff", "\x03n\xc2\x01\x02"},
+ {"internal/exportdata", "\x02\x01k\x03\x02c\x1b,\x01\x05\x11\x01\x02"},
+ {"internal/filepathlite", "n*@\x1a@"},
+ {"internal/fmtsort", "\x04\xa1\x02\r"},
+ {"internal/fuzz", "\x03\nB\x18\x04\x03\x03\x01\v\x036;\f\x03\x1d\x01\x05\x02\x05\n\x01\x02\x01\x01\f\x04\x02"},
{"internal/goarch", ""},
- {"internal/godebug", "\x96\x01 |\x01\x12"},
+ {"internal/godebug", "\x96\x01!\x80\x01\x01\x13"},
{"internal/godebugs", ""},
{"internal/goexperiment", ""},
{"internal/goos", ""},
- {"internal/goroot", "\x96\x02\x01\x05\x14\x02"},
+ {"internal/goroot", "\x9d\x02\x01\x05\x12\x02"},
{"internal/gover", "\x04"},
{"internal/goversion", ""},
{"internal/itoa", ""},
- {"internal/lazyregexp", "\x96\x02\v\x0f\x02"},
- {"internal/lazytemplate", "\xea\x01,\x1a\x02\v"},
- {"internal/msan", "\xc5\x02"},
+ {"internal/lazyregexp", "\x9d\x02\v\r\x02"},
+ {"internal/lazytemplate", "\xf1\x01,\x18\x02\f"},
+ {"internal/msan", "\xcb\x02"},
{"internal/nettrace", ""},
- {"internal/obscuretestdata", "e\x85\x01,"},
- {"internal/oserror", "m"},
- {"internal/pkgbits", "\x03K\x18\a\x03\x05\vj\x0e\x1e\r\f\x01"},
+ {"internal/obscuretestdata", "f\x8b\x01,"},
+ {"internal/oserror", "n"},
+ {"internal/pkgbits", "\x03L\x18\a\x03\x04\vq\r\x1f\r\n\x01"},
{"internal/platform", ""},
- {"internal/poll", "mO\x1a\x149\x0f\x01\x01\v\x06"},
- {"internal/profile", "\x03\x04f\x03z7\r\x01\x01\x0f"},
+ {"internal/poll", "nO\x1f\x159\r\x01\x01\f\x06"},
+ {"internal/profile", "\x03\x04g\x03\x80\x017\v\x01\x01\x10"},
{"internal/profilerecord", ""},
- {"internal/race", "\x94\x01\xb1\x01"},
- {"internal/reflectlite", "\x94\x01 3<\""},
- {"internal/runtime/atomic", "\xc5\x02"},
- {"internal/runtime/exithook", "\xca\x01{"},
- {"internal/runtime/maps", "\x94\x01\x01\x1f\v\t\x05\x01w"},
- {"internal/runtime/math", "\xb4\x01"},
- {"internal/runtime/sys", "\xb4\x01\x04"},
- {"internal/runtime/syscall", "\xc5\x02"},
- {"internal/saferio", "\xea\x01["},
- {"internal/singleflight", "\xb2\x02"},
- {"internal/stringslite", "\x98\x01\xad\x01"},
- {"internal/sync", "\x94\x01 \x14k\x12"},
- {"internal/synctest", "\xc5\x02"},
- {"internal/syscall/execenv", "\xb4\x02"},
- {"internal/syscall/unix", "\xa3\x02\x10\x01\x11"},
- {"internal/sysinfo", "\x02\x01\xaa\x01=,\x1a\x02"},
+ {"internal/race", "\x94\x01\xb7\x01"},
+ {"internal/reflectlite", "\x94\x01!9\b\x13\x01\a\x03E;\x01\x03\a\x01\x03\x02\x02\x01\x02\x06\x02\x01\x01\n\x01\x01\x05\x01\x02\x05\b\x01\x01\x01\x02\x01\r\x02\x02\x02\b\x01\x01\x01"},
+ {"net/http/cgi", "\x02Q\x1b\x03\x80\x01\x04\a\v\x01\x13\x01\x01\x01\x04\x01\x05\x02\b\x02\x01\x10\x0e"},
+ {"net/http/cookiejar", "\x04j\x03\x96\x01\x01\b\f\x16\x03\x02\x0e\x04"},
+ {"net/http/fcgi", "\x02\x01\nZ\a\x03\x80\x01\x16\x01\x01\x14\x18\x02\x0e"},
+ {"net/http/httptest", "\x02\x01\nF\x02\x1b\x01\x80\x01\x04\x12\x01\n\t\x02\x17\x01\x02\x0e\x0e"},
+ {"net/http/httptrace", "\rFnF\x14\n "},
+ {"net/http/httputil", "\x02\x01\na\x03\x80\x01\x04\x0f\x03\x01\x05\x02\x01\v\x01\x19\x02\x0e\x0e"},
+ {"net/http/internal", "\x02\x01k\x03\x80\x01"},
+ {"net/http/internal/ascii", "\xb5\x02\x12"},
+ {"net/http/internal/httpcommon", "\ra\x03\x9c\x01\x0e\x01\x17\x01\x01\x02\x1c\x02"},
+ {"net/http/internal/testcert", "\xb5\x02"},
+ {"net/http/pprof", "\x02\x01\nd\x18-\x11*\x04\x13\x14\x01\r\x04\x03\x01\x02\x01\x10"},
{"net/internal/cgotest", ""},
- {"net/internal/socktest", "p\xc2\x01\x02"},
- {"net/mail", "\x02k\x03z\x04\x0f\x03\x14\x1c\x02\r\x04"},
- {"net/netip", "\x04i+\x01#;\x026\x15"},
- {"net/rpc", "\x02f\x05\x03\x10\n`\x04\x12\x01\x1d\x0f\x03\x02"},
- {"net/rpc/jsonrpc", "j\x03\x03z\x16\x11!"},
- {"net/smtp", "\x19.\v\x13\b\x03z\x16\x14\x1c"},
- {"net/textproto", "\x02\x01j\x03z\r\t/\x01\x02\x13"},
- {"net/url", "m\x03\x86\x01%\x12\x02\x01\x15"},
- {"os", "m+\x01\x18\x03\b\t\r\x03\x01\x04\x10\x018\n\x05\x01\x01\v\x06"},
- {"os/exec", "\x03\n`H \x01\x14\x01+\x06\a\f\x01\x04\v"},
- {"os/exec/internal/fdtest", "\xb4\x02"},
- {"os/signal", "\r\x89\x02\x17\x05\x02"},
- {"os/user", "\x02\x01j\x03z,\r\f\x01\x02"},
- {"path", "m+\xab\x01"},
- {"path/filepath", "m+\x19:+\r\n\x03\x04\x0f"},
- {"plugin", "m"},
- {"reflect", "m'\x04\x1c\b\f\x04\x02\x19\x10,\f\x03\x0f\x02\x02"},
+ {"net/internal/socktest", "q\xc6\x01\x02"},
+ {"net/mail", "\x02l\x03\x80\x01\x04\x0f\x03\x14\x1a\x02\x0e\x04"},
+ {"net/netip", "\x04j*\x01$@\x034\x16"},
+ {"net/rpc", "\x02g\x05\x03\x0f\ng\x04\x12\x01\x1d\r\x03\x02"},
+ {"net/rpc/jsonrpc", "k\x03\x03\x80\x01\x16\x11\x1f"},
+ {"net/smtp", "\x19/\v\x13\b\x03\x80\x01\x16\x14\x1a"},
+ {"net/textproto", "\x02\x01k\x03\x80\x01\f\n-\x01\x02\x14"},
+ {"net/url", "n\x03\x8b\x01&\x10\x02\x01\x16"},
+ {"os", "n*\x01\x19\x03\b\t\x12\x03\x01\x05\x10\x018\b\x05\x01\x01\f\x06"},
+ {"os/exec", "\x03\naH%\x01\x15\x01+\x06\a\n\x01\x04\f"},
+ {"os/exec/internal/fdtest", "\xb9\x02"},
+ {"os/signal", "\r\x90\x02\x15\x05\x02"},
+ {"os/user", "\x02\x01k\x03\x80\x01,\r\n\x01\x02"},
+ {"path", "n*\xb1\x01"},
+ {"path/filepath", "n*\x1a@+\r\b\x03\x04\x10"},
+ {"plugin", "n"},
+ {"reflect", "n&\x04\x1d\b\f\x06\x04\x1b\x06\t-\n\x03\x10\x02\x02"},
{"reflect/internal/example1", ""},
{"reflect/internal/example2", ""},
- {"regexp", "\x03\xe7\x018\v\x02\x01\x02\x0f\x02"},
- {"regexp/syntax", "\xad\x02\x01\x01\x01\x11\x02"},
- {"runtime", "\x94\x01\x04\x01\x02\f\x06\a\x02\x01\x01\x0f\x03\x01\x01\x01\x01\x01\x03\x0fd"},
- {"runtime/coverage", "\x9f\x01K"},
- {"runtime/debug", "pUQ\r\n\x02\x01\x0f\x06"},
- {"runtime/internal/startlinetest", ""},
- {"runtime/internal/wasitest", ""},
- {"runtime/metrics", "\xb6\x01A,\""},
- {"runtime/pprof", "\x02\x01\x01\x03\x06Y\a\x03$3#\r\x1f\r\n\x01\x01\x01\x02\x02\b\x03\x06"},
- {"runtime/race", "\xab\x02"},
+ {"regexp", "\x03\xee\x018\t\x02\x01\x02\x10\x02"},
+ {"regexp/syntax", "\xb2\x02\x01\x01\x01\x02\x10\x02"},
+ {"runtime", "\x94\x01\x04\x01\x03\f\x06\a\x02\x01\x01\x0f\x03\x01\x01\x01\x01\x01\x02\x01\x01\x04\x10c"},
+ {"runtime/coverage", "\xa0\x01Q"},
+ {"runtime/debug", "qUW\r\b\x02\x01\x10\x06"},
+ {"runtime/metrics", "\xb7\x01F-!"},
+ {"runtime/pprof", "\x02\x01\x01\x03\x06Z\a\x03#4)\f \r\b\x01\x01\x01\x02\x02\t\x03\x06"},
+ {"runtime/race", "\xb0\x02"},
{"runtime/race/internal/amd64v1", ""},
- {"runtime/trace", "\rcz9\x0f\x01\x12"},
- {"slices", "\x04\xe9\x01\fL"},
- {"sort", "\xc9\x0104"},
- {"strconv", "m+:%\x02J"},
- {"strings", "m'\x04:\x18\x03\f9\x0f\x02\x02"},
+ {"runtime/trace", "\ra\x03w\t9\b\x05\x01\r\x06"},
+ {"slices", "\x04\xf0\x01\fK"},
+ {"sort", "\xca\x0162"},
+ {"strconv", "n*@%\x03I"},
+ {"strings", "n&\x04@\x19\x03\f7\x10\x02\x02"},
{"structs", ""},
- {"sync", "\xc8\x01\vP\x10\x12"},
- {"sync/atomic", "\xc5\x02"},
- {"syscall", "m(\x03\x01\x1b\b\x03\x03\x06\aT\n\x05\x01\x12"},
- {"testing", "\x03\n`\x02\x01X\x0f\x13\r\x04\x1b\x06\x02\x05\x02\a\x01\x02\x01\x02\x01\f\x02\x02\x02"},
- {"testing/fstest", "m\x03z\x01\v%\x12\x03\b\a"},
- {"testing/internal/testdeps", "\x02\v\xa6\x01'\x10,\x03\x05\x03\b\a\x02\r"},
- {"testing/iotest", "\x03j\x03z\x04"},
- {"testing/quick", "o\x01\x87\x01\x04#\x12\x0f"},
- {"testing/slogtest", "\r`\x03\x80\x01.\x05\x12\n"},
- {"text/scanner", "\x03mz,+\x02"},
- {"text/tabwriter", "pzY"},
- {"text/template", "m\x03B8\x01\v\x1f\x01\x05\x01\x02\x05\r\x02\f\x03\x02"},
- {"text/template/parse", "\x03m\xb3\x01\f\x01\x11\x02"},
- {"time", "m+\x1d\x1d'*\x0f\x02\x11"},
- {"time/tzdata", "m\xc7\x01\x11"},
+ {"sync", "\xc9\x01\x10\x01P\x0e\x13"},
+ {"sync/atomic", "\xcb\x02"},
+ {"syscall", "n'\x03\x01\x1c\b\x03\x03\x06\vV\b\x05\x01\x13"},
+ {"testing", "\x03\na\x02\x01X\x14\x14\f\x05\x1b\x06\x02\x05\x02\x05\x01\x02\x01\x02\x01\r\x02\x02\x02"},
+ {"testing/fstest", "n\x03\x80\x01\x01\n&\x10\x03\b\b"},
+ {"testing/internal/testdeps", "\x02\v\xa7\x01-\x10,\x03\x05\x03\x06\a\x02\x0e"},
+ {"testing/iotest", "\x03k\x03\x80\x01\x04"},
+ {"testing/quick", "p\x01\x8c\x01\x05#\x10\x10"},
+ {"testing/slogtest", "\ra\x03\x86\x01.\x05\x10\v"},
+ {"testing/synctest", "\xda\x01`\x11"},
+ {"text/scanner", "\x03n\x80\x01,*\x02"},
+ {"text/tabwriter", "q\x80\x01X"},
+ {"text/template", "n\x03B>\x01\n \x01\x05\x01\x02\x05\v\x02\r\x03\x02"},
+ {"text/template/parse", "\x03n\xb9\x01\n\x01\x12\x02"},
+ {"time", "n*\x1e\"(*\r\x02\x12"},
+ {"time/tzdata", "n\xcb\x01\x12"},
{"unicode", ""},
{"unicode/utf16", ""},
{"unicode/utf8", ""},
- {"unique", "\x94\x01>\x01P\x0f\x13\x12"},
+ {"unique", "\x94\x01!#\x01Q\r\x01\x13\x12"},
{"unsafe", ""},
- {"vendor/golang.org/x/crypto/chacha20", "\x10V\a\x8c\x01*'"},
- {"vendor/golang.org/x/crypto/chacha20poly1305", "\x10V\a\xd9\x01\x04\x01\a"},
- {"vendor/golang.org/x/crypto/cryptobyte", "c\n\x03\x88\x01&!\n"},
+ {"vendor/golang.org/x/crypto/chacha20", "\x10W\a\x92\x01*&"},
+ {"vendor/golang.org/x/crypto/chacha20poly1305", "\x10W\a\xde\x01\x04\x01\a"},
+ {"vendor/golang.org/x/crypto/cryptobyte", "d\n\x03\x8d\x01' \n"},
{"vendor/golang.org/x/crypto/cryptobyte/asn1", ""},
- {"vendor/golang.org/x/crypto/internal/alias", "\xc5\x02"},
- {"vendor/golang.org/x/crypto/internal/poly1305", "Q\x15\x93\x01"},
- {"vendor/golang.org/x/net/dns/dnsmessage", "m"},
- {"vendor/golang.org/x/net/http/httpguts", "\x80\x02\x14\x1c\x13\r"},
- {"vendor/golang.org/x/net/http/httpproxy", "m\x03\x90\x01\x15\x01\x1a\x13\r"},
- {"vendor/golang.org/x/net/http2/hpack", "\x03j\x03zH"},
- {"vendor/golang.org/x/net/idna", "p\x87\x019\x13\x10\x02\x01"},
- {"vendor/golang.org/x/net/nettest", "\x03c\a\x03z\x11\x05\x16\x01\f\f\x01\x02\x02\x01\n"},
- {"vendor/golang.org/x/sys/cpu", "\x96\x02\r\f\x01\x15"},
- {"vendor/golang.org/x/text/secure/bidirule", "m\xd6\x01\x11\x01"},
- {"vendor/golang.org/x/text/transform", "\x03j}Y"},
- {"vendor/golang.org/x/text/unicode/bidi", "\x03\be~@\x15"},
- {"vendor/golang.org/x/text/unicode/norm", "f\nzH\x11\x11"},
- {"weak", "\x94\x01\x8f\x01\""},
+ {"vendor/golang.org/x/crypto/internal/alias", "\xcb\x02"},
+ {"vendor/golang.org/x/crypto/internal/poly1305", "R\x15\x99\x01"},
+ {"vendor/golang.org/x/net/dns/dnsmessage", "n"},
+ {"vendor/golang.org/x/net/http/httpguts", "\x87\x02\x14\x1a\x14\r"},
+ {"vendor/golang.org/x/net/http/httpproxy", "n\x03\x96\x01\x10\x05\x01\x18\x14\r"},
+ {"vendor/golang.org/x/net/http2/hpack", "\x03k\x03\x80\x01F"},
+ {"vendor/golang.org/x/net/idna", "q\x8c\x018\x14\x10\x02\x01"},
+ {"vendor/golang.org/x/net/nettest", "\x03d\a\x03\x80\x01\x11\x05\x16\x01\f\n\x01\x02\x02\x01\v"},
+ {"vendor/golang.org/x/sys/cpu", "\x9d\x02\r\n\x01\x16"},
+ {"vendor/golang.org/x/text/secure/bidirule", "n\xdb\x01\x11\x01"},
+ {"vendor/golang.org/x/text/transform", "\x03k\x83\x01X"},
+ {"vendor/golang.org/x/text/unicode/bidi", "\x03\bf\x84\x01>\x16"},
+ {"vendor/golang.org/x/text/unicode/norm", "g\n\x80\x01F\x12\x11"},
+ {"weak", "\x94\x01\x96\x01!"},
}
diff --git a/hack/tools/vendor/golang.org/x/tools/internal/stdlib/manifest.go b/hack/tools/vendor/golang.org/x/tools/internal/stdlib/manifest.go
index 64f0326b644d..c1faa50d367c 100644
--- a/hack/tools/vendor/golang.org/x/tools/internal/stdlib/manifest.go
+++ b/hack/tools/vendor/golang.org/x/tools/internal/stdlib/manifest.go
@@ -502,6 +502,7 @@ var PackageSymbols = map[string][]Symbol{
{"MD4", Const, 0, ""},
{"MD5", Const, 0, ""},
{"MD5SHA1", Const, 0, ""},
+ {"MessageSigner", Type, 25, ""},
{"PrivateKey", Type, 0, ""},
{"PublicKey", Type, 2, ""},
{"RIPEMD160", Const, 0, ""},
@@ -517,6 +518,7 @@ var PackageSymbols = map[string][]Symbol{
{"SHA512", Const, 0, ""},
{"SHA512_224", Const, 5, ""},
{"SHA512_256", Const, 5, ""},
+ {"SignMessage", Func, 25, "func(signer Signer, rand io.Reader, msg []byte, opts SignerOpts) (signature []byte, err error)"},
{"Signer", Type, 4, ""},
{"SignerOpts", Type, 4, ""},
},
@@ -600,10 +602,12 @@ var PackageSymbols = map[string][]Symbol{
{"X25519", Func, 20, "func() Curve"},
},
"crypto/ecdsa": {
+ {"(*PrivateKey).Bytes", Method, 25, ""},
{"(*PrivateKey).ECDH", Method, 20, ""},
{"(*PrivateKey).Equal", Method, 15, ""},
{"(*PrivateKey).Public", Method, 4, ""},
{"(*PrivateKey).Sign", Method, 4, ""},
+ {"(*PublicKey).Bytes", Method, 25, ""},
{"(*PublicKey).ECDH", Method, 20, ""},
{"(*PublicKey).Equal", Method, 15, ""},
{"(PrivateKey).Add", Method, 0, ""},
@@ -619,6 +623,8 @@ var PackageSymbols = map[string][]Symbol{
{"(PublicKey).ScalarBaseMult", Method, 0, ""},
{"(PublicKey).ScalarMult", Method, 0, ""},
{"GenerateKey", Func, 0, "func(c elliptic.Curve, rand io.Reader) (*PrivateKey, error)"},
+ {"ParseRawPrivateKey", Func, 25, "func(curve elliptic.Curve, data []byte) (*PrivateKey, error)"},
+ {"ParseUncompressedPublicKey", Func, 25, "func(curve elliptic.Curve, data []byte) (*PublicKey, error)"},
{"PrivateKey", Type, 0, ""},
{"PrivateKey.D", Field, 0, ""},
{"PrivateKey.PublicKey", Field, 0, ""},
@@ -815,6 +821,7 @@ var PackageSymbols = map[string][]Symbol{
"crypto/sha3": {
{"(*SHA3).AppendBinary", Method, 24, ""},
{"(*SHA3).BlockSize", Method, 24, ""},
+ {"(*SHA3).Clone", Method, 25, ""},
{"(*SHA3).MarshalBinary", Method, 24, ""},
{"(*SHA3).Reset", Method, 24, ""},
{"(*SHA3).Size", Method, 24, ""},
@@ -967,6 +974,7 @@ var PackageSymbols = map[string][]Symbol{
{"Config.GetCertificate", Field, 4, ""},
{"Config.GetClientCertificate", Field, 8, ""},
{"Config.GetConfigForClient", Field, 8, ""},
+ {"Config.GetEncryptedClientHelloKeys", Field, 25, ""},
{"Config.InsecureSkipVerify", Field, 0, ""},
{"Config.KeyLogWriter", Field, 8, ""},
{"Config.MaxVersion", Field, 2, ""},
@@ -5463,6 +5471,7 @@ var PackageSymbols = map[string][]Symbol{
{"ParenExpr.X", Field, 0, ""},
{"Pkg", Const, 0, ""},
{"Preorder", Func, 23, "func(root Node) iter.Seq[Node]"},
+ {"PreorderStack", Func, 25, "func(root Node, stack []Node, f func(n Node, stack []Node) bool)"},
{"Print", Func, 0, "func(fset *token.FileSet, x any) error"},
{"RECV", Const, 0, ""},
{"RangeStmt", Type, 0, ""},
@@ -5933,6 +5942,7 @@ var PackageSymbols = map[string][]Symbol{
{"(*File).SetLines", Method, 0, ""},
{"(*File).SetLinesForContent", Method, 0, ""},
{"(*File).Size", Method, 0, ""},
+ {"(*FileSet).AddExistingFiles", Method, 25, ""},
{"(*FileSet).AddFile", Method, 0, ""},
{"(*FileSet).Base", Method, 0, ""},
{"(*FileSet).File", Method, 0, ""},
@@ -6382,7 +6392,7 @@ var PackageSymbols = map[string][]Symbol{
{"Label", Type, 5, ""},
{"LocalVar", Const, 25, ""},
{"LookupFieldOrMethod", Func, 5, "func(T Type, addressable bool, pkg *Package, name string) (obj Object, index []int, indirect bool)"},
- {"LookupSelection", Func, 25, ""},
+ {"LookupSelection", Func, 25, "func(T Type, addressable bool, pkg *Package, name string) (Selection, bool)"},
{"Map", Type, 5, ""},
{"MethodExpr", Const, 5, ""},
{"MethodSet", Type, 5, ""},
@@ -6490,9 +6500,11 @@ var PackageSymbols = map[string][]Symbol{
{"Lang", Func, 22, "func(x string) string"},
},
"hash": {
+ {"Cloner", Type, 25, ""},
{"Hash", Type, 0, ""},
{"Hash32", Type, 0, ""},
{"Hash64", Type, 0, ""},
+ {"XOF", Type, 25, ""},
},
"hash/adler32": {
{"Checksum", Func, 0, "func(data []byte) uint32"},
@@ -6533,6 +6545,7 @@ var PackageSymbols = map[string][]Symbol{
},
"hash/maphash": {
{"(*Hash).BlockSize", Method, 14, ""},
+ {"(*Hash).Clone", Method, 25, ""},
{"(*Hash).Reset", Method, 14, ""},
{"(*Hash).Seed", Method, 14, ""},
{"(*Hash).SetSeed", Method, 14, ""},
@@ -7133,7 +7146,7 @@ var PackageSymbols = map[string][]Symbol{
{"FormatFileInfo", Func, 21, "func(info FileInfo) string"},
{"Glob", Func, 16, "func(fsys FS, pattern string) (matches []string, err error)"},
{"GlobFS", Type, 16, ""},
- {"Lstat", Func, 25, ""},
+ {"Lstat", Func, 25, "func(fsys FS, name string) (FileInfo, error)"},
{"ModeAppend", Const, 16, ""},
{"ModeCharDevice", Const, 16, ""},
{"ModeDevice", Const, 16, ""},
@@ -7158,7 +7171,7 @@ var PackageSymbols = map[string][]Symbol{
{"ReadDirFile", Type, 16, ""},
{"ReadFile", Func, 16, "func(fsys FS, name string) ([]byte, error)"},
{"ReadFileFS", Type, 16, ""},
- {"ReadLink", Func, 25, ""},
+ {"ReadLink", Func, 25, "func(fsys FS, name string) (string, error)"},
{"ReadLinkFS", Type, 25, ""},
{"SkipAll", Var, 20, ""},
{"SkipDir", Var, 16, ""},
@@ -7275,6 +7288,7 @@ var PackageSymbols = map[string][]Symbol{
{"(Record).Attrs", Method, 21, ""},
{"(Record).Clone", Method, 21, ""},
{"(Record).NumAttrs", Method, 21, ""},
+ {"(Record).Source", Method, 25, ""},
{"(Value).Any", Method, 21, ""},
{"(Value).Bool", Method, 21, ""},
{"(Value).Duration", Method, 21, ""},
@@ -7306,6 +7320,7 @@ var PackageSymbols = map[string][]Symbol{
{"Float64", Func, 21, "func(key string, v float64) Attr"},
{"Float64Value", Func, 21, "func(v float64) Value"},
{"Group", Func, 21, "func(key string, args ...any) Attr"},
+ {"GroupAttrs", Func, 25, "func(key string, attrs ...Attr) Attr"},
{"GroupValue", Func, 21, "func(as ...Attr) Value"},
{"Handler", Type, 21, ""},
{"HandlerOptions", Type, 21, ""},
@@ -7916,7 +7931,7 @@ var PackageSymbols = map[string][]Symbol{
{"(*Writer).WriteField", Method, 0, ""},
{"ErrMessageTooLarge", Var, 9, ""},
{"File", Type, 0, ""},
- {"FileContentDisposition", Func, 25, ""},
+ {"FileContentDisposition", Func, 25, "func(fieldname string, filename string) string"},
{"FileHeader", Type, 0, ""},
{"FileHeader.Filename", Field, 0, ""},
{"FileHeader.Header", Field, 0, ""},
@@ -8294,6 +8309,11 @@ var PackageSymbols = map[string][]Symbol{
{"(*Client).PostForm", Method, 0, ""},
{"(*Cookie).String", Method, 0, ""},
{"(*Cookie).Valid", Method, 18, ""},
+ {"(*CrossOriginProtection).AddInsecureBypassPattern", Method, 25, ""},
+ {"(*CrossOriginProtection).AddTrustedOrigin", Method, 25, ""},
+ {"(*CrossOriginProtection).Check", Method, 25, ""},
+ {"(*CrossOriginProtection).Handler", Method, 25, ""},
+ {"(*CrossOriginProtection).SetDenyHandler", Method, 25, ""},
{"(*MaxBytesError).Error", Method, 19, ""},
{"(*ProtocolError).Error", Method, 0, ""},
{"(*ProtocolError).Is", Method, 21, ""},
@@ -8388,6 +8408,7 @@ var PackageSymbols = map[string][]Symbol{
{"Cookie.Unparsed", Field, 0, ""},
{"Cookie.Value", Field, 0, ""},
{"CookieJar", Type, 0, ""},
+ {"CrossOriginProtection", Type, 25, ""},
{"DefaultClient", Var, 0, ""},
{"DefaultMaxHeaderBytes", Const, 0, ""},
{"DefaultMaxIdleConnsPerHost", Const, 0, ""},
@@ -8460,6 +8481,7 @@ var PackageSymbols = map[string][]Symbol{
{"MethodPost", Const, 6, ""},
{"MethodPut", Const, 6, ""},
{"MethodTrace", Const, 6, ""},
+ {"NewCrossOriginProtection", Func, 25, "func() *CrossOriginProtection"},
{"NewFileTransport", Func, 0, "func(fs FileSystem) RoundTripper"},
{"NewFileTransportFS", Func, 22, "func(fsys fs.FS) RoundTripper"},
{"NewRequest", Func, 0, "func(method string, url string, body io.Reader) (*Request, error)"},
@@ -9174,15 +9196,19 @@ var PackageSymbols = map[string][]Symbol{
{"(*Root).Link", Method, 25, ""},
{"(*Root).Lstat", Method, 24, ""},
{"(*Root).Mkdir", Method, 24, ""},
+ {"(*Root).MkdirAll", Method, 25, ""},
{"(*Root).Name", Method, 24, ""},
{"(*Root).Open", Method, 24, ""},
{"(*Root).OpenFile", Method, 24, ""},
{"(*Root).OpenRoot", Method, 24, ""},
+ {"(*Root).ReadFile", Method, 25, ""},
{"(*Root).Readlink", Method, 25, ""},
{"(*Root).Remove", Method, 24, ""},
+ {"(*Root).RemoveAll", Method, 25, ""},
{"(*Root).Rename", Method, 25, ""},
{"(*Root).Stat", Method, 24, ""},
{"(*Root).Symlink", Method, 25, ""},
+ {"(*Root).WriteFile", Method, 25, ""},
{"(*SyscallError).Error", Method, 0, ""},
{"(*SyscallError).Timeout", Method, 10, ""},
{"(*SyscallError).Unwrap", Method, 13, ""},
@@ -9623,6 +9649,7 @@ var PackageSymbols = map[string][]Symbol{
{"StructTag", Type, 0, ""},
{"Swapper", Func, 8, "func(slice any) func(i int, j int)"},
{"Type", Type, 0, ""},
+ {"TypeAssert", Func, 25, "func[T any](v Value) (T, bool)"},
{"TypeFor", Func, 22, "func[T any]() Type"},
{"TypeOf", Func, 0, "func(i any) Type"},
{"Uint", Const, 0, ""},
@@ -9909,6 +9936,7 @@ var PackageSymbols = map[string][]Symbol{
{"SetBlockProfileRate", Func, 1, "func(rate int)"},
{"SetCPUProfileRate", Func, 0, "func(hz int)"},
{"SetCgoTraceback", Func, 7, "func(version int, traceback unsafe.Pointer, context unsafe.Pointer, symbolizer unsafe.Pointer)"},
+ {"SetDefaultGOMAXPROCS", Func, 25, "func()"},
{"SetFinalizer", Func, 0, "func(obj any, finalizer any)"},
{"SetMutexProfileFraction", Func, 8, "func(rate int) int"},
{"Stack", Func, 0, "func(buf []byte, all bool) int"},
@@ -10021,11 +10049,20 @@ var PackageSymbols = map[string][]Symbol{
{"WriteHeapProfile", Func, 0, "func(w io.Writer) error"},
},
"runtime/trace": {
+ {"(*FlightRecorder).Enabled", Method, 25, ""},
+ {"(*FlightRecorder).Start", Method, 25, ""},
+ {"(*FlightRecorder).Stop", Method, 25, ""},
+ {"(*FlightRecorder).WriteTo", Method, 25, ""},
{"(*Region).End", Method, 11, ""},
{"(*Task).End", Method, 11, ""},
+ {"FlightRecorder", Type, 25, ""},
+ {"FlightRecorderConfig", Type, 25, ""},
+ {"FlightRecorderConfig.MaxBytes", Field, 25, ""},
+ {"FlightRecorderConfig.MinAge", Field, 25, ""},
{"IsEnabled", Func, 11, "func() bool"},
{"Log", Func, 11, "func(ctx context.Context, category string, message string)"},
{"Logf", Func, 11, "func(ctx context.Context, category string, format string, args ...any)"},
+ {"NewFlightRecorder", Func, 25, "func(cfg FlightRecorderConfig) *FlightRecorder"},
{"NewTask", Func, 11, "func(pctx context.Context, taskType string) (ctx context.Context, task *Task)"},
{"Region", Type, 11, ""},
{"Start", Func, 5, "func(w io.Writer) error"},
@@ -16642,6 +16679,7 @@ var PackageSymbols = map[string][]Symbol{
{"ValueOf", Func, 0, ""},
},
"testing": {
+ {"(*B).Attr", Method, 25, ""},
{"(*B).Chdir", Method, 24, ""},
{"(*B).Cleanup", Method, 14, ""},
{"(*B).Context", Method, 24, ""},
@@ -16658,6 +16696,7 @@ var PackageSymbols = map[string][]Symbol{
{"(*B).Logf", Method, 0, ""},
{"(*B).Loop", Method, 24, ""},
{"(*B).Name", Method, 8, ""},
+ {"(*B).Output", Method, 25, ""},
{"(*B).ReportAllocs", Method, 1, ""},
{"(*B).ReportMetric", Method, 13, ""},
{"(*B).ResetTimer", Method, 0, ""},
@@ -16674,6 +16713,7 @@ var PackageSymbols = map[string][]Symbol{
{"(*B).StopTimer", Method, 0, ""},
{"(*B).TempDir", Method, 15, ""},
{"(*F).Add", Method, 18, ""},
+ {"(*F).Attr", Method, 25, ""},
{"(*F).Chdir", Method, 24, ""},
{"(*F).Cleanup", Method, 18, ""},
{"(*F).Context", Method, 24, ""},
@@ -16689,6 +16729,7 @@ var PackageSymbols = map[string][]Symbol{
{"(*F).Log", Method, 18, ""},
{"(*F).Logf", Method, 18, ""},
{"(*F).Name", Method, 18, ""},
+ {"(*F).Output", Method, 25, ""},
{"(*F).Setenv", Method, 18, ""},
{"(*F).Skip", Method, 18, ""},
{"(*F).SkipNow", Method, 18, ""},
@@ -16697,6 +16738,7 @@ var PackageSymbols = map[string][]Symbol{
{"(*F).TempDir", Method, 18, ""},
{"(*M).Run", Method, 4, ""},
{"(*PB).Next", Method, 3, ""},
+ {"(*T).Attr", Method, 25, ""},
{"(*T).Chdir", Method, 24, ""},
{"(*T).Cleanup", Method, 14, ""},
{"(*T).Context", Method, 24, ""},
@@ -16712,6 +16754,7 @@ var PackageSymbols = map[string][]Symbol{
{"(*T).Log", Method, 0, ""},
{"(*T).Logf", Method, 0, ""},
{"(*T).Name", Method, 8, ""},
+ {"(*T).Output", Method, 25, ""},
{"(*T).Parallel", Method, 0, ""},
{"(*T).Run", Method, 7, ""},
{"(*T).Setenv", Method, 17, ""},
@@ -16834,6 +16877,10 @@ var PackageSymbols = map[string][]Symbol{
{"Run", Func, 22, "func(t *testing.T, newHandler func(*testing.T) slog.Handler, result func(*testing.T) map[string]any)"},
{"TestHandler", Func, 21, "func(h slog.Handler, results func() []map[string]any) error"},
},
+ "testing/synctest": {
+ {"Test", Func, 25, "func(t *testing.T, f func(*testing.T))"},
+ {"Wait", Func, 25, "func()"},
+ },
"text/scanner": {
{"(*Position).IsValid", Method, 0, ""},
{"(*Scanner).Init", Method, 0, ""},
@@ -17347,6 +17394,7 @@ var PackageSymbols = map[string][]Symbol{
{"CaseRange.Lo", Field, 0, ""},
{"CaseRanges", Var, 0, ""},
{"Categories", Var, 0, ""},
+ {"CategoryAliases", Var, 25, ""},
{"Caucasian_Albanian", Var, 4, ""},
{"Cc", Var, 0, ""},
{"Cf", Var, 0, ""},
@@ -17354,6 +17402,7 @@ var PackageSymbols = map[string][]Symbol{
{"Cham", Var, 0, ""},
{"Cherokee", Var, 0, ""},
{"Chorasmian", Var, 16, ""},
+ {"Cn", Var, 25, ""},
{"Co", Var, 0, ""},
{"Common", Var, 0, ""},
{"Coptic", Var, 0, ""},
@@ -17432,6 +17481,7 @@ var PackageSymbols = map[string][]Symbol{
{"Khojki", Var, 4, ""},
{"Khudawadi", Var, 4, ""},
{"L", Var, 0, ""},
+ {"LC", Var, 25, ""},
{"Lao", Var, 0, ""},
{"Latin", Var, 0, ""},
{"Lepcha", Var, 0, ""},
diff --git a/hack/tools/vendor/golang.org/x/tools/internal/typesinternal/fx.go b/hack/tools/vendor/golang.org/x/tools/internal/typesinternal/fx.go
new file mode 100644
index 000000000000..93acff21701e
--- /dev/null
+++ b/hack/tools/vendor/golang.org/x/tools/internal/typesinternal/fx.go
@@ -0,0 +1,49 @@
+// Copyright 2025 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package typesinternal
+
+import (
+ "go/ast"
+ "go/token"
+ "go/types"
+)
+
+// NoEffects reports whether the expression has no side effects, i.e., it
+// does not modify the memory state. This function is conservative: it may
+// return false even when the expression has no effect.
+func NoEffects(info *types.Info, expr ast.Expr) bool {
+ noEffects := true
+ ast.Inspect(expr, func(n ast.Node) bool {
+ switch v := n.(type) {
+ case nil, *ast.Ident, *ast.BasicLit, *ast.BinaryExpr, *ast.ParenExpr,
+ *ast.SelectorExpr, *ast.IndexExpr, *ast.SliceExpr, *ast.TypeAssertExpr,
+ *ast.StarExpr, *ast.CompositeLit, *ast.ArrayType, *ast.StructType,
+ *ast.MapType, *ast.InterfaceType, *ast.KeyValueExpr:
+ // No effect
+ case *ast.UnaryExpr:
+ // Channel send <-ch has effects
+ if v.Op == token.ARROW {
+ noEffects = false
+ }
+ case *ast.CallExpr:
+ // Type conversion has no effects
+ if !info.Types[v.Fun].IsType() {
+ // TODO(adonovan): Add a case for built-in functions without side
+ // effects (by using callsPureBuiltin from tools/internal/refactor/inline)
+
+ noEffects = false
+ }
+ case *ast.FuncLit:
+ // A FuncLit has no effects, but do not descend into it.
+ return false
+ default:
+ // All other expressions have effects
+ noEffects = false
+ }
+
+ return noEffects
+ })
+ return noEffects
+}
diff --git a/hack/tools/vendor/golang.org/x/tools/internal/typesinternal/isnamed.go b/hack/tools/vendor/golang.org/x/tools/internal/typesinternal/isnamed.go
new file mode 100644
index 000000000000..f2affec4fba9
--- /dev/null
+++ b/hack/tools/vendor/golang.org/x/tools/internal/typesinternal/isnamed.go
@@ -0,0 +1,71 @@
+// Copyright 2025 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package typesinternal
+
+import (
+ "go/types"
+ "slices"
+)
+
+// IsTypeNamed reports whether t is (or is an alias for) a
+// package-level defined type with the given package path and one of
+// the given names. It returns false if t is nil.
+//
+// This function avoids allocating the concatenation of "pkg.Name",
+// which is important for the performance of syntax matching.
+func IsTypeNamed(t types.Type, pkgPath string, names ...string) bool {
+ if named, ok := types.Unalias(t).(*types.Named); ok {
+ tname := named.Obj()
+ return tname != nil &&
+ IsPackageLevel(tname) &&
+ tname.Pkg().Path() == pkgPath &&
+ slices.Contains(names, tname.Name())
+ }
+ return false
+}
+
+// IsPointerToNamed reports whether t is (or is an alias for) a pointer to a
+// package-level defined type with the given package path and one of the given
+// names. It returns false if t is not a pointer type.
+func IsPointerToNamed(t types.Type, pkgPath string, names ...string) bool {
+ r := Unpointer(t)
+ if r == t {
+ return false
+ }
+ return IsTypeNamed(r, pkgPath, names...)
+}
+
+// IsFunctionNamed reports whether obj is a package-level function
+// defined in the given package and has one of the given names.
+// It returns false if obj is nil.
+//
+// This function avoids allocating the concatenation of "pkg.Name",
+// which is important for the performance of syntax matching.
+func IsFunctionNamed(obj types.Object, pkgPath string, names ...string) bool {
+ f, ok := obj.(*types.Func)
+ return ok &&
+ IsPackageLevel(obj) &&
+ f.Pkg().Path() == pkgPath &&
+ f.Type().(*types.Signature).Recv() == nil &&
+ slices.Contains(names, f.Name())
+}
+
+// IsMethodNamed reports whether obj is a method defined on a
+// package-level type with the given package and type name, and has
+// one of the given names. It returns false if obj is nil.
+//
+// This function avoids allocating the concatenation of "pkg.TypeName.Name",
+// which is important for the performance of syntax matching.
+func IsMethodNamed(obj types.Object, pkgPath string, typeName string, names ...string) bool {
+ if fn, ok := obj.(*types.Func); ok {
+ if recv := fn.Type().(*types.Signature).Recv(); recv != nil {
+ _, T := ReceiverNamed(recv)
+ return T != nil &&
+ IsTypeNamed(T, pkgPath, typeName) &&
+ slices.Contains(names, fn.Name())
+ }
+ }
+ return false
+}
diff --git a/hack/tools/vendor/golang.org/x/tools/internal/typesinternal/qualifier.go b/hack/tools/vendor/golang.org/x/tools/internal/typesinternal/qualifier.go
index b64f714eb30f..64f47919f02e 100644
--- a/hack/tools/vendor/golang.org/x/tools/internal/typesinternal/qualifier.go
+++ b/hack/tools/vendor/golang.org/x/tools/internal/typesinternal/qualifier.go
@@ -15,6 +15,14 @@ import (
// file.
// If the same package is imported multiple times, the last appearance is
// recorded.
+//
+// TODO(adonovan): this function ignores the effect of shadowing. It
+// should accept a [token.Pos] and a [types.Info] and compute only the
+// set of imports that are not shadowed at that point, analogous to
+// [analysisinternal.AddImport]. It could also compute (as a side
+// effect) the set of additional imports required to ensure that there
+// is an accessible import for each necessary package, making it
+// converge even more closely with AddImport.
func FileQualifier(f *ast.File, pkg *types.Package) types.Qualifier {
// Construct mapping of import paths to their defined names.
// It is only necessary to look at renaming imports.
diff --git a/hack/tools/vendor/golang.org/x/tools/internal/typesinternal/types.go b/hack/tools/vendor/golang.org/x/tools/internal/typesinternal/types.go
index a5cd7e8dbfcb..fef74a785604 100644
--- a/hack/tools/vendor/golang.org/x/tools/internal/typesinternal/types.go
+++ b/hack/tools/vendor/golang.org/x/tools/internal/typesinternal/types.go
@@ -2,8 +2,20 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Package typesinternal provides access to internal go/types APIs that are not
-// yet exported.
+// Package typesinternal provides helpful operators for dealing with
+// go/types:
+//
+// - operators for querying typed syntax trees (e.g. [Imports], [IsFunctionNamed]);
+// - functions for converting types to strings or syntax (e.g. [TypeExpr], FileQualifier]);
+// - helpers for working with the [go/types] API (e.g. [NewTypesInfo]);
+// - access to internal go/types APIs that are not yet
+// exported (e.g. [SetUsesCgo], [ErrorCodeStartEnd], [VarKind]); and
+// - common algorithms related to types (e.g. [TooNewStdSymbols]).
+//
+// See also:
+// - [golang.org/x/tools/internal/astutil], for operations on untyped syntax;
+// - [golang.org/x/tools/internal/analysisinernal], for helpers for analyzers;
+// - [golang.org/x/tools/internal/refactor], for operators to compute text edits.
package typesinternal
import (
@@ -13,6 +25,7 @@ import (
"reflect"
"unsafe"
+ "golang.org/x/tools/go/ast/inspector"
"golang.org/x/tools/internal/aliases"
)
@@ -60,6 +73,9 @@ func ErrorCodeStartEnd(err types.Error) (code ErrorCode, start, end token.Pos, o
// which is often excessive.)
//
// If pkg is nil, it is equivalent to [*types.Package.Name].
+//
+// TODO(adonovan): all uses of this with TypeString should be
+// eliminated when https://go.dev/issues/75604 is resolved.
func NameRelativeTo(pkg *types.Package) types.Qualifier {
return func(other *types.Package) string {
if pkg != nil && pkg == other {
@@ -153,3 +169,31 @@ func NewTypesInfo() *types.Info {
FileVersions: map[*ast.File]string{},
}
}
+
+// EnclosingScope returns the innermost block logically enclosing the cursor.
+func EnclosingScope(info *types.Info, cur inspector.Cursor) *types.Scope {
+ for cur := range cur.Enclosing() {
+ n := cur.Node()
+ // A function's Scope is associated with its FuncType.
+ switch f := n.(type) {
+ case *ast.FuncDecl:
+ n = f.Type
+ case *ast.FuncLit:
+ n = f.Type
+ }
+ if b := info.Scopes[n]; b != nil {
+ return b
+ }
+ }
+ panic("no Scope for *ast.File")
+}
+
+// Imports reports whether path is imported by pkg.
+func Imports(pkg *types.Package, path string) bool {
+ for _, imp := range pkg.Imports() {
+ if imp.Path() == path {
+ return true
+ }
+ }
+ return false
+}
diff --git a/hack/tools/vendor/golang.org/x/tools/internal/typesinternal/zerovalue.go b/hack/tools/vendor/golang.org/x/tools/internal/typesinternal/zerovalue.go
index d272949c1771..453bba2ad5e8 100644
--- a/hack/tools/vendor/golang.org/x/tools/internal/typesinternal/zerovalue.go
+++ b/hack/tools/vendor/golang.org/x/tools/internal/typesinternal/zerovalue.go
@@ -204,23 +204,12 @@ func ZeroExpr(t types.Type, qual types.Qualifier) (_ ast.Expr, isValid bool) {
}
}
-// IsZeroExpr uses simple syntactic heuristics to report whether expr
-// is a obvious zero value, such as 0, "", nil, or false.
-// It cannot do better without type information.
-func IsZeroExpr(expr ast.Expr) bool {
- switch e := expr.(type) {
- case *ast.BasicLit:
- return e.Value == "0" || e.Value == `""`
- case *ast.Ident:
- return e.Name == "nil" || e.Name == "false"
- default:
- return false
- }
-}
-
// TypeExpr returns syntax for the specified type. References to named types
// are qualified by an appropriate (optional) qualifier function.
// It may panic for types such as Tuple or Union.
+//
+// See also https://go.dev/issues/75604, which will provide a robust
+// Type-to-valid-Go-syntax formatter.
func TypeExpr(t types.Type, qual types.Qualifier) ast.Expr {
switch t := t.(type) {
case *types.Basic:
diff --git a/hack/tools/vendor/google.golang.org/api/iamcredentials/v1/iamcredentials-api.json b/hack/tools/vendor/google.golang.org/api/iamcredentials/v1/iamcredentials-api.json
index a841fc7cb9ea..3694e4aebb3a 100644
--- a/hack/tools/vendor/google.golang.org/api/iamcredentials/v1/iamcredentials-api.json
+++ b/hack/tools/vendor/google.golang.org/api/iamcredentials/v1/iamcredentials-api.json
@@ -40,6 +40,11 @@
"description": "Regional Endpoint",
"endpointUrl": "https://iamcredentials.us-east7.rep.googleapis.com/",
"location": "us-east7"
+ },
+ {
+ "description": "Regional Endpoint",
+ "endpointUrl": "https://iamcredentials.us-west1.rep.googleapis.com/",
+ "location": "us-west1"
}
],
"fullyEncodeReservedExpansion": true,
@@ -335,7 +340,7 @@
}
}
},
- "revision": "20250717",
+ "revision": "20251022",
"rootUrl": "https://iamcredentials.googleapis.com/",
"schemas": {
"GenerateAccessTokenRequest": {
diff --git a/hack/tools/vendor/google.golang.org/api/internal/gensupport/resumable.go b/hack/tools/vendor/google.golang.org/api/internal/gensupport/resumable.go
index 143a48923a14..91108d3273f0 100644
--- a/hack/tools/vendor/google.golang.org/api/internal/gensupport/resumable.go
+++ b/hack/tools/vendor/google.golang.org/api/internal/gensupport/resumable.go
@@ -127,34 +127,65 @@ func (rx *ResumableUpload) reportProgress(old, updated int64) {
}
// transferChunk performs a single HTTP request to upload a single chunk.
+// It uses a goroutine to perform the upload and a timer to enforce ChunkTransferTimeout.
func (rx *ResumableUpload) transferChunk(ctx context.Context, chunk io.Reader, off, size int64, done bool) (*http.Response, error) {
- // rCtx is derived from a context with a defined ChunkTransferTimeout with non-zero value.
- // If a particular request exceeds this transfer time for getting response, the rCtx deadline will be exceeded,
- // triggering a retry of the request.
- var rCtx context.Context
- var cancel context.CancelFunc
-
- rCtx = ctx
- if rx.ChunkTransferTimeout != 0 {
- rCtx, cancel = context.WithTimeout(ctx, rx.ChunkTransferTimeout)
- defer cancel()
+ // If no timeout is specified, perform the request synchronously without a timer.
+ if rx.ChunkTransferTimeout == 0 {
+ res, err := rx.doUploadRequest(ctx, chunk, off, size, done)
+ if err != nil {
+ return res, err
+ }
+ return res, nil
}
- res, err := rx.doUploadRequest(rCtx, chunk, off, size, done)
- if err != nil {
- return res, err
- }
+ // Start a timer for the ChunkTransferTimeout duration.
+ timer := time.NewTimer(rx.ChunkTransferTimeout)
- // We sent "X-GUploader-No-308: yes" (see comment elsewhere in
- // this file), so we don't expect to get a 308.
- if res.StatusCode == 308 {
- return nil, errors.New("unexpected 308 response status code")
+ // A struct to hold the result from the goroutine.
+ type uploadResult struct {
+ res *http.Response
+ err error
}
- if res.StatusCode == http.StatusOK {
- rx.reportProgress(off, off+int64(size))
+ // A buffered channel to receive the result of the upload.
+ resultCh := make(chan uploadResult, 1)
+
+ // Create a cancellable context for the upload request. This allows us to
+ // abort the request if the timer fires first.
+ rCtx, cancel := context.WithCancel(ctx)
+ // NOTE: We do NOT use `defer cancel()` here. The context must remain valid
+ // for the caller to read the response body of a successful request.
+ // Cancellation is handled manually on timeout paths.
+
+ // Starting the chunk upload in parallel.
+ go func() {
+ res, err := rx.doUploadRequest(rCtx, chunk, off, size, done)
+ resultCh <- uploadResult{res: res, err: err}
+ }()
+
+ // Wait for timer to fire or result channel to have the uploadResult or ctx to be cancelled.
+ select {
+ // Note: Calling cancel() will guarantee that the goroutine finishes,
+ // so these two cases will never block forever on draining the resultCh.
+ case <-ctx.Done():
+ // Context is cancelled for the overall upload.
+ cancel()
+ // Drain resultCh.
+ <-resultCh
+ return nil, ctx.Err()
+ case <-timer.C:
+ // Chunk Transfer timer fired before resultCh so we return context.DeadlineExceeded.
+ cancel()
+ // Drain resultCh.
+ <-resultCh
+ return nil, context.DeadlineExceeded
+ case result := <-resultCh:
+ // Handle the result from the upload.
+ if result.err != nil {
+ return result.res, result.err
+ }
+ return result.res, nil
}
- return res, nil
}
// uploadChunkWithRetries attempts to upload a single chunk, with retries
@@ -164,14 +195,14 @@ func (rx *ResumableUpload) uploadChunkWithRetries(ctx context.Context, chunk io.
shouldRetry := rx.Retry.errorFunc()
// Configure single chunk retry deadline.
- retryDeadline := defaultRetryDeadline
+ chunkRetryDeadline := defaultRetryDeadline
if rx.ChunkRetryDeadline != 0 {
- retryDeadline = rx.ChunkRetryDeadline
+ chunkRetryDeadline = rx.ChunkRetryDeadline
}
// Each chunk gets its own initialized-at-zero backoff and invocation ID.
bo := rx.Retry.backoff()
- quitAfterTimer := time.NewTimer(retryDeadline)
+ quitAfterTimer := time.NewTimer(chunkRetryDeadline)
defer quitAfterTimer.Stop()
rx.attempts = 1
rx.invocationID = uuid.New().String()
@@ -184,20 +215,20 @@ func (rx *ResumableUpload) uploadChunkWithRetries(ctx context.Context, chunk io.
for {
// Wait for the backoff period, unless the context is canceled or the
// retry deadline is hit.
- pauseTimer := time.NewTimer(pause)
+ backoffPauseTimer := time.NewTimer(pause)
select {
case <-ctx.Done():
- pauseTimer.Stop()
+ backoffPauseTimer.Stop()
if err == nil {
err = ctx.Err()
}
return resp, err
- case <-pauseTimer.C:
+ case <-backoffPauseTimer.C:
case <-quitAfterTimer.C:
- pauseTimer.Stop()
+ backoffPauseTimer.Stop()
return resp, err
}
- pauseTimer.Stop()
+ backoffPauseTimer.Stop()
// Check for context cancellation or timeout once more. If more than one
// case in the select statement above was satisfied at the same time, Go
@@ -233,6 +264,11 @@ func (rx *ResumableUpload) uploadChunkWithRetries(ctx context.Context, chunk io.
if resp != nil {
status = resp.StatusCode
}
+ // We sent "X-GUploader-No-308: yes" (see comment elsewhere in
+ // this file), so we don't expect to get a 308.
+ if status == 308 {
+ return nil, errors.New("unexpected 308 response status code")
+ }
// Chunk upload should be retried if the ChunkTransferTimeout is non-zero and err is context deadline exceeded
// or we encounter a retryable error.
if (rx.ChunkTransferTimeout != 0 && errors.Is(err, context.DeadlineExceeded)) || shouldRetry(status, err) {
@@ -283,7 +319,9 @@ func (rx *ResumableUpload) Upload(ctx context.Context) (*http.Response, error) {
if resp == nil {
return nil, fmt.Errorf("upload request to %v not sent, choose larger value for ChunkRetryDeadline", rx.URI)
}
-
+ if resp.StatusCode == http.StatusOK {
+ rx.reportProgress(off, off+int64(size))
+ }
if statusResumeIncomplete(resp) {
// The upload is not yet complete, but the server has acknowledged this chunk.
// We don't have anything to do with the response body.
diff --git a/hack/tools/vendor/google.golang.org/api/internal/version.go b/hack/tools/vendor/google.golang.org/api/internal/version.go
index 11a0db6e5184..c29c5ffee946 100644
--- a/hack/tools/vendor/google.golang.org/api/internal/version.go
+++ b/hack/tools/vendor/google.golang.org/api/internal/version.go
@@ -5,4 +5,4 @@
package internal
// Version is the current tagged release of the library.
-const Version = "0.244.0"
+const Version = "0.256.0"
diff --git a/hack/tools/vendor/google.golang.org/api/storage/v1/storage-api.json b/hack/tools/vendor/google.golang.org/api/storage/v1/storage-api.json
index 251396d49560..22ab414c46be 100644
--- a/hack/tools/vendor/google.golang.org/api/storage/v1/storage-api.json
+++ b/hack/tools/vendor/google.golang.org/api/storage/v1/storage-api.json
@@ -253,7 +253,7 @@
"location": "northamerica-south1"
}
],
- "etag": "\"31383438373536343936353833383831333836\"",
+ "etag": "\"3131343633323936333034313936343439353533\"",
"icons": {
"x16": "https://www.google.com/images/icons/product/cloud_storage-16.png",
"x32": "https://www.google.com/images/icons/product/cloud_storage-32.png"
@@ -1083,6 +1083,11 @@
"location": "query",
"type": "string"
},
+ "returnPartialSuccess": {
+ "description": "If true, return a list of bucket resource names for buckets that are in unreachable locations.",
+ "location": "query",
+ "type": "boolean"
+ },
"softDeleted": {
"description": "If true, only soft-deleted bucket versions will be returned. The default is false. For more information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete).",
"location": "query",
@@ -4544,7 +4549,7 @@
}
}
},
- "revision": "20250718",
+ "revision": "20250925",
"rootUrl": "https://storage.googleapis.com/",
"schemas": {
"AdvanceRelocateBucketOperationRequest": {
@@ -5385,6 +5390,13 @@
"nextPageToken": {
"description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.",
"type": "string"
+ },
+ "unreachable": {
+ "description": "The list of bucket resource names that could not be reached during the listing operation.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
}
},
"type": "object"
@@ -5401,6 +5413,16 @@
"description": "If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false.",
"type": "boolean"
},
+ "createdAfterTime": {
+ "description": "Restores only the objects that were created after this time.",
+ "format": "date-time",
+ "type": "string"
+ },
+ "createdBeforeTime": {
+ "description": "Restores only the objects that were created before this time.",
+ "format": "date-time",
+ "type": "string"
+ },
"matchGlobs": {
"description": "Restores only the objects matching any of the specified glob(s). If this parameter is not specified, all objects will be restored within the specified time range.",
"items": {
diff --git a/hack/tools/vendor/google.golang.org/api/storage/v1/storage-gen.go b/hack/tools/vendor/google.golang.org/api/storage/v1/storage-gen.go
index 0714b7e08901..6d4af3902ef9 100644
--- a/hack/tools/vendor/google.golang.org/api/storage/v1/storage-gen.go
+++ b/hack/tools/vendor/google.golang.org/api/storage/v1/storage-gen.go
@@ -1611,6 +1611,9 @@ type Buckets struct {
// sets. Provide this value in a subsequent request to return the next page of
// results.
NextPageToken string `json:"nextPageToken,omitempty"`
+ // Unreachable: The list of bucket resource names that could not be reached
+ // during the listing operation.
+ Unreachable []string `json:"unreachable,omitempty"`
// ServerResponse contains the HTTP response code and headers from the server.
googleapi.ServerResponse `json:"-"`
@@ -1645,6 +1648,12 @@ type BulkRestoreObjectsRequest struct {
// CopySourceAcl: If true, copies the source object's ACL; otherwise, uses the
// bucket's default object ACL. The default is false.
CopySourceAcl bool `json:"copySourceAcl,omitempty"`
+ // CreatedAfterTime: Restores only the objects that were created after this
+ // time.
+ CreatedAfterTime string `json:"createdAfterTime,omitempty"`
+ // CreatedBeforeTime: Restores only the objects that were created before this
+ // time.
+ CreatedBeforeTime string `json:"createdBeforeTime,omitempty"`
// MatchGlobs: Restores only the objects matching any of the specified glob(s).
// If this parameter is not specified, all objects will be restored within the
// specified time range.
@@ -5217,6 +5226,14 @@ func (c *BucketsListCall) Projection(projection string) *BucketsListCall {
return c
}
+// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": If
+// true, return a list of bucket resource names for buckets that are in
+// unreachable locations.
+func (c *BucketsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *BucketsListCall {
+ c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
+ return c
+}
+
// SoftDeleted sets the optional parameter "softDeleted": If true, only
// soft-deleted bucket versions will be returned. The default is false. For
// more information, see Soft Delete
diff --git a/hack/tools/vendor/google.golang.org/grpc/CONTRIBUTING.md b/hack/tools/vendor/google.golang.org/grpc/CONTRIBUTING.md
index 1de0ce66691d..2079de7b0ed8 100644
--- a/hack/tools/vendor/google.golang.org/grpc/CONTRIBUTING.md
+++ b/hack/tools/vendor/google.golang.org/grpc/CONTRIBUTING.md
@@ -33,17 +33,21 @@ guidelines, there may be valid reasons to do so, but it should be rare.
## Guidelines for Pull Requests
-How to get your contributions merged smoothly and quickly:
+Please read the following carefully to ensure your contributions can be merged
+smoothly and quickly.
+
+### PR Contents
- Create **small PRs** that are narrowly focused on **addressing a single
concern**. We often receive PRs that attempt to fix several things at the same
time, and if one part of the PR has a problem, that will hold up the entire
PR.
-- For **speculative changes**, consider opening an issue and discussing it
- first. If you are suggesting a behavioral or API change, consider starting
- with a [gRFC proposal](https://github.com/grpc/proposal). Many new features
- that are not bug fixes will require cross-language agreement.
+- If your change does not address an **open issue** with an **agreed
+ resolution**, consider opening an issue and discussing it first. If you are
+ suggesting a behavioral or API change, consider starting with a [gRFC
+ proposal](https://github.com/grpc/proposal). Many new features that are not
+ bug fixes will require cross-language agreement.
- If you want to fix **formatting or style**, consider whether your changes are
an obvious improvement or might be considered a personal preference. If a
@@ -56,16 +60,6 @@ How to get your contributions merged smoothly and quickly:
often written as "iff". Please do not make spelling correction changes unless
you are certain they are misspellings.
-- Provide a good **PR description** as a record of **what** change is being made
- and **why** it was made. Link to a GitHub issue if it exists.
-
-- Maintain a **clean commit history** and use **meaningful commit messages**.
- PRs with messy commit histories are difficult to review and won't be merged.
- Before sending your PR, ensure your changes are based on top of the latest
- `upstream/master` commits, and avoid rebasing in the middle of a code review.
- You should **never use `git push -f`** unless absolutely necessary during a
- review, as it can interfere with GitHub's tracking of comments.
-
- **All tests need to be passing** before your change can be merged. We
recommend you run tests locally before creating your PR to catch breakages
early on:
@@ -81,15 +75,80 @@ How to get your contributions merged smoothly and quickly:
GitHub, which will trigger a GitHub Actions run that you can use to verify
everything is passing.
-- If you are adding a new file, make sure it has the **copyright message**
+- Note that there are two GitHub actions checks that need not be green:
+
+ 1. We test the freshness of the generated proto code we maintain via the
+ `vet-proto` check. If the source proto files are updated, but our repo is
+ not updated, an optional checker will fail. This will be fixed by our team
+ in a separate PR and will not prevent the merge of your PR.
+
+ 2. We run a checker that will fail if there is any change in dependencies of
+ an exported package via the `dependencies` check. If new dependencies are
+ added that are not appropriate, we may not accept your PR (see below).
+
+- If you are adding a **new file**, make sure it has the **copyright message**
template at the top as a comment. You can copy the message from an existing
file and update the year.
- The grpc package should only depend on standard Go packages and a small number
of exceptions. **If your contribution introduces new dependencies**, you will
- need a discussion with gRPC-Go maintainers. A GitHub action check will run on
- every PR, and will flag any transitive dependency changes from any public
- package.
+ need a discussion with gRPC-Go maintainers.
+
+### PR Descriptions
+
+- **PR titles** should start with the name of the component being addressed, or
+ the type of change. Examples: transport, client, server, round_robin, xds,
+ cleanup, deps.
+
+- Read and follow the **guidelines for PR titles and descriptions** here:
+ https://google.github.io/eng-practices/review/developer/cl-descriptions.html
+
+ *particularly* the sections "First Line" and "Body is Informative".
+
+ Note: your PR description will be used as the git commit message in a
+ squash-and-merge if your PR is approved. We may make changes to this as
+ necessary.
+
+- **Does this PR relate to an open issue?** On the first line, please use the
+ tag `Fixes #` to ensure the issue is closed when the PR is merged. Or
+ use `Updates #` if the PR is related to an open issue, but does not fix
+ it. Consider filing an issue if one does not already exist.
+
+- PR descriptions *must* conclude with **release notes** as follows:
+
+ ```
+ RELEASE NOTES:
+ * :
+ ```
+
+ This need not match the PR title.
+
+ The summary must:
+
+ * be something that gRPC users will understand.
+
+ * clearly explain the feature being added, the issue being fixed, or the
+ behavior being changed, etc. If fixing a bug, be clear about how the bug
+ can be triggered by an end-user.
+
+ * begin with a capital letter and use complete sentences.
+
+ * be as short as possible to describe the change being made.
+
+ If a PR is *not* end-user visible -- e.g. a cleanup, testing change, or
+ GitHub-related, use `RELEASE NOTES: n/a`.
+
+### PR Process
+
+- Please **self-review** your code changes before sending your PR. This will
+ prevent simple, obvious errors from causing delays.
+
+- Maintain a **clean commit history** and use **meaningful commit messages**.
+ PRs with messy commit histories are difficult to review and won't be merged.
+ Before sending your PR, ensure your changes are based on top of the latest
+ `upstream/master` commits, and avoid rebasing in the middle of a code review.
+ You should **never use `git push -f`** unless absolutely necessary during a
+ review, as it can interfere with GitHub's tracking of comments.
- Unless your PR is trivial, you should **expect reviewer comments** that you
will need to address before merging. We'll label the PR as `Status: Requires
@@ -98,5 +157,3 @@ How to get your contributions merged smoothly and quickly:
`stale`, and we will automatically close it after 7 days if we don't hear back
from you. Please feel free to ping issues or bugs if you do not get a response
within a week.
-
-- Exceptions to the rules can be made if there's a compelling reason to do so.
diff --git a/hack/tools/vendor/google.golang.org/grpc/MAINTAINERS.md b/hack/tools/vendor/google.golang.org/grpc/MAINTAINERS.md
index 5d4096d46a04..df35bb9a882a 100644
--- a/hack/tools/vendor/google.golang.org/grpc/MAINTAINERS.md
+++ b/hack/tools/vendor/google.golang.org/grpc/MAINTAINERS.md
@@ -9,21 +9,19 @@ for general contribution guidelines.
## Maintainers (in alphabetical order)
-- [aranjans](https://github.com/aranjans), Google LLC
- [arjan-bal](https://github.com/arjan-bal), Google LLC
- [arvindbr8](https://github.com/arvindbr8), Google LLC
- [atollena](https://github.com/atollena), Datadog, Inc.
- [dfawley](https://github.com/dfawley), Google LLC
- [easwars](https://github.com/easwars), Google LLC
-- [erm-g](https://github.com/erm-g), Google LLC
- [gtcooke94](https://github.com/gtcooke94), Google LLC
-- [purnesh42h](https://github.com/purnesh42h), Google LLC
-- [zasweq](https://github.com/zasweq), Google LLC
## Emeritus Maintainers (in alphabetical order)
- [adelez](https://github.com/adelez)
+- [aranjans](https://github.com/aranjans)
- [canguler](https://github.com/canguler)
- [cesarghali](https://github.com/cesarghali)
+- [erm-g](https://github.com/erm-g)
- [iamqizhao](https://github.com/iamqizhao)
- [jeanbza](https://github.com/jeanbza)
- [jtattermusch](https://github.com/jtattermusch)
@@ -32,5 +30,7 @@ for general contribution guidelines.
- [matt-kwong](https://github.com/matt-kwong)
- [menghanl](https://github.com/menghanl)
- [nicolasnoble](https://github.com/nicolasnoble)
+- [purnesh42h](https://github.com/purnesh42h)
- [srini100](https://github.com/srini100)
- [yongni](https://github.com/yongni)
+- [zasweq](https://github.com/zasweq)
diff --git a/hack/tools/vendor/google.golang.org/grpc/balancer/endpointsharding/endpointsharding.go b/hack/tools/vendor/google.golang.org/grpc/balancer/endpointsharding/endpointsharding.go
index 0ad6bb1f2203..360db08ebc13 100644
--- a/hack/tools/vendor/google.golang.org/grpc/balancer/endpointsharding/endpointsharding.go
+++ b/hack/tools/vendor/google.golang.org/grpc/balancer/endpointsharding/endpointsharding.go
@@ -37,6 +37,8 @@ import (
"google.golang.org/grpc/resolver"
)
+var randIntN = rand.IntN
+
// ChildState is the balancer state of a child along with the endpoint which
// identifies the child balancer.
type ChildState struct {
@@ -112,6 +114,21 @@ type endpointSharding struct {
mu sync.Mutex
}
+// rotateEndpoints returns a slice of all the input endpoints rotated a random
+// amount.
+func rotateEndpoints(es []resolver.Endpoint) []resolver.Endpoint {
+ les := len(es)
+ if les == 0 {
+ return es
+ }
+ r := randIntN(les)
+ // Make a copy to avoid mutating data beyond the end of es.
+ ret := make([]resolver.Endpoint, les)
+ copy(ret, es[r:])
+ copy(ret[les-r:], es[:r])
+ return ret
+}
+
// UpdateClientConnState creates a child for new endpoints and deletes children
// for endpoints that are no longer present. It also updates all the children,
// and sends a single synchronous update of the childrens' aggregated state at
@@ -133,7 +150,7 @@ func (es *endpointSharding) UpdateClientConnState(state balancer.ClientConnState
newChildren := resolver.NewEndpointMap[*balancerWrapper]()
// Update/Create new children.
- for _, endpoint := range state.ResolverState.Endpoints {
+ for _, endpoint := range rotateEndpoints(state.ResolverState.Endpoints) {
if _, ok := newChildren.Get(endpoint); ok {
// Endpoint child was already created, continue to avoid duplicate
// update.
@@ -279,7 +296,7 @@ func (es *endpointSharding) updateState() {
p := &pickerWithChildStates{
pickers: pickers,
childStates: childStates,
- next: uint32(rand.IntN(len(pickers))),
+ next: uint32(randIntN(len(pickers))),
}
es.cc.UpdateState(balancer.State{
ConnectivityState: aggState,
diff --git a/hack/tools/vendor/google.golang.org/grpc/balancer/grpclb/grpclb_remote_balancer.go b/hack/tools/vendor/google.golang.org/grpc/balancer/grpclb/grpclb_remote_balancer.go
index f2df56120fec..002052120570 100644
--- a/hack/tools/vendor/google.golang.org/grpc/balancer/grpclb/grpclb_remote_balancer.go
+++ b/hack/tools/vendor/google.golang.org/grpc/balancer/grpclb/grpclb_remote_balancer.go
@@ -82,14 +82,8 @@ func (lb *lbBalancer) processServerList(l *lbpb.ServerList) {
}
md := metadata.Pairs(lbTokenKey, s.LoadBalanceToken)
- ip := net.IP(s.IpAddress)
- ipStr := ip.String()
- if ip.To4() == nil {
- // Add square brackets to ipv6 addresses, otherwise net.Dial() and
- // net.SplitHostPort() will return too many colons error.
- ipStr = fmt.Sprintf("[%s]", ipStr)
- }
- addr := imetadata.Set(resolver.Address{Addr: fmt.Sprintf("%s:%d", ipStr, s.Port)}, md)
+ ipStr := net.IP(s.IpAddress).String()
+ addr := imetadata.Set(resolver.Address{Addr: net.JoinHostPort(ipStr, fmt.Sprintf("%d", s.Port))}, md)
if lb.logger.V(2) {
lb.logger.Infof("Server list entry:|%d|, ipStr:|%s|, port:|%d|, load balancer token:|%v|", i, ipStr, s.Port, s.LoadBalanceToken)
}
diff --git a/hack/tools/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirst.go b/hack/tools/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirst.go
index ea8899818c22..b15c10e46b0a 100644
--- a/hack/tools/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirst.go
+++ b/hack/tools/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirst.go
@@ -169,7 +169,7 @@ func (b *pickfirstBalancer) UpdateClientConnState(state balancer.ClientConnState
addrs = state.ResolverState.Addresses
if cfg.ShuffleAddressList {
addrs = append([]resolver.Address{}, addrs...)
- rand.Shuffle(len(addrs), func(i, j int) { addrs[i], addrs[j] = addrs[j], addrs[i] })
+ internal.RandShuffle(len(addrs), func(i, j int) { addrs[i], addrs[j] = addrs[j], addrs[i] })
}
}
diff --git a/hack/tools/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirstleaf/pickfirstleaf.go b/hack/tools/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirstleaf/pickfirstleaf.go
index e62047256afb..9ffdd28a01ef 100644
--- a/hack/tools/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirstleaf/pickfirstleaf.go
+++ b/hack/tools/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirstleaf/pickfirstleaf.go
@@ -67,21 +67,21 @@ var (
disconnectionsMetric = expstats.RegisterInt64Count(expstats.MetricDescriptor{
Name: "grpc.lb.pick_first.disconnections",
Description: "EXPERIMENTAL. Number of times the selected subchannel becomes disconnected.",
- Unit: "disconnection",
+ Unit: "{disconnection}",
Labels: []string{"grpc.target"},
Default: false,
})
connectionAttemptsSucceededMetric = expstats.RegisterInt64Count(expstats.MetricDescriptor{
Name: "grpc.lb.pick_first.connection_attempts_succeeded",
Description: "EXPERIMENTAL. Number of successful connection attempts.",
- Unit: "attempt",
+ Unit: "{attempt}",
Labels: []string{"grpc.target"},
Default: false,
})
connectionAttemptsFailedMetric = expstats.RegisterInt64Count(expstats.MetricDescriptor{
Name: "grpc.lb.pick_first.connection_attempts_failed",
Description: "EXPERIMENTAL. Number of failed connection attempts.",
- Unit: "attempt",
+ Unit: "{attempt}",
Labels: []string{"grpc.target"},
Default: false,
})
@@ -283,7 +283,7 @@ func (b *pickfirstBalancer) UpdateClientConnState(state balancer.ClientConnState
newAddrs = state.ResolverState.Addresses
if cfg.ShuffleAddressList {
newAddrs = append([]resolver.Address{}, newAddrs...)
- internal.RandShuffle(len(endpoints), func(i, j int) { endpoints[i], endpoints[j] = endpoints[j], endpoints[i] })
+ internal.RandShuffle(len(newAddrs), func(i, j int) { newAddrs[i], newAddrs[j] = newAddrs[j], newAddrs[i] })
}
}
@@ -351,6 +351,13 @@ func (b *pickfirstBalancer) ExitIdle() {
b.mu.Lock()
defer b.mu.Unlock()
if b.state == connectivity.Idle {
+ // Move the balancer into CONNECTING state immediately. This is done to
+ // avoid staying in IDLE if a resolver update arrives before the first
+ // SubConn reports CONNECTING.
+ b.updateBalancerState(balancer.State{
+ ConnectivityState: connectivity.Connecting,
+ Picker: &picker{err: balancer.ErrNoSubConnAvailable},
+ })
b.startFirstPassLocked()
}
}
@@ -604,7 +611,7 @@ func (b *pickfirstBalancer) updateSubConnState(sd *scData, newState balancer.Sub
if !b.addressList.seekTo(sd.addr) {
// This should not fail as we should have only one SubConn after
// entering READY. The SubConn should be present in the addressList.
- b.logger.Errorf("Address %q not found address list in %v", sd.addr, b.addressList.addresses)
+ b.logger.Errorf("Address %q not found address list in %v", sd.addr, b.addressList.addresses)
return
}
if !b.healthCheckingEnabled {
diff --git a/hack/tools/vendor/google.golang.org/grpc/balancer/rls/balancer.go b/hack/tools/vendor/google.golang.org/grpc/balancer/rls/balancer.go
index db885a6d3c47..a45e8302f34e 100644
--- a/hack/tools/vendor/google.golang.org/grpc/balancer/rls/balancer.go
+++ b/hack/tools/vendor/google.golang.org/grpc/balancer/rls/balancer.go
@@ -82,7 +82,7 @@ var (
cacheEntriesMetric = estats.RegisterInt64Gauge(estats.MetricDescriptor{
Name: "grpc.lb.rls.cache_entries",
Description: "EXPERIMENTAL. Number of entries in the RLS cache.",
- Unit: "entry",
+ Unit: "{entry}",
Labels: []string{"grpc.target", "grpc.lb.rls.server_target", "grpc.lb.rls.instance_uuid"},
Default: false,
})
@@ -96,21 +96,21 @@ var (
defaultTargetPicksMetric = estats.RegisterInt64Count(estats.MetricDescriptor{
Name: "grpc.lb.rls.default_target_picks",
Description: "EXPERIMENTAL. Number of LB picks sent to the default target.",
- Unit: "pick",
+ Unit: "{pick}",
Labels: []string{"grpc.target", "grpc.lb.rls.server_target", "grpc.lb.rls.data_plane_target", "grpc.lb.pick_result"},
Default: false,
})
targetPicksMetric = estats.RegisterInt64Count(estats.MetricDescriptor{
Name: "grpc.lb.rls.target_picks",
Description: "EXPERIMENTAL. Number of LB picks sent to each RLS target. Note that if the default target is also returned by the RLS server, RPCs sent to that target from the cache will be counted in this metric, not in grpc.rls.default_target_picks.",
- Unit: "pick",
+ Unit: "{pick}",
Labels: []string{"grpc.target", "grpc.lb.rls.server_target", "grpc.lb.rls.data_plane_target", "grpc.lb.pick_result"},
Default: false,
})
failedPicksMetric = estats.RegisterInt64Count(estats.MetricDescriptor{
Name: "grpc.lb.rls.failed_picks",
Description: "EXPERIMENTAL. Number of LB picks failed due to either a failed RLS request or the RLS channel being throttled.",
- Unit: "pick",
+ Unit: "{pick}",
Labels: []string{"grpc.target", "grpc.lb.rls.server_target"},
Default: false,
})
diff --git a/hack/tools/vendor/google.golang.org/grpc/balancer/weightedroundrobin/balancer.go b/hack/tools/vendor/google.golang.org/grpc/balancer/weightedroundrobin/balancer.go
index fe8ebff1f5b5..1bd4bb31131b 100644
--- a/hack/tools/vendor/google.golang.org/grpc/balancer/weightedroundrobin/balancer.go
+++ b/hack/tools/vendor/google.golang.org/grpc/balancer/weightedroundrobin/balancer.go
@@ -60,7 +60,7 @@ var (
rrFallbackMetric = estats.RegisterInt64Count(estats.MetricDescriptor{
Name: "grpc.lb.wrr.rr_fallback",
Description: "EXPERIMENTAL. Number of scheduler updates in which there were not enough endpoints with valid weight, which caused the WRR policy to fall back to RR behavior.",
- Unit: "update",
+ Unit: "{update}",
Labels: []string{"grpc.target"},
OptionalLabels: []string{"grpc.lb.locality"},
Default: false,
@@ -69,7 +69,7 @@ var (
endpointWeightNotYetUsableMetric = estats.RegisterInt64Count(estats.MetricDescriptor{
Name: "grpc.lb.wrr.endpoint_weight_not_yet_usable",
Description: "EXPERIMENTAL. Number of endpoints from each scheduler update that don't yet have usable weight information (i.e., either the load report has not yet been received, or it is within the blackout period).",
- Unit: "endpoint",
+ Unit: "{endpoint}",
Labels: []string{"grpc.target"},
OptionalLabels: []string{"grpc.lb.locality"},
Default: false,
@@ -78,7 +78,7 @@ var (
endpointWeightStaleMetric = estats.RegisterInt64Count(estats.MetricDescriptor{
Name: "grpc.lb.wrr.endpoint_weight_stale",
Description: "EXPERIMENTAL. Number of endpoints from each scheduler update whose latest weight is older than the expiration period.",
- Unit: "endpoint",
+ Unit: "{endpoint}",
Labels: []string{"grpc.target"},
OptionalLabels: []string{"grpc.lb.locality"},
Default: false,
@@ -86,7 +86,7 @@ var (
endpointWeightsMetric = estats.RegisterFloat64Histo(estats.MetricDescriptor{
Name: "grpc.lb.wrr.endpoint_weights",
Description: "EXPERIMENTAL. Weight of each endpoint, recorded on every scheduler update. Endpoints without usable weights will be recorded as weight 0.",
- Unit: "endpoint",
+ Unit: "{endpoint}",
Labels: []string{"grpc.target"},
OptionalLabels: []string{"grpc.lb.locality"},
Default: false,
diff --git a/hack/tools/vendor/google.golang.org/grpc/clientconn.go b/hack/tools/vendor/google.golang.org/grpc/clientconn.go
index cd3eaf8ddcbd..a3c315f2d76e 100644
--- a/hack/tools/vendor/google.golang.org/grpc/clientconn.go
+++ b/hack/tools/vendor/google.golang.org/grpc/clientconn.go
@@ -208,7 +208,7 @@ func NewClient(target string, opts ...DialOption) (conn *ClientConn, err error)
channelz.Infof(logger, cc.channelz, "Channel authority set to %q", cc.authority)
cc.csMgr = newConnectivityStateManager(cc.ctx, cc.channelz)
- cc.pickerWrapper = newPickerWrapper(cc.dopts.copts.StatsHandlers)
+ cc.pickerWrapper = newPickerWrapper()
cc.metricsRecorderList = stats.NewMetricsRecorderList(cc.dopts.copts.StatsHandlers)
@@ -456,7 +456,7 @@ func (cc *ClientConn) validateTransportCredentials() error {
func (cc *ClientConn) channelzRegistration(target string) {
parentChannel, _ := cc.dopts.channelzParent.(*channelz.Channel)
cc.channelz = channelz.RegisterChannel(parentChannel, target)
- cc.addTraceEvent("created")
+ cc.addTraceEvent(fmt.Sprintf("created for target %q", target))
}
// chainUnaryClientInterceptors chains all unary client interceptors into one.
@@ -1076,13 +1076,6 @@ func (cc *ClientConn) healthCheckConfig() *healthCheckConfig {
return cc.sc.healthCheckConfig
}
-func (cc *ClientConn) getTransport(ctx context.Context, failfast bool, method string) (transport.ClientTransport, balancer.PickResult, error) {
- return cc.pickerWrapper.pick(ctx, failfast, balancer.PickInfo{
- Ctx: ctx,
- FullMethodName: method,
- })
-}
-
func (cc *ClientConn) applyServiceConfigAndBalancer(sc *ServiceConfig, configSelector iresolver.ConfigSelector) {
if sc == nil {
// should never reach here.
@@ -1831,7 +1824,7 @@ func (cc *ClientConn) initAuthority() error {
} else if auth, ok := cc.resolverBuilder.(resolver.AuthorityOverrider); ok {
cc.authority = auth.OverrideAuthority(cc.parsedTarget)
} else if strings.HasPrefix(endpoint, ":") {
- cc.authority = "localhost" + endpoint
+ cc.authority = "localhost" + encodeAuthority(endpoint)
} else {
cc.authority = encodeAuthority(endpoint)
}
diff --git a/hack/tools/vendor/google.golang.org/grpc/credentials/alts/internal/handshaker/handshaker.go b/hack/tools/vendor/google.golang.org/grpc/credentials/alts/internal/handshaker/handshaker.go
index 0360842eb8f2..f4974b504b5a 100644
--- a/hack/tools/vendor/google.golang.org/grpc/credentials/alts/internal/handshaker/handshaker.go
+++ b/hack/tools/vendor/google.golang.org/grpc/credentials/alts/internal/handshaker/handshaker.go
@@ -298,11 +298,11 @@ func (h *altsHandshaker) doHandshake(req *altspb.HandshakerReq) (net.Conn, *alts
func (h *altsHandshaker) accessHandshakerService(req *altspb.HandshakerReq) (*altspb.HandshakerResp, error) {
if err := h.stream.Send(req); err != nil {
- return nil, err
+ return nil, fmt.Errorf("failed to send ALTS handshaker request: %w", err)
}
resp, err := h.stream.Recv()
if err != nil {
- return nil, err
+ return nil, fmt.Errorf("failed to receive ALTS handshaker response: %w", err)
}
return resp, nil
}
diff --git a/hack/tools/vendor/google.golang.org/grpc/credentials/credentials.go b/hack/tools/vendor/google.golang.org/grpc/credentials/credentials.go
index a63ab606e665..c8e337cdda07 100644
--- a/hack/tools/vendor/google.golang.org/grpc/credentials/credentials.go
+++ b/hack/tools/vendor/google.golang.org/grpc/credentials/credentials.go
@@ -96,10 +96,11 @@ func (c CommonAuthInfo) GetCommonAuthInfo() CommonAuthInfo {
return c
}
-// ProtocolInfo provides information regarding the gRPC wire protocol version,
-// security protocol, security protocol version in use, server name, etc.
+// ProtocolInfo provides static information regarding transport credentials.
type ProtocolInfo struct {
// ProtocolVersion is the gRPC wire protocol version.
+ //
+ // Deprecated: this is unused by gRPC.
ProtocolVersion string
// SecurityProtocol is the security protocol in use.
SecurityProtocol string
@@ -109,7 +110,16 @@ type ProtocolInfo struct {
//
// Deprecated: please use Peer.AuthInfo.
SecurityVersion string
- // ServerName is the user-configured server name.
+ // ServerName is the user-configured server name. If set, this overrides
+ // the default :authority header used for all RPCs on the channel using the
+ // containing credentials, unless grpc.WithAuthority is set on the channel,
+ // in which case that setting will take precedence.
+ //
+ // This must be a valid `:authority` header according to
+ // [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986#section-3.2).
+ //
+ // Deprecated: Users should use grpc.WithAuthority to override the authority
+ // on a channel instead of configuring the credentials.
ServerName string
}
@@ -173,12 +183,17 @@ type TransportCredentials interface {
// Clone makes a copy of this TransportCredentials.
Clone() TransportCredentials
// OverrideServerName specifies the value used for the following:
+ //
// - verifying the hostname on the returned certificates
// - as SNI in the client's handshake to support virtual hosting
// - as the value for `:authority` header at stream creation time
//
- // Deprecated: use grpc.WithAuthority instead. Will be supported
- // throughout 1.x.
+ // The provided string should be a valid `:authority` header according to
+ // [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986#section-3.2).
+ //
+ // Deprecated: this method is unused by gRPC. Users should use
+ // grpc.WithAuthority to override the authority on a channel instead of
+ // configuring the credentials.
OverrideServerName(string) error
}
diff --git a/hack/tools/vendor/google.golang.org/grpc/credentials/tls.go b/hack/tools/vendor/google.golang.org/grpc/credentials/tls.go
index 20f65f7bd956..8277be7d6f85 100644
--- a/hack/tools/vendor/google.golang.org/grpc/credentials/tls.go
+++ b/hack/tools/vendor/google.golang.org/grpc/credentials/tls.go
@@ -110,14 +110,14 @@ func (c tlsCreds) Info() ProtocolInfo {
func (c *tlsCreds) ClientHandshake(ctx context.Context, authority string, rawConn net.Conn) (_ net.Conn, _ AuthInfo, err error) {
// use local cfg to avoid clobbering ServerName if using multiple endpoints
cfg := credinternal.CloneTLSConfig(c.config)
- if cfg.ServerName == "" {
- serverName, _, err := net.SplitHostPort(authority)
- if err != nil {
- // If the authority had no host port or if the authority cannot be parsed, use it as-is.
- serverName = authority
- }
- cfg.ServerName = serverName
+
+ serverName, _, err := net.SplitHostPort(authority)
+ if err != nil {
+ // If the authority had no host port or if the authority cannot be parsed, use it as-is.
+ serverName = authority
}
+ cfg.ServerName = serverName
+
conn := tls.Client(rawConn, cfg)
errChannel := make(chan error, 1)
go func() {
@@ -259,9 +259,11 @@ func applyDefaults(c *tls.Config) *tls.Config {
// certificates to establish the identity of the client need to be included in
// the credentials (eg: for mTLS), use NewTLS instead, where a complete
// tls.Config can be specified.
-// serverNameOverride is for testing only. If set to a non empty string,
-// it will override the virtual host name of authority (e.g. :authority header
-// field) in requests.
+//
+// serverNameOverride is for testing only. If set to a non empty string, it will
+// override the virtual host name of authority (e.g. :authority header field) in
+// requests. Users should use grpc.WithAuthority passed to grpc.NewClient to
+// override the authority of the client instead.
func NewClientTLSFromCert(cp *x509.CertPool, serverNameOverride string) TransportCredentials {
return NewTLS(&tls.Config{ServerName: serverNameOverride, RootCAs: cp})
}
@@ -271,9 +273,11 @@ func NewClientTLSFromCert(cp *x509.CertPool, serverNameOverride string) Transpor
// certificates to establish the identity of the client need to be included in
// the credentials (eg: for mTLS), use NewTLS instead, where a complete
// tls.Config can be specified.
-// serverNameOverride is for testing only. If set to a non empty string,
-// it will override the virtual host name of authority (e.g. :authority header
-// field) in requests.
+//
+// serverNameOverride is for testing only. If set to a non empty string, it will
+// override the virtual host name of authority (e.g. :authority header field) in
+// requests. Users should use grpc.WithAuthority passed to grpc.NewClient to
+// override the authority of the client instead.
func NewClientTLSFromFile(certFile, serverNameOverride string) (TransportCredentials, error) {
b, err := os.ReadFile(certFile)
if err != nil {
diff --git a/hack/tools/vendor/google.golang.org/grpc/dialoptions.go b/hack/tools/vendor/google.golang.org/grpc/dialoptions.go
index ec0ca89ccdca..7a5ac2e7c494 100644
--- a/hack/tools/vendor/google.golang.org/grpc/dialoptions.go
+++ b/hack/tools/vendor/google.golang.org/grpc/dialoptions.go
@@ -608,6 +608,8 @@ func WithChainStreamInterceptor(interceptors ...StreamClientInterceptor) DialOpt
// WithAuthority returns a DialOption that specifies the value to be used as the
// :authority pseudo-header and as the server name in authentication handshake.
+// This overrides all other ways of setting authority on the channel, but can be
+// overridden per-call by using grpc.CallAuthority.
func WithAuthority(a string) DialOption {
return newFuncDialOption(func(o *dialOptions) {
o.authority = a
diff --git a/hack/tools/vendor/google.golang.org/grpc/encoding/proto/proto.go b/hack/tools/vendor/google.golang.org/grpc/encoding/proto/proto.go
index ceec319dd2fb..1ab874c7ad26 100644
--- a/hack/tools/vendor/google.golang.org/grpc/encoding/proto/proto.go
+++ b/hack/tools/vendor/google.golang.org/grpc/encoding/proto/proto.go
@@ -46,9 +46,25 @@ func (c *codecV2) Marshal(v any) (data mem.BufferSlice, err error) {
return nil, fmt.Errorf("proto: failed to marshal, message is %T, want proto.Message", v)
}
+ // Important: if we remove this Size call then we cannot use
+ // UseCachedSize in MarshalOptions below.
size := proto.Size(vv)
+
+ // MarshalOptions with UseCachedSize allows reusing the result from the
+ // previous Size call. This is safe here because:
+ //
+ // 1. We just computed the size.
+ // 2. We assume the message is not being mutated concurrently.
+ //
+ // Important: If the proto.Size call above is removed, using UseCachedSize
+ // becomes unsafe and may lead to incorrect marshaling.
+ //
+ // For more details, see the doc of UseCachedSize:
+ // https://pkg.go.dev/google.golang.org/protobuf/proto#MarshalOptions
+ marshalOptions := proto.MarshalOptions{UseCachedSize: true}
+
if mem.IsBelowBufferPoolingThreshold(size) {
- buf, err := proto.Marshal(vv)
+ buf, err := marshalOptions.Marshal(vv)
if err != nil {
return nil, err
}
@@ -56,7 +72,7 @@ func (c *codecV2) Marshal(v any) (data mem.BufferSlice, err error) {
} else {
pool := mem.DefaultBufferPool()
buf := pool.Get(size)
- if _, err := (proto.MarshalOptions{}).MarshalAppend((*buf)[:0], vv); err != nil {
+ if _, err := marshalOptions.MarshalAppend((*buf)[:0], vv); err != nil {
pool.Put(buf)
return nil, err
}
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/buffer/unbounded.go b/hack/tools/vendor/google.golang.org/grpc/internal/buffer/unbounded.go
index 11f91668ac9b..467392b8d455 100644
--- a/hack/tools/vendor/google.golang.org/grpc/internal/buffer/unbounded.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/buffer/unbounded.go
@@ -83,6 +83,7 @@ func (b *Unbounded) Load() {
default:
}
} else if b.closing && !b.closed {
+ b.closed = true
close(b.c)
}
}
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/channelz/trace.go b/hack/tools/vendor/google.golang.org/grpc/internal/channelz/trace.go
index 2bffe4777684..3b7ba5966253 100644
--- a/hack/tools/vendor/google.golang.org/grpc/internal/channelz/trace.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/channelz/trace.go
@@ -194,7 +194,7 @@ func (r RefChannelType) String() string {
// If channelz is not turned ON, this will simply log the event descriptions.
func AddTraceEvent(l grpclog.DepthLoggerV2, e Entity, depth int, desc *TraceEvent) {
// Log only the trace description associated with the bottom most entity.
- d := fmt.Sprintf("[%s]%s", e, desc.Desc)
+ d := fmt.Sprintf("[%s] %s", e, desc.Desc)
switch desc.Severity {
case CtUnknown, CtInfo:
l.InfoDepth(depth+1, d)
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go b/hack/tools/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
index 2fdaed88dbd1..7e060f5ed132 100644
--- a/hack/tools/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
@@ -26,26 +26,32 @@ import (
)
var (
- // TXTErrIgnore is set if TXT errors should be ignored ("GRPC_GO_IGNORE_TXT_ERRORS" is not "false").
+ // EnableTXTServiceConfig is set if the DNS resolver should perform TXT
+ // lookups for service config ("GRPC_ENABLE_TXT_SERVICE_CONFIG" is not
+ // "false").
+ EnableTXTServiceConfig = boolFromEnv("GRPC_ENABLE_TXT_SERVICE_CONFIG", true)
+
+ // TXTErrIgnore is set if TXT errors should be ignored
+ // ("GRPC_GO_IGNORE_TXT_ERRORS" is not "false").
TXTErrIgnore = boolFromEnv("GRPC_GO_IGNORE_TXT_ERRORS", true)
+
// RingHashCap indicates the maximum ring size which defaults to 4096
// entries but may be overridden by setting the environment variable
// "GRPC_RING_HASH_CAP". This does not override the default bounds
// checking which NACKs configs specifying ring sizes > 8*1024*1024 (~8M).
RingHashCap = uint64FromEnv("GRPC_RING_HASH_CAP", 4096, 1, 8*1024*1024)
+
// ALTSMaxConcurrentHandshakes is the maximum number of concurrent ALTS
// handshakes that can be performed.
ALTSMaxConcurrentHandshakes = uint64FromEnv("GRPC_ALTS_MAX_CONCURRENT_HANDSHAKES", 100, 1, 100)
+
// EnforceALPNEnabled is set if TLS connections to servers with ALPN disabled
// should be rejected. The HTTP/2 protocol requires ALPN to be enabled, this
// option is present for backward compatibility. This option may be overridden
// by setting the environment variable "GRPC_ENFORCE_ALPN_ENABLED" to "true"
// or "false".
EnforceALPNEnabled = boolFromEnv("GRPC_ENFORCE_ALPN_ENABLED", true)
- // XDSFallbackSupport is the env variable that controls whether support for
- // xDS fallback is turned on. If this is unset or is false, only the first
- // xDS server in the list of server configs will be used.
- XDSFallbackSupport = boolFromEnv("GRPC_EXPERIMENTAL_XDS_FALLBACK", true)
+
// NewPickFirstEnabled is set if the new pickfirst leaf policy is to be used
// instead of the exiting pickfirst implementation. This can be disabled by
// setting the environment variable "GRPC_EXPERIMENTAL_ENABLE_NEW_PICK_FIRST"
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/envconfig/xds.go b/hack/tools/vendor/google.golang.org/grpc/internal/envconfig/xds.go
index e87551552ad7..b1f883bcac1e 100644
--- a/hack/tools/vendor/google.golang.org/grpc/internal/envconfig/xds.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/envconfig/xds.go
@@ -68,4 +68,10 @@ var (
// trust. For more details, see:
// https://github.com/grpc/proposal/blob/master/A87-mtls-spiffe-support.md
XDSSPIFFEEnabled = boolFromEnv("GRPC_EXPERIMENTAL_XDS_MTLS_SPIFFE", false)
+
+ // XDSHTTPConnectEnabled is true if gRPC should parse custom Metadata
+ // configuring use of an HTTP CONNECT proxy via xDS from cluster resources.
+ // For more details, see:
+ // https://github.com/grpc/proposal/blob/master/A86-xds-http-connect.md
+ XDSHTTPConnectEnabled = boolFromEnv("GRPC_EXPERIMENTAL_XDS_HTTP_CONNECT", false)
)
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go b/hack/tools/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go
index 8e8e861280a0..9b6d8a1fa3fe 100644
--- a/hack/tools/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go
@@ -80,25 +80,11 @@ func (cs *CallbackSerializer) ScheduleOr(f func(ctx context.Context), onFailure
func (cs *CallbackSerializer) run(ctx context.Context) {
defer close(cs.done)
- // TODO: when Go 1.21 is the oldest supported version, this loop and Close
- // can be replaced with:
- //
- // context.AfterFunc(ctx, cs.callbacks.Close)
- for ctx.Err() == nil {
- select {
- case <-ctx.Done():
- // Do nothing here. Next iteration of the for loop will not happen,
- // since ctx.Err() would be non-nil.
- case cb := <-cs.callbacks.Get():
- cs.callbacks.Load()
- cb.(func(context.Context))(ctx)
- }
- }
-
- // Close the buffer to prevent new callbacks from being added.
- cs.callbacks.Close()
+ // Close the buffer when the context is canceled
+ // to prevent new callbacks from being added.
+ context.AfterFunc(ctx, cs.callbacks.Close)
- // Run all pending callbacks.
+ // Run all callbacks.
for cb := range cs.callbacks.Get() {
cs.callbacks.Load()
cb.(func(context.Context))(ctx)
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/internal.go b/hack/tools/vendor/google.golang.org/grpc/internal/internal.go
index 3ac798e8e60d..2699223a27f1 100644
--- a/hack/tools/vendor/google.golang.org/grpc/internal/internal.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/internal.go
@@ -182,35 +182,6 @@ var (
// other features, including the CSDS service.
NewXDSResolverWithClientForTesting any // func(xdsclient.XDSClient) (resolver.Builder, error)
- // RegisterRLSClusterSpecifierPluginForTesting registers the RLS Cluster
- // Specifier Plugin for testing purposes, regardless of the XDSRLS environment
- // variable.
- //
- // TODO: Remove this function once the RLS env var is removed.
- RegisterRLSClusterSpecifierPluginForTesting func()
-
- // UnregisterRLSClusterSpecifierPluginForTesting unregisters the RLS Cluster
- // Specifier Plugin for testing purposes. This is needed because there is no way
- // to unregister the RLS Cluster Specifier Plugin after registering it solely
- // for testing purposes using RegisterRLSClusterSpecifierPluginForTesting().
- //
- // TODO: Remove this function once the RLS env var is removed.
- UnregisterRLSClusterSpecifierPluginForTesting func()
-
- // RegisterRBACHTTPFilterForTesting registers the RBAC HTTP Filter for testing
- // purposes, regardless of the RBAC environment variable.
- //
- // TODO: Remove this function once the RBAC env var is removed.
- RegisterRBACHTTPFilterForTesting func()
-
- // UnregisterRBACHTTPFilterForTesting unregisters the RBAC HTTP Filter for
- // testing purposes. This is needed because there is no way to unregister the
- // HTTP Filter after registering it solely for testing purposes using
- // RegisterRBACHTTPFilterForTesting().
- //
- // TODO: Remove this function once the RBAC env var is removed.
- UnregisterRBACHTTPFilterForTesting func()
-
// ORCAAllowAnyMinReportingInterval is for examples/orca use ONLY.
ORCAAllowAnyMinReportingInterval any // func(so *orca.ServiceOptions)
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go b/hack/tools/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go
index ba5c5a95d0d7..ada5251cff3e 100644
--- a/hack/tools/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go
@@ -132,13 +132,13 @@ func (b *dnsBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts
// DNS address (non-IP).
ctx, cancel := context.WithCancel(context.Background())
d := &dnsResolver{
- host: host,
- port: port,
- ctx: ctx,
- cancel: cancel,
- cc: cc,
- rn: make(chan struct{}, 1),
- disableServiceConfig: opts.DisableServiceConfig,
+ host: host,
+ port: port,
+ ctx: ctx,
+ cancel: cancel,
+ cc: cc,
+ rn: make(chan struct{}, 1),
+ enableServiceConfig: envconfig.EnableTXTServiceConfig && !opts.DisableServiceConfig,
}
d.resolver, err = internal.NewNetResolver(target.URL.Host)
@@ -181,8 +181,8 @@ type dnsResolver struct {
// finishes, race detector sometimes will warn lookup (READ the lookup
// function pointers) inside watcher() goroutine has data race with
// replaceNetFunc (WRITE the lookup function pointers).
- wg sync.WaitGroup
- disableServiceConfig bool
+ wg sync.WaitGroup
+ enableServiceConfig bool
}
// ResolveNow invoke an immediate resolution of the target that this
@@ -346,7 +346,7 @@ func (d *dnsResolver) lookup() (*resolver.State, error) {
if len(srv) > 0 {
state = grpclbstate.Set(state, &grpclbstate.State{BalancerAddresses: srv})
}
- if !d.disableServiceConfig {
+ if d.enableServiceConfig {
state.ServiceConfig = d.lookupTXT(ctx)
}
return &state, nil
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/transport/handler_server.go b/hack/tools/vendor/google.golang.org/grpc/internal/transport/handler_server.go
index 3dea23573518..d954a64c38f4 100644
--- a/hack/tools/vendor/google.golang.org/grpc/internal/transport/handler_server.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/transport/handler_server.go
@@ -277,11 +277,13 @@ func (ht *serverHandlerTransport) writeStatus(s *ServerStream, st *status.Status
if err == nil { // transport has not been closed
// Note: The trailer fields are compressed with hpack after this call returns.
// No WireLength field is set here.
+ s.hdrMu.Lock()
for _, sh := range ht.stats {
sh.HandleRPC(s.Context(), &stats.OutTrailer{
Trailer: s.trailer.Copy(),
})
}
+ s.hdrMu.Unlock()
}
ht.Close(errors.New("finished writing status"))
return err
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/hack/tools/vendor/google.golang.org/grpc/internal/transport/http2_client.go
index 5467fe9715a3..7cb238794fb5 100644
--- a/hack/tools/vendor/google.golang.org/grpc/internal/transport/http2_client.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/transport/http2_client.go
@@ -556,6 +556,19 @@ func (t *http2Client) createHeaderFields(ctx context.Context, callHdr *CallHdr)
// Make the slice of certain predictable size to reduce allocations made by append.
hfLen := 7 // :method, :scheme, :path, :authority, content-type, user-agent, te
hfLen += len(authData) + len(callAuthData)
+ registeredCompressors := t.registeredCompressors
+ if callHdr.PreviousAttempts > 0 {
+ hfLen++
+ }
+ if callHdr.SendCompress != "" {
+ hfLen++
+ }
+ if registeredCompressors != "" {
+ hfLen++
+ }
+ if _, ok := ctx.Deadline(); ok {
+ hfLen++
+ }
headerFields := make([]hpack.HeaderField, 0, hfLen)
headerFields = append(headerFields, hpack.HeaderField{Name: ":method", Value: "POST"})
headerFields = append(headerFields, hpack.HeaderField{Name: ":scheme", Value: t.scheme})
@@ -568,7 +581,6 @@ func (t *http2Client) createHeaderFields(ctx context.Context, callHdr *CallHdr)
headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-previous-rpc-attempts", Value: strconv.Itoa(callHdr.PreviousAttempts)})
}
- registeredCompressors := t.registeredCompressors
if callHdr.SendCompress != "" {
headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-encoding", Value: callHdr.SendCompress})
// Include the outgoing compressor name when compressor is not registered
@@ -1499,13 +1511,6 @@ func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) {
case "grpc-message":
grpcMessage = decodeGrpcMessage(hf.Value)
case ":status":
- if hf.Value == "200" {
- httpStatusErr = ""
- statusCode := 200
- httpStatusCode = &statusCode
- break
- }
-
c, err := strconv.ParseInt(hf.Value, 10, 32)
if err != nil {
se := status.New(codes.Internal, fmt.Sprintf("transport: malformed http-status: %v", err))
@@ -1513,7 +1518,19 @@ func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) {
return
}
statusCode := int(c)
+ if statusCode >= 100 && statusCode < 200 {
+ if endStream {
+ se := status.New(codes.Internal, fmt.Sprintf(
+ "protocol error: informational header with status code %d must not have END_STREAM set", statusCode))
+ t.closeStream(s, se.Err(), true, http2.ErrCodeProtocol, se, nil, endStream)
+ }
+ return
+ }
httpStatusCode = &statusCode
+ if statusCode == 200 {
+ httpStatusErr = ""
+ break
+ }
httpStatusErr = fmt.Sprintf(
"unexpected HTTP status code received from server: %d (%s)",
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/hack/tools/vendor/google.golang.org/grpc/internal/transport/http2_server.go
index 9f725e15a812..83cee314c8f4 100644
--- a/hack/tools/vendor/google.golang.org/grpc/internal/transport/http2_server.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/transport/http2_server.go
@@ -1353,10 +1353,10 @@ func (t *http2Server) closeStream(s *ServerStream, rst bool, rstCode http2.ErrCo
// called to interrupt the potential blocking on other goroutines.
s.cancel()
- oldState := s.swapState(streamDone)
- if oldState == streamDone {
- return
- }
+ // We can't return early even if the stream's state is "done" as the state
+ // might have been set by the `finishStream` method. Deleting the stream via
+ // `finishStream` can get blocked on flow control.
+ s.swapState(streamDone)
t.deleteStream(s, eosReceived)
t.controlBuf.put(&cleanupStream{
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/balancer.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/balancer.go
new file mode 100644
index 000000000000..af3f999a1204
--- /dev/null
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/balancer.go
@@ -0,0 +1,31 @@
+/*
+ *
+ * Copyright 2020 gRPC 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 balancer installs all the xds balancers.
+package balancer
+
+import (
+ _ "google.golang.org/grpc/balancer/leastrequest" // Register the least_request_experimental balancer
+ _ "google.golang.org/grpc/balancer/weightedtarget" // Register the weighted_target balancer
+ _ "google.golang.org/grpc/internal/xds/balancer/cdsbalancer" // Register the CDS balancer
+ _ "google.golang.org/grpc/internal/xds/balancer/clusterimpl" // Register the xds_cluster_impl balancer
+ _ "google.golang.org/grpc/internal/xds/balancer/clustermanager" // Register the xds_cluster_manager balancer
+ _ "google.golang.org/grpc/internal/xds/balancer/clusterresolver" // Register the xds_cluster_resolver balancer
+ _ "google.golang.org/grpc/internal/xds/balancer/outlierdetection" // Register the outlier_detection balancer
+ _ "google.golang.org/grpc/internal/xds/balancer/priority" // Register the priority balancer
+)
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/cdsbalancer/cdsbalancer.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/cdsbalancer/cdsbalancer.go
similarity index 98%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/cdsbalancer/cdsbalancer.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/cdsbalancer/cdsbalancer.go
index 3a0e3f9e6be7..0ad77b85e9f1 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/cdsbalancer/cdsbalancer.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/cdsbalancer/cdsbalancer.go
@@ -35,11 +35,11 @@ import (
"google.golang.org/grpc/internal/grpclog"
"google.golang.org/grpc/internal/grpcsync"
"google.golang.org/grpc/internal/pretty"
+ "google.golang.org/grpc/internal/xds/balancer/clusterresolver"
+ "google.golang.org/grpc/internal/xds/xdsclient"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource"
"google.golang.org/grpc/resolver"
"google.golang.org/grpc/serviceconfig"
- "google.golang.org/grpc/xds/internal/balancer/clusterresolver"
- "google.golang.org/grpc/xds/internal/xdsclient"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource"
)
const (
@@ -530,13 +530,11 @@ func (b *cdsBalancer) onClusterUpdate(name string, update xdsresource.ClusterUpd
}
// We no longer need the clusters that we did not see in this iteration of
// generateDMsForCluster().
- for cluster := range clustersSeen {
- state, ok := b.watchers[cluster]
- if ok {
- continue
+ for cluster, state := range b.watchers {
+ if !clustersSeen[cluster] {
+ state.cancelWatch()
+ delete(b.watchers, cluster)
}
- state.cancelWatch()
- delete(b.watchers, cluster)
}
}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/cdsbalancer/cluster_watcher.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/cdsbalancer/cluster_watcher.go
similarity index 97%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/cdsbalancer/cluster_watcher.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/cdsbalancer/cluster_watcher.go
index a9adea0c8040..dd702b125b32 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/cdsbalancer/cluster_watcher.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/cdsbalancer/cluster_watcher.go
@@ -19,7 +19,7 @@ package cdsbalancer
import (
"context"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource"
)
// clusterWatcher implements the xdsresource.ClusterWatcher interface, and is
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/cdsbalancer/logging.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/cdsbalancer/logging.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/cdsbalancer/logging.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/cdsbalancer/logging.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterimpl/clusterimpl.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterimpl/clusterimpl.go
similarity index 97%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterimpl/clusterimpl.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterimpl/clusterimpl.go
index 096b738b0d3e..ffe0a3db55a8 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterimpl/clusterimpl.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterimpl/clusterimpl.go
@@ -27,6 +27,7 @@ import (
"context"
"encoding/json"
"fmt"
+ "slices"
"sync"
"sync/atomic"
"time"
@@ -37,15 +38,14 @@ import (
"google.golang.org/grpc/internal/balancer/gracefulswitch"
"google.golang.org/grpc/internal/grpclog"
"google.golang.org/grpc/internal/pretty"
- "google.golang.org/grpc/internal/xds"
+ xdsinternal "google.golang.org/grpc/internal/xds"
+ "google.golang.org/grpc/internal/xds/balancer/loadstore"
"google.golang.org/grpc/internal/xds/bootstrap"
+ "google.golang.org/grpc/internal/xds/clients"
+ "google.golang.org/grpc/internal/xds/clients/lrsclient"
+ "google.golang.org/grpc/internal/xds/xdsclient"
"google.golang.org/grpc/resolver"
"google.golang.org/grpc/serviceconfig"
- xdsinternal "google.golang.org/grpc/xds/internal"
- "google.golang.org/grpc/xds/internal/balancer/loadstore"
- "google.golang.org/grpc/xds/internal/clients"
- "google.golang.org/grpc/xds/internal/clients/lrsclient"
- "google.golang.org/grpc/xds/internal/xdsclient"
)
const (
@@ -128,7 +128,7 @@ type clusterImplBalancer struct {
// indicating if a new picker needs to be generated.
func (b *clusterImplBalancer) handleDropAndRequestCountLocked(newConfig *LBConfig) bool {
var updatePicker bool
- if !equalDropCategories(b.dropCategories, newConfig.DropCategories) {
+ if !slices.Equal(b.dropCategories, newConfig.DropCategories) {
b.dropCategories = newConfig.DropCategories
b.drops = make([]*dropper, 0, len(newConfig.DropCategories))
for _, c := range newConfig.DropCategories {
@@ -435,7 +435,7 @@ func (b *clusterImplBalancer) NewSubConn(addrs []resolver.Address, opts balancer
clusterName := b.getClusterName()
newAddrs := make([]resolver.Address, len(addrs))
for i, addr := range addrs {
- newAddrs[i] = xds.SetXDSHandshakeClusterName(addr, clusterName)
+ newAddrs[i] = xdsinternal.SetXDSHandshakeClusterName(addr, clusterName)
}
var sc balancer.SubConn
scw := &scWrapper{}
@@ -474,7 +474,7 @@ func (b *clusterImplBalancer) UpdateAddresses(sc balancer.SubConn, addrs []resol
newAddrs := make([]resolver.Address, len(addrs))
var lID clients.Locality
for i, addr := range addrs {
- newAddrs[i] = xds.SetXDSHandshakeClusterName(addr, clusterName)
+ newAddrs[i] = xdsinternal.SetXDSHandshakeClusterName(addr, clusterName)
lID = xdsinternal.GetLocalityID(newAddrs[i])
}
if scw, ok := sc.(*scWrapper); ok {
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterimpl/config.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterimpl/config.go
new file mode 100644
index 000000000000..34f777a20802
--- /dev/null
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterimpl/config.go
@@ -0,0 +1,57 @@
+/*
+ *
+ * Copyright 2020 gRPC 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 clusterimpl
+
+import (
+ "encoding/json"
+
+ internalserviceconfig "google.golang.org/grpc/internal/serviceconfig"
+ "google.golang.org/grpc/internal/xds/bootstrap"
+ "google.golang.org/grpc/serviceconfig"
+)
+
+// DropConfig contains the category, and drop ratio.
+type DropConfig struct {
+ Category string
+ RequestsPerMillion uint32
+}
+
+// LBConfig is the balancer config for cluster_impl balancer.
+type LBConfig struct {
+ serviceconfig.LoadBalancingConfig `json:"-"`
+
+ Cluster string `json:"cluster,omitempty"`
+ EDSServiceName string `json:"edsServiceName,omitempty"`
+ // LoadReportingServer is the LRS server to send load reports to. If not
+ // present, load reporting will be disabled.
+ LoadReportingServer *bootstrap.ServerConfig `json:"lrsLoadReportingServer,omitempty"`
+ MaxConcurrentRequests *uint32 `json:"maxConcurrentRequests,omitempty"`
+ DropCategories []DropConfig `json:"dropCategories,omitempty"`
+ // TelemetryLabels are the telemetry Labels associated with this cluster.
+ TelemetryLabels map[string]string `json:"telemetryLabels,omitempty"`
+ ChildPolicy *internalserviceconfig.BalancerConfig `json:"childPolicy,omitempty"`
+}
+
+func parseConfig(c json.RawMessage) (*LBConfig, error) {
+ var cfg LBConfig
+ if err := json.Unmarshal(c, &cfg); err != nil {
+ return nil, err
+ }
+ return &cfg, nil
+}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterimpl/logging.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterimpl/logging.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterimpl/logging.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterimpl/logging.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterimpl/picker.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterimpl/picker.go
similarity index 95%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterimpl/picker.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterimpl/picker.go
index 9ed16ffbe467..fab09fa0978b 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterimpl/picker.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterimpl/picker.go
@@ -27,10 +27,10 @@ import (
"google.golang.org/grpc/connectivity"
"google.golang.org/grpc/internal/stats"
"google.golang.org/grpc/internal/wrr"
+ xdsinternal "google.golang.org/grpc/internal/xds"
+ "google.golang.org/grpc/internal/xds/clients"
+ "google.golang.org/grpc/internal/xds/xdsclient"
"google.golang.org/grpc/status"
- "google.golang.org/grpc/xds/internal"
- "google.golang.org/grpc/xds/internal/clients"
- "google.golang.org/grpc/xds/internal/xdsclient"
)
// NewRandomWRR is used when calculating drops. It's exported so that tests can
@@ -155,7 +155,7 @@ func (d *picker) Pick(info balancer.PickInfo) (balancer.PickResult, error) {
}
if labels := telemetryLabels(info.Ctx); labels != nil {
- labels["grpc.lb.locality"] = internal.LocalityString(lID)
+ labels["grpc.lb.locality"] = xdsinternal.LocalityString(lID)
}
if d.loadStore != nil {
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clustermanager/balancerstateaggregator.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clustermanager/balancerstateaggregator.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clustermanager/balancerstateaggregator.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clustermanager/balancerstateaggregator.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clustermanager/clustermanager.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clustermanager/clustermanager.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clustermanager/clustermanager.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clustermanager/clustermanager.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clustermanager/config.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clustermanager/config.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clustermanager/config.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clustermanager/config.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clustermanager/picker.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clustermanager/picker.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clustermanager/picker.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clustermanager/picker.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/clusterresolver.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/clusterresolver.go
similarity index 98%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/clusterresolver.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/clusterresolver.go
index f9ce57293393..f5a30e1acbec 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/clusterresolver.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/clusterresolver.go
@@ -35,12 +35,12 @@ import (
"google.golang.org/grpc/internal/grpclog"
"google.golang.org/grpc/internal/grpcsync"
"google.golang.org/grpc/internal/pretty"
+ "google.golang.org/grpc/internal/xds/balancer/outlierdetection"
+ "google.golang.org/grpc/internal/xds/balancer/priority"
+ "google.golang.org/grpc/internal/xds/xdsclient"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource"
"google.golang.org/grpc/resolver"
"google.golang.org/grpc/serviceconfig"
- "google.golang.org/grpc/xds/internal/balancer/outlierdetection"
- "google.golang.org/grpc/xds/internal/balancer/priority"
- "google.golang.org/grpc/xds/internal/xdsclient"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource"
)
// Name is the name of the cluster_resolver balancer.
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/config.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/config.go
new file mode 100644
index 000000000000..f3b4c6bf6146
--- /dev/null
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/config.go
@@ -0,0 +1,160 @@
+/*
+ *
+ * Copyright 2021 gRPC 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 clusterresolver
+
+import (
+ "bytes"
+ "encoding/json"
+ "fmt"
+
+ internalserviceconfig "google.golang.org/grpc/internal/serviceconfig"
+ "google.golang.org/grpc/internal/xds/balancer/outlierdetection"
+ "google.golang.org/grpc/internal/xds/bootstrap"
+ "google.golang.org/grpc/serviceconfig"
+)
+
+// DiscoveryMechanismType is the type of discovery mechanism.
+type DiscoveryMechanismType int
+
+const (
+ // DiscoveryMechanismTypeEDS is eds.
+ DiscoveryMechanismTypeEDS DiscoveryMechanismType = iota // `json:"EDS"`
+ // DiscoveryMechanismTypeLogicalDNS is DNS.
+ DiscoveryMechanismTypeLogicalDNS // `json:"LOGICAL_DNS"`
+)
+
+// MarshalJSON marshals a DiscoveryMechanismType to a quoted json string.
+//
+// This is necessary to handle enum (as strings) from JSON.
+//
+// Note that this needs to be defined on the type not pointer, otherwise the
+// variables of this type will marshal to int not string.
+func (t DiscoveryMechanismType) MarshalJSON() ([]byte, error) {
+ buffer := bytes.NewBufferString(`"`)
+ switch t {
+ case DiscoveryMechanismTypeEDS:
+ buffer.WriteString("EDS")
+ case DiscoveryMechanismTypeLogicalDNS:
+ buffer.WriteString("LOGICAL_DNS")
+ }
+ buffer.WriteString(`"`)
+ return buffer.Bytes(), nil
+}
+
+// UnmarshalJSON unmarshals a quoted json string to the DiscoveryMechanismType.
+func (t *DiscoveryMechanismType) UnmarshalJSON(b []byte) error {
+ var s string
+ err := json.Unmarshal(b, &s)
+ if err != nil {
+ return err
+ }
+ switch s {
+ case "EDS":
+ *t = DiscoveryMechanismTypeEDS
+ case "LOGICAL_DNS":
+ *t = DiscoveryMechanismTypeLogicalDNS
+ default:
+ return fmt.Errorf("unable to unmarshal string %q to type DiscoveryMechanismType", s)
+ }
+ return nil
+}
+
+// DiscoveryMechanism is the discovery mechanism, can be either EDS or DNS.
+//
+// For DNS, the ClientConn target will be used for name resolution.
+//
+// For EDS, if EDSServiceName is not empty, it will be used for watching. If
+// EDSServiceName is empty, Cluster will be used.
+type DiscoveryMechanism struct {
+ // Cluster is the cluster name.
+ Cluster string `json:"cluster,omitempty"`
+ // LoadReportingServer is the LRS server to send load reports to. If not
+ // present, load reporting will be disabled.
+ LoadReportingServer *bootstrap.ServerConfig `json:"lrsLoadReportingServer,omitempty"`
+ // MaxConcurrentRequests is the maximum number of outstanding requests can
+ // be made to the upstream cluster. Default is 1024.
+ MaxConcurrentRequests *uint32 `json:"maxConcurrentRequests,omitempty"`
+ // Type is the discovery mechanism type.
+ Type DiscoveryMechanismType `json:"type,omitempty"`
+ // EDSServiceName is the EDS service name, as returned in CDS. May be unset
+ // if not specified in CDS. For type EDS only.
+ //
+ // This is used for EDS watch if set. If unset, Cluster is used for EDS
+ // watch.
+ EDSServiceName string `json:"edsServiceName,omitempty"`
+ // DNSHostname is the DNS name to resolve in "host:port" form. For type
+ // LOGICAL_DNS only.
+ DNSHostname string `json:"dnsHostname,omitempty"`
+ // OutlierDetection is the Outlier Detection LB configuration for this
+ // priority.
+ OutlierDetection json.RawMessage `json:"outlierDetection,omitempty"`
+ // TelemetryLabels are the telemetry labels associated with this cluster.
+ TelemetryLabels map[string]string `json:"telemetryLabels,omitempty"`
+ outlierDetection outlierdetection.LBConfig
+}
+
+// Equal returns whether the DiscoveryMechanism is the same with the parameter.
+func (dm DiscoveryMechanism) Equal(b DiscoveryMechanism) bool {
+ od := &dm.outlierDetection
+ switch {
+ case dm.Cluster != b.Cluster:
+ return false
+ case !equalUint32P(dm.MaxConcurrentRequests, b.MaxConcurrentRequests):
+ return false
+ case dm.Type != b.Type:
+ return false
+ case dm.EDSServiceName != b.EDSServiceName:
+ return false
+ case dm.DNSHostname != b.DNSHostname:
+ return false
+ case !od.EqualIgnoringChildPolicy(&b.outlierDetection):
+ return false
+ }
+
+ if dm.LoadReportingServer == nil && b.LoadReportingServer == nil {
+ return true
+ }
+ if (dm.LoadReportingServer != nil) != (b.LoadReportingServer != nil) {
+ return false
+ }
+ return dm.LoadReportingServer.String() == b.LoadReportingServer.String()
+}
+
+func equalUint32P(a, b *uint32) bool {
+ if a == nil && b == nil {
+ return true
+ }
+ if a == nil || b == nil {
+ return false
+ }
+ return *a == *b
+}
+
+// LBConfig is the config for cluster resolver balancer.
+type LBConfig struct {
+ serviceconfig.LoadBalancingConfig `json:"-"`
+ // DiscoveryMechanisms is an ordered list of discovery mechanisms.
+ //
+ // Must have at least one element. Results from each discovery mechanism are
+ // concatenated together in successive priorities.
+ DiscoveryMechanisms []DiscoveryMechanism `json:"discoveryMechanisms,omitempty"`
+
+ // XDSLBPolicy specifies the policy for locality picking and endpoint picking.
+ XDSLBPolicy json.RawMessage `json:"xdsLbPolicy,omitempty"`
+ xdsLBPolicy internalserviceconfig.BalancerConfig
+}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/configbuilder.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/configbuilder.go
similarity index 96%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/configbuilder.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/configbuilder.go
index 9c7fed8629ba..3d8e08972c1d 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/configbuilder.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/configbuilder.go
@@ -26,14 +26,14 @@ import (
"google.golang.org/grpc/internal/balancer/weight"
"google.golang.org/grpc/internal/hierarchy"
internalserviceconfig "google.golang.org/grpc/internal/serviceconfig"
+ xdsinternal "google.golang.org/grpc/internal/xds"
+ "google.golang.org/grpc/internal/xds/balancer/clusterimpl"
+ "google.golang.org/grpc/internal/xds/balancer/outlierdetection"
+ "google.golang.org/grpc/internal/xds/balancer/priority"
+ "google.golang.org/grpc/internal/xds/balancer/wrrlocality"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource"
"google.golang.org/grpc/resolver"
"google.golang.org/grpc/resolver/ringhash"
- "google.golang.org/grpc/xds/internal"
- "google.golang.org/grpc/xds/internal/balancer/clusterimpl"
- "google.golang.org/grpc/xds/internal/balancer/outlierdetection"
- "google.golang.org/grpc/xds/internal/balancer/priority"
- "google.golang.org/grpc/xds/internal/balancer/wrrlocality"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource"
)
const million = 1000000
@@ -257,7 +257,7 @@ func priorityLocalitiesToClusterImpl(localities []xdsresource.Locality, priority
if locality.Weight != 0 {
lw = locality.Weight
}
- localityStr := internal.LocalityString(locality.ID)
+ localityStr := xdsinternal.LocalityString(locality.ID)
for _, endpoint := range locality.Endpoints {
// Filter out all "unhealthy" endpoints (unknown and healthy are
// both considered to be healthy:
@@ -270,7 +270,7 @@ func priorityLocalitiesToClusterImpl(localities []xdsresource.Locality, priority
resolverEndpoint.Addresses = append(resolverEndpoint.Addresses, resolver.Address{Addr: as})
}
resolverEndpoint = hierarchy.SetInEndpoint(resolverEndpoint, []string{priorityName, localityStr})
- resolverEndpoint = internal.SetLocalityIDInEndpoint(resolverEndpoint, locality.ID)
+ resolverEndpoint = xdsinternal.SetLocalityIDInEndpoint(resolverEndpoint, locality.ID)
// "To provide the xds_wrr_locality load balancer information about
// locality weights received from EDS, the cluster resolver will
// populate a new locality weight attribute for each address The
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/configbuilder_childname.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/configbuilder_childname.go
similarity index 96%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/configbuilder_childname.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/configbuilder_childname.go
index bf4e33496ec7..296ed740e401 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/configbuilder_childname.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/configbuilder_childname.go
@@ -20,8 +20,8 @@ package clusterresolver
import (
"fmt"
- "google.golang.org/grpc/xds/internal/clients"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource"
+ "google.golang.org/grpc/internal/xds/clients"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource"
)
// nameGenerator generates a child name for a list of priorities (each priority
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/logging.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/logging.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/logging.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/logging.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/resource_resolver.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/resource_resolver.go
similarity index 99%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/resource_resolver.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/resource_resolver.go
index c1a656c59726..90e950c73332 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/resource_resolver.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/resource_resolver.go
@@ -24,8 +24,8 @@ import (
"google.golang.org/grpc/internal/grpclog"
"google.golang.org/grpc/internal/grpcsync"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource"
"google.golang.org/grpc/resolver"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource"
)
// resourceUpdate is a combined update from all the resources, in the order of
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/resource_resolver_dns.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/resource_resolver_dns.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/resource_resolver_dns.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/resource_resolver_dns.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/resource_resolver_eds.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/resource_resolver_eds.go
similarity index 98%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/resource_resolver_eds.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/resource_resolver_eds.go
index 043def95079d..18b517f111d9 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/resource_resolver_eds.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/resource_resolver_eds.go
@@ -23,7 +23,7 @@ import (
"google.golang.org/grpc/internal/grpclog"
"google.golang.org/grpc/internal/grpcsync"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource"
)
type edsDiscoveryMechanism struct {
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/loadstore/load_store_wrapper.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/loadstore/load_store_wrapper.go
similarity index 97%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/loadstore/load_store_wrapper.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/loadstore/load_store_wrapper.go
index 48a2b7d1ed49..89d5ad8751a1 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/loadstore/load_store_wrapper.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/loadstore/load_store_wrapper.go
@@ -22,8 +22,8 @@ package loadstore
import (
"sync"
- "google.golang.org/grpc/xds/internal/clients"
- "google.golang.org/grpc/xds/internal/clients/lrsclient"
+ "google.golang.org/grpc/internal/xds/clients"
+ "google.golang.org/grpc/internal/xds/clients/lrsclient"
)
// NewWrapper creates a Wrapper.
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/outlierdetection/balancer.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/outlierdetection/balancer.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/outlierdetection/balancer.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/outlierdetection/balancer.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/outlierdetection/callcounter.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/outlierdetection/callcounter.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/outlierdetection/callcounter.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/outlierdetection/callcounter.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/outlierdetection/config.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/outlierdetection/config.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/outlierdetection/config.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/outlierdetection/config.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/outlierdetection/logging.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/outlierdetection/logging.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/outlierdetection/logging.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/outlierdetection/logging.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/outlierdetection/subconn_wrapper.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/outlierdetection/subconn_wrapper.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/outlierdetection/subconn_wrapper.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/outlierdetection/subconn_wrapper.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/priority/balancer.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/priority/balancer.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/priority/balancer.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/priority/balancer.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/priority/balancer_child.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/priority/balancer_child.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/priority/balancer_child.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/priority/balancer_child.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/priority/balancer_priority.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/priority/balancer_priority.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/priority/balancer_priority.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/priority/balancer_priority.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/priority/config.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/priority/config.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/priority/config.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/priority/config.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/priority/ignore_resolve_now.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/priority/ignore_resolve_now.go
similarity index 77%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/priority/ignore_resolve_now.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/priority/ignore_resolve_now.go
index 792ee4b3f242..df9ec46c5706 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/priority/ignore_resolve_now.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/priority/ignore_resolve_now.go
@@ -29,29 +29,21 @@ import (
// ResolveNow() method to ignore those calls if the ignoreResolveNow bit is set.
type ignoreResolveNowClientConn struct {
balancer.ClientConn
- ignoreResolveNow *uint32
+ ignoreResolveNow atomic.Bool
}
func newIgnoreResolveNowClientConn(cc balancer.ClientConn, ignore bool) *ignoreResolveNowClientConn {
- ret := &ignoreResolveNowClientConn{
- ClientConn: cc,
- ignoreResolveNow: new(uint32),
- }
+ ret := &ignoreResolveNowClientConn{ClientConn: cc}
ret.updateIgnoreResolveNow(ignore)
return ret
}
func (i *ignoreResolveNowClientConn) updateIgnoreResolveNow(b bool) {
- if b {
- atomic.StoreUint32(i.ignoreResolveNow, 1)
- return
- }
- atomic.StoreUint32(i.ignoreResolveNow, 0)
-
+ i.ignoreResolveNow.Store(b)
}
-func (i ignoreResolveNowClientConn) ResolveNow(o resolver.ResolveNowOptions) {
- if atomic.LoadUint32(i.ignoreResolveNow) != 0 {
+func (i *ignoreResolveNowClientConn) ResolveNow(o resolver.ResolveNowOptions) {
+ if i.ignoreResolveNow.Load() {
return
}
i.ClientConn.ResolveNow(o)
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/priority/logging.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/priority/logging.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/priority/logging.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/priority/logging.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/wrrlocality/balancer.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/wrrlocality/balancer.go
new file mode 100644
index 000000000000..b11aaa17e550
--- /dev/null
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/wrrlocality/balancer.go
@@ -0,0 +1,208 @@
+/*
+ *
+ * Copyright 2023 gRPC 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 wrrlocality provides an implementation of the wrr locality LB policy,
+// as defined in [A52 - xDS Custom LB Policies].
+//
+// [A52 - xDS Custom LB Policies]: https://github.com/grpc/proposal/blob/master/A52-xds-custom-lb-policies.md
+package wrrlocality
+
+import (
+ "encoding/json"
+ "errors"
+ "fmt"
+
+ "google.golang.org/grpc/balancer"
+ "google.golang.org/grpc/balancer/weightedtarget"
+ "google.golang.org/grpc/internal/grpclog"
+ internalserviceconfig "google.golang.org/grpc/internal/serviceconfig"
+ xdsinternal "google.golang.org/grpc/internal/xds"
+ "google.golang.org/grpc/resolver"
+ "google.golang.org/grpc/serviceconfig"
+)
+
+// Name is the name of wrr_locality balancer.
+const Name = "xds_wrr_locality_experimental"
+
+func init() {
+ balancer.Register(bb{})
+}
+
+type bb struct{}
+
+func (bb) Name() string {
+ return Name
+}
+
+// LBConfig is the config for the wrr locality balancer.
+type LBConfig struct {
+ serviceconfig.LoadBalancingConfig `json:"-"`
+ // ChildPolicy is the config for the child policy.
+ ChildPolicy *internalserviceconfig.BalancerConfig `json:"childPolicy,omitempty"`
+}
+
+// To plumb in a different child in tests.
+var weightedTargetName = weightedtarget.Name
+
+func (bb) Build(cc balancer.ClientConn, bOpts balancer.BuildOptions) balancer.Balancer {
+ builder := balancer.Get(weightedTargetName)
+ if builder == nil {
+ // Shouldn't happen, registered through imported weighted target,
+ // defensive programming.
+ return nil
+ }
+
+ // Doesn't need to intercept any balancer.ClientConn operations; pass
+ // through by just giving cc to child balancer.
+ wtb := builder.Build(cc, bOpts)
+ if wtb == nil {
+ // shouldn't happen, defensive programming.
+ return nil
+ }
+ wtbCfgParser, ok := builder.(balancer.ConfigParser)
+ if !ok {
+ // Shouldn't happen, imported weighted target builder has this method.
+ return nil
+ }
+ wrrL := &wrrLocalityBalancer{
+ child: wtb,
+ childParser: wtbCfgParser,
+ }
+
+ wrrL.logger = prefixLogger(wrrL)
+ wrrL.logger.Infof("Created")
+ return wrrL
+}
+
+func (bb) ParseConfig(s json.RawMessage) (serviceconfig.LoadBalancingConfig, error) {
+ var lbCfg *LBConfig
+ if err := json.Unmarshal(s, &lbCfg); err != nil {
+ return nil, fmt.Errorf("xds_wrr_locality: invalid LBConfig: %s, error: %v", string(s), err)
+ }
+ if lbCfg == nil || lbCfg.ChildPolicy == nil {
+ return nil, errors.New("xds_wrr_locality: invalid LBConfig: child policy field must be set")
+ }
+ return lbCfg, nil
+}
+
+type attributeKey struct{}
+
+// Equal allows the values to be compared by Attributes.Equal.
+func (a AddrInfo) Equal(o any) bool {
+ oa, ok := o.(AddrInfo)
+ return ok && oa.LocalityWeight == a.LocalityWeight
+}
+
+// AddrInfo is the locality weight of the locality an address is a part of.
+type AddrInfo struct {
+ LocalityWeight uint32
+}
+
+// SetAddrInfo returns a copy of addr in which the BalancerAttributes field is
+// updated with AddrInfo.
+func SetAddrInfo(addr resolver.Address, addrInfo AddrInfo) resolver.Address {
+ addr.BalancerAttributes = addr.BalancerAttributes.WithValue(attributeKey{}, addrInfo)
+ return addr
+}
+
+// SetAddrInfoInEndpoint returns a copy of endpoint in which the Attributes
+// field is updated with AddrInfo.
+func SetAddrInfoInEndpoint(endpoint resolver.Endpoint, addrInfo AddrInfo) resolver.Endpoint {
+ endpoint.Attributes = endpoint.Attributes.WithValue(attributeKey{}, addrInfo)
+ return endpoint
+}
+
+func (a AddrInfo) String() string {
+ return fmt.Sprintf("Locality Weight: %d", a.LocalityWeight)
+}
+
+// getAddrInfo returns the AddrInfo stored in the BalancerAttributes field of
+// addr. Returns false if no AddrInfo found.
+func getAddrInfo(addr resolver.Address) (AddrInfo, bool) {
+ v := addr.BalancerAttributes.Value(attributeKey{})
+ ai, ok := v.(AddrInfo)
+ return ai, ok
+}
+
+// wrrLocalityBalancer wraps a weighted target balancer, and builds
+// configuration for the weighted target once it receives configuration
+// specifying the weighted target child balancer and locality weight
+// information.
+type wrrLocalityBalancer struct {
+ // child will be a weighted target balancer, and will be built it at
+ // wrrLocalityBalancer build time. Other than preparing configuration, other
+ // balancer operations are simply pass through.
+ child balancer.Balancer
+
+ childParser balancer.ConfigParser
+
+ logger *grpclog.PrefixLogger
+}
+
+func (b *wrrLocalityBalancer) ExitIdle() {
+ b.child.ExitIdle()
+}
+
+func (b *wrrLocalityBalancer) UpdateClientConnState(s balancer.ClientConnState) error {
+ lbCfg, ok := s.BalancerConfig.(*LBConfig)
+ if !ok {
+ b.logger.Errorf("Received config with unexpected type %T: %v", s.BalancerConfig, s.BalancerConfig)
+ return balancer.ErrBadResolverState
+ }
+
+ weightedTargets := make(map[string]weightedtarget.Target)
+ for _, addr := range s.ResolverState.Addresses {
+ // This get of LocalityID could potentially return a zero value. This
+ // shouldn't happen though (this attribute that is set actually gets
+ // used to build localities in the first place), and thus don't error
+ // out, and just build a weighted target with undefined behavior.
+ locality := xdsinternal.LocalityString(xdsinternal.GetLocalityID(addr))
+ ai, ok := getAddrInfo(addr)
+ if !ok {
+ return fmt.Errorf("xds_wrr_locality: missing locality weight information in address %q", addr)
+ }
+ weightedTargets[locality] = weightedtarget.Target{Weight: ai.LocalityWeight, ChildPolicy: lbCfg.ChildPolicy}
+ }
+ wtCfg := &weightedtarget.LBConfig{Targets: weightedTargets}
+ wtCfgJSON, err := json.Marshal(wtCfg)
+ if err != nil {
+ // Shouldn't happen.
+ return fmt.Errorf("xds_wrr_locality: error marshalling prepared config: %v", wtCfg)
+ }
+ var sc serviceconfig.LoadBalancingConfig
+ if sc, err = b.childParser.ParseConfig(wtCfgJSON); err != nil {
+ return fmt.Errorf("xds_wrr_locality: config generated %v is invalid: %v", wtCfgJSON, err)
+ }
+
+ return b.child.UpdateClientConnState(balancer.ClientConnState{
+ ResolverState: s.ResolverState,
+ BalancerConfig: sc,
+ })
+}
+
+func (b *wrrLocalityBalancer) ResolverError(err error) {
+ b.child.ResolverError(err)
+}
+
+func (b *wrrLocalityBalancer) UpdateSubConnState(sc balancer.SubConn, state balancer.SubConnState) {
+ b.logger.Errorf("UpdateSubConnState(%v, %+v) called unexpectedly", sc, state)
+}
+
+func (b *wrrLocalityBalancer) Close() {
+ b.child.Close()
+}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/wrrlocality/logging.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/wrrlocality/logging.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/wrrlocality/logging.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/balancer/wrrlocality/logging.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/xds/bootstrap/bootstrap.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/bootstrap/bootstrap.go
index 6c7b2332facc..4278702ec0c7 100644
--- a/hack/tools/vendor/google.golang.org/grpc/internal/xds/bootstrap/bootstrap.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/bootstrap/bootstrap.go
@@ -106,12 +106,6 @@ func (scs *ServerConfigs) UnmarshalJSON(data []byte) error {
if err := json.Unmarshal(data, &servers); err != nil {
return fmt.Errorf("xds: failed to JSON unmarshal server configurations during bootstrap: %v, config:\n%s", err, string(data))
}
- // Only use the first server config if fallback support is disabled.
- if !envconfig.XDSFallbackSupport {
- if len(servers) > 1 {
- servers = servers[:1]
- }
- }
*scs = servers
return nil
}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/config.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/config.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/config.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/config.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/grpctransport/grpc_transport.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/grpctransport/grpc_transport.go
similarity index 99%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/grpctransport/grpc_transport.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/grpctransport/grpc_transport.go
index 2659c301e5bf..841029dc2eee 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/grpctransport/grpc_transport.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/grpctransport/grpc_transport.go
@@ -29,8 +29,8 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/grpclog"
+ "google.golang.org/grpc/internal/xds/clients"
"google.golang.org/grpc/keepalive"
- "google.golang.org/grpc/xds/internal/clients"
)
var (
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/internal/backoff/backoff.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/internal/backoff/backoff.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/internal/backoff/backoff.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/internal/backoff/backoff.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/internal/buffer/unbounded.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/internal/buffer/unbounded.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/internal/buffer/unbounded.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/internal/buffer/unbounded.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/internal/internal.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/internal/internal.go
new file mode 100644
index 000000000000..60cf82b2e443
--- /dev/null
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/internal/internal.go
@@ -0,0 +1,71 @@
+/*
+ *
+ * Copyright 2025 gRPC 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 internal contains helpers for xDS and LRS clients.
+package internal
+
+import (
+ "google.golang.org/grpc/internal/xds/clients"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/known/structpb"
+
+ v3corepb "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
+)
+
+// NodeProto returns a protobuf representation of clients.Node n.
+//
+// This function is intended to be used by the client implementation to convert
+// the user-provided Node configuration to its protobuf representation.
+func NodeProto(n clients.Node) *v3corepb.Node {
+ return &v3corepb.Node{
+ Id: n.ID,
+ Cluster: n.Cluster,
+ Locality: func() *v3corepb.Locality {
+ if isLocalityEmpty(n.Locality) {
+ return nil
+ }
+ return &v3corepb.Locality{
+ Region: n.Locality.Region,
+ Zone: n.Locality.Zone,
+ SubZone: n.Locality.SubZone,
+ }
+ }(),
+ Metadata: func() *structpb.Struct {
+ if n.Metadata == nil {
+ return nil
+ }
+ if md, ok := n.Metadata.(*structpb.Struct); ok {
+ return proto.Clone(md).(*structpb.Struct)
+ }
+ return nil
+ }(),
+ UserAgentName: n.UserAgentName,
+ UserAgentVersionType: &v3corepb.Node_UserAgentVersion{UserAgentVersion: n.UserAgentVersion},
+ }
+}
+
+// isLocalityEqual reports whether clients.Locality l is considered empty.
+func isLocalityEmpty(l clients.Locality) bool {
+ return isLocalityEqual(l, clients.Locality{})
+}
+
+// isLocalityEqual returns true if clients.Locality l1 and l2 are considered
+// equal.
+func isLocalityEqual(l1, l2 clients.Locality) bool {
+ return l1.Region == l2.Region && l1.Zone == l2.Zone && l1.SubZone == l2.SubZone
+}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/internal/pretty/pretty.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/internal/pretty/pretty.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/internal/pretty/pretty.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/internal/pretty/pretty.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/internal/syncutil/callback_serializer.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/internal/syncutil/callback_serializer.go
similarity index 84%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/internal/syncutil/callback_serializer.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/internal/syncutil/callback_serializer.go
index 9ad1be517c94..baab133f2443 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/internal/syncutil/callback_serializer.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/internal/syncutil/callback_serializer.go
@@ -21,7 +21,7 @@ package syncutil
import (
"context"
- "google.golang.org/grpc/xds/internal/clients/internal/buffer"
+ "google.golang.org/grpc/internal/xds/clients/internal/buffer"
)
// CallbackSerializer provides a mechanism to schedule callbacks in a
@@ -80,25 +80,11 @@ func (cs *CallbackSerializer) ScheduleOr(f func(ctx context.Context), onFailure
func (cs *CallbackSerializer) run(ctx context.Context) {
defer close(cs.done)
- // TODO: when Go 1.21 is the oldest supported version, this loop and Close
- // can be replaced with:
- //
- // context.AfterFunc(ctx, cs.callbacks.Close)
- for ctx.Err() == nil {
- select {
- case <-ctx.Done():
- // Do nothing here. Next iteration of the for loop will not happen,
- // since ctx.Err() would be non-nil.
- case cb := <-cs.callbacks.Get():
- cs.callbacks.Load()
- cb.(func(context.Context))(ctx)
- }
- }
-
- // Close the buffer to prevent new callbacks from being added.
- cs.callbacks.Close()
+ // Close the buffer when the context is canceled
+ // to prevent new callbacks from being added.
+ context.AfterFunc(ctx, cs.callbacks.Close)
- // Run all pending callbacks.
+ // Run all callbacks.
for cb := range cs.callbacks.Get() {
cs.callbacks.Load()
cb.(func(context.Context))(ctx)
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/internal/syncutil/event.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/internal/syncutil/event.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/internal/syncutil/event.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/internal/syncutil/event.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/lrsclient/internal/internal.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/lrsclient/internal/internal.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/lrsclient/internal/internal.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/lrsclient/internal/internal.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/lrsclient/load_store.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/lrsclient/load_store.go
similarity index 99%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/lrsclient/load_store.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/lrsclient/load_store.go
index 6b35fd979aab..fcc6247ed784 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/lrsclient/load_store.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/lrsclient/load_store.go
@@ -24,8 +24,8 @@ import (
"sync/atomic"
"time"
- "google.golang.org/grpc/xds/internal/clients"
- lrsclientinternal "google.golang.org/grpc/xds/internal/clients/lrsclient/internal"
+ "google.golang.org/grpc/internal/xds/clients"
+ lrsclientinternal "google.golang.org/grpc/internal/xds/clients/lrsclient/internal"
)
// A LoadStore aggregates loads for multiple clusters and services that are
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/lrsclient/logging.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/lrsclient/logging.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/lrsclient/logging.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/lrsclient/logging.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/lrsclient/lrs_stream.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/lrsclient/lrs_stream.go
similarity index 99%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/lrsclient/lrs_stream.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/lrsclient/lrs_stream.go
index bb275bdb468e..9a95983b0f69 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/lrsclient/lrs_stream.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/lrsclient/lrs_stream.go
@@ -27,7 +27,7 @@ import (
"google.golang.org/grpc/internal/backoff"
igrpclog "google.golang.org/grpc/internal/grpclog"
"google.golang.org/grpc/internal/pretty"
- "google.golang.org/grpc/xds/internal/clients"
+ "google.golang.org/grpc/internal/xds/clients"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/durationpb"
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/lrsclient/lrsclient.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/lrsclient/lrsclient.go
similarity index 94%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/lrsclient/lrsclient.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/lrsclient/lrsclient.go
index af163e22019c..3e4594957619 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/lrsclient/lrsclient.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/lrsclient/lrsclient.go
@@ -30,9 +30,9 @@ import (
"google.golang.org/grpc/grpclog"
igrpclog "google.golang.org/grpc/internal/grpclog"
- "google.golang.org/grpc/xds/internal/clients"
- clientsinternal "google.golang.org/grpc/xds/internal/clients/internal"
- "google.golang.org/grpc/xds/internal/clients/internal/backoff"
+ "google.golang.org/grpc/internal/xds/clients"
+ clientsinternal "google.golang.org/grpc/internal/xds/clients/internal"
+ "google.golang.org/grpc/internal/xds/clients/internal/backoff"
)
const (
@@ -61,10 +61,7 @@ type LRSClient struct {
// New returns a new LRS Client configured with the provided config.
func New(config Config) (*LRSClient, error) {
- switch {
- case config.Node.ID == "":
- return nil, errors.New("lrsclient: node ID in node is empty")
- case config.TransportBuilder == nil:
+ if config.TransportBuilder == nil {
return nil, errors.New("lrsclient: transport builder is nil")
}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/lrsclient/lrsconfig.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/lrsclient/lrsconfig.go
similarity index 95%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/lrsclient/lrsconfig.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/lrsclient/lrsconfig.go
index c4862ff76794..6dde1b46bf9d 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/lrsclient/lrsconfig.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/lrsclient/lrsconfig.go
@@ -19,7 +19,7 @@
package lrsclient
import (
- "google.golang.org/grpc/xds/internal/clients"
+ "google.golang.org/grpc/internal/xds/clients"
)
// Config is used to configure an LRS client. After one has been passed to the
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/transport_builder.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/transport_builder.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/transport_builder.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/transport_builder.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/ads_stream.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/ads_stream.go
similarity index 98%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/ads_stream.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/ads_stream.go
index 774f8ab24e48..83f8a5df03f1 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/ads_stream.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/ads_stream.go
@@ -27,11 +27,11 @@ import (
"google.golang.org/grpc/grpclog"
igrpclog "google.golang.org/grpc/internal/grpclog"
- "google.golang.org/grpc/xds/internal/clients"
- "google.golang.org/grpc/xds/internal/clients/internal/backoff"
- "google.golang.org/grpc/xds/internal/clients/internal/buffer"
- "google.golang.org/grpc/xds/internal/clients/internal/pretty"
- "google.golang.org/grpc/xds/internal/clients/xdsclient/internal/xdsresource"
+ "google.golang.org/grpc/internal/xds/clients"
+ "google.golang.org/grpc/internal/xds/clients/internal/backoff"
+ "google.golang.org/grpc/internal/xds/clients/internal/buffer"
+ "google.golang.org/grpc/internal/xds/clients/internal/pretty"
+ "google.golang.org/grpc/internal/xds/clients/xdsclient/internal/xdsresource"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
@@ -460,6 +460,7 @@ func (s *adsStreamImpl) sendMessageLocked(stream clients.Stream, names []string,
} else if s.logger.V(2) {
s.logger.Warningf("ADS request sent for type %q, resources: %v, version: %q, nonce: %q", url, names, version, nonce)
}
+
return nil
}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/authority.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/authority.go
similarity index 94%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/authority.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/authority.go
index 7a3a29691366..49a4480cf154 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/authority.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/authority.go
@@ -20,16 +20,17 @@ package xdsclient
import (
"context"
+ "errors"
"fmt"
"sync"
"sync/atomic"
"google.golang.org/grpc/grpclog"
igrpclog "google.golang.org/grpc/internal/grpclog"
- "google.golang.org/grpc/xds/internal/clients"
- "google.golang.org/grpc/xds/internal/clients/internal/syncutil"
- "google.golang.org/grpc/xds/internal/clients/xdsclient/internal/xdsresource"
- "google.golang.org/grpc/xds/internal/clients/xdsclient/metrics"
+ "google.golang.org/grpc/internal/xds/clients"
+ "google.golang.org/grpc/internal/xds/clients/internal/syncutil"
+ "google.golang.org/grpc/internal/xds/clients/xdsclient/internal/xdsresource"
+ "google.golang.org/grpc/internal/xds/clients/xdsclient/metrics"
"google.golang.org/protobuf/types/known/anypb"
"google.golang.org/protobuf/types/known/timestamppb"
@@ -330,7 +331,9 @@ func (a *authority) adsResourceUpdate(serverConfig *ServerConfig, rType Resource
//
// Only executed in the context of a serializer callback.
func (a *authority) handleADSResourceUpdate(serverConfig *ServerConfig, rType ResourceType, updates map[string]dataAndErrTuple, md xdsresource.UpdateMetadata, onDone func()) {
- a.handleRevertingToPrimaryOnUpdate(serverConfig)
+ if !a.handleRevertingToPrimaryOnUpdate(serverConfig) {
+ return
+ }
// We build a list of callback funcs to invoke, and invoke them at the end
// of this method instead of inline (when handling the update for a
@@ -548,12 +551,23 @@ func (a *authority) handleADSResourceDoesNotExist(rType ResourceType, resourceNa
// lower priority servers are closed and the active server is reverted to the
// highest priority server that sent the update.
//
+// The return value indicates whether subsequent processing of the resource
+// update should continue or not.
+//
// This method is only executed in the context of a serializer callback.
-func (a *authority) handleRevertingToPrimaryOnUpdate(serverConfig *ServerConfig) {
- if a.activeXDSChannel != nil && isServerConfigEqual(serverConfig, a.activeXDSChannel.serverConfig) {
+func (a *authority) handleRevertingToPrimaryOnUpdate(serverConfig *ServerConfig) bool {
+ if a.activeXDSChannel == nil {
+ // This can happen only when all watches on this authority have been
+ // removed, and the xdsChannels have been closed. This update should
+ // have been received prior to closing of the channel, and therefore
+ // must be ignored.
+ return false
+ }
+
+ if isServerConfigEqual(serverConfig, a.activeXDSChannel.serverConfig) {
// If the resource update is from the current active server, nothing
// needs to be done from fallback point of view.
- return
+ return true
}
if a.logger.V(2) {
@@ -561,10 +575,23 @@ func (a *authority) handleRevertingToPrimaryOnUpdate(serverConfig *ServerConfig)
}
// If the resource update is not from the current active server, it means
- // that we have received an update from a higher priority server and we need
- // to revert back to it. This method guarantees that when an update is
- // received from a server, all lower priority servers are closed.
+ // that we have received an update either from:
+ // - a server that has a higher priority than the current active server and
+ // therefore we need to revert back to it and close all lower priority
+ // servers, or,
+ // - a server that has a lower priority than the current active server. This
+ // can happen when the server close and the response race against each
+ // other. We can safely ignore this update, since we have already reverted
+ // to the higher priority server, and closed all lower priority servers.
serverIdx := a.serverIndexForConfig(serverConfig)
+ activeServerIdx := a.serverIndexForConfig(a.activeXDSChannel.serverConfig)
+ if activeServerIdx < serverIdx {
+ return false
+ }
+
+ // At this point, we are guaranteed that we have received a response from a
+ // higher priority server compared to the current active server. So, we
+ // revert to the higher priorty server and close all lower priority ones.
a.activeXDSChannel = a.xdsChannelConfigs[serverIdx]
// Close all lower priority channels.
@@ -602,6 +629,7 @@ func (a *authority) handleRevertingToPrimaryOnUpdate(serverConfig *ServerConfig)
}
cfg.channel = nil
}
+ return true
}
// watchResource registers a new watcher for the specified resource type and
@@ -890,3 +918,17 @@ func serviceStatusToProto(serviceStatus xdsresource.ServiceStatus) v3adminpb.Cli
return v3adminpb.ClientResourceStatus_UNKNOWN
}
}
+
+func (a *authority) resourceWatchStateForTesting(rType ResourceType, resourceName string) (state xdsresource.ResourceWatchState, err error) {
+ done := make(chan struct{})
+ a.xdsClientSerializer.ScheduleOr(func(context.Context) {
+ state, err = a.activeXDSChannel.channel.ads.adsResourceWatchStateForTesting(rType, resourceName)
+ close(done)
+ }, func() {
+ err = errors.New("failed to retrieve resource watch state because the xDS client is closed")
+ close(done)
+ })
+ <-done
+
+ return state, err
+}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/channel.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/channel.go
similarity index 97%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/channel.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/channel.go
index 2d424b811d04..e36e362201d6 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/channel.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/channel.go
@@ -26,11 +26,11 @@ import (
"google.golang.org/grpc/grpclog"
igrpclog "google.golang.org/grpc/internal/grpclog"
- "google.golang.org/grpc/xds/internal/clients"
- "google.golang.org/grpc/xds/internal/clients/internal"
- "google.golang.org/grpc/xds/internal/clients/internal/backoff"
- "google.golang.org/grpc/xds/internal/clients/internal/syncutil"
- "google.golang.org/grpc/xds/internal/clients/xdsclient/internal/xdsresource"
+ "google.golang.org/grpc/internal/xds/clients"
+ "google.golang.org/grpc/internal/xds/clients/internal"
+ "google.golang.org/grpc/internal/xds/clients/internal/backoff"
+ "google.golang.org/grpc/internal/xds/clients/internal/syncutil"
+ "google.golang.org/grpc/internal/xds/clients/xdsclient/internal/xdsresource"
)
const (
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/clientimpl_watchers.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/clientimpl_watchers.go
new file mode 100644
index 000000000000..68b29295ce28
--- /dev/null
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/clientimpl_watchers.go
@@ -0,0 +1,102 @@
+/*
+ *
+ * Copyright 2025 gRPC 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 xdsclient
+
+import (
+ "fmt"
+
+ "google.golang.org/grpc/internal/xds/clients/xdsclient/internal/xdsresource"
+)
+
+// wrappingWatcher is a wrapper around an xdsresource.ResourceWatcher that adds
+// the node ID to the error messages reported to the watcher.
+type wrappingWatcher struct {
+ ResourceWatcher
+ nodeID string
+}
+
+func (w *wrappingWatcher) AmbientError(err error, done func()) {
+ w.ResourceWatcher.AmbientError(fmt.Errorf("[xDS node id: %v]: %w", w.nodeID, err), done)
+}
+
+func (w *wrappingWatcher) ResourceError(err error, done func()) {
+ w.ResourceWatcher.ResourceError(fmt.Errorf("[xDS node id: %v]: %w", w.nodeID, err), done)
+}
+
+// WatchResource starts watching the specified resource.
+//
+// typeURL specifies the resource type implementation to use. The watch fails
+// if there is no resource type implementation for the given typeURL. See the
+// ResourceTypes field in the Config struct used to create the XDSClient.
+//
+// The returned function cancels the watch and prevents future calls to the
+// watcher.
+func (c *XDSClient) WatchResource(typeURL, resourceName string, watcher ResourceWatcher) (cancel func()) {
+ // Return early if the client is already closed.
+ if c.done.HasFired() {
+ logger.Warningf("Watch registered for type %q, but client is closed", typeURL)
+ return func() {}
+ }
+
+ watcher = &wrappingWatcher{
+ ResourceWatcher: watcher,
+ nodeID: c.config.Node.ID,
+ }
+
+ rType, ok := c.config.ResourceTypes[typeURL]
+ if !ok {
+ logger.Warningf("ResourceType implementation for resource type url %v is not found", rType.TypeURL)
+ watcher.ResourceError(fmt.Errorf("ResourceType implementation for resource type url %v is not found", rType.TypeURL), func() {})
+ return func() {}
+ }
+
+ n := xdsresource.ParseName(resourceName)
+ a := c.getAuthorityForResource(n)
+ if a == nil {
+ logger.Warningf("Watch registered for name %q of type %q, authority %q is not found", rType.TypeName, resourceName, n.Authority)
+ watcher.ResourceError(fmt.Errorf("authority %q not found in bootstrap config for resource %q", n.Authority, resourceName), func() {})
+ return func() {}
+ }
+ // The watchResource method on the authority is invoked with n.String()
+ // instead of resourceName because n.String() canonicalizes the given name.
+ // So, two resource names which don't differ in the query string, but only
+ // differ in the order of context params will result in the same resource
+ // being watched by the authority.
+ return a.watchResource(rType, n.String(), watcher)
+}
+
+// Gets the authority for the given resource name.
+//
+// See examples in this section of the gRFC:
+// https://github.com/grpc/proposal/blob/master/A47-xds-federation.md#bootstrap-config-changes
+func (c *XDSClient) getAuthorityForResource(name *xdsresource.Name) *authority {
+ // For new-style resource names, always lookup the authorities map. If the
+ // name does not specify an authority, we will end up looking for an entry
+ // in the map with the empty string as the key.
+ if name.Scheme == xdsresource.FederationScheme {
+ return c.authorities[name.Authority]
+ }
+
+ // For old-style resource names, we use the top-level authority if the name
+ // does not specify an authority.
+ if name.Authority == "" {
+ return c.topLevelAuthority
+ }
+ return c.authorities[name.Authority]
+}
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/internal/internal.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/internal/internal.go
new file mode 100644
index 000000000000..38d2473e5c6c
--- /dev/null
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/internal/internal.go
@@ -0,0 +1,32 @@
+/*
+ *
+ * Copyright 2025 gRPC 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 internal contains functionality internal to the xdsclient package.
+package internal
+
+import "time"
+
+var (
+ // StreamBackoff is the stream backoff for xDS client. It can be overridden
+ // by tests to change the default backoff strategy.
+ StreamBackoff func(int) time.Duration
+
+ // ResourceWatchStateForTesting gets the watch state for the resource
+ // identified by the given resource type and resource name. Returns a
+ // non-nil error if there is no such resource being watched.
+ ResourceWatchStateForTesting any // func(*xdsclient.XDSClient, xdsclient.ResourceType, string) error
+)
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/internal/xdsresource/ads_stream.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/internal/xdsresource/ads_stream.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/internal/xdsresource/ads_stream.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/internal/xdsresource/ads_stream.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/internal/xdsresource/errors.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/internal/xdsresource/errors.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/internal/xdsresource/errors.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/internal/xdsresource/errors.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/internal/xdsresource/name.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/internal/xdsresource/name.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/internal/xdsresource/name.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/internal/xdsresource/name.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/internal/xdsresource/type.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/internal/xdsresource/type.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/internal/xdsresource/type.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/internal/xdsresource/type.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/internal/xdsresource/version.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/internal/xdsresource/version.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/internal/xdsresource/version.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/internal/xdsresource/version.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/logging.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/logging.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/logging.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/logging.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/metrics/metrics.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/metrics/metrics.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/metrics/metrics.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/metrics/metrics.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/resource_type.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/resource_type.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/resource_type.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/resource_type.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/resource_watcher.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/resource_watcher.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/resource_watcher.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/resource_watcher.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/xdsclient.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/xdsclient.go
similarity index 92%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/xdsclient.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/xdsclient.go
index c9cd52a1e6c9..cc7d5c4e264d 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/xdsclient.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/xdsclient.go
@@ -39,13 +39,13 @@ import (
"time"
"google.golang.org/grpc/internal/grpclog"
- "google.golang.org/grpc/xds/internal/clients"
- clientsinternal "google.golang.org/grpc/xds/internal/clients/internal"
- "google.golang.org/grpc/xds/internal/clients/internal/backoff"
- "google.golang.org/grpc/xds/internal/clients/internal/syncutil"
- xdsclientinternal "google.golang.org/grpc/xds/internal/clients/xdsclient/internal"
- "google.golang.org/grpc/xds/internal/clients/xdsclient/internal/xdsresource"
- "google.golang.org/grpc/xds/internal/clients/xdsclient/metrics"
+ "google.golang.org/grpc/internal/xds/clients"
+ clientsinternal "google.golang.org/grpc/internal/xds/clients/internal"
+ "google.golang.org/grpc/internal/xds/clients/internal/backoff"
+ "google.golang.org/grpc/internal/xds/clients/internal/syncutil"
+ xdsclientinternal "google.golang.org/grpc/internal/xds/clients/xdsclient/internal"
+ "google.golang.org/grpc/internal/xds/clients/xdsclient/internal/xdsresource"
+ "google.golang.org/grpc/internal/xds/clients/xdsclient/metrics"
"google.golang.org/protobuf/proto"
v3statuspb "github.com/envoyproxy/go-control-plane/envoy/service/status/v3"
@@ -61,7 +61,6 @@ var (
)
func init() {
- xdsclientinternal.WatchExpiryTimeout = defaultWatchExpiryTimeout
xdsclientinternal.StreamBackoff = defaultExponentialBackoff
xdsclientinternal.ResourceWatchStateForTesting = resourceWatchStateForTesting
}
@@ -101,8 +100,6 @@ type XDSClient struct {
// New returns a new xDS Client configured with the provided config.
func New(config Config) (*XDSClient, error) {
switch {
- case config.Node.ID == "":
- return nil, errors.New("xdsclient: node ID is empty")
case config.ResourceTypes == nil:
return nil, errors.New("xdsclient: resource types map is nil")
case config.TransportBuilder == nil:
@@ -110,7 +107,9 @@ func New(config Config) (*XDSClient, error) {
case config.Authorities == nil && config.Servers == nil:
return nil, errors.New("xdsclient: no servers or authorities specified")
}
-
+ if config.WatchExpiryTimeout == 0 {
+ config.WatchExpiryTimeout = defaultWatchExpiryTimeout
+ }
client, err := newClient(&config, name)
if err != nil {
return nil, err
@@ -118,12 +117,6 @@ func New(config Config) (*XDSClient, error) {
return client, nil
}
-// SetWatchExpiryTimeoutForTesting override the default watch expiry timeout
-// with provided timeout value.
-func (c *XDSClient) SetWatchExpiryTimeoutForTesting(watchExpiryTimeout time.Duration) {
- c.watchExpiryTimeout = watchExpiryTimeout
-}
-
// newClient returns a new XDSClient with the given config.
func newClient(config *Config, target string) (*XDSClient, error) {
ctx, cancel := context.WithCancel(context.Background())
@@ -132,7 +125,7 @@ func newClient(config *Config, target string) (*XDSClient, error) {
done: syncutil.NewEvent(),
authorities: make(map[string]*authority),
config: config,
- watchExpiryTimeout: xdsclientinternal.WatchExpiryTimeout,
+ watchExpiryTimeout: config.WatchExpiryTimeout,
backoff: xdsclientinternal.StreamBackoff,
serializer: syncutil.NewCallbackSerializer(ctx),
serializerClose: cancel,
@@ -440,13 +433,11 @@ func (cs *channelState) adsResourceDoesNotExist(typ ResourceType, resourceName s
}
func resourceWatchStateForTesting(c *XDSClient, rType ResourceType, resourceName string) (xdsresource.ResourceWatchState, error) {
- c.channelsMu.Lock()
- defer c.channelsMu.Unlock()
-
- for _, state := range c.xdsActiveChannels {
- if st, err := state.channel.ads.adsResourceWatchStateForTesting(rType, resourceName); err == nil {
- return st, nil
- }
+ n := xdsresource.ParseName(resourceName)
+ a := c.getAuthorityForResource(n)
+ if a == nil {
+ return xdsresource.ResourceWatchState{}, fmt.Errorf("unable to find authority for resource name %q", resourceName)
}
- return xdsresource.ResourceWatchState{}, fmt.Errorf("unable to find watch state for resource type %q and name %q", rType.TypeName, resourceName)
+ return a.resourceWatchStateForTesting(rType, resourceName)
+
}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/xdsconfig.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/xdsconfig.go
similarity index 88%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/xdsconfig.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/xdsconfig.go
index a276309dff47..9d376e508c4f 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/xdsconfig.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clients/xdsclient/xdsconfig.go
@@ -19,7 +19,9 @@
package xdsclient
import (
- "google.golang.org/grpc/xds/internal/clients"
+ "time"
+
+ "google.golang.org/grpc/internal/xds/clients"
)
// Config is used to configure an xDS client. After one has been passed to the
@@ -60,6 +62,13 @@ type Config struct {
// MetricsReporter is used to report registered metrics. If unset, no
// metrics will be reported.
MetricsReporter clients.MetricsReporter
+
+ // WatchExpiryTimeout is the duration after which a resource watch expires
+ // if the requested resource is not received from the management server.
+ // Most users will not need to set this. If zero, a default value of 15
+ // seconds is used as specified here:
+ // envoyproxy.io/docs/envoy/latest/api-docs/xds_protocol#knowing-when-a-requested-resource-does-not-exist
+ WatchExpiryTimeout time.Duration
}
// ServerConfig contains configuration for an xDS management server.
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clusterspecifier/cluster_specifier.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clusterspecifier/cluster_specifier.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clusterspecifier/cluster_specifier.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clusterspecifier/cluster_specifier.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clusterspecifier/rls/rls.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clusterspecifier/rls/rls.go
similarity index 89%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/clusterspecifier/rls/rls.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/clusterspecifier/rls/rls.go
index 89837605c1d1..ce2c22537a12 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clusterspecifier/rls/rls.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/clusterspecifier/rls/rls.go
@@ -26,7 +26,7 @@ import (
"google.golang.org/grpc/balancer"
"google.golang.org/grpc/internal"
rlspb "google.golang.org/grpc/internal/proto/grpc_lookup_v1"
- "google.golang.org/grpc/xds/internal/clusterspecifier"
+ "google.golang.org/grpc/internal/xds/clusterspecifier"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
@@ -34,16 +34,6 @@ import (
func init() {
clusterspecifier.Register(rls{})
-
- // TODO: Remove these once the RLS env var is removed.
- internal.RegisterRLSClusterSpecifierPluginForTesting = func() {
- clusterspecifier.Register(rls{})
- }
- internal.UnregisterRLSClusterSpecifierPluginForTesting = func() {
- for _, typeURL := range rls.TypeURLs(rls{}) {
- clusterspecifier.UnregisterForTesting(typeURL)
- }
- }
}
type rls struct{}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/httpfilter/fault/fault.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/httpfilter/fault/fault.go
similarity index 99%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/httpfilter/fault/fault.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/httpfilter/fault/fault.go
index 0ffa9c827279..3acd4aec6aaa 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/httpfilter/fault/fault.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/httpfilter/fault/fault.go
@@ -31,9 +31,9 @@ import (
"google.golang.org/grpc/codes"
iresolver "google.golang.org/grpc/internal/resolver"
+ "google.golang.org/grpc/internal/xds/httpfilter"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
- "google.golang.org/grpc/xds/internal/httpfilter"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/httpfilter/httpfilter.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/httpfilter/httpfilter.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/httpfilter/httpfilter.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/httpfilter/httpfilter.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/httpfilter/rbac/rbac.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/httpfilter/rbac/rbac.go
similarity index 94%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/httpfilter/rbac/rbac.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/httpfilter/rbac/rbac.go
index bcda2ab05fc8..0155009034e4 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/httpfilter/rbac/rbac.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/httpfilter/rbac/rbac.go
@@ -25,10 +25,9 @@ import (
"fmt"
"strings"
- "google.golang.org/grpc/internal"
"google.golang.org/grpc/internal/resolver"
+ "google.golang.org/grpc/internal/xds/httpfilter"
"google.golang.org/grpc/internal/xds/rbac"
- "google.golang.org/grpc/xds/internal/httpfilter"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
@@ -38,16 +37,6 @@ import (
func init() {
httpfilter.Register(builder{})
-
- // TODO: Remove these once the RBAC env var is removed.
- internal.RegisterRBACHTTPFilterForTesting = func() {
- httpfilter.Register(builder{})
- }
- internal.UnregisterRBACHTTPFilterForTesting = func() {
- for _, typeURL := range builder.TypeURLs(builder{}) {
- httpfilter.UnregisterForTesting(typeURL)
- }
- }
}
type builder struct {
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/httpfilter/router/router.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/httpfilter/router/router.go
similarity index 98%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/httpfilter/router/router.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/httpfilter/router/router.go
index a781523d371e..d3a498d67706 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/httpfilter/router/router.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/httpfilter/router/router.go
@@ -23,7 +23,7 @@ import (
"fmt"
iresolver "google.golang.org/grpc/internal/resolver"
- "google.golang.org/grpc/xds/internal/httpfilter"
+ "google.golang.org/grpc/internal/xds/httpfilter"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/resolver/internal/internal.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/resolver/internal/internal.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/resolver/internal/internal.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/resolver/internal/internal.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/resolver/logging.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/resolver/logging.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/resolver/logging.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/resolver/logging.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/resolver/serviceconfig.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/resolver/serviceconfig.go
similarity index 98%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/resolver/serviceconfig.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/resolver/serviceconfig.go
index 40f038b8a64e..2b4e5a05d892 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/resolver/serviceconfig.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/resolver/serviceconfig.go
@@ -35,11 +35,11 @@ import (
iringhash "google.golang.org/grpc/internal/ringhash"
"google.golang.org/grpc/internal/serviceconfig"
"google.golang.org/grpc/internal/wrr"
+ "google.golang.org/grpc/internal/xds/balancer/clustermanager"
+ "google.golang.org/grpc/internal/xds/httpfilter"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
- "google.golang.org/grpc/xds/internal/balancer/clustermanager"
- "google.golang.org/grpc/xds/internal/httpfilter"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource"
)
const (
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/resolver/watch_service.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/resolver/watch_service.go
similarity index 98%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/resolver/watch_service.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/resolver/watch_service.go
index e8d52d0e0730..44b885c44055 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/resolver/watch_service.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/resolver/watch_service.go
@@ -21,7 +21,7 @@ package resolver
import (
"context"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource"
)
type listenerWatcher struct {
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/resolver/xds_resolver.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/resolver/xds_resolver.go
similarity index 99%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/resolver/xds_resolver.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/resolver/xds_resolver.go
index a66719d0685f..70291f8ce9bc 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/resolver/xds_resolver.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/resolver/xds_resolver.go
@@ -33,10 +33,10 @@ import (
iresolver "google.golang.org/grpc/internal/resolver"
"google.golang.org/grpc/internal/wrr"
"google.golang.org/grpc/internal/xds/bootstrap"
+ rinternal "google.golang.org/grpc/internal/xds/resolver/internal"
+ "google.golang.org/grpc/internal/xds/xdsclient"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource"
"google.golang.org/grpc/resolver"
- rinternal "google.golang.org/grpc/xds/internal/resolver/internal"
- "google.golang.org/grpc/xds/internal/xdsclient"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource"
)
// Scheme is the xDS resolver's scheme.
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/server/conn_wrapper.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/server/conn_wrapper.go
similarity index 99%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/server/conn_wrapper.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/server/conn_wrapper.go
index 92d07e7fb6d1..840da7ca68fd 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/server/conn_wrapper.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/server/conn_wrapper.go
@@ -28,7 +28,7 @@ import (
"google.golang.org/grpc/credentials/tls/certprovider"
xdsinternal "google.golang.org/grpc/internal/credentials/xds"
"google.golang.org/grpc/internal/transport"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource"
)
// connWrapper is a thin wrapper around a net.Conn returned by Accept(). It
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/server/listener_wrapper.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/server/listener_wrapper.go
similarity index 99%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/server/listener_wrapper.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/server/listener_wrapper.go
index 2c32ace8ab05..1f7da61175e6 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/server/listener_wrapper.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/server/listener_wrapper.go
@@ -33,7 +33,7 @@ import (
internalgrpclog "google.golang.org/grpc/internal/grpclog"
"google.golang.org/grpc/internal/grpcsync"
"google.golang.org/grpc/internal/xds/bootstrap"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource"
)
var (
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/server/rds_handler.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/server/rds_handler.go
similarity index 98%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/server/rds_handler.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/server/rds_handler.go
index 4b8eb22de8db..bf78c37c8292 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/server/rds_handler.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/server/rds_handler.go
@@ -22,7 +22,7 @@ import (
"sync"
igrpclog "google.golang.org/grpc/internal/grpclog"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource"
)
// rdsHandler handles any RDS queries that need to be started for a given server
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/xds/xds.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xds.go
index 024c388b7aa7..b9a4ec90a5ed 100644
--- a/hack/tools/vendor/google.golang.org/grpc/internal/xds/xds.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xds.go
@@ -14,12 +14,17 @@
* limitations under the License.
*/
-// Package xds contains methods to Get/Set handshake cluster names. It is separated
-// out from the top level /internal package to avoid circular dependencies.
+// Package xds contains functions, structs, and utilities for working with
+// handshake cluster names, as well as shared components used by xds balancers
+// and resolvers. It is separated from the top-level /internal package to
+// avoid circular dependencies.
package xds
import (
+ "fmt"
+
"google.golang.org/grpc/attributes"
+ "google.golang.org/grpc/internal/xds/clients"
"google.golang.org/grpc/resolver"
)
@@ -40,3 +45,60 @@ func GetXDSHandshakeClusterName(attr *attributes.Attributes) (string, bool) {
name, ok := v.(string)
return name, ok
}
+
+// LocalityString generates a string representation of clients.Locality in the
+// format specified in gRFC A76.
+func LocalityString(l clients.Locality) string {
+ return fmt.Sprintf("{region=%q, zone=%q, sub_zone=%q}", l.Region, l.Zone, l.SubZone)
+}
+
+// IsLocalityEqual allows the values to be compared by Attributes.Equal.
+func IsLocalityEqual(l clients.Locality, o any) bool {
+ ol, ok := o.(clients.Locality)
+ if !ok {
+ return false
+ }
+ return l.Region == ol.Region && l.Zone == ol.Zone && l.SubZone == ol.SubZone
+}
+
+// LocalityFromString converts a string representation of clients.locality as
+// specified in gRFC A76, into a LocalityID struct.
+func LocalityFromString(s string) (ret clients.Locality, _ error) {
+ _, err := fmt.Sscanf(s, "{region=%q, zone=%q, sub_zone=%q}", &ret.Region, &ret.Zone, &ret.SubZone)
+ if err != nil {
+ return clients.Locality{}, fmt.Errorf("%s is not a well formatted locality ID, error: %v", s, err)
+ }
+ return ret, nil
+}
+
+type localityKeyType string
+
+const localityKey = localityKeyType("grpc.xds.internal.address.locality")
+
+// GetLocalityID returns the locality ID of addr.
+func GetLocalityID(addr resolver.Address) clients.Locality {
+ path, _ := addr.BalancerAttributes.Value(localityKey).(clients.Locality)
+ return path
+}
+
+// SetLocalityID sets locality ID in addr to l.
+func SetLocalityID(addr resolver.Address, l clients.Locality) resolver.Address {
+ addr.BalancerAttributes = addr.BalancerAttributes.WithValue(localityKey, l)
+ return addr
+}
+
+// SetLocalityIDInEndpoint sets locality ID in endpoint to l.
+func SetLocalityIDInEndpoint(endpoint resolver.Endpoint, l clients.Locality) resolver.Endpoint {
+ endpoint.Attributes = endpoint.Attributes.WithValue(localityKey, l)
+ return endpoint
+}
+
+// ResourceTypeMapForTesting maps TypeUrl to corresponding ResourceType.
+var ResourceTypeMapForTesting map[string]any
+
+// UnknownCSMLabels are TelemetryLabels emitted from CDS if CSM Telemetry Label
+// data is not present in the CDS Resource.
+var UnknownCSMLabels = map[string]string{
+ "csm.service_name": "unknown",
+ "csm.service_namespace_name": "unknown",
+}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/attributes.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/attributes.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/attributes.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/attributes.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/client.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/client.go
new file mode 100644
index 000000000000..514273164402
--- /dev/null
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/client.go
@@ -0,0 +1,61 @@
+/*
+ *
+ * Copyright 2019 gRPC 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 xdsclient implements a full fledged gRPC client for the xDS API used
+// by the xds resolver and balancer implementations.
+package xdsclient
+
+import (
+ "context"
+
+ v3statuspb "github.com/envoyproxy/go-control-plane/envoy/service/status/v3"
+ "google.golang.org/grpc/internal/xds/bootstrap"
+ "google.golang.org/grpc/internal/xds/clients/lrsclient"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource"
+)
+
+// XDSClient is a full fledged gRPC client which queries a set of discovery APIs
+// (collectively termed as xDS) on a remote management server, to discover
+// various dynamic resources.
+type XDSClient interface {
+ // WatchResource uses xDS to discover the resource associated with the
+ // provided resource name. The resource type implementation determines how
+ // xDS responses are are deserialized and validated, as received from the
+ // xDS management server. Upon receipt of a response from the management
+ // server, an appropriate callback on the watcher is invoked.
+ //
+ // Most callers will not have a need to use this API directly. They will
+ // instead use a resource-type-specific wrapper API provided by the relevant
+ // resource type implementation.
+ //
+ //
+ // During a race (e.g. an xDS response is received while the user is calling
+ // cancel()), there's a small window where the callback can be called after
+ // the watcher is canceled. Callers need to handle this case.
+ WatchResource(rType xdsresource.Type, resourceName string, watcher xdsresource.ResourceWatcher) (cancel func())
+
+ ReportLoad(*bootstrap.ServerConfig) (*lrsclient.LoadStore, func(context.Context))
+
+ BootstrapConfig() *bootstrap.Config
+}
+
+// DumpResources returns the status and contents of all xDS resources. It uses
+// xDS clients from the default pool.
+func DumpResources() *v3statuspb.ClientStatusResponse {
+ return DefaultPool.DumpResources()
+}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/clientimpl.go
similarity index 86%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/clientimpl.go
index 967182740719..b1f797993fd7 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/clientimpl.go
@@ -29,12 +29,12 @@ import (
"google.golang.org/grpc/internal/grpclog"
"google.golang.org/grpc/internal/xds/bootstrap"
+ "google.golang.org/grpc/internal/xds/clients"
+ "google.golang.org/grpc/internal/xds/clients/grpctransport"
+ "google.golang.org/grpc/internal/xds/clients/lrsclient"
+ "google.golang.org/grpc/internal/xds/clients/xdsclient"
+ "google.golang.org/grpc/internal/xds/clients/xdsclient/metrics"
xdsbootstrap "google.golang.org/grpc/xds/bootstrap"
- "google.golang.org/grpc/xds/internal/clients"
- "google.golang.org/grpc/xds/internal/clients/grpctransport"
- "google.golang.org/grpc/xds/internal/clients/lrsclient"
- "google.golang.org/grpc/xds/internal/clients/xdsclient"
- "google.golang.org/grpc/xds/internal/clients/xdsclient/metrics"
)
const (
@@ -57,21 +57,21 @@ var (
xdsClientResourceUpdatesValidMetric = estats.RegisterInt64Count(estats.MetricDescriptor{
Name: "grpc.xds_client.resource_updates_valid",
Description: "A counter of resources received that were considered valid. The counter will be incremented even for resources that have not changed.",
- Unit: "resource",
+ Unit: "{resource}",
Labels: []string{"grpc.target", "grpc.xds.server", "grpc.xds.resource_type"},
Default: false,
})
xdsClientResourceUpdatesInvalidMetric = estats.RegisterInt64Count(estats.MetricDescriptor{
Name: "grpc.xds_client.resource_updates_invalid",
Description: "A counter of resources received that were considered invalid.",
- Unit: "resource",
+ Unit: "{resource}",
Labels: []string{"grpc.target", "grpc.xds.server", "grpc.xds.resource_type"},
Default: false,
})
xdsClientServerFailureMetric = estats.RegisterInt64Count(estats.MetricDescriptor{
Name: "grpc.xds_client.server_failure",
Description: "A counter of xDS servers going from healthy to unhealthy. A server goes unhealthy when we have a connectivity failure or when the ADS stream fails without seeing a response message, as per gRFC A57.",
- Unit: "failure",
+ Unit: "{failure}",
Labels: []string{"grpc.target", "grpc.xds.server"},
Default: false,
})
@@ -120,8 +120,8 @@ func (mr *metricsReporter) ReportMetric(metric any) {
}
}
-func newClientImpl(config *bootstrap.Config, metricsRecorder estats.MetricsRecorder, target string) (*clientImpl, error) {
- gConfig, err := buildXDSClientConfig(config, metricsRecorder, target)
+func newClientImpl(config *bootstrap.Config, metricsRecorder estats.MetricsRecorder, target string, watchExpiryTimeout time.Duration) (*clientImpl, error) {
+ gConfig, err := buildXDSClientConfig(config, metricsRecorder, target, watchExpiryTimeout)
if err != nil {
return nil, err
}
@@ -129,7 +129,21 @@ func newClientImpl(config *bootstrap.Config, metricsRecorder estats.MetricsRecor
if err != nil {
return nil, err
}
- c := &clientImpl{XDSClient: client, xdsClientConfig: gConfig, bootstrapConfig: config, target: target, refCount: 1}
+ lrsC, err := lrsclient.New(lrsclient.Config{
+ Node: gConfig.Node,
+ TransportBuilder: gConfig.TransportBuilder,
+ })
+ if err != nil {
+ return nil, err
+ }
+ c := &clientImpl{
+ XDSClient: client,
+ xdsClientConfig: gConfig,
+ bootstrapConfig: config,
+ target: target,
+ refCount: 1,
+ lrsClient: lrsC,
+ }
c.logger = prefixLogger(c)
return c, nil
}
@@ -149,7 +163,7 @@ func (c *clientImpl) decrRef() int32 {
}
// buildXDSClientConfig builds the xdsclient.Config from the bootstrap.Config.
-func buildXDSClientConfig(config *bootstrap.Config, metricsRecorder estats.MetricsRecorder, target string) (xdsclient.Config, error) {
+func buildXDSClientConfig(config *bootstrap.Config, metricsRecorder estats.MetricsRecorder, target string, watchExpiryTimeout time.Duration) (xdsclient.Config, error) {
grpcTransportConfigs := make(map[string]grpctransport.Config)
gServerCfgMap := make(map[xdsclient.ServerConfig]*bootstrap.ServerConfig)
@@ -204,12 +218,13 @@ func buildXDSClientConfig(config *bootstrap.Config, metricsRecorder estats.Metri
}
return xdsclient.Config{
- Authorities: gAuthorities,
- Servers: gServerCfgs,
- Node: gNode,
- TransportBuilder: grpctransport.NewBuilder(grpcTransportConfigs),
- ResourceTypes: supportedResourceTypes(config, gServerCfgMap),
- MetricsReporter: &metricsReporter{recorder: metricsRecorder, target: target},
+ Authorities: gAuthorities,
+ Servers: gServerCfgs,
+ Node: gNode,
+ TransportBuilder: grpctransport.NewBuilder(grpcTransportConfigs),
+ ResourceTypes: supportedResourceTypes(config, gServerCfgMap),
+ MetricsReporter: &metricsReporter{recorder: metricsRecorder, target: target},
+ WatchExpiryTimeout: watchExpiryTimeout,
}, nil
}
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/clientimpl_loadreport.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/clientimpl_loadreport.go
new file mode 100644
index 000000000000..ffd0c90b8f54
--- /dev/null
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/clientimpl_loadreport.go
@@ -0,0 +1,49 @@
+/*
+ *
+ * Copyright 2019 gRPC 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 xdsclient
+
+import (
+ "context"
+ "sync"
+
+ "google.golang.org/grpc/internal/xds/bootstrap"
+ "google.golang.org/grpc/internal/xds/clients"
+ "google.golang.org/grpc/internal/xds/clients/grpctransport"
+ "google.golang.org/grpc/internal/xds/clients/lrsclient"
+)
+
+// ReportLoad starts a load reporting stream to the given server. All load
+// reports to the same server share the LRS stream.
+//
+// It returns a lrsclient.LoadStore for the user to report loads.
+func (c *clientImpl) ReportLoad(server *bootstrap.ServerConfig) (*lrsclient.LoadStore, func(context.Context)) {
+ load, err := c.lrsClient.ReportLoad(clients.ServerIdentifier{
+ ServerURI: server.ServerURI(),
+ Extensions: grpctransport.ServerIdentifierExtension{
+ ConfigName: server.SelectedCreds().Type,
+ },
+ })
+ if err != nil {
+ c.logger.Warningf("Failed to create a load store to the management server to report load: %v", server, err)
+ return nil, func(context.Context) {}
+ }
+ var loadStop sync.Once
+ return load, func(ctx context.Context) {
+ loadStop.Do(func() { load.Stop(ctx) })
+ }
+}
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/clientimpl_watchers.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/clientimpl_watchers.go
new file mode 100644
index 000000000000..398de1ed73b6
--- /dev/null
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/clientimpl_watchers.go
@@ -0,0 +1,31 @@
+/*
+ *
+ * Copyright 2020 gRPC 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 xdsclient
+
+import (
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource"
+)
+
+// WatchResource uses xDS to discover the resource associated with the provided
+// resource name. The resource type implementation determines how xDS responses
+// are are deserialized and validated, as received from the xDS management
+// server. Upon receipt of a response from the management server, an
+// appropriate callback on the watcher is invoked.
+func (c *clientImpl) WatchResource(rType xdsresource.Type, resourceName string, watcher xdsresource.ResourceWatcher) (cancel func()) {
+ return c.XDSClient.WatchResource(rType.TypeURL(), resourceName, xdsresource.GenericResourceWatcher(watcher))
+}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/logging.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/logging.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/logging.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/logging.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/pool.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/pool.go
new file mode 100644
index 000000000000..eb0197e09a7f
--- /dev/null
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/pool.go
@@ -0,0 +1,290 @@
+/*
+ *
+ * Copyright 2024 gRPC 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 xdsclient
+
+import (
+ "fmt"
+ "sync"
+ "time"
+
+ v3statuspb "github.com/envoyproxy/go-control-plane/envoy/service/status/v3"
+ estats "google.golang.org/grpc/experimental/stats"
+ "google.golang.org/grpc/internal/envconfig"
+ istats "google.golang.org/grpc/internal/stats"
+ "google.golang.org/grpc/internal/xds/bootstrap"
+ "google.golang.org/protobuf/proto"
+)
+
+var (
+ // DefaultPool is the default pool for xDS clients. It is created at init
+ // time and reads bootstrap configuration from env vars to create the xDS
+ // client.
+ DefaultPool = &Pool{
+ clients: make(map[string]*clientImpl),
+ getConfiguration: sync.OnceValues(bootstrap.GetConfiguration),
+ }
+)
+
+// Pool represents a pool of xDS clients that share the same bootstrap
+// configuration.
+type Pool struct {
+ // Note that mu should ideally only have to guard clients. But here, we need
+ // it to guard config as well since SetFallbackBootstrapConfig writes to
+ // config.
+ mu sync.Mutex
+ clients map[string]*clientImpl
+ fallbackConfig *bootstrap.Config
+ // getConfiguration is a sync.OnceValues that attempts to read the bootstrap
+ // configuration from environment variables once.
+ getConfiguration func() (*bootstrap.Config, error)
+}
+
+// OptionsForTesting contains options to configure xDS client creation for
+// testing purposes only.
+type OptionsForTesting struct {
+ // Name is a unique name for this xDS client.
+ Name string
+
+ // WatchExpiryTimeout is the timeout for xDS resource watch expiry. If
+ // unspecified, uses the default value used in non-test code.
+ WatchExpiryTimeout time.Duration
+
+ // StreamBackoffAfterFailure is the backoff function used to determine the
+ // backoff duration after stream failures.
+ // If unspecified, uses the default value used in non-test code.
+ StreamBackoffAfterFailure func(int) time.Duration
+
+ // MetricsRecorder is the metrics recorder the xDS Client will use. If
+ // unspecified, uses a no-op MetricsRecorder.
+ MetricsRecorder estats.MetricsRecorder
+}
+
+// NewPool creates a new xDS client pool with the given bootstrap config.
+//
+// If a nil bootstrap config is passed and SetFallbackBootstrapConfig is not
+// called before a call to NewClient, the latter will fail. i.e. if there is an
+// attempt to create an xDS client from the pool without specifying bootstrap
+// configuration (either at pool creation time or by setting the fallback
+// bootstrap configuration), xDS client creation will fail.
+func NewPool(config *bootstrap.Config) *Pool {
+ return &Pool{
+ clients: make(map[string]*clientImpl),
+ getConfiguration: func() (*bootstrap.Config, error) {
+ return config, nil
+ },
+ }
+}
+
+// NewClient returns an xDS client with the given name from the pool. If the
+// client doesn't already exist, it creates a new xDS client and adds it to the
+// pool.
+//
+// The second return value represents a close function which the caller is
+// expected to invoke once they are done using the client. It is safe for the
+// caller to invoke this close function multiple times.
+func (p *Pool) NewClient(name string, metricsRecorder estats.MetricsRecorder) (XDSClient, func(), error) {
+ return p.newRefCounted(name, metricsRecorder, defaultWatchExpiryTimeout)
+}
+
+// NewClientForTesting returns an xDS client configured with the provided
+// options from the pool. If the client doesn't already exist, it creates a new
+// xDS client and adds it to the pool.
+//
+// The second return value represents a close function which the caller is
+// expected to invoke once they are done using the client. It is safe for the
+// caller to invoke this close function multiple times.
+//
+// # Testing Only
+//
+// This function should ONLY be used for testing purposes.
+func (p *Pool) NewClientForTesting(opts OptionsForTesting) (XDSClient, func(), error) {
+ if opts.Name == "" {
+ return nil, nil, fmt.Errorf("xds: opts.Name field must be non-empty")
+ }
+ if opts.WatchExpiryTimeout == 0 {
+ opts.WatchExpiryTimeout = defaultWatchExpiryTimeout
+ }
+ if opts.StreamBackoffAfterFailure == nil {
+ opts.StreamBackoffAfterFailure = defaultExponentialBackoff
+ }
+ if opts.MetricsRecorder == nil {
+ opts.MetricsRecorder = istats.NewMetricsRecorderList(nil)
+ }
+ c, cancel, err := p.newRefCounted(opts.Name, opts.MetricsRecorder, opts.WatchExpiryTimeout)
+ if err != nil {
+ return nil, nil, err
+ }
+ return c, cancel, nil
+}
+
+// GetClientForTesting returns an xDS client created earlier using the given
+// name from the pool. If the client with the given name doesn't already exist,
+// it returns an error.
+//
+// The second return value represents a close function which the caller is
+// expected to invoke once they are done using the client. It is safe for the
+// caller to invoke this close function multiple times.
+//
+// # Testing Only
+//
+// This function should ONLY be used for testing purposes.
+func (p *Pool) GetClientForTesting(name string) (XDSClient, func(), error) {
+ p.mu.Lock()
+ defer p.mu.Unlock()
+
+ c, ok := p.clients[name]
+ if !ok {
+ return nil, nil, fmt.Errorf("xds:: xDS client with name %q not found", name)
+ }
+ c.incrRef()
+ return c, sync.OnceFunc(func() { p.clientRefCountedClose(name) }), nil
+}
+
+// SetFallbackBootstrapConfig is used to specify a bootstrap configuration
+// that will be used as a fallback when the bootstrap environment variables
+// are not defined.
+func (p *Pool) SetFallbackBootstrapConfig(config *bootstrap.Config) {
+ p.mu.Lock()
+ defer p.mu.Unlock()
+ p.fallbackConfig = config
+}
+
+// DumpResources returns the status and contents of all xDS resources.
+func (p *Pool) DumpResources() *v3statuspb.ClientStatusResponse {
+ p.mu.Lock()
+ defer p.mu.Unlock()
+
+ resp := &v3statuspb.ClientStatusResponse{}
+ for key, client := range p.clients {
+ b, err := client.DumpResources()
+ if err != nil {
+ return nil
+ }
+ r := &v3statuspb.ClientStatusResponse{}
+ if err := proto.Unmarshal(b, r); err != nil {
+ return nil
+ }
+ cfg := r.Config[0]
+ cfg.ClientScope = key
+ resp.Config = append(resp.Config, cfg)
+ }
+ return resp
+}
+
+// BootstrapConfigForTesting returns the bootstrap configuration used by the
+// pool. The caller should not mutate the returned config.
+//
+// To be used only for testing purposes.
+func (p *Pool) BootstrapConfigForTesting() *bootstrap.Config {
+ p.mu.Lock()
+ defer p.mu.Unlock()
+ cfg, _ := p.getConfiguration()
+ if cfg != nil {
+ return cfg
+ }
+ return p.fallbackConfig
+}
+
+// UnsetBootstrapConfigForTesting unsets the bootstrap configuration used by
+// the pool.
+//
+// To be used only for testing purposes.
+func (p *Pool) UnsetBootstrapConfigForTesting() {
+ p.mu.Lock()
+ defer p.mu.Unlock()
+ p.fallbackConfig = nil
+ p.getConfiguration = sync.OnceValues(bootstrap.GetConfiguration)
+}
+
+func (p *Pool) clientRefCountedClose(name string) {
+ p.mu.Lock()
+ client, ok := p.clients[name]
+ if !ok {
+ logger.Errorf("Attempt to close a non-existent xDS client with name %s", name)
+ p.mu.Unlock()
+ return
+ }
+ if client.decrRef() != 0 {
+ p.mu.Unlock()
+ return
+ }
+ delete(p.clients, name)
+
+ for _, s := range client.bootstrapConfig.XDSServers() {
+ for _, f := range s.Cleanups() {
+ f()
+ }
+ }
+ for _, a := range client.bootstrapConfig.Authorities() {
+ for _, s := range a.XDSServers {
+ for _, f := range s.Cleanups() {
+ f()
+ }
+ }
+ }
+ p.mu.Unlock()
+
+ // This attempts to close the transport to the management server and could
+ // theoretically call back into the xdsclient package again and deadlock.
+ // Hence, this needs to be called without holding the lock.
+ client.Close()
+
+ xdsClientImplCloseHook(name)
+}
+
+// newRefCounted creates a new reference counted xDS client implementation for
+// name, if one does not exist already. If an xDS client for the given name
+// exists, it gets a reference to it and returns it.
+func (p *Pool) newRefCounted(name string, metricsRecorder estats.MetricsRecorder, watchExpiryTimeout time.Duration) (*clientImpl, func(), error) {
+ p.mu.Lock()
+ defer p.mu.Unlock()
+
+ config, err := p.getConfiguration()
+ if err != nil {
+ return nil, nil, fmt.Errorf("xds: failed to read xDS bootstrap config from env vars: %v", err)
+ }
+
+ if config == nil {
+ // If the environment variables are not set, then fallback bootstrap
+ // configuration should be set before attempting to create an xDS client,
+ // else xDS client creation will fail.
+ config = p.fallbackConfig
+ }
+ if config == nil {
+ return nil, nil, fmt.Errorf("failed to read xDS bootstrap config from env vars: bootstrap environment variables (%q or %q) not defined and fallback config not set", envconfig.XDSBootstrapFileNameEnv, envconfig.XDSBootstrapFileContentEnv)
+ }
+
+ if c := p.clients[name]; c != nil {
+ c.incrRef()
+ return c, sync.OnceFunc(func() { p.clientRefCountedClose(name) }), nil
+ }
+
+ c, err := newClientImpl(config, metricsRecorder, name, watchExpiryTimeout)
+ if err != nil {
+ return nil, nil, err
+ }
+ if logger.V(2) {
+ c.logger.Infof("Created client with name %q and bootstrap configuration:\n %s", name, config)
+ }
+ p.clients[name] = c
+ xdsClientImplCreateHook(name)
+
+ logger.Infof("xDS node ID: %s", config.Node().GetId())
+ return c, sync.OnceFunc(func() { p.clientRefCountedClose(name) }), nil
+}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/requests_counter.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/requests_counter.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/requests_counter.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/requests_counter.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/resource_types.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/resource_types.go
similarity index 91%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/resource_types.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/resource_types.go
index 2f76c83c8445..88451ab8257e 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/resource_types.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/resource_types.go
@@ -19,9 +19,9 @@ package xdsclient
import (
"google.golang.org/grpc/internal/xds/bootstrap"
- "google.golang.org/grpc/xds/internal/clients/xdsclient"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource/version"
+ "google.golang.org/grpc/internal/xds/clients/xdsclient"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource/version"
)
func supportedResourceTypes(config *bootstrap.Config, gServerCfgMap map[xdsclient.ServerConfig]*bootstrap.ServerConfig) map[string]xdsclient.ResourceType {
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdslbregistry/converter/converter.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdslbregistry/converter/converter.go
similarity index 98%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdslbregistry/converter/converter.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdslbregistry/converter/converter.go
index 959c6588b000..d38b9db82431 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdslbregistry/converter/converter.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdslbregistry/converter/converter.go
@@ -35,8 +35,8 @@ import (
"google.golang.org/grpc/balancer/weightedroundrobin"
iringhash "google.golang.org/grpc/internal/ringhash"
internalserviceconfig "google.golang.org/grpc/internal/serviceconfig"
- "google.golang.org/grpc/xds/internal/balancer/wrrlocality"
- "google.golang.org/grpc/xds/internal/xdsclient/xdslbregistry"
+ "google.golang.org/grpc/internal/xds/balancer/wrrlocality"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdslbregistry"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/structpb"
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdslbregistry/xdslbregistry.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdslbregistry/xdslbregistry.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdslbregistry/xdslbregistry.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdslbregistry/xdslbregistry.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/cluster_resource_type.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/cluster_resource_type.go
similarity index 97%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/cluster_resource_type.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/cluster_resource_type.go
index de6335081458..2a6a08f90647 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/cluster_resource_type.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/cluster_resource_type.go
@@ -20,8 +20,8 @@ package xdsresource
import (
"google.golang.org/grpc/internal/pretty"
"google.golang.org/grpc/internal/xds/bootstrap"
- xdsclient "google.golang.org/grpc/xds/internal/clients/xdsclient"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource/version"
+ xdsclient "google.golang.org/grpc/internal/xds/clients/xdsclient"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource/version"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
)
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/endpoints_resource_type.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/endpoints_resource_type.go
similarity index 97%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/endpoints_resource_type.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/endpoints_resource_type.go
index dd8a3b38c7f6..7ca45ec6ad0c 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/endpoints_resource_type.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/endpoints_resource_type.go
@@ -19,8 +19,8 @@ package xdsresource
import (
"google.golang.org/grpc/internal/pretty"
- xdsclient "google.golang.org/grpc/xds/internal/clients/xdsclient"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource/version"
+ xdsclient "google.golang.org/grpc/internal/xds/clients/xdsclient"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource/version"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
)
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/errors.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/errors.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/errors.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/errors.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/filter_chain.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/filter_chain.go
similarity index 99%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/filter_chain.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/filter_chain.go
index 3945199133ec..76ace1090d68 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/filter_chain.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/filter_chain.go
@@ -25,9 +25,9 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/internal/resolver"
+ "google.golang.org/grpc/internal/xds/httpfilter"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource/version"
"google.golang.org/grpc/status"
- "google.golang.org/grpc/xds/internal/httpfilter"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource/version"
"google.golang.org/protobuf/proto"
v3listenerpb "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3"
@@ -542,8 +542,8 @@ func (fcm *FilterChainManager) filterChainFromProto(fc *v3listenerpb.FilterChain
return nil, fmt.Errorf("transport_socket field has unexpected name: %s", name)
}
tc := ts.GetTypedConfig()
- if tc == nil || tc.TypeUrl != version.V3DownstreamTLSContextURL {
- return nil, fmt.Errorf("transport_socket field has unexpected typeURL: %s", tc.TypeUrl)
+ if typeURL := tc.GetTypeUrl(); typeURL != version.V3DownstreamTLSContextURL {
+ return nil, fmt.Errorf("transport_socket missing typed_config or wrong type_url: %q", typeURL)
}
downstreamCtx := &v3tlspb.DownstreamTlsContext{}
if err := proto.Unmarshal(tc.GetValue(), downstreamCtx); err != nil {
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/listener_resource_type.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/listener_resource_type.go
similarity index 98%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/listener_resource_type.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/listener_resource_type.go
index 29ff88704553..100a06f97b67 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/listener_resource_type.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/listener_resource_type.go
@@ -22,8 +22,8 @@ import (
"google.golang.org/grpc/internal/pretty"
"google.golang.org/grpc/internal/xds/bootstrap"
- xdsclient "google.golang.org/grpc/xds/internal/clients/xdsclient"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource/version"
+ xdsclient "google.golang.org/grpc/internal/xds/clients/xdsclient"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource/version"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
)
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/logging.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/logging.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/logging.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/logging.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/matcher.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/matcher.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/matcher.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/matcher.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/matcher_path.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/matcher_path.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/matcher_path.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/matcher_path.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/metadata.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/metadata.go
new file mode 100644
index 000000000000..b56c309d6f27
--- /dev/null
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/metadata.go
@@ -0,0 +1,93 @@
+/*
+ *
+ * Copyright 2025 gRPC 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 xdsresource
+
+import (
+ "fmt"
+ "net/netip"
+
+ v3corepb "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+func init() {
+ registerMetadataConverter("type.googleapis.com/envoy.config.core.v3.Address", proxyAddressConvertor{})
+}
+
+var (
+ // metdataRegistry is a map from proto type to metadataConverter.
+ metdataRegistry = make(map[string]metadataConverter)
+)
+
+// metadataConverter converts xds metadata entries in
+// Metadata.typed_filter_metadata into an internal form with the fields relevant
+// to gRPC.
+type metadataConverter interface {
+ // convert parses the Any proto into a concrete struct.
+ convert(*anypb.Any) (any, error)
+}
+
+// registerMetadataConverter registers the converter to the map keyed on a proto
+// type_url. Must be called at init time. Not thread safe.
+func registerMetadataConverter(protoType string, c metadataConverter) {
+ metdataRegistry[protoType] = c
+}
+
+// metadataConverterForType retrieves a converter based on key given.
+func metadataConverterForType(typeURL string) metadataConverter {
+ return metdataRegistry[typeURL]
+}
+
+// StructMetadataValue stores the values in a google.protobuf.Struct from
+// FilterMetadata.
+type StructMetadataValue struct {
+ // Data stores the parsed JSON representation of a google.protobuf.Struct.
+ Data map[string]any
+}
+
+// ProxyAddressMetadataValue holds the address parsed from the
+// envoy.config.core.v3.Address proto message, as specified in gRFC A86.
+type ProxyAddressMetadataValue struct {
+ // Address stores the proxy address configured (A86). It will be in the form
+ // of host:port. It has to be either IPv6 or IPv4.
+ Address string
+}
+
+// proxyAddressConvertor implements the metadataConverter interface to handle
+// the conversion of envoy.config.core.v3.Address protobuf messages into an
+// internal representation.
+type proxyAddressConvertor struct{}
+
+func (proxyAddressConvertor) convert(anyProto *anypb.Any) (any, error) {
+ addressProto := &v3corepb.Address{}
+ if err := anyProto.UnmarshalTo(addressProto); err != nil {
+ return nil, fmt.Errorf("failed to unmarshal resource from Any proto: %v", err)
+ }
+ socketaddress := addressProto.GetSocketAddress()
+ if socketaddress == nil {
+ return nil, fmt.Errorf("no socket_address field in metadata")
+ }
+ if _, err := netip.ParseAddr(socketaddress.GetAddress()); err != nil {
+ return nil, fmt.Errorf("address field is not a valid IPv4 or IPv6 address: %q", socketaddress.GetAddress())
+ }
+ portvalue := socketaddress.GetPortValue()
+ if portvalue == 0 {
+ return nil, fmt.Errorf("port value not set in socket_address")
+ }
+ return ProxyAddressMetadataValue{Address: parseAddress(socketaddress)}, nil
+}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/name.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/name.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/name.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/name.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/resource_type.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/resource_type.go
similarity index 98%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/resource_type.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/resource_type.go
index 4ecf63a1c378..2c591312f1be 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/resource_type.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/resource_type.go
@@ -27,10 +27,10 @@ package xdsresource
import (
"fmt"
+ xdsinternal "google.golang.org/grpc/internal/xds"
"google.golang.org/grpc/internal/xds/bootstrap"
- xdsinternal "google.golang.org/grpc/xds/internal"
- "google.golang.org/grpc/xds/internal/clients/xdsclient"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource/version"
+ "google.golang.org/grpc/internal/xds/clients/xdsclient"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource/version"
"google.golang.org/protobuf/types/known/anypb"
)
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/route_config_resource_type.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/route_config_resource_type.go
similarity index 97%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/route_config_resource_type.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/route_config_resource_type.go
index 344932e93d94..912dc1b762b4 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/route_config_resource_type.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/route_config_resource_type.go
@@ -19,8 +19,8 @@ package xdsresource
import (
"google.golang.org/grpc/internal/pretty"
- xdsclient "google.golang.org/grpc/xds/internal/clients/xdsclient"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource/version"
+ xdsclient "google.golang.org/grpc/internal/xds/clients/xdsclient"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource/version"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
)
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/type.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/type.go
similarity index 98%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/type.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/type.go
index 994204101835..7f85c1da2105 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/type.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/type.go
@@ -21,7 +21,7 @@ import (
"time"
v3discoverypb "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource/version"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource/version"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
)
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/type_cds.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/type_cds.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/type_cds.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/type_cds.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/type_eds.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/type_eds.go
similarity index 95%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/type_eds.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/type_eds.go
index 12294626f392..a8d568e18263 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/type_eds.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/type_eds.go
@@ -18,7 +18,7 @@
package xdsresource
import (
- "google.golang.org/grpc/xds/internal/clients"
+ "google.golang.org/grpc/internal/xds/clients"
"google.golang.org/protobuf/types/known/anypb"
)
@@ -53,6 +53,7 @@ type Endpoint struct {
HealthStatus EndpointHealthStatus
Weight uint32
HashKey string
+ Metadata map[string]any
}
// Locality contains information of a locality.
@@ -61,6 +62,7 @@ type Locality struct {
ID clients.Locality
Priority uint32
Weight uint32
+ Metadata map[string]any
}
// EndpointsUpdate contains an EDS update.
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/type_lds.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/type_lds.go
similarity index 98%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/type_lds.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/type_lds.go
index a71e38ea9a52..a2e057b0e7a3 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/type_lds.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/type_lds.go
@@ -20,7 +20,7 @@ package xdsresource
import (
"time"
- "google.golang.org/grpc/xds/internal/httpfilter"
+ "google.golang.org/grpc/internal/xds/httpfilter"
"google.golang.org/protobuf/types/known/anypb"
)
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/type_rds.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/type_rds.go
similarity index 98%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/type_rds.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/type_rds.go
index 42da39126393..44bc27891f1b 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/type_rds.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/type_rds.go
@@ -22,9 +22,9 @@ import (
"time"
"google.golang.org/grpc/codes"
+ "google.golang.org/grpc/internal/xds/clusterspecifier"
+ "google.golang.org/grpc/internal/xds/httpfilter"
"google.golang.org/grpc/internal/xds/matcher"
- "google.golang.org/grpc/xds/internal/clusterspecifier"
- "google.golang.org/grpc/xds/internal/httpfilter"
"google.golang.org/protobuf/types/known/anypb"
)
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_cds.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/unmarshal_cds.go
similarity index 99%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_cds.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/unmarshal_cds.go
index c2ced0d6203f..d7133c996cb3 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_cds.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/unmarshal_cds.go
@@ -36,8 +36,8 @@ import (
iserviceconfig "google.golang.org/grpc/internal/serviceconfig"
"google.golang.org/grpc/internal/xds/bootstrap"
"google.golang.org/grpc/internal/xds/matcher"
- "google.golang.org/grpc/xds/internal/xdsclient/xdslbregistry"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource/version"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdslbregistry"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource/version"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
"google.golang.org/protobuf/types/known/structpb"
@@ -287,8 +287,8 @@ func securityConfigFromCluster(cluster *v3clusterpb.Cluster) (*SecurityConfig, e
return nil, fmt.Errorf("transport_socket field has unexpected name: %s", name)
}
tc := ts.GetTypedConfig()
- if tc == nil || tc.TypeUrl != version.V3UpstreamTLSContextURL {
- return nil, fmt.Errorf("transport_socket field has unexpected typeURL: %s", tc.TypeUrl)
+ if typeURL := tc.GetTypeUrl(); typeURL != version.V3UpstreamTLSContextURL {
+ return nil, fmt.Errorf("transport_socket missing typed_config or wrong type_url: %q", typeURL)
}
upstreamCtx := &v3tlspb.UpstreamTlsContext{}
if err := proto.Unmarshal(tc.GetValue(), upstreamCtx); err != nil {
diff --git a/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/unmarshal_eds.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/unmarshal_eds.go
new file mode 100644
index 000000000000..c5b9723a79a3
--- /dev/null
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/unmarshal_eds.go
@@ -0,0 +1,259 @@
+/*
+ *
+ * Copyright 2021 gRPC 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 xdsresource
+
+import (
+ "fmt"
+ "math"
+ "net"
+ "strconv"
+
+ v3corepb "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
+ v3endpointpb "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3"
+ v3typepb "github.com/envoyproxy/go-control-plane/envoy/type/v3"
+ "google.golang.org/grpc/internal/envconfig"
+ "google.golang.org/grpc/internal/pretty"
+ xdsinternal "google.golang.org/grpc/internal/xds"
+ "google.golang.org/grpc/internal/xds/clients"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+func unmarshalEndpointsResource(r *anypb.Any) (string, EndpointsUpdate, error) {
+ r, err := UnwrapResource(r)
+ if err != nil {
+ return "", EndpointsUpdate{}, fmt.Errorf("failed to unwrap resource: %v", err)
+ }
+
+ if !IsEndpointsResource(r.GetTypeUrl()) {
+ return "", EndpointsUpdate{}, fmt.Errorf("unexpected resource type: %q ", r.GetTypeUrl())
+ }
+
+ cla := &v3endpointpb.ClusterLoadAssignment{}
+ if err := proto.Unmarshal(r.GetValue(), cla); err != nil {
+ return "", EndpointsUpdate{}, fmt.Errorf("failed to unmarshal resource: %v", err)
+ }
+
+ u, err := parseEDSRespProto(cla)
+ if err != nil {
+ return cla.GetClusterName(), EndpointsUpdate{}, err
+ }
+ u.Raw = r
+ return cla.GetClusterName(), u, nil
+}
+
+func parseAddress(socketAddress *v3corepb.SocketAddress) string {
+ return net.JoinHostPort(socketAddress.GetAddress(), strconv.Itoa(int(socketAddress.GetPortValue())))
+}
+
+func parseDropPolicy(dropPolicy *v3endpointpb.ClusterLoadAssignment_Policy_DropOverload) OverloadDropConfig {
+ percentage := dropPolicy.GetDropPercentage()
+ var (
+ numerator = percentage.GetNumerator()
+ denominator uint32
+ )
+ switch percentage.GetDenominator() {
+ case v3typepb.FractionalPercent_HUNDRED:
+ denominator = 100
+ case v3typepb.FractionalPercent_TEN_THOUSAND:
+ denominator = 10000
+ case v3typepb.FractionalPercent_MILLION:
+ denominator = 1000000
+ }
+ return OverloadDropConfig{
+ Category: dropPolicy.GetCategory(),
+ Numerator: numerator,
+ Denominator: denominator,
+ }
+}
+
+func parseEndpoints(lbEndpoints []*v3endpointpb.LbEndpoint, uniqueEndpointAddrs map[string]bool) ([]Endpoint, error) {
+ endpoints := make([]Endpoint, 0, len(lbEndpoints))
+ for _, lbEndpoint := range lbEndpoints {
+ // If the load_balancing_weight field is specified, it must be set to a
+ // value of at least 1. If unspecified, each host is presumed to have
+ // equal weight in a locality.
+ weight := uint32(1)
+ if w := lbEndpoint.GetLoadBalancingWeight(); w != nil {
+ if w.GetValue() == 0 {
+ return nil, fmt.Errorf("EDS response contains an endpoint with zero weight: %+v", lbEndpoint)
+ }
+ weight = w.GetValue()
+ }
+ addrs := []string{parseAddress(lbEndpoint.GetEndpoint().GetAddress().GetSocketAddress())}
+ if envconfig.XDSDualstackEndpointsEnabled {
+ for _, sa := range lbEndpoint.GetEndpoint().GetAdditionalAddresses() {
+ addrs = append(addrs, parseAddress(sa.GetAddress().GetSocketAddress()))
+ }
+ }
+
+ for _, a := range addrs {
+ if uniqueEndpointAddrs[a] {
+ return nil, fmt.Errorf("duplicate endpoint with the same address %s", a)
+ }
+ uniqueEndpointAddrs[a] = true
+ }
+
+ var endpointMetadata map[string]any
+ var hashKey string
+ if envconfig.XDSHTTPConnectEnabled || !envconfig.XDSEndpointHashKeyBackwardCompat {
+ var err error
+ endpointMetadata, err = validateAndConstructMetadata(lbEndpoint.GetMetadata())
+ if err != nil {
+ return nil, err
+ }
+
+ // "The xDS resolver, described in A74, will be changed to set the hash_key
+ // endpoint attribute to the value of LbEndpoint.Metadata envoy.lb hash_key
+ // field, as described in Envoy's documentation for the ring hash load
+ // balancer." - A76
+ if !envconfig.XDSEndpointHashKeyBackwardCompat {
+ hashKey = hashKeyFromMetadata(endpointMetadata)
+ }
+ }
+ endpoints = append(endpoints, Endpoint{
+ HealthStatus: EndpointHealthStatus(lbEndpoint.GetHealthStatus()),
+ Addresses: addrs,
+ Weight: weight,
+ HashKey: hashKey,
+ Metadata: endpointMetadata,
+ })
+ }
+ return endpoints, nil
+}
+
+// hashKey extracts and returns the hash key from the given endpoint metadata.
+// If no hash key is found, it returns an empty string.
+func hashKeyFromMetadata(metadata map[string]any) string {
+ envoyLB, ok := metadata["envoy.lb"].(StructMetadataValue)
+ if ok {
+ if h, ok := envoyLB.Data["hash_key"].(string); ok {
+ return h
+ }
+ }
+ return ""
+}
+
+func parseEDSRespProto(m *v3endpointpb.ClusterLoadAssignment) (EndpointsUpdate, error) {
+ ret := EndpointsUpdate{}
+ for _, dropPolicy := range m.GetPolicy().GetDropOverloads() {
+ ret.Drops = append(ret.Drops, parseDropPolicy(dropPolicy))
+ }
+ priorities := make(map[uint32]map[string]bool)
+ sumOfWeights := make(map[uint32]uint64)
+ uniqueEndpointAddrs := make(map[string]bool)
+ for _, locality := range m.Endpoints {
+ l := locality.GetLocality()
+ if l == nil {
+ return EndpointsUpdate{}, fmt.Errorf("EDS response contains a locality without ID, locality: %+v", locality)
+ }
+ weight := locality.GetLoadBalancingWeight().GetValue()
+ if weight == 0 {
+ logger.Warningf("Ignoring locality %s with weight 0", pretty.ToJSON(l))
+ continue
+ }
+ priority := locality.GetPriority()
+ sumOfWeights[priority] += uint64(weight)
+ if sumOfWeights[priority] > math.MaxUint32 {
+ return EndpointsUpdate{}, fmt.Errorf("sum of weights of localities at the same priority %d exceeded maximal value", priority)
+ }
+ localitiesWithPriority := priorities[priority]
+ if localitiesWithPriority == nil {
+ localitiesWithPriority = make(map[string]bool)
+ priorities[priority] = localitiesWithPriority
+ }
+ lid := clients.Locality{
+ Region: l.Region,
+ Zone: l.Zone,
+ SubZone: l.SubZone,
+ }
+ lidStr := xdsinternal.LocalityString(lid)
+
+ // "Since an xDS configuration can place a given locality under multiple
+ // priorities, it is possible to see locality weight attributes with
+ // different values for the same locality." - A52
+ //
+ // This is handled in the client by emitting the locality weight
+ // specified for the priority it is specified in. If the same locality
+ // has a different weight in two priorities, each priority will specify
+ // a locality with the locality weight specified for that priority, and
+ // thus the subsequent tree of balancers linked to that priority will
+ // use that locality weight as well.
+ if localitiesWithPriority[lidStr] {
+ return EndpointsUpdate{}, fmt.Errorf("duplicate locality %s with the same priority %v", lidStr, priority)
+ }
+ localitiesWithPriority[lidStr] = true
+ endpoints, err := parseEndpoints(locality.GetLbEndpoints(), uniqueEndpointAddrs)
+ if err != nil {
+ return EndpointsUpdate{}, err
+ }
+ var localityMetadata map[string]any
+ if envconfig.XDSHTTPConnectEnabled {
+ var err error
+ localityMetadata, err = validateAndConstructMetadata(locality.GetMetadata())
+ if err != nil {
+ return EndpointsUpdate{}, err
+ }
+ }
+
+ ret.Localities = append(ret.Localities, Locality{
+ ID: lid,
+ Endpoints: endpoints,
+ Weight: weight,
+ Priority: priority,
+ Metadata: localityMetadata,
+ })
+ }
+ for i := 0; i < len(priorities); i++ {
+ if _, ok := priorities[uint32(i)]; !ok {
+ return EndpointsUpdate{}, fmt.Errorf("priority %v missing (with different priorities %v received)", i, priorities)
+ }
+ }
+ return ret, nil
+}
+
+func validateAndConstructMetadata(metadataProto *v3corepb.Metadata) (map[string]any, error) {
+ if metadataProto == nil {
+ return nil, nil
+ }
+ metadata := make(map[string]any)
+ // First go through TypedFilterMetadata.
+ for key, anyProto := range metadataProto.GetTypedFilterMetadata() {
+ converter := metadataConverterForType(anyProto.GetTypeUrl())
+ // Ignore types we don't have a converter for.
+ if converter == nil {
+ continue
+ }
+ val, err := converter.convert(anyProto)
+ if err != nil {
+ // If the converter fails, nack the whole resource.
+ return nil, fmt.Errorf("metadata conversion for key %q and type %q failed: %v", key, anyProto.GetTypeUrl(), err)
+ }
+ metadata[key] = val
+ }
+
+ // Process FilterMetadata for any keys not already handled.
+ for key, structProto := range metadataProto.GetFilterMetadata() {
+ // Skip keys already added from TyperFilterMetadata.
+ if metadata[key] != nil {
+ continue
+ }
+ metadata[key] = StructMetadataValue{Data: structProto.AsMap()}
+ }
+ return metadata, nil
+}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_lds.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/unmarshal_lds.go
similarity index 99%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_lds.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/unmarshal_lds.go
index 475300cefcc0..25c607b48a4d 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_lds.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/unmarshal_lds.go
@@ -27,7 +27,7 @@ import (
v3listenerpb "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3"
v3routepb "github.com/envoyproxy/go-control-plane/envoy/config/route/v3"
v3httppb "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3"
- "google.golang.org/grpc/xds/internal/httpfilter"
+ "google.golang.org/grpc/internal/xds/httpfilter"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
)
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_rds.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/unmarshal_rds.go
similarity index 99%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_rds.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/unmarshal_rds.go
index db862514eb58..beab03ebb327 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_rds.go
+++ b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/unmarshal_rds.go
@@ -25,8 +25,8 @@ import (
"time"
"google.golang.org/grpc/codes"
+ "google.golang.org/grpc/internal/xds/clusterspecifier"
"google.golang.org/grpc/internal/xds/matcher"
- "google.golang.org/grpc/xds/internal/clusterspecifier"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/version/version.go b/hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/version/version.go
similarity index 100%
rename from hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/version/version.go
rename to hack/tools/vendor/google.golang.org/grpc/internal/xds/xdsclient/xdsresource/version/version.go
diff --git a/hack/tools/vendor/google.golang.org/grpc/picker_wrapper.go b/hack/tools/vendor/google.golang.org/grpc/picker_wrapper.go
index a2d2a798d488..aa52bfe95fd8 100644
--- a/hack/tools/vendor/google.golang.org/grpc/picker_wrapper.go
+++ b/hack/tools/vendor/google.golang.org/grpc/picker_wrapper.go
@@ -29,7 +29,6 @@ import (
"google.golang.org/grpc/internal/channelz"
istatus "google.golang.org/grpc/internal/status"
"google.golang.org/grpc/internal/transport"
- "google.golang.org/grpc/stats"
"google.golang.org/grpc/status"
)
@@ -48,14 +47,11 @@ type pickerGeneration struct {
// actions and unblock when there's a picker update.
type pickerWrapper struct {
// If pickerGen holds a nil pointer, the pickerWrapper is closed.
- pickerGen atomic.Pointer[pickerGeneration]
- statsHandlers []stats.Handler // to record blocking picker calls
+ pickerGen atomic.Pointer[pickerGeneration]
}
-func newPickerWrapper(statsHandlers []stats.Handler) *pickerWrapper {
- pw := &pickerWrapper{
- statsHandlers: statsHandlers,
- }
+func newPickerWrapper() *pickerWrapper {
+ pw := &pickerWrapper{}
pw.pickerGen.Store(&pickerGeneration{
blockingCh: make(chan struct{}),
})
@@ -93,6 +89,12 @@ func doneChannelzWrapper(acbw *acBalancerWrapper, result *balancer.PickResult) {
}
}
+type pick struct {
+ transport transport.ClientTransport // the selected transport
+ result balancer.PickResult // the contents of the pick from the LB policy
+ blocked bool // set if a picker call queued for a new picker
+}
+
// pick returns the transport that will be used for the RPC.
// It may block in the following cases:
// - there's no picker
@@ -100,15 +102,16 @@ func doneChannelzWrapper(acbw *acBalancerWrapper, result *balancer.PickResult) {
// - the current picker returns other errors and failfast is false.
// - the subConn returned by the current picker is not READY
// When one of these situations happens, pick blocks until the picker gets updated.
-func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.PickInfo) (transport.ClientTransport, balancer.PickResult, error) {
+func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.PickInfo) (pick, error) {
var ch chan struct{}
var lastPickErr error
+ pickBlocked := false
for {
pg := pw.pickerGen.Load()
if pg == nil {
- return nil, balancer.PickResult{}, ErrClientConnClosing
+ return pick{}, ErrClientConnClosing
}
if pg.picker == nil {
ch = pg.blockingCh
@@ -127,9 +130,9 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.
}
switch ctx.Err() {
case context.DeadlineExceeded:
- return nil, balancer.PickResult{}, status.Error(codes.DeadlineExceeded, errStr)
+ return pick{}, status.Error(codes.DeadlineExceeded, errStr)
case context.Canceled:
- return nil, balancer.PickResult{}, status.Error(codes.Canceled, errStr)
+ return pick{}, status.Error(codes.Canceled, errStr)
}
case <-ch:
}
@@ -145,9 +148,7 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.
// In the second case, the only way it will get to this conditional is
// if there is a new picker.
if ch != nil {
- for _, sh := range pw.statsHandlers {
- sh.HandleRPC(ctx, &stats.PickerUpdated{})
- }
+ pickBlocked = true
}
ch = pg.blockingCh
@@ -164,7 +165,7 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.
if istatus.IsRestrictedControlPlaneCode(st) {
err = status.Errorf(codes.Internal, "received picker error with illegal status: %v", err)
}
- return nil, balancer.PickResult{}, dropError{error: err}
+ return pick{}, dropError{error: err}
}
// For all other errors, wait for ready RPCs should block and other
// RPCs should fail with unavailable.
@@ -172,7 +173,7 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.
lastPickErr = err
continue
}
- return nil, balancer.PickResult{}, status.Error(codes.Unavailable, err.Error())
+ return pick{}, status.Error(codes.Unavailable, err.Error())
}
acbw, ok := pickResult.SubConn.(*acBalancerWrapper)
@@ -183,9 +184,8 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.
if t := acbw.ac.getReadyTransport(); t != nil {
if channelz.IsOn() {
doneChannelzWrapper(acbw, &pickResult)
- return t, pickResult, nil
}
- return t, pickResult, nil
+ return pick{transport: t, result: pickResult, blocked: pickBlocked}, nil
}
if pickResult.Done != nil {
// Calling done with nil error, no bytes sent and no bytes received.
diff --git a/hack/tools/vendor/google.golang.org/grpc/resolver/resolver.go b/hack/tools/vendor/google.golang.org/grpc/resolver/resolver.go
index b84ef26d46d1..8e6af9514b6d 100644
--- a/hack/tools/vendor/google.golang.org/grpc/resolver/resolver.go
+++ b/hack/tools/vendor/google.golang.org/grpc/resolver/resolver.go
@@ -332,6 +332,11 @@ type AuthorityOverrider interface {
// OverrideAuthority returns the authority to use for a ClientConn with the
// given target. The implementation must generate it without blocking,
// typically in line, and must keep it unchanged.
+ //
+ // The returned string must be a valid ":authority" header value, i.e. be
+ // encoded according to
+ // [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986#section-3.2) as
+ // necessary.
OverrideAuthority(Target) string
}
diff --git a/hack/tools/vendor/google.golang.org/grpc/server.go b/hack/tools/vendor/google.golang.org/grpc/server.go
index 70fe23f55022..1da2a542acde 100644
--- a/hack/tools/vendor/google.golang.org/grpc/server.go
+++ b/hack/tools/vendor/google.golang.org/grpc/server.go
@@ -1598,6 +1598,7 @@ func (s *Server) processStreamingRPC(ctx context.Context, stream *transport.Serv
s: stream,
p: &parser{r: stream, bufferPool: s.opts.bufferPool},
codec: s.getCodec(stream.ContentSubtype()),
+ desc: sd,
maxReceiveMessageSize: s.opts.maxReceiveMessageSize,
maxSendMessageSize: s.opts.maxSendMessageSize,
trInfo: trInfo,
diff --git a/hack/tools/vendor/google.golang.org/grpc/stats/opentelemetry/client_metrics.go b/hack/tools/vendor/google.golang.org/grpc/stats/opentelemetry/client_metrics.go
index 7422bebd4f6e..ee778080c251 100644
--- a/hack/tools/vendor/google.golang.org/grpc/stats/opentelemetry/client_metrics.go
+++ b/hack/tools/vendor/google.golang.org/grpc/stats/opentelemetry/client_metrics.go
@@ -54,7 +54,7 @@ func (h *clientMetricsHandler) initializeMetrics() {
metrics = DefaultMetrics()
}
- h.clientMetrics.attemptStarted = createInt64Counter(metrics.Metrics(), "grpc.client.attempt.started", meter, otelmetric.WithUnit("attempt"), otelmetric.WithDescription("Number of client call attempts started."))
+ h.clientMetrics.attemptStarted = createInt64Counter(metrics.Metrics(), "grpc.client.attempt.started", meter, otelmetric.WithUnit("{attempt}"), otelmetric.WithDescription("Number of client call attempts started."))
h.clientMetrics.attemptDuration = createFloat64Histogram(metrics.Metrics(), "grpc.client.attempt.duration", meter, otelmetric.WithUnit("s"), otelmetric.WithDescription("End-to-end time taken to complete a client call attempt."), otelmetric.WithExplicitBucketBoundaries(DefaultLatencyBounds...))
h.clientMetrics.attemptSentTotalCompressedMessageSize = createInt64Histogram(metrics.Metrics(), "grpc.client.attempt.sent_total_compressed_message_size", meter, otelmetric.WithUnit("By"), otelmetric.WithDescription("Compressed message bytes sent per client call attempt."), otelmetric.WithExplicitBucketBoundaries(DefaultSizeBounds...))
h.clientMetrics.attemptRcvdTotalCompressedMessageSize = createInt64Histogram(metrics.Metrics(), "grpc.client.attempt.rcvd_total_compressed_message_size", meter, otelmetric.WithUnit("By"), otelmetric.WithDescription("Compressed message bytes received per call attempt."), otelmetric.WithExplicitBucketBoundaries(DefaultSizeBounds...))
diff --git a/hack/tools/vendor/google.golang.org/grpc/stats/opentelemetry/server_metrics.go b/hack/tools/vendor/google.golang.org/grpc/stats/opentelemetry/server_metrics.go
index a02fc33b9457..75d922e7974e 100644
--- a/hack/tools/vendor/google.golang.org/grpc/stats/opentelemetry/server_metrics.go
+++ b/hack/tools/vendor/google.golang.org/grpc/stats/opentelemetry/server_metrics.go
@@ -54,7 +54,7 @@ func (h *serverMetricsHandler) initializeMetrics() {
metrics = DefaultMetrics()
}
- h.serverMetrics.callStarted = createInt64Counter(metrics.Metrics(), "grpc.server.call.started", meter, otelmetric.WithUnit("call"), otelmetric.WithDescription("Number of server calls started."))
+ h.serverMetrics.callStarted = createInt64Counter(metrics.Metrics(), "grpc.server.call.started", meter, otelmetric.WithUnit("{call}"), otelmetric.WithDescription("Number of server calls started."))
h.serverMetrics.callSentTotalCompressedMessageSize = createInt64Histogram(metrics.Metrics(), "grpc.server.call.sent_total_compressed_message_size", meter, otelmetric.WithUnit("By"), otelmetric.WithDescription("Compressed message bytes sent per server call."), otelmetric.WithExplicitBucketBoundaries(DefaultSizeBounds...))
h.serverMetrics.callRcvdTotalCompressedMessageSize = createInt64Histogram(metrics.Metrics(), "grpc.server.call.rcvd_total_compressed_message_size", meter, otelmetric.WithUnit("By"), otelmetric.WithDescription("Compressed message bytes received per server call."), otelmetric.WithExplicitBucketBoundaries(DefaultSizeBounds...))
h.serverMetrics.callDuration = createFloat64Histogram(metrics.Metrics(), "grpc.server.call.duration", meter, otelmetric.WithUnit("s"), otelmetric.WithDescription("End-to-end time taken to complete a call from server transport's perspective."), otelmetric.WithExplicitBucketBoundaries(DefaultLatencyBounds...))
diff --git a/hack/tools/vendor/google.golang.org/grpc/stats/opentelemetry/trace.go b/hack/tools/vendor/google.golang.org/grpc/stats/opentelemetry/trace.go
index efafdd0756eb..40ac7a1b6ef5 100644
--- a/hack/tools/vendor/google.golang.org/grpc/stats/opentelemetry/trace.go
+++ b/hack/tools/vendor/google.golang.org/grpc/stats/opentelemetry/trace.go
@@ -52,7 +52,7 @@ func populateSpan(rs stats.RPCStats, ai *attemptInfo) {
)
// increment previous rpc attempts applicable for next attempt
atomic.AddUint32(&ai.previousRPCAttempts, 1)
- case *stats.PickerUpdated:
+ case *stats.DelayedPickComplete:
span.AddEvent("Delayed LB pick complete")
case *stats.InPayload:
// message id - "must be calculated as two different counters starting
diff --git a/hack/tools/vendor/google.golang.org/grpc/stats/stats.go b/hack/tools/vendor/google.golang.org/grpc/stats/stats.go
index baf7740efba9..10bf998aa5be 100644
--- a/hack/tools/vendor/google.golang.org/grpc/stats/stats.go
+++ b/hack/tools/vendor/google.golang.org/grpc/stats/stats.go
@@ -64,15 +64,21 @@ func (s *Begin) IsClient() bool { return s.Client }
func (s *Begin) isRPCStats() {}
-// PickerUpdated indicates that the LB policy provided a new picker while the
-// RPC was waiting for one.
-type PickerUpdated struct{}
+// DelayedPickComplete indicates that the RPC is unblocked following a delay in
+// selecting a connection for the call.
+type DelayedPickComplete struct{}
-// IsClient indicates if the stats information is from client side. Only Client
-// Side interfaces with a Picker, thus always returns true.
-func (*PickerUpdated) IsClient() bool { return true }
+// IsClient indicates DelayedPickComplete is available on the client.
+func (*DelayedPickComplete) IsClient() bool { return true }
-func (*PickerUpdated) isRPCStats() {}
+func (*DelayedPickComplete) isRPCStats() {}
+
+// PickerUpdated indicates that the RPC is unblocked following a delay in
+// selecting a connection for the call.
+//
+// Deprecated: will be removed in a future release; use DelayedPickComplete
+// instead.
+type PickerUpdated = DelayedPickComplete
// InPayload contains stats about an incoming payload.
type InPayload struct {
diff --git a/hack/tools/vendor/google.golang.org/grpc/stream.go b/hack/tools/vendor/google.golang.org/grpc/stream.go
index ca6948926f93..0a0af8961f05 100644
--- a/hack/tools/vendor/google.golang.org/grpc/stream.go
+++ b/hack/tools/vendor/google.golang.org/grpc/stream.go
@@ -469,8 +469,9 @@ func (cs *clientStream) newAttemptLocked(isTransparent bool) (*csAttempt, error)
func (a *csAttempt) getTransport() error {
cs := a.cs
- var err error
- a.transport, a.pickResult, err = cs.cc.getTransport(a.ctx, cs.callInfo.failFast, cs.callHdr.Method)
+ pickInfo := balancer.PickInfo{Ctx: a.ctx, FullMethodName: cs.callHdr.Method}
+ pick, err := cs.cc.pickerWrapper.pick(a.ctx, cs.callInfo.failFast, pickInfo)
+ a.transport, a.pickResult = pick.transport, pick.result
if err != nil {
if de, ok := err.(dropError); ok {
err = de.error
@@ -481,6 +482,11 @@ func (a *csAttempt) getTransport() error {
if a.trInfo != nil {
a.trInfo.firstLine.SetRemoteAddr(a.transport.RemoteAddr())
}
+ if pick.blocked {
+ for _, sh := range a.statsHandlers {
+ sh.HandleRPC(a.ctx, &stats.DelayedPickComplete{})
+ }
+ }
return nil
}
@@ -543,6 +549,8 @@ type clientStream struct {
sentLast bool // sent an end stream
+ receivedFirstMsg bool // set after the first message is received
+
methodConfig *MethodConfig
ctx context.Context // the application's context, wrapped by stats/tracing
@@ -1138,11 +1146,16 @@ func (a *csAttempt) recvMsg(m any, payInfo *payloadInfo) (err error) {
if statusErr := a.transportStream.Status().Err(); statusErr != nil {
return statusErr
}
+ // Received no msg and status OK for non-server streaming rpcs.
+ if !cs.desc.ServerStreams && !cs.receivedFirstMsg {
+ return status.Error(codes.Internal, "cardinality violation: received no response message from non-server-streaming RPC")
+ }
return io.EOF // indicates successful end of stream.
}
return toRPCErr(err)
}
+ cs.receivedFirstMsg = true
if a.trInfo != nil {
a.mu.Lock()
if a.trInfo.tr != nil {
@@ -1171,7 +1184,7 @@ func (a *csAttempt) recvMsg(m any, payInfo *payloadInfo) (err error) {
} else if err != nil {
return toRPCErr(err)
}
- return status.Errorf(codes.Internal, "cardinality violation: expected for non server-streaming RPCs, but received another message")
+ return status.Error(codes.Internal, "cardinality violation: expected for non server-streaming RPCs, but received another message")
}
func (a *csAttempt) finish(err error) {
@@ -1353,6 +1366,7 @@ type addrConnStream struct {
transport transport.ClientTransport
ctx context.Context
sentLast bool
+ receivedFirstMsg bool
desc *StreamDesc
codec baseCodec
sendCompressorV0 Compressor
@@ -1478,10 +1492,15 @@ func (as *addrConnStream) RecvMsg(m any) (err error) {
if statusErr := as.transportStream.Status().Err(); statusErr != nil {
return statusErr
}
+ // Received no msg and status OK for non-server streaming rpcs.
+ if !as.desc.ServerStreams && !as.receivedFirstMsg {
+ return status.Error(codes.Internal, "cardinality violation: received no response message from non-server-streaming RPC")
+ }
return io.EOF // indicates successful end of stream.
}
return toRPCErr(err)
}
+ as.receivedFirstMsg = true
if as.desc.ServerStreams {
// Subsequent messages should be received by subsequent RecvMsg calls.
@@ -1495,7 +1514,7 @@ func (as *addrConnStream) RecvMsg(m any) (err error) {
} else if err != nil {
return toRPCErr(err)
}
- return status.Errorf(codes.Internal, "cardinality violation: expected for non server-streaming RPCs, but received another message")
+ return status.Error(codes.Internal, "cardinality violation: expected for non server-streaming RPCs, but received another message")
}
func (as *addrConnStream) finish(err error) {
@@ -1580,6 +1599,7 @@ type serverStream struct {
s *transport.ServerStream
p *parser
codec baseCodec
+ desc *StreamDesc
compressorV0 Compressor
compressorV1 encoding.Compressor
@@ -1588,6 +1608,8 @@ type serverStream struct {
sendCompressorName string
+ recvFirstMsg bool // set after the first message is received
+
maxReceiveMessageSize int
maxSendMessageSize int
trInfo *traceInfo
@@ -1774,6 +1796,10 @@ func (ss *serverStream) RecvMsg(m any) (err error) {
binlog.Log(ss.ctx, chc)
}
}
+ // Received no request msg for non-client streaming rpcs.
+ if !ss.desc.ClientStreams && !ss.recvFirstMsg {
+ return status.Error(codes.Internal, "cardinality violation: received no request message from non-client-streaming RPC")
+ }
return err
}
if err == io.ErrUnexpectedEOF {
@@ -1781,6 +1807,7 @@ func (ss *serverStream) RecvMsg(m any) (err error) {
}
return toRPCErr(err)
}
+ ss.recvFirstMsg = true
if len(ss.statsHandler) != 0 {
for _, sh := range ss.statsHandler {
sh.HandleRPC(ss.s.Context(), &stats.InPayload{
@@ -1800,7 +1827,19 @@ func (ss *serverStream) RecvMsg(m any) (err error) {
binlog.Log(ss.ctx, cm)
}
}
- return nil
+
+ if ss.desc.ClientStreams {
+ // Subsequent messages should be received by subsequent RecvMsg calls.
+ return nil
+ }
+ // Special handling for non-client-stream rpcs.
+ // This recv expects EOF or errors, so we don't collect inPayload.
+ if err := recv(ss.p, ss.codec, ss.s, ss.decompressorV0, m, ss.maxReceiveMessageSize, nil, ss.decompressorV1, true); err == io.EOF {
+ return nil
+ } else if err != nil {
+ return err
+ }
+ return status.Error(codes.Internal, "cardinality violation: received multiple request messages for non-client-streaming RPC")
}
// MethodFromServerStream returns the method string for the input stream.
diff --git a/hack/tools/vendor/google.golang.org/grpc/version.go b/hack/tools/vendor/google.golang.org/grpc/version.go
index 8b0e5f973d6d..76f2e0d060ff 100644
--- a/hack/tools/vendor/google.golang.org/grpc/version.go
+++ b/hack/tools/vendor/google.golang.org/grpc/version.go
@@ -19,4 +19,4 @@
package grpc
// Version is the current grpc version.
-const Version = "1.74.2"
+const Version = "1.76.0"
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/csds/csds.go b/hack/tools/vendor/google.golang.org/grpc/xds/csds/csds.go
index 3d8398a72ff0..603819d6c773 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/csds/csds.go
+++ b/hack/tools/vendor/google.golang.org/grpc/xds/csds/csds.go
@@ -31,8 +31,8 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
internalgrpclog "google.golang.org/grpc/internal/grpclog"
+ "google.golang.org/grpc/internal/xds/xdsclient"
"google.golang.org/grpc/status"
- "google.golang.org/grpc/xds/internal/xdsclient"
v3statusgrpc "github.com/envoyproxy/go-control-plane/envoy/service/status/v3"
v3statuspb "github.com/envoyproxy/go-control-plane/envoy/service/status/v3"
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/googledirectpath/googlec2p.go b/hack/tools/vendor/google.golang.org/grpc/xds/googledirectpath/googlec2p.go
index f75c022d9555..9ef59f1a92a7 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/googledirectpath/googlec2p.go
+++ b/hack/tools/vendor/google.golang.org/grpc/xds/googledirectpath/googlec2p.go
@@ -38,8 +38,8 @@ import (
"google.golang.org/grpc/internal/googlecloud"
internalgrpclog "google.golang.org/grpc/internal/grpclog"
"google.golang.org/grpc/internal/xds/bootstrap"
+ "google.golang.org/grpc/internal/xds/xdsclient"
"google.golang.org/grpc/resolver"
- "google.golang.org/grpc/xds/internal/xdsclient"
_ "google.golang.org/grpc/xds" // To register xds resolvers and balancers.
)
@@ -182,6 +182,13 @@ func newNodeConfig(zone string, ipv6Capable bool) map[string]any {
"id": fmt.Sprintf("C2P-%d", randInt()),
"locality": map[string]any{"zone": zone},
}
+ if envconfig.NewPickFirstEnabled {
+ // Enable dualstack endpoints in TD.
+ // TODO(https://github.com/grpc/grpc-go/issues/8561): remove IPv6 metadata server queries entirely after old pick first is removed.
+ ipv6Capable = true
+ } else {
+ logger.Infof("GRPC_EXPERIMENTAL_ENABLE_NEW_PICK_FIRST is disabled, setting ipv6Capable node metadata based on metadata server query")
+ }
if ipv6Capable {
node["metadata"] = map[string]any{ipv6CapableMetadataName: true}
}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/balancer.go b/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/balancer.go
deleted file mode 100644
index ff27af026db5..000000000000
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/balancer.go
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- *
- * Copyright 2020 gRPC 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 balancer installs all the xds balancers.
-package balancer
-
-import (
- _ "google.golang.org/grpc/balancer/leastrequest" // Register the least_request_experimental balancer
- _ "google.golang.org/grpc/balancer/weightedtarget" // Register the weighted_target balancer
- _ "google.golang.org/grpc/xds/internal/balancer/cdsbalancer" // Register the CDS balancer
- _ "google.golang.org/grpc/xds/internal/balancer/clusterimpl" // Register the xds_cluster_impl balancer
- _ "google.golang.org/grpc/xds/internal/balancer/clustermanager" // Register the xds_cluster_manager balancer
- _ "google.golang.org/grpc/xds/internal/balancer/clusterresolver" // Register the xds_cluster_resolver balancer
- _ "google.golang.org/grpc/xds/internal/balancer/outlierdetection" // Register the outlier_detection balancer
- _ "google.golang.org/grpc/xds/internal/balancer/priority" // Register the priority balancer
-)
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterimpl/config.go b/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterimpl/config.go
deleted file mode 100644
index 134a568e0fd9..000000000000
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterimpl/config.go
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- *
- * Copyright 2020 gRPC 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 clusterimpl
-
-import (
- "encoding/json"
-
- internalserviceconfig "google.golang.org/grpc/internal/serviceconfig"
- "google.golang.org/grpc/internal/xds/bootstrap"
- "google.golang.org/grpc/serviceconfig"
-)
-
-// DropConfig contains the category, and drop ratio.
-type DropConfig struct {
- Category string
- RequestsPerMillion uint32
-}
-
-// LBConfig is the balancer config for cluster_impl balancer.
-type LBConfig struct {
- serviceconfig.LoadBalancingConfig `json:"-"`
-
- Cluster string `json:"cluster,omitempty"`
- EDSServiceName string `json:"edsServiceName,omitempty"`
- // LoadReportingServer is the LRS server to send load reports to. If not
- // present, load reporting will be disabled.
- LoadReportingServer *bootstrap.ServerConfig `json:"lrsLoadReportingServer,omitempty"`
- MaxConcurrentRequests *uint32 `json:"maxConcurrentRequests,omitempty"`
- DropCategories []DropConfig `json:"dropCategories,omitempty"`
- // TelemetryLabels are the telemetry Labels associated with this cluster.
- TelemetryLabels map[string]string `json:"telemetryLabels,omitempty"`
- ChildPolicy *internalserviceconfig.BalancerConfig `json:"childPolicy,omitempty"`
-}
-
-func parseConfig(c json.RawMessage) (*LBConfig, error) {
- var cfg LBConfig
- if err := json.Unmarshal(c, &cfg); err != nil {
- return nil, err
- }
- return &cfg, nil
-}
-
-func equalDropCategories(a, b []DropConfig) bool {
- if len(a) != len(b) {
- return false
- }
- for i := range a {
- if a[i] != b[i] {
- return false
- }
- }
- return true
-}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/config.go b/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/config.go
deleted file mode 100644
index 7614b0fc57bd..000000000000
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/config.go
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- *
- * Copyright 2021 gRPC 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 clusterresolver
-
-import (
- "bytes"
- "encoding/json"
- "fmt"
-
- internalserviceconfig "google.golang.org/grpc/internal/serviceconfig"
- "google.golang.org/grpc/internal/xds/bootstrap"
- "google.golang.org/grpc/serviceconfig"
- "google.golang.org/grpc/xds/internal/balancer/outlierdetection"
-)
-
-// DiscoveryMechanismType is the type of discovery mechanism.
-type DiscoveryMechanismType int
-
-const (
- // DiscoveryMechanismTypeEDS is eds.
- DiscoveryMechanismTypeEDS DiscoveryMechanismType = iota // `json:"EDS"`
- // DiscoveryMechanismTypeLogicalDNS is DNS.
- DiscoveryMechanismTypeLogicalDNS // `json:"LOGICAL_DNS"`
-)
-
-// MarshalJSON marshals a DiscoveryMechanismType to a quoted json string.
-//
-// This is necessary to handle enum (as strings) from JSON.
-//
-// Note that this needs to be defined on the type not pointer, otherwise the
-// variables of this type will marshal to int not string.
-func (t DiscoveryMechanismType) MarshalJSON() ([]byte, error) {
- buffer := bytes.NewBufferString(`"`)
- switch t {
- case DiscoveryMechanismTypeEDS:
- buffer.WriteString("EDS")
- case DiscoveryMechanismTypeLogicalDNS:
- buffer.WriteString("LOGICAL_DNS")
- }
- buffer.WriteString(`"`)
- return buffer.Bytes(), nil
-}
-
-// UnmarshalJSON unmarshals a quoted json string to the DiscoveryMechanismType.
-func (t *DiscoveryMechanismType) UnmarshalJSON(b []byte) error {
- var s string
- err := json.Unmarshal(b, &s)
- if err != nil {
- return err
- }
- switch s {
- case "EDS":
- *t = DiscoveryMechanismTypeEDS
- case "LOGICAL_DNS":
- *t = DiscoveryMechanismTypeLogicalDNS
- default:
- return fmt.Errorf("unable to unmarshal string %q to type DiscoveryMechanismType", s)
- }
- return nil
-}
-
-// DiscoveryMechanism is the discovery mechanism, can be either EDS or DNS.
-//
-// For DNS, the ClientConn target will be used for name resolution.
-//
-// For EDS, if EDSServiceName is not empty, it will be used for watching. If
-// EDSServiceName is empty, Cluster will be used.
-type DiscoveryMechanism struct {
- // Cluster is the cluster name.
- Cluster string `json:"cluster,omitempty"`
- // LoadReportingServer is the LRS server to send load reports to. If not
- // present, load reporting will be disabled.
- LoadReportingServer *bootstrap.ServerConfig `json:"lrsLoadReportingServer,omitempty"`
- // MaxConcurrentRequests is the maximum number of outstanding requests can
- // be made to the upstream cluster. Default is 1024.
- MaxConcurrentRequests *uint32 `json:"maxConcurrentRequests,omitempty"`
- // Type is the discovery mechanism type.
- Type DiscoveryMechanismType `json:"type,omitempty"`
- // EDSServiceName is the EDS service name, as returned in CDS. May be unset
- // if not specified in CDS. For type EDS only.
- //
- // This is used for EDS watch if set. If unset, Cluster is used for EDS
- // watch.
- EDSServiceName string `json:"edsServiceName,omitempty"`
- // DNSHostname is the DNS name to resolve in "host:port" form. For type
- // LOGICAL_DNS only.
- DNSHostname string `json:"dnsHostname,omitempty"`
- // OutlierDetection is the Outlier Detection LB configuration for this
- // priority.
- OutlierDetection json.RawMessage `json:"outlierDetection,omitempty"`
- // TelemetryLabels are the telemetry labels associated with this cluster.
- TelemetryLabels map[string]string `json:"telemetryLabels,omitempty"`
- outlierDetection outlierdetection.LBConfig
-}
-
-// Equal returns whether the DiscoveryMechanism is the same with the parameter.
-func (dm DiscoveryMechanism) Equal(b DiscoveryMechanism) bool {
- od := &dm.outlierDetection
- switch {
- case dm.Cluster != b.Cluster:
- return false
- case !equalUint32P(dm.MaxConcurrentRequests, b.MaxConcurrentRequests):
- return false
- case dm.Type != b.Type:
- return false
- case dm.EDSServiceName != b.EDSServiceName:
- return false
- case dm.DNSHostname != b.DNSHostname:
- return false
- case !od.EqualIgnoringChildPolicy(&b.outlierDetection):
- return false
- }
-
- if dm.LoadReportingServer == nil && b.LoadReportingServer == nil {
- return true
- }
- if (dm.LoadReportingServer != nil) != (b.LoadReportingServer != nil) {
- return false
- }
- return dm.LoadReportingServer.String() == b.LoadReportingServer.String()
-}
-
-func equalUint32P(a, b *uint32) bool {
- if a == nil && b == nil {
- return true
- }
- if a == nil || b == nil {
- return false
- }
- return *a == *b
-}
-
-// LBConfig is the config for cluster resolver balancer.
-type LBConfig struct {
- serviceconfig.LoadBalancingConfig `json:"-"`
- // DiscoveryMechanisms is an ordered list of discovery mechanisms.
- //
- // Must have at least one element. Results from each discovery mechanism are
- // concatenated together in successive priorities.
- DiscoveryMechanisms []DiscoveryMechanism `json:"discoveryMechanisms,omitempty"`
-
- // XDSLBPolicy specifies the policy for locality picking and endpoint picking.
- XDSLBPolicy json.RawMessage `json:"xdsLbPolicy,omitempty"`
- xdsLBPolicy internalserviceconfig.BalancerConfig
-}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/priority/utils.go b/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/priority/utils.go
deleted file mode 100644
index 45fbe764434a..000000000000
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/priority/utils.go
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- *
- * Copyright 2021 gRPC 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 priority
-
-func equalStringSlice(a, b []string) bool {
- if len(a) != len(b) {
- return false
- }
- for i := range a {
- if a[i] != b[i] {
- return false
- }
- }
- return true
-}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/wrrlocality/balancer.go b/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/wrrlocality/balancer.go
deleted file mode 100644
index 0c99c108f769..000000000000
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/balancer/wrrlocality/balancer.go
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- *
- * Copyright 2023 gRPC 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 wrrlocality provides an implementation of the wrr locality LB policy,
-// as defined in [A52 - xDS Custom LB Policies].
-//
-// [A52 - xDS Custom LB Policies]: https://github.com/grpc/proposal/blob/master/A52-xds-custom-lb-policies.md
-package wrrlocality
-
-import (
- "encoding/json"
- "errors"
- "fmt"
-
- "google.golang.org/grpc/balancer"
- "google.golang.org/grpc/balancer/weightedtarget"
- "google.golang.org/grpc/internal/grpclog"
- internalserviceconfig "google.golang.org/grpc/internal/serviceconfig"
- "google.golang.org/grpc/resolver"
- "google.golang.org/grpc/serviceconfig"
- "google.golang.org/grpc/xds/internal"
-)
-
-// Name is the name of wrr_locality balancer.
-const Name = "xds_wrr_locality_experimental"
-
-func init() {
- balancer.Register(bb{})
-}
-
-type bb struct{}
-
-func (bb) Name() string {
- return Name
-}
-
-// LBConfig is the config for the wrr locality balancer.
-type LBConfig struct {
- serviceconfig.LoadBalancingConfig `json:"-"`
- // ChildPolicy is the config for the child policy.
- ChildPolicy *internalserviceconfig.BalancerConfig `json:"childPolicy,omitempty"`
-}
-
-// To plumb in a different child in tests.
-var weightedTargetName = weightedtarget.Name
-
-func (bb) Build(cc balancer.ClientConn, bOpts balancer.BuildOptions) balancer.Balancer {
- builder := balancer.Get(weightedTargetName)
- if builder == nil {
- // Shouldn't happen, registered through imported weighted target,
- // defensive programming.
- return nil
- }
-
- // Doesn't need to intercept any balancer.ClientConn operations; pass
- // through by just giving cc to child balancer.
- wtb := builder.Build(cc, bOpts)
- if wtb == nil {
- // shouldn't happen, defensive programming.
- return nil
- }
- wtbCfgParser, ok := builder.(balancer.ConfigParser)
- if !ok {
- // Shouldn't happen, imported weighted target builder has this method.
- return nil
- }
- wrrL := &wrrLocalityBalancer{
- child: wtb,
- childParser: wtbCfgParser,
- }
-
- wrrL.logger = prefixLogger(wrrL)
- wrrL.logger.Infof("Created")
- return wrrL
-}
-
-func (bb) ParseConfig(s json.RawMessage) (serviceconfig.LoadBalancingConfig, error) {
- var lbCfg *LBConfig
- if err := json.Unmarshal(s, &lbCfg); err != nil {
- return nil, fmt.Errorf("xds_wrr_locality: invalid LBConfig: %s, error: %v", string(s), err)
- }
- if lbCfg == nil || lbCfg.ChildPolicy == nil {
- return nil, errors.New("xds_wrr_locality: invalid LBConfig: child policy field must be set")
- }
- return lbCfg, nil
-}
-
-type attributeKey struct{}
-
-// Equal allows the values to be compared by Attributes.Equal.
-func (a AddrInfo) Equal(o any) bool {
- oa, ok := o.(AddrInfo)
- return ok && oa.LocalityWeight == a.LocalityWeight
-}
-
-// AddrInfo is the locality weight of the locality an address is a part of.
-type AddrInfo struct {
- LocalityWeight uint32
-}
-
-// SetAddrInfo returns a copy of addr in which the BalancerAttributes field is
-// updated with AddrInfo.
-func SetAddrInfo(addr resolver.Address, addrInfo AddrInfo) resolver.Address {
- addr.BalancerAttributes = addr.BalancerAttributes.WithValue(attributeKey{}, addrInfo)
- return addr
-}
-
-// SetAddrInfoInEndpoint returns a copy of endpoint in which the Attributes
-// field is updated with AddrInfo.
-func SetAddrInfoInEndpoint(endpoint resolver.Endpoint, addrInfo AddrInfo) resolver.Endpoint {
- endpoint.Attributes = endpoint.Attributes.WithValue(attributeKey{}, addrInfo)
- return endpoint
-}
-
-func (a AddrInfo) String() string {
- return fmt.Sprintf("Locality Weight: %d", a.LocalityWeight)
-}
-
-// getAddrInfo returns the AddrInfo stored in the BalancerAttributes field of
-// addr. Returns false if no AddrInfo found.
-func getAddrInfo(addr resolver.Address) (AddrInfo, bool) {
- v := addr.BalancerAttributes.Value(attributeKey{})
- ai, ok := v.(AddrInfo)
- return ai, ok
-}
-
-// wrrLocalityBalancer wraps a weighted target balancer, and builds
-// configuration for the weighted target once it receives configuration
-// specifying the weighted target child balancer and locality weight
-// information.
-type wrrLocalityBalancer struct {
- // child will be a weighted target balancer, and will be built it at
- // wrrLocalityBalancer build time. Other than preparing configuration, other
- // balancer operations are simply pass through.
- child balancer.Balancer
-
- childParser balancer.ConfigParser
-
- logger *grpclog.PrefixLogger
-}
-
-func (b *wrrLocalityBalancer) ExitIdle() {
- b.child.ExitIdle()
-}
-
-func (b *wrrLocalityBalancer) UpdateClientConnState(s balancer.ClientConnState) error {
- lbCfg, ok := s.BalancerConfig.(*LBConfig)
- if !ok {
- b.logger.Errorf("Received config with unexpected type %T: %v", s.BalancerConfig, s.BalancerConfig)
- return balancer.ErrBadResolverState
- }
-
- weightedTargets := make(map[string]weightedtarget.Target)
- for _, addr := range s.ResolverState.Addresses {
- // This get of LocalityID could potentially return a zero value. This
- // shouldn't happen though (this attribute that is set actually gets
- // used to build localities in the first place), and thus don't error
- // out, and just build a weighted target with undefined behavior.
- locality := internal.LocalityString(internal.GetLocalityID(addr))
- ai, ok := getAddrInfo(addr)
- if !ok {
- return fmt.Errorf("xds_wrr_locality: missing locality weight information in address %q", addr)
- }
- weightedTargets[locality] = weightedtarget.Target{Weight: ai.LocalityWeight, ChildPolicy: lbCfg.ChildPolicy}
- }
- wtCfg := &weightedtarget.LBConfig{Targets: weightedTargets}
- wtCfgJSON, err := json.Marshal(wtCfg)
- if err != nil {
- // Shouldn't happen.
- return fmt.Errorf("xds_wrr_locality: error marshalling prepared config: %v", wtCfg)
- }
- var sc serviceconfig.LoadBalancingConfig
- if sc, err = b.childParser.ParseConfig(wtCfgJSON); err != nil {
- return fmt.Errorf("xds_wrr_locality: config generated %v is invalid: %v", wtCfgJSON, err)
- }
-
- return b.child.UpdateClientConnState(balancer.ClientConnState{
- ResolverState: s.ResolverState,
- BalancerConfig: sc,
- })
-}
-
-func (b *wrrLocalityBalancer) ResolverError(err error) {
- b.child.ResolverError(err)
-}
-
-func (b *wrrLocalityBalancer) UpdateSubConnState(sc balancer.SubConn, state balancer.SubConnState) {
- b.logger.Errorf("UpdateSubConnState(%v, %+v) called unexpectedly", sc, state)
-}
-
-func (b *wrrLocalityBalancer) Close() {
- b.child.Close()
-}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/internal/internal.go b/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/internal/internal.go
deleted file mode 100644
index 371b4d19d691..000000000000
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/internal/internal.go
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- *
- * Copyright 2025 gRPC 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 internal contains helpers for xDS and LRS clients.
-package internal
-
-import (
- "google.golang.org/grpc/xds/internal/clients"
- "google.golang.org/protobuf/proto"
- "google.golang.org/protobuf/types/known/structpb"
-
- v3corepb "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
-)
-
-// NodeProto returns a protobuf representation of clients.Node n.
-//
-// This function is intended to be used by the client implementation to convert
-// the user-provided Node configuration to its protobuf representation.
-func NodeProto(n clients.Node) *v3corepb.Node {
- return &v3corepb.Node{
- Id: n.ID,
- Cluster: n.Cluster,
- Locality: func() *v3corepb.Locality {
- if isLocalityEmpty(n.Locality) {
- return nil
- }
- return &v3corepb.Locality{
- Region: n.Locality.Region,
- Zone: n.Locality.Zone,
- SubZone: n.Locality.SubZone,
- }
- }(),
- Metadata: func() *structpb.Struct {
- if n.Metadata == nil {
- return nil
- }
- if md, ok := n.Metadata.(*structpb.Struct); ok {
- return proto.Clone(md).(*structpb.Struct)
- }
- return nil
- }(),
- UserAgentName: n.UserAgentName,
- UserAgentVersionType: &v3corepb.Node_UserAgentVersion{UserAgentVersion: n.UserAgentVersion},
- }
-}
-
-// isLocalityEqual reports whether clients.Locality l is considered empty.
-func isLocalityEmpty(l clients.Locality) bool {
- return isLocalityEqual(l, clients.Locality{})
-}
-
-// isLocalityEqual returns true if clients.Locality l1 and l2 are considered
-// equal.
-func isLocalityEqual(l1, l2 clients.Locality) bool {
- return l1.Region == l2.Region && l1.Zone == l2.Zone && l1.SubZone == l2.SubZone
-}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/clientimpl_watchers.go b/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/clientimpl_watchers.go
deleted file mode 100644
index 913e313e1e24..000000000000
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/clientimpl_watchers.go
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- *
- * Copyright 2025 gRPC 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 xdsclient
-
-import (
- "fmt"
-
- "google.golang.org/grpc/xds/internal/clients/xdsclient/internal/xdsresource"
-)
-
-// wrappingWatcher is a wrapper around an xdsresource.ResourceWatcher that adds
-// the node ID to the error messages reported to the watcher.
-type wrappingWatcher struct {
- ResourceWatcher
- nodeID string
-}
-
-func (w *wrappingWatcher) AmbientError(err error, done func()) {
- w.ResourceWatcher.AmbientError(fmt.Errorf("[xDS node id: %v]: %w", w.nodeID, err), done)
-}
-
-func (w *wrappingWatcher) ResourceError(err error, done func()) {
- w.ResourceWatcher.ResourceError(fmt.Errorf("[xDS node id: %v]: %w", w.nodeID, err), done)
-}
-
-// WatchResource starts watching the specified resource.
-//
-// typeURL specifies the resource type implementation to use. The watch fails
-// if there is no resource type implementation for the given typeURL. See the
-// ResourceTypes field in the Config struct used to create the XDSClient.
-//
-// The returned function cancels the watch and prevents future calls to the
-// watcher.
-func (c *XDSClient) WatchResource(typeURL, resourceName string, watcher ResourceWatcher) (cancel func()) {
- // Return early if the client is already closed.
- if c.done.HasFired() {
- logger.Warningf("Watch registered for type %q, but client is closed", typeURL)
- return func() {}
- }
-
- watcher = &wrappingWatcher{
- ResourceWatcher: watcher,
- nodeID: c.config.Node.ID,
- }
-
- rType, ok := c.config.ResourceTypes[typeURL]
- if !ok {
- logger.Warningf("ResourceType implementation for resource type url %v is not found", rType.TypeURL)
- watcher.ResourceError(fmt.Errorf("ResourceType implementation for resource type url %v is not found", rType.TypeURL), func() {})
- return func() {}
- }
-
- n := xdsresource.ParseName(resourceName)
- a := c.getAuthorityForResource(n)
- if a == nil {
- logger.Warningf("Watch registered for name %q of type %q, authority %q is not found", rType.TypeName, resourceName, n.Authority)
- watcher.ResourceError(fmt.Errorf("authority %q not found in bootstrap config for resource %q", n.Authority, resourceName), func() {})
- return func() {}
- }
- // The watchResource method on the authority is invoked with n.String()
- // instead of resourceName because n.String() canonicalizes the given name.
- // So, two resource names which don't differ in the query string, but only
- // differ in the order of context params will result in the same resource
- // being watched by the authority.
- return a.watchResource(rType, n.String(), watcher)
-}
-
-// Gets the authority for the given resource name.
-//
-// See examples in this section of the gRFC:
-// https://github.com/grpc/proposal/blob/master/A47-xds-federation.md#bootstrap-config-changes
-func (c *XDSClient) getAuthorityForResource(name *xdsresource.Name) *authority {
- // For new-style resource names, always lookup the authorities map. If the
- // name does not specify an authority, we will end up looking for an entry
- // in the map with the empty string as the key.
- if name.Scheme == xdsresource.FederationScheme {
- return c.authorities[name.Authority]
- }
-
- // For old-style resource names, we use the top-level authority if the name
- // does not specify an authority.
- if name.Authority == "" {
- return c.topLevelAuthority
- }
- return c.authorities[name.Authority]
-}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/internal/internal.go b/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/internal/internal.go
deleted file mode 100644
index 7adb67190939..000000000000
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/clients/xdsclient/internal/internal.go
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *
- * Copyright 2025 gRPC 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 internal contains functionality internal to the xdsclient package.
-package internal
-
-import "time"
-
-var (
- // WatchExpiryTimeout is the watch expiry timeout for xDS client. It can be
- // overridden by tests to change the default watch expiry timeout.
- WatchExpiryTimeout time.Duration
-
- // StreamBackoff is the stream backoff for xDS client. It can be overridden
- // by tests to change the default backoff strategy.
- StreamBackoff func(int) time.Duration
-
- // ResourceWatchStateForTesting gets the watch state for the resource
- // identified by the given resource type and resource name. Returns a
- // non-nil error if there is no such resource being watched.
- ResourceWatchStateForTesting any // func(*xdsclient.XDSClient, xdsclient.ResourceType, string) error
-)
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/internal.go b/hack/tools/vendor/google.golang.org/grpc/xds/internal/internal.go
deleted file mode 100644
index 9e0b7931b5f7..000000000000
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/internal.go
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- *
- * Copyright 2019 gRPC 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 internal contains functions/structs shared by xds
-// balancers/resolvers.
-package internal
-
-import (
- "fmt"
-
- "google.golang.org/grpc/resolver"
- "google.golang.org/grpc/xds/internal/clients"
-)
-
-// LocalityString generates a string representation of clients.Locality in the
-// format specified in gRFC A76.
-func LocalityString(l clients.Locality) string {
- return fmt.Sprintf("{region=%q, zone=%q, sub_zone=%q}", l.Region, l.Zone, l.SubZone)
-}
-
-// IsLocalityEqual allows the values to be compared by Attributes.Equal.
-func IsLocalityEqual(l clients.Locality, o any) bool {
- ol, ok := o.(clients.Locality)
- if !ok {
- return false
- }
- return l.Region == ol.Region && l.Zone == ol.Zone && l.SubZone == ol.SubZone
-}
-
-// LocalityFromString converts a string representation of clients.locality as
-// specified in gRFC A76, into a LocalityID struct.
-func LocalityFromString(s string) (ret clients.Locality, _ error) {
- _, err := fmt.Sscanf(s, "{region=%q, zone=%q, sub_zone=%q}", &ret.Region, &ret.Zone, &ret.SubZone)
- if err != nil {
- return clients.Locality{}, fmt.Errorf("%s is not a well formatted locality ID, error: %v", s, err)
- }
- return ret, nil
-}
-
-type localityKeyType string
-
-const localityKey = localityKeyType("grpc.xds.internal.address.locality")
-
-// GetLocalityID returns the locality ID of addr.
-func GetLocalityID(addr resolver.Address) clients.Locality {
- path, _ := addr.BalancerAttributes.Value(localityKey).(clients.Locality)
- return path
-}
-
-// SetLocalityID sets locality ID in addr to l.
-func SetLocalityID(addr resolver.Address, l clients.Locality) resolver.Address {
- addr.BalancerAttributes = addr.BalancerAttributes.WithValue(localityKey, l)
- return addr
-}
-
-// SetLocalityIDInEndpoint sets locality ID in endpoint to l.
-func SetLocalityIDInEndpoint(endpoint resolver.Endpoint, l clients.Locality) resolver.Endpoint {
- endpoint.Attributes = endpoint.Attributes.WithValue(localityKey, l)
- return endpoint
-}
-
-// ResourceTypeMapForTesting maps TypeUrl to corresponding ResourceType.
-var ResourceTypeMapForTesting map[string]any
-
-// UnknownCSMLabels are TelemetryLabels emitted from CDS if CSM Telemetry Label
-// data is not present in the CDS Resource.
-var UnknownCSMLabels = map[string]string{
- "csm.service_name": "unknown",
- "csm.service_namespace_name": "unknown",
-}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/client.go b/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/client.go
deleted file mode 100644
index 42f1a28f0c08..000000000000
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/client.go
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- *
- * Copyright 2019 gRPC 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 xdsclient implements a full fledged gRPC client for the xDS API used
-// by the xds resolver and balancer implementations.
-package xdsclient
-
-import (
- "context"
-
- v3statuspb "github.com/envoyproxy/go-control-plane/envoy/service/status/v3"
- "google.golang.org/grpc/internal/xds/bootstrap"
- "google.golang.org/grpc/xds/internal/clients/lrsclient"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource"
-)
-
-// XDSClient is a full fledged gRPC client which queries a set of discovery APIs
-// (collectively termed as xDS) on a remote management server, to discover
-// various dynamic resources.
-type XDSClient interface {
- // WatchResource uses xDS to discover the resource associated with the
- // provided resource name. The resource type implementation determines how
- // xDS responses are are deserialized and validated, as received from the
- // xDS management server. Upon receipt of a response from the management
- // server, an appropriate callback on the watcher is invoked.
- //
- // Most callers will not have a need to use this API directly. They will
- // instead use a resource-type-specific wrapper API provided by the relevant
- // resource type implementation.
- //
- //
- // During a race (e.g. an xDS response is received while the user is calling
- // cancel()), there's a small window where the callback can be called after
- // the watcher is canceled. Callers need to handle this case.
- WatchResource(rType xdsresource.Type, resourceName string, watcher xdsresource.ResourceWatcher) (cancel func())
-
- ReportLoad(*bootstrap.ServerConfig) (*lrsclient.LoadStore, func(context.Context))
-
- BootstrapConfig() *bootstrap.Config
-}
-
-// DumpResources returns the status and contents of all xDS resources. It uses
-// xDS clients from the default pool.
-func DumpResources() *v3statuspb.ClientStatusResponse {
- return DefaultPool.DumpResources()
-}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_loadreport.go b/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_loadreport.go
deleted file mode 100644
index 39004ae7ef77..000000000000
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_loadreport.go
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- *
- * Copyright 2019 gRPC 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 xdsclient
-
-import (
- "context"
- "sync"
-
- "google.golang.org/grpc/internal/xds/bootstrap"
- "google.golang.org/grpc/xds/internal/clients"
- "google.golang.org/grpc/xds/internal/clients/grpctransport"
- "google.golang.org/grpc/xds/internal/clients/lrsclient"
-)
-
-// ReportLoad starts a load reporting stream to the given server. All load
-// reports to the same server share the LRS stream.
-//
-// It returns a lrsclient.LoadStore for the user to report loads.
-func (c *clientImpl) ReportLoad(server *bootstrap.ServerConfig) (*lrsclient.LoadStore, func(context.Context)) {
- if c.lrsClient == nil {
- lrsC, err := lrsclient.New(lrsclient.Config{
- Node: c.xdsClientConfig.Node,
- TransportBuilder: c.xdsClientConfig.TransportBuilder,
- })
- if err != nil {
- c.logger.Warningf("Failed to create an lrs client to the management server to report load: %v", server, err)
- return nil, func(context.Context) {}
- }
- c.lrsClient = lrsC
- }
-
- load, err := c.lrsClient.ReportLoad(clients.ServerIdentifier{
- ServerURI: server.ServerURI(),
- Extensions: grpctransport.ServerIdentifierExtension{
- ConfigName: server.SelectedCreds().Type,
- },
- })
- if err != nil {
- c.logger.Warningf("Failed to create a load store to the management server to report load: %v", server, err)
- return nil, func(context.Context) {}
- }
- var loadStop sync.Once
- return load, func(ctx context.Context) {
- loadStop.Do(func() { load.Stop(ctx) })
- }
-}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_watchers.go b/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_watchers.go
deleted file mode 100644
index 29435993f135..000000000000
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_watchers.go
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- *
- * Copyright 2020 gRPC 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 xdsclient
-
-import (
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource"
-)
-
-// WatchResource uses xDS to discover the resource associated with the provided
-// resource name. The resource type implementation determines how xDS responses
-// are are deserialized and validated, as received from the xDS management
-// server. Upon receipt of a response from the management server, an
-// appropriate callback on the watcher is invoked.
-func (c *clientImpl) WatchResource(rType xdsresource.Type, resourceName string, watcher xdsresource.ResourceWatcher) (cancel func()) {
- return c.XDSClient.WatchResource(rType.TypeURL(), resourceName, xdsresource.GenericResourceWatcher(watcher))
-}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/pool.go b/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/pool.go
deleted file mode 100644
index d1cc84762307..000000000000
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/pool.go
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- *
- * Copyright 2024 gRPC 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 xdsclient
-
-import (
- "fmt"
- "sync"
- "time"
-
- v3statuspb "github.com/envoyproxy/go-control-plane/envoy/service/status/v3"
- estats "google.golang.org/grpc/experimental/stats"
- "google.golang.org/grpc/internal/envconfig"
- istats "google.golang.org/grpc/internal/stats"
- "google.golang.org/grpc/internal/xds/bootstrap"
- "google.golang.org/protobuf/proto"
-)
-
-var (
- // DefaultPool is the default pool for xDS clients. It is created at init
- // time and reads bootstrap configuration from env vars to create the xDS
- // client.
- DefaultPool = &Pool{
- clients: make(map[string]*clientImpl),
- getConfiguration: sync.OnceValues(bootstrap.GetConfiguration),
- }
-)
-
-// Pool represents a pool of xDS clients that share the same bootstrap
-// configuration.
-type Pool struct {
- // Note that mu should ideally only have to guard clients. But here, we need
- // it to guard config as well since SetFallbackBootstrapConfig writes to
- // config.
- mu sync.Mutex
- clients map[string]*clientImpl
- fallbackConfig *bootstrap.Config
- // getConfiguration is a sync.OnceValues that attempts to read the bootstrap
- // configuration from environment variables once.
- getConfiguration func() (*bootstrap.Config, error)
-}
-
-// OptionsForTesting contains options to configure xDS client creation for
-// testing purposes only.
-type OptionsForTesting struct {
- // Name is a unique name for this xDS client.
- Name string
-
- // WatchExpiryTimeout is the timeout for xDS resource watch expiry. If
- // unspecified, uses the default value used in non-test code.
- WatchExpiryTimeout time.Duration
-
- // StreamBackoffAfterFailure is the backoff function used to determine the
- // backoff duration after stream failures.
- // If unspecified, uses the default value used in non-test code.
- StreamBackoffAfterFailure func(int) time.Duration
-
- // MetricsRecorder is the metrics recorder the xDS Client will use. If
- // unspecified, uses a no-op MetricsRecorder.
- MetricsRecorder estats.MetricsRecorder
-}
-
-// NewPool creates a new xDS client pool with the given bootstrap config.
-//
-// If a nil bootstrap config is passed and SetFallbackBootstrapConfig is not
-// called before a call to NewClient, the latter will fail. i.e. if there is an
-// attempt to create an xDS client from the pool without specifying bootstrap
-// configuration (either at pool creation time or by setting the fallback
-// bootstrap configuration), xDS client creation will fail.
-func NewPool(config *bootstrap.Config) *Pool {
- return &Pool{
- clients: make(map[string]*clientImpl),
- getConfiguration: func() (*bootstrap.Config, error) {
- return config, nil
- },
- }
-}
-
-// NewClient returns an xDS client with the given name from the pool. If the
-// client doesn't already exist, it creates a new xDS client and adds it to the
-// pool.
-//
-// The second return value represents a close function which the caller is
-// expected to invoke once they are done using the client. It is safe for the
-// caller to invoke this close function multiple times.
-func (p *Pool) NewClient(name string, metricsRecorder estats.MetricsRecorder) (XDSClient, func(), error) {
- return p.newRefCounted(name, metricsRecorder)
-}
-
-// NewClientForTesting returns an xDS client configured with the provided
-// options from the pool. If the client doesn't already exist, it creates a new
-// xDS client and adds it to the pool.
-//
-// The second return value represents a close function which the caller is
-// expected to invoke once they are done using the client. It is safe for the
-// caller to invoke this close function multiple times.
-//
-// # Testing Only
-//
-// This function should ONLY be used for testing purposes.
-func (p *Pool) NewClientForTesting(opts OptionsForTesting) (XDSClient, func(), error) {
- if opts.Name == "" {
- return nil, nil, fmt.Errorf("xds: opts.Name field must be non-empty")
- }
- if opts.WatchExpiryTimeout == 0 {
- opts.WatchExpiryTimeout = defaultWatchExpiryTimeout
- }
- if opts.StreamBackoffAfterFailure == nil {
- opts.StreamBackoffAfterFailure = defaultExponentialBackoff
- }
- if opts.MetricsRecorder == nil {
- opts.MetricsRecorder = istats.NewMetricsRecorderList(nil)
- }
- c, cancel, err := p.newRefCounted(opts.Name, opts.MetricsRecorder)
- if err != nil {
- return nil, nil, err
- }
- c.SetWatchExpiryTimeoutForTesting(opts.WatchExpiryTimeout)
- return c, cancel, nil
-}
-
-// GetClientForTesting returns an xDS client created earlier using the given
-// name from the pool. If the client with the given name doesn't already exist,
-// it returns an error.
-//
-// The second return value represents a close function which the caller is
-// expected to invoke once they are done using the client. It is safe for the
-// caller to invoke this close function multiple times.
-//
-// # Testing Only
-//
-// This function should ONLY be used for testing purposes.
-func (p *Pool) GetClientForTesting(name string) (XDSClient, func(), error) {
- p.mu.Lock()
- defer p.mu.Unlock()
-
- c, ok := p.clients[name]
- if !ok {
- return nil, nil, fmt.Errorf("xds:: xDS client with name %q not found", name)
- }
- c.incrRef()
- return c, sync.OnceFunc(func() { p.clientRefCountedClose(name) }), nil
-}
-
-// SetFallbackBootstrapConfig is used to specify a bootstrap configuration
-// that will be used as a fallback when the bootstrap environment variables
-// are not defined.
-func (p *Pool) SetFallbackBootstrapConfig(config *bootstrap.Config) {
- p.mu.Lock()
- defer p.mu.Unlock()
- p.fallbackConfig = config
-}
-
-// DumpResources returns the status and contents of all xDS resources.
-func (p *Pool) DumpResources() *v3statuspb.ClientStatusResponse {
- p.mu.Lock()
- defer p.mu.Unlock()
-
- resp := &v3statuspb.ClientStatusResponse{}
- for key, client := range p.clients {
- b, err := client.DumpResources()
- if err != nil {
- return nil
- }
- r := &v3statuspb.ClientStatusResponse{}
- if err := proto.Unmarshal(b, r); err != nil {
- return nil
- }
- cfg := r.Config[0]
- cfg.ClientScope = key
- resp.Config = append(resp.Config, cfg)
- }
- return resp
-}
-
-// BootstrapConfigForTesting returns the bootstrap configuration used by the
-// pool. The caller should not mutate the returned config.
-//
-// To be used only for testing purposes.
-func (p *Pool) BootstrapConfigForTesting() *bootstrap.Config {
- p.mu.Lock()
- defer p.mu.Unlock()
- cfg, _ := p.getConfiguration()
- if cfg != nil {
- return cfg
- }
- return p.fallbackConfig
-}
-
-// UnsetBootstrapConfigForTesting unsets the bootstrap configuration used by
-// the pool.
-//
-// To be used only for testing purposes.
-func (p *Pool) UnsetBootstrapConfigForTesting() {
- p.mu.Lock()
- defer p.mu.Unlock()
- p.fallbackConfig = nil
- p.getConfiguration = sync.OnceValues(bootstrap.GetConfiguration)
-}
-
-func (p *Pool) clientRefCountedClose(name string) {
- p.mu.Lock()
- client, ok := p.clients[name]
- if !ok {
- logger.Errorf("Attempt to close a non-existent xDS client with name %s", name)
- p.mu.Unlock()
- return
- }
- if client.decrRef() != 0 {
- p.mu.Unlock()
- return
- }
- delete(p.clients, name)
-
- for _, s := range client.bootstrapConfig.XDSServers() {
- for _, f := range s.Cleanups() {
- f()
- }
- }
- for _, a := range client.bootstrapConfig.Authorities() {
- for _, s := range a.XDSServers {
- for _, f := range s.Cleanups() {
- f()
- }
- }
- }
- p.mu.Unlock()
-
- // This attempts to close the transport to the management server and could
- // theoretically call back into the xdsclient package again and deadlock.
- // Hence, this needs to be called without holding the lock.
- client.Close()
-
- xdsClientImplCloseHook(name)
-}
-
-// newRefCounted creates a new reference counted xDS client implementation for
-// name, if one does not exist already. If an xDS client for the given name
-// exists, it gets a reference to it and returns it.
-func (p *Pool) newRefCounted(name string, metricsRecorder estats.MetricsRecorder) (*clientImpl, func(), error) {
- p.mu.Lock()
- defer p.mu.Unlock()
-
- config, err := p.getConfiguration()
- if err != nil {
- return nil, nil, fmt.Errorf("xds: failed to read xDS bootstrap config from env vars: %v", err)
- }
-
- if config == nil {
- // If the environment variables are not set, then fallback bootstrap
- // configuration should be set before attempting to create an xDS client,
- // else xDS client creation will fail.
- config = p.fallbackConfig
- }
- if config == nil {
- return nil, nil, fmt.Errorf("failed to read xDS bootstrap config from env vars: bootstrap environment variables (%q or %q) not defined and fallback config not set", envconfig.XDSBootstrapFileNameEnv, envconfig.XDSBootstrapFileContentEnv)
- }
-
- if c := p.clients[name]; c != nil {
- c.incrRef()
- return c, sync.OnceFunc(func() { p.clientRefCountedClose(name) }), nil
- }
-
- c, err := newClientImpl(config, metricsRecorder, name)
- if err != nil {
- return nil, nil, err
- }
- if logger.V(2) {
- c.logger.Infof("Created client with name %q and bootstrap configuration:\n %s", name, config)
- }
- p.clients[name] = c
- xdsClientImplCreateHook(name)
-
- logger.Infof("xDS node ID: %s", config.Node().GetId())
- return c, sync.OnceFunc(func() { p.clientRefCountedClose(name) }), nil
-}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_eds.go b/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_eds.go
deleted file mode 100644
index d56b42dd360e..000000000000
--- a/hack/tools/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_eds.go
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- *
- * Copyright 2021 gRPC 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 xdsresource
-
-import (
- "fmt"
- "math"
- "net"
- "strconv"
-
- v3corepb "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
- v3endpointpb "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3"
- v3typepb "github.com/envoyproxy/go-control-plane/envoy/type/v3"
- "google.golang.org/grpc/internal/envconfig"
- "google.golang.org/grpc/internal/pretty"
- "google.golang.org/grpc/xds/internal"
- "google.golang.org/grpc/xds/internal/clients"
- "google.golang.org/protobuf/proto"
- "google.golang.org/protobuf/types/known/anypb"
-)
-
-func unmarshalEndpointsResource(r *anypb.Any) (string, EndpointsUpdate, error) {
- r, err := UnwrapResource(r)
- if err != nil {
- return "", EndpointsUpdate{}, fmt.Errorf("failed to unwrap resource: %v", err)
- }
-
- if !IsEndpointsResource(r.GetTypeUrl()) {
- return "", EndpointsUpdate{}, fmt.Errorf("unexpected resource type: %q ", r.GetTypeUrl())
- }
-
- cla := &v3endpointpb.ClusterLoadAssignment{}
- if err := proto.Unmarshal(r.GetValue(), cla); err != nil {
- return "", EndpointsUpdate{}, fmt.Errorf("failed to unmarshal resource: %v", err)
- }
-
- u, err := parseEDSRespProto(cla)
- if err != nil {
- return cla.GetClusterName(), EndpointsUpdate{}, err
- }
- u.Raw = r
- return cla.GetClusterName(), u, nil
-}
-
-func parseAddress(socketAddress *v3corepb.SocketAddress) string {
- return net.JoinHostPort(socketAddress.GetAddress(), strconv.Itoa(int(socketAddress.GetPortValue())))
-}
-
-func parseDropPolicy(dropPolicy *v3endpointpb.ClusterLoadAssignment_Policy_DropOverload) OverloadDropConfig {
- percentage := dropPolicy.GetDropPercentage()
- var (
- numerator = percentage.GetNumerator()
- denominator uint32
- )
- switch percentage.GetDenominator() {
- case v3typepb.FractionalPercent_HUNDRED:
- denominator = 100
- case v3typepb.FractionalPercent_TEN_THOUSAND:
- denominator = 10000
- case v3typepb.FractionalPercent_MILLION:
- denominator = 1000000
- }
- return OverloadDropConfig{
- Category: dropPolicy.GetCategory(),
- Numerator: numerator,
- Denominator: denominator,
- }
-}
-
-func parseEndpoints(lbEndpoints []*v3endpointpb.LbEndpoint, uniqueEndpointAddrs map[string]bool) ([]Endpoint, error) {
- endpoints := make([]Endpoint, 0, len(lbEndpoints))
- for _, lbEndpoint := range lbEndpoints {
- // If the load_balancing_weight field is specified, it must be set to a
- // value of at least 1. If unspecified, each host is presumed to have
- // equal weight in a locality.
- weight := uint32(1)
- if w := lbEndpoint.GetLoadBalancingWeight(); w != nil {
- if w.GetValue() == 0 {
- return nil, fmt.Errorf("EDS response contains an endpoint with zero weight: %+v", lbEndpoint)
- }
- weight = w.GetValue()
- }
- addrs := []string{parseAddress(lbEndpoint.GetEndpoint().GetAddress().GetSocketAddress())}
- if envconfig.XDSDualstackEndpointsEnabled {
- for _, sa := range lbEndpoint.GetEndpoint().GetAdditionalAddresses() {
- addrs = append(addrs, parseAddress(sa.GetAddress().GetSocketAddress()))
- }
- }
-
- for _, a := range addrs {
- if uniqueEndpointAddrs[a] {
- return nil, fmt.Errorf("duplicate endpoint with the same address %s", a)
- }
- uniqueEndpointAddrs[a] = true
- }
- endpoints = append(endpoints, Endpoint{
- HealthStatus: EndpointHealthStatus(lbEndpoint.GetHealthStatus()),
- Addresses: addrs,
- Weight: weight,
- HashKey: hashKey(lbEndpoint),
- })
- }
- return endpoints, nil
-}
-
-// hashKey extracts and returns the hash key from the given LbEndpoint. If no
-// hash key is found, it returns an empty string.
-func hashKey(lbEndpoint *v3endpointpb.LbEndpoint) string {
- // "The xDS resolver, described in A74, will be changed to set the hash_key
- // endpoint attribute to the value of LbEndpoint.Metadata envoy.lb hash_key
- // field, as described in Envoy's documentation for the ring hash load
- // balancer." - A76
- if envconfig.XDSEndpointHashKeyBackwardCompat {
- return ""
- }
- envoyLB := lbEndpoint.GetMetadata().GetFilterMetadata()["envoy.lb"]
- if envoyLB != nil {
- if h := envoyLB.GetFields()["hash_key"]; h != nil {
- return h.GetStringValue()
- }
- }
- return ""
-}
-
-func parseEDSRespProto(m *v3endpointpb.ClusterLoadAssignment) (EndpointsUpdate, error) {
- ret := EndpointsUpdate{}
- for _, dropPolicy := range m.GetPolicy().GetDropOverloads() {
- ret.Drops = append(ret.Drops, parseDropPolicy(dropPolicy))
- }
- priorities := make(map[uint32]map[string]bool)
- sumOfWeights := make(map[uint32]uint64)
- uniqueEndpointAddrs := make(map[string]bool)
- for _, locality := range m.Endpoints {
- l := locality.GetLocality()
- if l == nil {
- return EndpointsUpdate{}, fmt.Errorf("EDS response contains a locality without ID, locality: %+v", locality)
- }
- weight := locality.GetLoadBalancingWeight().GetValue()
- if weight == 0 {
- logger.Warningf("Ignoring locality %s with weight 0", pretty.ToJSON(l))
- continue
- }
- priority := locality.GetPriority()
- sumOfWeights[priority] += uint64(weight)
- if sumOfWeights[priority] > math.MaxUint32 {
- return EndpointsUpdate{}, fmt.Errorf("sum of weights of localities at the same priority %d exceeded maximal value", priority)
- }
- localitiesWithPriority := priorities[priority]
- if localitiesWithPriority == nil {
- localitiesWithPriority = make(map[string]bool)
- priorities[priority] = localitiesWithPriority
- }
- lid := clients.Locality{
- Region: l.Region,
- Zone: l.Zone,
- SubZone: l.SubZone,
- }
- lidStr := internal.LocalityString(lid)
-
- // "Since an xDS configuration can place a given locality under multiple
- // priorities, it is possible to see locality weight attributes with
- // different values for the same locality." - A52
- //
- // This is handled in the client by emitting the locality weight
- // specified for the priority it is specified in. If the same locality
- // has a different weight in two priorities, each priority will specify
- // a locality with the locality weight specified for that priority, and
- // thus the subsequent tree of balancers linked to that priority will
- // use that locality weight as well.
- if localitiesWithPriority[lidStr] {
- return EndpointsUpdate{}, fmt.Errorf("duplicate locality %s with the same priority %v", lidStr, priority)
- }
- localitiesWithPriority[lidStr] = true
- endpoints, err := parseEndpoints(locality.GetLbEndpoints(), uniqueEndpointAddrs)
- if err != nil {
- return EndpointsUpdate{}, err
- }
- ret.Localities = append(ret.Localities, Locality{
- ID: lid,
- Endpoints: endpoints,
- Weight: weight,
- Priority: priority,
- })
- }
- for i := 0; i < len(priorities); i++ {
- if _, ok := priorities[uint32(i)]; !ok {
- return EndpointsUpdate{}, fmt.Errorf("priority %v missing (with different priorities %v received)", i, priorities)
- }
- }
- return ret, nil
-}
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/server.go b/hack/tools/vendor/google.golang.org/grpc/xds/server.go
index 5baf91def228..d49396cec1d0 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/server.go
+++ b/hack/tools/vendor/google.golang.org/grpc/xds/server.go
@@ -35,11 +35,11 @@ import (
istats "google.golang.org/grpc/internal/stats"
"google.golang.org/grpc/internal/transport"
"google.golang.org/grpc/internal/xds/bootstrap"
+ "google.golang.org/grpc/internal/xds/server"
+ "google.golang.org/grpc/internal/xds/xdsclient"
+ "google.golang.org/grpc/internal/xds/xdsclient/xdsresource"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
- "google.golang.org/grpc/xds/internal/server"
- "google.golang.org/grpc/xds/internal/xdsclient"
- "google.golang.org/grpc/xds/internal/xdsclient/xdsresource"
)
const serverPrefix = "[xds-server %p] "
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/server_options.go b/hack/tools/vendor/google.golang.org/grpc/xds/server_options.go
index 4e3e3e9e27af..c72d93ec3f61 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/server_options.go
+++ b/hack/tools/vendor/google.golang.org/grpc/xds/server_options.go
@@ -24,7 +24,7 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/connectivity"
"google.golang.org/grpc/internal/xds/bootstrap"
- "google.golang.org/grpc/xds/internal/xdsclient"
+ "google.golang.org/grpc/internal/xds/xdsclient"
)
type serverOptions struct {
diff --git a/hack/tools/vendor/google.golang.org/grpc/xds/xds.go b/hack/tools/vendor/google.golang.org/grpc/xds/xds.go
index 943d09f17e0f..c6a1f25f7aad 100644
--- a/hack/tools/vendor/google.golang.org/grpc/xds/xds.go
+++ b/hack/tools/vendor/google.golang.org/grpc/xds/xds.go
@@ -38,13 +38,13 @@ import (
"google.golang.org/grpc/xds/csds"
_ "google.golang.org/grpc/credentials/tls/certprovider/pemfile" // Register the file watcher certificate provider plugin.
- _ "google.golang.org/grpc/xds/internal/balancer" // Register the balancers.
- _ "google.golang.org/grpc/xds/internal/clusterspecifier/rls" // Register the RLS cluster specifier plugin. Note that this does not register the RLS LB policy.
- _ "google.golang.org/grpc/xds/internal/httpfilter/fault" // Register the fault injection filter.
- _ "google.golang.org/grpc/xds/internal/httpfilter/rbac" // Register the RBAC filter.
- _ "google.golang.org/grpc/xds/internal/httpfilter/router" // Register the router filter.
- _ "google.golang.org/grpc/xds/internal/resolver" // Register the xds_resolver.
- _ "google.golang.org/grpc/xds/internal/xdsclient/xdslbregistry/converter" // Register the xDS LB Registry Converters.
+ _ "google.golang.org/grpc/internal/xds/balancer" // Register the balancers.
+ _ "google.golang.org/grpc/internal/xds/clusterspecifier/rls" // Register the RLS cluster specifier plugin. Note that this does not register the RLS LB policy.
+ _ "google.golang.org/grpc/internal/xds/httpfilter/fault" // Register the fault injection filter.
+ _ "google.golang.org/grpc/internal/xds/httpfilter/rbac" // Register the RBAC filter.
+ _ "google.golang.org/grpc/internal/xds/httpfilter/router" // Register the router filter.
+ _ "google.golang.org/grpc/internal/xds/resolver" // Register the xds_resolver.
+ _ "google.golang.org/grpc/internal/xds/xdsclient/xdslbregistry/converter" // Register the xDS LB Registry Converters.
v3statusgrpc "github.com/envoyproxy/go-control-plane/envoy/service/status/v3"
)
diff --git a/hack/tools/vendor/google.golang.org/protobuf/encoding/protowire/wire.go b/hack/tools/vendor/google.golang.org/protobuf/encoding/protowire/wire.go
index e942bc983eed..743bfb81d6c4 100644
--- a/hack/tools/vendor/google.golang.org/protobuf/encoding/protowire/wire.go
+++ b/hack/tools/vendor/google.golang.org/protobuf/encoding/protowire/wire.go
@@ -371,7 +371,31 @@ func ConsumeVarint(b []byte) (v uint64, n int) {
func SizeVarint(v uint64) int {
// This computes 1 + (bits.Len64(v)-1)/7.
// 9/64 is a good enough approximation of 1/7
- return int(9*uint32(bits.Len64(v))+64) / 64
+ //
+ // The Go compiler can translate the bits.LeadingZeros64 call into the LZCNT
+ // instruction, which is very fast on CPUs from the last few years. The
+ // specific way of expressing the calculation matches C++ Protobuf, see
+ // https://godbolt.org/z/4P3h53oM4 for the C++ code and how gcc/clang
+ // optimize that function for GOAMD64=v1 and GOAMD64=v3 (-march=haswell).
+
+ // By OR'ing v with 1, we guarantee that v is never 0, without changing the
+ // result of SizeVarint. LZCNT is not defined for 0, meaning the compiler
+ // needs to add extra instructions to handle that case.
+ //
+ // The Go compiler currently (go1.24.4) does not make use of this knowledge.
+ // This opportunity (removing the XOR instruction, which handles the 0 case)
+ // results in a small (1%) performance win across CPU architectures.
+ //
+ // Independently of avoiding the 0 case, we need the v |= 1 line because
+ // it allows the Go compiler to eliminate an extra XCHGL barrier.
+ v |= 1
+
+ // It would be clearer to write log2value := 63 - uint32(...), but
+ // writing uint32(...) ^ 63 is much more efficient (-14% ARM, -20% Intel).
+ // Proof of identity for our value range [0..63]:
+ // https://go.dev/play/p/Pdn9hEWYakX
+ log2value := uint32(bits.LeadingZeros64(v)) ^ 63
+ return int((log2value*9 + (64 + 9)) / 64)
}
// AppendFixed32 appends v to b as a little-endian uint32.
diff --git a/hack/tools/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb b/hack/tools/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb
index 323829da1477..04696351eeee 100644
Binary files a/hack/tools/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb and b/hack/tools/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb differ
diff --git a/hack/tools/vendor/google.golang.org/protobuf/internal/filedesc/desc.go b/hack/tools/vendor/google.golang.org/protobuf/internal/filedesc/desc.go
index 688aabe434ef..dbcf90b871fd 100644
--- a/hack/tools/vendor/google.golang.org/protobuf/internal/filedesc/desc.go
+++ b/hack/tools/vendor/google.golang.org/protobuf/internal/filedesc/desc.go
@@ -72,9 +72,10 @@ type (
EditionFeatures EditionFeatures
}
FileL2 struct {
- Options func() protoreflect.ProtoMessage
- Imports FileImports
- Locations SourceLocations
+ Options func() protoreflect.ProtoMessage
+ Imports FileImports
+ OptionImports func() protoreflect.FileImports
+ Locations SourceLocations
}
// EditionFeatures is a frequently-instantiated struct, so please take care
@@ -126,12 +127,9 @@ func (fd *File) ParentFile() protoreflect.FileDescriptor { return fd }
func (fd *File) Parent() protoreflect.Descriptor { return nil }
func (fd *File) Index() int { return 0 }
func (fd *File) Syntax() protoreflect.Syntax { return fd.L1.Syntax }
-
-// Not exported and just used to reconstruct the original FileDescriptor proto
-func (fd *File) Edition() int32 { return int32(fd.L1.Edition) }
-func (fd *File) Name() protoreflect.Name { return fd.L1.Package.Name() }
-func (fd *File) FullName() protoreflect.FullName { return fd.L1.Package }
-func (fd *File) IsPlaceholder() bool { return false }
+func (fd *File) Name() protoreflect.Name { return fd.L1.Package.Name() }
+func (fd *File) FullName() protoreflect.FullName { return fd.L1.Package }
+func (fd *File) IsPlaceholder() bool { return false }
func (fd *File) Options() protoreflect.ProtoMessage {
if f := fd.lazyInit().Options; f != nil {
return f()
@@ -150,6 +148,16 @@ func (fd *File) Format(s fmt.State, r rune) { descfmt.FormatD
func (fd *File) ProtoType(protoreflect.FileDescriptor) {}
func (fd *File) ProtoInternal(pragma.DoNotImplement) {}
+// The next two are not part of the FileDescriptor interface. They are just used to reconstruct
+// the original FileDescriptor proto.
+func (fd *File) Edition() int32 { return int32(fd.L1.Edition) }
+func (fd *File) OptionImports() protoreflect.FileImports {
+ if f := fd.lazyInit().OptionImports; f != nil {
+ return f()
+ }
+ return emptyFiles
+}
+
func (fd *File) lazyInit() *FileL2 {
if atomic.LoadUint32(&fd.once) == 0 {
fd.lazyInitOnce()
@@ -182,9 +190,9 @@ type (
L2 *EnumL2 // protected by fileDesc.once
}
EnumL1 struct {
- eagerValues bool // controls whether EnumL2.Values is already populated
-
EditionFeatures EditionFeatures
+ Visibility int32
+ eagerValues bool // controls whether EnumL2.Values is already populated
}
EnumL2 struct {
Options func() protoreflect.ProtoMessage
@@ -219,6 +227,11 @@ func (ed *Enum) ReservedNames() protoreflect.Names { return &ed.lazyInit()
func (ed *Enum) ReservedRanges() protoreflect.EnumRanges { return &ed.lazyInit().ReservedRanges }
func (ed *Enum) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, ed) }
func (ed *Enum) ProtoType(protoreflect.EnumDescriptor) {}
+
+// This is not part of the EnumDescriptor interface. It is just used to reconstruct
+// the original FileDescriptor proto.
+func (ed *Enum) Visibility() int32 { return ed.L1.Visibility }
+
func (ed *Enum) lazyInit() *EnumL2 {
ed.L0.ParentFile.lazyInit() // implicitly initializes L2
return ed.L2
@@ -244,13 +257,13 @@ type (
L2 *MessageL2 // protected by fileDesc.once
}
MessageL1 struct {
- Enums Enums
- Messages Messages
- Extensions Extensions
- IsMapEntry bool // promoted from google.protobuf.MessageOptions
- IsMessageSet bool // promoted from google.protobuf.MessageOptions
-
+ Enums Enums
+ Messages Messages
+ Extensions Extensions
EditionFeatures EditionFeatures
+ Visibility int32
+ IsMapEntry bool // promoted from google.protobuf.MessageOptions
+ IsMessageSet bool // promoted from google.protobuf.MessageOptions
}
MessageL2 struct {
Options func() protoreflect.ProtoMessage
@@ -319,6 +332,11 @@ func (md *Message) Messages() protoreflect.MessageDescriptors { return &md.L
func (md *Message) Extensions() protoreflect.ExtensionDescriptors { return &md.L1.Extensions }
func (md *Message) ProtoType(protoreflect.MessageDescriptor) {}
func (md *Message) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, md) }
+
+// This is not part of the MessageDescriptor interface. It is just used to reconstruct
+// the original FileDescriptor proto.
+func (md *Message) Visibility() int32 { return md.L1.Visibility }
+
func (md *Message) lazyInit() *MessageL2 {
md.L0.ParentFile.lazyInit() // implicitly initializes L2
return md.L2
diff --git a/hack/tools/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go b/hack/tools/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go
index d2f549497eb7..e91860f5a21a 100644
--- a/hack/tools/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go
+++ b/hack/tools/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go
@@ -284,6 +284,13 @@ func (ed *Enum) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protorefl
case genid.EnumDescriptorProto_Value_field_number:
numValues++
}
+ case protowire.VarintType:
+ v, m := protowire.ConsumeVarint(b)
+ b = b[m:]
+ switch num {
+ case genid.EnumDescriptorProto_Visibility_field_number:
+ ed.L1.Visibility = int32(v)
+ }
default:
m := protowire.ConsumeFieldValue(num, typ, b)
b = b[m:]
@@ -365,6 +372,13 @@ func (md *Message) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protor
md.unmarshalSeedOptions(v)
}
prevField = num
+ case protowire.VarintType:
+ v, m := protowire.ConsumeVarint(b)
+ b = b[m:]
+ switch num {
+ case genid.DescriptorProto_Visibility_field_number:
+ md.L1.Visibility = int32(v)
+ }
default:
m := protowire.ConsumeFieldValue(num, typ, b)
b = b[m:]
diff --git a/hack/tools/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go b/hack/tools/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go
index d4c94458bd99..dd31faaeb0a0 100644
--- a/hack/tools/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go
+++ b/hack/tools/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go
@@ -134,6 +134,7 @@ func (fd *File) unmarshalFull(b []byte) {
var enumIdx, messageIdx, extensionIdx, serviceIdx int
var rawOptions []byte
+ var optionImports []string
fd.L2 = new(FileL2)
for len(b) > 0 {
num, typ, n := protowire.ConsumeTag(b)
@@ -157,6 +158,8 @@ func (fd *File) unmarshalFull(b []byte) {
imp = PlaceholderFile(path)
}
fd.L2.Imports = append(fd.L2.Imports, protoreflect.FileImport{FileDescriptor: imp})
+ case genid.FileDescriptorProto_OptionDependency_field_number:
+ optionImports = append(optionImports, sb.MakeString(v))
case genid.FileDescriptorProto_EnumType_field_number:
fd.L1.Enums.List[enumIdx].unmarshalFull(v, sb)
enumIdx++
@@ -178,6 +181,23 @@ func (fd *File) unmarshalFull(b []byte) {
}
}
fd.L2.Options = fd.builder.optionsUnmarshaler(&descopts.File, rawOptions)
+ if len(optionImports) > 0 {
+ var imps FileImports
+ var once sync.Once
+ fd.L2.OptionImports = func() protoreflect.FileImports {
+ once.Do(func() {
+ imps = make(FileImports, len(optionImports))
+ for i, path := range optionImports {
+ imp, _ := fd.builder.FileRegistry.FindFileByPath(path)
+ if imp == nil {
+ imp = PlaceholderFile(path)
+ }
+ imps[i] = protoreflect.FileImport{FileDescriptor: imp}
+ }
+ })
+ return &imps
+ }
+ }
}
func (ed *Enum) unmarshalFull(b []byte, sb *strs.Builder) {
diff --git a/hack/tools/vendor/google.golang.org/protobuf/internal/filedesc/editions.go b/hack/tools/vendor/google.golang.org/protobuf/internal/filedesc/editions.go
index b08b71830c63..66ba906806fc 100644
--- a/hack/tools/vendor/google.golang.org/protobuf/internal/filedesc/editions.go
+++ b/hack/tools/vendor/google.golang.org/protobuf/internal/filedesc/editions.go
@@ -13,8 +13,10 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"
)
-var defaultsCache = make(map[Edition]EditionFeatures)
-var defaultsKeys = []Edition{}
+var (
+ defaultsCache = make(map[Edition]EditionFeatures)
+ defaultsKeys = []Edition{}
+)
func init() {
unmarshalEditionDefaults(editiondefaults.Defaults)
@@ -41,7 +43,7 @@ func unmarshalGoFeature(b []byte, parent EditionFeatures) EditionFeatures {
b = b[m:]
parent.StripEnumPrefix = int(v)
default:
- panic(fmt.Sprintf("unkown field number %d while unmarshalling GoFeatures", num))
+ panic(fmt.Sprintf("unknown field number %d while unmarshalling GoFeatures", num))
}
}
return parent
@@ -72,8 +74,11 @@ func unmarshalFeatureSet(b []byte, parent EditionFeatures) EditionFeatures {
case genid.FeatureSet_EnforceNamingStyle_field_number:
// EnforceNamingStyle is enforced in protoc, languages other than C++
// are not supposed to do anything with this feature.
+ case genid.FeatureSet_DefaultSymbolVisibility_field_number:
+ // DefaultSymbolVisibility is enforced in protoc, runtimes should not
+ // inspect this value.
default:
- panic(fmt.Sprintf("unkown field number %d while unmarshalling FeatureSet", num))
+ panic(fmt.Sprintf("unknown field number %d while unmarshalling FeatureSet", num))
}
case protowire.BytesType:
v, m := protowire.ConsumeBytes(b)
@@ -147,7 +152,7 @@ func unmarshalEditionDefaults(b []byte) {
_, m := protowire.ConsumeVarint(b)
b = b[m:]
default:
- panic(fmt.Sprintf("unkown field number %d while unmarshalling EditionDefault", num))
+ panic(fmt.Sprintf("unknown field number %d while unmarshalling EditionDefault", num))
}
}
}
diff --git a/hack/tools/vendor/google.golang.org/protobuf/internal/filedesc/presence.go b/hack/tools/vendor/google.golang.org/protobuf/internal/filedesc/presence.go
new file mode 100644
index 000000000000..a12ec9791cbb
--- /dev/null
+++ b/hack/tools/vendor/google.golang.org/protobuf/internal/filedesc/presence.go
@@ -0,0 +1,33 @@
+// Copyright 2025 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package filedesc
+
+import "google.golang.org/protobuf/reflect/protoreflect"
+
+// UsePresenceForField reports whether the presence bitmap should be used for
+// the specified field.
+func UsePresenceForField(fd protoreflect.FieldDescriptor) (usePresence, canBeLazy bool) {
+ switch {
+ case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic():
+ // Oneof fields never use the presence bitmap.
+ //
+ // Synthetic oneofs are an exception: Those are used to implement proto3
+ // optional fields and hence should follow non-oneof field semantics.
+ return false, false
+
+ case fd.IsMap():
+ // Map-typed fields never use the presence bitmap.
+ return false, false
+
+ case fd.Kind() == protoreflect.MessageKind || fd.Kind() == protoreflect.GroupKind:
+ // Lazy fields always use the presence bitmap (only messages can be lazy).
+ isLazy := fd.(interface{ IsLazy() bool }).IsLazy()
+ return isLazy, isLazy
+
+ default:
+ // If the field has presence, use the presence bitmap.
+ return fd.HasPresence(), false
+ }
+}
diff --git a/hack/tools/vendor/google.golang.org/protobuf/internal/genid/api_gen.go b/hack/tools/vendor/google.golang.org/protobuf/internal/genid/api_gen.go
index df8f9185013d..3ceb6fa7f5e5 100644
--- a/hack/tools/vendor/google.golang.org/protobuf/internal/genid/api_gen.go
+++ b/hack/tools/vendor/google.golang.org/protobuf/internal/genid/api_gen.go
@@ -27,6 +27,7 @@ const (
Api_SourceContext_field_name protoreflect.Name = "source_context"
Api_Mixins_field_name protoreflect.Name = "mixins"
Api_Syntax_field_name protoreflect.Name = "syntax"
+ Api_Edition_field_name protoreflect.Name = "edition"
Api_Name_field_fullname protoreflect.FullName = "google.protobuf.Api.name"
Api_Methods_field_fullname protoreflect.FullName = "google.protobuf.Api.methods"
@@ -35,6 +36,7 @@ const (
Api_SourceContext_field_fullname protoreflect.FullName = "google.protobuf.Api.source_context"
Api_Mixins_field_fullname protoreflect.FullName = "google.protobuf.Api.mixins"
Api_Syntax_field_fullname protoreflect.FullName = "google.protobuf.Api.syntax"
+ Api_Edition_field_fullname protoreflect.FullName = "google.protobuf.Api.edition"
)
// Field numbers for google.protobuf.Api.
@@ -46,6 +48,7 @@ const (
Api_SourceContext_field_number protoreflect.FieldNumber = 5
Api_Mixins_field_number protoreflect.FieldNumber = 6
Api_Syntax_field_number protoreflect.FieldNumber = 7
+ Api_Edition_field_number protoreflect.FieldNumber = 8
)
// Names for google.protobuf.Method.
@@ -63,6 +66,7 @@ const (
Method_ResponseStreaming_field_name protoreflect.Name = "response_streaming"
Method_Options_field_name protoreflect.Name = "options"
Method_Syntax_field_name protoreflect.Name = "syntax"
+ Method_Edition_field_name protoreflect.Name = "edition"
Method_Name_field_fullname protoreflect.FullName = "google.protobuf.Method.name"
Method_RequestTypeUrl_field_fullname protoreflect.FullName = "google.protobuf.Method.request_type_url"
@@ -71,6 +75,7 @@ const (
Method_ResponseStreaming_field_fullname protoreflect.FullName = "google.protobuf.Method.response_streaming"
Method_Options_field_fullname protoreflect.FullName = "google.protobuf.Method.options"
Method_Syntax_field_fullname protoreflect.FullName = "google.protobuf.Method.syntax"
+ Method_Edition_field_fullname protoreflect.FullName = "google.protobuf.Method.edition"
)
// Field numbers for google.protobuf.Method.
@@ -82,6 +87,7 @@ const (
Method_ResponseStreaming_field_number protoreflect.FieldNumber = 5
Method_Options_field_number protoreflect.FieldNumber = 6
Method_Syntax_field_number protoreflect.FieldNumber = 7
+ Method_Edition_field_number protoreflect.FieldNumber = 8
)
// Names for google.protobuf.Mixin.
diff --git a/hack/tools/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go b/hack/tools/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go
index 39524782add0..950a6a325a47 100644
--- a/hack/tools/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go
+++ b/hack/tools/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go
@@ -34,6 +34,19 @@ const (
Edition_EDITION_MAX_enum_value = 2147483647
)
+// Full and short names for google.protobuf.SymbolVisibility.
+const (
+ SymbolVisibility_enum_fullname = "google.protobuf.SymbolVisibility"
+ SymbolVisibility_enum_name = "SymbolVisibility"
+)
+
+// Enum values for google.protobuf.SymbolVisibility.
+const (
+ SymbolVisibility_VISIBILITY_UNSET_enum_value = 0
+ SymbolVisibility_VISIBILITY_LOCAL_enum_value = 1
+ SymbolVisibility_VISIBILITY_EXPORT_enum_value = 2
+)
+
// Names for google.protobuf.FileDescriptorSet.
const (
FileDescriptorSet_message_name protoreflect.Name = "FileDescriptorSet"
@@ -65,6 +78,7 @@ const (
FileDescriptorProto_Dependency_field_name protoreflect.Name = "dependency"
FileDescriptorProto_PublicDependency_field_name protoreflect.Name = "public_dependency"
FileDescriptorProto_WeakDependency_field_name protoreflect.Name = "weak_dependency"
+ FileDescriptorProto_OptionDependency_field_name protoreflect.Name = "option_dependency"
FileDescriptorProto_MessageType_field_name protoreflect.Name = "message_type"
FileDescriptorProto_EnumType_field_name protoreflect.Name = "enum_type"
FileDescriptorProto_Service_field_name protoreflect.Name = "service"
@@ -79,6 +93,7 @@ const (
FileDescriptorProto_Dependency_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.dependency"
FileDescriptorProto_PublicDependency_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.public_dependency"
FileDescriptorProto_WeakDependency_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.weak_dependency"
+ FileDescriptorProto_OptionDependency_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.option_dependency"
FileDescriptorProto_MessageType_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.message_type"
FileDescriptorProto_EnumType_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.enum_type"
FileDescriptorProto_Service_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.service"
@@ -96,6 +111,7 @@ const (
FileDescriptorProto_Dependency_field_number protoreflect.FieldNumber = 3
FileDescriptorProto_PublicDependency_field_number protoreflect.FieldNumber = 10
FileDescriptorProto_WeakDependency_field_number protoreflect.FieldNumber = 11
+ FileDescriptorProto_OptionDependency_field_number protoreflect.FieldNumber = 15
FileDescriptorProto_MessageType_field_number protoreflect.FieldNumber = 4
FileDescriptorProto_EnumType_field_number protoreflect.FieldNumber = 5
FileDescriptorProto_Service_field_number protoreflect.FieldNumber = 6
@@ -124,6 +140,7 @@ const (
DescriptorProto_Options_field_name protoreflect.Name = "options"
DescriptorProto_ReservedRange_field_name protoreflect.Name = "reserved_range"
DescriptorProto_ReservedName_field_name protoreflect.Name = "reserved_name"
+ DescriptorProto_Visibility_field_name protoreflect.Name = "visibility"
DescriptorProto_Name_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.name"
DescriptorProto_Field_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.field"
@@ -135,6 +152,7 @@ const (
DescriptorProto_Options_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.options"
DescriptorProto_ReservedRange_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.reserved_range"
DescriptorProto_ReservedName_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.reserved_name"
+ DescriptorProto_Visibility_field_fullname protoreflect.FullName = "google.protobuf.DescriptorProto.visibility"
)
// Field numbers for google.protobuf.DescriptorProto.
@@ -149,6 +167,7 @@ const (
DescriptorProto_Options_field_number protoreflect.FieldNumber = 7
DescriptorProto_ReservedRange_field_number protoreflect.FieldNumber = 9
DescriptorProto_ReservedName_field_number protoreflect.FieldNumber = 10
+ DescriptorProto_Visibility_field_number protoreflect.FieldNumber = 11
)
// Names for google.protobuf.DescriptorProto.ExtensionRange.
@@ -388,12 +407,14 @@ const (
EnumDescriptorProto_Options_field_name protoreflect.Name = "options"
EnumDescriptorProto_ReservedRange_field_name protoreflect.Name = "reserved_range"
EnumDescriptorProto_ReservedName_field_name protoreflect.Name = "reserved_name"
+ EnumDescriptorProto_Visibility_field_name protoreflect.Name = "visibility"
EnumDescriptorProto_Name_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.name"
EnumDescriptorProto_Value_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.value"
EnumDescriptorProto_Options_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.options"
EnumDescriptorProto_ReservedRange_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.reserved_range"
EnumDescriptorProto_ReservedName_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.reserved_name"
+ EnumDescriptorProto_Visibility_field_fullname protoreflect.FullName = "google.protobuf.EnumDescriptorProto.visibility"
)
// Field numbers for google.protobuf.EnumDescriptorProto.
@@ -403,6 +424,7 @@ const (
EnumDescriptorProto_Options_field_number protoreflect.FieldNumber = 3
EnumDescriptorProto_ReservedRange_field_number protoreflect.FieldNumber = 4
EnumDescriptorProto_ReservedName_field_number protoreflect.FieldNumber = 5
+ EnumDescriptorProto_Visibility_field_number protoreflect.FieldNumber = 6
)
// Names for google.protobuf.EnumDescriptorProto.EnumReservedRange.
@@ -1008,32 +1030,35 @@ const (
// Field names for google.protobuf.FeatureSet.
const (
- FeatureSet_FieldPresence_field_name protoreflect.Name = "field_presence"
- FeatureSet_EnumType_field_name protoreflect.Name = "enum_type"
- FeatureSet_RepeatedFieldEncoding_field_name protoreflect.Name = "repeated_field_encoding"
- FeatureSet_Utf8Validation_field_name protoreflect.Name = "utf8_validation"
- FeatureSet_MessageEncoding_field_name protoreflect.Name = "message_encoding"
- FeatureSet_JsonFormat_field_name protoreflect.Name = "json_format"
- FeatureSet_EnforceNamingStyle_field_name protoreflect.Name = "enforce_naming_style"
-
- FeatureSet_FieldPresence_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.field_presence"
- FeatureSet_EnumType_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.enum_type"
- FeatureSet_RepeatedFieldEncoding_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.repeated_field_encoding"
- FeatureSet_Utf8Validation_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.utf8_validation"
- FeatureSet_MessageEncoding_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.message_encoding"
- FeatureSet_JsonFormat_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.json_format"
- FeatureSet_EnforceNamingStyle_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.enforce_naming_style"
+ FeatureSet_FieldPresence_field_name protoreflect.Name = "field_presence"
+ FeatureSet_EnumType_field_name protoreflect.Name = "enum_type"
+ FeatureSet_RepeatedFieldEncoding_field_name protoreflect.Name = "repeated_field_encoding"
+ FeatureSet_Utf8Validation_field_name protoreflect.Name = "utf8_validation"
+ FeatureSet_MessageEncoding_field_name protoreflect.Name = "message_encoding"
+ FeatureSet_JsonFormat_field_name protoreflect.Name = "json_format"
+ FeatureSet_EnforceNamingStyle_field_name protoreflect.Name = "enforce_naming_style"
+ FeatureSet_DefaultSymbolVisibility_field_name protoreflect.Name = "default_symbol_visibility"
+
+ FeatureSet_FieldPresence_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.field_presence"
+ FeatureSet_EnumType_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.enum_type"
+ FeatureSet_RepeatedFieldEncoding_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.repeated_field_encoding"
+ FeatureSet_Utf8Validation_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.utf8_validation"
+ FeatureSet_MessageEncoding_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.message_encoding"
+ FeatureSet_JsonFormat_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.json_format"
+ FeatureSet_EnforceNamingStyle_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.enforce_naming_style"
+ FeatureSet_DefaultSymbolVisibility_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.default_symbol_visibility"
)
// Field numbers for google.protobuf.FeatureSet.
const (
- FeatureSet_FieldPresence_field_number protoreflect.FieldNumber = 1
- FeatureSet_EnumType_field_number protoreflect.FieldNumber = 2
- FeatureSet_RepeatedFieldEncoding_field_number protoreflect.FieldNumber = 3
- FeatureSet_Utf8Validation_field_number protoreflect.FieldNumber = 4
- FeatureSet_MessageEncoding_field_number protoreflect.FieldNumber = 5
- FeatureSet_JsonFormat_field_number protoreflect.FieldNumber = 6
- FeatureSet_EnforceNamingStyle_field_number protoreflect.FieldNumber = 7
+ FeatureSet_FieldPresence_field_number protoreflect.FieldNumber = 1
+ FeatureSet_EnumType_field_number protoreflect.FieldNumber = 2
+ FeatureSet_RepeatedFieldEncoding_field_number protoreflect.FieldNumber = 3
+ FeatureSet_Utf8Validation_field_number protoreflect.FieldNumber = 4
+ FeatureSet_MessageEncoding_field_number protoreflect.FieldNumber = 5
+ FeatureSet_JsonFormat_field_number protoreflect.FieldNumber = 6
+ FeatureSet_EnforceNamingStyle_field_number protoreflect.FieldNumber = 7
+ FeatureSet_DefaultSymbolVisibility_field_number protoreflect.FieldNumber = 8
)
// Full and short names for google.protobuf.FeatureSet.FieldPresence.
@@ -1128,6 +1153,27 @@ const (
FeatureSet_STYLE_LEGACY_enum_value = 2
)
+// Names for google.protobuf.FeatureSet.VisibilityFeature.
+const (
+ FeatureSet_VisibilityFeature_message_name protoreflect.Name = "VisibilityFeature"
+ FeatureSet_VisibilityFeature_message_fullname protoreflect.FullName = "google.protobuf.FeatureSet.VisibilityFeature"
+)
+
+// Full and short names for google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility.
+const (
+ FeatureSet_VisibilityFeature_DefaultSymbolVisibility_enum_fullname = "google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility"
+ FeatureSet_VisibilityFeature_DefaultSymbolVisibility_enum_name = "DefaultSymbolVisibility"
+)
+
+// Enum values for google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility.
+const (
+ FeatureSet_VisibilityFeature_DEFAULT_SYMBOL_VISIBILITY_UNKNOWN_enum_value = 0
+ FeatureSet_VisibilityFeature_EXPORT_ALL_enum_value = 1
+ FeatureSet_VisibilityFeature_EXPORT_TOP_LEVEL_enum_value = 2
+ FeatureSet_VisibilityFeature_LOCAL_ALL_enum_value = 3
+ FeatureSet_VisibilityFeature_STRICT_enum_value = 4
+)
+
// Names for google.protobuf.FeatureSetDefaults.
const (
FeatureSetDefaults_message_name protoreflect.Name = "FeatureSetDefaults"
diff --git a/hack/tools/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go b/hack/tools/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go
index 41c1f74ef81e..bdad12a9bbc2 100644
--- a/hack/tools/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go
+++ b/hack/tools/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go
@@ -11,6 +11,7 @@ import (
"google.golang.org/protobuf/encoding/protowire"
"google.golang.org/protobuf/internal/encoding/messageset"
+ "google.golang.org/protobuf/internal/filedesc"
"google.golang.org/protobuf/internal/order"
"google.golang.org/protobuf/reflect/protoreflect"
piface "google.golang.org/protobuf/runtime/protoiface"
@@ -80,7 +81,7 @@ func (mi *MessageInfo) makeOpaqueCoderMethods(t reflect.Type, si opaqueStructInf
// permit us to skip over definitely-unset fields at marshal time.
var hasPresence bool
- hasPresence, cf.isLazy = usePresenceForField(si, fd)
+ hasPresence, cf.isLazy = filedesc.UsePresenceForField(fd)
if hasPresence {
cf.presenceIndex, mi.presenceSize = presenceIndex(mi.Desc, fd)
diff --git a/hack/tools/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go b/hack/tools/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go
index dd55e8e009c2..5a439daacb74 100644
--- a/hack/tools/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go
+++ b/hack/tools/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go
@@ -11,6 +11,7 @@ import (
"strings"
"sync/atomic"
+ "google.golang.org/protobuf/internal/filedesc"
"google.golang.org/protobuf/reflect/protoreflect"
)
@@ -53,7 +54,7 @@ func opaqueInitHook(mi *MessageInfo) bool {
fd := fds.Get(i)
fs := si.fieldsByNumber[fd.Number()]
var fi fieldInfo
- usePresence, _ := usePresenceForField(si, fd)
+ usePresence, _ := filedesc.UsePresenceForField(fd)
switch {
case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic():
@@ -343,17 +344,15 @@ func (mi *MessageInfo) fieldInfoForMessageListOpaqueNoPresence(si opaqueStructIn
if p.IsNil() {
return false
}
- sp := p.Apply(fieldOffset).AtomicGetPointer()
- if sp.IsNil() {
+ rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()
+ if rv.IsNil() {
return false
}
- rv := sp.AsValueOf(fs.Type.Elem())
return rv.Elem().Len() > 0
},
clear: func(p pointer) {
- sp := p.Apply(fieldOffset).AtomicGetPointer()
- if !sp.IsNil() {
- rv := sp.AsValueOf(fs.Type.Elem())
+ rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()
+ if !rv.IsNil() {
rv.Elem().Set(reflect.Zero(rv.Type().Elem()))
}
},
@@ -361,11 +360,10 @@ func (mi *MessageInfo) fieldInfoForMessageListOpaqueNoPresence(si opaqueStructIn
if p.IsNil() {
return conv.Zero()
}
- sp := p.Apply(fieldOffset).AtomicGetPointer()
- if sp.IsNil() {
+ rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()
+ if rv.IsNil() {
return conv.Zero()
}
- rv := sp.AsValueOf(fs.Type.Elem())
if rv.Elem().Len() == 0 {
return conv.Zero()
}
@@ -598,30 +596,3 @@ func (mi *MessageInfo) clearPresent(p pointer, index uint32) {
func (mi *MessageInfo) present(p pointer, index uint32) bool {
return p.Apply(mi.presenceOffset).PresenceInfo().Present(index)
}
-
-// usePresenceForField implements the somewhat intricate logic of when
-// the presence bitmap is used for a field. The main logic is that a
-// field that is optional or that can be lazy will use the presence
-// bit, but for proto2, also maps have a presence bit. It also records
-// if the field can ever be lazy, which is true if we have a
-// lazyOffset and the field is a message or a slice of messages. A
-// field that is lazy will always need a presence bit. Oneofs are not
-// lazy and do not use presence, unless they are a synthetic oneof,
-// which is a proto3 optional field. For proto3 optionals, we use the
-// presence and they can also be lazy when applicable (a message).
-func usePresenceForField(si opaqueStructInfo, fd protoreflect.FieldDescriptor) (usePresence, canBeLazy bool) {
- hasLazyField := fd.(interface{ IsLazy() bool }).IsLazy()
-
- // Non-oneof scalar fields with explicit field presence use the presence array.
- usesPresenceArray := fd.HasPresence() && fd.Message() == nil && (fd.ContainingOneof() == nil || fd.ContainingOneof().IsSynthetic())
- switch {
- case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic():
- return false, false
- case fd.IsMap():
- return false, false
- case fd.Kind() == protoreflect.MessageKind || fd.Kind() == protoreflect.GroupKind:
- return hasLazyField, hasLazyField
- default:
- return usesPresenceArray || (hasLazyField && fd.HasPresence()), false
- }
-}
diff --git a/hack/tools/vendor/google.golang.org/protobuf/internal/impl/presence.go b/hack/tools/vendor/google.golang.org/protobuf/internal/impl/presence.go
index 914cb1deda22..443afe81cdab 100644
--- a/hack/tools/vendor/google.golang.org/protobuf/internal/impl/presence.go
+++ b/hack/tools/vendor/google.golang.org/protobuf/internal/impl/presence.go
@@ -32,9 +32,6 @@ func (p presence) toElem(num uint32) (ret *uint32) {
// Present checks for the presence of a specific field number in a presence set.
func (p presence) Present(num uint32) bool {
- if p.P == nil {
- return false
- }
return Export{}.Present(p.toElem(num), num)
}
diff --git a/hack/tools/vendor/google.golang.org/protobuf/internal/version/version.go b/hack/tools/vendor/google.golang.org/protobuf/internal/version/version.go
index aac1cb18a749..77de0f238ce8 100644
--- a/hack/tools/vendor/google.golang.org/protobuf/internal/version/version.go
+++ b/hack/tools/vendor/google.golang.org/protobuf/internal/version/version.go
@@ -52,7 +52,7 @@ import (
const (
Major = 1
Minor = 36
- Patch = 6
+ Patch = 10
PreRelease = ""
)
diff --git a/hack/tools/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go b/hack/tools/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go
index a4a0a2971ddd..730331e66686 100644
--- a/hack/tools/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go
+++ b/hack/tools/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go
@@ -21,6 +21,8 @@ func (p *SourcePath) appendFileDescriptorProto(b []byte) []byte {
b = p.appendRepeatedField(b, "public_dependency", nil)
case 11:
b = p.appendRepeatedField(b, "weak_dependency", nil)
+ case 15:
+ b = p.appendRepeatedField(b, "option_dependency", nil)
case 4:
b = p.appendRepeatedField(b, "message_type", (*SourcePath).appendDescriptorProto)
case 5:
@@ -66,6 +68,8 @@ func (p *SourcePath) appendDescriptorProto(b []byte) []byte {
b = p.appendRepeatedField(b, "reserved_range", (*SourcePath).appendDescriptorProto_ReservedRange)
case 10:
b = p.appendRepeatedField(b, "reserved_name", nil)
+ case 11:
+ b = p.appendSingularField(b, "visibility", nil)
}
return b
}
@@ -85,6 +89,8 @@ func (p *SourcePath) appendEnumDescriptorProto(b []byte) []byte {
b = p.appendRepeatedField(b, "reserved_range", (*SourcePath).appendEnumDescriptorProto_EnumReservedRange)
case 5:
b = p.appendRepeatedField(b, "reserved_name", nil)
+ case 6:
+ b = p.appendSingularField(b, "visibility", nil)
}
return b
}
@@ -400,6 +406,8 @@ func (p *SourcePath) appendFeatureSet(b []byte) []byte {
b = p.appendSingularField(b, "json_format", nil)
case 7:
b = p.appendSingularField(b, "enforce_naming_style", nil)
+ case 8:
+ b = p.appendSingularField(b, "default_symbol_visibility", nil)
}
return b
}
diff --git a/hack/tools/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go b/hack/tools/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go
index 7fe280f194c8..4eacb523c33a 100644
--- a/hack/tools/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go
+++ b/hack/tools/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go
@@ -151,6 +151,70 @@ func (Edition) EnumDescriptor() ([]byte, []int) {
return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{0}
}
+// Describes the 'visibility' of a symbol with respect to the proto import
+// system. Symbols can only be imported when the visibility rules do not prevent
+// it (ex: local symbols cannot be imported). Visibility modifiers can only set
+// on `message` and `enum` as they are the only types available to be referenced
+// from other files.
+type SymbolVisibility int32
+
+const (
+ SymbolVisibility_VISIBILITY_UNSET SymbolVisibility = 0
+ SymbolVisibility_VISIBILITY_LOCAL SymbolVisibility = 1
+ SymbolVisibility_VISIBILITY_EXPORT SymbolVisibility = 2
+)
+
+// Enum value maps for SymbolVisibility.
+var (
+ SymbolVisibility_name = map[int32]string{
+ 0: "VISIBILITY_UNSET",
+ 1: "VISIBILITY_LOCAL",
+ 2: "VISIBILITY_EXPORT",
+ }
+ SymbolVisibility_value = map[string]int32{
+ "VISIBILITY_UNSET": 0,
+ "VISIBILITY_LOCAL": 1,
+ "VISIBILITY_EXPORT": 2,
+ }
+)
+
+func (x SymbolVisibility) Enum() *SymbolVisibility {
+ p := new(SymbolVisibility)
+ *p = x
+ return p
+}
+
+func (x SymbolVisibility) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (SymbolVisibility) Descriptor() protoreflect.EnumDescriptor {
+ return file_google_protobuf_descriptor_proto_enumTypes[1].Descriptor()
+}
+
+func (SymbolVisibility) Type() protoreflect.EnumType {
+ return &file_google_protobuf_descriptor_proto_enumTypes[1]
+}
+
+func (x SymbolVisibility) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *SymbolVisibility) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = SymbolVisibility(num)
+ return nil
+}
+
+// Deprecated: Use SymbolVisibility.Descriptor instead.
+func (SymbolVisibility) EnumDescriptor() ([]byte, []int) {
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{1}
+}
+
// The verification state of the extension range.
type ExtensionRangeOptions_VerificationState int32
@@ -183,11 +247,11 @@ func (x ExtensionRangeOptions_VerificationState) String() string {
}
func (ExtensionRangeOptions_VerificationState) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[1].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[2].Descriptor()
}
func (ExtensionRangeOptions_VerificationState) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[1]
+ return &file_google_protobuf_descriptor_proto_enumTypes[2]
}
func (x ExtensionRangeOptions_VerificationState) Number() protoreflect.EnumNumber {
@@ -299,11 +363,11 @@ func (x FieldDescriptorProto_Type) String() string {
}
func (FieldDescriptorProto_Type) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[2].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[3].Descriptor()
}
func (FieldDescriptorProto_Type) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[2]
+ return &file_google_protobuf_descriptor_proto_enumTypes[3]
}
func (x FieldDescriptorProto_Type) Number() protoreflect.EnumNumber {
@@ -362,11 +426,11 @@ func (x FieldDescriptorProto_Label) String() string {
}
func (FieldDescriptorProto_Label) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[3].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[4].Descriptor()
}
func (FieldDescriptorProto_Label) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[3]
+ return &file_google_protobuf_descriptor_proto_enumTypes[4]
}
func (x FieldDescriptorProto_Label) Number() protoreflect.EnumNumber {
@@ -423,11 +487,11 @@ func (x FileOptions_OptimizeMode) String() string {
}
func (FileOptions_OptimizeMode) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[4].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[5].Descriptor()
}
func (FileOptions_OptimizeMode) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[4]
+ return &file_google_protobuf_descriptor_proto_enumTypes[5]
}
func (x FileOptions_OptimizeMode) Number() protoreflect.EnumNumber {
@@ -489,11 +553,11 @@ func (x FieldOptions_CType) String() string {
}
func (FieldOptions_CType) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[5].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[6].Descriptor()
}
func (FieldOptions_CType) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[5]
+ return &file_google_protobuf_descriptor_proto_enumTypes[6]
}
func (x FieldOptions_CType) Number() protoreflect.EnumNumber {
@@ -551,11 +615,11 @@ func (x FieldOptions_JSType) String() string {
}
func (FieldOptions_JSType) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[6].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[7].Descriptor()
}
func (FieldOptions_JSType) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[6]
+ return &file_google_protobuf_descriptor_proto_enumTypes[7]
}
func (x FieldOptions_JSType) Number() protoreflect.EnumNumber {
@@ -611,11 +675,11 @@ func (x FieldOptions_OptionRetention) String() string {
}
func (FieldOptions_OptionRetention) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[7].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[8].Descriptor()
}
func (FieldOptions_OptionRetention) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[7]
+ return &file_google_protobuf_descriptor_proto_enumTypes[8]
}
func (x FieldOptions_OptionRetention) Number() protoreflect.EnumNumber {
@@ -694,11 +758,11 @@ func (x FieldOptions_OptionTargetType) String() string {
}
func (FieldOptions_OptionTargetType) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[8].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[9].Descriptor()
}
func (FieldOptions_OptionTargetType) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[8]
+ return &file_google_protobuf_descriptor_proto_enumTypes[9]
}
func (x FieldOptions_OptionTargetType) Number() protoreflect.EnumNumber {
@@ -756,11 +820,11 @@ func (x MethodOptions_IdempotencyLevel) String() string {
}
func (MethodOptions_IdempotencyLevel) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[9].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[10].Descriptor()
}
func (MethodOptions_IdempotencyLevel) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[9]
+ return &file_google_protobuf_descriptor_proto_enumTypes[10]
}
func (x MethodOptions_IdempotencyLevel) Number() protoreflect.EnumNumber {
@@ -818,11 +882,11 @@ func (x FeatureSet_FieldPresence) String() string {
}
func (FeatureSet_FieldPresence) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[10].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[11].Descriptor()
}
func (FeatureSet_FieldPresence) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[10]
+ return &file_google_protobuf_descriptor_proto_enumTypes[11]
}
func (x FeatureSet_FieldPresence) Number() protoreflect.EnumNumber {
@@ -877,11 +941,11 @@ func (x FeatureSet_EnumType) String() string {
}
func (FeatureSet_EnumType) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[11].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[12].Descriptor()
}
func (FeatureSet_EnumType) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[11]
+ return &file_google_protobuf_descriptor_proto_enumTypes[12]
}
func (x FeatureSet_EnumType) Number() protoreflect.EnumNumber {
@@ -936,11 +1000,11 @@ func (x FeatureSet_RepeatedFieldEncoding) String() string {
}
func (FeatureSet_RepeatedFieldEncoding) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[12].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[13].Descriptor()
}
func (FeatureSet_RepeatedFieldEncoding) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[12]
+ return &file_google_protobuf_descriptor_proto_enumTypes[13]
}
func (x FeatureSet_RepeatedFieldEncoding) Number() protoreflect.EnumNumber {
@@ -995,11 +1059,11 @@ func (x FeatureSet_Utf8Validation) String() string {
}
func (FeatureSet_Utf8Validation) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[13].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[14].Descriptor()
}
func (FeatureSet_Utf8Validation) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[13]
+ return &file_google_protobuf_descriptor_proto_enumTypes[14]
}
func (x FeatureSet_Utf8Validation) Number() protoreflect.EnumNumber {
@@ -1054,11 +1118,11 @@ func (x FeatureSet_MessageEncoding) String() string {
}
func (FeatureSet_MessageEncoding) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[14].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[15].Descriptor()
}
func (FeatureSet_MessageEncoding) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[14]
+ return &file_google_protobuf_descriptor_proto_enumTypes[15]
}
func (x FeatureSet_MessageEncoding) Number() protoreflect.EnumNumber {
@@ -1113,11 +1177,11 @@ func (x FeatureSet_JsonFormat) String() string {
}
func (FeatureSet_JsonFormat) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[15].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[16].Descriptor()
}
func (FeatureSet_JsonFormat) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[15]
+ return &file_google_protobuf_descriptor_proto_enumTypes[16]
}
func (x FeatureSet_JsonFormat) Number() protoreflect.EnumNumber {
@@ -1172,11 +1236,11 @@ func (x FeatureSet_EnforceNamingStyle) String() string {
}
func (FeatureSet_EnforceNamingStyle) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[16].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[17].Descriptor()
}
func (FeatureSet_EnforceNamingStyle) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[16]
+ return &file_google_protobuf_descriptor_proto_enumTypes[17]
}
func (x FeatureSet_EnforceNamingStyle) Number() protoreflect.EnumNumber {
@@ -1198,6 +1262,77 @@ func (FeatureSet_EnforceNamingStyle) EnumDescriptor() ([]byte, []int) {
return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 6}
}
+type FeatureSet_VisibilityFeature_DefaultSymbolVisibility int32
+
+const (
+ FeatureSet_VisibilityFeature_DEFAULT_SYMBOL_VISIBILITY_UNKNOWN FeatureSet_VisibilityFeature_DefaultSymbolVisibility = 0
+ // Default pre-EDITION_2024, all UNSET visibility are export.
+ FeatureSet_VisibilityFeature_EXPORT_ALL FeatureSet_VisibilityFeature_DefaultSymbolVisibility = 1
+ // All top-level symbols default to export, nested default to local.
+ FeatureSet_VisibilityFeature_EXPORT_TOP_LEVEL FeatureSet_VisibilityFeature_DefaultSymbolVisibility = 2
+ // All symbols default to local.
+ FeatureSet_VisibilityFeature_LOCAL_ALL FeatureSet_VisibilityFeature_DefaultSymbolVisibility = 3
+ // All symbols local by default. Nested types cannot be exported.
+ // With special case caveat for message { enum {} reserved 1 to max; }
+ // This is the recommended setting for new protos.
+ FeatureSet_VisibilityFeature_STRICT FeatureSet_VisibilityFeature_DefaultSymbolVisibility = 4
+)
+
+// Enum value maps for FeatureSet_VisibilityFeature_DefaultSymbolVisibility.
+var (
+ FeatureSet_VisibilityFeature_DefaultSymbolVisibility_name = map[int32]string{
+ 0: "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN",
+ 1: "EXPORT_ALL",
+ 2: "EXPORT_TOP_LEVEL",
+ 3: "LOCAL_ALL",
+ 4: "STRICT",
+ }
+ FeatureSet_VisibilityFeature_DefaultSymbolVisibility_value = map[string]int32{
+ "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0,
+ "EXPORT_ALL": 1,
+ "EXPORT_TOP_LEVEL": 2,
+ "LOCAL_ALL": 3,
+ "STRICT": 4,
+ }
+)
+
+func (x FeatureSet_VisibilityFeature_DefaultSymbolVisibility) Enum() *FeatureSet_VisibilityFeature_DefaultSymbolVisibility {
+ p := new(FeatureSet_VisibilityFeature_DefaultSymbolVisibility)
+ *p = x
+ return p
+}
+
+func (x FeatureSet_VisibilityFeature_DefaultSymbolVisibility) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (FeatureSet_VisibilityFeature_DefaultSymbolVisibility) Descriptor() protoreflect.EnumDescriptor {
+ return file_google_protobuf_descriptor_proto_enumTypes[18].Descriptor()
+}
+
+func (FeatureSet_VisibilityFeature_DefaultSymbolVisibility) Type() protoreflect.EnumType {
+ return &file_google_protobuf_descriptor_proto_enumTypes[18]
+}
+
+func (x FeatureSet_VisibilityFeature_DefaultSymbolVisibility) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *FeatureSet_VisibilityFeature_DefaultSymbolVisibility) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = FeatureSet_VisibilityFeature_DefaultSymbolVisibility(num)
+ return nil
+}
+
+// Deprecated: Use FeatureSet_VisibilityFeature_DefaultSymbolVisibility.Descriptor instead.
+func (FeatureSet_VisibilityFeature_DefaultSymbolVisibility) EnumDescriptor() ([]byte, []int) {
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 0, 0}
+}
+
// Represents the identified object's effect on the element in the original
// .proto file.
type GeneratedCodeInfo_Annotation_Semantic int32
@@ -1236,11 +1371,11 @@ func (x GeneratedCodeInfo_Annotation_Semantic) String() string {
}
func (GeneratedCodeInfo_Annotation_Semantic) Descriptor() protoreflect.EnumDescriptor {
- return file_google_protobuf_descriptor_proto_enumTypes[17].Descriptor()
+ return file_google_protobuf_descriptor_proto_enumTypes[19].Descriptor()
}
func (GeneratedCodeInfo_Annotation_Semantic) Type() protoreflect.EnumType {
- return &file_google_protobuf_descriptor_proto_enumTypes[17]
+ return &file_google_protobuf_descriptor_proto_enumTypes[19]
}
func (x GeneratedCodeInfo_Annotation_Semantic) Number() protoreflect.EnumNumber {
@@ -1321,6 +1456,9 @@ type FileDescriptorProto struct {
// Indexes of the weak imported files in the dependency list.
// For Google-internal migration only. Do not use.
WeakDependency []int32 `protobuf:"varint,11,rep,name=weak_dependency,json=weakDependency" json:"weak_dependency,omitempty"`
+ // Names of files imported by this file purely for the purpose of providing
+ // option extensions. These are excluded from the dependency list above.
+ OptionDependency []string `protobuf:"bytes,15,rep,name=option_dependency,json=optionDependency" json:"option_dependency,omitempty"`
// All top-level definitions in this file.
MessageType []*DescriptorProto `protobuf:"bytes,4,rep,name=message_type,json=messageType" json:"message_type,omitempty"`
EnumType []*EnumDescriptorProto `protobuf:"bytes,5,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"`
@@ -1414,6 +1552,13 @@ func (x *FileDescriptorProto) GetWeakDependency() []int32 {
return nil
}
+func (x *FileDescriptorProto) GetOptionDependency() []string {
+ if x != nil {
+ return x.OptionDependency
+ }
+ return nil
+}
+
func (x *FileDescriptorProto) GetMessageType() []*DescriptorProto {
if x != nil {
return x.MessageType
@@ -1484,7 +1629,9 @@ type DescriptorProto struct {
ReservedRange []*DescriptorProto_ReservedRange `protobuf:"bytes,9,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"`
// Reserved field names, which may not be used by fields in the same message.
// A given name may only be reserved once.
- ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"`
+ ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"`
+ // Support for `export` and `local` keywords on enums.
+ Visibility *SymbolVisibility `protobuf:"varint,11,opt,name=visibility,enum=google.protobuf.SymbolVisibility" json:"visibility,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1589,6 +1736,13 @@ func (x *DescriptorProto) GetReservedName() []string {
return nil
}
+func (x *DescriptorProto) GetVisibility() SymbolVisibility {
+ if x != nil && x.Visibility != nil {
+ return *x.Visibility
+ }
+ return SymbolVisibility_VISIBILITY_UNSET
+}
+
type ExtensionRangeOptions struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The parser stores options it doesn't recognize here. See above.
@@ -1901,7 +2055,9 @@ type EnumDescriptorProto struct {
ReservedRange []*EnumDescriptorProto_EnumReservedRange `protobuf:"bytes,4,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"`
// Reserved enum value names, which may not be reused. A given name may only
// be reserved once.
- ReservedName []string `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"`
+ ReservedName []string `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"`
+ // Support for `export` and `local` keywords on enums.
+ Visibility *SymbolVisibility `protobuf:"varint,6,opt,name=visibility,enum=google.protobuf.SymbolVisibility" json:"visibility,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1971,6 +2127,13 @@ func (x *EnumDescriptorProto) GetReservedName() []string {
return nil
}
+func (x *EnumDescriptorProto) GetVisibility() SymbolVisibility {
+ if x != nil && x.Visibility != nil {
+ return *x.Visibility
+ }
+ return SymbolVisibility_VISIBILITY_UNSET
+}
+
// Describes a value within an enum.
type EnumValueDescriptorProto struct {
state protoimpl.MessageState `protogen:"open.v1"`
@@ -2710,7 +2873,10 @@ type FieldOptions struct {
// for accessors, or it will be completely ignored; in the very least, this
// is a formalization for deprecating fields.
Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
+ // DEPRECATED. DO NOT USE!
// For Google-internal migration only. Do not use.
+ //
+ // Deprecated: Marked as deprecated in google/protobuf/descriptor.proto.
Weak *bool `protobuf:"varint,10,opt,name=weak,def=0" json:"weak,omitempty"`
// Indicate that the field value should not be printed out when using debug
// formats, e.g. when the field contains sensitive credentials.
@@ -2814,6 +2980,7 @@ func (x *FieldOptions) GetDeprecated() bool {
return Default_FieldOptions_Deprecated
}
+// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto.
func (x *FieldOptions) GetWeak() bool {
if x != nil && x.Weak != nil {
return *x.Weak
@@ -3392,17 +3559,18 @@ func (x *UninterpretedOption) GetAggregateValue() string {
// be designed and implemented to handle this, hopefully before we ever hit a
// conflict here.
type FeatureSet struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- FieldPresence *FeatureSet_FieldPresence `protobuf:"varint,1,opt,name=field_presence,json=fieldPresence,enum=google.protobuf.FeatureSet_FieldPresence" json:"field_presence,omitempty"`
- EnumType *FeatureSet_EnumType `protobuf:"varint,2,opt,name=enum_type,json=enumType,enum=google.protobuf.FeatureSet_EnumType" json:"enum_type,omitempty"`
- RepeatedFieldEncoding *FeatureSet_RepeatedFieldEncoding `protobuf:"varint,3,opt,name=repeated_field_encoding,json=repeatedFieldEncoding,enum=google.protobuf.FeatureSet_RepeatedFieldEncoding" json:"repeated_field_encoding,omitempty"`
- Utf8Validation *FeatureSet_Utf8Validation `protobuf:"varint,4,opt,name=utf8_validation,json=utf8Validation,enum=google.protobuf.FeatureSet_Utf8Validation" json:"utf8_validation,omitempty"`
- MessageEncoding *FeatureSet_MessageEncoding `protobuf:"varint,5,opt,name=message_encoding,json=messageEncoding,enum=google.protobuf.FeatureSet_MessageEncoding" json:"message_encoding,omitempty"`
- JsonFormat *FeatureSet_JsonFormat `protobuf:"varint,6,opt,name=json_format,json=jsonFormat,enum=google.protobuf.FeatureSet_JsonFormat" json:"json_format,omitempty"`
- EnforceNamingStyle *FeatureSet_EnforceNamingStyle `protobuf:"varint,7,opt,name=enforce_naming_style,json=enforceNamingStyle,enum=google.protobuf.FeatureSet_EnforceNamingStyle" json:"enforce_naming_style,omitempty"`
- extensionFields protoimpl.ExtensionFields
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ FieldPresence *FeatureSet_FieldPresence `protobuf:"varint,1,opt,name=field_presence,json=fieldPresence,enum=google.protobuf.FeatureSet_FieldPresence" json:"field_presence,omitempty"`
+ EnumType *FeatureSet_EnumType `protobuf:"varint,2,opt,name=enum_type,json=enumType,enum=google.protobuf.FeatureSet_EnumType" json:"enum_type,omitempty"`
+ RepeatedFieldEncoding *FeatureSet_RepeatedFieldEncoding `protobuf:"varint,3,opt,name=repeated_field_encoding,json=repeatedFieldEncoding,enum=google.protobuf.FeatureSet_RepeatedFieldEncoding" json:"repeated_field_encoding,omitempty"`
+ Utf8Validation *FeatureSet_Utf8Validation `protobuf:"varint,4,opt,name=utf8_validation,json=utf8Validation,enum=google.protobuf.FeatureSet_Utf8Validation" json:"utf8_validation,omitempty"`
+ MessageEncoding *FeatureSet_MessageEncoding `protobuf:"varint,5,opt,name=message_encoding,json=messageEncoding,enum=google.protobuf.FeatureSet_MessageEncoding" json:"message_encoding,omitempty"`
+ JsonFormat *FeatureSet_JsonFormat `protobuf:"varint,6,opt,name=json_format,json=jsonFormat,enum=google.protobuf.FeatureSet_JsonFormat" json:"json_format,omitempty"`
+ EnforceNamingStyle *FeatureSet_EnforceNamingStyle `protobuf:"varint,7,opt,name=enforce_naming_style,json=enforceNamingStyle,enum=google.protobuf.FeatureSet_EnforceNamingStyle" json:"enforce_naming_style,omitempty"`
+ DefaultSymbolVisibility *FeatureSet_VisibilityFeature_DefaultSymbolVisibility `protobuf:"varint,8,opt,name=default_symbol_visibility,json=defaultSymbolVisibility,enum=google.protobuf.FeatureSet_VisibilityFeature_DefaultSymbolVisibility" json:"default_symbol_visibility,omitempty"`
+ extensionFields protoimpl.ExtensionFields
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *FeatureSet) Reset() {
@@ -3484,6 +3652,13 @@ func (x *FeatureSet) GetEnforceNamingStyle() FeatureSet_EnforceNamingStyle {
return FeatureSet_ENFORCE_NAMING_STYLE_UNKNOWN
}
+func (x *FeatureSet) GetDefaultSymbolVisibility() FeatureSet_VisibilityFeature_DefaultSymbolVisibility {
+ if x != nil && x.DefaultSymbolVisibility != nil {
+ return *x.DefaultSymbolVisibility
+ }
+ return FeatureSet_VisibilityFeature_DEFAULT_SYMBOL_VISIBILITY_UNKNOWN
+}
+
// A compiled specification for the defaults of a set of features. These
// messages are generated from FeatureSet extensions and can be used to seed
// feature resolution. The resolution with this object becomes a simple search
@@ -4144,6 +4319,42 @@ func (x *UninterpretedOption_NamePart) GetIsExtension() bool {
return false
}
+type FeatureSet_VisibilityFeature struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *FeatureSet_VisibilityFeature) Reset() {
+ *x = FeatureSet_VisibilityFeature{}
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[30]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *FeatureSet_VisibilityFeature) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FeatureSet_VisibilityFeature) ProtoMessage() {}
+
+func (x *FeatureSet_VisibilityFeature) ProtoReflect() protoreflect.Message {
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[30]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FeatureSet_VisibilityFeature.ProtoReflect.Descriptor instead.
+func (*FeatureSet_VisibilityFeature) Descriptor() ([]byte, []int) {
+ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 0}
+}
+
// A map from every known edition with a unique set of defaults to its
// defaults. Not all editions may be contained here. For a given edition,
// the defaults at the closest matching edition ordered at or before it should
@@ -4161,7 +4372,7 @@ type FeatureSetDefaults_FeatureSetEditionDefault struct {
func (x *FeatureSetDefaults_FeatureSetEditionDefault) Reset() {
*x = FeatureSetDefaults_FeatureSetEditionDefault{}
- mi := &file_google_protobuf_descriptor_proto_msgTypes[30]
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4173,7 +4384,7 @@ func (x *FeatureSetDefaults_FeatureSetEditionDefault) String() string {
func (*FeatureSetDefaults_FeatureSetEditionDefault) ProtoMessage() {}
func (x *FeatureSetDefaults_FeatureSetEditionDefault) ProtoReflect() protoreflect.Message {
- mi := &file_google_protobuf_descriptor_proto_msgTypes[30]
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[31]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4309,7 +4520,7 @@ type SourceCodeInfo_Location struct {
func (x *SourceCodeInfo_Location) Reset() {
*x = SourceCodeInfo_Location{}
- mi := &file_google_protobuf_descriptor_proto_msgTypes[31]
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4321,7 +4532,7 @@ func (x *SourceCodeInfo_Location) String() string {
func (*SourceCodeInfo_Location) ProtoMessage() {}
func (x *SourceCodeInfo_Location) ProtoReflect() protoreflect.Message {
- mi := &file_google_protobuf_descriptor_proto_msgTypes[31]
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[32]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4393,7 +4604,7 @@ type GeneratedCodeInfo_Annotation struct {
func (x *GeneratedCodeInfo_Annotation) Reset() {
*x = GeneratedCodeInfo_Annotation{}
- mi := &file_google_protobuf_descriptor_proto_msgTypes[32]
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4405,7 +4616,7 @@ func (x *GeneratedCodeInfo_Annotation) String() string {
func (*GeneratedCodeInfo_Annotation) ProtoMessage() {}
func (x *GeneratedCodeInfo_Annotation) ProtoReflect() protoreflect.Message {
- mi := &file_google_protobuf_descriptor_proto_msgTypes[32]
+ mi := &file_google_protobuf_descriptor_proto_msgTypes[33]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4462,7 +4673,7 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\n" +
" google/protobuf/descriptor.proto\x12\x0fgoogle.protobuf\"[\n" +
"\x11FileDescriptorSet\x128\n" +
- "\x04file\x18\x01 \x03(\v2$.google.protobuf.FileDescriptorProtoR\x04file*\f\b\x80\xec\xca\xff\x01\x10\x81\xec\xca\xff\x01\"\x98\x05\n" +
+ "\x04file\x18\x01 \x03(\v2$.google.protobuf.FileDescriptorProtoR\x04file*\f\b\x80\xec\xca\xff\x01\x10\x81\xec\xca\xff\x01\"\xc5\x05\n" +
"\x13FileDescriptorProto\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" +
"\apackage\x18\x02 \x01(\tR\apackage\x12\x1e\n" +
@@ -4471,7 +4682,8 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"dependency\x12+\n" +
"\x11public_dependency\x18\n" +
" \x03(\x05R\x10publicDependency\x12'\n" +
- "\x0fweak_dependency\x18\v \x03(\x05R\x0eweakDependency\x12C\n" +
+ "\x0fweak_dependency\x18\v \x03(\x05R\x0eweakDependency\x12+\n" +
+ "\x11option_dependency\x18\x0f \x03(\tR\x10optionDependency\x12C\n" +
"\fmessage_type\x18\x04 \x03(\v2 .google.protobuf.DescriptorProtoR\vmessageType\x12A\n" +
"\tenum_type\x18\x05 \x03(\v2$.google.protobuf.EnumDescriptorProtoR\benumType\x12A\n" +
"\aservice\x18\x06 \x03(\v2'.google.protobuf.ServiceDescriptorProtoR\aservice\x12C\n" +
@@ -4479,7 +4691,7 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\aoptions\x18\b \x01(\v2\x1c.google.protobuf.FileOptionsR\aoptions\x12I\n" +
"\x10source_code_info\x18\t \x01(\v2\x1f.google.protobuf.SourceCodeInfoR\x0esourceCodeInfo\x12\x16\n" +
"\x06syntax\x18\f \x01(\tR\x06syntax\x122\n" +
- "\aedition\x18\x0e \x01(\x0e2\x18.google.protobuf.EditionR\aedition\"\xb9\x06\n" +
+ "\aedition\x18\x0e \x01(\x0e2\x18.google.protobuf.EditionR\aedition\"\xfc\x06\n" +
"\x0fDescriptorProto\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12;\n" +
"\x05field\x18\x02 \x03(\v2%.google.protobuf.FieldDescriptorProtoR\x05field\x12C\n" +
@@ -4493,7 +4705,10 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\aoptions\x18\a \x01(\v2\x1f.google.protobuf.MessageOptionsR\aoptions\x12U\n" +
"\x0ereserved_range\x18\t \x03(\v2..google.protobuf.DescriptorProto.ReservedRangeR\rreservedRange\x12#\n" +
"\rreserved_name\x18\n" +
- " \x03(\tR\freservedName\x1az\n" +
+ " \x03(\tR\freservedName\x12A\n" +
+ "\n" +
+ "visibility\x18\v \x01(\x0e2!.google.protobuf.SymbolVisibilityR\n" +
+ "visibility\x1az\n" +
"\x0eExtensionRange\x12\x14\n" +
"\x05start\x18\x01 \x01(\x05R\x05start\x12\x10\n" +
"\x03end\x18\x02 \x01(\x05R\x03end\x12@\n" +
@@ -4562,13 +4777,16 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\x0eLABEL_REQUIRED\x10\x02\"c\n" +
"\x14OneofDescriptorProto\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x127\n" +
- "\aoptions\x18\x02 \x01(\v2\x1d.google.protobuf.OneofOptionsR\aoptions\"\xe3\x02\n" +
+ "\aoptions\x18\x02 \x01(\v2\x1d.google.protobuf.OneofOptionsR\aoptions\"\xa6\x03\n" +
"\x13EnumDescriptorProto\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12?\n" +
"\x05value\x18\x02 \x03(\v2).google.protobuf.EnumValueDescriptorProtoR\x05value\x126\n" +
"\aoptions\x18\x03 \x01(\v2\x1c.google.protobuf.EnumOptionsR\aoptions\x12]\n" +
"\x0ereserved_range\x18\x04 \x03(\v26.google.protobuf.EnumDescriptorProto.EnumReservedRangeR\rreservedRange\x12#\n" +
- "\rreserved_name\x18\x05 \x03(\tR\freservedName\x1a;\n" +
+ "\rreserved_name\x18\x05 \x03(\tR\freservedName\x12A\n" +
+ "\n" +
+ "visibility\x18\x06 \x01(\x0e2!.google.protobuf.SymbolVisibilityR\n" +
+ "visibility\x1a;\n" +
"\x11EnumReservedRange\x12\x14\n" +
"\x05start\x18\x01 \x01(\x05R\x05start\x12\x10\n" +
"\x03end\x18\x02 \x01(\x05R\x03end\"\x83\x01\n" +
@@ -4629,7 +4847,7 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"&deprecated_legacy_json_field_conflicts\x18\v \x01(\bB\x02\x18\x01R\"deprecatedLegacyJsonFieldConflicts\x127\n" +
"\bfeatures\x18\f \x01(\v2\x1b.google.protobuf.FeatureSetR\bfeatures\x12X\n" +
"\x14uninterpreted_option\x18\xe7\a \x03(\v2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption*\t\b\xe8\a\x10\x80\x80\x80\x80\x02J\x04\b\x04\x10\x05J\x04\b\x05\x10\x06J\x04\b\x06\x10\aJ\x04\b\b\x10\tJ\x04\b\t\x10\n" +
- "\"\x9d\r\n" +
+ "\"\xa1\r\n" +
"\fFieldOptions\x12A\n" +
"\x05ctype\x18\x01 \x01(\x0e2#.google.protobuf.FieldOptions.CType:\x06STRINGR\x05ctype\x12\x16\n" +
"\x06packed\x18\x02 \x01(\bR\x06packed\x12G\n" +
@@ -4638,9 +4856,9 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\x0funverified_lazy\x18\x0f \x01(\b:\x05falseR\x0eunverifiedLazy\x12%\n" +
"\n" +
"deprecated\x18\x03 \x01(\b:\x05falseR\n" +
- "deprecated\x12\x19\n" +
+ "deprecated\x12\x1d\n" +
"\x04weak\x18\n" +
- " \x01(\b:\x05falseR\x04weak\x12(\n" +
+ " \x01(\b:\x05falseB\x02\x18\x01R\x04weak\x12(\n" +
"\fdebug_redact\x18\x10 \x01(\b:\x05falseR\vdebugRedact\x12K\n" +
"\tretention\x18\x11 \x01(\x0e2-.google.protobuf.FieldOptions.OptionRetentionR\tretention\x12H\n" +
"\atargets\x18\x13 \x03(\x0e2..google.protobuf.FieldOptions.OptionTargetTypeR\atargets\x12W\n" +
@@ -4728,7 +4946,7 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\x0faggregate_value\x18\b \x01(\tR\x0eaggregateValue\x1aJ\n" +
"\bNamePart\x12\x1b\n" +
"\tname_part\x18\x01 \x02(\tR\bnamePart\x12!\n" +
- "\fis_extension\x18\x02 \x02(\bR\visExtension\"\xae\f\n" +
+ "\fis_extension\x18\x02 \x02(\bR\visExtension\"\x8e\x0f\n" +
"\n" +
"FeatureSet\x12\x91\x01\n" +
"\x0efield_presence\x18\x01 \x01(\x0e2).google.protobuf.FeatureSet.FieldPresenceB?\x88\x01\x01\x98\x01\x04\x98\x01\x01\xa2\x01\r\x12\bEXPLICIT\x18\x84\a\xa2\x01\r\x12\bIMPLICIT\x18\xe7\a\xa2\x01\r\x12\bEXPLICIT\x18\xe8\a\xb2\x01\x03\b\xe8\aR\rfieldPresence\x12l\n" +
@@ -4739,7 +4957,18 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\vjson_format\x18\x06 \x01(\x0e2&.google.protobuf.FeatureSet.JsonFormatB9\x88\x01\x01\x98\x01\x03\x98\x01\x06\x98\x01\x01\xa2\x01\x17\x12\x12LEGACY_BEST_EFFORT\x18\x84\a\xa2\x01\n" +
"\x12\x05ALLOW\x18\xe7\a\xb2\x01\x03\b\xe8\aR\n" +
"jsonFormat\x12\xab\x01\n" +
- "\x14enforce_naming_style\x18\a \x01(\x0e2..google.protobuf.FeatureSet.EnforceNamingStyleBI\x88\x01\x02\x98\x01\x01\x98\x01\x02\x98\x01\x03\x98\x01\x04\x98\x01\x05\x98\x01\x06\x98\x01\a\x98\x01\b\x98\x01\t\xa2\x01\x11\x12\fSTYLE_LEGACY\x18\x84\a\xa2\x01\x0e\x12\tSTYLE2024\x18\xe9\a\xb2\x01\x03\b\xe9\aR\x12enforceNamingStyle\"\\\n" +
+ "\x14enforce_naming_style\x18\a \x01(\x0e2..google.protobuf.FeatureSet.EnforceNamingStyleBI\x88\x01\x02\x98\x01\x01\x98\x01\x02\x98\x01\x03\x98\x01\x04\x98\x01\x05\x98\x01\x06\x98\x01\a\x98\x01\b\x98\x01\t\xa2\x01\x11\x12\fSTYLE_LEGACY\x18\x84\a\xa2\x01\x0e\x12\tSTYLE2024\x18\xe9\a\xb2\x01\x03\b\xe9\aR\x12enforceNamingStyle\x12\xb9\x01\n" +
+ "\x19default_symbol_visibility\x18\b \x01(\x0e2E.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibilityB6\x88\x01\x02\x98\x01\x01\xa2\x01\x0f\x12\n" +
+ "EXPORT_ALL\x18\x84\a\xa2\x01\x15\x12\x10EXPORT_TOP_LEVEL\x18\xe9\a\xb2\x01\x03\b\xe9\aR\x17defaultSymbolVisibility\x1a\xa1\x01\n" +
+ "\x11VisibilityFeature\"\x81\x01\n" +
+ "\x17DefaultSymbolVisibility\x12%\n" +
+ "!DEFAULT_SYMBOL_VISIBILITY_UNKNOWN\x10\x00\x12\x0e\n" +
+ "\n" +
+ "EXPORT_ALL\x10\x01\x12\x14\n" +
+ "\x10EXPORT_TOP_LEVEL\x10\x02\x12\r\n" +
+ "\tLOCAL_ALL\x10\x03\x12\n" +
+ "\n" +
+ "\x06STRICT\x10\x04J\b\b\x01\x10\x80\x80\x80\x80\x02\"\\\n" +
"\rFieldPresence\x12\x1a\n" +
"\x16FIELD_PRESENCE_UNKNOWN\x10\x00\x12\f\n" +
"\bEXPLICIT\x10\x01\x12\f\n" +
@@ -4817,7 +5046,11 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\x17EDITION_99997_TEST_ONLY\x10\x9d\x8d\x06\x12\x1d\n" +
"\x17EDITION_99998_TEST_ONLY\x10\x9e\x8d\x06\x12\x1d\n" +
"\x17EDITION_99999_TEST_ONLY\x10\x9f\x8d\x06\x12\x13\n" +
- "\vEDITION_MAX\x10\xff\xff\xff\xff\aB~\n" +
+ "\vEDITION_MAX\x10\xff\xff\xff\xff\a*U\n" +
+ "\x10SymbolVisibility\x12\x14\n" +
+ "\x10VISIBILITY_UNSET\x10\x00\x12\x14\n" +
+ "\x10VISIBILITY_LOCAL\x10\x01\x12\x15\n" +
+ "\x11VISIBILITY_EXPORT\x10\x02B~\n" +
"\x13com.google.protobufB\x10DescriptorProtosH\x01Z-google.golang.org/protobuf/types/descriptorpb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1aGoogle.Protobuf.Reflection"
var (
@@ -4832,145 +5065,151 @@ func file_google_protobuf_descriptor_proto_rawDescGZIP() []byte {
return file_google_protobuf_descriptor_proto_rawDescData
}
-var file_google_protobuf_descriptor_proto_enumTypes = make([]protoimpl.EnumInfo, 18)
-var file_google_protobuf_descriptor_proto_msgTypes = make([]protoimpl.MessageInfo, 33)
+var file_google_protobuf_descriptor_proto_enumTypes = make([]protoimpl.EnumInfo, 20)
+var file_google_protobuf_descriptor_proto_msgTypes = make([]protoimpl.MessageInfo, 34)
var file_google_protobuf_descriptor_proto_goTypes = []any{
- (Edition)(0), // 0: google.protobuf.Edition
- (ExtensionRangeOptions_VerificationState)(0), // 1: google.protobuf.ExtensionRangeOptions.VerificationState
- (FieldDescriptorProto_Type)(0), // 2: google.protobuf.FieldDescriptorProto.Type
- (FieldDescriptorProto_Label)(0), // 3: google.protobuf.FieldDescriptorProto.Label
- (FileOptions_OptimizeMode)(0), // 4: google.protobuf.FileOptions.OptimizeMode
- (FieldOptions_CType)(0), // 5: google.protobuf.FieldOptions.CType
- (FieldOptions_JSType)(0), // 6: google.protobuf.FieldOptions.JSType
- (FieldOptions_OptionRetention)(0), // 7: google.protobuf.FieldOptions.OptionRetention
- (FieldOptions_OptionTargetType)(0), // 8: google.protobuf.FieldOptions.OptionTargetType
- (MethodOptions_IdempotencyLevel)(0), // 9: google.protobuf.MethodOptions.IdempotencyLevel
- (FeatureSet_FieldPresence)(0), // 10: google.protobuf.FeatureSet.FieldPresence
- (FeatureSet_EnumType)(0), // 11: google.protobuf.FeatureSet.EnumType
- (FeatureSet_RepeatedFieldEncoding)(0), // 12: google.protobuf.FeatureSet.RepeatedFieldEncoding
- (FeatureSet_Utf8Validation)(0), // 13: google.protobuf.FeatureSet.Utf8Validation
- (FeatureSet_MessageEncoding)(0), // 14: google.protobuf.FeatureSet.MessageEncoding
- (FeatureSet_JsonFormat)(0), // 15: google.protobuf.FeatureSet.JsonFormat
- (FeatureSet_EnforceNamingStyle)(0), // 16: google.protobuf.FeatureSet.EnforceNamingStyle
- (GeneratedCodeInfo_Annotation_Semantic)(0), // 17: google.protobuf.GeneratedCodeInfo.Annotation.Semantic
- (*FileDescriptorSet)(nil), // 18: google.protobuf.FileDescriptorSet
- (*FileDescriptorProto)(nil), // 19: google.protobuf.FileDescriptorProto
- (*DescriptorProto)(nil), // 20: google.protobuf.DescriptorProto
- (*ExtensionRangeOptions)(nil), // 21: google.protobuf.ExtensionRangeOptions
- (*FieldDescriptorProto)(nil), // 22: google.protobuf.FieldDescriptorProto
- (*OneofDescriptorProto)(nil), // 23: google.protobuf.OneofDescriptorProto
- (*EnumDescriptorProto)(nil), // 24: google.protobuf.EnumDescriptorProto
- (*EnumValueDescriptorProto)(nil), // 25: google.protobuf.EnumValueDescriptorProto
- (*ServiceDescriptorProto)(nil), // 26: google.protobuf.ServiceDescriptorProto
- (*MethodDescriptorProto)(nil), // 27: google.protobuf.MethodDescriptorProto
- (*FileOptions)(nil), // 28: google.protobuf.FileOptions
- (*MessageOptions)(nil), // 29: google.protobuf.MessageOptions
- (*FieldOptions)(nil), // 30: google.protobuf.FieldOptions
- (*OneofOptions)(nil), // 31: google.protobuf.OneofOptions
- (*EnumOptions)(nil), // 32: google.protobuf.EnumOptions
- (*EnumValueOptions)(nil), // 33: google.protobuf.EnumValueOptions
- (*ServiceOptions)(nil), // 34: google.protobuf.ServiceOptions
- (*MethodOptions)(nil), // 35: google.protobuf.MethodOptions
- (*UninterpretedOption)(nil), // 36: google.protobuf.UninterpretedOption
- (*FeatureSet)(nil), // 37: google.protobuf.FeatureSet
- (*FeatureSetDefaults)(nil), // 38: google.protobuf.FeatureSetDefaults
- (*SourceCodeInfo)(nil), // 39: google.protobuf.SourceCodeInfo
- (*GeneratedCodeInfo)(nil), // 40: google.protobuf.GeneratedCodeInfo
- (*DescriptorProto_ExtensionRange)(nil), // 41: google.protobuf.DescriptorProto.ExtensionRange
- (*DescriptorProto_ReservedRange)(nil), // 42: google.protobuf.DescriptorProto.ReservedRange
- (*ExtensionRangeOptions_Declaration)(nil), // 43: google.protobuf.ExtensionRangeOptions.Declaration
- (*EnumDescriptorProto_EnumReservedRange)(nil), // 44: google.protobuf.EnumDescriptorProto.EnumReservedRange
- (*FieldOptions_EditionDefault)(nil), // 45: google.protobuf.FieldOptions.EditionDefault
- (*FieldOptions_FeatureSupport)(nil), // 46: google.protobuf.FieldOptions.FeatureSupport
- (*UninterpretedOption_NamePart)(nil), // 47: google.protobuf.UninterpretedOption.NamePart
- (*FeatureSetDefaults_FeatureSetEditionDefault)(nil), // 48: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
- (*SourceCodeInfo_Location)(nil), // 49: google.protobuf.SourceCodeInfo.Location
- (*GeneratedCodeInfo_Annotation)(nil), // 50: google.protobuf.GeneratedCodeInfo.Annotation
+ (Edition)(0), // 0: google.protobuf.Edition
+ (SymbolVisibility)(0), // 1: google.protobuf.SymbolVisibility
+ (ExtensionRangeOptions_VerificationState)(0), // 2: google.protobuf.ExtensionRangeOptions.VerificationState
+ (FieldDescriptorProto_Type)(0), // 3: google.protobuf.FieldDescriptorProto.Type
+ (FieldDescriptorProto_Label)(0), // 4: google.protobuf.FieldDescriptorProto.Label
+ (FileOptions_OptimizeMode)(0), // 5: google.protobuf.FileOptions.OptimizeMode
+ (FieldOptions_CType)(0), // 6: google.protobuf.FieldOptions.CType
+ (FieldOptions_JSType)(0), // 7: google.protobuf.FieldOptions.JSType
+ (FieldOptions_OptionRetention)(0), // 8: google.protobuf.FieldOptions.OptionRetention
+ (FieldOptions_OptionTargetType)(0), // 9: google.protobuf.FieldOptions.OptionTargetType
+ (MethodOptions_IdempotencyLevel)(0), // 10: google.protobuf.MethodOptions.IdempotencyLevel
+ (FeatureSet_FieldPresence)(0), // 11: google.protobuf.FeatureSet.FieldPresence
+ (FeatureSet_EnumType)(0), // 12: google.protobuf.FeatureSet.EnumType
+ (FeatureSet_RepeatedFieldEncoding)(0), // 13: google.protobuf.FeatureSet.RepeatedFieldEncoding
+ (FeatureSet_Utf8Validation)(0), // 14: google.protobuf.FeatureSet.Utf8Validation
+ (FeatureSet_MessageEncoding)(0), // 15: google.protobuf.FeatureSet.MessageEncoding
+ (FeatureSet_JsonFormat)(0), // 16: google.protobuf.FeatureSet.JsonFormat
+ (FeatureSet_EnforceNamingStyle)(0), // 17: google.protobuf.FeatureSet.EnforceNamingStyle
+ (FeatureSet_VisibilityFeature_DefaultSymbolVisibility)(0), // 18: google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility
+ (GeneratedCodeInfo_Annotation_Semantic)(0), // 19: google.protobuf.GeneratedCodeInfo.Annotation.Semantic
+ (*FileDescriptorSet)(nil), // 20: google.protobuf.FileDescriptorSet
+ (*FileDescriptorProto)(nil), // 21: google.protobuf.FileDescriptorProto
+ (*DescriptorProto)(nil), // 22: google.protobuf.DescriptorProto
+ (*ExtensionRangeOptions)(nil), // 23: google.protobuf.ExtensionRangeOptions
+ (*FieldDescriptorProto)(nil), // 24: google.protobuf.FieldDescriptorProto
+ (*OneofDescriptorProto)(nil), // 25: google.protobuf.OneofDescriptorProto
+ (*EnumDescriptorProto)(nil), // 26: google.protobuf.EnumDescriptorProto
+ (*EnumValueDescriptorProto)(nil), // 27: google.protobuf.EnumValueDescriptorProto
+ (*ServiceDescriptorProto)(nil), // 28: google.protobuf.ServiceDescriptorProto
+ (*MethodDescriptorProto)(nil), // 29: google.protobuf.MethodDescriptorProto
+ (*FileOptions)(nil), // 30: google.protobuf.FileOptions
+ (*MessageOptions)(nil), // 31: google.protobuf.MessageOptions
+ (*FieldOptions)(nil), // 32: google.protobuf.FieldOptions
+ (*OneofOptions)(nil), // 33: google.protobuf.OneofOptions
+ (*EnumOptions)(nil), // 34: google.protobuf.EnumOptions
+ (*EnumValueOptions)(nil), // 35: google.protobuf.EnumValueOptions
+ (*ServiceOptions)(nil), // 36: google.protobuf.ServiceOptions
+ (*MethodOptions)(nil), // 37: google.protobuf.MethodOptions
+ (*UninterpretedOption)(nil), // 38: google.protobuf.UninterpretedOption
+ (*FeatureSet)(nil), // 39: google.protobuf.FeatureSet
+ (*FeatureSetDefaults)(nil), // 40: google.protobuf.FeatureSetDefaults
+ (*SourceCodeInfo)(nil), // 41: google.protobuf.SourceCodeInfo
+ (*GeneratedCodeInfo)(nil), // 42: google.protobuf.GeneratedCodeInfo
+ (*DescriptorProto_ExtensionRange)(nil), // 43: google.protobuf.DescriptorProto.ExtensionRange
+ (*DescriptorProto_ReservedRange)(nil), // 44: google.protobuf.DescriptorProto.ReservedRange
+ (*ExtensionRangeOptions_Declaration)(nil), // 45: google.protobuf.ExtensionRangeOptions.Declaration
+ (*EnumDescriptorProto_EnumReservedRange)(nil), // 46: google.protobuf.EnumDescriptorProto.EnumReservedRange
+ (*FieldOptions_EditionDefault)(nil), // 47: google.protobuf.FieldOptions.EditionDefault
+ (*FieldOptions_FeatureSupport)(nil), // 48: google.protobuf.FieldOptions.FeatureSupport
+ (*UninterpretedOption_NamePart)(nil), // 49: google.protobuf.UninterpretedOption.NamePart
+ (*FeatureSet_VisibilityFeature)(nil), // 50: google.protobuf.FeatureSet.VisibilityFeature
+ (*FeatureSetDefaults_FeatureSetEditionDefault)(nil), // 51: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
+ (*SourceCodeInfo_Location)(nil), // 52: google.protobuf.SourceCodeInfo.Location
+ (*GeneratedCodeInfo_Annotation)(nil), // 53: google.protobuf.GeneratedCodeInfo.Annotation
}
var file_google_protobuf_descriptor_proto_depIdxs = []int32{
- 19, // 0: google.protobuf.FileDescriptorSet.file:type_name -> google.protobuf.FileDescriptorProto
- 20, // 1: google.protobuf.FileDescriptorProto.message_type:type_name -> google.protobuf.DescriptorProto
- 24, // 2: google.protobuf.FileDescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto
- 26, // 3: google.protobuf.FileDescriptorProto.service:type_name -> google.protobuf.ServiceDescriptorProto
- 22, // 4: google.protobuf.FileDescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto
- 28, // 5: google.protobuf.FileDescriptorProto.options:type_name -> google.protobuf.FileOptions
- 39, // 6: google.protobuf.FileDescriptorProto.source_code_info:type_name -> google.protobuf.SourceCodeInfo
+ 21, // 0: google.protobuf.FileDescriptorSet.file:type_name -> google.protobuf.FileDescriptorProto
+ 22, // 1: google.protobuf.FileDescriptorProto.message_type:type_name -> google.protobuf.DescriptorProto
+ 26, // 2: google.protobuf.FileDescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto
+ 28, // 3: google.protobuf.FileDescriptorProto.service:type_name -> google.protobuf.ServiceDescriptorProto
+ 24, // 4: google.protobuf.FileDescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto
+ 30, // 5: google.protobuf.FileDescriptorProto.options:type_name -> google.protobuf.FileOptions
+ 41, // 6: google.protobuf.FileDescriptorProto.source_code_info:type_name -> google.protobuf.SourceCodeInfo
0, // 7: google.protobuf.FileDescriptorProto.edition:type_name -> google.protobuf.Edition
- 22, // 8: google.protobuf.DescriptorProto.field:type_name -> google.protobuf.FieldDescriptorProto
- 22, // 9: google.protobuf.DescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto
- 20, // 10: google.protobuf.DescriptorProto.nested_type:type_name -> google.protobuf.DescriptorProto
- 24, // 11: google.protobuf.DescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto
- 41, // 12: google.protobuf.DescriptorProto.extension_range:type_name -> google.protobuf.DescriptorProto.ExtensionRange
- 23, // 13: google.protobuf.DescriptorProto.oneof_decl:type_name -> google.protobuf.OneofDescriptorProto
- 29, // 14: google.protobuf.DescriptorProto.options:type_name -> google.protobuf.MessageOptions
- 42, // 15: google.protobuf.DescriptorProto.reserved_range:type_name -> google.protobuf.DescriptorProto.ReservedRange
- 36, // 16: google.protobuf.ExtensionRangeOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
- 43, // 17: google.protobuf.ExtensionRangeOptions.declaration:type_name -> google.protobuf.ExtensionRangeOptions.Declaration
- 37, // 18: google.protobuf.ExtensionRangeOptions.features:type_name -> google.protobuf.FeatureSet
- 1, // 19: google.protobuf.ExtensionRangeOptions.verification:type_name -> google.protobuf.ExtensionRangeOptions.VerificationState
- 3, // 20: google.protobuf.FieldDescriptorProto.label:type_name -> google.protobuf.FieldDescriptorProto.Label
- 2, // 21: google.protobuf.FieldDescriptorProto.type:type_name -> google.protobuf.FieldDescriptorProto.Type
- 30, // 22: google.protobuf.FieldDescriptorProto.options:type_name -> google.protobuf.FieldOptions
- 31, // 23: google.protobuf.OneofDescriptorProto.options:type_name -> google.protobuf.OneofOptions
- 25, // 24: google.protobuf.EnumDescriptorProto.value:type_name -> google.protobuf.EnumValueDescriptorProto
- 32, // 25: google.protobuf.EnumDescriptorProto.options:type_name -> google.protobuf.EnumOptions
- 44, // 26: google.protobuf.EnumDescriptorProto.reserved_range:type_name -> google.protobuf.EnumDescriptorProto.EnumReservedRange
- 33, // 27: google.protobuf.EnumValueDescriptorProto.options:type_name -> google.protobuf.EnumValueOptions
- 27, // 28: google.protobuf.ServiceDescriptorProto.method:type_name -> google.protobuf.MethodDescriptorProto
- 34, // 29: google.protobuf.ServiceDescriptorProto.options:type_name -> google.protobuf.ServiceOptions
- 35, // 30: google.protobuf.MethodDescriptorProto.options:type_name -> google.protobuf.MethodOptions
- 4, // 31: google.protobuf.FileOptions.optimize_for:type_name -> google.protobuf.FileOptions.OptimizeMode
- 37, // 32: google.protobuf.FileOptions.features:type_name -> google.protobuf.FeatureSet
- 36, // 33: google.protobuf.FileOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
- 37, // 34: google.protobuf.MessageOptions.features:type_name -> google.protobuf.FeatureSet
- 36, // 35: google.protobuf.MessageOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
- 5, // 36: google.protobuf.FieldOptions.ctype:type_name -> google.protobuf.FieldOptions.CType
- 6, // 37: google.protobuf.FieldOptions.jstype:type_name -> google.protobuf.FieldOptions.JSType
- 7, // 38: google.protobuf.FieldOptions.retention:type_name -> google.protobuf.FieldOptions.OptionRetention
- 8, // 39: google.protobuf.FieldOptions.targets:type_name -> google.protobuf.FieldOptions.OptionTargetType
- 45, // 40: google.protobuf.FieldOptions.edition_defaults:type_name -> google.protobuf.FieldOptions.EditionDefault
- 37, // 41: google.protobuf.FieldOptions.features:type_name -> google.protobuf.FeatureSet
- 46, // 42: google.protobuf.FieldOptions.feature_support:type_name -> google.protobuf.FieldOptions.FeatureSupport
- 36, // 43: google.protobuf.FieldOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
- 37, // 44: google.protobuf.OneofOptions.features:type_name -> google.protobuf.FeatureSet
- 36, // 45: google.protobuf.OneofOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
- 37, // 46: google.protobuf.EnumOptions.features:type_name -> google.protobuf.FeatureSet
- 36, // 47: google.protobuf.EnumOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
- 37, // 48: google.protobuf.EnumValueOptions.features:type_name -> google.protobuf.FeatureSet
- 46, // 49: google.protobuf.EnumValueOptions.feature_support:type_name -> google.protobuf.FieldOptions.FeatureSupport
- 36, // 50: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
- 37, // 51: google.protobuf.ServiceOptions.features:type_name -> google.protobuf.FeatureSet
- 36, // 52: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
- 9, // 53: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel
- 37, // 54: google.protobuf.MethodOptions.features:type_name -> google.protobuf.FeatureSet
- 36, // 55: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
- 47, // 56: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart
- 10, // 57: google.protobuf.FeatureSet.field_presence:type_name -> google.protobuf.FeatureSet.FieldPresence
- 11, // 58: google.protobuf.FeatureSet.enum_type:type_name -> google.protobuf.FeatureSet.EnumType
- 12, // 59: google.protobuf.FeatureSet.repeated_field_encoding:type_name -> google.protobuf.FeatureSet.RepeatedFieldEncoding
- 13, // 60: google.protobuf.FeatureSet.utf8_validation:type_name -> google.protobuf.FeatureSet.Utf8Validation
- 14, // 61: google.protobuf.FeatureSet.message_encoding:type_name -> google.protobuf.FeatureSet.MessageEncoding
- 15, // 62: google.protobuf.FeatureSet.json_format:type_name -> google.protobuf.FeatureSet.JsonFormat
- 16, // 63: google.protobuf.FeatureSet.enforce_naming_style:type_name -> google.protobuf.FeatureSet.EnforceNamingStyle
- 48, // 64: google.protobuf.FeatureSetDefaults.defaults:type_name -> google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
- 0, // 65: google.protobuf.FeatureSetDefaults.minimum_edition:type_name -> google.protobuf.Edition
- 0, // 66: google.protobuf.FeatureSetDefaults.maximum_edition:type_name -> google.protobuf.Edition
- 49, // 67: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location
- 50, // 68: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation
- 21, // 69: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions
- 0, // 70: google.protobuf.FieldOptions.EditionDefault.edition:type_name -> google.protobuf.Edition
- 0, // 71: google.protobuf.FieldOptions.FeatureSupport.edition_introduced:type_name -> google.protobuf.Edition
- 0, // 72: google.protobuf.FieldOptions.FeatureSupport.edition_deprecated:type_name -> google.protobuf.Edition
- 0, // 73: google.protobuf.FieldOptions.FeatureSupport.edition_removed:type_name -> google.protobuf.Edition
- 0, // 74: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition:type_name -> google.protobuf.Edition
- 37, // 75: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridable_features:type_name -> google.protobuf.FeatureSet
- 37, // 76: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixed_features:type_name -> google.protobuf.FeatureSet
- 17, // 77: google.protobuf.GeneratedCodeInfo.Annotation.semantic:type_name -> google.protobuf.GeneratedCodeInfo.Annotation.Semantic
- 78, // [78:78] is the sub-list for method output_type
- 78, // [78:78] is the sub-list for method input_type
- 78, // [78:78] is the sub-list for extension type_name
- 78, // [78:78] is the sub-list for extension extendee
- 0, // [0:78] is the sub-list for field type_name
+ 24, // 8: google.protobuf.DescriptorProto.field:type_name -> google.protobuf.FieldDescriptorProto
+ 24, // 9: google.protobuf.DescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto
+ 22, // 10: google.protobuf.DescriptorProto.nested_type:type_name -> google.protobuf.DescriptorProto
+ 26, // 11: google.protobuf.DescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto
+ 43, // 12: google.protobuf.DescriptorProto.extension_range:type_name -> google.protobuf.DescriptorProto.ExtensionRange
+ 25, // 13: google.protobuf.DescriptorProto.oneof_decl:type_name -> google.protobuf.OneofDescriptorProto
+ 31, // 14: google.protobuf.DescriptorProto.options:type_name -> google.protobuf.MessageOptions
+ 44, // 15: google.protobuf.DescriptorProto.reserved_range:type_name -> google.protobuf.DescriptorProto.ReservedRange
+ 1, // 16: google.protobuf.DescriptorProto.visibility:type_name -> google.protobuf.SymbolVisibility
+ 38, // 17: google.protobuf.ExtensionRangeOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
+ 45, // 18: google.protobuf.ExtensionRangeOptions.declaration:type_name -> google.protobuf.ExtensionRangeOptions.Declaration
+ 39, // 19: google.protobuf.ExtensionRangeOptions.features:type_name -> google.protobuf.FeatureSet
+ 2, // 20: google.protobuf.ExtensionRangeOptions.verification:type_name -> google.protobuf.ExtensionRangeOptions.VerificationState
+ 4, // 21: google.protobuf.FieldDescriptorProto.label:type_name -> google.protobuf.FieldDescriptorProto.Label
+ 3, // 22: google.protobuf.FieldDescriptorProto.type:type_name -> google.protobuf.FieldDescriptorProto.Type
+ 32, // 23: google.protobuf.FieldDescriptorProto.options:type_name -> google.protobuf.FieldOptions
+ 33, // 24: google.protobuf.OneofDescriptorProto.options:type_name -> google.protobuf.OneofOptions
+ 27, // 25: google.protobuf.EnumDescriptorProto.value:type_name -> google.protobuf.EnumValueDescriptorProto
+ 34, // 26: google.protobuf.EnumDescriptorProto.options:type_name -> google.protobuf.EnumOptions
+ 46, // 27: google.protobuf.EnumDescriptorProto.reserved_range:type_name -> google.protobuf.EnumDescriptorProto.EnumReservedRange
+ 1, // 28: google.protobuf.EnumDescriptorProto.visibility:type_name -> google.protobuf.SymbolVisibility
+ 35, // 29: google.protobuf.EnumValueDescriptorProto.options:type_name -> google.protobuf.EnumValueOptions
+ 29, // 30: google.protobuf.ServiceDescriptorProto.method:type_name -> google.protobuf.MethodDescriptorProto
+ 36, // 31: google.protobuf.ServiceDescriptorProto.options:type_name -> google.protobuf.ServiceOptions
+ 37, // 32: google.protobuf.MethodDescriptorProto.options:type_name -> google.protobuf.MethodOptions
+ 5, // 33: google.protobuf.FileOptions.optimize_for:type_name -> google.protobuf.FileOptions.OptimizeMode
+ 39, // 34: google.protobuf.FileOptions.features:type_name -> google.protobuf.FeatureSet
+ 38, // 35: google.protobuf.FileOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
+ 39, // 36: google.protobuf.MessageOptions.features:type_name -> google.protobuf.FeatureSet
+ 38, // 37: google.protobuf.MessageOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
+ 6, // 38: google.protobuf.FieldOptions.ctype:type_name -> google.protobuf.FieldOptions.CType
+ 7, // 39: google.protobuf.FieldOptions.jstype:type_name -> google.protobuf.FieldOptions.JSType
+ 8, // 40: google.protobuf.FieldOptions.retention:type_name -> google.protobuf.FieldOptions.OptionRetention
+ 9, // 41: google.protobuf.FieldOptions.targets:type_name -> google.protobuf.FieldOptions.OptionTargetType
+ 47, // 42: google.protobuf.FieldOptions.edition_defaults:type_name -> google.protobuf.FieldOptions.EditionDefault
+ 39, // 43: google.protobuf.FieldOptions.features:type_name -> google.protobuf.FeatureSet
+ 48, // 44: google.protobuf.FieldOptions.feature_support:type_name -> google.protobuf.FieldOptions.FeatureSupport
+ 38, // 45: google.protobuf.FieldOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
+ 39, // 46: google.protobuf.OneofOptions.features:type_name -> google.protobuf.FeatureSet
+ 38, // 47: google.protobuf.OneofOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
+ 39, // 48: google.protobuf.EnumOptions.features:type_name -> google.protobuf.FeatureSet
+ 38, // 49: google.protobuf.EnumOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
+ 39, // 50: google.protobuf.EnumValueOptions.features:type_name -> google.protobuf.FeatureSet
+ 48, // 51: google.protobuf.EnumValueOptions.feature_support:type_name -> google.protobuf.FieldOptions.FeatureSupport
+ 38, // 52: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
+ 39, // 53: google.protobuf.ServiceOptions.features:type_name -> google.protobuf.FeatureSet
+ 38, // 54: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
+ 10, // 55: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel
+ 39, // 56: google.protobuf.MethodOptions.features:type_name -> google.protobuf.FeatureSet
+ 38, // 57: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption
+ 49, // 58: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart
+ 11, // 59: google.protobuf.FeatureSet.field_presence:type_name -> google.protobuf.FeatureSet.FieldPresence
+ 12, // 60: google.protobuf.FeatureSet.enum_type:type_name -> google.protobuf.FeatureSet.EnumType
+ 13, // 61: google.protobuf.FeatureSet.repeated_field_encoding:type_name -> google.protobuf.FeatureSet.RepeatedFieldEncoding
+ 14, // 62: google.protobuf.FeatureSet.utf8_validation:type_name -> google.protobuf.FeatureSet.Utf8Validation
+ 15, // 63: google.protobuf.FeatureSet.message_encoding:type_name -> google.protobuf.FeatureSet.MessageEncoding
+ 16, // 64: google.protobuf.FeatureSet.json_format:type_name -> google.protobuf.FeatureSet.JsonFormat
+ 17, // 65: google.protobuf.FeatureSet.enforce_naming_style:type_name -> google.protobuf.FeatureSet.EnforceNamingStyle
+ 18, // 66: google.protobuf.FeatureSet.default_symbol_visibility:type_name -> google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility
+ 51, // 67: google.protobuf.FeatureSetDefaults.defaults:type_name -> google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
+ 0, // 68: google.protobuf.FeatureSetDefaults.minimum_edition:type_name -> google.protobuf.Edition
+ 0, // 69: google.protobuf.FeatureSetDefaults.maximum_edition:type_name -> google.protobuf.Edition
+ 52, // 70: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location
+ 53, // 71: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation
+ 23, // 72: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions
+ 0, // 73: google.protobuf.FieldOptions.EditionDefault.edition:type_name -> google.protobuf.Edition
+ 0, // 74: google.protobuf.FieldOptions.FeatureSupport.edition_introduced:type_name -> google.protobuf.Edition
+ 0, // 75: google.protobuf.FieldOptions.FeatureSupport.edition_deprecated:type_name -> google.protobuf.Edition
+ 0, // 76: google.protobuf.FieldOptions.FeatureSupport.edition_removed:type_name -> google.protobuf.Edition
+ 0, // 77: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition:type_name -> google.protobuf.Edition
+ 39, // 78: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridable_features:type_name -> google.protobuf.FeatureSet
+ 39, // 79: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixed_features:type_name -> google.protobuf.FeatureSet
+ 19, // 80: google.protobuf.GeneratedCodeInfo.Annotation.semantic:type_name -> google.protobuf.GeneratedCodeInfo.Annotation.Semantic
+ 81, // [81:81] is the sub-list for method output_type
+ 81, // [81:81] is the sub-list for method input_type
+ 81, // [81:81] is the sub-list for extension type_name
+ 81, // [81:81] is the sub-list for extension extendee
+ 0, // [0:81] is the sub-list for field type_name
}
func init() { file_google_protobuf_descriptor_proto_init() }
@@ -4983,8 +5222,8 @@ func file_google_protobuf_descriptor_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_descriptor_proto_rawDesc), len(file_google_protobuf_descriptor_proto_rawDesc)),
- NumEnums: 18,
- NumMessages: 33,
+ NumEnums: 20,
+ NumMessages: 34,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go b/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go
index 261ae41bd037..bf1ae594882d 100644
--- a/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go
+++ b/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go
@@ -25,6 +25,7 @@ import (
io "io"
proto "github.com/gogo/protobuf/proto"
+ k8s_io_api_admissionregistration_v1 "k8s.io/api/admissionregistration/v1"
v11 "k8s.io/api/admissionregistration/v1"
k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -46,10 +47,38 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+func (m *ApplyConfiguration) Reset() { *m = ApplyConfiguration{} }
+func (*ApplyConfiguration) ProtoMessage() {}
+func (*ApplyConfiguration) Descriptor() ([]byte, []int) {
+ return fileDescriptor_7f7c65a4f012fb19, []int{0}
+}
+func (m *ApplyConfiguration) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ApplyConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *ApplyConfiguration) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ApplyConfiguration.Merge(m, src)
+}
+func (m *ApplyConfiguration) XXX_Size() int {
+ return m.Size()
+}
+func (m *ApplyConfiguration) XXX_DiscardUnknown() {
+ xxx_messageInfo_ApplyConfiguration.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ApplyConfiguration proto.InternalMessageInfo
+
func (m *AuditAnnotation) Reset() { *m = AuditAnnotation{} }
func (*AuditAnnotation) ProtoMessage() {}
func (*AuditAnnotation) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{0}
+ return fileDescriptor_7f7c65a4f012fb19, []int{1}
}
func (m *AuditAnnotation) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -77,7 +106,7 @@ var xxx_messageInfo_AuditAnnotation proto.InternalMessageInfo
func (m *ExpressionWarning) Reset() { *m = ExpressionWarning{} }
func (*ExpressionWarning) ProtoMessage() {}
func (*ExpressionWarning) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{1}
+ return fileDescriptor_7f7c65a4f012fb19, []int{2}
}
func (m *ExpressionWarning) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -102,10 +131,38 @@ func (m *ExpressionWarning) XXX_DiscardUnknown() {
var xxx_messageInfo_ExpressionWarning proto.InternalMessageInfo
+func (m *JSONPatch) Reset() { *m = JSONPatch{} }
+func (*JSONPatch) ProtoMessage() {}
+func (*JSONPatch) Descriptor() ([]byte, []int) {
+ return fileDescriptor_7f7c65a4f012fb19, []int{3}
+}
+func (m *JSONPatch) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *JSONPatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *JSONPatch) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_JSONPatch.Merge(m, src)
+}
+func (m *JSONPatch) XXX_Size() int {
+ return m.Size()
+}
+func (m *JSONPatch) XXX_DiscardUnknown() {
+ xxx_messageInfo_JSONPatch.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_JSONPatch proto.InternalMessageInfo
+
func (m *MatchCondition) Reset() { *m = MatchCondition{} }
func (*MatchCondition) ProtoMessage() {}
func (*MatchCondition) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{2}
+ return fileDescriptor_7f7c65a4f012fb19, []int{4}
}
func (m *MatchCondition) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -133,7 +190,7 @@ var xxx_messageInfo_MatchCondition proto.InternalMessageInfo
func (m *MatchResources) Reset() { *m = MatchResources{} }
func (*MatchResources) ProtoMessage() {}
func (*MatchResources) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{3}
+ return fileDescriptor_7f7c65a4f012fb19, []int{5}
}
func (m *MatchResources) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -158,10 +215,178 @@ func (m *MatchResources) XXX_DiscardUnknown() {
var xxx_messageInfo_MatchResources proto.InternalMessageInfo
+func (m *MutatingAdmissionPolicy) Reset() { *m = MutatingAdmissionPolicy{} }
+func (*MutatingAdmissionPolicy) ProtoMessage() {}
+func (*MutatingAdmissionPolicy) Descriptor() ([]byte, []int) {
+ return fileDescriptor_7f7c65a4f012fb19, []int{6}
+}
+func (m *MutatingAdmissionPolicy) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MutatingAdmissionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *MutatingAdmissionPolicy) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MutatingAdmissionPolicy.Merge(m, src)
+}
+func (m *MutatingAdmissionPolicy) XXX_Size() int {
+ return m.Size()
+}
+func (m *MutatingAdmissionPolicy) XXX_DiscardUnknown() {
+ xxx_messageInfo_MutatingAdmissionPolicy.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MutatingAdmissionPolicy proto.InternalMessageInfo
+
+func (m *MutatingAdmissionPolicyBinding) Reset() { *m = MutatingAdmissionPolicyBinding{} }
+func (*MutatingAdmissionPolicyBinding) ProtoMessage() {}
+func (*MutatingAdmissionPolicyBinding) Descriptor() ([]byte, []int) {
+ return fileDescriptor_7f7c65a4f012fb19, []int{7}
+}
+func (m *MutatingAdmissionPolicyBinding) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MutatingAdmissionPolicyBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *MutatingAdmissionPolicyBinding) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MutatingAdmissionPolicyBinding.Merge(m, src)
+}
+func (m *MutatingAdmissionPolicyBinding) XXX_Size() int {
+ return m.Size()
+}
+func (m *MutatingAdmissionPolicyBinding) XXX_DiscardUnknown() {
+ xxx_messageInfo_MutatingAdmissionPolicyBinding.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MutatingAdmissionPolicyBinding proto.InternalMessageInfo
+
+func (m *MutatingAdmissionPolicyBindingList) Reset() { *m = MutatingAdmissionPolicyBindingList{} }
+func (*MutatingAdmissionPolicyBindingList) ProtoMessage() {}
+func (*MutatingAdmissionPolicyBindingList) Descriptor() ([]byte, []int) {
+ return fileDescriptor_7f7c65a4f012fb19, []int{8}
+}
+func (m *MutatingAdmissionPolicyBindingList) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MutatingAdmissionPolicyBindingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *MutatingAdmissionPolicyBindingList) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MutatingAdmissionPolicyBindingList.Merge(m, src)
+}
+func (m *MutatingAdmissionPolicyBindingList) XXX_Size() int {
+ return m.Size()
+}
+func (m *MutatingAdmissionPolicyBindingList) XXX_DiscardUnknown() {
+ xxx_messageInfo_MutatingAdmissionPolicyBindingList.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MutatingAdmissionPolicyBindingList proto.InternalMessageInfo
+
+func (m *MutatingAdmissionPolicyBindingSpec) Reset() { *m = MutatingAdmissionPolicyBindingSpec{} }
+func (*MutatingAdmissionPolicyBindingSpec) ProtoMessage() {}
+func (*MutatingAdmissionPolicyBindingSpec) Descriptor() ([]byte, []int) {
+ return fileDescriptor_7f7c65a4f012fb19, []int{9}
+}
+func (m *MutatingAdmissionPolicyBindingSpec) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MutatingAdmissionPolicyBindingSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *MutatingAdmissionPolicyBindingSpec) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MutatingAdmissionPolicyBindingSpec.Merge(m, src)
+}
+func (m *MutatingAdmissionPolicyBindingSpec) XXX_Size() int {
+ return m.Size()
+}
+func (m *MutatingAdmissionPolicyBindingSpec) XXX_DiscardUnknown() {
+ xxx_messageInfo_MutatingAdmissionPolicyBindingSpec.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MutatingAdmissionPolicyBindingSpec proto.InternalMessageInfo
+
+func (m *MutatingAdmissionPolicyList) Reset() { *m = MutatingAdmissionPolicyList{} }
+func (*MutatingAdmissionPolicyList) ProtoMessage() {}
+func (*MutatingAdmissionPolicyList) Descriptor() ([]byte, []int) {
+ return fileDescriptor_7f7c65a4f012fb19, []int{10}
+}
+func (m *MutatingAdmissionPolicyList) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MutatingAdmissionPolicyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *MutatingAdmissionPolicyList) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MutatingAdmissionPolicyList.Merge(m, src)
+}
+func (m *MutatingAdmissionPolicyList) XXX_Size() int {
+ return m.Size()
+}
+func (m *MutatingAdmissionPolicyList) XXX_DiscardUnknown() {
+ xxx_messageInfo_MutatingAdmissionPolicyList.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MutatingAdmissionPolicyList proto.InternalMessageInfo
+
+func (m *MutatingAdmissionPolicySpec) Reset() { *m = MutatingAdmissionPolicySpec{} }
+func (*MutatingAdmissionPolicySpec) ProtoMessage() {}
+func (*MutatingAdmissionPolicySpec) Descriptor() ([]byte, []int) {
+ return fileDescriptor_7f7c65a4f012fb19, []int{11}
+}
+func (m *MutatingAdmissionPolicySpec) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MutatingAdmissionPolicySpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *MutatingAdmissionPolicySpec) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MutatingAdmissionPolicySpec.Merge(m, src)
+}
+func (m *MutatingAdmissionPolicySpec) XXX_Size() int {
+ return m.Size()
+}
+func (m *MutatingAdmissionPolicySpec) XXX_DiscardUnknown() {
+ xxx_messageInfo_MutatingAdmissionPolicySpec.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MutatingAdmissionPolicySpec proto.InternalMessageInfo
+
func (m *MutatingWebhook) Reset() { *m = MutatingWebhook{} }
func (*MutatingWebhook) ProtoMessage() {}
func (*MutatingWebhook) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{4}
+ return fileDescriptor_7f7c65a4f012fb19, []int{12}
}
func (m *MutatingWebhook) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -189,7 +414,7 @@ var xxx_messageInfo_MutatingWebhook proto.InternalMessageInfo
func (m *MutatingWebhookConfiguration) Reset() { *m = MutatingWebhookConfiguration{} }
func (*MutatingWebhookConfiguration) ProtoMessage() {}
func (*MutatingWebhookConfiguration) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{5}
+ return fileDescriptor_7f7c65a4f012fb19, []int{13}
}
func (m *MutatingWebhookConfiguration) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -217,7 +442,7 @@ var xxx_messageInfo_MutatingWebhookConfiguration proto.InternalMessageInfo
func (m *MutatingWebhookConfigurationList) Reset() { *m = MutatingWebhookConfigurationList{} }
func (*MutatingWebhookConfigurationList) ProtoMessage() {}
func (*MutatingWebhookConfigurationList) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{6}
+ return fileDescriptor_7f7c65a4f012fb19, []int{14}
}
func (m *MutatingWebhookConfigurationList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -242,10 +467,38 @@ func (m *MutatingWebhookConfigurationList) XXX_DiscardUnknown() {
var xxx_messageInfo_MutatingWebhookConfigurationList proto.InternalMessageInfo
+func (m *Mutation) Reset() { *m = Mutation{} }
+func (*Mutation) ProtoMessage() {}
+func (*Mutation) Descriptor() ([]byte, []int) {
+ return fileDescriptor_7f7c65a4f012fb19, []int{15}
+}
+func (m *Mutation) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Mutation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *Mutation) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Mutation.Merge(m, src)
+}
+func (m *Mutation) XXX_Size() int {
+ return m.Size()
+}
+func (m *Mutation) XXX_DiscardUnknown() {
+ xxx_messageInfo_Mutation.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Mutation proto.InternalMessageInfo
+
func (m *NamedRuleWithOperations) Reset() { *m = NamedRuleWithOperations{} }
func (*NamedRuleWithOperations) ProtoMessage() {}
func (*NamedRuleWithOperations) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{7}
+ return fileDescriptor_7f7c65a4f012fb19, []int{16}
}
func (m *NamedRuleWithOperations) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -273,7 +526,7 @@ var xxx_messageInfo_NamedRuleWithOperations proto.InternalMessageInfo
func (m *ParamKind) Reset() { *m = ParamKind{} }
func (*ParamKind) ProtoMessage() {}
func (*ParamKind) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{8}
+ return fileDescriptor_7f7c65a4f012fb19, []int{17}
}
func (m *ParamKind) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -301,7 +554,7 @@ var xxx_messageInfo_ParamKind proto.InternalMessageInfo
func (m *ParamRef) Reset() { *m = ParamRef{} }
func (*ParamRef) ProtoMessage() {}
func (*ParamRef) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{9}
+ return fileDescriptor_7f7c65a4f012fb19, []int{18}
}
func (m *ParamRef) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -329,7 +582,7 @@ var xxx_messageInfo_ParamRef proto.InternalMessageInfo
func (m *ServiceReference) Reset() { *m = ServiceReference{} }
func (*ServiceReference) ProtoMessage() {}
func (*ServiceReference) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{10}
+ return fileDescriptor_7f7c65a4f012fb19, []int{19}
}
func (m *ServiceReference) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -357,7 +610,7 @@ var xxx_messageInfo_ServiceReference proto.InternalMessageInfo
func (m *TypeChecking) Reset() { *m = TypeChecking{} }
func (*TypeChecking) ProtoMessage() {}
func (*TypeChecking) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{11}
+ return fileDescriptor_7f7c65a4f012fb19, []int{20}
}
func (m *TypeChecking) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -385,7 +638,7 @@ var xxx_messageInfo_TypeChecking proto.InternalMessageInfo
func (m *ValidatingAdmissionPolicy) Reset() { *m = ValidatingAdmissionPolicy{} }
func (*ValidatingAdmissionPolicy) ProtoMessage() {}
func (*ValidatingAdmissionPolicy) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{12}
+ return fileDescriptor_7f7c65a4f012fb19, []int{21}
}
func (m *ValidatingAdmissionPolicy) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -413,7 +666,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicy proto.InternalMessageInfo
func (m *ValidatingAdmissionPolicyBinding) Reset() { *m = ValidatingAdmissionPolicyBinding{} }
func (*ValidatingAdmissionPolicyBinding) ProtoMessage() {}
func (*ValidatingAdmissionPolicyBinding) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{13}
+ return fileDescriptor_7f7c65a4f012fb19, []int{22}
}
func (m *ValidatingAdmissionPolicyBinding) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -441,7 +694,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyBinding proto.InternalMessageInfo
func (m *ValidatingAdmissionPolicyBindingList) Reset() { *m = ValidatingAdmissionPolicyBindingList{} }
func (*ValidatingAdmissionPolicyBindingList) ProtoMessage() {}
func (*ValidatingAdmissionPolicyBindingList) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{14}
+ return fileDescriptor_7f7c65a4f012fb19, []int{23}
}
func (m *ValidatingAdmissionPolicyBindingList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -469,7 +722,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyBindingList proto.InternalMessageIn
func (m *ValidatingAdmissionPolicyBindingSpec) Reset() { *m = ValidatingAdmissionPolicyBindingSpec{} }
func (*ValidatingAdmissionPolicyBindingSpec) ProtoMessage() {}
func (*ValidatingAdmissionPolicyBindingSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{15}
+ return fileDescriptor_7f7c65a4f012fb19, []int{24}
}
func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -497,7 +750,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec proto.InternalMessageIn
func (m *ValidatingAdmissionPolicyList) Reset() { *m = ValidatingAdmissionPolicyList{} }
func (*ValidatingAdmissionPolicyList) ProtoMessage() {}
func (*ValidatingAdmissionPolicyList) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{16}
+ return fileDescriptor_7f7c65a4f012fb19, []int{25}
}
func (m *ValidatingAdmissionPolicyList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -525,7 +778,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyList proto.InternalMessageInfo
func (m *ValidatingAdmissionPolicySpec) Reset() { *m = ValidatingAdmissionPolicySpec{} }
func (*ValidatingAdmissionPolicySpec) ProtoMessage() {}
func (*ValidatingAdmissionPolicySpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{17}
+ return fileDescriptor_7f7c65a4f012fb19, []int{26}
}
func (m *ValidatingAdmissionPolicySpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -553,7 +806,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicySpec proto.InternalMessageInfo
func (m *ValidatingAdmissionPolicyStatus) Reset() { *m = ValidatingAdmissionPolicyStatus{} }
func (*ValidatingAdmissionPolicyStatus) ProtoMessage() {}
func (*ValidatingAdmissionPolicyStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{18}
+ return fileDescriptor_7f7c65a4f012fb19, []int{27}
}
func (m *ValidatingAdmissionPolicyStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -581,7 +834,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyStatus proto.InternalMessageInfo
func (m *ValidatingWebhook) Reset() { *m = ValidatingWebhook{} }
func (*ValidatingWebhook) ProtoMessage() {}
func (*ValidatingWebhook) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{19}
+ return fileDescriptor_7f7c65a4f012fb19, []int{28}
}
func (m *ValidatingWebhook) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -609,7 +862,7 @@ var xxx_messageInfo_ValidatingWebhook proto.InternalMessageInfo
func (m *ValidatingWebhookConfiguration) Reset() { *m = ValidatingWebhookConfiguration{} }
func (*ValidatingWebhookConfiguration) ProtoMessage() {}
func (*ValidatingWebhookConfiguration) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{20}
+ return fileDescriptor_7f7c65a4f012fb19, []int{29}
}
func (m *ValidatingWebhookConfiguration) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -637,7 +890,7 @@ var xxx_messageInfo_ValidatingWebhookConfiguration proto.InternalMessageInfo
func (m *ValidatingWebhookConfigurationList) Reset() { *m = ValidatingWebhookConfigurationList{} }
func (*ValidatingWebhookConfigurationList) ProtoMessage() {}
func (*ValidatingWebhookConfigurationList) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{21}
+ return fileDescriptor_7f7c65a4f012fb19, []int{30}
}
func (m *ValidatingWebhookConfigurationList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -665,7 +918,7 @@ var xxx_messageInfo_ValidatingWebhookConfigurationList proto.InternalMessageInfo
func (m *Validation) Reset() { *m = Validation{} }
func (*Validation) ProtoMessage() {}
func (*Validation) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{22}
+ return fileDescriptor_7f7c65a4f012fb19, []int{31}
}
func (m *Validation) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -693,7 +946,7 @@ var xxx_messageInfo_Validation proto.InternalMessageInfo
func (m *Variable) Reset() { *m = Variable{} }
func (*Variable) ProtoMessage() {}
func (*Variable) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{23}
+ return fileDescriptor_7f7c65a4f012fb19, []int{32}
}
func (m *Variable) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -721,7 +974,7 @@ var xxx_messageInfo_Variable proto.InternalMessageInfo
func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} }
func (*WebhookClientConfig) ProtoMessage() {}
func (*WebhookClientConfig) Descriptor() ([]byte, []int) {
- return fileDescriptor_7f7c65a4f012fb19, []int{24}
+ return fileDescriptor_7f7c65a4f012fb19, []int{33}
}
func (m *WebhookClientConfig) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -747,13 +1000,22 @@ func (m *WebhookClientConfig) XXX_DiscardUnknown() {
var xxx_messageInfo_WebhookClientConfig proto.InternalMessageInfo
func init() {
+ proto.RegisterType((*ApplyConfiguration)(nil), "k8s.io.api.admissionregistration.v1beta1.ApplyConfiguration")
proto.RegisterType((*AuditAnnotation)(nil), "k8s.io.api.admissionregistration.v1beta1.AuditAnnotation")
proto.RegisterType((*ExpressionWarning)(nil), "k8s.io.api.admissionregistration.v1beta1.ExpressionWarning")
+ proto.RegisterType((*JSONPatch)(nil), "k8s.io.api.admissionregistration.v1beta1.JSONPatch")
proto.RegisterType((*MatchCondition)(nil), "k8s.io.api.admissionregistration.v1beta1.MatchCondition")
proto.RegisterType((*MatchResources)(nil), "k8s.io.api.admissionregistration.v1beta1.MatchResources")
+ proto.RegisterType((*MutatingAdmissionPolicy)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingAdmissionPolicy")
+ proto.RegisterType((*MutatingAdmissionPolicyBinding)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingAdmissionPolicyBinding")
+ proto.RegisterType((*MutatingAdmissionPolicyBindingList)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingAdmissionPolicyBindingList")
+ proto.RegisterType((*MutatingAdmissionPolicyBindingSpec)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingAdmissionPolicyBindingSpec")
+ proto.RegisterType((*MutatingAdmissionPolicyList)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingAdmissionPolicyList")
+ proto.RegisterType((*MutatingAdmissionPolicySpec)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingAdmissionPolicySpec")
proto.RegisterType((*MutatingWebhook)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingWebhook")
proto.RegisterType((*MutatingWebhookConfiguration)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingWebhookConfiguration")
proto.RegisterType((*MutatingWebhookConfigurationList)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingWebhookConfigurationList")
+ proto.RegisterType((*Mutation)(nil), "k8s.io.api.admissionregistration.v1beta1.Mutation")
proto.RegisterType((*NamedRuleWithOperations)(nil), "k8s.io.api.admissionregistration.v1beta1.NamedRuleWithOperations")
proto.RegisterType((*ParamKind)(nil), "k8s.io.api.admissionregistration.v1beta1.ParamKind")
proto.RegisterType((*ParamRef)(nil), "k8s.io.api.admissionregistration.v1beta1.ParamRef")
@@ -779,130 +1041,174 @@ func init() {
}
var fileDescriptor_7f7c65a4f012fb19 = []byte{
- // 1957 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x1a, 0x4d, 0x6f, 0x1b, 0xc7,
- 0xd5, 0x2b, 0x52, 0x12, 0xf9, 0xa8, 0x2f, 0x4e, 0x9c, 0x8a, 0x76, 0x1c, 0x52, 0x58, 0x04, 0x85,
- 0x0c, 0xb4, 0x64, 0xac, 0x04, 0x89, 0xeb, 0xa0, 0x28, 0x44, 0xc5, 0x76, 0xed, 0x58, 0xb2, 0x30,
- 0x4a, 0x24, 0xa0, 0x4d, 0x00, 0x8f, 0x76, 0x87, 0xe4, 0x96, 0xe4, 0xee, 0x76, 0x67, 0x49, 0x5b,
- 0x2d, 0xd0, 0x16, 0xe8, 0x21, 0xd7, 0x02, 0xbd, 0x14, 0xe8, 0xa9, 0x7f, 0xa1, 0xf7, 0x02, 0xed,
- 0xcd, 0xc7, 0xdc, 0x6a, 0xa0, 0x28, 0x51, 0xb1, 0x87, 0x9e, 0x7a, 0xe8, 0xa1, 0x3d, 0xe8, 0xd2,
- 0x62, 0x66, 0x67, 0x3f, 0xb9, 0xb4, 0x56, 0xaa, 0xac, 0x5c, 0x7c, 0xd3, 0xbe, 0xcf, 0x79, 0x6f,
- 0xde, 0xd7, 0x3c, 0x0a, 0x6e, 0x77, 0x6f, 0xb3, 0xba, 0x61, 0x35, 0x88, 0x6d, 0x34, 0x88, 0xde,
- 0x37, 0x18, 0x33, 0x2c, 0xd3, 0xa1, 0x6d, 0x83, 0xb9, 0x0e, 0x71, 0x0d, 0xcb, 0x6c, 0x0c, 0x6f,
- 0x1d, 0x52, 0x97, 0xdc, 0x6a, 0xb4, 0xa9, 0x49, 0x1d, 0xe2, 0x52, 0xbd, 0x6e, 0x3b, 0x96, 0x6b,
- 0xa1, 0x75, 0x8f, 0xb3, 0x4e, 0x6c, 0xa3, 0x9e, 0xca, 0x59, 0x97, 0x9c, 0xd7, 0xbf, 0xdd, 0x36,
- 0xdc, 0xce, 0xe0, 0xb0, 0xae, 0x59, 0xfd, 0x46, 0xdb, 0x6a, 0x5b, 0x0d, 0x21, 0xe0, 0x70, 0xd0,
- 0x12, 0x5f, 0xe2, 0x43, 0xfc, 0xe5, 0x09, 0xbe, 0xfe, 0x5e, 0x86, 0x23, 0x25, 0x4f, 0x73, 0xfd,
- 0xfd, 0x90, 0xa9, 0x4f, 0xb4, 0x8e, 0x61, 0x52, 0xe7, 0xa8, 0x61, 0x77, 0xdb, 0x1c, 0xc0, 0x1a,
- 0x7d, 0xea, 0x92, 0x34, 0xae, 0xc6, 0x34, 0x2e, 0x67, 0x60, 0xba, 0x46, 0x9f, 0x4e, 0x30, 0x7c,
- 0x70, 0x1a, 0x03, 0xd3, 0x3a, 0xb4, 0x4f, 0x92, 0x7c, 0x2a, 0x83, 0xe5, 0xcd, 0x81, 0x6e, 0xb8,
- 0x9b, 0xa6, 0x69, 0xb9, 0xc2, 0x08, 0xf4, 0x36, 0xe4, 0xba, 0xf4, 0xa8, 0xa2, 0xac, 0x29, 0xeb,
- 0xc5, 0x66, 0xe9, 0xf9, 0xa8, 0x76, 0x65, 0x3c, 0xaa, 0xe5, 0x3e, 0xa1, 0x47, 0x98, 0xc3, 0xd1,
- 0x26, 0x2c, 0x0f, 0x49, 0x6f, 0x40, 0xef, 0x3e, 0xb3, 0x1d, 0x2a, 0x5c, 0x50, 0x99, 0x11, 0xa4,
- 0xab, 0x92, 0x74, 0x79, 0x3f, 0x8e, 0xc6, 0x49, 0x7a, 0xb5, 0x07, 0xe5, 0xf0, 0xeb, 0x80, 0x38,
- 0xa6, 0x61, 0xb6, 0xd1, 0xb7, 0xa0, 0xd0, 0x32, 0x68, 0x4f, 0xc7, 0xb4, 0x25, 0x05, 0xae, 0x48,
- 0x81, 0x85, 0x7b, 0x12, 0x8e, 0x03, 0x0a, 0x74, 0x13, 0xe6, 0x9f, 0x7a, 0x8c, 0x95, 0x9c, 0x20,
- 0x5e, 0x96, 0xc4, 0xf3, 0x52, 0x1e, 0xf6, 0xf1, 0x6a, 0x0b, 0x96, 0xb6, 0x89, 0xab, 0x75, 0xb6,
- 0x2c, 0x53, 0x37, 0x84, 0x85, 0x6b, 0x90, 0x37, 0x49, 0x9f, 0x4a, 0x13, 0x17, 0x24, 0x67, 0x7e,
- 0x87, 0xf4, 0x29, 0x16, 0x18, 0xb4, 0x01, 0x40, 0x93, 0xf6, 0x21, 0x49, 0x07, 0x11, 0xd3, 0x22,
- 0x54, 0xea, 0x9f, 0xf3, 0x52, 0x11, 0xa6, 0xcc, 0x1a, 0x38, 0x1a, 0x65, 0xe8, 0x19, 0x94, 0xb9,
- 0x38, 0x66, 0x13, 0x8d, 0xee, 0xd1, 0x1e, 0xd5, 0x5c, 0xcb, 0x11, 0x5a, 0x4b, 0x1b, 0xef, 0xd5,
- 0xc3, 0x30, 0x0d, 0x6e, 0xac, 0x6e, 0x77, 0xdb, 0x1c, 0xc0, 0xea, 0x3c, 0x30, 0xea, 0xc3, 0x5b,
- 0xf5, 0x47, 0xe4, 0x90, 0xf6, 0x7c, 0xd6, 0xe6, 0x9b, 0xe3, 0x51, 0xad, 0xbc, 0x93, 0x94, 0x88,
- 0x27, 0x95, 0x20, 0x0b, 0x96, 0xac, 0xc3, 0x1f, 0x51, 0xcd, 0x0d, 0xd4, 0xce, 0x9c, 0x5f, 0x2d,
- 0x1a, 0x8f, 0x6a, 0x4b, 0x8f, 0x63, 0xe2, 0x70, 0x42, 0x3c, 0xfa, 0x19, 0x2c, 0x3a, 0xd2, 0x6e,
- 0x3c, 0xe8, 0x51, 0x56, 0xc9, 0xad, 0xe5, 0xd6, 0x4b, 0x1b, 0x9b, 0xf5, 0xac, 0xd9, 0x58, 0xe7,
- 0x76, 0xe9, 0x9c, 0xf7, 0xc0, 0x70, 0x3b, 0x8f, 0x6d, 0xea, 0xa1, 0x59, 0xf3, 0x4d, 0xe9, 0xf7,
- 0x45, 0x1c, 0x95, 0x8f, 0xe3, 0xea, 0xd0, 0xaf, 0x15, 0xb8, 0x4a, 0x9f, 0x69, 0xbd, 0x81, 0x4e,
- 0x63, 0x74, 0x95, 0xfc, 0x45, 0x9d, 0xe3, 0x86, 0x3c, 0xc7, 0xd5, 0xbb, 0x29, 0x6a, 0x70, 0xaa,
- 0x72, 0xf4, 0x31, 0x94, 0xfa, 0x3c, 0x24, 0x76, 0xad, 0x9e, 0xa1, 0x1d, 0x55, 0xe6, 0x45, 0x20,
- 0xa9, 0xe3, 0x51, 0xad, 0xb4, 0x1d, 0x82, 0x4f, 0x46, 0xb5, 0xe5, 0xc8, 0xe7, 0xa7, 0x47, 0x36,
- 0xc5, 0x51, 0x36, 0xf5, 0x4f, 0x05, 0x58, 0xde, 0x1e, 0xf0, 0xf4, 0x34, 0xdb, 0x07, 0xf4, 0xb0,
- 0x63, 0x59, 0xdd, 0x0c, 0x31, 0xfc, 0x14, 0x16, 0xb4, 0x9e, 0x41, 0x4d, 0x77, 0xcb, 0x32, 0x5b,
- 0x46, 0x5b, 0x06, 0xc0, 0x77, 0xb3, 0x3b, 0x42, 0xaa, 0xda, 0x8a, 0x08, 0x69, 0x5e, 0x95, 0x8a,
- 0x16, 0xa2, 0x50, 0x1c, 0x53, 0x84, 0x3e, 0x87, 0x59, 0x27, 0x12, 0x02, 0x1f, 0x66, 0xd1, 0x58,
- 0x4f, 0x71, 0xf8, 0xa2, 0xd4, 0x35, 0xeb, 0x79, 0xd8, 0x13, 0x8a, 0x1e, 0xc1, 0x62, 0x8b, 0x18,
- 0xbd, 0x81, 0x43, 0xa5, 0x53, 0xf3, 0xc2, 0x03, 0xdf, 0xe4, 0x11, 0x72, 0x2f, 0x8a, 0x38, 0x19,
- 0xd5, 0xca, 0x31, 0x80, 0x70, 0x6c, 0x9c, 0x39, 0x79, 0x41, 0xc5, 0x73, 0x5d, 0x50, 0x7a, 0x9e,
- 0xcf, 0x7e, 0x3d, 0x79, 0x5e, 0x7a, 0xb5, 0x79, 0xfe, 0x31, 0x94, 0x98, 0xa1, 0xd3, 0xbb, 0xad,
- 0x16, 0xd5, 0x5c, 0x56, 0x99, 0x0b, 0x1d, 0xb6, 0x17, 0x82, 0xb9, 0xc3, 0xc2, 0xcf, 0xad, 0x1e,
- 0x61, 0x0c, 0x47, 0xd9, 0xd0, 0x1d, 0x58, 0xe2, 0x5d, 0xc9, 0x1a, 0xb8, 0x7b, 0x54, 0xb3, 0x4c,
- 0x9d, 0x89, 0xd4, 0x98, 0xf5, 0x4e, 0xf0, 0x69, 0x0c, 0x83, 0x13, 0x94, 0xe8, 0x33, 0x58, 0x0d,
- 0xa2, 0x08, 0xd3, 0xa1, 0x41, 0x9f, 0xee, 0x53, 0x87, 0x7f, 0xb0, 0x4a, 0x61, 0x2d, 0xb7, 0x5e,
- 0x6c, 0xbe, 0x35, 0x1e, 0xd5, 0x56, 0x37, 0xd3, 0x49, 0xf0, 0x34, 0x5e, 0xf4, 0x04, 0x90, 0x43,
- 0x0d, 0x73, 0x68, 0x69, 0x22, 0xfc, 0x64, 0x40, 0x80, 0xb0, 0xef, 0xdd, 0xf1, 0xa8, 0x86, 0xf0,
- 0x04, 0xf6, 0x64, 0x54, 0xfb, 0xc6, 0x24, 0x54, 0x84, 0x47, 0x8a, 0x2c, 0xf4, 0x53, 0x58, 0xee,
- 0xc7, 0x1a, 0x11, 0xab, 0x2c, 0x88, 0x0c, 0xb9, 0x9d, 0x3d, 0x27, 0xe3, 0x9d, 0x2c, 0xec, 0xb9,
- 0x71, 0x38, 0xc3, 0x49, 0x4d, 0xea, 0x5f, 0x15, 0xb8, 0x91, 0xa8, 0x21, 0x5e, 0xba, 0x0e, 0x3c,
- 0x0d, 0xe8, 0x09, 0x14, 0x78, 0x54, 0xe8, 0xc4, 0x25, 0xb2, 0x45, 0xbd, 0x9b, 0x2d, 0x86, 0xbc,
- 0x80, 0xd9, 0xa6, 0x2e, 0x09, 0x5b, 0x64, 0x08, 0xc3, 0x81, 0x54, 0xf4, 0x43, 0x28, 0x48, 0xcd,
- 0xac, 0x32, 0x23, 0x0c, 0xff, 0xce, 0x19, 0x0c, 0x8f, 0x9f, 0xbd, 0x99, 0xe7, 0xaa, 0x70, 0x20,
- 0x50, 0xfd, 0xa7, 0x02, 0x6b, 0x2f, 0xb3, 0xef, 0x91, 0xc1, 0x5c, 0xf4, 0xf9, 0x84, 0x8d, 0xf5,
- 0x8c, 0x79, 0x62, 0x30, 0xcf, 0xc2, 0x60, 0x26, 0xf1, 0x21, 0x11, 0xfb, 0xba, 0x30, 0x6b, 0xb8,
- 0xb4, 0xef, 0x1b, 0x77, 0xef, 0xdc, 0xc6, 0xc5, 0x0e, 0x1e, 0x96, 0xc1, 0x07, 0x5c, 0x38, 0xf6,
- 0x74, 0xa8, 0x2f, 0x14, 0x58, 0x9d, 0xd2, 0xa9, 0xd0, 0x87, 0x61, 0x2f, 0x16, 0x45, 0xa4, 0xa2,
- 0x88, 0xbc, 0x28, 0x47, 0x9b, 0xa8, 0x40, 0xe0, 0x38, 0x1d, 0xfa, 0xa5, 0x02, 0xc8, 0x99, 0x90,
- 0x27, 0x3b, 0xc7, 0xb9, 0xeb, 0xf8, 0x75, 0x69, 0x00, 0x9a, 0xc4, 0xe1, 0x14, 0x75, 0x2a, 0x81,
- 0xe2, 0x2e, 0x71, 0x48, 0xff, 0x13, 0xc3, 0xd4, 0xf9, 0x24, 0x46, 0x6c, 0x43, 0x66, 0xa9, 0xec,
- 0x76, 0x41, 0x98, 0x6d, 0xee, 0x3e, 0x90, 0x18, 0x1c, 0xa1, 0xe2, 0xbd, 0xb1, 0x6b, 0x98, 0xba,
- 0x9c, 0xdb, 0x82, 0xde, 0xc8, 0xe5, 0x61, 0x81, 0x51, 0x7f, 0x3f, 0x03, 0x05, 0xa1, 0x83, 0xcf,
- 0x92, 0xa7, 0xb7, 0xd2, 0x06, 0x14, 0x83, 0xd2, 0x2b, 0xa5, 0x96, 0x25, 0x59, 0x31, 0x28, 0xd3,
- 0x38, 0xa4, 0x41, 0x5f, 0x40, 0x81, 0xf9, 0x05, 0x39, 0x77, 0xfe, 0x82, 0xbc, 0xc0, 0x23, 0x2d,
- 0x28, 0xc5, 0x81, 0x48, 0xe4, 0xc2, 0xaa, 0xcd, 0x4f, 0x4f, 0x5d, 0xea, 0xec, 0x58, 0xee, 0x3d,
- 0x6b, 0x60, 0xea, 0x9b, 0x1a, 0xf7, 0x9e, 0xec, 0x86, 0x77, 0x78, 0x09, 0xdc, 0x4d, 0x27, 0x39,
- 0x19, 0xd5, 0xde, 0x9a, 0x82, 0x12, 0xa5, 0x6b, 0x9a, 0x68, 0xf5, 0x77, 0x0a, 0xac, 0xec, 0x51,
- 0x67, 0x68, 0x68, 0x14, 0xd3, 0x16, 0x75, 0xa8, 0xa9, 0x25, 0x5c, 0xa3, 0x64, 0x70, 0x8d, 0xef,
- 0xed, 0x99, 0xa9, 0xde, 0xbe, 0x01, 0x79, 0x9b, 0xb8, 0x1d, 0x39, 0xd8, 0x17, 0x38, 0x76, 0x97,
- 0xb8, 0x1d, 0x2c, 0xa0, 0x02, 0x6b, 0x39, 0xae, 0x30, 0x74, 0x56, 0x62, 0x2d, 0xc7, 0xc5, 0x02,
- 0xaa, 0xfe, 0x46, 0x81, 0x05, 0x6e, 0xc5, 0x56, 0x87, 0x6a, 0x5d, 0xfe, 0xac, 0xf8, 0x52, 0x01,
- 0x44, 0x93, 0x8f, 0x0d, 0x2f, 0x23, 0x4a, 0x1b, 0x1f, 0x65, 0x4f, 0xd1, 0x89, 0x07, 0x4b, 0x18,
- 0xd6, 0x13, 0x28, 0x86, 0x53, 0x54, 0xaa, 0x7f, 0x99, 0x81, 0x6b, 0xfb, 0xa4, 0x67, 0xe8, 0x22,
- 0xd5, 0x83, 0xfe, 0x24, 0x9b, 0xc3, 0xab, 0x2f, 0xbf, 0x06, 0xe4, 0x99, 0x4d, 0x35, 0x99, 0xcd,
- 0xf7, 0xb3, 0x9b, 0x3e, 0xf5, 0xd0, 0x7b, 0x36, 0xd5, 0xc2, 0x1b, 0xe4, 0x5f, 0x58, 0xa8, 0x40,
- 0x3f, 0x86, 0x39, 0xe6, 0x12, 0x77, 0xc0, 0x64, 0xf0, 0x3f, 0xb8, 0x08, 0x65, 0x42, 0x60, 0x73,
- 0x49, 0xaa, 0x9b, 0xf3, 0xbe, 0xb1, 0x54, 0xa4, 0xfe, 0x47, 0x81, 0xb5, 0xa9, 0xbc, 0x4d, 0xc3,
- 0xd4, 0x79, 0x30, 0xbc, 0x7a, 0x27, 0xdb, 0x31, 0x27, 0xef, 0x5c, 0x80, 0xdd, 0xf2, 0xec, 0xd3,
- 0x7c, 0xad, 0xfe, 0x5b, 0x81, 0x77, 0x4e, 0x63, 0xbe, 0x84, 0xe6, 0x67, 0xc5, 0x9b, 0xdf, 0xc3,
- 0x8b, 0xb3, 0x7c, 0x4a, 0x03, 0xfc, 0x32, 0x77, 0xba, 0xdd, 0xdc, 0x4d, 0xbc, 0x83, 0xd8, 0x02,
- 0xb8, 0x13, 0x16, 0xf9, 0xe0, 0x12, 0x77, 0x03, 0x0c, 0x8e, 0x50, 0x71, 0x5f, 0xd9, 0xb2, 0x3d,
- 0xc8, 0xab, 0xdc, 0xc8, 0x6e, 0x90, 0xdf, 0x58, 0xbc, 0xf2, 0xed, 0x7f, 0xe1, 0x40, 0x22, 0x72,
- 0x61, 0xa9, 0x1f, 0x5b, 0x14, 0xc8, 0x34, 0x39, 0xeb, 0x1c, 0x18, 0xf0, 0x7b, 0x73, 0x73, 0x1c,
- 0x86, 0x13, 0x3a, 0xd0, 0x01, 0x94, 0x87, 0xd2, 0x5f, 0x96, 0xe9, 0x95, 0x74, 0xef, 0x75, 0x5c,
- 0x6c, 0xde, 0xe4, 0xef, 0x8d, 0xfd, 0x24, 0xf2, 0x64, 0x54, 0x5b, 0x49, 0x02, 0xf1, 0xa4, 0x0c,
- 0xf5, 0x1f, 0x0a, 0xbc, 0x3d, 0xf5, 0x26, 0x2e, 0x21, 0xf4, 0x3a, 0xf1, 0xd0, 0xdb, 0xba, 0x88,
- 0xd0, 0x4b, 0x8f, 0xb9, 0xdf, 0xce, 0xbd, 0xc4, 0x52, 0x11, 0x6c, 0x4f, 0xa0, 0x68, 0xfb, 0xb3,
- 0x4b, 0xca, 0xa6, 0x27, 0x4b, 0xe4, 0x70, 0xd6, 0xe6, 0x22, 0xef, 0x9f, 0xc1, 0x27, 0x0e, 0x85,
- 0xa2, 0x9f, 0xc0, 0x8a, 0x3f, 0xdb, 0x73, 0x7e, 0xc3, 0x74, 0xfd, 0x01, 0xed, 0xfc, 0xe1, 0x73,
- 0x75, 0x3c, 0xaa, 0xad, 0x6c, 0x27, 0xa4, 0xe2, 0x09, 0x3d, 0xa8, 0x0b, 0xa5, 0xf0, 0xfa, 0xfd,
- 0xf7, 0xfd, 0xfb, 0x67, 0xf7, 0xb7, 0x65, 0x36, 0xdf, 0x90, 0x0e, 0x2e, 0x85, 0x30, 0x86, 0xa3,
- 0xd2, 0x2f, 0xf8, 0xa1, 0xff, 0x73, 0x58, 0x21, 0xf1, 0x45, 0x27, 0xab, 0xcc, 0x9e, 0xf5, 0x11,
- 0x92, 0x58, 0x95, 0x36, 0x2b, 0xd2, 0x88, 0x95, 0x04, 0x82, 0xe1, 0x09, 0x65, 0x69, 0xaf, 0xbf,
- 0xb9, 0xcb, 0x7a, 0xfd, 0x21, 0x0d, 0x8a, 0x43, 0xe2, 0x18, 0xe4, 0xb0, 0x47, 0xf9, 0x53, 0x3b,
- 0x77, 0xb6, 0x82, 0xb6, 0x2f, 0x59, 0xc3, 0xc9, 0xce, 0x87, 0x30, 0x1c, 0xca, 0x55, 0xff, 0x38,
- 0x03, 0xb5, 0x53, 0xda, 0x37, 0x7a, 0x08, 0xc8, 0x3a, 0x64, 0xd4, 0x19, 0x52, 0xfd, 0xbe, 0xb7,
- 0x8a, 0xf6, 0xc7, 0xfa, 0x5c, 0x38, 0x50, 0x3d, 0x9e, 0xa0, 0xc0, 0x29, 0x5c, 0xa8, 0x07, 0x0b,
- 0x6e, 0x64, 0xd4, 0x93, 0x59, 0xf0, 0x41, 0x76, 0xbb, 0xa2, 0x83, 0x62, 0x73, 0x65, 0x3c, 0xaa,
- 0xc5, 0x46, 0x47, 0x1c, 0x93, 0x8e, 0x34, 0x00, 0x2d, 0xbc, 0x3a, 0x2f, 0xf4, 0x1b, 0xd9, 0xaa,
- 0x58, 0x78, 0x63, 0x41, 0xdf, 0x89, 0x5c, 0x56, 0x44, 0xac, 0x7a, 0x3c, 0x0f, 0xe5, 0xd0, 0x85,
- 0xaf, 0x77, 0x7d, 0xaf, 0x77, 0x7d, 0x2f, 0xdd, 0xf5, 0xc1, 0xeb, 0x5d, 0xdf, 0xb9, 0x76, 0x7d,
- 0x29, 0xb5, 0xb8, 0x74, 0x69, 0x9b, 0xb8, 0x63, 0x05, 0xaa, 0x13, 0x39, 0x7e, 0xd9, 0xbb, 0xb8,
- 0x2f, 0x26, 0x76, 0x71, 0x1f, 0x9d, 0x67, 0x6c, 0x9a, 0xb6, 0x8d, 0xfb, 0x97, 0x02, 0xea, 0xcb,
- 0x6d, 0xbc, 0x84, 0xb9, 0xb0, 0x1f, 0x9f, 0x0b, 0xbf, 0xff, 0x7f, 0x18, 0x98, 0x65, 0x23, 0xf7,
- 0x5f, 0x05, 0x20, 0x1c, 0x66, 0xd0, 0x3b, 0x10, 0xf9, 0xa1, 0x50, 0x96, 0x6e, 0xcf, 0x4d, 0x11,
- 0x38, 0xba, 0x09, 0xf3, 0x7d, 0xca, 0x18, 0x69, 0xfb, 0x0b, 0x91, 0xe0, 0x77, 0xcc, 0x6d, 0x0f,
- 0x8c, 0x7d, 0x3c, 0x3a, 0x80, 0x39, 0x87, 0x12, 0x66, 0x99, 0x72, 0x31, 0xf2, 0x3d, 0xfe, 0x0a,
- 0xc6, 0x02, 0x72, 0x32, 0xaa, 0xdd, 0xca, 0xf2, 0x3b, 0x73, 0x5d, 0x3e, 0x9a, 0x05, 0x13, 0x96,
- 0xe2, 0xd0, 0x7d, 0x28, 0x4b, 0x1d, 0x91, 0x03, 0x7b, 0x95, 0xf6, 0x9a, 0x3c, 0x4d, 0x79, 0x3b,
- 0x49, 0x80, 0x27, 0x79, 0xd4, 0x87, 0x50, 0xf0, 0x07, 0x03, 0x54, 0x81, 0x7c, 0xe4, 0xbd, 0xe5,
- 0x19, 0x2e, 0x20, 0x09, 0xc7, 0xcc, 0xa4, 0x3b, 0x46, 0xfd, 0x83, 0x02, 0x6f, 0xa4, 0x34, 0x25,
- 0x74, 0x0d, 0x72, 0x03, 0xa7, 0x27, 0x5d, 0x30, 0x3f, 0x1e, 0xd5, 0x72, 0x9f, 0xe1, 0x47, 0x98,
- 0xc3, 0x10, 0x81, 0x79, 0xe6, 0xad, 0xa7, 0x64, 0x30, 0xdd, 0xc9, 0x7e, 0xe3, 0xc9, 0xbd, 0x56,
- 0xb3, 0xc4, 0xef, 0xc0, 0x87, 0xfa, 0x72, 0xd1, 0x3a, 0x14, 0x34, 0xd2, 0x1c, 0x98, 0x7a, 0xcf,
- 0xbb, 0xaf, 0x05, 0xef, 0x8d, 0xb7, 0xb5, 0xe9, 0xc1, 0x70, 0x80, 0x6d, 0xee, 0x3c, 0x3f, 0xae,
- 0x5e, 0xf9, 0xea, 0xb8, 0x7a, 0xe5, 0xc5, 0x71, 0xf5, 0xca, 0x2f, 0xc6, 0x55, 0xe5, 0xf9, 0xb8,
- 0xaa, 0x7c, 0x35, 0xae, 0x2a, 0x2f, 0xc6, 0x55, 0xe5, 0x6f, 0xe3, 0xaa, 0xf2, 0xab, 0xbf, 0x57,
- 0xaf, 0xfc, 0x60, 0x3d, 0xeb, 0x7f, 0x39, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x6f, 0xf2, 0xe8,
- 0x4a, 0x10, 0x21, 0x00, 0x00,
+ // 2215 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0x4d, 0x6c, 0x1b, 0xc7,
+ 0x15, 0xf6, 0x92, 0x92, 0x45, 0x3e, 0xca, 0x92, 0x38, 0x71, 0x2a, 0xfa, 0x8f, 0x14, 0x16, 0x41,
+ 0x21, 0x03, 0x2d, 0x59, 0x2b, 0x41, 0xe2, 0x3a, 0x29, 0x02, 0xae, 0x62, 0x3b, 0x76, 0x24, 0x59,
+ 0x18, 0x39, 0x52, 0xd1, 0x26, 0x40, 0x56, 0xcb, 0x21, 0xb9, 0x11, 0xb9, 0xcb, 0xee, 0x2c, 0x65,
+ 0xab, 0x05, 0xda, 0x02, 0x2d, 0x90, 0x1e, 0x0b, 0xf4, 0x52, 0xa0, 0xa7, 0xde, 0x7b, 0x69, 0xef,
+ 0x05, 0x7a, 0xf4, 0x31, 0xb7, 0x1a, 0x28, 0x4a, 0x54, 0x4c, 0xd1, 0x9e, 0x7a, 0x48, 0x81, 0xf6,
+ 0xa0, 0x4b, 0x8b, 0x99, 0x9d, 0xfd, 0xdf, 0x95, 0x56, 0xb2, 0x2c, 0x17, 0x85, 0x6f, 0xda, 0xf7,
+ 0xe6, 0xbd, 0x37, 0xef, 0xcd, 0x9b, 0xf7, 0xbe, 0x79, 0x22, 0xdc, 0xdc, 0xb9, 0x49, 0xeb, 0xba,
+ 0xd9, 0x50, 0x07, 0x7a, 0x43, 0x6d, 0xf5, 0x75, 0x4a, 0x75, 0xd3, 0xb0, 0x48, 0x47, 0xa7, 0xb6,
+ 0xa5, 0xda, 0xba, 0x69, 0x34, 0x76, 0x6f, 0x6c, 0x13, 0x5b, 0xbd, 0xd1, 0xe8, 0x10, 0x83, 0x58,
+ 0xaa, 0x4d, 0x5a, 0xf5, 0x81, 0x65, 0xda, 0x26, 0x5a, 0x74, 0x24, 0xeb, 0xea, 0x40, 0xaf, 0x27,
+ 0x4a, 0xd6, 0x85, 0xe4, 0xe5, 0xaf, 0x77, 0x74, 0xbb, 0x3b, 0xdc, 0xae, 0x6b, 0x66, 0xbf, 0xd1,
+ 0x31, 0x3b, 0x66, 0x83, 0x2b, 0xd8, 0x1e, 0xb6, 0xf9, 0x17, 0xff, 0xe0, 0x7f, 0x39, 0x8a, 0x2f,
+ 0xbf, 0x9e, 0x61, 0x4b, 0xd1, 0xdd, 0x5c, 0x7e, 0xc3, 0x17, 0xea, 0xab, 0x5a, 0x57, 0x37, 0x88,
+ 0xb5, 0xd7, 0x18, 0xec, 0x74, 0x18, 0x81, 0x36, 0xfa, 0xc4, 0x56, 0x93, 0xa4, 0x1a, 0x69, 0x52,
+ 0xd6, 0xd0, 0xb0, 0xf5, 0x3e, 0x89, 0x09, 0xbc, 0x79, 0x94, 0x00, 0xd5, 0xba, 0xa4, 0xaf, 0x46,
+ 0xe5, 0xe4, 0xf7, 0x01, 0x35, 0x07, 0x83, 0xde, 0xde, 0xb2, 0x69, 0xb4, 0xf5, 0xce, 0xd0, 0xf1,
+ 0x03, 0x2d, 0x01, 0x90, 0xc7, 0x03, 0x8b, 0x70, 0x0f, 0x2b, 0xd2, 0x82, 0xb4, 0x58, 0x54, 0xd0,
+ 0x93, 0x51, 0xed, 0xdc, 0x78, 0x54, 0x83, 0xdb, 0x1e, 0x07, 0x07, 0x56, 0xc9, 0x14, 0x66, 0x9b,
+ 0xc3, 0x96, 0x6e, 0x37, 0x0d, 0xc3, 0xb4, 0x1d, 0x35, 0xd7, 0x20, 0xbf, 0x43, 0xf6, 0x84, 0x7c,
+ 0x49, 0xc8, 0xe7, 0x3f, 0x20, 0x7b, 0x98, 0xd1, 0x51, 0x13, 0x66, 0x77, 0xd5, 0xde, 0x90, 0xf8,
+ 0x0a, 0x2b, 0x39, 0xbe, 0x74, 0x5e, 0x2c, 0x9d, 0xdd, 0x0c, 0xb3, 0x71, 0x74, 0xbd, 0xdc, 0x83,
+ 0xb2, 0xff, 0xb5, 0xa5, 0x5a, 0x86, 0x6e, 0x74, 0xd0, 0xd7, 0xa0, 0xd0, 0xd6, 0x49, 0xaf, 0x85,
+ 0x49, 0x5b, 0x28, 0x9c, 0x13, 0x0a, 0x0b, 0x77, 0x04, 0x1d, 0x7b, 0x2b, 0xd0, 0x75, 0x98, 0x7a,
+ 0xe4, 0x08, 0x56, 0xf2, 0x7c, 0xf1, 0xac, 0x58, 0x3c, 0x25, 0xf4, 0x61, 0x97, 0x2f, 0xbf, 0x0b,
+ 0xc5, 0xfb, 0x1b, 0x0f, 0xd6, 0xd6, 0x55, 0x5b, 0xeb, 0x9e, 0x28, 0x46, 0x6d, 0x98, 0x59, 0x65,
+ 0xc2, 0xcb, 0xa6, 0xd1, 0xd2, 0x79, 0x88, 0x16, 0x60, 0xc2, 0x50, 0xfb, 0x44, 0xc8, 0x4f, 0x0b,
+ 0xf9, 0x89, 0x35, 0xb5, 0x4f, 0x30, 0xe7, 0x44, 0xec, 0xe4, 0x32, 0xd9, 0xf9, 0xe3, 0x84, 0x30,
+ 0x84, 0x09, 0x35, 0x87, 0x96, 0x46, 0x28, 0x7a, 0x0c, 0x65, 0xa6, 0x8e, 0x0e, 0x54, 0x8d, 0x6c,
+ 0x90, 0x1e, 0xd1, 0x6c, 0xd3, 0xe2, 0x56, 0x4b, 0x4b, 0xaf, 0xd7, 0xfd, 0x1b, 0xe3, 0x25, 0x4f,
+ 0x7d, 0xb0, 0xd3, 0x61, 0x04, 0x5a, 0x67, 0x39, 0x5a, 0xdf, 0xbd, 0x51, 0x5f, 0x51, 0xb7, 0x49,
+ 0xcf, 0x15, 0x55, 0x5e, 0x1d, 0x8f, 0x6a, 0xe5, 0xb5, 0xa8, 0x46, 0x1c, 0x37, 0x82, 0x4c, 0x98,
+ 0x31, 0xb7, 0x3f, 0x25, 0x9a, 0xed, 0x99, 0xcd, 0x9d, 0xdc, 0x2c, 0x1a, 0x8f, 0x6a, 0x33, 0x0f,
+ 0x42, 0xea, 0x70, 0x44, 0x3d, 0xfa, 0x21, 0x5c, 0xb0, 0x84, 0xdf, 0x78, 0xd8, 0x23, 0xb4, 0x92,
+ 0x5f, 0xc8, 0x2f, 0x96, 0x96, 0x9a, 0xf5, 0xac, 0x85, 0xa1, 0xce, 0xfc, 0x6a, 0x31, 0xd9, 0x2d,
+ 0xdd, 0xee, 0x3e, 0x18, 0x10, 0x87, 0x4d, 0x95, 0x57, 0x45, 0xdc, 0x2f, 0xe0, 0xa0, 0x7e, 0x1c,
+ 0x36, 0x87, 0x7e, 0x21, 0xc1, 0x45, 0xf2, 0x58, 0xeb, 0x0d, 0x5b, 0x24, 0xb4, 0xae, 0x32, 0x71,
+ 0x5a, 0xfb, 0xb8, 0x2a, 0xf6, 0x71, 0xf1, 0x76, 0x82, 0x19, 0x9c, 0x68, 0x1c, 0xbd, 0x07, 0xa5,
+ 0x3e, 0x4b, 0x89, 0x75, 0xb3, 0xa7, 0x6b, 0x7b, 0x95, 0x29, 0x9e, 0x48, 0xf2, 0x78, 0x54, 0x2b,
+ 0xad, 0xfa, 0xe4, 0x83, 0x51, 0x6d, 0x36, 0xf0, 0xf9, 0x70, 0x6f, 0x40, 0x70, 0x50, 0x4c, 0xfe,
+ 0xab, 0x04, 0xf3, 0xab, 0x43, 0x76, 0xbf, 0x8d, 0x4e, 0xd3, 0xdd, 0xbb, 0xc3, 0x43, 0x9f, 0x40,
+ 0x81, 0x1d, 0x5a, 0x4b, 0xb5, 0x55, 0x91, 0x59, 0xdf, 0xc8, 0x76, 0xc4, 0xce, 0x79, 0xae, 0x12,
+ 0x5b, 0xf5, 0x33, 0xdb, 0xa7, 0x61, 0x4f, 0x2b, 0xea, 0xc0, 0x04, 0x1d, 0x10, 0x4d, 0x24, 0xd0,
+ 0xed, 0xec, 0x81, 0x4c, 0xd9, 0xf2, 0xc6, 0x80, 0x68, 0xfe, 0xa5, 0x63, 0x5f, 0x98, 0x1b, 0x90,
+ 0xff, 0x29, 0x41, 0x35, 0x45, 0x46, 0xd1, 0x8d, 0x16, 0xab, 0x32, 0xcf, 0xdf, 0x5b, 0x23, 0xe4,
+ 0xed, 0xca, 0x33, 0x7b, 0x2b, 0x76, 0x9e, 0xea, 0xf4, 0x97, 0x12, 0xc8, 0x87, 0x8b, 0xae, 0xe8,
+ 0xd4, 0x46, 0x1f, 0xc5, 0x1c, 0xaf, 0x67, 0xbc, 0xc9, 0x3a, 0x75, 0xdc, 0xf6, 0xca, 0xb1, 0x4b,
+ 0x09, 0x38, 0xdd, 0x87, 0x49, 0xdd, 0x26, 0x7d, 0x5a, 0xc9, 0xf1, 0xcb, 0xf2, 0xfe, 0x69, 0x79,
+ 0xad, 0x5c, 0x10, 0x46, 0x27, 0xef, 0x31, 0xf5, 0xd8, 0xb1, 0x22, 0xff, 0x26, 0x77, 0x94, 0xcf,
+ 0x2c, 0x40, 0xac, 0x08, 0x0f, 0x38, 0x71, 0xcd, 0x2f, 0xd6, 0xde, 0xe1, 0xad, 0x7b, 0x1c, 0x1c,
+ 0x58, 0xc5, 0xe2, 0x34, 0x50, 0x2d, 0xb5, 0xef, 0xb6, 0xa1, 0xd2, 0xd2, 0x52, 0x76, 0x67, 0xd6,
+ 0x85, 0xa4, 0x32, 0xcd, 0xe2, 0xe4, 0x7e, 0x61, 0x4f, 0x23, 0xb2, 0x61, 0xa6, 0x1f, 0xaa, 0xf0,
+ 0xbc, 0x7b, 0x95, 0x96, 0x6e, 0x1e, 0x23, 0x60, 0x21, 0x79, 0xa7, 0xb4, 0x86, 0x69, 0x38, 0x62,
+ 0x43, 0xfe, 0x42, 0x82, 0x2b, 0x29, 0xe1, 0x3a, 0x83, 0xdc, 0x68, 0x87, 0x73, 0xa3, 0xf9, 0xec,
+ 0xb9, 0x91, 0x9c, 0x14, 0xbf, 0x3a, 0x9f, 0xea, 0x25, 0xcf, 0x86, 0x4f, 0xa0, 0xc8, 0xcf, 0xe1,
+ 0x03, 0xdd, 0x68, 0x25, 0xf4, 0xd0, 0x2c, 0x47, 0xcb, 0x44, 0x95, 0x0b, 0xe3, 0x51, 0xad, 0xe8,
+ 0x7d, 0x62, 0x5f, 0x29, 0xfa, 0x3e, 0xcc, 0xf5, 0x05, 0x50, 0x60, 0xf2, 0xba, 0x61, 0x53, 0x91,
+ 0x43, 0x27, 0x3f, 0xdf, 0x8b, 0xe3, 0x51, 0x6d, 0x6e, 0x35, 0xa2, 0x15, 0xc7, 0xec, 0x20, 0x0d,
+ 0x8a, 0xbb, 0xaa, 0xa5, 0xab, 0xdb, 0x7e, 0xeb, 0x3c, 0x46, 0xe2, 0x6e, 0x0a, 0x51, 0xa5, 0x2c,
+ 0x42, 0x5b, 0x74, 0x29, 0x14, 0xfb, 0x7a, 0x99, 0x91, 0xfe, 0xd0, 0x81, 0x89, 0x6e, 0x5f, 0x5c,
+ 0x3a, 0xee, 0x71, 0x9a, 0x86, 0x6f, 0xc4, 0xa5, 0x50, 0xec, 0xeb, 0x45, 0x2b, 0x70, 0xa1, 0xad,
+ 0xea, 0xbd, 0xa1, 0x45, 0x44, 0xd3, 0x9b, 0xe4, 0x17, 0xf7, 0xab, 0xac, 0x83, 0xdf, 0x09, 0x32,
+ 0x0e, 0x46, 0xb5, 0x72, 0x88, 0xc0, 0x1b, 0x5f, 0x58, 0x18, 0xfd, 0x00, 0x66, 0xfb, 0x21, 0xf0,
+ 0x46, 0x2b, 0xe7, 0xf9, 0xc6, 0x8f, 0x7b, 0x24, 0x9e, 0x02, 0x1f, 0xe8, 0x86, 0xe9, 0x14, 0x47,
+ 0x2d, 0xa1, 0x9f, 0x49, 0x80, 0x2c, 0xa2, 0x1b, 0xbb, 0xa6, 0xc6, 0x35, 0x86, 0xba, 0xf8, 0xb7,
+ 0x85, 0x1a, 0x84, 0x63, 0x2b, 0x0e, 0x46, 0xb5, 0x5b, 0x19, 0x9e, 0x2d, 0xf5, 0xb8, 0x24, 0x0f,
+ 0x41, 0x82, 0x4d, 0xf9, 0x6f, 0x05, 0x98, 0x75, 0x6f, 0xc7, 0x16, 0xd9, 0xee, 0x9a, 0xe6, 0x4e,
+ 0x06, 0x18, 0xfb, 0x08, 0xa6, 0xb5, 0x9e, 0x4e, 0x0c, 0xdb, 0x79, 0x69, 0x88, 0x6c, 0xfe, 0x56,
+ 0xf6, 0xd0, 0x09, 0x53, 0xcb, 0x01, 0x25, 0xca, 0x45, 0x61, 0x68, 0x3a, 0x48, 0xc5, 0x21, 0x43,
+ 0xe8, 0x23, 0x98, 0xb4, 0x02, 0x28, 0xf0, 0xad, 0x2c, 0x16, 0xeb, 0x09, 0x98, 0xcb, 0x2b, 0x15,
+ 0x0e, 0xc8, 0x72, 0x94, 0xc6, 0x53, 0x6c, 0xe2, 0x59, 0x52, 0x2c, 0x82, 0xd1, 0x8a, 0x27, 0xc2,
+ 0x68, 0xc9, 0x50, 0x7f, 0xf2, 0xc5, 0x40, 0xfd, 0xd2, 0xf3, 0x85, 0xfa, 0xef, 0x41, 0x89, 0xea,
+ 0x2d, 0x72, 0xbb, 0xdd, 0x26, 0x9a, 0xcd, 0xee, 0xa3, 0x17, 0xb0, 0x0d, 0x9f, 0xcc, 0x02, 0xe6,
+ 0x7f, 0x2e, 0xf7, 0x54, 0x4a, 0x71, 0x50, 0x0c, 0xdd, 0x82, 0x19, 0xf6, 0x46, 0x36, 0x87, 0xf6,
+ 0x06, 0xd1, 0x4c, 0xa3, 0x45, 0xf9, 0xbd, 0x9a, 0x74, 0x76, 0xf0, 0x30, 0xc4, 0xc1, 0x91, 0x95,
+ 0xe8, 0x43, 0x98, 0xf7, 0xb2, 0x08, 0x93, 0x5d, 0x9d, 0x3c, 0xda, 0x24, 0x16, 0xe5, 0xd5, 0xa1,
+ 0xb0, 0x90, 0x5f, 0x2c, 0x2a, 0x57, 0xc6, 0xa3, 0xda, 0x7c, 0x33, 0x79, 0x09, 0x4e, 0x93, 0x45,
+ 0x3f, 0x4d, 0xbe, 0xef, 0xc0, 0x1d, 0x7c, 0x78, 0x56, 0x77, 0x3d, 0xa9, 0xe6, 0x4d, 0x9f, 0x55,
+ 0xcd, 0x93, 0xff, 0x2c, 0xc1, 0xd5, 0x48, 0xa1, 0x09, 0x8f, 0x29, 0x9e, 0x3f, 0x04, 0xff, 0x2e,
+ 0x14, 0x84, 0x65, 0x17, 0x74, 0x7c, 0xf3, 0xf8, 0xa0, 0x43, 0x68, 0x50, 0x26, 0x98, 0x29, 0xec,
+ 0x29, 0x94, 0xff, 0x21, 0xc1, 0xc2, 0x61, 0xfe, 0x9d, 0x01, 0xa2, 0xda, 0x09, 0x23, 0xaa, 0x3b,
+ 0x27, 0x76, 0x2e, 0xb4, 0xf1, 0x14, 0x58, 0xf5, 0xdb, 0x1c, 0x14, 0xdc, 0x3e, 0x8d, 0xde, 0x61,
+ 0x18, 0xca, 0xd6, 0xba, 0x2c, 0xf5, 0xc4, 0x54, 0xa3, 0xea, 0x36, 0xf3, 0x75, 0x97, 0x71, 0x10,
+ 0xfc, 0xc0, 0xbe, 0x00, 0xbf, 0x1e, 0x6a, 0x6c, 0x6e, 0x25, 0x20, 0xf0, 0x3b, 0xd9, 0xbd, 0x88,
+ 0xcf, 0xbe, 0x94, 0xaf, 0xb0, 0xcb, 0x15, 0xa7, 0xe3, 0x04, 0x7b, 0x0c, 0x08, 0x7e, 0x4a, 0x4d,
+ 0x83, 0x6f, 0x91, 0x57, 0xfe, 0x63, 0x01, 0x41, 0x6f, 0x96, 0xe4, 0x00, 0x41, 0xef, 0x13, 0xfb,
+ 0x4a, 0xe5, 0xa7, 0x12, 0xcc, 0xa7, 0x4c, 0x01, 0xd0, 0x5b, 0xfe, 0x9c, 0x83, 0x57, 0xe7, 0x8a,
+ 0xc4, 0x0b, 0x4e, 0x39, 0x38, 0xa0, 0xe0, 0x0c, 0x1c, 0x5e, 0x87, 0x7e, 0xc2, 0x8a, 0x4b, 0x4c,
+ 0x9f, 0x68, 0xc9, 0x27, 0x6e, 0x90, 0x97, 0x3d, 0x14, 0x12, 0xe3, 0xe1, 0x04, 0x73, 0xb2, 0x0a,
+ 0x3e, 0xf6, 0x65, 0x0f, 0x2c, 0x75, 0xa0, 0x8b, 0xf2, 0x17, 0x7d, 0x60, 0x35, 0xd7, 0xef, 0x09,
+ 0x0e, 0x0e, 0xac, 0x62, 0xa0, 0x63, 0x87, 0x21, 0xf0, 0x5c, 0x18, 0x74, 0x70, 0x2c, 0xcd, 0x39,
+ 0xf2, 0xef, 0x72, 0xe0, 0xbd, 0x9d, 0x32, 0x60, 0x94, 0x06, 0x14, 0xbd, 0x9e, 0x26, 0xb4, 0x7a,
+ 0x00, 0xd3, 0xeb, 0x7f, 0xd8, 0x5f, 0x83, 0x3e, 0x86, 0x02, 0x75, 0x3b, 0x5d, 0xfe, 0xe4, 0x9d,
+ 0x8e, 0xbf, 0xf1, 0xbc, 0x1e, 0xe7, 0xa9, 0x44, 0x36, 0xcc, 0xf3, 0x27, 0x01, 0xb1, 0x89, 0xb5,
+ 0x66, 0xda, 0x77, 0xcc, 0xa1, 0xd1, 0x6a, 0x6a, 0x3c, 0xd3, 0x1d, 0x98, 0x71, 0x8b, 0xf5, 0x96,
+ 0xf5, 0xe4, 0x25, 0x07, 0xa3, 0xda, 0x95, 0x14, 0x16, 0xbf, 0x4d, 0x69, 0xaa, 0xe5, 0x5f, 0x4b,
+ 0x30, 0xb7, 0x41, 0xac, 0x5d, 0x5d, 0x23, 0x98, 0xb4, 0x89, 0x45, 0x0c, 0x2d, 0x12, 0x1a, 0x29,
+ 0x43, 0x68, 0xdc, 0x68, 0xe7, 0x52, 0xa3, 0x7d, 0x15, 0x26, 0x06, 0xaa, 0xdd, 0x15, 0x53, 0xd7,
+ 0x02, 0xe3, 0xae, 0xab, 0x76, 0x17, 0x73, 0x2a, 0xe7, 0x9a, 0x96, 0xcd, 0x1d, 0x9d, 0x14, 0x5c,
+ 0xd3, 0xb2, 0x31, 0xa7, 0xca, 0xbf, 0x94, 0x60, 0x9a, 0x79, 0xb1, 0xdc, 0x25, 0xda, 0x8e, 0x6e,
+ 0x74, 0xd0, 0x67, 0x12, 0x20, 0x12, 0x9d, 0x04, 0x3b, 0x37, 0xa2, 0xb4, 0xf4, 0x76, 0xf6, 0x3b,
+ 0x19, 0x9b, 0x26, 0xfb, 0x69, 0x1d, 0x63, 0x51, 0x9c, 0x60, 0x52, 0xfe, 0x53, 0x0e, 0x2e, 0x6d,
+ 0xaa, 0x3d, 0xbd, 0xf5, 0x82, 0x66, 0x64, 0x7a, 0x68, 0x6a, 0x74, 0xf7, 0x38, 0x2f, 0xb7, 0x94,
+ 0x4d, 0xa7, 0x0d, 0x8c, 0xd0, 0xf7, 0xe0, 0x3c, 0xb5, 0x55, 0x7b, 0xe8, 0xce, 0x1e, 0xee, 0x9d,
+ 0x86, 0x31, 0xae, 0x50, 0x99, 0x11, 0xe6, 0xce, 0x3b, 0xdf, 0x58, 0x18, 0x92, 0xff, 0x2d, 0xc1,
+ 0x42, 0xaa, 0xec, 0xd9, 0x8d, 0xe6, 0x06, 0xa1, 0x20, 0xaf, 0x9d, 0x82, 0xdf, 0x47, 0x0d, 0xe7,
+ 0xfe, 0x25, 0xc1, 0x6b, 0x47, 0x09, 0x9f, 0x01, 0x60, 0x30, 0xc3, 0x80, 0xe1, 0xfe, 0xe9, 0x79,
+ 0x9e, 0x02, 0x1a, 0x3e, 0xcb, 0x1f, 0xed, 0xf7, 0xcb, 0x11, 0x5d, 0xe0, 0x1f, 0x3d, 0x5b, 0x50,
+ 0xde, 0x15, 0xf1, 0x32, 0x0d, 0xa7, 0xa4, 0x3b, 0x13, 0x96, 0xa2, 0x72, 0x9d, 0x3d, 0xe4, 0x36,
+ 0xa3, 0xcc, 0x83, 0x51, 0x6d, 0x2e, 0x4a, 0xc4, 0x71, 0x1d, 0xf2, 0xdf, 0x25, 0xb8, 0x96, 0x7a,
+ 0x12, 0x67, 0x90, 0x7a, 0xdd, 0x70, 0xea, 0x2d, 0x9f, 0x46, 0xea, 0xa5, 0xce, 0xff, 0xae, 0x1d,
+ 0x5a, 0x0d, 0xff, 0xcf, 0x27, 0x80, 0x3b, 0x50, 0xf2, 0x8f, 0xdf, 0x1d, 0x9c, 0xbc, 0x71, 0xfc,
+ 0x78, 0x9b, 0x86, 0xf2, 0x8a, 0x08, 0x70, 0xc9, 0xa7, 0x51, 0x1c, 0xd4, 0x7e, 0xca, 0x13, 0x94,
+ 0x1f, 0xc1, 0x9c, 0x1a, 0xfe, 0x2f, 0x34, 0xad, 0x4c, 0x1e, 0xf7, 0xe1, 0x16, 0xf9, 0x3f, 0xb6,
+ 0x52, 0x11, 0x4e, 0xcc, 0x45, 0x18, 0x14, 0xc7, 0x8c, 0xbd, 0xd8, 0x29, 0x61, 0x68, 0x74, 0x3b,
+ 0xf5, 0x7c, 0x46, 0xb7, 0xf2, 0x1f, 0x72, 0x50, 0x3b, 0xa2, 0x7d, 0xa3, 0xfb, 0x80, 0xcc, 0x6d,
+ 0x4a, 0xac, 0x5d, 0xd2, 0xba, 0xeb, 0xfc, 0xe2, 0xc0, 0x85, 0xf5, 0x79, 0x1f, 0x50, 0x3d, 0x88,
+ 0xad, 0xc0, 0x09, 0x52, 0xa8, 0x07, 0xd3, 0x76, 0x00, 0xea, 0x89, 0x5b, 0xf0, 0x66, 0x76, 0xbf,
+ 0x82, 0x40, 0x51, 0x99, 0x1b, 0x8f, 0x6a, 0x21, 0xe8, 0x88, 0x43, 0xda, 0x91, 0x06, 0xa0, 0xf9,
+ 0x47, 0xe7, 0xa4, 0x7e, 0x23, 0x5b, 0x15, 0xf3, 0x4f, 0xcc, 0xeb, 0x3b, 0x81, 0xc3, 0x0a, 0xa8,
+ 0x95, 0xf7, 0xa7, 0xa0, 0xec, 0x87, 0xf0, 0xe5, 0x10, 0xf5, 0xe5, 0x10, 0xf5, 0xd0, 0x21, 0x2a,
+ 0xbc, 0x1c, 0xa2, 0x9e, 0x68, 0x88, 0x9a, 0x50, 0x8b, 0x4b, 0x67, 0x36, 0xbd, 0xdc, 0x97, 0xa0,
+ 0x1a, 0xbb, 0xe3, 0x67, 0x3d, 0xbf, 0xfc, 0x38, 0x36, 0xbf, 0x7c, 0xfb, 0x24, 0xb0, 0x29, 0x6d,
+ 0x82, 0xf9, 0xa5, 0x04, 0xf2, 0xe1, 0x3e, 0xfe, 0x4f, 0xff, 0x62, 0xe0, 0xf0, 0xad, 0xa7, 0x80,
+ 0xc3, 0xff, 0x48, 0x00, 0x3e, 0x98, 0x41, 0xaf, 0x41, 0xe0, 0x47, 0x58, 0xa2, 0x74, 0x3b, 0x61,
+ 0x0a, 0xd0, 0xd1, 0x75, 0x98, 0xea, 0x13, 0x4a, 0xd5, 0x8e, 0x3b, 0x10, 0xf1, 0x7e, 0x64, 0xb6,
+ 0xea, 0x90, 0xb1, 0xcb, 0x47, 0x5b, 0x70, 0xde, 0x22, 0x2a, 0x15, 0xd3, 0xcc, 0xa2, 0xf2, 0x2e,
+ 0x7b, 0x05, 0x63, 0x4e, 0x39, 0x18, 0xd5, 0x6e, 0x64, 0xf9, 0x39, 0x61, 0x5d, 0x3c, 0x9a, 0xb9,
+ 0x10, 0x16, 0xea, 0xd0, 0x5d, 0x28, 0x0b, 0x1b, 0x81, 0x0d, 0x3b, 0x95, 0xf6, 0x92, 0xd8, 0x4d,
+ 0x79, 0x35, 0xba, 0x00, 0xc7, 0x65, 0xe4, 0xfb, 0x50, 0x70, 0x81, 0x01, 0xaa, 0xc0, 0x44, 0xe0,
+ 0xbd, 0xe5, 0x38, 0xce, 0x29, 0x91, 0xc0, 0xe4, 0x92, 0x03, 0x23, 0xff, 0x5e, 0x82, 0x57, 0x12,
+ 0x9a, 0x12, 0xba, 0x04, 0xf9, 0xa1, 0xd5, 0x13, 0x21, 0x98, 0x1a, 0x8f, 0x6a, 0xf9, 0x0f, 0xf1,
+ 0x0a, 0x66, 0x34, 0xa4, 0xc2, 0x14, 0x75, 0xc6, 0x53, 0x22, 0x99, 0x6e, 0x65, 0x3f, 0xf1, 0xe8,
+ 0x5c, 0x4b, 0x29, 0xb1, 0x33, 0x70, 0xa9, 0xae, 0x5e, 0xb4, 0x08, 0x05, 0x4d, 0x55, 0x86, 0x46,
+ 0xab, 0xe7, 0x9c, 0xd7, 0xb4, 0xf3, 0xc6, 0x5b, 0x6e, 0x3a, 0x34, 0xec, 0x71, 0x95, 0xb5, 0x27,
+ 0xfb, 0xd5, 0x73, 0x9f, 0xef, 0x57, 0xcf, 0x3d, 0xdd, 0xaf, 0x9e, 0xfb, 0xf1, 0xb8, 0x2a, 0x3d,
+ 0x19, 0x57, 0xa5, 0xcf, 0xc7, 0x55, 0xe9, 0xe9, 0xb8, 0x2a, 0xfd, 0x65, 0x5c, 0x95, 0x7e, 0xfe,
+ 0x45, 0xf5, 0xdc, 0x77, 0x16, 0xb3, 0xfe, 0x98, 0xf5, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x13,
+ 0x7c, 0x49, 0xa4, 0xf7, 0x2a, 0x00, 0x00,
+}
+
+func (m *ApplyConfiguration) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ApplyConfiguration) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ApplyConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ i -= len(m.Expression)
+ copy(dAtA[i:], m.Expression)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Expression)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
}
func (m *AuditAnnotation) Marshal() (dAtA []byte, err error) {
@@ -971,6 +1277,34 @@ func (m *ExpressionWarning) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
+func (m *JSONPatch) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *JSONPatch) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *JSONPatch) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ i -= len(m.Expression)
+ copy(dAtA[i:], m.Expression)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Expression)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
func (m *MatchCondition) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -1086,7 +1420,7 @@ func (m *MatchResources) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
-func (m *MutatingWebhook) Marshal() (dAtA []byte, err error) {
+func (m *MutatingAdmissionPolicy) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -1096,112 +1430,18 @@ func (m *MutatingWebhook) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
-func (m *MutatingWebhook) MarshalTo(dAtA []byte) (int, error) {
+func (m *MutatingAdmissionPolicy) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *MutatingWebhook) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+func (m *MutatingAdmissionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
- if len(m.MatchConditions) > 0 {
- for iNdEx := len(m.MatchConditions) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.MatchConditions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x62
- }
- }
- if m.ObjectSelector != nil {
- {
- size, err := m.ObjectSelector.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x5a
- }
- if m.ReinvocationPolicy != nil {
- i -= len(*m.ReinvocationPolicy)
- copy(dAtA[i:], *m.ReinvocationPolicy)
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ReinvocationPolicy)))
- i--
- dAtA[i] = 0x52
- }
- if m.MatchPolicy != nil {
- i -= len(*m.MatchPolicy)
- copy(dAtA[i:], *m.MatchPolicy)
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.MatchPolicy)))
- i--
- dAtA[i] = 0x4a
- }
- if len(m.AdmissionReviewVersions) > 0 {
- for iNdEx := len(m.AdmissionReviewVersions) - 1; iNdEx >= 0; iNdEx-- {
- i -= len(m.AdmissionReviewVersions[iNdEx])
- copy(dAtA[i:], m.AdmissionReviewVersions[iNdEx])
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.AdmissionReviewVersions[iNdEx])))
- i--
- dAtA[i] = 0x42
- }
- }
- if m.TimeoutSeconds != nil {
- i = encodeVarintGenerated(dAtA, i, uint64(*m.TimeoutSeconds))
- i--
- dAtA[i] = 0x38
- }
- if m.SideEffects != nil {
- i -= len(*m.SideEffects)
- copy(dAtA[i:], *m.SideEffects)
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.SideEffects)))
- i--
- dAtA[i] = 0x32
- }
- if m.NamespaceSelector != nil {
- {
- size, err := m.NamespaceSelector.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x2a
- }
- if m.FailurePolicy != nil {
- i -= len(*m.FailurePolicy)
- copy(dAtA[i:], *m.FailurePolicy)
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy)))
- i--
- dAtA[i] = 0x22
- }
- if len(m.Rules) > 0 {
- for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x1a
- }
- }
{
- size, err := m.ClientConfig.MarshalToSizedBuffer(dAtA[:i])
+ size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
@@ -1210,15 +1450,20 @@ func (m *MutatingWebhook) MarshalToSizedBuffer(dAtA []byte) (int, error) {
}
i--
dAtA[i] = 0x12
- i -= len(m.Name)
- copy(dAtA[i:], m.Name)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ {
+ size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
}
-func (m *MutatingWebhookConfiguration) Marshal() (dAtA []byte, err error) {
+func (m *MutatingAdmissionPolicyBinding) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -1228,30 +1473,26 @@ func (m *MutatingWebhookConfiguration) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
-func (m *MutatingWebhookConfiguration) MarshalTo(dAtA []byte) (int, error) {
+func (m *MutatingAdmissionPolicyBinding) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *MutatingWebhookConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+func (m *MutatingAdmissionPolicyBinding) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
- if len(m.Webhooks) > 0 {
- for iNdEx := len(m.Webhooks) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Webhooks[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
+ {
+ size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
}
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
}
+ i--
+ dAtA[i] = 0x12
{
size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
@@ -1265,7 +1506,7 @@ func (m *MutatingWebhookConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, e
return len(dAtA) - i, nil
}
-func (m *MutatingWebhookConfigurationList) Marshal() (dAtA []byte, err error) {
+func (m *MutatingAdmissionPolicyBindingList) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -1275,12 +1516,12 @@ func (m *MutatingWebhookConfigurationList) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
-func (m *MutatingWebhookConfigurationList) MarshalTo(dAtA []byte) (int, error) {
+func (m *MutatingAdmissionPolicyBindingList) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *MutatingWebhookConfigurationList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+func (m *MutatingAdmissionPolicyBindingList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
@@ -1312,7 +1553,7 @@ func (m *MutatingWebhookConfigurationList) MarshalToSizedBuffer(dAtA []byte) (in
return len(dAtA) - i, nil
}
-func (m *NamedRuleWithOperations) Marshal() (dAtA []byte, err error) {
+func (m *MutatingAdmissionPolicyBindingSpec) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -1322,39 +1563,49 @@ func (m *NamedRuleWithOperations) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
-func (m *NamedRuleWithOperations) MarshalTo(dAtA []byte) (int, error) {
+func (m *MutatingAdmissionPolicyBindingSpec) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *NamedRuleWithOperations) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+func (m *MutatingAdmissionPolicyBindingSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
- {
- size, err := m.RuleWithOperations.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
+ if m.MatchResources != nil {
+ {
+ size, err := m.MatchResources.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
}
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
}
- i--
- dAtA[i] = 0x12
- if len(m.ResourceNames) > 0 {
- for iNdEx := len(m.ResourceNames) - 1; iNdEx >= 0; iNdEx-- {
- i -= len(m.ResourceNames[iNdEx])
- copy(dAtA[i:], m.ResourceNames[iNdEx])
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceNames[iNdEx])))
- i--
- dAtA[i] = 0xa
+ if m.ParamRef != nil {
+ {
+ size, err := m.ParamRef.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
}
+ i--
+ dAtA[i] = 0x12
}
+ i -= len(m.PolicyName)
+ copy(dAtA[i:], m.PolicyName)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.PolicyName)))
+ i--
+ dAtA[i] = 0xa
return len(dAtA) - i, nil
}
-func (m *ParamKind) Marshal() (dAtA []byte, err error) {
+func (m *MutatingAdmissionPolicyList) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -1364,30 +1615,44 @@ func (m *ParamKind) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
-func (m *ParamKind) MarshalTo(dAtA []byte) (int, error) {
+func (m *MutatingAdmissionPolicyList) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *ParamKind) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+func (m *MutatingAdmissionPolicyList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
- i -= len(m.Kind)
- copy(dAtA[i:], m.Kind)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
- i--
- dAtA[i] = 0x12
- i -= len(m.APIVersion)
- copy(dAtA[i:], m.APIVersion)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
+ if len(m.Items) > 0 {
+ for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ {
+ size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
}
-func (m *ParamRef) Marshal() (dAtA []byte, err error) {
+func (m *MutatingAdmissionPolicySpec) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -1397,26 +1662,73 @@ func (m *ParamRef) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
-func (m *ParamRef) MarshalTo(dAtA []byte) (int, error) {
+func (m *MutatingAdmissionPolicySpec) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *ParamRef) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+func (m *MutatingAdmissionPolicySpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
- if m.ParameterNotFoundAction != nil {
- i -= len(*m.ParameterNotFoundAction)
- copy(dAtA[i:], *m.ParameterNotFoundAction)
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ParameterNotFoundAction)))
+ i -= len(m.ReinvocationPolicy)
+ copy(dAtA[i:], m.ReinvocationPolicy)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ReinvocationPolicy)))
+ i--
+ dAtA[i] = 0x3a
+ if len(m.MatchConditions) > 0 {
+ for iNdEx := len(m.MatchConditions) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.MatchConditions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x32
+ }
+ }
+ if m.FailurePolicy != nil {
+ i -= len(*m.FailurePolicy)
+ copy(dAtA[i:], *m.FailurePolicy)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy)))
i--
- dAtA[i] = 0x22
+ dAtA[i] = 0x2a
}
- if m.Selector != nil {
+ if len(m.Mutations) > 0 {
+ for iNdEx := len(m.Mutations) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Mutations[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x22
+ }
+ }
+ if len(m.Variables) > 0 {
+ for iNdEx := len(m.Variables) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Variables[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
+ if m.MatchConstraints != nil {
{
- size, err := m.Selector.MarshalToSizedBuffer(dAtA[:i])
+ size, err := m.MatchConstraints.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
@@ -1424,67 +1736,24 @@ func (m *ParamRef) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i = encodeVarintGenerated(dAtA, i, uint64(size))
}
i--
- dAtA[i] = 0x1a
- }
- i -= len(m.Namespace)
- copy(dAtA[i:], m.Namespace)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
- i--
- dAtA[i] = 0x12
- i -= len(m.Name)
- copy(dAtA[i:], m.Name)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *ServiceReference) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ServiceReference) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *ServiceReference) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.Port != nil {
- i = encodeVarintGenerated(dAtA, i, uint64(*m.Port))
- i--
- dAtA[i] = 0x20
+ dAtA[i] = 0x12
}
- if m.Path != nil {
- i -= len(*m.Path)
- copy(dAtA[i:], *m.Path)
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Path)))
+ if m.ParamKind != nil {
+ {
+ size, err := m.ParamKind.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
i--
- dAtA[i] = 0x1a
+ dAtA[i] = 0xa
}
- i -= len(m.Name)
- copy(dAtA[i:], m.Name)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i--
- dAtA[i] = 0x12
- i -= len(m.Namespace)
- copy(dAtA[i:], m.Namespace)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
- i--
- dAtA[i] = 0xa
return len(dAtA) - i, nil
}
-func (m *TypeChecking) Marshal() (dAtA []byte, err error) {
+func (m *MutatingWebhook) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -1494,20 +1763,20 @@ func (m *TypeChecking) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
-func (m *TypeChecking) MarshalTo(dAtA []byte) (int, error) {
+func (m *MutatingWebhook) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *TypeChecking) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+func (m *MutatingWebhook) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
- if len(m.ExpressionWarnings) > 0 {
- for iNdEx := len(m.ExpressionWarnings) - 1; iNdEx >= 0; iNdEx-- {
+ if len(m.MatchConditions) > 0 {
+ for iNdEx := len(m.MatchConditions) - 1; iNdEx >= 0; iNdEx-- {
{
- size, err := m.ExpressionWarnings[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ size, err := m.MatchConditions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
@@ -1515,54 +1784,91 @@ func (m *TypeChecking) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i = encodeVarintGenerated(dAtA, i, uint64(size))
}
i--
- dAtA[i] = 0xa
+ dAtA[i] = 0x62
}
}
- return len(dAtA) - i, nil
-}
-
-func (m *ValidatingAdmissionPolicy) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
+ if m.ObjectSelector != nil {
+ {
+ size, err := m.ObjectSelector.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x5a
}
- return dAtA[:n], nil
-}
-
-func (m *ValidatingAdmissionPolicy) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *ValidatingAdmissionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- {
- size, err := m.Status.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
+ if m.ReinvocationPolicy != nil {
+ i -= len(*m.ReinvocationPolicy)
+ copy(dAtA[i:], *m.ReinvocationPolicy)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ReinvocationPolicy)))
+ i--
+ dAtA[i] = 0x52
+ }
+ if m.MatchPolicy != nil {
+ i -= len(*m.MatchPolicy)
+ copy(dAtA[i:], *m.MatchPolicy)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.MatchPolicy)))
+ i--
+ dAtA[i] = 0x4a
+ }
+ if len(m.AdmissionReviewVersions) > 0 {
+ for iNdEx := len(m.AdmissionReviewVersions) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.AdmissionReviewVersions[iNdEx])
+ copy(dAtA[i:], m.AdmissionReviewVersions[iNdEx])
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.AdmissionReviewVersions[iNdEx])))
+ i--
+ dAtA[i] = 0x42
}
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
}
- i--
- dAtA[i] = 0x1a
- {
- size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
+ if m.TimeoutSeconds != nil {
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.TimeoutSeconds))
+ i--
+ dAtA[i] = 0x38
+ }
+ if m.SideEffects != nil {
+ i -= len(*m.SideEffects)
+ copy(dAtA[i:], *m.SideEffects)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.SideEffects)))
+ i--
+ dAtA[i] = 0x32
+ }
+ if m.NamespaceSelector != nil {
+ {
+ size, err := m.NamespaceSelector.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x2a
+ }
+ if m.FailurePolicy != nil {
+ i -= len(*m.FailurePolicy)
+ copy(dAtA[i:], *m.FailurePolicy)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.Rules) > 0 {
+ for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1a
}
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
}
- i--
- dAtA[i] = 0x12
{
- size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
+ size, err := m.ClientConfig.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
@@ -1570,11 +1876,16 @@ func (m *ValidatingAdmissionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, erro
i = encodeVarintGenerated(dAtA, i, uint64(size))
}
i--
+ dAtA[i] = 0x12
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
}
-func (m *ValidatingAdmissionPolicyBinding) Marshal() (dAtA []byte, err error) {
+func (m *MutatingWebhookConfiguration) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -1584,26 +1895,30 @@ func (m *ValidatingAdmissionPolicyBinding) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
-func (m *ValidatingAdmissionPolicyBinding) MarshalTo(dAtA []byte) (int, error) {
+func (m *MutatingWebhookConfiguration) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *ValidatingAdmissionPolicyBinding) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+func (m *MutatingWebhookConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
- {
- size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
+ if len(m.Webhooks) > 0 {
+ for iNdEx := len(m.Webhooks) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Webhooks[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
}
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
}
- i--
- dAtA[i] = 0x12
{
size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
@@ -1617,7 +1932,7 @@ func (m *ValidatingAdmissionPolicyBinding) MarshalToSizedBuffer(dAtA []byte) (in
return len(dAtA) - i, nil
}
-func (m *ValidatingAdmissionPolicyBindingList) Marshal() (dAtA []byte, err error) {
+func (m *MutatingWebhookConfigurationList) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -1627,12 +1942,12 @@ func (m *ValidatingAdmissionPolicyBindingList) Marshal() (dAtA []byte, err error
return dAtA[:n], nil
}
-func (m *ValidatingAdmissionPolicyBindingList) MarshalTo(dAtA []byte) (int, error) {
+func (m *MutatingWebhookConfigurationList) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *ValidatingAdmissionPolicyBindingList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+func (m *MutatingWebhookConfigurationList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
@@ -1664,7 +1979,7 @@ func (m *ValidatingAdmissionPolicyBindingList) MarshalToSizedBuffer(dAtA []byte)
return len(dAtA) - i, nil
}
-func (m *ValidatingAdmissionPolicyBindingSpec) Marshal() (dAtA []byte, err error) {
+func (m *Mutation) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -1674,28 +1989,19 @@ func (m *ValidatingAdmissionPolicyBindingSpec) Marshal() (dAtA []byte, err error
return dAtA[:n], nil
}
-func (m *ValidatingAdmissionPolicyBindingSpec) MarshalTo(dAtA []byte) (int, error) {
+func (m *Mutation) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *ValidatingAdmissionPolicyBindingSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+func (m *Mutation) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
- if len(m.ValidationActions) > 0 {
- for iNdEx := len(m.ValidationActions) - 1; iNdEx >= 0; iNdEx-- {
- i -= len(m.ValidationActions[iNdEx])
- copy(dAtA[i:], m.ValidationActions[iNdEx])
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.ValidationActions[iNdEx])))
- i--
- dAtA[i] = 0x22
- }
- }
- if m.MatchResources != nil {
+ if m.JSONPatch != nil {
{
- size, err := m.MatchResources.MarshalToSizedBuffer(dAtA[:i])
+ size, err := m.JSONPatch.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
@@ -1703,11 +2009,11 @@ func (m *ValidatingAdmissionPolicyBindingSpec) MarshalToSizedBuffer(dAtA []byte)
i = encodeVarintGenerated(dAtA, i, uint64(size))
}
i--
- dAtA[i] = 0x1a
+ dAtA[i] = 0x22
}
- if m.ParamRef != nil {
+ if m.ApplyConfiguration != nil {
{
- size, err := m.ParamRef.MarshalToSizedBuffer(dAtA[:i])
+ size, err := m.ApplyConfiguration.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
@@ -1715,17 +2021,17 @@ func (m *ValidatingAdmissionPolicyBindingSpec) MarshalToSizedBuffer(dAtA []byte)
i = encodeVarintGenerated(dAtA, i, uint64(size))
}
i--
- dAtA[i] = 0x12
+ dAtA[i] = 0x1a
}
- i -= len(m.PolicyName)
- copy(dAtA[i:], m.PolicyName)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.PolicyName)))
+ i -= len(m.PatchType)
+ copy(dAtA[i:], m.PatchType)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.PatchType)))
i--
- dAtA[i] = 0xa
+ dAtA[i] = 0x12
return len(dAtA) - i, nil
}
-func (m *ValidatingAdmissionPolicyList) Marshal() (dAtA []byte, err error) {
+func (m *NamedRuleWithOperations) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -1735,32 +2041,18 @@ func (m *ValidatingAdmissionPolicyList) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
-func (m *ValidatingAdmissionPolicyList) MarshalTo(dAtA []byte) (int, error) {
+func (m *NamedRuleWithOperations) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *ValidatingAdmissionPolicyList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+func (m *NamedRuleWithOperations) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
- if len(m.Items) > 0 {
- for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- }
- }
{
- size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
+ size, err := m.RuleWithOperations.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
@@ -1768,11 +2060,20 @@ func (m *ValidatingAdmissionPolicyList) MarshalToSizedBuffer(dAtA []byte) (int,
i = encodeVarintGenerated(dAtA, i, uint64(size))
}
i--
- dAtA[i] = 0xa
+ dAtA[i] = 0x12
+ if len(m.ResourceNames) > 0 {
+ for iNdEx := len(m.ResourceNames) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.ResourceNames[iNdEx])
+ copy(dAtA[i:], m.ResourceNames[iNdEx])
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceNames[iNdEx])))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
return len(dAtA) - i, nil
}
-func (m *ValidatingAdmissionPolicySpec) Marshal() (dAtA []byte, err error) {
+func (m *ParamKind) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -1782,94 +2083,59 @@ func (m *ValidatingAdmissionPolicySpec) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
-func (m *ValidatingAdmissionPolicySpec) MarshalTo(dAtA []byte) (int, error) {
+func (m *ParamKind) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *ValidatingAdmissionPolicySpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+func (m *ParamKind) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
- if len(m.Variables) > 0 {
- for iNdEx := len(m.Variables) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Variables[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x3a
- }
- }
- if len(m.MatchConditions) > 0 {
- for iNdEx := len(m.MatchConditions) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.MatchConditions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x32
- }
- }
- if len(m.AuditAnnotations) > 0 {
- for iNdEx := len(m.AuditAnnotations) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.AuditAnnotations[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x2a
- }
+ i -= len(m.Kind)
+ copy(dAtA[i:], m.Kind)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i--
+ dAtA[i] = 0x12
+ i -= len(m.APIVersion)
+ copy(dAtA[i:], m.APIVersion)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *ParamRef) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
}
- if m.FailurePolicy != nil {
- i -= len(*m.FailurePolicy)
- copy(dAtA[i:], *m.FailurePolicy)
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy)))
+ return dAtA[:n], nil
+}
+
+func (m *ParamRef) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ParamRef) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.ParameterNotFoundAction != nil {
+ i -= len(*m.ParameterNotFoundAction)
+ copy(dAtA[i:], *m.ParameterNotFoundAction)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ParameterNotFoundAction)))
i--
dAtA[i] = 0x22
}
- if len(m.Validations) > 0 {
- for iNdEx := len(m.Validations) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Validations[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x1a
- }
- }
- if m.MatchConstraints != nil {
- {
- size, err := m.MatchConstraints.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- }
- if m.ParamKind != nil {
+ if m.Selector != nil {
{
- size, err := m.ParamKind.MarshalToSizedBuffer(dAtA[:i])
+ size, err := m.Selector.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
@@ -1877,12 +2143,22 @@ func (m *ValidatingAdmissionPolicySpec) MarshalToSizedBuffer(dAtA []byte) (int,
i = encodeVarintGenerated(dAtA, i, uint64(size))
}
i--
- dAtA[i] = 0xa
+ dAtA[i] = 0x1a
}
+ i -= len(m.Namespace)
+ copy(dAtA[i:], m.Namespace)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
+ i--
+ dAtA[i] = 0x12
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
return len(dAtA) - i, nil
}
-func (m *ValidatingAdmissionPolicyStatus) Marshal() (dAtA []byte, err error) {
+func (m *ServiceReference) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -1892,49 +2168,42 @@ func (m *ValidatingAdmissionPolicyStatus) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
-func (m *ValidatingAdmissionPolicyStatus) MarshalTo(dAtA []byte) (int, error) {
+func (m *ServiceReference) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *ValidatingAdmissionPolicyStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+func (m *ServiceReference) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
- if len(m.Conditions) > 0 {
- for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x1a
- }
+ if m.Port != nil {
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Port))
+ i--
+ dAtA[i] = 0x20
}
- if m.TypeChecking != nil {
- {
- size, err := m.TypeChecking.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
+ if m.Path != nil {
+ i -= len(*m.Path)
+ copy(dAtA[i:], *m.Path)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Path)))
i--
- dAtA[i] = 0x12
+ dAtA[i] = 0x1a
}
- i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
i--
- dAtA[i] = 0x8
+ dAtA[i] = 0x12
+ i -= len(m.Namespace)
+ copy(dAtA[i:], m.Namespace)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
+ i--
+ dAtA[i] = 0xa
return len(dAtA) - i, nil
}
-func (m *ValidatingWebhook) Marshal() (dAtA []byte, err error) {
+func (m *TypeChecking) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -1944,20 +2213,20 @@ func (m *ValidatingWebhook) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
-func (m *ValidatingWebhook) MarshalTo(dAtA []byte) (int, error) {
+func (m *TypeChecking) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *ValidatingWebhook) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+func (m *TypeChecking) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
- if len(m.MatchConditions) > 0 {
- for iNdEx := len(m.MatchConditions) - 1; iNdEx >= 0; iNdEx-- {
+ if len(m.ExpressionWarnings) > 0 {
+ for iNdEx := len(m.ExpressionWarnings) - 1; iNdEx >= 0; iNdEx-- {
{
- size, err := m.MatchConditions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ size, err := m.ExpressionWarnings[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
@@ -1965,84 +2234,44 @@ func (m *ValidatingWebhook) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i = encodeVarintGenerated(dAtA, i, uint64(size))
}
i--
- dAtA[i] = 0x5a
- }
- }
- if m.ObjectSelector != nil {
- {
- size, err := m.ObjectSelector.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
+ dAtA[i] = 0xa
}
- i--
- dAtA[i] = 0x52
}
- if m.MatchPolicy != nil {
- i -= len(*m.MatchPolicy)
- copy(dAtA[i:], *m.MatchPolicy)
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.MatchPolicy)))
- i--
- dAtA[i] = 0x4a
+ return len(dAtA) - i, nil
+}
+
+func (m *ValidatingAdmissionPolicy) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
}
- if len(m.AdmissionReviewVersions) > 0 {
- for iNdEx := len(m.AdmissionReviewVersions) - 1; iNdEx >= 0; iNdEx-- {
- i -= len(m.AdmissionReviewVersions[iNdEx])
- copy(dAtA[i:], m.AdmissionReviewVersions[iNdEx])
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.AdmissionReviewVersions[iNdEx])))
- i--
- dAtA[i] = 0x42
- }
- }
- if m.TimeoutSeconds != nil {
- i = encodeVarintGenerated(dAtA, i, uint64(*m.TimeoutSeconds))
- i--
- dAtA[i] = 0x38
- }
- if m.SideEffects != nil {
- i -= len(*m.SideEffects)
- copy(dAtA[i:], *m.SideEffects)
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.SideEffects)))
- i--
- dAtA[i] = 0x32
- }
- if m.NamespaceSelector != nil {
- {
- size, err := m.NamespaceSelector.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x2a
- }
- if m.FailurePolicy != nil {
- i -= len(*m.FailurePolicy)
- copy(dAtA[i:], *m.FailurePolicy)
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy)))
- i--
- dAtA[i] = 0x22
- }
- if len(m.Rules) > 0 {
- for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x1a
+ return dAtA[:n], nil
+}
+
+func (m *ValidatingAdmissionPolicy) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ValidatingAdmissionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ {
+ size, err := m.Status.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
}
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
}
+ i--
+ dAtA[i] = 0x1a
{
- size, err := m.ClientConfig.MarshalToSizedBuffer(dAtA[:i])
+ size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
@@ -2051,15 +2280,20 @@ func (m *ValidatingWebhook) MarshalToSizedBuffer(dAtA []byte) (int, error) {
}
i--
dAtA[i] = 0x12
- i -= len(m.Name)
- copy(dAtA[i:], m.Name)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ {
+ size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
}
-func (m *ValidatingWebhookConfiguration) Marshal() (dAtA []byte, err error) {
+func (m *ValidatingAdmissionPolicyBinding) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -2069,30 +2303,26 @@ func (m *ValidatingWebhookConfiguration) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
-func (m *ValidatingWebhookConfiguration) MarshalTo(dAtA []byte) (int, error) {
+func (m *ValidatingAdmissionPolicyBinding) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *ValidatingWebhookConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+func (m *ValidatingAdmissionPolicyBinding) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
- if len(m.Webhooks) > 0 {
- for iNdEx := len(m.Webhooks) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Webhooks[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
+ {
+ size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
}
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
}
+ i--
+ dAtA[i] = 0x12
{
size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
@@ -2106,7 +2336,7 @@ func (m *ValidatingWebhookConfiguration) MarshalToSizedBuffer(dAtA []byte) (int,
return len(dAtA) - i, nil
}
-func (m *ValidatingWebhookConfigurationList) Marshal() (dAtA []byte, err error) {
+func (m *ValidatingAdmissionPolicyBindingList) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -2116,12 +2346,12 @@ func (m *ValidatingWebhookConfigurationList) Marshal() (dAtA []byte, err error)
return dAtA[:n], nil
}
-func (m *ValidatingWebhookConfigurationList) MarshalTo(dAtA []byte) (int, error) {
+func (m *ValidatingAdmissionPolicyBindingList) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *ValidatingWebhookConfigurationList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+func (m *ValidatingAdmissionPolicyBindingList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
@@ -2153,7 +2383,7 @@ func (m *ValidatingWebhookConfigurationList) MarshalToSizedBuffer(dAtA []byte) (
return len(dAtA) - i, nil
}
-func (m *Validation) Marshal() (dAtA []byte, err error) {
+func (m *ValidatingAdmissionPolicyBindingSpec) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -2163,42 +2393,58 @@ func (m *Validation) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
-func (m *Validation) MarshalTo(dAtA []byte) (int, error) {
+func (m *ValidatingAdmissionPolicyBindingSpec) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *Validation) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+func (m *ValidatingAdmissionPolicyBindingSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
- i -= len(m.MessageExpression)
- copy(dAtA[i:], m.MessageExpression)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.MessageExpression)))
- i--
- dAtA[i] = 0x22
- if m.Reason != nil {
- i -= len(*m.Reason)
- copy(dAtA[i:], *m.Reason)
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Reason)))
+ if len(m.ValidationActions) > 0 {
+ for iNdEx := len(m.ValidationActions) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.ValidationActions[iNdEx])
+ copy(dAtA[i:], m.ValidationActions[iNdEx])
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ValidationActions[iNdEx])))
+ i--
+ dAtA[i] = 0x22
+ }
+ }
+ if m.MatchResources != nil {
+ {
+ size, err := m.MatchResources.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
i--
dAtA[i] = 0x1a
}
- i -= len(m.Message)
- copy(dAtA[i:], m.Message)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
- i--
- dAtA[i] = 0x12
- i -= len(m.Expression)
- copy(dAtA[i:], m.Expression)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Expression)))
+ if m.ParamRef != nil {
+ {
+ size, err := m.ParamRef.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ i -= len(m.PolicyName)
+ copy(dAtA[i:], m.PolicyName)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.PolicyName)))
i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
}
-func (m *Variable) Marshal() (dAtA []byte, err error) {
+func (m *ValidatingAdmissionPolicyList) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -2208,30 +2454,44 @@ func (m *Variable) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
-func (m *Variable) MarshalTo(dAtA []byte) (int, error) {
+func (m *ValidatingAdmissionPolicyList) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *Variable) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+func (m *ValidatingAdmissionPolicyList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
- i -= len(m.Expression)
- copy(dAtA[i:], m.Expression)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Expression)))
- i--
- dAtA[i] = 0x12
- i -= len(m.Name)
- copy(dAtA[i:], m.Name)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ if len(m.Items) > 0 {
+ for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ {
+ size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
}
-func (m *WebhookClientConfig) Marshal() (dAtA []byte, err error) {
+func (m *ValidatingAdmissionPolicySpec) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -2241,335 +2501,636 @@ func (m *WebhookClientConfig) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
-func (m *WebhookClientConfig) MarshalTo(dAtA []byte) (int, error) {
+func (m *ValidatingAdmissionPolicySpec) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *WebhookClientConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+func (m *ValidatingAdmissionPolicySpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
- if m.URL != nil {
- i -= len(*m.URL)
- copy(dAtA[i:], *m.URL)
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.URL)))
- i--
- dAtA[i] = 0x1a
- }
- if m.CABundle != nil {
- i -= len(m.CABundle)
- copy(dAtA[i:], m.CABundle)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.CABundle)))
- i--
- dAtA[i] = 0x12
- }
- if m.Service != nil {
- {
- size, err := m.Service.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
+ if len(m.Variables) > 0 {
+ for iNdEx := len(m.Variables) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Variables[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
}
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x3a
}
- i--
- dAtA[i] = 0xa
- }
- return len(dAtA) - i, nil
-}
-
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- offset -= sovGenerated(v)
- base := offset
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
}
- dAtA[offset] = uint8(v)
- return base
-}
-func (m *AuditAnnotation) Size() (n int) {
- if m == nil {
- return 0
+ if len(m.MatchConditions) > 0 {
+ for iNdEx := len(m.MatchConditions) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.MatchConditions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x32
+ }
}
- var l int
- _ = l
- l = len(m.Key)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.ValueExpression)
- n += 1 + l + sovGenerated(uint64(l))
- return n
+ if len(m.AuditAnnotations) > 0 {
+ for iNdEx := len(m.AuditAnnotations) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.AuditAnnotations[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x2a
+ }
+ }
+ if m.FailurePolicy != nil {
+ i -= len(*m.FailurePolicy)
+ copy(dAtA[i:], *m.FailurePolicy)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.Validations) > 0 {
+ for iNdEx := len(m.Validations) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Validations[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
+ if m.MatchConstraints != nil {
+ {
+ size, err := m.MatchConstraints.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.ParamKind != nil {
+ {
+ size, err := m.ParamKind.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
}
-func (m *ExpressionWarning) Size() (n int) {
- if m == nil {
- return 0
+func (m *ValidatingAdmissionPolicyStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
}
- var l int
- _ = l
- l = len(m.FieldRef)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Warning)
- n += 1 + l + sovGenerated(uint64(l))
- return n
+ return dAtA[:n], nil
}
-func (m *MatchCondition) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Expression)
- n += 1 + l + sovGenerated(uint64(l))
- return n
+func (m *ValidatingAdmissionPolicyStatus) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *MatchResources) Size() (n int) {
- if m == nil {
- return 0
- }
+func (m *ValidatingAdmissionPolicyStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
var l int
_ = l
- if m.NamespaceSelector != nil {
- l = m.NamespaceSelector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.ObjectSelector != nil {
- l = m.ObjectSelector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if len(m.ResourceRules) > 0 {
- for _, e := range m.ResourceRules {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Conditions) > 0 {
+ for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1a
}
}
- if len(m.ExcludeResourceRules) > 0 {
- for _, e := range m.ExcludeResourceRules {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
+ if m.TypeChecking != nil {
+ {
+ size, err := m.TypeChecking.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
}
+ i--
+ dAtA[i] = 0x12
}
- if m.MatchPolicy != nil {
- l = len(*m.MatchPolicy)
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
+ i--
+ dAtA[i] = 0x8
+ return len(dAtA) - i, nil
}
-func (m *MutatingWebhook) Size() (n int) {
- if m == nil {
- return 0
+func (m *ValidatingWebhook) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
}
+ return dAtA[:n], nil
+}
+
+func (m *ValidatingWebhook) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ValidatingWebhook) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
var l int
_ = l
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.ClientConfig.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Rules) > 0 {
- for _, e := range m.Rules {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
+ if len(m.MatchConditions) > 0 {
+ for iNdEx := len(m.MatchConditions) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.MatchConditions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x5a
}
}
- if m.FailurePolicy != nil {
- l = len(*m.FailurePolicy)
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.NamespaceSelector != nil {
- l = m.NamespaceSelector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.SideEffects != nil {
- l = len(*m.SideEffects)
- n += 1 + l + sovGenerated(uint64(l))
+ if m.ObjectSelector != nil {
+ {
+ size, err := m.ObjectSelector.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x52
}
- if m.TimeoutSeconds != nil {
- n += 1 + sovGenerated(uint64(*m.TimeoutSeconds))
+ if m.MatchPolicy != nil {
+ i -= len(*m.MatchPolicy)
+ copy(dAtA[i:], *m.MatchPolicy)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.MatchPolicy)))
+ i--
+ dAtA[i] = 0x4a
}
if len(m.AdmissionReviewVersions) > 0 {
- for _, s := range m.AdmissionReviewVersions {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
+ for iNdEx := len(m.AdmissionReviewVersions) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.AdmissionReviewVersions[iNdEx])
+ copy(dAtA[i:], m.AdmissionReviewVersions[iNdEx])
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.AdmissionReviewVersions[iNdEx])))
+ i--
+ dAtA[i] = 0x42
}
}
- if m.MatchPolicy != nil {
- l = len(*m.MatchPolicy)
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.ReinvocationPolicy != nil {
- l = len(*m.ReinvocationPolicy)
- n += 1 + l + sovGenerated(uint64(l))
+ if m.TimeoutSeconds != nil {
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.TimeoutSeconds))
+ i--
+ dAtA[i] = 0x38
}
- if m.ObjectSelector != nil {
- l = m.ObjectSelector.Size()
- n += 1 + l + sovGenerated(uint64(l))
+ if m.SideEffects != nil {
+ i -= len(*m.SideEffects)
+ copy(dAtA[i:], *m.SideEffects)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.SideEffects)))
+ i--
+ dAtA[i] = 0x32
}
- if len(m.MatchConditions) > 0 {
- for _, e := range m.MatchConditions {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
+ if m.NamespaceSelector != nil {
+ {
+ size, err := m.NamespaceSelector.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
}
+ i--
+ dAtA[i] = 0x2a
}
- return n
-}
-
-func (m *MutatingWebhookConfiguration) Size() (n int) {
- if m == nil {
- return 0
+ if m.FailurePolicy != nil {
+ i -= len(*m.FailurePolicy)
+ copy(dAtA[i:], *m.FailurePolicy)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy)))
+ i--
+ dAtA[i] = 0x22
}
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Webhooks) > 0 {
- for _, e := range m.Webhooks {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Rules) > 0 {
+ for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1a
}
}
- return n
-}
-
-func (m *MutatingWebhookConfigurationList) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
+ {
+ size, err := m.ClientConfig.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
}
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
}
- return n
+ i--
+ dAtA[i] = 0x12
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
}
-func (m *NamedRuleWithOperations) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if len(m.ResourceNames) > 0 {
- for _, s := range m.ResourceNames {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
+func (m *ValidatingWebhookConfiguration) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
}
- l = m.RuleWithOperations.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
+ return dAtA[:n], nil
}
-func (m *ParamKind) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.APIVersion)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Kind)
- n += 1 + l + sovGenerated(uint64(l))
- return n
+func (m *ValidatingWebhookConfiguration) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *ParamRef) Size() (n int) {
- if m == nil {
- return 0
- }
+func (m *ValidatingWebhookConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
var l int
_ = l
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Namespace)
- n += 1 + l + sovGenerated(uint64(l))
- if m.Selector != nil {
- l = m.Selector.Size()
- n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Webhooks) > 0 {
+ for iNdEx := len(m.Webhooks) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Webhooks[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
}
- if m.ParameterNotFoundAction != nil {
- l = len(*m.ParameterNotFoundAction)
- n += 1 + l + sovGenerated(uint64(l))
+ {
+ size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
}
- return n
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
}
-func (m *ServiceReference) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Namespace)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- if m.Path != nil {
- l = len(*m.Path)
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.Port != nil {
- n += 1 + sovGenerated(uint64(*m.Port))
+func (m *ValidatingWebhookConfigurationList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
}
- return n
+ return dAtA[:n], nil
}
-func (m *TypeChecking) Size() (n int) {
- if m == nil {
- return 0
- }
+func (m *ValidatingWebhookConfigurationList) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ValidatingWebhookConfigurationList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
var l int
_ = l
- if len(m.ExpressionWarnings) > 0 {
- for _, e := range m.ExpressionWarnings {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
}
}
- return n
+ {
+ size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
}
-func (m *ValidatingAdmissionPolicy) Size() (n int) {
- if m == nil {
- return 0
+func (m *Validation) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
}
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
+ return dAtA[:n], nil
}
-func (m *ValidatingAdmissionPolicyBinding) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.ObjectMeta.Size()
+func (m *Validation) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *Validation) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ i -= len(m.MessageExpression)
+ copy(dAtA[i:], m.MessageExpression)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MessageExpression)))
+ i--
+ dAtA[i] = 0x22
+ if m.Reason != nil {
+ i -= len(*m.Reason)
+ copy(dAtA[i:], *m.Reason)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Reason)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ i -= len(m.Message)
+ copy(dAtA[i:], m.Message)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i--
+ dAtA[i] = 0x12
+ i -= len(m.Expression)
+ copy(dAtA[i:], m.Expression)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Expression)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *Variable) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Variable) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *Variable) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ i -= len(m.Expression)
+ copy(dAtA[i:], m.Expression)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Expression)))
+ i--
+ dAtA[i] = 0x12
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *WebhookClientConfig) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *WebhookClientConfig) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *WebhookClientConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.URL != nil {
+ i -= len(*m.URL)
+ copy(dAtA[i:], *m.URL)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.URL)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.CABundle != nil {
+ i -= len(m.CABundle)
+ copy(dAtA[i:], m.CABundle)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.CABundle)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Service != nil {
+ {
+ size, err := m.Service.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ offset -= sovGenerated(v)
+ base := offset
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return base
+}
+func (m *ApplyConfiguration) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Expression)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *AuditAnnotation) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Key)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ValueExpression)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ExpressionWarning) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.FieldRef)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Warning)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *JSONPatch) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Expression)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *MatchCondition) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Expression)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *MatchResources) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.NamespaceSelector != nil {
+ l = m.NamespaceSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ObjectSelector != nil {
+ l = m.ObjectSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if len(m.ResourceRules) > 0 {
+ for _, e := range m.ResourceRules {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.ExcludeResourceRules) > 0 {
+ for _, e := range m.ExcludeResourceRules {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.MatchPolicy != nil {
+ l = len(*m.MatchPolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *MutatingAdmissionPolicy) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
n += 1 + l + sovGenerated(uint64(l))
l = m.Spec.Size()
n += 1 + l + sovGenerated(uint64(l))
return n
}
-func (m *ValidatingAdmissionPolicyBindingList) Size() (n int) {
+func (m *MutatingAdmissionPolicyBinding) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *MutatingAdmissionPolicyBindingList) Size() (n int) {
if m == nil {
return 0
}
@@ -2586,7 +3147,7 @@ func (m *ValidatingAdmissionPolicyBindingList) Size() (n int) {
return n
}
-func (m *ValidatingAdmissionPolicyBindingSpec) Size() (n int) {
+func (m *MutatingAdmissionPolicyBindingSpec) Size() (n int) {
if m == nil {
return 0
}
@@ -2602,16 +3163,10 @@ func (m *ValidatingAdmissionPolicyBindingSpec) Size() (n int) {
l = m.MatchResources.Size()
n += 1 + l + sovGenerated(uint64(l))
}
- if len(m.ValidationActions) > 0 {
- for _, s := range m.ValidationActions {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
return n
}
-func (m *ValidatingAdmissionPolicyList) Size() (n int) {
+func (m *MutatingAdmissionPolicyList) Size() (n int) {
if m == nil {
return 0
}
@@ -2628,7 +3183,7 @@ func (m *ValidatingAdmissionPolicyList) Size() (n int) {
return n
}
-func (m *ValidatingAdmissionPolicySpec) Size() (n int) {
+func (m *MutatingAdmissionPolicySpec) Size() (n int) {
if m == nil {
return 0
}
@@ -2642,8 +3197,14 @@ func (m *ValidatingAdmissionPolicySpec) Size() (n int) {
l = m.MatchConstraints.Size()
n += 1 + l + sovGenerated(uint64(l))
}
- if len(m.Validations) > 0 {
- for _, e := range m.Validations {
+ if len(m.Variables) > 0 {
+ for _, e := range m.Variables {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Mutations) > 0 {
+ for _, e := range m.Mutations {
l = e.Size()
n += 1 + l + sovGenerated(uint64(l))
}
@@ -2652,48 +3213,18 @@ func (m *ValidatingAdmissionPolicySpec) Size() (n int) {
l = len(*m.FailurePolicy)
n += 1 + l + sovGenerated(uint64(l))
}
- if len(m.AuditAnnotations) > 0 {
- for _, e := range m.AuditAnnotations {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
if len(m.MatchConditions) > 0 {
for _, e := range m.MatchConditions {
l = e.Size()
n += 1 + l + sovGenerated(uint64(l))
}
}
- if len(m.Variables) > 0 {
- for _, e := range m.Variables {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ValidatingAdmissionPolicyStatus) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- n += 1 + sovGenerated(uint64(m.ObservedGeneration))
- if m.TypeChecking != nil {
- l = m.TypeChecking.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if len(m.Conditions) > 0 {
- for _, e := range m.Conditions {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
+ l = len(m.ReinvocationPolicy)
+ n += 1 + l + sovGenerated(uint64(l))
return n
}
-func (m *ValidatingWebhook) Size() (n int) {
+func (m *MutatingWebhook) Size() (n int) {
if m == nil {
return 0
}
@@ -2734,6 +3265,10 @@ func (m *ValidatingWebhook) Size() (n int) {
l = len(*m.MatchPolicy)
n += 1 + l + sovGenerated(uint64(l))
}
+ if m.ReinvocationPolicy != nil {
+ l = len(*m.ReinvocationPolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
if m.ObjectSelector != nil {
l = m.ObjectSelector.Size()
n += 1 + l + sovGenerated(uint64(l))
@@ -2747,7 +3282,7 @@ func (m *ValidatingWebhook) Size() (n int) {
return n
}
-func (m *ValidatingWebhookConfiguration) Size() (n int) {
+func (m *MutatingWebhookConfiguration) Size() (n int) {
if m == nil {
return 0
}
@@ -2764,7 +3299,7 @@ func (m *ValidatingWebhookConfiguration) Size() (n int) {
return n
}
-func (m *ValidatingWebhookConfigurationList) Size() (n int) {
+func (m *MutatingWebhookConfigurationList) Size() (n int) {
if m == nil {
return 0
}
@@ -2781,476 +3316,1911 @@ func (m *ValidatingWebhookConfigurationList) Size() (n int) {
return n
}
-func (m *Validation) Size() (n int) {
+func (m *Mutation) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
- l = len(m.Expression)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Message)
+ l = len(m.PatchType)
n += 1 + l + sovGenerated(uint64(l))
- if m.Reason != nil {
- l = len(*m.Reason)
+ if m.ApplyConfiguration != nil {
+ l = m.ApplyConfiguration.Size()
n += 1 + l + sovGenerated(uint64(l))
}
- l = len(m.MessageExpression)
+ if m.JSONPatch != nil {
+ l = m.JSONPatch.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *NamedRuleWithOperations) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.ResourceNames) > 0 {
+ for _, s := range m.ResourceNames {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = m.RuleWithOperations.Size()
n += 1 + l + sovGenerated(uint64(l))
return n
}
-func (m *Variable) Size() (n int) {
+func (m *ParamKind) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
- l = len(m.Name)
+ l = len(m.APIVersion)
n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Expression)
+ l = len(m.Kind)
n += 1 + l + sovGenerated(uint64(l))
return n
}
-func (m *WebhookClientConfig) Size() (n int) {
+func (m *ParamRef) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
- if m.Service != nil {
- l = m.Service.Size()
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Namespace)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Selector != nil {
+ l = m.Selector.Size()
n += 1 + l + sovGenerated(uint64(l))
}
- if m.CABundle != nil {
- l = len(m.CABundle)
+ if m.ParameterNotFoundAction != nil {
+ l = len(*m.ParameterNotFoundAction)
n += 1 + l + sovGenerated(uint64(l))
}
- if m.URL != nil {
- l = len(*m.URL)
+ return n
+}
+
+func (m *ServiceReference) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Namespace)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Path != nil {
+ l = len(*m.Path)
n += 1 + l + sovGenerated(uint64(l))
}
+ if m.Port != nil {
+ n += 1 + sovGenerated(uint64(*m.Port))
+ }
return n
}
-func sovGenerated(x uint64) (n int) {
- return (math_bits.Len64(x|1) + 6) / 7
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+func (m *TypeChecking) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.ExpressionWarnings) > 0 {
+ for _, e := range m.ExpressionWarnings {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
}
-func (this *AuditAnnotation) String() string {
- if this == nil {
- return "nil"
+
+func (m *ValidatingAdmissionPolicy) Size() (n int) {
+ if m == nil {
+ return 0
}
- s := strings.Join([]string{`&AuditAnnotation{`,
- `Key:` + fmt.Sprintf("%v", this.Key) + `,`,
- `ValueExpression:` + fmt.Sprintf("%v", this.ValueExpression) + `,`,
- `}`,
- }, "")
- return s
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
}
-func (this *ExpressionWarning) String() string {
- if this == nil {
- return "nil"
+
+func (m *ValidatingAdmissionPolicyBinding) Size() (n int) {
+ if m == nil {
+ return 0
}
- s := strings.Join([]string{`&ExpressionWarning{`,
- `FieldRef:` + fmt.Sprintf("%v", this.FieldRef) + `,`,
- `Warning:` + fmt.Sprintf("%v", this.Warning) + `,`,
- `}`,
- }, "")
- return s
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
}
-func (this *MatchCondition) String() string {
- if this == nil {
- return "nil"
+
+func (m *ValidatingAdmissionPolicyBindingList) Size() (n int) {
+ if m == nil {
+ return 0
}
- s := strings.Join([]string{`&MatchCondition{`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`,
- `}`,
- }, "")
- return s
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
}
-func (this *MatchResources) String() string {
- if this == nil {
- return "nil"
+
+func (m *ValidatingAdmissionPolicyBindingSpec) Size() (n int) {
+ if m == nil {
+ return 0
}
- repeatedStringForResourceRules := "[]NamedRuleWithOperations{"
- for _, f := range this.ResourceRules {
- repeatedStringForResourceRules += strings.Replace(strings.Replace(f.String(), "NamedRuleWithOperations", "NamedRuleWithOperations", 1), `&`, ``, 1) + ","
+ var l int
+ _ = l
+ l = len(m.PolicyName)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.ParamRef != nil {
+ l = m.ParamRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
}
- repeatedStringForResourceRules += "}"
- repeatedStringForExcludeResourceRules := "[]NamedRuleWithOperations{"
- for _, f := range this.ExcludeResourceRules {
- repeatedStringForExcludeResourceRules += strings.Replace(strings.Replace(f.String(), "NamedRuleWithOperations", "NamedRuleWithOperations", 1), `&`, ``, 1) + ","
+ if m.MatchResources != nil {
+ l = m.MatchResources.Size()
+ n += 1 + l + sovGenerated(uint64(l))
}
- repeatedStringForExcludeResourceRules += "}"
- s := strings.Join([]string{`&MatchResources{`,
- `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`,
- `ObjectSelector:` + strings.Replace(fmt.Sprintf("%v", this.ObjectSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`,
- `ResourceRules:` + repeatedStringForResourceRules + `,`,
- `ExcludeResourceRules:` + repeatedStringForExcludeResourceRules + `,`,
- `MatchPolicy:` + valueToStringGenerated(this.MatchPolicy) + `,`,
- `}`,
- }, "")
- return s
+ if len(m.ValidationActions) > 0 {
+ for _, s := range m.ValidationActions {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
}
-func (this *MutatingWebhook) String() string {
- if this == nil {
- return "nil"
+
+func (m *ValidatingAdmissionPolicyList) Size() (n int) {
+ if m == nil {
+ return 0
}
- repeatedStringForRules := "[]RuleWithOperations{"
- for _, f := range this.Rules {
- repeatedStringForRules += fmt.Sprintf("%v", f) + ","
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
}
- repeatedStringForRules += "}"
- repeatedStringForMatchConditions := "[]MatchCondition{"
- for _, f := range this.MatchConditions {
- repeatedStringForMatchConditions += strings.Replace(strings.Replace(f.String(), "MatchCondition", "MatchCondition", 1), `&`, ``, 1) + ","
- }
- repeatedStringForMatchConditions += "}"
- s := strings.Join([]string{`&MutatingWebhook{`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `ClientConfig:` + strings.Replace(strings.Replace(this.ClientConfig.String(), "WebhookClientConfig", "WebhookClientConfig", 1), `&`, ``, 1) + `,`,
- `Rules:` + repeatedStringForRules + `,`,
- `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`,
- `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`,
- `SideEffects:` + valueToStringGenerated(this.SideEffects) + `,`,
- `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`,
- `AdmissionReviewVersions:` + fmt.Sprintf("%v", this.AdmissionReviewVersions) + `,`,
- `MatchPolicy:` + valueToStringGenerated(this.MatchPolicy) + `,`,
- `ReinvocationPolicy:` + valueToStringGenerated(this.ReinvocationPolicy) + `,`,
- `ObjectSelector:` + strings.Replace(fmt.Sprintf("%v", this.ObjectSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`,
- `MatchConditions:` + repeatedStringForMatchConditions + `,`,
- `}`,
- }, "")
- return s
+ return n
}
-func (this *MutatingWebhookConfiguration) String() string {
- if this == nil {
- return "nil"
+
+func (m *ValidatingAdmissionPolicySpec) Size() (n int) {
+ if m == nil {
+ return 0
}
- repeatedStringForWebhooks := "[]MutatingWebhook{"
- for _, f := range this.Webhooks {
- repeatedStringForWebhooks += strings.Replace(strings.Replace(f.String(), "MutatingWebhook", "MutatingWebhook", 1), `&`, ``, 1) + ","
+ var l int
+ _ = l
+ if m.ParamKind != nil {
+ l = m.ParamKind.Size()
+ n += 1 + l + sovGenerated(uint64(l))
}
- repeatedStringForWebhooks += "}"
- s := strings.Join([]string{`&MutatingWebhookConfiguration{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Webhooks:` + repeatedStringForWebhooks + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *MutatingWebhookConfigurationList) String() string {
- if this == nil {
- return "nil"
+ if m.MatchConstraints != nil {
+ l = m.MatchConstraints.Size()
+ n += 1 + l + sovGenerated(uint64(l))
}
- repeatedStringForItems := "[]MutatingWebhookConfiguration{"
- for _, f := range this.Items {
- repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "MutatingWebhookConfiguration", "MutatingWebhookConfiguration", 1), `&`, ``, 1) + ","
+ if len(m.Validations) > 0 {
+ for _, e := range m.Validations {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
}
- repeatedStringForItems += "}"
- s := strings.Join([]string{`&MutatingWebhookConfigurationList{`,
- `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + repeatedStringForItems + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *NamedRuleWithOperations) String() string {
- if this == nil {
- return "nil"
+ if m.FailurePolicy != nil {
+ l = len(*m.FailurePolicy)
+ n += 1 + l + sovGenerated(uint64(l))
}
- s := strings.Join([]string{`&NamedRuleWithOperations{`,
- `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`,
- `RuleWithOperations:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.RuleWithOperations), "RuleWithOperations", "v11.RuleWithOperations", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ParamKind) String() string {
- if this == nil {
- return "nil"
+ if len(m.AuditAnnotations) > 0 {
+ for _, e := range m.AuditAnnotations {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
}
- s := strings.Join([]string{`&ParamKind{`,
- `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
- `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ParamRef) String() string {
- if this == nil {
- return "nil"
+ if len(m.MatchConditions) > 0 {
+ for _, e := range m.MatchConditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
}
- s := strings.Join([]string{`&ParamRef{`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
- `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "v1.LabelSelector", 1) + `,`,
- `ParameterNotFoundAction:` + valueToStringGenerated(this.ParameterNotFoundAction) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ServiceReference) String() string {
- if this == nil {
- return "nil"
+ if len(m.Variables) > 0 {
+ for _, e := range m.Variables {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
}
- s := strings.Join([]string{`&ServiceReference{`,
- `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `Path:` + valueToStringGenerated(this.Path) + `,`,
- `Port:` + valueToStringGenerated(this.Port) + `,`,
- `}`,
- }, "")
- return s
+ return n
}
-func (this *TypeChecking) String() string {
- if this == nil {
- return "nil"
+
+func (m *ValidatingAdmissionPolicyStatus) Size() (n int) {
+ if m == nil {
+ return 0
}
- repeatedStringForExpressionWarnings := "[]ExpressionWarning{"
- for _, f := range this.ExpressionWarnings {
- repeatedStringForExpressionWarnings += strings.Replace(strings.Replace(f.String(), "ExpressionWarning", "ExpressionWarning", 1), `&`, ``, 1) + ","
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.ObservedGeneration))
+ if m.TypeChecking != nil {
+ l = m.TypeChecking.Size()
+ n += 1 + l + sovGenerated(uint64(l))
}
- repeatedStringForExpressionWarnings += "}"
- s := strings.Join([]string{`&TypeChecking{`,
- `ExpressionWarnings:` + repeatedStringForExpressionWarnings + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ValidatingAdmissionPolicy) String() string {
- if this == nil {
- return "nil"
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
}
- s := strings.Join([]string{`&ValidatingAdmissionPolicy{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ValidatingAdmissionPolicySpec", "ValidatingAdmissionPolicySpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ValidatingAdmissionPolicyStatus", "ValidatingAdmissionPolicyStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
+ return n
}
-func (this *ValidatingAdmissionPolicyBinding) String() string {
- if this == nil {
- return "nil"
+
+func (m *ValidatingWebhook) Size() (n int) {
+ if m == nil {
+ return 0
}
- s := strings.Join([]string{`&ValidatingAdmissionPolicyBinding{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ValidatingAdmissionPolicyBindingSpec", "ValidatingAdmissionPolicyBindingSpec", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ValidatingAdmissionPolicyBindingList) String() string {
- if this == nil {
- return "nil"
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.ClientConfig.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Rules) > 0 {
+ for _, e := range m.Rules {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
}
- repeatedStringForItems := "[]ValidatingAdmissionPolicyBinding{"
- for _, f := range this.Items {
- repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ValidatingAdmissionPolicyBinding", "ValidatingAdmissionPolicyBinding", 1), `&`, ``, 1) + ","
+ if m.FailurePolicy != nil {
+ l = len(*m.FailurePolicy)
+ n += 1 + l + sovGenerated(uint64(l))
}
- repeatedStringForItems += "}"
- s := strings.Join([]string{`&ValidatingAdmissionPolicyBindingList{`,
- `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + repeatedStringForItems + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ValidatingAdmissionPolicyBindingSpec) String() string {
- if this == nil {
- return "nil"
+ if m.NamespaceSelector != nil {
+ l = m.NamespaceSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
}
- s := strings.Join([]string{`&ValidatingAdmissionPolicyBindingSpec{`,
- `PolicyName:` + fmt.Sprintf("%v", this.PolicyName) + `,`,
- `ParamRef:` + strings.Replace(this.ParamRef.String(), "ParamRef", "ParamRef", 1) + `,`,
- `MatchResources:` + strings.Replace(this.MatchResources.String(), "MatchResources", "MatchResources", 1) + `,`,
- `ValidationActions:` + fmt.Sprintf("%v", this.ValidationActions) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ValidatingAdmissionPolicyList) String() string {
- if this == nil {
- return "nil"
+ if m.SideEffects != nil {
+ l = len(*m.SideEffects)
+ n += 1 + l + sovGenerated(uint64(l))
}
- repeatedStringForItems := "[]ValidatingAdmissionPolicy{"
- for _, f := range this.Items {
- repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ValidatingAdmissionPolicy", "ValidatingAdmissionPolicy", 1), `&`, ``, 1) + ","
+ if m.TimeoutSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.TimeoutSeconds))
}
- repeatedStringForItems += "}"
- s := strings.Join([]string{`&ValidatingAdmissionPolicyList{`,
- `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + repeatedStringForItems + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ValidatingAdmissionPolicySpec) String() string {
- if this == nil {
- return "nil"
+ if len(m.AdmissionReviewVersions) > 0 {
+ for _, s := range m.AdmissionReviewVersions {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
}
- repeatedStringForValidations := "[]Validation{"
- for _, f := range this.Validations {
- repeatedStringForValidations += strings.Replace(strings.Replace(f.String(), "Validation", "Validation", 1), `&`, ``, 1) + ","
+ if m.MatchPolicy != nil {
+ l = len(*m.MatchPolicy)
+ n += 1 + l + sovGenerated(uint64(l))
}
- repeatedStringForValidations += "}"
- repeatedStringForAuditAnnotations := "[]AuditAnnotation{"
- for _, f := range this.AuditAnnotations {
- repeatedStringForAuditAnnotations += strings.Replace(strings.Replace(f.String(), "AuditAnnotation", "AuditAnnotation", 1), `&`, ``, 1) + ","
+ if m.ObjectSelector != nil {
+ l = m.ObjectSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
}
- repeatedStringForAuditAnnotations += "}"
- repeatedStringForMatchConditions := "[]MatchCondition{"
- for _, f := range this.MatchConditions {
- repeatedStringForMatchConditions += strings.Replace(strings.Replace(f.String(), "MatchCondition", "MatchCondition", 1), `&`, ``, 1) + ","
+ if len(m.MatchConditions) > 0 {
+ for _, e := range m.MatchConditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
}
- repeatedStringForMatchConditions += "}"
- repeatedStringForVariables := "[]Variable{"
- for _, f := range this.Variables {
- repeatedStringForVariables += strings.Replace(strings.Replace(f.String(), "Variable", "Variable", 1), `&`, ``, 1) + ","
+ return n
+}
+
+func (m *ValidatingWebhookConfiguration) Size() (n int) {
+ if m == nil {
+ return 0
}
- repeatedStringForVariables += "}"
- s := strings.Join([]string{`&ValidatingAdmissionPolicySpec{`,
- `ParamKind:` + strings.Replace(this.ParamKind.String(), "ParamKind", "ParamKind", 1) + `,`,
- `MatchConstraints:` + strings.Replace(this.MatchConstraints.String(), "MatchResources", "MatchResources", 1) + `,`,
- `Validations:` + repeatedStringForValidations + `,`,
- `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`,
- `AuditAnnotations:` + repeatedStringForAuditAnnotations + `,`,
- `MatchConditions:` + repeatedStringForMatchConditions + `,`,
- `Variables:` + repeatedStringForVariables + `,`,
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Webhooks) > 0 {
+ for _, e := range m.Webhooks {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ValidatingWebhookConfigurationList) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *Validation) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Expression)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Reason != nil {
+ l = len(*m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = len(m.MessageExpression)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Variable) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Expression)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *WebhookClientConfig) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Service != nil {
+ l = m.Service.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.CABundle != nil {
+ l = len(m.CABundle)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.URL != nil {
+ l = len(*m.URL)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ return (math_bits.Len64(x|1) + 6) / 7
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *ApplyConfiguration) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ApplyConfiguration{`,
+ `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`,
`}`,
}, "")
return s
}
-func (this *ValidatingAdmissionPolicyStatus) String() string {
+func (this *AuditAnnotation) String() string {
if this == nil {
return "nil"
}
- repeatedStringForConditions := "[]Condition{"
- for _, f := range this.Conditions {
- repeatedStringForConditions += fmt.Sprintf("%v", f) + ","
- }
- repeatedStringForConditions += "}"
- s := strings.Join([]string{`&ValidatingAdmissionPolicyStatus{`,
- `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
- `TypeChecking:` + strings.Replace(this.TypeChecking.String(), "TypeChecking", "TypeChecking", 1) + `,`,
- `Conditions:` + repeatedStringForConditions + `,`,
+ s := strings.Join([]string{`&AuditAnnotation{`,
+ `Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `ValueExpression:` + fmt.Sprintf("%v", this.ValueExpression) + `,`,
`}`,
}, "")
return s
}
-func (this *ValidatingWebhook) String() string {
+func (this *ExpressionWarning) String() string {
if this == nil {
return "nil"
}
- repeatedStringForRules := "[]RuleWithOperations{"
- for _, f := range this.Rules {
- repeatedStringForRules += fmt.Sprintf("%v", f) + ","
+ s := strings.Join([]string{`&ExpressionWarning{`,
+ `FieldRef:` + fmt.Sprintf("%v", this.FieldRef) + `,`,
+ `Warning:` + fmt.Sprintf("%v", this.Warning) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *JSONPatch) String() string {
+ if this == nil {
+ return "nil"
}
- repeatedStringForRules += "}"
- repeatedStringForMatchConditions := "[]MatchCondition{"
- for _, f := range this.MatchConditions {
- repeatedStringForMatchConditions += strings.Replace(strings.Replace(f.String(), "MatchCondition", "MatchCondition", 1), `&`, ``, 1) + ","
+ s := strings.Join([]string{`&JSONPatch{`,
+ `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *MatchCondition) String() string {
+ if this == nil {
+ return "nil"
}
- repeatedStringForMatchConditions += "}"
- s := strings.Join([]string{`&ValidatingWebhook{`,
+ s := strings.Join([]string{`&MatchCondition{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `ClientConfig:` + strings.Replace(strings.Replace(this.ClientConfig.String(), "WebhookClientConfig", "WebhookClientConfig", 1), `&`, ``, 1) + `,`,
- `Rules:` + repeatedStringForRules + `,`,
- `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`,
+ `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *MatchResources) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForResourceRules := "[]NamedRuleWithOperations{"
+ for _, f := range this.ResourceRules {
+ repeatedStringForResourceRules += strings.Replace(strings.Replace(f.String(), "NamedRuleWithOperations", "NamedRuleWithOperations", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForResourceRules += "}"
+ repeatedStringForExcludeResourceRules := "[]NamedRuleWithOperations{"
+ for _, f := range this.ExcludeResourceRules {
+ repeatedStringForExcludeResourceRules += strings.Replace(strings.Replace(f.String(), "NamedRuleWithOperations", "NamedRuleWithOperations", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForExcludeResourceRules += "}"
+ s := strings.Join([]string{`&MatchResources{`,
`NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`,
- `SideEffects:` + valueToStringGenerated(this.SideEffects) + `,`,
- `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`,
- `AdmissionReviewVersions:` + fmt.Sprintf("%v", this.AdmissionReviewVersions) + `,`,
- `MatchPolicy:` + valueToStringGenerated(this.MatchPolicy) + `,`,
`ObjectSelector:` + strings.Replace(fmt.Sprintf("%v", this.ObjectSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`,
- `MatchConditions:` + repeatedStringForMatchConditions + `,`,
+ `ResourceRules:` + repeatedStringForResourceRules + `,`,
+ `ExcludeResourceRules:` + repeatedStringForExcludeResourceRules + `,`,
+ `MatchPolicy:` + valueToStringGenerated(this.MatchPolicy) + `,`,
`}`,
}, "")
return s
}
-func (this *ValidatingWebhookConfiguration) String() string {
+func (this *MutatingAdmissionPolicy) String() string {
if this == nil {
return "nil"
}
- repeatedStringForWebhooks := "[]ValidatingWebhook{"
- for _, f := range this.Webhooks {
- repeatedStringForWebhooks += strings.Replace(strings.Replace(f.String(), "ValidatingWebhook", "ValidatingWebhook", 1), `&`, ``, 1) + ","
+ s := strings.Join([]string{`&MutatingAdmissionPolicy{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "MutatingAdmissionPolicySpec", "MutatingAdmissionPolicySpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *MutatingAdmissionPolicyBinding) String() string {
+ if this == nil {
+ return "nil"
}
- repeatedStringForWebhooks += "}"
- s := strings.Join([]string{`&ValidatingWebhookConfiguration{`,
+ s := strings.Join([]string{`&MutatingAdmissionPolicyBinding{`,
`ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Webhooks:` + repeatedStringForWebhooks + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "MutatingAdmissionPolicyBindingSpec", "MutatingAdmissionPolicyBindingSpec", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
}
-func (this *ValidatingWebhookConfigurationList) String() string {
+func (this *MutatingAdmissionPolicyBindingList) String() string {
if this == nil {
return "nil"
}
- repeatedStringForItems := "[]ValidatingWebhookConfiguration{"
+ repeatedStringForItems := "[]MutatingAdmissionPolicyBinding{"
for _, f := range this.Items {
- repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ValidatingWebhookConfiguration", "ValidatingWebhookConfiguration", 1), `&`, ``, 1) + ","
+ repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "MutatingAdmissionPolicyBinding", "MutatingAdmissionPolicyBinding", 1), `&`, ``, 1) + ","
}
repeatedStringForItems += "}"
- s := strings.Join([]string{`&ValidatingWebhookConfigurationList{`,
+ s := strings.Join([]string{`&MutatingAdmissionPolicyBindingList{`,
`ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
`Items:` + repeatedStringForItems + `,`,
`}`,
}, "")
return s
}
-func (this *Validation) String() string {
+func (this *MutatingAdmissionPolicyBindingSpec) String() string {
if this == nil {
return "nil"
}
- s := strings.Join([]string{`&Validation{`,
- `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`,
- `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
- `Reason:` + valueToStringGenerated(this.Reason) + `,`,
- `MessageExpression:` + fmt.Sprintf("%v", this.MessageExpression) + `,`,
+ s := strings.Join([]string{`&MutatingAdmissionPolicyBindingSpec{`,
+ `PolicyName:` + fmt.Sprintf("%v", this.PolicyName) + `,`,
+ `ParamRef:` + strings.Replace(this.ParamRef.String(), "ParamRef", "ParamRef", 1) + `,`,
+ `MatchResources:` + strings.Replace(this.MatchResources.String(), "MatchResources", "MatchResources", 1) + `,`,
`}`,
}, "")
return s
}
-func (this *Variable) String() string {
+func (this *MutatingAdmissionPolicyList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForItems := "[]MutatingAdmissionPolicy{"
+ for _, f := range this.Items {
+ repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "MutatingAdmissionPolicy", "MutatingAdmissionPolicy", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForItems += "}"
+ s := strings.Join([]string{`&MutatingAdmissionPolicyList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + repeatedStringForItems + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *MutatingAdmissionPolicySpec) String() string {
if this == nil {
return "nil"
}
- s := strings.Join([]string{`&Variable{`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *WebhookClientConfig) String() string {
- if this == nil {
- return "nil"
+ repeatedStringForVariables := "[]Variable{"
+ for _, f := range this.Variables {
+ repeatedStringForVariables += strings.Replace(strings.Replace(f.String(), "Variable", "Variable", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForVariables += "}"
+ repeatedStringForMutations := "[]Mutation{"
+ for _, f := range this.Mutations {
+ repeatedStringForMutations += strings.Replace(strings.Replace(f.String(), "Mutation", "Mutation", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForMutations += "}"
+ repeatedStringForMatchConditions := "[]MatchCondition{"
+ for _, f := range this.MatchConditions {
+ repeatedStringForMatchConditions += strings.Replace(strings.Replace(f.String(), "MatchCondition", "MatchCondition", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForMatchConditions += "}"
+ s := strings.Join([]string{`&MutatingAdmissionPolicySpec{`,
+ `ParamKind:` + strings.Replace(this.ParamKind.String(), "ParamKind", "ParamKind", 1) + `,`,
+ `MatchConstraints:` + strings.Replace(this.MatchConstraints.String(), "MatchResources", "MatchResources", 1) + `,`,
+ `Variables:` + repeatedStringForVariables + `,`,
+ `Mutations:` + repeatedStringForMutations + `,`,
+ `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`,
+ `MatchConditions:` + repeatedStringForMatchConditions + `,`,
+ `ReinvocationPolicy:` + fmt.Sprintf("%v", this.ReinvocationPolicy) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *MutatingWebhook) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForRules := "[]RuleWithOperations{"
+ for _, f := range this.Rules {
+ repeatedStringForRules += fmt.Sprintf("%v", f) + ","
+ }
+ repeatedStringForRules += "}"
+ repeatedStringForMatchConditions := "[]MatchCondition{"
+ for _, f := range this.MatchConditions {
+ repeatedStringForMatchConditions += strings.Replace(strings.Replace(f.String(), "MatchCondition", "MatchCondition", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForMatchConditions += "}"
+ s := strings.Join([]string{`&MutatingWebhook{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `ClientConfig:` + strings.Replace(strings.Replace(this.ClientConfig.String(), "WebhookClientConfig", "WebhookClientConfig", 1), `&`, ``, 1) + `,`,
+ `Rules:` + repeatedStringForRules + `,`,
+ `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`,
+ `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`,
+ `SideEffects:` + valueToStringGenerated(this.SideEffects) + `,`,
+ `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`,
+ `AdmissionReviewVersions:` + fmt.Sprintf("%v", this.AdmissionReviewVersions) + `,`,
+ `MatchPolicy:` + valueToStringGenerated(this.MatchPolicy) + `,`,
+ `ReinvocationPolicy:` + valueToStringGenerated(this.ReinvocationPolicy) + `,`,
+ `ObjectSelector:` + strings.Replace(fmt.Sprintf("%v", this.ObjectSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`,
+ `MatchConditions:` + repeatedStringForMatchConditions + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *MutatingWebhookConfiguration) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForWebhooks := "[]MutatingWebhook{"
+ for _, f := range this.Webhooks {
+ repeatedStringForWebhooks += strings.Replace(strings.Replace(f.String(), "MutatingWebhook", "MutatingWebhook", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForWebhooks += "}"
+ s := strings.Join([]string{`&MutatingWebhookConfiguration{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Webhooks:` + repeatedStringForWebhooks + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *MutatingWebhookConfigurationList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForItems := "[]MutatingWebhookConfiguration{"
+ for _, f := range this.Items {
+ repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "MutatingWebhookConfiguration", "MutatingWebhookConfiguration", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForItems += "}"
+ s := strings.Join([]string{`&MutatingWebhookConfigurationList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + repeatedStringForItems + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Mutation) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Mutation{`,
+ `PatchType:` + fmt.Sprintf("%v", this.PatchType) + `,`,
+ `ApplyConfiguration:` + strings.Replace(this.ApplyConfiguration.String(), "ApplyConfiguration", "ApplyConfiguration", 1) + `,`,
+ `JSONPatch:` + strings.Replace(this.JSONPatch.String(), "JSONPatch", "JSONPatch", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NamedRuleWithOperations) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NamedRuleWithOperations{`,
+ `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`,
+ `RuleWithOperations:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.RuleWithOperations), "RuleWithOperations", "v11.RuleWithOperations", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ParamKind) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ParamKind{`,
+ `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
+ `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ParamRef) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ParamRef{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
+ `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "v1.LabelSelector", 1) + `,`,
+ `ParameterNotFoundAction:` + valueToStringGenerated(this.ParameterNotFoundAction) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ServiceReference) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ServiceReference{`,
+ `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Path:` + valueToStringGenerated(this.Path) + `,`,
+ `Port:` + valueToStringGenerated(this.Port) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *TypeChecking) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForExpressionWarnings := "[]ExpressionWarning{"
+ for _, f := range this.ExpressionWarnings {
+ repeatedStringForExpressionWarnings += strings.Replace(strings.Replace(f.String(), "ExpressionWarning", "ExpressionWarning", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForExpressionWarnings += "}"
+ s := strings.Join([]string{`&TypeChecking{`,
+ `ExpressionWarnings:` + repeatedStringForExpressionWarnings + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ValidatingAdmissionPolicy) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ValidatingAdmissionPolicy{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ValidatingAdmissionPolicySpec", "ValidatingAdmissionPolicySpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ValidatingAdmissionPolicyStatus", "ValidatingAdmissionPolicyStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ValidatingAdmissionPolicyBinding) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ValidatingAdmissionPolicyBinding{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ValidatingAdmissionPolicyBindingSpec", "ValidatingAdmissionPolicyBindingSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ValidatingAdmissionPolicyBindingList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForItems := "[]ValidatingAdmissionPolicyBinding{"
+ for _, f := range this.Items {
+ repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ValidatingAdmissionPolicyBinding", "ValidatingAdmissionPolicyBinding", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForItems += "}"
+ s := strings.Join([]string{`&ValidatingAdmissionPolicyBindingList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + repeatedStringForItems + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ValidatingAdmissionPolicyBindingSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ValidatingAdmissionPolicyBindingSpec{`,
+ `PolicyName:` + fmt.Sprintf("%v", this.PolicyName) + `,`,
+ `ParamRef:` + strings.Replace(this.ParamRef.String(), "ParamRef", "ParamRef", 1) + `,`,
+ `MatchResources:` + strings.Replace(this.MatchResources.String(), "MatchResources", "MatchResources", 1) + `,`,
+ `ValidationActions:` + fmt.Sprintf("%v", this.ValidationActions) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ValidatingAdmissionPolicyList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForItems := "[]ValidatingAdmissionPolicy{"
+ for _, f := range this.Items {
+ repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ValidatingAdmissionPolicy", "ValidatingAdmissionPolicy", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForItems += "}"
+ s := strings.Join([]string{`&ValidatingAdmissionPolicyList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + repeatedStringForItems + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ValidatingAdmissionPolicySpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForValidations := "[]Validation{"
+ for _, f := range this.Validations {
+ repeatedStringForValidations += strings.Replace(strings.Replace(f.String(), "Validation", "Validation", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForValidations += "}"
+ repeatedStringForAuditAnnotations := "[]AuditAnnotation{"
+ for _, f := range this.AuditAnnotations {
+ repeatedStringForAuditAnnotations += strings.Replace(strings.Replace(f.String(), "AuditAnnotation", "AuditAnnotation", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForAuditAnnotations += "}"
+ repeatedStringForMatchConditions := "[]MatchCondition{"
+ for _, f := range this.MatchConditions {
+ repeatedStringForMatchConditions += strings.Replace(strings.Replace(f.String(), "MatchCondition", "MatchCondition", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForMatchConditions += "}"
+ repeatedStringForVariables := "[]Variable{"
+ for _, f := range this.Variables {
+ repeatedStringForVariables += strings.Replace(strings.Replace(f.String(), "Variable", "Variable", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForVariables += "}"
+ s := strings.Join([]string{`&ValidatingAdmissionPolicySpec{`,
+ `ParamKind:` + strings.Replace(this.ParamKind.String(), "ParamKind", "ParamKind", 1) + `,`,
+ `MatchConstraints:` + strings.Replace(this.MatchConstraints.String(), "MatchResources", "MatchResources", 1) + `,`,
+ `Validations:` + repeatedStringForValidations + `,`,
+ `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`,
+ `AuditAnnotations:` + repeatedStringForAuditAnnotations + `,`,
+ `MatchConditions:` + repeatedStringForMatchConditions + `,`,
+ `Variables:` + repeatedStringForVariables + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ValidatingAdmissionPolicyStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForConditions := "[]Condition{"
+ for _, f := range this.Conditions {
+ repeatedStringForConditions += fmt.Sprintf("%v", f) + ","
+ }
+ repeatedStringForConditions += "}"
+ s := strings.Join([]string{`&ValidatingAdmissionPolicyStatus{`,
+ `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
+ `TypeChecking:` + strings.Replace(this.TypeChecking.String(), "TypeChecking", "TypeChecking", 1) + `,`,
+ `Conditions:` + repeatedStringForConditions + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ValidatingWebhook) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForRules := "[]RuleWithOperations{"
+ for _, f := range this.Rules {
+ repeatedStringForRules += fmt.Sprintf("%v", f) + ","
+ }
+ repeatedStringForRules += "}"
+ repeatedStringForMatchConditions := "[]MatchCondition{"
+ for _, f := range this.MatchConditions {
+ repeatedStringForMatchConditions += strings.Replace(strings.Replace(f.String(), "MatchCondition", "MatchCondition", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForMatchConditions += "}"
+ s := strings.Join([]string{`&ValidatingWebhook{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `ClientConfig:` + strings.Replace(strings.Replace(this.ClientConfig.String(), "WebhookClientConfig", "WebhookClientConfig", 1), `&`, ``, 1) + `,`,
+ `Rules:` + repeatedStringForRules + `,`,
+ `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`,
+ `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`,
+ `SideEffects:` + valueToStringGenerated(this.SideEffects) + `,`,
+ `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`,
+ `AdmissionReviewVersions:` + fmt.Sprintf("%v", this.AdmissionReviewVersions) + `,`,
+ `MatchPolicy:` + valueToStringGenerated(this.MatchPolicy) + `,`,
+ `ObjectSelector:` + strings.Replace(fmt.Sprintf("%v", this.ObjectSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`,
+ `MatchConditions:` + repeatedStringForMatchConditions + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ValidatingWebhookConfiguration) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForWebhooks := "[]ValidatingWebhook{"
+ for _, f := range this.Webhooks {
+ repeatedStringForWebhooks += strings.Replace(strings.Replace(f.String(), "ValidatingWebhook", "ValidatingWebhook", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForWebhooks += "}"
+ s := strings.Join([]string{`&ValidatingWebhookConfiguration{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Webhooks:` + repeatedStringForWebhooks + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ValidatingWebhookConfigurationList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForItems := "[]ValidatingWebhookConfiguration{"
+ for _, f := range this.Items {
+ repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ValidatingWebhookConfiguration", "ValidatingWebhookConfiguration", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForItems += "}"
+ s := strings.Join([]string{`&ValidatingWebhookConfigurationList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + repeatedStringForItems + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Validation) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Validation{`,
+ `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `Reason:` + valueToStringGenerated(this.Reason) + `,`,
+ `MessageExpression:` + fmt.Sprintf("%v", this.MessageExpression) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Variable) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Variable{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *WebhookClientConfig) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&WebhookClientConfig{`,
+ `Service:` + strings.Replace(this.Service.String(), "ServiceReference", "ServiceReference", 1) + `,`,
+ `CABundle:` + valueToStringGenerated(this.CABundle) + `,`,
+ `URL:` + valueToStringGenerated(this.URL) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *ApplyConfiguration) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ApplyConfiguration: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ApplyConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Expression = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *AuditAnnotation) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: AuditAnnotation: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AuditAnnotation: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Key = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ValueExpression", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ValueExpression = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExpressionWarning) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExpressionWarning: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExpressionWarning: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FieldRef", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FieldRef = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Warning", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Warning = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *JSONPatch) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: JSONPatch: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: JSONPatch: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Expression = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MatchCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MatchCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MatchCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Expression = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MatchResources) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MatchResources: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MatchResources: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NamespaceSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NamespaceSelector == nil {
+ m.NamespaceSelector = &v1.LabelSelector{}
+ }
+ if err := m.NamespaceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ObjectSelector == nil {
+ m.ObjectSelector = &v1.LabelSelector{}
+ }
+ if err := m.ObjectSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceRules", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ResourceRules = append(m.ResourceRules, NamedRuleWithOperations{})
+ if err := m.ResourceRules[len(m.ResourceRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExcludeResourceRules", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ExcludeResourceRules = append(m.ExcludeResourceRules, NamedRuleWithOperations{})
+ if err := m.ExcludeResourceRules[len(m.ExcludeResourceRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MatchPolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := MatchPolicyType(dAtA[iNdEx:postIndex])
+ m.MatchPolicy = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MutatingAdmissionPolicy) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MutatingAdmissionPolicy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MutatingAdmissionPolicy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
}
- s := strings.Join([]string{`&WebhookClientConfig{`,
- `Service:` + strings.Replace(this.Service.String(), "ServiceReference", "ServiceReference", 1) + `,`,
- `CABundle:` + valueToStringGenerated(this.CABundle) + `,`,
- `URL:` + valueToStringGenerated(this.URL) + `,`,
- `}`,
- }, "")
- return s
+ return nil
}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
+func (m *MutatingAdmissionPolicyBinding) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MutatingAdmissionPolicyBinding: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MutatingAdmissionPolicyBinding: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
}
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
}
-func (m *AuditAnnotation) Unmarshal(dAtA []byte) error {
+func (m *MutatingAdmissionPolicyBindingList) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -3273,17 +5243,17 @@ func (m *AuditAnnotation) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: AuditAnnotation: wiretype end group for non-group")
+ return fmt.Errorf("proto: MutatingAdmissionPolicyBindingList: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: AuditAnnotation: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: MutatingAdmissionPolicyBindingList: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
}
- var stringLen uint64
+ var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -3293,29 +5263,30 @@ func (m *AuditAnnotation) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= uint64(b&0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
- intStringLen := int(stringLen)
- if intStringLen < 0 {
+ if msglen < 0 {
return ErrInvalidLengthGenerated
}
- postIndex := iNdEx + intStringLen
+ postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Key = string(dAtA[iNdEx:postIndex])
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
iNdEx = postIndex
case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ValueExpression", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
}
- var stringLen uint64
+ var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -3325,23 +5296,25 @@ func (m *AuditAnnotation) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= uint64(b&0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
- intStringLen := int(stringLen)
- if intStringLen < 0 {
+ if msglen < 0 {
return ErrInvalidLengthGenerated
}
- postIndex := iNdEx + intStringLen
+ postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.ValueExpression = string(dAtA[iNdEx:postIndex])
+ m.Items = append(m.Items, MutatingAdmissionPolicyBinding{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -3364,7 +5337,7 @@ func (m *AuditAnnotation) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *ExpressionWarning) Unmarshal(dAtA []byte) error {
+func (m *MutatingAdmissionPolicyBindingSpec) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -3387,15 +5360,15 @@ func (m *ExpressionWarning) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: ExpressionWarning: wiretype end group for non-group")
+ return fmt.Errorf("proto: MutatingAdmissionPolicyBindingSpec: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: ExpressionWarning: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: MutatingAdmissionPolicyBindingSpec: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
- case 2:
+ case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field FieldRef", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field PolicyName", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -3423,13 +5396,49 @@ func (m *ExpressionWarning) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.FieldRef = string(dAtA[iNdEx:postIndex])
+ m.PolicyName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ParamRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ParamRef == nil {
+ m.ParamRef = &ParamRef{}
+ }
+ if err := m.ParamRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
iNdEx = postIndex
case 3:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Warning", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field MatchResources", wireType)
}
- var stringLen uint64
+ var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -3439,23 +5448,27 @@ func (m *ExpressionWarning) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= uint64(b&0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
- intStringLen := int(stringLen)
- if intStringLen < 0 {
+ if msglen < 0 {
return ErrInvalidLengthGenerated
}
- postIndex := iNdEx + intStringLen
+ postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Warning = string(dAtA[iNdEx:postIndex])
+ if m.MatchResources == nil {
+ m.MatchResources = &MatchResources{}
+ }
+ if err := m.MatchResources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -3478,7 +5491,7 @@ func (m *ExpressionWarning) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *MatchCondition) Unmarshal(dAtA []byte) error {
+func (m *MutatingAdmissionPolicyList) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -3501,17 +5514,17 @@ func (m *MatchCondition) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: MatchCondition: wiretype end group for non-group")
+ return fmt.Errorf("proto: MutatingAdmissionPolicyList: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: MatchCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: MutatingAdmissionPolicyList: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
}
- var stringLen uint64
+ var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -3521,29 +5534,30 @@ func (m *MatchCondition) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= uint64(b&0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
- intStringLen := int(stringLen)
- if intStringLen < 0 {
+ if msglen < 0 {
return ErrInvalidLengthGenerated
}
- postIndex := iNdEx + intStringLen
+ postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Name = string(dAtA[iNdEx:postIndex])
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
iNdEx = postIndex
case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
}
- var stringLen uint64
+ var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -3553,23 +5567,25 @@ func (m *MatchCondition) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= uint64(b&0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
- intStringLen := int(stringLen)
- if intStringLen < 0 {
+ if msglen < 0 {
return ErrInvalidLengthGenerated
}
- postIndex := iNdEx + intStringLen
+ postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Expression = string(dAtA[iNdEx:postIndex])
+ m.Items = append(m.Items, MutatingAdmissionPolicy{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -3592,7 +5608,7 @@ func (m *MatchCondition) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *MatchResources) Unmarshal(dAtA []byte) error {
+func (m *MutatingAdmissionPolicySpec) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -3615,15 +5631,15 @@ func (m *MatchResources) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: MatchResources: wiretype end group for non-group")
+ return fmt.Errorf("proto: MutatingAdmissionPolicySpec: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: MatchResources: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: MutatingAdmissionPolicySpec: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NamespaceSelector", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field ParamKind", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -3650,16 +5666,16 @@ func (m *MatchResources) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if m.NamespaceSelector == nil {
- m.NamespaceSelector = &v1.LabelSelector{}
+ if m.ParamKind == nil {
+ m.ParamKind = &ParamKind{}
}
- if err := m.NamespaceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ if err := m.ParamKind.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectSelector", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field MatchConstraints", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -3686,16 +5702,16 @@ func (m *MatchResources) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if m.ObjectSelector == nil {
- m.ObjectSelector = &v1.LabelSelector{}
+ if m.MatchConstraints == nil {
+ m.MatchConstraints = &MatchResources{}
}
- if err := m.ObjectSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ if err := m.MatchConstraints.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ResourceRules", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Variables", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -3722,14 +5738,14 @@ func (m *MatchResources) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.ResourceRules = append(m.ResourceRules, NamedRuleWithOperations{})
- if err := m.ResourceRules[len(m.ResourceRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ m.Variables = append(m.Variables, Variable{})
+ if err := m.Variables[len(m.Variables)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ExcludeResourceRules", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Mutations", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -3756,14 +5772,81 @@ func (m *MatchResources) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.ExcludeResourceRules = append(m.ExcludeResourceRules, NamedRuleWithOperations{})
- if err := m.ExcludeResourceRules[len(m.ExcludeResourceRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ m.Mutations = append(m.Mutations, Mutation{})
+ if err := m.Mutations[len(m.Mutations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FailurePolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := FailurePolicyType(dAtA[iNdEx:postIndex])
+ m.FailurePolicy = &s
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MatchConditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MatchConditions = append(m.MatchConditions, MatchCondition{})
+ if err := m.MatchConditions[len(m.MatchConditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 7:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MatchPolicy", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field ReinvocationPolicy", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -3791,8 +5874,7 @@ func (m *MatchResources) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- s := MatchPolicyType(dAtA[iNdEx:postIndex])
- m.MatchPolicy = &s
+ m.ReinvocationPolicy = k8s_io_api_admissionregistration_v1.ReinvocationPolicyType(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -4160,7 +6242,7 @@ func (m *MutatingWebhook) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- s := ReinvocationPolicyType(dAtA[iNdEx:postIndex])
+ s := k8s_io_api_admissionregistration_v1.ReinvocationPolicyType(dAtA[iNdEx:postIndex])
m.ReinvocationPolicy = &s
iNdEx = postIndex
case 11:
@@ -4488,6 +6570,160 @@ func (m *MutatingWebhookConfigurationList) Unmarshal(dAtA []byte) error {
}
return nil
}
+func (m *Mutation) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Mutation: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Mutation: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PatchType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PatchType = PatchType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ApplyConfiguration", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ApplyConfiguration == nil {
+ m.ApplyConfiguration = &ApplyConfiguration{}
+ }
+ if err := m.ApplyConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field JSONPatch", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.JSONPatch == nil {
+ m.JSONPatch = &JSONPatch{}
+ }
+ if err := m.JSONPatch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
func (m *NamedRuleWithOperations) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
diff --git a/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto b/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto
index 30f99f64d0f9..fb47a20056ea 100644
--- a/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto
+++ b/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto
@@ -29,6 +29,51 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
// Package-wide variables from generator "generated".
option go_package = "k8s.io/api/admissionregistration/v1beta1";
+// ApplyConfiguration defines the desired configuration values of an object.
+message ApplyConfiguration {
+ // expression will be evaluated by CEL to create an apply configuration.
+ // ref: https://github.com/google/cel-spec
+ //
+ // Apply configurations are declared in CEL using object initialization. For example, this CEL expression
+ // returns an apply configuration to set a single field:
+ //
+ // Object{
+ // spec: Object.spec{
+ // serviceAccountName: "example"
+ // }
+ // }
+ //
+ // Apply configurations may not modify atomic structs, maps or arrays due to the risk of accidental deletion of
+ // values not included in the apply configuration.
+ //
+ // CEL expressions have access to the object types needed to create apply configurations:
+ //
+ // - 'Object' - CEL type of the resource object.
+ // - 'Object.' - CEL type of object field (such as 'Object.spec')
+ // - 'Object.....` - CEL type of nested field (such as 'Object.spec.containers')
+ //
+ // CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:
+ //
+ // - 'object' - The object from the incoming request. The value is null for DELETE requests.
+ // - 'oldObject' - The existing object. The value is null for CREATE requests.
+ // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)).
+ // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind.
+ // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources.
+ // - 'variables' - Map of composited variables, from its name to its lazily evaluated value.
+ // For example, a variable named 'foo' can be accessed as 'variables.foo'.
+ // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.
+ // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
+ // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the
+ // request resource.
+ //
+ // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the
+ // object. No other metadata properties are accessible.
+ //
+ // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.
+ // Required.
+ optional string expression = 1;
+}
+
// AuditAnnotation describes how to produce an audit annotation for an API request.
message AuditAnnotation {
// key specifies the audit annotation key. The audit annotation keys of
@@ -79,6 +124,75 @@ message ExpressionWarning {
optional string warning = 3;
}
+// JSONPatch defines a JSON Patch.
+message JSONPatch {
+ // expression will be evaluated by CEL to create a [JSON patch](https://jsonpatch.com/).
+ // ref: https://github.com/google/cel-spec
+ //
+ // expression must return an array of JSONPatch values.
+ //
+ // For example, this CEL expression returns a JSON patch to conditionally modify a value:
+ //
+ // [
+ // JSONPatch{op: "test", path: "/spec/example", value: "Red"},
+ // JSONPatch{op: "replace", path: "/spec/example", value: "Green"}
+ // ]
+ //
+ // To define an object for the patch value, use Object types. For example:
+ //
+ // [
+ // JSONPatch{
+ // op: "add",
+ // path: "/spec/selector",
+ // value: Object.spec.selector{matchLabels: {"environment": "test"}}
+ // }
+ // ]
+ //
+ // To use strings containing '/' and '~' as JSONPatch path keys, use "jsonpatch.escapeKey". For example:
+ //
+ // [
+ // JSONPatch{
+ // op: "add",
+ // path: "/metadata/labels/" + jsonpatch.escapeKey("example.com/environment"),
+ // value: "test"
+ // },
+ // ]
+ //
+ // CEL expressions have access to the types needed to create JSON patches and objects:
+ //
+ // - 'JSONPatch' - CEL type of JSON Patch operations. JSONPatch has the fields 'op', 'from', 'path' and 'value'.
+ // See [JSON patch](https://jsonpatch.com/) for more details. The 'value' field may be set to any of: string,
+ // integer, array, map or object. If set, the 'path' and 'from' fields must be set to a
+ // [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901/) string, where the 'jsonpatch.escapeKey()' CEL
+ // function may be used to escape path keys containing '/' and '~'.
+ // - 'Object' - CEL type of the resource object.
+ // - 'Object.' - CEL type of object field (such as 'Object.spec')
+ // - 'Object.....` - CEL type of nested field (such as 'Object.spec.containers')
+ //
+ // CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:
+ //
+ // - 'object' - The object from the incoming request. The value is null for DELETE requests.
+ // - 'oldObject' - The existing object. The value is null for CREATE requests.
+ // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)).
+ // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind.
+ // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources.
+ // - 'variables' - Map of composited variables, from its name to its lazily evaluated value.
+ // For example, a variable named 'foo' can be accessed as 'variables.foo'.
+ // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.
+ // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
+ // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the
+ // request resource.
+ //
+ // CEL expressions have access to [Kubernetes CEL function libraries](https://kubernetes.io/docs/reference/using-api/cel/#cel-options-language-features-and-libraries)
+ // as well as:
+ //
+ // - 'jsonpatch.escapeKey' - Performs JSONPatch key escaping. '~' and '/' are escaped as '~0' and `~1' respectively).
+ //
+ // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.
+ // Required.
+ optional string expression = 1;
+}
+
// MatchCondition represents a condition which must be fulfilled for a request to be sent to a webhook.
message MatchCondition {
// Name is an identifier for this match condition, used for strategic merging of MatchConditions,
@@ -203,6 +317,173 @@ message MatchResources {
optional string matchPolicy = 7;
}
+// MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain.
+message MutatingAdmissionPolicy {
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
+ // +optional
+ optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of the MutatingAdmissionPolicy.
+ optional MutatingAdmissionPolicySpec spec = 2;
+}
+
+// MutatingAdmissionPolicyBinding binds the MutatingAdmissionPolicy with parametrized resources.
+// MutatingAdmissionPolicyBinding and the optional parameter resource together define how cluster administrators
+// configure policies for clusters.
+//
+// For a given admission request, each binding will cause its policy to be
+// evaluated N times, where N is 1 for policies/bindings that don't use
+// params, otherwise N is the number of parameters selected by the binding.
+// Each evaluation is constrained by a [runtime cost budget](https://kubernetes.io/docs/reference/using-api/cel/#runtime-cost-budget).
+//
+// Adding/removing policies, bindings, or params can not affect whether a
+// given (policy, binding, param) combination is within its own CEL budget.
+message MutatingAdmissionPolicyBinding {
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
+ // +optional
+ optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of the MutatingAdmissionPolicyBinding.
+ optional MutatingAdmissionPolicyBindingSpec spec = 2;
+}
+
+// MutatingAdmissionPolicyBindingList is a list of MutatingAdmissionPolicyBinding.
+message MutatingAdmissionPolicyBindingList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
+ // +optional
+ optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of PolicyBinding.
+ repeated MutatingAdmissionPolicyBinding items = 2;
+}
+
+// MutatingAdmissionPolicyBindingSpec is the specification of the MutatingAdmissionPolicyBinding.
+message MutatingAdmissionPolicyBindingSpec {
+ // policyName references a MutatingAdmissionPolicy name which the MutatingAdmissionPolicyBinding binds to.
+ // If the referenced resource does not exist, this binding is considered invalid and will be ignored
+ // Required.
+ optional string policyName = 1;
+
+ // paramRef specifies the parameter resource used to configure the admission control policy.
+ // It should point to a resource of the type specified in spec.ParamKind of the bound MutatingAdmissionPolicy.
+ // If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the MutatingAdmissionPolicy applied.
+ // If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.
+ // +optional
+ optional ParamRef paramRef = 2;
+
+ // matchResources limits what resources match this binding and may be mutated by it.
+ // Note that if matchResources matches a resource, the resource must also match a policy's matchConstraints and
+ // matchConditions before the resource may be mutated.
+ // When matchResources is unset, it does not constrain resource matching, and only the policy's matchConstraints
+ // and matchConditions must match for the resource to be mutated.
+ // Additionally, matchResources.resourceRules are optional and do not constraint matching when unset.
+ // Note that this is differs from MutatingAdmissionPolicy matchConstraints, where resourceRules are required.
+ // The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched.
+ // '*' matches CREATE, UPDATE and CONNECT.
+ // +optional
+ optional MatchResources matchResources = 3;
+}
+
+// MutatingAdmissionPolicyList is a list of MutatingAdmissionPolicy.
+message MutatingAdmissionPolicyList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
+ // +optional
+ optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of ValidatingAdmissionPolicy.
+ repeated MutatingAdmissionPolicy items = 2;
+}
+
+// MutatingAdmissionPolicySpec is the specification of the desired behavior of the admission policy.
+message MutatingAdmissionPolicySpec {
+ // paramKind specifies the kind of resources used to parameterize this policy.
+ // If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions.
+ // If paramKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied.
+ // If paramKind is specified but paramRef is unset in MutatingAdmissionPolicyBinding, the params variable will be null.
+ // +optional
+ optional ParamKind paramKind = 1;
+
+ // matchConstraints specifies what resources this policy is designed to validate.
+ // The MutatingAdmissionPolicy cares about a request if it matches _all_ Constraints.
+ // However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API
+ // MutatingAdmissionPolicy cannot match MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding.
+ // The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched.
+ // '*' matches CREATE, UPDATE and CONNECT.
+ // Required.
+ optional MatchResources matchConstraints = 2;
+
+ // variables contain definitions of variables that can be used in composition of other expressions.
+ // Each variable is defined as a named CEL expression.
+ // The variables defined here will be available under `variables` in other expressions of the policy
+ // except matchConditions because matchConditions are evaluated before the rest of the policy.
+ //
+ // The expression of a variable can refer to other variables defined earlier in the list but not those after.
+ // Thus, variables must be sorted by the order of first appearance and acyclic.
+ // +listType=atomic
+ // +optional
+ repeated Variable variables = 3;
+
+ // mutations contain operations to perform on matching objects.
+ // mutations may not be empty; a minimum of one mutation is required.
+ // mutations are evaluated in order, and are reinvoked according to
+ // the reinvocationPolicy.
+ // The mutations of a policy are invoked for each binding of this policy
+ // and reinvocation of mutations occurs on a per binding basis.
+ //
+ // +listType=atomic
+ // +optional
+ repeated Mutation mutations = 4;
+
+ // failurePolicy defines how to handle failures for the admission policy. Failures can
+ // occur from CEL expression parse errors, type check errors, runtime errors and invalid
+ // or mis-configured policy definitions or bindings.
+ //
+ // A policy is invalid if paramKind refers to a non-existent Kind.
+ // A binding is invalid if paramRef.name refers to a non-existent resource.
+ //
+ // failurePolicy does not define how validations that evaluate to false are handled.
+ //
+ // Allowed values are Ignore or Fail. Defaults to Fail.
+ // +optional
+ optional string failurePolicy = 5;
+
+ // matchConditions is a list of conditions that must be met for a request to be validated.
+ // Match conditions filter requests that have already been matched by the matchConstraints.
+ // An empty list of matchConditions matches all requests.
+ // There are a maximum of 64 match conditions allowed.
+ //
+ // If a parameter object is provided, it can be accessed via the `params` handle in the same
+ // manner as validation expressions.
+ //
+ // The exact matching logic is (in order):
+ // 1. If ANY matchCondition evaluates to FALSE, the policy is skipped.
+ // 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.
+ // 3. If any matchCondition evaluates to an error (but none are FALSE):
+ // - If failurePolicy=Fail, reject the request
+ // - If failurePolicy=Ignore, the policy is skipped
+ //
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ // +listType=map
+ // +listMapKey=name
+ // +optional
+ repeated MatchCondition matchConditions = 6;
+
+ // reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding
+ // as part of a single admission evaluation.
+ // Allowed values are "Never" and "IfNeeded".
+ //
+ // Never: These mutations will not be called more than once per binding in a single admission evaluation.
+ //
+ // IfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of
+ // order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies. Mutations are only
+ // reinvoked when mutations change the object after this mutation is invoked.
+ // Required.
+ optional string reinvocationPolicy = 7;
+}
+
// MutatingWebhook describes an admission webhook and the resources and operations it applies to.
message MutatingWebhook {
// The name of the admission webhook.
@@ -401,6 +682,26 @@ message MutatingWebhookConfigurationList {
repeated MutatingWebhookConfiguration items = 2;
}
+// Mutation specifies the CEL expression which is used to apply the Mutation.
+message Mutation {
+ // patchType indicates the patch strategy used.
+ // Allowed values are "ApplyConfiguration" and "JSONPatch".
+ // Required.
+ //
+ // +unionDiscriminator
+ optional string patchType = 2;
+
+ // applyConfiguration defines the desired configuration values of an object.
+ // The configuration is applied to the admission object using
+ // [structured merge diff](https://github.com/kubernetes-sigs/structured-merge-diff).
+ // A CEL expression is used to create apply configuration.
+ optional ApplyConfiguration applyConfiguration = 3;
+
+ // jsonPatch defines a [JSON patch](https://jsonpatch.com/) operation to perform a mutation to the object.
+ // A CEL expression is used to create the JSON patch.
+ optional JSONPatch jsonPatch = 4;
+}
+
// NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
// +structType=atomic
message NamedRuleWithOperations {
diff --git a/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/register.go b/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/register.go
index 363233a2f9aa..be64c4a5fab5 100644
--- a/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/register.go
+++ b/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/register.go
@@ -54,6 +54,10 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&ValidatingAdmissionPolicyList{},
&ValidatingAdmissionPolicyBinding{},
&ValidatingAdmissionPolicyBindingList{},
+ &MutatingAdmissionPolicy{},
+ &MutatingAdmissionPolicyList{},
+ &MutatingAdmissionPolicyBinding{},
+ &MutatingAdmissionPolicyBindingList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
diff --git a/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/types.go b/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/types.go
index 0f5903123923..cffdda82c9a5 100644
--- a/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/types.go
+++ b/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/types.go
@@ -1073,7 +1073,7 @@ type MutatingWebhook struct {
}
// ReinvocationPolicyType specifies what type of policy the admission hook uses.
-type ReinvocationPolicyType string
+type ReinvocationPolicyType = v1.ReinvocationPolicyType
const (
// NeverReinvocationPolicy indicates that the webhook must not be called more than once in a
@@ -1197,3 +1197,332 @@ type MatchCondition struct {
// Required.
Expression string `json:"expression" protobuf:"bytes,2,opt,name=expression"`
}
+
+// +genclient
+// +genclient:nonNamespaced
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +k8s:prerelease-lifecycle-gen:introduced=1.34
+
+// MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain.
+type MutatingAdmissionPolicy struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ // Specification of the desired behavior of the MutatingAdmissionPolicy.
+ Spec MutatingAdmissionPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +k8s:prerelease-lifecycle-gen:introduced=1.34
+
+// MutatingAdmissionPolicyList is a list of MutatingAdmissionPolicy.
+type MutatingAdmissionPolicyList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ // List of ValidatingAdmissionPolicy.
+ Items []MutatingAdmissionPolicy `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// MutatingAdmissionPolicySpec is the specification of the desired behavior of the admission policy.
+type MutatingAdmissionPolicySpec struct {
+ // paramKind specifies the kind of resources used to parameterize this policy.
+ // If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions.
+ // If paramKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied.
+ // If paramKind is specified but paramRef is unset in MutatingAdmissionPolicyBinding, the params variable will be null.
+ // +optional
+ ParamKind *ParamKind `json:"paramKind,omitempty" protobuf:"bytes,1,rep,name=paramKind"`
+
+ // matchConstraints specifies what resources this policy is designed to validate.
+ // The MutatingAdmissionPolicy cares about a request if it matches _all_ Constraints.
+ // However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API
+ // MutatingAdmissionPolicy cannot match MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding.
+ // The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched.
+ // '*' matches CREATE, UPDATE and CONNECT.
+ // Required.
+ MatchConstraints *MatchResources `json:"matchConstraints,omitempty" protobuf:"bytes,2,rep,name=matchConstraints"`
+
+ // variables contain definitions of variables that can be used in composition of other expressions.
+ // Each variable is defined as a named CEL expression.
+ // The variables defined here will be available under `variables` in other expressions of the policy
+ // except matchConditions because matchConditions are evaluated before the rest of the policy.
+ //
+ // The expression of a variable can refer to other variables defined earlier in the list but not those after.
+ // Thus, variables must be sorted by the order of first appearance and acyclic.
+ // +listType=atomic
+ // +optional
+ Variables []Variable `json:"variables,omitempty" protobuf:"bytes,3,rep,name=variables"`
+
+ // mutations contain operations to perform on matching objects.
+ // mutations may not be empty; a minimum of one mutation is required.
+ // mutations are evaluated in order, and are reinvoked according to
+ // the reinvocationPolicy.
+ // The mutations of a policy are invoked for each binding of this policy
+ // and reinvocation of mutations occurs on a per binding basis.
+ //
+ // +listType=atomic
+ // +optional
+ Mutations []Mutation `json:"mutations,omitempty" protobuf:"bytes,4,rep,name=mutations"`
+
+ // failurePolicy defines how to handle failures for the admission policy. Failures can
+ // occur from CEL expression parse errors, type check errors, runtime errors and invalid
+ // or mis-configured policy definitions or bindings.
+ //
+ // A policy is invalid if paramKind refers to a non-existent Kind.
+ // A binding is invalid if paramRef.name refers to a non-existent resource.
+ //
+ // failurePolicy does not define how validations that evaluate to false are handled.
+ //
+ // Allowed values are Ignore or Fail. Defaults to Fail.
+ // +optional
+ FailurePolicy *FailurePolicyType `json:"failurePolicy,omitempty" protobuf:"bytes,5,opt,name=failurePolicy,casttype=FailurePolicyType"`
+
+ // matchConditions is a list of conditions that must be met for a request to be validated.
+ // Match conditions filter requests that have already been matched by the matchConstraints.
+ // An empty list of matchConditions matches all requests.
+ // There are a maximum of 64 match conditions allowed.
+ //
+ // If a parameter object is provided, it can be accessed via the `params` handle in the same
+ // manner as validation expressions.
+ //
+ // The exact matching logic is (in order):
+ // 1. If ANY matchCondition evaluates to FALSE, the policy is skipped.
+ // 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.
+ // 3. If any matchCondition evaluates to an error (but none are FALSE):
+ // - If failurePolicy=Fail, reject the request
+ // - If failurePolicy=Ignore, the policy is skipped
+ //
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ // +listType=map
+ // +listMapKey=name
+ // +optional
+ MatchConditions []MatchCondition `json:"matchConditions,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,6,rep,name=matchConditions"`
+
+ // reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding
+ // as part of a single admission evaluation.
+ // Allowed values are "Never" and "IfNeeded".
+ //
+ // Never: These mutations will not be called more than once per binding in a single admission evaluation.
+ //
+ // IfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of
+ // order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies. Mutations are only
+ // reinvoked when mutations change the object after this mutation is invoked.
+ // Required.
+ ReinvocationPolicy ReinvocationPolicyType `json:"reinvocationPolicy,omitempty" protobuf:"bytes,7,opt,name=reinvocationPolicy,casttype=ReinvocationPolicyType"`
+}
+
+// Mutation specifies the CEL expression which is used to apply the Mutation.
+type Mutation struct {
+ // patchType indicates the patch strategy used.
+ // Allowed values are "ApplyConfiguration" and "JSONPatch".
+ // Required.
+ //
+ // +unionDiscriminator
+ PatchType PatchType `json:"patchType" protobuf:"bytes,2,opt,name=patchType,casttype=PatchType"`
+
+ // applyConfiguration defines the desired configuration values of an object.
+ // The configuration is applied to the admission object using
+ // [structured merge diff](https://github.com/kubernetes-sigs/structured-merge-diff).
+ // A CEL expression is used to create apply configuration.
+ ApplyConfiguration *ApplyConfiguration `json:"applyConfiguration,omitempty" protobuf:"bytes,3,opt,name=applyConfiguration"`
+
+ // jsonPatch defines a [JSON patch](https://jsonpatch.com/) operation to perform a mutation to the object.
+ // A CEL expression is used to create the JSON patch.
+ JSONPatch *JSONPatch `json:"jsonPatch,omitempty" protobuf:"bytes,4,opt,name=jsonPatch"`
+}
+
+// PatchType specifies the type of patch operation for a mutation.
+// +enum
+type PatchType string
+
+const (
+ // ApplyConfiguration indicates that the mutation is using apply configuration to mutate the object.
+ PatchTypeApplyConfiguration PatchType = "ApplyConfiguration"
+ // JSONPatch indicates that the object is mutated through JSON Patch.
+ PatchTypeJSONPatch PatchType = "JSONPatch"
+)
+
+// ApplyConfiguration defines the desired configuration values of an object.
+type ApplyConfiguration struct {
+ // expression will be evaluated by CEL to create an apply configuration.
+ // ref: https://github.com/google/cel-spec
+ //
+ // Apply configurations are declared in CEL using object initialization. For example, this CEL expression
+ // returns an apply configuration to set a single field:
+ //
+ // Object{
+ // spec: Object.spec{
+ // serviceAccountName: "example"
+ // }
+ // }
+ //
+ // Apply configurations may not modify atomic structs, maps or arrays due to the risk of accidental deletion of
+ // values not included in the apply configuration.
+ //
+ // CEL expressions have access to the object types needed to create apply configurations:
+ //
+ // - 'Object' - CEL type of the resource object.
+ // - 'Object.' - CEL type of object field (such as 'Object.spec')
+ // - 'Object.....` - CEL type of nested field (such as 'Object.spec.containers')
+ //
+ // CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:
+ //
+ // - 'object' - The object from the incoming request. The value is null for DELETE requests.
+ // - 'oldObject' - The existing object. The value is null for CREATE requests.
+ // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)).
+ // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind.
+ // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources.
+ // - 'variables' - Map of composited variables, from its name to its lazily evaluated value.
+ // For example, a variable named 'foo' can be accessed as 'variables.foo'.
+ // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.
+ // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
+ // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the
+ // request resource.
+ //
+ // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the
+ // object. No other metadata properties are accessible.
+ //
+ // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.
+ // Required.
+ Expression string `json:"expression,omitempty" protobuf:"bytes,1,opt,name=expression"`
+}
+
+// JSONPatch defines a JSON Patch.
+type JSONPatch struct {
+ // expression will be evaluated by CEL to create a [JSON patch](https://jsonpatch.com/).
+ // ref: https://github.com/google/cel-spec
+ //
+ // expression must return an array of JSONPatch values.
+ //
+ // For example, this CEL expression returns a JSON patch to conditionally modify a value:
+ //
+ // [
+ // JSONPatch{op: "test", path: "/spec/example", value: "Red"},
+ // JSONPatch{op: "replace", path: "/spec/example", value: "Green"}
+ // ]
+ //
+ // To define an object for the patch value, use Object types. For example:
+ //
+ // [
+ // JSONPatch{
+ // op: "add",
+ // path: "/spec/selector",
+ // value: Object.spec.selector{matchLabels: {"environment": "test"}}
+ // }
+ // ]
+ //
+ // To use strings containing '/' and '~' as JSONPatch path keys, use "jsonpatch.escapeKey". For example:
+ //
+ // [
+ // JSONPatch{
+ // op: "add",
+ // path: "/metadata/labels/" + jsonpatch.escapeKey("example.com/environment"),
+ // value: "test"
+ // },
+ // ]
+ //
+ // CEL expressions have access to the types needed to create JSON patches and objects:
+ //
+ // - 'JSONPatch' - CEL type of JSON Patch operations. JSONPatch has the fields 'op', 'from', 'path' and 'value'.
+ // See [JSON patch](https://jsonpatch.com/) for more details. The 'value' field may be set to any of: string,
+ // integer, array, map or object. If set, the 'path' and 'from' fields must be set to a
+ // [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901/) string, where the 'jsonpatch.escapeKey()' CEL
+ // function may be used to escape path keys containing '/' and '~'.
+ // - 'Object' - CEL type of the resource object.
+ // - 'Object.' - CEL type of object field (such as 'Object.spec')
+ // - 'Object.....` - CEL type of nested field (such as 'Object.spec.containers')
+ //
+ // CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:
+ //
+ // - 'object' - The object from the incoming request. The value is null for DELETE requests.
+ // - 'oldObject' - The existing object. The value is null for CREATE requests.
+ // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)).
+ // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind.
+ // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources.
+ // - 'variables' - Map of composited variables, from its name to its lazily evaluated value.
+ // For example, a variable named 'foo' can be accessed as 'variables.foo'.
+ // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.
+ // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
+ // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the
+ // request resource.
+ //
+ // CEL expressions have access to [Kubernetes CEL function libraries](https://kubernetes.io/docs/reference/using-api/cel/#cel-options-language-features-and-libraries)
+ // as well as:
+ //
+ // - 'jsonpatch.escapeKey' - Performs JSONPatch key escaping. '~' and '/' are escaped as '~0' and `~1' respectively).
+ //
+ //
+ // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.
+ // Required.
+ Expression string `json:"expression,omitempty" protobuf:"bytes,1,opt,name=expression"`
+}
+
+// +genclient
+// +genclient:nonNamespaced
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +k8s:prerelease-lifecycle-gen:introduced=1.34
+
+// MutatingAdmissionPolicyBinding binds the MutatingAdmissionPolicy with parametrized resources.
+// MutatingAdmissionPolicyBinding and the optional parameter resource together define how cluster administrators
+// configure policies for clusters.
+//
+// For a given admission request, each binding will cause its policy to be
+// evaluated N times, where N is 1 for policies/bindings that don't use
+// params, otherwise N is the number of parameters selected by the binding.
+// Each evaluation is constrained by a [runtime cost budget](https://kubernetes.io/docs/reference/using-api/cel/#runtime-cost-budget).
+//
+// Adding/removing policies, bindings, or params can not affect whether a
+// given (policy, binding, param) combination is within its own CEL budget.
+type MutatingAdmissionPolicyBinding struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ // Specification of the desired behavior of the MutatingAdmissionPolicyBinding.
+ Spec MutatingAdmissionPolicyBindingSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +k8s:prerelease-lifecycle-gen:introduced=1.34
+
+// MutatingAdmissionPolicyBindingList is a list of MutatingAdmissionPolicyBinding.
+type MutatingAdmissionPolicyBindingList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ // List of PolicyBinding.
+ Items []MutatingAdmissionPolicyBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// MutatingAdmissionPolicyBindingSpec is the specification of the MutatingAdmissionPolicyBinding.
+type MutatingAdmissionPolicyBindingSpec struct {
+ // policyName references a MutatingAdmissionPolicy name which the MutatingAdmissionPolicyBinding binds to.
+ // If the referenced resource does not exist, this binding is considered invalid and will be ignored
+ // Required.
+ PolicyName string `json:"policyName,omitempty" protobuf:"bytes,1,rep,name=policyName"`
+
+ // paramRef specifies the parameter resource used to configure the admission control policy.
+ // It should point to a resource of the type specified in spec.ParamKind of the bound MutatingAdmissionPolicy.
+ // If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the MutatingAdmissionPolicy applied.
+ // If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.
+ // +optional
+ ParamRef *ParamRef `json:"paramRef,omitempty" protobuf:"bytes,2,rep,name=paramRef"`
+
+ // matchResources limits what resources match this binding and may be mutated by it.
+ // Note that if matchResources matches a resource, the resource must also match a policy's matchConstraints and
+ // matchConditions before the resource may be mutated.
+ // When matchResources is unset, it does not constrain resource matching, and only the policy's matchConstraints
+ // and matchConditions must match for the resource to be mutated.
+ // Additionally, matchResources.resourceRules are optional and do not constraint matching when unset.
+ // Note that this is differs from MutatingAdmissionPolicy matchConstraints, where resourceRules are required.
+ // The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched.
+ // '*' matches CREATE, UPDATE and CONNECT.
+ // +optional
+ MatchResources *MatchResources `json:"matchResources,omitempty" protobuf:"bytes,3,rep,name=matchResources"`
+}
diff --git a/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go b/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go
index cc1509b539a4..1a97c94729f3 100644
--- a/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go
+++ b/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go
@@ -27,6 +27,15 @@ package v1beta1
// Those methods can be generated by using hack/update-codegen.sh
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
+var map_ApplyConfiguration = map[string]string{
+ "": "ApplyConfiguration defines the desired configuration values of an object.",
+ "expression": "expression will be evaluated by CEL to create an apply configuration. ref: https://github.com/google/cel-spec\n\nApply configurations are declared in CEL using object initialization. For example, this CEL expression returns an apply configuration to set a single field:\n\n\tObject{\n\t spec: Object.spec{\n\t serviceAccountName: \"example\"\n\t }\n\t}\n\nApply configurations may not modify atomic structs, maps or arrays due to the risk of accidental deletion of values not included in the apply configuration.\n\nCEL expressions have access to the object types needed to create apply configurations:\n\n- 'Object' - CEL type of the resource object. - 'Object.' - CEL type of object field (such as 'Object.spec') - 'Object.....` - CEL type of nested field (such as 'Object.spec.containers')\n\nCEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Required.",
+}
+
+func (ApplyConfiguration) SwaggerDoc() map[string]string {
+ return map_ApplyConfiguration
+}
+
var map_AuditAnnotation = map[string]string{
"": "AuditAnnotation describes how to produce an audit annotation for an API request.",
"key": "key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.\n\nThe key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: \"{ValidatingAdmissionPolicy name}/{key}\".\n\nIf an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded.\n\nRequired.",
@@ -47,6 +56,15 @@ func (ExpressionWarning) SwaggerDoc() map[string]string {
return map_ExpressionWarning
}
+var map_JSONPatch = map[string]string{
+ "": "JSONPatch defines a JSON Patch.",
+ "expression": "expression will be evaluated by CEL to create a [JSON patch](https://jsonpatch.com/). ref: https://github.com/google/cel-spec\n\nexpression must return an array of JSONPatch values.\n\nFor example, this CEL expression returns a JSON patch to conditionally modify a value:\n\n\t [\n\t JSONPatch{op: \"test\", path: \"/spec/example\", value: \"Red\"},\n\t JSONPatch{op: \"replace\", path: \"/spec/example\", value: \"Green\"}\n\t ]\n\nTo define an object for the patch value, use Object types. For example:\n\n\t [\n\t JSONPatch{\n\t op: \"add\",\n\t path: \"/spec/selector\",\n\t value: Object.spec.selector{matchLabels: {\"environment\": \"test\"}}\n\t }\n\t ]\n\nTo use strings containing '/' and '~' as JSONPatch path keys, use \"jsonpatch.escapeKey\". For example:\n\n\t [\n\t JSONPatch{\n\t op: \"add\",\n\t path: \"/metadata/labels/\" + jsonpatch.escapeKey(\"example.com/environment\"),\n\t value: \"test\"\n\t },\n\t ]\n\nCEL expressions have access to the types needed to create JSON patches and objects:\n\n- 'JSONPatch' - CEL type of JSON Patch operations. JSONPatch has the fields 'op', 'from', 'path' and 'value'.\n See [JSON patch](https://jsonpatch.com/) for more details. The 'value' field may be set to any of: string,\n integer, array, map or object. If set, the 'path' and 'from' fields must be set to a\n [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901/) string, where the 'jsonpatch.escapeKey()' CEL\n function may be used to escape path keys containing '/' and '~'.\n- 'Object' - CEL type of the resource object. - 'Object.' - CEL type of object field (such as 'Object.spec') - 'Object.....` - CEL type of nested field (such as 'Object.spec.containers')\n\nCEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\nCEL expressions have access to [Kubernetes CEL function libraries](https://kubernetes.io/docs/reference/using-api/cel/#cel-options-language-features-and-libraries) as well as:\n\n- 'jsonpatch.escapeKey' - Performs JSONPatch key escaping. '~' and '/' are escaped as '~0' and `~1' respectively).\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Required.",
+}
+
+func (JSONPatch) SwaggerDoc() map[string]string {
+ return map_JSONPatch
+}
+
var map_MatchCondition = map[string]string{
"": "MatchCondition represents a condition which must be fulfilled for a request to be sent to a webhook.",
"name": "Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')\n\nRequired.",
@@ -70,6 +88,72 @@ func (MatchResources) SwaggerDoc() map[string]string {
return map_MatchResources
}
+var map_MutatingAdmissionPolicy = map[string]string{
+ "": "MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain.",
+ "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.",
+ "spec": "Specification of the desired behavior of the MutatingAdmissionPolicy.",
+}
+
+func (MutatingAdmissionPolicy) SwaggerDoc() map[string]string {
+ return map_MutatingAdmissionPolicy
+}
+
+var map_MutatingAdmissionPolicyBinding = map[string]string{
+ "": "MutatingAdmissionPolicyBinding binds the MutatingAdmissionPolicy with parametrized resources. MutatingAdmissionPolicyBinding and the optional parameter resource together define how cluster administrators configure policies for clusters.\n\nFor a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding. Each evaluation is constrained by a [runtime cost budget](https://kubernetes.io/docs/reference/using-api/cel/#runtime-cost-budget).\n\nAdding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.",
+ "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.",
+ "spec": "Specification of the desired behavior of the MutatingAdmissionPolicyBinding.",
+}
+
+func (MutatingAdmissionPolicyBinding) SwaggerDoc() map[string]string {
+ return map_MutatingAdmissionPolicyBinding
+}
+
+var map_MutatingAdmissionPolicyBindingList = map[string]string{
+ "": "MutatingAdmissionPolicyBindingList is a list of MutatingAdmissionPolicyBinding.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
+ "items": "List of PolicyBinding.",
+}
+
+func (MutatingAdmissionPolicyBindingList) SwaggerDoc() map[string]string {
+ return map_MutatingAdmissionPolicyBindingList
+}
+
+var map_MutatingAdmissionPolicyBindingSpec = map[string]string{
+ "": "MutatingAdmissionPolicyBindingSpec is the specification of the MutatingAdmissionPolicyBinding.",
+ "policyName": "policyName references a MutatingAdmissionPolicy name which the MutatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.",
+ "paramRef": "paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in spec.ParamKind of the bound MutatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the MutatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.",
+ "matchResources": "matchResources limits what resources match this binding and may be mutated by it. Note that if matchResources matches a resource, the resource must also match a policy's matchConstraints and matchConditions before the resource may be mutated. When matchResources is unset, it does not constrain resource matching, and only the policy's matchConstraints and matchConditions must match for the resource to be mutated. Additionally, matchResources.resourceRules are optional and do not constraint matching when unset. Note that this is differs from MutatingAdmissionPolicy matchConstraints, where resourceRules are required. The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. '*' matches CREATE, UPDATE and CONNECT.",
+}
+
+func (MutatingAdmissionPolicyBindingSpec) SwaggerDoc() map[string]string {
+ return map_MutatingAdmissionPolicyBindingSpec
+}
+
+var map_MutatingAdmissionPolicyList = map[string]string{
+ "": "MutatingAdmissionPolicyList is a list of MutatingAdmissionPolicy.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
+ "items": "List of ValidatingAdmissionPolicy.",
+}
+
+func (MutatingAdmissionPolicyList) SwaggerDoc() map[string]string {
+ return map_MutatingAdmissionPolicyList
+}
+
+var map_MutatingAdmissionPolicySpec = map[string]string{
+ "": "MutatingAdmissionPolicySpec is the specification of the desired behavior of the admission policy.",
+ "paramKind": "paramKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If paramKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in MutatingAdmissionPolicyBinding, the params variable will be null.",
+ "matchConstraints": "matchConstraints specifies what resources this policy is designed to validate. The MutatingAdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API MutatingAdmissionPolicy cannot match MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding. The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. '*' matches CREATE, UPDATE and CONNECT. Required.",
+ "variables": "variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except matchConditions because matchConditions are evaluated before the rest of the policy.\n\nThe expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, variables must be sorted by the order of first appearance and acyclic.",
+ "mutations": "mutations contain operations to perform on matching objects. mutations may not be empty; a minimum of one mutation is required. mutations are evaluated in order, and are reinvoked according to the reinvocationPolicy. The mutations of a policy are invoked for each binding of this policy and reinvocation of mutations occurs on a per binding basis.",
+ "failurePolicy": "failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.\n\nA policy is invalid if paramKind refers to a non-existent Kind. A binding is invalid if paramRef.name refers to a non-existent resource.\n\nfailurePolicy does not define how validations that evaluate to false are handled.\n\nAllowed values are Ignore or Fail. Defaults to Fail.",
+ "matchConditions": "matchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the matchConstraints. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nIf a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the policy is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the policy is skipped",
+ "reinvocationPolicy": "reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: These mutations will not be called more than once per binding in a single admission evaluation.\n\nIfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies. Mutations are only reinvoked when mutations change the object after this mutation is invoked. Required.",
+}
+
+func (MutatingAdmissionPolicySpec) SwaggerDoc() map[string]string {
+ return map_MutatingAdmissionPolicySpec
+}
+
var map_MutatingWebhook = map[string]string{
"": "MutatingWebhook describes an admission webhook and the resources and operations it applies to.",
"name": "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.",
@@ -110,6 +194,17 @@ func (MutatingWebhookConfigurationList) SwaggerDoc() map[string]string {
return map_MutatingWebhookConfigurationList
}
+var map_Mutation = map[string]string{
+ "": "Mutation specifies the CEL expression which is used to apply the Mutation.",
+ "patchType": "patchType indicates the patch strategy used. Allowed values are \"ApplyConfiguration\" and \"JSONPatch\". Required.",
+ "applyConfiguration": "applyConfiguration defines the desired configuration values of an object. The configuration is applied to the admission object using [structured merge diff](https://github.com/kubernetes-sigs/structured-merge-diff). A CEL expression is used to create apply configuration.",
+ "jsonPatch": "jsonPatch defines a [JSON patch](https://jsonpatch.com/) operation to perform a mutation to the object. A CEL expression is used to create the JSON patch.",
+}
+
+func (Mutation) SwaggerDoc() map[string]string {
+ return map_Mutation
+}
+
var map_NamedRuleWithOperations = map[string]string{
"": "NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.",
"resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.",
diff --git a/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.deepcopy.go b/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.deepcopy.go
index 4c10b1d1135a..3749a3d14135 100644
--- a/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.deepcopy.go
+++ b/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.deepcopy.go
@@ -27,6 +27,22 @@ import (
runtime "k8s.io/apimachinery/pkg/runtime"
)
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ApplyConfiguration) DeepCopyInto(out *ApplyConfiguration) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplyConfiguration.
+func (in *ApplyConfiguration) DeepCopy() *ApplyConfiguration {
+ if in == nil {
+ return nil
+ }
+ out := new(ApplyConfiguration)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AuditAnnotation) DeepCopyInto(out *AuditAnnotation) {
*out = *in
@@ -59,6 +75,22 @@ func (in *ExpressionWarning) DeepCopy() *ExpressionWarning {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *JSONPatch) DeepCopyInto(out *JSONPatch) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONPatch.
+func (in *JSONPatch) DeepCopy() *JSONPatch {
+ if in == nil {
+ return nil
+ }
+ out := new(JSONPatch)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MatchCondition) DeepCopyInto(out *MatchCondition) {
*out = *in
@@ -120,6 +152,200 @@ func (in *MatchResources) DeepCopy() *MatchResources {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *MutatingAdmissionPolicy) DeepCopyInto(out *MutatingAdmissionPolicy) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingAdmissionPolicy.
+func (in *MutatingAdmissionPolicy) DeepCopy() *MutatingAdmissionPolicy {
+ if in == nil {
+ return nil
+ }
+ out := new(MutatingAdmissionPolicy)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *MutatingAdmissionPolicy) 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 *MutatingAdmissionPolicyBinding) DeepCopyInto(out *MutatingAdmissionPolicyBinding) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingAdmissionPolicyBinding.
+func (in *MutatingAdmissionPolicyBinding) DeepCopy() *MutatingAdmissionPolicyBinding {
+ if in == nil {
+ return nil
+ }
+ out := new(MutatingAdmissionPolicyBinding)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *MutatingAdmissionPolicyBinding) 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 *MutatingAdmissionPolicyBindingList) DeepCopyInto(out *MutatingAdmissionPolicyBindingList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]MutatingAdmissionPolicyBinding, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingAdmissionPolicyBindingList.
+func (in *MutatingAdmissionPolicyBindingList) DeepCopy() *MutatingAdmissionPolicyBindingList {
+ if in == nil {
+ return nil
+ }
+ out := new(MutatingAdmissionPolicyBindingList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *MutatingAdmissionPolicyBindingList) 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 *MutatingAdmissionPolicyBindingSpec) DeepCopyInto(out *MutatingAdmissionPolicyBindingSpec) {
+ *out = *in
+ if in.ParamRef != nil {
+ in, out := &in.ParamRef, &out.ParamRef
+ *out = new(ParamRef)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.MatchResources != nil {
+ in, out := &in.MatchResources, &out.MatchResources
+ *out = new(MatchResources)
+ (*in).DeepCopyInto(*out)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingAdmissionPolicyBindingSpec.
+func (in *MutatingAdmissionPolicyBindingSpec) DeepCopy() *MutatingAdmissionPolicyBindingSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(MutatingAdmissionPolicyBindingSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *MutatingAdmissionPolicyList) DeepCopyInto(out *MutatingAdmissionPolicyList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]MutatingAdmissionPolicy, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingAdmissionPolicyList.
+func (in *MutatingAdmissionPolicyList) DeepCopy() *MutatingAdmissionPolicyList {
+ if in == nil {
+ return nil
+ }
+ out := new(MutatingAdmissionPolicyList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *MutatingAdmissionPolicyList) 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 *MutatingAdmissionPolicySpec) DeepCopyInto(out *MutatingAdmissionPolicySpec) {
+ *out = *in
+ if in.ParamKind != nil {
+ in, out := &in.ParamKind, &out.ParamKind
+ *out = new(ParamKind)
+ **out = **in
+ }
+ if in.MatchConstraints != nil {
+ in, out := &in.MatchConstraints, &out.MatchConstraints
+ *out = new(MatchResources)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.Variables != nil {
+ in, out := &in.Variables, &out.Variables
+ *out = make([]Variable, len(*in))
+ copy(*out, *in)
+ }
+ if in.Mutations != nil {
+ in, out := &in.Mutations, &out.Mutations
+ *out = make([]Mutation, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.FailurePolicy != nil {
+ in, out := &in.FailurePolicy, &out.FailurePolicy
+ *out = new(FailurePolicyType)
+ **out = **in
+ }
+ if in.MatchConditions != nil {
+ in, out := &in.MatchConditions, &out.MatchConditions
+ *out = make([]MatchCondition, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingAdmissionPolicySpec.
+func (in *MutatingAdmissionPolicySpec) DeepCopy() *MutatingAdmissionPolicySpec {
+ if in == nil {
+ return nil
+ }
+ out := new(MutatingAdmissionPolicySpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MutatingWebhook) DeepCopyInto(out *MutatingWebhook) {
*out = *in
@@ -168,7 +394,7 @@ func (in *MutatingWebhook) DeepCopyInto(out *MutatingWebhook) {
}
if in.ReinvocationPolicy != nil {
in, out := &in.ReinvocationPolicy, &out.ReinvocationPolicy
- *out = new(ReinvocationPolicyType)
+ *out = new(admissionregistrationv1.ReinvocationPolicyType)
**out = **in
}
if in.MatchConditions != nil {
@@ -255,6 +481,32 @@ func (in *MutatingWebhookConfigurationList) DeepCopyObject() runtime.Object {
return nil
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Mutation) DeepCopyInto(out *Mutation) {
+ *out = *in
+ if in.ApplyConfiguration != nil {
+ in, out := &in.ApplyConfiguration, &out.ApplyConfiguration
+ *out = new(ApplyConfiguration)
+ **out = **in
+ }
+ if in.JSONPatch != nil {
+ in, out := &in.JSONPatch, &out.JSONPatch
+ *out = new(JSONPatch)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Mutation.
+func (in *Mutation) DeepCopy() *Mutation {
+ if in == nil {
+ return nil
+ }
+ out := new(Mutation)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NamedRuleWithOperations) DeepCopyInto(out *NamedRuleWithOperations) {
*out = *in
diff --git a/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.prerelease-lifecycle.go b/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.prerelease-lifecycle.go
index c1be5122a879..4fc0596b345b 100644
--- a/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.prerelease-lifecycle.go
+++ b/hack/tools/vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.prerelease-lifecycle.go
@@ -25,6 +25,78 @@ import (
schema "k8s.io/apimachinery/pkg/runtime/schema"
)
+// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
+func (in *MutatingAdmissionPolicy) APILifecycleIntroduced() (major, minor int) {
+ return 1, 34
+}
+
+// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
+func (in *MutatingAdmissionPolicy) APILifecycleDeprecated() (major, minor int) {
+ return 1, 37
+}
+
+// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
+func (in *MutatingAdmissionPolicy) APILifecycleRemoved() (major, minor int) {
+ return 1, 40
+}
+
+// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
+func (in *MutatingAdmissionPolicyBinding) APILifecycleIntroduced() (major, minor int) {
+ return 1, 34
+}
+
+// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
+func (in *MutatingAdmissionPolicyBinding) APILifecycleDeprecated() (major, minor int) {
+ return 1, 37
+}
+
+// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
+func (in *MutatingAdmissionPolicyBinding) APILifecycleRemoved() (major, minor int) {
+ return 1, 40
+}
+
+// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
+func (in *MutatingAdmissionPolicyBindingList) APILifecycleIntroduced() (major, minor int) {
+ return 1, 34
+}
+
+// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
+func (in *MutatingAdmissionPolicyBindingList) APILifecycleDeprecated() (major, minor int) {
+ return 1, 37
+}
+
+// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
+func (in *MutatingAdmissionPolicyBindingList) APILifecycleRemoved() (major, minor int) {
+ return 1, 40
+}
+
+// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
+func (in *MutatingAdmissionPolicyList) APILifecycleIntroduced() (major, minor int) {
+ return 1, 34
+}
+
+// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
+func (in *MutatingAdmissionPolicyList) APILifecycleDeprecated() (major, minor int) {
+ return 1, 37
+}
+
+// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
+func (in *MutatingAdmissionPolicyList) APILifecycleRemoved() (major, minor int) {
+ return 1, 40
+}
+
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
func (in *MutatingWebhookConfiguration) APILifecycleIntroduced() (major, minor int) {
diff --git a/hack/tools/vendor/k8s.io/api/apps/v1/generated.proto b/hack/tools/vendor/k8s.io/api/apps/v1/generated.proto
index 38c8997e9940..5885a62225f6 100644
--- a/hack/tools/vendor/k8s.io/api/apps/v1/generated.proto
+++ b/hack/tools/vendor/k8s.io/api/apps/v1/generated.proto
@@ -530,7 +530,7 @@ message RollingUpdateDaemonSet {
// pod is available (Ready for at least minReadySeconds) the old DaemonSet pod
// on that node is marked deleted. If the old pod becomes unavailable for any
// reason (Ready transitions to false, is evicted, or is drained) an updated
- // pod is immediatedly created on that node without considering surge limits.
+ // pod is immediately created on that node without considering surge limits.
// Allowing surge implies the possibility that the resources consumed by the
// daemonset on any given node can double if the readiness check fails, and
// so resource intensive daemonsets should take into account that they may
diff --git a/hack/tools/vendor/k8s.io/api/apps/v1/types.go b/hack/tools/vendor/k8s.io/api/apps/v1/types.go
index 1362d875d886..4cf54cc99b60 100644
--- a/hack/tools/vendor/k8s.io/api/apps/v1/types.go
+++ b/hack/tools/vendor/k8s.io/api/apps/v1/types.go
@@ -635,7 +635,7 @@ type RollingUpdateDaemonSet struct {
// pod is available (Ready for at least minReadySeconds) the old DaemonSet pod
// on that node is marked deleted. If the old pod becomes unavailable for any
// reason (Ready transitions to false, is evicted, or is drained) an updated
- // pod is immediatedly created on that node without considering surge limits.
+ // pod is immediately created on that node without considering surge limits.
// Allowing surge implies the possibility that the resources consumed by the
// daemonset on any given node can double if the readiness check fails, and
// so resource intensive daemonsets should take into account that they may
diff --git a/hack/tools/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go b/hack/tools/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go
index f44ba7bc3324..ac54033fd6d1 100644
--- a/hack/tools/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go
+++ b/hack/tools/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go
@@ -265,7 +265,7 @@ func (ReplicaSetStatus) SwaggerDoc() map[string]string {
var map_RollingUpdateDaemonSet = map[string]string{
"": "Spec to control the desired behavior of daemon set rolling update.",
"maxUnavailable": "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.",
- "maxSurge": "The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption.",
+ "maxSurge": "The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediately created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption.",
}
func (RollingUpdateDaemonSet) SwaggerDoc() map[string]string {
diff --git a/hack/tools/vendor/k8s.io/api/apps/v1beta1/generated.proto b/hack/tools/vendor/k8s.io/api/apps/v1beta1/generated.proto
index 0601efc3c472..b61dc490dbde 100644
--- a/hack/tools/vendor/k8s.io/api/apps/v1beta1/generated.proto
+++ b/hack/tools/vendor/k8s.io/api/apps/v1beta1/generated.proto
@@ -316,6 +316,9 @@ message Scale {
message ScaleSpec {
// replicas is the number of observed instances of the scaled object.
// +optional
+ // +k8s:optional
+ // +default=0
+ // +k8s:minimum=0
optional int32 replicas = 1;
}
diff --git a/hack/tools/vendor/k8s.io/api/apps/v1beta1/types.go b/hack/tools/vendor/k8s.io/api/apps/v1beta1/types.go
index 5530c990daa3..cd140be12faa 100644
--- a/hack/tools/vendor/k8s.io/api/apps/v1beta1/types.go
+++ b/hack/tools/vendor/k8s.io/api/apps/v1beta1/types.go
@@ -33,6 +33,9 @@ const (
type ScaleSpec struct {
// replicas is the number of observed instances of the scaled object.
// +optional
+ // +k8s:optional
+ // +default=0
+ // +k8s:minimum=0
Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
}
@@ -60,6 +63,7 @@ type ScaleStatus struct {
// +k8s:prerelease-lifecycle-gen:deprecated=1.8
// +k8s:prerelease-lifecycle-gen:removed=1.16
// +k8s:prerelease-lifecycle-gen:replacement=autoscaling,v1,Scale
+// +k8s:isSubresource=/scale
// Scale represents a scaling request for a resource.
type Scale struct {
diff --git a/hack/tools/vendor/k8s.io/api/apps/v1beta2/generated.proto b/hack/tools/vendor/k8s.io/api/apps/v1beta2/generated.proto
index 68c463e25705..37c6d5ae1bf7 100644
--- a/hack/tools/vendor/k8s.io/api/apps/v1beta2/generated.proto
+++ b/hack/tools/vendor/k8s.io/api/apps/v1beta2/generated.proto
@@ -536,7 +536,7 @@ message RollingUpdateDaemonSet {
// pod is available (Ready for at least minReadySeconds) the old DaemonSet pod
// on that node is marked deleted. If the old pod becomes unavailable for any
// reason (Ready transitions to false, is evicted, or is drained) an updated
- // pod is immediatedly created on that node without considering surge limits.
+ // pod is immediately created on that node without considering surge limits.
// Allowing surge implies the possibility that the resources consumed by the
// daemonset on any given node can double if the readiness check fails, and
// so resource intensive daemonsets should take into account that they may
@@ -614,6 +614,9 @@ message Scale {
message ScaleSpec {
// desired number of instances for the scaled object.
// +optional
+ // +k8s:optional
+ // +default=0
+ // +k8s:minimum=0
optional int32 replicas = 1;
}
diff --git a/hack/tools/vendor/k8s.io/api/apps/v1beta2/types.go b/hack/tools/vendor/k8s.io/api/apps/v1beta2/types.go
index 491afc59f5bc..e9dc85df0556 100644
--- a/hack/tools/vendor/k8s.io/api/apps/v1beta2/types.go
+++ b/hack/tools/vendor/k8s.io/api/apps/v1beta2/types.go
@@ -35,6 +35,9 @@ const (
type ScaleSpec struct {
// desired number of instances for the scaled object.
// +optional
+ // +k8s:optional
+ // +default=0
+ // +k8s:minimum=0
Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
}
@@ -63,6 +66,7 @@ type ScaleStatus struct {
// +k8s:prerelease-lifecycle-gen:deprecated=1.9
// +k8s:prerelease-lifecycle-gen:removed=1.16
// +k8s:prerelease-lifecycle-gen:replacement=autoscaling,v1,Scale
+// +k8s:isSubresource=/scale
// Scale represents a scaling request for a resource.
type Scale struct {
@@ -681,7 +685,7 @@ type RollingUpdateDaemonSet struct {
// pod is available (Ready for at least minReadySeconds) the old DaemonSet pod
// on that node is marked deleted. If the old pod becomes unavailable for any
// reason (Ready transitions to false, is evicted, or is drained) an updated
- // pod is immediatedly created on that node without considering surge limits.
+ // pod is immediately created on that node without considering surge limits.
// Allowing surge implies the possibility that the resources consumed by the
// daemonset on any given node can double if the readiness check fails, and
// so resource intensive daemonsets should take into account that they may
diff --git a/hack/tools/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go b/hack/tools/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go
index 408943415100..34d80af58d76 100644
--- a/hack/tools/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go
+++ b/hack/tools/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go
@@ -265,7 +265,7 @@ func (ReplicaSetStatus) SwaggerDoc() map[string]string {
var map_RollingUpdateDaemonSet = map[string]string{
"": "Spec to control the desired behavior of daemon set rolling update.",
"maxUnavailable": "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.",
- "maxSurge": "The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption.",
+ "maxSurge": "The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediately created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption.",
}
func (RollingUpdateDaemonSet) SwaggerDoc() map[string]string {
diff --git a/hack/tools/vendor/k8s.io/api/authorization/v1/generated.proto b/hack/tools/vendor/k8s.io/api/authorization/v1/generated.proto
index 37b05b8552ff..ff529c969e4a 100644
--- a/hack/tools/vendor/k8s.io/api/authorization/v1/generated.proto
+++ b/hack/tools/vendor/k8s.io/api/authorization/v1/generated.proto
@@ -167,16 +167,10 @@ message ResourceAttributes {
optional string name = 7;
// fieldSelector describes the limitation on access based on field. It can only limit access, not broaden it.
- //
- // This field is alpha-level. To use this field, you must enable the
- // `AuthorizeWithSelectors` feature gate (disabled by default).
// +optional
optional FieldSelectorAttributes fieldSelector = 8;
// labelSelector describes the limitation on access based on labels. It can only limit access, not broaden it.
- //
- // This field is alpha-level. To use this field, you must enable the
- // `AuthorizeWithSelectors` feature gate (disabled by default).
// +optional
optional LabelSelectorAttributes labelSelector = 9;
}
diff --git a/hack/tools/vendor/k8s.io/api/authorization/v1/types.go b/hack/tools/vendor/k8s.io/api/authorization/v1/types.go
index 36f5fa410782..251e776b024b 100644
--- a/hack/tools/vendor/k8s.io/api/authorization/v1/types.go
+++ b/hack/tools/vendor/k8s.io/api/authorization/v1/types.go
@@ -119,15 +119,9 @@ type ResourceAttributes struct {
// +optional
Name string `json:"name,omitempty" protobuf:"bytes,7,opt,name=name"`
// fieldSelector describes the limitation on access based on field. It can only limit access, not broaden it.
- //
- // This field is alpha-level. To use this field, you must enable the
- // `AuthorizeWithSelectors` feature gate (disabled by default).
// +optional
FieldSelector *FieldSelectorAttributes `json:"fieldSelector,omitempty" protobuf:"bytes,8,opt,name=fieldSelector"`
// labelSelector describes the limitation on access based on labels. It can only limit access, not broaden it.
- //
- // This field is alpha-level. To use this field, you must enable the
- // `AuthorizeWithSelectors` feature gate (disabled by default).
// +optional
LabelSelector *LabelSelectorAttributes `json:"labelSelector,omitempty" protobuf:"bytes,9,opt,name=labelSelector"`
}
diff --git a/hack/tools/vendor/k8s.io/api/authorization/v1/types_swagger_doc_generated.go b/hack/tools/vendor/k8s.io/api/authorization/v1/types_swagger_doc_generated.go
index dc6b8a89ecde..29d0aa8463d2 100644
--- a/hack/tools/vendor/k8s.io/api/authorization/v1/types_swagger_doc_generated.go
+++ b/hack/tools/vendor/k8s.io/api/authorization/v1/types_swagger_doc_generated.go
@@ -87,8 +87,8 @@ var map_ResourceAttributes = map[string]string{
"resource": "Resource is one of the existing resource types. \"*\" means all.",
"subresource": "Subresource is one of the existing resource types. \"\" means none.",
"name": "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.",
- "fieldSelector": "fieldSelector describes the limitation on access based on field. It can only limit access, not broaden it.\n\nThis field is alpha-level. To use this field, you must enable the `AuthorizeWithSelectors` feature gate (disabled by default).",
- "labelSelector": "labelSelector describes the limitation on access based on labels. It can only limit access, not broaden it.\n\nThis field is alpha-level. To use this field, you must enable the `AuthorizeWithSelectors` feature gate (disabled by default).",
+ "fieldSelector": "fieldSelector describes the limitation on access based on field. It can only limit access, not broaden it.",
+ "labelSelector": "labelSelector describes the limitation on access based on labels. It can only limit access, not broaden it.",
}
func (ResourceAttributes) SwaggerDoc() map[string]string {
diff --git a/hack/tools/vendor/k8s.io/api/autoscaling/v1/generated.proto b/hack/tools/vendor/k8s.io/api/autoscaling/v1/generated.proto
index 68c35b6b22b6..a17d7989db52 100644
--- a/hack/tools/vendor/k8s.io/api/autoscaling/v1/generated.proto
+++ b/hack/tools/vendor/k8s.io/api/autoscaling/v1/generated.proto
@@ -472,6 +472,9 @@ message Scale {
message ScaleSpec {
// replicas is the desired number of instances for the scaled object.
// +optional
+ // +k8s:optional
+ // +default=0
+ // +k8s:minimum=0
optional int32 replicas = 1;
}
diff --git a/hack/tools/vendor/k8s.io/api/autoscaling/v1/types.go b/hack/tools/vendor/k8s.io/api/autoscaling/v1/types.go
index 85c609e5c777..e1e8809fe9ff 100644
--- a/hack/tools/vendor/k8s.io/api/autoscaling/v1/types.go
+++ b/hack/tools/vendor/k8s.io/api/autoscaling/v1/types.go
@@ -117,6 +117,7 @@ type HorizontalPodAutoscalerList struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +k8s:prerelease-lifecycle-gen:introduced=1.2
+// +k8s:isSubresource=/scale
// Scale represents a scaling request for a resource.
type Scale struct {
@@ -138,6 +139,9 @@ type Scale struct {
type ScaleSpec struct {
// replicas is the desired number of instances for the scaled object.
// +optional
+ // +k8s:optional
+ // +default=0
+ // +k8s:minimum=0
Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
}
diff --git a/hack/tools/vendor/k8s.io/api/batch/v1/generated.proto b/hack/tools/vendor/k8s.io/api/batch/v1/generated.proto
index d3aeae0adb4b..c0ce8cef26cb 100644
--- a/hack/tools/vendor/k8s.io/api/batch/v1/generated.proto
+++ b/hack/tools/vendor/k8s.io/api/batch/v1/generated.proto
@@ -226,7 +226,8 @@ message JobSpec {
optional SuccessPolicy successPolicy = 16;
// Specifies the number of retries before marking this job failed.
- // Defaults to 6
+ // Defaults to 6, unless backoffLimitPerIndex (only Indexed Job) is specified.
+ // When backoffLimitPerIndex is specified, backoffLimit defaults to 2147483647.
// +optional
optional int32 backoffLimit = 7;
@@ -329,8 +330,6 @@ message JobSpec {
//
// When using podFailurePolicy, Failed is the the only allowed value.
// TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use.
- // This is an beta field. To use this, enable the JobPodReplacementPolicy feature toggle.
- // This is on by default.
// +optional
optional string podReplacementPolicy = 14;
@@ -570,7 +569,7 @@ message PodFailurePolicyRule {
message SuccessPolicy {
// rules represents the list of alternative rules for the declaring the Jobs
// as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met,
- // the "SucceededCriteriaMet" condition is added, and the lingering pods are removed.
+ // the "SuccessCriteriaMet" condition is added, and the lingering pods are removed.
// The terminal state for such a Job has the "Complete" condition.
// Additionally, these rules are evaluated in order; Once the Job meets one of the rules,
// other rules are ignored. At most 20 elements are allowed.
diff --git a/hack/tools/vendor/k8s.io/api/batch/v1/types.go b/hack/tools/vendor/k8s.io/api/batch/v1/types.go
index 6c0007c21e43..9183c073d2ae 100644
--- a/hack/tools/vendor/k8s.io/api/batch/v1/types.go
+++ b/hack/tools/vendor/k8s.io/api/batch/v1/types.go
@@ -257,7 +257,7 @@ type PodFailurePolicy struct {
type SuccessPolicy struct {
// rules represents the list of alternative rules for the declaring the Jobs
// as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met,
- // the "SucceededCriteriaMet" condition is added, and the lingering pods are removed.
+ // the "SuccessCriteriaMet" condition is added, and the lingering pods are removed.
// The terminal state for such a Job has the "Complete" condition.
// Additionally, these rules are evaluated in order; Once the Job meets one of the rules,
// other rules are ignored. At most 20 elements are allowed.
@@ -347,7 +347,8 @@ type JobSpec struct {
SuccessPolicy *SuccessPolicy `json:"successPolicy,omitempty" protobuf:"bytes,16,opt,name=successPolicy"`
// Specifies the number of retries before marking this job failed.
- // Defaults to 6
+ // Defaults to 6, unless backoffLimitPerIndex (only Indexed Job) is specified.
+ // When backoffLimitPerIndex is specified, backoffLimit defaults to 2147483647.
// +optional
BackoffLimit *int32 `json:"backoffLimit,omitempty" protobuf:"varint,7,opt,name=backoffLimit"`
@@ -455,8 +456,6 @@ type JobSpec struct {
//
// When using podFailurePolicy, Failed is the the only allowed value.
// TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use.
- // This is an beta field. To use this, enable the JobPodReplacementPolicy feature toggle.
- // This is on by default.
// +optional
PodReplacementPolicy *PodReplacementPolicy `json:"podReplacementPolicy,omitempty" protobuf:"bytes,14,opt,name=podReplacementPolicy,casttype=podReplacementPolicy"`
diff --git a/hack/tools/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go b/hack/tools/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go
index ffd4e4f5fea4..451f4609f2d8 100644
--- a/hack/tools/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go
+++ b/hack/tools/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go
@@ -117,7 +117,7 @@ var map_JobSpec = map[string]string{
"activeDeadlineSeconds": "Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again.",
"podFailurePolicy": "Specifies the policy of handling failed pods. In particular, it allows to specify the set of actions and conditions which need to be satisfied to take the associated action. If empty, the default behaviour applies - the counter of failed pods, represented by the jobs's .status.failed field, is incremented and it is checked against the backoffLimit. This field cannot be used in combination with restartPolicy=OnFailure.",
"successPolicy": "successPolicy specifies the policy when the Job can be declared as succeeded. If empty, the default behavior applies - the Job is declared as succeeded only when the number of succeeded pods equals to the completions. When the field is specified, it must be immutable and works only for the Indexed Jobs. Once the Job meets the SuccessPolicy, the lingering pods are terminated.",
- "backoffLimit": "Specifies the number of retries before marking this job failed. Defaults to 6",
+ "backoffLimit": "Specifies the number of retries before marking this job failed. Defaults to 6, unless backoffLimitPerIndex (only Indexed Job) is specified. When backoffLimitPerIndex is specified, backoffLimit defaults to 2147483647.",
"backoffLimitPerIndex": "Specifies the limit for the number of retries within an index before marking this index as failed. When enabled the number of failures per index is kept in the pod's batch.kubernetes.io/job-index-failure-count annotation. It can only be set when Job's completionMode=Indexed, and the Pod's restart policy is Never. The field is immutable.",
"maxFailedIndexes": "Specifies the maximal number of failed indexes before marking the Job as failed, when backoffLimitPerIndex is set. Once the number of failed indexes exceeds this number the entire Job is marked as Failed and its execution is terminated. When left as null the job continues execution of all of its indexes and is marked with the `Complete` Job condition. It can only be specified when backoffLimitPerIndex is set. It can be null or up to completions. It is required and must be less than or equal to 10^4 when is completions greater than 10^5.",
"selector": "A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
@@ -126,7 +126,7 @@ var map_JobSpec = map[string]string{
"ttlSecondsAfterFinished": "ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes.",
"completionMode": "completionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`.\n\n`NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other.\n\n`Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. In addition, The Pod name takes the form `$(job-name)-$(index)-$(random-string)`, the Pod hostname takes the form `$(job-name)-$(index)`.\n\nMore completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, which is possible during upgrades due to version skew, the controller skips updates for the Job.",
"suspend": "suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. Defaults to false.",
- "podReplacementPolicy": "podReplacementPolicy specifies when to create replacement Pods. Possible values are: - TerminatingOrFailed means that we recreate pods\n when they are terminating (has a metadata.deletionTimestamp) or failed.\n- Failed means to wait until a previously created Pod is fully terminated (has phase\n Failed or Succeeded) before creating a replacement Pod.\n\nWhen using podFailurePolicy, Failed is the the only allowed value. TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use. This is an beta field. To use this, enable the JobPodReplacementPolicy feature toggle. This is on by default.",
+ "podReplacementPolicy": "podReplacementPolicy specifies when to create replacement Pods. Possible values are: - TerminatingOrFailed means that we recreate pods\n when they are terminating (has a metadata.deletionTimestamp) or failed.\n- Failed means to wait until a previously created Pod is fully terminated (has phase\n Failed or Succeeded) before creating a replacement Pod.\n\nWhen using podFailurePolicy, Failed is the the only allowed value. TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use.",
"managedBy": "ManagedBy field indicates the controller that manages a Job. The k8s Job controller reconciles jobs which don't have this field at all or the field value is the reserved string `kubernetes.io/job-controller`, but skips reconciling Jobs with a custom value for this field. The value must be a valid domain-prefixed path (e.g. acme.io/foo) - all characters before the first \"/\" must be a valid subdomain as defined by RFC 1123. All characters trailing the first \"/\" must be valid HTTP Path characters as defined by RFC 3986. The value cannot exceed 63 characters. This field is immutable.\n\nThis field is beta-level. The job controller accepts setting the field when the feature gate JobManagedBy is enabled (enabled by default).",
}
@@ -206,7 +206,7 @@ func (PodFailurePolicyRule) SwaggerDoc() map[string]string {
var map_SuccessPolicy = map[string]string{
"": "SuccessPolicy describes when a Job can be declared as succeeded based on the success of some indexes.",
- "rules": "rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, the \"SucceededCriteriaMet\" condition is added, and the lingering pods are removed. The terminal state for such a Job has the \"Complete\" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed.",
+ "rules": "rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, the \"SuccessCriteriaMet\" condition is added, and the lingering pods are removed. The terminal state for such a Job has the \"Complete\" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed.",
}
func (SuccessPolicy) SwaggerDoc() map[string]string {
diff --git a/hack/tools/vendor/k8s.io/api/certificates/v1/generated.proto b/hack/tools/vendor/k8s.io/api/certificates/v1/generated.proto
index dac7c7f5f229..24528fc8bc21 100644
--- a/hack/tools/vendor/k8s.io/api/certificates/v1/generated.proto
+++ b/hack/tools/vendor/k8s.io/api/certificates/v1/generated.proto
@@ -39,6 +39,8 @@ option go_package = "k8s.io/api/certificates/v1";
// This API can be used to request client certificates to authenticate to kube-apiserver
// (with the "kubernetes.io/kube-apiserver-client" signerName),
// or to obtain certificates from custom non-Kubernetes signers.
+// +k8s:supportsSubresource=/status
+// +k8s:supportsSubresource=/approval
message CertificateSigningRequest {
// +optional
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
@@ -203,6 +205,11 @@ message CertificateSigningRequestStatus {
// +listType=map
// +listMapKey=type
// +optional
+ // +k8s:listType=map
+ // +k8s:listMapKey=type
+ // +k8s:optional
+ // +k8s:item(type: "Approved")=+k8s:zeroOrOneOfMember
+ // +k8s:item(type: "Denied")=+k8s:zeroOrOneOfMember
repeated CertificateSigningRequestCondition conditions = 1;
// certificate is populated with an issued certificate by the signer after an Approved condition is present.
diff --git a/hack/tools/vendor/k8s.io/api/certificates/v1/types.go b/hack/tools/vendor/k8s.io/api/certificates/v1/types.go
index ba8009840d82..71203e80d55c 100644
--- a/hack/tools/vendor/k8s.io/api/certificates/v1/types.go
+++ b/hack/tools/vendor/k8s.io/api/certificates/v1/types.go
@@ -39,6 +39,8 @@ import (
// This API can be used to request client certificates to authenticate to kube-apiserver
// (with the "kubernetes.io/kube-apiserver-client" signerName),
// or to obtain certificates from custom non-Kubernetes signers.
+// +k8s:supportsSubresource=/status
+// +k8s:supportsSubresource=/approval
type CertificateSigningRequest struct {
metav1.TypeMeta `json:",inline"`
// +optional
@@ -178,6 +180,11 @@ type CertificateSigningRequestStatus struct {
// +listType=map
// +listMapKey=type
// +optional
+ // +k8s:listType=map
+ // +k8s:listMapKey=type
+ // +k8s:optional
+ // +k8s:item(type: "Approved")=+k8s:zeroOrOneOfMember
+ // +k8s:item(type: "Denied")=+k8s:zeroOrOneOfMember
Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"`
// certificate is populated with an issued certificate by the signer after an Approved condition is present.
diff --git a/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/generated.pb.go b/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/generated.pb.go
index a62a40059639..c260f0436dad 100644
--- a/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/generated.pb.go
+++ b/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/generated.pb.go
@@ -25,11 +25,14 @@ import (
io "io"
proto "github.com/gogo/protobuf/proto"
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
math "math"
math_bits "math/bits"
reflect "reflect"
strings "strings"
+
+ k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types"
)
// Reference imports to suppress errors if they are not otherwise used.
@@ -127,10 +130,126 @@ func (m *ClusterTrustBundleSpec) XXX_DiscardUnknown() {
var xxx_messageInfo_ClusterTrustBundleSpec proto.InternalMessageInfo
+func (m *PodCertificateRequest) Reset() { *m = PodCertificateRequest{} }
+func (*PodCertificateRequest) ProtoMessage() {}
+func (*PodCertificateRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f73d5fe56c015bb8, []int{3}
+}
+func (m *PodCertificateRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *PodCertificateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *PodCertificateRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PodCertificateRequest.Merge(m, src)
+}
+func (m *PodCertificateRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *PodCertificateRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_PodCertificateRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PodCertificateRequest proto.InternalMessageInfo
+
+func (m *PodCertificateRequestList) Reset() { *m = PodCertificateRequestList{} }
+func (*PodCertificateRequestList) ProtoMessage() {}
+func (*PodCertificateRequestList) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f73d5fe56c015bb8, []int{4}
+}
+func (m *PodCertificateRequestList) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *PodCertificateRequestList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *PodCertificateRequestList) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PodCertificateRequestList.Merge(m, src)
+}
+func (m *PodCertificateRequestList) XXX_Size() int {
+ return m.Size()
+}
+func (m *PodCertificateRequestList) XXX_DiscardUnknown() {
+ xxx_messageInfo_PodCertificateRequestList.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PodCertificateRequestList proto.InternalMessageInfo
+
+func (m *PodCertificateRequestSpec) Reset() { *m = PodCertificateRequestSpec{} }
+func (*PodCertificateRequestSpec) ProtoMessage() {}
+func (*PodCertificateRequestSpec) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f73d5fe56c015bb8, []int{5}
+}
+func (m *PodCertificateRequestSpec) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *PodCertificateRequestSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *PodCertificateRequestSpec) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PodCertificateRequestSpec.Merge(m, src)
+}
+func (m *PodCertificateRequestSpec) XXX_Size() int {
+ return m.Size()
+}
+func (m *PodCertificateRequestSpec) XXX_DiscardUnknown() {
+ xxx_messageInfo_PodCertificateRequestSpec.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PodCertificateRequestSpec proto.InternalMessageInfo
+
+func (m *PodCertificateRequestStatus) Reset() { *m = PodCertificateRequestStatus{} }
+func (*PodCertificateRequestStatus) ProtoMessage() {}
+func (*PodCertificateRequestStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f73d5fe56c015bb8, []int{6}
+}
+func (m *PodCertificateRequestStatus) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *PodCertificateRequestStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *PodCertificateRequestStatus) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PodCertificateRequestStatus.Merge(m, src)
+}
+func (m *PodCertificateRequestStatus) XXX_Size() int {
+ return m.Size()
+}
+func (m *PodCertificateRequestStatus) XXX_DiscardUnknown() {
+ xxx_messageInfo_PodCertificateRequestStatus.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PodCertificateRequestStatus proto.InternalMessageInfo
+
func init() {
proto.RegisterType((*ClusterTrustBundle)(nil), "k8s.io.api.certificates.v1alpha1.ClusterTrustBundle")
proto.RegisterType((*ClusterTrustBundleList)(nil), "k8s.io.api.certificates.v1alpha1.ClusterTrustBundleList")
proto.RegisterType((*ClusterTrustBundleSpec)(nil), "k8s.io.api.certificates.v1alpha1.ClusterTrustBundleSpec")
+ proto.RegisterType((*PodCertificateRequest)(nil), "k8s.io.api.certificates.v1alpha1.PodCertificateRequest")
+ proto.RegisterType((*PodCertificateRequestList)(nil), "k8s.io.api.certificates.v1alpha1.PodCertificateRequestList")
+ proto.RegisterType((*PodCertificateRequestSpec)(nil), "k8s.io.api.certificates.v1alpha1.PodCertificateRequestSpec")
+ proto.RegisterType((*PodCertificateRequestStatus)(nil), "k8s.io.api.certificates.v1alpha1.PodCertificateRequestStatus")
}
func init() {
@@ -138,35 +257,65 @@ func init() {
}
var fileDescriptor_f73d5fe56c015bb8 = []byte{
- // 437 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xcf, 0x6a, 0xdb, 0x40,
- 0x10, 0xc6, 0xb5, 0x69, 0x02, 0xc9, 0xba, 0x85, 0xa2, 0x42, 0x31, 0x3e, 0x6c, 0x8c, 0x4f, 0xb9,
- 0x74, 0x37, 0x36, 0x69, 0xc9, 0x59, 0x85, 0x42, 0xa1, 0x7f, 0x40, 0xe9, 0xa5, 0xa1, 0x87, 0xae,
- 0xd7, 0x13, 0x79, 0x6b, 0x4b, 0x5a, 0x76, 0x57, 0x86, 0xde, 0x0a, 0x7d, 0x81, 0x3e, 0x96, 0x8f,
- 0x69, 0x4f, 0x39, 0x85, 0x5a, 0x7d, 0x91, 0xb2, 0x6b, 0xd9, 0x12, 0x55, 0x8b, 0x4b, 0x6e, 0x9a,
- 0xd1, 0xfc, 0xbe, 0x6f, 0xbe, 0x11, 0xc2, 0xa7, 0xb3, 0x73, 0x43, 0x65, 0xce, 0xb8, 0x92, 0x4c,
- 0x80, 0xb6, 0xf2, 0x4a, 0x0a, 0x6e, 0xc1, 0xb0, 0xc5, 0x90, 0xcf, 0xd5, 0x94, 0x0f, 0x59, 0x02,
- 0x19, 0x68, 0x6e, 0x61, 0x42, 0x95, 0xce, 0x6d, 0x1e, 0xf6, 0xd7, 0x04, 0xe5, 0x4a, 0xd2, 0x26,
- 0x41, 0x37, 0x44, 0xef, 0x49, 0x22, 0xed, 0xb4, 0x18, 0x53, 0x91, 0xa7, 0x2c, 0xc9, 0x93, 0x9c,
- 0x79, 0x70, 0x5c, 0x5c, 0xf9, 0xca, 0x17, 0xfe, 0x69, 0x2d, 0xd8, 0x3b, 0xab, 0x57, 0x48, 0xb9,
- 0x98, 0xca, 0x0c, 0xf4, 0x67, 0xa6, 0x66, 0x89, 0x6b, 0x18, 0x96, 0x82, 0xe5, 0x6c, 0xd1, 0x5a,
- 0xa3, 0xc7, 0xfe, 0x45, 0xe9, 0x22, 0xb3, 0x32, 0x85, 0x16, 0xf0, 0x6c, 0x17, 0x60, 0xc4, 0x14,
- 0x52, 0xfe, 0x27, 0x37, 0xf8, 0x81, 0x70, 0xf8, 0x7c, 0x5e, 0x18, 0x0b, 0xfa, 0x9d, 0x2e, 0x8c,
- 0x8d, 0x8a, 0x6c, 0x32, 0x87, 0xf0, 0x23, 0x3e, 0x74, 0xab, 0x4d, 0xb8, 0xe5, 0x5d, 0xd4, 0x47,
- 0x27, 0x9d, 0xd1, 0x29, 0xad, 0x2f, 0xb3, 0x75, 0xa0, 0x6a, 0x96, 0xb8, 0x86, 0xa1, 0x6e, 0x9a,
- 0x2e, 0x86, 0xf4, 0xed, 0xf8, 0x13, 0x08, 0xfb, 0x1a, 0x2c, 0x8f, 0xc2, 0xe5, 0xed, 0x71, 0x50,
- 0xde, 0x1e, 0xe3, 0xba, 0x17, 0x6f, 0x55, 0xc3, 0x4b, 0xbc, 0x6f, 0x14, 0x88, 0xee, 0x9e, 0x57,
- 0x3f, 0xa7, 0xbb, 0xee, 0x4e, 0xdb, 0x5b, 0x5e, 0x28, 0x10, 0xd1, 0xfd, 0xca, 0x65, 0xdf, 0x55,
- 0xb1, 0xd7, 0x1c, 0x7c, 0x47, 0xf8, 0x71, 0x7b, 0xfc, 0x95, 0x34, 0x36, 0xfc, 0xd0, 0x0a, 0x46,
- 0xff, 0x2f, 0x98, 0xa3, 0x7d, 0xac, 0x87, 0x95, 0xe1, 0xe1, 0xa6, 0xd3, 0x08, 0xf5, 0x1e, 0x1f,
- 0x48, 0x0b, 0xa9, 0xe9, 0xee, 0xf5, 0xef, 0x9d, 0x74, 0x46, 0x67, 0x77, 0x49, 0x15, 0x3d, 0xa8,
- 0x0c, 0x0e, 0x5e, 0x3a, 0xa9, 0x78, 0xad, 0x38, 0xf8, 0xfa, 0xd7, 0x4c, 0x2e, 0x74, 0x38, 0xc2,
- 0xd8, 0xc8, 0x24, 0x03, 0xfd, 0x86, 0xa7, 0xe0, 0x53, 0x1d, 0xd5, 0xc7, 0xbf, 0xd8, 0xbe, 0x89,
- 0x1b, 0x53, 0xe1, 0x53, 0xdc, 0xb1, 0xb5, 0x8c, 0xff, 0x0a, 0x47, 0xd1, 0xa3, 0x0a, 0xea, 0x34,
- 0x1c, 0xe2, 0xe6, 0x5c, 0xf4, 0x62, 0xb9, 0x22, 0xc1, 0xf5, 0x8a, 0x04, 0x37, 0x2b, 0x12, 0x7c,
- 0x29, 0x09, 0x5a, 0x96, 0x04, 0x5d, 0x97, 0x04, 0xdd, 0x94, 0x04, 0xfd, 0x2c, 0x09, 0xfa, 0xf6,
- 0x8b, 0x04, 0x97, 0xfd, 0x5d, 0xbf, 0xdd, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x1c, 0xcb,
- 0xdd, 0x99, 0x03, 0x00, 0x00,
+ // 918 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0xcf, 0x6f, 0xe3, 0x44,
+ 0x14, 0xc7, 0xe3, 0xb6, 0x69, 0x9b, 0x49, 0x5b, 0xda, 0x61, 0x17, 0x99, 0x22, 0x39, 0x21, 0x07,
+ 0x54, 0x90, 0xb0, 0xb7, 0xa5, 0xb0, 0x2b, 0x10, 0x48, 0x75, 0x0a, 0x52, 0xe9, 0x6e, 0x36, 0x9a,
+ 0x74, 0xf9, 0xb1, 0x5a, 0x24, 0x1c, 0xe7, 0x25, 0x19, 0x1a, 0x7b, 0x8c, 0x67, 0x5c, 0xb5, 0x37,
+ 0x24, 0xfe, 0x01, 0xfe, 0x23, 0xae, 0x3d, 0x2e, 0x5c, 0xd8, 0x53, 0xa0, 0xe6, 0x6f, 0xe0, 0xb2,
+ 0x27, 0xe4, 0xb1, 0x9d, 0x5f, 0x4e, 0xb6, 0xd9, 0x1e, 0x7a, 0xcb, 0xbc, 0x79, 0xdf, 0xcf, 0xfb,
+ 0xbe, 0x99, 0x37, 0x56, 0xd0, 0xbd, 0xd3, 0x07, 0x5c, 0xa7, 0xcc, 0xb0, 0x3c, 0x6a, 0xd8, 0xe0,
+ 0x0b, 0xda, 0xa6, 0xb6, 0x25, 0x80, 0x1b, 0x67, 0xbb, 0x56, 0xcf, 0xeb, 0x5a, 0xbb, 0x46, 0x07,
+ 0x5c, 0xf0, 0x2d, 0x01, 0x2d, 0xdd, 0xf3, 0x99, 0x60, 0xb8, 0x1c, 0x2b, 0x74, 0xcb, 0xa3, 0xfa,
+ 0xa8, 0x42, 0x4f, 0x15, 0xdb, 0x1f, 0x76, 0xa8, 0xe8, 0x06, 0x4d, 0xdd, 0x66, 0x8e, 0xd1, 0x61,
+ 0x1d, 0x66, 0x48, 0x61, 0x33, 0x68, 0xcb, 0x95, 0x5c, 0xc8, 0x5f, 0x31, 0x70, 0x7b, 0x7f, 0x68,
+ 0xc1, 0xb1, 0xec, 0x2e, 0x75, 0xc1, 0xbf, 0x30, 0xbc, 0xd3, 0x4e, 0x14, 0xe0, 0x86, 0x03, 0xc2,
+ 0x32, 0xce, 0x32, 0x36, 0xb6, 0x8d, 0x59, 0x2a, 0x3f, 0x70, 0x05, 0x75, 0x20, 0x23, 0xf8, 0xe4,
+ 0x3a, 0x01, 0xb7, 0xbb, 0xe0, 0x58, 0x93, 0xba, 0xca, 0x9f, 0x0a, 0xc2, 0xd5, 0x5e, 0xc0, 0x05,
+ 0xf8, 0x27, 0x7e, 0xc0, 0x85, 0x19, 0xb8, 0xad, 0x1e, 0xe0, 0x1f, 0xd1, 0x6a, 0x64, 0xad, 0x65,
+ 0x09, 0x4b, 0x55, 0xca, 0xca, 0x4e, 0x71, 0xef, 0x9e, 0x3e, 0x3c, 0x99, 0x41, 0x05, 0xdd, 0x3b,
+ 0xed, 0x44, 0x01, 0xae, 0x47, 0xd9, 0xfa, 0xd9, 0xae, 0xfe, 0xb8, 0xf9, 0x13, 0xd8, 0xe2, 0x11,
+ 0x08, 0xcb, 0xc4, 0x97, 0xfd, 0x52, 0x2e, 0xec, 0x97, 0xd0, 0x30, 0x46, 0x06, 0x54, 0xfc, 0x14,
+ 0x2d, 0x71, 0x0f, 0x6c, 0x75, 0x41, 0xd2, 0x1f, 0xe8, 0xd7, 0x9d, 0xbb, 0x9e, 0x75, 0xd9, 0xf0,
+ 0xc0, 0x36, 0xd7, 0x92, 0x2a, 0x4b, 0xd1, 0x8a, 0x48, 0x66, 0xe5, 0x0f, 0x05, 0xbd, 0x95, 0x4d,
+ 0x7f, 0x48, 0xb9, 0xc0, 0xcf, 0x32, 0x8d, 0xe9, 0xf3, 0x35, 0x16, 0xa9, 0x65, 0x5b, 0x9b, 0x49,
+ 0xc1, 0xd5, 0x34, 0x32, 0xd2, 0xd4, 0xf7, 0x28, 0x4f, 0x05, 0x38, 0x5c, 0x5d, 0x28, 0x2f, 0xee,
+ 0x14, 0xf7, 0xf6, 0x6f, 0xd2, 0x95, 0xb9, 0x9e, 0x14, 0xc8, 0x1f, 0x45, 0x28, 0x12, 0x13, 0x2b,
+ 0xbf, 0x4e, 0xed, 0x29, 0x6a, 0x1a, 0xef, 0x21, 0xc4, 0x69, 0xc7, 0x05, 0xbf, 0x66, 0x39, 0x20,
+ 0xbb, 0x2a, 0x0c, 0x0f, 0xbf, 0x31, 0xd8, 0x21, 0x23, 0x59, 0xf8, 0x63, 0x54, 0x14, 0x43, 0x8c,
+ 0xbc, 0x85, 0x82, 0xf9, 0x66, 0x22, 0x2a, 0x8e, 0x54, 0x20, 0xa3, 0x79, 0x95, 0xdf, 0x17, 0xd0,
+ 0xdd, 0x3a, 0x6b, 0x55, 0x87, 0xbd, 0x10, 0xf8, 0x39, 0x00, 0x2e, 0x6e, 0x61, 0x62, 0x7e, 0x18,
+ 0x9b, 0x98, 0xcf, 0xae, 0x3f, 0xdb, 0xa9, 0x46, 0x67, 0x0d, 0x0d, 0x06, 0xb4, 0xcc, 0x85, 0x25,
+ 0x02, 0xae, 0x2e, 0xca, 0x02, 0x9f, 0xdf, 0xb4, 0x80, 0x84, 0x98, 0x1b, 0x49, 0x89, 0xe5, 0x78,
+ 0x4d, 0x12, 0x78, 0xe5, 0x2f, 0x05, 0xbd, 0x3d, 0x55, 0x77, 0x0b, 0xe3, 0xf9, 0x6c, 0x7c, 0x3c,
+ 0xef, 0xdf, 0xb0, 0xc3, 0x19, 0x13, 0xfa, 0x5f, 0x7e, 0x46, 0x67, 0x37, 0x1e, 0xd2, 0xf7, 0xd1,
+ 0x8a, 0xc7, 0x5a, 0x52, 0x10, 0x0f, 0xe8, 0x1b, 0x89, 0x60, 0xa5, 0x1e, 0x87, 0x49, 0xba, 0x8f,
+ 0x8f, 0xd1, 0xb2, 0xc7, 0x5a, 0x4f, 0x8e, 0x0e, 0xe5, 0xed, 0x15, 0xcc, 0x8f, 0xd2, 0xe3, 0xaf,
+ 0xcb, 0xe8, 0xcb, 0x7e, 0xe9, 0xdd, 0x59, 0x5f, 0x48, 0x71, 0xe1, 0x01, 0xd7, 0x9f, 0x1c, 0x1d,
+ 0x92, 0x04, 0x81, 0xbf, 0x46, 0x98, 0x83, 0x7f, 0x46, 0x6d, 0x38, 0xb0, 0x6d, 0x16, 0xb8, 0x42,
+ 0x5a, 0x58, 0x92, 0xe0, 0xed, 0x04, 0x8c, 0x1b, 0x99, 0x0c, 0x32, 0x45, 0x85, 0x7b, 0x68, 0x6b,
+ 0x3c, 0x1a, 0x79, 0xcc, 0x4b, 0xd4, 0x17, 0x09, 0x6a, 0xab, 0x31, 0x99, 0x30, 0x9f, 0xdd, 0x2c,
+ 0x18, 0x7f, 0x83, 0x56, 0x5d, 0xd6, 0x02, 0xe9, 0x77, 0x59, 0x16, 0xf9, 0x34, 0x9d, 0x87, 0x5a,
+ 0x12, 0x7f, 0xd9, 0x2f, 0xbd, 0xf7, 0x6a, 0x76, 0x9a, 0x49, 0x06, 0x2c, 0x5c, 0x43, 0x2b, 0xd1,
+ 0xef, 0xc8, 0xfb, 0x8a, 0xc4, 0xee, 0xa7, 0x37, 0x51, 0x8b, 0xc3, 0xf3, 0x39, 0x4e, 0x21, 0xf8,
+ 0x21, 0xba, 0xe3, 0x58, 0xe7, 0x5f, 0x9e, 0x7b, 0xd4, 0xb7, 0x04, 0x65, 0x6e, 0x03, 0x6c, 0xe6,
+ 0xb6, 0xb8, 0xba, 0x5a, 0x56, 0x76, 0xf2, 0xa6, 0x1a, 0xf6, 0x4b, 0x77, 0x1e, 0x4d, 0xd9, 0x27,
+ 0x53, 0x55, 0xf8, 0x3e, 0x5a, 0xf7, 0x4e, 0xe9, 0x79, 0x3d, 0x68, 0xf6, 0xa8, 0x7d, 0x0c, 0x17,
+ 0x6a, 0xa1, 0xac, 0xec, 0xac, 0x99, 0x5b, 0x61, 0xbf, 0xb4, 0x5e, 0x3f, 0x3e, 0xfa, 0x6e, 0xb0,
+ 0x41, 0xc6, 0xf3, 0x70, 0x15, 0x6d, 0x79, 0x3e, 0x63, 0xed, 0xc7, 0xed, 0x3a, 0xe3, 0x1c, 0x38,
+ 0xa7, 0xcc, 0x55, 0x91, 0x14, 0xdf, 0x8d, 0x2e, 0xa6, 0x3e, 0xb9, 0x49, 0xb2, 0xf9, 0x95, 0xbf,
+ 0x17, 0xd1, 0x3b, 0xaf, 0xf8, 0x12, 0x60, 0x1b, 0xa1, 0xc8, 0x26, 0x8d, 0x1c, 0x73, 0x55, 0x91,
+ 0x4f, 0xcf, 0x98, 0xef, 0x55, 0x57, 0x53, 0xdd, 0xf0, 0xa9, 0x0c, 0x42, 0x9c, 0x8c, 0x60, 0xf1,
+ 0x21, 0xda, 0x1c, 0x79, 0xc1, 0xd5, 0xae, 0x45, 0xdd, 0xe4, 0xcd, 0xa8, 0x89, 0x72, 0xb3, 0x3a,
+ 0xb1, 0x4f, 0x32, 0x0a, 0xfc, 0x2d, 0x2a, 0xb8, 0x4c, 0x98, 0xd0, 0x66, 0x7e, 0x3c, 0xef, 0xc5,
+ 0xbd, 0x0f, 0xe6, 0x73, 0x7a, 0x42, 0x1d, 0x30, 0xd7, 0xc3, 0x7e, 0xa9, 0x50, 0x4b, 0x01, 0x64,
+ 0xc8, 0xc2, 0x6d, 0xb4, 0xd1, 0x84, 0x0e, 0x75, 0x09, 0xb4, 0x7d, 0xe0, 0xdd, 0x03, 0x21, 0x9f,
+ 0xc0, 0xeb, 0xd1, 0x71, 0xd8, 0x2f, 0x6d, 0x98, 0x63, 0x14, 0x32, 0x41, 0xc5, 0x27, 0xd1, 0xfc,
+ 0x8b, 0x83, 0xb6, 0x00, 0x5f, 0xce, 0xff, 0xeb, 0x55, 0x58, 0x8b, 0xdf, 0x49, 0xac, 0x27, 0x03,
+ 0x92, 0xf9, 0xd5, 0xe5, 0x95, 0x96, 0x7b, 0x7e, 0xa5, 0xe5, 0x5e, 0x5c, 0x69, 0xb9, 0x5f, 0x42,
+ 0x4d, 0xb9, 0x0c, 0x35, 0xe5, 0x79, 0xa8, 0x29, 0x2f, 0x42, 0x4d, 0xf9, 0x27, 0xd4, 0x94, 0xdf,
+ 0xfe, 0xd5, 0x72, 0x4f, 0xcb, 0xd7, 0xfd, 0xd9, 0xfc, 0x3f, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x6c,
+ 0x5a, 0xc4, 0x8f, 0x0a, 0x00, 0x00,
}
func (m *ClusterTrustBundle) Marshal() (dAtA []byte, err error) {
@@ -292,6 +441,261 @@ func (m *ClusterTrustBundleSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)
return len(dAtA) - i, nil
}
+func (m *PodCertificateRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodCertificateRequest) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *PodCertificateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ {
+ size, err := m.Status.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1a
+ {
+ size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ {
+ size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *PodCertificateRequestList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodCertificateRequestList) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *PodCertificateRequestList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ {
+ size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *PodCertificateRequestSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodCertificateRequestSpec) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *PodCertificateRequestSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.ProofOfPossession != nil {
+ i -= len(m.ProofOfPossession)
+ copy(dAtA[i:], m.ProofOfPossession)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ProofOfPossession)))
+ i--
+ dAtA[i] = 0x52
+ }
+ if m.PKIXPublicKey != nil {
+ i -= len(m.PKIXPublicKey)
+ copy(dAtA[i:], m.PKIXPublicKey)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.PKIXPublicKey)))
+ i--
+ dAtA[i] = 0x4a
+ }
+ if m.MaxExpirationSeconds != nil {
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.MaxExpirationSeconds))
+ i--
+ dAtA[i] = 0x40
+ }
+ i -= len(m.NodeUID)
+ copy(dAtA[i:], m.NodeUID)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeUID)))
+ i--
+ dAtA[i] = 0x3a
+ i -= len(m.NodeName)
+ copy(dAtA[i:], m.NodeName)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeName)))
+ i--
+ dAtA[i] = 0x32
+ i -= len(m.ServiceAccountUID)
+ copy(dAtA[i:], m.ServiceAccountUID)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceAccountUID)))
+ i--
+ dAtA[i] = 0x2a
+ i -= len(m.ServiceAccountName)
+ copy(dAtA[i:], m.ServiceAccountName)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceAccountName)))
+ i--
+ dAtA[i] = 0x22
+ i -= len(m.PodUID)
+ copy(dAtA[i:], m.PodUID)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.PodUID)))
+ i--
+ dAtA[i] = 0x1a
+ i -= len(m.PodName)
+ copy(dAtA[i:], m.PodName)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.PodName)))
+ i--
+ dAtA[i] = 0x12
+ i -= len(m.SignerName)
+ copy(dAtA[i:], m.SignerName)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SignerName)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *PodCertificateRequestStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodCertificateRequestStatus) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *PodCertificateRequestStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.NotAfter != nil {
+ {
+ size, err := m.NotAfter.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x32
+ }
+ if m.BeginRefreshAt != nil {
+ {
+ size, err := m.BeginRefreshAt.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x2a
+ }
+ if m.NotBefore != nil {
+ {
+ size, err := m.NotBefore.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x22
+ }
+ i -= len(m.CertificateChain)
+ copy(dAtA[i:], m.CertificateChain)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.CertificateChain)))
+ i--
+ dAtA[i] = 0x12
+ if len(m.Conditions) > 0 {
+ for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
offset -= sovGenerated(v)
base := offset
@@ -346,25 +750,120 @@ func (m *ClusterTrustBundleSpec) Size() (n int) {
return n
}
-func sovGenerated(x uint64) (n int) {
- return (math_bits.Len64(x|1) + 6) / 7
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *ClusterTrustBundle) String() string {
- if this == nil {
- return "nil"
+func (m *PodCertificateRequest) Size() (n int) {
+ if m == nil {
+ return 0
}
- s := strings.Join([]string{`&ClusterTrustBundle{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ClusterTrustBundleSpec", "ClusterTrustBundleSpec", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ClusterTrustBundleList) String() string {
- if this == nil {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodCertificateRequestList) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodCertificateRequestSpec) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.SignerName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.PodName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.PodUID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ServiceAccountName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ServiceAccountUID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.NodeName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.NodeUID)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.MaxExpirationSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.MaxExpirationSeconds))
+ }
+ if m.PKIXPublicKey != nil {
+ l = len(m.PKIXPublicKey)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ProofOfPossession != nil {
+ l = len(m.ProofOfPossession)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *PodCertificateRequestStatus) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.CertificateChain)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.NotBefore != nil {
+ l = m.NotBefore.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.BeginRefreshAt != nil {
+ l = m.BeginRefreshAt.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.NotAfter != nil {
+ l = m.NotAfter.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ return (math_bits.Len64(x|1) + 6) / 7
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *ClusterTrustBundle) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ClusterTrustBundle{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ClusterTrustBundleSpec", "ClusterTrustBundleSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ClusterTrustBundleList) String() string {
+ if this == nil {
return "nil"
}
repeatedStringForItems := "[]ClusterTrustBundle{"
@@ -390,6 +889,72 @@ func (this *ClusterTrustBundleSpec) String() string {
}, "")
return s
}
+func (this *PodCertificateRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodCertificateRequest{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodCertificateRequestSpec", "PodCertificateRequestSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodCertificateRequestStatus", "PodCertificateRequestStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodCertificateRequestList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForItems := "[]PodCertificateRequest{"
+ for _, f := range this.Items {
+ repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "PodCertificateRequest", "PodCertificateRequest", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForItems += "}"
+ s := strings.Join([]string{`&PodCertificateRequestList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + repeatedStringForItems + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodCertificateRequestSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodCertificateRequestSpec{`,
+ `SignerName:` + fmt.Sprintf("%v", this.SignerName) + `,`,
+ `PodName:` + fmt.Sprintf("%v", this.PodName) + `,`,
+ `PodUID:` + fmt.Sprintf("%v", this.PodUID) + `,`,
+ `ServiceAccountName:` + fmt.Sprintf("%v", this.ServiceAccountName) + `,`,
+ `ServiceAccountUID:` + fmt.Sprintf("%v", this.ServiceAccountUID) + `,`,
+ `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`,
+ `NodeUID:` + fmt.Sprintf("%v", this.NodeUID) + `,`,
+ `MaxExpirationSeconds:` + valueToStringGenerated(this.MaxExpirationSeconds) + `,`,
+ `PKIXPublicKey:` + valueToStringGenerated(this.PKIXPublicKey) + `,`,
+ `ProofOfPossession:` + valueToStringGenerated(this.ProofOfPossession) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodCertificateRequestStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForConditions := "[]Condition{"
+ for _, f := range this.Conditions {
+ repeatedStringForConditions += fmt.Sprintf("%v", f) + ","
+ }
+ repeatedStringForConditions += "}"
+ s := strings.Join([]string{`&PodCertificateRequestStatus{`,
+ `Conditions:` + repeatedStringForConditions + `,`,
+ `CertificateChain:` + fmt.Sprintf("%v", this.CertificateChain) + `,`,
+ `NotBefore:` + strings.Replace(fmt.Sprintf("%v", this.NotBefore), "Time", "v1.Time", 1) + `,`,
+ `BeginRefreshAt:` + strings.Replace(fmt.Sprintf("%v", this.BeginRefreshAt), "Time", "v1.Time", 1) + `,`,
+ `NotAfter:` + strings.Replace(fmt.Sprintf("%v", this.NotAfter), "Time", "v1.Time", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
func valueToStringGenerated(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
@@ -745,6 +1310,858 @@ func (m *ClusterTrustBundleSpec) Unmarshal(dAtA []byte) error {
}
return nil
}
+func (m *PodCertificateRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodCertificateRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodCertificateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodCertificateRequestList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodCertificateRequestList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodCertificateRequestList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, PodCertificateRequest{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodCertificateRequestSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodCertificateRequestSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodCertificateRequestSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SignerName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SignerName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PodName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodUID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PodUID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ServiceAccountName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ServiceAccountName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ServiceAccountUID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ServiceAccountUID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.NodeName = k8s_io_apimachinery_pkg_types.NodeName(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodeUID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.NodeUID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxExpirationSeconds", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int32(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.MaxExpirationSeconds = &v
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PKIXPublicKey", wireType)
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ byteLen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if byteLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + byteLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PKIXPublicKey = append(m.PKIXPublicKey[:0], dAtA[iNdEx:postIndex]...)
+ if m.PKIXPublicKey == nil {
+ m.PKIXPublicKey = []byte{}
+ }
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ProofOfPossession", wireType)
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ byteLen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if byteLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + byteLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ProofOfPossession = append(m.ProofOfPossession[:0], dAtA[iNdEx:postIndex]...)
+ if m.ProofOfPossession == nil {
+ m.ProofOfPossession = []byte{}
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodCertificateRequestStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodCertificateRequestStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodCertificateRequestStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, v1.Condition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CertificateChain", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CertificateChain = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NotBefore", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NotBefore == nil {
+ m.NotBefore = &v1.Time{}
+ }
+ if err := m.NotBefore.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field BeginRefreshAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.BeginRefreshAt == nil {
+ m.BeginRefreshAt = &v1.Time{}
+ }
+ if err := m.BeginRefreshAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NotAfter", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NotAfter == nil {
+ m.NotAfter = &v1.Time{}
+ }
+ if err := m.NotAfter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
func skipGenerated(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
diff --git a/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/generated.proto b/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/generated.proto
index 7155f778cffc..194bdbc14ff2 100644
--- a/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/generated.proto
+++ b/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/generated.proto
@@ -101,3 +101,208 @@ message ClusterTrustBundleSpec {
optional string trustBundle = 2;
}
+// PodCertificateRequest encodes a pod requesting a certificate from a given
+// signer.
+//
+// Kubelets use this API to implement podCertificate projected volumes
+message PodCertificateRequest {
+ // metadata contains the object metadata.
+ //
+ // +optional
+ optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // spec contains the details about the certificate being requested.
+ optional PodCertificateRequestSpec spec = 2;
+
+ // status contains the issued certificate, and a standard set of conditions.
+ // +optional
+ optional PodCertificateRequestStatus status = 3;
+}
+
+// PodCertificateRequestList is a collection of PodCertificateRequest objects
+message PodCertificateRequestList {
+ // metadata contains the list metadata.
+ //
+ // +optional
+ optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // items is a collection of PodCertificateRequest objects
+ repeated PodCertificateRequest items = 2;
+}
+
+// PodCertificateRequestSpec describes the certificate request. All fields are
+// immutable after creation.
+message PodCertificateRequestSpec {
+ // signerName indicates the requested signer.
+ //
+ // All signer names beginning with `kubernetes.io` are reserved for use by
+ // the Kubernetes project. There is currently one well-known signer
+ // documented by the Kubernetes project,
+ // `kubernetes.io/kube-apiserver-client-pod`, which will issue client
+ // certificates understood by kube-apiserver. It is currently
+ // unimplemented.
+ //
+ // +required
+ optional string signerName = 1;
+
+ // podName is the name of the pod into which the certificate will be mounted.
+ //
+ // +required
+ optional string podName = 2;
+
+ // podUID is the UID of the pod into which the certificate will be mounted.
+ //
+ // +required
+ optional string podUID = 3;
+
+ // serviceAccountName is the name of the service account the pod is running as.
+ //
+ // +required
+ optional string serviceAccountName = 4;
+
+ // serviceAccountUID is the UID of the service account the pod is running as.
+ //
+ // +required
+ optional string serviceAccountUID = 5;
+
+ // nodeName is the name of the node the pod is assigned to.
+ //
+ // +required
+ optional string nodeName = 6;
+
+ // nodeUID is the UID of the node the pod is assigned to.
+ //
+ // +required
+ optional string nodeUID = 7;
+
+ // maxExpirationSeconds is the maximum lifetime permitted for the
+ // certificate.
+ //
+ // If 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).
+ //
+ // The 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.
+ //
+ // +optional
+ // +default=86400
+ optional int32 maxExpirationSeconds = 8;
+
+ // pkixPublicKey is the PKIX-serialized public key the signer will issue the
+ // certificate to.
+ //
+ // The key must be one of RSA3072, RSA4096, ECDSAP256, ECDSAP384, ECDSAP521,
+ // or ED25519. Note that this list may be expanded in the future.
+ //
+ // Signer implementations do not need to support all key types supported by
+ // kube-apiserver and kubelet. If a signer does not support the key type
+ // used for a given PodCertificateRequest, it must deny the request by
+ // setting a status.conditions entry with a type of "Denied" and a reason of
+ // "UnsupportedKeyType". It may also suggest a key type that it does support
+ // in the message field.
+ //
+ // +required
+ optional bytes pkixPublicKey = 9;
+
+ // proofOfPossession proves that the requesting kubelet holds the private
+ // key corresponding to pkixPublicKey.
+ //
+ // It is contructed by signing the ASCII bytes of the pod's UID using
+ // `pkixPublicKey`.
+ //
+ // kube-apiserver validates the proof of possession during creation of the
+ // PodCertificateRequest.
+ //
+ // If the key is an RSA key, then the signature is over the ASCII bytes of
+ // the pod UID, using RSASSA-PSS from RFC 8017 (as implemented by the golang
+ // function crypto/rsa.SignPSS with nil options).
+ //
+ // If the key is an ECDSA key, then the signature is as described by [SEC 1,
+ // Version 2.0](https://www.secg.org/sec1-v2.pdf) (as implemented by the
+ // golang library function crypto/ecdsa.SignASN1)
+ //
+ // If the key is an ED25519 key, the the signature is as described by the
+ // [ED25519 Specification](https://ed25519.cr.yp.to/) (as implemented by
+ // the golang library crypto/ed25519.Sign).
+ //
+ // +required
+ optional bytes proofOfPossession = 10;
+}
+
+// PodCertificateRequestStatus describes the status of the request, and holds
+// the certificate data if the request is issued.
+message PodCertificateRequestStatus {
+ // conditions applied to the request.
+ //
+ // The types "Issued", "Denied", and "Failed" have special handling. At
+ // most one of these conditions may be present, and they must have status
+ // "True".
+ //
+ // If the request is denied with `Reason=UnsupportedKeyType`, the signer may
+ // suggest a key type that will work in the message field.
+ //
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ // +listType=map
+ // +listMapKey=type
+ // +optional
+ repeated .k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 1;
+
+ // certificateChain is populated with an issued certificate by the signer.
+ // This field is set via the /status subresource. Once populated, this field
+ // is immutable.
+ //
+ // If the certificate signing request is denied, a condition of type
+ // "Denied" is added and this field remains empty. If the signer cannot
+ // issue the certificate, a condition of type "Failed" is added and this
+ // field remains empty.
+ //
+ // Validation requirements:
+ // 1. certificateChain must consist of one or more PEM-formatted certificates.
+ // 2. Each entry must be a valid PEM-wrapped, DER-encoded ASN.1 Certificate as
+ // described in section 4 of RFC5280.
+ //
+ // If more than one block is present, and the definition of the requested
+ // spec.signerName does not indicate otherwise, the first block is the
+ // issued certificate, and subsequent blocks should be treated as
+ // intermediate certificates and presented in TLS handshakes. When
+ // projecting the chain into a pod volume, kubelet will drop any data
+ // in-between the PEM blocks, as well as any PEM block headers.
+ //
+ // +optional
+ optional string certificateChain = 2;
+
+ // notBefore is the time at which the certificate becomes valid. The value
+ // must be the same as the notBefore value in the leaf certificate in
+ // certificateChain. This field is set via the /status subresource. Once
+ // populated, it is immutable. The signer must set this field at the same
+ // time it sets certificateChain.
+ //
+ // +optional
+ optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time notBefore = 4;
+
+ // beginRefreshAt is the time at which the kubelet should begin trying to
+ // refresh the certificate. This field is set via the /status subresource,
+ // and must be set at the same time as certificateChain. Once populated,
+ // this field is immutable.
+ //
+ // This field is only a hint. Kubelet may start refreshing before or after
+ // this time if necessary.
+ //
+ // +optional
+ optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time beginRefreshAt = 5;
+
+ // notAfter is the time at which the certificate expires. The value must be
+ // the same as the notAfter value in the leaf certificate in
+ // certificateChain. This field is set via the /status subresource. Once
+ // populated, it is immutable. The signer must set this field at the same
+ // time it sets certificateChain.
+ //
+ // +optional
+ optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time notAfter = 6;
+}
+
diff --git a/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/register.go b/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/register.go
index 7288ed9a3e8d..ae541e15c12a 100644
--- a/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/register.go
+++ b/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/register.go
@@ -53,6 +53,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&ClusterTrustBundle{},
&ClusterTrustBundleList{},
+ &PodCertificateRequest{},
+ &PodCertificateRequestList{},
)
// Add the watch version that applies
diff --git a/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/types.go b/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/types.go
index beef02599d07..a5cb3809e7fe 100644
--- a/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/types.go
+++ b/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/types.go
@@ -18,6 +18,7 @@ package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/types"
)
// +genclient
@@ -106,3 +107,233 @@ type ClusterTrustBundleList struct {
// items is a collection of ClusterTrustBundle objects
Items []ClusterTrustBundle `json:"items" protobuf:"bytes,2,rep,name=items"`
}
+
+// +genclient
+// +k8s:prerelease-lifecycle-gen:introduced=1.34
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// PodCertificateRequest encodes a pod requesting a certificate from a given
+// signer.
+//
+// Kubelets use this API to implement podCertificate projected volumes
+type PodCertificateRequest struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // metadata contains the object metadata.
+ //
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // spec contains the details about the certificate being requested.
+ Spec PodCertificateRequestSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
+
+ // status contains the issued certificate, and a standard set of conditions.
+ // +optional
+ Status PodCertificateRequestStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// PodCertificateRequestSpec describes the certificate request. All fields are
+// immutable after creation.
+type PodCertificateRequestSpec struct {
+ // signerName indicates the requested signer.
+ //
+ // All signer names beginning with `kubernetes.io` are reserved for use by
+ // the Kubernetes project. There is currently one well-known signer
+ // documented by the Kubernetes project,
+ // `kubernetes.io/kube-apiserver-client-pod`, which will issue client
+ // certificates understood by kube-apiserver. It is currently
+ // unimplemented.
+ //
+ // +required
+ SignerName string `json:"signerName" protobuf:"bytes,1,opt,name=signerName"`
+
+ // podName is the name of the pod into which the certificate will be mounted.
+ //
+ // +required
+ PodName string `json:"podName" protobuf:"bytes,2,opt,name=podName"`
+ // podUID is the UID of the pod into which the certificate will be mounted.
+ //
+ // +required
+ PodUID types.UID `json:"podUID" protobuf:"bytes,3,opt,name=podUID"`
+
+ // serviceAccountName is the name of the service account the pod is running as.
+ //
+ // +required
+ ServiceAccountName string `json:"serviceAccountName" protobuf:"bytes,4,opt,name=serviceAccountName"`
+ // serviceAccountUID is the UID of the service account the pod is running as.
+ //
+ // +required
+ ServiceAccountUID types.UID `json:"serviceAccountUID" protobuf:"bytes,5,opt,name=serviceAccountUID"`
+
+ // nodeName is the name of the node the pod is assigned to.
+ //
+ // +required
+ NodeName types.NodeName `json:"nodeName" protobuf:"bytes,6,opt,name=nodeName"`
+ // nodeUID is the UID of the node the pod is assigned to.
+ //
+ // +required
+ NodeUID types.UID `json:"nodeUID" protobuf:"bytes,7,opt,name=nodeUID"`
+
+ // maxExpirationSeconds is the maximum lifetime permitted for the
+ // certificate.
+ //
+ // If 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).
+ //
+ // The 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.
+ //
+ // +optional
+ // +default=86400
+ MaxExpirationSeconds *int32 `json:"maxExpirationSeconds,omitempty" protobuf:"varint,8,opt,name=maxExpirationSeconds"`
+
+ // pkixPublicKey is the PKIX-serialized public key the signer will issue the
+ // certificate to.
+ //
+ // The key must be one of RSA3072, RSA4096, ECDSAP256, ECDSAP384, ECDSAP521,
+ // or ED25519. Note that this list may be expanded in the future.
+ //
+ // Signer implementations do not need to support all key types supported by
+ // kube-apiserver and kubelet. If a signer does not support the key type
+ // used for a given PodCertificateRequest, it must deny the request by
+ // setting a status.conditions entry with a type of "Denied" and a reason of
+ // "UnsupportedKeyType". It may also suggest a key type that it does support
+ // in the message field.
+ //
+ // +required
+ PKIXPublicKey []byte `json:"pkixPublicKey" protobuf:"bytes,9,opt,name=pkixPublicKey"`
+
+ // proofOfPossession proves that the requesting kubelet holds the private
+ // key corresponding to pkixPublicKey.
+ //
+ // It is contructed by signing the ASCII bytes of the pod's UID using
+ // `pkixPublicKey`.
+ //
+ // kube-apiserver validates the proof of possession during creation of the
+ // PodCertificateRequest.
+ //
+ // If the key is an RSA key, then the signature is over the ASCII bytes of
+ // the pod UID, using RSASSA-PSS from RFC 8017 (as implemented by the golang
+ // function crypto/rsa.SignPSS with nil options).
+ //
+ // If the key is an ECDSA key, then the signature is as described by [SEC 1,
+ // Version 2.0](https://www.secg.org/sec1-v2.pdf) (as implemented by the
+ // golang library function crypto/ecdsa.SignASN1)
+ //
+ // If the key is an ED25519 key, the the signature is as described by the
+ // [ED25519 Specification](https://ed25519.cr.yp.to/) (as implemented by
+ // the golang library crypto/ed25519.Sign).
+ //
+ // +required
+ ProofOfPossession []byte `json:"proofOfPossession" protobuf:"bytes,10,opt,name=proofOfPossession"`
+}
+
+// PodCertificateRequestStatus describes the status of the request, and holds
+// the certificate data if the request is issued.
+type PodCertificateRequestStatus struct {
+ // conditions applied to the request.
+ //
+ // The types "Issued", "Denied", and "Failed" have special handling. At
+ // most one of these conditions may be present, and they must have status
+ // "True".
+ //
+ // If the request is denied with `Reason=UnsupportedKeyType`, the signer may
+ // suggest a key type that will work in the message field.
+ //
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ // +listType=map
+ // +listMapKey=type
+ // +optional
+ Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
+
+ // certificateChain is populated with an issued certificate by the signer.
+ // This field is set via the /status subresource. Once populated, this field
+ // is immutable.
+ //
+ // If the certificate signing request is denied, a condition of type
+ // "Denied" is added and this field remains empty. If the signer cannot
+ // issue the certificate, a condition of type "Failed" is added and this
+ // field remains empty.
+ //
+ // Validation requirements:
+ // 1. certificateChain must consist of one or more PEM-formatted certificates.
+ // 2. Each entry must be a valid PEM-wrapped, DER-encoded ASN.1 Certificate as
+ // described in section 4 of RFC5280.
+ //
+ // If more than one block is present, and the definition of the requested
+ // spec.signerName does not indicate otherwise, the first block is the
+ // issued certificate, and subsequent blocks should be treated as
+ // intermediate certificates and presented in TLS handshakes. When
+ // projecting the chain into a pod volume, kubelet will drop any data
+ // in-between the PEM blocks, as well as any PEM block headers.
+ //
+ // +optional
+ CertificateChain string `json:"certificateChain,omitempty" protobuf:"bytes,2,opt,name=certificateChain"`
+
+ // notBefore is the time at which the certificate becomes valid. The value
+ // must be the same as the notBefore value in the leaf certificate in
+ // certificateChain. This field is set via the /status subresource. Once
+ // populated, it is immutable. The signer must set this field at the same
+ // time it sets certificateChain.
+ //
+ // +optional
+ NotBefore *metav1.Time `json:"notBefore,omitempty" protobuf:"bytes,4,opt,name=notBefore"`
+
+ // beginRefreshAt is the time at which the kubelet should begin trying to
+ // refresh the certificate. This field is set via the /status subresource,
+ // and must be set at the same time as certificateChain. Once populated,
+ // this field is immutable.
+ //
+ // This field is only a hint. Kubelet may start refreshing before or after
+ // this time if necessary.
+ //
+ // +optional
+ BeginRefreshAt *metav1.Time `json:"beginRefreshAt,omitempty" protobuf:"bytes,5,opt,name=beginRefreshAt"`
+
+ // notAfter is the time at which the certificate expires. The value must be
+ // the same as the notAfter value in the leaf certificate in
+ // certificateChain. This field is set via the /status subresource. Once
+ // populated, it is immutable. The signer must set this field at the same
+ // time it sets certificateChain.
+ //
+ // +optional
+ NotAfter *metav1.Time `json:"notAfter,omitempty" protobuf:"bytes,6,opt,name=notAfter"`
+}
+
+// Well-known condition types for PodCertificateRequests
+const (
+ // Denied indicates the request was denied by the signer.
+ PodCertificateRequestConditionTypeDenied string = "Denied"
+ // Failed indicates the signer failed to issue the certificate.
+ PodCertificateRequestConditionTypeFailed string = "Failed"
+ // Issued indicates the certificate has been issued.
+ PodCertificateRequestConditionTypeIssued string = "Issued"
+)
+
+// Well-known condition reasons for PodCertificateRequests
+const (
+ // UnsupportedKeyType should be set on "Denied" conditions when the signer
+ // doesn't support the key type of publicKey.
+ PodCertificateRequestConditionUnsupportedKeyType string = "UnsupportedKeyType"
+)
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +k8s:prerelease-lifecycle-gen:introduced=1.34
+
+// PodCertificateRequestList is a collection of PodCertificateRequest objects
+type PodCertificateRequestList struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // metadata contains the list metadata.
+ //
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // items is a collection of PodCertificateRequest objects
+ Items []PodCertificateRequest `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/types_swagger_doc_generated.go b/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/types_swagger_doc_generated.go
index bff649e3cbdb..d29f2d8505f5 100644
--- a/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/types_swagger_doc_generated.go
+++ b/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/types_swagger_doc_generated.go
@@ -57,4 +57,56 @@ func (ClusterTrustBundleSpec) SwaggerDoc() map[string]string {
return map_ClusterTrustBundleSpec
}
+var map_PodCertificateRequest = map[string]string{
+ "": "PodCertificateRequest encodes a pod requesting a certificate from a given signer.\n\nKubelets use this API to implement podCertificate projected volumes",
+ "metadata": "metadata contains the object metadata.",
+ "spec": "spec contains the details about the certificate being requested.",
+ "status": "status contains the issued certificate, and a standard set of conditions.",
+}
+
+func (PodCertificateRequest) SwaggerDoc() map[string]string {
+ return map_PodCertificateRequest
+}
+
+var map_PodCertificateRequestList = map[string]string{
+ "": "PodCertificateRequestList is a collection of PodCertificateRequest objects",
+ "metadata": "metadata contains the list metadata.",
+ "items": "items is a collection of PodCertificateRequest objects",
+}
+
+func (PodCertificateRequestList) SwaggerDoc() map[string]string {
+ return map_PodCertificateRequestList
+}
+
+var map_PodCertificateRequestSpec = map[string]string{
+ "": "PodCertificateRequestSpec describes the certificate request. All fields are immutable after creation.",
+ "signerName": "signerName indicates the requested signer.\n\nAll signer names beginning with `kubernetes.io` are reserved for use by the Kubernetes project. There is currently one well-known signer documented by the Kubernetes project, `kubernetes.io/kube-apiserver-client-pod`, which will issue client certificates understood by kube-apiserver. It is currently unimplemented.",
+ "podName": "podName is the name of the pod into which the certificate will be mounted.",
+ "podUID": "podUID is the UID of the pod into which the certificate will be mounted.",
+ "serviceAccountName": "serviceAccountName is the name of the service account the pod is running as.",
+ "serviceAccountUID": "serviceAccountUID is the UID of the service account the pod is running as.",
+ "nodeName": "nodeName is the name of the node the pod is assigned to.",
+ "nodeUID": "nodeUID is the UID of the node the pod is assigned to.",
+ "maxExpirationSeconds": "maxExpirationSeconds is the maximum lifetime permitted for the certificate.\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.",
+ "pkixPublicKey": "pkixPublicKey is the PKIX-serialized public key the signer will issue the certificate to.\n\nThe key must be one of RSA3072, RSA4096, ECDSAP256, ECDSAP384, ECDSAP521, or ED25519. Note that this list may be expanded in the future.\n\nSigner implementations do not need to support all key types supported by kube-apiserver and kubelet. If a signer does not support the key type used for a given PodCertificateRequest, it must deny the request by setting a status.conditions entry with a type of \"Denied\" and a reason of \"UnsupportedKeyType\". It may also suggest a key type that it does support in the message field.",
+ "proofOfPossession": "proofOfPossession proves that the requesting kubelet holds the private key corresponding to pkixPublicKey.\n\nIt is contructed by signing the ASCII bytes of the pod's UID using `pkixPublicKey`.\n\nkube-apiserver validates the proof of possession during creation of the PodCertificateRequest.\n\nIf the key is an RSA key, then the signature is over the ASCII bytes of the pod UID, using RSASSA-PSS from RFC 8017 (as implemented by the golang function crypto/rsa.SignPSS with nil options).\n\nIf the key is an ECDSA key, then the signature is as described by [SEC 1, Version 2.0](https://www.secg.org/sec1-v2.pdf) (as implemented by the golang library function crypto/ecdsa.SignASN1)\n\nIf the key is an ED25519 key, the the signature is as described by the [ED25519 Specification](https://ed25519.cr.yp.to/) (as implemented by the golang library crypto/ed25519.Sign).",
+}
+
+func (PodCertificateRequestSpec) SwaggerDoc() map[string]string {
+ return map_PodCertificateRequestSpec
+}
+
+var map_PodCertificateRequestStatus = map[string]string{
+ "": "PodCertificateRequestStatus describes the status of the request, and holds the certificate data if the request is issued.",
+ "conditions": "conditions applied to the request.\n\nThe types \"Issued\", \"Denied\", and \"Failed\" have special handling. At most one of these conditions may be present, and they must have status \"True\".\n\nIf the request is denied with `Reason=UnsupportedKeyType`, the signer may suggest a key type that will work in the message field.",
+ "certificateChain": "certificateChain is populated with an issued certificate by the signer. This field is set via the /status subresource. Once populated, this field is immutable.\n\nIf the certificate signing request is denied, a condition of type \"Denied\" is added and this field remains empty. If the signer cannot issue the certificate, a condition of type \"Failed\" is added and this field remains empty.\n\nValidation requirements:\n 1. certificateChain must consist of one or more PEM-formatted certificates.\n 2. Each entry must be a valid PEM-wrapped, DER-encoded ASN.1 Certificate as\n described in section 4 of RFC5280.\n\nIf more than one block is present, and the definition of the requested spec.signerName does not indicate otherwise, the first block is the issued certificate, and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes. When projecting the chain into a pod volume, kubelet will drop any data in-between the PEM blocks, as well as any PEM block headers.",
+ "notBefore": "notBefore is the time at which the certificate becomes valid. The value must be the same as the notBefore value in the leaf certificate in certificateChain. This field is set via the /status subresource. Once populated, it is immutable. The signer must set this field at the same time it sets certificateChain.",
+ "beginRefreshAt": "beginRefreshAt is the time at which the kubelet should begin trying to refresh the certificate. This field is set via the /status subresource, and must be set at the same time as certificateChain. Once populated, this field is immutable.\n\nThis field is only a hint. Kubelet may start refreshing before or after this time if necessary.",
+ "notAfter": "notAfter is the time at which the certificate expires. The value must be the same as the notAfter value in the leaf certificate in certificateChain. This field is set via the /status subresource. Once populated, it is immutable. The signer must set this field at the same time it sets certificateChain.",
+}
+
+func (PodCertificateRequestStatus) SwaggerDoc() map[string]string {
+ return map_PodCertificateRequestStatus
+}
+
// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/zz_generated.deepcopy.go b/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/zz_generated.deepcopy.go
index 30a4dc1e80dc..25bc0ed6cbc5 100644
--- a/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/zz_generated.deepcopy.go
+++ b/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/zz_generated.deepcopy.go
@@ -22,6 +22,7 @@ limitations under the License.
package v1alpha1
import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
@@ -100,3 +101,130 @@ func (in *ClusterTrustBundleSpec) DeepCopy() *ClusterTrustBundleSpec {
in.DeepCopyInto(out)
return out
}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PodCertificateRequest) DeepCopyInto(out *PodCertificateRequest) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ in.Status.DeepCopyInto(&out.Status)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodCertificateRequest.
+func (in *PodCertificateRequest) DeepCopy() *PodCertificateRequest {
+ if in == nil {
+ return nil
+ }
+ out := new(PodCertificateRequest)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *PodCertificateRequest) 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 *PodCertificateRequestList) DeepCopyInto(out *PodCertificateRequestList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodCertificateRequest, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodCertificateRequestList.
+func (in *PodCertificateRequestList) DeepCopy() *PodCertificateRequestList {
+ if in == nil {
+ return nil
+ }
+ out := new(PodCertificateRequestList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *PodCertificateRequestList) 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 *PodCertificateRequestSpec) DeepCopyInto(out *PodCertificateRequestSpec) {
+ *out = *in
+ if in.MaxExpirationSeconds != nil {
+ in, out := &in.MaxExpirationSeconds, &out.MaxExpirationSeconds
+ *out = new(int32)
+ **out = **in
+ }
+ if in.PKIXPublicKey != nil {
+ in, out := &in.PKIXPublicKey, &out.PKIXPublicKey
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ if in.ProofOfPossession != nil {
+ in, out := &in.ProofOfPossession, &out.ProofOfPossession
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodCertificateRequestSpec.
+func (in *PodCertificateRequestSpec) DeepCopy() *PodCertificateRequestSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(PodCertificateRequestSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PodCertificateRequestStatus) DeepCopyInto(out *PodCertificateRequestStatus) {
+ *out = *in
+ 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])
+ }
+ }
+ if in.NotBefore != nil {
+ in, out := &in.NotBefore, &out.NotBefore
+ *out = (*in).DeepCopy()
+ }
+ if in.BeginRefreshAt != nil {
+ in, out := &in.BeginRefreshAt, &out.BeginRefreshAt
+ *out = (*in).DeepCopy()
+ }
+ if in.NotAfter != nil {
+ in, out := &in.NotAfter, &out.NotAfter
+ *out = (*in).DeepCopy()
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodCertificateRequestStatus.
+func (in *PodCertificateRequestStatus) DeepCopy() *PodCertificateRequestStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(PodCertificateRequestStatus)
+ in.DeepCopyInto(out)
+ return out
+}
diff --git a/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/zz_generated.prerelease-lifecycle.go b/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/zz_generated.prerelease-lifecycle.go
index 3121a87d0826..edbfce79bc75 100644
--- a/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/zz_generated.prerelease-lifecycle.go
+++ b/hack/tools/vendor/k8s.io/api/certificates/v1alpha1/zz_generated.prerelease-lifecycle.go
@@ -56,3 +56,39 @@ func (in *ClusterTrustBundleList) APILifecycleDeprecated() (major, minor int) {
func (in *ClusterTrustBundleList) APILifecycleRemoved() (major, minor int) {
return 1, 37
}
+
+// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
+func (in *PodCertificateRequest) APILifecycleIntroduced() (major, minor int) {
+ return 1, 34
+}
+
+// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
+func (in *PodCertificateRequest) APILifecycleDeprecated() (major, minor int) {
+ return 1, 37
+}
+
+// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
+func (in *PodCertificateRequest) APILifecycleRemoved() (major, minor int) {
+ return 1, 40
+}
+
+// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
+func (in *PodCertificateRequestList) APILifecycleIntroduced() (major, minor int) {
+ return 1, 34
+}
+
+// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
+func (in *PodCertificateRequestList) APILifecycleDeprecated() (major, minor int) {
+ return 1, 37
+}
+
+// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
+func (in *PodCertificateRequestList) APILifecycleRemoved() (major, minor int) {
+ return 1, 40
+}
diff --git a/hack/tools/vendor/k8s.io/api/certificates/v1beta1/generated.proto b/hack/tools/vendor/k8s.io/api/certificates/v1beta1/generated.proto
index 7c48270f65c0..4c9385c1960c 100644
--- a/hack/tools/vendor/k8s.io/api/certificates/v1beta1/generated.proto
+++ b/hack/tools/vendor/k8s.io/api/certificates/v1beta1/generated.proto
@@ -30,6 +30,8 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
option go_package = "k8s.io/api/certificates/v1beta1";
// Describes a certificate signing request
+// +k8s:supportsSubresource=/status
+// +k8s:supportsSubresource=/approval
message CertificateSigningRequest {
// +optional
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
@@ -182,6 +184,11 @@ message CertificateSigningRequestStatus {
// +listType=map
// +listMapKey=type
// +optional
+ // +k8s:listType=map
+ // +k8s:listMapKey=type
+ // +k8s:optional
+ // +k8s:item(type: "Approved")=+k8s:zeroOrOneOfMember
+ // +k8s:item(type: "Denied")=+k8s:zeroOrOneOfMember
repeated CertificateSigningRequestCondition conditions = 1;
// If request was approved, the controller will place the issued certificate here.
diff --git a/hack/tools/vendor/k8s.io/api/certificates/v1beta1/types.go b/hack/tools/vendor/k8s.io/api/certificates/v1beta1/types.go
index 1ce104807ddd..fadb7e082efb 100644
--- a/hack/tools/vendor/k8s.io/api/certificates/v1beta1/types.go
+++ b/hack/tools/vendor/k8s.io/api/certificates/v1beta1/types.go
@@ -31,6 +31,8 @@ import (
// +k8s:prerelease-lifecycle-gen:replacement=certificates.k8s.io,v1,CertificateSigningRequest
// Describes a certificate signing request
+// +k8s:supportsSubresource=/status
+// +k8s:supportsSubresource=/approval
type CertificateSigningRequest struct {
metav1.TypeMeta `json:",inline"`
// +optional
@@ -175,6 +177,11 @@ type CertificateSigningRequestStatus struct {
// +listType=map
// +listMapKey=type
// +optional
+ // +k8s:listType=map
+ // +k8s:listMapKey=type
+ // +k8s:optional
+ // +k8s:item(type: "Approved")=+k8s:zeroOrOneOfMember
+ // +k8s:item(type: "Denied")=+k8s:zeroOrOneOfMember
Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"`
// If request was approved, the controller will place the issued certificate here.
diff --git a/hack/tools/vendor/k8s.io/api/core/v1/generated.pb.go b/hack/tools/vendor/k8s.io/api/core/v1/generated.pb.go
index a4b8f5842956..e1a297b98547 100644
--- a/hack/tools/vendor/k8s.io/api/core/v1/generated.pb.go
+++ b/hack/tools/vendor/k8s.io/api/core/v1/generated.pb.go
@@ -861,10 +861,38 @@ func (m *Container) XXX_DiscardUnknown() {
var xxx_messageInfo_Container proto.InternalMessageInfo
+func (m *ContainerExtendedResourceRequest) Reset() { *m = ContainerExtendedResourceRequest{} }
+func (*ContainerExtendedResourceRequest) ProtoMessage() {}
+func (*ContainerExtendedResourceRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_6c07b07c062484ab, []int{29}
+}
+func (m *ContainerExtendedResourceRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ContainerExtendedResourceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *ContainerExtendedResourceRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ContainerExtendedResourceRequest.Merge(m, src)
+}
+func (m *ContainerExtendedResourceRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ContainerExtendedResourceRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ContainerExtendedResourceRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ContainerExtendedResourceRequest proto.InternalMessageInfo
+
func (m *ContainerImage) Reset() { *m = ContainerImage{} }
func (*ContainerImage) ProtoMessage() {}
func (*ContainerImage) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{29}
+ return fileDescriptor_6c07b07c062484ab, []int{30}
}
func (m *ContainerImage) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -892,7 +920,7 @@ var xxx_messageInfo_ContainerImage proto.InternalMessageInfo
func (m *ContainerPort) Reset() { *m = ContainerPort{} }
func (*ContainerPort) ProtoMessage() {}
func (*ContainerPort) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{30}
+ return fileDescriptor_6c07b07c062484ab, []int{31}
}
func (m *ContainerPort) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -920,7 +948,7 @@ var xxx_messageInfo_ContainerPort proto.InternalMessageInfo
func (m *ContainerResizePolicy) Reset() { *m = ContainerResizePolicy{} }
func (*ContainerResizePolicy) ProtoMessage() {}
func (*ContainerResizePolicy) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{31}
+ return fileDescriptor_6c07b07c062484ab, []int{32}
}
func (m *ContainerResizePolicy) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -945,10 +973,66 @@ func (m *ContainerResizePolicy) XXX_DiscardUnknown() {
var xxx_messageInfo_ContainerResizePolicy proto.InternalMessageInfo
+func (m *ContainerRestartRule) Reset() { *m = ContainerRestartRule{} }
+func (*ContainerRestartRule) ProtoMessage() {}
+func (*ContainerRestartRule) Descriptor() ([]byte, []int) {
+ return fileDescriptor_6c07b07c062484ab, []int{33}
+}
+func (m *ContainerRestartRule) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ContainerRestartRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *ContainerRestartRule) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ContainerRestartRule.Merge(m, src)
+}
+func (m *ContainerRestartRule) XXX_Size() int {
+ return m.Size()
+}
+func (m *ContainerRestartRule) XXX_DiscardUnknown() {
+ xxx_messageInfo_ContainerRestartRule.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ContainerRestartRule proto.InternalMessageInfo
+
+func (m *ContainerRestartRuleOnExitCodes) Reset() { *m = ContainerRestartRuleOnExitCodes{} }
+func (*ContainerRestartRuleOnExitCodes) ProtoMessage() {}
+func (*ContainerRestartRuleOnExitCodes) Descriptor() ([]byte, []int) {
+ return fileDescriptor_6c07b07c062484ab, []int{34}
+}
+func (m *ContainerRestartRuleOnExitCodes) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ContainerRestartRuleOnExitCodes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *ContainerRestartRuleOnExitCodes) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ContainerRestartRuleOnExitCodes.Merge(m, src)
+}
+func (m *ContainerRestartRuleOnExitCodes) XXX_Size() int {
+ return m.Size()
+}
+func (m *ContainerRestartRuleOnExitCodes) XXX_DiscardUnknown() {
+ xxx_messageInfo_ContainerRestartRuleOnExitCodes.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ContainerRestartRuleOnExitCodes proto.InternalMessageInfo
+
func (m *ContainerState) Reset() { *m = ContainerState{} }
func (*ContainerState) ProtoMessage() {}
func (*ContainerState) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{32}
+ return fileDescriptor_6c07b07c062484ab, []int{35}
}
func (m *ContainerState) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -976,7 +1060,7 @@ var xxx_messageInfo_ContainerState proto.InternalMessageInfo
func (m *ContainerStateRunning) Reset() { *m = ContainerStateRunning{} }
func (*ContainerStateRunning) ProtoMessage() {}
func (*ContainerStateRunning) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{33}
+ return fileDescriptor_6c07b07c062484ab, []int{36}
}
func (m *ContainerStateRunning) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1004,7 +1088,7 @@ var xxx_messageInfo_ContainerStateRunning proto.InternalMessageInfo
func (m *ContainerStateTerminated) Reset() { *m = ContainerStateTerminated{} }
func (*ContainerStateTerminated) ProtoMessage() {}
func (*ContainerStateTerminated) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{34}
+ return fileDescriptor_6c07b07c062484ab, []int{37}
}
func (m *ContainerStateTerminated) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1032,7 +1116,7 @@ var xxx_messageInfo_ContainerStateTerminated proto.InternalMessageInfo
func (m *ContainerStateWaiting) Reset() { *m = ContainerStateWaiting{} }
func (*ContainerStateWaiting) ProtoMessage() {}
func (*ContainerStateWaiting) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{35}
+ return fileDescriptor_6c07b07c062484ab, []int{38}
}
func (m *ContainerStateWaiting) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1060,7 +1144,7 @@ var xxx_messageInfo_ContainerStateWaiting proto.InternalMessageInfo
func (m *ContainerStatus) Reset() { *m = ContainerStatus{} }
func (*ContainerStatus) ProtoMessage() {}
func (*ContainerStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{36}
+ return fileDescriptor_6c07b07c062484ab, []int{39}
}
func (m *ContainerStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1088,7 +1172,7 @@ var xxx_messageInfo_ContainerStatus proto.InternalMessageInfo
func (m *ContainerUser) Reset() { *m = ContainerUser{} }
func (*ContainerUser) ProtoMessage() {}
func (*ContainerUser) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{37}
+ return fileDescriptor_6c07b07c062484ab, []int{40}
}
func (m *ContainerUser) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1116,7 +1200,7 @@ var xxx_messageInfo_ContainerUser proto.InternalMessageInfo
func (m *DaemonEndpoint) Reset() { *m = DaemonEndpoint{} }
func (*DaemonEndpoint) ProtoMessage() {}
func (*DaemonEndpoint) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{38}
+ return fileDescriptor_6c07b07c062484ab, []int{41}
}
func (m *DaemonEndpoint) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1144,7 +1228,7 @@ var xxx_messageInfo_DaemonEndpoint proto.InternalMessageInfo
func (m *DownwardAPIProjection) Reset() { *m = DownwardAPIProjection{} }
func (*DownwardAPIProjection) ProtoMessage() {}
func (*DownwardAPIProjection) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{39}
+ return fileDescriptor_6c07b07c062484ab, []int{42}
}
func (m *DownwardAPIProjection) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1172,7 +1256,7 @@ var xxx_messageInfo_DownwardAPIProjection proto.InternalMessageInfo
func (m *DownwardAPIVolumeFile) Reset() { *m = DownwardAPIVolumeFile{} }
func (*DownwardAPIVolumeFile) ProtoMessage() {}
func (*DownwardAPIVolumeFile) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{40}
+ return fileDescriptor_6c07b07c062484ab, []int{43}
}
func (m *DownwardAPIVolumeFile) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1200,7 +1284,7 @@ var xxx_messageInfo_DownwardAPIVolumeFile proto.InternalMessageInfo
func (m *DownwardAPIVolumeSource) Reset() { *m = DownwardAPIVolumeSource{} }
func (*DownwardAPIVolumeSource) ProtoMessage() {}
func (*DownwardAPIVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{41}
+ return fileDescriptor_6c07b07c062484ab, []int{44}
}
func (m *DownwardAPIVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1228,7 +1312,7 @@ var xxx_messageInfo_DownwardAPIVolumeSource proto.InternalMessageInfo
func (m *EmptyDirVolumeSource) Reset() { *m = EmptyDirVolumeSource{} }
func (*EmptyDirVolumeSource) ProtoMessage() {}
func (*EmptyDirVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{42}
+ return fileDescriptor_6c07b07c062484ab, []int{45}
}
func (m *EmptyDirVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1256,7 +1340,7 @@ var xxx_messageInfo_EmptyDirVolumeSource proto.InternalMessageInfo
func (m *EndpointAddress) Reset() { *m = EndpointAddress{} }
func (*EndpointAddress) ProtoMessage() {}
func (*EndpointAddress) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{43}
+ return fileDescriptor_6c07b07c062484ab, []int{46}
}
func (m *EndpointAddress) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1284,7 +1368,7 @@ var xxx_messageInfo_EndpointAddress proto.InternalMessageInfo
func (m *EndpointPort) Reset() { *m = EndpointPort{} }
func (*EndpointPort) ProtoMessage() {}
func (*EndpointPort) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{44}
+ return fileDescriptor_6c07b07c062484ab, []int{47}
}
func (m *EndpointPort) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1312,7 +1396,7 @@ var xxx_messageInfo_EndpointPort proto.InternalMessageInfo
func (m *EndpointSubset) Reset() { *m = EndpointSubset{} }
func (*EndpointSubset) ProtoMessage() {}
func (*EndpointSubset) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{45}
+ return fileDescriptor_6c07b07c062484ab, []int{48}
}
func (m *EndpointSubset) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1340,7 +1424,7 @@ var xxx_messageInfo_EndpointSubset proto.InternalMessageInfo
func (m *Endpoints) Reset() { *m = Endpoints{} }
func (*Endpoints) ProtoMessage() {}
func (*Endpoints) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{46}
+ return fileDescriptor_6c07b07c062484ab, []int{49}
}
func (m *Endpoints) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1368,7 +1452,7 @@ var xxx_messageInfo_Endpoints proto.InternalMessageInfo
func (m *EndpointsList) Reset() { *m = EndpointsList{} }
func (*EndpointsList) ProtoMessage() {}
func (*EndpointsList) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{47}
+ return fileDescriptor_6c07b07c062484ab, []int{50}
}
func (m *EndpointsList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1396,7 +1480,7 @@ var xxx_messageInfo_EndpointsList proto.InternalMessageInfo
func (m *EnvFromSource) Reset() { *m = EnvFromSource{} }
func (*EnvFromSource) ProtoMessage() {}
func (*EnvFromSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{48}
+ return fileDescriptor_6c07b07c062484ab, []int{51}
}
func (m *EnvFromSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1424,7 +1508,7 @@ var xxx_messageInfo_EnvFromSource proto.InternalMessageInfo
func (m *EnvVar) Reset() { *m = EnvVar{} }
func (*EnvVar) ProtoMessage() {}
func (*EnvVar) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{49}
+ return fileDescriptor_6c07b07c062484ab, []int{52}
}
func (m *EnvVar) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1452,7 +1536,7 @@ var xxx_messageInfo_EnvVar proto.InternalMessageInfo
func (m *EnvVarSource) Reset() { *m = EnvVarSource{} }
func (*EnvVarSource) ProtoMessage() {}
func (*EnvVarSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{50}
+ return fileDescriptor_6c07b07c062484ab, []int{53}
}
func (m *EnvVarSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1480,7 +1564,7 @@ var xxx_messageInfo_EnvVarSource proto.InternalMessageInfo
func (m *EphemeralContainer) Reset() { *m = EphemeralContainer{} }
func (*EphemeralContainer) ProtoMessage() {}
func (*EphemeralContainer) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{51}
+ return fileDescriptor_6c07b07c062484ab, []int{54}
}
func (m *EphemeralContainer) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1508,7 +1592,7 @@ var xxx_messageInfo_EphemeralContainer proto.InternalMessageInfo
func (m *EphemeralContainerCommon) Reset() { *m = EphemeralContainerCommon{} }
func (*EphemeralContainerCommon) ProtoMessage() {}
func (*EphemeralContainerCommon) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{52}
+ return fileDescriptor_6c07b07c062484ab, []int{55}
}
func (m *EphemeralContainerCommon) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1536,7 +1620,7 @@ var xxx_messageInfo_EphemeralContainerCommon proto.InternalMessageInfo
func (m *EphemeralVolumeSource) Reset() { *m = EphemeralVolumeSource{} }
func (*EphemeralVolumeSource) ProtoMessage() {}
func (*EphemeralVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{53}
+ return fileDescriptor_6c07b07c062484ab, []int{56}
}
func (m *EphemeralVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1564,7 +1648,7 @@ var xxx_messageInfo_EphemeralVolumeSource proto.InternalMessageInfo
func (m *Event) Reset() { *m = Event{} }
func (*Event) ProtoMessage() {}
func (*Event) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{54}
+ return fileDescriptor_6c07b07c062484ab, []int{57}
}
func (m *Event) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1592,7 +1676,7 @@ var xxx_messageInfo_Event proto.InternalMessageInfo
func (m *EventList) Reset() { *m = EventList{} }
func (*EventList) ProtoMessage() {}
func (*EventList) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{55}
+ return fileDescriptor_6c07b07c062484ab, []int{58}
}
func (m *EventList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1620,7 +1704,7 @@ var xxx_messageInfo_EventList proto.InternalMessageInfo
func (m *EventSeries) Reset() { *m = EventSeries{} }
func (*EventSeries) ProtoMessage() {}
func (*EventSeries) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{56}
+ return fileDescriptor_6c07b07c062484ab, []int{59}
}
func (m *EventSeries) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1648,7 +1732,7 @@ var xxx_messageInfo_EventSeries proto.InternalMessageInfo
func (m *EventSource) Reset() { *m = EventSource{} }
func (*EventSource) ProtoMessage() {}
func (*EventSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{57}
+ return fileDescriptor_6c07b07c062484ab, []int{60}
}
func (m *EventSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1676,7 +1760,7 @@ var xxx_messageInfo_EventSource proto.InternalMessageInfo
func (m *ExecAction) Reset() { *m = ExecAction{} }
func (*ExecAction) ProtoMessage() {}
func (*ExecAction) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{58}
+ return fileDescriptor_6c07b07c062484ab, []int{61}
}
func (m *ExecAction) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1704,7 +1788,7 @@ var xxx_messageInfo_ExecAction proto.InternalMessageInfo
func (m *FCVolumeSource) Reset() { *m = FCVolumeSource{} }
func (*FCVolumeSource) ProtoMessage() {}
func (*FCVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{59}
+ return fileDescriptor_6c07b07c062484ab, []int{62}
}
func (m *FCVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1729,10 +1813,38 @@ func (m *FCVolumeSource) XXX_DiscardUnknown() {
var xxx_messageInfo_FCVolumeSource proto.InternalMessageInfo
+func (m *FileKeySelector) Reset() { *m = FileKeySelector{} }
+func (*FileKeySelector) ProtoMessage() {}
+func (*FileKeySelector) Descriptor() ([]byte, []int) {
+ return fileDescriptor_6c07b07c062484ab, []int{63}
+}
+func (m *FileKeySelector) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *FileKeySelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *FileKeySelector) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_FileKeySelector.Merge(m, src)
+}
+func (m *FileKeySelector) XXX_Size() int {
+ return m.Size()
+}
+func (m *FileKeySelector) XXX_DiscardUnknown() {
+ xxx_messageInfo_FileKeySelector.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_FileKeySelector proto.InternalMessageInfo
+
func (m *FlexPersistentVolumeSource) Reset() { *m = FlexPersistentVolumeSource{} }
func (*FlexPersistentVolumeSource) ProtoMessage() {}
func (*FlexPersistentVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{60}
+ return fileDescriptor_6c07b07c062484ab, []int{64}
}
func (m *FlexPersistentVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1760,7 +1872,7 @@ var xxx_messageInfo_FlexPersistentVolumeSource proto.InternalMessageInfo
func (m *FlexVolumeSource) Reset() { *m = FlexVolumeSource{} }
func (*FlexVolumeSource) ProtoMessage() {}
func (*FlexVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{61}
+ return fileDescriptor_6c07b07c062484ab, []int{65}
}
func (m *FlexVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1788,7 +1900,7 @@ var xxx_messageInfo_FlexVolumeSource proto.InternalMessageInfo
func (m *FlockerVolumeSource) Reset() { *m = FlockerVolumeSource{} }
func (*FlockerVolumeSource) ProtoMessage() {}
func (*FlockerVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{62}
+ return fileDescriptor_6c07b07c062484ab, []int{66}
}
func (m *FlockerVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1816,7 +1928,7 @@ var xxx_messageInfo_FlockerVolumeSource proto.InternalMessageInfo
func (m *GCEPersistentDiskVolumeSource) Reset() { *m = GCEPersistentDiskVolumeSource{} }
func (*GCEPersistentDiskVolumeSource) ProtoMessage() {}
func (*GCEPersistentDiskVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{63}
+ return fileDescriptor_6c07b07c062484ab, []int{67}
}
func (m *GCEPersistentDiskVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1844,7 +1956,7 @@ var xxx_messageInfo_GCEPersistentDiskVolumeSource proto.InternalMessageInfo
func (m *GRPCAction) Reset() { *m = GRPCAction{} }
func (*GRPCAction) ProtoMessage() {}
func (*GRPCAction) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{64}
+ return fileDescriptor_6c07b07c062484ab, []int{68}
}
func (m *GRPCAction) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1872,7 +1984,7 @@ var xxx_messageInfo_GRPCAction proto.InternalMessageInfo
func (m *GitRepoVolumeSource) Reset() { *m = GitRepoVolumeSource{} }
func (*GitRepoVolumeSource) ProtoMessage() {}
func (*GitRepoVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{65}
+ return fileDescriptor_6c07b07c062484ab, []int{69}
}
func (m *GitRepoVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1900,7 +2012,7 @@ var xxx_messageInfo_GitRepoVolumeSource proto.InternalMessageInfo
func (m *GlusterfsPersistentVolumeSource) Reset() { *m = GlusterfsPersistentVolumeSource{} }
func (*GlusterfsPersistentVolumeSource) ProtoMessage() {}
func (*GlusterfsPersistentVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{66}
+ return fileDescriptor_6c07b07c062484ab, []int{70}
}
func (m *GlusterfsPersistentVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1928,7 +2040,7 @@ var xxx_messageInfo_GlusterfsPersistentVolumeSource proto.InternalMessageInfo
func (m *GlusterfsVolumeSource) Reset() { *m = GlusterfsVolumeSource{} }
func (*GlusterfsVolumeSource) ProtoMessage() {}
func (*GlusterfsVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{67}
+ return fileDescriptor_6c07b07c062484ab, []int{71}
}
func (m *GlusterfsVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1956,7 +2068,7 @@ var xxx_messageInfo_GlusterfsVolumeSource proto.InternalMessageInfo
func (m *HTTPGetAction) Reset() { *m = HTTPGetAction{} }
func (*HTTPGetAction) ProtoMessage() {}
func (*HTTPGetAction) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{68}
+ return fileDescriptor_6c07b07c062484ab, []int{72}
}
func (m *HTTPGetAction) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1984,7 +2096,7 @@ var xxx_messageInfo_HTTPGetAction proto.InternalMessageInfo
func (m *HTTPHeader) Reset() { *m = HTTPHeader{} }
func (*HTTPHeader) ProtoMessage() {}
func (*HTTPHeader) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{69}
+ return fileDescriptor_6c07b07c062484ab, []int{73}
}
func (m *HTTPHeader) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2012,7 +2124,7 @@ var xxx_messageInfo_HTTPHeader proto.InternalMessageInfo
func (m *HostAlias) Reset() { *m = HostAlias{} }
func (*HostAlias) ProtoMessage() {}
func (*HostAlias) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{70}
+ return fileDescriptor_6c07b07c062484ab, []int{74}
}
func (m *HostAlias) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2040,7 +2152,7 @@ var xxx_messageInfo_HostAlias proto.InternalMessageInfo
func (m *HostIP) Reset() { *m = HostIP{} }
func (*HostIP) ProtoMessage() {}
func (*HostIP) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{71}
+ return fileDescriptor_6c07b07c062484ab, []int{75}
}
func (m *HostIP) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2068,7 +2180,7 @@ var xxx_messageInfo_HostIP proto.InternalMessageInfo
func (m *HostPathVolumeSource) Reset() { *m = HostPathVolumeSource{} }
func (*HostPathVolumeSource) ProtoMessage() {}
func (*HostPathVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{72}
+ return fileDescriptor_6c07b07c062484ab, []int{76}
}
func (m *HostPathVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2096,7 +2208,7 @@ var xxx_messageInfo_HostPathVolumeSource proto.InternalMessageInfo
func (m *ISCSIPersistentVolumeSource) Reset() { *m = ISCSIPersistentVolumeSource{} }
func (*ISCSIPersistentVolumeSource) ProtoMessage() {}
func (*ISCSIPersistentVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{73}
+ return fileDescriptor_6c07b07c062484ab, []int{77}
}
func (m *ISCSIPersistentVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2124,7 +2236,7 @@ var xxx_messageInfo_ISCSIPersistentVolumeSource proto.InternalMessageInfo
func (m *ISCSIVolumeSource) Reset() { *m = ISCSIVolumeSource{} }
func (*ISCSIVolumeSource) ProtoMessage() {}
func (*ISCSIVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{74}
+ return fileDescriptor_6c07b07c062484ab, []int{78}
}
func (m *ISCSIVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2152,7 +2264,7 @@ var xxx_messageInfo_ISCSIVolumeSource proto.InternalMessageInfo
func (m *ImageVolumeSource) Reset() { *m = ImageVolumeSource{} }
func (*ImageVolumeSource) ProtoMessage() {}
func (*ImageVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{75}
+ return fileDescriptor_6c07b07c062484ab, []int{79}
}
func (m *ImageVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2180,7 +2292,7 @@ var xxx_messageInfo_ImageVolumeSource proto.InternalMessageInfo
func (m *KeyToPath) Reset() { *m = KeyToPath{} }
func (*KeyToPath) ProtoMessage() {}
func (*KeyToPath) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{76}
+ return fileDescriptor_6c07b07c062484ab, []int{80}
}
func (m *KeyToPath) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2208,7 +2320,7 @@ var xxx_messageInfo_KeyToPath proto.InternalMessageInfo
func (m *Lifecycle) Reset() { *m = Lifecycle{} }
func (*Lifecycle) ProtoMessage() {}
func (*Lifecycle) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{77}
+ return fileDescriptor_6c07b07c062484ab, []int{81}
}
func (m *Lifecycle) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2236,7 +2348,7 @@ var xxx_messageInfo_Lifecycle proto.InternalMessageInfo
func (m *LifecycleHandler) Reset() { *m = LifecycleHandler{} }
func (*LifecycleHandler) ProtoMessage() {}
func (*LifecycleHandler) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{78}
+ return fileDescriptor_6c07b07c062484ab, []int{82}
}
func (m *LifecycleHandler) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2264,7 +2376,7 @@ var xxx_messageInfo_LifecycleHandler proto.InternalMessageInfo
func (m *LimitRange) Reset() { *m = LimitRange{} }
func (*LimitRange) ProtoMessage() {}
func (*LimitRange) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{79}
+ return fileDescriptor_6c07b07c062484ab, []int{83}
}
func (m *LimitRange) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2292,7 +2404,7 @@ var xxx_messageInfo_LimitRange proto.InternalMessageInfo
func (m *LimitRangeItem) Reset() { *m = LimitRangeItem{} }
func (*LimitRangeItem) ProtoMessage() {}
func (*LimitRangeItem) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{80}
+ return fileDescriptor_6c07b07c062484ab, []int{84}
}
func (m *LimitRangeItem) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2320,7 +2432,7 @@ var xxx_messageInfo_LimitRangeItem proto.InternalMessageInfo
func (m *LimitRangeList) Reset() { *m = LimitRangeList{} }
func (*LimitRangeList) ProtoMessage() {}
func (*LimitRangeList) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{81}
+ return fileDescriptor_6c07b07c062484ab, []int{85}
}
func (m *LimitRangeList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2348,7 +2460,7 @@ var xxx_messageInfo_LimitRangeList proto.InternalMessageInfo
func (m *LimitRangeSpec) Reset() { *m = LimitRangeSpec{} }
func (*LimitRangeSpec) ProtoMessage() {}
func (*LimitRangeSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{82}
+ return fileDescriptor_6c07b07c062484ab, []int{86}
}
func (m *LimitRangeSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2376,7 +2488,7 @@ var xxx_messageInfo_LimitRangeSpec proto.InternalMessageInfo
func (m *LinuxContainerUser) Reset() { *m = LinuxContainerUser{} }
func (*LinuxContainerUser) ProtoMessage() {}
func (*LinuxContainerUser) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{83}
+ return fileDescriptor_6c07b07c062484ab, []int{87}
}
func (m *LinuxContainerUser) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2404,7 +2516,7 @@ var xxx_messageInfo_LinuxContainerUser proto.InternalMessageInfo
func (m *List) Reset() { *m = List{} }
func (*List) ProtoMessage() {}
func (*List) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{84}
+ return fileDescriptor_6c07b07c062484ab, []int{88}
}
func (m *List) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2432,7 +2544,7 @@ var xxx_messageInfo_List proto.InternalMessageInfo
func (m *LoadBalancerIngress) Reset() { *m = LoadBalancerIngress{} }
func (*LoadBalancerIngress) ProtoMessage() {}
func (*LoadBalancerIngress) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{85}
+ return fileDescriptor_6c07b07c062484ab, []int{89}
}
func (m *LoadBalancerIngress) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2460,7 +2572,7 @@ var xxx_messageInfo_LoadBalancerIngress proto.InternalMessageInfo
func (m *LoadBalancerStatus) Reset() { *m = LoadBalancerStatus{} }
func (*LoadBalancerStatus) ProtoMessage() {}
func (*LoadBalancerStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{86}
+ return fileDescriptor_6c07b07c062484ab, []int{90}
}
func (m *LoadBalancerStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2488,7 +2600,7 @@ var xxx_messageInfo_LoadBalancerStatus proto.InternalMessageInfo
func (m *LocalObjectReference) Reset() { *m = LocalObjectReference{} }
func (*LocalObjectReference) ProtoMessage() {}
func (*LocalObjectReference) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{87}
+ return fileDescriptor_6c07b07c062484ab, []int{91}
}
func (m *LocalObjectReference) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2516,7 +2628,7 @@ var xxx_messageInfo_LocalObjectReference proto.InternalMessageInfo
func (m *LocalVolumeSource) Reset() { *m = LocalVolumeSource{} }
func (*LocalVolumeSource) ProtoMessage() {}
func (*LocalVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{88}
+ return fileDescriptor_6c07b07c062484ab, []int{92}
}
func (m *LocalVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2544,7 +2656,7 @@ var xxx_messageInfo_LocalVolumeSource proto.InternalMessageInfo
func (m *ModifyVolumeStatus) Reset() { *m = ModifyVolumeStatus{} }
func (*ModifyVolumeStatus) ProtoMessage() {}
func (*ModifyVolumeStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{89}
+ return fileDescriptor_6c07b07c062484ab, []int{93}
}
func (m *ModifyVolumeStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2572,7 +2684,7 @@ var xxx_messageInfo_ModifyVolumeStatus proto.InternalMessageInfo
func (m *NFSVolumeSource) Reset() { *m = NFSVolumeSource{} }
func (*NFSVolumeSource) ProtoMessage() {}
func (*NFSVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{90}
+ return fileDescriptor_6c07b07c062484ab, []int{94}
}
func (m *NFSVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2600,7 +2712,7 @@ var xxx_messageInfo_NFSVolumeSource proto.InternalMessageInfo
func (m *Namespace) Reset() { *m = Namespace{} }
func (*Namespace) ProtoMessage() {}
func (*Namespace) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{91}
+ return fileDescriptor_6c07b07c062484ab, []int{95}
}
func (m *Namespace) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2628,7 +2740,7 @@ var xxx_messageInfo_Namespace proto.InternalMessageInfo
func (m *NamespaceCondition) Reset() { *m = NamespaceCondition{} }
func (*NamespaceCondition) ProtoMessage() {}
func (*NamespaceCondition) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{92}
+ return fileDescriptor_6c07b07c062484ab, []int{96}
}
func (m *NamespaceCondition) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2656,7 +2768,7 @@ var xxx_messageInfo_NamespaceCondition proto.InternalMessageInfo
func (m *NamespaceList) Reset() { *m = NamespaceList{} }
func (*NamespaceList) ProtoMessage() {}
func (*NamespaceList) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{93}
+ return fileDescriptor_6c07b07c062484ab, []int{97}
}
func (m *NamespaceList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2684,7 +2796,7 @@ var xxx_messageInfo_NamespaceList proto.InternalMessageInfo
func (m *NamespaceSpec) Reset() { *m = NamespaceSpec{} }
func (*NamespaceSpec) ProtoMessage() {}
func (*NamespaceSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{94}
+ return fileDescriptor_6c07b07c062484ab, []int{98}
}
func (m *NamespaceSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2712,7 +2824,7 @@ var xxx_messageInfo_NamespaceSpec proto.InternalMessageInfo
func (m *NamespaceStatus) Reset() { *m = NamespaceStatus{} }
func (*NamespaceStatus) ProtoMessage() {}
func (*NamespaceStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{95}
+ return fileDescriptor_6c07b07c062484ab, []int{99}
}
func (m *NamespaceStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2740,7 +2852,7 @@ var xxx_messageInfo_NamespaceStatus proto.InternalMessageInfo
func (m *Node) Reset() { *m = Node{} }
func (*Node) ProtoMessage() {}
func (*Node) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{96}
+ return fileDescriptor_6c07b07c062484ab, []int{100}
}
func (m *Node) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2768,7 +2880,7 @@ var xxx_messageInfo_Node proto.InternalMessageInfo
func (m *NodeAddress) Reset() { *m = NodeAddress{} }
func (*NodeAddress) ProtoMessage() {}
func (*NodeAddress) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{97}
+ return fileDescriptor_6c07b07c062484ab, []int{101}
}
func (m *NodeAddress) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2796,7 +2908,7 @@ var xxx_messageInfo_NodeAddress proto.InternalMessageInfo
func (m *NodeAffinity) Reset() { *m = NodeAffinity{} }
func (*NodeAffinity) ProtoMessage() {}
func (*NodeAffinity) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{98}
+ return fileDescriptor_6c07b07c062484ab, []int{102}
}
func (m *NodeAffinity) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2824,7 +2936,7 @@ var xxx_messageInfo_NodeAffinity proto.InternalMessageInfo
func (m *NodeCondition) Reset() { *m = NodeCondition{} }
func (*NodeCondition) ProtoMessage() {}
func (*NodeCondition) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{99}
+ return fileDescriptor_6c07b07c062484ab, []int{103}
}
func (m *NodeCondition) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2852,7 +2964,7 @@ var xxx_messageInfo_NodeCondition proto.InternalMessageInfo
func (m *NodeConfigSource) Reset() { *m = NodeConfigSource{} }
func (*NodeConfigSource) ProtoMessage() {}
func (*NodeConfigSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{100}
+ return fileDescriptor_6c07b07c062484ab, []int{104}
}
func (m *NodeConfigSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2880,7 +2992,7 @@ var xxx_messageInfo_NodeConfigSource proto.InternalMessageInfo
func (m *NodeConfigStatus) Reset() { *m = NodeConfigStatus{} }
func (*NodeConfigStatus) ProtoMessage() {}
func (*NodeConfigStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{101}
+ return fileDescriptor_6c07b07c062484ab, []int{105}
}
func (m *NodeConfigStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2908,7 +3020,7 @@ var xxx_messageInfo_NodeConfigStatus proto.InternalMessageInfo
func (m *NodeDaemonEndpoints) Reset() { *m = NodeDaemonEndpoints{} }
func (*NodeDaemonEndpoints) ProtoMessage() {}
func (*NodeDaemonEndpoints) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{102}
+ return fileDescriptor_6c07b07c062484ab, []int{106}
}
func (m *NodeDaemonEndpoints) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2936,7 +3048,7 @@ var xxx_messageInfo_NodeDaemonEndpoints proto.InternalMessageInfo
func (m *NodeFeatures) Reset() { *m = NodeFeatures{} }
func (*NodeFeatures) ProtoMessage() {}
func (*NodeFeatures) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{103}
+ return fileDescriptor_6c07b07c062484ab, []int{107}
}
func (m *NodeFeatures) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2964,7 +3076,7 @@ var xxx_messageInfo_NodeFeatures proto.InternalMessageInfo
func (m *NodeList) Reset() { *m = NodeList{} }
func (*NodeList) ProtoMessage() {}
func (*NodeList) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{104}
+ return fileDescriptor_6c07b07c062484ab, []int{108}
}
func (m *NodeList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -2992,7 +3104,7 @@ var xxx_messageInfo_NodeList proto.InternalMessageInfo
func (m *NodeProxyOptions) Reset() { *m = NodeProxyOptions{} }
func (*NodeProxyOptions) ProtoMessage() {}
func (*NodeProxyOptions) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{105}
+ return fileDescriptor_6c07b07c062484ab, []int{109}
}
func (m *NodeProxyOptions) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3020,7 +3132,7 @@ var xxx_messageInfo_NodeProxyOptions proto.InternalMessageInfo
func (m *NodeRuntimeHandler) Reset() { *m = NodeRuntimeHandler{} }
func (*NodeRuntimeHandler) ProtoMessage() {}
func (*NodeRuntimeHandler) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{106}
+ return fileDescriptor_6c07b07c062484ab, []int{110}
}
func (m *NodeRuntimeHandler) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3048,7 +3160,7 @@ var xxx_messageInfo_NodeRuntimeHandler proto.InternalMessageInfo
func (m *NodeRuntimeHandlerFeatures) Reset() { *m = NodeRuntimeHandlerFeatures{} }
func (*NodeRuntimeHandlerFeatures) ProtoMessage() {}
func (*NodeRuntimeHandlerFeatures) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{107}
+ return fileDescriptor_6c07b07c062484ab, []int{111}
}
func (m *NodeRuntimeHandlerFeatures) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3076,7 +3188,7 @@ var xxx_messageInfo_NodeRuntimeHandlerFeatures proto.InternalMessageInfo
func (m *NodeSelector) Reset() { *m = NodeSelector{} }
func (*NodeSelector) ProtoMessage() {}
func (*NodeSelector) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{108}
+ return fileDescriptor_6c07b07c062484ab, []int{112}
}
func (m *NodeSelector) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3104,7 +3216,7 @@ var xxx_messageInfo_NodeSelector proto.InternalMessageInfo
func (m *NodeSelectorRequirement) Reset() { *m = NodeSelectorRequirement{} }
func (*NodeSelectorRequirement) ProtoMessage() {}
func (*NodeSelectorRequirement) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{109}
+ return fileDescriptor_6c07b07c062484ab, []int{113}
}
func (m *NodeSelectorRequirement) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3132,7 +3244,7 @@ var xxx_messageInfo_NodeSelectorRequirement proto.InternalMessageInfo
func (m *NodeSelectorTerm) Reset() { *m = NodeSelectorTerm{} }
func (*NodeSelectorTerm) ProtoMessage() {}
func (*NodeSelectorTerm) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{110}
+ return fileDescriptor_6c07b07c062484ab, []int{114}
}
func (m *NodeSelectorTerm) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3160,7 +3272,7 @@ var xxx_messageInfo_NodeSelectorTerm proto.InternalMessageInfo
func (m *NodeSpec) Reset() { *m = NodeSpec{} }
func (*NodeSpec) ProtoMessage() {}
func (*NodeSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{111}
+ return fileDescriptor_6c07b07c062484ab, []int{115}
}
func (m *NodeSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3188,7 +3300,7 @@ var xxx_messageInfo_NodeSpec proto.InternalMessageInfo
func (m *NodeStatus) Reset() { *m = NodeStatus{} }
func (*NodeStatus) ProtoMessage() {}
func (*NodeStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{112}
+ return fileDescriptor_6c07b07c062484ab, []int{116}
}
func (m *NodeStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3216,7 +3328,7 @@ var xxx_messageInfo_NodeStatus proto.InternalMessageInfo
func (m *NodeSwapStatus) Reset() { *m = NodeSwapStatus{} }
func (*NodeSwapStatus) ProtoMessage() {}
func (*NodeSwapStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{113}
+ return fileDescriptor_6c07b07c062484ab, []int{117}
}
func (m *NodeSwapStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3244,7 +3356,7 @@ var xxx_messageInfo_NodeSwapStatus proto.InternalMessageInfo
func (m *NodeSystemInfo) Reset() { *m = NodeSystemInfo{} }
func (*NodeSystemInfo) ProtoMessage() {}
func (*NodeSystemInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{114}
+ return fileDescriptor_6c07b07c062484ab, []int{118}
}
func (m *NodeSystemInfo) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3272,7 +3384,7 @@ var xxx_messageInfo_NodeSystemInfo proto.InternalMessageInfo
func (m *ObjectFieldSelector) Reset() { *m = ObjectFieldSelector{} }
func (*ObjectFieldSelector) ProtoMessage() {}
func (*ObjectFieldSelector) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{115}
+ return fileDescriptor_6c07b07c062484ab, []int{119}
}
func (m *ObjectFieldSelector) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3300,7 +3412,7 @@ var xxx_messageInfo_ObjectFieldSelector proto.InternalMessageInfo
func (m *ObjectReference) Reset() { *m = ObjectReference{} }
func (*ObjectReference) ProtoMessage() {}
func (*ObjectReference) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{116}
+ return fileDescriptor_6c07b07c062484ab, []int{120}
}
func (m *ObjectReference) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3328,7 +3440,7 @@ var xxx_messageInfo_ObjectReference proto.InternalMessageInfo
func (m *PersistentVolume) Reset() { *m = PersistentVolume{} }
func (*PersistentVolume) ProtoMessage() {}
func (*PersistentVolume) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{117}
+ return fileDescriptor_6c07b07c062484ab, []int{121}
}
func (m *PersistentVolume) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3356,7 +3468,7 @@ var xxx_messageInfo_PersistentVolume proto.InternalMessageInfo
func (m *PersistentVolumeClaim) Reset() { *m = PersistentVolumeClaim{} }
func (*PersistentVolumeClaim) ProtoMessage() {}
func (*PersistentVolumeClaim) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{118}
+ return fileDescriptor_6c07b07c062484ab, []int{122}
}
func (m *PersistentVolumeClaim) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3384,7 +3496,7 @@ var xxx_messageInfo_PersistentVolumeClaim proto.InternalMessageInfo
func (m *PersistentVolumeClaimCondition) Reset() { *m = PersistentVolumeClaimCondition{} }
func (*PersistentVolumeClaimCondition) ProtoMessage() {}
func (*PersistentVolumeClaimCondition) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{119}
+ return fileDescriptor_6c07b07c062484ab, []int{123}
}
func (m *PersistentVolumeClaimCondition) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3412,7 +3524,7 @@ var xxx_messageInfo_PersistentVolumeClaimCondition proto.InternalMessageInfo
func (m *PersistentVolumeClaimList) Reset() { *m = PersistentVolumeClaimList{} }
func (*PersistentVolumeClaimList) ProtoMessage() {}
func (*PersistentVolumeClaimList) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{120}
+ return fileDescriptor_6c07b07c062484ab, []int{124}
}
func (m *PersistentVolumeClaimList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3440,7 +3552,7 @@ var xxx_messageInfo_PersistentVolumeClaimList proto.InternalMessageInfo
func (m *PersistentVolumeClaimSpec) Reset() { *m = PersistentVolumeClaimSpec{} }
func (*PersistentVolumeClaimSpec) ProtoMessage() {}
func (*PersistentVolumeClaimSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{121}
+ return fileDescriptor_6c07b07c062484ab, []int{125}
}
func (m *PersistentVolumeClaimSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3468,7 +3580,7 @@ var xxx_messageInfo_PersistentVolumeClaimSpec proto.InternalMessageInfo
func (m *PersistentVolumeClaimStatus) Reset() { *m = PersistentVolumeClaimStatus{} }
func (*PersistentVolumeClaimStatus) ProtoMessage() {}
func (*PersistentVolumeClaimStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{122}
+ return fileDescriptor_6c07b07c062484ab, []int{126}
}
func (m *PersistentVolumeClaimStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3496,7 +3608,7 @@ var xxx_messageInfo_PersistentVolumeClaimStatus proto.InternalMessageInfo
func (m *PersistentVolumeClaimTemplate) Reset() { *m = PersistentVolumeClaimTemplate{} }
func (*PersistentVolumeClaimTemplate) ProtoMessage() {}
func (*PersistentVolumeClaimTemplate) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{123}
+ return fileDescriptor_6c07b07c062484ab, []int{127}
}
func (m *PersistentVolumeClaimTemplate) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3524,7 +3636,7 @@ var xxx_messageInfo_PersistentVolumeClaimTemplate proto.InternalMessageInfo
func (m *PersistentVolumeClaimVolumeSource) Reset() { *m = PersistentVolumeClaimVolumeSource{} }
func (*PersistentVolumeClaimVolumeSource) ProtoMessage() {}
func (*PersistentVolumeClaimVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{124}
+ return fileDescriptor_6c07b07c062484ab, []int{128}
}
func (m *PersistentVolumeClaimVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3552,7 +3664,7 @@ var xxx_messageInfo_PersistentVolumeClaimVolumeSource proto.InternalMessageInfo
func (m *PersistentVolumeList) Reset() { *m = PersistentVolumeList{} }
func (*PersistentVolumeList) ProtoMessage() {}
func (*PersistentVolumeList) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{125}
+ return fileDescriptor_6c07b07c062484ab, []int{129}
}
func (m *PersistentVolumeList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3580,7 +3692,7 @@ var xxx_messageInfo_PersistentVolumeList proto.InternalMessageInfo
func (m *PersistentVolumeSource) Reset() { *m = PersistentVolumeSource{} }
func (*PersistentVolumeSource) ProtoMessage() {}
func (*PersistentVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{126}
+ return fileDescriptor_6c07b07c062484ab, []int{130}
}
func (m *PersistentVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3608,7 +3720,7 @@ var xxx_messageInfo_PersistentVolumeSource proto.InternalMessageInfo
func (m *PersistentVolumeSpec) Reset() { *m = PersistentVolumeSpec{} }
func (*PersistentVolumeSpec) ProtoMessage() {}
func (*PersistentVolumeSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{127}
+ return fileDescriptor_6c07b07c062484ab, []int{131}
}
func (m *PersistentVolumeSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3636,7 +3748,7 @@ var xxx_messageInfo_PersistentVolumeSpec proto.InternalMessageInfo
func (m *PersistentVolumeStatus) Reset() { *m = PersistentVolumeStatus{} }
func (*PersistentVolumeStatus) ProtoMessage() {}
func (*PersistentVolumeStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{128}
+ return fileDescriptor_6c07b07c062484ab, []int{132}
}
func (m *PersistentVolumeStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3664,7 +3776,7 @@ var xxx_messageInfo_PersistentVolumeStatus proto.InternalMessageInfo
func (m *PhotonPersistentDiskVolumeSource) Reset() { *m = PhotonPersistentDiskVolumeSource{} }
func (*PhotonPersistentDiskVolumeSource) ProtoMessage() {}
func (*PhotonPersistentDiskVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{129}
+ return fileDescriptor_6c07b07c062484ab, []int{133}
}
func (m *PhotonPersistentDiskVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3692,7 +3804,7 @@ var xxx_messageInfo_PhotonPersistentDiskVolumeSource proto.InternalMessageInfo
func (m *Pod) Reset() { *m = Pod{} }
func (*Pod) ProtoMessage() {}
func (*Pod) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{130}
+ return fileDescriptor_6c07b07c062484ab, []int{134}
}
func (m *Pod) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3720,7 +3832,7 @@ var xxx_messageInfo_Pod proto.InternalMessageInfo
func (m *PodAffinity) Reset() { *m = PodAffinity{} }
func (*PodAffinity) ProtoMessage() {}
func (*PodAffinity) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{131}
+ return fileDescriptor_6c07b07c062484ab, []int{135}
}
func (m *PodAffinity) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3748,7 +3860,7 @@ var xxx_messageInfo_PodAffinity proto.InternalMessageInfo
func (m *PodAffinityTerm) Reset() { *m = PodAffinityTerm{} }
func (*PodAffinityTerm) ProtoMessage() {}
func (*PodAffinityTerm) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{132}
+ return fileDescriptor_6c07b07c062484ab, []int{136}
}
func (m *PodAffinityTerm) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3776,7 +3888,7 @@ var xxx_messageInfo_PodAffinityTerm proto.InternalMessageInfo
func (m *PodAntiAffinity) Reset() { *m = PodAntiAffinity{} }
func (*PodAntiAffinity) ProtoMessage() {}
func (*PodAntiAffinity) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{133}
+ return fileDescriptor_6c07b07c062484ab, []int{137}
}
func (m *PodAntiAffinity) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3804,7 +3916,7 @@ var xxx_messageInfo_PodAntiAffinity proto.InternalMessageInfo
func (m *PodAttachOptions) Reset() { *m = PodAttachOptions{} }
func (*PodAttachOptions) ProtoMessage() {}
func (*PodAttachOptions) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{134}
+ return fileDescriptor_6c07b07c062484ab, []int{138}
}
func (m *PodAttachOptions) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3829,10 +3941,38 @@ func (m *PodAttachOptions) XXX_DiscardUnknown() {
var xxx_messageInfo_PodAttachOptions proto.InternalMessageInfo
+func (m *PodCertificateProjection) Reset() { *m = PodCertificateProjection{} }
+func (*PodCertificateProjection) ProtoMessage() {}
+func (*PodCertificateProjection) Descriptor() ([]byte, []int) {
+ return fileDescriptor_6c07b07c062484ab, []int{139}
+}
+func (m *PodCertificateProjection) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *PodCertificateProjection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *PodCertificateProjection) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PodCertificateProjection.Merge(m, src)
+}
+func (m *PodCertificateProjection) XXX_Size() int {
+ return m.Size()
+}
+func (m *PodCertificateProjection) XXX_DiscardUnknown() {
+ xxx_messageInfo_PodCertificateProjection.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PodCertificateProjection proto.InternalMessageInfo
+
func (m *PodCondition) Reset() { *m = PodCondition{} }
func (*PodCondition) ProtoMessage() {}
func (*PodCondition) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{135}
+ return fileDescriptor_6c07b07c062484ab, []int{140}
}
func (m *PodCondition) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3860,7 +4000,7 @@ var xxx_messageInfo_PodCondition proto.InternalMessageInfo
func (m *PodDNSConfig) Reset() { *m = PodDNSConfig{} }
func (*PodDNSConfig) ProtoMessage() {}
func (*PodDNSConfig) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{136}
+ return fileDescriptor_6c07b07c062484ab, []int{141}
}
func (m *PodDNSConfig) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3888,7 +4028,7 @@ var xxx_messageInfo_PodDNSConfig proto.InternalMessageInfo
func (m *PodDNSConfigOption) Reset() { *m = PodDNSConfigOption{} }
func (*PodDNSConfigOption) ProtoMessage() {}
func (*PodDNSConfigOption) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{137}
+ return fileDescriptor_6c07b07c062484ab, []int{142}
}
func (m *PodDNSConfigOption) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3916,7 +4056,7 @@ var xxx_messageInfo_PodDNSConfigOption proto.InternalMessageInfo
func (m *PodExecOptions) Reset() { *m = PodExecOptions{} }
func (*PodExecOptions) ProtoMessage() {}
func (*PodExecOptions) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{138}
+ return fileDescriptor_6c07b07c062484ab, []int{143}
}
func (m *PodExecOptions) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3941,10 +4081,38 @@ func (m *PodExecOptions) XXX_DiscardUnknown() {
var xxx_messageInfo_PodExecOptions proto.InternalMessageInfo
+func (m *PodExtendedResourceClaimStatus) Reset() { *m = PodExtendedResourceClaimStatus{} }
+func (*PodExtendedResourceClaimStatus) ProtoMessage() {}
+func (*PodExtendedResourceClaimStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptor_6c07b07c062484ab, []int{144}
+}
+func (m *PodExtendedResourceClaimStatus) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *PodExtendedResourceClaimStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *PodExtendedResourceClaimStatus) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PodExtendedResourceClaimStatus.Merge(m, src)
+}
+func (m *PodExtendedResourceClaimStatus) XXX_Size() int {
+ return m.Size()
+}
+func (m *PodExtendedResourceClaimStatus) XXX_DiscardUnknown() {
+ xxx_messageInfo_PodExtendedResourceClaimStatus.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PodExtendedResourceClaimStatus proto.InternalMessageInfo
+
func (m *PodIP) Reset() { *m = PodIP{} }
func (*PodIP) ProtoMessage() {}
func (*PodIP) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{139}
+ return fileDescriptor_6c07b07c062484ab, []int{145}
}
func (m *PodIP) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -3972,7 +4140,7 @@ var xxx_messageInfo_PodIP proto.InternalMessageInfo
func (m *PodList) Reset() { *m = PodList{} }
func (*PodList) ProtoMessage() {}
func (*PodList) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{140}
+ return fileDescriptor_6c07b07c062484ab, []int{146}
}
func (m *PodList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4000,7 +4168,7 @@ var xxx_messageInfo_PodList proto.InternalMessageInfo
func (m *PodLogOptions) Reset() { *m = PodLogOptions{} }
func (*PodLogOptions) ProtoMessage() {}
func (*PodLogOptions) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{141}
+ return fileDescriptor_6c07b07c062484ab, []int{147}
}
func (m *PodLogOptions) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4028,7 +4196,7 @@ var xxx_messageInfo_PodLogOptions proto.InternalMessageInfo
func (m *PodOS) Reset() { *m = PodOS{} }
func (*PodOS) ProtoMessage() {}
func (*PodOS) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{142}
+ return fileDescriptor_6c07b07c062484ab, []int{148}
}
func (m *PodOS) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4056,7 +4224,7 @@ var xxx_messageInfo_PodOS proto.InternalMessageInfo
func (m *PodPortForwardOptions) Reset() { *m = PodPortForwardOptions{} }
func (*PodPortForwardOptions) ProtoMessage() {}
func (*PodPortForwardOptions) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{143}
+ return fileDescriptor_6c07b07c062484ab, []int{149}
}
func (m *PodPortForwardOptions) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4084,7 +4252,7 @@ var xxx_messageInfo_PodPortForwardOptions proto.InternalMessageInfo
func (m *PodProxyOptions) Reset() { *m = PodProxyOptions{} }
func (*PodProxyOptions) ProtoMessage() {}
func (*PodProxyOptions) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{144}
+ return fileDescriptor_6c07b07c062484ab, []int{150}
}
func (m *PodProxyOptions) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4112,7 +4280,7 @@ var xxx_messageInfo_PodProxyOptions proto.InternalMessageInfo
func (m *PodReadinessGate) Reset() { *m = PodReadinessGate{} }
func (*PodReadinessGate) ProtoMessage() {}
func (*PodReadinessGate) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{145}
+ return fileDescriptor_6c07b07c062484ab, []int{151}
}
func (m *PodReadinessGate) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4140,7 +4308,7 @@ var xxx_messageInfo_PodReadinessGate proto.InternalMessageInfo
func (m *PodResourceClaim) Reset() { *m = PodResourceClaim{} }
func (*PodResourceClaim) ProtoMessage() {}
func (*PodResourceClaim) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{146}
+ return fileDescriptor_6c07b07c062484ab, []int{152}
}
func (m *PodResourceClaim) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4168,7 +4336,7 @@ var xxx_messageInfo_PodResourceClaim proto.InternalMessageInfo
func (m *PodResourceClaimStatus) Reset() { *m = PodResourceClaimStatus{} }
func (*PodResourceClaimStatus) ProtoMessage() {}
func (*PodResourceClaimStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{147}
+ return fileDescriptor_6c07b07c062484ab, []int{153}
}
func (m *PodResourceClaimStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4196,7 +4364,7 @@ var xxx_messageInfo_PodResourceClaimStatus proto.InternalMessageInfo
func (m *PodSchedulingGate) Reset() { *m = PodSchedulingGate{} }
func (*PodSchedulingGate) ProtoMessage() {}
func (*PodSchedulingGate) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{148}
+ return fileDescriptor_6c07b07c062484ab, []int{154}
}
func (m *PodSchedulingGate) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4224,7 +4392,7 @@ var xxx_messageInfo_PodSchedulingGate proto.InternalMessageInfo
func (m *PodSecurityContext) Reset() { *m = PodSecurityContext{} }
func (*PodSecurityContext) ProtoMessage() {}
func (*PodSecurityContext) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{149}
+ return fileDescriptor_6c07b07c062484ab, []int{155}
}
func (m *PodSecurityContext) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4252,7 +4420,7 @@ var xxx_messageInfo_PodSecurityContext proto.InternalMessageInfo
func (m *PodSignature) Reset() { *m = PodSignature{} }
func (*PodSignature) ProtoMessage() {}
func (*PodSignature) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{150}
+ return fileDescriptor_6c07b07c062484ab, []int{156}
}
func (m *PodSignature) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4280,7 +4448,7 @@ var xxx_messageInfo_PodSignature proto.InternalMessageInfo
func (m *PodSpec) Reset() { *m = PodSpec{} }
func (*PodSpec) ProtoMessage() {}
func (*PodSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{151}
+ return fileDescriptor_6c07b07c062484ab, []int{157}
}
func (m *PodSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4308,7 +4476,7 @@ var xxx_messageInfo_PodSpec proto.InternalMessageInfo
func (m *PodStatus) Reset() { *m = PodStatus{} }
func (*PodStatus) ProtoMessage() {}
func (*PodStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{152}
+ return fileDescriptor_6c07b07c062484ab, []int{158}
}
func (m *PodStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4336,7 +4504,7 @@ var xxx_messageInfo_PodStatus proto.InternalMessageInfo
func (m *PodStatusResult) Reset() { *m = PodStatusResult{} }
func (*PodStatusResult) ProtoMessage() {}
func (*PodStatusResult) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{153}
+ return fileDescriptor_6c07b07c062484ab, []int{159}
}
func (m *PodStatusResult) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4364,7 +4532,7 @@ var xxx_messageInfo_PodStatusResult proto.InternalMessageInfo
func (m *PodTemplate) Reset() { *m = PodTemplate{} }
func (*PodTemplate) ProtoMessage() {}
func (*PodTemplate) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{154}
+ return fileDescriptor_6c07b07c062484ab, []int{160}
}
func (m *PodTemplate) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4392,7 +4560,7 @@ var xxx_messageInfo_PodTemplate proto.InternalMessageInfo
func (m *PodTemplateList) Reset() { *m = PodTemplateList{} }
func (*PodTemplateList) ProtoMessage() {}
func (*PodTemplateList) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{155}
+ return fileDescriptor_6c07b07c062484ab, []int{161}
}
func (m *PodTemplateList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4420,7 +4588,7 @@ var xxx_messageInfo_PodTemplateList proto.InternalMessageInfo
func (m *PodTemplateSpec) Reset() { *m = PodTemplateSpec{} }
func (*PodTemplateSpec) ProtoMessage() {}
func (*PodTemplateSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{156}
+ return fileDescriptor_6c07b07c062484ab, []int{162}
}
func (m *PodTemplateSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4448,7 +4616,7 @@ var xxx_messageInfo_PodTemplateSpec proto.InternalMessageInfo
func (m *PortStatus) Reset() { *m = PortStatus{} }
func (*PortStatus) ProtoMessage() {}
func (*PortStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{157}
+ return fileDescriptor_6c07b07c062484ab, []int{163}
}
func (m *PortStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4476,7 +4644,7 @@ var xxx_messageInfo_PortStatus proto.InternalMessageInfo
func (m *PortworxVolumeSource) Reset() { *m = PortworxVolumeSource{} }
func (*PortworxVolumeSource) ProtoMessage() {}
func (*PortworxVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{158}
+ return fileDescriptor_6c07b07c062484ab, []int{164}
}
func (m *PortworxVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4504,7 +4672,7 @@ var xxx_messageInfo_PortworxVolumeSource proto.InternalMessageInfo
func (m *Preconditions) Reset() { *m = Preconditions{} }
func (*Preconditions) ProtoMessage() {}
func (*Preconditions) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{159}
+ return fileDescriptor_6c07b07c062484ab, []int{165}
}
func (m *Preconditions) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4532,7 +4700,7 @@ var xxx_messageInfo_Preconditions proto.InternalMessageInfo
func (m *PreferAvoidPodsEntry) Reset() { *m = PreferAvoidPodsEntry{} }
func (*PreferAvoidPodsEntry) ProtoMessage() {}
func (*PreferAvoidPodsEntry) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{160}
+ return fileDescriptor_6c07b07c062484ab, []int{166}
}
func (m *PreferAvoidPodsEntry) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4560,7 +4728,7 @@ var xxx_messageInfo_PreferAvoidPodsEntry proto.InternalMessageInfo
func (m *PreferredSchedulingTerm) Reset() { *m = PreferredSchedulingTerm{} }
func (*PreferredSchedulingTerm) ProtoMessage() {}
func (*PreferredSchedulingTerm) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{161}
+ return fileDescriptor_6c07b07c062484ab, []int{167}
}
func (m *PreferredSchedulingTerm) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4588,7 +4756,7 @@ var xxx_messageInfo_PreferredSchedulingTerm proto.InternalMessageInfo
func (m *Probe) Reset() { *m = Probe{} }
func (*Probe) ProtoMessage() {}
func (*Probe) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{162}
+ return fileDescriptor_6c07b07c062484ab, []int{168}
}
func (m *Probe) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4616,7 +4784,7 @@ var xxx_messageInfo_Probe proto.InternalMessageInfo
func (m *ProbeHandler) Reset() { *m = ProbeHandler{} }
func (*ProbeHandler) ProtoMessage() {}
func (*ProbeHandler) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{163}
+ return fileDescriptor_6c07b07c062484ab, []int{169}
}
func (m *ProbeHandler) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4644,7 +4812,7 @@ var xxx_messageInfo_ProbeHandler proto.InternalMessageInfo
func (m *ProjectedVolumeSource) Reset() { *m = ProjectedVolumeSource{} }
func (*ProjectedVolumeSource) ProtoMessage() {}
func (*ProjectedVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{164}
+ return fileDescriptor_6c07b07c062484ab, []int{170}
}
func (m *ProjectedVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4672,7 +4840,7 @@ var xxx_messageInfo_ProjectedVolumeSource proto.InternalMessageInfo
func (m *QuobyteVolumeSource) Reset() { *m = QuobyteVolumeSource{} }
func (*QuobyteVolumeSource) ProtoMessage() {}
func (*QuobyteVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{165}
+ return fileDescriptor_6c07b07c062484ab, []int{171}
}
func (m *QuobyteVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4700,7 +4868,7 @@ var xxx_messageInfo_QuobyteVolumeSource proto.InternalMessageInfo
func (m *RBDPersistentVolumeSource) Reset() { *m = RBDPersistentVolumeSource{} }
func (*RBDPersistentVolumeSource) ProtoMessage() {}
func (*RBDPersistentVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{166}
+ return fileDescriptor_6c07b07c062484ab, []int{172}
}
func (m *RBDPersistentVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4728,7 +4896,7 @@ var xxx_messageInfo_RBDPersistentVolumeSource proto.InternalMessageInfo
func (m *RBDVolumeSource) Reset() { *m = RBDVolumeSource{} }
func (*RBDVolumeSource) ProtoMessage() {}
func (*RBDVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{167}
+ return fileDescriptor_6c07b07c062484ab, []int{173}
}
func (m *RBDVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4756,7 +4924,7 @@ var xxx_messageInfo_RBDVolumeSource proto.InternalMessageInfo
func (m *RangeAllocation) Reset() { *m = RangeAllocation{} }
func (*RangeAllocation) ProtoMessage() {}
func (*RangeAllocation) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{168}
+ return fileDescriptor_6c07b07c062484ab, []int{174}
}
func (m *RangeAllocation) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4784,7 +4952,7 @@ var xxx_messageInfo_RangeAllocation proto.InternalMessageInfo
func (m *ReplicationController) Reset() { *m = ReplicationController{} }
func (*ReplicationController) ProtoMessage() {}
func (*ReplicationController) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{169}
+ return fileDescriptor_6c07b07c062484ab, []int{175}
}
func (m *ReplicationController) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4812,7 +4980,7 @@ var xxx_messageInfo_ReplicationController proto.InternalMessageInfo
func (m *ReplicationControllerCondition) Reset() { *m = ReplicationControllerCondition{} }
func (*ReplicationControllerCondition) ProtoMessage() {}
func (*ReplicationControllerCondition) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{170}
+ return fileDescriptor_6c07b07c062484ab, []int{176}
}
func (m *ReplicationControllerCondition) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4840,7 +5008,7 @@ var xxx_messageInfo_ReplicationControllerCondition proto.InternalMessageInfo
func (m *ReplicationControllerList) Reset() { *m = ReplicationControllerList{} }
func (*ReplicationControllerList) ProtoMessage() {}
func (*ReplicationControllerList) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{171}
+ return fileDescriptor_6c07b07c062484ab, []int{177}
}
func (m *ReplicationControllerList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4868,7 +5036,7 @@ var xxx_messageInfo_ReplicationControllerList proto.InternalMessageInfo
func (m *ReplicationControllerSpec) Reset() { *m = ReplicationControllerSpec{} }
func (*ReplicationControllerSpec) ProtoMessage() {}
func (*ReplicationControllerSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{172}
+ return fileDescriptor_6c07b07c062484ab, []int{178}
}
func (m *ReplicationControllerSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4896,7 +5064,7 @@ var xxx_messageInfo_ReplicationControllerSpec proto.InternalMessageInfo
func (m *ReplicationControllerStatus) Reset() { *m = ReplicationControllerStatus{} }
func (*ReplicationControllerStatus) ProtoMessage() {}
func (*ReplicationControllerStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{173}
+ return fileDescriptor_6c07b07c062484ab, []int{179}
}
func (m *ReplicationControllerStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4924,7 +5092,7 @@ var xxx_messageInfo_ReplicationControllerStatus proto.InternalMessageInfo
func (m *ResourceClaim) Reset() { *m = ResourceClaim{} }
func (*ResourceClaim) ProtoMessage() {}
func (*ResourceClaim) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{174}
+ return fileDescriptor_6c07b07c062484ab, []int{180}
}
func (m *ResourceClaim) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4952,7 +5120,7 @@ var xxx_messageInfo_ResourceClaim proto.InternalMessageInfo
func (m *ResourceFieldSelector) Reset() { *m = ResourceFieldSelector{} }
func (*ResourceFieldSelector) ProtoMessage() {}
func (*ResourceFieldSelector) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{175}
+ return fileDescriptor_6c07b07c062484ab, []int{181}
}
func (m *ResourceFieldSelector) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -4980,7 +5148,7 @@ var xxx_messageInfo_ResourceFieldSelector proto.InternalMessageInfo
func (m *ResourceHealth) Reset() { *m = ResourceHealth{} }
func (*ResourceHealth) ProtoMessage() {}
func (*ResourceHealth) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{176}
+ return fileDescriptor_6c07b07c062484ab, []int{182}
}
func (m *ResourceHealth) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5008,7 +5176,7 @@ var xxx_messageInfo_ResourceHealth proto.InternalMessageInfo
func (m *ResourceQuota) Reset() { *m = ResourceQuota{} }
func (*ResourceQuota) ProtoMessage() {}
func (*ResourceQuota) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{177}
+ return fileDescriptor_6c07b07c062484ab, []int{183}
}
func (m *ResourceQuota) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5036,7 +5204,7 @@ var xxx_messageInfo_ResourceQuota proto.InternalMessageInfo
func (m *ResourceQuotaList) Reset() { *m = ResourceQuotaList{} }
func (*ResourceQuotaList) ProtoMessage() {}
func (*ResourceQuotaList) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{178}
+ return fileDescriptor_6c07b07c062484ab, []int{184}
}
func (m *ResourceQuotaList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5064,7 +5232,7 @@ var xxx_messageInfo_ResourceQuotaList proto.InternalMessageInfo
func (m *ResourceQuotaSpec) Reset() { *m = ResourceQuotaSpec{} }
func (*ResourceQuotaSpec) ProtoMessage() {}
func (*ResourceQuotaSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{179}
+ return fileDescriptor_6c07b07c062484ab, []int{185}
}
func (m *ResourceQuotaSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5092,7 +5260,7 @@ var xxx_messageInfo_ResourceQuotaSpec proto.InternalMessageInfo
func (m *ResourceQuotaStatus) Reset() { *m = ResourceQuotaStatus{} }
func (*ResourceQuotaStatus) ProtoMessage() {}
func (*ResourceQuotaStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{180}
+ return fileDescriptor_6c07b07c062484ab, []int{186}
}
func (m *ResourceQuotaStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5120,7 +5288,7 @@ var xxx_messageInfo_ResourceQuotaStatus proto.InternalMessageInfo
func (m *ResourceRequirements) Reset() { *m = ResourceRequirements{} }
func (*ResourceRequirements) ProtoMessage() {}
func (*ResourceRequirements) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{181}
+ return fileDescriptor_6c07b07c062484ab, []int{187}
}
func (m *ResourceRequirements) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5148,7 +5316,7 @@ var xxx_messageInfo_ResourceRequirements proto.InternalMessageInfo
func (m *ResourceStatus) Reset() { *m = ResourceStatus{} }
func (*ResourceStatus) ProtoMessage() {}
func (*ResourceStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{182}
+ return fileDescriptor_6c07b07c062484ab, []int{188}
}
func (m *ResourceStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5176,7 +5344,7 @@ var xxx_messageInfo_ResourceStatus proto.InternalMessageInfo
func (m *SELinuxOptions) Reset() { *m = SELinuxOptions{} }
func (*SELinuxOptions) ProtoMessage() {}
func (*SELinuxOptions) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{183}
+ return fileDescriptor_6c07b07c062484ab, []int{189}
}
func (m *SELinuxOptions) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5204,7 +5372,7 @@ var xxx_messageInfo_SELinuxOptions proto.InternalMessageInfo
func (m *ScaleIOPersistentVolumeSource) Reset() { *m = ScaleIOPersistentVolumeSource{} }
func (*ScaleIOPersistentVolumeSource) ProtoMessage() {}
func (*ScaleIOPersistentVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{184}
+ return fileDescriptor_6c07b07c062484ab, []int{190}
}
func (m *ScaleIOPersistentVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5232,7 +5400,7 @@ var xxx_messageInfo_ScaleIOPersistentVolumeSource proto.InternalMessageInfo
func (m *ScaleIOVolumeSource) Reset() { *m = ScaleIOVolumeSource{} }
func (*ScaleIOVolumeSource) ProtoMessage() {}
func (*ScaleIOVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{185}
+ return fileDescriptor_6c07b07c062484ab, []int{191}
}
func (m *ScaleIOVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5260,7 +5428,7 @@ var xxx_messageInfo_ScaleIOVolumeSource proto.InternalMessageInfo
func (m *ScopeSelector) Reset() { *m = ScopeSelector{} }
func (*ScopeSelector) ProtoMessage() {}
func (*ScopeSelector) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{186}
+ return fileDescriptor_6c07b07c062484ab, []int{192}
}
func (m *ScopeSelector) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5288,7 +5456,7 @@ var xxx_messageInfo_ScopeSelector proto.InternalMessageInfo
func (m *ScopedResourceSelectorRequirement) Reset() { *m = ScopedResourceSelectorRequirement{} }
func (*ScopedResourceSelectorRequirement) ProtoMessage() {}
func (*ScopedResourceSelectorRequirement) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{187}
+ return fileDescriptor_6c07b07c062484ab, []int{193}
}
func (m *ScopedResourceSelectorRequirement) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5316,7 +5484,7 @@ var xxx_messageInfo_ScopedResourceSelectorRequirement proto.InternalMessageInfo
func (m *SeccompProfile) Reset() { *m = SeccompProfile{} }
func (*SeccompProfile) ProtoMessage() {}
func (*SeccompProfile) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{188}
+ return fileDescriptor_6c07b07c062484ab, []int{194}
}
func (m *SeccompProfile) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5344,7 +5512,7 @@ var xxx_messageInfo_SeccompProfile proto.InternalMessageInfo
func (m *Secret) Reset() { *m = Secret{} }
func (*Secret) ProtoMessage() {}
func (*Secret) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{189}
+ return fileDescriptor_6c07b07c062484ab, []int{195}
}
func (m *Secret) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5372,7 +5540,7 @@ var xxx_messageInfo_Secret proto.InternalMessageInfo
func (m *SecretEnvSource) Reset() { *m = SecretEnvSource{} }
func (*SecretEnvSource) ProtoMessage() {}
func (*SecretEnvSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{190}
+ return fileDescriptor_6c07b07c062484ab, []int{196}
}
func (m *SecretEnvSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5400,7 +5568,7 @@ var xxx_messageInfo_SecretEnvSource proto.InternalMessageInfo
func (m *SecretKeySelector) Reset() { *m = SecretKeySelector{} }
func (*SecretKeySelector) ProtoMessage() {}
func (*SecretKeySelector) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{191}
+ return fileDescriptor_6c07b07c062484ab, []int{197}
}
func (m *SecretKeySelector) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5428,7 +5596,7 @@ var xxx_messageInfo_SecretKeySelector proto.InternalMessageInfo
func (m *SecretList) Reset() { *m = SecretList{} }
func (*SecretList) ProtoMessage() {}
func (*SecretList) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{192}
+ return fileDescriptor_6c07b07c062484ab, []int{198}
}
func (m *SecretList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5456,7 +5624,7 @@ var xxx_messageInfo_SecretList proto.InternalMessageInfo
func (m *SecretProjection) Reset() { *m = SecretProjection{} }
func (*SecretProjection) ProtoMessage() {}
func (*SecretProjection) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{193}
+ return fileDescriptor_6c07b07c062484ab, []int{199}
}
func (m *SecretProjection) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5484,7 +5652,7 @@ var xxx_messageInfo_SecretProjection proto.InternalMessageInfo
func (m *SecretReference) Reset() { *m = SecretReference{} }
func (*SecretReference) ProtoMessage() {}
func (*SecretReference) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{194}
+ return fileDescriptor_6c07b07c062484ab, []int{200}
}
func (m *SecretReference) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5512,7 +5680,7 @@ var xxx_messageInfo_SecretReference proto.InternalMessageInfo
func (m *SecretVolumeSource) Reset() { *m = SecretVolumeSource{} }
func (*SecretVolumeSource) ProtoMessage() {}
func (*SecretVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{195}
+ return fileDescriptor_6c07b07c062484ab, []int{201}
}
func (m *SecretVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5540,7 +5708,7 @@ var xxx_messageInfo_SecretVolumeSource proto.InternalMessageInfo
func (m *SecurityContext) Reset() { *m = SecurityContext{} }
func (*SecurityContext) ProtoMessage() {}
func (*SecurityContext) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{196}
+ return fileDescriptor_6c07b07c062484ab, []int{202}
}
func (m *SecurityContext) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5568,7 +5736,7 @@ var xxx_messageInfo_SecurityContext proto.InternalMessageInfo
func (m *SerializedReference) Reset() { *m = SerializedReference{} }
func (*SerializedReference) ProtoMessage() {}
func (*SerializedReference) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{197}
+ return fileDescriptor_6c07b07c062484ab, []int{203}
}
func (m *SerializedReference) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5596,7 +5764,7 @@ var xxx_messageInfo_SerializedReference proto.InternalMessageInfo
func (m *Service) Reset() { *m = Service{} }
func (*Service) ProtoMessage() {}
func (*Service) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{198}
+ return fileDescriptor_6c07b07c062484ab, []int{204}
}
func (m *Service) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5624,7 +5792,7 @@ var xxx_messageInfo_Service proto.InternalMessageInfo
func (m *ServiceAccount) Reset() { *m = ServiceAccount{} }
func (*ServiceAccount) ProtoMessage() {}
func (*ServiceAccount) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{199}
+ return fileDescriptor_6c07b07c062484ab, []int{205}
}
func (m *ServiceAccount) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5652,7 +5820,7 @@ var xxx_messageInfo_ServiceAccount proto.InternalMessageInfo
func (m *ServiceAccountList) Reset() { *m = ServiceAccountList{} }
func (*ServiceAccountList) ProtoMessage() {}
func (*ServiceAccountList) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{200}
+ return fileDescriptor_6c07b07c062484ab, []int{206}
}
func (m *ServiceAccountList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5680,7 +5848,7 @@ var xxx_messageInfo_ServiceAccountList proto.InternalMessageInfo
func (m *ServiceAccountTokenProjection) Reset() { *m = ServiceAccountTokenProjection{} }
func (*ServiceAccountTokenProjection) ProtoMessage() {}
func (*ServiceAccountTokenProjection) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{201}
+ return fileDescriptor_6c07b07c062484ab, []int{207}
}
func (m *ServiceAccountTokenProjection) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5708,7 +5876,7 @@ var xxx_messageInfo_ServiceAccountTokenProjection proto.InternalMessageInfo
func (m *ServiceList) Reset() { *m = ServiceList{} }
func (*ServiceList) ProtoMessage() {}
func (*ServiceList) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{202}
+ return fileDescriptor_6c07b07c062484ab, []int{208}
}
func (m *ServiceList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5736,7 +5904,7 @@ var xxx_messageInfo_ServiceList proto.InternalMessageInfo
func (m *ServicePort) Reset() { *m = ServicePort{} }
func (*ServicePort) ProtoMessage() {}
func (*ServicePort) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{203}
+ return fileDescriptor_6c07b07c062484ab, []int{209}
}
func (m *ServicePort) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5764,7 +5932,7 @@ var xxx_messageInfo_ServicePort proto.InternalMessageInfo
func (m *ServiceProxyOptions) Reset() { *m = ServiceProxyOptions{} }
func (*ServiceProxyOptions) ProtoMessage() {}
func (*ServiceProxyOptions) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{204}
+ return fileDescriptor_6c07b07c062484ab, []int{210}
}
func (m *ServiceProxyOptions) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5792,7 +5960,7 @@ var xxx_messageInfo_ServiceProxyOptions proto.InternalMessageInfo
func (m *ServiceSpec) Reset() { *m = ServiceSpec{} }
func (*ServiceSpec) ProtoMessage() {}
func (*ServiceSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{205}
+ return fileDescriptor_6c07b07c062484ab, []int{211}
}
func (m *ServiceSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5820,7 +5988,7 @@ var xxx_messageInfo_ServiceSpec proto.InternalMessageInfo
func (m *ServiceStatus) Reset() { *m = ServiceStatus{} }
func (*ServiceStatus) ProtoMessage() {}
func (*ServiceStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{206}
+ return fileDescriptor_6c07b07c062484ab, []int{212}
}
func (m *ServiceStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5848,7 +6016,7 @@ var xxx_messageInfo_ServiceStatus proto.InternalMessageInfo
func (m *SessionAffinityConfig) Reset() { *m = SessionAffinityConfig{} }
func (*SessionAffinityConfig) ProtoMessage() {}
func (*SessionAffinityConfig) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{207}
+ return fileDescriptor_6c07b07c062484ab, []int{213}
}
func (m *SessionAffinityConfig) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5876,7 +6044,7 @@ var xxx_messageInfo_SessionAffinityConfig proto.InternalMessageInfo
func (m *SleepAction) Reset() { *m = SleepAction{} }
func (*SleepAction) ProtoMessage() {}
func (*SleepAction) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{208}
+ return fileDescriptor_6c07b07c062484ab, []int{214}
}
func (m *SleepAction) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5904,7 +6072,7 @@ var xxx_messageInfo_SleepAction proto.InternalMessageInfo
func (m *StorageOSPersistentVolumeSource) Reset() { *m = StorageOSPersistentVolumeSource{} }
func (*StorageOSPersistentVolumeSource) ProtoMessage() {}
func (*StorageOSPersistentVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{209}
+ return fileDescriptor_6c07b07c062484ab, []int{215}
}
func (m *StorageOSPersistentVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5932,7 +6100,7 @@ var xxx_messageInfo_StorageOSPersistentVolumeSource proto.InternalMessageInfo
func (m *StorageOSVolumeSource) Reset() { *m = StorageOSVolumeSource{} }
func (*StorageOSVolumeSource) ProtoMessage() {}
func (*StorageOSVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{210}
+ return fileDescriptor_6c07b07c062484ab, []int{216}
}
func (m *StorageOSVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5960,7 +6128,7 @@ var xxx_messageInfo_StorageOSVolumeSource proto.InternalMessageInfo
func (m *Sysctl) Reset() { *m = Sysctl{} }
func (*Sysctl) ProtoMessage() {}
func (*Sysctl) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{211}
+ return fileDescriptor_6c07b07c062484ab, []int{217}
}
func (m *Sysctl) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -5988,7 +6156,7 @@ var xxx_messageInfo_Sysctl proto.InternalMessageInfo
func (m *TCPSocketAction) Reset() { *m = TCPSocketAction{} }
func (*TCPSocketAction) ProtoMessage() {}
func (*TCPSocketAction) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{212}
+ return fileDescriptor_6c07b07c062484ab, []int{218}
}
func (m *TCPSocketAction) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -6016,7 +6184,7 @@ var xxx_messageInfo_TCPSocketAction proto.InternalMessageInfo
func (m *Taint) Reset() { *m = Taint{} }
func (*Taint) ProtoMessage() {}
func (*Taint) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{213}
+ return fileDescriptor_6c07b07c062484ab, []int{219}
}
func (m *Taint) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -6044,7 +6212,7 @@ var xxx_messageInfo_Taint proto.InternalMessageInfo
func (m *Toleration) Reset() { *m = Toleration{} }
func (*Toleration) ProtoMessage() {}
func (*Toleration) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{214}
+ return fileDescriptor_6c07b07c062484ab, []int{220}
}
func (m *Toleration) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -6072,7 +6240,7 @@ var xxx_messageInfo_Toleration proto.InternalMessageInfo
func (m *TopologySelectorLabelRequirement) Reset() { *m = TopologySelectorLabelRequirement{} }
func (*TopologySelectorLabelRequirement) ProtoMessage() {}
func (*TopologySelectorLabelRequirement) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{215}
+ return fileDescriptor_6c07b07c062484ab, []int{221}
}
func (m *TopologySelectorLabelRequirement) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -6100,7 +6268,7 @@ var xxx_messageInfo_TopologySelectorLabelRequirement proto.InternalMessageInfo
func (m *TopologySelectorTerm) Reset() { *m = TopologySelectorTerm{} }
func (*TopologySelectorTerm) ProtoMessage() {}
func (*TopologySelectorTerm) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{216}
+ return fileDescriptor_6c07b07c062484ab, []int{222}
}
func (m *TopologySelectorTerm) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -6128,7 +6296,7 @@ var xxx_messageInfo_TopologySelectorTerm proto.InternalMessageInfo
func (m *TopologySpreadConstraint) Reset() { *m = TopologySpreadConstraint{} }
func (*TopologySpreadConstraint) ProtoMessage() {}
func (*TopologySpreadConstraint) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{217}
+ return fileDescriptor_6c07b07c062484ab, []int{223}
}
func (m *TopologySpreadConstraint) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -6156,7 +6324,7 @@ var xxx_messageInfo_TopologySpreadConstraint proto.InternalMessageInfo
func (m *TypedLocalObjectReference) Reset() { *m = TypedLocalObjectReference{} }
func (*TypedLocalObjectReference) ProtoMessage() {}
func (*TypedLocalObjectReference) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{218}
+ return fileDescriptor_6c07b07c062484ab, []int{224}
}
func (m *TypedLocalObjectReference) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -6184,7 +6352,7 @@ var xxx_messageInfo_TypedLocalObjectReference proto.InternalMessageInfo
func (m *TypedObjectReference) Reset() { *m = TypedObjectReference{} }
func (*TypedObjectReference) ProtoMessage() {}
func (*TypedObjectReference) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{219}
+ return fileDescriptor_6c07b07c062484ab, []int{225}
}
func (m *TypedObjectReference) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -6212,7 +6380,7 @@ var xxx_messageInfo_TypedObjectReference proto.InternalMessageInfo
func (m *Volume) Reset() { *m = Volume{} }
func (*Volume) ProtoMessage() {}
func (*Volume) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{220}
+ return fileDescriptor_6c07b07c062484ab, []int{226}
}
func (m *Volume) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -6240,7 +6408,7 @@ var xxx_messageInfo_Volume proto.InternalMessageInfo
func (m *VolumeDevice) Reset() { *m = VolumeDevice{} }
func (*VolumeDevice) ProtoMessage() {}
func (*VolumeDevice) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{221}
+ return fileDescriptor_6c07b07c062484ab, []int{227}
}
func (m *VolumeDevice) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -6268,7 +6436,7 @@ var xxx_messageInfo_VolumeDevice proto.InternalMessageInfo
func (m *VolumeMount) Reset() { *m = VolumeMount{} }
func (*VolumeMount) ProtoMessage() {}
func (*VolumeMount) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{222}
+ return fileDescriptor_6c07b07c062484ab, []int{228}
}
func (m *VolumeMount) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -6296,7 +6464,7 @@ var xxx_messageInfo_VolumeMount proto.InternalMessageInfo
func (m *VolumeMountStatus) Reset() { *m = VolumeMountStatus{} }
func (*VolumeMountStatus) ProtoMessage() {}
func (*VolumeMountStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{223}
+ return fileDescriptor_6c07b07c062484ab, []int{229}
}
func (m *VolumeMountStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -6324,7 +6492,7 @@ var xxx_messageInfo_VolumeMountStatus proto.InternalMessageInfo
func (m *VolumeNodeAffinity) Reset() { *m = VolumeNodeAffinity{} }
func (*VolumeNodeAffinity) ProtoMessage() {}
func (*VolumeNodeAffinity) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{224}
+ return fileDescriptor_6c07b07c062484ab, []int{230}
}
func (m *VolumeNodeAffinity) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -6352,7 +6520,7 @@ var xxx_messageInfo_VolumeNodeAffinity proto.InternalMessageInfo
func (m *VolumeProjection) Reset() { *m = VolumeProjection{} }
func (*VolumeProjection) ProtoMessage() {}
func (*VolumeProjection) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{225}
+ return fileDescriptor_6c07b07c062484ab, []int{231}
}
func (m *VolumeProjection) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -6380,7 +6548,7 @@ var xxx_messageInfo_VolumeProjection proto.InternalMessageInfo
func (m *VolumeResourceRequirements) Reset() { *m = VolumeResourceRequirements{} }
func (*VolumeResourceRequirements) ProtoMessage() {}
func (*VolumeResourceRequirements) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{226}
+ return fileDescriptor_6c07b07c062484ab, []int{232}
}
func (m *VolumeResourceRequirements) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -6408,7 +6576,7 @@ var xxx_messageInfo_VolumeResourceRequirements proto.InternalMessageInfo
func (m *VolumeSource) Reset() { *m = VolumeSource{} }
func (*VolumeSource) ProtoMessage() {}
func (*VolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{227}
+ return fileDescriptor_6c07b07c062484ab, []int{233}
}
func (m *VolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -6436,7 +6604,7 @@ var xxx_messageInfo_VolumeSource proto.InternalMessageInfo
func (m *VsphereVirtualDiskVolumeSource) Reset() { *m = VsphereVirtualDiskVolumeSource{} }
func (*VsphereVirtualDiskVolumeSource) ProtoMessage() {}
func (*VsphereVirtualDiskVolumeSource) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{228}
+ return fileDescriptor_6c07b07c062484ab, []int{234}
}
func (m *VsphereVirtualDiskVolumeSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -6464,7 +6632,7 @@ var xxx_messageInfo_VsphereVirtualDiskVolumeSource proto.InternalMessageInfo
func (m *WeightedPodAffinityTerm) Reset() { *m = WeightedPodAffinityTerm{} }
func (*WeightedPodAffinityTerm) ProtoMessage() {}
func (*WeightedPodAffinityTerm) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{229}
+ return fileDescriptor_6c07b07c062484ab, []int{235}
}
func (m *WeightedPodAffinityTerm) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -6492,7 +6660,7 @@ var xxx_messageInfo_WeightedPodAffinityTerm proto.InternalMessageInfo
func (m *WindowsSecurityContextOptions) Reset() { *m = WindowsSecurityContextOptions{} }
func (*WindowsSecurityContextOptions) ProtoMessage() {}
func (*WindowsSecurityContextOptions) Descriptor() ([]byte, []int) {
- return fileDescriptor_6c07b07c062484ab, []int{230}
+ return fileDescriptor_6c07b07c062484ab, []int{236}
}
func (m *WindowsSecurityContextOptions) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -6551,9 +6719,12 @@ func init() {
proto.RegisterType((*ConfigMapProjection)(nil), "k8s.io.api.core.v1.ConfigMapProjection")
proto.RegisterType((*ConfigMapVolumeSource)(nil), "k8s.io.api.core.v1.ConfigMapVolumeSource")
proto.RegisterType((*Container)(nil), "k8s.io.api.core.v1.Container")
+ proto.RegisterType((*ContainerExtendedResourceRequest)(nil), "k8s.io.api.core.v1.ContainerExtendedResourceRequest")
proto.RegisterType((*ContainerImage)(nil), "k8s.io.api.core.v1.ContainerImage")
proto.RegisterType((*ContainerPort)(nil), "k8s.io.api.core.v1.ContainerPort")
proto.RegisterType((*ContainerResizePolicy)(nil), "k8s.io.api.core.v1.ContainerResizePolicy")
+ proto.RegisterType((*ContainerRestartRule)(nil), "k8s.io.api.core.v1.ContainerRestartRule")
+ proto.RegisterType((*ContainerRestartRuleOnExitCodes)(nil), "k8s.io.api.core.v1.ContainerRestartRuleOnExitCodes")
proto.RegisterType((*ContainerState)(nil), "k8s.io.api.core.v1.ContainerState")
proto.RegisterType((*ContainerStateRunning)(nil), "k8s.io.api.core.v1.ContainerStateRunning")
proto.RegisterType((*ContainerStateTerminated)(nil), "k8s.io.api.core.v1.ContainerStateTerminated")
@@ -6583,6 +6754,7 @@ func init() {
proto.RegisterType((*EventSource)(nil), "k8s.io.api.core.v1.EventSource")
proto.RegisterType((*ExecAction)(nil), "k8s.io.api.core.v1.ExecAction")
proto.RegisterType((*FCVolumeSource)(nil), "k8s.io.api.core.v1.FCVolumeSource")
+ proto.RegisterType((*FileKeySelector)(nil), "k8s.io.api.core.v1.FileKeySelector")
proto.RegisterType((*FlexPersistentVolumeSource)(nil), "k8s.io.api.core.v1.FlexPersistentVolumeSource")
proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.core.v1.FlexPersistentVolumeSource.OptionsEntry")
proto.RegisterType((*FlexVolumeSource)(nil), "k8s.io.api.core.v1.FlexVolumeSource")
@@ -6671,10 +6843,12 @@ func init() {
proto.RegisterType((*PodAffinityTerm)(nil), "k8s.io.api.core.v1.PodAffinityTerm")
proto.RegisterType((*PodAntiAffinity)(nil), "k8s.io.api.core.v1.PodAntiAffinity")
proto.RegisterType((*PodAttachOptions)(nil), "k8s.io.api.core.v1.PodAttachOptions")
+ proto.RegisterType((*PodCertificateProjection)(nil), "k8s.io.api.core.v1.PodCertificateProjection")
proto.RegisterType((*PodCondition)(nil), "k8s.io.api.core.v1.PodCondition")
proto.RegisterType((*PodDNSConfig)(nil), "k8s.io.api.core.v1.PodDNSConfig")
proto.RegisterType((*PodDNSConfigOption)(nil), "k8s.io.api.core.v1.PodDNSConfigOption")
proto.RegisterType((*PodExecOptions)(nil), "k8s.io.api.core.v1.PodExecOptions")
+ proto.RegisterType((*PodExtendedResourceClaimStatus)(nil), "k8s.io.api.core.v1.PodExtendedResourceClaimStatus")
proto.RegisterType((*PodIP)(nil), "k8s.io.api.core.v1.PodIP")
proto.RegisterType((*PodList)(nil), "k8s.io.api.core.v1.PodList")
proto.RegisterType((*PodLogOptions)(nil), "k8s.io.api.core.v1.PodLogOptions")
@@ -6787,1020 +6961,1049 @@ func init() {
}
var fileDescriptor_6c07b07c062484ab = []byte{
- // 16206 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x69, 0x90, 0x1c, 0xc9,
- 0x75, 0x30, 0xc6, 0xea, 0x9e, 0xf3, 0xcd, 0x9d, 0xb8, 0x06, 0xb3, 0x00, 0x1a, 0x5b, 0xbb, 0x8b,
- 0xc5, 0x5e, 0x03, 0x62, 0x0f, 0x2e, 0xb8, 0xbb, 0x5c, 0xed, 0x9c, 0x40, 0x2f, 0x30, 0x83, 0xde,
- 0xec, 0x01, 0x40, 0x2e, 0x97, 0x14, 0x0b, 0xdd, 0x39, 0x33, 0xc5, 0xe9, 0xae, 0xea, 0xad, 0xaa,
- 0x1e, 0x60, 0x60, 0x2a, 0x24, 0x51, 0x16, 0x25, 0x52, 0x72, 0x04, 0x43, 0x21, 0x59, 0x0e, 0x4a,
- 0xa1, 0x1f, 0xba, 0x65, 0x5a, 0xb2, 0x68, 0xc9, 0x92, 0x2c, 0xea, 0xb2, 0x2d, 0x47, 0xc8, 0xfe,
- 0x21, 0x4b, 0x8a, 0x30, 0xa9, 0xb0, 0xc2, 0x23, 0x73, 0x6c, 0x87, 0x42, 0x3f, 0x2c, 0x29, 0x64,
- 0xff, 0xb0, 0x27, 0xf4, 0x7d, 0xfc, 0x22, 0xcf, 0xca, 0xac, 0xa3, 0xbb, 0x07, 0x0b, 0x0c, 0x97,
- 0x8c, 0xfd, 0xd7, 0x9d, 0xef, 0xe5, 0xcb, 0xac, 0x3c, 0x5f, 0xbe, 0x13, 0xec, 0xad, 0x4b, 0xe1,
- 0xac, 0xeb, 0x5f, 0x70, 0x5a, 0xee, 0x85, 0x9a, 0x1f, 0x90, 0x0b, 0xdb, 0x17, 0x2f, 0x6c, 0x10,
- 0x8f, 0x04, 0x4e, 0x44, 0xea, 0xb3, 0xad, 0xc0, 0x8f, 0x7c, 0x84, 0x38, 0xce, 0xac, 0xd3, 0x72,
- 0x67, 0x29, 0xce, 0xec, 0xf6, 0xc5, 0x99, 0xe7, 0x36, 0xdc, 0x68, 0xb3, 0x7d, 0x7b, 0xb6, 0xe6,
- 0x37, 0x2f, 0x6c, 0xf8, 0x1b, 0xfe, 0x05, 0x86, 0x7a, 0xbb, 0xbd, 0xce, 0xfe, 0xb1, 0x3f, 0xec,
- 0x17, 0x27, 0x31, 0xf3, 0x62, 0xdc, 0x4c, 0xd3, 0xa9, 0x6d, 0xba, 0x1e, 0x09, 0x76, 0x2e, 0xb4,
- 0xb6, 0x36, 0x58, 0xbb, 0x01, 0x09, 0xfd, 0x76, 0x50, 0x23, 0xc9, 0x86, 0x3b, 0xd6, 0x0a, 0x2f,
- 0x34, 0x49, 0xe4, 0x64, 0x74, 0x77, 0xe6, 0x42, 0x5e, 0xad, 0xa0, 0xed, 0x45, 0x6e, 0x33, 0xdd,
- 0xcc, 0x47, 0xba, 0x55, 0x08, 0x6b, 0x9b, 0xa4, 0xe9, 0xa4, 0xea, 0xbd, 0x90, 0x57, 0xaf, 0x1d,
- 0xb9, 0x8d, 0x0b, 0xae, 0x17, 0x85, 0x51, 0x90, 0xac, 0x64, 0x7f, 0xd3, 0x82, 0xb3, 0x73, 0xb7,
- 0xaa, 0x4b, 0x0d, 0x27, 0x8c, 0xdc, 0xda, 0x7c, 0xc3, 0xaf, 0x6d, 0x55, 0x23, 0x3f, 0x20, 0x37,
- 0xfd, 0x46, 0xbb, 0x49, 0xaa, 0x6c, 0x20, 0xd0, 0xb3, 0x30, 0xb4, 0xcd, 0xfe, 0x97, 0x17, 0xa7,
- 0xad, 0xb3, 0xd6, 0xf9, 0xe1, 0xf9, 0xc9, 0xbf, 0xd8, 0x2d, 0x7d, 0x68, 0x6f, 0xb7, 0x34, 0x74,
- 0x53, 0x94, 0x63, 0x85, 0x81, 0xce, 0xc1, 0xc0, 0x7a, 0xb8, 0xb6, 0xd3, 0x22, 0xd3, 0x05, 0x86,
- 0x3b, 0x2e, 0x70, 0x07, 0x96, 0xab, 0xb4, 0x14, 0x0b, 0x28, 0xba, 0x00, 0xc3, 0x2d, 0x27, 0x88,
- 0xdc, 0xc8, 0xf5, 0xbd, 0xe9, 0xe2, 0x59, 0xeb, 0x7c, 0xff, 0xfc, 0x94, 0x40, 0x1d, 0xae, 0x48,
- 0x00, 0x8e, 0x71, 0x68, 0x37, 0x02, 0xe2, 0xd4, 0xaf, 0x7b, 0x8d, 0x9d, 0xe9, 0xbe, 0xb3, 0xd6,
- 0xf9, 0xa1, 0xb8, 0x1b, 0x58, 0x94, 0x63, 0x85, 0x61, 0x7f, 0xa5, 0x00, 0x43, 0x73, 0xeb, 0xeb,
- 0xae, 0xe7, 0x46, 0x3b, 0xe8, 0x26, 0x8c, 0x7a, 0x7e, 0x9d, 0xc8, 0xff, 0xec, 0x2b, 0x46, 0x9e,
- 0x3f, 0x3b, 0x9b, 0x5e, 0x4a, 0xb3, 0xab, 0x1a, 0xde, 0xfc, 0xe4, 0xde, 0x6e, 0x69, 0x54, 0x2f,
- 0xc1, 0x06, 0x1d, 0x84, 0x61, 0xa4, 0xe5, 0xd7, 0x15, 0xd9, 0x02, 0x23, 0x5b, 0xca, 0x22, 0x5b,
- 0x89, 0xd1, 0xe6, 0x27, 0xf6, 0x76, 0x4b, 0x23, 0x5a, 0x01, 0xd6, 0x89, 0xa0, 0xdb, 0x30, 0x41,
- 0xff, 0x7a, 0x91, 0xab, 0xe8, 0x16, 0x19, 0xdd, 0xc7, 0xf2, 0xe8, 0x6a, 0xa8, 0xf3, 0x47, 0xf6,
- 0x76, 0x4b, 0x13, 0x89, 0x42, 0x9c, 0x24, 0x68, 0xff, 0xa4, 0x05, 0x13, 0x73, 0xad, 0xd6, 0x5c,
- 0xd0, 0xf4, 0x83, 0x4a, 0xe0, 0xaf, 0xbb, 0x0d, 0x82, 0x5e, 0x86, 0xbe, 0x88, 0xce, 0x1a, 0x9f,
- 0xe1, 0xc7, 0xc4, 0xd0, 0xf6, 0xd1, 0xb9, 0xda, 0xdf, 0x2d, 0x1d, 0x49, 0xa0, 0xb3, 0xa9, 0x64,
- 0x15, 0xd0, 0x1b, 0x30, 0xd9, 0xf0, 0x6b, 0x4e, 0x63, 0xd3, 0x0f, 0x23, 0x01, 0x15, 0x53, 0x7f,
- 0x74, 0x6f, 0xb7, 0x34, 0x79, 0x2d, 0x01, 0xc3, 0x29, 0x6c, 0xfb, 0x1e, 0x8c, 0xcf, 0x45, 0x91,
- 0x53, 0xdb, 0x24, 0x75, 0xbe, 0xa0, 0xd0, 0x8b, 0xd0, 0xe7, 0x39, 0x4d, 0xd9, 0x99, 0xb3, 0xb2,
- 0x33, 0xab, 0x4e, 0x93, 0x76, 0x66, 0xf2, 0x86, 0xe7, 0xbe, 0xdb, 0x16, 0x8b, 0x94, 0x96, 0x61,
- 0x86, 0x8d, 0x9e, 0x07, 0xa8, 0x93, 0x6d, 0xb7, 0x46, 0x2a, 0x4e, 0xb4, 0x29, 0xfa, 0x80, 0x44,
- 0x5d, 0x58, 0x54, 0x10, 0xac, 0x61, 0xd9, 0x77, 0x61, 0x78, 0x6e, 0xdb, 0x77, 0xeb, 0x15, 0xbf,
- 0x1e, 0xa2, 0x2d, 0x98, 0x68, 0x05, 0x64, 0x9d, 0x04, 0xaa, 0x68, 0xda, 0x3a, 0x5b, 0x3c, 0x3f,
- 0xf2, 0xfc, 0xf9, 0xcc, 0xb1, 0x37, 0x51, 0x97, 0xbc, 0x28, 0xd8, 0x99, 0x3f, 0x21, 0xda, 0x9b,
- 0x48, 0x40, 0x71, 0x92, 0xb2, 0xfd, 0xe7, 0x05, 0x38, 0x36, 0x77, 0xaf, 0x1d, 0x90, 0x45, 0x37,
- 0xdc, 0x4a, 0x6e, 0xb8, 0xba, 0x1b, 0x6e, 0xad, 0xc6, 0x23, 0xa0, 0x56, 0xfa, 0xa2, 0x28, 0xc7,
- 0x0a, 0x03, 0x3d, 0x07, 0x83, 0xf4, 0xf7, 0x0d, 0x5c, 0x16, 0x9f, 0x7c, 0x44, 0x20, 0x8f, 0x2c,
- 0x3a, 0x91, 0xb3, 0xc8, 0x41, 0x58, 0xe2, 0xa0, 0x15, 0x18, 0xa9, 0xb1, 0xf3, 0x61, 0x63, 0xc5,
- 0xaf, 0x13, 0xb6, 0xb6, 0x86, 0xe7, 0x9f, 0xa1, 0xe8, 0x0b, 0x71, 0xf1, 0xfe, 0x6e, 0x69, 0x9a,
- 0xf7, 0x4d, 0x90, 0xd0, 0x60, 0x58, 0xaf, 0x8f, 0x6c, 0xb5, 0xdd, 0xfb, 0x18, 0x25, 0xc8, 0xd8,
- 0xea, 0xe7, 0xb5, 0x9d, 0xdb, 0xcf, 0x76, 0xee, 0x68, 0xf6, 0xae, 0x45, 0x17, 0xa1, 0x6f, 0xcb,
- 0xf5, 0xea, 0xd3, 0x03, 0x8c, 0xd6, 0x69, 0x3a, 0xe7, 0x57, 0x5d, 0xaf, 0xbe, 0xbf, 0x5b, 0x9a,
- 0x32, 0xba, 0x43, 0x0b, 0x31, 0x43, 0xb5, 0xff, 0x1f, 0x0b, 0x4a, 0x0c, 0xb6, 0xec, 0x36, 0x48,
- 0x85, 0x04, 0xa1, 0x1b, 0x46, 0xc4, 0x8b, 0x8c, 0x01, 0x7d, 0x1e, 0x20, 0x24, 0xb5, 0x80, 0x44,
- 0xda, 0x90, 0xaa, 0x85, 0x51, 0x55, 0x10, 0xac, 0x61, 0xd1, 0xf3, 0x29, 0xdc, 0x74, 0x02, 0xb6,
- 0xbe, 0xc4, 0xc0, 0xaa, 0xf3, 0xa9, 0x2a, 0x01, 0x38, 0xc6, 0x31, 0xce, 0xa7, 0x62, 0xb7, 0xf3,
- 0x09, 0x7d, 0x0c, 0x26, 0xe2, 0xc6, 0xc2, 0x96, 0x53, 0x93, 0x03, 0xc8, 0x76, 0x70, 0xd5, 0x04,
- 0xe1, 0x24, 0xae, 0xfd, 0x9f, 0x5b, 0x62, 0xf1, 0xd0, 0xaf, 0x7e, 0x9f, 0x7f, 0xab, 0xfd, 0x07,
- 0x16, 0x0c, 0xce, 0xbb, 0x5e, 0xdd, 0xf5, 0x36, 0xd0, 0x67, 0x60, 0x88, 0x5e, 0x95, 0x75, 0x27,
- 0x72, 0xc4, 0x31, 0xfc, 0x61, 0x6d, 0x6f, 0xa9, 0x9b, 0x6b, 0xb6, 0xb5, 0xb5, 0x41, 0x0b, 0xc2,
- 0x59, 0x8a, 0x4d, 0x77, 0xdb, 0xf5, 0xdb, 0x9f, 0x25, 0xb5, 0x68, 0x85, 0x44, 0x4e, 0xfc, 0x39,
- 0x71, 0x19, 0x56, 0x54, 0xd1, 0x55, 0x18, 0x88, 0x9c, 0x60, 0x83, 0x44, 0xe2, 0x3c, 0xce, 0x3c,
- 0x37, 0x79, 0x4d, 0x4c, 0x77, 0x24, 0xf1, 0x6a, 0x24, 0xbe, 0xa5, 0xd6, 0x58, 0x55, 0x2c, 0x48,
- 0xd8, 0xff, 0x6e, 0x10, 0x4e, 0x2e, 0x54, 0xcb, 0x39, 0xeb, 0xea, 0x1c, 0x0c, 0xd4, 0x03, 0x77,
- 0x9b, 0x04, 0x62, 0x9c, 0x15, 0x95, 0x45, 0x56, 0x8a, 0x05, 0x14, 0x5d, 0x82, 0x51, 0x7e, 0x3f,
- 0x5e, 0x71, 0xbc, 0x7a, 0x7c, 0x3c, 0x0a, 0xec, 0xd1, 0x9b, 0x1a, 0x0c, 0x1b, 0x98, 0x07, 0x5c,
- 0x54, 0xe7, 0x12, 0x9b, 0x31, 0xef, 0xee, 0xfd, 0xa2, 0x05, 0x93, 0xbc, 0x99, 0xb9, 0x28, 0x0a,
- 0xdc, 0xdb, 0xed, 0x88, 0x84, 0xd3, 0xfd, 0xec, 0xa4, 0x5b, 0xc8, 0x1a, 0xad, 0xdc, 0x11, 0x98,
- 0xbd, 0x99, 0xa0, 0xc2, 0x0f, 0xc1, 0x69, 0xd1, 0xee, 0x64, 0x12, 0x8c, 0x53, 0xcd, 0xa2, 0x1f,
- 0xb1, 0x60, 0xa6, 0xe6, 0x7b, 0x51, 0xe0, 0x37, 0x1a, 0x24, 0xa8, 0xb4, 0x6f, 0x37, 0xdc, 0x70,
- 0x93, 0xaf, 0x53, 0x4c, 0xd6, 0xd9, 0x49, 0x90, 0x33, 0x87, 0x0a, 0x49, 0xcc, 0xe1, 0x99, 0xbd,
- 0xdd, 0xd2, 0xcc, 0x42, 0x2e, 0x29, 0xdc, 0xa1, 0x19, 0xb4, 0x05, 0x88, 0xde, 0xec, 0xd5, 0xc8,
- 0xd9, 0x20, 0x71, 0xe3, 0x83, 0xbd, 0x37, 0x7e, 0x7c, 0x6f, 0xb7, 0x84, 0x56, 0x53, 0x24, 0x70,
- 0x06, 0x59, 0xf4, 0x2e, 0x1c, 0xa5, 0xa5, 0xa9, 0x6f, 0x1d, 0xea, 0xbd, 0xb9, 0xe9, 0xbd, 0xdd,
- 0xd2, 0xd1, 0xd5, 0x0c, 0x22, 0x38, 0x93, 0x34, 0xfa, 0x21, 0x0b, 0x4e, 0xc6, 0x9f, 0xbf, 0x74,
- 0xb7, 0xe5, 0x78, 0xf5, 0xb8, 0xe1, 0xe1, 0xde, 0x1b, 0xa6, 0x67, 0xf2, 0xc9, 0x85, 0x3c, 0x4a,
- 0x38, 0xbf, 0x11, 0xe4, 0xc1, 0x11, 0xda, 0xb5, 0x64, 0xdb, 0xd0, 0x7b, 0xdb, 0x27, 0xf6, 0x76,
- 0x4b, 0x47, 0x56, 0xd3, 0x34, 0x70, 0x16, 0xe1, 0x99, 0x05, 0x38, 0x96, 0xb9, 0x3a, 0xd1, 0x24,
- 0x14, 0xb7, 0x08, 0x67, 0x02, 0x87, 0x31, 0xfd, 0x89, 0x8e, 0x42, 0xff, 0xb6, 0xd3, 0x68, 0x8b,
- 0x8d, 0x89, 0xf9, 0x9f, 0x57, 0x0a, 0x97, 0x2c, 0xfb, 0x7f, 0x28, 0xc2, 0xc4, 0x42, 0xb5, 0x7c,
- 0x5f, 0xbb, 0x5e, 0xbf, 0xf6, 0x0a, 0x1d, 0xaf, 0xbd, 0xf8, 0x12, 0x2d, 0xe6, 0x5e, 0xa2, 0x3f,
- 0x98, 0xb1, 0x65, 0xfb, 0xd8, 0x96, 0xfd, 0x68, 0xce, 0x96, 0x7d, 0xc0, 0x1b, 0x75, 0x3b, 0x67,
- 0xd5, 0xf6, 0xb3, 0x09, 0xcc, 0xe4, 0x90, 0x18, 0xef, 0x97, 0x3c, 0x6a, 0x0f, 0xb8, 0x74, 0x1f,
- 0xcc, 0x3c, 0xd6, 0x60, 0x74, 0xc1, 0x69, 0x39, 0xb7, 0xdd, 0x86, 0x1b, 0xb9, 0x24, 0x44, 0x4f,
- 0x42, 0xd1, 0xa9, 0xd7, 0x19, 0x77, 0x37, 0x3c, 0x7f, 0x6c, 0x6f, 0xb7, 0x54, 0x9c, 0xab, 0x53,
- 0x36, 0x03, 0x14, 0xd6, 0x0e, 0xa6, 0x18, 0xe8, 0x69, 0xe8, 0xab, 0x07, 0x7e, 0x6b, 0xba, 0xc0,
- 0x30, 0xe9, 0x2e, 0xef, 0x5b, 0x0c, 0xfc, 0x56, 0x02, 0x95, 0xe1, 0xd8, 0x7f, 0x56, 0x80, 0x53,
- 0x0b, 0xa4, 0xb5, 0xb9, 0x5c, 0xcd, 0xb9, 0x2f, 0xce, 0xc3, 0x50, 0xd3, 0xf7, 0xdc, 0xc8, 0x0f,
- 0x42, 0xd1, 0x34, 0x5b, 0x11, 0x2b, 0xa2, 0x0c, 0x2b, 0x28, 0x3a, 0x0b, 0x7d, 0xad, 0x98, 0x89,
- 0x1d, 0x95, 0x0c, 0x30, 0x63, 0x5f, 0x19, 0x84, 0x62, 0xb4, 0x43, 0x12, 0x88, 0x15, 0xa3, 0x30,
- 0x6e, 0x84, 0x24, 0xc0, 0x0c, 0x12, 0x73, 0x02, 0x94, 0x47, 0x10, 0x37, 0x42, 0x82, 0x13, 0xa0,
- 0x10, 0xac, 0x61, 0xa1, 0x0a, 0x0c, 0x87, 0x89, 0x99, 0xed, 0x69, 0x6b, 0x8e, 0x31, 0x56, 0x41,
- 0xcd, 0x64, 0x4c, 0xc4, 0xb8, 0xc1, 0x06, 0xba, 0xb2, 0x0a, 0x5f, 0x2f, 0x00, 0xe2, 0x43, 0xf8,
- 0x5d, 0x36, 0x70, 0x37, 0xd2, 0x03, 0xd7, 0xfb, 0x96, 0x78, 0x50, 0xa3, 0xf7, 0xff, 0x5a, 0x70,
- 0x6a, 0xc1, 0xf5, 0xea, 0x24, 0xc8, 0x59, 0x80, 0x0f, 0xe7, 0x29, 0x7f, 0x30, 0x26, 0xc5, 0x58,
- 0x62, 0x7d, 0x0f, 0x60, 0x89, 0xd9, 0xff, 0x6c, 0x01, 0xe2, 0x9f, 0xfd, 0xbe, 0xfb, 0xd8, 0x1b,
- 0xe9, 0x8f, 0x7d, 0x00, 0xcb, 0xc2, 0xbe, 0x06, 0xe3, 0x0b, 0x0d, 0x97, 0x78, 0x51, 0xb9, 0xb2,
- 0xe0, 0x7b, 0xeb, 0xee, 0x06, 0x7a, 0x05, 0xc6, 0x23, 0xb7, 0x49, 0xfc, 0x76, 0x54, 0x25, 0x35,
- 0xdf, 0x63, 0x2f, 0x57, 0xeb, 0x7c, 0xff, 0x3c, 0xda, 0xdb, 0x2d, 0x8d, 0xaf, 0x19, 0x10, 0x9c,
- 0xc0, 0xb4, 0x7f, 0x95, 0x9e, 0x5b, 0x8d, 0x76, 0x18, 0x91, 0x60, 0x2d, 0x68, 0x87, 0xd1, 0x7c,
- 0x9b, 0xf2, 0x9e, 0x95, 0xc0, 0xa7, 0xdd, 0x71, 0x7d, 0x0f, 0x9d, 0x32, 0x9e, 0xe3, 0x43, 0xf2,
- 0x29, 0x2e, 0x9e, 0xdd, 0xb3, 0x00, 0xa1, 0xbb, 0xe1, 0x91, 0x40, 0x7b, 0x3e, 0x8c, 0xb3, 0xad,
- 0xa2, 0x4a, 0xb1, 0x86, 0x81, 0x1a, 0x30, 0xd6, 0x70, 0x6e, 0x93, 0x46, 0x95, 0x34, 0x48, 0x2d,
- 0xf2, 0x03, 0x21, 0xdf, 0x78, 0xa1, 0xb7, 0x77, 0xc0, 0x35, 0xbd, 0xea, 0xfc, 0xd4, 0xde, 0x6e,
- 0x69, 0xcc, 0x28, 0xc2, 0x26, 0x71, 0x7a, 0x74, 0xf8, 0x2d, 0xfa, 0x15, 0x4e, 0x43, 0x7f, 0x7c,
- 0x5e, 0x17, 0x65, 0x58, 0x41, 0xd5, 0xd1, 0xd1, 0x97, 0x77, 0x74, 0xd8, 0x7f, 0x47, 0x17, 0x9a,
- 0xdf, 0x6c, 0xf9, 0x1e, 0xf1, 0xa2, 0x05, 0xdf, 0xab, 0x73, 0xc9, 0xd4, 0x2b, 0x86, 0xe8, 0xe4,
- 0x5c, 0x42, 0x74, 0x72, 0x3c, 0x5d, 0x43, 0x93, 0x9e, 0x7c, 0x14, 0x06, 0xc2, 0xc8, 0x89, 0xda,
- 0xa1, 0x18, 0xb8, 0x47, 0xe5, 0xb2, 0xab, 0xb2, 0xd2, 0xfd, 0xdd, 0xd2, 0x84, 0xaa, 0xc6, 0x8b,
- 0xb0, 0xa8, 0x80, 0x9e, 0x82, 0xc1, 0x26, 0x09, 0x43, 0x67, 0x43, 0xb2, 0x0d, 0x13, 0xa2, 0xee,
- 0xe0, 0x0a, 0x2f, 0xc6, 0x12, 0x8e, 0x1e, 0x83, 0x7e, 0x12, 0x04, 0x7e, 0x20, 0xbe, 0x6d, 0x4c,
- 0x20, 0xf6, 0x2f, 0xd1, 0x42, 0xcc, 0x61, 0xf6, 0xff, 0x6c, 0xc1, 0x84, 0xea, 0x2b, 0x6f, 0xeb,
- 0x10, 0x9e, 0x6b, 0x6f, 0x03, 0xd4, 0xe4, 0x07, 0x86, 0xec, 0x9a, 0x1d, 0x79, 0xfe, 0x5c, 0x26,
- 0x47, 0x93, 0x1a, 0xc6, 0x98, 0xb2, 0x2a, 0x0a, 0xb1, 0x46, 0xcd, 0xfe, 0x63, 0x0b, 0x8e, 0x24,
- 0xbe, 0xe8, 0x9a, 0x1b, 0x46, 0xe8, 0x9d, 0xd4, 0x57, 0xcd, 0xf6, 0xb8, 0xf8, 0xdc, 0x90, 0x7f,
- 0x93, 0xda, 0xf3, 0xb2, 0x44, 0xfb, 0xa2, 0x2b, 0xd0, 0xef, 0x46, 0xa4, 0x29, 0x3f, 0xe6, 0xb1,
- 0x8e, 0x1f, 0xc3, 0x7b, 0x15, 0xcf, 0x48, 0x99, 0xd6, 0xc4, 0x9c, 0x80, 0xfd, 0x67, 0x45, 0x18,
- 0xe6, 0xfb, 0x7b, 0xc5, 0x69, 0x1d, 0xc2, 0x5c, 0x3c, 0x03, 0xc3, 0x6e, 0xb3, 0xd9, 0x8e, 0x9c,
- 0xdb, 0xe2, 0xde, 0x1b, 0xe2, 0x67, 0x50, 0x59, 0x16, 0xe2, 0x18, 0x8e, 0xca, 0xd0, 0xc7, 0xba,
- 0xc2, 0xbf, 0xf2, 0xc9, 0xec, 0xaf, 0x14, 0x7d, 0x9f, 0x5d, 0x74, 0x22, 0x87, 0xb3, 0x9c, 0x6a,
- 0x5f, 0xd1, 0x22, 0xcc, 0x48, 0x20, 0x07, 0xe0, 0xb6, 0xeb, 0x39, 0xc1, 0x0e, 0x2d, 0x9b, 0x2e,
- 0x32, 0x82, 0xcf, 0x75, 0x26, 0x38, 0xaf, 0xf0, 0x39, 0x59, 0xf5, 0x61, 0x31, 0x00, 0x6b, 0x44,
- 0x67, 0x5e, 0x86, 0x61, 0x85, 0x7c, 0x10, 0xce, 0x71, 0xe6, 0x63, 0x30, 0x91, 0x68, 0xab, 0x5b,
- 0xf5, 0x51, 0x9d, 0xf1, 0xfc, 0x43, 0x76, 0x64, 0x88, 0x5e, 0x2f, 0x79, 0xdb, 0xe2, 0x6e, 0xba,
- 0x07, 0x47, 0x1b, 0x19, 0x47, 0xbe, 0x98, 0xd7, 0xde, 0xaf, 0x88, 0x53, 0xe2, 0xb3, 0x8f, 0x66,
- 0x41, 0x71, 0x66, 0x1b, 0xc6, 0x89, 0x58, 0xe8, 0x74, 0x22, 0xd2, 0xf3, 0xee, 0xa8, 0xea, 0xfc,
- 0x55, 0xb2, 0xa3, 0x0e, 0xd5, 0xef, 0x64, 0xf7, 0x4f, 0xf3, 0xd1, 0xe7, 0xc7, 0xe5, 0x88, 0x20,
- 0x50, 0xbc, 0x4a, 0x76, 0xf8, 0x54, 0xe8, 0x5f, 0x57, 0xec, 0xf8, 0x75, 0x5f, 0xb3, 0x60, 0x4c,
- 0x7d, 0xdd, 0x21, 0x9c, 0x0b, 0xf3, 0xe6, 0xb9, 0x70, 0xba, 0xe3, 0x02, 0xcf, 0x39, 0x11, 0xbe,
- 0x5e, 0x80, 0x93, 0x0a, 0x87, 0x3e, 0xa2, 0xf8, 0x1f, 0xb1, 0xaa, 0x2e, 0xc0, 0xb0, 0xa7, 0xc4,
- 0x89, 0x96, 0x29, 0xc7, 0x8b, 0x85, 0x89, 0x31, 0x0e, 0xbd, 0xf2, 0xbc, 0xf8, 0xd2, 0x1e, 0xd5,
- 0xe5, 0xec, 0xe2, 0x72, 0x9f, 0x87, 0x62, 0xdb, 0xad, 0x8b, 0x0b, 0xe6, 0xc3, 0x72, 0xb4, 0x6f,
- 0x94, 0x17, 0xf7, 0x77, 0x4b, 0x8f, 0xe6, 0xa9, 0x9c, 0xe8, 0xcd, 0x16, 0xce, 0xde, 0x28, 0x2f,
- 0x62, 0x5a, 0x19, 0xcd, 0xc1, 0x84, 0xd4, 0xaa, 0xdd, 0xa4, 0x7c, 0xa9, 0xef, 0x89, 0x7b, 0x48,
- 0x09, 0xcb, 0xb1, 0x09, 0xc6, 0x49, 0x7c, 0xb4, 0x08, 0x93, 0x5b, 0xed, 0xdb, 0xa4, 0x41, 0x22,
- 0xfe, 0xc1, 0x57, 0x09, 0x17, 0x25, 0x0f, 0xc7, 0x4f, 0xd8, 0xab, 0x09, 0x38, 0x4e, 0xd5, 0xb0,
- 0xbf, 0xcd, 0xee, 0x03, 0x31, 0x7a, 0x1a, 0x7f, 0xf3, 0x9d, 0x5c, 0xce, 0xbd, 0xac, 0x8a, 0xab,
- 0x64, 0x67, 0xcd, 0xa7, 0x7c, 0x48, 0xf6, 0xaa, 0x30, 0xd6, 0x7c, 0x5f, 0xc7, 0x35, 0xff, 0xbb,
- 0x05, 0x38, 0xa6, 0x46, 0xc0, 0xe0, 0x96, 0xbf, 0xdb, 0xc7, 0xe0, 0x22, 0x8c, 0xd4, 0xc9, 0xba,
- 0xd3, 0x6e, 0x44, 0x4a, 0xaf, 0xd1, 0xcf, 0x55, 0x6d, 0x8b, 0x71, 0x31, 0xd6, 0x71, 0x0e, 0x30,
- 0x6c, 0xbf, 0x39, 0xc6, 0x2e, 0xe2, 0xc8, 0xa1, 0x6b, 0x5c, 0xed, 0x1a, 0x2b, 0x77, 0xd7, 0x3c,
- 0x06, 0xfd, 0x6e, 0x93, 0x32, 0x66, 0x05, 0x93, 0xdf, 0x2a, 0xd3, 0x42, 0xcc, 0x61, 0xe8, 0x09,
- 0x18, 0xac, 0xf9, 0xcd, 0xa6, 0xe3, 0xd5, 0xd9, 0x95, 0x37, 0x3c, 0x3f, 0x42, 0x79, 0xb7, 0x05,
- 0x5e, 0x84, 0x25, 0x8c, 0x32, 0xdf, 0x4e, 0xb0, 0xc1, 0x85, 0x3d, 0x82, 0xf9, 0x9e, 0x0b, 0x36,
- 0x42, 0xcc, 0x4a, 0xe9, 0x5b, 0xf5, 0x8e, 0x1f, 0x6c, 0xb9, 0xde, 0xc6, 0xa2, 0x1b, 0x88, 0x2d,
- 0xa1, 0xee, 0xc2, 0x5b, 0x0a, 0x82, 0x35, 0x2c, 0xb4, 0x0c, 0xfd, 0x2d, 0x3f, 0x88, 0xc2, 0xe9,
- 0x01, 0x36, 0xdc, 0x8f, 0xe6, 0x1c, 0x44, 0xfc, 0x6b, 0x2b, 0x7e, 0x10, 0xc5, 0x1f, 0x40, 0xff,
- 0x85, 0x98, 0x57, 0x47, 0xd7, 0x60, 0x90, 0x78, 0xdb, 0xcb, 0x81, 0xdf, 0x9c, 0x3e, 0x92, 0x4f,
- 0x69, 0x89, 0xa3, 0xf0, 0x65, 0x16, 0xf3, 0xa8, 0xa2, 0x18, 0x4b, 0x12, 0xe8, 0xa3, 0x50, 0x24,
- 0xde, 0xf6, 0xf4, 0x20, 0xa3, 0x34, 0x93, 0x43, 0xe9, 0xa6, 0x13, 0xc4, 0x67, 0xfe, 0x92, 0xb7,
- 0x8d, 0x69, 0x1d, 0xf4, 0x09, 0x18, 0x96, 0x07, 0x46, 0x28, 0xa4, 0xa8, 0x99, 0x0b, 0x56, 0x1e,
- 0x33, 0x98, 0xbc, 0xdb, 0x76, 0x03, 0xd2, 0x24, 0x5e, 0x14, 0xc6, 0x27, 0xa4, 0x84, 0x86, 0x38,
- 0xa6, 0x86, 0x6a, 0x30, 0x1a, 0x90, 0xd0, 0xbd, 0x47, 0x2a, 0x7e, 0xc3, 0xad, 0xed, 0x4c, 0x9f,
- 0x60, 0xdd, 0x7b, 0xaa, 0xe3, 0x90, 0x61, 0xad, 0x42, 0x2c, 0xe5, 0xd7, 0x4b, 0xb1, 0x41, 0x14,
- 0xbd, 0x05, 0x63, 0x01, 0x09, 0x23, 0x27, 0x88, 0x44, 0x2b, 0xd3, 0x4a, 0x2b, 0x37, 0x86, 0x75,
- 0x00, 0x7f, 0x4e, 0xc4, 0xcd, 0xc4, 0x10, 0x6c, 0x52, 0x40, 0x9f, 0x90, 0x2a, 0x87, 0x15, 0xbf,
- 0xed, 0x45, 0xe1, 0xf4, 0x30, 0xeb, 0x77, 0xa6, 0x6e, 0xfa, 0x66, 0x8c, 0x97, 0xd4, 0x49, 0xf0,
- 0xca, 0xd8, 0x20, 0x85, 0x3e, 0x05, 0x63, 0xfc, 0x3f, 0x57, 0xa9, 0x86, 0xd3, 0xc7, 0x18, 0xed,
- 0xb3, 0xf9, 0xb4, 0x39, 0xe2, 0xfc, 0x31, 0x41, 0x7c, 0x4c, 0x2f, 0x0d, 0xb1, 0x49, 0x0d, 0x61,
- 0x18, 0x6b, 0xb8, 0xdb, 0xc4, 0x23, 0x61, 0x58, 0x09, 0xfc, 0xdb, 0x44, 0x48, 0x88, 0x4f, 0x66,
- 0xab, 0x60, 0xfd, 0xdb, 0x44, 0x3c, 0x02, 0xf5, 0x3a, 0xd8, 0x24, 0x81, 0x6e, 0xc0, 0x38, 0x7d,
- 0x92, 0xbb, 0x31, 0xd1, 0x91, 0x6e, 0x44, 0xd9, 0xc3, 0x19, 0x1b, 0x95, 0x70, 0x82, 0x08, 0xba,
- 0x0e, 0xa3, 0x6c, 0xcc, 0xdb, 0x2d, 0x4e, 0xf4, 0x78, 0x37, 0xa2, 0xcc, 0xa0, 0xa0, 0xaa, 0x55,
- 0xc1, 0x06, 0x01, 0xf4, 0x26, 0x0c, 0x37, 0xdc, 0x75, 0x52, 0xdb, 0xa9, 0x35, 0xc8, 0xf4, 0x28,
- 0xa3, 0x96, 0x79, 0x18, 0x5e, 0x93, 0x48, 0x9c, 0x3f, 0x57, 0x7f, 0x71, 0x5c, 0x1d, 0xdd, 0x84,
- 0xe3, 0x11, 0x09, 0x9a, 0xae, 0xe7, 0xd0, 0x43, 0x4c, 0x3c, 0x09, 0x99, 0x66, 0x7c, 0x8c, 0xad,
- 0xae, 0x33, 0x62, 0x36, 0x8e, 0xaf, 0x65, 0x62, 0xe1, 0x9c, 0xda, 0xe8, 0x2e, 0x4c, 0x67, 0x40,
- 0xf8, 0xba, 0x3d, 0xca, 0x28, 0xbf, 0x26, 0x28, 0x4f, 0xaf, 0xe5, 0xe0, 0xed, 0x77, 0x80, 0xe1,
- 0x5c, 0xea, 0xe8, 0x3a, 0x4c, 0xb0, 0x93, 0xb3, 0xd2, 0x6e, 0x34, 0x44, 0x83, 0xe3, 0xac, 0xc1,
- 0x27, 0x24, 0x1f, 0x51, 0x36, 0xc1, 0xfb, 0xbb, 0x25, 0x88, 0xff, 0xe1, 0x64, 0x6d, 0x74, 0x9b,
- 0x29, 0x61, 0xdb, 0x81, 0x1b, 0xed, 0xd0, 0x5d, 0x45, 0xee, 0x46, 0xd3, 0x13, 0x1d, 0x05, 0x52,
- 0x3a, 0xaa, 0xd2, 0xd4, 0xea, 0x85, 0x38, 0x49, 0x90, 0x5e, 0x05, 0x61, 0x54, 0x77, 0xbd, 0xe9,
- 0x49, 0xfe, 0x9e, 0x92, 0x27, 0x69, 0x95, 0x16, 0x62, 0x0e, 0x63, 0x0a, 0x58, 0xfa, 0xe3, 0x3a,
- 0xbd, 0x71, 0xa7, 0x18, 0x62, 0xac, 0x80, 0x95, 0x00, 0x1c, 0xe3, 0x50, 0x26, 0x38, 0x8a, 0x76,
- 0xa6, 0x11, 0x43, 0x55, 0x07, 0xe2, 0xda, 0xda, 0x27, 0x30, 0x2d, 0xb7, 0x6f, 0xc3, 0xb8, 0x3a,
- 0x26, 0xd8, 0x98, 0xa0, 0x12, 0xf4, 0x33, 0xb6, 0x4f, 0x88, 0x4f, 0x87, 0x69, 0x17, 0x18, 0x4b,
- 0x88, 0x79, 0x39, 0xeb, 0x82, 0x7b, 0x8f, 0xcc, 0xef, 0x44, 0x84, 0xcb, 0x22, 0x8a, 0x5a, 0x17,
- 0x24, 0x00, 0xc7, 0x38, 0xf6, 0xbf, 0xe7, 0xec, 0x73, 0x7c, 0x4b, 0xf4, 0x70, 0x2f, 0x3e, 0x0b,
- 0x43, 0xcc, 0xf0, 0xc3, 0x0f, 0xb8, 0x76, 0xb6, 0x3f, 0x66, 0x98, 0xaf, 0x88, 0x72, 0xac, 0x30,
- 0xd0, 0xab, 0x30, 0x56, 0xd3, 0x1b, 0x10, 0x97, 0xba, 0x3a, 0x46, 0x8c, 0xd6, 0xb1, 0x89, 0x8b,
- 0x2e, 0xc1, 0x10, 0xb3, 0x71, 0xaa, 0xf9, 0x0d, 0xc1, 0x6d, 0x4a, 0xce, 0x64, 0xa8, 0x22, 0xca,
- 0xf7, 0xb5, 0xdf, 0x58, 0x61, 0xa3, 0x73, 0x30, 0x40, 0xbb, 0x50, 0xae, 0x88, 0xeb, 0x54, 0x49,
- 0x02, 0xaf, 0xb0, 0x52, 0x2c, 0xa0, 0xf6, 0x1f, 0x5b, 0x8c, 0x97, 0x4a, 0x9f, 0xf9, 0xe8, 0x0a,
- 0xbb, 0x34, 0xd8, 0x0d, 0xa2, 0x69, 0xe1, 0x1f, 0xd7, 0x6e, 0x02, 0x05, 0xdb, 0x4f, 0xfc, 0xc7,
- 0x46, 0x4d, 0xf4, 0x76, 0xf2, 0x66, 0xe0, 0x0c, 0xc5, 0x8b, 0x72, 0x08, 0x92, 0xb7, 0xc3, 0x23,
- 0xf1, 0x15, 0x47, 0xfb, 0xd3, 0xe9, 0x8a, 0xb0, 0x7f, 0xaa, 0xa0, 0xad, 0x92, 0x6a, 0xe4, 0x44,
- 0x04, 0x55, 0x60, 0xf0, 0x8e, 0xe3, 0x46, 0xae, 0xb7, 0x21, 0xf8, 0xbe, 0xce, 0x17, 0x1d, 0xab,
- 0x74, 0x8b, 0x57, 0xe0, 0xdc, 0x8b, 0xf8, 0x83, 0x25, 0x19, 0x4a, 0x31, 0x68, 0x7b, 0x1e, 0xa5,
- 0x58, 0xe8, 0x95, 0x22, 0xe6, 0x15, 0x38, 0x45, 0xf1, 0x07, 0x4b, 0x32, 0xe8, 0x1d, 0x00, 0x79,
- 0x42, 0x90, 0xba, 0x90, 0x1d, 0x3e, 0xdb, 0x9d, 0xe8, 0x9a, 0xaa, 0xc3, 0x85, 0x93, 0xf1, 0x7f,
- 0xac, 0xd1, 0xb3, 0x23, 0x6d, 0x4e, 0xf5, 0xce, 0xa0, 0x4f, 0xd2, 0x2d, 0xea, 0x04, 0x11, 0xa9,
- 0xcf, 0x45, 0x62, 0x70, 0x9e, 0xee, 0xed, 0x71, 0xb8, 0xe6, 0x36, 0x89, 0xbe, 0x9d, 0x05, 0x11,
- 0x1c, 0xd3, 0xb3, 0x7f, 0xbf, 0x08, 0xd3, 0x79, 0xdd, 0xa5, 0x9b, 0x86, 0xdc, 0x75, 0xa3, 0x05,
- 0xca, 0xd6, 0x5a, 0xe6, 0xa6, 0x59, 0x12, 0xe5, 0x58, 0x61, 0xd0, 0xd5, 0x1b, 0xba, 0x1b, 0xf2,
- 0x6d, 0xdf, 0x1f, 0xaf, 0xde, 0x2a, 0x2b, 0xc5, 0x02, 0x4a, 0xf1, 0x02, 0xe2, 0x84, 0xc2, 0xf8,
- 0x4e, 0x5b, 0xe5, 0x98, 0x95, 0x62, 0x01, 0xd5, 0xa5, 0x8c, 0x7d, 0x5d, 0xa4, 0x8c, 0xc6, 0x10,
- 0xf5, 0x3f, 0xd8, 0x21, 0x42, 0x9f, 0x06, 0x58, 0x77, 0x3d, 0x37, 0xdc, 0x64, 0xd4, 0x07, 0x0e,
- 0x4c, 0x5d, 0x31, 0xc5, 0xcb, 0x8a, 0x0a, 0xd6, 0x28, 0xa2, 0x97, 0x60, 0x44, 0x1d, 0x20, 0xe5,
- 0x45, 0xa6, 0xfa, 0xd7, 0x4c, 0xa9, 0xe2, 0xd3, 0x74, 0x11, 0xeb, 0x78, 0xf6, 0x67, 0x93, 0xeb,
- 0x45, 0xec, 0x00, 0x6d, 0x7c, 0xad, 0x5e, 0xc7, 0xb7, 0xd0, 0x79, 0x7c, 0xed, 0xbf, 0x1e, 0x86,
- 0x09, 0xa3, 0xb1, 0x76, 0xd8, 0xc3, 0x99, 0x7b, 0x99, 0x5e, 0x40, 0x4e, 0x44, 0xc4, 0xfe, 0xb3,
- 0xbb, 0x6f, 0x15, 0xfd, 0x92, 0xa2, 0x3b, 0x80, 0xd7, 0x47, 0x9f, 0x86, 0xe1, 0x86, 0x13, 0x32,
- 0x89, 0x25, 0x11, 0xfb, 0xae, 0x17, 0x62, 0xf1, 0x83, 0xd0, 0x09, 0x23, 0xed, 0xd6, 0xe7, 0xb4,
- 0x63, 0x92, 0xf4, 0xa6, 0xa4, 0xfc, 0x95, 0xb4, 0xee, 0x54, 0x9d, 0xa0, 0x4c, 0xd8, 0x0e, 0xe6,
- 0x30, 0x74, 0x89, 0x1d, 0xad, 0x74, 0x55, 0x2c, 0x50, 0x6e, 0x94, 0x2d, 0xb3, 0x7e, 0x83, 0xc9,
- 0x56, 0x30, 0x6c, 0x60, 0xc6, 0x6f, 0xb2, 0x81, 0x0e, 0x6f, 0xb2, 0xa7, 0x60, 0x90, 0xfd, 0x50,
- 0x2b, 0x40, 0xcd, 0x46, 0x99, 0x17, 0x63, 0x09, 0x4f, 0x2e, 0x98, 0xa1, 0xde, 0x16, 0x0c, 0x7d,
- 0xf5, 0x89, 0x45, 0xcd, 0xcc, 0x2e, 0x86, 0xf8, 0x29, 0x27, 0x96, 0x3c, 0x96, 0x30, 0xf4, 0x6b,
- 0x16, 0x20, 0xa7, 0x41, 0x5f, 0xcb, 0xb4, 0x58, 0x3d, 0x6e, 0x80, 0xb1, 0xda, 0xaf, 0x76, 0x1d,
- 0xf6, 0x76, 0x38, 0x3b, 0x97, 0xaa, 0xcd, 0x25, 0xa5, 0xaf, 0x88, 0x2e, 0xa2, 0x34, 0x82, 0x7e,
- 0x19, 0x5d, 0x73, 0xc3, 0xe8, 0xf3, 0x7f, 0x9f, 0xb8, 0x9c, 0x32, 0xba, 0x84, 0x6e, 0xe8, 0x8f,
- 0xaf, 0x91, 0x03, 0x3e, 0xbe, 0xc6, 0x72, 0x1f, 0x5e, 0xdf, 0x9f, 0x78, 0xc0, 0x8c, 0xb2, 0x2f,
- 0x7f, 0xa2, 0xcb, 0x03, 0x46, 0x88, 0xd3, 0x7b, 0x79, 0xc6, 0x54, 0x84, 0x1e, 0x78, 0x8c, 0x75,
- 0xb9, 0xf3, 0x23, 0xf8, 0x46, 0x48, 0x82, 0xf9, 0x93, 0x52, 0x4d, 0xbc, 0xaf, 0xf3, 0x1e, 0x9a,
- 0xde, 0xf8, 0x87, 0x2c, 0x98, 0x4e, 0x0f, 0x10, 0xef, 0xd2, 0xf4, 0x38, 0xeb, 0xbf, 0xdd, 0x69,
- 0x64, 0x44, 0xe7, 0xa5, 0xb9, 0xeb, 0xf4, 0x5c, 0x0e, 0x2d, 0x9c, 0xdb, 0x0a, 0xba, 0x04, 0x10,
- 0x46, 0x7e, 0x8b, 0x9f, 0xf5, 0x8c, 0x99, 0x1d, 0x66, 0x06, 0x17, 0x50, 0x55, 0xa5, 0xfb, 0xf1,
- 0x5d, 0xa0, 0xe1, 0xce, 0xb4, 0xe1, 0x44, 0xce, 0x8a, 0xc9, 0x90, 0x77, 0x2f, 0xea, 0xf2, 0xee,
- 0x2e, 0x52, 0xd2, 0x59, 0x39, 0xa7, 0xb3, 0x6f, 0xb5, 0x1d, 0x2f, 0x72, 0xa3, 0x1d, 0x5d, 0x3e,
- 0xee, 0x81, 0x39, 0x94, 0xe8, 0x53, 0xd0, 0xdf, 0x70, 0xbd, 0xf6, 0x5d, 0x71, 0xc7, 0x9e, 0xcb,
- 0x7e, 0xfe, 0x78, 0xed, 0xbb, 0xe6, 0xe4, 0x94, 0xe8, 0x56, 0x66, 0xe5, 0xfb, 0xbb, 0x25, 0x94,
- 0x46, 0xc0, 0x9c, 0xaa, 0xfd, 0x34, 0x8c, 0x2f, 0x3a, 0xa4, 0xe9, 0x7b, 0x4b, 0x5e, 0xbd, 0xe5,
- 0xbb, 0x5e, 0x84, 0xa6, 0xa1, 0x8f, 0x31, 0x97, 0xfc, 0x6a, 0xed, 0xa3, 0x83, 0x8f, 0x59, 0x89,
- 0xbd, 0x01, 0xc7, 0x16, 0xfd, 0x3b, 0xde, 0x1d, 0x27, 0xa8, 0xcf, 0x55, 0xca, 0x9a, 0xbc, 0x70,
- 0x55, 0xca, 0xab, 0xac, 0x7c, 0x69, 0x80, 0x56, 0x93, 0x2f, 0xc2, 0x65, 0xb7, 0x41, 0x72, 0xa4,
- 0xba, 0x3f, 0x5b, 0x30, 0x5a, 0x8a, 0xf1, 0x95, 0x4e, 0xd2, 0xca, 0x35, 0x67, 0x78, 0x0b, 0x86,
- 0xd6, 0x5d, 0xd2, 0xa8, 0x63, 0xb2, 0x2e, 0x66, 0xe3, 0xc9, 0x7c, 0x83, 0xc7, 0x65, 0x8a, 0xa9,
- 0x94, 0xa7, 0x4c, 0xda, 0xb5, 0x2c, 0x2a, 0x63, 0x45, 0x06, 0x6d, 0xc1, 0xa4, 0x9c, 0x33, 0x09,
- 0x15, 0xe7, 0xfd, 0x53, 0x9d, 0x96, 0xaf, 0x49, 0x9c, 0x19, 0x7f, 0xe3, 0x04, 0x19, 0x9c, 0x22,
- 0x8c, 0x4e, 0x41, 0x5f, 0x93, 0x72, 0x36, 0x7d, 0x6c, 0xf8, 0x99, 0x78, 0x8b, 0x49, 0xea, 0x58,
- 0xa9, 0xfd, 0xf3, 0x16, 0x9c, 0x48, 0x8d, 0x8c, 0x90, 0x58, 0x3e, 0xe0, 0x59, 0x48, 0x4a, 0x10,
- 0x0b, 0xdd, 0x25, 0x88, 0xf6, 0x7f, 0x61, 0xc1, 0xd1, 0xa5, 0x66, 0x2b, 0xda, 0x59, 0x74, 0x4d,
- 0xdb, 0x83, 0x97, 0x61, 0xa0, 0x49, 0xea, 0x6e, 0xbb, 0x29, 0x66, 0xae, 0x24, 0x6f, 0xff, 0x15,
- 0x56, 0x4a, 0x4f, 0x90, 0x6a, 0xe4, 0x07, 0xce, 0x06, 0xe1, 0x05, 0x58, 0xa0, 0x33, 0x1e, 0xca,
- 0xbd, 0x47, 0xae, 0xb9, 0x4d, 0x37, 0xba, 0xbf, 0xdd, 0x25, 0xcc, 0x06, 0x24, 0x11, 0x1c, 0xd3,
- 0xb3, 0xbf, 0x69, 0xc1, 0x84, 0x5c, 0xf7, 0x73, 0xf5, 0x7a, 0x40, 0xc2, 0x10, 0xcd, 0x40, 0xc1,
- 0x6d, 0x89, 0x5e, 0x82, 0xe8, 0x65, 0xa1, 0x5c, 0xc1, 0x05, 0xb7, 0x25, 0x9f, 0x6b, 0x8c, 0xc1,
- 0x28, 0x9a, 0x16, 0x14, 0x57, 0x44, 0x39, 0x56, 0x18, 0xe8, 0x3c, 0x0c, 0x79, 0x7e, 0x9d, 0xbf,
- 0x78, 0x84, 0x0e, 0x9d, 0x62, 0xae, 0x8a, 0x32, 0xac, 0xa0, 0xa8, 0x02, 0xc3, 0xdc, 0xbe, 0x36,
- 0x5e, 0xb4, 0x3d, 0x59, 0xe9, 0xb2, 0x2f, 0x5b, 0x93, 0x35, 0x71, 0x4c, 0xc4, 0xfe, 0x53, 0x0b,
- 0x46, 0xe5, 0x97, 0xf5, 0xf8, 0x16, 0xa5, 0x5b, 0x2b, 0x7e, 0x87, 0xc6, 0x5b, 0x8b, 0xbe, 0x25,
- 0x19, 0xc4, 0x78, 0x42, 0x16, 0x0f, 0xf4, 0x84, 0xbc, 0x08, 0x23, 0x4e, 0xab, 0x55, 0x31, 0xdf,
- 0x9f, 0x6c, 0x29, 0xcd, 0xc5, 0xc5, 0x58, 0xc7, 0xb1, 0x7f, 0xae, 0x00, 0xe3, 0xf2, 0x0b, 0xaa,
- 0xed, 0xdb, 0x21, 0x89, 0xd0, 0x1a, 0x0c, 0x3b, 0x7c, 0x96, 0x88, 0x5c, 0xe4, 0x8f, 0x65, 0xcb,
- 0x45, 0x8d, 0x29, 0x8d, 0x19, 0xe9, 0x39, 0x59, 0x1b, 0xc7, 0x84, 0x50, 0x03, 0xa6, 0x3c, 0x3f,
- 0x62, 0x4c, 0x95, 0x82, 0x77, 0x52, 0x55, 0x27, 0xa9, 0x9f, 0x14, 0xd4, 0xa7, 0x56, 0x93, 0x54,
- 0x70, 0x9a, 0x30, 0x5a, 0x92, 0xb2, 0xe6, 0x62, 0xbe, 0x90, 0x50, 0x9f, 0xb8, 0x6c, 0x51, 0xb3,
- 0xfd, 0x47, 0x16, 0x0c, 0x4b, 0xb4, 0xc3, 0xb0, 0x4a, 0x58, 0x81, 0xc1, 0x90, 0x4d, 0x82, 0x1c,
- 0x1a, 0xbb, 0x53, 0xc7, 0xf9, 0x7c, 0xc5, 0xbc, 0x22, 0xff, 0x1f, 0x62, 0x49, 0x83, 0xa9, 0x1a,
- 0x55, 0xf7, 0xdf, 0x27, 0xaa, 0x46, 0xd5, 0x9f, 0x9c, 0x4b, 0xe9, 0x1f, 0x58, 0x9f, 0x35, 0xd9,
- 0x3d, 0x7d, 0xd2, 0xb4, 0x02, 0xb2, 0xee, 0xde, 0x4d, 0x3e, 0x69, 0x2a, 0xac, 0x14, 0x0b, 0x28,
- 0x7a, 0x07, 0x46, 0x6b, 0x52, 0xc7, 0x14, 0xef, 0xf0, 0x73, 0x1d, 0xf5, 0x9d, 0x4a, 0x35, 0xce,
- 0x65, 0xa4, 0x0b, 0x5a, 0x7d, 0x6c, 0x50, 0x33, 0xed, 0xc7, 0x8a, 0xdd, 0xec, 0xc7, 0x62, 0xba,
- 0xf9, 0xd6, 0x54, 0xbf, 0x60, 0xc1, 0x00, 0xd7, 0x2d, 0xf4, 0xa6, 0xda, 0xd1, 0x2c, 0x05, 0xe2,
- 0xb1, 0xbb, 0x49, 0x0b, 0x05, 0x67, 0x83, 0x56, 0x60, 0x98, 0xfd, 0x60, 0xba, 0x91, 0x62, 0xbe,
- 0xb7, 0x19, 0x6f, 0x55, 0xef, 0xe0, 0x4d, 0x59, 0x0d, 0xc7, 0x14, 0xec, 0x9f, 0x2e, 0xd2, 0xd3,
- 0x2d, 0x46, 0x35, 0x2e, 0x7d, 0xeb, 0xe1, 0x5d, 0xfa, 0x85, 0x87, 0x75, 0xe9, 0x6f, 0xc0, 0x44,
- 0x4d, 0xb3, 0x2b, 0x88, 0x67, 0xf2, 0x7c, 0xc7, 0x45, 0xa2, 0x99, 0x20, 0x70, 0xe9, 0xeb, 0x82,
- 0x49, 0x04, 0x27, 0xa9, 0xa2, 0x4f, 0xc2, 0x28, 0x9f, 0x67, 0xd1, 0x0a, 0x37, 0xc1, 0x7b, 0x22,
- 0x7f, 0xbd, 0xe8, 0x4d, 0x70, 0x69, 0xbd, 0x56, 0x1d, 0x1b, 0xc4, 0xec, 0x7f, 0xb1, 0x00, 0x2d,
- 0xb5, 0x36, 0x49, 0x93, 0x04, 0x4e, 0x23, 0x56, 0x0f, 0x7e, 0xc9, 0x82, 0x69, 0x92, 0x2a, 0x5e,
- 0xf0, 0x9b, 0x4d, 0x21, 0x0c, 0xc8, 0x91, 0x57, 0x2d, 0xe5, 0xd4, 0x89, 0x1f, 0x04, 0x79, 0x18,
- 0x38, 0xb7, 0x3d, 0xb4, 0x02, 0x47, 0xf8, 0x2d, 0xa9, 0x00, 0x9a, 0x95, 0xde, 0x23, 0x82, 0xf0,
- 0x91, 0xb5, 0x34, 0x0a, 0xce, 0xaa, 0x67, 0xff, 0xd1, 0x18, 0xe4, 0xf6, 0xe2, 0x03, 0xbd, 0xe8,
- 0x07, 0x7a, 0xd1, 0x0f, 0xf4, 0xa2, 0x1f, 0xe8, 0x45, 0x3f, 0xd0, 0x8b, 0x7e, 0xa0, 0x17, 0x7d,
- 0x9f, 0xea, 0x45, 0x7f, 0xc6, 0x82, 0x63, 0xea, 0xfa, 0x32, 0x1e, 0xec, 0x9f, 0x83, 0x23, 0x7c,
- 0xbb, 0x2d, 0x34, 0x1c, 0xb7, 0xb9, 0x46, 0x9a, 0xad, 0x86, 0x13, 0x49, 0xeb, 0xa7, 0x8b, 0x99,
- 0x2b, 0x37, 0xe1, 0x62, 0x61, 0x54, 0xe4, 0xbe, 0x6a, 0x19, 0x00, 0x9c, 0xd5, 0x8c, 0xfd, 0xfb,
- 0x43, 0xd0, 0xbf, 0xb4, 0x4d, 0xbc, 0xe8, 0x10, 0x9e, 0x36, 0x35, 0x18, 0x77, 0xbd, 0x6d, 0xbf,
- 0xb1, 0x4d, 0xea, 0x1c, 0x7e, 0x90, 0x17, 0xf8, 0x71, 0x41, 0x7a, 0xbc, 0x6c, 0x90, 0xc0, 0x09,
- 0x92, 0x0f, 0x43, 0xbb, 0x74, 0x19, 0x06, 0xf8, 0xe5, 0x23, 0x54, 0x4b, 0x99, 0x67, 0x36, 0x1b,
- 0x44, 0x71, 0xa5, 0xc6, 0x9a, 0x2f, 0x7e, 0xb9, 0x89, 0xea, 0xe8, 0xb3, 0x30, 0xbe, 0xee, 0x06,
- 0x61, 0xb4, 0xe6, 0x36, 0xe9, 0xd5, 0xd0, 0x6c, 0xdd, 0x87, 0x36, 0x49, 0x8d, 0xc3, 0xb2, 0x41,
- 0x09, 0x27, 0x28, 0xa3, 0x0d, 0x18, 0x6b, 0x38, 0x7a, 0x53, 0x83, 0x07, 0x6e, 0x4a, 0xdd, 0x0e,
- 0xd7, 0x74, 0x42, 0xd8, 0xa4, 0x4b, 0xb7, 0x53, 0x8d, 0x29, 0x44, 0x86, 0x98, 0x38, 0x43, 0x6d,
- 0x27, 0xae, 0x09, 0xe1, 0x30, 0xca, 0xa0, 0x31, 0x47, 0x85, 0x61, 0x93, 0x41, 0xd3, 0xdc, 0x11,
- 0x3e, 0x03, 0xc3, 0x84, 0x0e, 0x21, 0x25, 0x2c, 0x2e, 0x98, 0x0b, 0xbd, 0xf5, 0x75, 0xc5, 0xad,
- 0x05, 0xbe, 0xa9, 0xc7, 0x5b, 0x92, 0x94, 0x70, 0x4c, 0x14, 0x2d, 0xc0, 0x40, 0x48, 0x02, 0x57,
- 0xe9, 0x0a, 0x3a, 0x4c, 0x23, 0x43, 0xe3, 0xce, 0x90, 0xfc, 0x37, 0x16, 0x55, 0xe9, 0xf2, 0x72,
- 0x98, 0x28, 0x96, 0x5d, 0x06, 0xda, 0xf2, 0x9a, 0x63, 0xa5, 0x58, 0x40, 0xd1, 0x9b, 0x30, 0x18,
- 0x90, 0x06, 0x53, 0x14, 0x8f, 0xf5, 0xbe, 0xc8, 0xb9, 0xde, 0x99, 0xd7, 0xc3, 0x92, 0x00, 0xba,
- 0x0a, 0x28, 0x20, 0x94, 0xc1, 0x73, 0xbd, 0x0d, 0x65, 0xbe, 0x2f, 0x0e, 0x5a, 0xc5, 0x48, 0xe3,
- 0x18, 0x43, 0xfa, 0xc1, 0xe2, 0x8c, 0x6a, 0xe8, 0x32, 0x4c, 0xa9, 0xd2, 0xb2, 0x17, 0x46, 0x0e,
- 0x3d, 0xe0, 0xb8, 0xb8, 0x5e, 0xc9, 0x57, 0x70, 0x12, 0x01, 0xa7, 0xeb, 0xd8, 0xbf, 0x61, 0x01,
- 0x1f, 0xe7, 0x43, 0x90, 0x2a, 0xbc, 0x6e, 0x4a, 0x15, 0x4e, 0xe6, 0xce, 0x5c, 0x8e, 0x44, 0xe1,
- 0x37, 0x2c, 0x18, 0xd1, 0x66, 0x36, 0x5e, 0xb3, 0x56, 0x87, 0x35, 0xdb, 0x86, 0x49, 0xba, 0xd2,
- 0xaf, 0xdf, 0x0e, 0x49, 0xb0, 0x4d, 0xea, 0x6c, 0x61, 0x16, 0xee, 0x6f, 0x61, 0x2a, 0x53, 0xe1,
- 0x6b, 0x09, 0x82, 0x38, 0xd5, 0x84, 0xfd, 0x19, 0xd9, 0x55, 0x65, 0x59, 0x5d, 0x53, 0x73, 0x9e,
- 0xb0, 0xac, 0x56, 0xb3, 0x8a, 0x63, 0x1c, 0xba, 0xd5, 0x36, 0xfd, 0x30, 0x4a, 0x5a, 0x56, 0x5f,
- 0xf1, 0xc3, 0x08, 0x33, 0x88, 0xfd, 0x02, 0xc0, 0xd2, 0x5d, 0x52, 0xe3, 0x2b, 0x56, 0x7f, 0xf4,
- 0x58, 0xf9, 0x8f, 0x1e, 0xfb, 0x6f, 0x2c, 0x18, 0x5f, 0x5e, 0x30, 0x6e, 0xae, 0x59, 0x00, 0xfe,
- 0x52, 0xbb, 0x75, 0x6b, 0x55, 0x9a, 0xf7, 0x70, 0x0b, 0x07, 0x55, 0x8a, 0x35, 0x0c, 0x74, 0x12,
- 0x8a, 0x8d, 0xb6, 0x27, 0xc4, 0x9e, 0x83, 0xf4, 0x7a, 0xbc, 0xd6, 0xf6, 0x30, 0x2d, 0xd3, 0x7c,
- 0xe0, 0x8a, 0x3d, 0xfb, 0xc0, 0x75, 0x0d, 0xc5, 0x83, 0x4a, 0xd0, 0x7f, 0xe7, 0x8e, 0x5b, 0xe7,
- 0x11, 0x06, 0x84, 0xe9, 0xd1, 0xad, 0x5b, 0xe5, 0xc5, 0x10, 0xf3, 0x72, 0xfb, 0xcb, 0x45, 0x98,
- 0x59, 0x6e, 0x90, 0xbb, 0xef, 0x31, 0xca, 0x42, 0xaf, 0x1e, 0x7c, 0x07, 0x13, 0x20, 0x1d, 0xd4,
- 0x4b, 0xb3, 0xfb, 0x78, 0xac, 0xc3, 0x20, 0x37, 0x2c, 0x96, 0x31, 0x17, 0x32, 0xd5, 0xb9, 0xf9,
- 0x03, 0x32, 0xcb, 0x0d, 0x94, 0x85, 0x3a, 0x57, 0x5d, 0x98, 0xa2, 0x14, 0x4b, 0xe2, 0x33, 0xaf,
- 0xc0, 0xa8, 0x8e, 0x79, 0x20, 0x7f, 0xe9, 0x1f, 0x2e, 0xc2, 0x24, 0xed, 0xc1, 0x43, 0x9d, 0x88,
- 0x1b, 0xe9, 0x89, 0x78, 0xd0, 0x3e, 0xb3, 0xdd, 0x67, 0xe3, 0x9d, 0xe4, 0x6c, 0x5c, 0xcc, 0x9b,
- 0x8d, 0xc3, 0x9e, 0x83, 0x1f, 0xb1, 0xe0, 0xc8, 0x72, 0xc3, 0xaf, 0x6d, 0x25, 0xfc, 0x5a, 0x5f,
- 0x82, 0x11, 0x7a, 0x1c, 0x87, 0x46, 0x88, 0x17, 0x23, 0xe8, 0x8f, 0x00, 0x61, 0x1d, 0x4f, 0xab,
- 0x76, 0xe3, 0x46, 0x79, 0x31, 0x2b, 0x56, 0x90, 0x00, 0x61, 0x1d, 0xcf, 0xfe, 0x4b, 0x0b, 0x4e,
- 0x5f, 0x5e, 0x58, 0x8a, 0x97, 0x62, 0x2a, 0x5c, 0xd1, 0x39, 0x18, 0x68, 0xd5, 0xb5, 0xae, 0xc4,
- 0x62, 0xe1, 0x45, 0xd6, 0x0b, 0x01, 0x7d, 0xbf, 0x44, 0x06, 0xbb, 0x01, 0x70, 0x19, 0x57, 0x16,
- 0xc4, 0xb9, 0x2b, 0xb5, 0x40, 0x56, 0xae, 0x16, 0xe8, 0x09, 0x18, 0xa4, 0xf7, 0x82, 0x5b, 0x93,
- 0xfd, 0xe6, 0x06, 0x1b, 0xbc, 0x08, 0x4b, 0x98, 0xfd, 0xeb, 0x16, 0x1c, 0xb9, 0xec, 0x46, 0xf4,
- 0xd2, 0x4e, 0xc6, 0xe3, 0xa1, 0xb7, 0x76, 0xe8, 0x46, 0x7e, 0xb0, 0x93, 0x8c, 0xc7, 0x83, 0x15,
- 0x04, 0x6b, 0x58, 0xfc, 0x83, 0xb6, 0x5d, 0xe6, 0x29, 0x53, 0x30, 0xf5, 0x6e, 0x58, 0x94, 0x63,
- 0x85, 0x41, 0xc7, 0xab, 0xee, 0x06, 0x4c, 0x64, 0xb9, 0x23, 0x0e, 0x6e, 0x35, 0x5e, 0x8b, 0x12,
- 0x80, 0x63, 0x1c, 0xfb, 0x9f, 0x2c, 0x28, 0x5d, 0xe6, 0xfe, 0xbe, 0xeb, 0x61, 0xce, 0xa1, 0xfb,
- 0x02, 0x0c, 0x13, 0xa9, 0x20, 0x10, 0xbd, 0x56, 0x8c, 0xa8, 0xd2, 0x1c, 0xf0, 0xb0, 0x40, 0x0a,
- 0xaf, 0x07, 0xe7, 0xfb, 0x83, 0x79, 0x4f, 0x2f, 0x03, 0x22, 0x7a, 0x5b, 0x7a, 0x9c, 0x24, 0x16,
- 0x70, 0x65, 0x29, 0x05, 0xc5, 0x19, 0x35, 0xec, 0x9f, 0xb7, 0xe0, 0x98, 0xfa, 0xe0, 0xf7, 0xdd,
- 0x67, 0xda, 0xbf, 0x53, 0x80, 0xb1, 0x2b, 0x6b, 0x6b, 0x95, 0xcb, 0x24, 0xd2, 0x56, 0x65, 0x67,
- 0xb5, 0x3f, 0xd6, 0xb4, 0x97, 0x9d, 0xde, 0x88, 0xed, 0xc8, 0x6d, 0xcc, 0xf2, 0xe8, 0x7f, 0xb3,
- 0x65, 0x2f, 0xba, 0x1e, 0x54, 0xa3, 0xc0, 0xf5, 0x36, 0x32, 0x57, 0xba, 0xe4, 0x59, 0x8a, 0x79,
- 0x3c, 0x0b, 0x7a, 0x01, 0x06, 0x58, 0xf8, 0x41, 0x39, 0x09, 0x8f, 0xa8, 0x27, 0x16, 0x2b, 0xdd,
- 0xdf, 0x2d, 0x0d, 0xdf, 0xc0, 0x65, 0xfe, 0x07, 0x0b, 0x54, 0x74, 0x03, 0x46, 0x36, 0xa3, 0xa8,
- 0x75, 0x85, 0x38, 0x75, 0x12, 0xc8, 0x53, 0xf6, 0x4c, 0xd6, 0x29, 0x4b, 0x07, 0x81, 0xa3, 0xc5,
- 0x07, 0x53, 0x5c, 0x16, 0x62, 0x9d, 0x8e, 0x5d, 0x05, 0x88, 0x61, 0x0f, 0x48, 0x71, 0x63, 0xaf,
- 0xc1, 0x30, 0xfd, 0xdc, 0xb9, 0x86, 0xeb, 0x74, 0x56, 0x8d, 0x3f, 0x03, 0xc3, 0x52, 0xf1, 0x1d,
- 0x8a, 0xe0, 0x20, 0xec, 0x46, 0x92, 0x7a, 0xf1, 0x10, 0xc7, 0x70, 0xfb, 0x71, 0x10, 0xb6, 0xc3,
- 0x9d, 0x48, 0xda, 0xeb, 0x70, 0x94, 0x19, 0x41, 0x3b, 0xd1, 0xa6, 0xb1, 0x46, 0xbb, 0x2f, 0x86,
- 0x67, 0xc5, 0xbb, 0xae, 0xa0, 0xec, 0x7d, 0xa4, 0xf3, 0xf9, 0xa8, 0xa4, 0x18, 0xbf, 0xf1, 0xec,
- 0x7f, 0xec, 0x83, 0x47, 0xca, 0xd5, 0xfc, 0xa8, 0x56, 0x97, 0x60, 0x94, 0xb3, 0x8b, 0x74, 0x69,
- 0x38, 0x0d, 0xd1, 0xae, 0x92, 0x80, 0xae, 0x69, 0x30, 0x6c, 0x60, 0xa2, 0xd3, 0x50, 0x74, 0xdf,
- 0xf5, 0x92, 0xae, 0x99, 0xe5, 0xb7, 0x56, 0x31, 0x2d, 0xa7, 0x60, 0xca, 0x79, 0xf2, 0x23, 0x5d,
- 0x81, 0x15, 0xf7, 0xf9, 0x3a, 0x8c, 0xbb, 0x61, 0x2d, 0x74, 0xcb, 0x1e, 0xdd, 0xa7, 0xda, 0x4e,
- 0x57, 0x32, 0x07, 0xda, 0x69, 0x05, 0xc5, 0x09, 0x6c, 0xed, 0x7e, 0xe9, 0xef, 0x99, 0x7b, 0xed,
- 0x1a, 0x53, 0x83, 0x1e, 0xff, 0x2d, 0xf6, 0x75, 0x21, 0x13, 0xc1, 0x8b, 0xe3, 0x9f, 0x7f, 0x70,
- 0x88, 0x25, 0x8c, 0x3e, 0xe8, 0x6a, 0x9b, 0x4e, 0x6b, 0xae, 0x1d, 0x6d, 0x2e, 0xba, 0x61, 0xcd,
- 0xdf, 0x26, 0xc1, 0x0e, 0x7b, 0x8b, 0x0f, 0xc5, 0x0f, 0x3a, 0x05, 0x58, 0xb8, 0x32, 0x57, 0xa1,
- 0x98, 0x38, 0x5d, 0x07, 0xcd, 0xc1, 0x84, 0x2c, 0xac, 0x92, 0x90, 0x5d, 0x01, 0x23, 0x8c, 0x8c,
- 0x72, 0x96, 0x14, 0xc5, 0x8a, 0x48, 0x12, 0xdf, 0x64, 0x70, 0xe1, 0x41, 0x30, 0xb8, 0x2f, 0xc3,
- 0x98, 0xeb, 0xb9, 0x91, 0xeb, 0x44, 0x3e, 0xd7, 0x1f, 0xf1, 0x67, 0x37, 0x13, 0x30, 0x97, 0x75,
- 0x00, 0x36, 0xf1, 0xec, 0xff, 0xb3, 0x0f, 0xa6, 0xd8, 0xb4, 0x7d, 0xb0, 0xc2, 0xbe, 0x97, 0x56,
- 0xd8, 0x8d, 0xf4, 0x0a, 0x7b, 0x10, 0x9c, 0xfb, 0x7d, 0x2f, 0xb3, 0x2f, 0x58, 0x30, 0xc5, 0x64,
- 0xdc, 0xc6, 0x32, 0xbb, 0x00, 0xc3, 0x81, 0xe1, 0xc7, 0x3a, 0xac, 0x2b, 0xb5, 0xa4, 0x4b, 0x6a,
- 0x8c, 0x83, 0xde, 0x00, 0x68, 0xc5, 0x32, 0xf4, 0x82, 0x11, 0x7c, 0x14, 0x72, 0xc5, 0xe7, 0x5a,
- 0x1d, 0xfb, 0xb3, 0x30, 0xac, 0x1c, 0x55, 0xa5, 0xa7, 0xba, 0x95, 0xe3, 0xa9, 0xde, 0x9d, 0x8d,
- 0x90, 0xb6, 0x71, 0xc5, 0x4c, 0xdb, 0xb8, 0xff, 0xcb, 0x82, 0x58, 0xc3, 0x81, 0xde, 0x82, 0xe1,
- 0x96, 0xcf, 0x4c, 0xa9, 0x03, 0xe9, 0x9f, 0xf0, 0x78, 0x47, 0x15, 0x09, 0x8f, 0x30, 0x18, 0xf0,
- 0xe9, 0xa8, 0xc8, 0xaa, 0x38, 0xa6, 0x82, 0xae, 0xc2, 0x60, 0x2b, 0x20, 0xd5, 0x88, 0x85, 0xbf,
- 0xea, 0x9d, 0x20, 0x5f, 0xbe, 0xbc, 0x22, 0x96, 0x14, 0x12, 0x96, 0xa9, 0xc5, 0xde, 0x2d, 0x53,
- 0xed, 0xdf, 0x2a, 0xc0, 0x64, 0xb2, 0x11, 0xf4, 0x1a, 0xf4, 0x91, 0xbb, 0xa4, 0x26, 0xbe, 0x34,
- 0x93, 0x9b, 0x88, 0xa5, 0x2b, 0x7c, 0xe8, 0xe8, 0x7f, 0xcc, 0x6a, 0xa1, 0x2b, 0x30, 0x48, 0x59,
- 0x89, 0xcb, 0x2a, 0x48, 0xe4, 0xa3, 0x79, 0xec, 0x88, 0xe2, 0xc9, 0xf8, 0x67, 0x89, 0x22, 0x2c,
- 0xab, 0x33, 0x53, 0xb6, 0x5a, 0xab, 0x4a, 0x5f, 0x69, 0x51, 0x27, 0x61, 0xc2, 0xda, 0x42, 0x85,
- 0x23, 0x09, 0x6a, 0xdc, 0x94, 0x4d, 0x16, 0xe2, 0x98, 0x08, 0x7a, 0x03, 0xfa, 0xc3, 0x06, 0x21,
- 0x2d, 0x61, 0xab, 0x90, 0x29, 0x1f, 0xad, 0x52, 0x04, 0x41, 0x89, 0xc9, 0x53, 0x58, 0x01, 0xe6,
- 0x15, 0xed, 0xdf, 0xb5, 0x00, 0xb8, 0xed, 0x9f, 0xe3, 0x6d, 0x90, 0x43, 0x50, 0x29, 0x2c, 0x42,
- 0x5f, 0xd8, 0x22, 0xb5, 0x4e, 0x1e, 0x06, 0x71, 0x7f, 0xaa, 0x2d, 0x52, 0x8b, 0x57, 0x3b, 0xfd,
- 0x87, 0x59, 0x6d, 0xfb, 0x47, 0x01, 0xc6, 0x63, 0xb4, 0x72, 0x44, 0x9a, 0xe8, 0x39, 0x23, 0xb2,
- 0xce, 0xc9, 0x44, 0x64, 0x9d, 0x61, 0x86, 0xad, 0x49, 0xaf, 0x3f, 0x0b, 0xc5, 0xa6, 0x73, 0x57,
- 0x88, 0x27, 0x9f, 0xe9, 0xdc, 0x0d, 0x4a, 0x7f, 0x76, 0xc5, 0xb9, 0xcb, 0x5f, 0xf0, 0xcf, 0xc8,
- 0xdd, 0xb9, 0xe2, 0xdc, 0xed, 0x6a, 0x05, 0x4f, 0x1b, 0x61, 0x6d, 0xb9, 0x9e, 0x30, 0x6b, 0xeb,
- 0xa9, 0x2d, 0xd7, 0x4b, 0xb6, 0xe5, 0x7a, 0x3d, 0xb4, 0xe5, 0x7a, 0xe8, 0x1e, 0x0c, 0x0a, 0xab,
- 0x53, 0x11, 0xf2, 0xef, 0x42, 0x0f, 0xed, 0x09, 0xa3, 0x55, 0xde, 0xe6, 0x05, 0x29, 0xa1, 0x10,
- 0xa5, 0x5d, 0xdb, 0x95, 0x0d, 0xa2, 0xff, 0xd4, 0x82, 0x71, 0xf1, 0x1b, 0x93, 0x77, 0xdb, 0x24,
- 0x8c, 0x04, 0x07, 0xff, 0x91, 0xde, 0xfb, 0x20, 0x2a, 0xf2, 0xae, 0x7c, 0x44, 0x5e, 0xb6, 0x26,
- 0xb0, 0x6b, 0x8f, 0x12, 0xbd, 0x40, 0xbf, 0x65, 0xc1, 0xd1, 0xa6, 0x73, 0x97, 0xb7, 0xc8, 0xcb,
- 0xb0, 0x13, 0xb9, 0xbe, 0xb0, 0xde, 0x78, 0xad, 0xb7, 0xe9, 0x4f, 0x55, 0xe7, 0x9d, 0x94, 0xaa,
- 0xda, 0xa3, 0x59, 0x28, 0x5d, 0xbb, 0x9a, 0xd9, 0xaf, 0x99, 0x75, 0x18, 0x92, 0xeb, 0xed, 0x61,
- 0x9a, 0xd4, 0xb3, 0x76, 0xc4, 0x5a, 0x7b, 0xa8, 0xed, 0x7c, 0x16, 0x46, 0xf5, 0x35, 0xf6, 0x50,
- 0xdb, 0x7a, 0x17, 0x8e, 0x64, 0xac, 0xa5, 0x87, 0xda, 0xe4, 0x1d, 0x38, 0x99, 0xbb, 0x3e, 0x1e,
- 0xaa, 0x4b, 0xc4, 0xef, 0x58, 0xfa, 0x39, 0x78, 0x08, 0x7a, 0x9d, 0x05, 0x53, 0xaf, 0x73, 0xa6,
- 0xf3, 0xce, 0xc9, 0x51, 0xee, 0xbc, 0xa3, 0x77, 0x9a, 0x9e, 0xea, 0xe8, 0x4d, 0x18, 0x68, 0xd0,
- 0x12, 0x69, 0xbb, 0x6c, 0x77, 0xdf, 0x91, 0x31, 0x47, 0xcd, 0xca, 0x43, 0x2c, 0x28, 0xd8, 0x5f,
- 0xb1, 0x20, 0xc3, 0xa9, 0x83, 0x72, 0x58, 0x6d, 0xb7, 0xce, 0x86, 0xa4, 0x18, 0x73, 0x58, 0x2a,
- 0xf0, 0xcc, 0x69, 0x28, 0x6e, 0xb8, 0x75, 0xe1, 0xcd, 0xac, 0xc0, 0x97, 0x29, 0x78, 0xc3, 0xad,
- 0xa3, 0x65, 0x40, 0x61, 0xbb, 0xd5, 0x6a, 0x30, 0x83, 0x27, 0xa7, 0x71, 0x39, 0xf0, 0xdb, 0x2d,
- 0x6e, 0xa8, 0x5c, 0xe4, 0xe2, 0xa5, 0x6a, 0x0a, 0x8a, 0x33, 0x6a, 0xd8, 0x7f, 0x60, 0x41, 0xdf,
- 0x21, 0x4c, 0x13, 0x36, 0xa7, 0xe9, 0xb9, 0x5c, 0xd2, 0x22, 0x53, 0xc4, 0x2c, 0x76, 0xee, 0x2c,
- 0xdd, 0x8d, 0x88, 0x17, 0x32, 0x86, 0x23, 0x73, 0xd6, 0x76, 0x2d, 0x38, 0x72, 0xcd, 0x77, 0xea,
- 0xf3, 0x4e, 0xc3, 0xf1, 0x6a, 0x24, 0x28, 0x7b, 0x1b, 0x07, 0xf2, 0x0a, 0x28, 0x74, 0xf5, 0x0a,
- 0xb8, 0x04, 0x03, 0x6e, 0x4b, 0x0b, 0x35, 0x7f, 0x96, 0xce, 0x6e, 0xb9, 0x22, 0xa2, 0xcc, 0x23,
- 0xa3, 0x71, 0x56, 0x8a, 0x05, 0x3e, 0x5d, 0x96, 0xdc, 0x1c, 0xaf, 0x2f, 0x7f, 0x59, 0xd2, 0x57,
- 0x52, 0x32, 0x84, 0x9a, 0x61, 0x38, 0xbe, 0x09, 0x46, 0x13, 0xc2, 0x4d, 0x0a, 0xc3, 0xa0, 0xcb,
- 0xbf, 0x54, 0xac, 0xcd, 0x27, 0xb3, 0x5f, 0x2f, 0xa9, 0x81, 0xd1, 0xfc, 0x01, 0x79, 0x01, 0x96,
- 0x84, 0xec, 0x4b, 0x90, 0x19, 0xf2, 0xa6, 0xbb, 0x64, 0xca, 0xfe, 0x04, 0x4c, 0xb1, 0x9a, 0x07,
- 0x94, 0xfa, 0xd8, 0x09, 0x79, 0x7a, 0x46, 0xd4, 0x60, 0xfb, 0x7f, 0xb5, 0x00, 0xad, 0xf8, 0x75,
- 0x77, 0x7d, 0x47, 0x10, 0xe7, 0xdf, 0xff, 0x2e, 0x94, 0xf8, 0xb3, 0x3a, 0x19, 0x59, 0x77, 0xa1,
- 0xe1, 0x84, 0xa1, 0x26, 0xcb, 0x7f, 0x52, 0xb4, 0x5b, 0x5a, 0xeb, 0x8c, 0x8e, 0xbb, 0xd1, 0x43,
- 0x6f, 0x25, 0x02, 0x1d, 0x7e, 0x34, 0x15, 0xe8, 0xf0, 0xc9, 0x4c, 0x8b, 0x9a, 0x74, 0xef, 0x65,
- 0x00, 0x44, 0xfb, 0x8b, 0x16, 0x4c, 0xac, 0x26, 0x22, 0xc5, 0x9e, 0x63, 0xe6, 0x05, 0x19, 0x3a,
- 0xaa, 0x2a, 0x2b, 0xc5, 0x02, 0xfa, 0xc0, 0x65, 0xb8, 0xdf, 0xb6, 0x20, 0x0e, 0xb1, 0x75, 0x08,
- 0x2c, 0xf7, 0x82, 0xc1, 0x72, 0x67, 0x3e, 0x5f, 0x54, 0x77, 0xf2, 0x38, 0x6e, 0x74, 0x55, 0xcd,
- 0x49, 0x87, 0x97, 0x4b, 0x4c, 0x86, 0xef, 0xb3, 0x71, 0x73, 0xe2, 0xd4, 0x6c, 0x7c, 0xa3, 0x00,
- 0x48, 0xe1, 0xf6, 0x1c, 0x1c, 0x33, 0x5d, 0xe3, 0xc1, 0x04, 0xc7, 0xdc, 0x06, 0xc4, 0x0c, 0x64,
- 0x02, 0xc7, 0x0b, 0x39, 0x59, 0x57, 0x48, 0xad, 0x0f, 0x66, 0x7d, 0x33, 0x23, 0xbd, 0x65, 0xaf,
- 0xa5, 0xa8, 0xe1, 0x8c, 0x16, 0x34, 0xc3, 0xa7, 0xfe, 0x5e, 0x0d, 0x9f, 0x06, 0xba, 0xb8, 0x7d,
- 0x7f, 0xcd, 0x82, 0x31, 0x35, 0x4c, 0xef, 0x13, 0xe7, 0x11, 0xd5, 0x9f, 0x9c, 0x7b, 0xa5, 0xa2,
- 0x75, 0x99, 0x31, 0x03, 0xdf, 0xc7, 0xdc, 0xf7, 0x9d, 0x86, 0x7b, 0x8f, 0xa8, 0x18, 0xce, 0x25,
- 0xe1, 0x8e, 0x2f, 0x4a, 0xf7, 0x77, 0x4b, 0x63, 0xea, 0x1f, 0x8f, 0x1a, 0x1b, 0x57, 0xb1, 0x7f,
- 0x99, 0x6e, 0x76, 0x73, 0x29, 0xa2, 0x97, 0xa0, 0xbf, 0xb5, 0xe9, 0x84, 0x24, 0xe1, 0x64, 0xd7,
- 0x5f, 0xa1, 0x85, 0xfb, 0xbb, 0xa5, 0x71, 0x55, 0x81, 0x95, 0x60, 0x8e, 0xdd, 0x7b, 0xc8, 0xd1,
- 0xf4, 0xe2, 0xec, 0x1a, 0x72, 0xf4, 0x5f, 0x2c, 0xe8, 0x5b, 0xa5, 0xb7, 0xd7, 0xc3, 0x3f, 0x02,
- 0x5e, 0x37, 0x8e, 0x80, 0x53, 0x79, 0xd9, 0x8c, 0x72, 0x77, 0xff, 0x72, 0x62, 0xf7, 0x9f, 0xc9,
- 0xa5, 0xd0, 0x79, 0xe3, 0x37, 0x61, 0x84, 0xe5, 0x48, 0x12, 0x0e, 0x85, 0x2f, 0x18, 0x1b, 0xbe,
- 0x94, 0xd8, 0xf0, 0x13, 0x1a, 0xaa, 0xb6, 0xd3, 0x9f, 0x82, 0x41, 0xe1, 0xa1, 0x96, 0x8c, 0x82,
- 0x20, 0x70, 0xb1, 0x84, 0xdb, 0xbf, 0x50, 0x04, 0x23, 0x27, 0x13, 0xfa, 0x23, 0x0b, 0x66, 0x03,
- 0x6e, 0xb9, 0x5e, 0x5f, 0x6c, 0x07, 0xae, 0xb7, 0x51, 0xad, 0x6d, 0x92, 0x7a, 0xbb, 0xe1, 0x7a,
- 0x1b, 0xe5, 0x0d, 0xcf, 0x57, 0xc5, 0x4b, 0x77, 0x49, 0xad, 0xcd, 0xb4, 0xca, 0x5d, 0x12, 0x40,
- 0x29, 0x0f, 0x90, 0xe7, 0xf7, 0x76, 0x4b, 0xb3, 0xf8, 0x40, 0xb4, 0xf1, 0x01, 0xfb, 0x82, 0xfe,
- 0xd2, 0x82, 0x0b, 0x3c, 0x37, 0x50, 0xef, 0xfd, 0xef, 0x20, 0xe1, 0xa8, 0x48, 0x52, 0x31, 0x91,
- 0x35, 0x12, 0x34, 0xe7, 0x5f, 0x16, 0x03, 0x7a, 0xa1, 0x72, 0xb0, 0xb6, 0xf0, 0x41, 0x3b, 0x67,
- 0xff, 0xb7, 0x45, 0x18, 0x13, 0xa1, 0x29, 0xc5, 0x1d, 0xf0, 0x92, 0xb1, 0x24, 0x1e, 0x4d, 0x2c,
- 0x89, 0x29, 0x03, 0xf9, 0xc1, 0x1c, 0xff, 0x21, 0x4c, 0xd1, 0xc3, 0xf9, 0x0a, 0x71, 0x82, 0xe8,
- 0x36, 0x71, 0xb8, 0x3d, 0x63, 0xf1, 0xc0, 0xa7, 0xbf, 0x12, 0xac, 0x5f, 0x4b, 0x12, 0xc3, 0x69,
- 0xfa, 0xdf, 0x4b, 0x77, 0x8e, 0x07, 0x93, 0xa9, 0xe8, 0xa2, 0x6f, 0xc3, 0xb0, 0x72, 0xaf, 0x12,
- 0x87, 0x4e, 0xe7, 0x20, 0xbd, 0x49, 0x0a, 0x5c, 0xe8, 0x19, 0xbb, 0xf6, 0xc5, 0xe4, 0xec, 0xdf,
- 0x2e, 0x18, 0x0d, 0xf2, 0x49, 0x5c, 0x85, 0x21, 0x27, 0x64, 0x81, 0xc3, 0xeb, 0x9d, 0x24, 0xda,
- 0xa9, 0x66, 0x98, 0x8b, 0xdb, 0x9c, 0xa8, 0x89, 0x15, 0x0d, 0x74, 0x85, 0x5b, 0x8d, 0x6e, 0x93,
- 0x4e, 0xe2, 0xec, 0x14, 0x35, 0x90, 0x76, 0xa5, 0xdb, 0x04, 0x8b, 0xfa, 0xe8, 0x53, 0xdc, 0xac,
- 0xf7, 0xaa, 0xe7, 0xdf, 0xf1, 0x2e, 0xfb, 0xbe, 0x0c, 0x43, 0xd4, 0x1b, 0xc1, 0x29, 0x69, 0xcc,
- 0xab, 0xaa, 0x63, 0x93, 0x5a, 0x6f, 0xe1, 0xba, 0x3f, 0x07, 0x2c, 0x17, 0x8a, 0x19, 0xcd, 0x20,
- 0x44, 0x04, 0x26, 0x44, 0xdc, 0x53, 0x59, 0x26, 0xc6, 0x2e, 0xf3, 0xf9, 0x6d, 0xd6, 0x8e, 0x35,
- 0x40, 0x57, 0x4d, 0x12, 0x38, 0x49, 0xd3, 0xde, 0xe4, 0x87, 0xf0, 0x32, 0x71, 0xa2, 0x76, 0x40,
- 0x42, 0xf4, 0x71, 0x98, 0x4e, 0xbf, 0x8c, 0x85, 0x22, 0xc5, 0x62, 0xdc, 0xf3, 0xa9, 0xbd, 0xdd,
- 0xd2, 0x74, 0x35, 0x07, 0x07, 0xe7, 0xd6, 0xb6, 0x7f, 0xcd, 0x02, 0xe6, 0x43, 0x7e, 0x08, 0x9c,
- 0xcf, 0xc7, 0x4c, 0xce, 0x67, 0x3a, 0x6f, 0x3a, 0x73, 0x98, 0x9e, 0x17, 0xf9, 0x1a, 0xae, 0x04,
- 0xfe, 0xdd, 0x1d, 0x61, 0xf5, 0xd5, 0xfd, 0x19, 0x67, 0x7f, 0xd9, 0x02, 0x96, 0x38, 0x08, 0xf3,
- 0x57, 0xbb, 0x54, 0x70, 0x74, 0x37, 0x68, 0xf8, 0x38, 0x0c, 0xad, 0x8b, 0xe1, 0xcf, 0x10, 0x3a,
- 0x19, 0x1d, 0x36, 0x69, 0xcb, 0x49, 0x13, 0xbe, 0xa0, 0xe2, 0x1f, 0x56, 0xd4, 0xec, 0xff, 0xd2,
- 0x82, 0x99, 0xfc, 0x6a, 0xe8, 0x06, 0x9c, 0x08, 0x48, 0xad, 0x1d, 0x84, 0x74, 0x4b, 0x88, 0x07,
- 0x90, 0x70, 0xa7, 0xe2, 0x53, 0xfd, 0xc8, 0xde, 0x6e, 0xe9, 0x04, 0xce, 0x46, 0xc1, 0x79, 0x75,
- 0xd1, 0x2b, 0x30, 0xde, 0x0e, 0x39, 0xe7, 0xc7, 0x98, 0xae, 0x50, 0x44, 0xa7, 0x66, 0x1e, 0x47,
- 0x37, 0x0c, 0x08, 0x4e, 0x60, 0xda, 0x3f, 0xc0, 0x97, 0xa3, 0x0a, 0x50, 0xdd, 0x84, 0x29, 0x4f,
- 0xfb, 0x4f, 0x6f, 0x40, 0xf9, 0xd4, 0x7f, 0xbc, 0xdb, 0xad, 0xcf, 0xae, 0x4b, 0xcd, 0xcb, 0x3d,
- 0x41, 0x06, 0xa7, 0x29, 0xdb, 0xbf, 0x68, 0xc1, 0x09, 0x1d, 0x51, 0x73, 0xa4, 0xeb, 0xa6, 0x05,
- 0x5c, 0x84, 0x21, 0xbf, 0x45, 0x02, 0x27, 0xf2, 0x03, 0x71, 0xcd, 0x9d, 0x97, 0x2b, 0xf4, 0xba,
- 0x28, 0xdf, 0x17, 0x09, 0x73, 0x24, 0x75, 0x59, 0x8e, 0x55, 0x4d, 0x64, 0xc3, 0x00, 0x13, 0x20,
- 0x86, 0xc2, 0x65, 0x92, 0x1d, 0x5a, 0xcc, 0xb2, 0x25, 0xc4, 0x02, 0x62, 0xff, 0xa3, 0xc5, 0xd7,
- 0xa7, 0xde, 0x75, 0xf4, 0x2e, 0x4c, 0x36, 0x9d, 0xa8, 0xb6, 0xb9, 0x74, 0xb7, 0x15, 0x70, 0xe5,
- 0xae, 0x1c, 0xa7, 0x67, 0xba, 0x8d, 0x93, 0xf6, 0x91, 0xb1, 0x69, 0xf5, 0x4a, 0x82, 0x18, 0x4e,
- 0x91, 0x47, 0xb7, 0x61, 0x84, 0x95, 0x31, 0x6f, 0xe0, 0xb0, 0x13, 0x2f, 0x93, 0xd7, 0x9a, 0x32,
- 0x0e, 0x5a, 0x89, 0xe9, 0x60, 0x9d, 0xa8, 0xfd, 0xd5, 0x22, 0x3f, 0x34, 0xd8, 0xdb, 0xe3, 0x29,
- 0x18, 0x6c, 0xf9, 0xf5, 0x85, 0xf2, 0x22, 0x16, 0xb3, 0xa0, 0xee, 0xbd, 0x0a, 0x2f, 0xc6, 0x12,
- 0x8e, 0xce, 0xc3, 0x90, 0xf8, 0x29, 0x95, 0xf1, 0x6c, 0x8f, 0x08, 0xbc, 0x10, 0x2b, 0x28, 0x7a,
- 0x1e, 0xa0, 0x15, 0xf8, 0xdb, 0x6e, 0x9d, 0x45, 0x7f, 0x2a, 0x9a, 0x76, 0x7d, 0x15, 0x05, 0xc1,
- 0x1a, 0x16, 0x7a, 0x15, 0xc6, 0xda, 0x5e, 0xc8, 0xf9, 0x27, 0x2d, 0xc6, 0xbe, 0xb2, 0x38, 0xbb,
- 0xa1, 0x03, 0xb1, 0x89, 0x8b, 0xe6, 0x60, 0x20, 0x72, 0x98, 0x9d, 0x5a, 0x7f, 0xbe, 0xf9, 0xfd,
- 0x1a, 0xc5, 0xd0, 0xb3, 0xd9, 0xd1, 0x0a, 0x58, 0x54, 0x44, 0x6f, 0x4b, 0xc7, 0x7c, 0x7e, 0x13,
- 0x09, 0xbf, 0x97, 0xde, 0x6e, 0x2d, 0xcd, 0x2d, 0x5f, 0xf8, 0xd3, 0x18, 0xb4, 0xd0, 0x2b, 0x00,
- 0xe4, 0x6e, 0x44, 0x02, 0xcf, 0x69, 0x28, 0xeb, 0x52, 0xc5, 0xc8, 0x2c, 0xfa, 0xab, 0x7e, 0x74,
- 0x23, 0x24, 0x4b, 0x0a, 0x03, 0x6b, 0xd8, 0xf6, 0x8f, 0x8e, 0x00, 0xc4, 0x0f, 0x0d, 0x74, 0x0f,
- 0x86, 0x6a, 0x4e, 0xcb, 0xa9, 0xf1, 0x54, 0xad, 0xc5, 0x3c, 0x7f, 0xe9, 0xb8, 0xc6, 0xec, 0x82,
- 0x40, 0xe7, 0xca, 0x1b, 0x19, 0xa6, 0x7c, 0x48, 0x16, 0x77, 0x55, 0xd8, 0xa8, 0xf6, 0xd0, 0x17,
- 0x2c, 0x18, 0x11, 0xd1, 0x95, 0xd8, 0x0c, 0x15, 0xf2, 0xf5, 0x6d, 0x5a, 0xfb, 0x73, 0x71, 0x0d,
- 0xde, 0x85, 0x17, 0xe4, 0x0a, 0xd5, 0x20, 0x5d, 0x7b, 0xa1, 0x37, 0x8c, 0x3e, 0x2c, 0xdf, 0xb6,
- 0x45, 0x63, 0x28, 0xd5, 0xdb, 0x76, 0x98, 0x5d, 0x35, 0xfa, 0xb3, 0xf6, 0x86, 0xf1, 0xac, 0xed,
- 0xcb, 0xf7, 0x3c, 0x36, 0xf8, 0xed, 0x6e, 0x2f, 0x5a, 0x54, 0xd1, 0xa3, 0x90, 0xf4, 0xe7, 0xbb,
- 0xcb, 0x6a, 0x0f, 0xbb, 0x2e, 0x11, 0x48, 0x3e, 0x0b, 0x13, 0x75, 0x93, 0x6b, 0x11, 0x2b, 0xf1,
- 0xc9, 0x3c, 0xba, 0x09, 0x26, 0x27, 0xe6, 0x53, 0x12, 0x00, 0x9c, 0x24, 0x8c, 0x2a, 0x3c, 0x28,
- 0x4d, 0xd9, 0x5b, 0xf7, 0x85, 0xef, 0x95, 0x9d, 0x3b, 0x97, 0x3b, 0x61, 0x44, 0x9a, 0x14, 0x33,
- 0x66, 0x12, 0x56, 0x45, 0x5d, 0xac, 0xa8, 0xa0, 0x37, 0x61, 0x80, 0xf9, 0x4b, 0x86, 0xd3, 0x43,
- 0xf9, 0x6a, 0x0d, 0x33, 0xfa, 0x6a, 0xbc, 0x21, 0xd9, 0xdf, 0x10, 0x0b, 0x0a, 0xe8, 0x8a, 0xf4,
- 0x46, 0x0e, 0xcb, 0xde, 0x8d, 0x90, 0x30, 0x6f, 0xe4, 0xe1, 0xf9, 0xc7, 0x63, 0x47, 0x63, 0x5e,
- 0x9e, 0x99, 0xf3, 0xd6, 0xa8, 0x49, 0xd9, 0x3e, 0xf1, 0x5f, 0xa6, 0xd2, 0x15, 0xb1, 0xe2, 0x32,
- 0xbb, 0x67, 0xa6, 0xdb, 0x8d, 0x87, 0xf3, 0xa6, 0x49, 0x02, 0x27, 0x69, 0x52, 0x16, 0x9a, 0xef,
- 0x7a, 0xe1, 0xbd, 0xd5, 0xed, 0xec, 0xe0, 0x92, 0x03, 0x76, 0x1b, 0xf1, 0x12, 0x2c, 0xea, 0x23,
- 0x17, 0x26, 0x02, 0x83, 0xbd, 0x90, 0x21, 0xde, 0xce, 0xf5, 0xc6, 0xc4, 0x68, 0xc9, 0x03, 0x4c,
- 0x32, 0x38, 0x49, 0x17, 0xbd, 0xa9, 0x31, 0x4a, 0x63, 0x9d, 0x5f, 0xfe, 0xdd, 0x58, 0xa3, 0x99,
- 0x2d, 0x18, 0x33, 0x0e, 0x9b, 0x87, 0xaa, 0x82, 0xf4, 0x60, 0x32, 0x79, 0xb2, 0x3c, 0x54, 0xcd,
- 0xe3, 0x2b, 0x30, 0xce, 0x36, 0xc2, 0x1d, 0xa7, 0x25, 0x8e, 0xe2, 0xf3, 0xc6, 0x51, 0x6c, 0x9d,
- 0x2f, 0xf2, 0x81, 0x91, 0x43, 0x10, 0x1f, 0x9c, 0xf6, 0xaf, 0xf4, 0x8b, 0xca, 0x6a, 0x17, 0xa1,
- 0x0b, 0x30, 0x2c, 0x3a, 0xa0, 0x32, 0x70, 0xa9, 0x83, 0x61, 0x45, 0x02, 0x70, 0x8c, 0xc3, 0x12,
- 0xaf, 0xb1, 0xea, 0x9a, 0x87, 0x42, 0x9c, 0x78, 0x4d, 0x41, 0xb0, 0x86, 0x45, 0x1f, 0xbf, 0xb7,
- 0x7d, 0x3f, 0x52, 0x77, 0xb0, 0xda, 0x6a, 0xf3, 0xac, 0x14, 0x0b, 0x28, 0xbd, 0x7b, 0xb7, 0x48,
- 0xe0, 0x91, 0x86, 0x99, 0x82, 0x42, 0xdd, 0xbd, 0x57, 0x75, 0x20, 0x36, 0x71, 0x29, 0x07, 0xe1,
- 0x87, 0x6c, 0xef, 0x8a, 0x27, 0x76, 0xec, 0xf1, 0x51, 0xe5, 0xb1, 0x2b, 0x24, 0x1c, 0x7d, 0x02,
- 0x4e, 0xa8, 0x70, 0x8f, 0x62, 0x65, 0xca, 0x16, 0x07, 0x0c, 0x89, 0xd8, 0x89, 0x85, 0x6c, 0x34,
- 0x9c, 0x57, 0x1f, 0xbd, 0x0e, 0xe3, 0xe2, 0x19, 0x26, 0x29, 0x0e, 0x9a, 0xe6, 0x8b, 0x57, 0x0d,
- 0x28, 0x4e, 0x60, 0xcb, 0x24, 0x1a, 0xec, 0x7d, 0x22, 0x29, 0x0c, 0xa5, 0x93, 0x68, 0xe8, 0x70,
- 0x9c, 0xaa, 0x81, 0xe6, 0x60, 0x82, 0xb3, 0x9d, 0xae, 0xb7, 0xc1, 0xe7, 0x44, 0xf8, 0x93, 0xaa,
- 0x0d, 0x79, 0xdd, 0x04, 0xe3, 0x24, 0x3e, 0xba, 0x04, 0xa3, 0x4e, 0x50, 0xdb, 0x74, 0x23, 0x52,
- 0xa3, 0xbb, 0x8a, 0x59, 0x10, 0x6a, 0xf6, 0x9f, 0x73, 0x1a, 0x0c, 0x1b, 0x98, 0xe8, 0x0d, 0xe8,
- 0x0b, 0xef, 0x38, 0x2d, 0x71, 0xfa, 0xe4, 0x1f, 0xe5, 0x6a, 0x05, 0x73, 0xd3, 0x2f, 0xfa, 0x1f,
- 0xb3, 0x9a, 0xf6, 0x3d, 0x38, 0x92, 0x11, 0x16, 0x87, 0x2e, 0x3d, 0xa7, 0xe5, 0xca, 0x51, 0x49,
- 0xb8, 0x69, 0xcc, 0x55, 0xca, 0x72, 0x3c, 0x34, 0x2c, 0xba, 0xbe, 0x59, 0xf8, 0x1c, 0x2d, 0xdd,
- 0xb8, 0x5a, 0xdf, 0xcb, 0x12, 0x80, 0x63, 0x1c, 0xfb, 0x5f, 0x0b, 0x30, 0x91, 0xa1, 0x1e, 0x64,
- 0x29, 0xaf, 0x13, 0xef, 0xbc, 0x38, 0xc3, 0xb5, 0x99, 0xd5, 0xa5, 0x70, 0x80, 0xac, 0x2e, 0xc5,
- 0x6e, 0x59, 0x5d, 0xfa, 0xde, 0x4b, 0x56, 0x17, 0x73, 0xc4, 0xfa, 0x7b, 0x1a, 0xb1, 0x8c, 0x4c,
- 0x30, 0x03, 0x07, 0xcc, 0x04, 0x63, 0x0c, 0xfa, 0x60, 0x0f, 0x83, 0xfe, 0xd3, 0x05, 0x98, 0x4c,
- 0x6a, 0x16, 0x0f, 0x41, 0x3a, 0xff, 0xa6, 0x21, 0x9d, 0x3f, 0xdf, 0x4b, 0x04, 0x81, 0x5c, 0x49,
- 0x3d, 0x4e, 0x48, 0xea, 0x9f, 0xee, 0x89, 0x5a, 0x67, 0xa9, 0xfd, 0x2f, 0x15, 0xe0, 0x58, 0xa6,
- 0xc2, 0xf5, 0x10, 0xc6, 0xe6, 0xba, 0x31, 0x36, 0xcf, 0xf5, 0x1c, 0x5d, 0x21, 0x77, 0x80, 0x6e,
- 0x25, 0x06, 0xe8, 0x42, 0xef, 0x24, 0x3b, 0x8f, 0xd2, 0x37, 0x8b, 0x70, 0x26, 0xb3, 0x5e, 0x2c,
- 0xdc, 0x5e, 0x36, 0x84, 0xdb, 0xcf, 0x27, 0x84, 0xdb, 0x76, 0xe7, 0xda, 0x0f, 0x46, 0xda, 0x2d,
- 0xa2, 0x0c, 0xb0, 0x58, 0x29, 0xf7, 0x29, 0xe9, 0x36, 0xa2, 0x0c, 0x28, 0x42, 0xd8, 0xa4, 0xfb,
- 0xbd, 0x24, 0xe1, 0xfe, 0x1f, 0x2d, 0x38, 0x99, 0x39, 0x37, 0x87, 0x20, 0x67, 0x5c, 0x35, 0xe5,
- 0x8c, 0x4f, 0xf5, 0xbc, 0x5a, 0x73, 0x04, 0x8f, 0x5f, 0x1c, 0xc8, 0xf9, 0x16, 0x26, 0xfe, 0xb8,
- 0x0e, 0x23, 0x4e, 0xad, 0x46, 0xc2, 0x70, 0xc5, 0xaf, 0xab, 0x04, 0x10, 0xcf, 0xb1, 0xc7, 0x69,
- 0x5c, 0xbc, 0xbf, 0x5b, 0x9a, 0x49, 0x92, 0x88, 0xc1, 0x58, 0xa7, 0x80, 0x3e, 0x05, 0x43, 0xa1,
- 0xcc, 0xdd, 0xd9, 0x77, 0xff, 0xb9, 0x3b, 0x19, 0x27, 0xa9, 0xc4, 0x3b, 0x8a, 0x24, 0xfa, 0x7e,
- 0x3d, 0x6a, 0x55, 0x07, 0xc1, 0x26, 0xef, 0xe4, 0x7d, 0xc4, 0xae, 0x7a, 0x1e, 0x60, 0x5b, 0xbd,
- 0xa3, 0x92, 0xa2, 0x1b, 0xed, 0x85, 0xa5, 0x61, 0xa1, 0x37, 0x60, 0x32, 0xe4, 0x01, 0x5b, 0x63,
- 0x13, 0x19, 0xbe, 0x16, 0x59, 0xcc, 0xbb, 0x6a, 0x02, 0x86, 0x53, 0xd8, 0x68, 0x59, 0xb6, 0xca,
- 0x8c, 0xa1, 0xf8, 0xf2, 0x3c, 0x17, 0xb7, 0x28, 0x0c, 0xa2, 0x8e, 0x26, 0x27, 0x81, 0x0d, 0xbf,
- 0x56, 0x13, 0x7d, 0x0a, 0x80, 0x2e, 0x22, 0x21, 0xc2, 0x19, 0xcc, 0x3f, 0x42, 0xe9, 0xd9, 0x52,
- 0xcf, 0xf4, 0xc0, 0x60, 0xe1, 0x01, 0x16, 0x15, 0x11, 0xac, 0x11, 0x44, 0x0e, 0x8c, 0xc5, 0xff,
- 0xe2, 0xac, 0xf4, 0xe7, 0x73, 0x5b, 0x48, 0x12, 0x67, 0xea, 0x8d, 0x45, 0x9d, 0x04, 0x36, 0x29,
- 0xa2, 0x4f, 0xc2, 0xc9, 0xed, 0x5c, 0xbb, 0x23, 0xce, 0x4b, 0xb2, 0x34, 0xf3, 0xf9, 0xd6, 0x46,
- 0xf9, 0xf5, 0xed, 0xff, 0x09, 0xe0, 0x91, 0x0e, 0x27, 0x3d, 0x9a, 0x33, 0x6d, 0x06, 0x9e, 0x49,
- 0xca, 0x55, 0x66, 0x32, 0x2b, 0x1b, 0x82, 0x96, 0xc4, 0x86, 0x2a, 0xbc, 0xe7, 0x0d, 0xf5, 0x13,
- 0x96, 0xf6, 0xcc, 0xe2, 0x16, 0xe5, 0x1f, 0x3b, 0xe0, 0x0d, 0xf6, 0x00, 0x45, 0x60, 0xeb, 0x19,
- 0x72, 0xa4, 0xe7, 0x7b, 0xee, 0x4e, 0xef, 0x82, 0xa5, 0xdf, 0xc9, 0x0e, 0x71, 0xcf, 0x45, 0x4c,
- 0x97, 0x0f, 0xfa, 0xfd, 0x87, 0x15, 0xee, 0xfe, 0x1b, 0x16, 0x9c, 0x4c, 0x15, 0xf3, 0x3e, 0x90,
- 0x50, 0x44, 0xe9, 0x5b, 0x7d, 0xcf, 0x9d, 0x97, 0x04, 0xf9, 0x37, 0x5c, 0x11, 0xdf, 0x70, 0x32,
- 0x17, 0x2f, 0xd9, 0xf5, 0x2f, 0xfd, 0x7d, 0xe9, 0x08, 0x6b, 0xc0, 0x44, 0xc4, 0xf9, 0x5d, 0x47,
- 0x2d, 0x38, 0x5b, 0x6b, 0x07, 0x41, 0xbc, 0x58, 0x33, 0x36, 0x27, 0x7f, 0x2d, 0x3e, 0xbe, 0xb7,
- 0x5b, 0x3a, 0xbb, 0xd0, 0x05, 0x17, 0x77, 0xa5, 0x86, 0x3c, 0x40, 0xcd, 0x94, 0x75, 0x1f, 0x3b,
- 0x00, 0x72, 0xa4, 0x40, 0x69, 0x5b, 0x40, 0x6e, 0xa7, 0x9b, 0x61, 0x23, 0x98, 0x41, 0xf9, 0x70,
- 0x65, 0x37, 0xdf, 0x99, 0x78, 0xfa, 0x33, 0xd7, 0xe0, 0x4c, 0xe7, 0xc5, 0x74, 0xa0, 0x10, 0x14,
- 0x7f, 0x63, 0xc1, 0xe9, 0x8e, 0x71, 0xce, 0xbe, 0x0b, 0x1f, 0x0b, 0xf6, 0xe7, 0x2d, 0x78, 0x34,
- 0xb3, 0x46, 0xd2, 0x79, 0xb0, 0x46, 0x0b, 0x35, 0x63, 0xd8, 0x38, 0xe2, 0x8f, 0x04, 0xe0, 0x18,
- 0xc7, 0xb0, 0x17, 0x2d, 0x74, 0xb5, 0x17, 0xfd, 0x53, 0x0b, 0x52, 0x57, 0xfd, 0x21, 0x70, 0x9e,
- 0x65, 0x93, 0xf3, 0x7c, 0xbc, 0x97, 0xd1, 0xcc, 0x61, 0x3a, 0xff, 0x79, 0x02, 0x8e, 0xe7, 0x78,
- 0x90, 0x6f, 0xc3, 0xd4, 0x46, 0x8d, 0x98, 0x21, 0x43, 0x3a, 0x85, 0xd2, 0xeb, 0x18, 0x5f, 0x64,
- 0xfe, 0xd8, 0xde, 0x6e, 0x69, 0x2a, 0x85, 0x82, 0xd3, 0x4d, 0xa0, 0xcf, 0x5b, 0x70, 0xd4, 0xb9,
- 0x13, 0x2e, 0xd1, 0x17, 0x84, 0x5b, 0x9b, 0x6f, 0xf8, 0xb5, 0x2d, 0xca, 0x98, 0xc9, 0x6d, 0xf5,
- 0x62, 0xa6, 0x28, 0xfc, 0x56, 0x35, 0x85, 0x6f, 0x34, 0x3f, 0xbd, 0xb7, 0x5b, 0x3a, 0x9a, 0x85,
- 0x85, 0x33, 0xdb, 0x42, 0x58, 0xe4, 0x38, 0x73, 0xa2, 0xcd, 0x4e, 0x41, 0x6d, 0xb2, 0x5c, 0xfd,
- 0x39, 0x4b, 0x2c, 0x21, 0x58, 0xd1, 0x41, 0x9f, 0x81, 0xe1, 0x0d, 0x19, 0xbf, 0x22, 0x83, 0xe5,
- 0x8e, 0x07, 0xb2, 0x73, 0x54, 0x0f, 0x6e, 0x80, 0xa3, 0x90, 0x70, 0x4c, 0x14, 0xbd, 0x0e, 0x45,
- 0x6f, 0x3d, 0x14, 0xa1, 0xf5, 0xb2, 0xed, 0x80, 0x4d, 0x4b, 0x6b, 0x1e, 0x3a, 0x6a, 0x75, 0xb9,
- 0x8a, 0x69, 0x45, 0x74, 0x05, 0x8a, 0xc1, 0xed, 0xba, 0xd0, 0xe3, 0x64, 0x6e, 0x52, 0x3c, 0xbf,
- 0x98, 0xd3, 0x2b, 0x46, 0x09, 0xcf, 0x2f, 0x62, 0x4a, 0x02, 0x55, 0xa0, 0x9f, 0xb9, 0x5d, 0x0b,
- 0xd6, 0x36, 0xf3, 0x29, 0xdf, 0x21, 0x7c, 0x01, 0xf7, 0x87, 0x64, 0x08, 0x98, 0x13, 0x42, 0x6b,
- 0x30, 0x50, 0x73, 0xbd, 0x3a, 0x09, 0x04, 0x2f, 0xfb, 0xe1, 0x4c, 0x8d, 0x0d, 0xc3, 0xc8, 0xa1,
- 0xc9, 0x15, 0x18, 0x0c, 0x03, 0x0b, 0x5a, 0x8c, 0x2a, 0x69, 0x6d, 0xae, 0xcb, 0x1b, 0x2b, 0x9b,
- 0x2a, 0x69, 0x6d, 0x2e, 0x57, 0x3b, 0x52, 0x65, 0x18, 0x58, 0xd0, 0x42, 0xaf, 0x40, 0x61, 0xbd,
- 0x26, 0x5c, 0xaa, 0x33, 0xc5, 0x9b, 0x66, 0xf4, 0xaf, 0xf9, 0x81, 0xbd, 0xdd, 0x52, 0x61, 0x79,
- 0x01, 0x17, 0xd6, 0x6b, 0x68, 0x15, 0x06, 0xd7, 0x79, 0xbc, 0x20, 0x21, 0x1f, 0x7d, 0x32, 0x3b,
- 0x94, 0x51, 0x2a, 0xa4, 0x10, 0xf7, 0x6d, 0x15, 0x00, 0x2c, 0x89, 0xb0, 0x94, 0x5b, 0x2a, 0xee,
- 0x91, 0x08, 0xbb, 0x3a, 0x7b, 0xb0, 0x58, 0x55, 0xfc, 0xa9, 0x11, 0x47, 0x4f, 0xc2, 0x1a, 0x45,
- 0xba, 0xaa, 0x9d, 0x7b, 0xed, 0x80, 0xe5, 0xe4, 0x10, 0x8a, 0x99, 0xcc, 0x55, 0x3d, 0x27, 0x91,
- 0x3a, 0xad, 0x6a, 0x85, 0x84, 0x63, 0xa2, 0x68, 0x0b, 0xc6, 0xb6, 0xc3, 0xd6, 0x26, 0x91, 0x5b,
- 0x9a, 0x85, 0xeb, 0xcb, 0xe1, 0x66, 0x6f, 0x0a, 0x44, 0x37, 0x88, 0xda, 0x4e, 0x23, 0x75, 0x0a,
- 0xb1, 0x67, 0xcd, 0x4d, 0x9d, 0x18, 0x36, 0x69, 0xd3, 0xe1, 0x7f, 0xb7, 0xed, 0xdf, 0xde, 0x89,
- 0x88, 0x88, 0x96, 0x9a, 0x39, 0xfc, 0x6f, 0x71, 0x94, 0xf4, 0xf0, 0x0b, 0x00, 0x96, 0x44, 0xd0,
- 0x4d, 0x31, 0x3c, 0xec, 0xf4, 0x9c, 0xcc, 0x0f, 0xc5, 0x3e, 0x27, 0x91, 0x72, 0x06, 0x85, 0x9d,
- 0x96, 0x31, 0x29, 0x76, 0x4a, 0xb6, 0x36, 0xfd, 0xc8, 0xf7, 0x12, 0x27, 0xf4, 0x54, 0xfe, 0x29,
- 0x59, 0xc9, 0xc0, 0x4f, 0x9f, 0x92, 0x59, 0x58, 0x38, 0xb3, 0x2d, 0x54, 0x87, 0xf1, 0x96, 0x1f,
- 0x44, 0x77, 0xfc, 0x40, 0xae, 0x2f, 0xd4, 0x41, 0x50, 0x6a, 0x60, 0x8a, 0x16, 0x99, 0x59, 0x90,
- 0x09, 0xc1, 0x09, 0x9a, 0xe8, 0xe3, 0x30, 0x18, 0xd6, 0x9c, 0x06, 0x29, 0x5f, 0x9f, 0x3e, 0x92,
- 0x7f, 0xfd, 0x54, 0x39, 0x4a, 0xce, 0xea, 0xe2, 0xe1, 0x9e, 0x38, 0x0a, 0x96, 0xe4, 0xd0, 0x32,
- 0xf4, 0xb3, 0x54, 0xd6, 0x2c, 0xb4, 0x6f, 0x4e, 0x44, 0xf9, 0x94, 0x53, 0x0f, 0x3f, 0x9b, 0x58,
- 0x31, 0xe6, 0xd5, 0xe9, 0x1e, 0x10, 0x92, 0x02, 0x3f, 0x9c, 0x3e, 0x96, 0xbf, 0x07, 0x84, 0x80,
- 0xe1, 0x7a, 0xb5, 0xd3, 0x1e, 0x50, 0x48, 0x38, 0x26, 0x4a, 0x4f, 0x66, 0x7a, 0x9a, 0x1e, 0xef,
- 0x60, 0xb0, 0x99, 0x7b, 0x96, 0xb2, 0x93, 0x99, 0x9e, 0xa4, 0x94, 0x84, 0xfd, 0xc7, 0x43, 0x69,
- 0x9e, 0x85, 0x49, 0x98, 0xfe, 0x63, 0x2b, 0x65, 0xb1, 0xf1, 0x91, 0x5e, 0x05, 0xde, 0x0f, 0xf0,
- 0xe1, 0xfa, 0x79, 0x0b, 0x8e, 0xb7, 0x32, 0x3f, 0x44, 0x30, 0x00, 0xbd, 0xc9, 0xcd, 0xf9, 0xa7,
- 0xab, 0x30, 0xd0, 0xd9, 0x70, 0x9c, 0xd3, 0x52, 0x52, 0x38, 0x50, 0x7c, 0xcf, 0xc2, 0x81, 0x15,
- 0x18, 0xaa, 0xf1, 0x97, 0x9c, 0x4c, 0x5f, 0xd0, 0x53, 0x10, 0x53, 0xae, 0xa7, 0x15, 0x15, 0xb1,
- 0x22, 0x81, 0x7e, 0xd2, 0x82, 0xd3, 0xc9, 0xae, 0x63, 0xc2, 0xc0, 0xc2, 0x5c, 0x93, 0x8b, 0xb5,
- 0x96, 0xc5, 0xf7, 0xa7, 0xf8, 0x7f, 0x03, 0x79, 0xbf, 0x1b, 0x02, 0xee, 0xdc, 0x18, 0x5a, 0xcc,
- 0x90, 0xab, 0x0d, 0x98, 0x3a, 0xc9, 0x1e, 0x64, 0x6b, 0x2f, 0xc2, 0x68, 0xd3, 0x6f, 0x7b, 0x91,
- 0xb0, 0xba, 0x14, 0xa6, 0x5b, 0xcc, 0x64, 0x69, 0x45, 0x2b, 0xc7, 0x06, 0x56, 0x42, 0x22, 0x37,
- 0x74, 0xdf, 0x12, 0xb9, 0x77, 0x60, 0xd4, 0xd3, 0x1c, 0x12, 0x3a, 0xbd, 0x60, 0x85, 0x74, 0x51,
- 0xc3, 0xe6, 0xbd, 0xd4, 0x4b, 0xb0, 0x41, 0xad, 0xb3, 0xb4, 0x0c, 0xde, 0x9b, 0xb4, 0xec, 0x50,
- 0x9f, 0xc4, 0xf6, 0x6f, 0x16, 0x32, 0x5e, 0x0c, 0x5c, 0x2a, 0xf7, 0x9a, 0x29, 0x95, 0x3b, 0x97,
- 0x94, 0xca, 0xa5, 0x54, 0x55, 0x86, 0x40, 0xae, 0xf7, 0x1c, 0x9a, 0x3d, 0x07, 0xa6, 0xfe, 0x61,
- 0x0b, 0x4e, 0x30, 0xdd, 0x07, 0x6d, 0xe0, 0x3d, 0xeb, 0x3b, 0x98, 0x41, 0xec, 0xb5, 0x6c, 0x72,
- 0x38, 0xaf, 0x1d, 0xbb, 0x01, 0x67, 0xbb, 0xdd, 0xbb, 0xcc, 0xbe, 0xb8, 0xae, 0xcc, 0x2b, 0x62,
- 0xfb, 0xe2, 0x7a, 0x79, 0x11, 0x33, 0x48, 0xaf, 0x61, 0x17, 0xed, 0xff, 0xdb, 0x82, 0x62, 0xc5,
- 0xaf, 0x1f, 0xc2, 0x8b, 0xfe, 0x63, 0xc6, 0x8b, 0xfe, 0x91, 0xec, 0x1b, 0xbf, 0x9e, 0xab, 0xec,
- 0x5b, 0x4a, 0x28, 0xfb, 0x4e, 0xe7, 0x11, 0xe8, 0xac, 0xda, 0xfb, 0xe5, 0x22, 0x8c, 0x54, 0xfc,
- 0xba, 0xda, 0x67, 0xff, 0xfd, 0xfd, 0xb8, 0x11, 0xe5, 0x66, 0xcd, 0xd2, 0x28, 0x33, 0x7b, 0x62,
- 0x19, 0xf5, 0xe2, 0xbb, 0xcc, 0x9b, 0xe8, 0x16, 0x71, 0x37, 0x36, 0x23, 0x52, 0x4f, 0x7e, 0xce,
- 0xe1, 0x79, 0x13, 0x7d, 0xab, 0x08, 0x13, 0x89, 0xd6, 0x51, 0x03, 0xc6, 0x1a, 0xba, 0x2a, 0x49,
- 0xac, 0xd3, 0xfb, 0xd2, 0x42, 0x09, 0x6f, 0x0c, 0xad, 0x08, 0x9b, 0xc4, 0xd1, 0x2c, 0x80, 0xa7,
- 0xdb, 0xa4, 0xab, 0x00, 0xcb, 0x9a, 0x3d, 0xba, 0x86, 0x81, 0x5e, 0x82, 0x91, 0xc8, 0x6f, 0xf9,
- 0x0d, 0x7f, 0x63, 0xe7, 0x2a, 0x91, 0x11, 0x39, 0x95, 0xc9, 0xf2, 0x5a, 0x0c, 0xc2, 0x3a, 0x1e,
- 0xba, 0x0b, 0x53, 0x8a, 0x48, 0xf5, 0x01, 0xa8, 0xd7, 0x98, 0xd8, 0x64, 0x35, 0x49, 0x11, 0xa7,
- 0x1b, 0x41, 0xaf, 0xc0, 0x38, 0xb3, 0x9d, 0x66, 0xf5, 0xaf, 0x92, 0x1d, 0x19, 0xa9, 0x99, 0x71,
- 0xd8, 0x2b, 0x06, 0x04, 0x27, 0x30, 0xd1, 0x02, 0x4c, 0x35, 0xdd, 0x30, 0x51, 0x7d, 0x80, 0x55,
- 0x67, 0x1d, 0x58, 0x49, 0x02, 0x71, 0x1a, 0xdf, 0xfe, 0x75, 0x31, 0xc7, 0x5e, 0xe4, 0x7e, 0xb0,
- 0x1d, 0xdf, 0xdf, 0xdb, 0xf1, 0x9b, 0x16, 0x4c, 0xd2, 0xd6, 0x99, 0x41, 0xa8, 0x64, 0xa4, 0x54,
- 0x2e, 0x0f, 0xab, 0x43, 0x2e, 0x8f, 0x73, 0xf4, 0xd8, 0xae, 0xfb, 0xed, 0x48, 0x48, 0x47, 0xb5,
- 0x73, 0x99, 0x96, 0x62, 0x01, 0x15, 0x78, 0x24, 0x08, 0x84, 0xd7, 0xbd, 0x8e, 0x47, 0x82, 0x00,
- 0x0b, 0xa8, 0x4c, 0xf5, 0xd1, 0x97, 0x9d, 0xea, 0x83, 0x47, 0x6c, 0x17, 0x76, 0x74, 0x82, 0xa5,
- 0xd5, 0x22, 0xb6, 0x4b, 0x03, 0xbb, 0x18, 0xc7, 0xfe, 0x76, 0x11, 0x46, 0x2b, 0x7e, 0x3d, 0x36,
- 0xec, 0x78, 0xd1, 0x30, 0xec, 0x38, 0x9b, 0x30, 0xec, 0x98, 0xd4, 0x71, 0x35, 0x33, 0x8e, 0x37,
- 0x01, 0xf9, 0x22, 0x90, 0xfc, 0x65, 0xe2, 0x31, 0xbb, 0x37, 0x61, 0xa8, 0x57, 0x8c, 0xcd, 0x1e,
- 0xae, 0xa7, 0x30, 0x70, 0x46, 0xad, 0x0f, 0x4c, 0x42, 0x0e, 0xd7, 0x24, 0xe4, 0x4f, 0x2c, 0xb6,
- 0x02, 0x16, 0x57, 0xab, 0xdc, 0x56, 0x19, 0x5d, 0x84, 0x11, 0x76, 0x5a, 0xb2, 0x90, 0x11, 0xd2,
- 0x72, 0x82, 0xa5, 0xf1, 0x5c, 0x8d, 0x8b, 0xb1, 0x8e, 0x83, 0xce, 0xc3, 0x50, 0x48, 0x9c, 0xa0,
- 0xb6, 0xa9, 0xae, 0x0a, 0x61, 0xe6, 0xc0, 0xcb, 0xb0, 0x82, 0xa2, 0xb7, 0xe2, 0xc0, 0xe3, 0xc5,
- 0x7c, 0xc3, 0x67, 0xbd, 0x3f, 0x7c, 0xbb, 0xe5, 0x47, 0x1b, 0xb7, 0x6f, 0x01, 0x4a, 0xe3, 0xf7,
- 0xe0, 0x49, 0x56, 0x32, 0x43, 0xe3, 0x0e, 0xa7, 0xc2, 0xe2, 0xfe, 0x9b, 0x05, 0xe3, 0x15, 0xbf,
- 0x4e, 0x8f, 0x81, 0xef, 0xa5, 0x3d, 0xaf, 0x67, 0x5d, 0x18, 0xe8, 0x90, 0x75, 0xe1, 0x31, 0xe8,
- 0xaf, 0xf8, 0xf5, 0x2e, 0xe1, 0x7b, 0x7f, 0xc5, 0x82, 0xc1, 0x8a, 0x5f, 0x3f, 0x04, 0x25, 0xce,
- 0x6b, 0xa6, 0x12, 0xe7, 0x44, 0xce, 0xba, 0xc9, 0xd1, 0xdb, 0xfc, 0x79, 0x1f, 0x8c, 0xd1, 0x7e,
- 0xfa, 0x1b, 0x72, 0x2a, 0x8d, 0x61, 0xb3, 0x7a, 0x18, 0x36, 0xfa, 0xa4, 0xf0, 0x1b, 0x0d, 0xff,
- 0x4e, 0x72, 0x5a, 0x97, 0x59, 0x29, 0x16, 0x50, 0xf4, 0x2c, 0x0c, 0xb5, 0x02, 0xb2, 0xed, 0xfa,
- 0x82, 0x57, 0xd7, 0x54, 0x62, 0x15, 0x51, 0x8e, 0x15, 0x06, 0x7d, 0xc4, 0x87, 0xae, 0x47, 0xf9,
- 0x92, 0x9a, 0xef, 0xd5, 0xb9, 0x9e, 0xa3, 0x28, 0x52, 0x83, 0x69, 0xe5, 0xd8, 0xc0, 0x42, 0xb7,
- 0x60, 0x98, 0xfd, 0x67, 0xc7, 0x4e, 0xff, 0x81, 0x8f, 0x1d, 0x91, 0x2c, 0x59, 0x10, 0xc0, 0x31,
- 0x2d, 0xf4, 0x3c, 0x40, 0x24, 0xd3, 0xeb, 0x84, 0x22, 0x8c, 0xab, 0x7a, 0xd7, 0xa8, 0xc4, 0x3b,
- 0x21, 0xd6, 0xb0, 0xd0, 0x33, 0x30, 0x1c, 0x39, 0x6e, 0xe3, 0x9a, 0xeb, 0x31, 0x5b, 0x00, 0xda,
- 0x7f, 0x91, 0xb3, 0x58, 0x14, 0xe2, 0x18, 0x4e, 0xf9, 0x4a, 0x16, 0xdd, 0x6a, 0x7e, 0x27, 0x12,
- 0xe9, 0xf9, 0x8a, 0x9c, 0xaf, 0xbc, 0xa6, 0x4a, 0xb1, 0x86, 0x81, 0x36, 0xe1, 0x94, 0xeb, 0xb1,
- 0x34, 0x5a, 0xa4, 0xba, 0xe5, 0xb6, 0xd6, 0xae, 0x55, 0x6f, 0x92, 0xc0, 0x5d, 0xdf, 0x99, 0x77,
- 0x6a, 0x5b, 0xc4, 0xab, 0x33, 0xb1, 0xc3, 0xd0, 0xfc, 0xe3, 0xa2, 0x8b, 0xa7, 0xca, 0x1d, 0x70,
- 0x71, 0x47, 0x4a, 0xc8, 0xa6, 0xdb, 0x31, 0x20, 0x4e, 0x53, 0xc8, 0x17, 0x78, 0x0a, 0x1e, 0x56,
- 0x82, 0x05, 0xc4, 0x7e, 0x81, 0xed, 0x89, 0xeb, 0x55, 0xf4, 0xb4, 0x71, 0xbc, 0x1c, 0xd7, 0x8f,
- 0x97, 0xfd, 0xdd, 0xd2, 0xc0, 0xf5, 0xaa, 0x16, 0xe9, 0xe8, 0x12, 0x1c, 0xab, 0xf8, 0xf5, 0x8a,
- 0x1f, 0x44, 0xcb, 0x7e, 0x70, 0xc7, 0x09, 0xea, 0x72, 0x09, 0x96, 0x64, 0xac, 0x27, 0x7a, 0xc6,
- 0xf6, 0xf3, 0x13, 0xc8, 0x88, 0xe3, 0xf4, 0x02, 0xe3, 0x10, 0x0f, 0xe8, 0x5a, 0x5b, 0x63, 0xbc,
- 0x8a, 0x4a, 0x56, 0x77, 0xd9, 0x89, 0x08, 0xba, 0x0e, 0x63, 0x35, 0xfd, 0xda, 0x16, 0xd5, 0x9f,
- 0x92, 0x97, 0x9d, 0x71, 0xa7, 0x67, 0xde, 0xf3, 0x66, 0x7d, 0xfb, 0x1b, 0x96, 0x68, 0x85, 0x4b,
- 0x3e, 0xb8, 0x0d, 0x6d, 0xf7, 0x33, 0x77, 0x01, 0xa6, 0x02, 0xbd, 0x8a, 0x66, 0x8b, 0x76, 0x8c,
- 0x67, 0xff, 0x49, 0x00, 0x71, 0x1a, 0x1f, 0x7d, 0x12, 0x4e, 0x1a, 0x85, 0x52, 0x2d, 0xaf, 0xe5,
- 0xe0, 0x66, 0xb2, 0x21, 0x9c, 0x87, 0x84, 0xf3, 0xeb, 0xdb, 0x3f, 0x08, 0xc7, 0x93, 0xdf, 0x25,
- 0xa4, 0x35, 0xf7, 0xf9, 0x75, 0x85, 0x83, 0x7d, 0x9d, 0xfd, 0x12, 0x4c, 0xd1, 0x67, 0xbc, 0x62,
- 0x49, 0xd9, 0xfc, 0x75, 0x0f, 0xa7, 0xf5, 0xdb, 0x43, 0xec, 0x1a, 0x4c, 0x64, 0xa0, 0x43, 0x9f,
- 0x86, 0xf1, 0x90, 0xb0, 0x18, 0x72, 0x52, 0x4a, 0xd8, 0xc1, 0x2f, 0xbe, 0xba, 0xa4, 0x63, 0xf2,
- 0x97, 0x90, 0x59, 0x86, 0x13, 0xd4, 0x50, 0x13, 0xc6, 0xef, 0xb8, 0x5e, 0xdd, 0xbf, 0x13, 0x4a,
- 0xfa, 0x43, 0xf9, 0x2a, 0x87, 0x5b, 0x1c, 0x33, 0xd1, 0x47, 0xa3, 0xb9, 0x5b, 0x06, 0x31, 0x9c,
- 0x20, 0x4e, 0x8f, 0x9a, 0xa0, 0xed, 0xcd, 0x85, 0x37, 0x42, 0x12, 0x88, 0x08, 0x77, 0xec, 0xa8,
- 0xc1, 0xb2, 0x10, 0xc7, 0x70, 0x7a, 0xd4, 0xb0, 0x3f, 0xcc, 0xb1, 0x9e, 0x9d, 0x65, 0xe2, 0xa8,
- 0xc1, 0xaa, 0x14, 0x6b, 0x18, 0xf4, 0x28, 0x66, 0xff, 0x56, 0x7d, 0x0f, 0xfb, 0x7e, 0x24, 0x0f,
- 0x6f, 0x96, 0xae, 0x53, 0x2b, 0xc7, 0x06, 0x56, 0x4e, 0x3c, 0xbd, 0xbe, 0x83, 0xc6, 0xd3, 0x43,
- 0x51, 0x87, 0x58, 0x02, 0x3c, 0x22, 0xf4, 0xa5, 0x4e, 0xb1, 0x04, 0xf6, 0xef, 0x2b, 0xce, 0x00,
- 0xe5, 0x05, 0xd6, 0xc5, 0x00, 0xf5, 0xf3, 0x80, 0x81, 0x4c, 0x29, 0x5a, 0xe5, 0xa3, 0x23, 0x61,
- 0x68, 0x09, 0x06, 0xc3, 0x9d, 0xb0, 0x16, 0x35, 0xc2, 0x4e, 0x29, 0x59, 0xab, 0x0c, 0x45, 0xcb,
- 0x08, 0xce, 0xab, 0x60, 0x59, 0x17, 0xd5, 0xe0, 0x88, 0xa0, 0xb8, 0xb0, 0xe9, 0x78, 0x2a, 0x51,
- 0x24, 0xb7, 0x7e, 0xbc, 0xb8, 0xb7, 0x5b, 0x3a, 0x22, 0x5a, 0xd6, 0xc1, 0xfb, 0xbb, 0x25, 0xba,
- 0x25, 0x33, 0x20, 0x38, 0x8b, 0x1a, 0x5f, 0xf2, 0xb5, 0x9a, 0xdf, 0x6c, 0x55, 0x02, 0x7f, 0xdd,
- 0x6d, 0x90, 0x4e, 0x8a, 0xe5, 0xaa, 0x81, 0x29, 0x96, 0xbc, 0x51, 0x86, 0x13, 0xd4, 0xd0, 0x6d,
- 0x98, 0x70, 0x5a, 0xad, 0xb9, 0xa0, 0xe9, 0x07, 0xb2, 0x81, 0x91, 0x7c, 0x0d, 0xc5, 0x9c, 0x89,
- 0xca, 0xf3, 0x44, 0x26, 0x0a, 0x71, 0x92, 0x20, 0x1d, 0x28, 0xb1, 0xd1, 0x8c, 0x81, 0x1a, 0x8b,
- 0x07, 0x4a, 0xec, 0xcb, 0x8c, 0x81, 0xca, 0x80, 0xe0, 0x2c, 0x6a, 0xf6, 0x0f, 0x30, 0xc6, 0x9f,
- 0xc5, 0x9b, 0x66, 0x6e, 0x46, 0x4d, 0x18, 0x6b, 0xb1, 0x63, 0x5f, 0xe4, 0x70, 0x13, 0x47, 0xc5,
- 0x8b, 0x3d, 0x0a, 0x42, 0xef, 0xb0, 0x2c, 0xb4, 0x86, 0x41, 0x6c, 0x45, 0x27, 0x87, 0x4d, 0xea,
- 0xf6, 0x2f, 0xcd, 0x30, 0xd6, 0xb1, 0xca, 0xa5, 0x9b, 0x83, 0xc2, 0xe9, 0x52, 0xc8, 0x33, 0x66,
- 0xf2, 0xf5, 0x08, 0xf1, 0xfa, 0x12, 0x8e, 0x9b, 0x58, 0xd6, 0x45, 0x9f, 0x82, 0x71, 0xd7, 0x73,
- 0xe3, 0xec, 0xcd, 0xe1, 0xf4, 0xd1, 0xfc, 0x68, 0x5e, 0x0a, 0x4b, 0xcf, 0xef, 0xa8, 0x57, 0xc6,
- 0x09, 0x62, 0xe8, 0x2d, 0x66, 0x23, 0x2a, 0x49, 0x17, 0x7a, 0x21, 0xad, 0x9b, 0x83, 0x4a, 0xb2,
- 0x1a, 0x11, 0xd4, 0x86, 0x23, 0xe9, 0x2c, 0xd6, 0xe1, 0xb4, 0x9d, 0xff, 0x36, 0x4a, 0x27, 0xa2,
- 0x8e, 0x13, 0xf1, 0xa5, 0x61, 0x21, 0xce, 0xa2, 0x8f, 0xae, 0x25, 0x73, 0x0c, 0x17, 0x0d, 0x0d,
- 0x44, 0x2a, 0xcf, 0xf0, 0x58, 0xc7, 0xf4, 0xc2, 0x1b, 0x70, 0x5a, 0x4b, 0xd3, 0x7a, 0x39, 0x70,
- 0x98, 0x8d, 0x92, 0xcb, 0x6e, 0x23, 0x8d, 0xa9, 0x7d, 0x74, 0x6f, 0xb7, 0x74, 0x7a, 0xad, 0x13,
- 0x22, 0xee, 0x4c, 0x07, 0x5d, 0x87, 0x63, 0x3c, 0x16, 0xcd, 0x22, 0x71, 0xea, 0x0d, 0xd7, 0x53,
- 0x5c, 0x33, 0x3f, 0xbb, 0x4e, 0xee, 0xed, 0x96, 0x8e, 0xcd, 0x65, 0x21, 0xe0, 0xec, 0x7a, 0xe8,
- 0x35, 0x18, 0xae, 0x7b, 0xf2, 0x94, 0x1d, 0x30, 0x32, 0xe1, 0x0e, 0x2f, 0xae, 0x56, 0xd5, 0xf7,
- 0xc7, 0x7f, 0x70, 0x5c, 0x01, 0x6d, 0x70, 0x15, 0x98, 0x92, 0x5b, 0x0e, 0xa6, 0x42, 0x94, 0x26,
- 0x45, 0xfb, 0x46, 0x70, 0x07, 0xae, 0xfb, 0x55, 0x0e, 0x80, 0x46, 0xdc, 0x07, 0x83, 0x30, 0x7a,
- 0x13, 0x90, 0xc8, 0xb8, 0x34, 0x57, 0x63, 0x09, 0x02, 0x35, 0xbb, 0x54, 0x25, 0x42, 0xa8, 0xa6,
- 0x30, 0x70, 0x46, 0x2d, 0x74, 0x85, 0x1e, 0x8f, 0x7a, 0xa9, 0x38, 0x7e, 0x55, 0xbe, 0xf5, 0x45,
- 0xd2, 0x0a, 0x08, 0x33, 0xa5, 0x34, 0x29, 0xe2, 0x44, 0x3d, 0x54, 0x87, 0x53, 0x4e, 0x3b, 0xf2,
- 0x99, 0x76, 0xd1, 0x44, 0x5d, 0xf3, 0xb7, 0x88, 0xc7, 0x14, 0xfb, 0x43, 0x2c, 0xf4, 0xe9, 0xa9,
- 0xb9, 0x0e, 0x78, 0xb8, 0x23, 0x15, 0xfa, 0x9c, 0xa2, 0x63, 0xa1, 0x29, 0xfe, 0x0c, 0x3f, 0x75,
- 0xae, 0x0d, 0x97, 0x18, 0xe8, 0x25, 0x18, 0xd9, 0xf4, 0xc3, 0x68, 0x95, 0x44, 0x77, 0xfc, 0x60,
- 0x4b, 0xa4, 0x78, 0x88, 0xd3, 0xea, 0xc4, 0x20, 0xac, 0xe3, 0xa1, 0xa7, 0x60, 0x90, 0x99, 0x9d,
- 0x95, 0x17, 0xd9, 0x5d, 0x3b, 0x14, 0x9f, 0x31, 0x57, 0x78, 0x31, 0x96, 0x70, 0x89, 0x5a, 0xae,
- 0x2c, 0xb0, 0xe3, 0x38, 0x81, 0x5a, 0xae, 0x2c, 0x60, 0x09, 0xa7, 0xcb, 0x35, 0xdc, 0x74, 0x02,
- 0x52, 0x09, 0xfc, 0x1a, 0x09, 0xb5, 0x64, 0x4e, 0x8f, 0xf0, 0x04, 0x16, 0x74, 0xb9, 0x56, 0xb3,
- 0x10, 0x70, 0x76, 0x3d, 0x44, 0xd2, 0x29, 0x8a, 0xc7, 0xf3, 0xd5, 0xae, 0x69, 0x76, 0xb0, 0xc7,
- 0x2c, 0xc5, 0x1e, 0x4c, 0xaa, 0xe4, 0xc8, 0x3c, 0x65, 0x45, 0x38, 0x3d, 0xc1, 0xd6, 0x76, 0xef,
- 0xf9, 0x2e, 0x94, 0x22, 0xbb, 0x9c, 0xa0, 0x84, 0x53, 0xb4, 0x8d, 0xd8, 0xba, 0x93, 0x5d, 0x63,
- 0xeb, 0x5e, 0x80, 0xe1, 0xb0, 0x7d, 0xbb, 0xee, 0x37, 0x1d, 0xd7, 0x63, 0xd6, 0x3b, 0xda, 0xc3,
- 0xbd, 0x2a, 0x01, 0x38, 0xc6, 0x41, 0xcb, 0x30, 0xe4, 0x48, 0x2d, 0x35, 0xca, 0x0f, 0x1b, 0xa8,
- 0x74, 0xd3, 0x3c, 0x92, 0x96, 0xd4, 0x4b, 0xab, 0xba, 0xe8, 0x55, 0x18, 0x13, 0xa1, 0x49, 0x78,
- 0x14, 0x1e, 0x66, 0x5d, 0xa3, 0x39, 0x53, 0x57, 0x75, 0x20, 0x36, 0x71, 0xd1, 0x0d, 0x18, 0x89,
- 0xfc, 0x86, 0x90, 0x71, 0x86, 0xd3, 0xc7, 0xf3, 0xa3, 0xfb, 0xae, 0x29, 0x34, 0x5d, 0x7f, 0xa2,
- 0xaa, 0x62, 0x9d, 0x0e, 0x5a, 0xe3, 0xeb, 0x9d, 0xa5, 0x6e, 0x22, 0xa1, 0x48, 0x48, 0x7f, 0x3a,
- 0xcf, 0xf4, 0x92, 0xa1, 0x99, 0xdb, 0x41, 0xd4, 0xc4, 0x3a, 0x19, 0x74, 0x19, 0xa6, 0x5a, 0x81,
- 0xeb, 0xb3, 0x35, 0xa1, 0xb4, 0xee, 0xd3, 0x66, 0xa2, 0xd6, 0x4a, 0x12, 0x01, 0xa7, 0xeb, 0xb0,
- 0xc8, 0x32, 0xa2, 0x70, 0xfa, 0x24, 0x4f, 0x36, 0xc7, 0xe5, 0x20, 0xbc, 0x0c, 0x2b, 0x28, 0x5a,
- 0x61, 0x27, 0x31, 0x17, 0xe1, 0x4d, 0xcf, 0xe4, 0xc7, 0x2b, 0xd0, 0x45, 0x7d, 0x9c, 0xf7, 0x57,
- 0x7f, 0x71, 0x4c, 0x01, 0xd5, 0xb5, 0x1c, 0xef, 0xf4, 0x05, 0x15, 0x4e, 0x9f, 0xea, 0x60, 0xfb,
- 0x9b, 0x78, 0x2e, 0xc7, 0x0c, 0x81, 0x51, 0x1c, 0xe2, 0x04, 0x4d, 0xf4, 0x06, 0x4c, 0x8a, 0xb0,
- 0x0b, 0xf1, 0x30, 0x9d, 0x8e, 0xfd, 0xa3, 0x70, 0x02, 0x86, 0x53, 0xd8, 0x3c, 0xd9, 0x9b, 0x73,
- 0xbb, 0x41, 0xc4, 0xd1, 0x77, 0xcd, 0xf5, 0xb6, 0xc2, 0xe9, 0x33, 0xec, 0x7c, 0x10, 0xc9, 0xde,
- 0x92, 0x50, 0x9c, 0x51, 0x03, 0xad, 0xc1, 0x64, 0x2b, 0x20, 0xa4, 0xc9, 0xde, 0x49, 0xe2, 0x3e,
- 0x2b, 0xf1, 0xc0, 0x4a, 0xb4, 0x27, 0x95, 0x04, 0x6c, 0x3f, 0xa3, 0x0c, 0xa7, 0x28, 0xa0, 0x3b,
- 0x30, 0xe4, 0x6f, 0x93, 0x60, 0x93, 0x38, 0xf5, 0xe9, 0xb3, 0x1d, 0xbc, 0xf6, 0xc4, 0xe5, 0x76,
- 0x5d, 0xe0, 0x26, 0x8c, 0x9a, 0x64, 0x71, 0x77, 0xa3, 0x26, 0xd9, 0x18, 0xfa, 0x4f, 0x2c, 0x38,
- 0x29, 0xd5, 0x84, 0xd5, 0x16, 0x1d, 0xf5, 0x05, 0xdf, 0x0b, 0xa3, 0x80, 0x87, 0x02, 0x7a, 0x34,
- 0x3f, 0x3c, 0xce, 0x5a, 0x4e, 0x25, 0xa5, 0x45, 0x38, 0x99, 0x87, 0x11, 0xe2, 0xfc, 0x16, 0xe9,
- 0xcb, 0x3e, 0x24, 0x91, 0x3c, 0x8c, 0xe6, 0xc2, 0xe5, 0xb7, 0x16, 0x57, 0xa7, 0x1f, 0xe3, 0x71,
- 0x8c, 0xe8, 0x66, 0xa8, 0x26, 0x81, 0x38, 0x8d, 0x8f, 0x2e, 0x42, 0xc1, 0x0f, 0xa7, 0x1f, 0x67,
- 0x6b, 0xfb, 0x64, 0xce, 0x38, 0x5e, 0xaf, 0x72, 0xe3, 0xd6, 0xeb, 0x55, 0x5c, 0xf0, 0x43, 0x99,
- 0x70, 0x8d, 0x3e, 0x67, 0xc3, 0xe9, 0x27, 0xb8, 0xcc, 0x59, 0x26, 0x5c, 0x63, 0x85, 0x38, 0x86,
- 0xa3, 0x4d, 0x98, 0x08, 0x0d, 0xb1, 0x41, 0x38, 0x7d, 0x8e, 0x8d, 0xd4, 0x13, 0x79, 0x93, 0x66,
- 0x60, 0x6b, 0x99, 0x90, 0x4c, 0x2a, 0x38, 0x49, 0x96, 0xef, 0x2e, 0x4d, 0x70, 0x11, 0x4e, 0x3f,
- 0xd9, 0x65, 0x77, 0x69, 0xc8, 0xfa, 0xee, 0xd2, 0x69, 0xe0, 0x04, 0x4d, 0x74, 0x43, 0x77, 0x89,
- 0x3c, 0x9f, 0x6f, 0x28, 0x99, 0xe9, 0x0c, 0x39, 0x96, 0xe7, 0x08, 0x39, 0xf3, 0x7d, 0x30, 0x95,
- 0xe2, 0xc2, 0x0e, 0xe2, 0x1f, 0x32, 0xb3, 0x05, 0x63, 0xc6, 0x4a, 0x7f, 0xa8, 0xe6, 0x43, 0x3f,
- 0x03, 0x30, 0xac, 0xcc, 0x3a, 0x72, 0xf4, 0x6c, 0x53, 0xf7, 0xa5, 0x67, 0xbb, 0x60, 0x5a, 0x1f,
- 0x9d, 0x4c, 0x5a, 0x1f, 0x0d, 0x55, 0xfc, 0xba, 0x61, 0x70, 0xb4, 0x96, 0x11, 0x41, 0x38, 0xef,
- 0x8c, 0xee, 0xdd, 0x21, 0x4e, 0x53, 0x55, 0x15, 0x7b, 0x36, 0x63, 0xea, 0xeb, 0xa8, 0xfd, 0xba,
- 0x0c, 0x53, 0x9e, 0xcf, 0x9e, 0x11, 0xa4, 0x2e, 0x79, 0x44, 0xc6, 0x0a, 0x0e, 0xeb, 0x11, 0xee,
- 0x12, 0x08, 0x38, 0x5d, 0x87, 0x36, 0xc8, 0x79, 0xb9, 0xa4, 0xba, 0x8d, 0xb3, 0x7a, 0x58, 0x40,
- 0xe9, 0xf3, 0x95, 0xff, 0x0a, 0xa7, 0x27, 0xf3, 0x9f, 0xaf, 0xbc, 0x52, 0x92, 0x5f, 0x0c, 0x25,
- 0xbf, 0xc8, 0xb4, 0x4b, 0x2d, 0xbf, 0x5e, 0xae, 0x88, 0x97, 0x88, 0x16, 0xdb, 0xbf, 0x5e, 0xae,
- 0x60, 0x0e, 0x43, 0x73, 0x30, 0xc0, 0x7e, 0xc8, 0xc8, 0x41, 0x79, 0x27, 0x49, 0xb9, 0xa2, 0xe5,
- 0xa4, 0x65, 0x15, 0xb0, 0xa8, 0xc8, 0xb4, 0x07, 0xf4, 0xf9, 0xc6, 0xb4, 0x07, 0x83, 0xf7, 0xa9,
- 0x3d, 0x90, 0x04, 0x70, 0x4c, 0x0b, 0xdd, 0x85, 0x63, 0xc6, 0x93, 0x59, 0x79, 0x08, 0x42, 0xbe,
- 0x91, 0x42, 0x02, 0x79, 0xfe, 0xb4, 0xe8, 0xf4, 0xb1, 0x72, 0x16, 0x25, 0x9c, 0xdd, 0x00, 0x6a,
- 0xc0, 0x54, 0x2d, 0xd5, 0xea, 0x50, 0xef, 0xad, 0xaa, 0x75, 0x91, 0x6e, 0x31, 0x4d, 0x18, 0xbd,
- 0x0a, 0x43, 0xef, 0xfa, 0xdc, 0xa0, 0x50, 0xbc, 0x9e, 0x64, 0x7c, 0x9b, 0xa1, 0xb7, 0xae, 0x57,
- 0x59, 0xf9, 0xfe, 0x6e, 0x69, 0xa4, 0xe2, 0xd7, 0xe5, 0x5f, 0xac, 0x2a, 0xa0, 0x1f, 0xb3, 0x60,
- 0x26, 0xfd, 0x26, 0x57, 0x9d, 0x1e, 0xeb, 0xbd, 0xd3, 0xb6, 0x68, 0x74, 0x66, 0x29, 0x97, 0x1c,
- 0xee, 0xd0, 0x14, 0xfa, 0x28, 0xdd, 0x4f, 0xa1, 0x7b, 0x8f, 0x88, 0x84, 0xfe, 0x8f, 0xc6, 0xfb,
- 0x89, 0x96, 0xee, 0xef, 0x96, 0x26, 0xf8, 0xe1, 0xed, 0xde, 0x53, 0x59, 0x08, 0x78, 0x05, 0xf4,
- 0x83, 0x70, 0x2c, 0x48, 0xcb, 0xc8, 0x89, 0x7c, 0x27, 0x3c, 0xdd, 0xcb, 0x45, 0x90, 0x9c, 0x70,
- 0x9c, 0x45, 0x10, 0x67, 0xb7, 0x63, 0xff, 0xa1, 0xc5, 0x74, 0x23, 0xa2, 0x5b, 0x24, 0x6c, 0x37,
- 0xa2, 0x43, 0x30, 0xe2, 0x5b, 0x32, 0x6c, 0x13, 0xee, 0xdb, 0x0a, 0xef, 0xbf, 0xb3, 0x98, 0x15,
- 0xde, 0x21, 0xfa, 0x13, 0xbe, 0x05, 0x43, 0x91, 0x68, 0x4d, 0x74, 0x3d, 0xcf, 0x62, 0x48, 0x76,
- 0x8a, 0x59, 0x22, 0xaa, 0x77, 0x98, 0x2c, 0xc5, 0x8a, 0x8c, 0xfd, 0x5f, 0xf3, 0x19, 0x90, 0x90,
- 0x43, 0x50, 0x01, 0x2f, 0x9a, 0x2a, 0xe0, 0x52, 0x97, 0x2f, 0xc8, 0x51, 0x05, 0xff, 0x57, 0x66,
- 0xbf, 0x99, 0xfc, 0xf1, 0xfd, 0x6e, 0xfe, 0x69, 0x7f, 0xd1, 0x02, 0x88, 0xd3, 0xbe, 0xf4, 0x90,
- 0xc0, 0xfb, 0x12, 0x7d, 0x79, 0xf9, 0x91, 0x5f, 0xf3, 0x1b, 0x42, 0x05, 0x75, 0x2a, 0xd6, 0x42,
- 0xf3, 0xf2, 0x7d, 0xed, 0x37, 0x56, 0xd8, 0xa8, 0x24, 0xe3, 0x30, 0x17, 0x63, 0xbb, 0x08, 0x23,
- 0x06, 0xf3, 0x57, 0x2c, 0x38, 0x9a, 0xe5, 0x9c, 0x42, 0xdf, 0xf1, 0x5c, 0x12, 0xab, 0x4c, 0x73,
- 0xd5, 0x6c, 0xde, 0x14, 0xe5, 0x58, 0x61, 0xf4, 0x9c, 0x19, 0xfd, 0x60, 0x29, 0x49, 0xae, 0xc3,
- 0x58, 0x25, 0x20, 0x1a, 0x7f, 0xf1, 0x7a, 0x9c, 0x2d, 0x69, 0x78, 0xfe, 0xd9, 0x03, 0x47, 0x7c,
- 0xb2, 0xbf, 0x5a, 0x80, 0xa3, 0xdc, 0xc0, 0x6c, 0x6e, 0xdb, 0x77, 0xeb, 0x15, 0xbf, 0x2e, 0x5c,
- 0x8a, 0xdf, 0x86, 0xd1, 0x96, 0x26, 0x3e, 0xef, 0x14, 0x5e, 0x5f, 0x17, 0xb3, 0xc7, 0x02, 0x3f,
- 0xbd, 0x14, 0x1b, 0xb4, 0x50, 0x1d, 0x46, 0xc9, 0xb6, 0x5b, 0x53, 0x96, 0x45, 0x85, 0x03, 0x5f,
- 0xd2, 0xaa, 0x95, 0x25, 0x8d, 0x0e, 0x36, 0xa8, 0xf6, 0x6c, 0x16, 0xae, 0xb1, 0x68, 0x7d, 0x5d,
- 0xac, 0x89, 0x7e, 0xce, 0x82, 0x13, 0x39, 0xc1, 0xf8, 0x69, 0x73, 0x77, 0x98, 0x29, 0x9f, 0x58,
- 0xb6, 0xaa, 0x39, 0x6e, 0xe0, 0x87, 0x05, 0x14, 0x7d, 0x1c, 0xa0, 0x15, 0xa7, 0x30, 0xed, 0x12,
- 0xb5, 0xdc, 0x88, 0x5f, 0xac, 0x85, 0xa2, 0x55, 0x99, 0x4e, 0x35, 0x5a, 0xf6, 0x57, 0xfa, 0xa0,
- 0x9f, 0x19, 0x71, 0xa1, 0x0a, 0x0c, 0x6e, 0xf2, 0x48, 0x89, 0x1d, 0xe7, 0x8d, 0xe2, 0xca, 0xd0,
- 0x8b, 0xf1, 0xbc, 0x69, 0xa5, 0x58, 0x92, 0x41, 0x2b, 0x70, 0x84, 0xa7, 0x67, 0x6d, 0x2c, 0x92,
- 0x86, 0xb3, 0x23, 0x25, 0xd3, 0x05, 0xf6, 0xa9, 0x4a, 0x42, 0x5f, 0x4e, 0xa3, 0xe0, 0xac, 0x7a,
- 0xe8, 0x75, 0x18, 0x8f, 0xdc, 0x26, 0xf1, 0xdb, 0x91, 0xa4, 0xc4, 0xf3, 0xa1, 0xaa, 0xc7, 0xd3,
- 0x9a, 0x01, 0xc5, 0x09, 0x6c, 0xf4, 0x2a, 0x8c, 0xb5, 0x52, 0x32, 0xf8, 0xfe, 0x58, 0x58, 0x65,
- 0xca, 0xdd, 0x4d, 0x5c, 0xe6, 0x9f, 0xd2, 0x66, 0xde, 0x38, 0x6b, 0x9b, 0x01, 0x09, 0x37, 0xfd,
- 0x46, 0x9d, 0x71, 0xc0, 0xfd, 0x9a, 0x7f, 0x4a, 0x02, 0x8e, 0x53, 0x35, 0x28, 0x95, 0x75, 0xc7,
- 0x6d, 0xb4, 0x03, 0x12, 0x53, 0x19, 0x30, 0xa9, 0x2c, 0x27, 0xe0, 0x38, 0x55, 0xa3, 0xbb, 0x72,
- 0x61, 0xf0, 0xc1, 0x28, 0x17, 0xec, 0x5f, 0x2d, 0x80, 0x31, 0xb5, 0xdf, 0xc3, 0xd9, 0x56, 0x5f,
- 0x83, 0xbe, 0x8d, 0xa0, 0x55, 0x13, 0x06, 0x8b, 0x99, 0x5f, 0x76, 0x19, 0x57, 0x16, 0xf4, 0x2f,
- 0xa3, 0xff, 0x31, 0xab, 0x45, 0xf7, 0xf8, 0xb1, 0x4a, 0xe0, 0xd3, 0x4b, 0x4e, 0x06, 0x53, 0x55,
- 0x6e, 0x60, 0x83, 0xf2, 0xbd, 0xde, 0x21, 0xec, 0xb8, 0xf0, 0x65, 0xe1, 0x14, 0x0c, 0xdb, 0xbe,
- 0xaa, 0x78, 0xad, 0x4b, 0x2a, 0xe8, 0x22, 0x8c, 0x88, 0x04, 0x98, 0xcc, 0x5b, 0x89, 0x6f, 0x26,
- 0x66, 0x8b, 0xb8, 0x18, 0x17, 0x63, 0x1d, 0xc7, 0xfe, 0xf1, 0x02, 0x1c, 0xc9, 0x70, 0x37, 0xe5,
- 0xd7, 0xc8, 0x86, 0x1b, 0x46, 0xc1, 0x4e, 0xf2, 0x72, 0xc2, 0xa2, 0x1c, 0x2b, 0x0c, 0x7a, 0x56,
- 0xf1, 0x8b, 0x2a, 0x79, 0x39, 0x09, 0x77, 0x2e, 0x01, 0x3d, 0xd8, 0xe5, 0x44, 0xaf, 0xed, 0x76,
- 0x48, 0x64, 0x86, 0x03, 0x75, 0x6d, 0x33, 0xc3, 0x05, 0x06, 0xa1, 0x4f, 0xc0, 0x0d, 0xa5, 0x8d,
- 0xd7, 0x9e, 0x80, 0x5c, 0x1f, 0xcf, 0x61, 0xb4, 0x73, 0x11, 0xf1, 0x1c, 0x2f, 0x12, 0x0f, 0xc5,
- 0x38, 0xf2, 0x35, 0x2b, 0xc5, 0x02, 0x6a, 0x7f, 0xb9, 0x08, 0x27, 0x73, 0x1d, 0xd0, 0x69, 0xd7,
- 0x9b, 0xbe, 0xe7, 0x46, 0xbe, 0x32, 0xf2, 0xe4, 0xd1, 0xae, 0x49, 0x6b, 0x73, 0x45, 0x94, 0x63,
- 0x85, 0x81, 0xce, 0x41, 0x3f, 0x93, 0xdb, 0x27, 0x93, 0xdf, 0xe1, 0xf9, 0x45, 0x1e, 0x0b, 0x94,
- 0x83, 0xb5, 0x5b, 0xbd, 0xd8, 0xf1, 0x56, 0x7f, 0x8c, 0x72, 0x30, 0x7e, 0x23, 0x79, 0xa1, 0xd0,
- 0xee, 0xfa, 0x7e, 0x03, 0x33, 0x20, 0x7a, 0x42, 0x8c, 0x57, 0xc2, 0xaa, 0x11, 0x3b, 0x75, 0x3f,
- 0xd4, 0x06, 0xed, 0x29, 0x18, 0xdc, 0x22, 0x3b, 0x81, 0xeb, 0x6d, 0x24, 0xad, 0x5d, 0xaf, 0xf2,
- 0x62, 0x2c, 0xe1, 0x66, 0x96, 0xf8, 0xc1, 0x07, 0x91, 0x25, 0x5e, 0x5f, 0x01, 0x43, 0x5d, 0xd9,
- 0x93, 0x9f, 0x28, 0xc2, 0x04, 0x9e, 0x5f, 0xfc, 0x60, 0x22, 0x6e, 0xa4, 0x27, 0xe2, 0x41, 0x24,
- 0x53, 0x3f, 0xd8, 0x6c, 0xfc, 0x9e, 0x05, 0x13, 0x2c, 0x0d, 0xa7, 0x88, 0x1e, 0xe3, 0xfa, 0xde,
- 0x21, 0x3c, 0x05, 0x1e, 0x83, 0xfe, 0x80, 0x36, 0x2a, 0x66, 0x50, 0xed, 0x71, 0xd6, 0x13, 0xcc,
- 0x61, 0xe8, 0x14, 0xf4, 0xb1, 0x2e, 0xd0, 0xc9, 0x1b, 0xe5, 0x47, 0xf0, 0xa2, 0x13, 0x39, 0x98,
- 0x95, 0xb2, 0x38, 0x96, 0x98, 0xb4, 0x1a, 0x2e, 0xef, 0x74, 0x6c, 0x55, 0xf1, 0xfe, 0x08, 0x4d,
- 0x93, 0xd9, 0xb5, 0xf7, 0x16, 0xc7, 0x32, 0x9b, 0x64, 0xe7, 0x67, 0xf6, 0x3f, 0x15, 0xe0, 0x4c,
- 0x66, 0xbd, 0x9e, 0xe3, 0x58, 0x76, 0xae, 0xfd, 0x30, 0x93, 0xf6, 0x15, 0x0f, 0xd1, 0x97, 0xa0,
- 0xaf, 0x57, 0xee, 0xbf, 0xbf, 0x87, 0xf0, 0x92, 0x99, 0x43, 0xf6, 0x3e, 0x09, 0x2f, 0x99, 0xd9,
- 0xb7, 0x1c, 0x31, 0xc1, 0xb7, 0x0b, 0x39, 0xdf, 0xc2, 0x04, 0x06, 0xe7, 0xe9, 0x39, 0xc3, 0x80,
- 0xa1, 0x7c, 0x84, 0xf3, 0x33, 0x86, 0x97, 0x61, 0x05, 0x45, 0x73, 0x30, 0xd1, 0x74, 0x3d, 0x7a,
- 0xf8, 0xec, 0x98, 0xac, 0xb8, 0x52, 0xb7, 0xac, 0x98, 0x60, 0x9c, 0xc4, 0x47, 0xae, 0x16, 0x7a,
- 0x92, 0x7f, 0xdd, 0xab, 0x07, 0xda, 0x75, 0xb3, 0xa6, 0xc5, 0x89, 0x1a, 0xc5, 0x8c, 0x30, 0x94,
- 0x2b, 0x9a, 0x9c, 0xa8, 0xd8, 0xbb, 0x9c, 0x68, 0x34, 0x5b, 0x46, 0x34, 0xf3, 0x2a, 0x8c, 0xdd,
- 0xb7, 0x9e, 0xc5, 0xfe, 0x66, 0x11, 0x1e, 0xe9, 0xb0, 0xed, 0xf9, 0x59, 0x6f, 0xcc, 0x81, 0x76,
- 0xd6, 0xa7, 0xe6, 0xa1, 0x02, 0x47, 0xd7, 0xdb, 0x8d, 0xc6, 0x0e, 0x73, 0xc0, 0x23, 0x75, 0x89,
- 0x21, 0x78, 0x4a, 0x29, 0x1c, 0x39, 0xba, 0x9c, 0x81, 0x83, 0x33, 0x6b, 0xd2, 0x27, 0x16, 0xbd,
- 0x49, 0x76, 0x14, 0xa9, 0xc4, 0x13, 0x0b, 0xeb, 0x40, 0x6c, 0xe2, 0xa2, 0xcb, 0x30, 0xe5, 0x6c,
- 0x3b, 0x2e, 0x4f, 0x7a, 0x22, 0x09, 0xf0, 0x37, 0x96, 0x92, 0x45, 0xcf, 0x25, 0x11, 0x70, 0xba,
- 0x4e, 0x8e, 0x4a, 0xa8, 0x78, 0x5f, 0x2a, 0x21, 0x33, 0x08, 0xe2, 0x40, 0x7e, 0x10, 0xc4, 0xce,
- 0xe7, 0x62, 0xd7, 0x7c, 0x91, 0xef, 0xc0, 0xd8, 0x41, 0x2d, 0xc7, 0x9f, 0x82, 0xc1, 0x40, 0x64,
- 0xe2, 0x4f, 0x78, 0xbb, 0xcb, 0x3c, 0xe5, 0x12, 0x6e, 0xff, 0x6f, 0x16, 0x28, 0x59, 0xb2, 0x19,
- 0xef, 0xfc, 0x55, 0x66, 0x06, 0xcf, 0xa5, 0xe0, 0x5a, 0x88, 0xb3, 0x63, 0x9a, 0x19, 0x7c, 0x0c,
- 0xc4, 0x26, 0x2e, 0x5f, 0x6e, 0x61, 0x1c, 0x59, 0xc3, 0x78, 0x40, 0x08, 0x0d, 0xa4, 0xc2, 0x40,
- 0x9f, 0x80, 0xc1, 0xba, 0xbb, 0xed, 0x86, 0x42, 0x8e, 0x76, 0x60, 0x1d, 0x60, 0xfc, 0x7d, 0x8b,
- 0x9c, 0x0c, 0x96, 0xf4, 0xec, 0x9f, 0xb2, 0x40, 0xa9, 0x4e, 0xaf, 0x10, 0xa7, 0x11, 0x6d, 0xa2,
- 0x37, 0x00, 0x24, 0x05, 0x25, 0x7b, 0x93, 0x06, 0x5d, 0x80, 0x15, 0x64, 0xdf, 0xf8, 0x87, 0xb5,
- 0x3a, 0xe8, 0x75, 0x18, 0xd8, 0x64, 0xb4, 0xc4, 0xb7, 0x9d, 0x53, 0xaa, 0x2e, 0x56, 0xba, 0xbf,
- 0x5b, 0x3a, 0x6a, 0xb6, 0x29, 0x6f, 0x31, 0x5e, 0xcb, 0xfe, 0x89, 0x42, 0x3c, 0xa7, 0x6f, 0xb5,
- 0xfd, 0xc8, 0x39, 0x04, 0x4e, 0xe4, 0xb2, 0xc1, 0x89, 0x3c, 0xd1, 0x49, 0x37, 0xcc, 0xba, 0x94,
- 0xcb, 0x81, 0x5c, 0x4f, 0x70, 0x20, 0x4f, 0x76, 0x27, 0xd5, 0x99, 0xf3, 0xf8, 0x6f, 0x2c, 0x98,
- 0x32, 0xf0, 0x0f, 0xe1, 0x02, 0x5c, 0x36, 0x2f, 0xc0, 0x47, 0xbb, 0x7e, 0x43, 0xce, 0xc5, 0xf7,
- 0xa3, 0xc5, 0x44, 0xdf, 0xd9, 0x85, 0xf7, 0x2e, 0xf4, 0x6d, 0x3a, 0x41, 0x5d, 0xbc, 0xeb, 0x2f,
- 0xf4, 0x34, 0xd6, 0xb3, 0x57, 0x9c, 0x40, 0x18, 0x83, 0x3c, 0x2b, 0x47, 0x9d, 0x16, 0x75, 0x35,
- 0x04, 0x61, 0x4d, 0xa1, 0x4b, 0x30, 0x10, 0xd6, 0xfc, 0x96, 0xf2, 0x29, 0x64, 0x49, 0xd4, 0xab,
- 0xac, 0x64, 0x7f, 0xb7, 0x84, 0xcc, 0xe6, 0x68, 0x31, 0x16, 0xf8, 0xe8, 0x6d, 0x18, 0x63, 0xbf,
- 0x94, 0x65, 0x66, 0x31, 0x5f, 0x02, 0x53, 0xd5, 0x11, 0xb9, 0xd9, 0xb2, 0x51, 0x84, 0x4d, 0x52,
- 0x33, 0x1b, 0x30, 0xac, 0x3e, 0xeb, 0xa1, 0x6a, 0xfe, 0xff, 0xba, 0x08, 0x47, 0x32, 0xd6, 0x1c,
- 0x0a, 0x8d, 0x99, 0xb8, 0xd8, 0xe3, 0x52, 0x7d, 0x8f, 0x73, 0x11, 0xb2, 0x07, 0x60, 0x5d, 0xac,
- 0xad, 0x9e, 0x1b, 0xbd, 0x11, 0x92, 0x64, 0xa3, 0xb4, 0xa8, 0x7b, 0xa3, 0xb4, 0xb1, 0x43, 0x1b,
- 0x6a, 0xda, 0x90, 0xea, 0xe9, 0x43, 0x9d, 0xd3, 0x3f, 0xe9, 0x83, 0xa3, 0x59, 0xe6, 0x2a, 0xe8,
- 0x73, 0x30, 0xc0, 0x9c, 0xde, 0xa4, 0xe0, 0xec, 0xc5, 0x5e, 0x0d, 0x5d, 0x66, 0x99, 0xdf, 0x9c,
- 0x08, 0x99, 0x3b, 0x2b, 0x8f, 0x23, 0x5e, 0xd8, 0x75, 0x98, 0x45, 0x9b, 0x2c, 0x94, 0x95, 0xb8,
- 0x3d, 0xe5, 0xf1, 0xf1, 0x91, 0x9e, 0x3b, 0x20, 0xee, 0xdf, 0x30, 0x61, 0xf5, 0x25, 0x8b, 0xbb,
- 0x5b, 0x7d, 0xc9, 0x96, 0x51, 0x19, 0x06, 0x6a, 0xdc, 0x9c, 0xa8, 0xd8, 0xfd, 0x08, 0xe3, 0xb6,
- 0x44, 0xea, 0x00, 0x16, 0x36, 0x44, 0x82, 0xc0, 0x8c, 0x0b, 0x23, 0xda, 0xc0, 0x3c, 0xd4, 0xc5,
- 0xb3, 0x45, 0x2f, 0x3e, 0x6d, 0x08, 0x1e, 0xea, 0x02, 0xfa, 0x59, 0xed, 0xee, 0x17, 0xe7, 0xc1,
- 0x87, 0x0d, 0xde, 0xe9, 0x54, 0xc2, 0x15, 0x31, 0xb1, 0xaf, 0x18, 0x2f, 0x55, 0x35, 0x63, 0xcd,
- 0xe7, 0x26, 0xcc, 0x32, 0x2f, 0xfc, 0xce, 0xf1, 0xe5, 0xed, 0x9f, 0xb3, 0x20, 0xe1, 0x2c, 0xa6,
- 0xc4, 0x9d, 0x56, 0xae, 0xb8, 0xf3, 0x2c, 0xf4, 0x05, 0x7e, 0x43, 0xf2, 0x53, 0x0a, 0x03, 0xfb,
- 0x0d, 0x82, 0x19, 0x84, 0x62, 0x44, 0xb1, 0x10, 0x6b, 0x54, 0x7f, 0xa0, 0x8b, 0xa7, 0xf7, 0x63,
- 0xd0, 0xdf, 0x20, 0xdb, 0xa4, 0x91, 0xcc, 0x1b, 0x7b, 0x8d, 0x16, 0x62, 0x0e, 0xb3, 0x7f, 0xaf,
- 0x0f, 0x4e, 0x77, 0x8c, 0x78, 0x47, 0x19, 0xcc, 0x0d, 0x27, 0x22, 0x77, 0x9c, 0x9d, 0x64, 0xbe,
- 0xc4, 0xcb, 0xbc, 0x18, 0x4b, 0x38, 0x73, 0xdc, 0xe6, 0x39, 0x80, 0x12, 0xc2, 0x61, 0x91, 0xfa,
- 0x47, 0x40, 0x4d, 0x61, 0x63, 0xf1, 0x41, 0x08, 0x1b, 0x9f, 0x07, 0x08, 0xc3, 0x06, 0xb7, 0x09,
- 0xad, 0x0b, 0x8f, 0xf0, 0x38, 0x57, 0x54, 0xf5, 0x9a, 0x80, 0x60, 0x0d, 0x0b, 0x2d, 0xc2, 0x64,
- 0x2b, 0xf0, 0x23, 0x2e, 0x6b, 0x5f, 0xe4, 0x66, 0xd3, 0xfd, 0x66, 0xb0, 0xb1, 0x4a, 0x02, 0x8e,
- 0x53, 0x35, 0xd0, 0x4b, 0x30, 0x22, 0x02, 0x90, 0x55, 0x7c, 0xbf, 0x21, 0xc4, 0x7b, 0xca, 0x92,
- 0xb8, 0x1a, 0x83, 0xb0, 0x8e, 0xa7, 0x55, 0x63, 0x02, 0xfc, 0xc1, 0xcc, 0x6a, 0x5c, 0x88, 0xaf,
- 0xe1, 0x25, 0x92, 0x15, 0x0c, 0xf5, 0x94, 0xac, 0x20, 0x16, 0x78, 0x0e, 0xf7, 0xac, 0x4f, 0x86,
- 0xae, 0x22, 0xc2, 0xaf, 0xf5, 0xc1, 0x11, 0xb1, 0x70, 0x1e, 0xf6, 0x72, 0xb9, 0x91, 0x5e, 0x2e,
- 0x0f, 0x42, 0x24, 0xfa, 0xc1, 0x9a, 0x39, 0xec, 0x35, 0xf3, 0x93, 0x16, 0x98, 0x3c, 0x24, 0xfa,
- 0x8f, 0x72, 0x13, 0xce, 0xbe, 0x94, 0xcb, 0x93, 0xc6, 0x91, 0xcc, 0xdf, 0x5b, 0xea, 0x59, 0xfb,
- 0x7f, 0xb1, 0xe0, 0xd1, 0xae, 0x14, 0xd1, 0x12, 0x0c, 0x33, 0x46, 0x57, 0x7b, 0x17, 0x3f, 0xa9,
- 0xdc, 0x2a, 0x24, 0x20, 0x87, 0xef, 0x8e, 0x6b, 0xa2, 0xa5, 0x54, 0x66, 0xdf, 0xa7, 0x32, 0x32,
- 0xfb, 0x1e, 0x33, 0x86, 0xe7, 0x3e, 0x53, 0xfb, 0x7e, 0x89, 0xde, 0x38, 0xa6, 0x6f, 0xe6, 0x47,
- 0x0c, 0x71, 0xae, 0x9d, 0x10, 0xe7, 0x22, 0x13, 0x5b, 0xbb, 0x43, 0xde, 0x80, 0x49, 0x16, 0x99,
- 0x94, 0x39, 0xf9, 0x08, 0xa7, 0xce, 0x42, 0x6c, 0xc8, 0x7f, 0x2d, 0x01, 0xc3, 0x29, 0x6c, 0xfb,
- 0x1f, 0x8a, 0x30, 0xc0, 0xb7, 0xdf, 0x21, 0x3c, 0x7c, 0x9f, 0x81, 0x61, 0xb7, 0xd9, 0x6c, 0xf3,
- 0x64, 0xad, 0xfd, 0xb1, 0x59, 0x78, 0x59, 0x16, 0xe2, 0x18, 0x8e, 0x96, 0x85, 0x26, 0xa1, 0x43,
- 0xf0, 0x73, 0xde, 0xf1, 0xd9, 0x45, 0x27, 0x72, 0x38, 0x17, 0xa7, 0xee, 0xd9, 0x58, 0xe7, 0x80,
- 0x3e, 0x0d, 0x10, 0x46, 0x81, 0xeb, 0x6d, 0xd0, 0x32, 0x91, 0x21, 0xe3, 0xe9, 0x0e, 0xd4, 0xaa,
- 0x0a, 0x99, 0xd3, 0x8c, 0xcf, 0x1c, 0x05, 0xc0, 0x1a, 0x45, 0x34, 0x6b, 0xdc, 0xf4, 0x33, 0x89,
- 0xb9, 0x03, 0x4e, 0x35, 0x9e, 0xb3, 0x99, 0x97, 0x61, 0x58, 0x11, 0xef, 0x26, 0x57, 0x1c, 0xd5,
- 0x19, 0xb6, 0x8f, 0xc1, 0x44, 0xa2, 0x6f, 0x07, 0x12, 0x4b, 0xfe, 0xbe, 0x05, 0x13, 0xbc, 0x33,
- 0x4b, 0xde, 0xb6, 0xb8, 0x0d, 0xee, 0xc1, 0xd1, 0x46, 0xc6, 0xa9, 0x2c, 0xa6, 0xbf, 0xf7, 0x53,
- 0x5c, 0x89, 0x21, 0xb3, 0xa0, 0x38, 0xb3, 0x0d, 0x74, 0x9e, 0xee, 0x38, 0x7a, 0xea, 0x3a, 0x0d,
- 0x11, 0x99, 0x64, 0x94, 0xef, 0x36, 0x5e, 0x86, 0x15, 0xd4, 0xfe, 0x5b, 0x0b, 0xa6, 0x78, 0xcf,
- 0xaf, 0x92, 0x1d, 0x75, 0x36, 0x7d, 0x27, 0xfb, 0x2e, 0xd2, 0x84, 0x17, 0x72, 0xd2, 0x84, 0xeb,
- 0x9f, 0x56, 0xec, 0xf8, 0x69, 0x5f, 0xb5, 0x40, 0xac, 0x90, 0x43, 0x90, 0xb4, 0x7c, 0x9f, 0x29,
- 0x69, 0x99, 0xc9, 0xdf, 0x04, 0x39, 0x22, 0x96, 0x7f, 0xb3, 0x60, 0x92, 0x23, 0xc4, 0x56, 0x10,
- 0xdf, 0xd1, 0x79, 0x98, 0x37, 0xbf, 0x28, 0xd3, 0xac, 0xf5, 0x2a, 0xd9, 0x59, 0xf3, 0x2b, 0x4e,
- 0xb4, 0x99, 0xfd, 0x51, 0xc6, 0x64, 0xf5, 0x75, 0x9c, 0xac, 0xba, 0xdc, 0x40, 0x46, 0x42, 0xc8,
- 0x2e, 0x02, 0xe0, 0x83, 0x26, 0x84, 0xb4, 0xff, 0xd1, 0x02, 0xc4, 0x9b, 0x31, 0x18, 0x37, 0xca,
- 0x0e, 0xb1, 0x52, 0xed, 0xa2, 0x8b, 0x8f, 0x26, 0x05, 0xc1, 0x1a, 0xd6, 0x03, 0x19, 0x9e, 0x84,
- 0x29, 0x4b, 0xb1, 0xbb, 0x29, 0xcb, 0x01, 0x46, 0xf4, 0xab, 0x83, 0x90, 0x74, 0xeb, 0x44, 0x37,
- 0x61, 0xb4, 0xe6, 0xb4, 0x9c, 0xdb, 0x6e, 0xc3, 0x8d, 0x5c, 0x12, 0x76, 0xb2, 0x73, 0x5b, 0xd0,
- 0xf0, 0x84, 0xf1, 0x81, 0x56, 0x82, 0x0d, 0x3a, 0x68, 0x16, 0xa0, 0x15, 0xb8, 0xdb, 0x6e, 0x83,
- 0x6c, 0x30, 0x81, 0x10, 0x8b, 0x85, 0xc4, 0x8d, 0xee, 0x64, 0x29, 0xd6, 0x30, 0x32, 0x42, 0x90,
- 0x14, 0x1f, 0x72, 0x08, 0x12, 0x38, 0xb4, 0x10, 0x24, 0x7d, 0x07, 0x0a, 0x41, 0x32, 0x74, 0xe0,
- 0x10, 0x24, 0xfd, 0x3d, 0x85, 0x20, 0xc1, 0x70, 0x5c, 0xf2, 0x9e, 0xf4, 0xff, 0xb2, 0xdb, 0x20,
- 0xe2, 0xc1, 0xc1, 0x03, 0x38, 0xcd, 0xec, 0xed, 0x96, 0x8e, 0xe3, 0x4c, 0x0c, 0x9c, 0x53, 0x13,
- 0x7d, 0x1c, 0xa6, 0x9d, 0x46, 0xc3, 0xbf, 0xa3, 0x26, 0x75, 0x29, 0xac, 0x39, 0x8d, 0x38, 0xae,
- 0xdf, 0xd0, 0xfc, 0xa9, 0xbd, 0xdd, 0xd2, 0xf4, 0x5c, 0x0e, 0x0e, 0xce, 0xad, 0x8d, 0x5e, 0x83,
- 0xe1, 0x56, 0xe0, 0xd7, 0x56, 0x34, 0xdf, 0xf3, 0x33, 0x74, 0x00, 0x2b, 0xb2, 0x70, 0x7f, 0xb7,
- 0x34, 0xa6, 0xfe, 0xb0, 0x0b, 0x3f, 0xae, 0x90, 0x11, 0xdd, 0x63, 0xe4, 0x61, 0x47, 0xf7, 0x18,
- 0x7d, 0xc0, 0xd1, 0x3d, 0xec, 0x2d, 0x38, 0x52, 0x25, 0x81, 0xeb, 0x34, 0xdc, 0x7b, 0x94, 0x27,
- 0x97, 0x67, 0xe0, 0x1a, 0x0c, 0x07, 0x89, 0x53, 0xbf, 0xa7, 0xa0, 0xe7, 0x9a, 0x5c, 0x46, 0x9e,
- 0xf2, 0x31, 0x21, 0xfb, 0xff, 0xb7, 0x60, 0x50, 0xb8, 0x8a, 0x1e, 0x02, 0x67, 0x3a, 0x67, 0xa8,
- 0x64, 0x4a, 0xd9, 0x93, 0xc2, 0x3a, 0x93, 0xab, 0x8c, 0x29, 0x27, 0x94, 0x31, 0x8f, 0x76, 0x22,
- 0xd2, 0x59, 0x0d, 0xf3, 0x9f, 0x15, 0xe9, 0x0b, 0xc1, 0x08, 0x5a, 0xf0, 0xf0, 0x87, 0x60, 0x15,
- 0x06, 0x43, 0xe1, 0x34, 0x5f, 0xc8, 0xf7, 0xe5, 0x49, 0x4e, 0x62, 0x6c, 0x03, 0x29, 0xdc, 0xe4,
- 0x25, 0x91, 0x4c, 0x6f, 0xfc, 0xe2, 0x43, 0xf4, 0xc6, 0xef, 0x16, 0xd6, 0xa1, 0xef, 0x41, 0x84,
- 0x75, 0xb0, 0xbf, 0xce, 0x6e, 0x67, 0xbd, 0xfc, 0x10, 0x18, 0xb7, 0xcb, 0xe6, 0x3d, 0x6e, 0x77,
- 0x58, 0x59, 0xa2, 0x53, 0x39, 0x0c, 0xdc, 0xef, 0x5a, 0x70, 0x3a, 0xe3, 0xab, 0x34, 0x6e, 0xee,
- 0x59, 0x18, 0x72, 0xda, 0x75, 0x57, 0xed, 0x65, 0x4d, 0x5b, 0x3c, 0x27, 0xca, 0xb1, 0xc2, 0x40,
- 0x0b, 0x30, 0x45, 0xee, 0xb6, 0x5c, 0xae, 0x86, 0xd7, 0x4d, 0xc7, 0x8b, 0xdc, 0xbf, 0x78, 0x29,
- 0x09, 0xc4, 0x69, 0x7c, 0x15, 0x1a, 0xae, 0x98, 0x1b, 0x1a, 0xee, 0x37, 0x2d, 0x18, 0x51, 0x6e,
- 0xe3, 0x0f, 0x7d, 0xb4, 0xdf, 0x30, 0x47, 0xfb, 0x91, 0x0e, 0xa3, 0x9d, 0x33, 0xcc, 0x7f, 0x53,
- 0x50, 0xfd, 0xad, 0xf8, 0x41, 0xd4, 0x03, 0x97, 0x78, 0xff, 0x6e, 0x2f, 0x17, 0x61, 0xc4, 0x69,
- 0xb5, 0x24, 0x40, 0xda, 0x2f, 0xb2, 0x14, 0x16, 0x71, 0x31, 0xd6, 0x71, 0x94, 0x17, 0x4e, 0x31,
- 0xd7, 0x0b, 0xa7, 0x0e, 0x10, 0x39, 0xc1, 0x06, 0x89, 0x68, 0x99, 0x30, 0xb7, 0xce, 0x3f, 0x6f,
- 0xda, 0x91, 0xdb, 0x98, 0x75, 0xbd, 0x28, 0x8c, 0x82, 0xd9, 0xb2, 0x17, 0x5d, 0x0f, 0xf8, 0x33,
- 0x55, 0x0b, 0xc0, 0xa8, 0x68, 0x61, 0x8d, 0xae, 0x0c, 0x91, 0xc2, 0xda, 0xe8, 0x37, 0x0d, 0x61,
- 0x56, 0x45, 0x39, 0x56, 0x18, 0xf6, 0xcb, 0xec, 0xf6, 0x61, 0x63, 0x7a, 0xb0, 0xc0, 0x82, 0xff,
- 0x34, 0xaa, 0x66, 0x83, 0xa9, 0x84, 0x17, 0xf5, 0xf0, 0x85, 0x9d, 0x0f, 0x7b, 0xda, 0xb0, 0xee,
- 0xcf, 0x1a, 0xc7, 0x38, 0x44, 0x9f, 0x4c, 0x19, 0x37, 0x3d, 0xd7, 0xe5, 0xd6, 0x38, 0x80, 0x39,
- 0x13, 0xcb, 0x67, 0xc7, 0xb2, 0x7d, 0x95, 0x2b, 0x62, 0x5f, 0x68, 0xf9, 0xec, 0x04, 0x00, 0xc7,
- 0x38, 0x94, 0x61, 0x53, 0x7f, 0xc2, 0x69, 0x14, 0x87, 0x3d, 0x57, 0xd8, 0x21, 0xd6, 0x30, 0xd0,
- 0x05, 0x21, 0xb4, 0xe0, 0xba, 0x87, 0x47, 0x12, 0x42, 0x0b, 0x39, 0x5c, 0x9a, 0xa4, 0xe9, 0x22,
- 0x8c, 0x90, 0xbb, 0x11, 0x09, 0x3c, 0xa7, 0x41, 0x5b, 0xe8, 0x8f, 0xa3, 0xeb, 0x2e, 0xc5, 0xc5,
- 0x58, 0xc7, 0x41, 0x6b, 0x30, 0x11, 0x72, 0x59, 0x9e, 0x4a, 0xb6, 0xc1, 0x65, 0xa2, 0x4f, 0x2b,
- 0x87, 0x7d, 0x13, 0xbc, 0xcf, 0x8a, 0xf8, 0xe9, 0x24, 0xc3, 0x98, 0x24, 0x49, 0xa0, 0xd7, 0x61,
- 0xbc, 0xe1, 0x3b, 0xf5, 0x79, 0xa7, 0xe1, 0x78, 0x35, 0x36, 0x3e, 0x43, 0x46, 0x2c, 0xcb, 0xf1,
- 0x6b, 0x06, 0x14, 0x27, 0xb0, 0x29, 0x83, 0xa8, 0x97, 0x88, 0x04, 0x31, 0x8e, 0xb7, 0x41, 0xc2,
- 0xe9, 0x61, 0xf6, 0x55, 0x8c, 0x41, 0xbc, 0x96, 0x83, 0x83, 0x73, 0x6b, 0xa3, 0x4b, 0x30, 0x2a,
- 0x3f, 0x5f, 0x8b, 0xfa, 0x13, 0x3b, 0x34, 0x69, 0x30, 0x6c, 0x60, 0xa2, 0x10, 0x8e, 0xc9, 0xff,
- 0x6b, 0x81, 0xb3, 0xbe, 0xee, 0xd6, 0x44, 0x28, 0x0c, 0xee, 0xfc, 0xfd, 0x31, 0xe9, 0x69, 0xba,
- 0x94, 0x85, 0xb4, 0xbf, 0x5b, 0x3a, 0x25, 0x46, 0x2d, 0x13, 0x8e, 0xb3, 0x69, 0xa3, 0x15, 0x38,
- 0xc2, 0x6d, 0x60, 0x16, 0x36, 0x49, 0x6d, 0x4b, 0x6e, 0x38, 0xc6, 0x35, 0x6a, 0x8e, 0x3f, 0x57,
- 0xd2, 0x28, 0x38, 0xab, 0x1e, 0x7a, 0x07, 0xa6, 0x5b, 0xed, 0xdb, 0x0d, 0x37, 0xdc, 0x5c, 0xf5,
- 0x23, 0x66, 0x42, 0x36, 0x57, 0xaf, 0x07, 0x24, 0xe4, 0xbe, 0xc1, 0xec, 0xea, 0x95, 0x91, 0x9a,
- 0x2a, 0x39, 0x78, 0x38, 0x97, 0x02, 0xba, 0x07, 0xc7, 0x12, 0x0b, 0x41, 0x84, 0x5c, 0x19, 0xcf,
- 0x4f, 0xb5, 0x55, 0xcd, 0xaa, 0x20, 0xa2, 0x17, 0x65, 0x81, 0x70, 0x76, 0x13, 0xe8, 0x15, 0x00,
- 0xb7, 0xb5, 0xec, 0x34, 0xdd, 0x06, 0x7d, 0x8e, 0x1e, 0x61, 0x6b, 0x84, 0x3e, 0x4d, 0xa0, 0x5c,
- 0x91, 0xa5, 0xf4, 0x6c, 0x16, 0xff, 0x76, 0xb0, 0x86, 0x8d, 0xae, 0xc1, 0xb8, 0xf8, 0xb7, 0x23,
- 0xa6, 0x74, 0x4a, 0x65, 0x65, 0x1d, 0x97, 0x35, 0xd4, 0x3c, 0x26, 0x4a, 0x70, 0xa2, 0x2e, 0xda,
- 0x80, 0xd3, 0x32, 0x25, 0xac, 0xbe, 0x3e, 0xe5, 0x1c, 0x84, 0x2c, 0xbf, 0xd5, 0x10, 0xf7, 0x29,
- 0x9a, 0xeb, 0x84, 0x88, 0x3b, 0xd3, 0xa1, 0xf7, 0xba, 0xbe, 0xcc, 0xb9, 0xc7, 0xf8, 0xb1, 0x38,
- 0x22, 0xe8, 0xb5, 0x24, 0x10, 0xa7, 0xf1, 0x91, 0x0f, 0xc7, 0x5c, 0x2f, 0x6b, 0x55, 0x1f, 0x67,
- 0x84, 0x3e, 0xca, 0x9d, 0xe5, 0x3b, 0xaf, 0xe8, 0x4c, 0x38, 0xce, 0xa6, 0x8b, 0xca, 0x70, 0x24,
- 0xe2, 0x05, 0x8b, 0x6e, 0xc8, 0xd3, 0xe7, 0xd0, 0x67, 0xdf, 0x09, 0xd6, 0xdc, 0x09, 0xba, 0x9a,
- 0xd7, 0xd2, 0x60, 0x9c, 0x55, 0xe7, 0xbd, 0x19, 0x80, 0x7e, 0xc3, 0xa2, 0xb5, 0x35, 0x46, 0x1f,
- 0x7d, 0x06, 0x46, 0xf5, 0xf1, 0x11, 0x4c, 0xcb, 0xb9, 0x6c, 0x3e, 0x58, 0x3b, 0x5e, 0xf8, 0x33,
- 0x41, 0x1d, 0x21, 0x3a, 0x0c, 0x1b, 0x14, 0x51, 0x2d, 0x23, 0xc8, 0xc5, 0x85, 0xde, 0x98, 0xa2,
- 0xde, 0xed, 0x1f, 0x09, 0x64, 0xef, 0x1c, 0x74, 0x0d, 0x86, 0x6a, 0x0d, 0x97, 0x78, 0x51, 0xb9,
- 0xd2, 0x29, 0x50, 0xeb, 0x82, 0xc0, 0x11, 0x5b, 0x51, 0x64, 0xbd, 0xe2, 0x65, 0x58, 0x51, 0xb0,
- 0x2f, 0xc1, 0x48, 0xb5, 0x41, 0x48, 0x8b, 0xfb, 0x71, 0xa1, 0xa7, 0xd8, 0xc3, 0x84, 0xb1, 0x96,
- 0x16, 0x63, 0x2d, 0xf5, 0x37, 0x07, 0x63, 0x2a, 0x25, 0xdc, 0xfe, 0xb3, 0x02, 0x94, 0xba, 0x24,
- 0x5f, 0x4b, 0xe8, 0xdb, 0xac, 0x9e, 0xf4, 0x6d, 0x73, 0x30, 0x11, 0xff, 0xd3, 0x45, 0x79, 0xca,
- 0x18, 0xfa, 0xa6, 0x09, 0xc6, 0x49, 0xfc, 0x9e, 0xfd, 0x5a, 0x74, 0x95, 0x5d, 0x5f, 0x57, 0xcf,
- 0x2c, 0x43, 0x55, 0xdf, 0xdf, 0xfb, 0xdb, 0x3b, 0x57, 0xed, 0x6a, 0x7f, 0xbd, 0x00, 0xc7, 0xd4,
- 0x10, 0x7e, 0xef, 0x0e, 0xdc, 0x8d, 0xf4, 0xc0, 0x3d, 0x00, 0xa5, 0xb5, 0x7d, 0x1d, 0x06, 0x78,
- 0xf4, 0xd8, 0x1e, 0x78, 0xfe, 0xc7, 0xcc, 0x40, 0xfe, 0x8a, 0xcd, 0x34, 0x82, 0xf9, 0xff, 0x98,
- 0x05, 0x13, 0x09, 0x07, 0x49, 0x84, 0x35, 0x2f, 0xfa, 0xfb, 0xe1, 0xcb, 0xb3, 0x38, 0xfe, 0xb3,
- 0xd0, 0xb7, 0xe9, 0x2b, 0x23, 0x65, 0x85, 0x71, 0xc5, 0x0f, 0x23, 0xcc, 0x20, 0xf6, 0xdf, 0x59,
- 0xd0, 0xbf, 0xe6, 0xb8, 0x5e, 0x24, 0xb5, 0x1f, 0x56, 0x8e, 0xf6, 0xa3, 0x97, 0xef, 0x42, 0x2f,
- 0xc1, 0x00, 0x59, 0x5f, 0x27, 0xb5, 0x48, 0xcc, 0xaa, 0x8c, 0xa6, 0x31, 0xb0, 0xc4, 0x4a, 0x29,
- 0x13, 0xca, 0x1a, 0xe3, 0x7f, 0xb1, 0x40, 0x46, 0xb7, 0x60, 0x38, 0x72, 0x9b, 0x64, 0xae, 0x5e,
- 0x17, 0x36, 0x01, 0xf7, 0x11, 0x02, 0x66, 0x4d, 0x12, 0xc0, 0x31, 0x2d, 0xfb, 0xcb, 0x05, 0x80,
- 0x38, 0x5a, 0x5d, 0xb7, 0x4f, 0x9c, 0x4f, 0x69, 0x8b, 0xcf, 0x65, 0x68, 0x8b, 0x51, 0x4c, 0x30,
- 0x43, 0x55, 0xac, 0x86, 0xa9, 0xd8, 0xd3, 0x30, 0xf5, 0x1d, 0x64, 0x98, 0x16, 0x60, 0x2a, 0x8e,
- 0xb6, 0x67, 0x06, 0x1b, 0x65, 0xf7, 0xf7, 0x5a, 0x12, 0x88, 0xd3, 0xf8, 0x36, 0x81, 0xb3, 0x2a,
- 0xe8, 0x98, 0xb8, 0x0b, 0x99, 0x2b, 0x81, 0xae, 0x7d, 0xef, 0x32, 0x4e, 0xb1, 0x3a, 0xbc, 0x90,
- 0xab, 0x0e, 0xff, 0x45, 0x0b, 0x8e, 0x26, 0xdb, 0x61, 0x7e, 0xf7, 0x5f, 0xb4, 0xe0, 0x58, 0x9c,
- 0x7b, 0x28, 0x6d, 0x82, 0xf0, 0x62, 0xc7, 0x40, 0x6a, 0x39, 0x3d, 0x8e, 0xc3, 0xb6, 0xac, 0x64,
- 0x91, 0xc6, 0xd9, 0x2d, 0xda, 0xff, 0x5f, 0x1f, 0x4c, 0xe7, 0x45, 0x60, 0x63, 0x9e, 0x46, 0xce,
- 0xdd, 0xea, 0x16, 0xb9, 0x23, 0xfc, 0x39, 0x62, 0x4f, 0x23, 0x5e, 0x8c, 0x25, 0x3c, 0x99, 0x6e,
- 0xaa, 0xd0, 0x63, 0xba, 0xa9, 0x4d, 0x98, 0xba, 0xb3, 0x49, 0xbc, 0x1b, 0x5e, 0xe8, 0x44, 0x6e,
- 0xb8, 0xee, 0x32, 0x05, 0x3a, 0x5f, 0x37, 0xaf, 0x48, 0xaf, 0x8b, 0x5b, 0x49, 0x84, 0xfd, 0xdd,
- 0xd2, 0x69, 0xa3, 0x20, 0xee, 0x32, 0x3f, 0x48, 0x70, 0x9a, 0x68, 0x3a, 0x5b, 0x57, 0xdf, 0x43,
- 0xce, 0xd6, 0xd5, 0x74, 0x85, 0xd9, 0x8d, 0x74, 0x23, 0x61, 0xcf, 0xd6, 0x15, 0x55, 0x8a, 0x35,
- 0x0c, 0xf4, 0x29, 0x40, 0x7a, 0xba, 0x45, 0x23, 0x00, 0xee, 0x73, 0x7b, 0xbb, 0x25, 0xb4, 0x9a,
- 0x82, 0xee, 0xef, 0x96, 0x8e, 0xd0, 0xd2, 0xb2, 0x47, 0x9f, 0xbf, 0x71, 0xd4, 0xc0, 0x0c, 0x42,
- 0xe8, 0x16, 0x4c, 0xd2, 0x52, 0xb6, 0xa3, 0x64, 0x74, 0x5d, 0xfe, 0x64, 0x7d, 0x66, 0x6f, 0xb7,
- 0x34, 0xb9, 0x9a, 0x80, 0xe5, 0x91, 0x4e, 0x11, 0xc9, 0x48, 0xda, 0x35, 0xd4, 0x6b, 0xd2, 0x2e,
- 0xfb, 0x8b, 0x16, 0x9c, 0xa4, 0x17, 0x5c, 0xfd, 0x5a, 0x8e, 0x16, 0xdd, 0x69, 0xb9, 0x5c, 0x4f,
- 0x23, 0xae, 0x1a, 0x26, 0xab, 0xab, 0x94, 0xb9, 0x96, 0x46, 0x41, 0xe9, 0x09, 0xbf, 0xe5, 0x7a,
- 0xf5, 0xe4, 0x09, 0x7f, 0xd5, 0xf5, 0xea, 0x98, 0x41, 0xd4, 0x95, 0x55, 0xcc, 0x8d, 0xd6, 0xff,
- 0x35, 0xba, 0x57, 0x69, 0x5f, 0xbe, 0xa3, 0xdd, 0x40, 0xcf, 0xe8, 0x3a, 0x55, 0x61, 0x3e, 0x99,
- 0xab, 0x4f, 0xfd, 0x82, 0x05, 0xc2, 0xfb, 0xbd, 0x87, 0x3b, 0xf9, 0x6d, 0x18, 0xdd, 0x4e, 0xa7,
- 0xa2, 0x3d, 0x9b, 0x1f, 0x0e, 0x40, 0x24, 0xa0, 0x55, 0x2c, 0xba, 0x91, 0x76, 0xd6, 0xa0, 0x65,
- 0xd7, 0x41, 0x40, 0x17, 0x09, 0xd3, 0x6a, 0x74, 0xef, 0xcd, 0xf3, 0x00, 0x75, 0x86, 0xcb, 0xf2,
- 0xd3, 0x17, 0x4c, 0x8e, 0x6b, 0x51, 0x41, 0xb0, 0x86, 0x65, 0xff, 0x7a, 0x11, 0x46, 0x64, 0xea,
- 0xd3, 0xb6, 0xd7, 0x8b, 0xec, 0x51, 0x67, 0x9c, 0x0a, 0x5d, 0x19, 0xa7, 0x77, 0x60, 0x2a, 0x20,
- 0xb5, 0x76, 0x10, 0xba, 0xdb, 0x44, 0x82, 0xc5, 0x26, 0x99, 0xe5, 0xc9, 0x22, 0x12, 0xc0, 0x7d,
- 0x16, 0x22, 0x2b, 0x51, 0xc8, 0x94, 0xc6, 0x69, 0x42, 0xe8, 0x02, 0x0c, 0x33, 0xd1, 0x7b, 0x25,
- 0x16, 0x08, 0x2b, 0xc1, 0xd7, 0x8a, 0x04, 0xe0, 0x18, 0x87, 0x3d, 0x0e, 0xda, 0xb7, 0x19, 0x7a,
- 0xc2, 0x13, 0xbc, 0xca, 0x8b, 0xb1, 0x84, 0xa3, 0x8f, 0xc3, 0x24, 0xaf, 0x17, 0xf8, 0x2d, 0x67,
- 0x83, 0xab, 0x04, 0xfb, 0x55, 0x78, 0x9d, 0xc9, 0x95, 0x04, 0x6c, 0x7f, 0xb7, 0x74, 0x34, 0x59,
- 0xc6, 0xba, 0x9d, 0xa2, 0xc2, 0x2c, 0xff, 0x78, 0x23, 0xf4, 0xce, 0x48, 0x19, 0x0c, 0xc6, 0x20,
- 0xac, 0xe3, 0xd9, 0xff, 0x6a, 0xc1, 0x94, 0x36, 0x55, 0x3d, 0xe7, 0xeb, 0x30, 0x06, 0xa9, 0xd0,
- 0xc3, 0x20, 0x1d, 0x2c, 0xda, 0x43, 0xe6, 0x0c, 0xf7, 0x3d, 0xa0, 0x19, 0xb6, 0x3f, 0x03, 0x28,
- 0x9d, 0x57, 0x17, 0xbd, 0xc9, 0x0d, 0xf9, 0xdd, 0x80, 0xd4, 0x3b, 0x29, 0xfc, 0xf5, 0xc8, 0x39,
- 0xd2, 0x73, 0x95, 0xd7, 0xc2, 0xaa, 0xbe, 0xfd, 0xe3, 0x7d, 0x30, 0x99, 0x8c, 0xd5, 0x81, 0xae,
- 0xc0, 0x00, 0xe7, 0xd2, 0x05, 0xf9, 0x0e, 0xf6, 0x64, 0x5a, 0x84, 0x0f, 0x9e, 0x4b, 0x87, 0x73,
- 0xf7, 0xa2, 0x3e, 0x7a, 0x07, 0x46, 0xea, 0xfe, 0x1d, 0xef, 0x8e, 0x13, 0xd4, 0xe7, 0x2a, 0x65,
- 0x71, 0x42, 0x64, 0x0a, 0xa0, 0x16, 0x63, 0x34, 0x3d, 0x6a, 0x08, 0xb3, 0x9d, 0x88, 0x41, 0x58,
- 0x27, 0x87, 0xd6, 0x58, 0x7a, 0xa7, 0x75, 0x77, 0x63, 0xc5, 0x69, 0x75, 0xf2, 0xea, 0x5a, 0x90,
- 0x48, 0x1a, 0xe5, 0x31, 0x91, 0x03, 0x8a, 0x03, 0x70, 0x4c, 0x08, 0x7d, 0x0e, 0x8e, 0x84, 0x39,
- 0x2a, 0xb1, 0xbc, 0x34, 0xeb, 0x9d, 0xb4, 0x44, 0x5c, 0x98, 0x92, 0xa5, 0x3c, 0xcb, 0x6a, 0x06,
- 0xdd, 0x05, 0x24, 0x44, 0xcf, 0x6b, 0x41, 0x3b, 0x8c, 0xe6, 0xdb, 0x5e, 0xbd, 0x21, 0xd3, 0x3f,
- 0x7d, 0x38, 0x5b, 0x4e, 0x90, 0xc4, 0xd6, 0xda, 0x66, 0xe1, 0x85, 0xd3, 0x18, 0x38, 0xa3, 0x0d,
- 0xfb, 0x0b, 0x7d, 0x30, 0x23, 0x13, 0x59, 0x67, 0x78, 0xaf, 0x7c, 0xde, 0x4a, 0xb8, 0xaf, 0xbc,
- 0x92, 0x7f, 0xd0, 0x3f, 0x34, 0x27, 0x96, 0x2f, 0xa5, 0x9d, 0x58, 0x5e, 0x3b, 0x60, 0x37, 0x1e,
- 0x98, 0x2b, 0xcb, 0xf7, 0xac, 0xff, 0xc9, 0xde, 0x51, 0x30, 0xae, 0x66, 0x84, 0x79, 0xec, 0xf6,
- 0x8a, 0x54, 0x1d, 0xe5, 0x3c, 0xff, 0xaf, 0x08, 0x1c, 0xe3, 0xb2, 0x1f, 0x95, 0x11, 0xde, 0xd9,
- 0x39, 0xab, 0xe8, 0x50, 0x9a, 0xa4, 0xd9, 0x8a, 0x76, 0x16, 0xdd, 0x40, 0xf4, 0x38, 0x93, 0xe6,
- 0x92, 0xc0, 0x49, 0xd3, 0x94, 0x10, 0xac, 0xe8, 0xa0, 0x6d, 0x98, 0xda, 0x60, 0x11, 0x9f, 0xb4,
- 0x9c, 0xd2, 0xe2, 0x5c, 0xc8, 0xdc, 0xb7, 0x97, 0x17, 0x96, 0xf2, 0x13, 0x50, 0xf3, 0xc7, 0x5f,
- 0x0a, 0x05, 0xa7, 0x9b, 0xa0, 0x5b, 0xe3, 0xa8, 0x73, 0x27, 0x5c, 0x6a, 0x38, 0x61, 0xe4, 0xd6,
- 0xe6, 0x1b, 0x7e, 0x6d, 0xab, 0x1a, 0xf9, 0x81, 0x4c, 0x16, 0x99, 0xf9, 0xf6, 0x9a, 0xbb, 0x55,
- 0x4d, 0xe1, 0x1b, 0xcd, 0x4f, 0xef, 0xed, 0x96, 0x8e, 0x66, 0x61, 0xe1, 0xcc, 0xb6, 0xd0, 0x2a,
- 0x0c, 0x6e, 0xb8, 0x11, 0x26, 0x2d, 0x5f, 0x9c, 0x16, 0x99, 0x47, 0xe1, 0x65, 0x8e, 0x62, 0xb4,
- 0xc4, 0x22, 0x52, 0x09, 0x00, 0x96, 0x44, 0xd0, 0x9b, 0xea, 0x12, 0x18, 0xc8, 0x17, 0xc0, 0xa6,
- 0x6d, 0xef, 0x32, 0xaf, 0x81, 0xd7, 0xa1, 0xe8, 0xad, 0x87, 0x9d, 0x62, 0xf1, 0xac, 0x2e, 0x1b,
- 0xf2, 0xb3, 0xf9, 0x41, 0xfa, 0x34, 0x5e, 0x5d, 0xae, 0x62, 0x5a, 0x91, 0xb9, 0xbd, 0x86, 0xb5,
- 0xd0, 0x15, 0x89, 0xa7, 0x32, 0xbd, 0x80, 0xcb, 0xd5, 0x85, 0x6a, 0xd9, 0xa0, 0xc1, 0xa2, 0x1a,
- 0xb2, 0x62, 0xcc, 0xab, 0xa3, 0x9b, 0x30, 0xbc, 0xc1, 0x0f, 0xbe, 0xf5, 0x50, 0x24, 0xb3, 0xcf,
- 0xbc, 0x8c, 0x2e, 0x4b, 0x24, 0x83, 0x1e, 0xbb, 0x32, 0x14, 0x08, 0xc7, 0xa4, 0xd0, 0x17, 0x2c,
- 0x38, 0xd6, 0x4a, 0x48, 0x50, 0x99, 0xb3, 0x9a, 0x30, 0x53, 0xcb, 0x74, 0x00, 0xa8, 0x64, 0x55,
- 0x30, 0x1a, 0x64, 0xea, 0x97, 0x4c, 0x34, 0x9c, 0xdd, 0x1c, 0x1d, 0xe8, 0xe0, 0x76, 0xbd, 0x53,
- 0xae, 0xa2, 0x44, 0x60, 0x22, 0x3e, 0xd0, 0x78, 0x7e, 0x11, 0xd3, 0x8a, 0x68, 0x0d, 0x60, 0xbd,
- 0x41, 0x44, 0xc4, 0x47, 0x61, 0x14, 0x95, 0x79, 0xfb, 0x2f, 0x2b, 0x2c, 0x41, 0x87, 0xbd, 0x44,
- 0xe3, 0x52, 0xac, 0xd1, 0xa1, 0x4b, 0xa9, 0xe6, 0x7a, 0x75, 0x12, 0x30, 0xe5, 0x56, 0xce, 0x52,
- 0x5a, 0x60, 0x18, 0xe9, 0xa5, 0xc4, 0xcb, 0xb1, 0xa0, 0xc0, 0x68, 0x91, 0xd6, 0xe6, 0x7a, 0xd8,
- 0x29, 0x2b, 0xc6, 0x02, 0x69, 0x6d, 0x26, 0x16, 0x14, 0xa7, 0xc5, 0xca, 0xb1, 0xa0, 0x40, 0xb7,
- 0xcc, 0x3a, 0xdd, 0x40, 0x24, 0x98, 0x9e, 0xc8, 0xdf, 0x32, 0xcb, 0x1c, 0x25, 0xbd, 0x65, 0x04,
- 0x00, 0x4b, 0x22, 0xe8, 0xd3, 0x26, 0xb7, 0x33, 0xc9, 0x68, 0x3e, 0xd3, 0x85, 0xdb, 0x31, 0xe8,
- 0x76, 0xe6, 0x77, 0x5e, 0x81, 0xc2, 0x7a, 0x8d, 0x29, 0xc5, 0x72, 0x74, 0x06, 0xcb, 0x0b, 0x06,
- 0x35, 0x16, 0x65, 0x7e, 0x79, 0x01, 0x17, 0xd6, 0x6b, 0x74, 0xe9, 0x3b, 0xf7, 0xda, 0x01, 0x59,
- 0x76, 0x1b, 0x44, 0x64, 0xc8, 0xc8, 0x5c, 0xfa, 0x73, 0x12, 0x29, 0xbd, 0xf4, 0x15, 0x08, 0xc7,
- 0xa4, 0x28, 0xdd, 0x98, 0x07, 0x3b, 0x92, 0x4f, 0x57, 0xb1, 0x5a, 0x69, 0xba, 0x99, 0x5c, 0xd8,
- 0x16, 0x8c, 0x6d, 0x87, 0xad, 0x4d, 0x22, 0x4f, 0x45, 0xa6, 0xae, 0xcb, 0x89, 0x54, 0x71, 0x53,
- 0x20, 0xba, 0x41, 0xd4, 0x76, 0x1a, 0xa9, 0x83, 0x9c, 0x89, 0x56, 0x6e, 0xea, 0xc4, 0xb0, 0x49,
- 0x9b, 0x2e, 0x84, 0x77, 0x79, 0x38, 0x39, 0xa6, 0xb8, 0xcb, 0x59, 0x08, 0x19, 0x11, 0xe7, 0xf8,
- 0x42, 0x10, 0x00, 0x2c, 0x89, 0xa8, 0xc1, 0x66, 0x17, 0xd0, 0xf1, 0x2e, 0x83, 0x9d, 0xea, 0x6f,
- 0x3c, 0xd8, 0xec, 0xc2, 0x89, 0x49, 0xb1, 0x8b, 0xa6, 0xb5, 0xe9, 0x47, 0xbe, 0x97, 0xb8, 0xe4,
- 0x4e, 0xe4, 0x5f, 0x34, 0x95, 0x0c, 0xfc, 0xf4, 0x45, 0x93, 0x85, 0x85, 0x33, 0xdb, 0xa2, 0x1f,
- 0xd7, 0x92, 0x91, 0x01, 0x45, 0x16, 0x8f, 0xa7, 0x72, 0x02, 0x6b, 0xa6, 0xc3, 0x07, 0xf2, 0x8f,
- 0x53, 0x20, 0x1c, 0x93, 0x42, 0x75, 0x18, 0x6f, 0x19, 0x11, 0x67, 0x59, 0x36, 0x92, 0x1c, 0xbe,
- 0x20, 0x2b, 0x36, 0x2d, 0x97, 0x10, 0x99, 0x10, 0x9c, 0xa0, 0xc9, 0x2c, 0xf7, 0xb8, 0xab, 0x1f,
- 0x4b, 0x56, 0x92, 0x33, 0xd5, 0x19, 0xde, 0x80, 0x7c, 0xaa, 0x05, 0x00, 0x4b, 0x22, 0x74, 0x34,
- 0x84, 0x83, 0x9a, 0x1f, 0xb2, 0x9c, 0x3f, 0x79, 0x0a, 0xf6, 0x2c, 0x35, 0x91, 0x0c, 0xb3, 0x2e,
- 0x40, 0x38, 0x26, 0x45, 0x4f, 0x72, 0x7a, 0xe1, 0x9d, 0xca, 0x3f, 0xc9, 0x93, 0xd7, 0x1d, 0x3b,
- 0xc9, 0xe9, 0x65, 0x57, 0x14, 0x57, 0x9d, 0x8a, 0x0a, 0xce, 0xf2, 0x95, 0xe4, 0xf4, 0x4b, 0x85,
- 0x15, 0x4f, 0xf7, 0x4b, 0x81, 0x70, 0x4c, 0x8a, 0x5d, 0xc5, 0x2c, 0x34, 0xdd, 0x99, 0x0e, 0x57,
- 0x31, 0x45, 0xc8, 0xb8, 0x8a, 0xb5, 0xd0, 0x75, 0xf6, 0x8f, 0x17, 0xe0, 0x4c, 0xe7, 0x7d, 0x1b,
- 0xeb, 0xd0, 0x2a, 0xb1, 0xcd, 0x52, 0x42, 0x87, 0xc6, 0x25, 0x3a, 0x31, 0x56, 0xcf, 0x01, 0x87,
- 0x2f, 0xc3, 0x94, 0x72, 0x47, 0x6c, 0xb8, 0xb5, 0x1d, 0x2d, 0x49, 0xa9, 0x0a, 0xcd, 0x53, 0x4d,
- 0x22, 0xe0, 0x74, 0x1d, 0x34, 0x07, 0x13, 0x46, 0x61, 0x79, 0x51, 0x3c, 0xff, 0xe3, 0x4c, 0x1b,
- 0x26, 0x18, 0x27, 0xf1, 0xed, 0xdf, 0xb0, 0xe0, 0x44, 0x4e, 0xfe, 0xfb, 0x9e, 0xe3, 0xe9, 0xae,
- 0xc3, 0x44, 0xcb, 0xac, 0xda, 0x25, 0x04, 0xb8, 0x91, 0x65, 0x5f, 0xf5, 0x35, 0x01, 0xc0, 0x49,
- 0xa2, 0xf6, 0xaf, 0x15, 0xe0, 0x74, 0x47, 0xfb, 0x7a, 0x84, 0xe1, 0xf8, 0x46, 0x33, 0x74, 0x16,
- 0x02, 0x52, 0x27, 0x5e, 0xe4, 0x3a, 0x8d, 0x6a, 0x8b, 0xd4, 0x34, 0x2d, 0x28, 0x33, 0x54, 0xbf,
- 0xbc, 0x52, 0x9d, 0x4b, 0x63, 0xe0, 0x9c, 0x9a, 0x68, 0x19, 0x50, 0x1a, 0x22, 0x66, 0x98, 0x3d,
- 0x71, 0xd3, 0xf4, 0x70, 0x46, 0x0d, 0xf4, 0x32, 0x8c, 0x29, 0xbb, 0x7d, 0x6d, 0xc6, 0xd9, 0x05,
- 0x81, 0x75, 0x00, 0x36, 0xf1, 0xd0, 0x45, 0x9e, 0x82, 0x49, 0x24, 0xeb, 0x12, 0x2a, 0xd3, 0x09,
- 0x99, 0x5f, 0x49, 0x14, 0x63, 0x1d, 0x67, 0xfe, 0xd2, 0x5f, 0x7c, 0xeb, 0xcc, 0x87, 0xfe, 0xea,
- 0x5b, 0x67, 0x3e, 0xf4, 0xb7, 0xdf, 0x3a, 0xf3, 0xa1, 0x1f, 0xda, 0x3b, 0x63, 0xfd, 0xc5, 0xde,
- 0x19, 0xeb, 0xaf, 0xf6, 0xce, 0x58, 0x7f, 0xbb, 0x77, 0xc6, 0xfa, 0xdf, 0xf7, 0xce, 0x58, 0x5f,
- 0xfe, 0x3f, 0xce, 0x7c, 0xe8, 0x6d, 0x14, 0x47, 0xa8, 0xbe, 0x40, 0x67, 0xe7, 0xc2, 0xf6, 0xc5,
- 0xff, 0x10, 0x00, 0x00, 0xff, 0xff, 0xf5, 0xf1, 0x8c, 0x4c, 0x2d, 0x26, 0x01, 0x00,
+ // 16665 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x5b, 0x90, 0x5c, 0x49,
+ 0x76, 0x18, 0xb6, 0xb7, 0xaa, 0x9f, 0xa7, 0xdf, 0x89, 0x57, 0xa1, 0x07, 0x40, 0x61, 0xee, 0xcc,
+ 0x60, 0x30, 0x3b, 0x33, 0x8d, 0xc5, 0x3c, 0x76, 0xb1, 0x33, 0xb3, 0xc3, 0xe9, 0x27, 0xd0, 0x03,
+ 0x74, 0xa3, 0x26, 0xab, 0x01, 0xec, 0x63, 0x76, 0xb5, 0x17, 0x55, 0xd9, 0xdd, 0x77, 0xbb, 0xea,
+ 0xde, 0x9a, 0x7b, 0x6f, 0x35, 0xd0, 0x30, 0x15, 0xa4, 0x56, 0xe6, 0x4a, 0x4b, 0xd2, 0x11, 0x1b,
+ 0x0a, 0x4b, 0x72, 0x90, 0x0a, 0x7e, 0xe8, 0x45, 0xd2, 0xb4, 0x64, 0x52, 0xa4, 0x45, 0x59, 0x14,
+ 0x29, 0xda, 0x96, 0x23, 0x68, 0x7f, 0xc8, 0x14, 0x23, 0xcc, 0x65, 0x58, 0xe1, 0x96, 0xd9, 0xb6,
+ 0x42, 0xc1, 0x0f, 0x53, 0x0a, 0xda, 0x1f, 0x76, 0x87, 0x6c, 0x2a, 0xf2, 0x79, 0x33, 0xef, 0xab,
+ 0xaa, 0x31, 0x40, 0xef, 0x70, 0x63, 0xfe, 0xaa, 0xf2, 0x9c, 0x3c, 0x99, 0x37, 0x1f, 0x27, 0x4f,
+ 0x9e, 0x73, 0xf2, 0x1c, 0xb0, 0x77, 0xae, 0x85, 0x73, 0xae, 0x7f, 0xc5, 0xe9, 0xb8, 0x57, 0x1a,
+ 0x7e, 0x40, 0xae, 0xec, 0x5e, 0xbd, 0xb2, 0x45, 0x3c, 0x12, 0x38, 0x11, 0x69, 0xce, 0x75, 0x02,
+ 0x3f, 0xf2, 0x11, 0xe2, 0x38, 0x73, 0x4e, 0xc7, 0x9d, 0xa3, 0x38, 0x73, 0xbb, 0x57, 0x67, 0x5f,
+ 0xdd, 0x72, 0xa3, 0xed, 0xee, 0xfd, 0xb9, 0x86, 0xdf, 0xbe, 0xb2, 0xe5, 0x6f, 0xf9, 0x57, 0x18,
+ 0xea, 0xfd, 0xee, 0x26, 0xfb, 0xc7, 0xfe, 0xb0, 0x5f, 0x9c, 0xc4, 0xec, 0x1b, 0x71, 0x33, 0x6d,
+ 0xa7, 0xb1, 0xed, 0x7a, 0x24, 0xd8, 0xbb, 0xd2, 0xd9, 0xd9, 0x62, 0xed, 0x06, 0x24, 0xf4, 0xbb,
+ 0x41, 0x83, 0x24, 0x1b, 0x2e, 0xac, 0x15, 0x5e, 0x69, 0x93, 0xc8, 0xc9, 0xe8, 0xee, 0xec, 0x95,
+ 0xbc, 0x5a, 0x41, 0xd7, 0x8b, 0xdc, 0x76, 0xba, 0x99, 0xcf, 0xf7, 0xaa, 0x10, 0x36, 0xb6, 0x49,
+ 0xdb, 0x49, 0xd5, 0x7b, 0x3d, 0xaf, 0x5e, 0x37, 0x72, 0x5b, 0x57, 0x5c, 0x2f, 0x0a, 0xa3, 0x20,
+ 0x59, 0xc9, 0xfe, 0xbe, 0x05, 0x17, 0xe7, 0xef, 0xd5, 0x97, 0x5b, 0x4e, 0x18, 0xb9, 0x8d, 0x85,
+ 0x96, 0xdf, 0xd8, 0xa9, 0x47, 0x7e, 0x40, 0xee, 0xfa, 0xad, 0x6e, 0x9b, 0xd4, 0xd9, 0x40, 0xa0,
+ 0x57, 0x60, 0x64, 0x97, 0xfd, 0x5f, 0x5d, 0xaa, 0x58, 0x17, 0xad, 0xcb, 0xa3, 0x0b, 0xd3, 0xbf,
+ 0xb3, 0x5f, 0xfd, 0xcc, 0xc1, 0x7e, 0x75, 0xe4, 0xae, 0x28, 0xc7, 0x0a, 0x03, 0x5d, 0x82, 0xa1,
+ 0xcd, 0x70, 0x63, 0xaf, 0x43, 0x2a, 0x25, 0x86, 0x3b, 0x29, 0x70, 0x87, 0x56, 0xea, 0xb4, 0x14,
+ 0x0b, 0x28, 0xba, 0x02, 0xa3, 0x1d, 0x27, 0x88, 0xdc, 0xc8, 0xf5, 0xbd, 0x4a, 0xf9, 0xa2, 0x75,
+ 0x79, 0x70, 0x61, 0x46, 0xa0, 0x8e, 0xd6, 0x24, 0x00, 0xc7, 0x38, 0xb4, 0x1b, 0x01, 0x71, 0x9a,
+ 0xb7, 0xbd, 0xd6, 0x5e, 0x65, 0xe0, 0xa2, 0x75, 0x79, 0x24, 0xee, 0x06, 0x16, 0xe5, 0x58, 0x61,
+ 0xd8, 0x3f, 0x53, 0x82, 0x91, 0xf9, 0xcd, 0x4d, 0xd7, 0x73, 0xa3, 0x3d, 0x74, 0x17, 0xc6, 0x3d,
+ 0xbf, 0x49, 0xe4, 0x7f, 0xf6, 0x15, 0x63, 0xaf, 0x5d, 0x9c, 0x4b, 0x2f, 0xa5, 0xb9, 0x75, 0x0d,
+ 0x6f, 0x61, 0xfa, 0x60, 0xbf, 0x3a, 0xae, 0x97, 0x60, 0x83, 0x0e, 0xc2, 0x30, 0xd6, 0xf1, 0x9b,
+ 0x8a, 0x6c, 0x89, 0x91, 0xad, 0x66, 0x91, 0xad, 0xc5, 0x68, 0x0b, 0x53, 0x07, 0xfb, 0xd5, 0x31,
+ 0xad, 0x00, 0xeb, 0x44, 0xd0, 0x7d, 0x98, 0xa2, 0x7f, 0xbd, 0xc8, 0x55, 0x74, 0xcb, 0x8c, 0xee,
+ 0x73, 0x79, 0x74, 0x35, 0xd4, 0x85, 0x13, 0x07, 0xfb, 0xd5, 0xa9, 0x44, 0x21, 0x4e, 0x12, 0xb4,
+ 0x7f, 0xda, 0x82, 0xa9, 0xf9, 0x4e, 0x67, 0x3e, 0x68, 0xfb, 0x41, 0x2d, 0xf0, 0x37, 0xdd, 0x16,
+ 0x41, 0x5f, 0x80, 0x81, 0x88, 0xce, 0x1a, 0x9f, 0xe1, 0xe7, 0xc4, 0xd0, 0x0e, 0xd0, 0xb9, 0x3a,
+ 0xdc, 0xaf, 0x9e, 0x48, 0xa0, 0xb3, 0xa9, 0x64, 0x15, 0xd0, 0x7b, 0x30, 0xdd, 0xf2, 0x1b, 0x4e,
+ 0x6b, 0xdb, 0x0f, 0x23, 0x01, 0x15, 0x53, 0x7f, 0xf2, 0x60, 0xbf, 0x3a, 0x7d, 0x2b, 0x01, 0xc3,
+ 0x29, 0x6c, 0xfb, 0x11, 0x4c, 0xce, 0x47, 0x91, 0xd3, 0xd8, 0x26, 0x4d, 0xbe, 0xa0, 0xd0, 0x1b,
+ 0x30, 0xe0, 0x39, 0x6d, 0xd9, 0x99, 0x8b, 0xb2, 0x33, 0xeb, 0x4e, 0x9b, 0x76, 0x66, 0xfa, 0x8e,
+ 0xe7, 0x7e, 0xd4, 0x15, 0x8b, 0x94, 0x96, 0x61, 0x86, 0x8d, 0x5e, 0x03, 0x68, 0x92, 0x5d, 0xb7,
+ 0x41, 0x6a, 0x4e, 0xb4, 0x2d, 0xfa, 0x80, 0x44, 0x5d, 0x58, 0x52, 0x10, 0xac, 0x61, 0xd9, 0x0f,
+ 0x61, 0x74, 0x7e, 0xd7, 0x77, 0x9b, 0x35, 0xbf, 0x19, 0xa2, 0x1d, 0x98, 0xea, 0x04, 0x64, 0x93,
+ 0x04, 0xaa, 0xa8, 0x62, 0x5d, 0x2c, 0x5f, 0x1e, 0x7b, 0xed, 0x72, 0xe6, 0xd8, 0x9b, 0xa8, 0xcb,
+ 0x5e, 0x14, 0xec, 0x2d, 0x9c, 0x11, 0xed, 0x4d, 0x25, 0xa0, 0x38, 0x49, 0xd9, 0xfe, 0x67, 0x25,
+ 0x38, 0x35, 0xff, 0xa8, 0x1b, 0x90, 0x25, 0x37, 0xdc, 0x49, 0x6e, 0xb8, 0xa6, 0x1b, 0xee, 0xac,
+ 0xc7, 0x23, 0xa0, 0x56, 0xfa, 0x92, 0x28, 0xc7, 0x0a, 0x03, 0xbd, 0x0a, 0xc3, 0xf4, 0xf7, 0x1d,
+ 0xbc, 0x2a, 0x3e, 0xf9, 0x84, 0x40, 0x1e, 0x5b, 0x72, 0x22, 0x67, 0x89, 0x83, 0xb0, 0xc4, 0x41,
+ 0x6b, 0x30, 0xd6, 0x60, 0xfc, 0x61, 0x6b, 0xcd, 0x6f, 0x12, 0xb6, 0xb6, 0x46, 0x17, 0x5e, 0xa6,
+ 0xe8, 0x8b, 0x71, 0xf1, 0xe1, 0x7e, 0xb5, 0xc2, 0xfb, 0x26, 0x48, 0x68, 0x30, 0xac, 0xd7, 0x47,
+ 0xb6, 0xda, 0xee, 0x03, 0x8c, 0x12, 0x64, 0x6c, 0xf5, 0xcb, 0xda, 0xce, 0x1d, 0x64, 0x3b, 0x77,
+ 0x3c, 0x7b, 0xd7, 0xa2, 0xab, 0x30, 0xb0, 0xe3, 0x7a, 0xcd, 0xca, 0x10, 0xa3, 0x75, 0x9e, 0xce,
+ 0xf9, 0x4d, 0xd7, 0x6b, 0x1e, 0xee, 0x57, 0x67, 0x8c, 0xee, 0xd0, 0x42, 0xcc, 0x50, 0xed, 0xff,
+ 0xcb, 0x82, 0x2a, 0x83, 0xad, 0xb8, 0x2d, 0x52, 0x23, 0x41, 0xe8, 0x86, 0x11, 0xf1, 0x22, 0x63,
+ 0x40, 0x5f, 0x03, 0x08, 0x49, 0x23, 0x20, 0x91, 0x36, 0xa4, 0x6a, 0x61, 0xd4, 0x15, 0x04, 0x6b,
+ 0x58, 0x94, 0x3f, 0x85, 0xdb, 0x4e, 0xc0, 0xd6, 0x97, 0x18, 0x58, 0xc5, 0x9f, 0xea, 0x12, 0x80,
+ 0x63, 0x1c, 0x83, 0x3f, 0x95, 0x7b, 0xf1, 0x27, 0xf4, 0x25, 0x98, 0x8a, 0x1b, 0x0b, 0x3b, 0x4e,
+ 0x43, 0x0e, 0x20, 0xdb, 0xc1, 0x75, 0x13, 0x84, 0x93, 0xb8, 0xf6, 0x7f, 0x6e, 0x89, 0xc5, 0x43,
+ 0xbf, 0xfa, 0x13, 0xfe, 0xad, 0xf6, 0x3f, 0xb2, 0x60, 0x78, 0xc1, 0xf5, 0x9a, 0xae, 0xb7, 0x85,
+ 0xbe, 0x09, 0x23, 0xf4, 0xa8, 0x6c, 0x3a, 0x91, 0x23, 0xd8, 0xf0, 0xe7, 0xb4, 0xbd, 0xa5, 0x4e,
+ 0xae, 0xb9, 0xce, 0xce, 0x16, 0x2d, 0x08, 0xe7, 0x28, 0x36, 0xdd, 0x6d, 0xb7, 0xef, 0x7f, 0x8b,
+ 0x34, 0xa2, 0x35, 0x12, 0x39, 0xf1, 0xe7, 0xc4, 0x65, 0x58, 0x51, 0x45, 0x37, 0x61, 0x28, 0x72,
+ 0x82, 0x2d, 0x12, 0x09, 0x7e, 0x9c, 0xc9, 0x37, 0x79, 0x4d, 0x4c, 0x77, 0x24, 0xf1, 0x1a, 0x24,
+ 0x3e, 0xa5, 0x36, 0x58, 0x55, 0x2c, 0x48, 0xd8, 0xff, 0xdf, 0x30, 0x9c, 0x5d, 0xac, 0xaf, 0xe6,
+ 0xac, 0xab, 0x4b, 0x30, 0xd4, 0x0c, 0xdc, 0x5d, 0x12, 0x88, 0x71, 0x56, 0x54, 0x96, 0x58, 0x29,
+ 0x16, 0x50, 0x74, 0x0d, 0xc6, 0xf9, 0xf9, 0x78, 0xc3, 0xf1, 0x9a, 0x31, 0x7b, 0x14, 0xd8, 0xe3,
+ 0x77, 0x35, 0x18, 0x36, 0x30, 0x8f, 0xb8, 0xa8, 0x2e, 0x25, 0x36, 0x63, 0xde, 0xd9, 0xfb, 0x5d,
+ 0x0b, 0xa6, 0x79, 0x33, 0xf3, 0x51, 0x14, 0xb8, 0xf7, 0xbb, 0x11, 0x09, 0x2b, 0x83, 0x8c, 0xd3,
+ 0x2d, 0x66, 0x8d, 0x56, 0xee, 0x08, 0xcc, 0xdd, 0x4d, 0x50, 0xe1, 0x4c, 0xb0, 0x22, 0xda, 0x9d,
+ 0x4e, 0x82, 0x71, 0xaa, 0x59, 0xf4, 0x17, 0x2d, 0x98, 0x6d, 0xf8, 0x5e, 0x14, 0xf8, 0xad, 0x16,
+ 0x09, 0x6a, 0xdd, 0xfb, 0x2d, 0x37, 0xdc, 0xe6, 0xeb, 0x14, 0x93, 0x4d, 0xc6, 0x09, 0x72, 0xe6,
+ 0x50, 0x21, 0x89, 0x39, 0xbc, 0x70, 0xb0, 0x5f, 0x9d, 0x5d, 0xcc, 0x25, 0x85, 0x0b, 0x9a, 0x41,
+ 0x3b, 0x80, 0xe8, 0xc9, 0x5e, 0x8f, 0x9c, 0x2d, 0x12, 0x37, 0x3e, 0xdc, 0x7f, 0xe3, 0xa7, 0x0f,
+ 0xf6, 0xab, 0x68, 0x3d, 0x45, 0x02, 0x67, 0x90, 0x45, 0x1f, 0xc1, 0x49, 0x5a, 0x9a, 0xfa, 0xd6,
+ 0x91, 0xfe, 0x9b, 0xab, 0x1c, 0xec, 0x57, 0x4f, 0xae, 0x67, 0x10, 0xc1, 0x99, 0xa4, 0xd1, 0x8f,
+ 0x5b, 0x70, 0x36, 0xfe, 0xfc, 0xe5, 0x87, 0x1d, 0xc7, 0x6b, 0xc6, 0x0d, 0x8f, 0xf6, 0xdf, 0x30,
+ 0xe5, 0xc9, 0x67, 0x17, 0xf3, 0x28, 0xe1, 0xfc, 0x46, 0x90, 0x07, 0x27, 0x68, 0xd7, 0x92, 0x6d,
+ 0x43, 0xff, 0x6d, 0x9f, 0x39, 0xd8, 0xaf, 0x9e, 0x58, 0x4f, 0xd3, 0xc0, 0x59, 0x84, 0x67, 0x17,
+ 0xe1, 0x54, 0xe6, 0xea, 0x44, 0xd3, 0x50, 0xde, 0x21, 0x5c, 0x08, 0x1c, 0xc5, 0xf4, 0x27, 0x3a,
+ 0x09, 0x83, 0xbb, 0x4e, 0xab, 0x2b, 0x36, 0x26, 0xe6, 0x7f, 0xde, 0x2a, 0x5d, 0xb3, 0xec, 0xff,
+ 0xbe, 0x0c, 0x53, 0x8b, 0xf5, 0xd5, 0xc7, 0xda, 0xf5, 0xfa, 0xb1, 0x57, 0x2a, 0x3c, 0xf6, 0xe2,
+ 0x43, 0xb4, 0x9c, 0x7b, 0x88, 0xfe, 0x58, 0xc6, 0x96, 0x1d, 0x60, 0x5b, 0xf6, 0x8b, 0x39, 0x5b,
+ 0xf6, 0x09, 0x6f, 0xd4, 0xdd, 0x9c, 0x55, 0x3b, 0xc8, 0x26, 0x30, 0x53, 0x42, 0x62, 0xb2, 0x5f,
+ 0x92, 0xd5, 0x1e, 0x71, 0xe9, 0x3e, 0x99, 0x79, 0x6c, 0xc0, 0xf8, 0xa2, 0xd3, 0x71, 0xee, 0xbb,
+ 0x2d, 0x37, 0x72, 0x49, 0x88, 0x5e, 0x84, 0xb2, 0xd3, 0x6c, 0x32, 0xe9, 0x6e, 0x74, 0xe1, 0xd4,
+ 0xc1, 0x7e, 0xb5, 0x3c, 0xdf, 0xa4, 0x62, 0x06, 0x28, 0xac, 0x3d, 0x4c, 0x31, 0xd0, 0x67, 0x61,
+ 0xa0, 0x19, 0xf8, 0x9d, 0x4a, 0x89, 0x61, 0xd2, 0x5d, 0x3e, 0xb0, 0x14, 0xf8, 0x9d, 0x04, 0x2a,
+ 0xc3, 0xb1, 0x7f, 0xbb, 0x04, 0xe7, 0x16, 0x49, 0x67, 0x7b, 0xa5, 0x9e, 0x73, 0x5e, 0x5c, 0x86,
+ 0x91, 0xb6, 0xef, 0xb9, 0x91, 0x1f, 0x84, 0xa2, 0x69, 0xb6, 0x22, 0xd6, 0x44, 0x19, 0x56, 0x50,
+ 0x74, 0x11, 0x06, 0x3a, 0xb1, 0x10, 0x3b, 0x2e, 0x05, 0x60, 0x26, 0xbe, 0x32, 0x08, 0xc5, 0xe8,
+ 0x86, 0x24, 0x10, 0x2b, 0x46, 0x61, 0xdc, 0x09, 0x49, 0x80, 0x19, 0x24, 0x96, 0x04, 0xa8, 0x8c,
+ 0x20, 0x4e, 0x84, 0x84, 0x24, 0x40, 0x21, 0x58, 0xc3, 0x42, 0x35, 0x18, 0x0d, 0x13, 0x33, 0xdb,
+ 0xd7, 0xd6, 0x9c, 0x60, 0xa2, 0x82, 0x9a, 0xc9, 0x98, 0x88, 0x71, 0x82, 0x0d, 0xf5, 0x14, 0x15,
+ 0x7e, 0xa3, 0x04, 0x88, 0x0f, 0xe1, 0x9f, 0xb1, 0x81, 0xbb, 0x93, 0x1e, 0xb8, 0xfe, 0xb7, 0xc4,
+ 0x93, 0x1a, 0xbd, 0xff, 0xdb, 0x82, 0x73, 0x8b, 0xae, 0xd7, 0x24, 0x41, 0xce, 0x02, 0x7c, 0x3a,
+ 0x57, 0xf9, 0xa3, 0x09, 0x29, 0xc6, 0x12, 0x1b, 0x78, 0x02, 0x4b, 0xcc, 0xfe, 0xb7, 0x16, 0x20,
+ 0xfe, 0xd9, 0x9f, 0xb8, 0x8f, 0xbd, 0x93, 0xfe, 0xd8, 0x27, 0xb0, 0x2c, 0xec, 0x5b, 0x30, 0xb9,
+ 0xd8, 0x72, 0x89, 0x17, 0xad, 0xd6, 0x16, 0x7d, 0x6f, 0xd3, 0xdd, 0x42, 0x6f, 0xc1, 0x64, 0xe4,
+ 0xb6, 0x89, 0xdf, 0x8d, 0xea, 0xa4, 0xe1, 0x7b, 0xec, 0xe6, 0x6a, 0x5d, 0x1e, 0x5c, 0x40, 0x07,
+ 0xfb, 0xd5, 0xc9, 0x0d, 0x03, 0x82, 0x13, 0x98, 0xf6, 0xdf, 0xa5, 0x7c, 0xab, 0xd5, 0x0d, 0x23,
+ 0x12, 0x6c, 0x04, 0xdd, 0x30, 0x5a, 0xe8, 0x52, 0xd9, 0xb3, 0x16, 0xf8, 0xb4, 0x3b, 0xae, 0xef,
+ 0xa1, 0x73, 0xc6, 0x75, 0x7c, 0x44, 0x5e, 0xc5, 0xc5, 0xb5, 0x7b, 0x0e, 0x20, 0x74, 0xb7, 0x3c,
+ 0x12, 0x68, 0xd7, 0x87, 0x49, 0xb6, 0x55, 0x54, 0x29, 0xd6, 0x30, 0x50, 0x0b, 0x26, 0x5a, 0xce,
+ 0x7d, 0xd2, 0xaa, 0x93, 0x16, 0x69, 0x44, 0x7e, 0x20, 0xf4, 0x1b, 0xaf, 0xf7, 0x77, 0x0f, 0xb8,
+ 0xa5, 0x57, 0x5d, 0x98, 0x39, 0xd8, 0xaf, 0x4e, 0x18, 0x45, 0xd8, 0x24, 0x4e, 0x59, 0x87, 0xdf,
+ 0xa1, 0x5f, 0xe1, 0xb4, 0xf4, 0xcb, 0xe7, 0x6d, 0x51, 0x86, 0x15, 0x54, 0xb1, 0x8e, 0x81, 0x3c,
+ 0xd6, 0x61, 0xff, 0x4b, 0xba, 0xd0, 0xfc, 0x76, 0xc7, 0xf7, 0x88, 0x17, 0x2d, 0xfa, 0x5e, 0x93,
+ 0x6b, 0xa6, 0xde, 0x32, 0x54, 0x27, 0x97, 0x12, 0xaa, 0x93, 0xd3, 0xe9, 0x1a, 0x9a, 0xf6, 0xe4,
+ 0x8b, 0x30, 0x14, 0x46, 0x4e, 0xd4, 0x0d, 0xc5, 0xc0, 0x3d, 0x2b, 0x97, 0x5d, 0x9d, 0x95, 0x1e,
+ 0xee, 0x57, 0xa7, 0x54, 0x35, 0x5e, 0x84, 0x45, 0x05, 0xf4, 0x12, 0x0c, 0xb7, 0x49, 0x18, 0x3a,
+ 0x5b, 0x52, 0x6c, 0x98, 0x12, 0x75, 0x87, 0xd7, 0x78, 0x31, 0x96, 0x70, 0xf4, 0x1c, 0x0c, 0x92,
+ 0x20, 0xf0, 0x03, 0xf1, 0x6d, 0x13, 0x02, 0x71, 0x70, 0x99, 0x16, 0x62, 0x0e, 0xb3, 0xff, 0x27,
+ 0x0b, 0xa6, 0x54, 0x5f, 0x79, 0x5b, 0xc7, 0x70, 0x5d, 0xfb, 0x2a, 0x40, 0x43, 0x7e, 0x60, 0xc8,
+ 0x8e, 0xd9, 0xb1, 0xd7, 0x2e, 0x65, 0x4a, 0x34, 0xa9, 0x61, 0x8c, 0x29, 0xab, 0xa2, 0x10, 0x6b,
+ 0xd4, 0xec, 0xdf, 0xb4, 0xe0, 0x44, 0xe2, 0x8b, 0x6e, 0xb9, 0x61, 0x84, 0x3e, 0x4c, 0x7d, 0xd5,
+ 0x5c, 0x9f, 0x8b, 0xcf, 0x0d, 0xf9, 0x37, 0xa9, 0x3d, 0x2f, 0x4b, 0xb4, 0x2f, 0xba, 0x01, 0x83,
+ 0x6e, 0x44, 0xda, 0xf2, 0x63, 0x9e, 0x2b, 0xfc, 0x18, 0xde, 0xab, 0x78, 0x46, 0x56, 0x69, 0x4d,
+ 0xcc, 0x09, 0xd8, 0xbf, 0x5d, 0x86, 0x51, 0xbe, 0xbf, 0xd7, 0x9c, 0xce, 0x31, 0xcc, 0xc5, 0xcb,
+ 0x30, 0xea, 0xb6, 0xdb, 0xdd, 0xc8, 0xb9, 0x2f, 0xce, 0xbd, 0x11, 0xce, 0x83, 0x56, 0x65, 0x21,
+ 0x8e, 0xe1, 0x68, 0x15, 0x06, 0x58, 0x57, 0xf8, 0x57, 0xbe, 0x98, 0xfd, 0x95, 0xa2, 0xef, 0x73,
+ 0x4b, 0x4e, 0xe4, 0x70, 0x91, 0x53, 0xed, 0x2b, 0x5a, 0x84, 0x19, 0x09, 0xe4, 0x00, 0xdc, 0x77,
+ 0x3d, 0x27, 0xd8, 0xa3, 0x65, 0x95, 0x32, 0x23, 0xf8, 0x6a, 0x31, 0xc1, 0x05, 0x85, 0xcf, 0xc9,
+ 0xaa, 0x0f, 0x8b, 0x01, 0x58, 0x23, 0x3a, 0xfb, 0x05, 0x18, 0x55, 0xc8, 0x47, 0x91, 0x1c, 0x67,
+ 0xbf, 0x04, 0x53, 0x89, 0xb6, 0x7a, 0x55, 0x1f, 0xd7, 0x05, 0xcf, 0x7f, 0xcc, 0x58, 0x86, 0xe8,
+ 0xf5, 0xb2, 0xb7, 0x2b, 0xce, 0xa6, 0x47, 0x70, 0xb2, 0x95, 0xc1, 0xf2, 0xc5, 0xbc, 0xf6, 0x7f,
+ 0x44, 0x9c, 0x13, 0x9f, 0x7d, 0x32, 0x0b, 0x8a, 0x33, 0xdb, 0x30, 0x38, 0x62, 0xa9, 0x88, 0x23,
+ 0x52, 0x7e, 0x77, 0x52, 0x75, 0xfe, 0x26, 0xd9, 0x53, 0x4c, 0xf5, 0x07, 0xd9, 0xfd, 0xf3, 0x7c,
+ 0xf4, 0x39, 0xbb, 0x1c, 0x13, 0x04, 0xca, 0x37, 0xc9, 0x1e, 0x9f, 0x0a, 0xfd, 0xeb, 0xca, 0x85,
+ 0x5f, 0xf7, 0x2b, 0x16, 0x4c, 0xa8, 0xaf, 0x3b, 0x06, 0xbe, 0xb0, 0x60, 0xf2, 0x85, 0xf3, 0x85,
+ 0x0b, 0x3c, 0x87, 0x23, 0xfc, 0x46, 0x09, 0xce, 0x2a, 0x1c, 0x7a, 0x89, 0xe2, 0x7f, 0xc4, 0xaa,
+ 0xba, 0x02, 0xa3, 0x9e, 0x52, 0x27, 0x5a, 0xa6, 0x1e, 0x2f, 0x56, 0x26, 0xc6, 0x38, 0xf4, 0xc8,
+ 0xf3, 0xe2, 0x43, 0x7b, 0x5c, 0xd7, 0xb3, 0x8b, 0xc3, 0x7d, 0x01, 0xca, 0x5d, 0xb7, 0x29, 0x0e,
+ 0x98, 0xcf, 0xc9, 0xd1, 0xbe, 0xb3, 0xba, 0x74, 0xb8, 0x5f, 0x7d, 0x36, 0xcf, 0xe4, 0x44, 0x4f,
+ 0xb6, 0x70, 0xee, 0xce, 0xea, 0x12, 0xa6, 0x95, 0xd1, 0x3c, 0x4c, 0x49, 0xab, 0xda, 0x5d, 0x2a,
+ 0x97, 0xfa, 0x9e, 0x38, 0x87, 0x94, 0xb2, 0x1c, 0x9b, 0x60, 0x9c, 0xc4, 0x47, 0x4b, 0x30, 0xbd,
+ 0xd3, 0xbd, 0x4f, 0x5a, 0x24, 0xe2, 0x1f, 0x7c, 0x93, 0x70, 0x55, 0xf2, 0x68, 0x7c, 0x85, 0xbd,
+ 0x99, 0x80, 0xe3, 0x54, 0x0d, 0xfb, 0x4f, 0xd9, 0x79, 0x20, 0x46, 0x4f, 0x93, 0x6f, 0x7e, 0x90,
+ 0xcb, 0xb9, 0x9f, 0x55, 0x71, 0x93, 0xec, 0x6d, 0xf8, 0x54, 0x0e, 0xc9, 0x5e, 0x15, 0xc6, 0x9a,
+ 0x1f, 0x28, 0x5c, 0xf3, 0xbf, 0x56, 0x82, 0x53, 0x6a, 0x04, 0x0c, 0x69, 0xf9, 0xcf, 0xfa, 0x18,
+ 0x5c, 0x85, 0xb1, 0x26, 0xd9, 0x74, 0xba, 0xad, 0x48, 0xd9, 0x35, 0x06, 0xb9, 0xa9, 0x6d, 0x29,
+ 0x2e, 0xc6, 0x3a, 0xce, 0x11, 0x86, 0xed, 0x6f, 0x4d, 0xb2, 0x83, 0x38, 0x72, 0xe8, 0x1a, 0x57,
+ 0xbb, 0xc6, 0xca, 0xdd, 0x35, 0xcf, 0xc1, 0xa0, 0xdb, 0xa6, 0x82, 0x59, 0xc9, 0x94, 0xb7, 0x56,
+ 0x69, 0x21, 0xe6, 0x30, 0xf4, 0x02, 0x0c, 0x37, 0xfc, 0x76, 0xdb, 0xf1, 0x9a, 0xec, 0xc8, 0x1b,
+ 0x5d, 0x18, 0xa3, 0xb2, 0xdb, 0x22, 0x2f, 0xc2, 0x12, 0x46, 0x85, 0x6f, 0x27, 0xd8, 0xe2, 0xca,
+ 0x1e, 0x21, 0x7c, 0xcf, 0x07, 0x5b, 0x21, 0x66, 0xa5, 0xf4, 0xae, 0xfa, 0xc0, 0x0f, 0x76, 0x5c,
+ 0x6f, 0x6b, 0xc9, 0x0d, 0xc4, 0x96, 0x50, 0x67, 0xe1, 0x3d, 0x05, 0xc1, 0x1a, 0x16, 0x5a, 0x81,
+ 0xc1, 0x8e, 0x1f, 0x44, 0x61, 0x65, 0x88, 0x0d, 0xf7, 0xb3, 0x39, 0x8c, 0x88, 0x7f, 0x6d, 0xcd,
+ 0x0f, 0xa2, 0xf8, 0x03, 0xe8, 0xbf, 0x10, 0xf3, 0xea, 0xe8, 0x16, 0x0c, 0x13, 0x6f, 0x77, 0x25,
+ 0xf0, 0xdb, 0x95, 0x13, 0xf9, 0x94, 0x96, 0x39, 0x0a, 0x5f, 0x66, 0xb1, 0x8c, 0x2a, 0x8a, 0xb1,
+ 0x24, 0x81, 0xbe, 0x08, 0x65, 0xe2, 0xed, 0x56, 0x86, 0x19, 0xa5, 0xd9, 0x1c, 0x4a, 0x77, 0x9d,
+ 0x20, 0xe6, 0xf9, 0xcb, 0xde, 0x2e, 0xa6, 0x75, 0xd0, 0x57, 0x60, 0x54, 0x32, 0x8c, 0x50, 0x68,
+ 0x51, 0x33, 0x17, 0xac, 0x64, 0x33, 0x98, 0x7c, 0xd4, 0x75, 0x03, 0xd2, 0x26, 0x5e, 0x14, 0xc6,
+ 0x1c, 0x52, 0x42, 0x43, 0x1c, 0x53, 0x43, 0x0d, 0x18, 0x0f, 0x48, 0xe8, 0x3e, 0x22, 0x35, 0xbf,
+ 0xe5, 0x36, 0xf6, 0x2a, 0x67, 0x58, 0xf7, 0x5e, 0x2a, 0x1c, 0x32, 0xac, 0x55, 0x88, 0xb5, 0xfc,
+ 0x7a, 0x29, 0x36, 0x88, 0xa2, 0x0f, 0x60, 0x22, 0x20, 0x61, 0xe4, 0x04, 0x91, 0x68, 0xa5, 0xa2,
+ 0xac, 0x72, 0x13, 0x58, 0x07, 0xf0, 0xeb, 0x44, 0xdc, 0x4c, 0x0c, 0xc1, 0x26, 0x05, 0x14, 0x01,
+ 0x32, 0x0a, 0x70, 0xb7, 0x45, 0xc2, 0xca, 0xd9, 0x7c, 0x6b, 0x66, 0x92, 0x2c, 0xad, 0xb0, 0x30,
+ 0x2b, 0x3a, 0x8f, 0x70, 0x8a, 0x16, 0xce, 0xa0, 0x8f, 0xbe, 0x22, 0x0d, 0x1d, 0x6b, 0x7e, 0xd7,
+ 0x8b, 0xc2, 0xca, 0x28, 0x6b, 0x2f, 0xd3, 0x22, 0x7e, 0x37, 0xc6, 0x4b, 0x5a, 0x42, 0x78, 0x65,
+ 0x6c, 0x90, 0x42, 0x5f, 0x87, 0x09, 0xfe, 0x9f, 0x1b, 0x72, 0xc3, 0xca, 0x29, 0x46, 0xfb, 0x62,
+ 0x3e, 0x6d, 0x8e, 0xb8, 0x70, 0x4a, 0x10, 0x9f, 0xd0, 0x4b, 0x43, 0x6c, 0x52, 0x43, 0x18, 0x26,
+ 0x5a, 0xee, 0x2e, 0xf1, 0x48, 0x18, 0xd6, 0x02, 0xff, 0x3e, 0x11, 0x7a, 0xe9, 0xb3, 0xd9, 0x86,
+ 0x5f, 0xff, 0x3e, 0x11, 0x57, 0x4f, 0xbd, 0x0e, 0x36, 0x49, 0xa0, 0x3b, 0x30, 0x19, 0x10, 0xa7,
+ 0xe9, 0xc6, 0x44, 0xc7, 0x7a, 0x11, 0x65, 0xd7, 0x75, 0x6c, 0x54, 0xc2, 0x09, 0x22, 0xe8, 0x36,
+ 0x8c, 0xb3, 0x81, 0xef, 0x76, 0x38, 0xd1, 0xd3, 0xbd, 0x88, 0x32, 0x37, 0x86, 0xba, 0x56, 0x05,
+ 0x1b, 0x04, 0xd0, 0xfb, 0x30, 0xda, 0x72, 0x37, 0x49, 0x63, 0xaf, 0xd1, 0x22, 0x95, 0x71, 0x46,
+ 0x2d, 0x93, 0x05, 0xdf, 0x92, 0x48, 0xfc, 0x56, 0xa0, 0xfe, 0xe2, 0xb8, 0x3a, 0xba, 0x0b, 0xa7,
+ 0x23, 0x12, 0xb4, 0x5d, 0xcf, 0xa1, 0xac, 0x53, 0x5c, 0x44, 0x99, 0x3d, 0x7e, 0x82, 0xad, 0xe9,
+ 0x0b, 0x62, 0x36, 0x4e, 0x6f, 0x64, 0x62, 0xe1, 0x9c, 0xda, 0xe8, 0x21, 0x54, 0x32, 0x20, 0x7c,
+ 0xb7, 0x9c, 0x64, 0x94, 0xdf, 0x11, 0x94, 0x2b, 0x1b, 0x39, 0x78, 0x87, 0x05, 0x30, 0x9c, 0x4b,
+ 0x1d, 0xdd, 0x86, 0x29, 0xc6, 0xaf, 0x6b, 0xdd, 0x56, 0x4b, 0x34, 0x38, 0xc9, 0x1a, 0x7c, 0x41,
+ 0x4a, 0x2f, 0xab, 0x26, 0xf8, 0x70, 0xbf, 0x0a, 0xf1, 0x3f, 0x9c, 0xac, 0x8d, 0xee, 0x33, 0xd3,
+ 0x6f, 0x37, 0x70, 0xa3, 0x3d, 0xba, 0xe9, 0xc8, 0xc3, 0xa8, 0x32, 0x55, 0xa8, 0x06, 0xd3, 0x51,
+ 0x95, 0x7d, 0x58, 0x2f, 0xc4, 0x49, 0x82, 0xf4, 0x00, 0x0a, 0xa3, 0xa6, 0xeb, 0x55, 0xa6, 0xf9,
+ 0x2d, 0x4e, 0xf2, 0xef, 0x3a, 0x2d, 0xc4, 0x1c, 0xc6, 0xcc, 0xbe, 0xf4, 0xc7, 0x6d, 0x7a, 0xce,
+ 0xcf, 0x30, 0xc4, 0xd8, 0xec, 0x2b, 0x01, 0x38, 0xc6, 0xa1, 0xa2, 0x77, 0x14, 0xed, 0x55, 0x10,
+ 0x43, 0x55, 0x6c, 0x78, 0x63, 0xe3, 0x2b, 0x98, 0x96, 0xdb, 0xbf, 0x6b, 0xc1, 0x45, 0xc5, 0x46,
+ 0x96, 0x1f, 0x46, 0xc4, 0x6b, 0x92, 0xa6, 0xce, 0x73, 0x49, 0x18, 0xa1, 0xb7, 0x61, 0xa2, 0x21,
+ 0x71, 0x34, 0x13, 0xb5, 0xda, 0xa5, 0x8b, 0x3a, 0x10, 0x9b, 0xb8, 0xe8, 0x1a, 0xe3, 0xc6, 0x8c,
+ 0x9e, 0xa6, 0x6c, 0xd2, 0x59, 0xac, 0x82, 0x61, 0x03, 0x13, 0xbd, 0x09, 0x63, 0x01, 0xef, 0x01,
+ 0xab, 0x58, 0x36, 0x3d, 0x25, 0x70, 0x0c, 0xc2, 0x3a, 0x9e, 0x7d, 0x1f, 0x26, 0x55, 0x87, 0xd8,
+ 0x34, 0xa3, 0x2a, 0x0c, 0x32, 0xf9, 0x59, 0xe8, 0xa1, 0x47, 0xe9, 0xa8, 0x32, 0xd9, 0x1a, 0xf3,
+ 0x72, 0x36, 0xaa, 0xee, 0x23, 0xb2, 0xb0, 0x17, 0x11, 0xae, 0xd4, 0x29, 0x6b, 0xa3, 0x2a, 0x01,
+ 0x38, 0xc6, 0xb1, 0xff, 0x7f, 0x7e, 0x0f, 0x89, 0x8f, 0xdb, 0x3e, 0x04, 0x8c, 0x57, 0x60, 0x84,
+ 0x79, 0xd0, 0xf8, 0x01, 0x37, 0x73, 0x0f, 0xc6, 0x37, 0x8f, 0x1b, 0xa2, 0x1c, 0x2b, 0x0c, 0x63,
+ 0xcc, 0x59, 0x15, 0x2e, 0x1d, 0xa5, 0xc7, 0x9c, 0xd5, 0x33, 0x71, 0xd1, 0x35, 0x18, 0x61, 0xce,
+ 0x62, 0x0d, 0xbf, 0x25, 0xc4, 0x76, 0x29, 0xe2, 0x8d, 0xd4, 0x44, 0xf9, 0xa1, 0xf6, 0x1b, 0x2b,
+ 0x6c, 0x74, 0x09, 0x86, 0x68, 0x17, 0x56, 0x6b, 0x42, 0x2e, 0x51, 0x2a, 0xd5, 0x1b, 0xac, 0x14,
+ 0x0b, 0xa8, 0xfd, 0x9b, 0x16, 0x13, 0x4a, 0xd3, 0x87, 0x27, 0xba, 0x91, 0x98, 0x6f, 0x3e, 0x20,
+ 0xcf, 0x67, 0xcd, 0xf7, 0x61, 0xf1, 0xfc, 0x7f, 0x35, 0x79, 0xc4, 0xf2, 0xa5, 0xf3, 0x86, 0x1c,
+ 0x82, 0xe4, 0x31, 0xfb, 0x4c, 0xbc, 0x6e, 0x69, 0x7f, 0x8a, 0xce, 0x5a, 0xfb, 0xb7, 0xf8, 0x35,
+ 0x39, 0x75, 0x7c, 0xa2, 0x25, 0x18, 0x72, 0xd8, 0x0d, 0x43, 0x74, 0xfc, 0x15, 0x39, 0x00, 0xf3,
+ 0xac, 0xf4, 0x50, 0xd8, 0xab, 0x93, 0xf5, 0x38, 0x14, 0x8b, 0xba, 0xe8, 0x9b, 0x30, 0x4a, 0x1e,
+ 0xba, 0xd1, 0xa2, 0xdf, 0x14, 0x0b, 0xca, 0xd4, 0x95, 0x16, 0x9e, 0xe0, 0xb7, 0xbd, 0x65, 0x59,
+ 0x95, 0x33, 0x6d, 0xf5, 0x17, 0xc7, 0x44, 0xed, 0x9f, 0xb3, 0xa0, 0xda, 0xa3, 0x36, 0xba, 0x47,
+ 0x85, 0x65, 0x12, 0x38, 0x91, 0x2f, 0xed, 0x9e, 0x6f, 0xcb, 0x65, 0x70, 0x5b, 0x94, 0x1f, 0xee,
+ 0x57, 0x5f, 0xec, 0x41, 0x46, 0xa2, 0x62, 0x45, 0x0c, 0xd9, 0x30, 0xc4, 0xd4, 0x25, 0x5c, 0xfa,
+ 0x1f, 0xe4, 0xc6, 0xcf, 0xbb, 0xac, 0x04, 0x0b, 0x88, 0xfd, 0x57, 0x4a, 0xda, 0x3e, 0xac, 0x47,
+ 0x4e, 0x44, 0x50, 0x0d, 0x86, 0x1f, 0x38, 0x6e, 0xe4, 0x7a, 0x5b, 0xe2, 0x8a, 0x52, 0x2c, 0x93,
+ 0xb1, 0x4a, 0xf7, 0x78, 0x05, 0x2e, 0x68, 0x8b, 0x3f, 0x58, 0x92, 0xa1, 0x14, 0x83, 0xae, 0xe7,
+ 0x51, 0x8a, 0xa5, 0x7e, 0x29, 0x62, 0x5e, 0x81, 0x53, 0x14, 0x7f, 0xb0, 0x24, 0x83, 0x3e, 0x04,
+ 0x90, 0xc7, 0x0a, 0x69, 0x0a, 0x35, 0xf7, 0x2b, 0xbd, 0x89, 0x6e, 0xa8, 0x3a, 0x5c, 0x8f, 0x1e,
+ 0xff, 0xc7, 0x1a, 0x3d, 0x3b, 0xd2, 0x76, 0x8d, 0xde, 0x19, 0xf4, 0x35, 0xca, 0xd7, 0x9d, 0x20,
+ 0x22, 0xcd, 0xf9, 0x48, 0x0c, 0xce, 0x67, 0xfb, 0xd3, 0x63, 0x6c, 0xb8, 0x6d, 0xa2, 0x9f, 0x01,
+ 0x82, 0x08, 0x8e, 0xe9, 0xd9, 0xbf, 0x5e, 0x86, 0x4a, 0x5e, 0x77, 0x29, 0x5b, 0x92, 0xab, 0x4a,
+ 0xd8, 0x1f, 0x14, 0x5b, 0x92, 0x4b, 0x00, 0x2b, 0x0c, 0xca, 0x1f, 0x42, 0x77, 0x4b, 0xaa, 0xa1,
+ 0x06, 0x63, 0xfe, 0x50, 0x67, 0xa5, 0x58, 0x40, 0x29, 0x5e, 0x40, 0x9c, 0x50, 0xf8, 0x89, 0x6a,
+ 0x7c, 0x04, 0xb3, 0x52, 0x2c, 0xa0, 0xba, 0x42, 0x7c, 0xa0, 0x87, 0x42, 0xdc, 0x18, 0xa2, 0xc1,
+ 0x27, 0x3b, 0x44, 0xe8, 0x1b, 0x00, 0x9b, 0xae, 0xe7, 0x86, 0xdb, 0x8c, 0xfa, 0xd0, 0x91, 0xa9,
+ 0xab, 0xfb, 0xdb, 0x8a, 0xa2, 0x82, 0x35, 0x8a, 0xf4, 0x2c, 0x53, 0x2c, 0x7a, 0x75, 0x89, 0x79,
+ 0xa9, 0x68, 0x67, 0x59, 0x7c, 0x5e, 0x2d, 0x61, 0x1d, 0xcf, 0xfe, 0x56, 0x72, 0xbd, 0x88, 0x1d,
+ 0xa0, 0x8d, 0xaf, 0xd5, 0xef, 0xf8, 0x96, 0x8a, 0xc7, 0xd7, 0xfe, 0x17, 0xa3, 0x30, 0x65, 0x34,
+ 0xd6, 0x0d, 0xfb, 0x38, 0xd5, 0xae, 0x53, 0xa9, 0xc5, 0x89, 0x88, 0xd8, 0x7f, 0x76, 0xef, 0xad,
+ 0xa2, 0x4b, 0x36, 0x74, 0x07, 0xf0, 0xfa, 0xe8, 0x1b, 0x30, 0xda, 0x72, 0x42, 0xa6, 0x5c, 0x27,
+ 0x62, 0xdf, 0xf5, 0x43, 0x2c, 0xd6, 0x5d, 0x38, 0x61, 0xa4, 0x89, 0x8a, 0x9c, 0x76, 0x4c, 0x92,
+ 0x8a, 0x57, 0x54, 0x28, 0x97, 0x8e, 0xc8, 0xaa, 0x13, 0x54, 0x72, 0xdf, 0xc3, 0x1c, 0x26, 0x84,
+ 0x15, 0xba, 0x2a, 0x16, 0xe9, 0x15, 0x86, 0x2d, 0xb3, 0x41, 0x43, 0x58, 0x51, 0x30, 0x6c, 0x60,
+ 0xc6, 0xea, 0x83, 0xa1, 0x02, 0xf5, 0xc1, 0x4b, 0x30, 0xcc, 0x7e, 0xa8, 0x15, 0xa0, 0x66, 0x63,
+ 0x95, 0x17, 0x63, 0x09, 0x4f, 0x2e, 0x98, 0x91, 0xfe, 0x16, 0x0c, 0x7a, 0x01, 0x86, 0xc5, 0xa2,
+ 0x66, 0x1e, 0x42, 0x23, 0x9c, 0xcb, 0x89, 0x25, 0x8f, 0x25, 0x0c, 0xfd, 0xbc, 0x05, 0xc8, 0x69,
+ 0xb5, 0xfc, 0x06, 0xe3, 0x50, 0xea, 0x1e, 0x0e, 0xec, 0x7e, 0xf6, 0x76, 0xcf, 0x61, 0xef, 0x86,
+ 0x73, 0xf3, 0xa9, 0xda, 0x5c, 0xa9, 0xff, 0x96, 0xbc, 0x7e, 0xa6, 0x11, 0xf4, 0xe3, 0xfe, 0x96,
+ 0x1b, 0x46, 0xdf, 0xfe, 0x57, 0x89, 0xe3, 0x3f, 0xa3, 0x4b, 0xe8, 0x8e, 0xae, 0x27, 0x18, 0x3b,
+ 0xa2, 0x9e, 0x60, 0x22, 0x57, 0x47, 0xf0, 0xe7, 0x12, 0xb7, 0xde, 0x71, 0xf6, 0xe5, 0x2f, 0xf4,
+ 0xb8, 0xf5, 0x0a, 0xcb, 0x4f, 0x3f, 0x77, 0xdf, 0x9a, 0x70, 0x59, 0x98, 0x60, 0x5d, 0x2e, 0xd6,
+ 0xd7, 0xdc, 0x09, 0x49, 0xb0, 0x70, 0x56, 0x7a, 0x34, 0x1c, 0xea, 0xd2, 0x9d, 0xe6, 0xe2, 0xf0,
+ 0xe3, 0x16, 0x54, 0xd2, 0x03, 0xc4, 0xbb, 0x54, 0x99, 0x64, 0xfd, 0xb7, 0x8b, 0x46, 0x46, 0x74,
+ 0x5e, 0x7a, 0x66, 0x57, 0xe6, 0x73, 0x68, 0xe1, 0xdc, 0x56, 0xd0, 0x35, 0x80, 0x30, 0xf2, 0x3b,
+ 0x9c, 0xd7, 0xb3, 0x1b, 0xd0, 0x28, 0xf3, 0x0d, 0x82, 0xba, 0x2a, 0x3d, 0x8c, 0xcf, 0x02, 0x0d,
+ 0x77, 0xb6, 0x0b, 0x67, 0x72, 0x56, 0x4c, 0x86, 0x69, 0x66, 0x49, 0x37, 0xcd, 0xf4, 0x50, 0xe8,
+ 0xcf, 0xc9, 0x39, 0x9d, 0xfb, 0xa0, 0xeb, 0x78, 0x91, 0x1b, 0xed, 0xe9, 0xa6, 0x1c, 0x0f, 0xcc,
+ 0xa1, 0x44, 0x5f, 0x87, 0xc1, 0x96, 0xeb, 0x75, 0x1f, 0x8a, 0x33, 0xf6, 0x52, 0xf6, 0x9d, 0xd9,
+ 0xeb, 0x3e, 0x34, 0x27, 0xa7, 0x4a, 0xb7, 0x32, 0x2b, 0x3f, 0xdc, 0xaf, 0xa2, 0x34, 0x02, 0xe6,
+ 0x54, 0xed, 0xcf, 0xc2, 0xe4, 0x92, 0x43, 0xda, 0xbe, 0xb7, 0xec, 0x35, 0x3b, 0xbe, 0xeb, 0x45,
+ 0xa8, 0x02, 0x03, 0x4c, 0x7c, 0xe7, 0x47, 0xeb, 0x00, 0x1d, 0x7c, 0xcc, 0x4a, 0xec, 0x2d, 0x38,
+ 0xb5, 0xe4, 0x3f, 0xf0, 0x1e, 0x38, 0x41, 0x73, 0xbe, 0xb6, 0xaa, 0xa9, 0xb6, 0xd7, 0xa5, 0x6a,
+ 0xd5, 0xca, 0x57, 0x5c, 0x69, 0x35, 0xf9, 0x22, 0x5c, 0x71, 0x5b, 0x24, 0xc7, 0x00, 0xf1, 0xd7,
+ 0x4b, 0x46, 0x4b, 0x31, 0xbe, 0x32, 0x9f, 0x5b, 0xb9, 0x9e, 0x37, 0x1f, 0xc0, 0xc8, 0xa6, 0x4b,
+ 0x5a, 0x4d, 0x4c, 0x36, 0xc5, 0x6c, 0xbc, 0x98, 0xef, 0x9b, 0xbb, 0x42, 0x31, 0x95, 0x9d, 0x9f,
+ 0x29, 0x66, 0x57, 0x44, 0x65, 0xac, 0xc8, 0xa0, 0x1d, 0x98, 0x96, 0x73, 0x26, 0xa1, 0x82, 0xdf,
+ 0xbf, 0x54, 0xb4, 0x7c, 0x4d, 0xe2, 0xec, 0x9d, 0x02, 0x4e, 0x90, 0xc1, 0x29, 0xc2, 0xe8, 0x1c,
+ 0x0c, 0xb4, 0xa9, 0x64, 0x33, 0xc0, 0x86, 0x9f, 0x69, 0x62, 0x99, 0x52, 0x99, 0x95, 0xda, 0x7f,
+ 0xc3, 0x82, 0x33, 0xa9, 0x91, 0x11, 0xca, 0xf5, 0x27, 0x3c, 0x0b, 0x49, 0x65, 0x77, 0xa9, 0xb7,
+ 0xb2, 0xdb, 0xfe, 0x2f, 0x2c, 0x38, 0xb9, 0xdc, 0xee, 0x44, 0x7b, 0x4b, 0xae, 0xe9, 0x26, 0xf3,
+ 0x05, 0x18, 0x6a, 0x93, 0xa6, 0xdb, 0x6d, 0x8b, 0x99, 0xab, 0xca, 0xd3, 0x7f, 0x8d, 0x95, 0x52,
+ 0x0e, 0x52, 0x8f, 0xfc, 0xc0, 0xd9, 0x22, 0xbc, 0x00, 0x0b, 0x74, 0x26, 0x43, 0xb9, 0x8f, 0xc8,
+ 0x2d, 0xb7, 0xed, 0x46, 0x8f, 0xb7, 0xbb, 0x84, 0x87, 0x8b, 0x24, 0x82, 0x63, 0x7a, 0xf6, 0xf7,
+ 0x2d, 0x98, 0x92, 0xeb, 0x7e, 0xbe, 0xd9, 0x0c, 0x48, 0x18, 0xa2, 0x59, 0x28, 0xb9, 0x1d, 0xd1,
+ 0x4b, 0x10, 0xbd, 0x2c, 0xad, 0xd6, 0x70, 0xc9, 0xed, 0xc8, 0x0b, 0xb1, 0x17, 0x5f, 0xee, 0x8d,
+ 0x0b, 0xb1, 0xc7, 0xde, 0x4c, 0x48, 0x0c, 0x74, 0x19, 0x46, 0x3c, 0xbf, 0xc9, 0xef, 0x94, 0xc2,
+ 0xdd, 0x83, 0x62, 0xae, 0x8b, 0x32, 0xac, 0xa0, 0xa8, 0x06, 0xa3, 0xdc, 0x15, 0x3c, 0x5e, 0xb4,
+ 0x7d, 0x39, 0x94, 0xb3, 0x2f, 0xdb, 0x90, 0x35, 0x71, 0x4c, 0xc4, 0xfe, 0xa7, 0x16, 0x8c, 0xcb,
+ 0x2f, 0xeb, 0xf3, 0xb6, 0x4f, 0xb7, 0x56, 0x7c, 0xd3, 0x8f, 0xb7, 0x16, 0xbd, 0xad, 0x33, 0x88,
+ 0x71, 0x49, 0x2f, 0x1f, 0xe9, 0x92, 0x7e, 0x15, 0xc6, 0x9c, 0x4e, 0xa7, 0x66, 0xde, 0xf0, 0xd9,
+ 0x52, 0x9a, 0x8f, 0x8b, 0xb1, 0x8e, 0x63, 0xff, 0x6c, 0x09, 0x26, 0xe5, 0x17, 0xd4, 0xbb, 0xf7,
+ 0x43, 0x12, 0xa1, 0x0d, 0x18, 0x75, 0xf8, 0x2c, 0x11, 0xb9, 0xc8, 0x9f, 0xcb, 0x56, 0xe1, 0x1b,
+ 0x53, 0x1a, 0x0b, 0xd2, 0xf3, 0xb2, 0x36, 0x8e, 0x09, 0xa1, 0x16, 0xcc, 0x78, 0x7e, 0xc4, 0x84,
+ 0x2a, 0x05, 0x2f, 0xf2, 0xaa, 0x48, 0x52, 0x3f, 0x2b, 0xa8, 0xcf, 0xac, 0x27, 0xa9, 0xe0, 0x34,
+ 0x61, 0xb4, 0x2c, 0xcd, 0x22, 0xe5, 0x7c, 0xcd, 0xb2, 0x3e, 0x71, 0xd9, 0x56, 0x11, 0xfb, 0x9f,
+ 0x58, 0x30, 0x2a, 0xd1, 0x8e, 0xc3, 0x81, 0x66, 0x0d, 0x86, 0x43, 0x36, 0x09, 0x72, 0x68, 0xec,
+ 0xa2, 0x8e, 0xf3, 0xf9, 0x8a, 0x65, 0x45, 0xfe, 0x3f, 0xc4, 0x92, 0x06, 0xb3, 0x8a, 0xab, 0xee,
+ 0x7f, 0x42, 0xac, 0xe2, 0xaa, 0x3f, 0x39, 0x87, 0xd2, 0xbf, 0x61, 0x7d, 0xd6, 0xcc, 0x4c, 0xf4,
+ 0x4a, 0xd3, 0x09, 0xc8, 0xa6, 0xfb, 0x30, 0x79, 0xa5, 0xa9, 0xb1, 0x52, 0x2c, 0xa0, 0xe8, 0x43,
+ 0x18, 0x6f, 0x48, 0x73, 0x68, 0xbc, 0xc3, 0x2f, 0x15, 0x9a, 0xe6, 0x95, 0x17, 0x07, 0x57, 0xac,
+ 0x2f, 0x6a, 0xf5, 0xb1, 0x41, 0xcd, 0x74, 0x75, 0x2c, 0xf7, 0x72, 0x75, 0x8c, 0xe9, 0xe6, 0x3b,
+ 0xfe, 0xfd, 0x9c, 0x05, 0x43, 0xdc, 0x0c, 0xd6, 0x9f, 0x15, 0x52, 0x73, 0x6a, 0x89, 0xc7, 0x8e,
+ 0x29, 0x57, 0x84, 0x64, 0x83, 0xd6, 0x60, 0x94, 0xfd, 0x60, 0x66, 0xbc, 0x72, 0xfe, 0xc3, 0x48,
+ 0xde, 0xaa, 0xde, 0xc1, 0xbb, 0xb2, 0x1a, 0x8e, 0x29, 0xd8, 0x7f, 0x54, 0xa6, 0xdc, 0x2d, 0x46,
+ 0x35, 0x0e, 0x7d, 0xeb, 0xe9, 0x1d, 0xfa, 0xa5, 0xa7, 0x75, 0xe8, 0x6f, 0xc1, 0x54, 0x43, 0x73,
+ 0x81, 0x89, 0x67, 0xf2, 0x72, 0xe1, 0x22, 0xd1, 0xbc, 0x65, 0xb8, 0xca, 0x7e, 0xd1, 0x24, 0x82,
+ 0x93, 0x54, 0xd1, 0xd7, 0x60, 0x9c, 0xcf, 0xb3, 0x68, 0x85, 0x7b, 0x8b, 0xbe, 0x90, 0xbf, 0x5e,
+ 0xf4, 0x26, 0xb8, 0x89, 0x47, 0xab, 0x8e, 0x0d, 0x62, 0xa8, 0x0e, 0xb0, 0xe9, 0xb6, 0x88, 0x20,
+ 0x5d, 0xe0, 0xd8, 0xbd, 0xc2, 0xb1, 0x14, 0xe1, 0x49, 0xae, 0x87, 0x90, 0x55, 0xb1, 0x46, 0xc6,
+ 0xfe, 0x77, 0x16, 0xa0, 0xe5, 0xce, 0x36, 0x69, 0x93, 0xc0, 0x69, 0xc5, 0xe6, 0xf1, 0x9f, 0xb4,
+ 0xa0, 0x42, 0x52, 0xc5, 0x8b, 0x7e, 0xbb, 0x2d, 0x34, 0x0c, 0x39, 0x4a, 0xb0, 0xe5, 0x9c, 0x3a,
+ 0xf1, 0x2d, 0x23, 0x0f, 0x03, 0xe7, 0xb6, 0x87, 0xd6, 0xe0, 0x04, 0x3f, 0x7a, 0x0d, 0xbb, 0x82,
+ 0xd8, 0x11, 0xcf, 0x08, 0xc2, 0x27, 0x36, 0xd2, 0x28, 0x38, 0xab, 0x9e, 0xfd, 0x0f, 0x26, 0x21,
+ 0xb7, 0x17, 0x9f, 0xfa, 0x05, 0x7c, 0xea, 0x17, 0xf0, 0xa9, 0x5f, 0xc0, 0xa7, 0x7e, 0x01, 0x9f,
+ 0xfa, 0x05, 0x7c, 0xea, 0x17, 0xf0, 0xa9, 0x5f, 0x80, 0xe6, 0x17, 0xf0, 0x57, 0x2d, 0x38, 0xa5,
+ 0x0e, 0x4d, 0x43, 0xf7, 0xf0, 0xa3, 0x70, 0x82, 0x6f, 0xb7, 0xc5, 0x96, 0xe3, 0xb6, 0x37, 0x48,
+ 0xbb, 0xd3, 0x72, 0x22, 0xe9, 0x73, 0x78, 0x35, 0x73, 0xe5, 0x26, 0x1e, 0x36, 0x19, 0x15, 0xf9,
+ 0x0b, 0xd1, 0x0c, 0x00, 0xce, 0x6a, 0xc6, 0xfe, 0xf5, 0x11, 0x18, 0x5c, 0xde, 0x25, 0x5e, 0x74,
+ 0x0c, 0xb7, 0xb4, 0x06, 0x4c, 0xba, 0xde, 0xae, 0xdf, 0xda, 0x25, 0x4d, 0x0e, 0x3f, 0x8a, 0x32,
+ 0xe1, 0xb4, 0x20, 0x3d, 0xb9, 0x6a, 0x90, 0xc0, 0x09, 0x92, 0x4f, 0xc3, 0x50, 0x76, 0x1d, 0x86,
+ 0xf8, 0x91, 0x27, 0x84, 0xc6, 0x4c, 0x9e, 0xcd, 0x06, 0x51, 0x1c, 0xe4, 0xb1, 0x11, 0x8f, 0x1f,
+ 0xa9, 0xa2, 0x3a, 0xfa, 0x16, 0x4c, 0x6e, 0xba, 0x41, 0x18, 0x6d, 0xb8, 0x6d, 0x7a, 0x3e, 0xb4,
+ 0x3b, 0x8f, 0x61, 0x18, 0x53, 0xe3, 0xb0, 0x62, 0x50, 0xc2, 0x09, 0xca, 0x68, 0x0b, 0x26, 0x5a,
+ 0x8e, 0xde, 0xd4, 0xf0, 0x91, 0x9b, 0x52, 0xa7, 0xc3, 0x2d, 0x9d, 0x10, 0x36, 0xe9, 0xd2, 0xed,
+ 0xd4, 0x60, 0xb6, 0x9d, 0x11, 0xa6, 0x99, 0x51, 0xdb, 0x89, 0x1b, 0x75, 0x38, 0x8c, 0x8a, 0x85,
+ 0xec, 0x79, 0xd0, 0xa8, 0x29, 0x16, 0x6a, 0x8f, 0x80, 0xbe, 0x09, 0xa3, 0x84, 0x0e, 0x21, 0x25,
+ 0x2c, 0x0e, 0x98, 0x2b, 0xfd, 0xf5, 0x75, 0xcd, 0x6d, 0x04, 0xbe, 0x69, 0x92, 0x5c, 0x96, 0x94,
+ 0x70, 0x4c, 0x14, 0x2d, 0xc2, 0x50, 0x48, 0x02, 0x57, 0x99, 0x3d, 0x0a, 0xa6, 0x91, 0xa1, 0x71,
+ 0x2b, 0x3c, 0xff, 0x8d, 0x45, 0x55, 0xba, 0xbc, 0x84, 0x3b, 0xc3, 0xb8, 0xb9, 0xbc, 0x12, 0x0e,
+ 0x0b, 0xef, 0xc3, 0x70, 0x40, 0x5a, 0xcc, 0xe6, 0x3d, 0xd1, 0xff, 0x22, 0xe7, 0x26, 0x74, 0x5e,
+ 0x0f, 0x4b, 0x02, 0xe8, 0x26, 0x95, 0x57, 0xa8, 0x58, 0xe9, 0x7a, 0x5b, 0xea, 0xd1, 0x8c, 0x60,
+ 0xb4, 0x4a, 0x7c, 0xc7, 0x31, 0x86, 0x7c, 0x7d, 0x8e, 0x33, 0xaa, 0xa1, 0xeb, 0x30, 0xa3, 0x4a,
+ 0x57, 0xbd, 0x30, 0x72, 0x28, 0x83, 0xe3, 0x96, 0x07, 0xa5, 0x2a, 0xc2, 0x49, 0x04, 0x9c, 0xae,
+ 0x63, 0xff, 0xa2, 0x05, 0x7c, 0x9c, 0x8f, 0x41, 0x41, 0xf2, 0xae, 0xa9, 0x20, 0x39, 0x9b, 0x3b,
+ 0x73, 0x39, 0xca, 0x91, 0x5f, 0xb4, 0x60, 0x4c, 0x9b, 0xd9, 0x78, 0xcd, 0x5a, 0x05, 0x6b, 0xb6,
+ 0x0b, 0xd3, 0x74, 0xa5, 0xdf, 0xbe, 0x1f, 0x92, 0x60, 0x97, 0x34, 0xd9, 0xc2, 0x2c, 0x3d, 0xde,
+ 0xc2, 0x54, 0x0e, 0xfa, 0xb7, 0x12, 0x04, 0x71, 0xaa, 0x09, 0xfb, 0x9b, 0xb2, 0xab, 0xea, 0x3d,
+ 0x43, 0x43, 0xcd, 0x79, 0xe2, 0x3d, 0x83, 0x9a, 0x55, 0x1c, 0xe3, 0xd0, 0xad, 0xb6, 0xed, 0x87,
+ 0x51, 0xf2, 0x3d, 0xc3, 0x0d, 0x3f, 0x8c, 0x30, 0x83, 0xd8, 0xaf, 0x03, 0x2c, 0x3f, 0x24, 0x0d,
+ 0xbe, 0x62, 0xf5, 0xab, 0x96, 0x95, 0x7f, 0xd5, 0xb2, 0x7f, 0xcf, 0x82, 0xc9, 0x95, 0x45, 0xe3,
+ 0xe4, 0x9a, 0x03, 0xe0, 0xf7, 0xc3, 0x7b, 0xf7, 0xd6, 0xa5, 0x2f, 0x18, 0x77, 0xd6, 0x50, 0xa5,
+ 0x58, 0xc3, 0x40, 0x67, 0xa1, 0xdc, 0xea, 0x7a, 0x42, 0x83, 0x3b, 0x4c, 0x8f, 0xc7, 0x5b, 0x5d,
+ 0x0f, 0xd3, 0x32, 0xed, 0xe5, 0x69, 0xb9, 0xef, 0x97, 0xa7, 0x3d, 0x03, 0x60, 0xa1, 0x2a, 0x0c,
+ 0x3e, 0x78, 0xe0, 0x36, 0x79, 0x5c, 0x0f, 0xe1, 0xa7, 0x76, 0xef, 0xde, 0xea, 0x52, 0x88, 0x79,
+ 0xb9, 0xfd, 0xcb, 0x16, 0x4c, 0x25, 0x6e, 0xfb, 0xf4, 0xd6, 0xb8, 0xab, 0xa2, 0x2a, 0x25, 0x83,
+ 0xc7, 0x68, 0xf1, 0x96, 0x34, 0xac, 0x3e, 0x5e, 0x5c, 0x8b, 0x17, 0x3b, 0xe5, 0x3e, 0x5e, 0xec,
+ 0x14, 0xbb, 0xe1, 0x7f, 0xaf, 0x0c, 0xb3, 0x2b, 0x2d, 0xf2, 0xf0, 0x63, 0x86, 0x63, 0xe9, 0xf7,
+ 0xa9, 0xef, 0xd1, 0xd4, 0x77, 0x47, 0x7d, 0xce, 0xdd, 0x7b, 0x0a, 0x37, 0x61, 0x98, 0x7f, 0xba,
+ 0x0c, 0xce, 0x92, 0x69, 0x4c, 0xcf, 0x1f, 0x90, 0x39, 0x3e, 0x84, 0xc2, 0x98, 0xae, 0xce, 0x78,
+ 0x51, 0x8a, 0x25, 0xf1, 0xd9, 0xb7, 0x60, 0x5c, 0xc7, 0x3c, 0x52, 0x60, 0x85, 0xbf, 0x50, 0x86,
+ 0x69, 0xda, 0x83, 0xa7, 0x3a, 0x11, 0x77, 0xd2, 0x13, 0xf1, 0xa4, 0x1f, 0xd7, 0xf7, 0x9e, 0x8d,
+ 0x0f, 0x93, 0xb3, 0x71, 0x35, 0x6f, 0x36, 0x8e, 0x7b, 0x0e, 0xfe, 0xa2, 0x05, 0x27, 0x56, 0x5a,
+ 0x7e, 0x63, 0x27, 0xf1, 0x00, 0xfe, 0x4d, 0x18, 0xa3, 0x27, 0x48, 0x68, 0xc4, 0x82, 0x32, 0xa2,
+ 0x83, 0x09, 0x10, 0xd6, 0xf1, 0xb4, 0x6a, 0x77, 0xee, 0xac, 0x2e, 0x65, 0x05, 0x15, 0x13, 0x20,
+ 0xac, 0xe3, 0xd9, 0xff, 0xdc, 0x82, 0xf3, 0xd7, 0x17, 0x97, 0xe3, 0xa5, 0x98, 0x8a, 0x6b, 0x76,
+ 0x09, 0x86, 0x3a, 0x4d, 0xad, 0x2b, 0xb1, 0x52, 0x7e, 0x89, 0xf5, 0x42, 0x40, 0x3f, 0x29, 0x21,
+ 0x04, 0xef, 0x00, 0x5c, 0xc7, 0xb5, 0x45, 0x71, 0x54, 0x48, 0x1b, 0x9c, 0x95, 0x6b, 0x83, 0x7b,
+ 0x01, 0x86, 0xe9, 0x51, 0xe6, 0x36, 0x64, 0xbf, 0xb9, 0xbb, 0x0c, 0x2f, 0xc2, 0x12, 0x66, 0xff,
+ 0x82, 0x05, 0x27, 0xae, 0xbb, 0x11, 0x95, 0x33, 0x92, 0x81, 0xbb, 0xa8, 0xa0, 0x11, 0xba, 0x91,
+ 0x1f, 0xec, 0x25, 0x79, 0x2f, 0x56, 0x10, 0xac, 0x61, 0xf1, 0x0f, 0xda, 0x75, 0xd9, 0x93, 0xba,
+ 0x92, 0x69, 0xf5, 0xc4, 0xa2, 0x1c, 0x2b, 0x0c, 0x3a, 0x5e, 0x4d, 0x37, 0x60, 0x9c, 0x5e, 0x72,
+ 0x63, 0x35, 0x5e, 0x4b, 0x12, 0x80, 0x63, 0x1c, 0xfb, 0x8f, 0x2d, 0xa8, 0x5e, 0xe7, 0x81, 0x01,
+ 0x36, 0xc3, 0x1c, 0xa6, 0xfb, 0x3a, 0x8c, 0x12, 0x69, 0x9e, 0x49, 0xfa, 0x72, 0x2b, 0xbb, 0x0d,
+ 0x8f, 0x1f, 0xa6, 0xf0, 0xfa, 0x38, 0x33, 0x8e, 0x16, 0x66, 0x61, 0x05, 0x10, 0xd1, 0xdb, 0xd2,
+ 0x03, 0xaa, 0xb1, 0xc8, 0x4c, 0xcb, 0x29, 0x28, 0xce, 0xa8, 0x61, 0xff, 0x0d, 0x0b, 0x4e, 0xa9,
+ 0x0f, 0xfe, 0xc4, 0x7d, 0xa6, 0xfd, 0xab, 0x25, 0x98, 0xb8, 0xb1, 0xb1, 0x51, 0xbb, 0x4e, 0x22,
+ 0x6d, 0x55, 0x16, 0x3b, 0x5d, 0x60, 0xcd, 0x76, 0x5c, 0x74, 0xad, 0xed, 0x46, 0x6e, 0x6b, 0x8e,
+ 0x87, 0x09, 0x9d, 0x5b, 0xf5, 0xa2, 0xdb, 0x41, 0x3d, 0x0a, 0x5c, 0x6f, 0x2b, 0x73, 0xa5, 0x4b,
+ 0x31, 0xab, 0x9c, 0x27, 0x66, 0xa1, 0xd7, 0x61, 0x88, 0xc5, 0x29, 0x95, 0x93, 0xf0, 0x8c, 0xba,
+ 0x15, 0xb2, 0xd2, 0xc3, 0xfd, 0xea, 0xe8, 0x1d, 0xbc, 0xca, 0xff, 0x60, 0x81, 0x8a, 0xee, 0xc0,
+ 0xd8, 0x76, 0x14, 0x75, 0x6e, 0x10, 0xa7, 0x49, 0x02, 0xc9, 0x65, 0x2f, 0x64, 0x71, 0x59, 0x3a,
+ 0x08, 0x1c, 0x2d, 0x66, 0x4c, 0x71, 0x59, 0x88, 0x75, 0x3a, 0x76, 0x1d, 0x20, 0x86, 0x3d, 0x21,
+ 0xb3, 0x99, 0xbd, 0x01, 0xa3, 0xf4, 0x73, 0xe7, 0x5b, 0xae, 0x53, 0xec, 0x98, 0xf0, 0x32, 0x8c,
+ 0x4a, 0xb7, 0x83, 0x50, 0x44, 0x11, 0x62, 0x27, 0x92, 0xf4, 0x4a, 0x08, 0x71, 0x0c, 0xb7, 0x9f,
+ 0x07, 0xe1, 0x1b, 0x5f, 0x44, 0xd2, 0xde, 0x84, 0x93, 0xcc, 0xc9, 0xdf, 0x89, 0xb6, 0x8d, 0x35,
+ 0xda, 0x7b, 0x31, 0xbc, 0x22, 0xae, 0xa2, 0x25, 0xe5, 0x6d, 0x25, 0xa3, 0x54, 0x8c, 0x4b, 0x8a,
+ 0xf1, 0xb5, 0xd4, 0xfe, 0xa3, 0x01, 0x78, 0x66, 0xb5, 0x9e, 0x1f, 0xfe, 0xee, 0x1a, 0x8c, 0x73,
+ 0x09, 0x97, 0x2e, 0x0d, 0xa7, 0x25, 0xda, 0x55, 0x4a, 0xdb, 0x0d, 0x0d, 0x86, 0x0d, 0x4c, 0x2a,
+ 0x11, 0xba, 0x1f, 0x79, 0xc9, 0x37, 0xdc, 0xab, 0x1f, 0xac, 0x63, 0x5a, 0x4e, 0xc1, 0x54, 0x58,
+ 0xe6, 0x2c, 0x5d, 0x81, 0x95, 0xc0, 0xfc, 0x2e, 0x4c, 0xba, 0x61, 0x23, 0x74, 0x57, 0x3d, 0xba,
+ 0x4f, 0xb5, 0x9d, 0xae, 0xd4, 0x24, 0xb4, 0xd3, 0x0a, 0x8a, 0x13, 0xd8, 0xda, 0xf9, 0x32, 0xd8,
+ 0xb7, 0xc0, 0xdd, 0x33, 0xf8, 0x0e, 0x65, 0xff, 0x1d, 0xf6, 0x75, 0x21, 0xb3, 0x55, 0x08, 0xf6,
+ 0xcf, 0x3f, 0x38, 0xc4, 0x12, 0x46, 0xef, 0xa0, 0x8d, 0x6d, 0xa7, 0x33, 0xdf, 0x8d, 0xb6, 0x97,
+ 0xdc, 0xb0, 0xe1, 0xef, 0x92, 0x60, 0x8f, 0xa9, 0x0f, 0x46, 0xe2, 0x3b, 0xa8, 0x02, 0x2c, 0xde,
+ 0x98, 0xaf, 0x51, 0x4c, 0x9c, 0xae, 0x83, 0xe6, 0x61, 0x4a, 0x16, 0xd6, 0x49, 0xc8, 0x8e, 0x80,
+ 0x31, 0x46, 0x46, 0xbd, 0xaa, 0x16, 0xc5, 0x8a, 0x48, 0x12, 0xdf, 0x14, 0x70, 0xe1, 0x49, 0x08,
+ 0xb8, 0x5f, 0x80, 0x09, 0xd7, 0x73, 0x23, 0xd7, 0x89, 0x7c, 0x6e, 0x68, 0xe3, 0x9a, 0x02, 0xa6,
+ 0x13, 0x5f, 0xd5, 0x01, 0xd8, 0xc4, 0xb3, 0xff, 0x8f, 0x01, 0x98, 0x61, 0xd3, 0xf6, 0xe9, 0x0a,
+ 0xfb, 0x61, 0x5a, 0x61, 0x77, 0xd2, 0x2b, 0xec, 0x49, 0x48, 0xee, 0x8f, 0xbd, 0xcc, 0xbe, 0x63,
+ 0xc1, 0x0c, 0x53, 0xcb, 0x1b, 0xcb, 0xec, 0x0a, 0x8c, 0x06, 0xc6, 0x83, 0xf7, 0x51, 0xdd, 0xfa,
+ 0x27, 0xdf, 0xae, 0xc7, 0x38, 0xe8, 0x3d, 0x80, 0x4e, 0xac, 0xf6, 0x2f, 0x19, 0x51, 0x8a, 0x21,
+ 0x57, 0xe3, 0xaf, 0xd5, 0xb1, 0xbf, 0x05, 0xa3, 0xea, 0x45, 0xbb, 0xbc, 0x20, 0x5b, 0x39, 0x17,
+ 0xe4, 0xde, 0x62, 0x84, 0xf4, 0x4c, 0x2c, 0x67, 0x7a, 0x26, 0xfe, 0x6b, 0x0b, 0x62, 0xa3, 0x0c,
+ 0xfa, 0x00, 0x46, 0x3b, 0x3e, 0x73, 0x64, 0x0f, 0xe4, 0xeb, 0x90, 0xe7, 0x0b, 0xad, 0x3a, 0x3c,
+ 0x14, 0x69, 0xc0, 0xa7, 0xa3, 0x26, 0xab, 0xe2, 0x98, 0x0a, 0xba, 0x09, 0xc3, 0x9d, 0x80, 0xd4,
+ 0x23, 0x16, 0x27, 0xaf, 0x7f, 0x82, 0x7c, 0xf9, 0xf2, 0x8a, 0x58, 0x52, 0x48, 0xf8, 0x05, 0x97,
+ 0xfb, 0xf7, 0x0b, 0xb6, 0xff, 0x7e, 0x09, 0xa6, 0x93, 0x8d, 0xa0, 0x77, 0x60, 0x80, 0x3c, 0x24,
+ 0x0d, 0xf1, 0xa5, 0x99, 0xd2, 0x44, 0xac, 0x10, 0xe2, 0x43, 0x47, 0xff, 0x63, 0x56, 0x0b, 0xdd,
+ 0x80, 0x61, 0x2a, 0x4a, 0x5c, 0x57, 0xd1, 0x64, 0x9f, 0xcd, 0x13, 0x47, 0x94, 0x4c, 0xc6, 0x3f,
+ 0x4b, 0x14, 0x61, 0x59, 0x9d, 0x39, 0x12, 0x36, 0x3a, 0x75, 0x7a, 0x4b, 0x8b, 0x8a, 0x94, 0x09,
+ 0x1b, 0x8b, 0x35, 0x8e, 0x24, 0xa8, 0x71, 0x47, 0x42, 0x59, 0x88, 0x63, 0x22, 0xe8, 0x3d, 0x18,
+ 0x0c, 0x5b, 0x84, 0x74, 0x84, 0xa7, 0x48, 0xa6, 0x4a, 0xb7, 0x4e, 0x11, 0x04, 0x25, 0xa6, 0x02,
+ 0x62, 0x05, 0x98, 0x57, 0xb4, 0x7f, 0xcd, 0x02, 0xe0, 0x9e, 0x97, 0x8e, 0xb7, 0x45, 0x8e, 0xc1,
+ 0x0a, 0xb2, 0x04, 0x03, 0x61, 0x87, 0x34, 0x8a, 0xde, 0x77, 0xc4, 0xfd, 0xa9, 0x77, 0x48, 0x23,
+ 0x5e, 0xed, 0xf4, 0x1f, 0x66, 0xb5, 0xed, 0x9f, 0x00, 0x98, 0x8c, 0xd1, 0x56, 0x23, 0xd2, 0x46,
+ 0xaf, 0x1a, 0x21, 0xb8, 0xce, 0x26, 0x42, 0x70, 0x8d, 0x32, 0x6c, 0x4d, 0xe1, 0xfe, 0x2d, 0x28,
+ 0xb7, 0x9d, 0x87, 0x42, 0xa3, 0xfa, 0x72, 0x71, 0x37, 0x28, 0xfd, 0xb9, 0x35, 0xe7, 0x21, 0xbf,
+ 0xc1, 0xbf, 0x2c, 0x77, 0xe7, 0x9a, 0xf3, 0xb0, 0xe7, 0x1b, 0x04, 0xda, 0x08, 0x6b, 0xcb, 0xf5,
+ 0x84, 0x53, 0x61, 0x5f, 0x6d, 0xb9, 0x5e, 0xb2, 0x2d, 0xd7, 0xeb, 0xa3, 0x2d, 0xd7, 0x43, 0x8f,
+ 0x60, 0x58, 0xf8, 0xfc, 0x8a, 0xd8, 0xa0, 0x57, 0xfa, 0x68, 0x4f, 0xb8, 0x0c, 0xf3, 0x36, 0xaf,
+ 0x48, 0x0d, 0x85, 0x28, 0xed, 0xd9, 0xae, 0x6c, 0x10, 0xfd, 0x35, 0x0b, 0x26, 0xc5, 0x6f, 0xf1,
+ 0x9c, 0x56, 0x48, 0xf0, 0x9f, 0xef, 0xbf, 0x0f, 0xa2, 0x22, 0xef, 0xca, 0xe7, 0xe5, 0x61, 0x6b,
+ 0x02, 0x7b, 0xf6, 0x28, 0xd1, 0x0b, 0xf4, 0xf7, 0x2d, 0x38, 0xd9, 0x76, 0x1e, 0xf2, 0x16, 0x79,
+ 0x19, 0x76, 0x22, 0xd7, 0x17, 0x6e, 0x2e, 0xef, 0xf4, 0x37, 0xfd, 0xa9, 0xea, 0xbc, 0x93, 0xd2,
+ 0xba, 0x7c, 0x32, 0x0b, 0xa5, 0x67, 0x57, 0x33, 0xfb, 0x35, 0xbb, 0x09, 0x23, 0x72, 0xbd, 0x3d,
+ 0xcd, 0x07, 0x0d, 0xac, 0x1d, 0xb1, 0xd6, 0x9e, 0x6a, 0x3b, 0xdf, 0x82, 0x71, 0x7d, 0x8d, 0x3d,
+ 0xd5, 0xb6, 0x3e, 0x82, 0x13, 0x19, 0x6b, 0xe9, 0xa9, 0x36, 0xf9, 0x00, 0xce, 0xe6, 0xae, 0x8f,
+ 0xa7, 0xfa, 0x20, 0xe5, 0x57, 0x2d, 0x9d, 0x0f, 0x1e, 0x83, 0x29, 0x6a, 0xd1, 0x34, 0x45, 0x5d,
+ 0x28, 0xde, 0x39, 0x39, 0xf6, 0xa8, 0x0f, 0xf5, 0x4e, 0x53, 0xae, 0x8e, 0xde, 0x87, 0xa1, 0x16,
+ 0x2d, 0x91, 0x9e, 0xe3, 0x76, 0xef, 0x1d, 0x19, 0x4b, 0xd4, 0xac, 0x3c, 0xc4, 0x82, 0x82, 0xfd,
+ 0x33, 0x16, 0x64, 0x3c, 0xa9, 0xa1, 0x12, 0x56, 0xd7, 0x6d, 0xb2, 0x21, 0x29, 0xc7, 0x12, 0x96,
+ 0x8a, 0x50, 0x75, 0x1e, 0xca, 0x5b, 0x6e, 0x53, 0xbc, 0xd6, 0x57, 0xe0, 0xeb, 0x14, 0xbc, 0xe5,
+ 0x36, 0xd1, 0x0a, 0xa0, 0xb0, 0xdb, 0xe9, 0xb4, 0x98, 0x67, 0x98, 0xd3, 0xba, 0x1e, 0xf8, 0xdd,
+ 0x0e, 0x77, 0x13, 0x2f, 0x73, 0xf5, 0x52, 0x3d, 0x05, 0xc5, 0x19, 0x35, 0xec, 0x7f, 0x64, 0xc1,
+ 0xc0, 0x31, 0x4c, 0x13, 0x36, 0xa7, 0xe9, 0xd5, 0x5c, 0xd2, 0x22, 0xa5, 0xcc, 0x1c, 0x76, 0x1e,
+ 0xb0, 0x70, 0x0d, 0x21, 0x13, 0x38, 0x32, 0x67, 0x6d, 0xdf, 0x82, 0x13, 0xb7, 0x7c, 0xa7, 0xb9,
+ 0xe0, 0xb4, 0x1c, 0xaf, 0x41, 0x82, 0x55, 0x6f, 0xeb, 0x48, 0x6f, 0x32, 0x4a, 0x3d, 0xdf, 0x64,
+ 0x5c, 0x83, 0x21, 0xb7, 0xa3, 0xe5, 0xa4, 0xb8, 0x48, 0x67, 0x77, 0xb5, 0x26, 0xd2, 0x51, 0x20,
+ 0xa3, 0x71, 0x56, 0x8a, 0x05, 0x3e, 0x5d, 0x96, 0xdc, 0x6f, 0x71, 0x20, 0x7f, 0x59, 0xd2, 0x5b,
+ 0x52, 0x32, 0xd6, 0xa2, 0xe1, 0xb6, 0xbf, 0x0d, 0x46, 0x13, 0xe2, 0x91, 0x1a, 0x86, 0x61, 0x97,
+ 0x7f, 0xa9, 0x58, 0x9b, 0x2f, 0x66, 0xdf, 0x5e, 0x52, 0x03, 0xa3, 0xbd, 0xc6, 0xe4, 0x05, 0x58,
+ 0x12, 0xb2, 0xaf, 0x41, 0x66, 0x6c, 0xac, 0xde, 0x9a, 0x29, 0xfb, 0x2b, 0x30, 0xc3, 0x6a, 0x1e,
+ 0x51, 0xeb, 0x63, 0x27, 0xf4, 0xe9, 0x19, 0xe1, 0xc5, 0xed, 0xff, 0xc5, 0x02, 0xb4, 0xe6, 0x37,
+ 0xdd, 0xcd, 0x3d, 0x41, 0x9c, 0x7f, 0xff, 0x47, 0x50, 0xe5, 0xd7, 0xea, 0x64, 0x08, 0xee, 0xc5,
+ 0x96, 0x13, 0x86, 0x9a, 0x2e, 0xff, 0x45, 0xd1, 0x6e, 0x75, 0xa3, 0x18, 0x1d, 0xf7, 0xa2, 0x87,
+ 0x3e, 0x48, 0x44, 0x44, 0xfd, 0x62, 0x2a, 0x22, 0xea, 0x8b, 0x99, 0x4e, 0x40, 0xe9, 0xde, 0xcb,
+ 0x48, 0xa9, 0xf6, 0x77, 0x2d, 0x98, 0x5a, 0x4f, 0x84, 0x94, 0xbe, 0xc4, 0x3c, 0x22, 0x32, 0x6c,
+ 0x54, 0x75, 0x56, 0x8a, 0x05, 0xf4, 0x89, 0xeb, 0x70, 0xff, 0xd4, 0x82, 0x38, 0x16, 0xdf, 0x31,
+ 0x88, 0xdc, 0x8b, 0x86, 0xc8, 0x9d, 0x79, 0x7d, 0x51, 0xdd, 0xc9, 0x93, 0xb8, 0xd1, 0x4d, 0x35,
+ 0x27, 0x05, 0x37, 0x97, 0x98, 0x0c, 0xdf, 0x67, 0x93, 0xe6, 0xc4, 0xa9, 0xd9, 0xf8, 0xfd, 0x12,
+ 0x20, 0x85, 0xdb, 0x77, 0x14, 0xdd, 0x74, 0x8d, 0x27, 0x13, 0x45, 0x77, 0x17, 0x10, 0xf3, 0xe9,
+ 0x09, 0x1c, 0x2f, 0xe4, 0x64, 0x5d, 0xa1, 0xb5, 0x3e, 0x9a, 0xc3, 0x90, 0x72, 0x89, 0xbd, 0x95,
+ 0xa2, 0x86, 0x33, 0x5a, 0xd0, 0x7c, 0xb5, 0x06, 0xfb, 0xf5, 0xd5, 0x1a, 0xea, 0xf1, 0xe8, 0xfe,
+ 0x57, 0x2c, 0x98, 0x50, 0xc3, 0xf4, 0x09, 0x79, 0xba, 0xa3, 0xfa, 0x93, 0x73, 0xae, 0xd4, 0xb4,
+ 0x2e, 0x33, 0x61, 0xe0, 0x47, 0x58, 0xf0, 0x04, 0xa7, 0xe5, 0x3e, 0x22, 0x2a, 0xd8, 0x7b, 0x55,
+ 0x04, 0x43, 0x10, 0xa5, 0x87, 0xfb, 0xd5, 0x09, 0xf5, 0x8f, 0xfb, 0x23, 0xc4, 0x55, 0xec, 0xbf,
+ 0x4d, 0x37, 0xbb, 0xb9, 0x14, 0xd1, 0x9b, 0x30, 0xd8, 0xd9, 0x76, 0x42, 0x92, 0x78, 0xe2, 0x38,
+ 0x58, 0xa3, 0x85, 0x87, 0xfb, 0xd5, 0x49, 0x55, 0x81, 0x95, 0x60, 0x8e, 0xdd, 0x7f, 0x6c, 0xe2,
+ 0xf4, 0xe2, 0xec, 0x19, 0x9b, 0xf8, 0xdf, 0x59, 0x30, 0xb0, 0x4e, 0x4f, 0xaf, 0xa7, 0xcf, 0x02,
+ 0xde, 0x35, 0x58, 0xc0, 0xb9, 0xbc, 0xb4, 0x67, 0xb9, 0xbb, 0x7f, 0x25, 0xb1, 0xfb, 0x2f, 0xe4,
+ 0x52, 0x28, 0xde, 0xf8, 0x6d, 0x18, 0x63, 0xc9, 0xd4, 0xc4, 0x73, 0xce, 0xd7, 0x8d, 0x0d, 0x5f,
+ 0x4d, 0x6c, 0xf8, 0x29, 0x0d, 0x55, 0xdb, 0xe9, 0x2f, 0xc1, 0xb0, 0x78, 0x1f, 0x98, 0x8c, 0x41,
+ 0x21, 0x70, 0xb1, 0x84, 0xdb, 0x3f, 0x57, 0x06, 0x23, 0x79, 0x1b, 0xfa, 0x27, 0x16, 0xcc, 0x05,
+ 0xdc, 0xc5, 0xbf, 0xb9, 0xd4, 0x0d, 0x5c, 0x6f, 0xab, 0xde, 0xd8, 0x26, 0xcd, 0x6e, 0xcb, 0xf5,
+ 0xb6, 0x56, 0xb7, 0x3c, 0x5f, 0x15, 0x2f, 0x3f, 0x24, 0x8d, 0xae, 0x8a, 0xdb, 0x53, 0x90, 0x29,
+ 0x4e, 0x3d, 0x93, 0x79, 0xed, 0x60, 0xbf, 0x3a, 0x87, 0x8f, 0x44, 0x1b, 0x1f, 0xb1, 0x2f, 0xe8,
+ 0x9f, 0x5b, 0x70, 0x85, 0x27, 0x11, 0xeb, 0xbf, 0xff, 0x05, 0x1a, 0x8e, 0x9a, 0x24, 0x15, 0x13,
+ 0xd9, 0x20, 0x41, 0x7b, 0xe1, 0x0b, 0x62, 0x40, 0xaf, 0xd4, 0x8e, 0xd6, 0x16, 0x3e, 0x6a, 0xe7,
+ 0xec, 0xff, 0xa6, 0x0c, 0x13, 0x22, 0x86, 0xad, 0x38, 0x03, 0xde, 0x34, 0x96, 0xc4, 0xb3, 0x89,
+ 0x25, 0x31, 0x63, 0x20, 0x3f, 0x19, 0xf6, 0x1f, 0xc2, 0x0c, 0x65, 0xce, 0x37, 0x88, 0x13, 0x44,
+ 0xf7, 0x89, 0xc3, 0x5d, 0x30, 0xcb, 0x47, 0xe6, 0xfe, 0x4a, 0xb1, 0x7e, 0x2b, 0x49, 0x0c, 0xa7,
+ 0xe9, 0xff, 0x30, 0x9d, 0x39, 0x1e, 0x4c, 0xa7, 0xc2, 0x10, 0x7f, 0x15, 0x46, 0xd5, 0xe3, 0x36,
+ 0xc1, 0x74, 0x8a, 0xa3, 0x79, 0x27, 0x29, 0x70, 0xa5, 0x67, 0xfc, 0xb0, 0x32, 0x26, 0x67, 0xff,
+ 0x72, 0xc9, 0x68, 0x90, 0x4f, 0xe2, 0x3a, 0x8c, 0x38, 0x21, 0xcb, 0x30, 0xd0, 0x2c, 0xd2, 0x68,
+ 0xa7, 0x9a, 0x61, 0x7e, 0x66, 0xf3, 0xa2, 0x26, 0x56, 0x34, 0xd0, 0x0d, 0xee, 0xe8, 0xba, 0x4b,
+ 0x8a, 0xd4, 0xd9, 0x29, 0x6a, 0x20, 0x5d, 0x61, 0x77, 0x09, 0x16, 0xf5, 0xd1, 0xd7, 0xb9, 0x27,
+ 0xf2, 0x4d, 0xcf, 0x7f, 0xe0, 0x5d, 0xf7, 0x7d, 0x19, 0x04, 0xaa, 0x3f, 0x82, 0x33, 0xd2, 0xff,
+ 0x58, 0x55, 0xc7, 0x26, 0xb5, 0xfe, 0xe2, 0xfa, 0xff, 0x28, 0xb0, 0xa4, 0x49, 0x66, 0x2c, 0x89,
+ 0x10, 0x11, 0x98, 0x12, 0x01, 0x92, 0x65, 0x99, 0x18, 0xbb, 0xcc, 0xeb, 0xb7, 0x59, 0x3b, 0xb6,
+ 0x00, 0xdd, 0x34, 0x49, 0xe0, 0x24, 0x4d, 0x7b, 0x9b, 0x33, 0xe1, 0x15, 0xe2, 0x44, 0xdd, 0x80,
+ 0x84, 0xe8, 0xcb, 0x50, 0x49, 0xdf, 0x8c, 0x85, 0x21, 0xc5, 0x62, 0xd2, 0xf3, 0xb9, 0x83, 0xfd,
+ 0x6a, 0xa5, 0x9e, 0x83, 0x83, 0x73, 0x6b, 0xdb, 0x3f, 0x6f, 0x01, 0x7b, 0xc1, 0x7f, 0x0c, 0x92,
+ 0xcf, 0x97, 0x4c, 0xc9, 0xa7, 0x92, 0x37, 0x9d, 0x39, 0x42, 0xcf, 0x1b, 0x7c, 0x0d, 0xd7, 0x02,
+ 0xff, 0xe1, 0x9e, 0xf0, 0xfa, 0xea, 0x7d, 0x8d, 0xb3, 0xbf, 0x67, 0x01, 0xcb, 0x30, 0x86, 0xf9,
+ 0xad, 0x5d, 0x1a, 0x38, 0x7a, 0x3b, 0x34, 0x7c, 0x19, 0x46, 0x36, 0xc5, 0xf0, 0x67, 0x28, 0x9d,
+ 0x8c, 0x0e, 0x9b, 0xb4, 0xe5, 0xa4, 0x89, 0x97, 0xb8, 0xe2, 0x1f, 0x56, 0xd4, 0xec, 0xff, 0xd2,
+ 0x82, 0xd9, 0xfc, 0x6a, 0xe8, 0x0e, 0x9c, 0x09, 0x48, 0xa3, 0x1b, 0x84, 0x74, 0x4b, 0x88, 0x0b,
+ 0x90, 0x78, 0x01, 0xc6, 0xa7, 0xfa, 0x99, 0x83, 0xfd, 0xea, 0x19, 0x9c, 0x8d, 0x82, 0xf3, 0xea,
+ 0xa2, 0xb7, 0x60, 0xb2, 0x1b, 0x72, 0xc9, 0x8f, 0x09, 0x5d, 0xa1, 0x08, 0x63, 0xcf, 0x1e, 0x49,
+ 0xdd, 0x31, 0x20, 0x38, 0x81, 0x69, 0xff, 0x79, 0xbe, 0x1c, 0x95, 0xc7, 0x6b, 0x1b, 0x66, 0x3c,
+ 0xed, 0x3f, 0x3d, 0x01, 0xe5, 0x55, 0xff, 0xf9, 0x5e, 0xa7, 0x3e, 0x3b, 0x2e, 0xb5, 0x18, 0x03,
+ 0x09, 0x32, 0x38, 0x4d, 0xd9, 0xfe, 0x9b, 0x16, 0x9c, 0xd1, 0x11, 0xb5, 0x17, 0x87, 0xbd, 0xac,
+ 0x80, 0x4b, 0x5a, 0x00, 0x3e, 0x7e, 0xcc, 0x5d, 0xce, 0x08, 0xc0, 0x77, 0x52, 0xa7, 0x5e, 0x18,
+ 0x6d, 0x8f, 0xbf, 0x2d, 0xcd, 0x8a, 0xb6, 0xf7, 0x47, 0x16, 0x5f, 0x9f, 0x7a, 0xd7, 0xd1, 0x47,
+ 0x30, 0xdd, 0x76, 0xa2, 0xc6, 0xf6, 0xf2, 0xc3, 0x4e, 0xc0, 0x8d, 0xbb, 0x72, 0x9c, 0x5e, 0xee,
+ 0x35, 0x4e, 0xda, 0x47, 0xc6, 0xde, 0xe0, 0x6b, 0x09, 0x62, 0x38, 0x45, 0x1e, 0xdd, 0x87, 0x31,
+ 0x56, 0xc6, 0xde, 0x62, 0x87, 0x45, 0xb2, 0x4c, 0x5e, 0x6b, 0xca, 0x39, 0x68, 0x2d, 0xa6, 0x83,
+ 0x75, 0xa2, 0xf6, 0x2f, 0x95, 0x39, 0xd3, 0x60, 0x77, 0x8f, 0x97, 0x60, 0xb8, 0xe3, 0x37, 0x17,
+ 0x57, 0x97, 0xb0, 0x98, 0x05, 0x75, 0xee, 0xd5, 0x78, 0x31, 0x96, 0x70, 0x74, 0x19, 0x46, 0xc4,
+ 0x4f, 0x69, 0x8c, 0x67, 0x7b, 0x44, 0xe0, 0x85, 0x58, 0x41, 0xd1, 0x6b, 0x00, 0x9d, 0xc0, 0xdf,
+ 0x75, 0x9b, 0x2c, 0xf6, 0x56, 0xd9, 0xf4, 0xeb, 0xab, 0x29, 0x08, 0xd6, 0xb0, 0xd0, 0xdb, 0x30,
+ 0xd1, 0xf5, 0x42, 0x2e, 0x3f, 0x69, 0xc9, 0x38, 0x94, 0xc7, 0xd9, 0x1d, 0x1d, 0x88, 0x4d, 0x5c,
+ 0x34, 0x0f, 0x43, 0x91, 0xc3, 0xfc, 0xd4, 0x06, 0xf3, 0x5f, 0x0c, 0x6c, 0x50, 0x0c, 0x3d, 0xed,
+ 0x25, 0xad, 0x80, 0x45, 0x45, 0xf4, 0x55, 0x19, 0x16, 0x81, 0x9f, 0x44, 0xe2, 0xa9, 0x4e, 0x7f,
+ 0xa7, 0x96, 0x16, 0x14, 0x41, 0x3c, 0x01, 0x32, 0x68, 0xa1, 0xb7, 0x00, 0xc8, 0xc3, 0x88, 0x04,
+ 0x9e, 0xd3, 0x52, 0xde, 0xa5, 0x4a, 0x90, 0x59, 0xf2, 0xd7, 0xfd, 0xe8, 0x4e, 0x48, 0x96, 0x15,
+ 0x06, 0xd6, 0xb0, 0xed, 0x9f, 0x18, 0x03, 0x88, 0x2f, 0x1a, 0xe8, 0x11, 0x8c, 0x34, 0x9c, 0x8e,
+ 0xd3, 0xe0, 0x39, 0x9d, 0xcb, 0x79, 0x0f, 0xcb, 0xe3, 0x1a, 0x73, 0x8b, 0x02, 0x9d, 0x1b, 0x6f,
+ 0x64, 0x3e, 0x83, 0x11, 0x59, 0xdc, 0xd3, 0x60, 0xa3, 0xda, 0x43, 0xdf, 0xb1, 0x60, 0x4c, 0xc4,
+ 0xb6, 0x62, 0x33, 0x54, 0xca, 0xb7, 0xb7, 0x69, 0xed, 0xcf, 0xc7, 0x35, 0x78, 0x17, 0x5e, 0x97,
+ 0x2b, 0x54, 0x83, 0xf4, 0xec, 0x85, 0xde, 0x30, 0xfa, 0x9c, 0xbc, 0xdb, 0x96, 0x8d, 0xa1, 0x54,
+ 0x77, 0xdb, 0x51, 0x76, 0xd4, 0xe8, 0xd7, 0xda, 0x3b, 0xc6, 0xb5, 0x76, 0x20, 0xff, 0x89, 0xb6,
+ 0x21, 0x6f, 0xf7, 0xba, 0xd1, 0xa2, 0x9a, 0x1e, 0x03, 0x66, 0x30, 0xff, 0x85, 0xaf, 0x76, 0xb1,
+ 0xeb, 0x11, 0xff, 0xe5, 0x5b, 0x30, 0xd5, 0x34, 0xa5, 0x16, 0xb1, 0x12, 0x5f, 0xcc, 0xa3, 0x9b,
+ 0x10, 0x72, 0x62, 0x39, 0x25, 0x01, 0xc0, 0x49, 0xc2, 0xa8, 0xc6, 0x43, 0x02, 0xad, 0x7a, 0x9b,
+ 0xbe, 0x78, 0x2e, 0x66, 0xe7, 0xce, 0xe5, 0x5e, 0x18, 0x91, 0x36, 0xc5, 0x8c, 0x85, 0x84, 0x75,
+ 0x51, 0x17, 0x2b, 0x2a, 0xe8, 0x7d, 0x18, 0x62, 0x4f, 0x3c, 0xc3, 0xca, 0x48, 0xbe, 0x59, 0xc3,
+ 0x8c, 0x2e, 0x1c, 0x6f, 0x48, 0xf6, 0x37, 0xc4, 0x82, 0x02, 0xba, 0x21, 0x1f, 0x50, 0x87, 0xab,
+ 0xde, 0x9d, 0x90, 0xb0, 0x07, 0xd4, 0xa3, 0x0b, 0xcf, 0xc7, 0x6f, 0xa3, 0x79, 0x79, 0x66, 0x72,
+ 0x6c, 0xa3, 0x26, 0x15, 0xfb, 0xc4, 0x7f, 0x99, 0x73, 0x5b, 0x44, 0xea, 0xcb, 0xec, 0x9e, 0x99,
+ 0x97, 0x3b, 0x1e, 0xce, 0xbb, 0x26, 0x09, 0x9c, 0xa4, 0x49, 0x45, 0x68, 0xbe, 0xeb, 0xc5, 0x83,
+ 0xb3, 0x5e, 0xbc, 0x83, 0x6b, 0x0e, 0xd8, 0x69, 0xc4, 0x4b, 0xb0, 0xa8, 0x8f, 0x5c, 0x98, 0x0a,
+ 0x0c, 0xf1, 0x42, 0x06, 0xd8, 0xbb, 0xd4, 0x9f, 0x10, 0xa3, 0x65, 0x19, 0x31, 0xc9, 0xe0, 0x24,
+ 0x5d, 0xf4, 0xbe, 0x26, 0x28, 0x4d, 0x14, 0xdf, 0xfc, 0x7b, 0x89, 0x46, 0xb3, 0x3b, 0x30, 0x61,
+ 0x30, 0x9b, 0xa7, 0x6a, 0x82, 0xf4, 0x60, 0x3a, 0xc9, 0x59, 0x9e, 0xaa, 0xe5, 0xf1, 0x2d, 0x98,
+ 0x64, 0x1b, 0xe1, 0x81, 0xd3, 0x11, 0xac, 0xf8, 0xb2, 0xc1, 0x8a, 0xad, 0xcb, 0x65, 0x3e, 0x30,
+ 0x72, 0x08, 0x62, 0xc6, 0x69, 0xff, 0x9d, 0x41, 0x51, 0x59, 0xed, 0x22, 0x74, 0x05, 0x46, 0x45,
+ 0x07, 0x54, 0xaa, 0x3e, 0xc5, 0x18, 0xd6, 0x24, 0x00, 0xc7, 0x38, 0x2c, 0x43, 0x23, 0xab, 0xae,
+ 0xbd, 0x50, 0x88, 0x33, 0x34, 0x2a, 0x08, 0xd6, 0xb0, 0xe8, 0xe5, 0xf7, 0xbe, 0xef, 0x47, 0xea,
+ 0x0c, 0x56, 0x5b, 0x6d, 0x81, 0x95, 0x62, 0x01, 0xa5, 0x67, 0xef, 0x0e, 0x09, 0x3c, 0xd2, 0x32,
+ 0x73, 0xd5, 0xa8, 0xb3, 0xf7, 0xa6, 0x0e, 0xc4, 0x26, 0x2e, 0x95, 0x20, 0xfc, 0x90, 0xed, 0x5d,
+ 0x71, 0xc5, 0x8e, 0x5f, 0x7c, 0xd4, 0x79, 0x90, 0x0f, 0x09, 0x47, 0x5f, 0x81, 0x33, 0x2a, 0xd8,
+ 0xa6, 0x58, 0x99, 0xb2, 0xc5, 0x21, 0x43, 0x23, 0x76, 0x66, 0x31, 0x1b, 0x0d, 0xe7, 0xd5, 0x47,
+ 0xef, 0xc2, 0xa4, 0xb8, 0x86, 0x49, 0x8a, 0xc3, 0xa6, 0xfb, 0xe2, 0x4d, 0x03, 0x8a, 0x13, 0xd8,
+ 0x32, 0xdb, 0x0e, 0xbb, 0x9f, 0x48, 0x0a, 0x23, 0xe9, 0x6c, 0x3b, 0x3a, 0x1c, 0xa7, 0x6a, 0xa0,
+ 0x79, 0x98, 0xe2, 0x62, 0xa7, 0xeb, 0x6d, 0xf1, 0x39, 0x11, 0x4f, 0x60, 0xd5, 0x86, 0xbc, 0x6d,
+ 0x82, 0x71, 0x12, 0x1f, 0x5d, 0x83, 0x71, 0x27, 0x68, 0x6c, 0xbb, 0x11, 0x69, 0xd0, 0x5d, 0xc5,
+ 0x3c, 0x08, 0x35, 0xff, 0xcf, 0x79, 0x0d, 0x86, 0x0d, 0x4c, 0xf4, 0x1e, 0x0c, 0x84, 0x0f, 0x9c,
+ 0x8e, 0xe0, 0x3e, 0xf9, 0xac, 0x5c, 0xad, 0x60, 0xee, 0xfa, 0x45, 0xff, 0x63, 0x56, 0xd3, 0x7e,
+ 0x04, 0x27, 0x32, 0x82, 0x12, 0xd1, 0xa5, 0xe7, 0x74, 0x5c, 0x39, 0x2a, 0x89, 0x67, 0x1a, 0xf3,
+ 0xb5, 0x55, 0x39, 0x1e, 0x1a, 0x16, 0x5d, 0xdf, 0x2c, 0x78, 0x51, 0x2d, 0x36, 0x24, 0xa9, 0xf5,
+ 0xbd, 0x22, 0x01, 0x38, 0xc6, 0xb1, 0xff, 0xa4, 0x04, 0x53, 0x19, 0xe6, 0x41, 0x96, 0x1b, 0x3f,
+ 0x71, 0xcf, 0x8b, 0x53, 0xe1, 0x9b, 0xe9, 0x9f, 0x4a, 0x47, 0x48, 0xff, 0x54, 0xee, 0x95, 0xfe,
+ 0x69, 0xe0, 0xe3, 0xa4, 0x7f, 0x32, 0x47, 0x6c, 0xb0, 0xaf, 0x11, 0xcb, 0x48, 0x19, 0x35, 0x74,
+ 0xc4, 0x94, 0x51, 0xc6, 0xa0, 0x0f, 0xf7, 0x31, 0xe8, 0xff, 0x69, 0x09, 0xa6, 0x93, 0x96, 0xc5,
+ 0x63, 0xd0, 0xce, 0xbf, 0x6f, 0x68, 0xe7, 0x2f, 0xf7, 0x13, 0xf4, 0x20, 0x57, 0x53, 0x8f, 0x13,
+ 0x9a, 0xfa, 0xcf, 0xf6, 0x45, 0xad, 0x58, 0x6b, 0xff, 0xb7, 0x4a, 0x70, 0x2a, 0xd3, 0xe0, 0x7a,
+ 0x0c, 0x63, 0x73, 0xdb, 0x18, 0x9b, 0x57, 0xfb, 0x0e, 0x08, 0x91, 0x3b, 0x40, 0xf7, 0x12, 0x03,
+ 0x74, 0xa5, 0x7f, 0x92, 0xc5, 0xa3, 0xf4, 0xfd, 0x32, 0x5c, 0xc8, 0xac, 0x17, 0x2b, 0xb7, 0x57,
+ 0x0c, 0xe5, 0xf6, 0x6b, 0x09, 0xe5, 0xb6, 0x5d, 0x5c, 0xfb, 0xc9, 0x68, 0xbb, 0x45, 0x60, 0x04,
+ 0x16, 0xde, 0xe5, 0x31, 0x35, 0xdd, 0x46, 0x60, 0x04, 0x45, 0x08, 0x9b, 0x74, 0x7f, 0x98, 0x34,
+ 0xdc, 0xff, 0x83, 0x05, 0x67, 0x33, 0xe7, 0xe6, 0x18, 0xf4, 0x8c, 0xeb, 0xa6, 0x9e, 0xf1, 0xa5,
+ 0xbe, 0x57, 0x6b, 0x8e, 0xe2, 0xf1, 0xbb, 0x43, 0x39, 0xdf, 0xc2, 0xd4, 0x1f, 0xb7, 0x61, 0xcc,
+ 0x69, 0x34, 0x48, 0x18, 0xae, 0xb1, 0x54, 0x13, 0xdc, 0xf6, 0xfa, 0x2a, 0xbb, 0x9c, 0xc6, 0xc5,
+ 0x87, 0xfb, 0xd5, 0xd9, 0x24, 0x89, 0x18, 0x8c, 0x75, 0x0a, 0xe8, 0xeb, 0x30, 0x12, 0xca, 0x24,
+ 0xbf, 0x03, 0x8f, 0x9f, 0xe4, 0x97, 0x49, 0x92, 0x4a, 0xbd, 0xa3, 0x48, 0xa2, 0x3f, 0xa7, 0x87,
+ 0xf7, 0x2a, 0x50, 0x6c, 0xf2, 0x4e, 0x3e, 0x46, 0x90, 0x2f, 0xf3, 0x39, 0x7c, 0xb9, 0xaf, 0xe7,
+ 0xf0, 0xef, 0xc1, 0x74, 0xc8, 0xc3, 0xe5, 0xc6, 0x2e, 0x32, 0x7c, 0x2d, 0xb2, 0x88, 0x83, 0xf5,
+ 0x04, 0x0c, 0xa7, 0xb0, 0xd1, 0x8a, 0x6c, 0x95, 0x39, 0x43, 0xf1, 0xe5, 0x79, 0x29, 0x6e, 0x51,
+ 0x38, 0x44, 0x9d, 0x4c, 0x4e, 0x02, 0x1b, 0x7e, 0xad, 0x26, 0xfa, 0x3a, 0x00, 0x5d, 0x44, 0x42,
+ 0x85, 0x33, 0x9c, 0xcf, 0x42, 0x29, 0x6f, 0x69, 0x66, 0xbe, 0xc0, 0x60, 0x11, 0x0d, 0x96, 0x14,
+ 0x11, 0xac, 0x11, 0x44, 0x0e, 0x4c, 0xc4, 0xff, 0x30, 0xd9, 0x2c, 0x0a, 0xb0, 0xc6, 0x5a, 0x48,
+ 0x12, 0x67, 0xe6, 0x8d, 0x25, 0x9d, 0x04, 0x36, 0x29, 0xa2, 0xaf, 0xc1, 0xd9, 0xdd, 0x5c, 0xbf,
+ 0x23, 0x2e, 0x4b, 0x9e, 0x3f, 0xd8, 0xaf, 0x9e, 0xcd, 0xf7, 0x36, 0xca, 0xaf, 0x6f, 0xff, 0x8f,
+ 0x00, 0xcf, 0x14, 0x70, 0x7a, 0x34, 0x6f, 0xfa, 0x0c, 0xbc, 0x9c, 0xd4, 0xab, 0xcc, 0x66, 0x56,
+ 0x36, 0x14, 0x2d, 0x89, 0x0d, 0x55, 0xfa, 0xd8, 0x1b, 0xea, 0xa7, 0x2c, 0xed, 0x9a, 0xc5, 0x3d,
+ 0xca, 0xbf, 0x74, 0xc4, 0x13, 0xec, 0x09, 0xaa, 0xc0, 0x36, 0x33, 0xf4, 0x48, 0xaf, 0xf5, 0xdd,
+ 0x9d, 0xfe, 0x15, 0x4b, 0xbf, 0x9a, 0x9d, 0x60, 0x80, 0xab, 0x98, 0xae, 0x1f, 0xf5, 0xfb, 0x8f,
+ 0x2b, 0xd9, 0xc0, 0xef, 0x5b, 0x70, 0x36, 0x55, 0xcc, 0xfb, 0x40, 0x42, 0x11, 0xce, 0x70, 0xfd,
+ 0x63, 0x77, 0x5e, 0x12, 0xe4, 0xdf, 0x70, 0x43, 0x7c, 0xc3, 0xd9, 0x5c, 0xbc, 0x64, 0xd7, 0x7f,
+ 0xf2, 0x5f, 0x55, 0x4f, 0xb0, 0x06, 0x4c, 0x44, 0x9c, 0xdf, 0x75, 0xd4, 0x81, 0x8b, 0x8d, 0x6e,
+ 0x10, 0xc4, 0x8b, 0x35, 0x63, 0x73, 0xf2, 0xdb, 0xe2, 0xf3, 0x07, 0xfb, 0xd5, 0x8b, 0x8b, 0x3d,
+ 0x70, 0x71, 0x4f, 0x6a, 0xc8, 0x03, 0xd4, 0x4e, 0x79, 0xf7, 0x31, 0x06, 0x90, 0xa3, 0x05, 0x4a,
+ 0xfb, 0x02, 0x72, 0x3f, 0xdd, 0x0c, 0x1f, 0xc1, 0x0c, 0xca, 0xc7, 0xab, 0xbb, 0xf9, 0xc1, 0x64,
+ 0x33, 0x98, 0xbd, 0x05, 0x17, 0x8a, 0x17, 0xd3, 0x91, 0x42, 0x50, 0xfc, 0x9e, 0x05, 0xe7, 0x0b,
+ 0x43, 0xb3, 0xfd, 0x19, 0xbc, 0x2c, 0xd8, 0xdf, 0xb6, 0xe0, 0xd9, 0xcc, 0x1a, 0xc9, 0xc7, 0x83,
+ 0x0d, 0x5a, 0xa8, 0x39, 0xc3, 0xc6, 0x41, 0x8a, 0x24, 0x00, 0xc7, 0x38, 0x86, 0xbf, 0x68, 0xa9,
+ 0xa7, 0xbf, 0xe8, 0x3f, 0xb5, 0x20, 0x75, 0xd4, 0x1f, 0x83, 0xe4, 0xb9, 0x6a, 0x4a, 0x9e, 0xcf,
+ 0xf7, 0x33, 0x9a, 0x39, 0x42, 0xe7, 0xbf, 0x9d, 0x82, 0xd3, 0x39, 0x2f, 0xc8, 0x77, 0x61, 0x66,
+ 0xab, 0x41, 0xcc, 0x90, 0x21, 0x45, 0xd1, 0xff, 0x0a, 0xe3, 0x8b, 0x2c, 0x9c, 0x3a, 0xd8, 0xaf,
+ 0xce, 0xa4, 0x50, 0x70, 0xba, 0x09, 0xf4, 0x6d, 0x0b, 0x4e, 0x3a, 0x0f, 0xc2, 0x65, 0x7a, 0x83,
+ 0x70, 0x1b, 0x0b, 0x2d, 0xbf, 0xb1, 0x43, 0x05, 0x33, 0xb9, 0xad, 0xde, 0xc8, 0x54, 0x85, 0xdf,
+ 0xab, 0xa7, 0xf0, 0x8d, 0xe6, 0x2b, 0x07, 0xfb, 0xd5, 0x93, 0x59, 0x58, 0x38, 0xb3, 0x2d, 0x84,
+ 0x45, 0x0e, 0x3f, 0x27, 0xda, 0x2e, 0x0a, 0x6a, 0x93, 0xf5, 0xd4, 0x9f, 0x8b, 0xc4, 0x12, 0x82,
+ 0x15, 0x1d, 0xf4, 0x4d, 0x18, 0xdd, 0x92, 0xf1, 0x2b, 0x32, 0x44, 0xee, 0x78, 0x20, 0x8b, 0xa3,
+ 0x7a, 0x70, 0x07, 0x1c, 0x85, 0x84, 0x63, 0xa2, 0xe8, 0x5d, 0x28, 0x7b, 0x9b, 0x61, 0x51, 0x08,
+ 0xe9, 0x84, 0xa7, 0x35, 0x8f, 0x76, 0xb5, 0xbe, 0x52, 0xc7, 0xb4, 0x22, 0xba, 0x01, 0xe5, 0xe0,
+ 0x7e, 0x53, 0xd8, 0x71, 0x32, 0x37, 0x29, 0x5e, 0x58, 0xca, 0xe9, 0x15, 0xa3, 0x84, 0x17, 0x96,
+ 0x30, 0x25, 0x81, 0x6a, 0x30, 0xc8, 0x9e, 0x5d, 0x0b, 0xd1, 0x36, 0xf3, 0x2a, 0x5f, 0x10, 0xbe,
+ 0x80, 0xbf, 0x87, 0x64, 0x08, 0x98, 0x13, 0x42, 0x1b, 0x30, 0xd4, 0x70, 0xbd, 0x26, 0x09, 0x84,
+ 0x2c, 0xfb, 0xb9, 0x4c, 0x8b, 0x0d, 0xc3, 0xc8, 0xa1, 0xc9, 0x0d, 0x18, 0x0c, 0x03, 0x0b, 0x5a,
+ 0x8c, 0x2a, 0xe9, 0x6c, 0x6f, 0xca, 0x13, 0x2b, 0x9b, 0x2a, 0xe9, 0x6c, 0xaf, 0xd4, 0x0b, 0xa9,
+ 0x32, 0x0c, 0x2c, 0x68, 0xa1, 0xb7, 0xa0, 0xb4, 0xd9, 0x10, 0x4f, 0xaa, 0x33, 0xd5, 0x9b, 0x66,
+ 0xc0, 0xb2, 0x85, 0xa1, 0x83, 0xfd, 0x6a, 0x69, 0x65, 0x11, 0x97, 0x36, 0x1b, 0x68, 0x1d, 0x86,
+ 0x37, 0x79, 0xbc, 0x20, 0xa1, 0x1f, 0x7d, 0x31, 0x3b, 0x94, 0x51, 0x2a, 0xa4, 0x10, 0x7f, 0xdb,
+ 0x2a, 0x00, 0x58, 0x12, 0x61, 0x09, 0xcf, 0x54, 0xdc, 0x23, 0x11, 0x29, 0x76, 0xee, 0x68, 0xb1,
+ 0xaa, 0x44, 0xa0, 0x71, 0x45, 0x05, 0x6b, 0x14, 0xe9, 0xaa, 0x76, 0x1e, 0x75, 0x03, 0x96, 0x11,
+ 0x45, 0x18, 0x66, 0x32, 0x57, 0xf5, 0xbc, 0x44, 0x2a, 0x5a, 0xd5, 0x0a, 0x09, 0xc7, 0x44, 0xd1,
+ 0x0e, 0x4c, 0xec, 0x86, 0x9d, 0x6d, 0x22, 0xb7, 0x34, 0x8b, 0x30, 0x98, 0x23, 0xcd, 0xde, 0x15,
+ 0x88, 0x6e, 0x10, 0x75, 0x9d, 0x56, 0x8a, 0x0b, 0xb1, 0x6b, 0xcd, 0x5d, 0x9d, 0x18, 0x36, 0x69,
+ 0xd3, 0xe1, 0xff, 0xa8, 0xeb, 0xdf, 0xdf, 0x8b, 0x88, 0x08, 0xf0, 0x9a, 0x39, 0xfc, 0x1f, 0x70,
+ 0x94, 0xf4, 0xf0, 0x0b, 0x00, 0x96, 0x44, 0xd0, 0x5d, 0x31, 0x3c, 0x8c, 0x7b, 0x4e, 0xe7, 0x07,
+ 0xc2, 0x9f, 0x97, 0x48, 0x39, 0x83, 0xc2, 0xb8, 0x65, 0x4c, 0x8a, 0x71, 0xc9, 0xce, 0xb6, 0x1f,
+ 0xf9, 0x5e, 0x82, 0x43, 0xcf, 0xe4, 0x73, 0xc9, 0x5a, 0x06, 0x7e, 0x9a, 0x4b, 0x66, 0x61, 0xe1,
+ 0xcc, 0xb6, 0x50, 0x13, 0x26, 0x3b, 0x7e, 0x10, 0x3d, 0xf0, 0x03, 0xb9, 0xbe, 0x50, 0x81, 0xa2,
+ 0xd4, 0xc0, 0x14, 0x2d, 0x32, 0xb7, 0x20, 0x13, 0x82, 0x13, 0x34, 0xd1, 0x97, 0x61, 0x38, 0x6c,
+ 0x38, 0x2d, 0xb2, 0x7a, 0xbb, 0x72, 0x22, 0xff, 0xf8, 0xa9, 0x73, 0x94, 0x9c, 0xd5, 0xc5, 0xc3,
+ 0x3d, 0x71, 0x14, 0x2c, 0xc9, 0xa1, 0x15, 0x18, 0x64, 0x39, 0xef, 0x59, 0x34, 0xe2, 0x9c, 0x78,
+ 0xfe, 0xa9, 0x47, 0x3d, 0x9c, 0x37, 0xb1, 0x62, 0xcc, 0xab, 0xd3, 0x3d, 0x20, 0x34, 0x05, 0x7e,
+ 0x58, 0x39, 0x95, 0xbf, 0x07, 0x84, 0x82, 0xe1, 0x76, 0xbd, 0x68, 0x0f, 0x28, 0x24, 0x1c, 0x13,
+ 0xa5, 0x9c, 0x99, 0x72, 0xd3, 0xd3, 0x05, 0x0e, 0x9b, 0xb9, 0xbc, 0x94, 0x71, 0x66, 0xca, 0x49,
+ 0x29, 0x09, 0xfb, 0x37, 0x47, 0xd2, 0x32, 0x0b, 0xd3, 0x30, 0xfd, 0xc7, 0x56, 0xca, 0x63, 0xe3,
+ 0xf3, 0xfd, 0x2a, 0xbc, 0x9f, 0xe0, 0xc5, 0xf5, 0xdb, 0x16, 0x9c, 0xee, 0x64, 0x7e, 0x88, 0x10,
+ 0x00, 0xfa, 0xd3, 0x9b, 0xf3, 0x4f, 0x57, 0x91, 0xab, 0xb3, 0xe1, 0x38, 0xa7, 0xa5, 0xa4, 0x72,
+ 0xa0, 0xfc, 0xb1, 0x95, 0x03, 0x6b, 0x30, 0xd2, 0xe0, 0x37, 0x39, 0x99, 0x3c, 0xa2, 0xaf, 0xb8,
+ 0xab, 0xdc, 0x4e, 0x2b, 0x2a, 0x62, 0x45, 0x02, 0xfd, 0xb4, 0x05, 0xe7, 0x93, 0x5d, 0xc7, 0x84,
+ 0x81, 0x85, 0xbb, 0x26, 0x57, 0x6b, 0xad, 0x88, 0xef, 0x4f, 0xc9, 0xff, 0x06, 0xf2, 0x61, 0x2f,
+ 0x04, 0x5c, 0xdc, 0x18, 0x5a, 0xca, 0xd0, 0xab, 0x0d, 0x99, 0x36, 0xc9, 0x3e, 0x74, 0x6b, 0x6f,
+ 0xc0, 0x78, 0xdb, 0xef, 0x7a, 0x91, 0xf0, 0xba, 0x14, 0xae, 0x5b, 0xcc, 0x65, 0x69, 0x4d, 0x2b,
+ 0xc7, 0x06, 0x56, 0x42, 0x23, 0x37, 0xf2, 0xd8, 0x1a, 0xb9, 0x0f, 0x61, 0xdc, 0xd3, 0x1e, 0x24,
+ 0x14, 0xdd, 0x60, 0x85, 0x76, 0x51, 0xc3, 0xe6, 0xbd, 0xd4, 0x4b, 0xb0, 0x41, 0xad, 0x58, 0x5b,
+ 0x06, 0x1f, 0x4f, 0x5b, 0x76, 0xac, 0x57, 0x62, 0xfb, 0xef, 0x95, 0x32, 0x6e, 0x0c, 0x5c, 0x2b,
+ 0xf7, 0x8e, 0xa9, 0x95, 0xbb, 0x94, 0xd4, 0xca, 0xa5, 0x4c, 0x55, 0x86, 0x42, 0xae, 0xff, 0x0c,
+ 0xa6, 0x7d, 0xc7, 0xd2, 0xfe, 0x0b, 0x16, 0x9c, 0x61, 0xb6, 0x0f, 0xda, 0xc0, 0xc7, 0xb6, 0x77,
+ 0x30, 0x87, 0xd8, 0x5b, 0xd9, 0xe4, 0x70, 0x5e, 0x3b, 0x76, 0x0b, 0x2e, 0xf6, 0x3a, 0x77, 0x99,
+ 0x7f, 0x71, 0x53, 0xb9, 0x57, 0xc4, 0xfe, 0xc5, 0xcd, 0xd5, 0x25, 0xcc, 0x20, 0xfd, 0x86, 0x5d,
+ 0xb4, 0xff, 0x4f, 0x0b, 0xca, 0x35, 0xbf, 0x79, 0x0c, 0x37, 0xfa, 0x2f, 0x19, 0x37, 0xfa, 0x67,
+ 0xb2, 0x4f, 0xfc, 0x66, 0xae, 0xb1, 0x6f, 0x39, 0x61, 0xec, 0x3b, 0x9f, 0x47, 0xa0, 0xd8, 0xb4,
+ 0xf7, 0xb7, 0xcb, 0x30, 0x56, 0xf3, 0x9b, 0x6a, 0x9f, 0xfd, 0x77, 0x8f, 0xf3, 0x8c, 0x28, 0x37,
+ 0x67, 0x99, 0x46, 0x99, 0xf9, 0x13, 0xcb, 0xa8, 0x17, 0x7f, 0xc6, 0x5e, 0x13, 0xdd, 0x23, 0xee,
+ 0xd6, 0x76, 0x44, 0x9a, 0xc9, 0xcf, 0x39, 0xbe, 0xd7, 0x44, 0x7f, 0x58, 0x86, 0xa9, 0x44, 0xeb,
+ 0xa8, 0x05, 0x13, 0x2d, 0xdd, 0x94, 0x24, 0xd6, 0xe9, 0x63, 0x59, 0xa1, 0xc4, 0x6b, 0x0c, 0xad,
+ 0x08, 0x9b, 0xc4, 0xd1, 0x1c, 0x80, 0xa7, 0xfb, 0xa4, 0xab, 0x98, 0xd0, 0x9a, 0x3f, 0xba, 0x86,
+ 0x81, 0xde, 0x84, 0xb1, 0xc8, 0xef, 0xf8, 0x2d, 0x7f, 0x6b, 0xef, 0xa6, 0x8a, 0x8f, 0xac, 0x5c,
+ 0x96, 0x37, 0x62, 0x10, 0xd6, 0xf1, 0xd0, 0x43, 0x98, 0x51, 0x44, 0xea, 0x4f, 0xc0, 0xbc, 0xc6,
+ 0xd4, 0x26, 0xeb, 0x49, 0x8a, 0x38, 0xdd, 0x08, 0x7a, 0x0b, 0x26, 0x99, 0xef, 0x34, 0xab, 0x7f,
+ 0x93, 0xec, 0xc9, 0xe0, 0xd2, 0x4c, 0xc2, 0x5e, 0x33, 0x20, 0x38, 0x81, 0x89, 0x16, 0x61, 0xa6,
+ 0xed, 0x86, 0x89, 0xea, 0x43, 0xac, 0x3a, 0xeb, 0xc0, 0x5a, 0x12, 0x88, 0xd3, 0xf8, 0xf6, 0x2f,
+ 0x88, 0x39, 0xf6, 0x22, 0xf7, 0xd3, 0xed, 0xf8, 0xc9, 0xde, 0x8e, 0xdf, 0xb7, 0x60, 0x9a, 0xb6,
+ 0xce, 0x1c, 0x42, 0xa5, 0x20, 0xa5, 0xd2, 0x8f, 0x58, 0x05, 0xe9, 0x47, 0x2e, 0x51, 0xb6, 0xdd,
+ 0xf4, 0xbb, 0x91, 0xd0, 0x8e, 0x6a, 0x7c, 0x99, 0x96, 0x62, 0x01, 0x15, 0x78, 0x24, 0x08, 0xc4,
+ 0xab, 0x7b, 0x1d, 0x8f, 0x04, 0x01, 0x16, 0x50, 0x99, 0x9d, 0x64, 0x20, 0x3b, 0x3b, 0x09, 0x0f,
+ 0x32, 0x2f, 0xfc, 0xe8, 0x84, 0x48, 0xab, 0x05, 0x99, 0x97, 0x0e, 0x76, 0x31, 0x8e, 0xfd, 0xd7,
+ 0xca, 0x50, 0xa9, 0xf9, 0xcd, 0x45, 0x12, 0x44, 0xee, 0xa6, 0xdb, 0x70, 0x22, 0xa2, 0xe5, 0xdb,
+ 0x7d, 0x0d, 0x80, 0x3d, 0x22, 0x0b, 0xb2, 0x22, 0xa8, 0xd7, 0x15, 0x04, 0x6b, 0x58, 0x54, 0x2a,
+ 0xd9, 0x21, 0x7b, 0xda, 0xc9, 0xab, 0xa4, 0x92, 0x9b, 0xbc, 0x18, 0x4b, 0x38, 0xba, 0xc5, 0x42,
+ 0x19, 0x2d, 0x3f, 0xec, 0xb8, 0x01, 0xcf, 0x4c, 0x4e, 0x1a, 0xbe, 0xd7, 0x0c, 0x45, 0xe0, 0xb7,
+ 0x8a, 0x08, 0x44, 0x94, 0x82, 0xe3, 0xcc, 0x5a, 0xa8, 0x06, 0x27, 0x1b, 0x01, 0x69, 0x12, 0x2f,
+ 0x72, 0x9d, 0xd6, 0x42, 0xd7, 0x6b, 0xb6, 0x78, 0x4a, 0x9e, 0x01, 0x23, 0x83, 0xe8, 0xc9, 0xc5,
+ 0x0c, 0x1c, 0x9c, 0x59, 0x53, 0x7c, 0x0a, 0x23, 0x32, 0x98, 0xfa, 0x14, 0x56, 0x4f, 0xc2, 0x59,
+ 0xe3, 0xf1, 0x10, 0x2e, 0x6e, 0x3b, 0xae, 0xc7, 0xea, 0x0d, 0x25, 0x1a, 0xcf, 0xc0, 0xc1, 0x99,
+ 0x35, 0xed, 0x3f, 0x2d, 0xc3, 0x38, 0x9d, 0x18, 0xe5, 0x71, 0xf3, 0x86, 0xe1, 0x71, 0x73, 0x31,
+ 0xe1, 0x71, 0x33, 0xad, 0xe3, 0x6a, 0xfe, 0x35, 0xef, 0x03, 0xf2, 0x45, 0x52, 0x82, 0xeb, 0xc4,
+ 0x23, 0x7c, 0xc8, 0x98, 0x92, 0xb1, 0x1c, 0xfb, 0xa3, 0xdc, 0x4e, 0x61, 0xe0, 0x8c, 0x5a, 0x9f,
+ 0xfa, 0xea, 0x1c, 0xaf, 0xaf, 0xce, 0x6f, 0x59, 0x6c, 0x05, 0x2c, 0xad, 0xd7, 0xb9, 0x13, 0x39,
+ 0xba, 0x0a, 0x63, 0xec, 0x18, 0x63, 0xb1, 0x3c, 0xa4, 0x4b, 0x0b, 0xcb, 0x6e, 0xbb, 0x1e, 0x17,
+ 0x63, 0x1d, 0x07, 0x5d, 0x86, 0x91, 0x90, 0x38, 0x41, 0x63, 0x5b, 0x9d, 0xe1, 0xc2, 0xff, 0x84,
+ 0x97, 0x61, 0x05, 0x45, 0x1f, 0xc4, 0x11, 0xe1, 0xcb, 0xf9, 0x1e, 0xe9, 0x7a, 0x7f, 0x38, 0x1f,
+ 0xcc, 0x0f, 0x03, 0x6f, 0xdf, 0x03, 0x94, 0xc6, 0xef, 0xe3, 0x89, 0x5f, 0xd5, 0x8c, 0x59, 0x3c,
+ 0x9a, 0x8a, 0x57, 0xfc, 0xef, 0x2d, 0x98, 0xac, 0xf9, 0x4d, 0xca, 0x9f, 0x7f, 0x98, 0x98, 0xb1,
+ 0x9e, 0xc1, 0x63, 0xa8, 0x20, 0x83, 0xc7, 0x81, 0x05, 0x17, 0xd8, 0xe7, 0x47, 0xc4, 0x6b, 0xc6,
+ 0x06, 0x4f, 0xdd, 0xdf, 0xe3, 0x01, 0x4c, 0x05, 0x3c, 0x7c, 0xd7, 0x9a, 0xd3, 0xe9, 0xb8, 0xde,
+ 0x96, 0x7c, 0xdf, 0xf6, 0x46, 0xe1, 0xbb, 0x8d, 0x24, 0x49, 0x11, 0x02, 0x4c, 0x77, 0x54, 0x35,
+ 0x88, 0xe2, 0x64, 0x2b, 0x3c, 0x2b, 0x8d, 0xd6, 0x1f, 0x2d, 0x41, 0xa5, 0x96, 0x95, 0x26, 0x81,
+ 0x80, 0xd3, 0x75, 0xec, 0xe7, 0x60, 0xb0, 0xe6, 0x37, 0x7b, 0x04, 0x8f, 0xfe, 0x3b, 0x16, 0x0c,
+ 0xd7, 0xfc, 0xe6, 0x31, 0x98, 0x10, 0xdf, 0x31, 0x4d, 0x88, 0x67, 0x72, 0x36, 0x47, 0x8e, 0xd5,
+ 0xf0, 0x9f, 0x0d, 0xc0, 0x04, 0xed, 0xa7, 0xbf, 0x25, 0xd7, 0xab, 0xb1, 0x36, 0xac, 0x3e, 0xd6,
+ 0x06, 0xbd, 0xd0, 0xfa, 0xad, 0x96, 0xff, 0x20, 0xb9, 0x76, 0x57, 0x58, 0x29, 0x16, 0x50, 0xf4,
+ 0x0a, 0x8c, 0x74, 0x02, 0xb2, 0xeb, 0xfa, 0xe2, 0xa6, 0xa8, 0x19, 0x64, 0x6b, 0xa2, 0x1c, 0x2b,
+ 0x0c, 0xf4, 0x06, 0x8c, 0x87, 0xae, 0x47, 0xa5, 0x62, 0x7e, 0xf4, 0x0e, 0xb0, 0x83, 0x81, 0xe7,
+ 0xd2, 0xd3, 0xca, 0xb1, 0x81, 0x85, 0xee, 0xc1, 0x28, 0xfb, 0xcf, 0x78, 0xeb, 0xe0, 0x91, 0x79,
+ 0xab, 0x48, 0x94, 0x2e, 0x08, 0xe0, 0x98, 0x16, 0x15, 0x38, 0x22, 0x99, 0x8f, 0x2a, 0x14, 0x41,
+ 0x84, 0x95, 0xc0, 0xa1, 0x32, 0x55, 0x85, 0x58, 0xc3, 0x42, 0x2f, 0xc3, 0x68, 0xe4, 0xb8, 0xad,
+ 0x5b, 0xae, 0xc7, 0x3c, 0x51, 0x68, 0xff, 0x45, 0xbe, 0x72, 0x51, 0x88, 0x63, 0x38, 0xbd, 0xd5,
+ 0xb0, 0xd8, 0x6a, 0x0b, 0x7b, 0x91, 0xc8, 0xa2, 0x59, 0xe6, 0xb7, 0x9a, 0x5b, 0xaa, 0x14, 0x6b,
+ 0x18, 0x68, 0x1b, 0xce, 0xb9, 0x1e, 0xcb, 0x3b, 0x47, 0xea, 0x3b, 0x6e, 0x67, 0xe3, 0x56, 0xfd,
+ 0x2e, 0x09, 0xdc, 0xcd, 0xbd, 0x05, 0xa7, 0xb1, 0x43, 0xbc, 0x26, 0x53, 0x7a, 0x8d, 0x2c, 0x3c,
+ 0x2f, 0xba, 0x78, 0x6e, 0xb5, 0x00, 0x17, 0x17, 0x52, 0x42, 0x36, 0xe5, 0x39, 0x01, 0x71, 0xda,
+ 0x42, 0xbb, 0xc5, 0x73, 0x56, 0xb1, 0x12, 0x2c, 0x20, 0xf6, 0xeb, 0x6c, 0x4f, 0xdc, 0xae, 0xa3,
+ 0xcf, 0x1a, 0x3c, 0xf4, 0xb4, 0xce, 0x43, 0x0f, 0xf7, 0xab, 0x43, 0xb7, 0xeb, 0x5a, 0x9c, 0xad,
+ 0x6b, 0x70, 0xaa, 0xe6, 0x37, 0x6b, 0x7e, 0x10, 0xad, 0xf8, 0xc1, 0x03, 0x27, 0x68, 0xca, 0x25,
+ 0x58, 0x95, 0x91, 0xc6, 0x28, 0x67, 0x18, 0xe4, 0x6c, 0xd6, 0x88, 0x22, 0xf6, 0x3a, 0xbb, 0x9f,
+ 0x1c, 0xf1, 0x61, 0x77, 0x83, 0x49, 0xca, 0x2a, 0xbb, 0xe3, 0x75, 0x27, 0x22, 0xe8, 0x36, 0x4c,
+ 0x34, 0x74, 0xd9, 0x44, 0x54, 0x7f, 0x49, 0x9e, 0xe8, 0x86, 0xe0, 0x92, 0x29, 0xcc, 0x98, 0xf5,
+ 0xed, 0xdf, 0xb7, 0x44, 0x2b, 0x1a, 0xd7, 0xe8, 0xe3, 0x60, 0x59, 0xcc, 0x62, 0x4e, 0xfc, 0xa6,
+ 0x7a, 0xaa, 0x5f, 0xc6, 0x84, 0xbe, 0x06, 0x67, 0x8d, 0x42, 0xe9, 0x14, 0xa2, 0xe5, 0xdf, 0x67,
+ 0x9a, 0x49, 0x9c, 0x87, 0x84, 0xf3, 0xeb, 0xdb, 0x3f, 0x06, 0xa7, 0x93, 0xdf, 0x25, 0x38, 0xfa,
+ 0x63, 0x7e, 0x5d, 0xe9, 0x68, 0x5f, 0x67, 0xbf, 0x09, 0x33, 0x35, 0x5f, 0x8b, 0xa2, 0xc2, 0xe6,
+ 0xaf, 0x77, 0x30, 0xb7, 0x5f, 0x1e, 0x61, 0x67, 0x7d, 0x22, 0x65, 0x23, 0xfa, 0x06, 0x4c, 0x86,
+ 0x84, 0x45, 0x30, 0x94, 0x3a, 0xea, 0x82, 0xa8, 0x0c, 0xf5, 0x65, 0x1d, 0x93, 0xdf, 0xc3, 0xcd,
+ 0x32, 0x9c, 0xa0, 0x86, 0xda, 0x30, 0xf9, 0xc0, 0xf5, 0x9a, 0xfe, 0x83, 0x50, 0xd2, 0x1f, 0xc9,
+ 0x37, 0x78, 0xdd, 0xe3, 0x98, 0x89, 0x3e, 0x1a, 0xcd, 0xdd, 0x33, 0x88, 0xe1, 0x04, 0x71, 0xca,
+ 0x6a, 0x82, 0xae, 0x37, 0x1f, 0xde, 0x09, 0x49, 0x20, 0xe2, 0x2b, 0x32, 0x56, 0x83, 0x65, 0x21,
+ 0x8e, 0xe1, 0x94, 0xd5, 0xb0, 0x3f, 0x2c, 0xac, 0x03, 0xe3, 0x65, 0x82, 0xd5, 0x60, 0x55, 0x8a,
+ 0x35, 0x0c, 0xca, 0x8a, 0xd9, 0xbf, 0x75, 0xdf, 0xc3, 0xbe, 0x1f, 0x49, 0xe6, 0xcd, 0xb2, 0xea,
+ 0x6a, 0xe5, 0xd8, 0xc0, 0xca, 0x89, 0xe6, 0x38, 0x70, 0xd4, 0x68, 0x8e, 0x28, 0x2a, 0x88, 0x64,
+ 0xc1, 0xe3, 0x91, 0x5f, 0x2b, 0x8a, 0x64, 0x71, 0xf8, 0x58, 0x51, 0x2e, 0xa8, 0xc0, 0xb3, 0x29,
+ 0x06, 0x68, 0x90, 0x87, 0xab, 0x64, 0x26, 0xf9, 0x3a, 0x1f, 0x1d, 0x09, 0x43, 0xcb, 0x30, 0x1c,
+ 0xee, 0x85, 0x8d, 0xa8, 0x15, 0x16, 0x65, 0x4e, 0xae, 0x33, 0x94, 0x58, 0x1e, 0xe5, 0xff, 0x43,
+ 0x2c, 0xeb, 0xa2, 0x06, 0x9c, 0x10, 0x14, 0x17, 0xb7, 0x1d, 0x4f, 0x65, 0x56, 0xe5, 0xbe, 0xb7,
+ 0x57, 0x0f, 0xf6, 0xab, 0x27, 0x44, 0xcb, 0x3a, 0xf8, 0x70, 0xbf, 0x4a, 0xb7, 0x64, 0x06, 0x04,
+ 0x67, 0x51, 0xe3, 0x4b, 0xbe, 0xd1, 0xf0, 0xdb, 0x9d, 0x5a, 0xe0, 0x6f, 0xba, 0x2d, 0x52, 0xe4,
+ 0xd6, 0x50, 0x37, 0x30, 0xc5, 0x92, 0x37, 0xca, 0x70, 0x82, 0x1a, 0xba, 0x0f, 0x53, 0x4e, 0xa7,
+ 0x33, 0x1f, 0xb4, 0xfd, 0x40, 0x36, 0x30, 0x96, 0x6f, 0x1f, 0x9b, 0x37, 0x51, 0x79, 0x62, 0xd5,
+ 0x44, 0x21, 0x4e, 0x12, 0xa4, 0x03, 0x25, 0x36, 0x9a, 0x31, 0x50, 0x13, 0xf1, 0x40, 0x89, 0x7d,
+ 0x99, 0x31, 0x50, 0x19, 0x10, 0x9c, 0x45, 0xcd, 0xfe, 0xf3, 0xec, 0x76, 0xc3, 0xa2, 0x9d, 0xb3,
+ 0x47, 0x6e, 0x6d, 0x98, 0xe8, 0x30, 0xb6, 0x2f, 0x92, 0x1e, 0x0a, 0x56, 0xf1, 0x46, 0x9f, 0x6a,
+ 0xf8, 0x07, 0x2c, 0xab, 0xb3, 0xe1, 0x8e, 0x5d, 0xd3, 0xc9, 0x61, 0x93, 0xba, 0xfd, 0xaf, 0x67,
+ 0x99, 0xe8, 0x58, 0xe7, 0xba, 0xf5, 0x61, 0xf1, 0xe4, 0x57, 0x48, 0xc9, 0xb3, 0xf9, 0x56, 0xac,
+ 0x78, 0x7d, 0x89, 0x67, 0xc3, 0x58, 0xd6, 0x45, 0x5f, 0x87, 0x49, 0xd7, 0x73, 0xe3, 0x24, 0xeb,
+ 0x61, 0xe5, 0x64, 0x7e, 0x2c, 0x39, 0x85, 0xa5, 0x27, 0x44, 0xd5, 0x2b, 0xe3, 0x04, 0x31, 0xf4,
+ 0x01, 0xf3, 0x50, 0x96, 0xa4, 0x4b, 0xfd, 0x90, 0xd6, 0x9d, 0x91, 0x25, 0x59, 0x8d, 0x08, 0xea,
+ 0xc2, 0x89, 0x74, 0xb2, 0xf9, 0xb0, 0x62, 0xe7, 0x5f, 0x00, 0xd3, 0xf9, 0xe2, 0xe3, 0xcc, 0x95,
+ 0x69, 0x58, 0x88, 0xb3, 0xe8, 0xa3, 0x5b, 0xc9, 0x54, 0xe0, 0x65, 0xc3, 0xfe, 0x95, 0x4a, 0x07,
+ 0x3e, 0x51, 0x98, 0x05, 0x7c, 0x0b, 0xce, 0x6b, 0x79, 0x8d, 0xaf, 0x07, 0x0e, 0xf3, 0x90, 0x73,
+ 0xd9, 0x69, 0xa4, 0x09, 0xb5, 0xcf, 0x1e, 0xec, 0x57, 0xcf, 0x6f, 0x14, 0x21, 0xe2, 0x62, 0x3a,
+ 0xe8, 0x36, 0x9c, 0xe2, 0x91, 0x90, 0x96, 0x88, 0xd3, 0x6c, 0xb9, 0x9e, 0x92, 0x9a, 0x39, 0xef,
+ 0x3a, 0x7b, 0xb0, 0x5f, 0x3d, 0x35, 0x9f, 0x85, 0x80, 0xb3, 0xeb, 0xa1, 0x77, 0x60, 0xb4, 0xe9,
+ 0x49, 0x2e, 0x3b, 0x64, 0xa4, 0x8e, 0x1e, 0x5d, 0x5a, 0xaf, 0xab, 0xef, 0x8f, 0xff, 0xe0, 0xb8,
+ 0x02, 0xda, 0xe2, 0x06, 0x58, 0xa5, 0x35, 0x1f, 0x4e, 0x05, 0xc8, 0x4d, 0x1a, 0x96, 0x8c, 0xd0,
+ 0x22, 0xdc, 0xf3, 0x40, 0x3d, 0x3f, 0x35, 0xa2, 0x8e, 0x18, 0x84, 0xd1, 0xfb, 0x80, 0x44, 0xbe,
+ 0xaf, 0xf9, 0x06, 0xcb, 0xa8, 0xa9, 0x79, 0x45, 0x2b, 0x3d, 0x49, 0x3d, 0x85, 0x81, 0x33, 0x6a,
+ 0xa1, 0x1b, 0x94, 0x3d, 0xea, 0xa5, 0x82, 0xfd, 0x4a, 0x7d, 0x56, 0x65, 0x89, 0x74, 0x02, 0xc2,
+ 0x1c, 0x79, 0x4d, 0x8a, 0x38, 0x51, 0x0f, 0x35, 0xe1, 0x9c, 0xd3, 0x8d, 0x7c, 0x66, 0xdb, 0x36,
+ 0x51, 0x37, 0xfc, 0x1d, 0xe2, 0x31, 0xb7, 0x92, 0x11, 0x16, 0x78, 0xf7, 0xdc, 0x7c, 0x01, 0x1e,
+ 0x2e, 0xa4, 0x42, 0xaf, 0x53, 0x74, 0x2c, 0x34, 0xb3, 0xb3, 0x11, 0x25, 0x81, 0xfb, 0x62, 0x48,
+ 0x0c, 0xf4, 0x26, 0x8c, 0x6d, 0xfb, 0x61, 0xb4, 0x4e, 0xa2, 0x07, 0x7e, 0xb0, 0x23, 0x12, 0x8c,
+ 0xc4, 0x49, 0x9d, 0x62, 0x10, 0xd6, 0xf1, 0xd0, 0x4b, 0x30, 0xcc, 0x9c, 0x1e, 0x57, 0x97, 0xd8,
+ 0x59, 0x3b, 0x12, 0xf3, 0x98, 0x1b, 0xbc, 0x18, 0x4b, 0xb8, 0x44, 0x5d, 0xad, 0x2d, 0x32, 0x76,
+ 0x9c, 0x40, 0x5d, 0xad, 0x2d, 0x62, 0x09, 0xa7, 0xcb, 0x35, 0xdc, 0x76, 0x02, 0x52, 0x0b, 0xfc,
+ 0x06, 0x09, 0xb5, 0x54, 0x62, 0xcf, 0xf0, 0xf4, 0x29, 0x74, 0xb9, 0xd6, 0xb3, 0x10, 0x70, 0x76,
+ 0x3d, 0x44, 0xd2, 0x39, 0xbd, 0x27, 0xf3, 0x8d, 0xfe, 0x69, 0x71, 0xb0, 0xcf, 0xb4, 0xde, 0x1e,
+ 0x4c, 0xab, 0x6c, 0xe2, 0x3c, 0x61, 0x4a, 0x58, 0x99, 0xca, 0xcf, 0xe9, 0x9f, 0xf9, 0xd6, 0x47,
+ 0xb9, 0x51, 0xac, 0x26, 0x28, 0xe1, 0x14, 0x6d, 0x23, 0xb2, 0xf3, 0x74, 0xcf, 0xc8, 0xce, 0x57,
+ 0x60, 0x34, 0xec, 0xde, 0x6f, 0xfa, 0x6d, 0xc7, 0xf5, 0x98, 0xef, 0x98, 0x76, 0x71, 0xaf, 0x4b,
+ 0x00, 0x8e, 0x71, 0xd0, 0x0a, 0x8c, 0x38, 0xd2, 0x47, 0x02, 0xe5, 0x07, 0xad, 0x54, 0x9e, 0x11,
+ 0x3c, 0x8e, 0x9b, 0xf4, 0x8a, 0x50, 0x75, 0xd1, 0xdb, 0x30, 0x21, 0x02, 0xe3, 0x08, 0x7d, 0xfc,
+ 0x09, 0xf3, 0x29, 0x7f, 0x5d, 0x07, 0x62, 0x13, 0x17, 0xdd, 0x81, 0xb1, 0xc8, 0x6f, 0x09, 0x45,
+ 0x6e, 0x58, 0x39, 0x9d, 0x1f, 0x5b, 0x7a, 0x43, 0xa1, 0xe9, 0xd6, 0x3b, 0x55, 0x15, 0xeb, 0x74,
+ 0xd0, 0x06, 0x5f, 0xef, 0x2c, 0x71, 0x18, 0x09, 0x2b, 0x67, 0xf2, 0xcf, 0x24, 0x95, 0x5f, 0xcc,
+ 0xdc, 0x0e, 0xa2, 0x26, 0xd6, 0xc9, 0xa0, 0xeb, 0x30, 0xd3, 0x09, 0x5c, 0x9f, 0xad, 0x09, 0xe5,
+ 0xf3, 0x51, 0x31, 0x75, 0x48, 0xb5, 0x24, 0x02, 0x4e, 0xd7, 0x61, 0x71, 0x8d, 0x44, 0x61, 0xe5,
+ 0x2c, 0x4f, 0x75, 0xc8, 0xf5, 0x20, 0xbc, 0x0c, 0x2b, 0x28, 0x5a, 0x63, 0x9c, 0x98, 0xeb, 0x29,
+ 0x2b, 0xb3, 0xf9, 0xd1, 0x32, 0x74, 0x7d, 0x26, 0x97, 0xfd, 0xd5, 0x5f, 0x1c, 0x53, 0x40, 0x4d,
+ 0x98, 0x0c, 0xf4, 0x1b, 0x70, 0x58, 0x39, 0x57, 0xe0, 0x79, 0x9e, 0xb8, 0x2e, 0xc7, 0x02, 0x81,
+ 0x51, 0x1c, 0xe2, 0x04, 0x4d, 0xf4, 0x1e, 0x4c, 0x8b, 0xa0, 0x1f, 0xf1, 0x30, 0x9d, 0x8f, 0x5f,
+ 0xe7, 0xe1, 0x04, 0x0c, 0xa7, 0xb0, 0x79, 0xaa, 0x41, 0xe7, 0x7e, 0x8b, 0x08, 0xd6, 0x77, 0xcb,
+ 0xf5, 0x76, 0xc2, 0xca, 0x05, 0xc6, 0x1f, 0x44, 0xaa, 0xc1, 0x24, 0x14, 0x67, 0xd4, 0x40, 0x1b,
+ 0x30, 0xdd, 0x09, 0x08, 0x69, 0xb3, 0x7b, 0x92, 0x38, 0xcf, 0xaa, 0x3c, 0xac, 0x17, 0xed, 0x49,
+ 0x2d, 0x01, 0x3b, 0xcc, 0x28, 0xc3, 0x29, 0x0a, 0xe8, 0x01, 0x8c, 0xf8, 0xbb, 0x24, 0xd8, 0x26,
+ 0x4e, 0xb3, 0x72, 0xb1, 0xe0, 0xcd, 0xa8, 0x38, 0xdc, 0x6e, 0x0b, 0xdc, 0x84, 0x4b, 0x9d, 0x2c,
+ 0xee, 0xed, 0x52, 0x27, 0x1b, 0x43, 0xff, 0x89, 0x05, 0x67, 0xa5, 0x91, 0xba, 0xde, 0xa1, 0xa3,
+ 0xbe, 0xe8, 0x7b, 0x61, 0x14, 0xf0, 0x40, 0x54, 0xcf, 0xe6, 0x07, 0x67, 0xda, 0xc8, 0xa9, 0xa4,
+ 0x4c, 0x25, 0x67, 0xf3, 0x30, 0x42, 0x9c, 0xdf, 0x22, 0xbd, 0xd9, 0x87, 0x24, 0x92, 0xcc, 0x68,
+ 0x3e, 0x5c, 0xf9, 0x60, 0x69, 0xbd, 0xf2, 0x1c, 0x8f, 0xa2, 0x45, 0x37, 0x43, 0x3d, 0x09, 0xc4,
+ 0x69, 0x7c, 0x74, 0x15, 0x4a, 0x7e, 0x58, 0x79, 0x9e, 0xad, 0xed, 0xb3, 0x39, 0xe3, 0x78, 0xbb,
+ 0xce, 0x5d, 0xab, 0x6f, 0xd7, 0x71, 0xc9, 0x0f, 0x65, 0xba, 0x3f, 0x7a, 0x9d, 0x0d, 0x2b, 0x2f,
+ 0x70, 0xc5, 0xba, 0x4c, 0xf7, 0xc7, 0x0a, 0x71, 0x0c, 0x47, 0xdb, 0x30, 0x15, 0x1a, 0x6a, 0x83,
+ 0xb0, 0x72, 0x89, 0x8d, 0xd4, 0x0b, 0x79, 0x93, 0x66, 0x60, 0x6b, 0x79, 0xb8, 0x4c, 0x2a, 0x38,
+ 0x49, 0x96, 0xef, 0x2e, 0x4d, 0x71, 0x11, 0x56, 0x5e, 0xec, 0xb1, 0xbb, 0x34, 0x64, 0x7d, 0x77,
+ 0xe9, 0x34, 0x70, 0x82, 0x26, 0xba, 0xa3, 0x3f, 0xc8, 0xbd, 0x9c, 0xef, 0xa6, 0x9b, 0xf9, 0x14,
+ 0x77, 0x22, 0xf7, 0x19, 0xee, 0x7b, 0x30, 0x2d, 0xcf, 0x12, 0xba, 0x32, 0x03, 0xb7, 0x49, 0x2a,
+ 0x2f, 0xc5, 0x9b, 0xf6, 0x46, 0x02, 0x86, 0x53, 0xd8, 0xb3, 0x3f, 0x02, 0x33, 0x29, 0x39, 0xee,
+ 0x28, 0xef, 0x9b, 0x66, 0x77, 0x60, 0xc2, 0xd8, 0x2b, 0x4f, 0xd7, 0xfd, 0x6d, 0x0c, 0x46, 0x95,
+ 0x5b, 0x52, 0x8e, 0x39, 0x72, 0xe6, 0xb1, 0xcc, 0x91, 0x57, 0x4c, 0xef, 0xb9, 0xb3, 0x49, 0xef,
+ 0xb9, 0x91, 0x9a, 0xdf, 0x34, 0x1c, 0xe6, 0x36, 0x32, 0x22, 0x60, 0xe7, 0x71, 0xf9, 0xfe, 0x1f,
+ 0x74, 0x6a, 0x16, 0xbd, 0x72, 0xdf, 0x6e, 0x78, 0x03, 0x85, 0x46, 0xc2, 0xeb, 0x30, 0xe3, 0xf9,
+ 0xec, 0x22, 0x42, 0x9a, 0x52, 0xca, 0x64, 0xc2, 0xe4, 0xa8, 0x1e, 0xa1, 0x31, 0x81, 0x80, 0xd3,
+ 0x75, 0x68, 0x83, 0x5c, 0x1a, 0x4c, 0x5a, 0x25, 0xb9, 0xb0, 0x88, 0x05, 0x94, 0x5e, 0x80, 0xf9,
+ 0xaf, 0xb0, 0x32, 0x9d, 0x7f, 0x01, 0xe6, 0x95, 0x92, 0x12, 0x67, 0x28, 0x25, 0x4e, 0x66, 0x84,
+ 0xeb, 0xf8, 0xcd, 0xd5, 0x9a, 0xb8, 0xcb, 0x68, 0xb9, 0x29, 0x9a, 0xab, 0x35, 0xcc, 0x61, 0x68,
+ 0x1e, 0x86, 0xd8, 0x0f, 0x19, 0xf9, 0x2a, 0x8f, 0x17, 0xad, 0xd6, 0xb4, 0x9c, 0xca, 0xac, 0x02,
+ 0x16, 0x15, 0x99, 0xfd, 0x81, 0x5e, 0x00, 0x99, 0xfd, 0x61, 0xf8, 0x31, 0xed, 0x0f, 0x92, 0x00,
+ 0x8e, 0x69, 0xa1, 0x87, 0x70, 0xca, 0xb8, 0x74, 0xab, 0x17, 0xae, 0x90, 0xef, 0x64, 0x93, 0x40,
+ 0x5e, 0x38, 0x2f, 0x3a, 0x7d, 0x6a, 0x35, 0x8b, 0x12, 0xce, 0x6e, 0x00, 0xb5, 0x60, 0xa6, 0x91,
+ 0x6a, 0x75, 0xa4, 0xff, 0x56, 0xd5, 0xba, 0x48, 0xb7, 0x98, 0x26, 0x8c, 0xde, 0x86, 0x91, 0x8f,
+ 0x7c, 0xee, 0x10, 0x2b, 0xee, 0x5f, 0x32, 0x3e, 0xd3, 0xc8, 0x07, 0xb7, 0xeb, 0xac, 0xfc, 0x70,
+ 0xbf, 0x3a, 0x56, 0xf3, 0x9b, 0xf2, 0x2f, 0x56, 0x15, 0xd0, 0x5f, 0xb2, 0x60, 0x36, 0x7d, 0xab,
+ 0x57, 0x9d, 0x9e, 0xe8, 0xbf, 0xd3, 0xb6, 0x68, 0x74, 0x76, 0x39, 0x97, 0x1c, 0x2e, 0x68, 0x0a,
+ 0x7d, 0x91, 0xee, 0xa7, 0xd0, 0x7d, 0xc4, 0x5f, 0xb8, 0x68, 0x0e, 0x09, 0x98, 0x95, 0x1e, 0xee,
+ 0x57, 0xa7, 0x38, 0xfb, 0x77, 0x1f, 0xa9, 0x2c, 0x1a, 0xbc, 0x02, 0xfa, 0x31, 0x38, 0x15, 0xa4,
+ 0xb5, 0xec, 0x44, 0xde, 0x34, 0x3e, 0xdb, 0xcf, 0x51, 0x92, 0x9c, 0x70, 0x9c, 0x45, 0x10, 0x67,
+ 0xb7, 0x83, 0xfe, 0xaa, 0x05, 0xcf, 0x90, 0x7c, 0x0b, 0xae, 0xb8, 0x2a, 0xbc, 0x96, 0xd3, 0x8f,
+ 0x02, 0xdb, 0x2f, 0x4b, 0x30, 0xf0, 0x4c, 0x01, 0x02, 0x2e, 0x6a, 0xd7, 0xfe, 0xc7, 0x16, 0xb3,
+ 0xfa, 0x08, 0x54, 0x12, 0x76, 0x5b, 0xd1, 0x31, 0x38, 0xc7, 0x2e, 0x1b, 0xae, 0x25, 0x8f, 0xed,
+ 0xdd, 0xfa, 0xdf, 0x5a, 0xcc, 0xbb, 0xf5, 0x18, 0xdf, 0xe9, 0x7e, 0x00, 0x23, 0x91, 0x68, 0x4d,
+ 0x74, 0x3d, 0xcf, 0x13, 0x4f, 0x76, 0x8a, 0x79, 0xf8, 0xaa, 0x1b, 0xa6, 0x2c, 0xc5, 0x8a, 0x8c,
+ 0xfd, 0x5f, 0xf1, 0x19, 0x90, 0x90, 0x63, 0x30, 0x6e, 0x2f, 0x99, 0xc6, 0xed, 0x6a, 0x8f, 0x2f,
+ 0xc8, 0x31, 0x72, 0xff, 0x03, 0xb3, 0xdf, 0x4c, 0xb3, 0xfa, 0x49, 0x77, 0xab, 0xb6, 0xbf, 0x6b,
+ 0x01, 0xc4, 0xe9, 0x94, 0xfa, 0x48, 0x8c, 0x7f, 0x8d, 0xde, 0x29, 0xfd, 0xc8, 0x6f, 0xf8, 0x2d,
+ 0x61, 0x5c, 0x3b, 0x17, 0xdb, 0xd7, 0x79, 0xf9, 0xa1, 0xf6, 0x1b, 0x2b, 0x6c, 0x54, 0x95, 0xf1,
+ 0xcd, 0xcb, 0xb1, 0x5b, 0x8b, 0x11, 0xdb, 0xfc, 0x67, 0x2c, 0x38, 0x99, 0xf5, 0xe8, 0x0b, 0xbd,
+ 0x02, 0x23, 0x5c, 0xc7, 0xac, 0x5c, 0xde, 0xd5, 0x6c, 0xde, 0x15, 0xe5, 0x58, 0x61, 0xf4, 0xeb,
+ 0xfa, 0x7e, 0xc4, 0x54, 0x3f, 0xb7, 0x61, 0xa2, 0x16, 0x10, 0x4d, 0xee, 0x79, 0x37, 0xce, 0x42,
+ 0x36, 0xba, 0xf0, 0xca, 0x91, 0x23, 0xa9, 0xd9, 0xbf, 0x54, 0x82, 0x93, 0xdc, 0x71, 0x73, 0x7e,
+ 0xd7, 0x77, 0x9b, 0x35, 0xbf, 0x29, 0x9e, 0xea, 0x7f, 0x15, 0xc6, 0x3b, 0x9a, 0x61, 0xa0, 0x28,
+ 0x6d, 0x85, 0x6e, 0x40, 0x88, 0x55, 0x99, 0x7a, 0x29, 0x36, 0x68, 0xa1, 0x26, 0x8c, 0x93, 0x5d,
+ 0xb7, 0xa1, 0x1c, 0xc3, 0x4a, 0x47, 0x16, 0x1e, 0x54, 0x2b, 0xcb, 0x1a, 0x1d, 0x6c, 0x50, 0xed,
+ 0xfb, 0xb9, 0x85, 0x26, 0x3a, 0x0e, 0xf4, 0x70, 0x06, 0xfb, 0x59, 0x0b, 0xce, 0xe4, 0x24, 0xb9,
+ 0xa0, 0xcd, 0x3d, 0x60, 0x2e, 0xb2, 0x62, 0xd9, 0xaa, 0xe6, 0xb8, 0xe3, 0x2c, 0x16, 0x50, 0xf4,
+ 0x65, 0x80, 0x4e, 0x9c, 0x1a, 0xb8, 0x47, 0x36, 0x00, 0x23, 0x2e, 0xb8, 0x16, 0xe2, 0x59, 0x65,
+ 0x10, 0xd6, 0x68, 0xd9, 0x3f, 0x33, 0x00, 0x83, 0xcc, 0x07, 0x0f, 0xd5, 0x60, 0x78, 0x9b, 0x47,
+ 0x20, 0x2d, 0x9c, 0x37, 0x8a, 0x2b, 0x43, 0x9a, 0xc6, 0xf3, 0xa6, 0x95, 0x62, 0x49, 0x06, 0xad,
+ 0xc1, 0x09, 0x9e, 0xf6, 0xb8, 0xb5, 0x44, 0x5a, 0xce, 0x9e, 0xd4, 0xb9, 0x97, 0xd8, 0xa7, 0x2a,
+ 0xdb, 0xc3, 0x6a, 0x1a, 0x05, 0x67, 0xd5, 0x43, 0xef, 0xc2, 0x64, 0xe4, 0xb6, 0x89, 0xdf, 0x8d,
+ 0x4c, 0x77, 0x53, 0x75, 0x2d, 0xdc, 0x30, 0xa0, 0x38, 0x81, 0x8d, 0xde, 0x86, 0x89, 0x4e, 0xca,
+ 0xba, 0x30, 0x18, 0xab, 0xe1, 0x4c, 0x8b, 0x82, 0x89, 0xcb, 0xde, 0x7d, 0x75, 0xd9, 0x2b, 0xb7,
+ 0x8d, 0xed, 0x80, 0x84, 0xdb, 0x7e, 0xab, 0xc9, 0x24, 0xf3, 0x41, 0xed, 0xdd, 0x57, 0x02, 0x8e,
+ 0x53, 0x35, 0x28, 0x95, 0x4d, 0xc7, 0x6d, 0x75, 0x03, 0x12, 0x53, 0x19, 0x32, 0xa9, 0xac, 0x24,
+ 0xe0, 0x38, 0x55, 0xa3, 0xb7, 0xd9, 0x64, 0xf8, 0xc9, 0x98, 0x4d, 0xec, 0xbf, 0x5b, 0x02, 0x63,
+ 0x6a, 0x7f, 0x88, 0xb3, 0x18, 0xbf, 0x03, 0x03, 0x5b, 0x41, 0xa7, 0x21, 0xfc, 0x4d, 0x33, 0xbf,
+ 0xec, 0x3a, 0xae, 0x2d, 0xea, 0x5f, 0x46, 0xff, 0x63, 0x56, 0x8b, 0xee, 0xf1, 0x53, 0xc2, 0xfb,
+ 0x5a, 0x06, 0x29, 0x56, 0xcf, 0x2b, 0x87, 0xa5, 0x26, 0xa2, 0x20, 0x9c, 0xbf, 0x78, 0x23, 0xa6,
+ 0xfc, 0xb7, 0x35, 0x53, 0xb8, 0xd0, 0x43, 0x48, 0x2a, 0xe8, 0x2a, 0x8c, 0x89, 0xc4, 0xb2, 0xec,
+ 0x15, 0x20, 0xdf, 0x4c, 0xcc, 0x95, 0x74, 0x29, 0x2e, 0xc6, 0x3a, 0x8e, 0xfd, 0x97, 0x4b, 0x70,
+ 0x22, 0xe3, 0x19, 0x37, 0x3f, 0x46, 0xb6, 0xdc, 0x30, 0x0a, 0xf6, 0x92, 0x87, 0x13, 0x16, 0xe5,
+ 0x58, 0x61, 0x50, 0x5e, 0xc5, 0x0f, 0xaa, 0xe4, 0xe1, 0x24, 0x9e, 0x49, 0x0a, 0xe8, 0xd1, 0x0e,
+ 0x27, 0x7a, 0x6c, 0x77, 0x43, 0x22, 0x33, 0x87, 0xa8, 0x63, 0x9b, 0xb9, 0x64, 0x30, 0x08, 0xbd,
+ 0x9a, 0x6e, 0x29, 0x3f, 0x03, 0xed, 0x6a, 0xca, 0x3d, 0x0d, 0x38, 0x8c, 0x76, 0x2e, 0x22, 0x9e,
+ 0xe3, 0x45, 0xe2, 0x02, 0x1b, 0x47, 0x94, 0x67, 0xa5, 0x58, 0x40, 0xed, 0xef, 0x95, 0xe1, 0x6c,
+ 0x6e, 0x60, 0x07, 0xda, 0xf5, 0xb6, 0xef, 0xb9, 0x91, 0xaf, 0x7c, 0x74, 0x79, 0x14, 0x79, 0xd2,
+ 0xd9, 0x5e, 0x13, 0xe5, 0x58, 0x61, 0xa0, 0x4b, 0x30, 0xc8, 0x2c, 0x12, 0xc9, 0xa4, 0x92, 0x78,
+ 0x61, 0x89, 0xc7, 0xd8, 0xe5, 0x60, 0xed, 0x54, 0x2f, 0x17, 0x9e, 0xea, 0xcf, 0x51, 0x09, 0xc6,
+ 0x6f, 0x25, 0x0f, 0x14, 0xda, 0x5d, 0xdf, 0x6f, 0x61, 0x06, 0x44, 0x2f, 0x88, 0xf1, 0x4a, 0x38,
+ 0xa5, 0x62, 0xa7, 0xe9, 0x87, 0xda, 0xa0, 0x71, 0x07, 0xf8, 0xc0, 0xf5, 0xb6, 0x92, 0xce, 0xca,
+ 0x37, 0x79, 0x31, 0x96, 0x70, 0xba, 0x97, 0xe2, 0xdc, 0xf8, 0xc3, 0xf9, 0x7b, 0x49, 0x65, 0xc0,
+ 0xef, 0x99, 0x16, 0x5f, 0x5f, 0x01, 0x23, 0x3d, 0xc5, 0x93, 0x9f, 0x2a, 0xc3, 0x14, 0x5e, 0x58,
+ 0xfa, 0x74, 0x22, 0xee, 0xa4, 0x27, 0xa2, 0x7f, 0xb3, 0xd9, 0x93, 0x9a, 0x8d, 0x7f, 0x68, 0xc1,
+ 0x14, 0x4b, 0x6f, 0x2b, 0xa2, 0x32, 0xb9, 0xbe, 0x77, 0x0c, 0x57, 0x81, 0xe7, 0x60, 0x30, 0xa0,
+ 0x8d, 0x8a, 0x19, 0x54, 0x7b, 0x9c, 0xf5, 0x04, 0x73, 0x18, 0x3a, 0x07, 0x03, 0xac, 0x0b, 0x74,
+ 0xf2, 0xc6, 0x39, 0x0b, 0x5e, 0x72, 0x22, 0x07, 0xb3, 0x52, 0x16, 0x1f, 0x16, 0x93, 0x4e, 0xcb,
+ 0xe5, 0x9d, 0x8e, 0xfd, 0x45, 0x3e, 0x19, 0x21, 0x9f, 0x32, 0xbb, 0xf6, 0xf1, 0xe2, 0xc3, 0x66,
+ 0x93, 0x2c, 0xbe, 0x66, 0xff, 0x71, 0x09, 0x2e, 0x64, 0xd6, 0xeb, 0x3b, 0x3e, 0x6c, 0x71, 0xed,
+ 0xa7, 0x99, 0x0c, 0xb3, 0x7c, 0x8c, 0x4f, 0x41, 0x06, 0xfa, 0x95, 0xfe, 0x07, 0xfb, 0x08, 0xdb,
+ 0x9a, 0x39, 0x64, 0x9f, 0x90, 0xb0, 0xad, 0x99, 0x7d, 0xcb, 0x51, 0x13, 0xfc, 0x69, 0x29, 0xe7,
+ 0x5b, 0x98, 0xc2, 0xe0, 0x32, 0xe5, 0x33, 0x0c, 0x18, 0xca, 0x4b, 0x38, 0xe7, 0x31, 0xbc, 0x0c,
+ 0x2b, 0x28, 0x9a, 0x87, 0xa9, 0xb6, 0xeb, 0x51, 0xe6, 0xb3, 0x67, 0x8a, 0xe2, 0xca, 0x90, 0xb4,
+ 0x66, 0x82, 0x71, 0x12, 0x1f, 0xb9, 0x5a, 0x48, 0x57, 0xfe, 0x75, 0x6f, 0x1f, 0x69, 0xd7, 0xcd,
+ 0x99, 0xbe, 0x34, 0x6a, 0x14, 0x33, 0xc2, 0xbb, 0xae, 0x69, 0x7a, 0xa2, 0x72, 0xff, 0x7a, 0xa2,
+ 0xf1, 0x6c, 0x1d, 0xd1, 0xec, 0xdb, 0x30, 0xf1, 0xd8, 0xf6, 0x1f, 0xfb, 0xfb, 0x65, 0x78, 0xa6,
+ 0x60, 0xdb, 0x73, 0x5e, 0x6f, 0xcc, 0x81, 0xc6, 0xeb, 0x53, 0xf3, 0x50, 0x83, 0x93, 0x9b, 0xdd,
+ 0x56, 0x6b, 0x8f, 0x3d, 0x6c, 0x25, 0x4d, 0x89, 0x21, 0x64, 0x4a, 0xf5, 0xf4, 0x6d, 0x25, 0x03,
+ 0x07, 0x67, 0xd6, 0xa4, 0x57, 0x2c, 0x7a, 0x92, 0xec, 0x29, 0x52, 0x89, 0x2b, 0x16, 0xd6, 0x81,
+ 0xd8, 0xc4, 0x45, 0xd7, 0x61, 0xc6, 0xd9, 0x75, 0x5c, 0x9e, 0x4c, 0x48, 0x12, 0xe0, 0x77, 0x2c,
+ 0xa5, 0x23, 0x9f, 0x4f, 0x22, 0xe0, 0x74, 0x9d, 0x1c, 0x53, 0x55, 0xf9, 0xb1, 0x4c, 0x55, 0x66,
+ 0x70, 0xd1, 0xa1, 0xfc, 0xe0, 0xa2, 0xc5, 0x7c, 0xb1, 0x67, 0x1e, 0xd6, 0x0f, 0x61, 0xe2, 0xa8,
+ 0x3e, 0xf1, 0x2f, 0xc1, 0xb0, 0x78, 0xc3, 0x93, 0x7c, 0xaf, 0x29, 0xf3, 0xff, 0x4b, 0xb8, 0xfd,
+ 0xbf, 0x5a, 0xa0, 0x74, 0xdc, 0x66, 0x1e, 0x81, 0xb7, 0x99, 0x83, 0x3f, 0xd7, 0xce, 0x6b, 0x6f,
+ 0x45, 0x4f, 0x69, 0x0e, 0xfe, 0x31, 0x10, 0x9b, 0xb8, 0x7c, 0xb9, 0x85, 0x71, 0xc4, 0x1a, 0xe3,
+ 0x02, 0x21, 0x6c, 0xab, 0x0a, 0x03, 0x7d, 0x05, 0x86, 0x9b, 0xee, 0xae, 0x1b, 0x0a, 0x3d, 0xda,
+ 0x91, 0x6d, 0x93, 0xf1, 0xf7, 0x2d, 0x71, 0x32, 0x58, 0xd2, 0xb3, 0xff, 0x8a, 0x05, 0xca, 0x28,
+ 0x7c, 0x83, 0x38, 0xad, 0x68, 0x1b, 0xbd, 0x07, 0x20, 0x29, 0x28, 0xdd, 0x9b, 0x74, 0x55, 0x03,
+ 0xac, 0x20, 0x87, 0xc6, 0x3f, 0xac, 0xd5, 0x41, 0xef, 0xc2, 0xd0, 0x36, 0xa3, 0x25, 0xbe, 0xed,
+ 0x92, 0x32, 0xc1, 0xb1, 0xd2, 0xc3, 0xfd, 0xea, 0x49, 0xb3, 0x4d, 0x79, 0x8a, 0xf1, 0x5a, 0xf6,
+ 0x4f, 0x95, 0xe2, 0x39, 0xfd, 0xa0, 0xeb, 0x47, 0xce, 0x31, 0x48, 0x22, 0xd7, 0x0d, 0x49, 0xe4,
+ 0x85, 0x22, 0xab, 0x37, 0xeb, 0x52, 0xae, 0x04, 0x72, 0x3b, 0x21, 0x81, 0xbc, 0xd8, 0x9b, 0x54,
+ 0xb1, 0xe4, 0xf1, 0x5f, 0x5b, 0x30, 0x63, 0xe0, 0x1f, 0xc3, 0x01, 0xb8, 0x62, 0x1e, 0x80, 0xcf,
+ 0xf6, 0xfc, 0x86, 0x9c, 0x83, 0xef, 0x27, 0xca, 0x89, 0xbe, 0xb3, 0x03, 0xef, 0x23, 0x18, 0xd8,
+ 0x76, 0x82, 0xa6, 0xb8, 0xd7, 0x5f, 0xe9, 0x6b, 0xac, 0xe7, 0x6e, 0x38, 0x81, 0x70, 0x73, 0x79,
+ 0x45, 0x8e, 0x3a, 0x2d, 0xea, 0xe9, 0xe2, 0xc2, 0x9a, 0x42, 0xd7, 0x60, 0x28, 0x6c, 0xf8, 0x1d,
+ 0xf5, 0x24, 0xf4, 0x22, 0x1b, 0x68, 0x56, 0x72, 0xb8, 0x5f, 0x45, 0x66, 0x73, 0xb4, 0x18, 0x0b,
+ 0x7c, 0xf4, 0x55, 0x98, 0x60, 0xbf, 0x94, 0xcf, 0x69, 0x39, 0x5f, 0x03, 0x53, 0xd7, 0x11, 0xb9,
+ 0x43, 0xb6, 0x51, 0x84, 0x4d, 0x52, 0xb3, 0x5b, 0x30, 0xaa, 0x3e, 0xeb, 0xa9, 0x7a, 0x24, 0xfc,
+ 0x8b, 0x32, 0x9c, 0xc8, 0x58, 0x73, 0x28, 0x34, 0x66, 0xe2, 0x6a, 0x9f, 0x4b, 0xf5, 0x63, 0xce,
+ 0x45, 0xc8, 0x2e, 0x80, 0x4d, 0xb1, 0xb6, 0xfa, 0x6e, 0xf4, 0x4e, 0x48, 0x92, 0x8d, 0xd2, 0xa2,
+ 0xde, 0x8d, 0xd2, 0xc6, 0x8e, 0x6d, 0xa8, 0x69, 0x43, 0xaa, 0xa7, 0x4f, 0x75, 0x4e, 0x7f, 0x6b,
+ 0x00, 0x4e, 0x66, 0x39, 0xe2, 0xa0, 0x1f, 0x85, 0x21, 0xf6, 0x9c, 0xaf, 0xf0, 0xfd, 0x6b, 0x56,
+ 0xcd, 0x39, 0xf6, 0x22, 0x50, 0x84, 0xa2, 0x9e, 0x93, 0xec, 0x88, 0x17, 0xf6, 0x1c, 0x66, 0xd1,
+ 0x26, 0x0b, 0x11, 0x27, 0x4e, 0x4f, 0xc9, 0x3e, 0x3e, 0xdf, 0x77, 0x07, 0xc4, 0xf9, 0x1b, 0x26,
+ 0xfc, 0xd9, 0x64, 0x71, 0x6f, 0x7f, 0x36, 0xd9, 0x32, 0x5a, 0x85, 0xa1, 0x06, 0x77, 0x94, 0x2a,
+ 0xf7, 0x66, 0x61, 0xdc, 0x4b, 0x4a, 0x31, 0x60, 0xe1, 0x1d, 0x25, 0x08, 0xcc, 0xba, 0x30, 0xa6,
+ 0x0d, 0xcc, 0x53, 0x5d, 0x3c, 0x3b, 0xf4, 0xe0, 0xd3, 0x86, 0xe0, 0xa9, 0x2e, 0xa0, 0xbf, 0xae,
+ 0x9d, 0xfd, 0x82, 0x1f, 0x7c, 0xce, 0x90, 0x9d, 0xce, 0x25, 0x1e, 0x59, 0x26, 0xf6, 0x15, 0x93,
+ 0xa5, 0xea, 0x66, 0x0e, 0x87, 0xdc, 0x44, 0x74, 0xe6, 0x81, 0x5f, 0x9c, 0xb7, 0xc1, 0xfe, 0x59,
+ 0x0b, 0x12, 0xcf, 0xe0, 0x94, 0xba, 0xd3, 0xca, 0x55, 0x77, 0x5e, 0x84, 0x81, 0xc0, 0x6f, 0x49,
+ 0x79, 0x4a, 0x61, 0x60, 0xbf, 0x45, 0x30, 0x83, 0x50, 0x8c, 0x28, 0x56, 0x62, 0x8d, 0xeb, 0x17,
+ 0x74, 0x71, 0xf5, 0x7e, 0x0e, 0x06, 0x5b, 0x64, 0x97, 0xb4, 0x92, 0xf9, 0x98, 0x6f, 0xd1, 0x42,
+ 0xcc, 0x61, 0xf6, 0x3f, 0x1c, 0x80, 0xf3, 0x85, 0x91, 0x24, 0xa9, 0x80, 0xb9, 0xe5, 0x44, 0xe4,
+ 0x81, 0xb3, 0x97, 0xcc, 0x43, 0x7a, 0x9d, 0x17, 0x63, 0x09, 0x67, 0xef, 0xee, 0x79, 0x6e, 0xad,
+ 0x84, 0x72, 0x58, 0xa4, 0xd4, 0x12, 0x50, 0x53, 0xd9, 0x58, 0x7e, 0x12, 0xca, 0xc6, 0xd7, 0x00,
+ 0xc2, 0xb0, 0xc5, 0xbd, 0x5d, 0x9b, 0xe2, 0x41, 0x7f, 0x1c, 0xe9, 0xa4, 0x7e, 0x4b, 0x40, 0xb0,
+ 0x86, 0x85, 0x96, 0x60, 0xba, 0x13, 0xf8, 0x11, 0xd7, 0xb5, 0x2f, 0x71, 0x87, 0xf0, 0x41, 0x33,
+ 0x88, 0x5f, 0x2d, 0x01, 0xc7, 0xa9, 0x1a, 0xe8, 0x4d, 0x18, 0x13, 0x81, 0xfd, 0x6a, 0xbe, 0xdf,
+ 0x12, 0xea, 0x3d, 0xe5, 0x23, 0x5d, 0x8f, 0x41, 0x58, 0xc7, 0xd3, 0xaa, 0x31, 0x05, 0xfe, 0x70,
+ 0x66, 0x35, 0xae, 0xc4, 0xd7, 0xf0, 0x12, 0x49, 0x40, 0x46, 0xfa, 0x4a, 0x02, 0x12, 0x2b, 0x3c,
+ 0x47, 0xfb, 0xb6, 0x27, 0x43, 0x4f, 0x15, 0xe1, 0xaf, 0x0c, 0xc0, 0x09, 0xb1, 0x70, 0x9e, 0xf6,
+ 0x72, 0xb9, 0x93, 0x5e, 0x2e, 0x4f, 0x42, 0x25, 0xfa, 0xe9, 0x9a, 0x39, 0xee, 0x35, 0xf3, 0xd3,
+ 0x16, 0x98, 0x32, 0x24, 0xfa, 0x8f, 0x72, 0x13, 0x39, 0xbf, 0x99, 0x2b, 0x93, 0xc6, 0x19, 0x02,
+ 0x3e, 0x5e, 0x4a, 0x67, 0xfb, 0x7f, 0xb6, 0xe0, 0xd9, 0x9e, 0x14, 0xd1, 0x32, 0x8c, 0x32, 0x41,
+ 0x57, 0xbb, 0x17, 0xbf, 0xa8, 0x1e, 0x8c, 0x48, 0x40, 0x8e, 0xdc, 0x1d, 0xd7, 0x44, 0xcb, 0xa9,
+ 0x8c, 0xd9, 0x2f, 0x65, 0x64, 0xcc, 0x3e, 0x65, 0x0c, 0xcf, 0x63, 0xa6, 0xcc, 0xfe, 0x49, 0x7a,
+ 0xe2, 0x98, 0xaf, 0x4e, 0x3f, 0x6f, 0xa8, 0x73, 0xed, 0x84, 0x3a, 0x17, 0x99, 0xd8, 0xda, 0x19,
+ 0xf2, 0x1e, 0x4c, 0xb3, 0x88, 0xbf, 0xec, 0xf9, 0x92, 0x78, 0xae, 0x5a, 0x8a, 0xbd, 0x9d, 0x6f,
+ 0x25, 0x60, 0x38, 0x85, 0x6d, 0xff, 0x9b, 0x32, 0x0c, 0xf1, 0xed, 0x77, 0x0c, 0x17, 0xdf, 0x97,
+ 0x61, 0xd4, 0x6d, 0xb7, 0xbb, 0x3c, 0x09, 0xf2, 0x60, 0xec, 0xf0, 0xbe, 0x2a, 0x0b, 0x71, 0x0c,
+ 0x47, 0x2b, 0xc2, 0x92, 0x50, 0x90, 0x54, 0x80, 0x77, 0x7c, 0x6e, 0xc9, 0x89, 0x1c, 0x2e, 0xc5,
+ 0xa9, 0x73, 0x36, 0xb6, 0x39, 0xa0, 0x6f, 0x00, 0x84, 0x51, 0xe0, 0x7a, 0x5b, 0xb4, 0x4c, 0x64,
+ 0x9e, 0xf9, 0x6c, 0x01, 0xb5, 0xba, 0x42, 0xe6, 0x34, 0x63, 0x9e, 0xa3, 0x00, 0x58, 0xa3, 0x88,
+ 0xe6, 0x8c, 0x93, 0x7e, 0x36, 0x31, 0x77, 0xc0, 0xa9, 0xc6, 0x73, 0x36, 0xfb, 0x05, 0x18, 0x55,
+ 0xc4, 0x7b, 0xe9, 0x15, 0xc7, 0x75, 0x81, 0xed, 0x4b, 0x30, 0x95, 0xe8, 0xdb, 0x91, 0xd4, 0x92,
+ 0xbf, 0x6e, 0xc1, 0x14, 0xef, 0xcc, 0xb2, 0xb7, 0x2b, 0x4e, 0x83, 0x47, 0x70, 0xb2, 0x95, 0xc1,
+ 0x95, 0xc5, 0xf4, 0xf7, 0xcf, 0xc5, 0x95, 0x1a, 0x32, 0x0b, 0x8a, 0x33, 0xdb, 0x40, 0x97, 0xe9,
+ 0x8e, 0xa3, 0x5c, 0xd7, 0x69, 0x89, 0x98, 0x2b, 0xe3, 0x7c, 0xb7, 0xf1, 0x32, 0xac, 0xa0, 0xf6,
+ 0x1f, 0x58, 0x30, 0xc3, 0x7b, 0x7e, 0x93, 0xec, 0x29, 0xde, 0xf4, 0x83, 0xec, 0xbb, 0x48, 0xbf,
+ 0x5f, 0xca, 0x49, 0xbf, 0xaf, 0x7f, 0x5a, 0xb9, 0xf0, 0xd3, 0x7e, 0xc9, 0x02, 0xb1, 0x42, 0x8e,
+ 0x41, 0xd3, 0xf2, 0x23, 0xa6, 0xa6, 0x65, 0x36, 0x7f, 0x13, 0xe4, 0xa8, 0x58, 0xfe, 0xbd, 0x05,
+ 0xd3, 0x1c, 0x41, 0x8b, 0x62, 0xf7, 0x83, 0x9c, 0x87, 0x05, 0xf3, 0x8b, 0x32, 0xdd, 0x5a, 0x6f,
+ 0x92, 0xbd, 0x0d, 0xbf, 0xe6, 0x44, 0xdb, 0xd9, 0x1f, 0x65, 0x4c, 0xd6, 0x40, 0xe1, 0x64, 0x35,
+ 0xe5, 0x06, 0x32, 0x12, 0xad, 0xf6, 0x50, 0x00, 0x1f, 0x35, 0xd1, 0xaa, 0xfd, 0x47, 0x16, 0x20,
+ 0xde, 0x8c, 0x21, 0xb8, 0x51, 0x71, 0x88, 0x95, 0x66, 0x06, 0x0b, 0x54, 0x10, 0xac, 0x61, 0x3d,
+ 0x91, 0xe1, 0x49, 0xb8, 0xb2, 0x94, 0x7b, 0xbb, 0xb2, 0x1c, 0x61, 0x44, 0x7f, 0x69, 0x18, 0x92,
+ 0x0f, 0x56, 0xd1, 0x5d, 0x18, 0x6f, 0x38, 0x1d, 0xe7, 0xbe, 0xdb, 0x72, 0x23, 0x97, 0x84, 0x45,
+ 0x7e, 0x6e, 0x8b, 0x1a, 0x9e, 0x70, 0x3e, 0xd0, 0x4a, 0xb0, 0x41, 0x07, 0xcd, 0x01, 0x74, 0x02,
+ 0x77, 0xd7, 0x6d, 0x91, 0x2d, 0xa6, 0x10, 0x62, 0x51, 0x9e, 0xb8, 0xd3, 0x9d, 0x2c, 0xc5, 0x1a,
+ 0x46, 0x46, 0x70, 0x95, 0xf2, 0x53, 0x0e, 0xae, 0x02, 0xc7, 0x16, 0x5c, 0x65, 0xe0, 0x48, 0xc1,
+ 0x55, 0x46, 0x8e, 0x1c, 0x5c, 0x65, 0xb0, 0xaf, 0xe0, 0x2a, 0x18, 0x4e, 0x4b, 0xd9, 0x93, 0xfe,
+ 0x5f, 0x71, 0x5b, 0x44, 0x5c, 0x38, 0x78, 0x68, 0xaa, 0xd9, 0x83, 0xfd, 0xea, 0x69, 0x9c, 0x89,
+ 0x81, 0x73, 0x6a, 0xa2, 0x2f, 0x43, 0xc5, 0x69, 0xb5, 0xfc, 0x07, 0x6a, 0x52, 0x97, 0xc3, 0x86,
+ 0xd3, 0x8a, 0xc3, 0x32, 0x8e, 0x2c, 0x9c, 0x3b, 0xd8, 0xaf, 0x56, 0xe6, 0x73, 0x70, 0x70, 0x6e,
+ 0x6d, 0xf4, 0x0e, 0x8c, 0x76, 0x02, 0xbf, 0xb1, 0xa6, 0xbd, 0xaa, 0xbf, 0x40, 0x07, 0xb0, 0x26,
+ 0x0b, 0x0f, 0xf7, 0xab, 0x13, 0xea, 0x0f, 0x3b, 0xf0, 0xe3, 0x0a, 0x19, 0x71, 0x4b, 0xc6, 0x9e,
+ 0x76, 0xdc, 0x92, 0xf1, 0x27, 0x1c, 0xb7, 0xc4, 0xde, 0x81, 0x13, 0x75, 0x12, 0xb8, 0x4e, 0xcb,
+ 0x7d, 0x44, 0x65, 0x72, 0xc9, 0x03, 0x37, 0x60, 0x34, 0x48, 0x70, 0xfd, 0xbe, 0x92, 0x09, 0x68,
+ 0x7a, 0x19, 0xc9, 0xe5, 0x63, 0x42, 0xf6, 0xff, 0x6b, 0xc1, 0xb0, 0x78, 0x04, 0x7b, 0x0c, 0x92,
+ 0xe9, 0xbc, 0x61, 0x92, 0xa9, 0x66, 0x4f, 0x0a, 0xeb, 0x4c, 0xae, 0x31, 0x66, 0x35, 0x61, 0x8c,
+ 0x79, 0xb6, 0x88, 0x48, 0xb1, 0x19, 0xe6, 0x3f, 0x2b, 0xd3, 0x1b, 0x82, 0x11, 0x8e, 0xe1, 0xe9,
+ 0x0f, 0xc1, 0x3a, 0x0c, 0x87, 0x22, 0x1c, 0x40, 0x29, 0xff, 0x8d, 0x51, 0x72, 0x12, 0x63, 0x1f,
+ 0x48, 0x11, 0x00, 0x40, 0x12, 0xc9, 0x8c, 0x33, 0x50, 0x7e, 0x8a, 0x71, 0x06, 0x7a, 0x05, 0xac,
+ 0x18, 0x78, 0x12, 0x01, 0x2b, 0xec, 0xdf, 0x60, 0xa7, 0xb3, 0x5e, 0x7e, 0x0c, 0x82, 0xdb, 0x75,
+ 0xf3, 0x1c, 0xb7, 0x0b, 0x56, 0x96, 0xe8, 0x54, 0x8e, 0x00, 0xf7, 0x6b, 0x16, 0x9c, 0xcf, 0xf8,
+ 0x2a, 0x4d, 0x9a, 0x7b, 0x05, 0x46, 0x9c, 0x6e, 0xd3, 0x55, 0x7b, 0x59, 0xb3, 0x16, 0xcf, 0x8b,
+ 0x72, 0xac, 0x30, 0xd0, 0x22, 0xcc, 0x90, 0x54, 0x7c, 0x61, 0x1e, 0xb9, 0x8b, 0xbd, 0x9c, 0x4e,
+ 0x07, 0x17, 0x4e, 0xe3, 0xab, 0xa0, 0x77, 0xe5, 0xdc, 0xa0, 0x77, 0x7f, 0xcf, 0x82, 0x31, 0xf5,
+ 0x20, 0xfe, 0xa9, 0x8f, 0xf6, 0x7b, 0xe6, 0x68, 0x3f, 0x53, 0x30, 0xda, 0x39, 0xc3, 0xfc, 0x7b,
+ 0x25, 0xd5, 0xdf, 0x9a, 0x1f, 0x44, 0x7d, 0x48, 0x89, 0x8f, 0xff, 0xec, 0xe5, 0x2a, 0x8c, 0x39,
+ 0x9d, 0x8e, 0x04, 0x48, 0xff, 0x45, 0x96, 0x1a, 0x26, 0x2e, 0xc6, 0x3a, 0x8e, 0x7a, 0x85, 0x53,
+ 0xce, 0x7d, 0x85, 0xd3, 0x04, 0x88, 0x9c, 0x60, 0x8b, 0x44, 0xb4, 0x4c, 0xb8, 0x5b, 0xe7, 0xf3,
+ 0x9b, 0x6e, 0xe4, 0xb6, 0xe6, 0x5c, 0x2f, 0x0a, 0xa3, 0x60, 0x6e, 0xd5, 0x8b, 0x6e, 0x07, 0xfc,
+ 0x9a, 0xaa, 0x85, 0x96, 0x54, 0xb4, 0xb0, 0x46, 0x57, 0x06, 0x7f, 0x61, 0x6d, 0x0c, 0x9a, 0x8e,
+ 0x30, 0xeb, 0xa2, 0x1c, 0x2b, 0x0c, 0xfb, 0x0b, 0xec, 0xf4, 0x61, 0x63, 0x7a, 0xb4, 0x90, 0x89,
+ 0x7f, 0x3c, 0xae, 0x66, 0x83, 0x99, 0x84, 0x97, 0xf4, 0xc0, 0x8c, 0xc5, 0xcc, 0x9e, 0x36, 0xac,
+ 0xbf, 0xb3, 0x8d, 0xa3, 0x37, 0xa2, 0xaf, 0xa5, 0x9c, 0x9b, 0x5e, 0xed, 0x71, 0x6a, 0x1c, 0xc1,
+ 0x9d, 0x89, 0xe5, 0x89, 0x64, 0x59, 0xf4, 0x56, 0x6b, 0x62, 0x5f, 0x68, 0x79, 0x22, 0x05, 0x00,
+ 0xc7, 0x38, 0x54, 0x60, 0x53, 0x7f, 0xc2, 0x0a, 0x8a, 0xd3, 0x09, 0x28, 0xec, 0x10, 0x6b, 0x18,
+ 0xe8, 0x8a, 0x50, 0x5a, 0x70, 0xdb, 0xc3, 0x33, 0x09, 0xa5, 0x85, 0x1c, 0x2e, 0x4d, 0xd3, 0x74,
+ 0x15, 0xc6, 0xc8, 0xc3, 0x88, 0x04, 0x9e, 0xd3, 0xa2, 0x2d, 0x0c, 0xc6, 0xc1, 0x91, 0x97, 0xe3,
+ 0x62, 0xac, 0xe3, 0xa0, 0x0d, 0x98, 0x0a, 0xb9, 0x2e, 0x4f, 0x25, 0xb1, 0xe1, 0x3a, 0xd1, 0xcf,
+ 0xaa, 0x50, 0x04, 0x26, 0xf8, 0x90, 0x15, 0x71, 0xee, 0x24, 0x03, 0xb4, 0x24, 0x49, 0xa0, 0x77,
+ 0x61, 0xb2, 0xe5, 0x3b, 0xcd, 0x05, 0xa7, 0xe5, 0x78, 0x0d, 0x36, 0x3e, 0x23, 0x46, 0x94, 0xce,
+ 0xc9, 0x5b, 0x06, 0x14, 0x27, 0xb0, 0xa9, 0x80, 0xa8, 0x97, 0x88, 0xc4, 0x4b, 0x8e, 0xb7, 0x45,
+ 0xc2, 0xca, 0x28, 0xfb, 0x2a, 0x26, 0x20, 0xde, 0xca, 0xc1, 0xc1, 0xb9, 0xb5, 0xd1, 0x35, 0x18,
+ 0x97, 0x9f, 0xaf, 0xc5, 0x33, 0x8a, 0x1f, 0x34, 0x69, 0x30, 0x6c, 0x60, 0xa2, 0x10, 0x4e, 0xc9,
+ 0xff, 0x1b, 0x81, 0xb3, 0xb9, 0xe9, 0x36, 0x44, 0x90, 0x0f, 0xfe, 0x28, 0xfd, 0x4b, 0xf2, 0x05,
+ 0xec, 0x72, 0x16, 0xd2, 0xe1, 0x7e, 0xf5, 0x9c, 0x18, 0xb5, 0x4c, 0x38, 0xce, 0xa6, 0x8d, 0xd6,
+ 0xe0, 0x04, 0xf7, 0x81, 0x59, 0xdc, 0x26, 0x8d, 0x1d, 0xb9, 0xe1, 0x98, 0xd4, 0xa8, 0x3d, 0xfc,
+ 0xb9, 0x91, 0x46, 0xc1, 0x59, 0xf5, 0xd0, 0x87, 0x50, 0xe9, 0x74, 0xef, 0xb7, 0xdc, 0x70, 0x7b,
+ 0xdd, 0x8f, 0x98, 0x0b, 0xd9, 0x7c, 0xb3, 0x19, 0x90, 0x90, 0xbf, 0x59, 0x66, 0x47, 0xaf, 0x8c,
+ 0x41, 0x55, 0xcb, 0xc1, 0xc3, 0xb9, 0x14, 0xd0, 0x23, 0x38, 0x95, 0x58, 0x08, 0x22, 0x98, 0xcc,
+ 0x64, 0x7e, 0x0a, 0xbb, 0x7a, 0x56, 0x05, 0x11, 0x97, 0x29, 0x0b, 0x84, 0xb3, 0x9b, 0x40, 0x6f,
+ 0x01, 0xb8, 0x9d, 0x15, 0xa7, 0xed, 0xb6, 0xe8, 0x75, 0xf4, 0x04, 0x5b, 0x23, 0xf4, 0x6a, 0x02,
+ 0xab, 0x35, 0x59, 0x4a, 0x79, 0xb3, 0xf8, 0xb7, 0x87, 0x35, 0x6c, 0x74, 0x0b, 0x26, 0xc5, 0xbf,
+ 0x3d, 0x31, 0xa5, 0x33, 0x2a, 0xdb, 0xf1, 0xa4, 0xac, 0xa1, 0xe6, 0x31, 0x51, 0x82, 0x13, 0x75,
+ 0xd1, 0x16, 0x9c, 0x97, 0xa9, 0x96, 0xf5, 0xf5, 0x29, 0xe7, 0x20, 0x64, 0x79, 0xe3, 0x46, 0xf8,
+ 0x9b, 0xa2, 0xf9, 0x22, 0x44, 0x5c, 0x4c, 0x87, 0x9e, 0xeb, 0xfa, 0x32, 0xe7, 0x2f, 0xd9, 0x4f,
+ 0xc5, 0xb1, 0x4e, 0x6f, 0x25, 0x81, 0x38, 0x8d, 0x8f, 0x7c, 0x38, 0xe5, 0x7a, 0x59, 0xab, 0xfa,
+ 0x34, 0x23, 0xf4, 0x45, 0xfe, 0x88, 0xbf, 0x78, 0x45, 0x67, 0xc2, 0x71, 0x36, 0x5d, 0xb4, 0x0a,
+ 0x27, 0x22, 0x5e, 0xb0, 0xe4, 0x86, 0x3c, 0x2d, 0x15, 0xbd, 0xf6, 0x9d, 0x61, 0xcd, 0x9d, 0xa1,
+ 0xab, 0x79, 0x23, 0x0d, 0xc6, 0x59, 0x75, 0x3e, 0x9e, 0x03, 0xe8, 0xef, 0x5b, 0xb4, 0xb6, 0x26,
+ 0xe8, 0xa3, 0x6f, 0xc2, 0xb8, 0x3e, 0x3e, 0x42, 0x68, 0xb9, 0x94, 0x2d, 0x07, 0x6b, 0xec, 0x85,
+ 0x5f, 0x13, 0x14, 0x0b, 0xd1, 0x61, 0xd8, 0xa0, 0x88, 0x1a, 0x19, 0xc1, 0x37, 0xae, 0xf4, 0x27,
+ 0x14, 0xf5, 0xef, 0xff, 0x48, 0x20, 0x7b, 0xe7, 0xa0, 0x5b, 0x30, 0xd2, 0x68, 0xb9, 0xc4, 0x8b,
+ 0x56, 0x6b, 0x45, 0x21, 0x68, 0x17, 0x05, 0x8e, 0xd8, 0x8a, 0x22, 0x9b, 0x1c, 0x2f, 0xc3, 0x8a,
+ 0x82, 0x7d, 0x0d, 0xc6, 0xea, 0x2d, 0x42, 0x3a, 0xfc, 0x1d, 0x17, 0x7a, 0x89, 0x5d, 0x4c, 0x98,
+ 0x68, 0x69, 0x31, 0xd1, 0x52, 0xbf, 0x73, 0x30, 0xa1, 0x52, 0xc2, 0xed, 0xdf, 0x2e, 0x41, 0xb5,
+ 0x47, 0x52, 0xc3, 0x84, 0xbd, 0xcd, 0xea, 0xcb, 0xde, 0x36, 0x0f, 0x53, 0xf1, 0x3f, 0x5d, 0x95,
+ 0xa7, 0x9c, 0xa1, 0xef, 0x9a, 0x60, 0x9c, 0xc4, 0xef, 0xfb, 0x5d, 0x8b, 0x6e, 0xb2, 0x1b, 0xe8,
+ 0xf9, 0x32, 0xcb, 0x30, 0xd5, 0x0f, 0xf6, 0x7f, 0xf7, 0xce, 0x35, 0xbb, 0xda, 0xbf, 0x51, 0x82,
+ 0x53, 0x6a, 0x08, 0x7f, 0x78, 0x07, 0xee, 0x4e, 0x7a, 0xe0, 0x9e, 0x80, 0xd1, 0xda, 0xbe, 0x0d,
+ 0x43, 0x3c, 0x2e, 0x6e, 0x1f, 0x32, 0xff, 0x73, 0x66, 0x1e, 0x06, 0x25, 0x66, 0x1a, 0xb9, 0x18,
+ 0xfe, 0x92, 0x05, 0x53, 0x89, 0x07, 0x92, 0x08, 0x6b, 0xaf, 0xe8, 0x1f, 0x47, 0x2e, 0xcf, 0x92,
+ 0xf8, 0x2f, 0xc2, 0xc0, 0xb6, 0xaf, 0x9c, 0x94, 0x15, 0xc6, 0x0d, 0x3f, 0x8c, 0x30, 0x83, 0xd8,
+ 0xff, 0xd2, 0x82, 0xc1, 0x0d, 0xc7, 0xf5, 0x22, 0x69, 0xfd, 0xb0, 0x72, 0xac, 0x1f, 0xfd, 0x7c,
+ 0x17, 0x7a, 0x13, 0x86, 0xc8, 0xe6, 0x26, 0x69, 0x44, 0x62, 0x56, 0x65, 0x94, 0x8f, 0xa1, 0x65,
+ 0x56, 0x4a, 0x85, 0x50, 0xd6, 0x18, 0xff, 0x8b, 0x05, 0x32, 0xba, 0x07, 0xa3, 0x91, 0xdb, 0x26,
+ 0xf3, 0xcd, 0xa6, 0xf0, 0x09, 0x78, 0x8c, 0xd0, 0x34, 0x1b, 0x92, 0x00, 0x8e, 0x69, 0xd9, 0xdf,
+ 0x2b, 0x01, 0xc4, 0x71, 0xf8, 0x7a, 0x7d, 0xe2, 0x42, 0xca, 0x5a, 0x7c, 0x29, 0xc3, 0x5a, 0x8c,
+ 0x62, 0x82, 0x19, 0xa6, 0x62, 0x35, 0x4c, 0xe5, 0xbe, 0x86, 0x69, 0xe0, 0x28, 0xc3, 0xb4, 0x08,
+ 0x33, 0x71, 0x1c, 0x41, 0x33, 0x8c, 0x2a, 0x3b, 0xbf, 0x37, 0x92, 0x40, 0x9c, 0xc6, 0xb7, 0x09,
+ 0x5c, 0x54, 0xe1, 0xd4, 0xc4, 0x59, 0xc8, 0x9e, 0x12, 0xe8, 0xd6, 0xf7, 0x1e, 0xe3, 0x14, 0x9b,
+ 0xc3, 0x4b, 0xb9, 0xe6, 0xf0, 0xbf, 0x69, 0xc1, 0xc9, 0x64, 0x3b, 0xec, 0xdd, 0xfd, 0x77, 0x2d,
+ 0x38, 0x15, 0xe7, 0xf4, 0x4a, 0xbb, 0x20, 0xbc, 0x51, 0x18, 0x22, 0x2e, 0xa7, 0xc7, 0x71, 0x38,
+ 0x99, 0xb5, 0x2c, 0xd2, 0x38, 0xbb, 0x45, 0xfb, 0xff, 0x19, 0x80, 0x4a, 0x5e, 0x6c, 0x39, 0xf6,
+ 0xd2, 0xc8, 0x79, 0x58, 0xdf, 0x21, 0x0f, 0xc4, 0x7b, 0x8e, 0xf8, 0xa5, 0x11, 0x2f, 0xc6, 0x12,
+ 0x9e, 0x4c, 0xe3, 0x56, 0xea, 0x33, 0x8d, 0xdb, 0x36, 0xcc, 0x3c, 0xd8, 0x26, 0xde, 0x1d, 0x2f,
+ 0x74, 0x22, 0x37, 0xdc, 0x74, 0x99, 0x01, 0x9d, 0xaf, 0x9b, 0xb7, 0xe4, 0xab, 0x8b, 0x7b, 0x49,
+ 0x84, 0xc3, 0xfd, 0xea, 0x79, 0xa3, 0x20, 0xee, 0x32, 0x67, 0x24, 0x38, 0x4d, 0x34, 0x9d, 0x05,
+ 0x6f, 0xe0, 0x29, 0x67, 0xc1, 0x6b, 0xbb, 0xc2, 0xed, 0x46, 0x3e, 0x23, 0x61, 0xd7, 0xd6, 0x35,
+ 0x55, 0x8a, 0x35, 0x0c, 0xf4, 0x75, 0x40, 0x7a, 0x1a, 0x53, 0x23, 0xb4, 0xef, 0xab, 0x07, 0xfb,
+ 0x55, 0xb4, 0x9e, 0x82, 0x1e, 0xee, 0x57, 0x4f, 0xd0, 0xd2, 0x55, 0x8f, 0x5e, 0x7f, 0xe3, 0x78,
+ 0x88, 0x19, 0x84, 0xd0, 0x3d, 0x98, 0xa6, 0xa5, 0x6c, 0x47, 0xc9, 0xb8, 0xc1, 0xfc, 0xca, 0xfa,
+ 0xf2, 0xc1, 0x7e, 0x75, 0x7a, 0x3d, 0x01, 0xcb, 0x23, 0x9d, 0x22, 0x92, 0x91, 0x0c, 0x6f, 0xa4,
+ 0xdf, 0x64, 0x78, 0xf6, 0x77, 0x2d, 0x38, 0x4b, 0x0f, 0xb8, 0xe6, 0xad, 0x1c, 0x2b, 0xba, 0xd3,
+ 0x71, 0xb9, 0x9d, 0x46, 0x1c, 0x35, 0x4c, 0x57, 0x57, 0x5b, 0xe5, 0x56, 0x1a, 0x05, 0xa5, 0x1c,
+ 0x7e, 0xc7, 0xf5, 0x9a, 0x49, 0x0e, 0x7f, 0xd3, 0xf5, 0x9a, 0x98, 0x41, 0xd4, 0x91, 0x55, 0xce,
+ 0xcd, 0x43, 0xf0, 0x2b, 0x74, 0xaf, 0xd2, 0xbe, 0xfc, 0x40, 0xbb, 0x81, 0x5e, 0xd6, 0x6d, 0xaa,
+ 0xc2, 0x7d, 0x32, 0xd7, 0x9e, 0xfa, 0x1d, 0x0b, 0xc4, 0xeb, 0xf7, 0x3e, 0xce, 0xe4, 0xaf, 0xc2,
+ 0xf8, 0x6e, 0x3a, 0xc5, 0xf3, 0xc5, 0xfc, 0x70, 0x00, 0x22, 0xb1, 0xb3, 0x12, 0xd1, 0x8d, 0x74,
+ 0xce, 0x06, 0x2d, 0xbb, 0x09, 0x02, 0xba, 0x44, 0x98, 0x55, 0xa3, 0x77, 0x6f, 0x5e, 0x03, 0x68,
+ 0x32, 0x5c, 0x96, 0xec, 0xac, 0x64, 0x4a, 0x5c, 0x4b, 0x0a, 0x82, 0x35, 0x2c, 0xfb, 0x17, 0xca,
+ 0x30, 0x26, 0x53, 0x0a, 0x77, 0xbd, 0x7e, 0x74, 0x8f, 0xba, 0xe0, 0x54, 0xea, 0x29, 0x38, 0x7d,
+ 0x08, 0x33, 0x01, 0x69, 0x74, 0x83, 0xd0, 0xdd, 0x25, 0x12, 0x2c, 0x36, 0xc9, 0x1c, 0x4f, 0x83,
+ 0x91, 0x00, 0x1e, 0xb2, 0xd0, 0x5d, 0x89, 0x42, 0x66, 0x34, 0x4e, 0x13, 0x42, 0x57, 0x60, 0x94,
+ 0xa9, 0xde, 0x6b, 0xb1, 0x42, 0x58, 0x29, 0xbe, 0xd6, 0x24, 0x00, 0xc7, 0x38, 0xec, 0x72, 0xd0,
+ 0xbd, 0xaf, 0x65, 0xa2, 0x8b, 0x2f, 0x07, 0xbc, 0x18, 0x4b, 0x38, 0xfa, 0x32, 0x4c, 0xf3, 0x7a,
+ 0x81, 0xdf, 0x71, 0xb6, 0xb8, 0x49, 0x70, 0x50, 0x85, 0xd7, 0x99, 0x5e, 0x4b, 0xc0, 0x0e, 0xf7,
+ 0xab, 0x27, 0x93, 0x65, 0xac, 0xdb, 0x29, 0x2a, 0xcc, 0xf3, 0x8f, 0x37, 0x42, 0xcf, 0x8c, 0x94,
+ 0xc3, 0x60, 0x0c, 0xc2, 0x3a, 0x9e, 0xfd, 0x27, 0x16, 0xcc, 0x68, 0x53, 0xd5, 0x77, 0x26, 0x12,
+ 0x63, 0x90, 0x4a, 0x7d, 0x0c, 0xd2, 0xd1, 0xa2, 0x3d, 0x64, 0xce, 0xf0, 0xc0, 0x13, 0x9a, 0x61,
+ 0xfb, 0x9b, 0x80, 0xd2, 0xf9, 0xaa, 0xd1, 0xfb, 0xdc, 0x91, 0xdf, 0x0d, 0x48, 0xb3, 0xc8, 0xe0,
+ 0xaf, 0x47, 0xce, 0x91, 0x2f, 0x57, 0x79, 0x2d, 0xac, 0xea, 0xdb, 0x7f, 0x32, 0x00, 0xd3, 0xc9,
+ 0x58, 0x1d, 0xe8, 0x06, 0x0c, 0x71, 0x29, 0x5d, 0x90, 0x2f, 0xf0, 0x27, 0xd3, 0x22, 0x7c, 0xf0,
+ 0x2c, 0x41, 0x5c, 0xba, 0x17, 0xf5, 0xd1, 0x87, 0x30, 0xd6, 0xf4, 0x1f, 0x78, 0x0f, 0x9c, 0xa0,
+ 0x39, 0x5f, 0x5b, 0x15, 0x1c, 0x22, 0x53, 0x01, 0xb5, 0x14, 0xa3, 0xe9, 0x51, 0x43, 0x98, 0xef,
+ 0x44, 0x0c, 0xc2, 0x3a, 0x39, 0xb4, 0xc1, 0x12, 0x57, 0x6d, 0xba, 0x5b, 0x6b, 0x4e, 0xa7, 0xe8,
+ 0x55, 0xd7, 0xa2, 0x44, 0xd2, 0x28, 0x4f, 0x88, 0xec, 0x56, 0x1c, 0x80, 0x63, 0x42, 0xe8, 0x47,
+ 0xe1, 0x44, 0x98, 0x63, 0x12, 0xcb, 0x71, 0x38, 0x28, 0xb4, 0x12, 0x71, 0x65, 0x4a, 0x96, 0xf1,
+ 0x2c, 0xab, 0x19, 0xf4, 0x10, 0x90, 0x50, 0x3d, 0x6f, 0x04, 0xdd, 0x30, 0xe2, 0x29, 0x20, 0xc5,
+ 0xa5, 0xeb, 0x73, 0xd9, 0x7a, 0x82, 0x24, 0xb6, 0xd6, 0x36, 0x0b, 0x9c, 0x9c, 0xc6, 0xc0, 0x19,
+ 0x6d, 0xa0, 0x6d, 0x98, 0xec, 0x18, 0xd9, 0x37, 0xd9, 0xde, 0xcc, 0x89, 0x2e, 0x9c, 0x97, 0xa7,
+ 0x93, 0x9f, 0xd2, 0x26, 0x14, 0x27, 0xe8, 0xda, 0xdf, 0x19, 0x80, 0x59, 0x99, 0x8a, 0x3e, 0xe3,
+ 0x9d, 0xcc, 0xb7, 0xad, 0xc4, 0x43, 0x99, 0xb7, 0xf2, 0x8f, 0x94, 0xa7, 0xf6, 0x5c, 0xe6, 0x27,
+ 0xd3, 0xcf, 0x65, 0xde, 0x39, 0x62, 0x37, 0x9e, 0xd8, 0xa3, 0x99, 0x1f, 0xda, 0x97, 0x2e, 0x07,
+ 0x27, 0xc1, 0x10, 0x02, 0x10, 0xe6, 0xf1, 0xef, 0x6b, 0xd2, 0x48, 0x95, 0xa3, 0x68, 0xb8, 0x21,
+ 0x70, 0x0c, 0xb1, 0x62, 0x5c, 0x46, 0xc9, 0x67, 0x1c, 0x5d, 0xd1, 0xa1, 0x34, 0x49, 0xbb, 0x13,
+ 0xed, 0x2d, 0xb9, 0x81, 0xe8, 0x71, 0x26, 0xcd, 0x65, 0x81, 0x93, 0xa6, 0x29, 0x21, 0x58, 0xd1,
+ 0x41, 0xbb, 0x30, 0xb3, 0xc5, 0x62, 0x4b, 0x69, 0x59, 0xe1, 0x05, 0x07, 0xca, 0xe4, 0x10, 0xd7,
+ 0x17, 0x97, 0xf3, 0x53, 0xc8, 0xf3, 0x6b, 0x66, 0x0a, 0x05, 0xa7, 0x9b, 0xa0, 0x5b, 0xe3, 0xa4,
+ 0xf3, 0x20, 0x5c, 0x6e, 0x39, 0x61, 0xe4, 0x36, 0x16, 0x5a, 0x7e, 0x63, 0xa7, 0x1e, 0xf9, 0x81,
+ 0xcc, 0x2a, 0x9a, 0x79, 0xcb, 0x9b, 0xbf, 0x57, 0x4f, 0xe1, 0x1b, 0xcd, 0xb3, 0xec, 0xb6, 0x59,
+ 0x58, 0x38, 0xb3, 0x2d, 0xb4, 0x0e, 0xc3, 0x5b, 0x6e, 0x84, 0x49, 0xc7, 0x17, 0x7c, 0x29, 0x93,
+ 0xe9, 0x5e, 0xe7, 0x28, 0x46, 0x4b, 0x2c, 0xf6, 0x95, 0x00, 0x60, 0x49, 0x04, 0xbd, 0xaf, 0x8e,
+ 0x9b, 0xa1, 0x7c, 0x55, 0x6f, 0xda, 0xcb, 0x2f, 0xf3, 0xc0, 0x79, 0x17, 0xca, 0xde, 0x66, 0x58,
+ 0x14, 0xf5, 0x67, 0x7d, 0xc5, 0xd0, 0xd4, 0x2d, 0x0c, 0xd3, 0x4b, 0xf8, 0xfa, 0x4a, 0x1d, 0xd3,
+ 0x8a, 0xec, 0x81, 0x6d, 0xd8, 0x08, 0x5d, 0x91, 0xbc, 0x2b, 0xf3, 0xbd, 0xf1, 0x6a, 0x7d, 0xb1,
+ 0xbe, 0x6a, 0xd0, 0x60, 0xf1, 0x13, 0x59, 0x31, 0xe6, 0xd5, 0xd1, 0x5d, 0x18, 0xdd, 0xe2, 0x2c,
+ 0x76, 0x93, 0x87, 0xb5, 0xcd, 0x39, 0xf6, 0xae, 0x4b, 0x24, 0x83, 0x1e, 0x3b, 0x9c, 0x14, 0x08,
+ 0xc7, 0xa4, 0xd0, 0x77, 0x2c, 0x38, 0xd5, 0x49, 0xe8, 0x6a, 0xd9, 0xb3, 0x38, 0xe1, 0x10, 0x97,
+ 0xf9, 0xd4, 0xa0, 0x96, 0x55, 0xc1, 0x68, 0x90, 0x19, 0x7a, 0x32, 0xd1, 0x70, 0x76, 0x73, 0x74,
+ 0xa0, 0x83, 0xfb, 0xcd, 0xa2, 0x7c, 0x4f, 0x89, 0x10, 0x48, 0x7c, 0xa0, 0xf1, 0xc2, 0x12, 0xa6,
+ 0x15, 0xd1, 0x06, 0xc0, 0x66, 0x8b, 0x88, 0xd8, 0x92, 0xc2, 0xfd, 0x2a, 0x53, 0xce, 0x58, 0x51,
+ 0x58, 0x82, 0x0e, 0xbb, 0xf3, 0xc6, 0xa5, 0x58, 0xa3, 0x43, 0x97, 0x52, 0xc3, 0xf5, 0x9a, 0x24,
+ 0x60, 0x66, 0xb4, 0x9c, 0xa5, 0xb4, 0xc8, 0x30, 0xd2, 0x4b, 0x89, 0x97, 0x63, 0x41, 0x81, 0xd1,
+ 0x22, 0x9d, 0xed, 0xcd, 0xb0, 0x28, 0xb3, 0xc8, 0x22, 0xe9, 0x6c, 0x27, 0x16, 0x14, 0xa7, 0xc5,
+ 0xca, 0xb1, 0xa0, 0x40, 0xb7, 0xcc, 0x26, 0xdd, 0x40, 0x24, 0xa8, 0x4c, 0xe5, 0x6f, 0x99, 0x15,
+ 0x8e, 0x92, 0xde, 0x32, 0x02, 0x80, 0x25, 0x11, 0xf4, 0x0d, 0x53, 0xae, 0x9a, 0x66, 0x34, 0x5f,
+ 0xee, 0x21, 0x57, 0x19, 0x74, 0x8b, 0x25, 0xab, 0xb7, 0xa0, 0xb4, 0xd9, 0x60, 0xe6, 0xb7, 0x1c,
+ 0xeb, 0xc4, 0xca, 0xa2, 0x41, 0x8d, 0x45, 0xea, 0x5f, 0x59, 0xc4, 0xa5, 0xcd, 0x06, 0x5d, 0xfa,
+ 0xce, 0xa3, 0x6e, 0x40, 0x56, 0xdc, 0x16, 0x11, 0xa1, 0x83, 0x33, 0x97, 0xfe, 0xbc, 0x44, 0x4a,
+ 0x2f, 0x7d, 0x05, 0xc2, 0x31, 0x29, 0x4a, 0x37, 0x96, 0xf6, 0x4e, 0xe4, 0xd3, 0x55, 0x42, 0x5d,
+ 0x9a, 0x6e, 0xa6, 0xbc, 0xb7, 0x03, 0x13, 0xbb, 0x61, 0x67, 0x9b, 0x48, 0xae, 0xc8, 0x0c, 0x83,
+ 0x39, 0x31, 0x31, 0xee, 0x0a, 0x44, 0x37, 0x88, 0xba, 0x4e, 0x2b, 0xc5, 0xc8, 0x99, 0x12, 0xe7,
+ 0xae, 0x4e, 0x0c, 0x9b, 0xb4, 0xe9, 0x42, 0xf8, 0x88, 0x07, 0xae, 0x63, 0x26, 0xc2, 0x9c, 0x85,
+ 0x90, 0x11, 0xdb, 0x8e, 0x2f, 0x04, 0x01, 0xc0, 0x92, 0x88, 0x1a, 0x6c, 0x76, 0x00, 0x9d, 0xee,
+ 0x31, 0xd8, 0xa9, 0xfe, 0xc6, 0x83, 0xcd, 0x0e, 0x9c, 0x98, 0x14, 0x3b, 0x68, 0x3a, 0xdb, 0x7e,
+ 0xe4, 0x7b, 0x89, 0x43, 0xee, 0x4c, 0xfe, 0x41, 0x53, 0xcb, 0xc0, 0x4f, 0x1f, 0x34, 0x59, 0x58,
+ 0x38, 0xb3, 0x2d, 0xfa, 0x71, 0x1d, 0x19, 0x83, 0x50, 0x64, 0x42, 0x79, 0x29, 0x27, 0x84, 0x67,
+ 0x3a, 0x50, 0x21, 0xff, 0x38, 0x05, 0xc2, 0x31, 0x29, 0xd4, 0xa4, 0x92, 0xae, 0x1e, 0xdb, 0x96,
+ 0x65, 0x74, 0xc9, 0x91, 0x0b, 0xb2, 0xa2, 0xe0, 0x4a, 0x29, 0x57, 0x87, 0xe0, 0x04, 0x4d, 0xe6,
+ 0x23, 0xc8, 0x1f, 0x15, 0xb2, 0x84, 0x2f, 0x39, 0x53, 0x9d, 0xf1, 0xee, 0x90, 0x4f, 0xb5, 0x00,
+ 0x60, 0x49, 0x84, 0x8e, 0x86, 0x78, 0x0a, 0xe7, 0x87, 0x2c, 0x6f, 0x52, 0x9e, 0x29, 0x3f, 0xcb,
+ 0x20, 0x25, 0x03, 0xcd, 0x0b, 0x10, 0x8e, 0x49, 0x51, 0x4e, 0x4e, 0x0f, 0xbc, 0x73, 0xf9, 0x9c,
+ 0x3c, 0x79, 0xdc, 0x31, 0x4e, 0x4e, 0x0f, 0xbb, 0xb2, 0x38, 0xea, 0x54, 0x5c, 0x74, 0x96, 0xf3,
+ 0x25, 0xa7, 0x5f, 0x2a, 0xb0, 0x7a, 0xba, 0x5f, 0x0a, 0x84, 0x63, 0x52, 0xec, 0x28, 0x66, 0x41,
+ 0xf0, 0x2e, 0x14, 0x1c, 0xc5, 0x14, 0x21, 0xe3, 0x28, 0xd6, 0x82, 0xe4, 0xd9, 0x7f, 0xb9, 0x04,
+ 0x17, 0x8a, 0xf7, 0x6d, 0x6c, 0xad, 0xab, 0xc5, 0xde, 0x51, 0x09, 0x6b, 0x1d, 0xd7, 0x1d, 0xc5,
+ 0x58, 0x7d, 0x87, 0x36, 0xbe, 0x0e, 0x33, 0xea, 0xe1, 0x63, 0xcb, 0x6d, 0xec, 0x69, 0x89, 0x5e,
+ 0x55, 0x10, 0xa0, 0x7a, 0x12, 0x01, 0xa7, 0xeb, 0xa0, 0x79, 0x98, 0x32, 0x0a, 0x57, 0x97, 0x84,
+ 0xa2, 0x21, 0xce, 0x56, 0x62, 0x82, 0x71, 0x12, 0xdf, 0xfe, 0x45, 0x0b, 0xce, 0xf0, 0x40, 0xbc,
+ 0xa4, 0x59, 0xf3, 0x9b, 0x52, 0xa3, 0x70, 0xa4, 0xc8, 0xbd, 0x9b, 0x30, 0xd5, 0x31, 0xab, 0xf6,
+ 0x08, 0x36, 0xae, 0xa3, 0xc6, 0x7d, 0x4d, 0x00, 0x70, 0x92, 0xa8, 0xfd, 0xf3, 0x25, 0x38, 0x5f,
+ 0xe8, 0xc9, 0x8f, 0x30, 0x9c, 0xde, 0x6a, 0x87, 0xce, 0x62, 0x40, 0x9a, 0xc4, 0x8b, 0x5c, 0xa7,
+ 0x55, 0xef, 0x90, 0x86, 0x66, 0x6f, 0x65, 0x2e, 0xf1, 0xd7, 0xd7, 0xea, 0xf3, 0x69, 0x0c, 0x9c,
+ 0x53, 0x13, 0xad, 0x00, 0x4a, 0x43, 0xc4, 0x0c, 0xb3, 0xcb, 0x74, 0x9a, 0x1e, 0xce, 0xa8, 0x81,
+ 0xbe, 0x00, 0x13, 0xea, 0x85, 0x80, 0x36, 0xe3, 0xec, 0x80, 0xc0, 0x3a, 0x00, 0x9b, 0x78, 0xe8,
+ 0x2a, 0x4f, 0x63, 0x25, 0x12, 0x9e, 0x09, 0xe3, 0xec, 0x94, 0xcc, 0x51, 0x25, 0x8a, 0xb1, 0x8e,
+ 0xb3, 0x70, 0xed, 0x77, 0xfe, 0xf0, 0xc2, 0x67, 0x7e, 0xf7, 0x0f, 0x2f, 0x7c, 0xe6, 0x0f, 0xfe,
+ 0xf0, 0xc2, 0x67, 0x7e, 0xfc, 0xe0, 0x82, 0xf5, 0x3b, 0x07, 0x17, 0xac, 0xdf, 0x3d, 0xb8, 0x60,
+ 0xfd, 0xc1, 0xc1, 0x05, 0xeb, 0x7f, 0x3b, 0xb8, 0x60, 0x7d, 0xef, 0x7f, 0xbf, 0xf0, 0x99, 0xaf,
+ 0xa2, 0x38, 0x16, 0xf6, 0x15, 0x3a, 0x3b, 0x57, 0x76, 0xaf, 0xfe, 0x87, 0x00, 0x00, 0x00, 0xff,
+ 0xff, 0xba, 0xfb, 0xfc, 0xdd, 0x18, 0x2e, 0x01, 0x00,
}
func (m *AWSElasticBlockStoreVolumeSource) Marshal() (dAtA []byte, err error) {
@@ -9346,6 +9549,22 @@ func (m *Container) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
+ if len(m.RestartPolicyRules) > 0 {
+ for iNdEx := len(m.RestartPolicyRules) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.RestartPolicyRules[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0xca
+ }
+ }
if m.RestartPolicy != nil {
i -= len(*m.RestartPolicy)
copy(dAtA[i:], *m.RestartPolicy)
@@ -9600,6 +9819,44 @@ func (m *Container) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
+func (m *ContainerExtendedResourceRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerExtendedResourceRequest) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ContainerExtendedResourceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ i -= len(m.RequestName)
+ copy(dAtA[i:], m.RequestName)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.RequestName)))
+ i--
+ dAtA[i] = 0x1a
+ i -= len(m.ResourceName)
+ copy(dAtA[i:], m.ResourceName)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceName)))
+ i--
+ dAtA[i] = 0x12
+ i -= len(m.ContainerName)
+ copy(dAtA[i:], m.ContainerName)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContainerName)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
func (m *ContainerImage) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -9712,6 +9969,81 @@ func (m *ContainerResizePolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
+func (m *ContainerRestartRule) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerRestartRule) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ContainerRestartRule) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.ExitCodes != nil {
+ {
+ size, err := m.ExitCodes.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ i -= len(m.Action)
+ copy(dAtA[i:], m.Action)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Action)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *ContainerRestartRuleOnExitCodes) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerRestartRuleOnExitCodes) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ContainerRestartRuleOnExitCodes) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Values) > 0 {
+ for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- {
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Values[iNdEx]))
+ i--
+ dAtA[i] = 0x10
+ }
+ }
+ i -= len(m.Operator)
+ copy(dAtA[i:], m.Operator)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Operator)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
func (m *ContainerState) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -10681,6 +11013,18 @@ func (m *EnvVarSource) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
+ if m.FileKeyRef != nil {
+ {
+ size, err := m.FileKeyRef.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x2a
+ }
if m.SecretKeyRef != nil {
{
size, err := m.SecretKeyRef.MarshalToSizedBuffer(dAtA[:i])
@@ -10790,6 +11134,22 @@ func (m *EphemeralContainerCommon) MarshalToSizedBuffer(dAtA []byte) (int, error
_ = i
var l int
_ = l
+ if len(m.RestartPolicyRules) > 0 {
+ for iNdEx := len(m.RestartPolicyRules) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.RestartPolicyRules[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0xca
+ }
+ }
if m.RestartPolicy != nil {
i -= len(*m.RestartPolicy)
copy(dAtA[i:], *m.RestartPolicy)
@@ -11426,6 +11786,54 @@ func (m *FCVolumeSource) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
+func (m *FileKeySelector) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *FileKeySelector) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *FileKeySelector) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.Optional != nil {
+ i--
+ if *m.Optional {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x20
+ }
+ i -= len(m.Key)
+ copy(dAtA[i:], m.Key)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key)))
+ i--
+ dAtA[i] = 0x1a
+ i -= len(m.Path)
+ copy(dAtA[i:], m.Path)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i--
+ dAtA[i] = 0x12
+ i -= len(m.VolumeName)
+ copy(dAtA[i:], m.VolumeName)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeName)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
func (m *FlexPersistentVolumeSource) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -15791,6 +16199,59 @@ func (m *PodAttachOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
+func (m *PodCertificateProjection) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodCertificateProjection) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *PodCertificateProjection) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ i -= len(m.CertificateChainPath)
+ copy(dAtA[i:], m.CertificateChainPath)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.CertificateChainPath)))
+ i--
+ dAtA[i] = 0x32
+ i -= len(m.KeyPath)
+ copy(dAtA[i:], m.KeyPath)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.KeyPath)))
+ i--
+ dAtA[i] = 0x2a
+ i -= len(m.CredentialBundlePath)
+ copy(dAtA[i:], m.CredentialBundlePath)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.CredentialBundlePath)))
+ i--
+ dAtA[i] = 0x22
+ if m.MaxExpirationSeconds != nil {
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.MaxExpirationSeconds))
+ i--
+ dAtA[i] = 0x18
+ }
+ i -= len(m.KeyType)
+ copy(dAtA[i:], m.KeyType)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.KeyType)))
+ i--
+ dAtA[i] = 0x12
+ i -= len(m.SignerName)
+ copy(dAtA[i:], m.SignerName)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SignerName)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
func (m *PodCondition) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -16016,6 +16477,48 @@ func (m *PodExecOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
+func (m *PodExtendedResourceClaimStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodExtendedResourceClaimStatus) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *PodExtendedResourceClaimStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ i -= len(m.ResourceClaimName)
+ copy(dAtA[i:], m.ResourceClaimName)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceClaimName)))
+ i--
+ dAtA[i] = 0x12
+ if len(m.RequestMappings) > 0 {
+ for iNdEx := len(m.RequestMappings) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.RequestMappings[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
func (m *PodIP) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -16597,6 +17100,15 @@ func (m *PodSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
+ if m.HostnameOverride != nil {
+ i -= len(*m.HostnameOverride)
+ copy(dAtA[i:], *m.HostnameOverride)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.HostnameOverride)))
+ i--
+ dAtA[i] = 0x2
+ i--
+ dAtA[i] = 0xca
+ }
if m.Resources != nil {
{
size, err := m.Resources.MarshalToSizedBuffer(dAtA[:i])
@@ -17085,6 +17597,20 @@ func (m *PodStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
+ if m.ExtendedResourceClaimStatus != nil {
+ {
+ size, err := m.ExtendedResourceClaimStatus.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x92
+ }
i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
i--
dAtA[i] = 0x1
@@ -21108,6 +21634,18 @@ func (m *VolumeProjection) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
+ if m.PodCertificate != nil {
+ {
+ size, err := m.PodCertificate.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x32
+ }
if m.ClusterTrustBundle != nil {
{
size, err := m.ClusterTrustBundle.MarshalToSizedBuffer(dAtA[:i])
@@ -22471,6 +23009,27 @@ func (m *Container) Size() (n int) {
l = len(*m.RestartPolicy)
n += 2 + l + sovGenerated(uint64(l))
}
+ if len(m.RestartPolicyRules) > 0 {
+ for _, e := range m.RestartPolicyRules {
+ l = e.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ContainerExtendedResourceRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.ContainerName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ResourceName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.RequestName)
+ n += 1 + l + sovGenerated(uint64(l))
return n
}
@@ -22520,6 +23079,37 @@ func (m *ContainerResizePolicy) Size() (n int) {
return n
}
+func (m *ContainerRestartRule) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Action)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.ExitCodes != nil {
+ l = m.ExitCodes.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ContainerRestartRuleOnExitCodes) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Operator)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Values) > 0 {
+ for _, e := range m.Values {
+ n += 1 + sovGenerated(uint64(e))
+ }
+ }
+ return n
+}
+
func (m *ContainerState) Size() (n int) {
if m == nil {
return 0
@@ -22896,6 +23486,10 @@ func (m *EnvVarSource) Size() (n int) {
l = m.SecretKeyRef.Size()
n += 1 + l + sovGenerated(uint64(l))
}
+ if m.FileKeyRef != nil {
+ l = m.FileKeyRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
return n
}
@@ -23007,6 +23601,12 @@ func (m *EphemeralContainerCommon) Size() (n int) {
l = len(*m.RestartPolicy)
n += 2 + l + sovGenerated(uint64(l))
}
+ if len(m.RestartPolicyRules) > 0 {
+ for _, e := range m.RestartPolicyRules {
+ l = e.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ }
return n
}
@@ -23149,6 +23749,24 @@ func (m *FCVolumeSource) Size() (n int) {
return n
}
+func (m *FileKeySelector) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.VolumeName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Key)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Optional != nil {
+ n += 2
+ }
+ return n
+}
+
func (m *FlexPersistentVolumeSource) Size() (n int) {
if m == nil {
return 0
@@ -24752,6 +25370,28 @@ func (m *PodAttachOptions) Size() (n int) {
return n
}
+func (m *PodCertificateProjection) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.SignerName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.KeyType)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.MaxExpirationSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.MaxExpirationSeconds))
+ }
+ l = len(m.CredentialBundlePath)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.KeyPath)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.CertificateChainPath)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
func (m *PodCondition) Size() (n int) {
if m == nil {
return 0
@@ -24837,6 +25477,23 @@ func (m *PodExecOptions) Size() (n int) {
return n
}
+func (m *PodExtendedResourceClaimStatus) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.RequestMappings) > 0 {
+ for _, e := range m.RequestMappings {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.ResourceClaimName)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
func (m *PodIP) Size() (n int) {
if m == nil {
return 0
@@ -25224,6 +25881,10 @@ func (m *PodSpec) Size() (n int) {
l = m.Resources.Size()
n += 2 + l + sovGenerated(uint64(l))
}
+ if m.HostnameOverride != nil {
+ l = len(*m.HostnameOverride)
+ n += 2 + l + sovGenerated(uint64(l))
+ }
return n
}
@@ -25296,6 +25957,10 @@ func (m *PodStatus) Size() (n int) {
}
}
n += 2 + sovGenerated(uint64(m.ObservedGeneration))
+ if m.ExtendedResourceClaimStatus != nil {
+ l = m.ExtendedResourceClaimStatus.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
return n
}
@@ -26751,6 +27416,10 @@ func (m *VolumeProjection) Size() (n int) {
l = m.ClusterTrustBundle.Size()
n += 1 + l + sovGenerated(uint64(l))
}
+ if m.PodCertificate != nil {
+ l = m.PodCertificate.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
return n
}
@@ -27426,6 +28095,11 @@ func (this *Container) String() string {
repeatedStringForResizePolicy += strings.Replace(strings.Replace(f.String(), "ContainerResizePolicy", "ContainerResizePolicy", 1), `&`, ``, 1) + ","
}
repeatedStringForResizePolicy += "}"
+ repeatedStringForRestartPolicyRules := "[]ContainerRestartRule{"
+ for _, f := range this.RestartPolicyRules {
+ repeatedStringForRestartPolicyRules += strings.Replace(strings.Replace(f.String(), "ContainerRestartRule", "ContainerRestartRule", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForRestartPolicyRules += "}"
s := strings.Join([]string{`&Container{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`Image:` + fmt.Sprintf("%v", this.Image) + `,`,
@@ -27451,6 +28125,19 @@ func (this *Container) String() string {
`StartupProbe:` + strings.Replace(this.StartupProbe.String(), "Probe", "Probe", 1) + `,`,
`ResizePolicy:` + repeatedStringForResizePolicy + `,`,
`RestartPolicy:` + valueToStringGenerated(this.RestartPolicy) + `,`,
+ `RestartPolicyRules:` + repeatedStringForRestartPolicyRules + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerExtendedResourceRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerExtendedResourceRequest{`,
+ `ContainerName:` + fmt.Sprintf("%v", this.ContainerName) + `,`,
+ `ResourceName:` + fmt.Sprintf("%v", this.ResourceName) + `,`,
+ `RequestName:` + fmt.Sprintf("%v", this.RequestName) + `,`,
`}`,
}, "")
return s
@@ -27491,6 +28178,28 @@ func (this *ContainerResizePolicy) String() string {
}, "")
return s
}
+func (this *ContainerRestartRule) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerRestartRule{`,
+ `Action:` + fmt.Sprintf("%v", this.Action) + `,`,
+ `ExitCodes:` + strings.Replace(this.ExitCodes.String(), "ContainerRestartRuleOnExitCodes", "ContainerRestartRuleOnExitCodes", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerRestartRuleOnExitCodes) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerRestartRuleOnExitCodes{`,
+ `Operator:` + fmt.Sprintf("%v", this.Operator) + `,`,
+ `Values:` + fmt.Sprintf("%v", this.Values) + `,`,
+ `}`,
+ }, "")
+ return s
+}
func (this *ContainerState) String() string {
if this == nil {
return "nil"
@@ -27777,6 +28486,7 @@ func (this *EnvVarSource) String() string {
`ResourceFieldRef:` + strings.Replace(this.ResourceFieldRef.String(), "ResourceFieldSelector", "ResourceFieldSelector", 1) + `,`,
`ConfigMapKeyRef:` + strings.Replace(this.ConfigMapKeyRef.String(), "ConfigMapKeySelector", "ConfigMapKeySelector", 1) + `,`,
`SecretKeyRef:` + strings.Replace(this.SecretKeyRef.String(), "SecretKeySelector", "SecretKeySelector", 1) + `,`,
+ `FileKeyRef:` + strings.Replace(this.FileKeyRef.String(), "FileKeySelector", "FileKeySelector", 1) + `,`,
`}`,
}, "")
return s
@@ -27826,6 +28536,11 @@ func (this *EphemeralContainerCommon) String() string {
repeatedStringForResizePolicy += strings.Replace(strings.Replace(f.String(), "ContainerResizePolicy", "ContainerResizePolicy", 1), `&`, ``, 1) + ","
}
repeatedStringForResizePolicy += "}"
+ repeatedStringForRestartPolicyRules := "[]ContainerRestartRule{"
+ for _, f := range this.RestartPolicyRules {
+ repeatedStringForRestartPolicyRules += strings.Replace(strings.Replace(f.String(), "ContainerRestartRule", "ContainerRestartRule", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForRestartPolicyRules += "}"
s := strings.Join([]string{`&EphemeralContainerCommon{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`Image:` + fmt.Sprintf("%v", this.Image) + `,`,
@@ -27851,6 +28566,7 @@ func (this *EphemeralContainerCommon) String() string {
`StartupProbe:` + strings.Replace(this.StartupProbe.String(), "Probe", "Probe", 1) + `,`,
`ResizePolicy:` + repeatedStringForResizePolicy + `,`,
`RestartPolicy:` + valueToStringGenerated(this.RestartPolicy) + `,`,
+ `RestartPolicyRules:` + repeatedStringForRestartPolicyRules + `,`,
`}`,
}, "")
return s
@@ -27951,6 +28667,19 @@ func (this *FCVolumeSource) String() string {
}, "")
return s
}
+func (this *FileKeySelector) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&FileKeySelector{`,
+ `VolumeName:` + fmt.Sprintf("%v", this.VolumeName) + `,`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `Optional:` + valueToStringGenerated(this.Optional) + `,`,
+ `}`,
+ }, "")
+ return s
+}
func (this *FlexPersistentVolumeSource) String() string {
if this == nil {
return "nil"
@@ -29169,6 +29898,21 @@ func (this *PodAttachOptions) String() string {
}, "")
return s
}
+func (this *PodCertificateProjection) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodCertificateProjection{`,
+ `SignerName:` + fmt.Sprintf("%v", this.SignerName) + `,`,
+ `KeyType:` + fmt.Sprintf("%v", this.KeyType) + `,`,
+ `MaxExpirationSeconds:` + valueToStringGenerated(this.MaxExpirationSeconds) + `,`,
+ `CredentialBundlePath:` + fmt.Sprintf("%v", this.CredentialBundlePath) + `,`,
+ `KeyPath:` + fmt.Sprintf("%v", this.KeyPath) + `,`,
+ `CertificateChainPath:` + fmt.Sprintf("%v", this.CertificateChainPath) + `,`,
+ `}`,
+ }, "")
+ return s
+}
func (this *PodCondition) String() string {
if this == nil {
return "nil"
@@ -29228,6 +29972,22 @@ func (this *PodExecOptions) String() string {
}, "")
return s
}
+func (this *PodExtendedResourceClaimStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForRequestMappings := "[]ContainerExtendedResourceRequest{"
+ for _, f := range this.RequestMappings {
+ repeatedStringForRequestMappings += strings.Replace(strings.Replace(f.String(), "ContainerExtendedResourceRequest", "ContainerExtendedResourceRequest", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForRequestMappings += "}"
+ s := strings.Join([]string{`&PodExtendedResourceClaimStatus{`,
+ `RequestMappings:` + repeatedStringForRequestMappings + `,`,
+ `ResourceClaimName:` + fmt.Sprintf("%v", this.ResourceClaimName) + `,`,
+ `}`,
+ }, "")
+ return s
+}
func (this *PodIP) String() string {
if this == nil {
return "nil"
@@ -29503,6 +30263,7 @@ func (this *PodSpec) String() string {
`SchedulingGates:` + repeatedStringForSchedulingGates + `,`,
`ResourceClaims:` + repeatedStringForResourceClaims + `,`,
`Resources:` + strings.Replace(this.Resources.String(), "ResourceRequirements", "ResourceRequirements", 1) + `,`,
+ `HostnameOverride:` + valueToStringGenerated(this.HostnameOverride) + `,`,
`}`,
}, "")
return s
@@ -29564,6 +30325,7 @@ func (this *PodStatus) String() string {
`ResourceClaimStatuses:` + repeatedStringForResourceClaimStatuses + `,`,
`HostIPs:` + repeatedStringForHostIPs + `,`,
`ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
+ `ExtendedResourceClaimStatus:` + strings.Replace(this.ExtendedResourceClaimStatus.String(), "PodExtendedResourceClaimStatus", "PodExtendedResourceClaimStatus", 1) + `,`,
`}`,
}, "")
return s
@@ -30673,6 +31435,7 @@ func (this *VolumeProjection) String() string {
`ConfigMap:` + strings.Replace(this.ConfigMap.String(), "ConfigMapProjection", "ConfigMapProjection", 1) + `,`,
`ServiceAccountToken:` + strings.Replace(this.ServiceAccountToken.String(), "ServiceAccountTokenProjection", "ServiceAccountTokenProjection", 1) + `,`,
`ClusterTrustBundle:` + strings.Replace(this.ClusterTrustBundle.String(), "ClusterTrustBundleProjection", "ClusterTrustBundleProjection", 1) + `,`,
+ `PodCertificate:` + strings.Replace(this.PodCertificate.String(), "PodCertificateProjection", "PodCertificateProjection", 1) + `,`,
`}`,
}, "")
return s
@@ -36465,61 +37228,11 @@ func (m *Container) Unmarshal(dAtA []byte) error {
s := ContainerRestartPolicy(dAtA[iNdEx:postIndex])
m.RestartPolicy = &s
iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ContainerImage) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ContainerImage: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ContainerImage: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
+ case 25:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field RestartPolicyRules", wireType)
}
- var stringLen uint64
+ var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -36529,43 +37242,26 @@ func (m *ContainerImage) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= uint64(b&0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
- intStringLen := int(stringLen)
- if intStringLen < 0 {
+ if msglen < 0 {
return ErrInvalidLengthGenerated
}
- postIndex := iNdEx + intStringLen
+ postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Names = append(m.Names, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field SizeBytes", wireType)
- }
- m.SizeBytes = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.SizeBytes |= int64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
+ m.RestartPolicyRules = append(m.RestartPolicyRules, ContainerRestartRule{})
+ if err := m.RestartPolicyRules[len(m.RestartPolicyRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
}
+ iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
@@ -36587,7 +37283,7 @@ func (m *ContainerImage) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *ContainerPort) Unmarshal(dAtA []byte) error {
+func (m *ContainerExtendedResourceRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -36610,15 +37306,15 @@ func (m *ContainerPort) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: ContainerPort: wiretype end group for non-group")
+ return fmt.Errorf("proto: ContainerExtendedResourceRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: ContainerPort: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: ContainerExtendedResourceRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerName", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -36646,49 +37342,11 @@ func (m *ContainerPort) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Name = string(dAtA[iNdEx:postIndex])
+ m.ContainerName = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field HostPort", wireType)
- }
- m.HostPort = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.HostPort |= int32(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ContainerPort", wireType)
- }
- m.ContainerPort = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ContainerPort |= int32(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -36716,11 +37374,11 @@ func (m *ContainerPort) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Protocol = Protocol(dAtA[iNdEx:postIndex])
+ m.ResourceName = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
- case 5:
+ case 3:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field HostIP", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field RequestName", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -36748,7 +37406,7 @@ func (m *ContainerPort) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.HostIP = string(dAtA[iNdEx:postIndex])
+ m.RequestName = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -36771,7 +37429,7 @@ func (m *ContainerPort) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *ContainerResizePolicy) Unmarshal(dAtA []byte) error {
+func (m *ContainerImage) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -36794,15 +37452,15 @@ func (m *ContainerResizePolicy) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: ContainerResizePolicy: wiretype end group for non-group")
+ return fmt.Errorf("proto: ContainerImage: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: ContainerResizePolicy: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: ContainerImage: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -36830,13 +37488,13 @@ func (m *ContainerResizePolicy) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.ResourceName = ResourceName(dAtA[iNdEx:postIndex])
+ m.Names = append(m.Names, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RestartPolicy", wireType)
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SizeBytes", wireType)
}
- var stringLen uint64
+ m.SizeBytes = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -36846,24 +37504,585 @@ func (m *ContainerResizePolicy) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= uint64(b&0x7F) << shift
+ m.SizeBytes |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.RestartPolicy = ResourceResizeRestartPolicy(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerPort) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerPort: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerPort: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostPort", wireType)
+ }
+ m.HostPort = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.HostPort |= int32(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerPort", wireType)
+ }
+ m.ContainerPort = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ContainerPort |= int32(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Protocol = Protocol(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostIP", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.HostIP = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerResizePolicy) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerResizePolicy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerResizePolicy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ResourceName = ResourceName(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RestartPolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RestartPolicy = ResourceResizeRestartPolicy(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerRestartRule) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerRestartRule: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerRestartRule: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Action = ContainerRestartRuleAction(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExitCodes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ExitCodes == nil {
+ m.ExitCodes = &ContainerRestartRuleOnExitCodes{}
+ }
+ if err := m.ExitCodes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerRestartRuleOnExitCodes) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerRestartRuleOnExitCodes: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerRestartRuleOnExitCodes: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Operator = ContainerRestartRuleOnExitCodesOperator(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType == 0 {
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int32(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Values = append(m.Values, v)
+ } else if wireType == 2 {
+ var packedLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ packedLen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if packedLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + packedLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var elementCount int
+ var count int
+ for _, integer := range dAtA[iNdEx:postIndex] {
+ if integer < 128 {
+ count++
+ }
+ }
+ elementCount = count
+ if elementCount != 0 && len(m.Values) == 0 {
+ m.Values = make([]int32, 0, elementCount)
+ }
+ for iNdEx < postIndex {
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int32(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Values = append(m.Values, v)
+ }
+ } else {
+ return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType)
+ }
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
@@ -38790,13 +40009,196 @@ func (m *EndpointAddress) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.IP = string(dAtA[iNdEx:postIndex])
+ m.IP = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.TargetRef == nil {
+ m.TargetRef = &ObjectReference{}
+ }
+ if err := m.TargetRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Hostname = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := string(dAtA[iNdEx:postIndex])
+ m.NodeName = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EndpointPort) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EndpointPort: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EndpointPort: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field TargetRef", wireType)
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
}
- var msglen int
+ m.Port = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -38806,31 +40208,14 @@ func (m *EndpointAddress) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= int(b&0x7F) << shift
+ m.Port |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.TargetRef == nil {
- m.TargetRef = &ObjectReference{}
- }
- if err := m.TargetRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
case 3:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -38858,11 +40243,11 @@ func (m *EndpointAddress) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Hostname = string(dAtA[iNdEx:postIndex])
+ m.Protocol = Protocol(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field AppProtocol", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -38891,7 +40276,7 @@ func (m *EndpointAddress) Unmarshal(dAtA []byte) error {
return io.ErrUnexpectedEOF
}
s := string(dAtA[iNdEx:postIndex])
- m.NodeName = &s
+ m.AppProtocol = &s
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -38914,7 +40299,7 @@ func (m *EndpointAddress) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *EndpointPort) Unmarshal(dAtA []byte) error {
+func (m *EndpointSubset) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -38937,17 +40322,17 @@ func (m *EndpointPort) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: EndpointPort: wiretype end group for non-group")
+ return fmt.Errorf("proto: EndpointSubset: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: EndpointPort: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: EndpointSubset: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
}
- var stringLen uint64
+ var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -38957,48 +40342,31 @@ func (m *EndpointPort) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= uint64(b&0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
- intStringLen := int(stringLen)
- if intStringLen < 0 {
+ if msglen < 0 {
return ErrInvalidLengthGenerated
}
- postIndex := iNdEx + intStringLen
+ postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Name = string(dAtA[iNdEx:postIndex])
+ m.Addresses = append(m.Addresses, EndpointAddress{})
+ if err := m.Addresses[len(m.Addresses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
iNdEx = postIndex
case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
- }
- m.Port = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Port |= int32(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field NotReadyAddresses", wireType)
}
- var stringLen uint64
+ var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -39008,29 +40376,31 @@ func (m *EndpointPort) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= uint64(b&0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
- intStringLen := int(stringLen)
- if intStringLen < 0 {
+ if msglen < 0 {
return ErrInvalidLengthGenerated
}
- postIndex := iNdEx + intStringLen
+ postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Protocol = Protocol(dAtA[iNdEx:postIndex])
+ m.NotReadyAddresses = append(m.NotReadyAddresses, EndpointAddress{})
+ if err := m.NotReadyAddresses[len(m.NotReadyAddresses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
iNdEx = postIndex
- case 4:
+ case 3:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field AppProtocol", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
}
- var stringLen uint64
+ var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -39040,24 +40410,25 @@ func (m *EndpointPort) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= uint64(b&0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
- intStringLen := int(stringLen)
- if intStringLen < 0 {
+ if msglen < 0 {
return ErrInvalidLengthGenerated
}
- postIndex := iNdEx + intStringLen
+ postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- s := string(dAtA[iNdEx:postIndex])
- m.AppProtocol = &s
+ m.Ports = append(m.Ports, EndpointPort{})
+ if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -39080,7 +40451,7 @@ func (m *EndpointPort) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *EndpointSubset) Unmarshal(dAtA []byte) error {
+func (m *Endpoints) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -39103,15 +40474,15 @@ func (m *EndpointSubset) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: EndpointSubset: wiretype end group for non-group")
+ return fmt.Errorf("proto: Endpoints: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: EndpointSubset: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: Endpoints: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -39138,48 +40509,13 @@ func (m *EndpointSubset) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Addresses = append(m.Addresses, EndpointAddress{})
- if err := m.Addresses[len(m.Addresses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NotReadyAddresses", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.NotReadyAddresses = append(m.NotReadyAddresses, EndpointAddress{})
- if err := m.NotReadyAddresses[len(m.NotReadyAddresses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Subsets", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -39206,8 +40542,8 @@ func (m *EndpointSubset) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Ports = append(m.Ports, EndpointPort{})
- if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ m.Subsets = append(m.Subsets, EndpointSubset{})
+ if err := m.Subsets[len(m.Subsets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -39232,7 +40568,7 @@ func (m *EndpointSubset) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *Endpoints) Unmarshal(dAtA []byte) error {
+func (m *EndpointsList) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -39255,15 +40591,15 @@ func (m *Endpoints) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: Endpoints: wiretype end group for non-group")
+ return fmt.Errorf("proto: EndpointsList: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: Endpoints: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: EndpointsList: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -39290,13 +40626,13 @@ func (m *Endpoints) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Subsets", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -39323,8 +40659,8 @@ func (m *Endpoints) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Subsets = append(m.Subsets, EndpointSubset{})
- if err := m.Subsets[len(m.Subsets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ m.Items = append(m.Items, Endpoints{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -39349,7 +40685,7 @@ func (m *Endpoints) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *EndpointsList) Unmarshal(dAtA []byte) error {
+func (m *EnvFromSource) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -39372,15 +40708,47 @@ func (m *EndpointsList) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: EndpointsList: wiretype end group for non-group")
+ return fmt.Errorf("proto: EnvFromSource: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: EndpointsList: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: EnvFromSource: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Prefix", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Prefix = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ConfigMapRef", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -39407,13 +40775,16 @@ func (m *EndpointsList) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ if m.ConfigMapRef == nil {
+ m.ConfigMapRef = &ConfigMapEnvSource{}
+ }
+ if err := m.ConfigMapRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
- case 2:
+ case 3:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -39440,8 +40811,10 @@ func (m *EndpointsList) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Items = append(m.Items, Endpoints{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ if m.SecretRef == nil {
+ m.SecretRef = &SecretEnvSource{}
+ }
+ if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -39466,7 +40839,7 @@ func (m *EndpointsList) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *EnvFromSource) Unmarshal(dAtA []byte) error {
+func (m *EnvVar) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -39489,15 +40862,15 @@ func (m *EnvFromSource) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: EnvFromSource: wiretype end group for non-group")
+ return fmt.Errorf("proto: EnvVar: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: EnvFromSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: EnvVar: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Prefix", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -39525,13 +40898,13 @@ func (m *EnvFromSource) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Prefix = string(dAtA[iNdEx:postIndex])
+ m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ConfigMapRef", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
}
- var msglen int
+ var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -39541,31 +40914,27 @@ func (m *EnvFromSource) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= int(b&0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
- if msglen < 0 {
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
- postIndex := iNdEx + msglen
+ postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if m.ConfigMapRef == nil {
- m.ConfigMapRef = &ConfigMapEnvSource{}
- }
- if err := m.ConfigMapRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
+ m.Value = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field ValueFrom", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -39592,10 +40961,10 @@ func (m *EnvFromSource) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if m.SecretRef == nil {
- m.SecretRef = &SecretEnvSource{}
+ if m.ValueFrom == nil {
+ m.ValueFrom = &EnvVarSource{}
}
- if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ if err := m.ValueFrom.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -39620,7 +40989,7 @@ func (m *EnvFromSource) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *EnvVar) Unmarshal(dAtA []byte) error {
+func (m *EnvVarSource) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -39643,79 +41012,15 @@ func (m *EnvVar) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: EnvVar: wiretype end group for non-group")
+ return fmt.Errorf("proto: EnvVarSource: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: EnvVar: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: EnvVarSource: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Value = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ValueFrom", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field FieldRef", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -39742,66 +41047,16 @@ func (m *EnvVar) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if m.ValueFrom == nil {
- m.ValueFrom = &EnvVarSource{}
+ if m.FieldRef == nil {
+ m.FieldRef = &ObjectFieldSelector{}
}
- if err := m.ValueFrom.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ if err := m.FieldRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *EnvVarSource) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: EnvVarSource: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: EnvVarSource: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
+ case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field FieldRef", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceFieldRef", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -39828,16 +41083,16 @@ func (m *EnvVarSource) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if m.FieldRef == nil {
- m.FieldRef = &ObjectFieldSelector{}
+ if m.ResourceFieldRef == nil {
+ m.ResourceFieldRef = &ResourceFieldSelector{}
}
- if err := m.FieldRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ if err := m.ResourceFieldRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
- case 2:
+ case 3:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ResourceFieldRef", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field ConfigMapKeyRef", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -39864,16 +41119,16 @@ func (m *EnvVarSource) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if m.ResourceFieldRef == nil {
- m.ResourceFieldRef = &ResourceFieldSelector{}
+ if m.ConfigMapKeyRef == nil {
+ m.ConfigMapKeyRef = &ConfigMapKeySelector{}
}
- if err := m.ResourceFieldRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ if err := m.ConfigMapKeyRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
- case 3:
+ case 4:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ConfigMapKeyRef", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretKeyRef", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -39900,16 +41155,16 @@ func (m *EnvVarSource) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if m.ConfigMapKeyRef == nil {
- m.ConfigMapKeyRef = &ConfigMapKeySelector{}
+ if m.SecretKeyRef == nil {
+ m.SecretKeyRef = &SecretKeySelector{}
}
- if err := m.ConfigMapKeyRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ if err := m.SecretKeyRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
- case 4:
+ case 5:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field SecretKeyRef", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field FileKeyRef", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -39936,10 +41191,10 @@ func (m *EnvVarSource) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if m.SecretKeyRef == nil {
- m.SecretKeyRef = &SecretKeySelector{}
+ if m.FileKeyRef == nil {
+ m.FileKeyRef = &FileKeySelector{}
}
- if err := m.SecretKeyRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ if err := m.FileKeyRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -40700,46 +41955,116 @@ func (m *EphemeralContainerCommon) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.EnvFrom = append(m.EnvFrom, EnvFromSource{})
- if err := m.EnvFrom[len(m.EnvFrom)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 20:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field TerminationMessagePolicy", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
+ m.EnvFrom = append(m.EnvFrom, EnvFromSource{})
+ if err := m.EnvFrom[len(m.EnvFrom)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 20:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TerminationMessagePolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.TerminationMessagePolicy = TerminationMessagePolicy(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 21:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeDevices", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeDevices = append(m.VolumeDevices, VolumeDevice{})
+ if err := m.VolumeDevices[len(m.VolumeDevices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 22:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StartupProbe", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.StartupProbe == nil {
+ m.StartupProbe = &Probe{}
}
- if postIndex > l {
- return io.ErrUnexpectedEOF
+ if err := m.StartupProbe.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
}
- m.TerminationMessagePolicy = TerminationMessagePolicy(dAtA[iNdEx:postIndex])
iNdEx = postIndex
- case 21:
+ case 23:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field VolumeDevices", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field ResizePolicy", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -40766,16 +42091,16 @@ func (m *EphemeralContainerCommon) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.VolumeDevices = append(m.VolumeDevices, VolumeDevice{})
- if err := m.VolumeDevices[len(m.VolumeDevices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ m.ResizePolicy = append(m.ResizePolicy, ContainerResizePolicy{})
+ if err := m.ResizePolicy[len(m.ResizePolicy)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
- case 22:
+ case 24:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field StartupProbe", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field RestartPolicy", wireType)
}
- var msglen int
+ var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -40785,31 +42110,28 @@ func (m *EphemeralContainerCommon) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= int(b&0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
- if msglen < 0 {
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
- postIndex := iNdEx + msglen
+ postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if m.StartupProbe == nil {
- m.StartupProbe = &Probe{}
- }
- if err := m.StartupProbe.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
+ s := ContainerRestartPolicy(dAtA[iNdEx:postIndex])
+ m.RestartPolicy = &s
iNdEx = postIndex
- case 23:
+ case 25:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ResizePolicy", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field RestartPolicyRules", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -40836,44 +42158,11 @@ func (m *EphemeralContainerCommon) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.ResizePolicy = append(m.ResizePolicy, ContainerResizePolicy{})
- if err := m.ResizePolicy[len(m.ResizePolicy)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ m.RestartPolicyRules = append(m.RestartPolicyRules, ContainerRestartRule{})
+ if err := m.RestartPolicyRules[len(m.RestartPolicyRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
- case 24:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RestartPolicy", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := ContainerRestartPolicy(dAtA[iNdEx:postIndex])
- m.RestartPolicy = &s
- iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
@@ -42113,6 +43402,173 @@ func (m *FCVolumeSource) Unmarshal(dAtA []byte) error {
}
return nil
}
+func (m *FileKeySelector) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: FileKeySelector: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: FileKeySelector: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Key = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Optional = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
func (m *FlexPersistentVolumeSource) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
@@ -55916,17 +57372,297 @@ func (m *PodAntiAffinity) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: PodAntiAffinity: wiretype end group for non-group")
+ return fmt.Errorf("proto: PodAntiAffinity: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodAntiAffinity: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RequiredDuringSchedulingIgnoredDuringExecution", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RequiredDuringSchedulingIgnoredDuringExecution = append(m.RequiredDuringSchedulingIgnoredDuringExecution, PodAffinityTerm{})
+ if err := m.RequiredDuringSchedulingIgnoredDuringExecution[len(m.RequiredDuringSchedulingIgnoredDuringExecution)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PreferredDuringSchedulingIgnoredDuringExecution", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PreferredDuringSchedulingIgnoredDuringExecution = append(m.PreferredDuringSchedulingIgnoredDuringExecution, WeightedPodAffinityTerm{})
+ if err := m.PreferredDuringSchedulingIgnoredDuringExecution[len(m.PreferredDuringSchedulingIgnoredDuringExecution)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodAttachOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodAttachOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodAttachOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stdin = bool(v != 0)
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stdout", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stdout = bool(v != 0)
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stderr", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stderr = bool(v != 0)
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TTY", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TTY = bool(v != 0)
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Container = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodCertificateProjection) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodCertificateProjection: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: PodAntiAffinity: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: PodCertificateProjection: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RequiredDuringSchedulingIgnoredDuringExecution", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field SignerName", wireType)
}
- var msglen int
+ var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -55936,31 +57672,29 @@ func (m *PodAntiAffinity) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= int(b&0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
- if msglen < 0 {
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
- postIndex := iNdEx + msglen
+ postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.RequiredDuringSchedulingIgnoredDuringExecution = append(m.RequiredDuringSchedulingIgnoredDuringExecution, PodAffinityTerm{})
- if err := m.RequiredDuringSchedulingIgnoredDuringExecution[len(m.RequiredDuringSchedulingIgnoredDuringExecution)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
+ m.SignerName = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field PreferredDuringSchedulingIgnoredDuringExecution", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field KeyType", wireType)
}
- var msglen int
+ var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -55970,81 +57704,29 @@ func (m *PodAntiAffinity) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= int(b&0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
- if msglen < 0 {
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
- postIndex := iNdEx + msglen
+ postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.PreferredDuringSchedulingIgnoredDuringExecution = append(m.PreferredDuringSchedulingIgnoredDuringExecution, WeightedPodAffinityTerm{})
- if err := m.PreferredDuringSchedulingIgnoredDuringExecution[len(m.PreferredDuringSchedulingIgnoredDuringExecution)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
+ m.KeyType = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PodAttachOptions) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PodAttachOptions: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PodAttachOptions: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
+ case 3:
if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxExpirationSeconds", wireType)
}
- var v int
+ var v int32
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -56054,17 +57736,17 @@ func (m *PodAttachOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= int(b&0x7F) << shift
+ v |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
- m.Stdin = bool(v != 0)
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Stdout", wireType)
+ m.MaxExpirationSeconds = &v
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CredentialBundlePath", wireType)
}
- var v int
+ var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -56074,37 +57756,29 @@ func (m *PodAttachOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= int(b&0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
- m.Stdout = bool(v != 0)
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Stderr", wireType)
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
}
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
}
- m.Stderr = bool(v != 0)
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field TTY", wireType)
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
}
- var v int
+ m.CredentialBundlePath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field KeyPath", wireType)
+ }
+ var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -56114,15 +57788,27 @@ func (m *PodAttachOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= int(b&0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
- m.TTY = bool(v != 0)
- case 5:
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.KeyPath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field CertificateChainPath", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -56150,7 +57836,7 @@ func (m *PodAttachOptions) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Container = string(dAtA[iNdEx:postIndex])
+ m.CertificateChainPath = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -56607,15 +58293,210 @@ func (m *PodDNSConfigOption) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: PodDNSConfigOption: wiretype end group for non-group")
+ return fmt.Errorf("proto: PodDNSConfigOption: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodDNSConfigOption: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := string(dAtA[iNdEx:postIndex])
+ m.Value = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodExecOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodExecOptions: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: PodDNSConfigOption: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: PodExecOptions: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stdin = bool(v != 0)
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stdout", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stdout = bool(v != 0)
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stderr", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stderr = bool(v != 0)
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TTY", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TTY = bool(v != 0)
+ case 5:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -56643,11 +58524,11 @@ func (m *PodDNSConfigOption) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Name = string(dAtA[iNdEx:postIndex])
+ m.Container = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
- case 2:
+ case 6:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -56675,8 +58556,7 @@ func (m *PodDNSConfigOption) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- s := string(dAtA[iNdEx:postIndex])
- m.Value = &s
+ m.Command = append(m.Command, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -56699,7 +58579,7 @@ func (m *PodDNSConfigOption) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *PodExecOptions) Unmarshal(dAtA []byte) error {
+func (m *PodExtendedResourceClaimStatus) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -56722,97 +58602,17 @@ func (m *PodExecOptions) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: PodExecOptions: wiretype end group for non-group")
+ return fmt.Errorf("proto: PodExtendedResourceClaimStatus: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: PodExecOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: PodExtendedResourceClaimStatus: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Stdin = bool(v != 0)
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Stdout", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Stdout = bool(v != 0)
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Stderr", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Stderr = bool(v != 0)
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field TTY", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.TTY = bool(v != 0)
- case 5:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field RequestMappings", wireType)
}
- var stringLen uint64
+ var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -56822,27 +58622,29 @@ func (m *PodExecOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= uint64(b&0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
- intStringLen := int(stringLen)
- if intStringLen < 0 {
+ if msglen < 0 {
return ErrInvalidLengthGenerated
}
- postIndex := iNdEx + intStringLen
+ postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Container = string(dAtA[iNdEx:postIndex])
+ m.RequestMappings = append(m.RequestMappings, ContainerExtendedResourceRequest{})
+ if err := m.RequestMappings[len(m.RequestMappings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
iNdEx = postIndex
- case 6:
+ case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceClaimName", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -56870,7 +58672,7 @@ func (m *PodExecOptions) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Command = append(m.Command, string(dAtA[iNdEx:postIndex]))
+ m.ResourceClaimName = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -60088,6 +61890,39 @@ func (m *PodSpec) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
+ case 41:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostnameOverride", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := string(dAtA[iNdEx:postIndex])
+ m.HostnameOverride = &s
+ iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
@@ -60687,6 +62522,42 @@ func (m *PodStatus) Unmarshal(dAtA []byte) error {
break
}
}
+ case 18:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExtendedResourceClaimStatus", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ExtendedResourceClaimStatus == nil {
+ m.ExtendedResourceClaimStatus = &PodExtendedResourceClaimStatus{}
+ }
+ if err := m.ExtendedResourceClaimStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
@@ -73489,6 +75360,42 @@ func (m *VolumeProjection) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodCertificate", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PodCertificate == nil {
+ m.PodCertificate = &PodCertificateProjection{}
+ }
+ if err := m.PodCertificate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
diff --git a/hack/tools/vendor/k8s.io/api/core/v1/generated.proto b/hack/tools/vendor/k8s.io/api/core/v1/generated.proto
index 9b48fb1c3983..fb26953147d9 100644
--- a/hack/tools/vendor/k8s.io/api/core/v1/generated.proto
+++ b/hack/tools/vendor/k8s.io/api/core/v1/generated.proto
@@ -737,8 +737,8 @@ message Container {
repeated ContainerPort ports = 6;
// 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
+ // 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.
@@ -768,10 +768,10 @@ message Container {
repeated ContainerResizePolicy resizePolicy = 23;
// 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,
+ // 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.
- // Setting the RestartPolicy as "Always" for the init container will have the following effect:
+ // 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"
@@ -786,6 +786,22 @@ message Container {
// +optional
optional string restartPolicy = 24;
+ // 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.
+ // +featureGate=ContainerRestartRules
+ // +optional
+ // +listType=atomic
+ repeated ContainerRestartRule restartPolicyRules = 25;
+
// Pod volumes to mount into the container's filesystem.
// Cannot be updated.
// +optional
@@ -888,6 +904,19 @@ message Container {
optional bool tty = 18;
}
+// ContainerExtendedResourceRequest has the mapping of container name,
+// extended resource name to the device request name.
+message ContainerExtendedResourceRequest {
+ // The name of the container requesting resources.
+ optional string containerName = 1;
+
+ // The name of the extended resource in that container which gets backed by DRA.
+ optional string resourceName = 2;
+
+ // The name of the request in the special ResourceClaim which corresponds to the extended resource.
+ optional string requestName = 3;
+}
+
// Describe a container image
message ContainerImage {
// Names by which this image is known.
@@ -942,6 +971,39 @@ message ContainerResizePolicy {
optional string restartPolicy = 2;
}
+// ContainerRestartRule describes how a container exit is handled.
+message ContainerRestartRule {
+ // Specifies the action taken on a container exit if the requirements
+ // are satisfied. The only possible value is "Restart" to restart the
+ // container.
+ // +required
+ optional string action = 1;
+
+ // Represents the exit codes to check on container exits.
+ // +optional
+ // +oneOf=when
+ optional ContainerRestartRuleOnExitCodes exitCodes = 2;
+}
+
+// ContainerRestartRuleOnExitCodes describes the condition
+// for handling an exited container based on its exit codes.
+message ContainerRestartRuleOnExitCodes {
+ // 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
+ // set of specified values.
+ // - NotIn: the requirement is satisfied if the container exit code is
+ // not in the set of specified values.
+ // +required
+ optional string operator = 1;
+
+ // Specifies the set of values to check for container exit codes.
+ // At most 255 elements are allowed.
+ // +optional
+ // +listType=set
+ repeated int32 values = 2;
+}
+
// ContainerState holds a possible state of container.
// Only one of its members may be specified.
// If none of them is specified, the default one is ContainerStateWaiting.
@@ -1344,7 +1406,8 @@ message EndpointsList {
// EnvFromSource represents the source of a set of ConfigMaps or Secrets
message EnvFromSource {
- // Optional text to prepend to the name of each environment variable. Must be a C_IDENTIFIER.
+ // Optional text to prepend to the name of each environment variable.
+ // May consist of any printable ASCII characters except '='.
// +optional
optional string prefix = 1;
@@ -1359,7 +1422,8 @@ message EnvFromSource {
// EnvVar represents an environment variable present in a Container.
message EnvVar {
- // Name of the environment variable. Must be a C_IDENTIFIER.
+ // Name of the environment variable.
+ // May consist of any printable ASCII characters except '='.
optional string name = 1;
// Variable references $(VAR_NAME) are expanded
@@ -1398,6 +1462,13 @@ message EnvVarSource {
// Selects a key of a secret in the pod's namespace
// +optional
optional SecretKeySelector secretKeyRef = 4;
+
+ // FileKeyRef selects a key of the env file.
+ // Requires the EnvFiles feature gate to be enabled.
+ //
+ // +featureGate=EnvFiles
+ // +optional
+ optional FileKeySelector fileKeyRef = 5;
}
// An EphemeralContainer is a temporary container that you may add to an existing Pod for
@@ -1479,8 +1550,8 @@ message EphemeralContainerCommon {
repeated ContainerPort ports = 6;
// 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
+ // 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.
@@ -1510,12 +1581,19 @@ message EphemeralContainerCommon {
// 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.
+ // You cannot set this field on ephemeral containers.
// +featureGate=SidecarContainers
// +optional
optional string restartPolicy = 24;
+ // 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.
+ // +featureGate=ContainerRestartRules
+ // +optional
+ // +listType=atomic
+ repeated ContainerRestartRule restartPolicyRules = 25;
+
// Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers.
// Cannot be updated.
// +optional
@@ -1776,6 +1854,36 @@ message FCVolumeSource {
repeated string wwids = 5;
}
+// FileKeySelector selects a key of the env file.
+// +structType=atomic
+message FileKeySelector {
+ // The name of the volume mount containing the env file.
+ // +required
+ optional string volumeName = 1;
+
+ // The path within the volume from which to select the file.
+ // Must be relative and may not contain the '..' path or start with '..'.
+ // +required
+ optional string path = 2;
+
+ // 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.
+ // +required
+ optional string key = 3;
+
+ // Specify whether the file or its key must be defined. If the file or key
+ // does not exist, then the env var is not published.
+ // If optional is set to true and the specified key does not exist,
+ // the environment variable will not be set in the Pod's containers.
+ //
+ // If optional is set to false and the specified key does not exist,
+ // an error will be returned during Pod creation.
+ // +optional
+ // +default=false
+ optional bool optional = 4;
+}
+
// FlexPersistentVolumeSource represents a generic persistent volume resource that is
// provisioned/attached using an exec based plugin.
message FlexPersistentVolumeSource {
@@ -1949,7 +2057,6 @@ message GlusterfsPersistentVolumeSource {
// Glusterfs volumes do not support ownership management or SELinux relabeling.
message GlusterfsVolumeSource {
// endpoints is the endpoint name that details Glusterfs topology.
- // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
optional string endpoints = 1;
// path is the Glusterfs volume path.
@@ -3160,15 +3267,13 @@ message PersistentVolumeClaimSpec {
// 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.
+ // 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/
- // (Beta) Using this field requires the VolumeAttributesClass feature gate to be enabled (off by default).
// +featureGate=VolumeAttributesClass
// +optional
optional string volumeAttributesClassName = 9;
@@ -3267,14 +3372,12 @@ message PersistentVolumeClaimStatus {
// 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).
// +featureGate=VolumeAttributesClass
// +optional
optional string currentVolumeAttributesClassName = 8;
// 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).
// +featureGate=VolumeAttributesClass
// +optional
optional ModifyVolumeStatus modifyVolumeStatus = 9;
@@ -3515,7 +3618,6 @@ message PersistentVolumeSpec {
// 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).
// +featureGate=VolumeAttributesClass
// +optional
optional string volumeAttributesClassName = 10;
@@ -3684,8 +3786,8 @@ message PodAntiAffinity {
// most preferred is the one with the greatest sum of weights, i.e.
// for each node that meets all of the scheduling requirements (resource
// request, requiredDuringScheduling anti-affinity expressions, etc.),
- // compute a sum by iterating through the elements of this field and adding
- // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
+ // compute a sum by iterating through the elements of this field and subtracting
+ // "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the
// node(s) with the highest sum are the most preferred.
// +optional
// +listType=atomic
@@ -3725,6 +3827,79 @@ message PodAttachOptions {
optional string container = 5;
}
+// PodCertificateProjection provides a private key and X.509 certificate in the
+// pod filesystem.
+message PodCertificateProjection {
+ // Kubelet's generated CSRs will be addressed to this signer.
+ //
+ // +required
+ optional string signerName = 1;
+
+ // The type of keypair Kubelet will generate for the pod.
+ //
+ // Valid values are "RSA3072", "RSA4096", "ECDSAP256", "ECDSAP384",
+ // "ECDSAP521", and "ED25519".
+ //
+ // +required
+ optional string keyType = 2;
+
+ // maxExpirationSeconds is the maximum lifetime permitted for the
+ // certificate.
+ //
+ // Kubelet copies this value verbatim into the PodCertificateRequests it
+ // generates for this projection.
+ //
+ // If 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).
+ //
+ // The 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.
+ //
+ // +optional
+ optional int32 maxExpirationSeconds = 3;
+
+ // Write the credential bundle at this path in the projected volume.
+ //
+ // The 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.
+ //
+ // The remaining blocks are CERTIFICATE blocks, containing the issued
+ // certificate chain from the signer (leaf and any intermediates).
+ //
+ // Using 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.
+ //
+ // +optional
+ optional string credentialBundlePath = 4;
+
+ // Write the key at this path in the projected volume.
+ //
+ // Most 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.
+ //
+ // +optional
+ optional string keyPath = 5;
+
+ // Write the certificate chain at this path in the projected volume.
+ //
+ // Most 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.
+ //
+ // +optional
+ optional string certificateChainPath = 6;
+}
+
// PodCondition contains details for the current condition of this pod.
message PodCondition {
// Type is the type of the condition.
@@ -3829,6 +4004,20 @@ message PodExecOptions {
repeated string command = 6;
}
+// 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.
+message PodExtendedResourceClaimStatus {
+ // RequestMappings identifies the mapping of to device request
+ // in the generated ResourceClaim.
+ // +listType=atomic
+ repeated ContainerExtendedResourceRequest requestMappings = 1;
+
+ // ResourceClaimName is the name of the ResourceClaim that was
+ // generated for the Pod in the namespace of the Pod.
+ optional string resourceClaimName = 2;
+}
+
// PodIP represents a single IP address allocated to the pod.
message PodIP {
// IP is the IP address assigned to the pod
@@ -4269,7 +4458,9 @@ message PodSpec {
optional string nodeName = 10;
// 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.
+ // 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.
// +k8s:conversion-gen=false
// +optional
@@ -4434,6 +4625,7 @@ message PodSpec {
// - spec.hostPID
// - spec.hostIPC
// - spec.hostUsers
+ // - spec.resources
// - spec.securityContext.appArmorProfile
// - spec.securityContext.seLinuxOptions
// - spec.securityContext.seccompProfile
@@ -4504,7 +4696,7 @@ message PodSpec {
// 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.
+ // "cpu", "memory" and "hugepages-" resource names only. ResourceClaims are not supported.
//
// This field enables fine-grained control over resource allocation for the
// entire pod, allowing resource sharing among containers in a pod.
@@ -4516,6 +4708,21 @@ message PodSpec {
// +featureGate=PodLevelResources
// +optional
optional ResourceRequirements resources = 40;
+
+ // 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.
+ //
+ // This 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.
+ //
+ // +featureGate=HostnameOverride
+ // +optional
+ optional string hostnameOverride = 41;
}
// PodStatus represents information about the status of a pod. Status may trail the actual
@@ -4674,6 +4881,11 @@ message PodStatus {
// +featureGate=DynamicResourceAllocation
// +optional
repeated PodResourceClaimStatus resourceClaimStatuses = 15;
+
+ // Status of extended resource claim backed by DRA.
+ // +featureGate=DRAExtendedResource
+ // +optional
+ optional PodExtendedResourceClaimStatus extendedResourceClaimStatus = 18;
}
// PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded
@@ -5298,7 +5510,7 @@ message ResourceRequirements {
// Claims lists the names of resources, defined in spec.resourceClaims,
// that are used by this container.
//
- // This is an alpha field and requires enabling the
+ // This field depends on the
// DynamicResourceAllocation feature gate.
//
// This field is immutable. It can only be set for containers.
@@ -6301,7 +6513,6 @@ message Taint {
optional string effect = 3;
// TimeAdded represents the time at which the taint was added.
- // It is only written for NoExecute taints.
// +optional
optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time timeAdded = 4;
}
@@ -6682,6 +6893,44 @@ message VolumeProjection {
// +featureGate=ClusterTrustBundleProjection
// +optional
optional ClusterTrustBundleProjection clusterTrustBundle = 5;
+
+ // Projects an auto-rotating credential bundle (private key and certificate
+ // chain) that the pod can use either as a TLS client or server.
+ //
+ // Kubelet 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.
+ //
+ // Kubelet will begin trying to rotate the certificate at the time indicated
+ // by the signer using the PodCertificateRequest.Status.BeginRefreshAt
+ // timestamp.
+ //
+ // Kubelet can write a single file, indicated by the credentialBundlePath
+ // field, or separate files, indicated by the keyPath and
+ // certificateChainPath fields.
+ //
+ // The 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).
+ //
+ // Prefer 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.
+ //
+ // The 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.
+ //
+ // +featureGate=PodCertificateProjection +optional
+ optional PodCertificateProjection podCertificate = 6;
}
// VolumeResourceRequirements describes the storage resource requirements for a volume.
@@ -6753,13 +7002,12 @@ message VolumeSource {
// 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
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes/#iscsi
// +optional
optional ISCSIVolumeSource iscsi = 8;
// 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
// +optional
optional GlusterfsVolumeSource glusterfs = 9;
@@ -6771,7 +7019,6 @@ message VolumeSource {
// 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
// +optional
optional RBDVolumeSource rbd = 11;
diff --git a/hack/tools/vendor/k8s.io/api/core/v1/types.go b/hack/tools/vendor/k8s.io/api/core/v1/types.go
index f7641e485aaf..08b6d351cc67 100644
--- a/hack/tools/vendor/k8s.io/api/core/v1/types.go
+++ b/hack/tools/vendor/k8s.io/api/core/v1/types.go
@@ -91,12 +91,11 @@ type VolumeSource struct {
NFS *NFSVolumeSource `json:"nfs,omitempty" protobuf:"bytes,7,opt,name=nfs"`
// 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
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes/#iscsi
// +optional
ISCSI *ISCSIVolumeSource `json:"iscsi,omitempty" protobuf:"bytes,8,opt,name=iscsi"`
// 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
// +optional
Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty" protobuf:"bytes,9,opt,name=glusterfs"`
// persistentVolumeClaimVolumeSource represents a reference to a
@@ -106,7 +105,6 @@ type VolumeSource struct {
PersistentVolumeClaim *PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty" protobuf:"bytes,10,opt,name=persistentVolumeClaim"`
// 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
// +optional
RBD *RBDVolumeSource `json:"rbd,omitempty" protobuf:"bytes,11,opt,name=rbd"`
// flexVolume represents a generic volume resource that is
@@ -437,7 +435,6 @@ type PersistentVolumeSpec struct {
// 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).
// +featureGate=VolumeAttributesClass
// +optional
VolumeAttributesClassName *string `json:"volumeAttributesClassName,omitempty" protobuf:"bytes,10,opt,name=volumeAttributesClassName"`
@@ -616,15 +613,13 @@ type PersistentVolumeClaimSpec struct {
// 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.
+ // 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/
- // (Beta) Using this field requires the VolumeAttributesClass feature gate to be enabled (off by default).
// +featureGate=VolumeAttributesClass
// +optional
VolumeAttributesClassName *string `json:"volumeAttributesClassName,omitempty" protobuf:"bytes,9,opt,name=volumeAttributesClassName"`
@@ -851,13 +846,11 @@ type PersistentVolumeClaimStatus struct {
AllocatedResourceStatuses map[ResourceName]ClaimResourceStatus `json:"allocatedResourceStatuses,omitempty" protobuf:"bytes,7,rep,name=allocatedResourceStatuses"`
// 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).
// +featureGate=VolumeAttributesClass
// +optional
CurrentVolumeAttributesClassName *string `json:"currentVolumeAttributesClassName,omitempty" protobuf:"bytes,8,opt,name=currentVolumeAttributesClassName"`
// 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).
// +featureGate=VolumeAttributesClass
// +optional
ModifyVolumeStatus *ModifyVolumeStatus `json:"modifyVolumeStatus,omitempty" protobuf:"bytes,9,opt,name=modifyVolumeStatus"`
@@ -972,7 +965,6 @@ type EmptyDirVolumeSource struct {
// Glusterfs volumes do not support ownership management or SELinux relabeling.
type GlusterfsVolumeSource struct {
// endpoints is the endpoint name that details Glusterfs topology.
- // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
EndpointsName string `json:"endpoints" protobuf:"bytes,1,opt,name=endpoints"`
// path is the Glusterfs volume path.
@@ -1993,6 +1985,79 @@ type ClusterTrustBundleProjection struct {
Path string `json:"path" protobuf:"bytes,4,rep,name=path"`
}
+// PodCertificateProjection provides a private key and X.509 certificate in the
+// pod filesystem.
+type PodCertificateProjection struct {
+ // Kubelet's generated CSRs will be addressed to this signer.
+ //
+ // +required
+ SignerName string `json:"signerName,omitempty" protobuf:"bytes,1,rep,name=signerName"`
+
+ // The type of keypair Kubelet will generate for the pod.
+ //
+ // Valid values are "RSA3072", "RSA4096", "ECDSAP256", "ECDSAP384",
+ // "ECDSAP521", and "ED25519".
+ //
+ // +required
+ KeyType string `json:"keyType,omitempty" protobuf:"bytes,2,rep,name=keyType"`
+
+ // maxExpirationSeconds is the maximum lifetime permitted for the
+ // certificate.
+ //
+ // Kubelet copies this value verbatim into the PodCertificateRequests it
+ // generates for this projection.
+ //
+ // If 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).
+ //
+ // The 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.
+ //
+ // +optional
+ MaxExpirationSeconds *int32 `json:"maxExpirationSeconds,omitempty" protobuf:"varint,3,opt,name=maxExpirationSeconds"`
+
+ // Write the credential bundle at this path in the projected volume.
+ //
+ // The 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.
+ //
+ // The remaining blocks are CERTIFICATE blocks, containing the issued
+ // certificate chain from the signer (leaf and any intermediates).
+ //
+ // Using 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.
+ //
+ // +optional
+ CredentialBundlePath string `json:"credentialBundlePath,omitempty" protobuf:"bytes,4,rep,name=credentialBundlePath"`
+
+ // Write the key at this path in the projected volume.
+ //
+ // Most 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.
+ //
+ // +optional
+ KeyPath string `json:"keyPath,omitempty" protobuf:"bytes,5,rep,name=keyPath"`
+
+ // Write the certificate chain at this path in the projected volume.
+ //
+ // Most 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.
+ //
+ // +optional
+ CertificateChainPath string `json:"certificateChainPath,omitempty" protobuf:"bytes,6,rep,name=certificateChainPath"`
+}
+
// Represents a projected volume source
type ProjectedVolumeSource struct {
// sources is the list of volume projections. Each entry in this list
@@ -2043,6 +2108,44 @@ type VolumeProjection struct {
// +featureGate=ClusterTrustBundleProjection
// +optional
ClusterTrustBundle *ClusterTrustBundleProjection `json:"clusterTrustBundle,omitempty" protobuf:"bytes,5,opt,name=clusterTrustBundle"`
+
+ // Projects an auto-rotating credential bundle (private key and certificate
+ // chain) that the pod can use either as a TLS client or server.
+ //
+ // Kubelet 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.
+ //
+ // Kubelet will begin trying to rotate the certificate at the time indicated
+ // by the signer using the PodCertificateRequest.Status.BeginRefreshAt
+ // timestamp.
+ //
+ // Kubelet can write a single file, indicated by the credentialBundlePath
+ // field, or separate files, indicated by the keyPath and
+ // certificateChainPath fields.
+ //
+ // The 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).
+ //
+ // Prefer 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.
+ //
+ // The 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.
+ //
+ // +featureGate=PodCertificateProjection +optional
+ PodCertificate *PodCertificateProjection `json:"podCertificate,omitempty" protobuf:"bytes,6,opt,name=podCertificate"`
}
const (
@@ -2351,7 +2454,8 @@ type VolumeDevice struct {
// EnvVar represents an environment variable present in a Container.
type EnvVar struct {
- // Name of the environment variable. Must be a C_IDENTIFIER.
+ // Name of the environment variable.
+ // May consist of any printable ASCII characters except '='.
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
// Optional: no more than one of the following may be specified.
@@ -2388,6 +2492,39 @@ type EnvVarSource struct {
// Selects a key of a secret in the pod's namespace
// +optional
SecretKeyRef *SecretKeySelector `json:"secretKeyRef,omitempty" protobuf:"bytes,4,opt,name=secretKeyRef"`
+ // FileKeyRef selects a key of the env file.
+ // Requires the EnvFiles feature gate to be enabled.
+ //
+ // +featureGate=EnvFiles
+ // +optional
+ FileKeyRef *FileKeySelector `json:"fileKeyRef,omitempty" protobuf:"bytes,5,opt,name=fileKeyRef"`
+}
+
+// FileKeySelector selects a key of the env file.
+// +structType=atomic
+type FileKeySelector struct {
+ // The name of the volume mount containing the env file.
+ // +required
+ VolumeName string `json:"volumeName" protobuf:"bytes,1,opt,name=volumeName"`
+ // The path within the volume from which to select the file.
+ // Must be relative and may not contain the '..' path or start with '..'.
+ // +required
+ Path string `json:"path" protobuf:"bytes,2,opt,name=path"`
+ // 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.
+ // +required
+ Key string `json:"key" protobuf:"bytes,3,opt,name=key"`
+ // Specify whether the file or its key must be defined. If the file or key
+ // does not exist, then the env var is not published.
+ // If optional is set to true and the specified key does not exist,
+ // the environment variable will not be set in the Pod's containers.
+ //
+ // If optional is set to false and the specified key does not exist,
+ // an error will be returned during Pod creation.
+ // +optional
+ // +default=false
+ Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"`
}
// ObjectFieldSelector selects an APIVersioned field of an object.
@@ -2439,7 +2576,8 @@ type SecretKeySelector struct {
// EnvFromSource represents the source of a set of ConfigMaps or Secrets
type EnvFromSource struct {
- // Optional text to prepend to the name of each environment variable. Must be a C_IDENTIFIER.
+ // Optional text to prepend to the name of each environment variable.
+ // May consist of any printable ASCII characters except '='.
// +optional
Prefix string `json:"prefix,omitempty" protobuf:"bytes,1,opt,name=prefix"`
// The ConfigMap to select from
@@ -2697,7 +2835,7 @@ type ResourceRequirements struct {
// Claims lists the names of resources, defined in spec.resourceClaims,
// that are used by this container.
//
- // This is an alpha field and requires enabling the
+ // This field depends on the
// DynamicResourceAllocation feature gate.
//
// This field is immutable. It can only be set for containers.
@@ -2805,8 +2943,8 @@ type Container struct {
// +listMapKey=protocol
Ports []ContainerPort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"containerPort" protobuf:"bytes,6,rep,name=ports"`
// 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
+ // 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.
@@ -2832,10 +2970,10 @@ type Container struct {
// +listType=atomic
ResizePolicy []ContainerResizePolicy `json:"resizePolicy,omitempty" protobuf:"bytes,23,rep,name=resizePolicy"`
// 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,
+ // 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.
- // Setting the RestartPolicy as "Always" for the init container will have the following effect:
+ // 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"
@@ -2849,6 +2987,21 @@ type Container struct {
// +featureGate=SidecarContainers
// +optional
RestartPolicy *ContainerRestartPolicy `json:"restartPolicy,omitempty" protobuf:"bytes,24,opt,name=restartPolicy,casttype=ContainerRestartPolicy"`
+ // 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.
+ // +featureGate=ContainerRestartRules
+ // +optional
+ // +listType=atomic
+ RestartPolicyRules []ContainerRestartRule `json:"restartPolicyRules,omitempty" protobuf:"bytes,25,rep,name=restartPolicyRules"`
// Pod volumes to mount into the container's filesystem.
// Cannot be updated.
// +optional
@@ -3478,11 +3631,64 @@ const (
)
// ContainerRestartPolicy is the restart policy for a single container.
-// This may only be set for init containers and only allowed value is "Always".
+// The only allowed values are "Always", "Never", and "OnFailure".
type ContainerRestartPolicy string
const (
- ContainerRestartPolicyAlways ContainerRestartPolicy = "Always"
+ ContainerRestartPolicyAlways ContainerRestartPolicy = "Always"
+ ContainerRestartPolicyNever ContainerRestartPolicy = "Never"
+ ContainerRestartPolicyOnFailure ContainerRestartPolicy = "OnFailure"
+)
+
+// ContainerRestartRule describes how a container exit is handled.
+type ContainerRestartRule struct {
+ // Specifies the action taken on a container exit if the requirements
+ // are satisfied. The only possible value is "Restart" to restart the
+ // container.
+ // +required
+ Action ContainerRestartRuleAction `json:"action,omitempty" proto:"bytes,1,opt,name=action" protobuf:"bytes,1,opt,name=action,casttype=ContainerRestartRuleAction"`
+
+ // Represents the exit codes to check on container exits.
+ // +optional
+ // +oneOf=when
+ ExitCodes *ContainerRestartRuleOnExitCodes `json:"exitCodes,omitempty" proto:"bytes,2,opt,name=exitCodes" protobuf:"bytes,2,opt,name=exitCodes"`
+}
+
+// ContainerRestartRuleAction describes the action to take when the
+// container exits.
+type ContainerRestartRuleAction string
+
+// The only valid action is Restart.
+const (
+ ContainerRestartRuleActionRestart ContainerRestartRuleAction = "Restart"
+)
+
+// ContainerRestartRuleOnExitCodes describes the condition
+// for handling an exited container based on its exit codes.
+type ContainerRestartRuleOnExitCodes struct {
+ // 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
+ // set of specified values.
+ // - NotIn: the requirement is satisfied if the container exit code is
+ // not in the set of specified values.
+ // +required
+ Operator ContainerRestartRuleOnExitCodesOperator `json:"operator,omitempty" proto:"bytes,1,opt,name=operator" protobuf:"bytes,1,opt,name=operator,casttype=ContainerRestartRuleOnExitCodesOperator"`
+
+ // Specifies the set of values to check for container exit codes.
+ // At most 255 elements are allowed.
+ // +optional
+ // +listType=set
+ Values []int32 `json:"values,omitempty" proto:"varint,2,rep,name=values" protobuf:"varint,2,rep,name=values"`
+}
+
+// ContainerRestartRuleOnExitCodesOperator describes the operator
+// to take for the exit codes.
+type ContainerRestartRuleOnExitCodesOperator string
+
+const (
+ ContainerRestartRuleOnExitCodesOpIn ContainerRestartRuleOnExitCodesOperator = "In"
+ ContainerRestartRuleOnExitCodesOpNotIn ContainerRestartRuleOnExitCodesOperator = "NotIn"
)
// DNSPolicy defines how a pod's DNS will be configured.
@@ -3678,8 +3884,8 @@ type PodAntiAffinity struct {
// most preferred is the one with the greatest sum of weights, i.e.
// for each node that meets all of the scheduling requirements (resource
// request, requiredDuringScheduling anti-affinity expressions, etc.),
- // compute a sum by iterating through the elements of this field and adding
- // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
+ // compute a sum by iterating through the elements of this field and subtracting
+ // "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the
// node(s) with the highest sum are the most preferred.
// +optional
// +listType=atomic
@@ -3806,7 +4012,6 @@ type Taint struct {
// Valid effects are NoSchedule, PreferNoSchedule and NoExecute.
Effect TaintEffect `json:"effect" protobuf:"bytes,3,opt,name=effect,casttype=TaintEffect"`
// TimeAdded represents the time at which the taint was added.
- // It is only written for NoExecute taints.
// +optional
TimeAdded *metav1.Time `json:"timeAdded,omitempty" protobuf:"bytes,4,opt,name=timeAdded"`
}
@@ -3983,7 +4188,9 @@ type PodSpec struct {
// +optional
NodeName string `json:"nodeName,omitempty" protobuf:"bytes,10,opt,name=nodeName"`
// 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.
+ // 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.
// +k8s:conversion-gen=false
// +optional
@@ -4126,6 +4333,7 @@ type PodSpec struct {
// - spec.hostPID
// - spec.hostIPC
// - spec.hostUsers
+ // - spec.resources
// - spec.securityContext.appArmorProfile
// - spec.securityContext.seLinuxOptions
// - spec.securityContext.seccompProfile
@@ -4194,7 +4402,7 @@ type PodSpec struct {
ResourceClaims []PodResourceClaim `json:"resourceClaims,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,39,rep,name=resourceClaims"`
// 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.
+ // "cpu", "memory" and "hugepages-" resource names only. ResourceClaims are not supported.
//
// This field enables fine-grained control over resource allocation for the
// entire pod, allowing resource sharing among containers in a pod.
@@ -4206,6 +4414,20 @@ type PodSpec struct {
// +featureGate=PodLevelResources
// +optional
Resources *ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,40,opt,name=resources"`
+ // 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.
+ //
+ // This 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.
+ //
+ // +featureGate=HostnameOverride
+ // +optional
+ HostnameOverride *string `json:"hostnameOverride,omitempty" protobuf:"bytes,41,opt,name=hostnameOverride"`
}
// PodResourceClaim references exactly one ResourceClaim, either directly
@@ -4267,6 +4489,31 @@ type PodResourceClaimStatus struct {
ResourceClaimName *string `json:"resourceClaimName,omitempty" protobuf:"bytes,2,opt,name=resourceClaimName"`
}
+// 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 PodExtendedResourceClaimStatus struct {
+ // RequestMappings identifies the mapping of to device request
+ // in the generated ResourceClaim.
+ // +listType=atomic
+ RequestMappings []ContainerExtendedResourceRequest `json:"requestMappings" protobuf:"bytes,1,rep,name=requestMappings"`
+
+ // ResourceClaimName is the name of the ResourceClaim that was
+ // generated for the Pod in the namespace of the Pod.
+ ResourceClaimName string `json:"resourceClaimName" protobuf:"bytes,2,name=resourceClaimName"`
+}
+
+// ContainerExtendedResourceRequest has the mapping of container name,
+// extended resource name to the device request name.
+type ContainerExtendedResourceRequest struct {
+ // The name of the container requesting resources.
+ ContainerName string `json:"containerName" protobuf:"bytes,1,name=containerName"`
+ // The name of the extended resource in that container which gets backed by DRA.
+ ResourceName string `json:"resourceName" protobuf:"bytes,2,name=resourceName"`
+ // The name of the request in the special ResourceClaim which corresponds to the extended resource.
+ RequestName string `json:"requestName" protobuf:"bytes,3,name=requestName"`
+}
+
// OSName is the set of OS'es that can be used in OS.
type OSName string
@@ -4799,8 +5046,8 @@ type EphemeralContainerCommon struct {
// +listMapKey=protocol
Ports []ContainerPort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"containerPort" protobuf:"bytes,6,rep,name=ports"`
// 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
+ // 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.
@@ -4826,11 +5073,17 @@ type EphemeralContainerCommon struct {
ResizePolicy []ContainerResizePolicy `json:"resizePolicy,omitempty" protobuf:"bytes,23,rep,name=resizePolicy"`
// 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.
+ // You cannot set this field on ephemeral containers.
// +featureGate=SidecarContainers
// +optional
RestartPolicy *ContainerRestartPolicy `json:"restartPolicy,omitempty" protobuf:"bytes,24,opt,name=restartPolicy,casttype=ContainerRestartPolicy"`
+ // 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.
+ // +featureGate=ContainerRestartRules
+ // +optional
+ // +listType=atomic
+ RestartPolicyRules []ContainerRestartRule `json:"restartPolicyRules,omitempty" protobuf:"bytes,25,rep,name=restartPolicyRules"`
// Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers.
// Cannot be updated.
// +optional
@@ -5091,6 +5344,10 @@ type PodStatus struct {
// +featureGate=DynamicResourceAllocation
// +optional
ResourceClaimStatuses []PodResourceClaimStatus `json:"resourceClaimStatuses,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,15,rep,name=resourceClaimStatuses"`
+ // Status of extended resource claim backed by DRA.
+ // +featureGate=DRAExtendedResource
+ // +optional
+ ExtendedResourceClaimStatus *PodExtendedResourceClaimStatus `json:"extendedResourceClaimStatus,omitempty" protobuf:"bytes,18,opt,name=extendedResourceClaimStatus"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@@ -5311,6 +5568,7 @@ type ReplicationControllerCondition struct {
// +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/api/autoscaling/v1.Scale,result=k8s.io/api/autoscaling/v1.Scale
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +k8s:prerelease-lifecycle-gen:introduced=1.0
+// +k8s:supportsSubresource=/scale
// ReplicationController represents the configuration of a replication controller.
type ReplicationController struct {
diff --git a/hack/tools/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go b/hack/tools/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go
index 9e987eefdd39..1204307667fa 100644
--- a/hack/tools/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go
+++ b/hack/tools/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go
@@ -356,11 +356,12 @@ var map_Container = map[string]string{
"args": "Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell",
"workingDir": "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.",
"ports": "List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Modifying this array with strategic merge patch may corrupt the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. Cannot be updated.",
- "envFrom": "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.",
+ "envFrom": "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.",
"env": "List of environment variables to set in the container. Cannot be updated.",
"resources": "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
"resizePolicy": "Resources resize policy for the container.",
- "restartPolicy": "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.",
+ "restartPolicy": "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.",
+ "restartPolicyRules": "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.",
"volumeMounts": "Pod volumes to mount into the container's filesystem. Cannot be updated.",
"volumeDevices": "volumeDevices is the list of block devices to be used by the container.",
"livenessProbe": "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",
@@ -380,6 +381,17 @@ func (Container) SwaggerDoc() map[string]string {
return map_Container
}
+var map_ContainerExtendedResourceRequest = map[string]string{
+ "": "ContainerExtendedResourceRequest has the mapping of container name, extended resource name to the device request name.",
+ "containerName": "The name of the container requesting resources.",
+ "resourceName": "The name of the extended resource in that container which gets backed by DRA.",
+ "requestName": "The name of the request in the special ResourceClaim which corresponds to the extended resource.",
+}
+
+func (ContainerExtendedResourceRequest) SwaggerDoc() map[string]string {
+ return map_ContainerExtendedResourceRequest
+}
+
var map_ContainerImage = map[string]string{
"": "Describe a container image",
"names": "Names by which this image is known. e.g. [\"kubernetes.example/hyperkube:v1.0.7\", \"cloud-vendor.registry.example/cloud-vendor/hyperkube:v1.0.7\"]",
@@ -413,6 +425,26 @@ func (ContainerResizePolicy) SwaggerDoc() map[string]string {
return map_ContainerResizePolicy
}
+var map_ContainerRestartRule = map[string]string{
+ "": "ContainerRestartRule describes how a container exit is handled.",
+ "action": "Specifies the action taken on a container exit if the requirements are satisfied. The only possible value is \"Restart\" to restart the container.",
+ "exitCodes": "Represents the exit codes to check on container exits.",
+}
+
+func (ContainerRestartRule) SwaggerDoc() map[string]string {
+ return map_ContainerRestartRule
+}
+
+var map_ContainerRestartRuleOnExitCodes = map[string]string{
+ "": "ContainerRestartRuleOnExitCodes describes the condition for handling an exited container based on its exit codes.",
+ "operator": "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.",
+ "values": "Specifies the set of values to check for container exit codes. At most 255 elements are allowed.",
+}
+
+func (ContainerRestartRuleOnExitCodes) SwaggerDoc() map[string]string {
+ return map_ContainerRestartRuleOnExitCodes
+}
+
var map_ContainerState = map[string]string{
"": "ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.",
"waiting": "Details about a waiting container",
@@ -597,7 +629,7 @@ func (EndpointsList) SwaggerDoc() map[string]string {
var map_EnvFromSource = map[string]string{
"": "EnvFromSource represents the source of a set of ConfigMaps or Secrets",
- "prefix": "Optional text to prepend to the name of each environment variable. Must be a C_IDENTIFIER.",
+ "prefix": "Optional text to prepend to the name of each environment variable. May consist of any printable ASCII characters except '='.",
"configMapRef": "The ConfigMap to select from",
"secretRef": "The Secret to select from",
}
@@ -608,7 +640,7 @@ func (EnvFromSource) SwaggerDoc() map[string]string {
var map_EnvVar = map[string]string{
"": "EnvVar represents an environment variable present in a Container.",
- "name": "Name of the environment variable. Must be a C_IDENTIFIER.",
+ "name": "Name of the environment variable. May consist of any printable ASCII characters except '='.",
"value": "Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".",
"valueFrom": "Source for the environment variable's value. Cannot be used if value is not empty.",
}
@@ -623,6 +655,7 @@ var map_EnvVarSource = map[string]string{
"resourceFieldRef": "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.",
"configMapKeyRef": "Selects a key of a ConfigMap.",
"secretKeyRef": "Selects a key of a secret in the pod's namespace",
+ "fileKeyRef": "FileKeyRef selects a key of the env file. Requires the EnvFiles feature gate to be enabled.",
}
func (EnvVarSource) SwaggerDoc() map[string]string {
@@ -646,11 +679,12 @@ var map_EphemeralContainerCommon = map[string]string{
"args": "Arguments to the entrypoint. The image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell",
"workingDir": "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.",
"ports": "Ports are not allowed for ephemeral containers.",
- "envFrom": "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.",
+ "envFrom": "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.",
"env": "List of environment variables to set in the container. Cannot be updated.",
"resources": "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.",
"resizePolicy": "Resources resize policy for the container.",
- "restartPolicy": "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.",
+ "restartPolicy": "Restart policy for the container to manage the restart behavior of each container within a pod. You cannot set this field on ephemeral containers.",
+ "restartPolicyRules": "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.",
"volumeMounts": "Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. Cannot be updated.",
"volumeDevices": "volumeDevices is the list of block devices to be used by the container.",
"livenessProbe": "Probes are not allowed for ephemeral containers.",
@@ -754,6 +788,18 @@ func (FCVolumeSource) SwaggerDoc() map[string]string {
return map_FCVolumeSource
}
+var map_FileKeySelector = map[string]string{
+ "": "FileKeySelector selects a key of the env file.",
+ "volumeName": "The name of the volume mount containing the env file.",
+ "path": "The path within the volume from which to select the file. Must be relative and may not contain the '..' path or start with '..'.",
+ "key": "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.",
+ "optional": "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.",
+}
+
+func (FileKeySelector) SwaggerDoc() map[string]string {
+ return map_FileKeySelector
+}
+
var map_FlexPersistentVolumeSource = map[string]string{
"": "FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin.",
"driver": "driver is the name of the driver to use for this volume.",
@@ -837,7 +883,7 @@ func (GlusterfsPersistentVolumeSource) SwaggerDoc() map[string]string {
var map_GlusterfsVolumeSource = map[string]string{
"": "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.",
- "endpoints": "endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod",
+ "endpoints": "endpoints is the endpoint name that details Glusterfs topology.",
"path": "path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod",
"readOnly": "readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod",
}
@@ -1446,7 +1492,7 @@ var map_PersistentVolumeClaimSpec = map[string]string{
"volumeMode": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.",
"dataSource": "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.",
"dataSourceRef": "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.",
- "volumeAttributesClassName": "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).",
+ "volumeAttributesClassName": "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/",
}
func (PersistentVolumeClaimSpec) SwaggerDoc() map[string]string {
@@ -1461,8 +1507,8 @@ var map_PersistentVolumeClaimStatus = map[string]string{
"conditions": "conditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'Resizing'.",
"allocatedResources": "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.",
"allocatedResourceStatuses": "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.",
- "currentVolumeAttributesClassName": "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).",
- "modifyVolumeStatus": "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).",
+ "currentVolumeAttributesClassName": "currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim",
+ "modifyVolumeStatus": "ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. When this is unset, there is no ModifyVolume operation being attempted.",
}
func (PersistentVolumeClaimStatus) SwaggerDoc() map[string]string {
@@ -1539,7 +1585,7 @@ var map_PersistentVolumeSpec = map[string]string{
"mountOptions": "mountOptions is the list of mount options, e.g. [\"ro\", \"soft\"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options",
"volumeMode": "volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. Value of Filesystem is implied when not included in spec.",
"nodeAffinity": "nodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume.",
- "volumeAttributesClassName": "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).",
+ "volumeAttributesClassName": "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.",
}
func (PersistentVolumeSpec) SwaggerDoc() map[string]string {
@@ -1606,7 +1652,7 @@ func (PodAffinityTerm) SwaggerDoc() map[string]string {
var map_PodAntiAffinity = map[string]string{
"": "Pod anti affinity is a group of inter pod anti affinity scheduling rules.",
"requiredDuringSchedulingIgnoredDuringExecution": "If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.",
- "preferredDuringSchedulingIgnoredDuringExecution": "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.",
+ "preferredDuringSchedulingIgnoredDuringExecution": "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.",
}
func (PodAntiAffinity) SwaggerDoc() map[string]string {
@@ -1626,6 +1672,20 @@ func (PodAttachOptions) SwaggerDoc() map[string]string {
return map_PodAttachOptions
}
+var map_PodCertificateProjection = map[string]string{
+ "": "PodCertificateProjection provides a private key and X.509 certificate in the pod filesystem.",
+ "signerName": "Kubelet's generated CSRs will be addressed to this signer.",
+ "keyType": "The type of keypair Kubelet will generate for the pod.\n\nValid values are \"RSA3072\", \"RSA4096\", \"ECDSAP256\", \"ECDSAP384\", \"ECDSAP521\", and \"ED25519\".",
+ "maxExpirationSeconds": "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.",
+ "credentialBundlePath": "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.",
+ "keyPath": "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.",
+ "certificateChainPath": "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.",
+}
+
+func (PodCertificateProjection) SwaggerDoc() map[string]string {
+ return map_PodCertificateProjection
+}
+
var map_PodCondition = map[string]string{
"": "PodCondition contains details for the current condition of this pod.",
"type": "Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions",
@@ -1676,6 +1736,16 @@ func (PodExecOptions) SwaggerDoc() map[string]string {
return map_PodExecOptions
}
+var map_PodExtendedResourceClaimStatus = map[string]string{
+ "": "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.",
+ "requestMappings": "RequestMappings identifies the mapping of to device request in the generated ResourceClaim.",
+ "resourceClaimName": "ResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod.",
+}
+
+func (PodExtendedResourceClaimStatus) SwaggerDoc() map[string]string {
+ return map_PodExtendedResourceClaimStatus
+}
+
var map_PodIP = map[string]string{
"": "PodIP represents a single IP address allocated to the pod.",
"ip": "IP is the IP address assigned to the pod",
@@ -1824,7 +1894,7 @@ var map_PodSpec = map[string]string{
"serviceAccount": "DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.",
"automountServiceAccountToken": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.",
"nodeName": "NodeName indicates in which node this pod is scheduled. If empty, this pod is a candidate for scheduling by the scheduler defined in schedulerName. Once this field is set, the kubelet for this node becomes responsible for the lifecycle of this pod. This field should not be used to express a desire for the pod to be scheduled on a specific node. https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodename",
- "hostNetwork": "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.",
+ "hostNetwork": "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.",
"hostPID": "Use the host's pid namespace. Optional: Default to false.",
"hostIPC": "Use the host's ipc namespace. Optional: Default to false.",
"shareProcessNamespace": "Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false.",
@@ -1846,11 +1916,12 @@ var map_PodSpec = map[string]string{
"overhead": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md",
"topologySpreadConstraints": "TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed.",
"setHostnameAsFQDN": "If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false.",
- "os": "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",
+ "os": "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",
"hostUsers": "Use the host's user namespace. Optional: Default to true. If set to true or not present, the pod will be run in the host user namespace, useful for when the pod needs a feature only available to the host user namespace, such as loading a kernel module with CAP_SYS_MODULE. When set to false, a new userns is created for the pod. Setting false is useful for mitigating container breakout vulnerabilities even allowing users to run their containers as root without actually having root privileges on the host. This field is alpha-level and is only honored by servers that enable the UserNamespacesSupport feature.",
"schedulingGates": "SchedulingGates is an opaque list of values that if specified will block scheduling the pod. If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the scheduler will not attempt to schedule the pod.\n\nSchedulingGates can only be set at pod creation time, and be removed only afterwards.",
"resourceClaims": "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.",
- "resources": "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.",
+ "resources": "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.",
+ "hostnameOverride": "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.",
}
func (PodSpec) SwaggerDoc() map[string]string {
@@ -1858,24 +1929,25 @@ func (PodSpec) SwaggerDoc() map[string]string {
}
var map_PodStatus = map[string]string{
- "": "PodStatus represents information about the status of a pod. Status may trail the actual state of a system, especially if the node that hosts the pod cannot contact the control plane.",
- "observedGeneration": "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.",
- "phase": "The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. The conditions array, the reason and message fields, and the individual container status arrays contain more detail about the pod's status. There are five possible phase values:\n\nPending: The pod has been accepted by the Kubernetes system, but one or more of the container images has not been created. This includes time before being scheduled as well as time spent downloading images over the network, which could take a while. Running: The pod has been bound to a node, and all of the containers have been created. At least one container is still running, or is in the process of starting or restarting. Succeeded: All containers in the pod have terminated in success, and will not be restarted. Failed: All containers in the pod have terminated, and at least one container has terminated in failure. The container either exited with non-zero status or was terminated by the system. Unknown: For some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod.\n\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase",
- "conditions": "Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions",
- "message": "A human readable message indicating details about why the pod is in this condition.",
- "reason": "A brief CamelCase message indicating details about why the pod is in this state. e.g. 'Evicted'",
- "nominatedNodeName": "nominatedNodeName is set only when this pod preempts other pods on the node, but it cannot be scheduled right away as preemption victims receive their graceful termination periods. This field does not guarantee that the pod will be scheduled on this node. Scheduler may decide to place the pod elsewhere if other nodes become available sooner. Scheduler may also decide to give the resources on this node to a higher priority pod that is created after preemption. As a result, this field may be different than PodSpec.nodeName when the pod is scheduled.",
- "hostIP": "hostIP holds the IP address of the host to which the pod is assigned. Empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns mean that HostIP will not be updated even if there is a node is assigned to pod",
- "hostIPs": "hostIPs holds the IP addresses allocated to the host. If this field is specified, the first entry must match the hostIP field. This list is empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns means that HostIPs will not be updated even if there is a node is assigned to this pod.",
- "podIP": "podIP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.",
- "podIPs": "podIPs holds the IP addresses allocated to the pod. If this field is specified, the 0th entry must match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list is empty if no IPs have been allocated yet.",
- "startTime": "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.",
- "initContainerStatuses": "Statuses of init containers in this pod. The most recent successful non-restartable init container will have ready = true, the most recently started container will have startTime set. Each init container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-and-container-status",
- "containerStatuses": "Statuses of containers in this pod. Each container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status",
- "qosClass": "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/#quality-of-service-classes",
- "ephemeralContainerStatuses": "Statuses for any ephemeral containers that have run in this pod. Each ephemeral container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status",
- "resize": "Status of resources resize desired for pod's containers. It is empty if no resources resize is pending. Any changes to container resources will automatically set this to \"Proposed\" Deprecated: Resize status is moved to two pod conditions PodResizePending and PodResizeInProgress. PodResizePending will track states where the spec has been resized, but the Kubelet has not yet allocated the resources. PodResizeInProgress will track in-progress resizes, and should be present whenever allocated resources != acknowledged resources.",
- "resourceClaimStatuses": "Status of resource claims.",
+ "": "PodStatus represents information about the status of a pod. Status may trail the actual state of a system, especially if the node that hosts the pod cannot contact the control plane.",
+ "observedGeneration": "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.",
+ "phase": "The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. The conditions array, the reason and message fields, and the individual container status arrays contain more detail about the pod's status. There are five possible phase values:\n\nPending: The pod has been accepted by the Kubernetes system, but one or more of the container images has not been created. This includes time before being scheduled as well as time spent downloading images over the network, which could take a while. Running: The pod has been bound to a node, and all of the containers have been created. At least one container is still running, or is in the process of starting or restarting. Succeeded: All containers in the pod have terminated in success, and will not be restarted. Failed: All containers in the pod have terminated, and at least one container has terminated in failure. The container either exited with non-zero status or was terminated by the system. Unknown: For some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod.\n\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase",
+ "conditions": "Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions",
+ "message": "A human readable message indicating details about why the pod is in this condition.",
+ "reason": "A brief CamelCase message indicating details about why the pod is in this state. e.g. 'Evicted'",
+ "nominatedNodeName": "nominatedNodeName is set only when this pod preempts other pods on the node, but it cannot be scheduled right away as preemption victims receive their graceful termination periods. This field does not guarantee that the pod will be scheduled on this node. Scheduler may decide to place the pod elsewhere if other nodes become available sooner. Scheduler may also decide to give the resources on this node to a higher priority pod that is created after preemption. As a result, this field may be different than PodSpec.nodeName when the pod is scheduled.",
+ "hostIP": "hostIP holds the IP address of the host to which the pod is assigned. Empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns mean that HostIP will not be updated even if there is a node is assigned to pod",
+ "hostIPs": "hostIPs holds the IP addresses allocated to the host. If this field is specified, the first entry must match the hostIP field. This list is empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns means that HostIPs will not be updated even if there is a node is assigned to this pod.",
+ "podIP": "podIP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.",
+ "podIPs": "podIPs holds the IP addresses allocated to the pod. If this field is specified, the 0th entry must match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list is empty if no IPs have been allocated yet.",
+ "startTime": "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.",
+ "initContainerStatuses": "Statuses of init containers in this pod. The most recent successful non-restartable init container will have ready = true, the most recently started container will have startTime set. Each init container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-and-container-status",
+ "containerStatuses": "Statuses of containers in this pod. Each container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status",
+ "qosClass": "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/#quality-of-service-classes",
+ "ephemeralContainerStatuses": "Statuses for any ephemeral containers that have run in this pod. Each ephemeral container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status",
+ "resize": "Status of resources resize desired for pod's containers. It is empty if no resources resize is pending. Any changes to container resources will automatically set this to \"Proposed\" Deprecated: Resize status is moved to two pod conditions PodResizePending and PodResizeInProgress. PodResizePending will track states where the spec has been resized, but the Kubelet has not yet allocated the resources. PodResizeInProgress will track in-progress resizes, and should be present whenever allocated resources != acknowledged resources.",
+ "resourceClaimStatuses": "Status of resource claims.",
+ "extendedResourceClaimStatus": "Status of extended resource claim backed by DRA.",
}
func (PodStatus) SwaggerDoc() map[string]string {
@@ -2205,7 +2277,7 @@ var map_ResourceRequirements = map[string]string{
"": "ResourceRequirements describes the compute resource requirements.",
"limits": "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
"requests": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
- "claims": "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.",
+ "claims": "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.",
}
func (ResourceRequirements) SwaggerDoc() map[string]string {
@@ -2587,7 +2659,7 @@ var map_Taint = map[string]string{
"key": "Required. The taint key to be applied to a node.",
"value": "The taint value corresponding to the taint key.",
"effect": "Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.",
- "timeAdded": "TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.",
+ "timeAdded": "TimeAdded represents the time at which the taint was added.",
}
func (Taint) SwaggerDoc() map[string]string {
@@ -2727,6 +2799,7 @@ var map_VolumeProjection = map[string]string{
"configMap": "configMap information about the configMap data to project",
"serviceAccountToken": "serviceAccountToken is information about the serviceAccountToken data to project",
"clusterTrustBundle": "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.",
+ "podCertificate": "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.",
}
func (VolumeProjection) SwaggerDoc() map[string]string {
@@ -2752,10 +2825,10 @@ var map_VolumeSource = map[string]string{
"gitRepo": "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.",
"secret": "secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret",
"nfs": "nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs",
- "iscsi": "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",
- "glusterfs": "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",
+ "iscsi": "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",
+ "glusterfs": "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.",
"persistentVolumeClaim": "persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims",
- "rbd": "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",
+ "rbd": "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.",
"flexVolume": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead.",
"cinder": "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",
"cephfs": "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.",
diff --git a/hack/tools/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go b/hack/tools/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go
index 619c525427e5..bcd91bd0190f 100644
--- a/hack/tools/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go
+++ b/hack/tools/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go
@@ -829,6 +829,13 @@ func (in *Container) DeepCopyInto(out *Container) {
*out = new(ContainerRestartPolicy)
**out = **in
}
+ if in.RestartPolicyRules != nil {
+ in, out := &in.RestartPolicyRules, &out.RestartPolicyRules
+ *out = make([]ContainerRestartRule, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
if in.VolumeMounts != nil {
in, out := &in.VolumeMounts, &out.VolumeMounts
*out = make([]VolumeMount, len(*in))
@@ -879,6 +886,22 @@ func (in *Container) DeepCopy() *Container {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ContainerExtendedResourceRequest) DeepCopyInto(out *ContainerExtendedResourceRequest) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerExtendedResourceRequest.
+func (in *ContainerExtendedResourceRequest) DeepCopy() *ContainerExtendedResourceRequest {
+ if in == nil {
+ return nil
+ }
+ out := new(ContainerExtendedResourceRequest)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ContainerImage) DeepCopyInto(out *ContainerImage) {
*out = *in
@@ -932,6 +955,48 @@ func (in *ContainerResizePolicy) DeepCopy() *ContainerResizePolicy {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ContainerRestartRule) DeepCopyInto(out *ContainerRestartRule) {
+ *out = *in
+ if in.ExitCodes != nil {
+ in, out := &in.ExitCodes, &out.ExitCodes
+ *out = new(ContainerRestartRuleOnExitCodes)
+ (*in).DeepCopyInto(*out)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerRestartRule.
+func (in *ContainerRestartRule) DeepCopy() *ContainerRestartRule {
+ if in == nil {
+ return nil
+ }
+ out := new(ContainerRestartRule)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ContainerRestartRuleOnExitCodes) DeepCopyInto(out *ContainerRestartRuleOnExitCodes) {
+ *out = *in
+ if in.Values != nil {
+ in, out := &in.Values, &out.Values
+ *out = make([]int32, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerRestartRuleOnExitCodes.
+func (in *ContainerRestartRuleOnExitCodes) DeepCopy() *ContainerRestartRuleOnExitCodes {
+ if in == nil {
+ return nil
+ }
+ out := new(ContainerRestartRuleOnExitCodes)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ContainerState) DeepCopyInto(out *ContainerState) {
*out = *in
@@ -1433,6 +1498,11 @@ func (in *EnvVarSource) DeepCopyInto(out *EnvVarSource) {
*out = new(SecretKeySelector)
(*in).DeepCopyInto(*out)
}
+ if in.FileKeyRef != nil {
+ in, out := &in.FileKeyRef, &out.FileKeyRef
+ *out = new(FileKeySelector)
+ (*in).DeepCopyInto(*out)
+ }
return
}
@@ -1506,6 +1576,13 @@ func (in *EphemeralContainerCommon) DeepCopyInto(out *EphemeralContainerCommon)
*out = new(ContainerRestartPolicy)
**out = **in
}
+ if in.RestartPolicyRules != nil {
+ in, out := &in.RestartPolicyRules, &out.RestartPolicyRules
+ *out = make([]ContainerRestartRule, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
if in.VolumeMounts != nil {
in, out := &in.VolumeMounts, &out.VolumeMounts
*out = make([]VolumeMount, len(*in))
@@ -1736,6 +1813,27 @@ func (in *FCVolumeSource) DeepCopy() *FCVolumeSource {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *FileKeySelector) DeepCopyInto(out *FileKeySelector) {
+ *out = *in
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileKeySelector.
+func (in *FileKeySelector) DeepCopy() *FileKeySelector {
+ if in == nil {
+ return nil
+ }
+ out := new(FileKeySelector)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *FlexPersistentVolumeSource) DeepCopyInto(out *FlexPersistentVolumeSource) {
*out = *in
@@ -3797,6 +3895,27 @@ func (in *PodAttachOptions) DeepCopyObject() runtime.Object {
return nil
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PodCertificateProjection) DeepCopyInto(out *PodCertificateProjection) {
+ *out = *in
+ if in.MaxExpirationSeconds != nil {
+ in, out := &in.MaxExpirationSeconds, &out.MaxExpirationSeconds
+ *out = new(int32)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodCertificateProjection.
+func (in *PodCertificateProjection) DeepCopy() *PodCertificateProjection {
+ if in == nil {
+ return nil
+ }
+ out := new(PodCertificateProjection)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodCondition) DeepCopyInto(out *PodCondition) {
*out = *in
@@ -3899,6 +4018,27 @@ func (in *PodExecOptions) DeepCopyObject() runtime.Object {
return nil
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PodExtendedResourceClaimStatus) DeepCopyInto(out *PodExtendedResourceClaimStatus) {
+ *out = *in
+ if in.RequestMappings != nil {
+ in, out := &in.RequestMappings, &out.RequestMappings
+ *out = make([]ContainerExtendedResourceRequest, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodExtendedResourceClaimStatus.
+func (in *PodExtendedResourceClaimStatus) DeepCopy() *PodExtendedResourceClaimStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(PodExtendedResourceClaimStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodIP) DeepCopyInto(out *PodIP) {
*out = *in
@@ -4412,6 +4552,11 @@ func (in *PodSpec) DeepCopyInto(out *PodSpec) {
*out = new(ResourceRequirements)
(*in).DeepCopyInto(*out)
}
+ if in.HostnameOverride != nil {
+ in, out := &in.HostnameOverride, &out.HostnameOverride
+ *out = new(string)
+ **out = **in
+ }
return
}
@@ -4477,6 +4622,11 @@ func (in *PodStatus) DeepCopyInto(out *PodStatus) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
+ if in.ExtendedResourceClaimStatus != nil {
+ in, out := &in.ExtendedResourceClaimStatus, &out.ExtendedResourceClaimStatus
+ *out = new(PodExtendedResourceClaimStatus)
+ (*in).DeepCopyInto(*out)
+ }
return
}
@@ -6412,6 +6562,11 @@ func (in *VolumeProjection) DeepCopyInto(out *VolumeProjection) {
*out = new(ClusterTrustBundleProjection)
(*in).DeepCopyInto(*out)
}
+ if in.PodCertificate != nil {
+ in, out := &in.PodCertificate, &out.PodCertificate
+ *out = new(PodCertificateProjection)
+ (*in).DeepCopyInto(*out)
+ }
return
}
diff --git a/hack/tools/vendor/k8s.io/api/extensions/v1beta1/doc.go b/hack/tools/vendor/k8s.io/api/extensions/v1beta1/doc.go
index 7770fab5d211..be710973cb93 100644
--- a/hack/tools/vendor/k8s.io/api/extensions/v1beta1/doc.go
+++ b/hack/tools/vendor/k8s.io/api/extensions/v1beta1/doc.go
@@ -18,5 +18,7 @@ limitations under the License.
// +k8s:protobuf-gen=package
// +k8s:openapi-gen=true
// +k8s:prerelease-lifecycle-gen=true
+// +k8s:validation-gen=TypeMeta
+// +k8s:validation-gen-input=k8s.io/api/extensions/v1beta1
package v1beta1
diff --git a/hack/tools/vendor/k8s.io/api/extensions/v1beta1/generated.proto b/hack/tools/vendor/k8s.io/api/extensions/v1beta1/generated.proto
index 70fcec0cc574..fed0b4835d61 100644
--- a/hack/tools/vendor/k8s.io/api/extensions/v1beta1/generated.proto
+++ b/hack/tools/vendor/k8s.io/api/extensions/v1beta1/generated.proto
@@ -980,7 +980,7 @@ message RollingUpdateDaemonSet {
// pod is available (Ready for at least minReadySeconds) the old DaemonSet pod
// on that node is marked deleted. If the old pod becomes unavailable for any
// reason (Ready transitions to false, is evicted, or is drained) an updated
- // pod is immediatedly created on that node without considering surge limits.
+ // pod is immediately created on that node without considering surge limits.
// Allowing surge implies the possibility that the resources consumed by the
// daemonset on any given node can double if the readiness check fails, and
// so resource intensive daemonsets should take into account that they may
@@ -1039,6 +1039,9 @@ message Scale {
message ScaleSpec {
// desired number of instances for the scaled object.
// +optional
+ // +k8s:optional
+ // +default=0
+ // +k8s:minimum=0
optional int32 replicas = 1;
}
diff --git a/hack/tools/vendor/k8s.io/api/extensions/v1beta1/types.go b/hack/tools/vendor/k8s.io/api/extensions/v1beta1/types.go
index b80a7a7e16b9..c7b50e0590c0 100644
--- a/hack/tools/vendor/k8s.io/api/extensions/v1beta1/types.go
+++ b/hack/tools/vendor/k8s.io/api/extensions/v1beta1/types.go
@@ -27,6 +27,9 @@ import (
type ScaleSpec struct {
// desired number of instances for the scaled object.
// +optional
+ // +k8s:optional
+ // +default=0
+ // +k8s:minimum=0
Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
}
@@ -54,6 +57,7 @@ type ScaleStatus struct {
// +k8s:prerelease-lifecycle-gen:introduced=1.1
// +k8s:prerelease-lifecycle-gen:deprecated=1.2
// +k8s:prerelease-lifecycle-gen:removed=1.16
+// +k8s:isSubresource=/scale
// represents a scaling request for a resource.
type Scale struct {
@@ -398,7 +402,7 @@ type RollingUpdateDaemonSet struct {
// pod is available (Ready for at least minReadySeconds) the old DaemonSet pod
// on that node is marked deleted. If the old pod becomes unavailable for any
// reason (Ready transitions to false, is evicted, or is drained) an updated
- // pod is immediatedly created on that node without considering surge limits.
+ // pod is immediately created on that node without considering surge limits.
// Allowing surge implies the possibility that the resources consumed by the
// daemonset on any given node can double if the readiness check fails, and
// so resource intensive daemonsets should take into account that they may
diff --git a/hack/tools/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go b/hack/tools/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go
index 923fab3aa1d5..8a158233efd9 100644
--- a/hack/tools/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go
+++ b/hack/tools/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go
@@ -482,7 +482,7 @@ func (RollbackConfig) SwaggerDoc() map[string]string {
var map_RollingUpdateDaemonSet = map[string]string{
"": "Spec to control the desired behavior of daemon set rolling update.",
"maxUnavailable": "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.",
- "maxSurge": "The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate.",
+ "maxSurge": "The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediately created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate.",
}
func (RollingUpdateDaemonSet) SwaggerDoc() map[string]string {
diff --git a/hack/tools/vendor/k8s.io/api/extensions/v1beta1/zz_generated.validations.go b/hack/tools/vendor/k8s.io/api/extensions/v1beta1/zz_generated.validations.go
new file mode 100644
index 000000000000..6d2a1666ae31
--- /dev/null
+++ b/hack/tools/vendor/k8s.io/api/extensions/v1beta1/zz_generated.validations.go
@@ -0,0 +1,78 @@
+//go:build !ignore_autogenerated
+// +build !ignore_autogenerated
+
+/*
+Copyright 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 validation-gen. DO NOT EDIT.
+
+package v1beta1
+
+import (
+ context "context"
+ fmt "fmt"
+
+ operation "k8s.io/apimachinery/pkg/api/operation"
+ safe "k8s.io/apimachinery/pkg/api/safe"
+ validate "k8s.io/apimachinery/pkg/api/validate"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ field "k8s.io/apimachinery/pkg/util/validation/field"
+)
+
+func init() { localSchemeBuilder.Register(RegisterValidations) }
+
+// RegisterValidations adds validation functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterValidations(scheme *runtime.Scheme) error {
+ scheme.AddValidationFunc((*Scale)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
+ switch op.Request.SubresourcePath() {
+ case "/scale":
+ return Validate_Scale(ctx, op, nil /* fldPath */, obj.(*Scale), safe.Cast[*Scale](oldObj))
+ }
+ return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
+ })
+ return nil
+}
+
+func Validate_Scale(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *Scale) (errs field.ErrorList) {
+ // field Scale.TypeMeta has no validation
+ // field Scale.ObjectMeta has no validation
+
+ // field Scale.Spec
+ errs = append(errs,
+ func(fldPath *field.Path, obj, oldObj *ScaleSpec) (errs field.ErrorList) {
+ errs = append(errs, Validate_ScaleSpec(ctx, op, fldPath, obj, oldObj)...)
+ return
+ }(fldPath.Child("spec"), &obj.Spec, safe.Field(oldObj, func(oldObj *Scale) *ScaleSpec { return &oldObj.Spec }))...)
+
+ // field Scale.Status has no validation
+ return errs
+}
+
+func Validate_ScaleSpec(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *ScaleSpec) (errs field.ErrorList) {
+ // field ScaleSpec.Replicas
+ errs = append(errs,
+ func(fldPath *field.Path, obj, oldObj *int32) (errs field.ErrorList) {
+ // optional value-type fields with zero-value defaults are purely documentation
+ if op.Type == operation.Update && (obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj)) {
+ return nil // no changes
+ }
+ errs = append(errs, validate.Minimum(ctx, op, fldPath, obj, oldObj, 0)...)
+ return
+ }(fldPath.Child("replicas"), &obj.Replicas, safe.Field(oldObj, func(oldObj *ScaleSpec) *int32 { return &oldObj.Replicas }))...)
+
+ return errs
+}
diff --git a/hack/tools/vendor/k8s.io/api/networking/v1/generated.proto b/hack/tools/vendor/k8s.io/api/networking/v1/generated.proto
index e3e3e9215e15..16a2792aa641 100644
--- a/hack/tools/vendor/k8s.io/api/networking/v1/generated.proto
+++ b/hack/tools/vendor/k8s.io/api/networking/v1/generated.proto
@@ -534,11 +534,12 @@ message NetworkPolicyPort {
// NetworkPolicySpec provides the specification of a NetworkPolicy
message NetworkPolicySpec {
// podSelector selects the pods to which this NetworkPolicy object applies.
- // The array of ingress rules is applied to any pods selected by this field.
+ // The array of rules is applied to any pods selected by this field. An empty
+ // selector matches all pods in the policy's namespace.
// 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.
+ // This field is optional. If it is not specified, it defaults to an empty selector.
+ // +optional
optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
// ingress is a list of ingress rules to be applied to the selected pods.
diff --git a/hack/tools/vendor/k8s.io/api/networking/v1/types.go b/hack/tools/vendor/k8s.io/api/networking/v1/types.go
index 216647ceeb40..7d9a4fc94cb0 100644
--- a/hack/tools/vendor/k8s.io/api/networking/v1/types.go
+++ b/hack/tools/vendor/k8s.io/api/networking/v1/types.go
@@ -60,11 +60,12 @@ const (
// NetworkPolicySpec provides the specification of a NetworkPolicy
type NetworkPolicySpec struct {
// podSelector selects the pods to which this NetworkPolicy object applies.
- // The array of ingress rules is applied to any pods selected by this field.
+ // The array of rules is applied to any pods selected by this field. An empty
+ // selector matches all pods in the policy's namespace.
// 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.
+ // This field is optional. If it is not specified, it defaults to an empty selector.
+ // +optional
PodSelector metav1.LabelSelector `json:"podSelector" protobuf:"bytes,1,opt,name=podSelector"`
// ingress is a list of ingress rules to be applied to the selected pods.
diff --git a/hack/tools/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go b/hack/tools/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go
index 0e294848bab1..6210bb7a5aa6 100644
--- a/hack/tools/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go
+++ b/hack/tools/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go
@@ -313,7 +313,7 @@ func (NetworkPolicyPort) SwaggerDoc() map[string]string {
var map_NetworkPolicySpec = map[string]string{
"": "NetworkPolicySpec provides the specification of a NetworkPolicy",
- "podSelector": "podSelector 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.",
+ "podSelector": "podSelector selects the pods to which this NetworkPolicy object applies. The array of rules is applied to any pods selected by this field. An empty selector matches all pods in the policy's namespace. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is optional. If it is not specified, it defaults to an empty selector.",
"ingress": "ingress is a 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)",
"egress": "egress is a 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",
"policyTypes": "policyTypes is a 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",
diff --git a/hack/tools/vendor/k8s.io/api/networking/v1alpha1/doc.go b/hack/tools/vendor/k8s.io/api/networking/v1alpha1/doc.go
deleted file mode 100644
index 55264ae70754..000000000000
--- a/hack/tools/vendor/k8s.io/api/networking/v1alpha1/doc.go
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
-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.
-*/
-
-// +k8s:deepcopy-gen=package
-// +k8s:protobuf-gen=package
-// +k8s:openapi-gen=true
-// +k8s:prerelease-lifecycle-gen=true
-// +groupName=networking.k8s.io
-
-package v1alpha1
diff --git a/hack/tools/vendor/k8s.io/api/networking/v1alpha1/generated.pb.go b/hack/tools/vendor/k8s.io/api/networking/v1alpha1/generated.pb.go
deleted file mode 100644
index 0d42034837f4..000000000000
--- a/hack/tools/vendor/k8s.io/api/networking/v1alpha1/generated.pb.go
+++ /dev/null
@@ -1,1929 +0,0 @@
-/*
-Copyright 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 protoc-gen-gogo. DO NOT EDIT.
-// source: k8s.io/api/networking/v1alpha1/generated.proto
-
-package v1alpha1
-
-import (
- fmt "fmt"
-
- io "io"
-
- proto "github.com/gogo/protobuf/proto"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-
- math "math"
- math_bits "math/bits"
- reflect "reflect"
- strings "strings"
-)
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
-
-func (m *IPAddress) Reset() { *m = IPAddress{} }
-func (*IPAddress) ProtoMessage() {}
-func (*IPAddress) Descriptor() ([]byte, []int) {
- return fileDescriptor_c1cb39e7b48ce50d, []int{0}
-}
-func (m *IPAddress) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *IPAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
-}
-func (m *IPAddress) XXX_Merge(src proto.Message) {
- xxx_messageInfo_IPAddress.Merge(m, src)
-}
-func (m *IPAddress) XXX_Size() int {
- return m.Size()
-}
-func (m *IPAddress) XXX_DiscardUnknown() {
- xxx_messageInfo_IPAddress.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_IPAddress proto.InternalMessageInfo
-
-func (m *IPAddressList) Reset() { *m = IPAddressList{} }
-func (*IPAddressList) ProtoMessage() {}
-func (*IPAddressList) Descriptor() ([]byte, []int) {
- return fileDescriptor_c1cb39e7b48ce50d, []int{1}
-}
-func (m *IPAddressList) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *IPAddressList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
-}
-func (m *IPAddressList) XXX_Merge(src proto.Message) {
- xxx_messageInfo_IPAddressList.Merge(m, src)
-}
-func (m *IPAddressList) XXX_Size() int {
- return m.Size()
-}
-func (m *IPAddressList) XXX_DiscardUnknown() {
- xxx_messageInfo_IPAddressList.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_IPAddressList proto.InternalMessageInfo
-
-func (m *IPAddressSpec) Reset() { *m = IPAddressSpec{} }
-func (*IPAddressSpec) ProtoMessage() {}
-func (*IPAddressSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_c1cb39e7b48ce50d, []int{2}
-}
-func (m *IPAddressSpec) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *IPAddressSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
-}
-func (m *IPAddressSpec) XXX_Merge(src proto.Message) {
- xxx_messageInfo_IPAddressSpec.Merge(m, src)
-}
-func (m *IPAddressSpec) XXX_Size() int {
- return m.Size()
-}
-func (m *IPAddressSpec) XXX_DiscardUnknown() {
- xxx_messageInfo_IPAddressSpec.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_IPAddressSpec proto.InternalMessageInfo
-
-func (m *ParentReference) Reset() { *m = ParentReference{} }
-func (*ParentReference) ProtoMessage() {}
-func (*ParentReference) Descriptor() ([]byte, []int) {
- return fileDescriptor_c1cb39e7b48ce50d, []int{3}
-}
-func (m *ParentReference) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *ParentReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
-}
-func (m *ParentReference) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ParentReference.Merge(m, src)
-}
-func (m *ParentReference) XXX_Size() int {
- return m.Size()
-}
-func (m *ParentReference) XXX_DiscardUnknown() {
- xxx_messageInfo_ParentReference.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ParentReference proto.InternalMessageInfo
-
-func (m *ServiceCIDR) Reset() { *m = ServiceCIDR{} }
-func (*ServiceCIDR) ProtoMessage() {}
-func (*ServiceCIDR) Descriptor() ([]byte, []int) {
- return fileDescriptor_c1cb39e7b48ce50d, []int{4}
-}
-func (m *ServiceCIDR) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *ServiceCIDR) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
-}
-func (m *ServiceCIDR) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ServiceCIDR.Merge(m, src)
-}
-func (m *ServiceCIDR) XXX_Size() int {
- return m.Size()
-}
-func (m *ServiceCIDR) XXX_DiscardUnknown() {
- xxx_messageInfo_ServiceCIDR.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ServiceCIDR proto.InternalMessageInfo
-
-func (m *ServiceCIDRList) Reset() { *m = ServiceCIDRList{} }
-func (*ServiceCIDRList) ProtoMessage() {}
-func (*ServiceCIDRList) Descriptor() ([]byte, []int) {
- return fileDescriptor_c1cb39e7b48ce50d, []int{5}
-}
-func (m *ServiceCIDRList) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *ServiceCIDRList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
-}
-func (m *ServiceCIDRList) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ServiceCIDRList.Merge(m, src)
-}
-func (m *ServiceCIDRList) XXX_Size() int {
- return m.Size()
-}
-func (m *ServiceCIDRList) XXX_DiscardUnknown() {
- xxx_messageInfo_ServiceCIDRList.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ServiceCIDRList proto.InternalMessageInfo
-
-func (m *ServiceCIDRSpec) Reset() { *m = ServiceCIDRSpec{} }
-func (*ServiceCIDRSpec) ProtoMessage() {}
-func (*ServiceCIDRSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_c1cb39e7b48ce50d, []int{6}
-}
-func (m *ServiceCIDRSpec) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *ServiceCIDRSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
-}
-func (m *ServiceCIDRSpec) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ServiceCIDRSpec.Merge(m, src)
-}
-func (m *ServiceCIDRSpec) XXX_Size() int {
- return m.Size()
-}
-func (m *ServiceCIDRSpec) XXX_DiscardUnknown() {
- xxx_messageInfo_ServiceCIDRSpec.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ServiceCIDRSpec proto.InternalMessageInfo
-
-func (m *ServiceCIDRStatus) Reset() { *m = ServiceCIDRStatus{} }
-func (*ServiceCIDRStatus) ProtoMessage() {}
-func (*ServiceCIDRStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_c1cb39e7b48ce50d, []int{7}
-}
-func (m *ServiceCIDRStatus) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *ServiceCIDRStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
-}
-func (m *ServiceCIDRStatus) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ServiceCIDRStatus.Merge(m, src)
-}
-func (m *ServiceCIDRStatus) XXX_Size() int {
- return m.Size()
-}
-func (m *ServiceCIDRStatus) XXX_DiscardUnknown() {
- xxx_messageInfo_ServiceCIDRStatus.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ServiceCIDRStatus proto.InternalMessageInfo
-
-func init() {
- proto.RegisterType((*IPAddress)(nil), "k8s.io.api.networking.v1alpha1.IPAddress")
- proto.RegisterType((*IPAddressList)(nil), "k8s.io.api.networking.v1alpha1.IPAddressList")
- proto.RegisterType((*IPAddressSpec)(nil), "k8s.io.api.networking.v1alpha1.IPAddressSpec")
- proto.RegisterType((*ParentReference)(nil), "k8s.io.api.networking.v1alpha1.ParentReference")
- proto.RegisterType((*ServiceCIDR)(nil), "k8s.io.api.networking.v1alpha1.ServiceCIDR")
- proto.RegisterType((*ServiceCIDRList)(nil), "k8s.io.api.networking.v1alpha1.ServiceCIDRList")
- proto.RegisterType((*ServiceCIDRSpec)(nil), "k8s.io.api.networking.v1alpha1.ServiceCIDRSpec")
- proto.RegisterType((*ServiceCIDRStatus)(nil), "k8s.io.api.networking.v1alpha1.ServiceCIDRStatus")
-}
-
-func init() {
- proto.RegisterFile("k8s.io/api/networking/v1alpha1/generated.proto", fileDescriptor_c1cb39e7b48ce50d)
-}
-
-var fileDescriptor_c1cb39e7b48ce50d = []byte{
- // 634 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x6e, 0xd3, 0x4a,
- 0x18, 0x8d, 0xdb, 0xa4, 0xaa, 0x27, 0xb7, 0xb7, 0xb7, 0x5e, 0x45, 0x5d, 0x38, 0x91, 0xef, 0xa6,
- 0x08, 0x3a, 0x26, 0x11, 0x42, 0x6c, 0x71, 0x2b, 0xa1, 0x4a, 0xd0, 0x96, 0xe9, 0x0a, 0xd4, 0x05,
- 0xd3, 0xc9, 0x57, 0x67, 0x08, 0xfe, 0xd1, 0xcc, 0x24, 0xc0, 0x8e, 0x47, 0xe0, 0x05, 0x78, 0x0e,
- 0x56, 0x20, 0xb1, 0xeb, 0xb2, 0xcb, 0xae, 0x2a, 0x6a, 0x5e, 0x04, 0xcd, 0xd8, 0xb1, 0x93, 0x46,
- 0xfd, 0xdb, 0x74, 0xe7, 0xef, 0xcc, 0x39, 0x67, 0xbe, 0xf3, 0xcd, 0x8c, 0x8c, 0xf0, 0xf0, 0x99,
- 0xc4, 0x3c, 0xf1, 0x69, 0xca, 0xfd, 0x18, 0xd4, 0xc7, 0x44, 0x0c, 0x79, 0x1c, 0xfa, 0xe3, 0x2e,
- 0xfd, 0x90, 0x0e, 0x68, 0xd7, 0x0f, 0x21, 0x06, 0x41, 0x15, 0xf4, 0x71, 0x2a, 0x12, 0x95, 0x38,
- 0x6e, 0xce, 0xc7, 0x34, 0xe5, 0xb8, 0xe2, 0xe3, 0x09, 0x7f, 0x7d, 0x33, 0xe4, 0x6a, 0x30, 0x3a,
- 0xc2, 0x2c, 0x89, 0xfc, 0x30, 0x09, 0x13, 0xdf, 0xc8, 0x8e, 0x46, 0xc7, 0xa6, 0x32, 0x85, 0xf9,
- 0xca, 0xed, 0xd6, 0x9f, 0x54, 0xdb, 0x47, 0x94, 0x0d, 0x78, 0x0c, 0xe2, 0xb3, 0x9f, 0x0e, 0x43,
- 0x0d, 0x48, 0x3f, 0x02, 0x45, 0xfd, 0xf1, 0x5c, 0x13, 0xeb, 0xfe, 0x55, 0x2a, 0x31, 0x8a, 0x15,
- 0x8f, 0x60, 0x4e, 0xf0, 0xf4, 0x26, 0x81, 0x64, 0x03, 0x88, 0xe8, 0x65, 0x9d, 0xf7, 0xd3, 0x42,
- 0xf6, 0xce, 0xfe, 0xf3, 0x7e, 0x5f, 0x80, 0x94, 0xce, 0x3b, 0xb4, 0xac, 0x3b, 0xea, 0x53, 0x45,
- 0x5b, 0x56, 0xc7, 0xda, 0x68, 0xf6, 0x1e, 0xe3, 0x6a, 0x1c, 0xa5, 0x31, 0x4e, 0x87, 0xa1, 0x06,
- 0x24, 0xd6, 0x6c, 0x3c, 0xee, 0xe2, 0xbd, 0xa3, 0xf7, 0xc0, 0xd4, 0x2b, 0x50, 0x34, 0x70, 0x4e,
- 0xce, 0xdb, 0xb5, 0xec, 0xbc, 0x8d, 0x2a, 0x8c, 0x94, 0xae, 0xce, 0x1e, 0xaa, 0xcb, 0x14, 0x58,
- 0x6b, 0xc1, 0xb8, 0x6f, 0xe2, 0xeb, 0x87, 0x8d, 0xcb, 0xd6, 0x0e, 0x52, 0x60, 0xc1, 0x3f, 0x85,
- 0x75, 0x5d, 0x57, 0xc4, 0x18, 0x79, 0x3f, 0x2c, 0xb4, 0x52, 0xb2, 0x5e, 0x72, 0xa9, 0x9c, 0xc3,
- 0xb9, 0x10, 0xf8, 0x76, 0x21, 0xb4, 0xda, 0x44, 0xf8, 0xaf, 0xd8, 0x67, 0x79, 0x82, 0x4c, 0x05,
- 0xd8, 0x45, 0x0d, 0xae, 0x20, 0x92, 0xad, 0x85, 0xce, 0xe2, 0x46, 0xb3, 0xf7, 0xe0, 0xd6, 0x09,
- 0x82, 0x95, 0xc2, 0xb5, 0xb1, 0xa3, 0xf5, 0x24, 0xb7, 0xf1, 0xa2, 0xa9, 0xf6, 0x75, 0x2c, 0xe7,
- 0x10, 0xd9, 0x29, 0x15, 0x10, 0x2b, 0x02, 0xc7, 0x45, 0xff, 0xfe, 0x4d, 0x9b, 0xec, 0x4f, 0x04,
- 0x20, 0x20, 0x66, 0x10, 0xac, 0x64, 0xe7, 0x6d, 0xbb, 0x04, 0x49, 0x65, 0xe8, 0x7d, 0xb7, 0xd0,
- 0xea, 0x25, 0xb6, 0xf3, 0x3f, 0x6a, 0x84, 0x22, 0x19, 0xa5, 0x66, 0x37, 0xbb, 0xea, 0xf3, 0x85,
- 0x06, 0x49, 0xbe, 0xe6, 0x3c, 0x42, 0xcb, 0x02, 0x64, 0x32, 0x12, 0x0c, 0xcc, 0xe1, 0xd9, 0xd5,
- 0x94, 0x48, 0x81, 0x93, 0x92, 0xe1, 0xf8, 0xc8, 0x8e, 0x69, 0x04, 0x32, 0xa5, 0x0c, 0x5a, 0x8b,
- 0x86, 0xbe, 0x56, 0xd0, 0xed, 0xdd, 0xc9, 0x02, 0xa9, 0x38, 0x4e, 0x07, 0xd5, 0x75, 0xd1, 0xaa,
- 0x1b, 0x6e, 0x79, 0xd0, 0x9a, 0x4b, 0xcc, 0x8a, 0xf7, 0x6d, 0x01, 0x35, 0x0f, 0x40, 0x8c, 0x39,
- 0x83, 0xad, 0x9d, 0x6d, 0x72, 0x0f, 0x77, 0xf5, 0xf5, 0xcc, 0x5d, 0xbd, 0xf1, 0x10, 0xa6, 0x9a,
- 0xbb, 0xea, 0xb6, 0x3a, 0x6f, 0xd0, 0x92, 0x54, 0x54, 0x8d, 0xa4, 0x19, 0x4a, 0xb3, 0xd7, 0xbd,
- 0x8b, 0xa9, 0x11, 0x06, 0xff, 0x16, 0xb6, 0x4b, 0x79, 0x4d, 0x0a, 0x43, 0xef, 0x97, 0x85, 0x56,
- 0xa7, 0xd8, 0xf7, 0xf0, 0x14, 0xf6, 0x67, 0x9f, 0xc2, 0xc3, 0x3b, 0x64, 0xb9, 0xe2, 0x31, 0xf4,
- 0x66, 0x22, 0x98, 0xe7, 0xd0, 0x46, 0x0d, 0xc6, 0xfb, 0x42, 0xb6, 0xac, 0xce, 0xe2, 0x86, 0x1d,
- 0xd8, 0x5a, 0xa3, 0x17, 0x25, 0xc9, 0x71, 0xef, 0x13, 0x5a, 0x9b, 0x1b, 0x92, 0xc3, 0x10, 0x62,
- 0x49, 0xdc, 0xe7, 0x8a, 0x27, 0x71, 0x2e, 0x9d, 0x3d, 0xc0, 0x6b, 0xa2, 0x6f, 0x4d, 0x74, 0xd5,
- 0xed, 0x28, 0x21, 0x49, 0xa6, 0x6c, 0x83, 0xed, 0x93, 0x0b, 0xb7, 0x76, 0x7a, 0xe1, 0xd6, 0xce,
- 0x2e, 0xdc, 0xda, 0x97, 0xcc, 0xb5, 0x4e, 0x32, 0xd7, 0x3a, 0xcd, 0x5c, 0xeb, 0x2c, 0x73, 0xad,
- 0xdf, 0x99, 0x6b, 0x7d, 0xfd, 0xe3, 0xd6, 0xde, 0xba, 0xd7, 0xff, 0x7f, 0xfe, 0x06, 0x00, 0x00,
- 0xff, 0xff, 0xb1, 0xd0, 0x33, 0x02, 0xa0, 0x06, 0x00, 0x00,
-}
-
-func (m *IPAddress) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *IPAddress) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *IPAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- {
- size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- {
- size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *IPAddressList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *IPAddressList) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *IPAddressList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Items) > 0 {
- for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- }
- }
- {
- size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *IPAddressSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *IPAddressSpec) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *IPAddressSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.ParentRef != nil {
- {
- size, err := m.ParentRef.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- }
- return len(dAtA) - i, nil
-}
-
-func (m *ParentReference) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ParentReference) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *ParentReference) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- i -= len(m.Name)
- copy(dAtA[i:], m.Name)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i--
- dAtA[i] = 0x22
- i -= len(m.Namespace)
- copy(dAtA[i:], m.Namespace)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
- i--
- dAtA[i] = 0x1a
- i -= len(m.Resource)
- copy(dAtA[i:], m.Resource)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource)))
- i--
- dAtA[i] = 0x12
- i -= len(m.Group)
- copy(dAtA[i:], m.Group)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group)))
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *ServiceCIDR) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ServiceCIDR) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *ServiceCIDR) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- {
- size, err := m.Status.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x1a
- {
- size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- {
- size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *ServiceCIDRList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ServiceCIDRList) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *ServiceCIDRList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Items) > 0 {
- for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- }
- }
- {
- size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *ServiceCIDRSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ServiceCIDRSpec) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *ServiceCIDRSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.CIDRs) > 0 {
- for iNdEx := len(m.CIDRs) - 1; iNdEx >= 0; iNdEx-- {
- i -= len(m.CIDRs[iNdEx])
- copy(dAtA[i:], m.CIDRs[iNdEx])
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.CIDRs[iNdEx])))
- i--
- dAtA[i] = 0xa
- }
- }
- return len(dAtA) - i, nil
-}
-
-func (m *ServiceCIDRStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ServiceCIDRStatus) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *ServiceCIDRStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Conditions) > 0 {
- for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- }
- }
- return len(dAtA) - i, nil
-}
-
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- offset -= sovGenerated(v)
- base := offset
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return base
-}
-func (m *IPAddress) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *IPAddressList) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *IPAddressSpec) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if m.ParentRef != nil {
- l = m.ParentRef.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *ParentReference) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Group)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Resource)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Namespace)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ServiceCIDR) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ServiceCIDRList) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ServiceCIDRSpec) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if len(m.CIDRs) > 0 {
- for _, s := range m.CIDRs {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ServiceCIDRStatus) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if len(m.Conditions) > 0 {
- for _, e := range m.Conditions {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- return (math_bits.Len64(x|1) + 6) / 7
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *IPAddress) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&IPAddress{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "IPAddressSpec", "IPAddressSpec", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *IPAddressList) String() string {
- if this == nil {
- return "nil"
- }
- repeatedStringForItems := "[]IPAddress{"
- for _, f := range this.Items {
- repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "IPAddress", "IPAddress", 1), `&`, ``, 1) + ","
- }
- repeatedStringForItems += "}"
- s := strings.Join([]string{`&IPAddressList{`,
- `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + repeatedStringForItems + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *IPAddressSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&IPAddressSpec{`,
- `ParentRef:` + strings.Replace(this.ParentRef.String(), "ParentReference", "ParentReference", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ParentReference) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ParentReference{`,
- `Group:` + fmt.Sprintf("%v", this.Group) + `,`,
- `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`,
- `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ServiceCIDR) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ServiceCIDR{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ServiceCIDRSpec", "ServiceCIDRSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ServiceCIDRStatus", "ServiceCIDRStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ServiceCIDRList) String() string {
- if this == nil {
- return "nil"
- }
- repeatedStringForItems := "[]ServiceCIDR{"
- for _, f := range this.Items {
- repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ServiceCIDR", "ServiceCIDR", 1), `&`, ``, 1) + ","
- }
- repeatedStringForItems += "}"
- s := strings.Join([]string{`&ServiceCIDRList{`,
- `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + repeatedStringForItems + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ServiceCIDRSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ServiceCIDRSpec{`,
- `CIDRs:` + fmt.Sprintf("%v", this.CIDRs) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ServiceCIDRStatus) String() string {
- if this == nil {
- return "nil"
- }
- repeatedStringForConditions := "[]Condition{"
- for _, f := range this.Conditions {
- repeatedStringForConditions += fmt.Sprintf("%v", f) + ","
- }
- repeatedStringForConditions += "}"
- s := strings.Join([]string{`&ServiceCIDRStatus{`,
- `Conditions:` + repeatedStringForConditions + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *IPAddress) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: IPAddress: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: IPAddress: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *IPAddressList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: IPAddressList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: IPAddressList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, IPAddress{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *IPAddressSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: IPAddressSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: IPAddressSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ParentRef", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.ParentRef == nil {
- m.ParentRef = &ParentReference{}
- }
- if err := m.ParentRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ParentReference) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ParentReference: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ParentReference: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Group = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Resource = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Namespace = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ServiceCIDR) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ServiceCIDR: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ServiceCIDR: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ServiceCIDRList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ServiceCIDRList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ServiceCIDRList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, ServiceCIDR{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ServiceCIDRSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ServiceCIDRSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ServiceCIDRSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CIDRs", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.CIDRs = append(m.CIDRs, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ServiceCIDRStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ServiceCIDRStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ServiceCIDRStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Conditions = append(m.Conditions, v1.Condition{})
- if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipGenerated(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- depth := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- case 1:
- iNdEx += 8
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if length < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- iNdEx += length
- case 3:
- depth++
- case 4:
- if depth == 0 {
- return 0, ErrUnexpectedEndOfGroupGenerated
- }
- depth--
- case 5:
- iNdEx += 4
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- if iNdEx < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- if depth == 0 {
- return iNdEx, nil
- }
- }
- return 0, io.ErrUnexpectedEOF
-}
-
-var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
- ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
-)
diff --git a/hack/tools/vendor/k8s.io/api/networking/v1alpha1/generated.proto b/hack/tools/vendor/k8s.io/api/networking/v1alpha1/generated.proto
deleted file mode 100644
index 80ec6af735ef..000000000000
--- a/hack/tools/vendor/k8s.io/api/networking/v1alpha1/generated.proto
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
-Copyright 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.
-*/
-
-
-// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-
-syntax = "proto2";
-
-package k8s.io.api.networking.v1alpha1;
-
-import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/generated.proto";
-import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "k8s.io/api/networking/v1alpha1";
-
-// IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs
-// that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses.
-// An IP address can be represented in different formats, to guarantee the uniqueness of the IP,
-// the name of the object is the IP address in canonical format, four decimal digits separated
-// by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6.
-// Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1
-// Invalid: 10.01.2.3 or 2001:db8:0:0:0::1
-message IPAddress {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- // +optional
- optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // spec is the desired state of the IPAddress.
- // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- // +optional
- optional IPAddressSpec spec = 2;
-}
-
-// IPAddressList contains a list of IPAddress.
-message IPAddressList {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- // +optional
- optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // items is the list of IPAddresses.
- repeated IPAddress items = 2;
-}
-
-// IPAddressSpec describe the attributes in an IP Address.
-message IPAddressSpec {
- // ParentRef references the resource that an IPAddress is attached to.
- // An IPAddress must reference a parent object.
- // +required
- optional ParentReference parentRef = 1;
-}
-
-// ParentReference describes a reference to a parent object.
-message ParentReference {
- // Group is the group of the object being referenced.
- // +optional
- optional string group = 1;
-
- // Resource is the resource of the object being referenced.
- // +required
- optional string resource = 2;
-
- // Namespace is the namespace of the object being referenced.
- // +optional
- optional string namespace = 3;
-
- // Name is the name of the object being referenced.
- // +required
- optional string name = 4;
-}
-
-// ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64).
-// This range is used to allocate ClusterIPs to Service objects.
-message ServiceCIDR {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- // +optional
- optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // spec is the desired state of the ServiceCIDR.
- // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- // +optional
- optional ServiceCIDRSpec spec = 2;
-
- // status represents the current state of the ServiceCIDR.
- // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- // +optional
- optional ServiceCIDRStatus status = 3;
-}
-
-// ServiceCIDRList contains a list of ServiceCIDR objects.
-message ServiceCIDRList {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- // +optional
- optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // items is the list of ServiceCIDRs.
- repeated ServiceCIDR items = 2;
-}
-
-// ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services.
-message ServiceCIDRSpec {
- // CIDRs defines the IP blocks in CIDR notation (e.g. "192.168.0.0/24" or "2001:db8::/64")
- // from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family.
- // The network address of each CIDR, the address that identifies the subnet of a host, is reserved
- // and will not be allocated. The broadcast address for IPv4 CIDRs is also reserved and will not be
- // allocated.
- // This field is immutable.
- // +optional
- // +listType=atomic
- repeated string cidrs = 1;
-}
-
-// ServiceCIDRStatus describes the current state of the ServiceCIDR.
-message ServiceCIDRStatus {
- // conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR.
- // Current service state
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- // +listType=map
- // +listMapKey=type
- repeated .k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 1;
-}
-
diff --git a/hack/tools/vendor/k8s.io/api/networking/v1alpha1/register.go b/hack/tools/vendor/k8s.io/api/networking/v1alpha1/register.go
deleted file mode 100644
index c8f5856b5dcb..000000000000
--- a/hack/tools/vendor/k8s.io/api/networking/v1alpha1/register.go
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-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 v1alpha1
-
-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 used in this package.
-const GroupName = "networking.k8s.io"
-
-// SchemeGroupVersion is group version used to register objects in this package.
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
-
-// Kind takes an unqualified kind and returns a Group qualified GroupKind.
-func Kind(kind string) schema.GroupKind {
- return SchemeGroupVersion.WithKind(kind).GroupKind()
-}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource.
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // SchemeBuilder holds functions that add things to a scheme.
- // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- localSchemeBuilder = &SchemeBuilder
-
- // AddToScheme adds the types of this group into the given scheme.
- AddToScheme = localSchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to the given scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &IPAddress{},
- &IPAddressList{},
- &ServiceCIDR{},
- &ServiceCIDRList{},
- )
- metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/hack/tools/vendor/k8s.io/api/networking/v1alpha1/types.go b/hack/tools/vendor/k8s.io/api/networking/v1alpha1/types.go
deleted file mode 100644
index 0e454f02635f..000000000000
--- a/hack/tools/vendor/k8s.io/api/networking/v1alpha1/types.go
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
-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 v1alpha1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-// +genclient
-// +genclient:nonNamespaced
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-// +k8s:prerelease-lifecycle-gen:introduced=1.27
-
-// IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs
-// that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses.
-// An IP address can be represented in different formats, to guarantee the uniqueness of the IP,
-// the name of the object is the IP address in canonical format, four decimal digits separated
-// by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6.
-// Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1
-// Invalid: 10.01.2.3 or 2001:db8:0:0:0::1
-type IPAddress struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
- // spec is the desired state of the IPAddress.
- // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- // +optional
- Spec IPAddressSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
-}
-
-// IPAddressSpec describe the attributes in an IP Address.
-type IPAddressSpec struct {
- // ParentRef references the resource that an IPAddress is attached to.
- // An IPAddress must reference a parent object.
- // +required
- ParentRef *ParentReference `json:"parentRef,omitempty" protobuf:"bytes,1,opt,name=parentRef"`
-}
-
-// ParentReference describes a reference to a parent object.
-type ParentReference struct {
- // Group is the group of the object being referenced.
- // +optional
- Group string `json:"group,omitempty" protobuf:"bytes,1,opt,name=group"`
- // Resource is the resource of the object being referenced.
- // +required
- Resource string `json:"resource,omitempty" protobuf:"bytes,2,opt,name=resource"`
- // Namespace is the namespace of the object being referenced.
- // +optional
- Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"`
- // Name is the name of the object being referenced.
- // +required
- Name string `json:"name,omitempty" protobuf:"bytes,4,opt,name=name"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-// +k8s:prerelease-lifecycle-gen:introduced=1.27
-
-// IPAddressList contains a list of IPAddress.
-type IPAddressList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
- // items is the list of IPAddresses.
- Items []IPAddress `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
-
-// +genclient
-// +genclient:nonNamespaced
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-// +k8s:prerelease-lifecycle-gen:introduced=1.27
-
-// ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64).
-// This range is used to allocate ClusterIPs to Service objects.
-type ServiceCIDR struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
- // spec is the desired state of the ServiceCIDR.
- // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- // +optional
- Spec ServiceCIDRSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
- // status represents the current state of the ServiceCIDR.
- // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- // +optional
- Status ServiceCIDRStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services.
-type ServiceCIDRSpec struct {
- // CIDRs defines the IP blocks in CIDR notation (e.g. "192.168.0.0/24" or "2001:db8::/64")
- // from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family.
- // The network address of each CIDR, the address that identifies the subnet of a host, is reserved
- // and will not be allocated. The broadcast address for IPv4 CIDRs is also reserved and will not be
- // allocated.
- // This field is immutable.
- // +optional
- // +listType=atomic
- CIDRs []string `json:"cidrs,omitempty" protobuf:"bytes,1,opt,name=cidrs"`
-}
-
-const (
- // ServiceCIDRConditionReady represents status of a ServiceCIDR that is ready to be used by the
- // apiserver to allocate ClusterIPs for Services.
- ServiceCIDRConditionReady = "Ready"
- // ServiceCIDRReasonTerminating represents a reason where a ServiceCIDR is not ready because it is
- // being deleted.
- ServiceCIDRReasonTerminating = "Terminating"
-)
-
-// ServiceCIDRStatus describes the current state of the ServiceCIDR.
-type ServiceCIDRStatus struct {
- // conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR.
- // Current service state
- // +optional
- // +patchMergeKey=type
- // +patchStrategy=merge
- // +listType=map
- // +listMapKey=type
- Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-// +k8s:prerelease-lifecycle-gen:introduced=1.27
-
-// ServiceCIDRList contains a list of ServiceCIDR objects.
-type ServiceCIDRList struct {
- metav1.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- // +optional
- metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
- // items is the list of ServiceCIDRs.
- Items []ServiceCIDR `json:"items" protobuf:"bytes,2,rep,name=items"`
-}
diff --git a/hack/tools/vendor/k8s.io/api/networking/v1alpha1/types_swagger_doc_generated.go b/hack/tools/vendor/k8s.io/api/networking/v1alpha1/types_swagger_doc_generated.go
deleted file mode 100644
index 4c8eb57a7a5e..000000000000
--- a/hack/tools/vendor/k8s.io/api/networking/v1alpha1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
-Copyright 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 v1alpha1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-codegen.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
-var map_IPAddress = map[string]string{
- "": "IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. An IP address can be represented in different formats, to guarantee the uniqueness of the IP, the name of the object is the IP address in canonical format, four decimal digits separated by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 Invalid: 10.01.2.3 or 2001:db8:0:0:0::1",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
- "spec": "spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status",
-}
-
-func (IPAddress) SwaggerDoc() map[string]string {
- return map_IPAddress
-}
-
-var map_IPAddressList = map[string]string{
- "": "IPAddressList contains a list of IPAddress.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
- "items": "items is the list of IPAddresses.",
-}
-
-func (IPAddressList) SwaggerDoc() map[string]string {
- return map_IPAddressList
-}
-
-var map_IPAddressSpec = map[string]string{
- "": "IPAddressSpec describe the attributes in an IP Address.",
- "parentRef": "ParentRef references the resource that an IPAddress is attached to. An IPAddress must reference a parent object.",
-}
-
-func (IPAddressSpec) SwaggerDoc() map[string]string {
- return map_IPAddressSpec
-}
-
-var map_ParentReference = map[string]string{
- "": "ParentReference describes a reference to a parent object.",
- "group": "Group is the group of the object being referenced.",
- "resource": "Resource is the resource of the object being referenced.",
- "namespace": "Namespace is the namespace of the object being referenced.",
- "name": "Name is the name of the object being referenced.",
-}
-
-func (ParentReference) SwaggerDoc() map[string]string {
- return map_ParentReference
-}
-
-var map_ServiceCIDR = map[string]string{
- "": "ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). This range is used to allocate ClusterIPs to Service objects.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
- "spec": "spec is the desired state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status",
- "status": "status represents the current state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status",
-}
-
-func (ServiceCIDR) SwaggerDoc() map[string]string {
- return map_ServiceCIDR
-}
-
-var map_ServiceCIDRList = map[string]string{
- "": "ServiceCIDRList contains a list of ServiceCIDR objects.",
- "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
- "items": "items is the list of ServiceCIDRs.",
-}
-
-func (ServiceCIDRList) SwaggerDoc() map[string]string {
- return map_ServiceCIDRList
-}
-
-var map_ServiceCIDRSpec = map[string]string{
- "": "ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services.",
- "cidrs": "CIDRs defines the IP blocks in CIDR notation (e.g. \"192.168.0.0/24\" or \"2001:db8::/64\") from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. The network address of each CIDR, the address that identifies the subnet of a host, is reserved and will not be allocated. The broadcast address for IPv4 CIDRs is also reserved and will not be allocated. This field is immutable.",
-}
-
-func (ServiceCIDRSpec) SwaggerDoc() map[string]string {
- return map_ServiceCIDRSpec
-}
-
-var map_ServiceCIDRStatus = map[string]string{
- "": "ServiceCIDRStatus describes the current state of the ServiceCIDR.",
- "conditions": "conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR. Current service state",
-}
-
-func (ServiceCIDRStatus) SwaggerDoc() map[string]string {
- return map_ServiceCIDRStatus
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/hack/tools/vendor/k8s.io/api/networking/v1alpha1/well_known_labels.go b/hack/tools/vendor/k8s.io/api/networking/v1alpha1/well_known_labels.go
deleted file mode 100644
index 5f9c23f708ce..000000000000
--- a/hack/tools/vendor/k8s.io/api/networking/v1alpha1/well_known_labels.go
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-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 v1alpha1
-
-const (
-
- // TODO: Use IPFamily as field with a field selector,And the value is set based on
- // the name at create time and immutable.
- // LabelIPAddressFamily is used to indicate the IP family of a Kubernetes IPAddress.
- // This label simplify dual-stack client operations allowing to obtain the list of
- // IP addresses filtered by family.
- LabelIPAddressFamily = "ipaddress.kubernetes.io/ip-family"
- // LabelManagedBy is used to indicate the controller or entity that manages
- // an IPAddress. This label aims to enable different IPAddress
- // objects to be managed by different controllers or entities within the
- // same cluster. It is highly recommended to configure this label for all
- // IPAddress objects.
- LabelManagedBy = "ipaddress.kubernetes.io/managed-by"
-)
diff --git a/hack/tools/vendor/k8s.io/api/networking/v1alpha1/zz_generated.deepcopy.go b/hack/tools/vendor/k8s.io/api/networking/v1alpha1/zz_generated.deepcopy.go
deleted file mode 100644
index 5c8f697ba364..000000000000
--- a/hack/tools/vendor/k8s.io/api/networking/v1alpha1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,229 +0,0 @@
-//go:build !ignore_autogenerated
-// +build !ignore_autogenerated
-
-/*
-Copyright 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 deepcopy-gen. DO NOT EDIT.
-
-package v1alpha1
-
-import (
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *IPAddress) DeepCopyInto(out *IPAddress) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAddress.
-func (in *IPAddress) DeepCopy() *IPAddress {
- if in == nil {
- return nil
- }
- out := new(IPAddress)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *IPAddress) 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 *IPAddressList) DeepCopyInto(out *IPAddressList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ListMeta.DeepCopyInto(&out.ListMeta)
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]IPAddress, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAddressList.
-func (in *IPAddressList) DeepCopy() *IPAddressList {
- if in == nil {
- return nil
- }
- out := new(IPAddressList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *IPAddressList) 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 *IPAddressSpec) DeepCopyInto(out *IPAddressSpec) {
- *out = *in
- if in.ParentRef != nil {
- in, out := &in.ParentRef, &out.ParentRef
- *out = new(ParentReference)
- **out = **in
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAddressSpec.
-func (in *IPAddressSpec) DeepCopy() *IPAddressSpec {
- if in == nil {
- return nil
- }
- out := new(IPAddressSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ParentReference) DeepCopyInto(out *ParentReference) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParentReference.
-func (in *ParentReference) DeepCopy() *ParentReference {
- if in == nil {
- return nil
- }
- out := new(ParentReference)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ServiceCIDR) DeepCopyInto(out *ServiceCIDR) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCIDR.
-func (in *ServiceCIDR) DeepCopy() *ServiceCIDR {
- if in == nil {
- return nil
- }
- out := new(ServiceCIDR)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ServiceCIDR) 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 *ServiceCIDRList) DeepCopyInto(out *ServiceCIDRList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ListMeta.DeepCopyInto(&out.ListMeta)
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]ServiceCIDR, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCIDRList.
-func (in *ServiceCIDRList) DeepCopy() *ServiceCIDRList {
- if in == nil {
- return nil
- }
- out := new(ServiceCIDRList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *ServiceCIDRList) 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 *ServiceCIDRSpec) DeepCopyInto(out *ServiceCIDRSpec) {
- *out = *in
- if in.CIDRs != nil {
- in, out := &in.CIDRs, &out.CIDRs
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCIDRSpec.
-func (in *ServiceCIDRSpec) DeepCopy() *ServiceCIDRSpec {
- if in == nil {
- return nil
- }
- out := new(ServiceCIDRSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ServiceCIDRStatus) DeepCopyInto(out *ServiceCIDRStatus) {
- *out = *in
- 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])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCIDRStatus.
-func (in *ServiceCIDRStatus) DeepCopy() *ServiceCIDRStatus {
- if in == nil {
- return nil
- }
- out := new(ServiceCIDRStatus)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/hack/tools/vendor/k8s.io/api/networking/v1alpha1/zz_generated.prerelease-lifecycle.go b/hack/tools/vendor/k8s.io/api/networking/v1alpha1/zz_generated.prerelease-lifecycle.go
deleted file mode 100644
index 714e7b6253bc..000000000000
--- a/hack/tools/vendor/k8s.io/api/networking/v1alpha1/zz_generated.prerelease-lifecycle.go
+++ /dev/null
@@ -1,94 +0,0 @@
-//go:build !ignore_autogenerated
-// +build !ignore_autogenerated
-
-/*
-Copyright 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 prerelease-lifecycle-gen. DO NOT EDIT.
-
-package v1alpha1
-
-// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
-// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
-func (in *IPAddress) APILifecycleIntroduced() (major, minor int) {
- return 1, 27
-}
-
-// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
-// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
-func (in *IPAddress) APILifecycleDeprecated() (major, minor int) {
- return 1, 30
-}
-
-// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
-// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
-func (in *IPAddress) APILifecycleRemoved() (major, minor int) {
- return 1, 33
-}
-
-// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
-// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
-func (in *IPAddressList) APILifecycleIntroduced() (major, minor int) {
- return 1, 27
-}
-
-// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
-// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
-func (in *IPAddressList) APILifecycleDeprecated() (major, minor int) {
- return 1, 30
-}
-
-// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
-// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
-func (in *IPAddressList) APILifecycleRemoved() (major, minor int) {
- return 1, 33
-}
-
-// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
-// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
-func (in *ServiceCIDR) APILifecycleIntroduced() (major, minor int) {
- return 1, 27
-}
-
-// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
-// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
-func (in *ServiceCIDR) APILifecycleDeprecated() (major, minor int) {
- return 1, 30
-}
-
-// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
-// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
-func (in *ServiceCIDR) APILifecycleRemoved() (major, minor int) {
- return 1, 33
-}
-
-// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
-// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
-func (in *ServiceCIDRList) APILifecycleIntroduced() (major, minor int) {
- return 1, 27
-}
-
-// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
-// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
-func (in *ServiceCIDRList) APILifecycleDeprecated() (major, minor int) {
- return 1, 30
-}
-
-// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
-// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
-func (in *ServiceCIDRList) APILifecycleRemoved() (major, minor int) {
- return 1, 33
-}
diff --git a/hack/tools/vendor/k8s.io/api/resource/v1/devicetaint.go b/hack/tools/vendor/k8s.io/api/resource/v1/devicetaint.go
new file mode 100644
index 000000000000..a5c2e20a6e2b
--- /dev/null
+++ b/hack/tools/vendor/k8s.io/api/resource/v1/devicetaint.go
@@ -0,0 +1,35 @@
+/*
+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 v1
+
+import "fmt"
+
+var _ fmt.Stringer = DeviceTaint{}
+
+// String converts to a string in the format '=:', '=:', ':', or ''.
+func (t DeviceTaint) String() string {
+ if len(t.Effect) == 0 {
+ if len(t.Value) == 0 {
+ return fmt.Sprintf("%v", t.Key)
+ }
+ return fmt.Sprintf("%v=%v:", t.Key, t.Value)
+ }
+ if len(t.Value) == 0 {
+ return fmt.Sprintf("%v:%v", t.Key, t.Effect)
+ }
+ return fmt.Sprintf("%v=%v:%v", t.Key, t.Value, t.Effect)
+}
diff --git a/hack/tools/vendor/k8s.io/api/resource/v1/doc.go b/hack/tools/vendor/k8s.io/api/resource/v1/doc.go
new file mode 100644
index 000000000000..c94ca75ddc33
--- /dev/null
+++ b/hack/tools/vendor/k8s.io/api/resource/v1/doc.go
@@ -0,0 +1,24 @@
+/*
+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.
+*/
+
+// +k8s:openapi-gen=true
+// +k8s:deepcopy-gen=package
+// +k8s:protobuf-gen=package
+// +k8s:prerelease-lifecycle-gen=true
+// +groupName=resource.k8s.io
+
+// Package v1 is the v1 version of the resource API.
+package v1
diff --git a/hack/tools/vendor/k8s.io/api/resource/v1/generated.pb.go b/hack/tools/vendor/k8s.io/api/resource/v1/generated.pb.go
new file mode 100644
index 000000000000..5695e2c7e04f
--- /dev/null
+++ b/hack/tools/vendor/k8s.io/api/resource/v1/generated.pb.go
@@ -0,0 +1,12777 @@
+/*
+Copyright 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 protoc-gen-gogo. DO NOT EDIT.
+// source: k8s.io/api/resource/v1/generated.proto
+
+package v1
+
+import (
+ fmt "fmt"
+
+ io "io"
+
+ proto "github.com/gogo/protobuf/proto"
+ github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+ v11 "k8s.io/api/core/v1"
+ resource "k8s.io/apimachinery/pkg/api/resource"
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+
+ math "math"
+ math_bits "math/bits"
+ reflect "reflect"
+ strings "strings"
+
+ k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+
+func (m *AllocatedDeviceStatus) Reset() { *m = AllocatedDeviceStatus{} }
+func (*AllocatedDeviceStatus) ProtoMessage() {}
+func (*AllocatedDeviceStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{0}
+}
+func (m *AllocatedDeviceStatus) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *AllocatedDeviceStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *AllocatedDeviceStatus) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AllocatedDeviceStatus.Merge(m, src)
+}
+func (m *AllocatedDeviceStatus) XXX_Size() int {
+ return m.Size()
+}
+func (m *AllocatedDeviceStatus) XXX_DiscardUnknown() {
+ xxx_messageInfo_AllocatedDeviceStatus.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AllocatedDeviceStatus proto.InternalMessageInfo
+
+func (m *AllocationResult) Reset() { *m = AllocationResult{} }
+func (*AllocationResult) ProtoMessage() {}
+func (*AllocationResult) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{1}
+}
+func (m *AllocationResult) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *AllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *AllocationResult) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AllocationResult.Merge(m, src)
+}
+func (m *AllocationResult) XXX_Size() int {
+ return m.Size()
+}
+func (m *AllocationResult) XXX_DiscardUnknown() {
+ xxx_messageInfo_AllocationResult.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AllocationResult proto.InternalMessageInfo
+
+func (m *CELDeviceSelector) Reset() { *m = CELDeviceSelector{} }
+func (*CELDeviceSelector) ProtoMessage() {}
+func (*CELDeviceSelector) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{2}
+}
+func (m *CELDeviceSelector) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CELDeviceSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *CELDeviceSelector) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CELDeviceSelector.Merge(m, src)
+}
+func (m *CELDeviceSelector) XXX_Size() int {
+ return m.Size()
+}
+func (m *CELDeviceSelector) XXX_DiscardUnknown() {
+ xxx_messageInfo_CELDeviceSelector.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CELDeviceSelector proto.InternalMessageInfo
+
+func (m *CapacityRequestPolicy) Reset() { *m = CapacityRequestPolicy{} }
+func (*CapacityRequestPolicy) ProtoMessage() {}
+func (*CapacityRequestPolicy) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{3}
+}
+func (m *CapacityRequestPolicy) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CapacityRequestPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *CapacityRequestPolicy) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CapacityRequestPolicy.Merge(m, src)
+}
+func (m *CapacityRequestPolicy) XXX_Size() int {
+ return m.Size()
+}
+func (m *CapacityRequestPolicy) XXX_DiscardUnknown() {
+ xxx_messageInfo_CapacityRequestPolicy.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CapacityRequestPolicy proto.InternalMessageInfo
+
+func (m *CapacityRequestPolicyRange) Reset() { *m = CapacityRequestPolicyRange{} }
+func (*CapacityRequestPolicyRange) ProtoMessage() {}
+func (*CapacityRequestPolicyRange) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{4}
+}
+func (m *CapacityRequestPolicyRange) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CapacityRequestPolicyRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *CapacityRequestPolicyRange) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CapacityRequestPolicyRange.Merge(m, src)
+}
+func (m *CapacityRequestPolicyRange) XXX_Size() int {
+ return m.Size()
+}
+func (m *CapacityRequestPolicyRange) XXX_DiscardUnknown() {
+ xxx_messageInfo_CapacityRequestPolicyRange.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CapacityRequestPolicyRange proto.InternalMessageInfo
+
+func (m *CapacityRequirements) Reset() { *m = CapacityRequirements{} }
+func (*CapacityRequirements) ProtoMessage() {}
+func (*CapacityRequirements) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{5}
+}
+func (m *CapacityRequirements) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CapacityRequirements) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *CapacityRequirements) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CapacityRequirements.Merge(m, src)
+}
+func (m *CapacityRequirements) XXX_Size() int {
+ return m.Size()
+}
+func (m *CapacityRequirements) XXX_DiscardUnknown() {
+ xxx_messageInfo_CapacityRequirements.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CapacityRequirements proto.InternalMessageInfo
+
+func (m *Counter) Reset() { *m = Counter{} }
+func (*Counter) ProtoMessage() {}
+func (*Counter) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{6}
+}
+func (m *Counter) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Counter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *Counter) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Counter.Merge(m, src)
+}
+func (m *Counter) XXX_Size() int {
+ return m.Size()
+}
+func (m *Counter) XXX_DiscardUnknown() {
+ xxx_messageInfo_Counter.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Counter proto.InternalMessageInfo
+
+func (m *CounterSet) Reset() { *m = CounterSet{} }
+func (*CounterSet) ProtoMessage() {}
+func (*CounterSet) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{7}
+}
+func (m *CounterSet) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CounterSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *CounterSet) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CounterSet.Merge(m, src)
+}
+func (m *CounterSet) XXX_Size() int {
+ return m.Size()
+}
+func (m *CounterSet) XXX_DiscardUnknown() {
+ xxx_messageInfo_CounterSet.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CounterSet proto.InternalMessageInfo
+
+func (m *Device) Reset() { *m = Device{} }
+func (*Device) ProtoMessage() {}
+func (*Device) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{8}
+}
+func (m *Device) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Device) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *Device) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Device.Merge(m, src)
+}
+func (m *Device) XXX_Size() int {
+ return m.Size()
+}
+func (m *Device) XXX_DiscardUnknown() {
+ xxx_messageInfo_Device.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Device proto.InternalMessageInfo
+
+func (m *DeviceAllocationConfiguration) Reset() { *m = DeviceAllocationConfiguration{} }
+func (*DeviceAllocationConfiguration) ProtoMessage() {}
+func (*DeviceAllocationConfiguration) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{9}
+}
+func (m *DeviceAllocationConfiguration) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeviceAllocationConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *DeviceAllocationConfiguration) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceAllocationConfiguration.Merge(m, src)
+}
+func (m *DeviceAllocationConfiguration) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeviceAllocationConfiguration) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceAllocationConfiguration.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceAllocationConfiguration proto.InternalMessageInfo
+
+func (m *DeviceAllocationResult) Reset() { *m = DeviceAllocationResult{} }
+func (*DeviceAllocationResult) ProtoMessage() {}
+func (*DeviceAllocationResult) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{10}
+}
+func (m *DeviceAllocationResult) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeviceAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *DeviceAllocationResult) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceAllocationResult.Merge(m, src)
+}
+func (m *DeviceAllocationResult) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeviceAllocationResult) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceAllocationResult.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceAllocationResult proto.InternalMessageInfo
+
+func (m *DeviceAttribute) Reset() { *m = DeviceAttribute{} }
+func (*DeviceAttribute) ProtoMessage() {}
+func (*DeviceAttribute) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{11}
+}
+func (m *DeviceAttribute) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeviceAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *DeviceAttribute) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceAttribute.Merge(m, src)
+}
+func (m *DeviceAttribute) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeviceAttribute) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceAttribute.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceAttribute proto.InternalMessageInfo
+
+func (m *DeviceCapacity) Reset() { *m = DeviceCapacity{} }
+func (*DeviceCapacity) ProtoMessage() {}
+func (*DeviceCapacity) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{12}
+}
+func (m *DeviceCapacity) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeviceCapacity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *DeviceCapacity) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceCapacity.Merge(m, src)
+}
+func (m *DeviceCapacity) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeviceCapacity) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceCapacity.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceCapacity proto.InternalMessageInfo
+
+func (m *DeviceClaim) Reset() { *m = DeviceClaim{} }
+func (*DeviceClaim) ProtoMessage() {}
+func (*DeviceClaim) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{13}
+}
+func (m *DeviceClaim) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeviceClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *DeviceClaim) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceClaim.Merge(m, src)
+}
+func (m *DeviceClaim) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeviceClaim) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceClaim.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceClaim proto.InternalMessageInfo
+
+func (m *DeviceClaimConfiguration) Reset() { *m = DeviceClaimConfiguration{} }
+func (*DeviceClaimConfiguration) ProtoMessage() {}
+func (*DeviceClaimConfiguration) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{14}
+}
+func (m *DeviceClaimConfiguration) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeviceClaimConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *DeviceClaimConfiguration) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceClaimConfiguration.Merge(m, src)
+}
+func (m *DeviceClaimConfiguration) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeviceClaimConfiguration) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceClaimConfiguration.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceClaimConfiguration proto.InternalMessageInfo
+
+func (m *DeviceClass) Reset() { *m = DeviceClass{} }
+func (*DeviceClass) ProtoMessage() {}
+func (*DeviceClass) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{15}
+}
+func (m *DeviceClass) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeviceClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *DeviceClass) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceClass.Merge(m, src)
+}
+func (m *DeviceClass) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeviceClass) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceClass.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceClass proto.InternalMessageInfo
+
+func (m *DeviceClassConfiguration) Reset() { *m = DeviceClassConfiguration{} }
+func (*DeviceClassConfiguration) ProtoMessage() {}
+func (*DeviceClassConfiguration) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{16}
+}
+func (m *DeviceClassConfiguration) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeviceClassConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *DeviceClassConfiguration) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceClassConfiguration.Merge(m, src)
+}
+func (m *DeviceClassConfiguration) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeviceClassConfiguration) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceClassConfiguration.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceClassConfiguration proto.InternalMessageInfo
+
+func (m *DeviceClassList) Reset() { *m = DeviceClassList{} }
+func (*DeviceClassList) ProtoMessage() {}
+func (*DeviceClassList) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{17}
+}
+func (m *DeviceClassList) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeviceClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *DeviceClassList) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceClassList.Merge(m, src)
+}
+func (m *DeviceClassList) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeviceClassList) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceClassList.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceClassList proto.InternalMessageInfo
+
+func (m *DeviceClassSpec) Reset() { *m = DeviceClassSpec{} }
+func (*DeviceClassSpec) ProtoMessage() {}
+func (*DeviceClassSpec) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{18}
+}
+func (m *DeviceClassSpec) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeviceClassSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *DeviceClassSpec) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceClassSpec.Merge(m, src)
+}
+func (m *DeviceClassSpec) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeviceClassSpec) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceClassSpec.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceClassSpec proto.InternalMessageInfo
+
+func (m *DeviceConfiguration) Reset() { *m = DeviceConfiguration{} }
+func (*DeviceConfiguration) ProtoMessage() {}
+func (*DeviceConfiguration) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{19}
+}
+func (m *DeviceConfiguration) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *DeviceConfiguration) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceConfiguration.Merge(m, src)
+}
+func (m *DeviceConfiguration) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeviceConfiguration) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceConfiguration.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceConfiguration proto.InternalMessageInfo
+
+func (m *DeviceConstraint) Reset() { *m = DeviceConstraint{} }
+func (*DeviceConstraint) ProtoMessage() {}
+func (*DeviceConstraint) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{20}
+}
+func (m *DeviceConstraint) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeviceConstraint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *DeviceConstraint) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceConstraint.Merge(m, src)
+}
+func (m *DeviceConstraint) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeviceConstraint) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceConstraint.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceConstraint proto.InternalMessageInfo
+
+func (m *DeviceCounterConsumption) Reset() { *m = DeviceCounterConsumption{} }
+func (*DeviceCounterConsumption) ProtoMessage() {}
+func (*DeviceCounterConsumption) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{21}
+}
+func (m *DeviceCounterConsumption) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeviceCounterConsumption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *DeviceCounterConsumption) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceCounterConsumption.Merge(m, src)
+}
+func (m *DeviceCounterConsumption) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeviceCounterConsumption) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceCounterConsumption.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceCounterConsumption proto.InternalMessageInfo
+
+func (m *DeviceRequest) Reset() { *m = DeviceRequest{} }
+func (*DeviceRequest) ProtoMessage() {}
+func (*DeviceRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{22}
+}
+func (m *DeviceRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeviceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *DeviceRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceRequest.Merge(m, src)
+}
+func (m *DeviceRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeviceRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceRequest proto.InternalMessageInfo
+
+func (m *DeviceRequestAllocationResult) Reset() { *m = DeviceRequestAllocationResult{} }
+func (*DeviceRequestAllocationResult) ProtoMessage() {}
+func (*DeviceRequestAllocationResult) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{23}
+}
+func (m *DeviceRequestAllocationResult) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeviceRequestAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *DeviceRequestAllocationResult) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceRequestAllocationResult.Merge(m, src)
+}
+func (m *DeviceRequestAllocationResult) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeviceRequestAllocationResult) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceRequestAllocationResult.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceRequestAllocationResult proto.InternalMessageInfo
+
+func (m *DeviceSelector) Reset() { *m = DeviceSelector{} }
+func (*DeviceSelector) ProtoMessage() {}
+func (*DeviceSelector) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{24}
+}
+func (m *DeviceSelector) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeviceSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *DeviceSelector) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceSelector.Merge(m, src)
+}
+func (m *DeviceSelector) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeviceSelector) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceSelector.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceSelector proto.InternalMessageInfo
+
+func (m *DeviceSubRequest) Reset() { *m = DeviceSubRequest{} }
+func (*DeviceSubRequest) ProtoMessage() {}
+func (*DeviceSubRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{25}
+}
+func (m *DeviceSubRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeviceSubRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *DeviceSubRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceSubRequest.Merge(m, src)
+}
+func (m *DeviceSubRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeviceSubRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceSubRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceSubRequest proto.InternalMessageInfo
+
+func (m *DeviceTaint) Reset() { *m = DeviceTaint{} }
+func (*DeviceTaint) ProtoMessage() {}
+func (*DeviceTaint) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{26}
+}
+func (m *DeviceTaint) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeviceTaint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *DeviceTaint) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceTaint.Merge(m, src)
+}
+func (m *DeviceTaint) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeviceTaint) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceTaint.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceTaint proto.InternalMessageInfo
+
+func (m *DeviceToleration) Reset() { *m = DeviceToleration{} }
+func (*DeviceToleration) ProtoMessage() {}
+func (*DeviceToleration) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{27}
+}
+func (m *DeviceToleration) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeviceToleration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *DeviceToleration) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceToleration.Merge(m, src)
+}
+func (m *DeviceToleration) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeviceToleration) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceToleration.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceToleration proto.InternalMessageInfo
+
+func (m *ExactDeviceRequest) Reset() { *m = ExactDeviceRequest{} }
+func (*ExactDeviceRequest) ProtoMessage() {}
+func (*ExactDeviceRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{28}
+}
+func (m *ExactDeviceRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ExactDeviceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *ExactDeviceRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ExactDeviceRequest.Merge(m, src)
+}
+func (m *ExactDeviceRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ExactDeviceRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ExactDeviceRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ExactDeviceRequest proto.InternalMessageInfo
+
+func (m *NetworkDeviceData) Reset() { *m = NetworkDeviceData{} }
+func (*NetworkDeviceData) ProtoMessage() {}
+func (*NetworkDeviceData) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{29}
+}
+func (m *NetworkDeviceData) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *NetworkDeviceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *NetworkDeviceData) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_NetworkDeviceData.Merge(m, src)
+}
+func (m *NetworkDeviceData) XXX_Size() int {
+ return m.Size()
+}
+func (m *NetworkDeviceData) XXX_DiscardUnknown() {
+ xxx_messageInfo_NetworkDeviceData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_NetworkDeviceData proto.InternalMessageInfo
+
+func (m *OpaqueDeviceConfiguration) Reset() { *m = OpaqueDeviceConfiguration{} }
+func (*OpaqueDeviceConfiguration) ProtoMessage() {}
+func (*OpaqueDeviceConfiguration) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{30}
+}
+func (m *OpaqueDeviceConfiguration) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *OpaqueDeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *OpaqueDeviceConfiguration) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OpaqueDeviceConfiguration.Merge(m, src)
+}
+func (m *OpaqueDeviceConfiguration) XXX_Size() int {
+ return m.Size()
+}
+func (m *OpaqueDeviceConfiguration) XXX_DiscardUnknown() {
+ xxx_messageInfo_OpaqueDeviceConfiguration.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OpaqueDeviceConfiguration proto.InternalMessageInfo
+
+func (m *ResourceClaim) Reset() { *m = ResourceClaim{} }
+func (*ResourceClaim) ProtoMessage() {}
+func (*ResourceClaim) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{31}
+}
+func (m *ResourceClaim) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ResourceClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *ResourceClaim) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ResourceClaim.Merge(m, src)
+}
+func (m *ResourceClaim) XXX_Size() int {
+ return m.Size()
+}
+func (m *ResourceClaim) XXX_DiscardUnknown() {
+ xxx_messageInfo_ResourceClaim.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ResourceClaim proto.InternalMessageInfo
+
+func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} }
+func (*ResourceClaimConsumerReference) ProtoMessage() {}
+func (*ResourceClaimConsumerReference) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{32}
+}
+func (m *ResourceClaimConsumerReference) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ResourceClaimConsumerReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *ResourceClaimConsumerReference) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ResourceClaimConsumerReference.Merge(m, src)
+}
+func (m *ResourceClaimConsumerReference) XXX_Size() int {
+ return m.Size()
+}
+func (m *ResourceClaimConsumerReference) XXX_DiscardUnknown() {
+ xxx_messageInfo_ResourceClaimConsumerReference.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ResourceClaimConsumerReference proto.InternalMessageInfo
+
+func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} }
+func (*ResourceClaimList) ProtoMessage() {}
+func (*ResourceClaimList) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{33}
+}
+func (m *ResourceClaimList) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ResourceClaimList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *ResourceClaimList) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ResourceClaimList.Merge(m, src)
+}
+func (m *ResourceClaimList) XXX_Size() int {
+ return m.Size()
+}
+func (m *ResourceClaimList) XXX_DiscardUnknown() {
+ xxx_messageInfo_ResourceClaimList.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ResourceClaimList proto.InternalMessageInfo
+
+func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} }
+func (*ResourceClaimSpec) ProtoMessage() {}
+func (*ResourceClaimSpec) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{34}
+}
+func (m *ResourceClaimSpec) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ResourceClaimSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *ResourceClaimSpec) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ResourceClaimSpec.Merge(m, src)
+}
+func (m *ResourceClaimSpec) XXX_Size() int {
+ return m.Size()
+}
+func (m *ResourceClaimSpec) XXX_DiscardUnknown() {
+ xxx_messageInfo_ResourceClaimSpec.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ResourceClaimSpec proto.InternalMessageInfo
+
+func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} }
+func (*ResourceClaimStatus) ProtoMessage() {}
+func (*ResourceClaimStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{35}
+}
+func (m *ResourceClaimStatus) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ResourceClaimStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *ResourceClaimStatus) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ResourceClaimStatus.Merge(m, src)
+}
+func (m *ResourceClaimStatus) XXX_Size() int {
+ return m.Size()
+}
+func (m *ResourceClaimStatus) XXX_DiscardUnknown() {
+ xxx_messageInfo_ResourceClaimStatus.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ResourceClaimStatus proto.InternalMessageInfo
+
+func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} }
+func (*ResourceClaimTemplate) ProtoMessage() {}
+func (*ResourceClaimTemplate) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{36}
+}
+func (m *ResourceClaimTemplate) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ResourceClaimTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *ResourceClaimTemplate) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ResourceClaimTemplate.Merge(m, src)
+}
+func (m *ResourceClaimTemplate) XXX_Size() int {
+ return m.Size()
+}
+func (m *ResourceClaimTemplate) XXX_DiscardUnknown() {
+ xxx_messageInfo_ResourceClaimTemplate.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ResourceClaimTemplate proto.InternalMessageInfo
+
+func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} }
+func (*ResourceClaimTemplateList) ProtoMessage() {}
+func (*ResourceClaimTemplateList) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{37}
+}
+func (m *ResourceClaimTemplateList) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ResourceClaimTemplateList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *ResourceClaimTemplateList) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ResourceClaimTemplateList.Merge(m, src)
+}
+func (m *ResourceClaimTemplateList) XXX_Size() int {
+ return m.Size()
+}
+func (m *ResourceClaimTemplateList) XXX_DiscardUnknown() {
+ xxx_messageInfo_ResourceClaimTemplateList.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ResourceClaimTemplateList proto.InternalMessageInfo
+
+func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} }
+func (*ResourceClaimTemplateSpec) ProtoMessage() {}
+func (*ResourceClaimTemplateSpec) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{38}
+}
+func (m *ResourceClaimTemplateSpec) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ResourceClaimTemplateSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *ResourceClaimTemplateSpec) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ResourceClaimTemplateSpec.Merge(m, src)
+}
+func (m *ResourceClaimTemplateSpec) XXX_Size() int {
+ return m.Size()
+}
+func (m *ResourceClaimTemplateSpec) XXX_DiscardUnknown() {
+ xxx_messageInfo_ResourceClaimTemplateSpec.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ResourceClaimTemplateSpec proto.InternalMessageInfo
+
+func (m *ResourcePool) Reset() { *m = ResourcePool{} }
+func (*ResourcePool) ProtoMessage() {}
+func (*ResourcePool) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{39}
+}
+func (m *ResourcePool) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ResourcePool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *ResourcePool) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ResourcePool.Merge(m, src)
+}
+func (m *ResourcePool) XXX_Size() int {
+ return m.Size()
+}
+func (m *ResourcePool) XXX_DiscardUnknown() {
+ xxx_messageInfo_ResourcePool.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ResourcePool proto.InternalMessageInfo
+
+func (m *ResourceSlice) Reset() { *m = ResourceSlice{} }
+func (*ResourceSlice) ProtoMessage() {}
+func (*ResourceSlice) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{40}
+}
+func (m *ResourceSlice) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ResourceSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *ResourceSlice) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ResourceSlice.Merge(m, src)
+}
+func (m *ResourceSlice) XXX_Size() int {
+ return m.Size()
+}
+func (m *ResourceSlice) XXX_DiscardUnknown() {
+ xxx_messageInfo_ResourceSlice.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ResourceSlice proto.InternalMessageInfo
+
+func (m *ResourceSliceList) Reset() { *m = ResourceSliceList{} }
+func (*ResourceSliceList) ProtoMessage() {}
+func (*ResourceSliceList) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{41}
+}
+func (m *ResourceSliceList) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ResourceSliceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *ResourceSliceList) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ResourceSliceList.Merge(m, src)
+}
+func (m *ResourceSliceList) XXX_Size() int {
+ return m.Size()
+}
+func (m *ResourceSliceList) XXX_DiscardUnknown() {
+ xxx_messageInfo_ResourceSliceList.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ResourceSliceList proto.InternalMessageInfo
+
+func (m *ResourceSliceSpec) Reset() { *m = ResourceSliceSpec{} }
+func (*ResourceSliceSpec) ProtoMessage() {}
+func (*ResourceSliceSpec) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f4fc532aec02d243, []int{42}
+}
+func (m *ResourceSliceSpec) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ResourceSliceSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *ResourceSliceSpec) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ResourceSliceSpec.Merge(m, src)
+}
+func (m *ResourceSliceSpec) XXX_Size() int {
+ return m.Size()
+}
+func (m *ResourceSliceSpec) XXX_DiscardUnknown() {
+ xxx_messageInfo_ResourceSliceSpec.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ResourceSliceSpec proto.InternalMessageInfo
+
+func init() {
+ proto.RegisterType((*AllocatedDeviceStatus)(nil), "k8s.io.api.resource.v1.AllocatedDeviceStatus")
+ proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1.AllocationResult")
+ proto.RegisterType((*CELDeviceSelector)(nil), "k8s.io.api.resource.v1.CELDeviceSelector")
+ proto.RegisterType((*CapacityRequestPolicy)(nil), "k8s.io.api.resource.v1.CapacityRequestPolicy")
+ proto.RegisterType((*CapacityRequestPolicyRange)(nil), "k8s.io.api.resource.v1.CapacityRequestPolicyRange")
+ proto.RegisterType((*CapacityRequirements)(nil), "k8s.io.api.resource.v1.CapacityRequirements")
+ proto.RegisterMapType((map[QualifiedName]resource.Quantity)(nil), "k8s.io.api.resource.v1.CapacityRequirements.RequestsEntry")
+ proto.RegisterType((*Counter)(nil), "k8s.io.api.resource.v1.Counter")
+ proto.RegisterType((*CounterSet)(nil), "k8s.io.api.resource.v1.CounterSet")
+ proto.RegisterMapType((map[string]Counter)(nil), "k8s.io.api.resource.v1.CounterSet.CountersEntry")
+ proto.RegisterType((*Device)(nil), "k8s.io.api.resource.v1.Device")
+ proto.RegisterMapType((map[QualifiedName]DeviceAttribute)(nil), "k8s.io.api.resource.v1.Device.AttributesEntry")
+ proto.RegisterMapType((map[QualifiedName]DeviceCapacity)(nil), "k8s.io.api.resource.v1.Device.CapacityEntry")
+ proto.RegisterType((*DeviceAllocationConfiguration)(nil), "k8s.io.api.resource.v1.DeviceAllocationConfiguration")
+ proto.RegisterType((*DeviceAllocationResult)(nil), "k8s.io.api.resource.v1.DeviceAllocationResult")
+ proto.RegisterType((*DeviceAttribute)(nil), "k8s.io.api.resource.v1.DeviceAttribute")
+ proto.RegisterType((*DeviceCapacity)(nil), "k8s.io.api.resource.v1.DeviceCapacity")
+ proto.RegisterType((*DeviceClaim)(nil), "k8s.io.api.resource.v1.DeviceClaim")
+ proto.RegisterType((*DeviceClaimConfiguration)(nil), "k8s.io.api.resource.v1.DeviceClaimConfiguration")
+ proto.RegisterType((*DeviceClass)(nil), "k8s.io.api.resource.v1.DeviceClass")
+ proto.RegisterType((*DeviceClassConfiguration)(nil), "k8s.io.api.resource.v1.DeviceClassConfiguration")
+ proto.RegisterType((*DeviceClassList)(nil), "k8s.io.api.resource.v1.DeviceClassList")
+ proto.RegisterType((*DeviceClassSpec)(nil), "k8s.io.api.resource.v1.DeviceClassSpec")
+ proto.RegisterType((*DeviceConfiguration)(nil), "k8s.io.api.resource.v1.DeviceConfiguration")
+ proto.RegisterType((*DeviceConstraint)(nil), "k8s.io.api.resource.v1.DeviceConstraint")
+ proto.RegisterType((*DeviceCounterConsumption)(nil), "k8s.io.api.resource.v1.DeviceCounterConsumption")
+ proto.RegisterMapType((map[string]Counter)(nil), "k8s.io.api.resource.v1.DeviceCounterConsumption.CountersEntry")
+ proto.RegisterType((*DeviceRequest)(nil), "k8s.io.api.resource.v1.DeviceRequest")
+ proto.RegisterType((*DeviceRequestAllocationResult)(nil), "k8s.io.api.resource.v1.DeviceRequestAllocationResult")
+ proto.RegisterMapType((map[QualifiedName]resource.Quantity)(nil), "k8s.io.api.resource.v1.DeviceRequestAllocationResult.ConsumedCapacityEntry")
+ proto.RegisterType((*DeviceSelector)(nil), "k8s.io.api.resource.v1.DeviceSelector")
+ proto.RegisterType((*DeviceSubRequest)(nil), "k8s.io.api.resource.v1.DeviceSubRequest")
+ proto.RegisterType((*DeviceTaint)(nil), "k8s.io.api.resource.v1.DeviceTaint")
+ proto.RegisterType((*DeviceToleration)(nil), "k8s.io.api.resource.v1.DeviceToleration")
+ proto.RegisterType((*ExactDeviceRequest)(nil), "k8s.io.api.resource.v1.ExactDeviceRequest")
+ proto.RegisterType((*NetworkDeviceData)(nil), "k8s.io.api.resource.v1.NetworkDeviceData")
+ proto.RegisterType((*OpaqueDeviceConfiguration)(nil), "k8s.io.api.resource.v1.OpaqueDeviceConfiguration")
+ proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.resource.v1.ResourceClaim")
+ proto.RegisterType((*ResourceClaimConsumerReference)(nil), "k8s.io.api.resource.v1.ResourceClaimConsumerReference")
+ proto.RegisterType((*ResourceClaimList)(nil), "k8s.io.api.resource.v1.ResourceClaimList")
+ proto.RegisterType((*ResourceClaimSpec)(nil), "k8s.io.api.resource.v1.ResourceClaimSpec")
+ proto.RegisterType((*ResourceClaimStatus)(nil), "k8s.io.api.resource.v1.ResourceClaimStatus")
+ proto.RegisterType((*ResourceClaimTemplate)(nil), "k8s.io.api.resource.v1.ResourceClaimTemplate")
+ proto.RegisterType((*ResourceClaimTemplateList)(nil), "k8s.io.api.resource.v1.ResourceClaimTemplateList")
+ proto.RegisterType((*ResourceClaimTemplateSpec)(nil), "k8s.io.api.resource.v1.ResourceClaimTemplateSpec")
+ proto.RegisterType((*ResourcePool)(nil), "k8s.io.api.resource.v1.ResourcePool")
+ proto.RegisterType((*ResourceSlice)(nil), "k8s.io.api.resource.v1.ResourceSlice")
+ proto.RegisterType((*ResourceSliceList)(nil), "k8s.io.api.resource.v1.ResourceSliceList")
+ proto.RegisterType((*ResourceSliceSpec)(nil), "k8s.io.api.resource.v1.ResourceSliceSpec")
+}
+
+func init() {
+ proto.RegisterFile("k8s.io/api/resource/v1/generated.proto", fileDescriptor_f4fc532aec02d243)
+}
+
+var fileDescriptor_f4fc532aec02d243 = []byte{
+ // 3028 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5b, 0x4d, 0x6c, 0x24, 0x47,
+ 0xf5, 0x77, 0xcf, 0xcc, 0x8e, 0xc7, 0x6f, 0x6c, 0xaf, 0x5d, 0xbb, 0xeb, 0x4c, 0xfc, 0xff, 0xc7,
+ 0xe3, 0xf4, 0x92, 0xc4, 0x49, 0x76, 0xc7, 0x6b, 0x8b, 0x44, 0x51, 0x12, 0x10, 0x1e, 0xdb, 0x9b,
+ 0x38, 0xfb, 0x11, 0xa7, 0xc6, 0x6b, 0x36, 0x28, 0x84, 0xb4, 0x7b, 0xca, 0x76, 0xe3, 0x9e, 0xee,
+ 0x49, 0x77, 0x8d, 0x77, 0xcd, 0x29, 0xe2, 0x00, 0x57, 0x04, 0x12, 0x02, 0x24, 0x24, 0x94, 0x03,
+ 0x12, 0x17, 0x84, 0x38, 0x11, 0x04, 0x28, 0xc7, 0x08, 0x29, 0x28, 0x17, 0xa4, 0x20, 0xa1, 0x81,
+ 0x1d, 0x4e, 0x48, 0x08, 0x89, 0x0b, 0x07, 0x1f, 0x10, 0xaa, 0xea, 0xaa, 0xfe, 0x9a, 0x6e, 0x4f,
+ 0xdb, 0x59, 0xaf, 0x96, 0x9b, 0xe7, 0xd5, 0x7b, 0xbf, 0xaa, 0x7a, 0xf5, 0xbe, 0xea, 0x75, 0x19,
+ 0x9e, 0xdc, 0x7b, 0xc1, 0xad, 0x19, 0xf6, 0xbc, 0xd6, 0x36, 0xe6, 0x1d, 0xe2, 0xda, 0x1d, 0x47,
+ 0x27, 0xf3, 0xfb, 0x0b, 0xf3, 0x3b, 0xc4, 0x22, 0x8e, 0x46, 0x49, 0xb3, 0xd6, 0x76, 0x6c, 0x6a,
+ 0xa3, 0x29, 0x8f, 0xaf, 0xa6, 0xb5, 0x8d, 0x9a, 0xe4, 0xab, 0xed, 0x2f, 0x4c, 0x5f, 0xde, 0x31,
+ 0xe8, 0x6e, 0x67, 0xab, 0xa6, 0xdb, 0xad, 0xf9, 0x1d, 0x7b, 0xc7, 0x9e, 0xe7, 0xec, 0x5b, 0x9d,
+ 0x6d, 0xfe, 0x8b, 0xff, 0xe0, 0x7f, 0x79, 0x30, 0xd3, 0x6a, 0x68, 0x3a, 0xdd, 0x76, 0x92, 0xa6,
+ 0x9a, 0xfe, 0x7c, 0xc0, 0xd3, 0xd2, 0xf4, 0x5d, 0xc3, 0x22, 0xce, 0xc1, 0x7c, 0x7b, 0x6f, 0x27,
+ 0xba, 0xc6, 0xe3, 0x48, 0xb9, 0xf3, 0x2d, 0x42, 0xb5, 0xa4, 0xb9, 0xe6, 0xd3, 0xa4, 0x9c, 0x8e,
+ 0x45, 0x8d, 0x56, 0xff, 0x34, 0xcf, 0x0f, 0x12, 0x70, 0xf5, 0x5d, 0xd2, 0xd2, 0xe2, 0x72, 0xea,
+ 0x87, 0x79, 0xb8, 0xb0, 0x64, 0x9a, 0xb6, 0xce, 0x68, 0x2b, 0x64, 0xdf, 0xd0, 0x49, 0x83, 0x6a,
+ 0xb4, 0xe3, 0xa2, 0x27, 0xa1, 0xd8, 0x74, 0x8c, 0x7d, 0xe2, 0x54, 0x94, 0x59, 0x65, 0x6e, 0xa4,
+ 0x3e, 0xfe, 0x51, 0xb7, 0x3a, 0xd4, 0xeb, 0x56, 0x8b, 0x2b, 0x9c, 0x8a, 0xc5, 0x28, 0x9a, 0x85,
+ 0x42, 0xdb, 0xb6, 0xcd, 0x4a, 0x8e, 0x73, 0x8d, 0x0a, 0xae, 0xc2, 0xba, 0x6d, 0x9b, 0x98, 0x8f,
+ 0x70, 0x24, 0x8e, 0x5c, 0xc9, 0xc7, 0x90, 0x38, 0x15, 0x8b, 0x51, 0xf4, 0x04, 0x0c, 0xbb, 0xbb,
+ 0x9a, 0x43, 0xd6, 0x56, 0x2a, 0xc3, 0x9c, 0xb1, 0xdc, 0xeb, 0x56, 0x87, 0x1b, 0x1e, 0x09, 0xcb,
+ 0x31, 0xa4, 0x03, 0xe8, 0xb6, 0xd5, 0x34, 0xa8, 0x61, 0x5b, 0x6e, 0xa5, 0x30, 0x9b, 0x9f, 0x2b,
+ 0x2f, 0xce, 0xd7, 0x02, 0x3b, 0xf0, 0xf7, 0x5f, 0x6b, 0xef, 0xed, 0x30, 0x82, 0x5b, 0x63, 0x6a,
+ 0xae, 0xed, 0x2f, 0xd4, 0x96, 0xa5, 0x5c, 0x1d, 0x89, 0x35, 0x80, 0x4f, 0x72, 0x71, 0x08, 0x16,
+ 0x5d, 0x83, 0x42, 0x53, 0xa3, 0x5a, 0xe5, 0xcc, 0xac, 0x32, 0x57, 0x5e, 0xbc, 0x9c, 0x0a, 0x2f,
+ 0xd4, 0x5b, 0xc3, 0xda, 0x9d, 0xd5, 0xbb, 0x94, 0x58, 0x2e, 0x03, 0x2f, 0x31, 0x05, 0xac, 0x68,
+ 0x54, 0xc3, 0x1c, 0x04, 0xbd, 0x05, 0x65, 0x8b, 0xd0, 0x3b, 0xb6, 0xb3, 0xc7, 0x88, 0x95, 0x22,
+ 0xc7, 0x7c, 0xba, 0x96, 0x6c, 0xba, 0xb5, 0x9b, 0x82, 0x95, 0x2b, 0x85, 0x09, 0xd4, 0xcf, 0xf6,
+ 0xba, 0xd5, 0xf2, 0xcd, 0x00, 0x01, 0x87, 0xe1, 0xd4, 0xdf, 0xe4, 0x60, 0x42, 0x1c, 0xa1, 0x61,
+ 0x5b, 0x98, 0xb8, 0x1d, 0x93, 0xa2, 0x37, 0x61, 0xd8, 0xd3, 0xaa, 0xcb, 0x8f, 0xaf, 0xbc, 0x58,
+ 0x4b, 0x9b, 0xce, 0x9b, 0x27, 0x0e, 0x50, 0x3f, 0x2b, 0x14, 0x34, 0xec, 0x8d, 0xbb, 0x58, 0xe2,
+ 0xa1, 0x4d, 0x18, 0xb5, 0xec, 0x26, 0x69, 0x10, 0x93, 0xe8, 0xd4, 0x76, 0xf8, 0xa1, 0x96, 0x17,
+ 0x67, 0xc3, 0xf8, 0xcc, 0x85, 0xf8, 0x56, 0x42, 0x7c, 0xf5, 0x89, 0x5e, 0xb7, 0x3a, 0x1a, 0xa6,
+ 0xe0, 0x08, 0x0e, 0xea, 0xc0, 0x39, 0xcd, 0x5f, 0xc5, 0x86, 0xd1, 0x22, 0x2e, 0xd5, 0x5a, 0x6d,
+ 0x71, 0x02, 0xcf, 0x64, 0x3b, 0x60, 0x26, 0x56, 0x7f, 0xa4, 0xd7, 0xad, 0x9e, 0x5b, 0xea, 0x87,
+ 0xc2, 0x49, 0xf8, 0xea, 0x2b, 0x30, 0xb9, 0xbc, 0x7a, 0x5d, 0x98, 0xbe, 0x5c, 0xcb, 0x22, 0x00,
+ 0xb9, 0xdb, 0x76, 0x88, 0xcb, 0xce, 0x53, 0x38, 0x80, 0x6f, 0x32, 0xab, 0xfe, 0x08, 0x0e, 0x71,
+ 0xa9, 0x1f, 0xe4, 0xe0, 0xc2, 0xb2, 0xd6, 0xd6, 0x74, 0x83, 0x1e, 0x60, 0xf2, 0x6e, 0x87, 0xb8,
+ 0x74, 0xdd, 0x36, 0x0d, 0xfd, 0x00, 0xdd, 0x62, 0x87, 0xb1, 0xad, 0x75, 0x4c, 0x9a, 0x70, 0x18,
+ 0x7d, 0xbb, 0x09, 0x4e, 0xe7, 0x8d, 0x8e, 0x66, 0x51, 0x83, 0x1e, 0x78, 0x8e, 0xb0, 0xe2, 0x41,
+ 0x60, 0x89, 0x85, 0x08, 0x94, 0xf7, 0x35, 0xd3, 0x68, 0x6e, 0x6a, 0x66, 0x87, 0xb8, 0x95, 0x3c,
+ 0xf7, 0x84, 0xe3, 0x42, 0x9f, 0x13, 0xbb, 0x2a, 0x6f, 0x06, 0x50, 0x38, 0x8c, 0x8b, 0xb6, 0x00,
+ 0xf8, 0x4f, 0xac, 0x59, 0x3b, 0xa4, 0x52, 0xe0, 0x1b, 0x58, 0x4c, 0xb3, 0xa6, 0x44, 0x05, 0x70,
+ 0xc9, 0xfa, 0x38, 0xd3, 0xdd, 0xa6, 0x8f, 0x84, 0x43, 0xa8, 0xea, 0x7b, 0x39, 0x98, 0x4e, 0x17,
+ 0x45, 0x6b, 0x90, 0x6f, 0x19, 0xd6, 0x09, 0x95, 0x37, 0xdc, 0xeb, 0x56, 0xf3, 0x37, 0x0c, 0x0b,
+ 0x33, 0x0c, 0x0e, 0xa5, 0xdd, 0xe5, 0xd1, 0xea, 0xa4, 0x50, 0xda, 0x5d, 0xcc, 0x30, 0xd0, 0x75,
+ 0x28, 0xb8, 0x94, 0xb4, 0x85, 0x03, 0x1c, 0x17, 0x8b, 0x07, 0x89, 0x06, 0x25, 0x6d, 0xcc, 0x51,
+ 0xd4, 0xff, 0x28, 0x70, 0x3e, 0xac, 0x02, 0xc3, 0x21, 0x2d, 0x62, 0x51, 0x17, 0x1d, 0x40, 0xc9,
+ 0xf1, 0x54, 0xc2, 0x7c, 0x99, 0x9d, 0xf1, 0x8b, 0x59, 0xb4, 0x2f, 0xe5, 0x6b, 0x42, 0x9f, 0xee,
+ 0xaa, 0x45, 0x9d, 0x83, 0xfa, 0xe3, 0xe2, 0xbc, 0x4b, 0x92, 0xfc, 0xcd, 0xbf, 0x54, 0xc7, 0xde,
+ 0xe8, 0x68, 0xa6, 0xb1, 0x6d, 0x90, 0xe6, 0x4d, 0xad, 0x45, 0xb0, 0x3f, 0xdd, 0xf4, 0x1e, 0x8c,
+ 0x45, 0xa4, 0xd1, 0x04, 0xe4, 0xf7, 0xc8, 0x81, 0xe7, 0x10, 0x98, 0xfd, 0x89, 0x56, 0xe0, 0xcc,
+ 0x3e, 0xb3, 0x93, 0x93, 0x69, 0x14, 0x7b, 0xc2, 0x2f, 0xe6, 0x5e, 0x50, 0xd4, 0xb7, 0x61, 0x78,
+ 0xd9, 0xee, 0x58, 0x94, 0x38, 0xa8, 0x21, 0x41, 0x4f, 0x76, 0xe2, 0x63, 0x62, 0x8f, 0x67, 0xb8,
+ 0x05, 0x8b, 0x39, 0xd4, 0x7f, 0x28, 0x00, 0x62, 0x82, 0x06, 0xa1, 0x2c, 0x6f, 0x59, 0x5a, 0x8b,
+ 0x08, 0xe7, 0xf6, 0xf3, 0x16, 0xd7, 0x00, 0x1f, 0x41, 0x6f, 0x43, 0x49, 0xf7, 0xf8, 0xdd, 0x4a,
+ 0x8e, 0x2b, 0xfe, 0x4a, 0xaa, 0xe2, 0x7d, 0x5c, 0xf9, 0xa7, 0x50, 0xf7, 0x84, 0x54, 0xb7, 0x24,
+ 0x63, 0x1f, 0x73, 0xfa, 0x2d, 0x18, 0x8b, 0x30, 0x27, 0x68, 0xf7, 0xb9, 0xa8, 0x76, 0xab, 0x03,
+ 0xe6, 0x0f, 0xab, 0xf3, 0xdf, 0x25, 0x10, 0x09, 0x36, 0xc3, 0x56, 0x5d, 0x00, 0x8d, 0x52, 0xc7,
+ 0xd8, 0xea, 0x50, 0x22, 0x37, 0x3b, 0x20, 0x63, 0xd4, 0x96, 0x7c, 0x01, 0x6f, 0xab, 0x17, 0x65,
+ 0x7c, 0x0c, 0x06, 0xfa, 0x6d, 0x2b, 0x34, 0x0d, 0xda, 0x83, 0x92, 0x2e, 0x0c, 0x56, 0x04, 0xaf,
+ 0x4b, 0x03, 0xa6, 0x94, 0xf6, 0x1d, 0x33, 0x65, 0x49, 0x4e, 0x30, 0x65, 0x39, 0x01, 0xda, 0x87,
+ 0x09, 0xdd, 0xb6, 0xdc, 0x4e, 0x8b, 0xb8, 0x52, 0xe9, 0xa2, 0x76, 0xb8, 0x72, 0xf4, 0xa4, 0x82,
+ 0x7b, 0x99, 0x0b, 0xb7, 0x79, 0xf1, 0x50, 0x11, 0x13, 0x4f, 0x2c, 0xc7, 0x10, 0x71, 0xdf, 0x1c,
+ 0x68, 0x0e, 0x4a, 0x2c, 0xcb, 0xb1, 0xd5, 0xf0, 0x54, 0x36, 0x52, 0x1f, 0x65, 0x4b, 0xbe, 0x29,
+ 0x68, 0xd8, 0x1f, 0xed, 0xcb, 0xab, 0xc5, 0xfb, 0x94, 0x57, 0xe7, 0xa0, 0xa4, 0x99, 0x26, 0x63,
+ 0x70, 0x79, 0x5d, 0x55, 0xf2, 0x56, 0xb0, 0x24, 0x68, 0xd8, 0x1f, 0x45, 0xd7, 0xa0, 0x48, 0x35,
+ 0xc3, 0xa2, 0x6e, 0xa5, 0xc4, 0x35, 0x73, 0xf1, 0x68, 0xcd, 0x6c, 0x30, 0xde, 0xa0, 0x9a, 0xe3,
+ 0x3f, 0x5d, 0x2c, 0x20, 0xd0, 0x02, 0x94, 0xb7, 0x0c, 0xab, 0xe9, 0x6e, 0xd8, 0x0c, 0xbc, 0x32,
+ 0xc2, 0x67, 0xe6, 0x95, 0x4c, 0x3d, 0x20, 0xe3, 0x30, 0x0f, 0x5a, 0x86, 0x49, 0xf6, 0xd3, 0xb0,
+ 0x76, 0x82, 0xaa, 0xac, 0x02, 0xb3, 0xf9, 0xb9, 0x91, 0xfa, 0x85, 0x5e, 0xb7, 0x3a, 0x59, 0x8f,
+ 0x0f, 0xe2, 0x7e, 0x7e, 0x74, 0x1b, 0x2a, 0x82, 0x78, 0x55, 0x33, 0xcc, 0x8e, 0x43, 0x42, 0x58,
+ 0x65, 0x8e, 0xf5, 0xff, 0xbd, 0x6e, 0xb5, 0x52, 0x4f, 0xe1, 0xc1, 0xa9, 0xd2, 0x0c, 0x99, 0x15,
+ 0x10, 0x77, 0x6e, 0x74, 0x4c, 0x6a, 0xb4, 0xcd, 0x50, 0xcd, 0xe4, 0x56, 0x46, 0xf9, 0xf6, 0x38,
+ 0xf2, 0x52, 0x0a, 0x0f, 0x4e, 0x95, 0x9e, 0xde, 0x86, 0xb3, 0x31, 0x6f, 0x4a, 0x88, 0x05, 0x5f,
+ 0x88, 0xc6, 0x82, 0xa7, 0x06, 0x14, 0x74, 0x12, 0x2f, 0x14, 0x13, 0xa6, 0x75, 0x18, 0x8b, 0xb8,
+ 0x50, 0xc2, 0x2c, 0x2f, 0x47, 0x67, 0x79, 0x72, 0x80, 0x73, 0xc8, 0x84, 0x13, 0x0a, 0x3c, 0xdf,
+ 0xce, 0xc1, 0x63, 0xf1, 0xa2, 0x72, 0xd9, 0xb6, 0xb6, 0x8d, 0x9d, 0x8e, 0xc3, 0x7f, 0xa0, 0x2f,
+ 0x41, 0xd1, 0x03, 0x12, 0x11, 0x69, 0x4e, 0x9a, 0x50, 0x83, 0x53, 0x0f, 0xbb, 0xd5, 0xa9, 0xb8,
+ 0xa8, 0x37, 0x82, 0x85, 0x1c, 0xb3, 0x69, 0x3f, 0x27, 0xe6, 0xf8, 0xa1, 0x8e, 0x86, 0x73, 0x5a,
+ 0x90, 0xc2, 0xd0, 0x37, 0xe0, 0x5c, 0x53, 0xf8, 0x71, 0x68, 0x09, 0x22, 0x67, 0x3f, 0x3b, 0xc8,
+ 0xf5, 0x43, 0x22, 0xf5, 0xff, 0x13, 0xab, 0x3c, 0x97, 0x30, 0x88, 0x93, 0x26, 0x51, 0xff, 0xa4,
+ 0xc0, 0x54, 0x72, 0x79, 0x8d, 0xde, 0x81, 0x61, 0x87, 0xff, 0x25, 0x73, 0xfa, 0x73, 0x47, 0x2f,
+ 0x45, 0xec, 0x2c, 0xbd, 0x4c, 0xf7, 0x7e, 0xbb, 0x58, 0xc2, 0xa2, 0xaf, 0x42, 0x51, 0xe7, 0xab,
+ 0x11, 0xe1, 0xfc, 0xb9, 0xac, 0x17, 0x80, 0xe8, 0xae, 0x7d, 0xf7, 0xf6, 0xc8, 0x58, 0x80, 0xaa,
+ 0x3f, 0x53, 0xe0, 0x6c, 0xcc, 0xd2, 0xd0, 0x0c, 0xe4, 0x0d, 0x8b, 0x72, 0xcb, 0xc9, 0x7b, 0x07,
+ 0xb2, 0x66, 0x51, 0x2f, 0x07, 0xb3, 0x01, 0xf4, 0x38, 0x14, 0xb6, 0xd8, 0x55, 0x31, 0xcf, 0x9d,
+ 0x65, 0xac, 0xd7, 0xad, 0x8e, 0xd4, 0x6d, 0xdb, 0xf4, 0x38, 0xf8, 0x10, 0x7a, 0x0a, 0x8a, 0x2e,
+ 0x75, 0x0c, 0x6b, 0x87, 0x17, 0x9a, 0x23, 0x5e, 0xc0, 0x68, 0x70, 0x8a, 0xc7, 0x26, 0x86, 0xd1,
+ 0x33, 0x30, 0xbc, 0x4f, 0x1c, 0x5e, 0x9e, 0x7b, 0x61, 0x95, 0x87, 0xc1, 0x4d, 0x8f, 0xe4, 0xb1,
+ 0x4a, 0x06, 0xf5, 0x63, 0x05, 0xc6, 0xa3, 0xf6, 0x7a, 0x2a, 0x15, 0x06, 0xda, 0x86, 0x31, 0x27,
+ 0x5c, 0xbc, 0x0a, 0x1f, 0xba, 0x7c, 0xac, 0x62, 0xb9, 0x3e, 0xd9, 0xeb, 0x56, 0xc7, 0xa2, 0x45,
+ 0x70, 0x14, 0x56, 0xfd, 0x71, 0x0e, 0xca, 0x62, 0x3f, 0xa6, 0x66, 0xb4, 0x50, 0xa3, 0xaf, 0x42,
+ 0x7c, 0x22, 0x93, 0x35, 0x05, 0xd5, 0x49, 0x82, 0xe3, 0x7c, 0x0d, 0xca, 0x2c, 0x99, 0x51, 0xc7,
+ 0xcb, 0x08, 0x9e, 0x11, 0xcd, 0x0d, 0x74, 0x18, 0x21, 0x10, 0xdc, 0x2b, 0x02, 0x9a, 0x8b, 0xc3,
+ 0x88, 0xe8, 0xb6, 0x6f, 0xa0, 0xf9, 0x4c, 0x79, 0x98, 0x6d, 0x35, 0x9b, 0x6d, 0x7e, 0xa8, 0x40,
+ 0x25, 0x4d, 0x28, 0x12, 0x3a, 0x94, 0x93, 0x84, 0x8e, 0xdc, 0x83, 0x08, 0x1d, 0xbf, 0x56, 0x42,
+ 0x47, 0xec, 0xba, 0xe8, 0x1d, 0x28, 0xb1, 0x3b, 0x2e, 0xef, 0x49, 0x78, 0x26, 0x7b, 0x25, 0xdb,
+ 0x8d, 0xf8, 0xf5, 0xad, 0xaf, 0x13, 0x9d, 0xde, 0x20, 0x54, 0x0b, 0x2e, 0xb0, 0x01, 0x0d, 0xfb,
+ 0xa8, 0x68, 0x0d, 0x0a, 0x6e, 0x9b, 0xe8, 0xd9, 0xb2, 0x0b, 0x5f, 0x54, 0xa3, 0x4d, 0xf4, 0xa0,
+ 0x9a, 0x64, 0xbf, 0x30, 0x87, 0x50, 0xbf, 0x1f, 0xd6, 0xbf, 0xeb, 0x46, 0xf5, 0x9f, 0xa2, 0x55,
+ 0xe5, 0x41, 0x68, 0xf5, 0x03, 0x3f, 0x68, 0xf1, 0x85, 0x5d, 0x37, 0x5c, 0x8a, 0xde, 0xea, 0xd3,
+ 0x6c, 0x2d, 0x9b, 0x66, 0x99, 0x34, 0xd7, 0xab, 0xef, 0x45, 0x92, 0x12, 0xd2, 0xea, 0xab, 0x70,
+ 0xc6, 0xa0, 0xa4, 0x25, 0xfd, 0xe7, 0x62, 0x06, 0xb5, 0x06, 0xc1, 0x65, 0x8d, 0x49, 0x62, 0x0f,
+ 0x40, 0xfd, 0x6e, 0x2e, 0xb2, 0x76, 0xa6, 0x6e, 0xf4, 0x65, 0x18, 0x71, 0x45, 0x99, 0x27, 0x3d,
+ 0x7f, 0x40, 0xc2, 0xf6, 0xab, 0xc6, 0x49, 0x31, 0xc9, 0x88, 0xa4, 0xb8, 0x38, 0xc0, 0x0a, 0xf9,
+ 0x66, 0x2e, 0xa3, 0x6f, 0xc6, 0x8e, 0x39, 0xcd, 0x37, 0xd1, 0x75, 0x38, 0x4f, 0xee, 0x52, 0x62,
+ 0x35, 0x49, 0x13, 0x0b, 0x1c, 0x5e, 0x1b, 0x7b, 0xe1, 0xbe, 0xd2, 0xeb, 0x56, 0xcf, 0xaf, 0x26,
+ 0x8c, 0xe3, 0x44, 0x29, 0xd5, 0x84, 0xa4, 0xc3, 0x47, 0xb7, 0xa0, 0x68, 0xb7, 0xb5, 0x77, 0xfd,
+ 0xf0, 0xbe, 0x90, 0xb6, 0xfc, 0xd7, 0x39, 0x57, 0x92, 0x71, 0x01, 0x5b, 0xbb, 0x37, 0x8c, 0x05,
+ 0x98, 0xfa, 0x77, 0x05, 0x26, 0xe2, 0x81, 0xee, 0x18, 0xf1, 0x64, 0x1d, 0xc6, 0x5b, 0x1a, 0xd5,
+ 0x77, 0xfd, 0x84, 0x29, 0x7a, 0xa6, 0x73, 0xbd, 0x6e, 0x75, 0xfc, 0x46, 0x64, 0xe4, 0xb0, 0x5b,
+ 0x45, 0x57, 0x3b, 0xa6, 0x79, 0x10, 0xbd, 0xce, 0xc4, 0xe4, 0xd1, 0x9b, 0x30, 0xd9, 0x34, 0x5c,
+ 0x6a, 0x58, 0x3a, 0x0d, 0x40, 0xbd, 0x26, 0xeb, 0xb3, 0xac, 0x60, 0x5e, 0x89, 0x0f, 0xa6, 0xe0,
+ 0xf6, 0xa3, 0xa8, 0x3f, 0xca, 0xf9, 0x3e, 0xdc, 0x77, 0x01, 0x42, 0x8b, 0x00, 0xba, 0x7f, 0xe3,
+ 0x8d, 0xb7, 0xc7, 0x82, 0xbb, 0x30, 0x0e, 0x71, 0x21, 0xb3, 0xef, 0x36, 0xfd, 0xc5, 0xe3, 0x5e,
+ 0xbc, 0x1e, 0x9a, 0xbb, 0xf5, 0x3f, 0x15, 0x18, 0x8b, 0x64, 0xd2, 0x0c, 0x57, 0xec, 0x37, 0x60,
+ 0x98, 0xdc, 0xd5, 0x74, 0x6a, 0xca, 0xb2, 0xe0, 0x99, 0xb4, 0x09, 0x57, 0x19, 0x5b, 0x34, 0x51,
+ 0xf3, 0x06, 0xe0, 0xaa, 0x27, 0x8e, 0x25, 0x0e, 0xda, 0x85, 0xf1, 0x6d, 0xc3, 0x71, 0xe9, 0xd2,
+ 0xbe, 0x66, 0x98, 0xda, 0x96, 0x49, 0x44, 0x26, 0x1d, 0x90, 0xa5, 0x1b, 0x9d, 0x2d, 0x89, 0x3b,
+ 0x25, 0x16, 0x3a, 0x7e, 0x35, 0x82, 0x83, 0x63, 0xb8, 0xea, 0x1f, 0x8b, 0xb2, 0xa6, 0x4f, 0x29,
+ 0x44, 0xd1, 0xd3, 0xac, 0xa0, 0xe5, 0x43, 0x42, 0x07, 0xa1, 0xca, 0x94, 0x93, 0xb1, 0x1c, 0x0f,
+ 0x7d, 0x59, 0xc8, 0x65, 0xfa, 0xb2, 0x90, 0xcf, 0xf0, 0x65, 0xa1, 0x70, 0xe4, 0x97, 0x85, 0x05,
+ 0x28, 0x6b, 0xcd, 0x96, 0x61, 0x2d, 0xe9, 0x3a, 0x71, 0x5d, 0x5e, 0x30, 0x8a, 0xbb, 0xe8, 0x52,
+ 0x40, 0xc6, 0x61, 0x1e, 0x56, 0xfe, 0x50, 0xdb, 0x24, 0x8e, 0xb8, 0xdf, 0x15, 0xb3, 0x28, 0x76,
+ 0xc3, 0x17, 0x08, 0xca, 0x9f, 0x80, 0xe6, 0xe2, 0x30, 0x62, 0xf2, 0x65, 0x77, 0xf8, 0x3e, 0x5e,
+ 0x76, 0x4b, 0x9f, 0xe9, 0xb2, 0xfb, 0x5a, 0xf0, 0x31, 0x66, 0x84, 0xeb, 0xf6, 0x4a, 0xe8, 0x63,
+ 0xcc, 0x61, 0xb7, 0xfa, 0x78, 0xda, 0x07, 0x27, 0x7a, 0xd0, 0x26, 0x6e, 0xed, 0x56, 0xf8, 0x8b,
+ 0xcd, 0xfb, 0x8a, 0xdf, 0x7c, 0x69, 0xca, 0x9a, 0x97, 0xdf, 0xeb, 0xcb, 0x8b, 0xd7, 0x4e, 0x74,
+ 0xed, 0xa9, 0x2d, 0xc7, 0xd0, 0xbc, 0x80, 0xf0, 0x74, 0xac, 0x2f, 0xd3, 0x4c, 0x6f, 0x0c, 0xf5,
+ 0xad, 0x67, 0xda, 0x85, 0x0b, 0x89, 0xa8, 0xa7, 0xda, 0xf3, 0xdc, 0x94, 0x17, 0x13, 0xbf, 0x5b,
+ 0xb3, 0x02, 0x79, 0x9d, 0x98, 0x22, 0x6f, 0xa5, 0x7e, 0x23, 0xea, 0xfb, 0x62, 0xe1, 0xb5, 0xa6,
+ 0x97, 0x57, 0xaf, 0x63, 0x26, 0xae, 0x7e, 0xab, 0x20, 0x33, 0x55, 0xe0, 0xec, 0x19, 0x62, 0xd4,
+ 0x12, 0x9c, 0x6d, 0x06, 0x09, 0x9d, 0xe7, 0x65, 0xcf, 0x45, 0x1f, 0x11, 0xcc, 0xe1, 0x0a, 0x84,
+ 0xcb, 0xc5, 0xf9, 0xa3, 0x25, 0x49, 0xfe, 0x3e, 0x96, 0x24, 0x9b, 0x30, 0x1e, 0x7c, 0xbe, 0xb9,
+ 0x61, 0x37, 0xa5, 0xcf, 0xd7, 0x64, 0x08, 0x5b, 0x8a, 0x8c, 0x1e, 0x76, 0xab, 0xe7, 0xe3, 0x37,
+ 0x5b, 0x46, 0xc7, 0x31, 0x14, 0x74, 0x11, 0xce, 0xf0, 0xac, 0xc1, 0xa3, 0x42, 0x3e, 0x28, 0xbe,
+ 0x78, 0xd8, 0xc7, 0xde, 0xd8, 0xe9, 0x47, 0x83, 0xcd, 0x50, 0x2f, 0x74, 0x98, 0x9f, 0xfd, 0xa5,
+ 0xe3, 0x34, 0xf9, 0xbd, 0x9a, 0xc3, 0x1f, 0xf1, 0xb1, 0xd4, 0x7f, 0xf9, 0xf7, 0x08, 0xde, 0x9e,
+ 0x43, 0x8f, 0x85, 0x8c, 0xb9, 0x5e, 0x16, 0xcb, 0xca, 0x5f, 0x23, 0x07, 0x9e, 0x65, 0x5f, 0x0c,
+ 0x5b, 0xf6, 0x48, 0xca, 0x35, 0xf7, 0x25, 0x28, 0x92, 0xed, 0x6d, 0xa2, 0x53, 0x11, 0x99, 0x65,
+ 0xe3, 0xb7, 0xb8, 0xca, 0xa9, 0x87, 0xac, 0xf0, 0x08, 0xa6, 0xf4, 0x88, 0x58, 0x88, 0x30, 0xfb,
+ 0xa0, 0x46, 0x8b, 0x2c, 0x35, 0x9b, 0xa4, 0x29, 0x3e, 0x26, 0x1d, 0xe7, 0xdb, 0x1e, 0x6f, 0x1a,
+ 0x6c, 0x48, 0x00, 0x1c, 0x60, 0xbd, 0x58, 0xfa, 0xc1, 0x4f, 0xaa, 0x43, 0xef, 0xfd, 0x79, 0x76,
+ 0x48, 0x7d, 0x3f, 0x27, 0x8d, 0x3f, 0x50, 0xf7, 0xa0, 0x8d, 0xbf, 0x0a, 0x25, 0xbb, 0xcd, 0x78,
+ 0x6d, 0x99, 0x95, 0x2e, 0xc9, 0xea, 0xe2, 0x75, 0x41, 0x3f, 0xec, 0x56, 0x2b, 0x71, 0x58, 0x39,
+ 0x86, 0x7d, 0xe9, 0x40, 0x85, 0xf9, 0x4c, 0x2a, 0x2c, 0x1c, 0x5f, 0x85, 0xcb, 0x30, 0x19, 0x98,
+ 0x4e, 0x83, 0xe8, 0xb6, 0xd5, 0x74, 0x85, 0xf5, 0xf2, 0xcc, 0xb1, 0x11, 0x1f, 0xc4, 0xfd, 0xfc,
+ 0xea, 0x0f, 0x0b, 0x80, 0xfa, 0x0b, 0x8d, 0xa4, 0x08, 0xa0, 0x7c, 0x96, 0x08, 0x90, 0x3b, 0xd5,
+ 0x08, 0x90, 0xbf, 0xbf, 0x11, 0xa0, 0x70, 0x44, 0x04, 0x78, 0x18, 0x4b, 0x88, 0xd3, 0x0a, 0x1a,
+ 0x3f, 0x57, 0x60, 0xb2, 0xef, 0x15, 0x02, 0x7a, 0x09, 0xc6, 0x0c, 0x56, 0x08, 0x6f, 0x6b, 0xe2,
+ 0xca, 0xe6, 0x19, 0xc6, 0x05, 0xb1, 0xcc, 0xb1, 0xb5, 0xf0, 0x20, 0x8e, 0xf2, 0xa2, 0x47, 0x21,
+ 0x6f, 0xb4, 0x65, 0xaf, 0x96, 0xe7, 0xaa, 0xb5, 0x75, 0x17, 0x33, 0x1a, 0x33, 0xb9, 0x5d, 0xcd,
+ 0x69, 0xde, 0xd1, 0x1c, 0xe6, 0xc9, 0x0e, 0xd3, 0x6e, 0x3e, 0x6a, 0x72, 0xaf, 0x46, 0x87, 0x71,
+ 0x9c, 0x5f, 0xfd, 0xa9, 0x02, 0x8f, 0xa6, 0x5e, 0xe5, 0x32, 0xbf, 0x64, 0xd1, 0x00, 0xda, 0x9a,
+ 0xa3, 0xb5, 0x88, 0xb8, 0xa3, 0x9c, 0xe0, 0xe5, 0x87, 0x7f, 0x09, 0x5a, 0xf7, 0x81, 0x70, 0x08,
+ 0x54, 0xfd, 0x5e, 0x0e, 0xc6, 0xe4, 0x05, 0xd6, 0xeb, 0xdd, 0x9d, 0x7e, 0x63, 0xe7, 0x5a, 0xa4,
+ 0xb1, 0x93, 0x5a, 0x52, 0x44, 0x96, 0x95, 0xd6, 0xda, 0x41, 0x0d, 0x28, 0xba, 0xfc, 0x7d, 0xd0,
+ 0xa0, 0x0e, 0x7a, 0x14, 0x8e, 0x8b, 0x04, 0x8a, 0xf7, 0x7e, 0x63, 0x01, 0xa5, 0xf6, 0x14, 0x98,
+ 0x89, 0xf0, 0x8b, 0x42, 0xcc, 0xc1, 0x64, 0x9b, 0x38, 0xc4, 0xd2, 0x09, 0xba, 0x04, 0x25, 0xad,
+ 0x6d, 0xbc, 0xe2, 0xd8, 0x9d, 0xb6, 0x38, 0x45, 0xff, 0xf6, 0xb7, 0xb4, 0xbe, 0xc6, 0xe9, 0xd8,
+ 0xe7, 0x60, 0xdc, 0x72, 0x2d, 0xc2, 0x96, 0x42, 0x9d, 0x4e, 0x8f, 0x8e, 0x7d, 0x0e, 0xbf, 0x2e,
+ 0x2a, 0xa4, 0xd6, 0x45, 0x75, 0xc8, 0x77, 0x8c, 0xa6, 0x68, 0x34, 0x5f, 0x91, 0xc9, 0xe3, 0x56,
+ 0xd6, 0x42, 0x98, 0x09, 0xab, 0xbf, 0x55, 0x60, 0x32, 0xb2, 0xc9, 0x07, 0xd0, 0x7d, 0x7a, 0x2d,
+ 0xda, 0x7d, 0x7a, 0x22, 0xd3, 0x61, 0xa5, 0xf4, 0x9f, 0xf4, 0xd8, 0xf2, 0x79, 0x03, 0xea, 0x66,
+ 0xfc, 0x99, 0xd1, 0xc5, 0x0c, 0x4d, 0xdc, 0xf4, 0xb7, 0x45, 0xea, 0xaf, 0x72, 0x70, 0x2e, 0xc1,
+ 0x72, 0xd0, 0x6d, 0x80, 0x20, 0x68, 0x8b, 0xa9, 0x52, 0x23, 0x69, 0xdf, 0x47, 0x12, 0xfe, 0xf2,
+ 0x24, 0x44, 0x0d, 0x61, 0xa1, 0x16, 0x94, 0x1d, 0xe2, 0x12, 0x67, 0x9f, 0x34, 0xaf, 0xf2, 0xdc,
+ 0xcf, 0x14, 0xf5, 0x7c, 0x26, 0x45, 0xf5, 0x59, 0x69, 0x10, 0xb2, 0x71, 0x00, 0x89, 0xc3, 0xf8,
+ 0xe8, 0x76, 0xa0, 0x30, 0xef, 0xeb, 0xf3, 0xe5, 0x01, 0xbb, 0x88, 0xbe, 0xca, 0x3b, 0x42, 0x75,
+ 0x7f, 0x50, 0xe0, 0x42, 0x64, 0x79, 0x1b, 0xa4, 0xd5, 0x36, 0x35, 0x4a, 0x1e, 0x40, 0x88, 0x69,
+ 0x44, 0x42, 0xcc, 0x42, 0x26, 0xed, 0xc9, 0xe5, 0xa5, 0x76, 0x91, 0x3f, 0x56, 0xe0, 0xd1, 0x44,
+ 0x89, 0x07, 0xe0, 0x38, 0x38, 0xea, 0x38, 0x97, 0x8f, 0xb5, 0xa3, 0x14, 0x07, 0xfa, 0x7d, 0xda,
+ 0x7e, 0xb8, 0x27, 0xfd, 0x6f, 0xe5, 0x01, 0xf5, 0x17, 0x0a, 0x8c, 0x4a, 0xce, 0x75, 0xdb, 0x36,
+ 0x33, 0x5c, 0x2e, 0x17, 0x01, 0xc4, 0xeb, 0x53, 0xf9, 0x15, 0x25, 0x1f, 0xac, 0xf8, 0x15, 0x7f,
+ 0x04, 0x87, 0xb8, 0xd0, 0x6b, 0x80, 0xe4, 0xda, 0x1a, 0xa6, 0xec, 0x09, 0xf2, 0x90, 0x9e, 0xaf,
+ 0x4f, 0x0b, 0x59, 0x84, 0xfb, 0x38, 0x70, 0x82, 0x94, 0xfa, 0x3b, 0x25, 0xc8, 0xbd, 0x9c, 0xfc,
+ 0xf0, 0xe9, 0x9c, 0x2f, 0x2b, 0x55, 0xe7, 0xe1, 0x0c, 0xc2, 0x39, 0x1f, 0xc2, 0x0c, 0xc2, 0xd7,
+ 0x95, 0xe2, 0x00, 0xbf, 0x2c, 0xc4, 0xd6, 0xcf, 0x0d, 0x3f, 0x6b, 0x75, 0x76, 0x35, 0xf4, 0xce,
+ 0xb8, 0xbc, 0xf8, 0xb9, 0x41, 0x0b, 0x61, 0x46, 0x99, 0xd8, 0x33, 0x0c, 0x3f, 0xc8, 0xc9, 0x1f,
+ 0xeb, 0x41, 0x4e, 0xe1, 0x14, 0x1e, 0xe4, 0x9c, 0x39, 0xf2, 0x41, 0xce, 0x5a, 0x90, 0x2d, 0xbc,
+ 0xdb, 0xc3, 0xcc, 0xd1, 0xe9, 0xf5, 0x88, 0x57, 0xbb, 0x18, 0xa6, 0xda, 0xc4, 0xf1, 0xc8, 0xc1,
+ 0xda, 0x98, 0x27, 0x7a, 0x6f, 0x82, 0xa6, 0x7b, 0xdd, 0xea, 0xd4, 0x7a, 0x22, 0x07, 0x4e, 0x91,
+ 0x44, 0x5b, 0x30, 0xce, 0x5b, 0x7c, 0x4d, 0xff, 0x45, 0x95, 0xf7, 0x6e, 0x48, 0x1d, 0xfc, 0x4c,
+ 0x2e, 0xe8, 0x3c, 0x37, 0x22, 0x08, 0x38, 0x86, 0x58, 0x7f, 0xf9, 0xa3, 0x7b, 0x33, 0x43, 0x9f,
+ 0xdc, 0x9b, 0x19, 0xfa, 0xf4, 0xde, 0xcc, 0xd0, 0x7b, 0xbd, 0x19, 0xe5, 0xa3, 0xde, 0x8c, 0xf2,
+ 0x49, 0x6f, 0x46, 0xf9, 0xb4, 0x37, 0xa3, 0xfc, 0xb5, 0x37, 0xa3, 0x7c, 0xe7, 0x6f, 0x33, 0x43,
+ 0x5f, 0x99, 0x4a, 0xfe, 0x77, 0x81, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x0d, 0x0c, 0xec, 0x16,
+ 0x47, 0x30, 0x00, 0x00,
+}
+
+func (m *AllocatedDeviceStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AllocatedDeviceStatus) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *AllocatedDeviceStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.ShareID != nil {
+ i -= len(*m.ShareID)
+ copy(dAtA[i:], *m.ShareID)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ShareID)))
+ i--
+ dAtA[i] = 0x3a
+ }
+ if m.NetworkData != nil {
+ {
+ size, err := m.NetworkData.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x32
+ }
+ if m.Data != nil {
+ {
+ size, err := m.Data.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x2a
+ }
+ if len(m.Conditions) > 0 {
+ for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x22
+ }
+ }
+ i -= len(m.Device)
+ copy(dAtA[i:], m.Device)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Device)))
+ i--
+ dAtA[i] = 0x1a
+ i -= len(m.Pool)
+ copy(dAtA[i:], m.Pool)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Pool)))
+ i--
+ dAtA[i] = 0x12
+ i -= len(m.Driver)
+ copy(dAtA[i:], m.Driver)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *AllocationResult) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AllocationResult) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *AllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.AllocationTimestamp != nil {
+ {
+ size, err := m.AllocationTimestamp.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x2a
+ }
+ if m.NodeSelector != nil {
+ {
+ size, err := m.NodeSelector.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1a
+ }
+ {
+ size, err := m.Devices.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *CELDeviceSelector) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CELDeviceSelector) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *CELDeviceSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ i -= len(m.Expression)
+ copy(dAtA[i:], m.Expression)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Expression)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *CapacityRequestPolicy) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CapacityRequestPolicy) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *CapacityRequestPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.ValidRange != nil {
+ {
+ size, err := m.ValidRange.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.ValidValues) > 0 {
+ for iNdEx := len(m.ValidValues) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.ValidValues[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
+ if m.Default != nil {
+ {
+ size, err := m.Default.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CapacityRequestPolicyRange) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CapacityRequestPolicyRange) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *CapacityRequestPolicyRange) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.Step != nil {
+ {
+ size, err := m.Step.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.Max != nil {
+ {
+ size, err := m.Max.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Min != nil {
+ {
+ size, err := m.Min.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CapacityRequirements) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CapacityRequirements) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *CapacityRequirements) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Requests) > 0 {
+ keysForRequests := make([]string, 0, len(m.Requests))
+ for k := range m.Requests {
+ keysForRequests = append(keysForRequests, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForRequests)
+ for iNdEx := len(keysForRequests) - 1; iNdEx >= 0; iNdEx-- {
+ v := m.Requests[QualifiedName(keysForRequests[iNdEx])]
+ baseI := i
+ {
+ size, err := (&v).MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ i -= len(keysForRequests[iNdEx])
+ copy(dAtA[i:], keysForRequests[iNdEx])
+ i = encodeVarintGenerated(dAtA, i, uint64(len(keysForRequests[iNdEx])))
+ i--
+ dAtA[i] = 0xa
+ i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *Counter) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Counter) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *Counter) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ {
+ size, err := m.Value.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *CounterSet) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CounterSet) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *CounterSet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Counters) > 0 {
+ keysForCounters := make([]string, 0, len(m.Counters))
+ for k := range m.Counters {
+ keysForCounters = append(keysForCounters, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCounters)
+ for iNdEx := len(keysForCounters) - 1; iNdEx >= 0; iNdEx-- {
+ v := m.Counters[string(keysForCounters[iNdEx])]
+ baseI := i
+ {
+ size, err := (&v).MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ i -= len(keysForCounters[iNdEx])
+ copy(dAtA[i:], keysForCounters[iNdEx])
+ i = encodeVarintGenerated(dAtA, i, uint64(len(keysForCounters[iNdEx])))
+ i--
+ dAtA[i] = 0xa
+ i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *Device) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Device) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *Device) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.AllowMultipleAllocations != nil {
+ i--
+ if *m.AllowMultipleAllocations {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x60
+ }
+ if len(m.BindingFailureConditions) > 0 {
+ for iNdEx := len(m.BindingFailureConditions) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.BindingFailureConditions[iNdEx])
+ copy(dAtA[i:], m.BindingFailureConditions[iNdEx])
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.BindingFailureConditions[iNdEx])))
+ i--
+ dAtA[i] = 0x5a
+ }
+ }
+ if len(m.BindingConditions) > 0 {
+ for iNdEx := len(m.BindingConditions) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.BindingConditions[iNdEx])
+ copy(dAtA[i:], m.BindingConditions[iNdEx])
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.BindingConditions[iNdEx])))
+ i--
+ dAtA[i] = 0x52
+ }
+ }
+ if m.BindsToNode != nil {
+ i--
+ if *m.BindsToNode {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x48
+ }
+ if len(m.Taints) > 0 {
+ for iNdEx := len(m.Taints) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Taints[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x42
+ }
+ }
+ if m.AllNodes != nil {
+ i--
+ if *m.AllNodes {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x38
+ }
+ if m.NodeSelector != nil {
+ {
+ size, err := m.NodeSelector.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x32
+ }
+ if m.NodeName != nil {
+ i -= len(*m.NodeName)
+ copy(dAtA[i:], *m.NodeName)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.NodeName)))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if len(m.ConsumesCounters) > 0 {
+ for iNdEx := len(m.ConsumesCounters) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.ConsumesCounters[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x22
+ }
+ }
+ if len(m.Capacity) > 0 {
+ keysForCapacity := make([]string, 0, len(m.Capacity))
+ for k := range m.Capacity {
+ keysForCapacity = append(keysForCapacity, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity)
+ for iNdEx := len(keysForCapacity) - 1; iNdEx >= 0; iNdEx-- {
+ v := m.Capacity[QualifiedName(keysForCapacity[iNdEx])]
+ baseI := i
+ {
+ size, err := (&v).MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ i -= len(keysForCapacity[iNdEx])
+ copy(dAtA[i:], keysForCapacity[iNdEx])
+ i = encodeVarintGenerated(dAtA, i, uint64(len(keysForCapacity[iNdEx])))
+ i--
+ dAtA[i] = 0xa
+ i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
+ if len(m.Attributes) > 0 {
+ keysForAttributes := make([]string, 0, len(m.Attributes))
+ for k := range m.Attributes {
+ keysForAttributes = append(keysForAttributes, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForAttributes)
+ for iNdEx := len(keysForAttributes) - 1; iNdEx >= 0; iNdEx-- {
+ v := m.Attributes[QualifiedName(keysForAttributes[iNdEx])]
+ baseI := i
+ {
+ size, err := (&v).MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ i -= len(keysForAttributes[iNdEx])
+ copy(dAtA[i:], keysForAttributes[iNdEx])
+ i = encodeVarintGenerated(dAtA, i, uint64(len(keysForAttributes[iNdEx])))
+ i--
+ dAtA[i] = 0xa
+ i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *DeviceAllocationConfiguration) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeviceAllocationConfiguration) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *DeviceAllocationConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ {
+ size, err := m.DeviceConfiguration.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1a
+ if len(m.Requests) > 0 {
+ for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.Requests[iNdEx])
+ copy(dAtA[i:], m.Requests[iNdEx])
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Requests[iNdEx])))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ i -= len(m.Source)
+ copy(dAtA[i:], m.Source)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Source)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *DeviceAllocationResult) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeviceAllocationResult) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *DeviceAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Config) > 0 {
+ for iNdEx := len(m.Config) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Config[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if len(m.Results) > 0 {
+ for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Results[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DeviceAttribute) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeviceAttribute) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *DeviceAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.VersionValue != nil {
+ i -= len(*m.VersionValue)
+ copy(dAtA[i:], *m.VersionValue)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.VersionValue)))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if m.StringValue != nil {
+ i -= len(*m.StringValue)
+ copy(dAtA[i:], *m.StringValue)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.StringValue)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.BoolValue != nil {
+ i--
+ if *m.BoolValue {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x18
+ }
+ if m.IntValue != nil {
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.IntValue))
+ i--
+ dAtA[i] = 0x10
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DeviceCapacity) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeviceCapacity) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *DeviceCapacity) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.RequestPolicy != nil {
+ {
+ size, err := m.RequestPolicy.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ {
+ size, err := m.Value.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *DeviceClaim) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeviceClaim) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *DeviceClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Config) > 0 {
+ for iNdEx := len(m.Config) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Config[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
+ if len(m.Constraints) > 0 {
+ for iNdEx := len(m.Constraints) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Constraints[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if len(m.Requests) > 0 {
+ for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Requests[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DeviceClaimConfiguration) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeviceClaimConfiguration) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *DeviceClaimConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ {
+ size, err := m.DeviceConfiguration.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ if len(m.Requests) > 0 {
+ for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.Requests[iNdEx])
+ copy(dAtA[i:], m.Requests[iNdEx])
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Requests[iNdEx])))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DeviceClass) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeviceClass) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *DeviceClass) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ {
+ size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ {
+ size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *DeviceClassConfiguration) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeviceClassConfiguration) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *DeviceClassConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ {
+ size, err := m.DeviceConfiguration.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *DeviceClassList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeviceClassList) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *DeviceClassList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ {
+ size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *DeviceClassSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeviceClassSpec) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *DeviceClassSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.ExtendedResourceName != nil {
+ i -= len(*m.ExtendedResourceName)
+ copy(dAtA[i:], *m.ExtendedResourceName)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ExtendedResourceName)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.Config) > 0 {
+ for iNdEx := len(m.Config) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Config[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if len(m.Selectors) > 0 {
+ for iNdEx := len(m.Selectors) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Selectors[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DeviceConfiguration) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeviceConfiguration) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *DeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.Opaque != nil {
+ {
+ size, err := m.Opaque.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DeviceConstraint) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeviceConstraint) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *DeviceConstraint) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.DistinctAttribute != nil {
+ i -= len(*m.DistinctAttribute)
+ copy(dAtA[i:], *m.DistinctAttribute)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.DistinctAttribute)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.MatchAttribute != nil {
+ i -= len(*m.MatchAttribute)
+ copy(dAtA[i:], *m.MatchAttribute)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.MatchAttribute)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Requests) > 0 {
+ for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.Requests[iNdEx])
+ copy(dAtA[i:], m.Requests[iNdEx])
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Requests[iNdEx])))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DeviceCounterConsumption) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeviceCounterConsumption) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *DeviceCounterConsumption) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Counters) > 0 {
+ keysForCounters := make([]string, 0, len(m.Counters))
+ for k := range m.Counters {
+ keysForCounters = append(keysForCounters, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCounters)
+ for iNdEx := len(keysForCounters) - 1; iNdEx >= 0; iNdEx-- {
+ v := m.Counters[string(keysForCounters[iNdEx])]
+ baseI := i
+ {
+ size, err := (&v).MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ i -= len(keysForCounters[iNdEx])
+ copy(dAtA[i:], keysForCounters[iNdEx])
+ i = encodeVarintGenerated(dAtA, i, uint64(len(keysForCounters[iNdEx])))
+ i--
+ dAtA[i] = 0xa
+ i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ i -= len(m.CounterSet)
+ copy(dAtA[i:], m.CounterSet)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.CounterSet)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *DeviceRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeviceRequest) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *DeviceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.FirstAvailable) > 0 {
+ for iNdEx := len(m.FirstAvailable) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.FirstAvailable[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
+ if m.Exactly != nil {
+ {
+ size, err := m.Exactly.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *DeviceRequestAllocationResult) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeviceRequestAllocationResult) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *DeviceRequestAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.ConsumedCapacity) > 0 {
+ keysForConsumedCapacity := make([]string, 0, len(m.ConsumedCapacity))
+ for k := range m.ConsumedCapacity {
+ keysForConsumedCapacity = append(keysForConsumedCapacity, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForConsumedCapacity)
+ for iNdEx := len(keysForConsumedCapacity) - 1; iNdEx >= 0; iNdEx-- {
+ v := m.ConsumedCapacity[QualifiedName(keysForConsumedCapacity[iNdEx])]
+ baseI := i
+ {
+ size, err := (&v).MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ i -= len(keysForConsumedCapacity[iNdEx])
+ copy(dAtA[i:], keysForConsumedCapacity[iNdEx])
+ i = encodeVarintGenerated(dAtA, i, uint64(len(keysForConsumedCapacity[iNdEx])))
+ i--
+ dAtA[i] = 0xa
+ i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
+ i--
+ dAtA[i] = 0x52
+ }
+ }
+ if m.ShareID != nil {
+ i -= len(*m.ShareID)
+ copy(dAtA[i:], *m.ShareID)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ShareID)))
+ i--
+ dAtA[i] = 0x4a
+ }
+ if len(m.BindingFailureConditions) > 0 {
+ for iNdEx := len(m.BindingFailureConditions) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.BindingFailureConditions[iNdEx])
+ copy(dAtA[i:], m.BindingFailureConditions[iNdEx])
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.BindingFailureConditions[iNdEx])))
+ i--
+ dAtA[i] = 0x42
+ }
+ }
+ if len(m.BindingConditions) > 0 {
+ for iNdEx := len(m.BindingConditions) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.BindingConditions[iNdEx])
+ copy(dAtA[i:], m.BindingConditions[iNdEx])
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.BindingConditions[iNdEx])))
+ i--
+ dAtA[i] = 0x3a
+ }
+ }
+ if len(m.Tolerations) > 0 {
+ for iNdEx := len(m.Tolerations) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Tolerations[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x32
+ }
+ }
+ if m.AdminAccess != nil {
+ i--
+ if *m.AdminAccess {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x28
+ }
+ i -= len(m.Device)
+ copy(dAtA[i:], m.Device)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Device)))
+ i--
+ dAtA[i] = 0x22
+ i -= len(m.Pool)
+ copy(dAtA[i:], m.Pool)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Pool)))
+ i--
+ dAtA[i] = 0x1a
+ i -= len(m.Driver)
+ copy(dAtA[i:], m.Driver)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver)))
+ i--
+ dAtA[i] = 0x12
+ i -= len(m.Request)
+ copy(dAtA[i:], m.Request)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Request)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *DeviceSelector) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeviceSelector) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *DeviceSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.CEL != nil {
+ {
+ size, err := m.CEL.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DeviceSubRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeviceSubRequest) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *DeviceSubRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.Capacity != nil {
+ {
+ size, err := m.Capacity.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x3a
+ }
+ if len(m.Tolerations) > 0 {
+ for iNdEx := len(m.Tolerations) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Tolerations[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x32
+ }
+ }
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Count))
+ i--
+ dAtA[i] = 0x28
+ i -= len(m.AllocationMode)
+ copy(dAtA[i:], m.AllocationMode)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.AllocationMode)))
+ i--
+ dAtA[i] = 0x22
+ if len(m.Selectors) > 0 {
+ for iNdEx := len(m.Selectors) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Selectors[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
+ i -= len(m.DeviceClassName)
+ copy(dAtA[i:], m.DeviceClassName)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.DeviceClassName)))
+ i--
+ dAtA[i] = 0x12
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *DeviceTaint) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeviceTaint) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *DeviceTaint) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.TimeAdded != nil {
+ {
+ size, err := m.TimeAdded.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x22
+ }
+ i -= len(m.Effect)
+ copy(dAtA[i:], m.Effect)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Effect)))
+ i--
+ dAtA[i] = 0x1a
+ i -= len(m.Value)
+ copy(dAtA[i:], m.Value)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value)))
+ i--
+ dAtA[i] = 0x12
+ i -= len(m.Key)
+ copy(dAtA[i:], m.Key)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *DeviceToleration) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeviceToleration) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *DeviceToleration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.TolerationSeconds != nil {
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.TolerationSeconds))
+ i--
+ dAtA[i] = 0x28
+ }
+ i -= len(m.Effect)
+ copy(dAtA[i:], m.Effect)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Effect)))
+ i--
+ dAtA[i] = 0x22
+ i -= len(m.Value)
+ copy(dAtA[i:], m.Value)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value)))
+ i--
+ dAtA[i] = 0x1a
+ i -= len(m.Operator)
+ copy(dAtA[i:], m.Operator)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Operator)))
+ i--
+ dAtA[i] = 0x12
+ i -= len(m.Key)
+ copy(dAtA[i:], m.Key)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *ExactDeviceRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExactDeviceRequest) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ExactDeviceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.Capacity != nil {
+ {
+ size, err := m.Capacity.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x3a
+ }
+ if len(m.Tolerations) > 0 {
+ for iNdEx := len(m.Tolerations) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Tolerations[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x32
+ }
+ }
+ if m.AdminAccess != nil {
+ i--
+ if *m.AdminAccess {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x28
+ }
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Count))
+ i--
+ dAtA[i] = 0x20
+ i -= len(m.AllocationMode)
+ copy(dAtA[i:], m.AllocationMode)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.AllocationMode)))
+ i--
+ dAtA[i] = 0x1a
+ if len(m.Selectors) > 0 {
+ for iNdEx := len(m.Selectors) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Selectors[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ i -= len(m.DeviceClassName)
+ copy(dAtA[i:], m.DeviceClassName)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.DeviceClassName)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *NetworkDeviceData) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkDeviceData) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *NetworkDeviceData) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ i -= len(m.HardwareAddress)
+ copy(dAtA[i:], m.HardwareAddress)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.HardwareAddress)))
+ i--
+ dAtA[i] = 0x1a
+ if len(m.IPs) > 0 {
+ for iNdEx := len(m.IPs) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.IPs[iNdEx])
+ copy(dAtA[i:], m.IPs[iNdEx])
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.IPs[iNdEx])))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ i -= len(m.InterfaceName)
+ copy(dAtA[i:], m.InterfaceName)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.InterfaceName)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *OpaqueDeviceConfiguration) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *OpaqueDeviceConfiguration) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *OpaqueDeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ {
+ size, err := m.Parameters.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ i -= len(m.Driver)
+ copy(dAtA[i:], m.Driver)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *ResourceClaim) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceClaim) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ResourceClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ {
+ size, err := m.Status.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1a
+ {
+ size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ {
+ size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *ResourceClaimConsumerReference) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceClaimConsumerReference) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ResourceClaimConsumerReference) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ i -= len(m.UID)
+ copy(dAtA[i:], m.UID)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID)))
+ i--
+ dAtA[i] = 0x2a
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0x22
+ i -= len(m.Resource)
+ copy(dAtA[i:], m.Resource)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource)))
+ i--
+ dAtA[i] = 0x1a
+ i -= len(m.APIGroup)
+ copy(dAtA[i:], m.APIGroup)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *ResourceClaimList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceClaimList) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ResourceClaimList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ {
+ size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *ResourceClaimSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceClaimSpec) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ResourceClaimSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ {
+ size, err := m.Devices.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *ResourceClaimStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceClaimStatus) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ResourceClaimStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Devices) > 0 {
+ for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Devices[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x22
+ }
+ }
+ if len(m.ReservedFor) > 0 {
+ for iNdEx := len(m.ReservedFor) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.ReservedFor[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if m.Allocation != nil {
+ {
+ size, err := m.Allocation.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ResourceClaimTemplate) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceClaimTemplate) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ResourceClaimTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ {
+ size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ {
+ size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *ResourceClaimTemplateList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceClaimTemplateList) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ResourceClaimTemplateList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ {
+ size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *ResourceClaimTemplateSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceClaimTemplateSpec) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ResourceClaimTemplateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ {
+ size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ {
+ size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *ResourcePool) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourcePool) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ResourcePool) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceSliceCount))
+ i--
+ dAtA[i] = 0x18
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Generation))
+ i--
+ dAtA[i] = 0x10
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *ResourceSlice) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceSlice) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ResourceSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ {
+ size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ {
+ size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *ResourceSliceList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceSliceList) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ResourceSliceList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ {
+ size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *ResourceSliceSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceSliceSpec) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ResourceSliceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.SharedCounters) > 0 {
+ for iNdEx := len(m.SharedCounters) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.SharedCounters[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x42
+ }
+ }
+ if m.PerDeviceNodeSelection != nil {
+ i--
+ if *m.PerDeviceNodeSelection {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x38
+ }
+ if len(m.Devices) > 0 {
+ for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Devices[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x32
+ }
+ }
+ if m.AllNodes != nil {
+ i--
+ if *m.AllNodes {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x28
+ }
+ if m.NodeSelector != nil {
+ {
+ size, err := m.NodeSelector.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.NodeName != nil {
+ i -= len(*m.NodeName)
+ copy(dAtA[i:], *m.NodeName)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.NodeName)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ {
+ size, err := m.Pool.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ i -= len(m.Driver)
+ copy(dAtA[i:], m.Driver)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ offset -= sovGenerated(v)
+ base := offset
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return base
+}
+func (m *AllocatedDeviceStatus) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Driver)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Pool)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Device)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.Data != nil {
+ l = m.Data.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.NetworkData != nil {
+ l = m.NetworkData.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ShareID != nil {
+ l = len(*m.ShareID)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *AllocationResult) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.Devices.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.NodeSelector != nil {
+ l = m.NodeSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.AllocationTimestamp != nil {
+ l = m.AllocationTimestamp.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *CELDeviceSelector) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Expression)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *CapacityRequestPolicy) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Default != nil {
+ l = m.Default.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if len(m.ValidValues) > 0 {
+ for _, e := range m.ValidValues {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.ValidRange != nil {
+ l = m.ValidRange.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *CapacityRequestPolicyRange) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Min != nil {
+ l = m.Min.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Max != nil {
+ l = m.Max.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Step != nil {
+ l = m.Step.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *CapacityRequirements) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Requests) > 0 {
+ for k, v := range m.Requests {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *Counter) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.Value.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *CounterSet) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Counters) > 0 {
+ for k, v := range m.Counters {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *Device) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Attributes) > 0 {
+ for k, v := range m.Attributes {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Capacity) > 0 {
+ for k, v := range m.Capacity {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.ConsumesCounters) > 0 {
+ for _, e := range m.ConsumesCounters {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.NodeName != nil {
+ l = len(*m.NodeName)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.NodeSelector != nil {
+ l = m.NodeSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.AllNodes != nil {
+ n += 2
+ }
+ if len(m.Taints) > 0 {
+ for _, e := range m.Taints {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.BindsToNode != nil {
+ n += 2
+ }
+ if len(m.BindingConditions) > 0 {
+ for _, s := range m.BindingConditions {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.BindingFailureConditions) > 0 {
+ for _, s := range m.BindingFailureConditions {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.AllowMultipleAllocations != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *DeviceAllocationConfiguration) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Source)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Requests) > 0 {
+ for _, s := range m.Requests {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = m.DeviceConfiguration.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *DeviceAllocationResult) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Results) > 0 {
+ for _, e := range m.Results {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Config) > 0 {
+ for _, e := range m.Config {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *DeviceAttribute) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.IntValue != nil {
+ n += 1 + sovGenerated(uint64(*m.IntValue))
+ }
+ if m.BoolValue != nil {
+ n += 2
+ }
+ if m.StringValue != nil {
+ l = len(*m.StringValue)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.VersionValue != nil {
+ l = len(*m.VersionValue)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *DeviceCapacity) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.Value.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.RequestPolicy != nil {
+ l = m.RequestPolicy.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *DeviceClaim) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Requests) > 0 {
+ for _, e := range m.Requests {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Constraints) > 0 {
+ for _, e := range m.Constraints {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Config) > 0 {
+ for _, e := range m.Config {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *DeviceClaimConfiguration) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Requests) > 0 {
+ for _, s := range m.Requests {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = m.DeviceConfiguration.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *DeviceClass) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *DeviceClassConfiguration) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.DeviceConfiguration.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *DeviceClassList) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *DeviceClassSpec) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Selectors) > 0 {
+ for _, e := range m.Selectors {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Config) > 0 {
+ for _, e := range m.Config {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.ExtendedResourceName != nil {
+ l = len(*m.ExtendedResourceName)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *DeviceConfiguration) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Opaque != nil {
+ l = m.Opaque.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *DeviceConstraint) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Requests) > 0 {
+ for _, s := range m.Requests {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.MatchAttribute != nil {
+ l = len(*m.MatchAttribute)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.DistinctAttribute != nil {
+ l = len(*m.DistinctAttribute)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *DeviceCounterConsumption) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.CounterSet)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Counters) > 0 {
+ for k, v := range m.Counters {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *DeviceRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Exactly != nil {
+ l = m.Exactly.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if len(m.FirstAvailable) > 0 {
+ for _, e := range m.FirstAvailable {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *DeviceRequestAllocationResult) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Request)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Driver)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Pool)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Device)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.AdminAccess != nil {
+ n += 2
+ }
+ if len(m.Tolerations) > 0 {
+ for _, e := range m.Tolerations {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.BindingConditions) > 0 {
+ for _, s := range m.BindingConditions {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.BindingFailureConditions) > 0 {
+ for _, s := range m.BindingFailureConditions {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.ShareID != nil {
+ l = len(*m.ShareID)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if len(m.ConsumedCapacity) > 0 {
+ for k, v := range m.ConsumedCapacity {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *DeviceSelector) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CEL != nil {
+ l = m.CEL.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *DeviceSubRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.DeviceClassName)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Selectors) > 0 {
+ for _, e := range m.Selectors {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.AllocationMode)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.Count))
+ if len(m.Tolerations) > 0 {
+ for _, e := range m.Tolerations {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.Capacity != nil {
+ l = m.Capacity.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *DeviceTaint) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Key)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Value)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Effect)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.TimeAdded != nil {
+ l = m.TimeAdded.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *DeviceToleration) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Key)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Operator)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Value)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Effect)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.TolerationSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.TolerationSeconds))
+ }
+ return n
+}
+
+func (m *ExactDeviceRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.DeviceClassName)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Selectors) > 0 {
+ for _, e := range m.Selectors {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.AllocationMode)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.Count))
+ if m.AdminAccess != nil {
+ n += 2
+ }
+ if len(m.Tolerations) > 0 {
+ for _, e := range m.Tolerations {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.Capacity != nil {
+ l = m.Capacity.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *NetworkDeviceData) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.InterfaceName)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.IPs) > 0 {
+ for _, s := range m.IPs {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.HardwareAddress)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *OpaqueDeviceConfiguration) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Driver)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Parameters.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ResourceClaim) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ResourceClaimConsumerReference) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.APIGroup)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Resource)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.UID)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ResourceClaimList) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ResourceClaimSpec) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.Devices.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ResourceClaimStatus) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Allocation != nil {
+ l = m.Allocation.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if len(m.ReservedFor) > 0 {
+ for _, e := range m.ReservedFor {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Devices) > 0 {
+ for _, e := range m.Devices {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ResourceClaimTemplate) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ResourceClaimTemplateList) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ResourceClaimTemplateSpec) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ResourcePool) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.Generation))
+ n += 1 + sovGenerated(uint64(m.ResourceSliceCount))
+ return n
+}
+
+func (m *ResourceSlice) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ResourceSliceList) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ResourceSliceSpec) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Driver)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Pool.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.NodeName != nil {
+ l = len(*m.NodeName)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.NodeSelector != nil {
+ l = m.NodeSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.AllNodes != nil {
+ n += 2
+ }
+ if len(m.Devices) > 0 {
+ for _, e := range m.Devices {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.PerDeviceNodeSelection != nil {
+ n += 2
+ }
+ if len(m.SharedCounters) > 0 {
+ for _, e := range m.SharedCounters {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ return (math_bits.Len64(x|1) + 6) / 7
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *AllocatedDeviceStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForConditions := "[]Condition{"
+ for _, f := range this.Conditions {
+ repeatedStringForConditions += fmt.Sprintf("%v", f) + ","
+ }
+ repeatedStringForConditions += "}"
+ s := strings.Join([]string{`&AllocatedDeviceStatus{`,
+ `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`,
+ `Pool:` + fmt.Sprintf("%v", this.Pool) + `,`,
+ `Device:` + fmt.Sprintf("%v", this.Device) + `,`,
+ `Conditions:` + repeatedStringForConditions + `,`,
+ `Data:` + strings.Replace(fmt.Sprintf("%v", this.Data), "RawExtension", "runtime.RawExtension", 1) + `,`,
+ `NetworkData:` + strings.Replace(this.NetworkData.String(), "NetworkDeviceData", "NetworkDeviceData", 1) + `,`,
+ `ShareID:` + valueToStringGenerated(this.ShareID) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *AllocationResult) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&AllocationResult{`,
+ `Devices:` + strings.Replace(strings.Replace(this.Devices.String(), "DeviceAllocationResult", "DeviceAllocationResult", 1), `&`, ``, 1) + `,`,
+ `NodeSelector:` + strings.Replace(fmt.Sprintf("%v", this.NodeSelector), "NodeSelector", "v11.NodeSelector", 1) + `,`,
+ `AllocationTimestamp:` + strings.Replace(fmt.Sprintf("%v", this.AllocationTimestamp), "Time", "v1.Time", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CELDeviceSelector) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CELDeviceSelector{`,
+ `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CapacityRequestPolicy) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForValidValues := "[]Quantity{"
+ for _, f := range this.ValidValues {
+ repeatedStringForValidValues += fmt.Sprintf("%v", f) + ","
+ }
+ repeatedStringForValidValues += "}"
+ s := strings.Join([]string{`&CapacityRequestPolicy{`,
+ `Default:` + strings.Replace(fmt.Sprintf("%v", this.Default), "Quantity", "resource.Quantity", 1) + `,`,
+ `ValidValues:` + repeatedStringForValidValues + `,`,
+ `ValidRange:` + strings.Replace(this.ValidRange.String(), "CapacityRequestPolicyRange", "CapacityRequestPolicyRange", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CapacityRequestPolicyRange) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CapacityRequestPolicyRange{`,
+ `Min:` + strings.Replace(fmt.Sprintf("%v", this.Min), "Quantity", "resource.Quantity", 1) + `,`,
+ `Max:` + strings.Replace(fmt.Sprintf("%v", this.Max), "Quantity", "resource.Quantity", 1) + `,`,
+ `Step:` + strings.Replace(fmt.Sprintf("%v", this.Step), "Quantity", "resource.Quantity", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CapacityRequirements) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForRequests := make([]string, 0, len(this.Requests))
+ for k := range this.Requests {
+ keysForRequests = append(keysForRequests, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForRequests)
+ mapStringForRequests := "map[QualifiedName]resource.Quantity{"
+ for _, k := range keysForRequests {
+ mapStringForRequests += fmt.Sprintf("%v: %v,", k, this.Requests[QualifiedName(k)])
+ }
+ mapStringForRequests += "}"
+ s := strings.Join([]string{`&CapacityRequirements{`,
+ `Requests:` + mapStringForRequests + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Counter) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Counter{`,
+ `Value:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Value), "Quantity", "resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CounterSet) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForCounters := make([]string, 0, len(this.Counters))
+ for k := range this.Counters {
+ keysForCounters = append(keysForCounters, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCounters)
+ mapStringForCounters := "map[string]Counter{"
+ for _, k := range keysForCounters {
+ mapStringForCounters += fmt.Sprintf("%v: %v,", k, this.Counters[k])
+ }
+ mapStringForCounters += "}"
+ s := strings.Join([]string{`&CounterSet{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Counters:` + mapStringForCounters + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Device) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForConsumesCounters := "[]DeviceCounterConsumption{"
+ for _, f := range this.ConsumesCounters {
+ repeatedStringForConsumesCounters += strings.Replace(strings.Replace(f.String(), "DeviceCounterConsumption", "DeviceCounterConsumption", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForConsumesCounters += "}"
+ repeatedStringForTaints := "[]DeviceTaint{"
+ for _, f := range this.Taints {
+ repeatedStringForTaints += fmt.Sprintf("%v", f) + ","
+ }
+ repeatedStringForTaints += "}"
+ keysForAttributes := make([]string, 0, len(this.Attributes))
+ for k := range this.Attributes {
+ keysForAttributes = append(keysForAttributes, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForAttributes)
+ mapStringForAttributes := "map[QualifiedName]DeviceAttribute{"
+ for _, k := range keysForAttributes {
+ mapStringForAttributes += fmt.Sprintf("%v: %v,", k, this.Attributes[QualifiedName(k)])
+ }
+ mapStringForAttributes += "}"
+ keysForCapacity := make([]string, 0, len(this.Capacity))
+ for k := range this.Capacity {
+ keysForCapacity = append(keysForCapacity, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity)
+ mapStringForCapacity := "map[QualifiedName]DeviceCapacity{"
+ for _, k := range keysForCapacity {
+ mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[QualifiedName(k)])
+ }
+ mapStringForCapacity += "}"
+ s := strings.Join([]string{`&Device{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Attributes:` + mapStringForAttributes + `,`,
+ `Capacity:` + mapStringForCapacity + `,`,
+ `ConsumesCounters:` + repeatedStringForConsumesCounters + `,`,
+ `NodeName:` + valueToStringGenerated(this.NodeName) + `,`,
+ `NodeSelector:` + strings.Replace(fmt.Sprintf("%v", this.NodeSelector), "NodeSelector", "v11.NodeSelector", 1) + `,`,
+ `AllNodes:` + valueToStringGenerated(this.AllNodes) + `,`,
+ `Taints:` + repeatedStringForTaints + `,`,
+ `BindsToNode:` + valueToStringGenerated(this.BindsToNode) + `,`,
+ `BindingConditions:` + fmt.Sprintf("%v", this.BindingConditions) + `,`,
+ `BindingFailureConditions:` + fmt.Sprintf("%v", this.BindingFailureConditions) + `,`,
+ `AllowMultipleAllocations:` + valueToStringGenerated(this.AllowMultipleAllocations) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeviceAllocationConfiguration) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeviceAllocationConfiguration{`,
+ `Source:` + fmt.Sprintf("%v", this.Source) + `,`,
+ `Requests:` + fmt.Sprintf("%v", this.Requests) + `,`,
+ `DeviceConfiguration:` + strings.Replace(strings.Replace(this.DeviceConfiguration.String(), "DeviceConfiguration", "DeviceConfiguration", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeviceAllocationResult) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForResults := "[]DeviceRequestAllocationResult{"
+ for _, f := range this.Results {
+ repeatedStringForResults += strings.Replace(strings.Replace(f.String(), "DeviceRequestAllocationResult", "DeviceRequestAllocationResult", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForResults += "}"
+ repeatedStringForConfig := "[]DeviceAllocationConfiguration{"
+ for _, f := range this.Config {
+ repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "DeviceAllocationConfiguration", "DeviceAllocationConfiguration", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForConfig += "}"
+ s := strings.Join([]string{`&DeviceAllocationResult{`,
+ `Results:` + repeatedStringForResults + `,`,
+ `Config:` + repeatedStringForConfig + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeviceAttribute) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeviceAttribute{`,
+ `IntValue:` + valueToStringGenerated(this.IntValue) + `,`,
+ `BoolValue:` + valueToStringGenerated(this.BoolValue) + `,`,
+ `StringValue:` + valueToStringGenerated(this.StringValue) + `,`,
+ `VersionValue:` + valueToStringGenerated(this.VersionValue) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeviceCapacity) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeviceCapacity{`,
+ `Value:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Value), "Quantity", "resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `RequestPolicy:` + strings.Replace(this.RequestPolicy.String(), "CapacityRequestPolicy", "CapacityRequestPolicy", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeviceClaim) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForRequests := "[]DeviceRequest{"
+ for _, f := range this.Requests {
+ repeatedStringForRequests += strings.Replace(strings.Replace(f.String(), "DeviceRequest", "DeviceRequest", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForRequests += "}"
+ repeatedStringForConstraints := "[]DeviceConstraint{"
+ for _, f := range this.Constraints {
+ repeatedStringForConstraints += strings.Replace(strings.Replace(f.String(), "DeviceConstraint", "DeviceConstraint", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForConstraints += "}"
+ repeatedStringForConfig := "[]DeviceClaimConfiguration{"
+ for _, f := range this.Config {
+ repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "DeviceClaimConfiguration", "DeviceClaimConfiguration", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForConfig += "}"
+ s := strings.Join([]string{`&DeviceClaim{`,
+ `Requests:` + repeatedStringForRequests + `,`,
+ `Constraints:` + repeatedStringForConstraints + `,`,
+ `Config:` + repeatedStringForConfig + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeviceClaimConfiguration) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeviceClaimConfiguration{`,
+ `Requests:` + fmt.Sprintf("%v", this.Requests) + `,`,
+ `DeviceConfiguration:` + strings.Replace(strings.Replace(this.DeviceConfiguration.String(), "DeviceConfiguration", "DeviceConfiguration", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeviceClass) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeviceClass{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeviceClassSpec", "DeviceClassSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeviceClassConfiguration) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeviceClassConfiguration{`,
+ `DeviceConfiguration:` + strings.Replace(strings.Replace(this.DeviceConfiguration.String(), "DeviceConfiguration", "DeviceConfiguration", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeviceClassList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForItems := "[]DeviceClass{"
+ for _, f := range this.Items {
+ repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "DeviceClass", "DeviceClass", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForItems += "}"
+ s := strings.Join([]string{`&DeviceClassList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + repeatedStringForItems + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeviceClassSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForSelectors := "[]DeviceSelector{"
+ for _, f := range this.Selectors {
+ repeatedStringForSelectors += strings.Replace(strings.Replace(f.String(), "DeviceSelector", "DeviceSelector", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForSelectors += "}"
+ repeatedStringForConfig := "[]DeviceClassConfiguration{"
+ for _, f := range this.Config {
+ repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "DeviceClassConfiguration", "DeviceClassConfiguration", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForConfig += "}"
+ s := strings.Join([]string{`&DeviceClassSpec{`,
+ `Selectors:` + repeatedStringForSelectors + `,`,
+ `Config:` + repeatedStringForConfig + `,`,
+ `ExtendedResourceName:` + valueToStringGenerated(this.ExtendedResourceName) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeviceConfiguration) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeviceConfiguration{`,
+ `Opaque:` + strings.Replace(this.Opaque.String(), "OpaqueDeviceConfiguration", "OpaqueDeviceConfiguration", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeviceConstraint) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeviceConstraint{`,
+ `Requests:` + fmt.Sprintf("%v", this.Requests) + `,`,
+ `MatchAttribute:` + valueToStringGenerated(this.MatchAttribute) + `,`,
+ `DistinctAttribute:` + valueToStringGenerated(this.DistinctAttribute) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeviceCounterConsumption) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForCounters := make([]string, 0, len(this.Counters))
+ for k := range this.Counters {
+ keysForCounters = append(keysForCounters, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCounters)
+ mapStringForCounters := "map[string]Counter{"
+ for _, k := range keysForCounters {
+ mapStringForCounters += fmt.Sprintf("%v: %v,", k, this.Counters[k])
+ }
+ mapStringForCounters += "}"
+ s := strings.Join([]string{`&DeviceCounterConsumption{`,
+ `CounterSet:` + fmt.Sprintf("%v", this.CounterSet) + `,`,
+ `Counters:` + mapStringForCounters + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeviceRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForFirstAvailable := "[]DeviceSubRequest{"
+ for _, f := range this.FirstAvailable {
+ repeatedStringForFirstAvailable += strings.Replace(strings.Replace(f.String(), "DeviceSubRequest", "DeviceSubRequest", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForFirstAvailable += "}"
+ s := strings.Join([]string{`&DeviceRequest{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Exactly:` + strings.Replace(this.Exactly.String(), "ExactDeviceRequest", "ExactDeviceRequest", 1) + `,`,
+ `FirstAvailable:` + repeatedStringForFirstAvailable + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeviceRequestAllocationResult) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForTolerations := "[]DeviceToleration{"
+ for _, f := range this.Tolerations {
+ repeatedStringForTolerations += strings.Replace(strings.Replace(f.String(), "DeviceToleration", "DeviceToleration", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForTolerations += "}"
+ keysForConsumedCapacity := make([]string, 0, len(this.ConsumedCapacity))
+ for k := range this.ConsumedCapacity {
+ keysForConsumedCapacity = append(keysForConsumedCapacity, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForConsumedCapacity)
+ mapStringForConsumedCapacity := "map[QualifiedName]resource.Quantity{"
+ for _, k := range keysForConsumedCapacity {
+ mapStringForConsumedCapacity += fmt.Sprintf("%v: %v,", k, this.ConsumedCapacity[QualifiedName(k)])
+ }
+ mapStringForConsumedCapacity += "}"
+ s := strings.Join([]string{`&DeviceRequestAllocationResult{`,
+ `Request:` + fmt.Sprintf("%v", this.Request) + `,`,
+ `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`,
+ `Pool:` + fmt.Sprintf("%v", this.Pool) + `,`,
+ `Device:` + fmt.Sprintf("%v", this.Device) + `,`,
+ `AdminAccess:` + valueToStringGenerated(this.AdminAccess) + `,`,
+ `Tolerations:` + repeatedStringForTolerations + `,`,
+ `BindingConditions:` + fmt.Sprintf("%v", this.BindingConditions) + `,`,
+ `BindingFailureConditions:` + fmt.Sprintf("%v", this.BindingFailureConditions) + `,`,
+ `ShareID:` + valueToStringGenerated(this.ShareID) + `,`,
+ `ConsumedCapacity:` + mapStringForConsumedCapacity + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeviceSelector) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeviceSelector{`,
+ `CEL:` + strings.Replace(this.CEL.String(), "CELDeviceSelector", "CELDeviceSelector", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeviceSubRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForSelectors := "[]DeviceSelector{"
+ for _, f := range this.Selectors {
+ repeatedStringForSelectors += strings.Replace(strings.Replace(f.String(), "DeviceSelector", "DeviceSelector", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForSelectors += "}"
+ repeatedStringForTolerations := "[]DeviceToleration{"
+ for _, f := range this.Tolerations {
+ repeatedStringForTolerations += strings.Replace(strings.Replace(f.String(), "DeviceToleration", "DeviceToleration", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForTolerations += "}"
+ s := strings.Join([]string{`&DeviceSubRequest{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `DeviceClassName:` + fmt.Sprintf("%v", this.DeviceClassName) + `,`,
+ `Selectors:` + repeatedStringForSelectors + `,`,
+ `AllocationMode:` + fmt.Sprintf("%v", this.AllocationMode) + `,`,
+ `Count:` + fmt.Sprintf("%v", this.Count) + `,`,
+ `Tolerations:` + repeatedStringForTolerations + `,`,
+ `Capacity:` + strings.Replace(this.Capacity.String(), "CapacityRequirements", "CapacityRequirements", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeviceToleration) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeviceToleration{`,
+ `Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `Operator:` + fmt.Sprintf("%v", this.Operator) + `,`,
+ `Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `Effect:` + fmt.Sprintf("%v", this.Effect) + `,`,
+ `TolerationSeconds:` + valueToStringGenerated(this.TolerationSeconds) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ExactDeviceRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForSelectors := "[]DeviceSelector{"
+ for _, f := range this.Selectors {
+ repeatedStringForSelectors += strings.Replace(strings.Replace(f.String(), "DeviceSelector", "DeviceSelector", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForSelectors += "}"
+ repeatedStringForTolerations := "[]DeviceToleration{"
+ for _, f := range this.Tolerations {
+ repeatedStringForTolerations += strings.Replace(strings.Replace(f.String(), "DeviceToleration", "DeviceToleration", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForTolerations += "}"
+ s := strings.Join([]string{`&ExactDeviceRequest{`,
+ `DeviceClassName:` + fmt.Sprintf("%v", this.DeviceClassName) + `,`,
+ `Selectors:` + repeatedStringForSelectors + `,`,
+ `AllocationMode:` + fmt.Sprintf("%v", this.AllocationMode) + `,`,
+ `Count:` + fmt.Sprintf("%v", this.Count) + `,`,
+ `AdminAccess:` + valueToStringGenerated(this.AdminAccess) + `,`,
+ `Tolerations:` + repeatedStringForTolerations + `,`,
+ `Capacity:` + strings.Replace(this.Capacity.String(), "CapacityRequirements", "CapacityRequirements", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkDeviceData) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkDeviceData{`,
+ `InterfaceName:` + fmt.Sprintf("%v", this.InterfaceName) + `,`,
+ `IPs:` + fmt.Sprintf("%v", this.IPs) + `,`,
+ `HardwareAddress:` + fmt.Sprintf("%v", this.HardwareAddress) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *OpaqueDeviceConfiguration) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&OpaqueDeviceConfiguration{`,
+ `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`,
+ `Parameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Parameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceClaim) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceClaim{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimSpec", "ResourceClaimSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ResourceClaimStatus", "ResourceClaimStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceClaimConsumerReference) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceClaimConsumerReference{`,
+ `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`,
+ `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `UID:` + fmt.Sprintf("%v", this.UID) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceClaimList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForItems := "[]ResourceClaim{"
+ for _, f := range this.Items {
+ repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaim", "ResourceClaim", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForItems += "}"
+ s := strings.Join([]string{`&ResourceClaimList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + repeatedStringForItems + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceClaimSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceClaimSpec{`,
+ `Devices:` + strings.Replace(strings.Replace(this.Devices.String(), "DeviceClaim", "DeviceClaim", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceClaimStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForReservedFor := "[]ResourceClaimConsumerReference{"
+ for _, f := range this.ReservedFor {
+ repeatedStringForReservedFor += strings.Replace(strings.Replace(f.String(), "ResourceClaimConsumerReference", "ResourceClaimConsumerReference", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForReservedFor += "}"
+ repeatedStringForDevices := "[]AllocatedDeviceStatus{"
+ for _, f := range this.Devices {
+ repeatedStringForDevices += strings.Replace(strings.Replace(f.String(), "AllocatedDeviceStatus", "AllocatedDeviceStatus", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForDevices += "}"
+ s := strings.Join([]string{`&ResourceClaimStatus{`,
+ `Allocation:` + strings.Replace(this.Allocation.String(), "AllocationResult", "AllocationResult", 1) + `,`,
+ `ReservedFor:` + repeatedStringForReservedFor + `,`,
+ `Devices:` + repeatedStringForDevices + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceClaimTemplate) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceClaimTemplate{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimTemplateSpec", "ResourceClaimTemplateSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceClaimTemplateList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForItems := "[]ResourceClaimTemplate{"
+ for _, f := range this.Items {
+ repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaimTemplate", "ResourceClaimTemplate", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForItems += "}"
+ s := strings.Join([]string{`&ResourceClaimTemplateList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + repeatedStringForItems + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceClaimTemplateSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceClaimTemplateSpec{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimSpec", "ResourceClaimSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourcePool) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourcePool{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Generation:` + fmt.Sprintf("%v", this.Generation) + `,`,
+ `ResourceSliceCount:` + fmt.Sprintf("%v", this.ResourceSliceCount) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceSlice) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceSlice{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceSliceSpec", "ResourceSliceSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceSliceList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForItems := "[]ResourceSlice{"
+ for _, f := range this.Items {
+ repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceSlice", "ResourceSlice", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForItems += "}"
+ s := strings.Join([]string{`&ResourceSliceList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + repeatedStringForItems + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceSliceSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForDevices := "[]Device{"
+ for _, f := range this.Devices {
+ repeatedStringForDevices += strings.Replace(strings.Replace(f.String(), "Device", "Device", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForDevices += "}"
+ repeatedStringForSharedCounters := "[]CounterSet{"
+ for _, f := range this.SharedCounters {
+ repeatedStringForSharedCounters += strings.Replace(strings.Replace(f.String(), "CounterSet", "CounterSet", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForSharedCounters += "}"
+ s := strings.Join([]string{`&ResourceSliceSpec{`,
+ `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`,
+ `Pool:` + strings.Replace(strings.Replace(this.Pool.String(), "ResourcePool", "ResourcePool", 1), `&`, ``, 1) + `,`,
+ `NodeName:` + valueToStringGenerated(this.NodeName) + `,`,
+ `NodeSelector:` + strings.Replace(fmt.Sprintf("%v", this.NodeSelector), "NodeSelector", "v11.NodeSelector", 1) + `,`,
+ `AllNodes:` + valueToStringGenerated(this.AllNodes) + `,`,
+ `Devices:` + repeatedStringForDevices + `,`,
+ `PerDeviceNodeSelection:` + valueToStringGenerated(this.PerDeviceNodeSelection) + `,`,
+ `SharedCounters:` + repeatedStringForSharedCounters + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *AllocatedDeviceStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: AllocatedDeviceStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AllocatedDeviceStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Driver = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Pool = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Device = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, v1.Condition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Data == nil {
+ m.Data = &runtime.RawExtension{}
+ }
+ if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NetworkData", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NetworkData == nil {
+ m.NetworkData = &NetworkDeviceData{}
+ }
+ if err := m.NetworkData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ShareID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := string(dAtA[iNdEx:postIndex])
+ m.ShareID = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *AllocationResult) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: AllocationResult: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AllocationResult: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Devices.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodeSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NodeSelector == nil {
+ m.NodeSelector = &v11.NodeSelector{}
+ }
+ if err := m.NodeSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AllocationTimestamp", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.AllocationTimestamp == nil {
+ m.AllocationTimestamp = &v1.Time{}
+ }
+ if err := m.AllocationTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CELDeviceSelector) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CELDeviceSelector: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CELDeviceSelector: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Expression = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CapacityRequestPolicy) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CapacityRequestPolicy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CapacityRequestPolicy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Default", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Default == nil {
+ m.Default = &resource.Quantity{}
+ }
+ if err := m.Default.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ValidValues", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ValidValues = append(m.ValidValues, resource.Quantity{})
+ if err := m.ValidValues[len(m.ValidValues)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ValidRange", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ValidRange == nil {
+ m.ValidRange = &CapacityRequestPolicyRange{}
+ }
+ if err := m.ValidRange.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CapacityRequestPolicyRange) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CapacityRequestPolicyRange: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CapacityRequestPolicyRange: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Min == nil {
+ m.Min = &resource.Quantity{}
+ }
+ if err := m.Min.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Max == nil {
+ m.Max = &resource.Quantity{}
+ }
+ if err := m.Max.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Step", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Step == nil {
+ m.Step = &resource.Quantity{}
+ }
+ if err := m.Step.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CapacityRequirements) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CapacityRequirements: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CapacityRequirements: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Requests == nil {
+ m.Requests = make(map[QualifiedName]resource.Quantity)
+ }
+ var mapkey QualifiedName
+ mapvalue := &resource.Quantity{}
+ for iNdEx < postIndex {
+ entryPreIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ if fieldNum == 1 {
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey = QualifiedName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ } else if fieldNum == 2 {
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if postmsgIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue = &resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ } else {
+ iNdEx = entryPreIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > postIndex {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+ m.Requests[QualifiedName(mapkey)] = *mapvalue
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Counter) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Counter: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Counter: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CounterSet) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CounterSet: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CounterSet: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Counters", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Counters == nil {
+ m.Counters = make(map[string]Counter)
+ }
+ var mapkey string
+ mapvalue := &Counter{}
+ for iNdEx < postIndex {
+ entryPreIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ if fieldNum == 1 {
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ } else if fieldNum == 2 {
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if postmsgIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue = &Counter{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ } else {
+ iNdEx = entryPreIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > postIndex {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+ m.Counters[mapkey] = *mapvalue
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Device) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Device: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Device: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Attributes == nil {
+ m.Attributes = make(map[QualifiedName]DeviceAttribute)
+ }
+ var mapkey QualifiedName
+ mapvalue := &DeviceAttribute{}
+ for iNdEx < postIndex {
+ entryPreIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ if fieldNum == 1 {
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey = QualifiedName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ } else if fieldNum == 2 {
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if postmsgIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue = &DeviceAttribute{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ } else {
+ iNdEx = entryPreIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > postIndex {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+ m.Attributes[QualifiedName(mapkey)] = *mapvalue
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Capacity == nil {
+ m.Capacity = make(map[QualifiedName]DeviceCapacity)
+ }
+ var mapkey QualifiedName
+ mapvalue := &DeviceCapacity{}
+ for iNdEx < postIndex {
+ entryPreIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ if fieldNum == 1 {
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey = QualifiedName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ } else if fieldNum == 2 {
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if postmsgIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue = &DeviceCapacity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ } else {
+ iNdEx = entryPreIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > postIndex {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+ m.Capacity[QualifiedName(mapkey)] = *mapvalue
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ConsumesCounters", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ConsumesCounters = append(m.ConsumesCounters, DeviceCounterConsumption{})
+ if err := m.ConsumesCounters[len(m.ConsumesCounters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := string(dAtA[iNdEx:postIndex])
+ m.NodeName = &s
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodeSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NodeSelector == nil {
+ m.NodeSelector = &v11.NodeSelector{}
+ }
+ if err := m.NodeSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AllNodes", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.AllNodes = &b
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Taints", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Taints = append(m.Taints, DeviceTaint{})
+ if err := m.Taints[len(m.Taints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field BindsToNode", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.BindsToNode = &b
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field BindingConditions", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.BindingConditions = append(m.BindingConditions, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 11:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field BindingFailureConditions", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.BindingFailureConditions = append(m.BindingFailureConditions, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 12:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AllowMultipleAllocations", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.AllowMultipleAllocations = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeviceAllocationConfiguration) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeviceAllocationConfiguration: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeviceAllocationConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Source = AllocationConfigSource(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeviceAllocationResult) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeviceAllocationResult: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeviceAllocationResult: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Results = append(m.Results, DeviceRequestAllocationResult{})
+ if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Config = append(m.Config, DeviceAllocationConfiguration{})
+ if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeviceAttribute) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeviceAttribute: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeviceAttribute: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IntValue", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.IntValue = &v
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.BoolValue = &b
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := string(dAtA[iNdEx:postIndex])
+ m.StringValue = &s
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VersionValue", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := string(dAtA[iNdEx:postIndex])
+ m.VersionValue = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeviceCapacity) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeviceCapacity: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeviceCapacity: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RequestPolicy", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RequestPolicy == nil {
+ m.RequestPolicy = &CapacityRequestPolicy{}
+ }
+ if err := m.RequestPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeviceClaim) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeviceClaim: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeviceClaim: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Requests = append(m.Requests, DeviceRequest{})
+ if err := m.Requests[len(m.Requests)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Constraints", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Constraints = append(m.Constraints, DeviceConstraint{})
+ if err := m.Constraints[len(m.Constraints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Config = append(m.Config, DeviceClaimConfiguration{})
+ if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeviceClaimConfiguration) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeviceClaimConfiguration: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeviceClaimConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeviceClass) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeviceClass: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeviceClass: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeviceClassConfiguration) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeviceClassConfiguration: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeviceClassConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeviceClassList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeviceClassList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeviceClassList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, DeviceClass{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeviceClassSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeviceClassSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeviceClassSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Selectors = append(m.Selectors, DeviceSelector{})
+ if err := m.Selectors[len(m.Selectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Config = append(m.Config, DeviceClassConfiguration{})
+ if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExtendedResourceName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := string(dAtA[iNdEx:postIndex])
+ m.ExtendedResourceName = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeviceConfiguration) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeviceConfiguration: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeviceConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Opaque", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Opaque == nil {
+ m.Opaque = &OpaqueDeviceConfiguration{}
+ }
+ if err := m.Opaque.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeviceConstraint) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeviceConstraint: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeviceConstraint: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MatchAttribute", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := FullyQualifiedName(dAtA[iNdEx:postIndex])
+ m.MatchAttribute = &s
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DistinctAttribute", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := FullyQualifiedName(dAtA[iNdEx:postIndex])
+ m.DistinctAttribute = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeviceCounterConsumption) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeviceCounterConsumption: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeviceCounterConsumption: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CounterSet", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CounterSet = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Counters", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Counters == nil {
+ m.Counters = make(map[string]Counter)
+ }
+ var mapkey string
+ mapvalue := &Counter{}
+ for iNdEx < postIndex {
+ entryPreIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ if fieldNum == 1 {
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ } else if fieldNum == 2 {
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if postmsgIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue = &Counter{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ } else {
+ iNdEx = entryPreIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > postIndex {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+ m.Counters[mapkey] = *mapvalue
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeviceRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeviceRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeviceRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Exactly", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Exactly == nil {
+ m.Exactly = &ExactDeviceRequest{}
+ }
+ if err := m.Exactly.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FirstAvailable", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FirstAvailable = append(m.FirstAvailable, DeviceSubRequest{})
+ if err := m.FirstAvailable[len(m.FirstAvailable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeviceRequestAllocationResult) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeviceRequestAllocationResult: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeviceRequestAllocationResult: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Request = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Driver = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Pool = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Device = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AdminAccess", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.AdminAccess = &b
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Tolerations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Tolerations = append(m.Tolerations, DeviceToleration{})
+ if err := m.Tolerations[len(m.Tolerations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field BindingConditions", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.BindingConditions = append(m.BindingConditions, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field BindingFailureConditions", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.BindingFailureConditions = append(m.BindingFailureConditions, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ShareID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex])
+ m.ShareID = &s
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ConsumedCapacity", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ConsumedCapacity == nil {
+ m.ConsumedCapacity = make(map[QualifiedName]resource.Quantity)
+ }
+ var mapkey QualifiedName
+ mapvalue := &resource.Quantity{}
+ for iNdEx < postIndex {
+ entryPreIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ if fieldNum == 1 {
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey = QualifiedName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ } else if fieldNum == 2 {
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if postmsgIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue = &resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ } else {
+ iNdEx = entryPreIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > postIndex {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+ m.ConsumedCapacity[QualifiedName(mapkey)] = *mapvalue
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeviceSelector) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeviceSelector: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeviceSelector: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CEL", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.CEL == nil {
+ m.CEL = &CELDeviceSelector{}
+ }
+ if err := m.CEL.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeviceSubRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeviceSubRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeviceSubRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DeviceClassName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DeviceClassName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Selectors = append(m.Selectors, DeviceSelector{})
+ if err := m.Selectors[len(m.Selectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AllocationMode", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AllocationMode = DeviceAllocationMode(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType)
+ }
+ m.Count = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Count |= int64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Tolerations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Tolerations = append(m.Tolerations, DeviceToleration{})
+ if err := m.Tolerations[len(m.Tolerations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Capacity == nil {
+ m.Capacity = &CapacityRequirements{}
+ }
+ if err := m.Capacity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeviceTaint) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeviceTaint: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeviceTaint: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Key = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Value = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Effect", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Effect = DeviceTaintEffect(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TimeAdded", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.TimeAdded == nil {
+ m.TimeAdded = &v1.Time{}
+ }
+ if err := m.TimeAdded.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeviceToleration) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeviceToleration: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeviceToleration: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Key = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Operator = DeviceTolerationOperator(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Value = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Effect", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Effect = DeviceTaintEffect(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TolerationSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TolerationSeconds = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExactDeviceRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExactDeviceRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExactDeviceRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DeviceClassName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DeviceClassName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Selectors = append(m.Selectors, DeviceSelector{})
+ if err := m.Selectors[len(m.Selectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AllocationMode", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AllocationMode = DeviceAllocationMode(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType)
+ }
+ m.Count = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Count |= int64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AdminAccess", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.AdminAccess = &b
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Tolerations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Tolerations = append(m.Tolerations, DeviceToleration{})
+ if err := m.Tolerations[len(m.Tolerations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Capacity == nil {
+ m.Capacity = &CapacityRequirements{}
+ }
+ if err := m.Capacity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkDeviceData) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkDeviceData: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkDeviceData: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field InterfaceName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.InterfaceName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IPs", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.IPs = append(m.IPs, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HardwareAddress", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.HardwareAddress = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *OpaqueDeviceConfiguration) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: OpaqueDeviceConfiguration: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: OpaqueDeviceConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Driver = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Parameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceClaim) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceClaim: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceClaim: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceClaimConsumerReference: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceClaimConsumerReference: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIGroup = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Resource = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceClaimList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceClaimList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceClaimList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ResourceClaim{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceClaimSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceClaimSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Devices.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceClaimStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceClaimStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Allocation", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Allocation == nil {
+ m.Allocation = &AllocationResult{}
+ }
+ if err := m.Allocation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReservedFor", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ReservedFor = append(m.ReservedFor, ResourceClaimConsumerReference{})
+ if err := m.ReservedFor[len(m.ReservedFor)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Devices = append(m.Devices, AllocatedDeviceStatus{})
+ if err := m.Devices[len(m.Devices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceClaimTemplate) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceClaimTemplate: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceClaimTemplate: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceClaimTemplateList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceClaimTemplateList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ResourceClaimTemplate{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceClaimTemplateSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceClaimTemplateSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourcePool) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourcePool: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourcePool: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType)
+ }
+ m.Generation = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Generation |= int64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceSliceCount", wireType)
+ }
+ m.ResourceSliceCount = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ResourceSliceCount |= int64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceSlice) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceSlice: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceSlice: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceSliceList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceSliceList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceSliceList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ResourceSlice{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceSliceSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceSliceSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceSliceSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Driver = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Pool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := string(dAtA[iNdEx:postIndex])
+ m.NodeName = &s
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodeSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NodeSelector == nil {
+ m.NodeSelector = &v11.NodeSelector{}
+ }
+ if err := m.NodeSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AllNodes", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.AllNodes = &b
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Devices = append(m.Devices, Device{})
+ if err := m.Devices[len(m.Devices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PerDeviceNodeSelection", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.PerDeviceNodeSelection = &b
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SharedCounters", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SharedCounters = append(m.SharedCounters, CounterSet{})
+ if err := m.SharedCounters[len(m.SharedCounters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ depth := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ case 1:
+ iNdEx += 8
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ iNdEx += length
+ case 3:
+ depth++
+ case 4:
+ if depth == 0 {
+ return 0, ErrUnexpectedEndOfGroupGenerated
+ }
+ depth--
+ case 5:
+ iNdEx += 4
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ if depth == 0 {
+ return iNdEx, nil
+ }
+ }
+ return 0, io.ErrUnexpectedEOF
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+ ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
+)
diff --git a/hack/tools/vendor/k8s.io/api/resource/v1/generated.proto b/hack/tools/vendor/k8s.io/api/resource/v1/generated.proto
new file mode 100644
index 000000000000..816a430c26b8
--- /dev/null
+++ b/hack/tools/vendor/k8s.io/api/resource/v1/generated.proto
@@ -0,0 +1,1589 @@
+/*
+Copyright 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.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = "proto2";
+
+package k8s.io.api.resource.v1;
+
+import "k8s.io/api/core/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "k8s.io/api/resource/v1";
+
+// AllocatedDeviceStatus contains the status of an allocated device, if the
+// driver chooses to report it. This may include driver-specific information.
+//
+// The combination of Driver, Pool, Device, and ShareID must match the corresponding key
+// in Status.Allocation.Devices.
+message AllocatedDeviceStatus {
+ // Driver specifies the name of the DRA driver whose kubelet
+ // plugin should be invoked to process the allocation once the claim is
+ // needed on a node.
+ //
+ // Must be a DNS subdomain and should end with a DNS domain owned by the
+ // vendor of the driver.
+ //
+ // +required
+ optional string driver = 1;
+
+ // This name together with the driver name and the device name field
+ // identify which device was allocated (`//`).
+ //
+ // Must not be longer than 253 characters and may contain one or more
+ // DNS sub-domains separated by slashes.
+ //
+ // +required
+ optional string pool = 2;
+
+ // Device references one device instance via its name in the driver's
+ // resource pool. It must be a DNS label.
+ //
+ // +required
+ optional string device = 3;
+
+ // ShareID uniquely identifies an individual allocation share of the device.
+ //
+ // +optional
+ // +featureGate=DRAConsumableCapacity
+ optional string shareID = 7;
+
+ // Conditions contains the latest observation of the device's state.
+ // If the device has been configured according to the class and claim
+ // config references, the `Ready` condition should be True.
+ //
+ // Must not contain more than 8 entries.
+ //
+ // +optional
+ // +listType=map
+ // +listMapKey=type
+ repeated .k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 4;
+
+ // Data contains arbitrary driver-specific data.
+ //
+ // The length of the raw data must be smaller or equal to 10 Ki.
+ //
+ // +optional
+ optional .k8s.io.apimachinery.pkg.runtime.RawExtension data = 5;
+
+ // NetworkData contains network-related information specific to the device.
+ //
+ // +optional
+ optional NetworkDeviceData networkData = 6;
+}
+
+// AllocationResult contains attributes of an allocated resource.
+message AllocationResult {
+ // Devices is the result of allocating devices.
+ //
+ // +optional
+ optional DeviceAllocationResult devices = 1;
+
+ // NodeSelector defines where the allocated resources are available. If
+ // unset, they are available everywhere.
+ //
+ // +optional
+ optional .k8s.io.api.core.v1.NodeSelector nodeSelector = 3;
+
+ // AllocationTimestamp stores the time when the resources were allocated.
+ // This field is not guaranteed to be set, in which case that time is unknown.
+ //
+ // This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
+ // feature gate.
+ //
+ // +optional
+ // +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
+ optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time allocationTimestamp = 5;
+}
+
+// CELDeviceSelector contains a CEL expression for selecting a device.
+message CELDeviceSelector {
+ // Expression is a CEL expression which evaluates a single device. It
+ // must evaluate to true when the device under consideration satisfies
+ // the desired criteria, and false when it does not. Any other result
+ // is an error and causes allocation of devices to abort.
+ //
+ // The expression's input is an object named "device", which carries
+ // the following properties:
+ // - driver (string): the name of the driver which defines this device.
+ // - attributes (map[string]object): the device's attributes, grouped by prefix
+ // (e.g. device.attributes["dra.example.com"] evaluates to an object with all
+ // of the attributes which were prefixed by "dra.example.com".
+ // - capacity (map[string]object): the device's capacities, grouped by prefix.
+ // - allowMultipleAllocations (bool): the allowMultipleAllocations property of the device
+ // (v1.34+ with the DRAConsumableCapacity feature enabled).
+ //
+ // Example: Consider a device with driver="dra.example.com", which exposes
+ // two attributes named "model" and "ext.example.com/family" and which
+ // exposes one capacity named "modules". This input to this expression
+ // would have the following fields:
+ //
+ // device.driver
+ // device.attributes["dra.example.com"].model
+ // device.attributes["ext.example.com"].family
+ // device.capacity["dra.example.com"].modules
+ //
+ // The device.driver field can be used to check for a specific driver,
+ // either as a high-level precondition (i.e. you only want to consider
+ // devices from this driver) or as part of a multi-clause expression
+ // that is meant to consider devices from different drivers.
+ //
+ // The value type of each attribute is defined by the device
+ // definition, and users who write these expressions must consult the
+ // documentation for their specific drivers. The value type of each
+ // capacity is Quantity.
+ //
+ // If an unknown prefix is used as a lookup in either device.attributes
+ // or device.capacity, an empty map will be returned. Any reference to
+ // an unknown field will cause an evaluation error and allocation to
+ // abort.
+ //
+ // A robust expression should check for the existence of attributes
+ // before referencing them.
+ //
+ // For ease of use, the cel.bind() function is enabled, and can be used
+ // to simplify expressions that access multiple attributes with the
+ // same domain. For example:
+ //
+ // cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool)
+ //
+ // The length of the expression must be smaller or equal to 10 Ki. The
+ // cost of evaluating it is also limited based on the estimated number
+ // of logical steps.
+ //
+ // +required
+ optional string expression = 1;
+}
+
+// CapacityRequestPolicy defines how requests consume device capacity.
+//
+// Must not set more than one ValidRequestValues.
+message CapacityRequestPolicy {
+ // Default specifies how much of this capacity is consumed by a request
+ // that does not contain an entry for it in DeviceRequest's Capacity.
+ //
+ // +optional
+ optional .k8s.io.apimachinery.pkg.api.resource.Quantity default = 1;
+
+ // ValidValues defines a set of acceptable quantity values in consuming requests.
+ //
+ // Must not contain more than 10 entries.
+ // Must be sorted in ascending order.
+ //
+ // If this field is set,
+ // Default must be defined and it must be included in ValidValues list.
+ //
+ // If the requested amount does not match any valid value but smaller than some valid values,
+ // the scheduler calculates the smallest valid value that is greater than or equal to the request.
+ // That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues).
+ //
+ // If the requested amount exceeds all valid values, the request violates the policy,
+ // and this device cannot be allocated.
+ //
+ // +optional
+ // +listType=atomic
+ // +oneOf=ValidRequestValues
+ repeated .k8s.io.apimachinery.pkg.api.resource.Quantity validValues = 3;
+
+ // ValidRange defines an acceptable quantity value range in consuming requests.
+ //
+ // If this field is set,
+ // Default must be defined and it must fall within the defined ValidRange.
+ //
+ // If the requested amount does not fall within the defined range, the request violates the policy,
+ // and this device cannot be allocated.
+ //
+ // If the request doesn't contain this capacity entry, Default value is used.
+ //
+ // +optional
+ // +oneOf=ValidRequestValues
+ optional CapacityRequestPolicyRange validRange = 4;
+}
+
+// CapacityRequestPolicyRange defines a valid range for consumable capacity values.
+//
+// - If the requested amount is less than Min, it is rounded up to the Min value.
+// - If Step is set and the requested amount is between Min and Max but not aligned with Step,
+// it will be rounded up to the next value equal to Min + (n * Step).
+// - If Step is not set, the requested amount is used as-is if it falls within the range Min to Max (if set).
+// - If the requested or rounded amount exceeds Max (if set), the request does not satisfy the policy,
+// and the device cannot be allocated.
+message CapacityRequestPolicyRange {
+ // Min specifies the minimum capacity allowed for a consumption request.
+ //
+ // Min must be greater than or equal to zero,
+ // and less than or equal to the capacity value.
+ // requestPolicy.default must be more than or equal to the minimum.
+ //
+ // +required
+ optional .k8s.io.apimachinery.pkg.api.resource.Quantity min = 1;
+
+ // Max defines the upper limit for capacity that can be requested.
+ //
+ // Max must be less than or equal to the capacity value.
+ // Min and requestPolicy.default must be less than or equal to the maximum.
+ //
+ // +optional
+ optional .k8s.io.apimachinery.pkg.api.resource.Quantity max = 2;
+
+ // Step defines the step size between valid capacity amounts within the range.
+ //
+ // Max (if set) and requestPolicy.default must be a multiple of Step.
+ // Min + Step must be less than or equal to the capacity value.
+ //
+ // +optional
+ optional .k8s.io.apimachinery.pkg.api.resource.Quantity step = 3;
+}
+
+// CapacityRequirements defines the capacity requirements for a specific device request.
+message CapacityRequirements {
+ // Requests represent individual device resource requests for distinct resources,
+ // all of which must be provided by the device.
+ //
+ // This value is used as an additional filtering condition against the available capacity on the device.
+ // This is semantically equivalent to a CEL selector with
+ // `device.capacity[]..compareTo(quantity()) >= 0`.
+ // For example, device.capacity['test-driver.cdi.k8s.io'].counters.compareTo(quantity('2')) >= 0.
+ //
+ // When a requestPolicy is defined, the requested amount is adjusted upward
+ // to the nearest valid value based on the policy.
+ // If the requested amount cannot be adjusted to a valid value—because it exceeds what the requestPolicy allows—
+ // the device is considered ineligible for allocation.
+ //
+ // For any capacity that is not explicitly requested:
+ // - If no requestPolicy is set, the default consumed capacity is equal to the full device capacity
+ // (i.e., the whole device is claimed).
+ // - If a requestPolicy is set, the default consumed capacity is determined according to that policy.
+ //
+ // If the device allows multiple allocation,
+ // the aggregated amount across all requests must not exceed the capacity value.
+ // The consumed capacity, which may be adjusted based on the requestPolicy if defined,
+ // is recorded in the resource claim’s status.devices[*].consumedCapacity field.
+ //
+ // +optional
+ map requests = 1;
+}
+
+// Counter describes a quantity associated with a device.
+message Counter {
+ // Value defines how much of a certain device counter is available.
+ //
+ // +required
+ optional .k8s.io.apimachinery.pkg.api.resource.Quantity value = 1;
+}
+
+// CounterSet defines a named set of counters
+// that are available to be used by devices defined in the
+// ResourceSlice.
+//
+// The counters are not allocatable by themselves, but
+// can be referenced by devices. When a device is allocated,
+// the portion of counters it uses will no longer be available for use
+// by other devices.
+message CounterSet {
+ // Name defines the name of the counter set.
+ // It must be a DNS label.
+ //
+ // +required
+ optional string name = 1;
+
+ // Counters defines the set of counters for this CounterSet
+ // The name of each counter must be unique in that set and must be a DNS label.
+ //
+ // The maximum number of counters in all sets is 32.
+ //
+ // +required
+ map counters = 2;
+}
+
+// Device represents one individual hardware instance that can be selected based
+// on its attributes. Besides the name, exactly one field must be set.
+message Device {
+ // Name is unique identifier among all devices managed by
+ // the driver in the pool. It must be a DNS label.
+ //
+ // +required
+ optional string name = 1;
+
+ // Attributes defines the set of attributes for this device.
+ // The name of each attribute must be unique in that set.
+ //
+ // The maximum number of attributes and capacities combined is 32.
+ //
+ // +optional
+ map attributes = 2;
+
+ // Capacity defines the set of capacities for this device.
+ // The name of each capacity must be unique in that set.
+ //
+ // The maximum number of attributes and capacities combined is 32.
+ //
+ // +optional
+ map capacity = 3;
+
+ // ConsumesCounters defines a list of references to sharedCounters
+ // and the set of counters that the device will
+ // consume from those counter sets.
+ //
+ // There can only be a single entry per counterSet.
+ //
+ // The total number of device counter consumption entries
+ // must be <= 32. In addition, the total number in the
+ // entire ResourceSlice must be <= 1024 (for example,
+ // 64 devices with 16 counters each).
+ //
+ // +optional
+ // +listType=atomic
+ // +featureGate=DRAPartitionableDevices
+ repeated DeviceCounterConsumption consumesCounters = 4;
+
+ // NodeName identifies the node where the device is available.
+ //
+ // Must only be set if Spec.PerDeviceNodeSelection is set to true.
+ // At most one of NodeName, NodeSelector and AllNodes can be set.
+ //
+ // +optional
+ // +oneOf=DeviceNodeSelection
+ // +featureGate=DRAPartitionableDevices
+ optional string nodeName = 5;
+
+ // NodeSelector defines the nodes where the device is available.
+ //
+ // Must use exactly one term.
+ //
+ // Must only be set if Spec.PerDeviceNodeSelection is set to true.
+ // At most one of NodeName, NodeSelector and AllNodes can be set.
+ //
+ // +optional
+ // +oneOf=DeviceNodeSelection
+ // +featureGate=DRAPartitionableDevices
+ optional .k8s.io.api.core.v1.NodeSelector nodeSelector = 6;
+
+ // AllNodes indicates that all nodes have access to the device.
+ //
+ // Must only be set if Spec.PerDeviceNodeSelection is set to true.
+ // At most one of NodeName, NodeSelector and AllNodes can be set.
+ //
+ // +optional
+ // +oneOf=DeviceNodeSelection
+ // +featureGate=DRAPartitionableDevices
+ optional bool allNodes = 7;
+
+ // If specified, these are the driver-defined taints.
+ //
+ // The maximum number of taints is 4.
+ //
+ // This is an alpha field and requires enabling the DRADeviceTaints
+ // feature gate.
+ //
+ // +optional
+ // +listType=atomic
+ // +featureGate=DRADeviceTaints
+ repeated DeviceTaint taints = 8;
+
+ // BindsToNode indicates if the usage of an allocation involving this device
+ // has to be limited to exactly the node that was chosen when allocating the claim.
+ // If set to true, the scheduler will set the ResourceClaim.Status.Allocation.NodeSelector
+ // to match the node where the allocation was made.
+ //
+ // This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
+ // feature gates.
+ //
+ // +optional
+ // +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
+ optional bool bindsToNode = 9;
+
+ // BindingConditions defines the conditions for proceeding with binding.
+ // All of these conditions must be set in the per-device status
+ // conditions with a value of True to proceed with binding the pod to the node
+ // while scheduling the pod.
+ //
+ // The maximum number of binding conditions is 4.
+ //
+ // The conditions must be a valid condition type string.
+ //
+ // This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
+ // feature gates.
+ //
+ // +optional
+ // +listType=atomic
+ // +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
+ repeated string bindingConditions = 10;
+
+ // BindingFailureConditions defines the conditions for binding failure.
+ // They may be set in the per-device status conditions.
+ // If any is set to "True", a binding failure occurred.
+ //
+ // The maximum number of binding failure conditions is 4.
+ //
+ // The conditions must be a valid condition type string.
+ //
+ // This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
+ // feature gates.
+ //
+ // +optional
+ // +listType=atomic
+ // +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
+ repeated string bindingFailureConditions = 11;
+
+ // AllowMultipleAllocations marks whether the device is allowed to be allocated to multiple DeviceRequests.
+ //
+ // If AllowMultipleAllocations is set to true, the device can be allocated more than once,
+ // and all of its capacity is consumable, regardless of whether the requestPolicy is defined or not.
+ //
+ // +optional
+ // +featureGate=DRAConsumableCapacity
+ optional bool allowMultipleAllocations = 12;
+}
+
+// DeviceAllocationConfiguration gets embedded in an AllocationResult.
+message DeviceAllocationConfiguration {
+ // Source records whether the configuration comes from a class and thus
+ // is not something that a normal user would have been able to set
+ // or from a claim.
+ //
+ // +required
+ optional string source = 1;
+
+ // Requests lists the names of requests where the configuration applies.
+ // If empty, its applies to all requests.
+ //
+ // References to subrequests must include the name of the main request
+ // and may include the subrequest using the format [/]. If just
+ // the main request is given, the configuration applies to all subrequests.
+ //
+ // +optional
+ // +listType=atomic
+ repeated string requests = 2;
+
+ optional DeviceConfiguration deviceConfiguration = 3;
+}
+
+// DeviceAllocationResult is the result of allocating devices.
+message DeviceAllocationResult {
+ // Results lists all allocated devices.
+ //
+ // +optional
+ // +listType=atomic
+ repeated DeviceRequestAllocationResult results = 1;
+
+ // This field is a combination of all the claim and class configuration parameters.
+ // Drivers can distinguish between those based on a flag.
+ //
+ // This includes configuration parameters for drivers which have no allocated
+ // devices in the result because it is up to the drivers which configuration
+ // parameters they support. They can silently ignore unknown configuration
+ // parameters.
+ //
+ // +optional
+ // +listType=atomic
+ repeated DeviceAllocationConfiguration config = 2;
+}
+
+// DeviceAttribute must have exactly one field set.
+message DeviceAttribute {
+ // IntValue is a number.
+ //
+ // +optional
+ // +oneOf=ValueType
+ optional int64 int = 2;
+
+ // BoolValue is a true/false value.
+ //
+ // +optional
+ // +oneOf=ValueType
+ optional bool bool = 3;
+
+ // StringValue is a string. Must not be longer than 64 characters.
+ //
+ // +optional
+ // +oneOf=ValueType
+ optional string string = 4;
+
+ // VersionValue is a semantic version according to semver.org spec 2.0.0.
+ // Must not be longer than 64 characters.
+ //
+ // +optional
+ // +oneOf=ValueType
+ optional string version = 5;
+}
+
+// DeviceCapacity describes a quantity associated with a device.
+message DeviceCapacity {
+ // Value defines how much of a certain capacity that device has.
+ //
+ // This field reflects the fixed total capacity and does not change.
+ // The consumed amount is tracked separately by scheduler
+ // and does not affect this value.
+ //
+ // +required
+ optional .k8s.io.apimachinery.pkg.api.resource.Quantity value = 1;
+
+ // RequestPolicy defines how this DeviceCapacity must be consumed
+ // when the device is allowed to be shared by multiple allocations.
+ //
+ // The Device must have allowMultipleAllocations set to true in order to set a requestPolicy.
+ //
+ // If unset, capacity requests are unconstrained:
+ // requests can consume any amount of capacity, as long as the total consumed
+ // across all allocations does not exceed the device's defined capacity.
+ // If request is also unset, default is the full capacity value.
+ //
+ // +optional
+ // +featureGate=DRAConsumableCapacity
+ optional CapacityRequestPolicy requestPolicy = 2;
+}
+
+// DeviceClaim defines how to request devices with a ResourceClaim.
+message DeviceClaim {
+ // Requests represent individual requests for distinct devices which
+ // must all be satisfied. If empty, nothing needs to be allocated.
+ //
+ // +optional
+ // +listType=atomic
+ repeated DeviceRequest requests = 1;
+
+ // These constraints must be satisfied by the set of devices that get
+ // allocated for the claim.
+ //
+ // +optional
+ // +listType=atomic
+ repeated DeviceConstraint constraints = 2;
+
+ // This field holds configuration for multiple potential drivers which
+ // could satisfy requests in this claim. It is ignored while allocating
+ // the claim.
+ //
+ // +optional
+ // +listType=atomic
+ repeated DeviceClaimConfiguration config = 3;
+}
+
+// DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.
+message DeviceClaimConfiguration {
+ // Requests lists the names of requests where the configuration applies.
+ // If empty, it applies to all requests.
+ //
+ // References to subrequests must include the name of the main request
+ // and may include the subrequest using the format [/]. If just
+ // the main request is given, the configuration applies to all subrequests.
+ //
+ // +optional
+ // +listType=atomic
+ repeated string requests = 1;
+
+ optional DeviceConfiguration deviceConfiguration = 2;
+}
+
+// DeviceClass is a vendor- or admin-provided resource that contains
+// device configuration and selectors. It can be referenced in
+// the device requests of a claim to apply these presets.
+// Cluster scoped.
+//
+// This is an alpha type and requires enabling the DynamicResourceAllocation
+// feature gate.
+message DeviceClass {
+ // Standard object metadata
+ // +optional
+ optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec defines what can be allocated and how to configure it.
+ //
+ // This is mutable. Consumers have to be prepared for classes changing
+ // at any time, either because they get updated or replaced. Claim
+ // allocations are done once based on whatever was set in classes at
+ // the time of allocation.
+ //
+ // Changing the spec automatically increments the metadata.generation number.
+ optional DeviceClassSpec spec = 2;
+}
+
+// DeviceClassConfiguration is used in DeviceClass.
+message DeviceClassConfiguration {
+ optional DeviceConfiguration deviceConfiguration = 1;
+}
+
+// DeviceClassList is a collection of classes.
+message DeviceClassList {
+ // Standard list metadata
+ // +optional
+ optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of resource classes.
+ repeated DeviceClass items = 2;
+}
+
+// DeviceClassSpec is used in a [DeviceClass] to define what can be allocated
+// and how to configure it.
+message DeviceClassSpec {
+ // Each selector must be satisfied by a device which is claimed via this class.
+ //
+ // +optional
+ // +listType=atomic
+ repeated DeviceSelector selectors = 1;
+
+ // Config defines configuration parameters that apply to each device that is claimed via this class.
+ // Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor
+ // configuration applies to exactly one driver.
+ //
+ // They are passed to the driver, but are not considered while allocating the claim.
+ //
+ // +optional
+ // +listType=atomic
+ repeated DeviceClassConfiguration config = 2;
+
+ // ExtendedResourceName is the extended resource name for the devices of this class.
+ // The devices of this class can be used to satisfy a pod's extended resource requests.
+ // It has the same format as the name of a pod's extended resource.
+ // It should be unique among all the device classes in a cluster.
+ // If two device classes have the same name, then the class created later
+ // is picked to satisfy a pod's extended resource requests.
+ // If two classes are created at the same time, then the name of the class
+ // lexicographically sorted first is picked.
+ //
+ // This is an alpha field.
+ // +optional
+ // +featureGate=DRAExtendedResource
+ optional string extendedResourceName = 4;
+}
+
+// DeviceConfiguration must have exactly one field set. It gets embedded
+// inline in some other structs which have other fields, so field names must
+// not conflict with those.
+message DeviceConfiguration {
+ // Opaque provides driver-specific configuration parameters.
+ //
+ // +optional
+ // +oneOf=ConfigurationType
+ optional OpaqueDeviceConfiguration opaque = 1;
+}
+
+// DeviceConstraint must have exactly one field set besides Requests.
+message DeviceConstraint {
+ // Requests is a list of the one or more requests in this claim which
+ // must co-satisfy this constraint. If a request is fulfilled by
+ // multiple devices, then all of the devices must satisfy the
+ // constraint. If this is not specified, this constraint applies to all
+ // requests in this claim.
+ //
+ // References to subrequests must include the name of the main request
+ // and may include the subrequest using the format [/]. If just
+ // the main request is given, the constraint applies to all subrequests.
+ //
+ // +optional
+ // +listType=atomic
+ repeated string requests = 1;
+
+ // MatchAttribute requires that all devices in question have this
+ // attribute and that its type and value are the same across those
+ // devices.
+ //
+ // For example, if you specified "dra.example.com/numa" (a hypothetical example!),
+ // then only devices in the same NUMA node will be chosen. A device which
+ // does not have that attribute will not be chosen. All devices should
+ // use a value of the same type for this attribute because that is part of
+ // its specification, but if one device doesn't, then it also will not be
+ // chosen.
+ //
+ // Must include the domain qualifier.
+ //
+ // +optional
+ // +oneOf=ConstraintType
+ optional string matchAttribute = 2;
+
+ // DistinctAttribute requires that all devices in question have this
+ // attribute and that its type and value are unique across those devices.
+ //
+ // This acts as the inverse of MatchAttribute.
+ //
+ // This constraint is used to avoid allocating multiple requests to the same device
+ // by ensuring attribute-level differentiation.
+ //
+ // This is useful for scenarios where resource requests must be fulfilled by separate physical devices.
+ // For example, a container requests two network interfaces that must be allocated from two different physical NICs.
+ //
+ // +optional
+ // +oneOf=ConstraintType
+ // +featureGate=DRAConsumableCapacity
+ optional string distinctAttribute = 3;
+}
+
+// DeviceCounterConsumption defines a set of counters that
+// a device will consume from a CounterSet.
+message DeviceCounterConsumption {
+ // CounterSet is the name of the set from which the
+ // counters defined will be consumed.
+ //
+ // +required
+ optional string counterSet = 1;
+
+ // Counters defines the counters that will be consumed by the device.
+ //
+ // The maximum number counters in a device is 32.
+ // In addition, the maximum number of all counters
+ // in all devices is 1024 (for example, 64 devices with
+ // 16 counters each).
+ //
+ // +required
+ map counters = 2;
+}
+
+// DeviceRequest is a request for devices required for a claim.
+// This is typically a request for a single resource like a device, but can
+// also ask for several identical devices. With FirstAvailable it is also
+// possible to provide a prioritized list of requests.
+message DeviceRequest {
+ // Name can be used to reference this request in a pod.spec.containers[].resources.claims
+ // entry and in a constraint of the claim.
+ //
+ // References using the name in the DeviceRequest will uniquely
+ // identify a request when the Exactly field is set. When the
+ // FirstAvailable field is set, a reference to the name of the
+ // DeviceRequest will match whatever subrequest is chosen by the
+ // scheduler.
+ //
+ // Must be a DNS label.
+ //
+ // +required
+ optional string name = 1;
+
+ // Exactly specifies the details for a single request that must
+ // be met exactly for the request to be satisfied.
+ //
+ // One of Exactly or FirstAvailable must be set.
+ //
+ // +optional
+ // +oneOf=deviceRequestType
+ optional ExactDeviceRequest exactly = 2;
+
+ // FirstAvailable contains subrequests, of which exactly one will be
+ // selected by the scheduler. It tries to
+ // satisfy them in the order in which they are listed here. So if
+ // there are two entries in the list, the scheduler will only check
+ // the second one if it determines that the first one can not be used.
+ //
+ // DRA does not yet implement scoring, so the scheduler will
+ // select the first set of devices that satisfies all the
+ // requests in the claim. And if the requirements can
+ // be satisfied on more than one node, other scheduling features
+ // will determine which node is chosen. This means that the set of
+ // devices allocated to a claim might not be the optimal set
+ // available to the cluster. Scoring will be implemented later.
+ //
+ // +optional
+ // +oneOf=deviceRequestType
+ // +listType=atomic
+ // +featureGate=DRAPrioritizedList
+ repeated DeviceSubRequest firstAvailable = 3;
+}
+
+// DeviceRequestAllocationResult contains the allocation result for one request.
+message DeviceRequestAllocationResult {
+ // Request is the name of the request in the claim which caused this
+ // device to be allocated. If it references a subrequest in the
+ // firstAvailable list on a DeviceRequest, this field must
+ // include both the name of the main request and the subrequest
+ // using the format /.
+ //
+ // Multiple devices may have been allocated per request.
+ //
+ // +required
+ optional string request = 1;
+
+ // Driver specifies the name of the DRA driver whose kubelet
+ // plugin should be invoked to process the allocation once the claim is
+ // needed on a node.
+ //
+ // Must be a DNS subdomain and should end with a DNS domain owned by the
+ // vendor of the driver.
+ //
+ // +required
+ optional string driver = 2;
+
+ // This name together with the driver name and the device name field
+ // identify which device was allocated (`//`).
+ //
+ // Must not be longer than 253 characters and may contain one or more
+ // DNS sub-domains separated by slashes.
+ //
+ // +required
+ optional string pool = 3;
+
+ // Device references one device instance via its name in the driver's
+ // resource pool. It must be a DNS label.
+ //
+ // +required
+ optional string device = 4;
+
+ // AdminAccess indicates that this device was allocated for
+ // administrative access. See the corresponding request field
+ // for a definition of mode.
+ //
+ // This is an alpha field and requires enabling the DRAAdminAccess
+ // feature gate. Admin access is disabled if this field is unset or
+ // set to false, otherwise it is enabled.
+ //
+ // +optional
+ // +featureGate=DRAAdminAccess
+ optional bool adminAccess = 5;
+
+ // A copy of all tolerations specified in the request at the time
+ // when the device got allocated.
+ //
+ // The maximum number of tolerations is 16.
+ //
+ // This is an alpha field and requires enabling the DRADeviceTaints
+ // feature gate.
+ //
+ // +optional
+ // +listType=atomic
+ // +featureGate=DRADeviceTaints
+ repeated DeviceToleration tolerations = 6;
+
+ // BindingConditions contains a copy of the BindingConditions
+ // from the corresponding ResourceSlice at the time of allocation.
+ //
+ // This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
+ // feature gates.
+ //
+ // +optional
+ // +listType=atomic
+ // +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
+ repeated string bindingConditions = 7;
+
+ // BindingFailureConditions contains a copy of the BindingFailureConditions
+ // from the corresponding ResourceSlice at the time of allocation.
+ //
+ // This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
+ // feature gates.
+ //
+ // +optional
+ // +listType=atomic
+ // +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
+ repeated string bindingFailureConditions = 8;
+
+ // ShareID uniquely identifies an individual allocation share of the device,
+ // used when the device supports multiple simultaneous allocations.
+ // It serves as an additional map key to differentiate concurrent shares
+ // of the same device.
+ //
+ // +optional
+ // +featureGate=DRAConsumableCapacity
+ optional string shareID = 9;
+
+ // ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request.
+ // The consumed amount may differ from the requested amount: it is rounded up to the nearest valid
+ // value based on the device’s requestPolicy if applicable (i.e., may not be less than the requested amount).
+ //
+ // The total consumed capacity for each device must not exceed the DeviceCapacity's Value.
+ //
+ // This field is populated only for devices that allow multiple allocations.
+ // All capacity entries are included, even if the consumed amount is zero.
+ //
+ // +optional
+ // +featureGate=DRAConsumableCapacity
+ map consumedCapacity = 10;
+}
+
+// DeviceSelector must have exactly one field set.
+message DeviceSelector {
+ // CEL contains a CEL expression for selecting a device.
+ //
+ // +optional
+ // +oneOf=SelectorType
+ optional CELDeviceSelector cel = 1;
+}
+
+// DeviceSubRequest describes a request for device provided in the
+// claim.spec.devices.requests[].firstAvailable array. Each
+// is typically a request for a single resource like a device, but can
+// also ask for several identical devices.
+//
+// DeviceSubRequest is similar to ExactDeviceRequest, but doesn't expose the
+// AdminAccess field as that one is only supported when requesting a
+// specific device.
+message DeviceSubRequest {
+ // Name can be used to reference this subrequest in the list of constraints
+ // or the list of configurations for the claim. References must use the
+ // format /.
+ //
+ // Must be a DNS label.
+ //
+ // +required
+ optional string name = 1;
+
+ // DeviceClassName references a specific DeviceClass, which can define
+ // additional configuration and selectors to be inherited by this
+ // subrequest.
+ //
+ // A class is required. Which classes are available depends on the cluster.
+ //
+ // Administrators may use this to restrict which devices may get
+ // requested by only installing classes with selectors for permitted
+ // devices. If users are free to request anything without restrictions,
+ // then administrators can create an empty DeviceClass for users
+ // to reference.
+ //
+ // +required
+ optional string deviceClassName = 2;
+
+ // Selectors define criteria which must be satisfied by a specific
+ // device in order for that device to be considered for this
+ // subrequest. All selectors must be satisfied for a device to be
+ // considered.
+ //
+ // +optional
+ // +listType=atomic
+ repeated DeviceSelector selectors = 3;
+
+ // AllocationMode and its related fields define how devices are allocated
+ // to satisfy this subrequest. Supported values are:
+ //
+ // - ExactCount: This request is for a specific number of devices.
+ // This is the default. The exact number is provided in the
+ // count field.
+ //
+ // - All: This subrequest is for all of the matching devices in a pool.
+ // Allocation will fail if some devices are already allocated,
+ // unless adminAccess is requested.
+ //
+ // If AllocationMode is not specified, the default mode is ExactCount. If
+ // the mode is ExactCount and count is not specified, the default count is
+ // one. Any other subrequests must specify this field.
+ //
+ // More modes may get added in the future. Clients must refuse to handle
+ // requests with unknown modes.
+ //
+ // +optional
+ optional string allocationMode = 4;
+
+ // Count is used only when the count mode is "ExactCount". Must be greater than zero.
+ // If AllocationMode is ExactCount and this field is not specified, the default is one.
+ //
+ // +optional
+ // +oneOf=AllocationMode
+ optional int64 count = 5;
+
+ // If specified, the request's tolerations.
+ //
+ // Tolerations for NoSchedule are required to allocate a
+ // device which has a taint with that effect. The same applies
+ // to NoExecute.
+ //
+ // In addition, should any of the allocated devices get tainted
+ // with NoExecute after allocation and that effect is not tolerated,
+ // then all pods consuming the ResourceClaim get deleted to evict
+ // them. The scheduler will not let new pods reserve the claim while
+ // it has these tainted devices. Once all pods are evicted, the
+ // claim will get deallocated.
+ //
+ // The maximum number of tolerations is 16.
+ //
+ // This is an alpha field and requires enabling the DRADeviceTaints
+ // feature gate.
+ //
+ // +optional
+ // +listType=atomic
+ // +featureGate=DRADeviceTaints
+ repeated DeviceToleration tolerations = 6;
+
+ // Capacity define resource requirements against each capacity.
+ //
+ // If this field is unset and the device supports multiple allocations,
+ // the default value will be applied to each capacity according to requestPolicy.
+ // For the capacity that has no requestPolicy, default is the full capacity value.
+ //
+ // Applies to each device allocation.
+ // If Count > 1,
+ // the request fails if there aren't enough devices that meet the requirements.
+ // If AllocationMode is set to All,
+ // the request fails if there are devices that otherwise match the request,
+ // and have this capacity, with a value >= the requested amount, but which cannot be allocated to this request.
+ //
+ // +optional
+ // +featureGate=DRAConsumableCapacity
+ optional CapacityRequirements capacity = 7;
+}
+
+// The device this taint is attached to has the "effect" on
+// any claim which does not tolerate the taint and, through the claim,
+// to pods using the claim.
+//
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+message DeviceTaint {
+ // The taint key to be applied to a device.
+ // Must be a label name.
+ //
+ // +required
+ optional string key = 1;
+
+ // The taint value corresponding to the taint key.
+ // Must be a label value.
+ //
+ // +optional
+ optional string value = 2;
+
+ // The effect of the taint on claims that do not tolerate the taint
+ // and through such claims on the pods using them.
+ // Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for
+ // nodes is not valid here.
+ //
+ // +required
+ optional string effect = 3;
+
+ // TimeAdded represents the time at which the taint was added.
+ // Added automatically during create or update if not set.
+ //
+ // +optional
+ optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time timeAdded = 4;
+}
+
+// The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches
+// the triple using the matching operator .
+message DeviceToleration {
+ // Key is the taint key that the toleration applies to. Empty means match all taint keys.
+ // If the key is empty, operator must be Exists; this combination means to match all values and all keys.
+ // Must be a label name.
+ //
+ // +optional
+ optional string key = 1;
+
+ // 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 ResourceClaim can
+ // tolerate all taints of a particular category.
+ //
+ // +optional
+ // +default="Equal"
+ optional string operator = 2;
+
+ // Value is the taint value the toleration matches to.
+ // If the operator is Exists, the value must be empty, otherwise just a regular string.
+ // Must be a label value.
+ //
+ // +optional
+ optional string value = 3;
+
+ // Effect indicates the taint effect to match. Empty means match all taint effects.
+ // When specified, allowed values are NoSchedule and NoExecute.
+ //
+ // +optional
+ optional string effect = 4;
+
+ // TolerationSeconds represents the period of time the toleration (which must be
+ // of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
+ // it is not set, which means tolerate the taint forever (do not evict). Zero and
+ // negative values will be treated as 0 (evict immediately) by the system.
+ // If larger than zero, the time when the pod needs to be evicted is calculated as + .
+ //
+ // +optional
+ optional int64 tolerationSeconds = 5;
+}
+
+// ExactDeviceRequest is a request for one or more identical devices.
+message ExactDeviceRequest {
+ // DeviceClassName references a specific DeviceClass, which can define
+ // additional configuration and selectors to be inherited by this
+ // request.
+ //
+ // A DeviceClassName is required.
+ //
+ // Administrators may use this to restrict which devices may get
+ // requested by only installing classes with selectors for permitted
+ // devices. If users are free to request anything without restrictions,
+ // then administrators can create an empty DeviceClass for users
+ // to reference.
+ //
+ // +required
+ optional string deviceClassName = 1;
+
+ // Selectors define criteria which must be satisfied by a specific
+ // device in order for that device to be considered for this
+ // request. All selectors must be satisfied for a device to be
+ // considered.
+ //
+ // +optional
+ // +listType=atomic
+ repeated DeviceSelector selectors = 2;
+
+ // AllocationMode and its related fields define how devices are allocated
+ // to satisfy this request. Supported values are:
+ //
+ // - ExactCount: This request is for a specific number of devices.
+ // This is the default. The exact number is provided in the
+ // count field.
+ //
+ // - All: This request is for all of the matching devices in a pool.
+ // At least one device must exist on the node for the allocation to succeed.
+ // Allocation will fail if some devices are already allocated,
+ // unless adminAccess is requested.
+ //
+ // If AllocationMode is not specified, the default mode is ExactCount. If
+ // the mode is ExactCount and count is not specified, the default count is
+ // one. Any other requests must specify this field.
+ //
+ // More modes may get added in the future. Clients must refuse to handle
+ // requests with unknown modes.
+ //
+ // +optional
+ optional string allocationMode = 3;
+
+ // Count is used only when the count mode is "ExactCount". Must be greater than zero.
+ // If AllocationMode is ExactCount and this field is not specified, the default is one.
+ //
+ // +optional
+ // +oneOf=AllocationMode
+ optional int64 count = 4;
+
+ // AdminAccess indicates that this is a claim for administrative access
+ // to the device(s). Claims with AdminAccess are expected to be used for
+ // monitoring or other management services for a device. They ignore
+ // all ordinary claims to the device with respect to access modes and
+ // any resource allocations.
+ //
+ // This is an alpha field and requires enabling the DRAAdminAccess
+ // feature gate. Admin access is disabled if this field is unset or
+ // set to false, otherwise it is enabled.
+ //
+ // +optional
+ // +featureGate=DRAAdminAccess
+ optional bool adminAccess = 5;
+
+ // If specified, the request's tolerations.
+ //
+ // Tolerations for NoSchedule are required to allocate a
+ // device which has a taint with that effect. The same applies
+ // to NoExecute.
+ //
+ // In addition, should any of the allocated devices get tainted
+ // with NoExecute after allocation and that effect is not tolerated,
+ // then all pods consuming the ResourceClaim get deleted to evict
+ // them. The scheduler will not let new pods reserve the claim while
+ // it has these tainted devices. Once all pods are evicted, the
+ // claim will get deallocated.
+ //
+ // The maximum number of tolerations is 16.
+ //
+ // This is an alpha field and requires enabling the DRADeviceTaints
+ // feature gate.
+ //
+ // +optional
+ // +listType=atomic
+ // +featureGate=DRADeviceTaints
+ repeated DeviceToleration tolerations = 6;
+
+ // Capacity define resource requirements against each capacity.
+ //
+ // If this field is unset and the device supports multiple allocations,
+ // the default value will be applied to each capacity according to requestPolicy.
+ // For the capacity that has no requestPolicy, default is the full capacity value.
+ //
+ // Applies to each device allocation.
+ // If Count > 1,
+ // the request fails if there aren't enough devices that meet the requirements.
+ // If AllocationMode is set to All,
+ // the request fails if there are devices that otherwise match the request,
+ // and have this capacity, with a value >= the requested amount, but which cannot be allocated to this request.
+ //
+ // +optional
+ // +featureGate=DRAConsumableCapacity
+ optional CapacityRequirements capacity = 7;
+}
+
+// NetworkDeviceData provides network-related details for the allocated device.
+// This information may be filled by drivers or other components to configure
+// or identify the device within a network context.
+message NetworkDeviceData {
+ // InterfaceName specifies the name of the network interface associated with
+ // the allocated device. This might be the name of a physical or virtual
+ // network interface being configured in the pod.
+ //
+ // Must not be longer than 256 characters.
+ //
+ // +optional
+ optional string interfaceName = 1;
+
+ // IPs lists the network addresses assigned to the device's network interface.
+ // This can include both IPv4 and IPv6 addresses.
+ // The IPs are in the CIDR notation, which includes both the address and the
+ // associated subnet mask.
+ // e.g.: "192.0.2.5/24" for IPv4 and "2001:db8::5/64" for IPv6.
+ //
+ // +optional
+ // +listType=atomic
+ repeated string ips = 2;
+
+ // HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.
+ //
+ // Must not be longer than 128 characters.
+ //
+ // +optional
+ optional string hardwareAddress = 3;
+}
+
+// OpaqueDeviceConfiguration contains configuration parameters for a driver
+// in a format defined by the driver vendor.
+message OpaqueDeviceConfiguration {
+ // Driver is used to determine which kubelet plugin needs
+ // to be passed these configuration parameters.
+ //
+ // An admission policy provided by the driver developer could use this
+ // to decide whether it needs to validate them.
+ //
+ // Must be a DNS subdomain and should end with a DNS domain owned by the
+ // vendor of the driver.
+ //
+ // +required
+ optional string driver = 1;
+
+ // Parameters can contain arbitrary data. It is the responsibility of
+ // the driver developer to handle validation and versioning. Typically this
+ // includes self-identification and a version ("kind" + "apiVersion" for
+ // Kubernetes types), with conversion between different versions.
+ //
+ // The length of the raw data must be smaller or equal to 10 Ki.
+ //
+ // +required
+ optional .k8s.io.apimachinery.pkg.runtime.RawExtension parameters = 2;
+}
+
+// ResourceClaim describes a request for access to resources in the cluster,
+// for use by workloads. For example, if a workload needs an accelerator device
+// with specific properties, this is how that request is expressed. The status
+// stanza tracks whether this claim has been satisfied and what specific
+// resources have been allocated.
+//
+// This is an alpha type and requires enabling the DynamicResourceAllocation
+// feature gate.
+message ResourceClaim {
+ // Standard object metadata
+ // +optional
+ optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec describes what is being requested and how to configure it.
+ // The spec is immutable.
+ optional ResourceClaimSpec spec = 2;
+
+ // Status describes whether the claim is ready to use and what has been allocated.
+ // +optional
+ optional ResourceClaimStatus status = 3;
+}
+
+// ResourceClaimConsumerReference contains enough information to let you
+// locate the consumer of a ResourceClaim. The user must be a resource in the same
+// namespace as the ResourceClaim.
+message ResourceClaimConsumerReference {
+ // APIGroup is the group for the resource being referenced. It is
+ // empty for the core API. This matches the group in the APIVersion
+ // that is used when creating the resources.
+ // +optional
+ optional string apiGroup = 1;
+
+ // Resource is the type of resource being referenced, for example "pods".
+ // +required
+ optional string resource = 3;
+
+ // Name is the name of resource being referenced.
+ // +required
+ optional string name = 4;
+
+ // UID identifies exactly one incarnation of the resource.
+ // +required
+ optional string uid = 5;
+}
+
+// ResourceClaimList is a collection of claims.
+message ResourceClaimList {
+ // Standard list metadata
+ // +optional
+ optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of resource claims.
+ repeated ResourceClaim items = 2;
+}
+
+// ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.
+message ResourceClaimSpec {
+ // Devices defines how to request devices.
+ //
+ // +optional
+ optional DeviceClaim devices = 1;
+}
+
+// ResourceClaimStatus tracks whether the resource has been allocated and what
+// the result of that was.
+message ResourceClaimStatus {
+ // Allocation is set once the claim has been allocated successfully.
+ //
+ // +optional
+ optional AllocationResult allocation = 1;
+
+ // ReservedFor indicates which entities are currently allowed to use
+ // the claim. A Pod which references a ResourceClaim which is not
+ // reserved for that Pod will not be started. A claim that is in
+ // use or might be in use because it has been reserved must not get
+ // deallocated.
+ //
+ // In a cluster with multiple scheduler instances, two pods might get
+ // scheduled concurrently by different schedulers. When they reference
+ // the same ResourceClaim which already has reached its maximum number
+ // of consumers, only one pod can be scheduled.
+ //
+ // Both schedulers try to add their pod to the claim.status.reservedFor
+ // field, but only the update that reaches the API server first gets
+ // stored. The other one fails with an error and the scheduler
+ // which issued it knows that it must put the pod back into the queue,
+ // waiting for the ResourceClaim to become usable again.
+ //
+ // There can be at most 256 such reservations. This may get increased in
+ // the future, but not reduced.
+ //
+ // +optional
+ // +listType=map
+ // +listMapKey=uid
+ // +patchStrategy=merge
+ // +patchMergeKey=uid
+ repeated ResourceClaimConsumerReference reservedFor = 2;
+
+ // Devices contains the status of each device allocated for this
+ // claim, as reported by the driver. This can include driver-specific
+ // information. Entries are owned by their respective drivers.
+ //
+ // +optional
+ // +listType=map
+ // +listMapKey=driver
+ // +listMapKey=device
+ // +listMapKey=pool
+ // +listMapKey=shareID
+ // +featureGate=DRAResourceClaimDeviceStatus
+ repeated AllocatedDeviceStatus devices = 4;
+}
+
+// ResourceClaimTemplate is used to produce ResourceClaim objects.
+//
+// This is an alpha type and requires enabling the DynamicResourceAllocation
+// feature gate.
+message ResourceClaimTemplate {
+ // Standard object metadata
+ // +optional
+ optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Describes the ResourceClaim that is to be generated.
+ //
+ // This field is immutable. A ResourceClaim will get created by the
+ // control plane for a Pod when needed and then not get updated
+ // anymore.
+ optional ResourceClaimTemplateSpec spec = 2;
+}
+
+// ResourceClaimTemplateList is a collection of claim templates.
+message ResourceClaimTemplateList {
+ // Standard list metadata
+ // +optional
+ optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of resource claim templates.
+ repeated ResourceClaimTemplate items = 2;
+}
+
+// ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.
+message ResourceClaimTemplateSpec {
+ // ObjectMeta may contain labels and annotations that will be copied into the ResourceClaim
+ // when creating it. No other fields are allowed and will be rejected during
+ // validation.
+ // +optional
+ optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec for the ResourceClaim. The entire content is copied unchanged
+ // into the ResourceClaim that gets created from this template. The
+ // same fields as in a ResourceClaim are also valid here.
+ optional ResourceClaimSpec spec = 2;
+}
+
+// ResourcePool describes the pool that ResourceSlices belong to.
+message ResourcePool {
+ // Name is used to identify the pool. For node-local devices, this
+ // is often the node name, but this is not required.
+ //
+ // It must not be longer than 253 characters and must consist of one or more DNS sub-domains
+ // separated by slashes. This field is immutable.
+ //
+ // +required
+ optional string name = 1;
+
+ // Generation tracks the change in a pool over time. Whenever a driver
+ // changes something about one or more of the resources in a pool, it
+ // must change the generation in all ResourceSlices which are part of
+ // that pool. Consumers of ResourceSlices should only consider
+ // resources from the pool with the highest generation number. The
+ // generation may be reset by drivers, which should be fine for
+ // consumers, assuming that all ResourceSlices in a pool are updated to
+ // match or deleted.
+ //
+ // Combined with ResourceSliceCount, this mechanism enables consumers to
+ // detect pools which are comprised of multiple ResourceSlices and are
+ // in an incomplete state.
+ //
+ // +required
+ optional int64 generation = 2;
+
+ // ResourceSliceCount is the total number of ResourceSlices in the pool at this
+ // generation number. Must be greater than zero.
+ //
+ // Consumers can use this to check whether they have seen all ResourceSlices
+ // belonging to the same pool.
+ //
+ // +required
+ optional int64 resourceSliceCount = 3;
+}
+
+// ResourceSlice represents one or more resources in a pool of similar resources,
+// managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many
+// ResourceSlices comprise a pool is determined by the driver.
+//
+// At the moment, the only supported resources are devices with attributes and capacities.
+// Each device in a given pool, regardless of how many ResourceSlices, must have a unique name.
+// The ResourceSlice in which a device gets published may change over time. The unique identifier
+// for a device is the tuple , , .
+//
+// Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number
+// and updates all ResourceSlices with that new number and new resource definitions. A consumer
+// must only use ResourceSlices with the highest generation number and ignore all others.
+//
+// When allocating all resources in a pool matching certain criteria or when
+// looking for the best solution among several different alternatives, a
+// consumer should check the number of ResourceSlices in a pool (included in
+// each ResourceSlice) to determine whether its view of a pool is complete and
+// if not, should wait until the driver has completed updating the pool.
+//
+// For resources that are not local to a node, the node name is not set. Instead,
+// the driver may use a node selector to specify where the devices are available.
+//
+// This is an alpha type and requires enabling the DynamicResourceAllocation
+// feature gate.
+message ResourceSlice {
+ // Standard object metadata
+ // +optional
+ optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Contains the information published by the driver.
+ //
+ // Changing the spec automatically increments the metadata.generation number.
+ optional ResourceSliceSpec spec = 2;
+}
+
+// ResourceSliceList is a collection of ResourceSlices.
+message ResourceSliceList {
+ // Standard list metadata
+ // +optional
+ optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of resource ResourceSlices.
+ repeated ResourceSlice items = 2;
+}
+
+// ResourceSliceSpec contains the information published by the driver in one ResourceSlice.
+message ResourceSliceSpec {
+ // Driver identifies the DRA driver providing the capacity information.
+ // A field selector can be used to list only ResourceSlice
+ // objects with a certain driver name.
+ //
+ // Must be a DNS subdomain and should end with a DNS domain owned by the
+ // vendor of the driver. This field is immutable.
+ //
+ // +required
+ optional string driver = 1;
+
+ // Pool describes the pool that this ResourceSlice belongs to.
+ //
+ // +required
+ optional ResourcePool pool = 2;
+
+ // NodeName identifies the node which provides the resources in this pool.
+ // A field selector can be used to list only ResourceSlice
+ // objects belonging to a certain node.
+ //
+ // This field can be used to limit access from nodes to ResourceSlices with
+ // the same node name. It also indicates to autoscalers that adding
+ // new nodes of the same type as some old node might also make new
+ // resources available.
+ //
+ // Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
+ // This field is immutable.
+ //
+ // +optional
+ // +oneOf=NodeSelection
+ optional string nodeName = 3;
+
+ // NodeSelector defines which nodes have access to the resources in the pool,
+ // when that pool is not limited to a single node.
+ //
+ // Must use exactly one term.
+ //
+ // Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
+ //
+ // +optional
+ // +oneOf=NodeSelection
+ optional .k8s.io.api.core.v1.NodeSelector nodeSelector = 4;
+
+ // AllNodes indicates that all nodes have access to the resources in the pool.
+ //
+ // Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
+ //
+ // +optional
+ // +oneOf=NodeSelection
+ optional bool allNodes = 5;
+
+ // Devices lists some or all of the devices in this pool.
+ //
+ // Must not have more than 128 entries.
+ //
+ // +optional
+ // +listType=atomic
+ repeated Device devices = 6;
+
+ // PerDeviceNodeSelection defines whether the access from nodes to
+ // resources in the pool is set on the ResourceSlice level or on each
+ // device. If it is set to true, every device defined the ResourceSlice
+ // must specify this individually.
+ //
+ // Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
+ //
+ // +optional
+ // +oneOf=NodeSelection
+ // +featureGate=DRAPartitionableDevices
+ optional bool perDeviceNodeSelection = 7;
+
+ // SharedCounters defines a list of counter sets, each of which
+ // has a name and a list of counters available.
+ //
+ // The names of the SharedCounters must be unique in the ResourceSlice.
+ //
+ // The maximum number of counters in all sets is 32.
+ //
+ // +optional
+ // +listType=atomic
+ // +featureGate=DRAPartitionableDevices
+ repeated CounterSet sharedCounters = 8;
+}
+
diff --git a/hack/tools/vendor/k8s.io/api/resource/v1/register.go b/hack/tools/vendor/k8s.io/api/resource/v1/register.go
new file mode 100644
index 000000000000..dca649225601
--- /dev/null
+++ b/hack/tools/vendor/k8s.io/api/resource/v1/register.go
@@ -0,0 +1,60 @@
+/*
+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 v1
+
+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 = "resource.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// Adds the list of known types to the given scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &DeviceClass{},
+ &DeviceClassList{},
+ &ResourceClaim{},
+ &ResourceClaimList{},
+ &ResourceClaimTemplate{},
+ &ResourceClaimTemplateList{},
+ &ResourceSlice{},
+ &ResourceSliceList{},
+ )
+
+ // Add the watch version that applies
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/hack/tools/vendor/k8s.io/api/resource/v1/types.go b/hack/tools/vendor/k8s.io/api/resource/v1/types.go
new file mode 100644
index 000000000000..f29504444fff
--- /dev/null
+++ b/hack/tools/vendor/k8s.io/api/resource/v1/types.go
@@ -0,0 +1,1873 @@
+/*
+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 v1
+
+import (
+ v1 "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/apimachinery/pkg/util/validation"
+)
+
+const (
+ // Finalizer is the finalizer that gets set for claims
+ // which were allocated through a builtin controller.
+ // Reserved for use by Kubernetes, DRA driver controllers must
+ // use their own finalizer.
+ Finalizer = "resource.kubernetes.io/delete-protection"
+ // ExtendedResourceClaimAnnotation is the annotation applied on the generated
+ // special ResourceClaim. Its single valid value is "true".
+ // This is used only inside the scheduler.
+ ExtendedResourceClaimAnnotation = "resource.kubernetes.io/extended-resource-claim"
+ // Resource device class prefix is for generating implicit extended resource
+ // name for a device class when its ExtendedResourceName field is not
+ // specified. The generated name is this prefix + the device class name.
+ // The generated name may not be a valid extended resource name for use
+ // in pod.Spec.Resources.Requests, in that case, a valid name has to be specified
+ // explicitly in device class.
+ ResourceDeviceClassPrefix string = "deviceclass.resource.kubernetes.io/"
+)
+
+// +genclient
+// +genclient:nonNamespaced
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +k8s:prerelease-lifecycle-gen:introduced=1.34
+
+// ResourceSlice represents one or more resources in a pool of similar resources,
+// managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many
+// ResourceSlices comprise a pool is determined by the driver.
+//
+// At the moment, the only supported resources are devices with attributes and capacities.
+// Each device in a given pool, regardless of how many ResourceSlices, must have a unique name.
+// The ResourceSlice in which a device gets published may change over time. The unique identifier
+// for a device is the tuple , , .
+//
+// Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number
+// and updates all ResourceSlices with that new number and new resource definitions. A consumer
+// must only use ResourceSlices with the highest generation number and ignore all others.
+//
+// When allocating all resources in a pool matching certain criteria or when
+// looking for the best solution among several different alternatives, a
+// consumer should check the number of ResourceSlices in a pool (included in
+// each ResourceSlice) to determine whether its view of a pool is complete and
+// if not, should wait until the driver has completed updating the pool.
+//
+// For resources that are not local to a node, the node name is not set. Instead,
+// the driver may use a node selector to specify where the devices are available.
+//
+// This is an alpha type and requires enabling the DynamicResourceAllocation
+// feature gate.
+type ResourceSlice struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Contains the information published by the driver.
+ //
+ // Changing the spec automatically increments the metadata.generation number.
+ Spec ResourceSliceSpec `json:"spec" protobuf:"bytes,2,name=spec"`
+}
+
+const (
+ // ResourceSliceSelectorNodeName can be used in a [metav1.ListOptions]
+ // field selector to filter based on [ResourceSliceSpec.NodeName].
+ ResourceSliceSelectorNodeName = "spec.nodeName"
+ // ResourceSliceSelectorDriver can be used in a [metav1.ListOptions]
+ // field selector to filter based on [ResourceSliceSpec.Driver].
+ ResourceSliceSelectorDriver = "spec.driver"
+)
+
+// ResourceSliceSpec contains the information published by the driver in one ResourceSlice.
+type ResourceSliceSpec struct {
+ // Driver identifies the DRA driver providing the capacity information.
+ // A field selector can be used to list only ResourceSlice
+ // objects with a certain driver name.
+ //
+ // Must be a DNS subdomain and should end with a DNS domain owned by the
+ // vendor of the driver. This field is immutable.
+ //
+ // +required
+ Driver string `json:"driver" protobuf:"bytes,1,name=driver"`
+
+ // Pool describes the pool that this ResourceSlice belongs to.
+ //
+ // +required
+ Pool ResourcePool `json:"pool" protobuf:"bytes,2,name=pool"`
+
+ // NodeName identifies the node which provides the resources in this pool.
+ // A field selector can be used to list only ResourceSlice
+ // objects belonging to a certain node.
+ //
+ // This field can be used to limit access from nodes to ResourceSlices with
+ // the same node name. It also indicates to autoscalers that adding
+ // new nodes of the same type as some old node might also make new
+ // resources available.
+ //
+ // Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
+ // This field is immutable.
+ //
+ // +optional
+ // +oneOf=NodeSelection
+ NodeName *string `json:"nodeName,omitempty" protobuf:"bytes,3,opt,name=nodeName"`
+
+ // NodeSelector defines which nodes have access to the resources in the pool,
+ // when that pool is not limited to a single node.
+ //
+ // Must use exactly one term.
+ //
+ // Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
+ //
+ // +optional
+ // +oneOf=NodeSelection
+ NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty" protobuf:"bytes,4,opt,name=nodeSelector"`
+
+ // AllNodes indicates that all nodes have access to the resources in the pool.
+ //
+ // Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
+ //
+ // +optional
+ // +oneOf=NodeSelection
+ AllNodes *bool `json:"allNodes,omitempty" protobuf:"bytes,5,opt,name=allNodes"`
+
+ // Devices lists some or all of the devices in this pool.
+ //
+ // Must not have more than 128 entries.
+ //
+ // +optional
+ // +listType=atomic
+ Devices []Device `json:"devices" protobuf:"bytes,6,name=devices"`
+
+ // PerDeviceNodeSelection defines whether the access from nodes to
+ // resources in the pool is set on the ResourceSlice level or on each
+ // device. If it is set to true, every device defined the ResourceSlice
+ // must specify this individually.
+ //
+ // Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
+ //
+ // +optional
+ // +oneOf=NodeSelection
+ // +featureGate=DRAPartitionableDevices
+ PerDeviceNodeSelection *bool `json:"perDeviceNodeSelection,omitempty" protobuf:"bytes,7,name=perDeviceNodeSelection"`
+
+ // SharedCounters defines a list of counter sets, each of which
+ // has a name and a list of counters available.
+ //
+ // The names of the SharedCounters must be unique in the ResourceSlice.
+ //
+ // The maximum number of counters in all sets is 32.
+ //
+ // +optional
+ // +listType=atomic
+ // +featureGate=DRAPartitionableDevices
+ SharedCounters []CounterSet `json:"sharedCounters,omitempty" protobuf:"bytes,8,name=sharedCounters"`
+}
+
+// CounterSet defines a named set of counters
+// that are available to be used by devices defined in the
+// ResourceSlice.
+//
+// The counters are not allocatable by themselves, but
+// can be referenced by devices. When a device is allocated,
+// the portion of counters it uses will no longer be available for use
+// by other devices.
+type CounterSet struct {
+ // Name defines the name of the counter set.
+ // It must be a DNS label.
+ //
+ // +required
+ Name string `json:"name" protobuf:"bytes,1,name=name"`
+
+ // Counters defines the set of counters for this CounterSet
+ // The name of each counter must be unique in that set and must be a DNS label.
+ //
+ // The maximum number of counters in all sets is 32.
+ //
+ // +required
+ Counters map[string]Counter `json:"counters,omitempty" protobuf:"bytes,2,name=counters"`
+}
+
+// DriverNameMaxLength is the maximum valid length of a driver name in the
+// ResourceSliceSpec and other places. It's the same as for CSI driver names.
+const DriverNameMaxLength = 63
+
+// ResourcePool describes the pool that ResourceSlices belong to.
+type ResourcePool struct {
+ // Name is used to identify the pool. For node-local devices, this
+ // is often the node name, but this is not required.
+ //
+ // It must not be longer than 253 characters and must consist of one or more DNS sub-domains
+ // separated by slashes. This field is immutable.
+ //
+ // +required
+ Name string `json:"name" protobuf:"bytes,1,name=name"`
+
+ // Generation tracks the change in a pool over time. Whenever a driver
+ // changes something about one or more of the resources in a pool, it
+ // must change the generation in all ResourceSlices which are part of
+ // that pool. Consumers of ResourceSlices should only consider
+ // resources from the pool with the highest generation number. The
+ // generation may be reset by drivers, which should be fine for
+ // consumers, assuming that all ResourceSlices in a pool are updated to
+ // match or deleted.
+ //
+ // Combined with ResourceSliceCount, this mechanism enables consumers to
+ // detect pools which are comprised of multiple ResourceSlices and are
+ // in an incomplete state.
+ //
+ // +required
+ Generation int64 `json:"generation" protobuf:"bytes,2,name=generation"`
+
+ // ResourceSliceCount is the total number of ResourceSlices in the pool at this
+ // generation number. Must be greater than zero.
+ //
+ // Consumers can use this to check whether they have seen all ResourceSlices
+ // belonging to the same pool.
+ //
+ // +required
+ ResourceSliceCount int64 `json:"resourceSliceCount" protobuf:"bytes,3,name=resourceSliceCount"`
+}
+
+const ResourceSliceMaxSharedCapacity = 128
+const ResourceSliceMaxDevices = 128
+const PoolNameMaxLength = validation.DNS1123SubdomainMaxLength // Same as for a single node name.
+const BindingConditionsMaxSize = 4
+const BindingFailureConditionsMaxSize = 4
+
+// Defines the max number of shared counters that can be specified
+// in a ResourceSlice. The number is summed up across all sets.
+const ResourceSliceMaxSharedCounters = 32
+
+// Device represents one individual hardware instance that can be selected based
+// on its attributes. Besides the name, exactly one field must be set.
+type Device struct {
+ // Name is unique identifier among all devices managed by
+ // the driver in the pool. It must be a DNS label.
+ //
+ // +required
+ Name string `json:"name" protobuf:"bytes,1,name=name"`
+
+ // Attributes defines the set of attributes for this device.
+ // The name of each attribute must be unique in that set.
+ //
+ // The maximum number of attributes and capacities combined is 32.
+ //
+ // +optional
+ Attributes map[QualifiedName]DeviceAttribute `json:"attributes,omitempty" protobuf:"bytes,2,rep,name=attributes"`
+
+ // Capacity defines the set of capacities for this device.
+ // The name of each capacity must be unique in that set.
+ //
+ // The maximum number of attributes and capacities combined is 32.
+ //
+ // +optional
+ Capacity map[QualifiedName]DeviceCapacity `json:"capacity,omitempty" protobuf:"bytes,3,rep,name=capacity"`
+
+ // ConsumesCounters defines a list of references to sharedCounters
+ // and the set of counters that the device will
+ // consume from those counter sets.
+ //
+ // There can only be a single entry per counterSet.
+ //
+ // The total number of device counter consumption entries
+ // must be <= 32. In addition, the total number in the
+ // entire ResourceSlice must be <= 1024 (for example,
+ // 64 devices with 16 counters each).
+ //
+ // +optional
+ // +listType=atomic
+ // +featureGate=DRAPartitionableDevices
+ ConsumesCounters []DeviceCounterConsumption `json:"consumesCounters,omitempty" protobuf:"bytes,4,rep,name=consumesCounters"`
+
+ // NodeName identifies the node where the device is available.
+ //
+ // Must only be set if Spec.PerDeviceNodeSelection is set to true.
+ // At most one of NodeName, NodeSelector and AllNodes can be set.
+ //
+ // +optional
+ // +oneOf=DeviceNodeSelection
+ // +featureGate=DRAPartitionableDevices
+ NodeName *string `json:"nodeName,omitempty" protobuf:"bytes,5,opt,name=nodeName"`
+
+ // NodeSelector defines the nodes where the device is available.
+ //
+ // Must use exactly one term.
+ //
+ // Must only be set if Spec.PerDeviceNodeSelection is set to true.
+ // At most one of NodeName, NodeSelector and AllNodes can be set.
+ //
+ // +optional
+ // +oneOf=DeviceNodeSelection
+ // +featureGate=DRAPartitionableDevices
+ NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty" protobuf:"bytes,6,opt,name=nodeSelector"`
+
+ // AllNodes indicates that all nodes have access to the device.
+ //
+ // Must only be set if Spec.PerDeviceNodeSelection is set to true.
+ // At most one of NodeName, NodeSelector and AllNodes can be set.
+ //
+ // +optional
+ // +oneOf=DeviceNodeSelection
+ // +featureGate=DRAPartitionableDevices
+ AllNodes *bool `json:"allNodes,omitempty" protobuf:"bytes,7,opt,name=allNodes"`
+
+ // If specified, these are the driver-defined taints.
+ //
+ // The maximum number of taints is 4.
+ //
+ // This is an alpha field and requires enabling the DRADeviceTaints
+ // feature gate.
+ //
+ // +optional
+ // +listType=atomic
+ // +featureGate=DRADeviceTaints
+ Taints []DeviceTaint `json:"taints,omitempty" protobuf:"bytes,8,rep,name=taints"`
+
+ // BindsToNode indicates if the usage of an allocation involving this device
+ // has to be limited to exactly the node that was chosen when allocating the claim.
+ // If set to true, the scheduler will set the ResourceClaim.Status.Allocation.NodeSelector
+ // to match the node where the allocation was made.
+ //
+ // This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
+ // feature gates.
+ //
+ // +optional
+ // +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
+ BindsToNode *bool `json:"bindsToNode,omitempty" protobuf:"varint,9,opt,name=bindsToNode"`
+
+ // BindingConditions defines the conditions for proceeding with binding.
+ // All of these conditions must be set in the per-device status
+ // conditions with a value of True to proceed with binding the pod to the node
+ // while scheduling the pod.
+ //
+ // The maximum number of binding conditions is 4.
+ //
+ // The conditions must be a valid condition type string.
+ //
+ // This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
+ // feature gates.
+ //
+ // +optional
+ // +listType=atomic
+ // +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
+ BindingConditions []string `json:"bindingConditions,omitempty" protobuf:"bytes,10,rep,name=bindingConditions"`
+
+ // BindingFailureConditions defines the conditions for binding failure.
+ // They may be set in the per-device status conditions.
+ // If any is set to "True", a binding failure occurred.
+ //
+ // The maximum number of binding failure conditions is 4.
+ //
+ // The conditions must be a valid condition type string.
+ //
+ // This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
+ // feature gates.
+ //
+ // +optional
+ // +listType=atomic
+ // +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
+ BindingFailureConditions []string `json:"bindingFailureConditions,omitempty" protobuf:"bytes,11,rep,name=bindingFailureConditions"`
+
+ // AllowMultipleAllocations marks whether the device is allowed to be allocated to multiple DeviceRequests.
+ //
+ // If AllowMultipleAllocations is set to true, the device can be allocated more than once,
+ // and all of its capacity is consumable, regardless of whether the requestPolicy is defined or not.
+ //
+ // +optional
+ // +featureGate=DRAConsumableCapacity
+ AllowMultipleAllocations *bool `json:"allowMultipleAllocations,omitempty" protobuf:"bytes,12,opt,name=allowMultipleAllocations"`
+}
+
+// DeviceCounterConsumption defines a set of counters that
+// a device will consume from a CounterSet.
+type DeviceCounterConsumption struct {
+ // CounterSet is the name of the set from which the
+ // counters defined will be consumed.
+ //
+ // +required
+ CounterSet string `json:"counterSet" protobuf:"bytes,1,opt,name=counterSet"`
+
+ // Counters defines the counters that will be consumed by the device.
+ //
+ // The maximum number counters in a device is 32.
+ // In addition, the maximum number of all counters
+ // in all devices is 1024 (for example, 64 devices with
+ // 16 counters each).
+ //
+ // +required
+ Counters map[string]Counter `json:"counters,omitempty" protobuf:"bytes,2,opt,name=counters"`
+}
+
+// DeviceCapacity describes a quantity associated with a device.
+type DeviceCapacity struct {
+ // Value defines how much of a certain capacity that device has.
+ //
+ // This field reflects the fixed total capacity and does not change.
+ // The consumed amount is tracked separately by scheduler
+ // and does not affect this value.
+ //
+ // +required
+ Value resource.Quantity `json:"value" protobuf:"bytes,1,rep,name=value"`
+
+ // RequestPolicy defines how this DeviceCapacity must be consumed
+ // when the device is allowed to be shared by multiple allocations.
+ //
+ // The Device must have allowMultipleAllocations set to true in order to set a requestPolicy.
+ //
+ // If unset, capacity requests are unconstrained:
+ // requests can consume any amount of capacity, as long as the total consumed
+ // across all allocations does not exceed the device's defined capacity.
+ // If request is also unset, default is the full capacity value.
+ //
+ // +optional
+ // +featureGate=DRAConsumableCapacity
+ RequestPolicy *CapacityRequestPolicy `json:"requestPolicy,omitempty" protobuf:"bytes,2,opt,name=requestPolicy"`
+}
+
+// Counter describes a quantity associated with a device.
+type Counter struct {
+ // Value defines how much of a certain device counter is available.
+ //
+ // +required
+ Value resource.Quantity `json:"value" protobuf:"bytes,1,rep,name=value"`
+}
+
+// CapacityRequestPolicy defines how requests consume device capacity.
+//
+// Must not set more than one ValidRequestValues.
+type CapacityRequestPolicy struct {
+ // Default specifies how much of this capacity is consumed by a request
+ // that does not contain an entry for it in DeviceRequest's Capacity.
+ //
+ // +optional
+ Default *resource.Quantity `json:"default" protobuf:"bytes,1,opt,name=default"`
+
+ // ValidValues defines a set of acceptable quantity values in consuming requests.
+ //
+ // Must not contain more than 10 entries.
+ // Must be sorted in ascending order.
+ //
+ // If this field is set,
+ // Default must be defined and it must be included in ValidValues list.
+ //
+ // If the requested amount does not match any valid value but smaller than some valid values,
+ // the scheduler calculates the smallest valid value that is greater than or equal to the request.
+ // That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues).
+ //
+ // If the requested amount exceeds all valid values, the request violates the policy,
+ // and this device cannot be allocated.
+ //
+ // +optional
+ // +listType=atomic
+ // +oneOf=ValidRequestValues
+ ValidValues []resource.Quantity `json:"validValues,omitempty" protobuf:"bytes,3,opt,name=validValues"`
+
+ // ValidRange defines an acceptable quantity value range in consuming requests.
+ //
+ // If this field is set,
+ // Default must be defined and it must fall within the defined ValidRange.
+ //
+ // If the requested amount does not fall within the defined range, the request violates the policy,
+ // and this device cannot be allocated.
+ //
+ // If the request doesn't contain this capacity entry, Default value is used.
+ //
+ // +optional
+ // +oneOf=ValidRequestValues
+ ValidRange *CapacityRequestPolicyRange `json:"validRange,omitempty" protobuf:"bytes,4,opt,name=validRange"`
+}
+
+// CapacityRequestPolicyRange defines a valid range for consumable capacity values.
+//
+// - If the requested amount is less than Min, it is rounded up to the Min value.
+// - If Step is set and the requested amount is between Min and Max but not aligned with Step,
+// it will be rounded up to the next value equal to Min + (n * Step).
+// - If Step is not set, the requested amount is used as-is if it falls within the range Min to Max (if set).
+// - If the requested or rounded amount exceeds Max (if set), the request does not satisfy the policy,
+// and the device cannot be allocated.
+type CapacityRequestPolicyRange struct {
+ // Min specifies the minimum capacity allowed for a consumption request.
+ //
+ // Min must be greater than or equal to zero,
+ // and less than or equal to the capacity value.
+ // requestPolicy.default must be more than or equal to the minimum.
+ //
+ // +required
+ Min *resource.Quantity `json:"min,omitempty" protobuf:"bytes,1,opt,name=min"`
+
+ // Max defines the upper limit for capacity that can be requested.
+ //
+ // Max must be less than or equal to the capacity value.
+ // Min and requestPolicy.default must be less than or equal to the maximum.
+ //
+ // +optional
+ Max *resource.Quantity `json:"max,omitempty" protobuf:"bytes,2,opt,name=max"`
+
+ // Step defines the step size between valid capacity amounts within the range.
+ //
+ // Max (if set) and requestPolicy.default must be a multiple of Step.
+ // Min + Step must be less than or equal to the capacity value.
+ //
+ // +optional
+ Step *resource.Quantity `json:"step,omitempty" protobuf:"bytes,3,opt,name=step"`
+}
+
+// Limit for the sum of the number of entries in both attributes and capacity.
+const ResourceSliceMaxAttributesAndCapacitiesPerDevice = 32
+
+// Limit for the total number of counters in each device.
+const ResourceSliceMaxCountersPerDevice = 32
+
+// Limit for the total number of counters defined in devices in
+// a ResourceSlice. We want to allow up to 64 devices to specify
+// up to 16 counters, so the limit for the ResourceSlice will be 1024.
+const ResourceSliceMaxDeviceCountersPerSlice = 1024 // 64 * 16
+
+// QualifiedName is the name of a device attribute or capacity.
+//
+// Attributes and capacities are defined either by the owner of the specific
+// driver (usually the vendor) or by some 3rd party (e.g. the Kubernetes
+// project). Because they are sometimes compared across devices, a given name
+// is expected to mean the same thing and have the same type on all devices.
+//
+// Names must be either a C identifier (e.g. "theName") or a DNS subdomain
+// followed by a slash ("/") followed by a C identifier
+// (e.g. "dra.example.com/theName"). Names which do not include the
+// domain prefix are assumed to be part of the driver's domain. Attributes
+// or capacities defined by 3rd parties must include the domain prefix.
+//
+// The maximum length for the DNS subdomain is 63 characters (same as
+// for driver names) and the maximum length of the C identifier
+// is 32.
+type QualifiedName string
+
+// FullyQualifiedName is a QualifiedName where the domain is set.
+type FullyQualifiedName string
+
+// DeviceMaxDomainLength is the maximum length of the domain prefix in a fully-qualified name.
+const DeviceMaxDomainLength = 63
+
+// DeviceMaxIDLength is the maximum length of the identifier in a device attribute or capacity name (`/`).
+const DeviceMaxIDLength = 32
+
+// DeviceAttribute must have exactly one field set.
+type DeviceAttribute struct {
+ // The Go field names below have a Value suffix to avoid a conflict between the
+ // field "String" and the corresponding method. That method is required.
+ // The Kubernetes API is defined without that suffix to keep it more natural.
+
+ // IntValue is a number.
+ //
+ // +optional
+ // +oneOf=ValueType
+ IntValue *int64 `json:"int,omitempty" protobuf:"varint,2,opt,name=int"`
+
+ // BoolValue is a true/false value.
+ //
+ // +optional
+ // +oneOf=ValueType
+ BoolValue *bool `json:"bool,omitempty" protobuf:"varint,3,opt,name=bool"`
+
+ // StringValue is a string. Must not be longer than 64 characters.
+ //
+ // +optional
+ // +oneOf=ValueType
+ StringValue *string `json:"string,omitempty" protobuf:"bytes,4,opt,name=string"`
+
+ // VersionValue is a semantic version according to semver.org spec 2.0.0.
+ // Must not be longer than 64 characters.
+ //
+ // +optional
+ // +oneOf=ValueType
+ VersionValue *string `json:"version,omitempty" protobuf:"bytes,5,opt,name=version"`
+}
+
+// DeviceAttributeMaxValueLength is the maximum length of a string or version attribute value.
+const DeviceAttributeMaxValueLength = 64
+
+// DeviceTaintsMaxLength is the maximum number of taints per device.
+const DeviceTaintsMaxLength = 4
+
+// The device this taint is attached to has the "effect" on
+// any claim which does not tolerate the taint and, through the claim,
+// to pods using the claim.
+//
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type DeviceTaint struct {
+ // The taint key to be applied to a device.
+ // Must be a label name.
+ //
+ // +required
+ Key string `json:"key" protobuf:"bytes,1,name=key"`
+
+ // The taint value corresponding to the taint key.
+ // Must be a label value.
+ //
+ // +optional
+ Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`
+
+ // The effect of the taint on claims that do not tolerate the taint
+ // and through such claims on the pods using them.
+ // Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for
+ // nodes is not valid here.
+ //
+ // +required
+ Effect DeviceTaintEffect `json:"effect" protobuf:"bytes,3,name=effect,casttype=DeviceTaintEffect"`
+
+ // ^^^^
+ //
+ // Implementing PreferNoSchedule would depend on a scoring solution for DRA.
+ // It might get added as part of that.
+
+ // TimeAdded represents the time at which the taint was added.
+ // Added automatically during create or update if not set.
+ //
+ // +optional
+ TimeAdded *metav1.Time `json:"timeAdded,omitempty" protobuf:"bytes,4,opt,name=timeAdded"`
+
+ // ^^^
+ //
+ // This field was defined as "It is only written for NoExecute taints." for node taints.
+ // But in practice, Kubernetes never did anything with it (no validation, no defaulting,
+ // ignored during pod eviction in pkg/controller/tainteviction).
+}
+
+// +enum
+type DeviceTaintEffect string
+
+const (
+ // Do not allow new pods to schedule which use a tainted device 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.
+ DeviceTaintEffectNoSchedule DeviceTaintEffect = "NoSchedule"
+
+ // Evict any already-running pods that do not tolerate the device taint.
+ DeviceTaintEffectNoExecute DeviceTaintEffect = "NoExecute"
+)
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +k8s:prerelease-lifecycle-gen:introduced=1.34
+
+// ResourceSliceList is a collection of ResourceSlices.
+type ResourceSliceList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of resource ResourceSlices.
+ Items []ResourceSlice `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +k8s:prerelease-lifecycle-gen:introduced=1.34
+
+// ResourceClaim describes a request for access to resources in the cluster,
+// for use by workloads. For example, if a workload needs an accelerator device
+// with specific properties, this is how that request is expressed. The status
+// stanza tracks whether this claim has been satisfied and what specific
+// resources have been allocated.
+//
+// This is an alpha type and requires enabling the DynamicResourceAllocation
+// feature gate.
+type ResourceClaim struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec describes what is being requested and how to configure it.
+ // The spec is immutable.
+ Spec ResourceClaimSpec `json:"spec" protobuf:"bytes,2,name=spec"`
+
+ // Status describes whether the claim is ready to use and what has been allocated.
+ // +optional
+ Status ResourceClaimStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.
+type ResourceClaimSpec struct {
+ // Devices defines how to request devices.
+ //
+ // +optional
+ Devices DeviceClaim `json:"devices" protobuf:"bytes,1,name=devices"`
+
+ // Controller is tombstoned since Kubernetes 1.32 where
+ // it got removed. May be reused once decoding v1alpha3 is no longer
+ // supported.
+ // Controller string `json:"controller,omitempty" protobuf:"bytes,2,opt,name=controller"`
+}
+
+// DeviceClaim defines how to request devices with a ResourceClaim.
+type DeviceClaim struct {
+ // Requests represent individual requests for distinct devices which
+ // must all be satisfied. If empty, nothing needs to be allocated.
+ //
+ // +optional
+ // +listType=atomic
+ Requests []DeviceRequest `json:"requests" protobuf:"bytes,1,name=requests"`
+
+ // These constraints must be satisfied by the set of devices that get
+ // allocated for the claim.
+ //
+ // +optional
+ // +listType=atomic
+ Constraints []DeviceConstraint `json:"constraints,omitempty" protobuf:"bytes,2,opt,name=constraints"`
+
+ // This field holds configuration for multiple potential drivers which
+ // could satisfy requests in this claim. It is ignored while allocating
+ // the claim.
+ //
+ // +optional
+ // +listType=atomic
+ Config []DeviceClaimConfiguration `json:"config,omitempty" protobuf:"bytes,3,opt,name=config"`
+
+ // Potential future extension, ignored by older schedulers. This is
+ // fine because scoring allows users to define a preference, without
+ // making it a hard requirement.
+ //
+ // Score *SomeScoringStruct
+}
+
+const (
+ DeviceRequestsMaxSize = AllocationResultsMaxSize
+ DeviceConstraintsMaxSize = 32
+ DeviceConfigMaxSize = 32
+)
+
+// DRAAdminNamespaceLabelKey is a label key used to grant administrative access
+// to certain resource.k8s.io API types within a namespace. When this label is
+// set on a namespace with the value "true" (case-sensitive), it allows the use
+// of adminAccess: true in any namespaced resource.k8s.io API types. Currently,
+// this permission applies to ResourceClaim and ResourceClaimTemplate objects.
+const (
+ DRAAdminNamespaceLabelKey = "resource.kubernetes.io/admin-access"
+)
+
+// DeviceRequest is a request for devices required for a claim.
+// This is typically a request for a single resource like a device, but can
+// also ask for several identical devices. With FirstAvailable it is also
+// possible to provide a prioritized list of requests.
+type DeviceRequest struct {
+ // Name can be used to reference this request in a pod.spec.containers[].resources.claims
+ // entry and in a constraint of the claim.
+ //
+ // References using the name in the DeviceRequest will uniquely
+ // identify a request when the Exactly field is set. When the
+ // FirstAvailable field is set, a reference to the name of the
+ // DeviceRequest will match whatever subrequest is chosen by the
+ // scheduler.
+ //
+ // Must be a DNS label.
+ //
+ // +required
+ Name string `json:"name" protobuf:"bytes,1,name=name"`
+
+ // Exactly specifies the details for a single request that must
+ // be met exactly for the request to be satisfied.
+ //
+ // One of Exactly or FirstAvailable must be set.
+ //
+ // +optional
+ // +oneOf=deviceRequestType
+ Exactly *ExactDeviceRequest `json:"exactly,omitempty" protobuf:"bytes,2,name=exactly"`
+
+ // FirstAvailable contains subrequests, of which exactly one will be
+ // selected by the scheduler. It tries to
+ // satisfy them in the order in which they are listed here. So if
+ // there are two entries in the list, the scheduler will only check
+ // the second one if it determines that the first one can not be used.
+ //
+ // DRA does not yet implement scoring, so the scheduler will
+ // select the first set of devices that satisfies all the
+ // requests in the claim. And if the requirements can
+ // be satisfied on more than one node, other scheduling features
+ // will determine which node is chosen. This means that the set of
+ // devices allocated to a claim might not be the optimal set
+ // available to the cluster. Scoring will be implemented later.
+ //
+ // +optional
+ // +oneOf=deviceRequestType
+ // +listType=atomic
+ // +featureGate=DRAPrioritizedList
+ FirstAvailable []DeviceSubRequest `json:"firstAvailable,omitempty" protobuf:"bytes,3,name=firstAvailable"`
+}
+
+// ExactDeviceRequest is a request for one or more identical devices.
+type ExactDeviceRequest struct {
+ // DeviceClassName references a specific DeviceClass, which can define
+ // additional configuration and selectors to be inherited by this
+ // request.
+ //
+ // A DeviceClassName is required.
+ //
+ // Administrators may use this to restrict which devices may get
+ // requested by only installing classes with selectors for permitted
+ // devices. If users are free to request anything without restrictions,
+ // then administrators can create an empty DeviceClass for users
+ // to reference.
+ //
+ // +required
+ DeviceClassName string `json:"deviceClassName" protobuf:"bytes,1,name=deviceClassName"`
+
+ // Selectors define criteria which must be satisfied by a specific
+ // device in order for that device to be considered for this
+ // request. All selectors must be satisfied for a device to be
+ // considered.
+ //
+ // +optional
+ // +listType=atomic
+ Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,2,name=selectors"`
+
+ // AllocationMode and its related fields define how devices are allocated
+ // to satisfy this request. Supported values are:
+ //
+ // - ExactCount: This request is for a specific number of devices.
+ // This is the default. The exact number is provided in the
+ // count field.
+ //
+ // - All: This request is for all of the matching devices in a pool.
+ // At least one device must exist on the node for the allocation to succeed.
+ // Allocation will fail if some devices are already allocated,
+ // unless adminAccess is requested.
+ //
+ // If AllocationMode is not specified, the default mode is ExactCount. If
+ // the mode is ExactCount and count is not specified, the default count is
+ // one. Any other requests must specify this field.
+ //
+ // More modes may get added in the future. Clients must refuse to handle
+ // requests with unknown modes.
+ //
+ // +optional
+ AllocationMode DeviceAllocationMode `json:"allocationMode,omitempty" protobuf:"bytes,3,opt,name=allocationMode"`
+
+ // Count is used only when the count mode is "ExactCount". Must be greater than zero.
+ // If AllocationMode is ExactCount and this field is not specified, the default is one.
+ //
+ // +optional
+ // +oneOf=AllocationMode
+ Count int64 `json:"count,omitempty" protobuf:"bytes,4,opt,name=count"`
+
+ // AdminAccess indicates that this is a claim for administrative access
+ // to the device(s). Claims with AdminAccess are expected to be used for
+ // monitoring or other management services for a device. They ignore
+ // all ordinary claims to the device with respect to access modes and
+ // any resource allocations.
+ //
+ // This is an alpha field and requires enabling the DRAAdminAccess
+ // feature gate. Admin access is disabled if this field is unset or
+ // set to false, otherwise it is enabled.
+ //
+ // +optional
+ // +featureGate=DRAAdminAccess
+ AdminAccess *bool `json:"adminAccess,omitempty" protobuf:"bytes,5,opt,name=adminAccess"`
+
+ // If specified, the request's tolerations.
+ //
+ // Tolerations for NoSchedule are required to allocate a
+ // device which has a taint with that effect. The same applies
+ // to NoExecute.
+ //
+ // In addition, should any of the allocated devices get tainted
+ // with NoExecute after allocation and that effect is not tolerated,
+ // then all pods consuming the ResourceClaim get deleted to evict
+ // them. The scheduler will not let new pods reserve the claim while
+ // it has these tainted devices. Once all pods are evicted, the
+ // claim will get deallocated.
+ //
+ // The maximum number of tolerations is 16.
+ //
+ // This is an alpha field and requires enabling the DRADeviceTaints
+ // feature gate.
+ //
+ // +optional
+ // +listType=atomic
+ // +featureGate=DRADeviceTaints
+ Tolerations []DeviceToleration `json:"tolerations,omitempty" protobuf:"bytes,6,opt,name=tolerations"`
+
+ // Capacity define resource requirements against each capacity.
+ //
+ // If this field is unset and the device supports multiple allocations,
+ // the default value will be applied to each capacity according to requestPolicy.
+ // For the capacity that has no requestPolicy, default is the full capacity value.
+ //
+ // Applies to each device allocation.
+ // If Count > 1,
+ // the request fails if there aren't enough devices that meet the requirements.
+ // If AllocationMode is set to All,
+ // the request fails if there are devices that otherwise match the request,
+ // and have this capacity, with a value >= the requested amount, but which cannot be allocated to this request.
+ //
+ // +optional
+ // +featureGate=DRAConsumableCapacity
+ Capacity *CapacityRequirements `json:"capacity,omitempty" protobuf:"bytes,7,opt,name=capacity"`
+}
+
+// DeviceSubRequest describes a request for device provided in the
+// claim.spec.devices.requests[].firstAvailable array. Each
+// is typically a request for a single resource like a device, but can
+// also ask for several identical devices.
+//
+// DeviceSubRequest is similar to ExactDeviceRequest, but doesn't expose the
+// AdminAccess field as that one is only supported when requesting a
+// specific device.
+type DeviceSubRequest struct {
+ // Name can be used to reference this subrequest in the list of constraints
+ // or the list of configurations for the claim. References must use the
+ // format /.
+ //
+ // Must be a DNS label.
+ //
+ // +required
+ Name string `json:"name" protobuf:"bytes,1,name=name"`
+
+ // DeviceClassName references a specific DeviceClass, which can define
+ // additional configuration and selectors to be inherited by this
+ // subrequest.
+ //
+ // A class is required. Which classes are available depends on the cluster.
+ //
+ // Administrators may use this to restrict which devices may get
+ // requested by only installing classes with selectors for permitted
+ // devices. If users are free to request anything without restrictions,
+ // then administrators can create an empty DeviceClass for users
+ // to reference.
+ //
+ // +required
+ DeviceClassName string `json:"deviceClassName" protobuf:"bytes,2,name=deviceClassName"`
+
+ // Selectors define criteria which must be satisfied by a specific
+ // device in order for that device to be considered for this
+ // subrequest. All selectors must be satisfied for a device to be
+ // considered.
+ //
+ // +optional
+ // +listType=atomic
+ Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,3,name=selectors"`
+
+ // AllocationMode and its related fields define how devices are allocated
+ // to satisfy this subrequest. Supported values are:
+ //
+ // - ExactCount: This request is for a specific number of devices.
+ // This is the default. The exact number is provided in the
+ // count field.
+ //
+ // - All: This subrequest is for all of the matching devices in a pool.
+ // Allocation will fail if some devices are already allocated,
+ // unless adminAccess is requested.
+ //
+ // If AllocationMode is not specified, the default mode is ExactCount. If
+ // the mode is ExactCount and count is not specified, the default count is
+ // one. Any other subrequests must specify this field.
+ //
+ // More modes may get added in the future. Clients must refuse to handle
+ // requests with unknown modes.
+ //
+ // +optional
+ AllocationMode DeviceAllocationMode `json:"allocationMode,omitempty" protobuf:"bytes,4,opt,name=allocationMode"`
+
+ // Count is used only when the count mode is "ExactCount". Must be greater than zero.
+ // If AllocationMode is ExactCount and this field is not specified, the default is one.
+ //
+ // +optional
+ // +oneOf=AllocationMode
+ Count int64 `json:"count,omitempty" protobuf:"bytes,5,opt,name=count"`
+
+ // If specified, the request's tolerations.
+ //
+ // Tolerations for NoSchedule are required to allocate a
+ // device which has a taint with that effect. The same applies
+ // to NoExecute.
+ //
+ // In addition, should any of the allocated devices get tainted
+ // with NoExecute after allocation and that effect is not tolerated,
+ // then all pods consuming the ResourceClaim get deleted to evict
+ // them. The scheduler will not let new pods reserve the claim while
+ // it has these tainted devices. Once all pods are evicted, the
+ // claim will get deallocated.
+ //
+ // The maximum number of tolerations is 16.
+ //
+ // This is an alpha field and requires enabling the DRADeviceTaints
+ // feature gate.
+ //
+ // +optional
+ // +listType=atomic
+ // +featureGate=DRADeviceTaints
+ Tolerations []DeviceToleration `json:"tolerations,omitempty" protobuf:"bytes,6,opt,name=tolerations"`
+
+ // Capacity define resource requirements against each capacity.
+ //
+ // If this field is unset and the device supports multiple allocations,
+ // the default value will be applied to each capacity according to requestPolicy.
+ // For the capacity that has no requestPolicy, default is the full capacity value.
+ //
+ // Applies to each device allocation.
+ // If Count > 1,
+ // the request fails if there aren't enough devices that meet the requirements.
+ // If AllocationMode is set to All,
+ // the request fails if there are devices that otherwise match the request,
+ // and have this capacity, with a value >= the requested amount, but which cannot be allocated to this request.
+ //
+ // +optional
+ // +featureGate=DRAConsumableCapacity
+ Capacity *CapacityRequirements `json:"capacity,omitempty" protobuf:"bytes,7,opt,name=capacity"`
+}
+
+// CapacityRequirements defines the capacity requirements for a specific device request.
+type CapacityRequirements struct {
+ // Requests represent individual device resource requests for distinct resources,
+ // all of which must be provided by the device.
+ //
+ // This value is used as an additional filtering condition against the available capacity on the device.
+ // This is semantically equivalent to a CEL selector with
+ // `device.capacity[]..compareTo(quantity()) >= 0`.
+ // For example, device.capacity['test-driver.cdi.k8s.io'].counters.compareTo(quantity('2')) >= 0.
+ //
+ // When a requestPolicy is defined, the requested amount is adjusted upward
+ // to the nearest valid value based on the policy.
+ // If the requested amount cannot be adjusted to a valid value—because it exceeds what the requestPolicy allows—
+ // the device is considered ineligible for allocation.
+ //
+ // For any capacity that is not explicitly requested:
+ // - If no requestPolicy is set, the default consumed capacity is equal to the full device capacity
+ // (i.e., the whole device is claimed).
+ // - If a requestPolicy is set, the default consumed capacity is determined according to that policy.
+ //
+ // If the device allows multiple allocation,
+ // the aggregated amount across all requests must not exceed the capacity value.
+ // The consumed capacity, which may be adjusted based on the requestPolicy if defined,
+ // is recorded in the resource claim’s status.devices[*].consumedCapacity field.
+ //
+ // +optional
+ Requests map[QualifiedName]resource.Quantity `json:"requests,omitempty" protobuf:"bytes,1,rep,name=requests,castkey=QualifiedName"`
+}
+
+const (
+ DeviceSelectorsMaxSize = 32
+ FirstAvailableDeviceRequestMaxSize = 8
+ DeviceTolerationsMaxLength = 16
+)
+
+type DeviceAllocationMode string
+
+// Valid [DeviceRequest.CountMode] values.
+const (
+ DeviceAllocationModeExactCount = DeviceAllocationMode("ExactCount")
+ DeviceAllocationModeAll = DeviceAllocationMode("All")
+)
+
+// DeviceSelector must have exactly one field set.
+type DeviceSelector struct {
+ // CEL contains a CEL expression for selecting a device.
+ //
+ // +optional
+ // +oneOf=SelectorType
+ CEL *CELDeviceSelector `json:"cel,omitempty" protobuf:"bytes,1,opt,name=cel"`
+}
+
+// CELDeviceSelector contains a CEL expression for selecting a device.
+type CELDeviceSelector struct {
+ // Expression is a CEL expression which evaluates a single device. It
+ // must evaluate to true when the device under consideration satisfies
+ // the desired criteria, and false when it does not. Any other result
+ // is an error and causes allocation of devices to abort.
+ //
+ // The expression's input is an object named "device", which carries
+ // the following properties:
+ // - driver (string): the name of the driver which defines this device.
+ // - attributes (map[string]object): the device's attributes, grouped by prefix
+ // (e.g. device.attributes["dra.example.com"] evaluates to an object with all
+ // of the attributes which were prefixed by "dra.example.com".
+ // - capacity (map[string]object): the device's capacities, grouped by prefix.
+ // - allowMultipleAllocations (bool): the allowMultipleAllocations property of the device
+ // (v1.34+ with the DRAConsumableCapacity feature enabled).
+ //
+ // Example: Consider a device with driver="dra.example.com", which exposes
+ // two attributes named "model" and "ext.example.com/family" and which
+ // exposes one capacity named "modules". This input to this expression
+ // would have the following fields:
+ //
+ // device.driver
+ // device.attributes["dra.example.com"].model
+ // device.attributes["ext.example.com"].family
+ // device.capacity["dra.example.com"].modules
+ //
+ // The device.driver field can be used to check for a specific driver,
+ // either as a high-level precondition (i.e. you only want to consider
+ // devices from this driver) or as part of a multi-clause expression
+ // that is meant to consider devices from different drivers.
+ //
+ // The value type of each attribute is defined by the device
+ // definition, and users who write these expressions must consult the
+ // documentation for their specific drivers. The value type of each
+ // capacity is Quantity.
+ //
+ // If an unknown prefix is used as a lookup in either device.attributes
+ // or device.capacity, an empty map will be returned. Any reference to
+ // an unknown field will cause an evaluation error and allocation to
+ // abort.
+ //
+ // A robust expression should check for the existence of attributes
+ // before referencing them.
+ //
+ // For ease of use, the cel.bind() function is enabled, and can be used
+ // to simplify expressions that access multiple attributes with the
+ // same domain. For example:
+ //
+ // cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool)
+ //
+ // The length of the expression must be smaller or equal to 10 Ki. The
+ // cost of evaluating it is also limited based on the estimated number
+ // of logical steps.
+ //
+ // +required
+ Expression string `json:"expression" protobuf:"bytes,1,name=expression"`
+}
+
+// CELSelectorExpressionMaxCost specifies the cost limit for a single CEL selector
+// evaluation.
+//
+// There is no overall budget for selecting a device, so the actual time
+// required for that is proportional to the number of CEL selectors and how
+// often they need to be evaluated, which can vary depending on several factors
+// (number of devices, cluster utilization, additional constraints).
+//
+// Validation against this limit and [CELSelectorExpressionMaxLength] happens
+// only when setting an expression for the first time or when changing it. If
+// the limits are changed in a future Kubernetes release, existing users are
+// guaranteed that existing expressions will continue to be valid.
+//
+// However, the kube-scheduler also applies this cost limit at runtime, so it
+// could happen that a valid expression fails at runtime after an up- or
+// downgrade. This can also happen without version skew when the cost estimate
+// underestimated the actual cost. That this might happen is the reason why
+// kube-scheduler enforces the runtime limit instead of relying on validation.
+//
+// According to
+// https://github.com/kubernetes/kubernetes/blob/4aeaf1e99e82da8334c0d6dddd848a194cd44b4f/staging/src/k8s.io/apiserver/pkg/apis/cel/config.go#L20-L22,
+// this gives roughly 0.1 second for each expression evaluation.
+// However, this depends on how fast the machine is.
+const CELSelectorExpressionMaxCost = 1000000
+
+// CELSelectorExpressionMaxLength is the maximum length of a CEL selector expression string.
+const CELSelectorExpressionMaxLength = 10 * 1024
+
+// DeviceConstraint must have exactly one field set besides Requests.
+type DeviceConstraint struct {
+ // Requests is a list of the one or more requests in this claim which
+ // must co-satisfy this constraint. If a request is fulfilled by
+ // multiple devices, then all of the devices must satisfy the
+ // constraint. If this is not specified, this constraint applies to all
+ // requests in this claim.
+ //
+ // References to subrequests must include the name of the main request
+ // and may include the subrequest using the format [/]. If just
+ // the main request is given, the constraint applies to all subrequests.
+ //
+ // +optional
+ // +listType=atomic
+ Requests []string `json:"requests,omitempty" protobuf:"bytes,1,opt,name=requests"`
+
+ // MatchAttribute requires that all devices in question have this
+ // attribute and that its type and value are the same across those
+ // devices.
+ //
+ // For example, if you specified "dra.example.com/numa" (a hypothetical example!),
+ // then only devices in the same NUMA node will be chosen. A device which
+ // does not have that attribute will not be chosen. All devices should
+ // use a value of the same type for this attribute because that is part of
+ // its specification, but if one device doesn't, then it also will not be
+ // chosen.
+ //
+ // Must include the domain qualifier.
+ //
+ // +optional
+ // +oneOf=ConstraintType
+ MatchAttribute *FullyQualifiedName `json:"matchAttribute,omitempty" protobuf:"bytes,2,opt,name=matchAttribute"`
+
+ // Potential future extension, not part of the current design:
+ // A CEL expression which compares different devices and returns
+ // true if they match.
+ //
+ // Because it would be part of a one-of, old schedulers will not
+ // accidentally ignore this additional, for them unknown match
+ // criteria.
+ //
+ // MatchExpression string
+
+ // DistinctAttribute requires that all devices in question have this
+ // attribute and that its type and value are unique across those devices.
+ //
+ // This acts as the inverse of MatchAttribute.
+ //
+ // This constraint is used to avoid allocating multiple requests to the same device
+ // by ensuring attribute-level differentiation.
+ //
+ // This is useful for scenarios where resource requests must be fulfilled by separate physical devices.
+ // For example, a container requests two network interfaces that must be allocated from two different physical NICs.
+ //
+ // +optional
+ // +oneOf=ConstraintType
+ // +featureGate=DRAConsumableCapacity
+ DistinctAttribute *FullyQualifiedName `json:"distinctAttribute,omitempty" protobuf:"bytes,3,opt,name=distinctAttribute"`
+}
+
+// DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.
+type DeviceClaimConfiguration struct {
+ // Requests lists the names of requests where the configuration applies.
+ // If empty, it applies to all requests.
+ //
+ // References to subrequests must include the name of the main request
+ // and may include the subrequest using the format [/]. If just
+ // the main request is given, the configuration applies to all subrequests.
+ //
+ // +optional
+ // +listType=atomic
+ Requests []string `json:"requests,omitempty" protobuf:"bytes,1,opt,name=requests"`
+
+ DeviceConfiguration `json:",inline" protobuf:"bytes,2,name=deviceConfiguration"`
+}
+
+// DeviceConfiguration must have exactly one field set. It gets embedded
+// inline in some other structs which have other fields, so field names must
+// not conflict with those.
+type DeviceConfiguration struct {
+ // Opaque provides driver-specific configuration parameters.
+ //
+ // +optional
+ // +oneOf=ConfigurationType
+ Opaque *OpaqueDeviceConfiguration `json:"opaque,omitempty" protobuf:"bytes,1,opt,name=opaque"`
+}
+
+// OpaqueDeviceConfiguration contains configuration parameters for a driver
+// in a format defined by the driver vendor.
+type OpaqueDeviceConfiguration struct {
+ // Driver is used to determine which kubelet plugin needs
+ // to be passed these configuration parameters.
+ //
+ // An admission policy provided by the driver developer could use this
+ // to decide whether it needs to validate them.
+ //
+ // Must be a DNS subdomain and should end with a DNS domain owned by the
+ // vendor of the driver.
+ //
+ // +required
+ Driver string `json:"driver" protobuf:"bytes,1,name=driver"`
+
+ // Parameters can contain arbitrary data. It is the responsibility of
+ // the driver developer to handle validation and versioning. Typically this
+ // includes self-identification and a version ("kind" + "apiVersion" for
+ // Kubernetes types), with conversion between different versions.
+ //
+ // The length of the raw data must be smaller or equal to 10 Ki.
+ //
+ // +required
+ Parameters runtime.RawExtension `json:"parameters" protobuf:"bytes,2,name=parameters"`
+}
+
+// OpaqueParametersMaxLength is the maximum length of the raw data in an
+// [OpaqueDeviceConfiguration.Parameters] field.
+const OpaqueParametersMaxLength = 10 * 1024
+
+// The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches
+// the triple using the matching operator .
+type DeviceToleration struct {
+ // Key is the taint key that the toleration applies to. Empty means match all taint keys.
+ // If the key is empty, operator must be Exists; this combination means to match all values and all keys.
+ // Must be a label name.
+ //
+ // +optional
+ Key string `json:"key,omitempty" protobuf:"bytes,1,opt,name=key"`
+
+ // 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 ResourceClaim can
+ // tolerate all taints of a particular category.
+ //
+ // +optional
+ // +default="Equal"
+ Operator DeviceTolerationOperator `json:"operator,omitempty" protobuf:"bytes,2,opt,name=operator,casttype=DeviceTolerationOperator"`
+
+ // Value is the taint value the toleration matches to.
+ // If the operator is Exists, the value must be empty, otherwise just a regular string.
+ // Must be a label value.
+ //
+ // +optional
+ Value string `json:"value,omitempty" protobuf:"bytes,3,opt,name=value"`
+
+ // Effect indicates the taint effect to match. Empty means match all taint effects.
+ // When specified, allowed values are NoSchedule and NoExecute.
+ //
+ // +optional
+ Effect DeviceTaintEffect `json:"effect,omitempty" protobuf:"bytes,4,opt,name=effect,casttype=DeviceTaintEffect"`
+
+ // TolerationSeconds represents the period of time the toleration (which must be
+ // of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
+ // it is not set, which means tolerate the taint forever (do not evict). Zero and
+ // negative values will be treated as 0 (evict immediately) by the system.
+ // If larger than zero, the time when the pod needs to be evicted is calculated as + .
+ //
+ // +optional
+ TolerationSeconds *int64 `json:"tolerationSeconds,omitempty" protobuf:"varint,5,opt,name=tolerationSeconds"`
+}
+
+// A toleration operator is the set of operators that can be used in a toleration.
+//
+// +enum
+type DeviceTolerationOperator string
+
+const (
+ DeviceTolerationOpExists DeviceTolerationOperator = "Exists"
+ DeviceTolerationOpEqual DeviceTolerationOperator = "Equal"
+)
+
+// ResourceClaimStatus tracks whether the resource has been allocated and what
+// the result of that was.
+type ResourceClaimStatus struct {
+ // Allocation is set once the claim has been allocated successfully.
+ //
+ // +optional
+ Allocation *AllocationResult `json:"allocation,omitempty" protobuf:"bytes,1,opt,name=allocation"`
+
+ // ReservedFor indicates which entities are currently allowed to use
+ // the claim. A Pod which references a ResourceClaim which is not
+ // reserved for that Pod will not be started. A claim that is in
+ // use or might be in use because it has been reserved must not get
+ // deallocated.
+ //
+ // In a cluster with multiple scheduler instances, two pods might get
+ // scheduled concurrently by different schedulers. When they reference
+ // the same ResourceClaim which already has reached its maximum number
+ // of consumers, only one pod can be scheduled.
+ //
+ // Both schedulers try to add their pod to the claim.status.reservedFor
+ // field, but only the update that reaches the API server first gets
+ // stored. The other one fails with an error and the scheduler
+ // which issued it knows that it must put the pod back into the queue,
+ // waiting for the ResourceClaim to become usable again.
+ //
+ // There can be at most 256 such reservations. This may get increased in
+ // the future, but not reduced.
+ //
+ // +optional
+ // +listType=map
+ // +listMapKey=uid
+ // +patchStrategy=merge
+ // +patchMergeKey=uid
+ ReservedFor []ResourceClaimConsumerReference `json:"reservedFor,omitempty" protobuf:"bytes,2,opt,name=reservedFor" patchStrategy:"merge" patchMergeKey:"uid"`
+
+ // DeallocationRequested is tombstoned since Kubernetes 1.32 where
+ // it got removed. May be reused once decoding v1alpha3 is no longer
+ // supported.
+ // DeallocationRequested bool `json:"deallocationRequested,omitempty" protobuf:"bytes,3,opt,name=deallocationRequested"`
+
+ // Devices contains the status of each device allocated for this
+ // claim, as reported by the driver. This can include driver-specific
+ // information. Entries are owned by their respective drivers.
+ //
+ // +optional
+ // +listType=map
+ // +listMapKey=driver
+ // +listMapKey=device
+ // +listMapKey=pool
+ // +listMapKey=shareID
+ // +featureGate=DRAResourceClaimDeviceStatus
+ Devices []AllocatedDeviceStatus `json:"devices,omitempty" protobuf:"bytes,4,opt,name=devices"`
+}
+
+// ResourceClaimReservedForMaxSize is the maximum number of entries in
+// claim.status.reservedFor.
+const ResourceClaimReservedForMaxSize = 256
+
+// ResourceClaimConsumerReference contains enough information to let you
+// locate the consumer of a ResourceClaim. The user must be a resource in the same
+// namespace as the ResourceClaim.
+type ResourceClaimConsumerReference struct {
+ // APIGroup is the group for the resource being referenced. It is
+ // empty for the core API. This matches the group in the APIVersion
+ // that is used when creating the resources.
+ // +optional
+ APIGroup string `json:"apiGroup,omitempty" protobuf:"bytes,1,opt,name=apiGroup"`
+ // Resource is the type of resource being referenced, for example "pods".
+ // +required
+ Resource string `json:"resource" protobuf:"bytes,3,name=resource"`
+ // Name is the name of resource being referenced.
+ // +required
+ Name string `json:"name" protobuf:"bytes,4,name=name"`
+ // UID identifies exactly one incarnation of the resource.
+ // +required
+ UID types.UID `json:"uid" protobuf:"bytes,5,name=uid"`
+}
+
+// AllocationResult contains attributes of an allocated resource.
+type AllocationResult struct {
+ // Devices is the result of allocating devices.
+ //
+ // +optional
+ Devices DeviceAllocationResult `json:"devices,omitempty" protobuf:"bytes,1,opt,name=devices"`
+
+ // NodeSelector defines where the allocated resources are available. If
+ // unset, they are available everywhere.
+ //
+ // +optional
+ NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty" protobuf:"bytes,3,opt,name=nodeSelector"`
+
+ // Controller is tombstoned since Kubernetes 1.32 where
+ // it got removed. May be reused once decoding v1alpha3 is no longer
+ // supported.
+ // Controller string `json:"controller,omitempty" protobuf:"bytes,4,opt,name=controller"`
+
+ // AllocationTimestamp stores the time when the resources were allocated.
+ // This field is not guaranteed to be set, in which case that time is unknown.
+ //
+ // This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
+ // feature gate.
+ //
+ // +optional
+ // +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
+ AllocationTimestamp *metav1.Time `json:"allocationTimestamp,omitempty" protobuf:"bytes,5,opt,name=allocationTimestamp"`
+}
+
+// DeviceAllocationResult is the result of allocating devices.
+type DeviceAllocationResult struct {
+ // Results lists all allocated devices.
+ //
+ // +optional
+ // +listType=atomic
+ Results []DeviceRequestAllocationResult `json:"results,omitempty" protobuf:"bytes,1,opt,name=results"`
+
+ // This field is a combination of all the claim and class configuration parameters.
+ // Drivers can distinguish between those based on a flag.
+ //
+ // This includes configuration parameters for drivers which have no allocated
+ // devices in the result because it is up to the drivers which configuration
+ // parameters they support. They can silently ignore unknown configuration
+ // parameters.
+ //
+ // +optional
+ // +listType=atomic
+ Config []DeviceAllocationConfiguration `json:"config,omitempty" protobuf:"bytes,2,opt,name=config"`
+}
+
+// AllocationResultsMaxSize represents the maximum number of
+// entries in allocation.devices.results.
+const AllocationResultsMaxSize = 32
+
+// DeviceRequestAllocationResult contains the allocation result for one request.
+type DeviceRequestAllocationResult struct {
+ // Request is the name of the request in the claim which caused this
+ // device to be allocated. If it references a subrequest in the
+ // firstAvailable list on a DeviceRequest, this field must
+ // include both the name of the main request and the subrequest
+ // using the format /.
+ //
+ // Multiple devices may have been allocated per request.
+ //
+ // +required
+ Request string `json:"request" protobuf:"bytes,1,name=request"`
+
+ // Driver specifies the name of the DRA driver whose kubelet
+ // plugin should be invoked to process the allocation once the claim is
+ // needed on a node.
+ //
+ // Must be a DNS subdomain and should end with a DNS domain owned by the
+ // vendor of the driver.
+ //
+ // +required
+ Driver string `json:"driver" protobuf:"bytes,2,name=driver"`
+
+ // This name together with the driver name and the device name field
+ // identify which device was allocated (`//`).
+ //
+ // Must not be longer than 253 characters and may contain one or more
+ // DNS sub-domains separated by slashes.
+ //
+ // +required
+ Pool string `json:"pool" protobuf:"bytes,3,name=pool"`
+
+ // Device references one device instance via its name in the driver's
+ // resource pool. It must be a DNS label.
+ //
+ // +required
+ Device string `json:"device" protobuf:"bytes,4,name=device"`
+
+ // AdminAccess indicates that this device was allocated for
+ // administrative access. See the corresponding request field
+ // for a definition of mode.
+ //
+ // This is an alpha field and requires enabling the DRAAdminAccess
+ // feature gate. Admin access is disabled if this field is unset or
+ // set to false, otherwise it is enabled.
+ //
+ // +optional
+ // +featureGate=DRAAdminAccess
+ AdminAccess *bool `json:"adminAccess,omitempty" protobuf:"bytes,5,opt,name=adminAccess"`
+
+ // A copy of all tolerations specified in the request at the time
+ // when the device got allocated.
+ //
+ // The maximum number of tolerations is 16.
+ //
+ // This is an alpha field and requires enabling the DRADeviceTaints
+ // feature gate.
+ //
+ // +optional
+ // +listType=atomic
+ // +featureGate=DRADeviceTaints
+ Tolerations []DeviceToleration `json:"tolerations,omitempty" protobuf:"bytes,6,opt,name=tolerations"`
+
+ // BindingConditions contains a copy of the BindingConditions
+ // from the corresponding ResourceSlice at the time of allocation.
+ //
+ // This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
+ // feature gates.
+ //
+ // +optional
+ // +listType=atomic
+ // +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
+ BindingConditions []string `json:"bindingConditions,omitempty" protobuf:"bytes,7,rep,name=bindingConditions"`
+
+ // BindingFailureConditions contains a copy of the BindingFailureConditions
+ // from the corresponding ResourceSlice at the time of allocation.
+ //
+ // This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
+ // feature gates.
+ //
+ // +optional
+ // +listType=atomic
+ // +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
+ BindingFailureConditions []string `json:"bindingFailureConditions,omitempty" protobuf:"bytes,8,rep,name=bindingFailureConditions"`
+
+ // ShareID uniquely identifies an individual allocation share of the device,
+ // used when the device supports multiple simultaneous allocations.
+ // It serves as an additional map key to differentiate concurrent shares
+ // of the same device.
+ //
+ // +optional
+ // +featureGate=DRAConsumableCapacity
+ ShareID *types.UID `json:"shareID,omitempty" protobuf:"bytes,9,opt,name=shareID"`
+
+ // ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request.
+ // The consumed amount may differ from the requested amount: it is rounded up to the nearest valid
+ // value based on the device’s requestPolicy if applicable (i.e., may not be less than the requested amount).
+ //
+ // The total consumed capacity for each device must not exceed the DeviceCapacity's Value.
+ //
+ // This field is populated only for devices that allow multiple allocations.
+ // All capacity entries are included, even if the consumed amount is zero.
+ //
+ // +optional
+ // +featureGate=DRAConsumableCapacity
+ ConsumedCapacity map[QualifiedName]resource.Quantity `json:"consumedCapacity,omitempty" protobuf:"bytes,10,rep,name=consumedCapacity"`
+}
+
+// DeviceAllocationConfiguration gets embedded in an AllocationResult.
+type DeviceAllocationConfiguration struct {
+ // Source records whether the configuration comes from a class and thus
+ // is not something that a normal user would have been able to set
+ // or from a claim.
+ //
+ // +required
+ Source AllocationConfigSource `json:"source" protobuf:"bytes,1,name=source"`
+
+ // Requests lists the names of requests where the configuration applies.
+ // If empty, its applies to all requests.
+ //
+ // References to subrequests must include the name of the main request
+ // and may include the subrequest using the format [/]. If just
+ // the main request is given, the configuration applies to all subrequests.
+ //
+ // +optional
+ // +listType=atomic
+ Requests []string `json:"requests,omitempty" protobuf:"bytes,2,opt,name=requests"`
+
+ DeviceConfiguration `json:",inline" protobuf:"bytes,3,name=deviceConfiguration"`
+}
+
+type AllocationConfigSource string
+
+// Valid [DeviceAllocationConfiguration.Source] values.
+const (
+ AllocationConfigSourceClass = "FromClass"
+ AllocationConfigSourceClaim = "FromClaim"
+)
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +k8s:prerelease-lifecycle-gen:introduced=1.34
+
+// ResourceClaimList is a collection of claims.
+type ResourceClaimList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of resource claims.
+ Items []ResourceClaim `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient
+// +genclient:nonNamespaced
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +k8s:prerelease-lifecycle-gen:introduced=1.34
+
+// DeviceClass is a vendor- or admin-provided resource that contains
+// device configuration and selectors. It can be referenced in
+// the device requests of a claim to apply these presets.
+// Cluster scoped.
+//
+// This is an alpha type and requires enabling the DynamicResourceAllocation
+// feature gate.
+type DeviceClass struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines what can be allocated and how to configure it.
+ //
+ // This is mutable. Consumers have to be prepared for classes changing
+ // at any time, either because they get updated or replaced. Claim
+ // allocations are done once based on whatever was set in classes at
+ // the time of allocation.
+ //
+ // Changing the spec automatically increments the metadata.generation number.
+ Spec DeviceClassSpec `json:"spec" protobuf:"bytes,2,name=spec"`
+}
+
+// DeviceClassSpec is used in a [DeviceClass] to define what can be allocated
+// and how to configure it.
+type DeviceClassSpec struct {
+ // Each selector must be satisfied by a device which is claimed via this class.
+ //
+ // +optional
+ // +listType=atomic
+ Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,1,opt,name=selectors"`
+
+ // Config defines configuration parameters that apply to each device that is claimed via this class.
+ // Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor
+ // configuration applies to exactly one driver.
+ //
+ // They are passed to the driver, but are not considered while allocating the claim.
+ //
+ // +optional
+ // +listType=atomic
+ Config []DeviceClassConfiguration `json:"config,omitempty" protobuf:"bytes,2,opt,name=config"`
+
+ // SuitableNodes is tombstoned since Kubernetes 1.32 where
+ // it got removed. May be reused once decoding v1alpha3 is no longer
+ // supported.
+ // SuitableNodes *v1.NodeSelector `json:"suitableNodes,omitempty" protobuf:"bytes,3,opt,name=suitableNodes"`
+
+ // ExtendedResourceName is the extended resource name for the devices of this class.
+ // The devices of this class can be used to satisfy a pod's extended resource requests.
+ // It has the same format as the name of a pod's extended resource.
+ // It should be unique among all the device classes in a cluster.
+ // If two device classes have the same name, then the class created later
+ // is picked to satisfy a pod's extended resource requests.
+ // If two classes are created at the same time, then the name of the class
+ // lexicographically sorted first is picked.
+ //
+ // This is an alpha field.
+ // +optional
+ // +featureGate=DRAExtendedResource
+ ExtendedResourceName *string `json:"extendedResourceName,omitempty" protobuf:"bytes,4,opt,name=extendedResourceName"`
+}
+
+// DeviceClassConfiguration is used in DeviceClass.
+type DeviceClassConfiguration struct {
+ DeviceConfiguration `json:",inline" protobuf:"bytes,1,opt,name=deviceConfiguration"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +k8s:prerelease-lifecycle-gen:introduced=1.34
+
+// DeviceClassList is a collection of classes.
+type DeviceClassList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of resource classes.
+ Items []DeviceClass `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +k8s:prerelease-lifecycle-gen:introduced=1.34
+
+// ResourceClaimTemplate is used to produce ResourceClaim objects.
+//
+// This is an alpha type and requires enabling the DynamicResourceAllocation
+// feature gate.
+type ResourceClaimTemplate struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Describes the ResourceClaim that is to be generated.
+ //
+ // This field is immutable. A ResourceClaim will get created by the
+ // control plane for a Pod when needed and then not get updated
+ // anymore.
+ Spec ResourceClaimTemplateSpec `json:"spec" protobuf:"bytes,2,name=spec"`
+}
+
+// ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.
+type ResourceClaimTemplateSpec struct {
+ // ObjectMeta may contain labels and annotations that will be copied into the ResourceClaim
+ // when creating it. No other fields are allowed and will be rejected during
+ // validation.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec for the ResourceClaim. The entire content is copied unchanged
+ // into the ResourceClaim that gets created from this template. The
+ // same fields as in a ResourceClaim are also valid here.
+ Spec ResourceClaimSpec `json:"spec" protobuf:"bytes,2,name=spec"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +k8s:prerelease-lifecycle-gen:introduced=1.34
+
+// ResourceClaimTemplateList is a collection of claim templates.
+type ResourceClaimTemplateList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of resource claim templates.
+ Items []ResourceClaimTemplate `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+const (
+ // AllocatedDeviceStatusMaxConditions represents the maximum number of
+ // conditions in a device status.
+ AllocatedDeviceStatusMaxConditions int = 8
+ // AllocatedDeviceStatusDataMaxLength represents the maximum length of the
+ // raw data in the Data field in a device status.
+ AllocatedDeviceStatusDataMaxLength int = 10 * 1024
+ // NetworkDeviceDataMaxIPs represents the maximum number of IPs in the networkData
+ // field in a device status.
+ NetworkDeviceDataMaxIPs int = 16
+ // NetworkDeviceDataInterfaceNameMaxLength represents the maximum number of characters
+ // for the networkData.interfaceName field in a device status.
+ NetworkDeviceDataInterfaceNameMaxLength int = 256
+ // NetworkDeviceDataHardwareAddressMaxLength represents the maximum number of characters
+ // for the networkData.hardwareAddress field in a device status.
+ NetworkDeviceDataHardwareAddressMaxLength int = 128
+)
+
+// AllocatedDeviceStatus contains the status of an allocated device, if the
+// driver chooses to report it. This may include driver-specific information.
+//
+// The combination of Driver, Pool, Device, and ShareID must match the corresponding key
+// in Status.Allocation.Devices.
+type AllocatedDeviceStatus struct {
+ // Driver specifies the name of the DRA driver whose kubelet
+ // plugin should be invoked to process the allocation once the claim is
+ // needed on a node.
+ //
+ // Must be a DNS subdomain and should end with a DNS domain owned by the
+ // vendor of the driver.
+ //
+ // +required
+ Driver string `json:"driver" protobuf:"bytes,1,rep,name=driver"`
+
+ // This name together with the driver name and the device name field
+ // identify which device was allocated (`//`).
+ //
+ // Must not be longer than 253 characters and may contain one or more
+ // DNS sub-domains separated by slashes.
+ //
+ // +required
+ Pool string `json:"pool" protobuf:"bytes,2,rep,name=pool"`
+
+ // Device references one device instance via its name in the driver's
+ // resource pool. It must be a DNS label.
+ //
+ // +required
+ Device string `json:"device" protobuf:"bytes,3,rep,name=device"`
+
+ // ShareID uniquely identifies an individual allocation share of the device.
+ //
+ // +optional
+ // +featureGate=DRAConsumableCapacity
+ ShareID *string `json:"shareID,omitempty" protobuf:"bytes,7,opt,name=shareID"`
+
+ // Conditions contains the latest observation of the device's state.
+ // If the device has been configured according to the class and claim
+ // config references, the `Ready` condition should be True.
+ //
+ // Must not contain more than 8 entries.
+ //
+ // +optional
+ // +listType=map
+ // +listMapKey=type
+ Conditions []metav1.Condition `json:"conditions" protobuf:"bytes,4,opt,name=conditions"`
+
+ // Data contains arbitrary driver-specific data.
+ //
+ // The length of the raw data must be smaller or equal to 10 Ki.
+ //
+ // +optional
+ Data *runtime.RawExtension `json:"data,omitempty" protobuf:"bytes,5,opt,name=data"`
+
+ // NetworkData contains network-related information specific to the device.
+ //
+ // +optional
+ NetworkData *NetworkDeviceData `json:"networkData,omitempty" protobuf:"bytes,6,opt,name=networkData"`
+}
+
+// NetworkDeviceData provides network-related details for the allocated device.
+// This information may be filled by drivers or other components to configure
+// or identify the device within a network context.
+type NetworkDeviceData struct {
+ // InterfaceName specifies the name of the network interface associated with
+ // the allocated device. This might be the name of a physical or virtual
+ // network interface being configured in the pod.
+ //
+ // Must not be longer than 256 characters.
+ //
+ // +optional
+ InterfaceName string `json:"interfaceName,omitempty" protobuf:"bytes,1,opt,name=interfaceName"`
+
+ // IPs lists the network addresses assigned to the device's network interface.
+ // This can include both IPv4 and IPv6 addresses.
+ // The IPs are in the CIDR notation, which includes both the address and the
+ // associated subnet mask.
+ // e.g.: "192.0.2.5/24" for IPv4 and "2001:db8::5/64" for IPv6.
+ //
+ // +optional
+ // +listType=atomic
+ IPs []string `json:"ips,omitempty" protobuf:"bytes,2,opt,name=ips"`
+
+ // HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.
+ //
+ // Must not be longer than 128 characters.
+ //
+ // +optional
+ HardwareAddress string `json:"hardwareAddress,omitempty" protobuf:"bytes,3,opt,name=hardwareAddress"`
+}
diff --git a/hack/tools/vendor/k8s.io/api/resource/v1/types_swagger_doc_generated.go b/hack/tools/vendor/k8s.io/api/resource/v1/types_swagger_doc_generated.go
new file mode 100644
index 000000000000..bf81ced64ce6
--- /dev/null
+++ b/hack/tools/vendor/k8s.io/api/resource/v1/types_swagger_doc_generated.go
@@ -0,0 +1,510 @@
+/*
+Copyright 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 v1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-codegen.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
+var map_AllocatedDeviceStatus = map[string]string{
+ "": "AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.\n\nThe combination of Driver, Pool, Device, and ShareID must match the corresponding key in Status.Allocation.Devices.",
+ "driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.",
+ "pool": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.",
+ "device": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.",
+ "shareID": "ShareID uniquely identifies an individual allocation share of the device.",
+ "conditions": "Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True.\n\nMust not contain more than 8 entries.",
+ "data": "Data contains arbitrary driver-specific data.\n\nThe length of the raw data must be smaller or equal to 10 Ki.",
+ "networkData": "NetworkData contains network-related information specific to the device.",
+}
+
+func (AllocatedDeviceStatus) SwaggerDoc() map[string]string {
+ return map_AllocatedDeviceStatus
+}
+
+var map_AllocationResult = map[string]string{
+ "": "AllocationResult contains attributes of an allocated resource.",
+ "devices": "Devices is the result of allocating devices.",
+ "nodeSelector": "NodeSelector defines where the allocated resources are available. If unset, they are available everywhere.",
+ "allocationTimestamp": "AllocationTimestamp stores the time when the resources were allocated. This field is not guaranteed to be set, in which case that time is unknown.\n\nThis is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gate.",
+}
+
+func (AllocationResult) SwaggerDoc() map[string]string {
+ return map_AllocationResult
+}
+
+var map_CELDeviceSelector = map[string]string{
+ "": "CELDeviceSelector contains a CEL expression for selecting a device.",
+ "expression": "Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.\n\nThe expression's input is an object named \"device\", which carries the following properties:\n - driver (string): the name of the driver which defines this device.\n - attributes (map[string]object): the device's attributes, grouped by prefix\n (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all\n of the attributes which were prefixed by \"dra.example.com\".\n - capacity (map[string]object): the device's capacities, grouped by prefix.\n - allowMultipleAllocations (bool): the allowMultipleAllocations property of the device\n (v1.34+ with the DRAConsumableCapacity feature enabled).\n\nExample: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields:\n\n device.driver\n device.attributes[\"dra.example.com\"].model\n device.attributes[\"ext.example.com\"].family\n device.capacity[\"dra.example.com\"].modules\n\nThe device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.\n\nThe value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.\n\nIf an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.\n\nA robust expression should check for the existence of attributes before referencing them.\n\nFor ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:\n\n cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool)\n\nThe length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps.",
+}
+
+func (CELDeviceSelector) SwaggerDoc() map[string]string {
+ return map_CELDeviceSelector
+}
+
+var map_CapacityRequestPolicy = map[string]string{
+ "": "CapacityRequestPolicy defines how requests consume device capacity.\n\nMust not set more than one ValidRequestValues.",
+ "default": "Default specifies how much of this capacity is consumed by a request that does not contain an entry for it in DeviceRequest's Capacity.",
+ "validValues": "ValidValues defines a set of acceptable quantity values in consuming requests.\n\nMust not contain more than 10 entries. Must be sorted in ascending order.\n\nIf this field is set, Default must be defined and it must be included in ValidValues list.\n\nIf the requested amount does not match any valid value but smaller than some valid values, the scheduler calculates the smallest valid value that is greater than or equal to the request. That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues).\n\nIf the requested amount exceeds all valid values, the request violates the policy, and this device cannot be allocated.",
+ "validRange": "ValidRange defines an acceptable quantity value range in consuming requests.\n\nIf this field is set, Default must be defined and it must fall within the defined ValidRange.\n\nIf the requested amount does not fall within the defined range, the request violates the policy, and this device cannot be allocated.\n\nIf the request doesn't contain this capacity entry, Default value is used.",
+}
+
+func (CapacityRequestPolicy) SwaggerDoc() map[string]string {
+ return map_CapacityRequestPolicy
+}
+
+var map_CapacityRequestPolicyRange = map[string]string{
+ "": "CapacityRequestPolicyRange defines a valid range for consumable capacity values.\n\n - If the requested amount is less than Min, it is rounded up to the Min value.\n - If Step is set and the requested amount is between Min and Max but not aligned with Step,\n it will be rounded up to the next value equal to Min + (n * Step).\n - If Step is not set, the requested amount is used as-is if it falls within the range Min to Max (if set).\n - If the requested or rounded amount exceeds Max (if set), the request does not satisfy the policy,\n and the device cannot be allocated.",
+ "min": "Min specifies the minimum capacity allowed for a consumption request.\n\nMin must be greater than or equal to zero, and less than or equal to the capacity value. requestPolicy.default must be more than or equal to the minimum.",
+ "max": "Max defines the upper limit for capacity that can be requested.\n\nMax must be less than or equal to the capacity value. Min and requestPolicy.default must be less than or equal to the maximum.",
+ "step": "Step defines the step size between valid capacity amounts within the range.\n\nMax (if set) and requestPolicy.default must be a multiple of Step. Min + Step must be less than or equal to the capacity value.",
+}
+
+func (CapacityRequestPolicyRange) SwaggerDoc() map[string]string {
+ return map_CapacityRequestPolicyRange
+}
+
+var map_CapacityRequirements = map[string]string{
+ "": "CapacityRequirements defines the capacity requirements for a specific device request.",
+ "requests": "Requests represent individual device resource requests for distinct resources, all of which must be provided by the device.\n\nThis value is used as an additional filtering condition against the available capacity on the device. This is semantically equivalent to a CEL selector with `device.capacity[]..compareTo(quantity()) >= 0`. For example, device.capacity['test-driver.cdi.k8s.io'].counters.compareTo(quantity('2')) >= 0.\n\nWhen a requestPolicy is defined, the requested amount is adjusted upward to the nearest valid value based on the policy. If the requested amount cannot be adjusted to a valid value—because it exceeds what the requestPolicy allows— the device is considered ineligible for allocation.\n\nFor any capacity that is not explicitly requested: - If no requestPolicy is set, the default consumed capacity is equal to the full device capacity\n (i.e., the whole device is claimed).\n- If a requestPolicy is set, the default consumed capacity is determined according to that policy.\n\nIf the device allows multiple allocation, the aggregated amount across all requests must not exceed the capacity value. The consumed capacity, which may be adjusted based on the requestPolicy if defined, is recorded in the resource claim’s status.devices[*].consumedCapacity field.",
+}
+
+func (CapacityRequirements) SwaggerDoc() map[string]string {
+ return map_CapacityRequirements
+}
+
+var map_Counter = map[string]string{
+ "": "Counter describes a quantity associated with a device.",
+ "value": "Value defines how much of a certain device counter is available.",
+}
+
+func (Counter) SwaggerDoc() map[string]string {
+ return map_Counter
+}
+
+var map_CounterSet = map[string]string{
+ "": "CounterSet defines a named set of counters that are available to be used by devices defined in the ResourceSlice.\n\nThe counters are not allocatable by themselves, but can be referenced by devices. When a device is allocated, the portion of counters it uses will no longer be available for use by other devices.",
+ "name": "Name defines the name of the counter set. It must be a DNS label.",
+ "counters": "Counters defines the set of counters for this CounterSet The name of each counter must be unique in that set and must be a DNS label.\n\nThe maximum number of counters in all sets is 32.",
+}
+
+func (CounterSet) SwaggerDoc() map[string]string {
+ return map_CounterSet
+}
+
+var map_Device = map[string]string{
+ "": "Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.",
+ "name": "Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label.",
+ "attributes": "Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.",
+ "capacity": "Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.",
+ "consumesCounters": "ConsumesCounters defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets.\n\nThere can only be a single entry per counterSet.\n\nThe total number of device counter consumption entries must be <= 32. In addition, the total number in the entire ResourceSlice must be <= 1024 (for example, 64 devices with 16 counters each).",
+ "nodeName": "NodeName identifies the node where the device is available.\n\nMust only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set.",
+ "nodeSelector": "NodeSelector defines the nodes where the device is available.\n\nMust use exactly one term.\n\nMust only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set.",
+ "allNodes": "AllNodes indicates that all nodes have access to the device.\n\nMust only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set.",
+ "taints": "If specified, these are the driver-defined taints.\n\nThe maximum number of taints is 4.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
+ "bindsToNode": "BindsToNode indicates if the usage of an allocation involving this device has to be limited to exactly the node that was chosen when allocating the claim. If set to true, the scheduler will set the ResourceClaim.Status.Allocation.NodeSelector to match the node where the allocation was made.\n\nThis is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates.",
+ "bindingConditions": "BindingConditions defines the conditions for proceeding with binding. All of these conditions must be set in the per-device status conditions with a value of True to proceed with binding the pod to the node while scheduling the pod.\n\nThe maximum number of binding conditions is 4.\n\nThe conditions must be a valid condition type string.\n\nThis is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates.",
+ "bindingFailureConditions": "BindingFailureConditions defines the conditions for binding failure. They may be set in the per-device status conditions. If any is set to \"True\", a binding failure occurred.\n\nThe maximum number of binding failure conditions is 4.\n\nThe conditions must be a valid condition type string.\n\nThis is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates.",
+ "allowMultipleAllocations": "AllowMultipleAllocations marks whether the device is allowed to be allocated to multiple DeviceRequests.\n\nIf AllowMultipleAllocations is set to true, the device can be allocated more than once, and all of its capacity is consumable, regardless of whether the requestPolicy is defined or not.",
+}
+
+func (Device) SwaggerDoc() map[string]string {
+ return map_Device
+}
+
+var map_DeviceAllocationConfiguration = map[string]string{
+ "": "DeviceAllocationConfiguration gets embedded in an AllocationResult.",
+ "source": "Source records whether the configuration comes from a class and thus is not something that a normal user would have been able to set or from a claim.",
+ "requests": "Requests lists the names of requests where the configuration applies. If empty, its applies to all requests.\n\nReferences to subrequests must include the name of the main request and may include the subrequest using the format [/]. If just the main request is given, the configuration applies to all subrequests.",
+}
+
+func (DeviceAllocationConfiguration) SwaggerDoc() map[string]string {
+ return map_DeviceAllocationConfiguration
+}
+
+var map_DeviceAllocationResult = map[string]string{
+ "": "DeviceAllocationResult is the result of allocating devices.",
+ "results": "Results lists all allocated devices.",
+ "config": "This field is a combination of all the claim and class configuration parameters. Drivers can distinguish between those based on a flag.\n\nThis includes configuration parameters for drivers which have no allocated devices in the result because it is up to the drivers which configuration parameters they support. They can silently ignore unknown configuration parameters.",
+}
+
+func (DeviceAllocationResult) SwaggerDoc() map[string]string {
+ return map_DeviceAllocationResult
+}
+
+var map_DeviceAttribute = map[string]string{
+ "": "DeviceAttribute must have exactly one field set.",
+ "int": "IntValue is a number.",
+ "bool": "BoolValue is a true/false value.",
+ "string": "StringValue is a string. Must not be longer than 64 characters.",
+ "version": "VersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters.",
+}
+
+func (DeviceAttribute) SwaggerDoc() map[string]string {
+ return map_DeviceAttribute
+}
+
+var map_DeviceCapacity = map[string]string{
+ "": "DeviceCapacity describes a quantity associated with a device.",
+ "value": "Value defines how much of a certain capacity that device has.\n\nThis field reflects the fixed total capacity and does not change. The consumed amount is tracked separately by scheduler and does not affect this value.",
+ "requestPolicy": "RequestPolicy defines how this DeviceCapacity must be consumed when the device is allowed to be shared by multiple allocations.\n\nThe Device must have allowMultipleAllocations set to true in order to set a requestPolicy.\n\nIf unset, capacity requests are unconstrained: requests can consume any amount of capacity, as long as the total consumed across all allocations does not exceed the device's defined capacity. If request is also unset, default is the full capacity value.",
+}
+
+func (DeviceCapacity) SwaggerDoc() map[string]string {
+ return map_DeviceCapacity
+}
+
+var map_DeviceClaim = map[string]string{
+ "": "DeviceClaim defines how to request devices with a ResourceClaim.",
+ "requests": "Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.",
+ "constraints": "These constraints must be satisfied by the set of devices that get allocated for the claim.",
+ "config": "This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.",
+}
+
+func (DeviceClaim) SwaggerDoc() map[string]string {
+ return map_DeviceClaim
+}
+
+var map_DeviceClaimConfiguration = map[string]string{
+ "": "DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.",
+ "requests": "Requests lists the names of requests where the configuration applies. If empty, it applies to all requests.\n\nReferences to subrequests must include the name of the main request and may include the subrequest using the format [/]. If just the main request is given, the configuration applies to all subrequests.",
+}
+
+func (DeviceClaimConfiguration) SwaggerDoc() map[string]string {
+ return map_DeviceClaimConfiguration
+}
+
+var map_DeviceClass = map[string]string{
+ "": "DeviceClass is a vendor- or admin-provided resource that contains device configuration and selectors. It can be referenced in the device requests of a claim to apply these presets. Cluster scoped.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.",
+ "metadata": "Standard object metadata",
+ "spec": "Spec defines what can be allocated and how to configure it.\n\nThis is mutable. Consumers have to be prepared for classes changing at any time, either because they get updated or replaced. Claim allocations are done once based on whatever was set in classes at the time of allocation.\n\nChanging the spec automatically increments the metadata.generation number.",
+}
+
+func (DeviceClass) SwaggerDoc() map[string]string {
+ return map_DeviceClass
+}
+
+var map_DeviceClassConfiguration = map[string]string{
+ "": "DeviceClassConfiguration is used in DeviceClass.",
+}
+
+func (DeviceClassConfiguration) SwaggerDoc() map[string]string {
+ return map_DeviceClassConfiguration
+}
+
+var map_DeviceClassList = map[string]string{
+ "": "DeviceClassList is a collection of classes.",
+ "metadata": "Standard list metadata",
+ "items": "Items is the list of resource classes.",
+}
+
+func (DeviceClassList) SwaggerDoc() map[string]string {
+ return map_DeviceClassList
+}
+
+var map_DeviceClassSpec = map[string]string{
+ "": "DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it.",
+ "selectors": "Each selector must be satisfied by a device which is claimed via this class.",
+ "config": "Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.\n\nThey are passed to the driver, but are not considered while allocating the claim.",
+ "extendedResourceName": "ExtendedResourceName is the extended resource name for the devices of this class. The devices of this class can be used to satisfy a pod's extended resource requests. It has the same format as the name of a pod's extended resource. It should be unique among all the device classes in a cluster. If two device classes have the same name, then the class created later is picked to satisfy a pod's extended resource requests. If two classes are created at the same time, then the name of the class lexicographically sorted first is picked.\n\nThis is an alpha field.",
+}
+
+func (DeviceClassSpec) SwaggerDoc() map[string]string {
+ return map_DeviceClassSpec
+}
+
+var map_DeviceConfiguration = map[string]string{
+ "": "DeviceConfiguration must have exactly one field set. It gets embedded inline in some other structs which have other fields, so field names must not conflict with those.",
+ "opaque": "Opaque provides driver-specific configuration parameters.",
+}
+
+func (DeviceConfiguration) SwaggerDoc() map[string]string {
+ return map_DeviceConfiguration
+}
+
+var map_DeviceConstraint = map[string]string{
+ "": "DeviceConstraint must have exactly one field set besides Requests.",
+ "requests": "Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim.\n\nReferences to subrequests must include the name of the main request and may include the subrequest using the format [/]. If just the main request is given, the constraint applies to all subrequests.",
+ "matchAttribute": "MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices.\n\nFor example, if you specified \"dra.example.com/numa\" (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn't, then it also will not be chosen.\n\nMust include the domain qualifier.",
+ "distinctAttribute": "DistinctAttribute requires that all devices in question have this attribute and that its type and value are unique across those devices.\n\nThis acts as the inverse of MatchAttribute.\n\nThis constraint is used to avoid allocating multiple requests to the same device by ensuring attribute-level differentiation.\n\nThis is useful for scenarios where resource requests must be fulfilled by separate physical devices. For example, a container requests two network interfaces that must be allocated from two different physical NICs.",
+}
+
+func (DeviceConstraint) SwaggerDoc() map[string]string {
+ return map_DeviceConstraint
+}
+
+var map_DeviceCounterConsumption = map[string]string{
+ "": "DeviceCounterConsumption defines a set of counters that a device will consume from a CounterSet.",
+ "counterSet": "CounterSet is the name of the set from which the counters defined will be consumed.",
+ "counters": "Counters defines the counters that will be consumed by the device.\n\nThe maximum number counters in a device is 32. In addition, the maximum number of all counters in all devices is 1024 (for example, 64 devices with 16 counters each).",
+}
+
+func (DeviceCounterConsumption) SwaggerDoc() map[string]string {
+ return map_DeviceCounterConsumption
+}
+
+var map_DeviceRequest = map[string]string{
+ "": "DeviceRequest is a request for devices required for a claim. This is typically a request for a single resource like a device, but can also ask for several identical devices. With FirstAvailable it is also possible to provide a prioritized list of requests.",
+ "name": "Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim.\n\nReferences using the name in the DeviceRequest will uniquely identify a request when the Exactly field is set. When the FirstAvailable field is set, a reference to the name of the DeviceRequest will match whatever subrequest is chosen by the scheduler.\n\nMust be a DNS label.",
+ "exactly": "Exactly specifies the details for a single request that must be met exactly for the request to be satisfied.\n\nOne of Exactly or FirstAvailable must be set.",
+ "firstAvailable": "FirstAvailable contains subrequests, of which exactly one will be selected by the scheduler. It tries to satisfy them in the order in which they are listed here. So if there are two entries in the list, the scheduler will only check the second one if it determines that the first one can not be used.\n\nDRA does not yet implement scoring, so the scheduler will select the first set of devices that satisfies all the requests in the claim. And if the requirements can be satisfied on more than one node, other scheduling features will determine which node is chosen. This means that the set of devices allocated to a claim might not be the optimal set available to the cluster. Scoring will be implemented later.",
+}
+
+func (DeviceRequest) SwaggerDoc() map[string]string {
+ return map_DeviceRequest
+}
+
+var map_DeviceRequestAllocationResult = map[string]string{
+ "": "DeviceRequestAllocationResult contains the allocation result for one request.",
+ "request": "Request is the name of the request in the claim which caused this device to be allocated. If it references a subrequest in the firstAvailable list on a DeviceRequest, this field must include both the name of the main request and the subrequest using the format /.\n\nMultiple devices may have been allocated per request.",
+ "driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.",
+ "pool": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.",
+ "device": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.",
+ "adminAccess": "AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.",
+ "tolerations": "A copy of all tolerations specified in the request at the time when the device got allocated.\n\nThe maximum number of tolerations is 16.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
+ "bindingConditions": "BindingConditions contains a copy of the BindingConditions from the corresponding ResourceSlice at the time of allocation.\n\nThis is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates.",
+ "bindingFailureConditions": "BindingFailureConditions contains a copy of the BindingFailureConditions from the corresponding ResourceSlice at the time of allocation.\n\nThis is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates.",
+ "shareID": "ShareID uniquely identifies an individual allocation share of the device, used when the device supports multiple simultaneous allocations. It serves as an additional map key to differentiate concurrent shares of the same device.",
+ "consumedCapacity": "ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request. The consumed amount may differ from the requested amount: it is rounded up to the nearest valid value based on the device’s requestPolicy if applicable (i.e., may not be less than the requested amount).\n\nThe total consumed capacity for each device must not exceed the DeviceCapacity's Value.\n\nThis field is populated only for devices that allow multiple allocations. All capacity entries are included, even if the consumed amount is zero.",
+}
+
+func (DeviceRequestAllocationResult) SwaggerDoc() map[string]string {
+ return map_DeviceRequestAllocationResult
+}
+
+var map_DeviceSelector = map[string]string{
+ "": "DeviceSelector must have exactly one field set.",
+ "cel": "CEL contains a CEL expression for selecting a device.",
+}
+
+func (DeviceSelector) SwaggerDoc() map[string]string {
+ return map_DeviceSelector
+}
+
+var map_DeviceSubRequest = map[string]string{
+ "": "DeviceSubRequest describes a request for device provided in the claim.spec.devices.requests[].firstAvailable array. Each is typically a request for a single resource like a device, but can also ask for several identical devices.\n\nDeviceSubRequest is similar to ExactDeviceRequest, but doesn't expose the AdminAccess field as that one is only supported when requesting a specific device.",
+ "name": "Name can be used to reference this subrequest in the list of constraints or the list of configurations for the claim. References must use the format /.\n\nMust be a DNS label.",
+ "deviceClassName": "DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this subrequest.\n\nA class is required. Which classes are available depends on the cluster.\n\nAdministrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference.",
+ "selectors": "Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this subrequest. All selectors must be satisfied for a device to be considered.",
+ "allocationMode": "AllocationMode and its related fields define how devices are allocated to satisfy this subrequest. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This subrequest is for all of the matching devices in a pool.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other subrequests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.",
+ "count": "Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one.",
+ "tolerations": "If specified, the request's tolerations.\n\nTolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute.\n\nIn addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated.\n\nThe maximum number of tolerations is 16.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
+ "capacity": "Capacity define resource requirements against each capacity.\n\nIf this field is unset and the device supports multiple allocations, the default value will be applied to each capacity according to requestPolicy. For the capacity that has no requestPolicy, default is the full capacity value.\n\nApplies to each device allocation. If Count > 1, the request fails if there aren't enough devices that meet the requirements. If AllocationMode is set to All, the request fails if there are devices that otherwise match the request, and have this capacity, with a value >= the requested amount, but which cannot be allocated to this request.",
+}
+
+func (DeviceSubRequest) SwaggerDoc() map[string]string {
+ return map_DeviceSubRequest
+}
+
+var map_DeviceTaint = map[string]string{
+ "": "The device this taint is attached to has the \"effect\" on any claim which does not tolerate the taint and, through the claim, to pods using the claim.",
+ "key": "The taint key to be applied to a device. Must be a label name.",
+ "value": "The taint value corresponding to the taint key. Must be a label value.",
+ "effect": "The effect of the taint on claims that do not tolerate the taint and through such claims on the pods using them. Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for nodes is not valid here.",
+ "timeAdded": "TimeAdded represents the time at which the taint was added. Added automatically during create or update if not set.",
+}
+
+func (DeviceTaint) SwaggerDoc() map[string]string {
+ return map_DeviceTaint
+}
+
+var map_DeviceToleration = map[string]string{
+ "": "The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches the triple using the matching operator .",
+ "key": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. Must be a label name.",
+ "operator": "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 ResourceClaim can tolerate all taints of a particular category.",
+ "value": "Value is the taint value the toleration matches to. If the operator is Exists, the value must be empty, otherwise just a regular string. Must be a label value.",
+ "effect": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule and NoExecute.",
+ "tolerationSeconds": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. If larger than zero, the time when the pod needs to be evicted is calculated as + .",
+}
+
+func (DeviceToleration) SwaggerDoc() map[string]string {
+ return map_DeviceToleration
+}
+
+var map_ExactDeviceRequest = map[string]string{
+ "": "ExactDeviceRequest is a request for one or more identical devices.",
+ "deviceClassName": "DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request.\n\nA DeviceClassName is required.\n\nAdministrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference.",
+ "selectors": "Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered.",
+ "allocationMode": "AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This request is for all of the matching devices in a pool.\n At least one device must exist on the node for the allocation to succeed.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.",
+ "count": "Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one.",
+ "adminAccess": "AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.",
+ "tolerations": "If specified, the request's tolerations.\n\nTolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute.\n\nIn addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated.\n\nThe maximum number of tolerations is 16.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
+ "capacity": "Capacity define resource requirements against each capacity.\n\nIf this field is unset and the device supports multiple allocations, the default value will be applied to each capacity according to requestPolicy. For the capacity that has no requestPolicy, default is the full capacity value.\n\nApplies to each device allocation. If Count > 1, the request fails if there aren't enough devices that meet the requirements. If AllocationMode is set to All, the request fails if there are devices that otherwise match the request, and have this capacity, with a value >= the requested amount, but which cannot be allocated to this request.",
+}
+
+func (ExactDeviceRequest) SwaggerDoc() map[string]string {
+ return map_ExactDeviceRequest
+}
+
+var map_NetworkDeviceData = map[string]string{
+ "": "NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context.",
+ "interfaceName": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod.\n\nMust not be longer than 256 characters.",
+ "ips": "IPs lists the network addresses assigned to the device's network interface. This can include both IPv4 and IPv6 addresses. The IPs are in the CIDR notation, which includes both the address and the associated subnet mask. e.g.: \"192.0.2.5/24\" for IPv4 and \"2001:db8::5/64\" for IPv6.",
+ "hardwareAddress": "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.\n\nMust not be longer than 128 characters.",
+}
+
+func (NetworkDeviceData) SwaggerDoc() map[string]string {
+ return map_NetworkDeviceData
+}
+
+var map_OpaqueDeviceConfiguration = map[string]string{
+ "": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.",
+ "driver": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.",
+ "parameters": "Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions.\n\nThe length of the raw data must be smaller or equal to 10 Ki.",
+}
+
+func (OpaqueDeviceConfiguration) SwaggerDoc() map[string]string {
+ return map_OpaqueDeviceConfiguration
+}
+
+var map_ResourceClaim = map[string]string{
+ "": "ResourceClaim describes a request for access to resources in the cluster, for use by workloads. For example, if a workload needs an accelerator device with specific properties, this is how that request is expressed. The status stanza tracks whether this claim has been satisfied and what specific resources have been allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.",
+ "metadata": "Standard object metadata",
+ "spec": "Spec describes what is being requested and how to configure it. The spec is immutable.",
+ "status": "Status describes whether the claim is ready to use and what has been allocated.",
+}
+
+func (ResourceClaim) SwaggerDoc() map[string]string {
+ return map_ResourceClaim
+}
+
+var map_ResourceClaimConsumerReference = map[string]string{
+ "": "ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource in the same namespace as the ResourceClaim.",
+ "apiGroup": "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.",
+ "resource": "Resource is the type of resource being referenced, for example \"pods\".",
+ "name": "Name is the name of resource being referenced.",
+ "uid": "UID identifies exactly one incarnation of the resource.",
+}
+
+func (ResourceClaimConsumerReference) SwaggerDoc() map[string]string {
+ return map_ResourceClaimConsumerReference
+}
+
+var map_ResourceClaimList = map[string]string{
+ "": "ResourceClaimList is a collection of claims.",
+ "metadata": "Standard list metadata",
+ "items": "Items is the list of resource claims.",
+}
+
+func (ResourceClaimList) SwaggerDoc() map[string]string {
+ return map_ResourceClaimList
+}
+
+var map_ResourceClaimSpec = map[string]string{
+ "": "ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.",
+ "devices": "Devices defines how to request devices.",
+}
+
+func (ResourceClaimSpec) SwaggerDoc() map[string]string {
+ return map_ResourceClaimSpec
+}
+
+var map_ResourceClaimStatus = map[string]string{
+ "": "ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.",
+ "allocation": "Allocation is set once the claim has been allocated successfully.",
+ "reservedFor": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.\n\nIn a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.\n\nBoth schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.\n\nThere can be at most 256 such reservations. This may get increased in the future, but not reduced.",
+ "devices": "Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers.",
+}
+
+func (ResourceClaimStatus) SwaggerDoc() map[string]string {
+ return map_ResourceClaimStatus
+}
+
+var map_ResourceClaimTemplate = map[string]string{
+ "": "ResourceClaimTemplate is used to produce ResourceClaim objects.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.",
+ "metadata": "Standard object metadata",
+ "spec": "Describes the ResourceClaim that is to be generated.\n\nThis field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore.",
+}
+
+func (ResourceClaimTemplate) SwaggerDoc() map[string]string {
+ return map_ResourceClaimTemplate
+}
+
+var map_ResourceClaimTemplateList = map[string]string{
+ "": "ResourceClaimTemplateList is a collection of claim templates.",
+ "metadata": "Standard list metadata",
+ "items": "Items is the list of resource claim templates.",
+}
+
+func (ResourceClaimTemplateList) SwaggerDoc() map[string]string {
+ return map_ResourceClaimTemplateList
+}
+
+var map_ResourceClaimTemplateSpec = map[string]string{
+ "": "ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.",
+ "metadata": "ObjectMeta may contain labels and annotations that will be copied into the ResourceClaim when creating it. No other fields are allowed and will be rejected during validation.",
+ "spec": "Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here.",
+}
+
+func (ResourceClaimTemplateSpec) SwaggerDoc() map[string]string {
+ return map_ResourceClaimTemplateSpec
+}
+
+var map_ResourcePool = map[string]string{
+ "": "ResourcePool describes the pool that ResourceSlices belong to.",
+ "name": "Name is used to identify the pool. For node-local devices, this is often the node name, but this is not required.\n\nIt must not be longer than 253 characters and must consist of one or more DNS sub-domains separated by slashes. This field is immutable.",
+ "generation": "Generation tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted.\n\nCombined with ResourceSliceCount, this mechanism enables consumers to detect pools which are comprised of multiple ResourceSlices and are in an incomplete state.",
+ "resourceSliceCount": "ResourceSliceCount is the total number of ResourceSlices in the pool at this generation number. Must be greater than zero.\n\nConsumers can use this to check whether they have seen all ResourceSlices belonging to the same pool.",
+}
+
+func (ResourcePool) SwaggerDoc() map[string]string {
+ return map_ResourcePool
+}
+
+var map_ResourceSlice = map[string]string{
+ "": "ResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.\n\nAt the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple , , .\n\nWhenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.\n\nWhen allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.\n\nFor resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.",
+ "metadata": "Standard object metadata",
+ "spec": "Contains the information published by the driver.\n\nChanging the spec automatically increments the metadata.generation number.",
+}
+
+func (ResourceSlice) SwaggerDoc() map[string]string {
+ return map_ResourceSlice
+}
+
+var map_ResourceSliceList = map[string]string{
+ "": "ResourceSliceList is a collection of ResourceSlices.",
+ "metadata": "Standard list metadata",
+ "items": "Items is the list of resource ResourceSlices.",
+}
+
+func (ResourceSliceList) SwaggerDoc() map[string]string {
+ return map_ResourceSliceList
+}
+
+var map_ResourceSliceSpec = map[string]string{
+ "": "ResourceSliceSpec contains the information published by the driver in one ResourceSlice.",
+ "driver": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.",
+ "pool": "Pool describes the pool that this ResourceSlice belongs to.",
+ "nodeName": "NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.\n\nThis field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.\n\nExactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set. This field is immutable.",
+ "nodeSelector": "NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.\n\nMust use exactly one term.\n\nExactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.",
+ "allNodes": "AllNodes indicates that all nodes have access to the resources in the pool.\n\nExactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.",
+ "devices": "Devices lists some or all of the devices in this pool.\n\nMust not have more than 128 entries.",
+ "perDeviceNodeSelection": "PerDeviceNodeSelection defines whether the access from nodes to resources in the pool is set on the ResourceSlice level or on each device. If it is set to true, every device defined the ResourceSlice must specify this individually.\n\nExactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.",
+ "sharedCounters": "SharedCounters defines a list of counter sets, each of which has a name and a list of counters available.\n\nThe names of the SharedCounters must be unique in the ResourceSlice.\n\nThe maximum number of counters in all sets is 32.",
+}
+
+func (ResourceSliceSpec) SwaggerDoc() map[string]string {
+ return map_ResourceSliceSpec
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/hack/tools/vendor/k8s.io/api/resource/v1/zz_generated.deepcopy.go b/hack/tools/vendor/k8s.io/api/resource/v1/zz_generated.deepcopy.go
new file mode 100644
index 000000000000..580ba64875f7
--- /dev/null
+++ b/hack/tools/vendor/k8s.io/api/resource/v1/zz_generated.deepcopy.go
@@ -0,0 +1,1257 @@
+//go:build !ignore_autogenerated
+// +build !ignore_autogenerated
+
+/*
+Copyright 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 deepcopy-gen. DO NOT EDIT.
+
+package v1
+
+import (
+ corev1 "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"
+ types "k8s.io/apimachinery/pkg/types"
+)
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *AllocatedDeviceStatus) DeepCopyInto(out *AllocatedDeviceStatus) {
+ *out = *in
+ if in.ShareID != nil {
+ in, out := &in.ShareID, &out.ShareID
+ *out = new(string)
+ **out = **in
+ }
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]metav1.Condition, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Data != nil {
+ in, out := &in.Data, &out.Data
+ *out = new(runtime.RawExtension)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.NetworkData != nil {
+ in, out := &in.NetworkData, &out.NetworkData
+ *out = new(NetworkDeviceData)
+ (*in).DeepCopyInto(*out)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocatedDeviceStatus.
+func (in *AllocatedDeviceStatus) DeepCopy() *AllocatedDeviceStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(AllocatedDeviceStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *AllocationResult) DeepCopyInto(out *AllocationResult) {
+ *out = *in
+ in.Devices.DeepCopyInto(&out.Devices)
+ if in.NodeSelector != nil {
+ in, out := &in.NodeSelector, &out.NodeSelector
+ *out = new(corev1.NodeSelector)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.AllocationTimestamp != nil {
+ in, out := &in.AllocationTimestamp, &out.AllocationTimestamp
+ *out = (*in).DeepCopy()
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationResult.
+func (in *AllocationResult) DeepCopy() *AllocationResult {
+ if in == nil {
+ return nil
+ }
+ out := new(AllocationResult)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *CELDeviceSelector) DeepCopyInto(out *CELDeviceSelector) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CELDeviceSelector.
+func (in *CELDeviceSelector) DeepCopy() *CELDeviceSelector {
+ if in == nil {
+ return nil
+ }
+ out := new(CELDeviceSelector)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *CapacityRequestPolicy) DeepCopyInto(out *CapacityRequestPolicy) {
+ *out = *in
+ if in.Default != nil {
+ in, out := &in.Default, &out.Default
+ x := (*in).DeepCopy()
+ *out = &x
+ }
+ if in.ValidValues != nil {
+ in, out := &in.ValidValues, &out.ValidValues
+ *out = make([]resource.Quantity, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.ValidRange != nil {
+ in, out := &in.ValidRange, &out.ValidRange
+ *out = new(CapacityRequestPolicyRange)
+ (*in).DeepCopyInto(*out)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CapacityRequestPolicy.
+func (in *CapacityRequestPolicy) DeepCopy() *CapacityRequestPolicy {
+ if in == nil {
+ return nil
+ }
+ out := new(CapacityRequestPolicy)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *CapacityRequestPolicyRange) DeepCopyInto(out *CapacityRequestPolicyRange) {
+ *out = *in
+ if in.Min != nil {
+ in, out := &in.Min, &out.Min
+ x := (*in).DeepCopy()
+ *out = &x
+ }
+ if in.Max != nil {
+ in, out := &in.Max, &out.Max
+ x := (*in).DeepCopy()
+ *out = &x
+ }
+ if in.Step != nil {
+ in, out := &in.Step, &out.Step
+ x := (*in).DeepCopy()
+ *out = &x
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CapacityRequestPolicyRange.
+func (in *CapacityRequestPolicyRange) DeepCopy() *CapacityRequestPolicyRange {
+ if in == nil {
+ return nil
+ }
+ out := new(CapacityRequestPolicyRange)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *CapacityRequirements) DeepCopyInto(out *CapacityRequirements) {
+ *out = *in
+ if in.Requests != nil {
+ in, out := &in.Requests, &out.Requests
+ *out = make(map[QualifiedName]resource.Quantity, len(*in))
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CapacityRequirements.
+func (in *CapacityRequirements) DeepCopy() *CapacityRequirements {
+ if in == nil {
+ return nil
+ }
+ out := new(CapacityRequirements)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Counter) DeepCopyInto(out *Counter) {
+ *out = *in
+ out.Value = in.Value.DeepCopy()
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Counter.
+func (in *Counter) DeepCopy() *Counter {
+ if in == nil {
+ return nil
+ }
+ out := new(Counter)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *CounterSet) DeepCopyInto(out *CounterSet) {
+ *out = *in
+ if in.Counters != nil {
+ in, out := &in.Counters, &out.Counters
+ *out = make(map[string]Counter, len(*in))
+ for key, val := range *in {
+ (*out)[key] = *val.DeepCopy()
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CounterSet.
+func (in *CounterSet) DeepCopy() *CounterSet {
+ if in == nil {
+ return nil
+ }
+ out := new(CounterSet)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Device) DeepCopyInto(out *Device) {
+ *out = *in
+ if in.Attributes != nil {
+ in, out := &in.Attributes, &out.Attributes
+ *out = make(map[QualifiedName]DeviceAttribute, len(*in))
+ for key, val := range *in {
+ (*out)[key] = *val.DeepCopy()
+ }
+ }
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = make(map[QualifiedName]DeviceCapacity, len(*in))
+ for key, val := range *in {
+ (*out)[key] = *val.DeepCopy()
+ }
+ }
+ if in.ConsumesCounters != nil {
+ in, out := &in.ConsumesCounters, &out.ConsumesCounters
+ *out = make([]DeviceCounterConsumption, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.NodeName != nil {
+ in, out := &in.NodeName, &out.NodeName
+ *out = new(string)
+ **out = **in
+ }
+ if in.NodeSelector != nil {
+ in, out := &in.NodeSelector, &out.NodeSelector
+ *out = new(corev1.NodeSelector)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.AllNodes != nil {
+ in, out := &in.AllNodes, &out.AllNodes
+ *out = new(bool)
+ **out = **in
+ }
+ if in.Taints != nil {
+ in, out := &in.Taints, &out.Taints
+ *out = make([]DeviceTaint, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.BindsToNode != nil {
+ in, out := &in.BindsToNode, &out.BindsToNode
+ *out = new(bool)
+ **out = **in
+ }
+ if in.BindingConditions != nil {
+ in, out := &in.BindingConditions, &out.BindingConditions
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.BindingFailureConditions != nil {
+ in, out := &in.BindingFailureConditions, &out.BindingFailureConditions
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.AllowMultipleAllocations != nil {
+ in, out := &in.AllowMultipleAllocations, &out.AllowMultipleAllocations
+ *out = new(bool)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Device.
+func (in *Device) DeepCopy() *Device {
+ if in == nil {
+ return nil
+ }
+ out := new(Device)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceAllocationConfiguration) DeepCopyInto(out *DeviceAllocationConfiguration) {
+ *out = *in
+ if in.Requests != nil {
+ in, out := &in.Requests, &out.Requests
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ in.DeviceConfiguration.DeepCopyInto(&out.DeviceConfiguration)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceAllocationConfiguration.
+func (in *DeviceAllocationConfiguration) DeepCopy() *DeviceAllocationConfiguration {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceAllocationConfiguration)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceAllocationResult) DeepCopyInto(out *DeviceAllocationResult) {
+ *out = *in
+ if in.Results != nil {
+ in, out := &in.Results, &out.Results
+ *out = make([]DeviceRequestAllocationResult, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Config != nil {
+ in, out := &in.Config, &out.Config
+ *out = make([]DeviceAllocationConfiguration, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceAllocationResult.
+func (in *DeviceAllocationResult) DeepCopy() *DeviceAllocationResult {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceAllocationResult)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceAttribute) DeepCopyInto(out *DeviceAttribute) {
+ *out = *in
+ if in.IntValue != nil {
+ in, out := &in.IntValue, &out.IntValue
+ *out = new(int64)
+ **out = **in
+ }
+ if in.BoolValue != nil {
+ in, out := &in.BoolValue, &out.BoolValue
+ *out = new(bool)
+ **out = **in
+ }
+ if in.StringValue != nil {
+ in, out := &in.StringValue, &out.StringValue
+ *out = new(string)
+ **out = **in
+ }
+ if in.VersionValue != nil {
+ in, out := &in.VersionValue, &out.VersionValue
+ *out = new(string)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceAttribute.
+func (in *DeviceAttribute) DeepCopy() *DeviceAttribute {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceAttribute)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceCapacity) DeepCopyInto(out *DeviceCapacity) {
+ *out = *in
+ out.Value = in.Value.DeepCopy()
+ if in.RequestPolicy != nil {
+ in, out := &in.RequestPolicy, &out.RequestPolicy
+ *out = new(CapacityRequestPolicy)
+ (*in).DeepCopyInto(*out)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceCapacity.
+func (in *DeviceCapacity) DeepCopy() *DeviceCapacity {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceCapacity)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceClaim) DeepCopyInto(out *DeviceClaim) {
+ *out = *in
+ if in.Requests != nil {
+ in, out := &in.Requests, &out.Requests
+ *out = make([]DeviceRequest, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Constraints != nil {
+ in, out := &in.Constraints, &out.Constraints
+ *out = make([]DeviceConstraint, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Config != nil {
+ in, out := &in.Config, &out.Config
+ *out = make([]DeviceClaimConfiguration, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClaim.
+func (in *DeviceClaim) DeepCopy() *DeviceClaim {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceClaim)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceClaimConfiguration) DeepCopyInto(out *DeviceClaimConfiguration) {
+ *out = *in
+ if in.Requests != nil {
+ in, out := &in.Requests, &out.Requests
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ in.DeviceConfiguration.DeepCopyInto(&out.DeviceConfiguration)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClaimConfiguration.
+func (in *DeviceClaimConfiguration) DeepCopy() *DeviceClaimConfiguration {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceClaimConfiguration)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceClass) DeepCopyInto(out *DeviceClass) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClass.
+func (in *DeviceClass) DeepCopy() *DeviceClass {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceClass)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *DeviceClass) 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 *DeviceClassConfiguration) DeepCopyInto(out *DeviceClassConfiguration) {
+ *out = *in
+ in.DeviceConfiguration.DeepCopyInto(&out.DeviceConfiguration)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassConfiguration.
+func (in *DeviceClassConfiguration) DeepCopy() *DeviceClassConfiguration {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceClassConfiguration)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceClassList) DeepCopyInto(out *DeviceClassList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]DeviceClass, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassList.
+func (in *DeviceClassList) DeepCopy() *DeviceClassList {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceClassList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *DeviceClassList) 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 *DeviceClassSpec) DeepCopyInto(out *DeviceClassSpec) {
+ *out = *in
+ if in.Selectors != nil {
+ in, out := &in.Selectors, &out.Selectors
+ *out = make([]DeviceSelector, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Config != nil {
+ in, out := &in.Config, &out.Config
+ *out = make([]DeviceClassConfiguration, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.ExtendedResourceName != nil {
+ in, out := &in.ExtendedResourceName, &out.ExtendedResourceName
+ *out = new(string)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassSpec.
+func (in *DeviceClassSpec) DeepCopy() *DeviceClassSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceClassSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceConfiguration) DeepCopyInto(out *DeviceConfiguration) {
+ *out = *in
+ if in.Opaque != nil {
+ in, out := &in.Opaque, &out.Opaque
+ *out = new(OpaqueDeviceConfiguration)
+ (*in).DeepCopyInto(*out)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceConfiguration.
+func (in *DeviceConfiguration) DeepCopy() *DeviceConfiguration {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceConfiguration)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceConstraint) DeepCopyInto(out *DeviceConstraint) {
+ *out = *in
+ if in.Requests != nil {
+ in, out := &in.Requests, &out.Requests
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.MatchAttribute != nil {
+ in, out := &in.MatchAttribute, &out.MatchAttribute
+ *out = new(FullyQualifiedName)
+ **out = **in
+ }
+ if in.DistinctAttribute != nil {
+ in, out := &in.DistinctAttribute, &out.DistinctAttribute
+ *out = new(FullyQualifiedName)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceConstraint.
+func (in *DeviceConstraint) DeepCopy() *DeviceConstraint {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceConstraint)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceCounterConsumption) DeepCopyInto(out *DeviceCounterConsumption) {
+ *out = *in
+ if in.Counters != nil {
+ in, out := &in.Counters, &out.Counters
+ *out = make(map[string]Counter, len(*in))
+ for key, val := range *in {
+ (*out)[key] = *val.DeepCopy()
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceCounterConsumption.
+func (in *DeviceCounterConsumption) DeepCopy() *DeviceCounterConsumption {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceCounterConsumption)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceRequest) DeepCopyInto(out *DeviceRequest) {
+ *out = *in
+ if in.Exactly != nil {
+ in, out := &in.Exactly, &out.Exactly
+ *out = new(ExactDeviceRequest)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.FirstAvailable != nil {
+ in, out := &in.FirstAvailable, &out.FirstAvailable
+ *out = make([]DeviceSubRequest, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceRequest.
+func (in *DeviceRequest) DeepCopy() *DeviceRequest {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceRequest)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceRequestAllocationResult) DeepCopyInto(out *DeviceRequestAllocationResult) {
+ *out = *in
+ if in.AdminAccess != nil {
+ in, out := &in.AdminAccess, &out.AdminAccess
+ *out = new(bool)
+ **out = **in
+ }
+ if in.Tolerations != nil {
+ in, out := &in.Tolerations, &out.Tolerations
+ *out = make([]DeviceToleration, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.BindingConditions != nil {
+ in, out := &in.BindingConditions, &out.BindingConditions
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.BindingFailureConditions != nil {
+ in, out := &in.BindingFailureConditions, &out.BindingFailureConditions
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.ShareID != nil {
+ in, out := &in.ShareID, &out.ShareID
+ *out = new(types.UID)
+ **out = **in
+ }
+ if in.ConsumedCapacity != nil {
+ in, out := &in.ConsumedCapacity, &out.ConsumedCapacity
+ *out = make(map[QualifiedName]resource.Quantity, len(*in))
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceRequestAllocationResult.
+func (in *DeviceRequestAllocationResult) DeepCopy() *DeviceRequestAllocationResult {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceRequestAllocationResult)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceSelector) DeepCopyInto(out *DeviceSelector) {
+ *out = *in
+ if in.CEL != nil {
+ in, out := &in.CEL, &out.CEL
+ *out = new(CELDeviceSelector)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceSelector.
+func (in *DeviceSelector) DeepCopy() *DeviceSelector {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceSelector)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceSubRequest) DeepCopyInto(out *DeviceSubRequest) {
+ *out = *in
+ if in.Selectors != nil {
+ in, out := &in.Selectors, &out.Selectors
+ *out = make([]DeviceSelector, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Tolerations != nil {
+ in, out := &in.Tolerations, &out.Tolerations
+ *out = make([]DeviceToleration, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = new(CapacityRequirements)
+ (*in).DeepCopyInto(*out)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceSubRequest.
+func (in *DeviceSubRequest) DeepCopy() *DeviceSubRequest {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceSubRequest)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceTaint) DeepCopyInto(out *DeviceTaint) {
+ *out = *in
+ if in.TimeAdded != nil {
+ in, out := &in.TimeAdded, &out.TimeAdded
+ *out = (*in).DeepCopy()
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceTaint.
+func (in *DeviceTaint) DeepCopy() *DeviceTaint {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceTaint)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeviceToleration) DeepCopyInto(out *DeviceToleration) {
+ *out = *in
+ if in.TolerationSeconds != nil {
+ in, out := &in.TolerationSeconds, &out.TolerationSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceToleration.
+func (in *DeviceToleration) DeepCopy() *DeviceToleration {
+ if in == nil {
+ return nil
+ }
+ out := new(DeviceToleration)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ExactDeviceRequest) DeepCopyInto(out *ExactDeviceRequest) {
+ *out = *in
+ if in.Selectors != nil {
+ in, out := &in.Selectors, &out.Selectors
+ *out = make([]DeviceSelector, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.AdminAccess != nil {
+ in, out := &in.AdminAccess, &out.AdminAccess
+ *out = new(bool)
+ **out = **in
+ }
+ if in.Tolerations != nil {
+ in, out := &in.Tolerations, &out.Tolerations
+ *out = make([]DeviceToleration, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = new(CapacityRequirements)
+ (*in).DeepCopyInto(*out)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExactDeviceRequest.
+func (in *ExactDeviceRequest) DeepCopy() *ExactDeviceRequest {
+ if in == nil {
+ return nil
+ }
+ out := new(ExactDeviceRequest)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NetworkDeviceData) DeepCopyInto(out *NetworkDeviceData) {
+ *out = *in
+ if in.IPs != nil {
+ in, out := &in.IPs, &out.IPs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkDeviceData.
+func (in *NetworkDeviceData) DeepCopy() *NetworkDeviceData {
+ if in == nil {
+ return nil
+ }
+ out := new(NetworkDeviceData)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *OpaqueDeviceConfiguration) DeepCopyInto(out *OpaqueDeviceConfiguration) {
+ *out = *in
+ in.Parameters.DeepCopyInto(&out.Parameters)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpaqueDeviceConfiguration.
+func (in *OpaqueDeviceConfiguration) DeepCopy() *OpaqueDeviceConfiguration {
+ if in == nil {
+ return nil
+ }
+ out := new(OpaqueDeviceConfiguration)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ResourceClaim) DeepCopyInto(out *ResourceClaim) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ in.Status.DeepCopyInto(&out.Status)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaim.
+func (in *ResourceClaim) DeepCopy() *ResourceClaim {
+ if in == nil {
+ return nil
+ }
+ out := new(ResourceClaim)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ResourceClaim) 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 *ResourceClaimConsumerReference) DeepCopyInto(out *ResourceClaimConsumerReference) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimConsumerReference.
+func (in *ResourceClaimConsumerReference) DeepCopy() *ResourceClaimConsumerReference {
+ if in == nil {
+ return nil
+ }
+ out := new(ResourceClaimConsumerReference)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ResourceClaimList) DeepCopyInto(out *ResourceClaimList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ResourceClaim, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimList.
+func (in *ResourceClaimList) DeepCopy() *ResourceClaimList {
+ if in == nil {
+ return nil
+ }
+ out := new(ResourceClaimList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ResourceClaimList) 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 *ResourceClaimSpec) DeepCopyInto(out *ResourceClaimSpec) {
+ *out = *in
+ in.Devices.DeepCopyInto(&out.Devices)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimSpec.
+func (in *ResourceClaimSpec) DeepCopy() *ResourceClaimSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(ResourceClaimSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ResourceClaimStatus) DeepCopyInto(out *ResourceClaimStatus) {
+ *out = *in
+ if in.Allocation != nil {
+ in, out := &in.Allocation, &out.Allocation
+ *out = new(AllocationResult)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.ReservedFor != nil {
+ in, out := &in.ReservedFor, &out.ReservedFor
+ *out = make([]ResourceClaimConsumerReference, len(*in))
+ copy(*out, *in)
+ }
+ if in.Devices != nil {
+ in, out := &in.Devices, &out.Devices
+ *out = make([]AllocatedDeviceStatus, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimStatus.
+func (in *ResourceClaimStatus) DeepCopy() *ResourceClaimStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(ResourceClaimStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ResourceClaimTemplate) DeepCopyInto(out *ResourceClaimTemplate) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimTemplate.
+func (in *ResourceClaimTemplate) DeepCopy() *ResourceClaimTemplate {
+ if in == nil {
+ return nil
+ }
+ out := new(ResourceClaimTemplate)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ResourceClaimTemplate) 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 *ResourceClaimTemplateList) DeepCopyInto(out *ResourceClaimTemplateList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ResourceClaimTemplate, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimTemplateList.
+func (in *ResourceClaimTemplateList) DeepCopy() *ResourceClaimTemplateList {
+ if in == nil {
+ return nil
+ }
+ out := new(ResourceClaimTemplateList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ResourceClaimTemplateList) 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 *ResourceClaimTemplateSpec) DeepCopyInto(out *ResourceClaimTemplateSpec) {
+ *out = *in
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimTemplateSpec.
+func (in *ResourceClaimTemplateSpec) DeepCopy() *ResourceClaimTemplateSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(ResourceClaimTemplateSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ResourcePool) DeepCopyInto(out *ResourcePool) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePool.
+func (in *ResourcePool) DeepCopy() *ResourcePool {
+ if in == nil {
+ return nil
+ }
+ out := new(ResourcePool)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ResourceSlice) DeepCopyInto(out *ResourceSlice) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSlice.
+func (in *ResourceSlice) DeepCopy() *ResourceSlice {
+ if in == nil {
+ return nil
+ }
+ out := new(ResourceSlice)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ResourceSlice) 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 *ResourceSliceList) DeepCopyInto(out *ResourceSliceList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ResourceSlice, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSliceList.
+func (in *ResourceSliceList) DeepCopy() *ResourceSliceList {
+ if in == nil {
+ return nil
+ }
+ out := new(ResourceSliceList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ResourceSliceList) 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 *ResourceSliceSpec) DeepCopyInto(out *ResourceSliceSpec) {
+ *out = *in
+ out.Pool = in.Pool
+ if in.NodeName != nil {
+ in, out := &in.NodeName, &out.NodeName
+ *out = new(string)
+ **out = **in
+ }
+ if in.NodeSelector != nil {
+ in, out := &in.NodeSelector, &out.NodeSelector
+ *out = new(corev1.NodeSelector)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.AllNodes != nil {
+ in, out := &in.AllNodes, &out.AllNodes
+ *out = new(bool)
+ **out = **in
+ }
+ if in.Devices != nil {
+ in, out := &in.Devices, &out.Devices
+ *out = make([]Device, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.PerDeviceNodeSelection != nil {
+ in, out := &in.PerDeviceNodeSelection, &out.PerDeviceNodeSelection
+ *out = new(bool)
+ **out = **in
+ }
+ if in.SharedCounters != nil {
+ in, out := &in.SharedCounters, &out.SharedCounters
+ *out = make([]CounterSet, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSliceSpec.
+func (in *ResourceSliceSpec) DeepCopy() *ResourceSliceSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(ResourceSliceSpec)
+ in.DeepCopyInto(out)
+ return out
+}
diff --git a/hack/tools/vendor/k8s.io/api/resource/v1/zz_generated.prerelease-lifecycle.go b/hack/tools/vendor/k8s.io/api/resource/v1/zz_generated.prerelease-lifecycle.go
new file mode 100644
index 000000000000..dbf5b3ccdedc
--- /dev/null
+++ b/hack/tools/vendor/k8s.io/api/resource/v1/zz_generated.prerelease-lifecycle.go
@@ -0,0 +1,70 @@
+//go:build !ignore_autogenerated
+// +build !ignore_autogenerated
+
+/*
+Copyright 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 prerelease-lifecycle-gen. DO NOT EDIT.
+
+package v1
+
+// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
+func (in *DeviceClass) APILifecycleIntroduced() (major, minor int) {
+ return 1, 34
+}
+
+// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
+func (in *DeviceClassList) APILifecycleIntroduced() (major, minor int) {
+ return 1, 34
+}
+
+// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
+func (in *ResourceClaim) APILifecycleIntroduced() (major, minor int) {
+ return 1, 34
+}
+
+// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
+func (in *ResourceClaimList) APILifecycleIntroduced() (major, minor int) {
+ return 1, 34
+}
+
+// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
+func (in *ResourceClaimTemplate) APILifecycleIntroduced() (major, minor int) {
+ return 1, 34
+}
+
+// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
+func (in *ResourceClaimTemplateList) APILifecycleIntroduced() (major, minor int) {
+ return 1, 34
+}
+
+// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
+func (in *ResourceSlice) APILifecycleIntroduced() (major, minor int) {
+ return 1, 34
+}
+
+// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
+// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
+func (in *ResourceSliceList) APILifecycleIntroduced() (major, minor int) {
+ return 1, 34
+}
diff --git a/hack/tools/vendor/k8s.io/api/resource/v1alpha3/devicetaint.go b/hack/tools/vendor/k8s.io/api/resource/v1alpha3/devicetaint.go
new file mode 100644
index 000000000000..dd3c65d26c7c
--- /dev/null
+++ b/hack/tools/vendor/k8s.io/api/resource/v1alpha3/devicetaint.go
@@ -0,0 +1,35 @@
+/*
+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 v1alpha3
+
+import "fmt"
+
+var _ fmt.Stringer = DeviceTaint{}
+
+// String converts to a string in the format '=:', '=:', ':', or ''.
+func (t DeviceTaint) String() string {
+ if len(t.Effect) == 0 {
+ if len(t.Value) == 0 {
+ return fmt.Sprintf("%v", t.Key)
+ }
+ return fmt.Sprintf("%v=%v:", t.Key, t.Value)
+ }
+ if len(t.Value) == 0 {
+ return fmt.Sprintf("%v:%v", t.Key, t.Effect)
+ }
+ return fmt.Sprintf("%v=%v:%v", t.Key, t.Value, t.Effect)
+}
diff --git a/hack/tools/vendor/k8s.io/api/resource/v1alpha3/generated.pb.go b/hack/tools/vendor/k8s.io/api/resource/v1alpha3/generated.pb.go
index 716492fea400..dc37717ef72e 100644
--- a/hack/tools/vendor/k8s.io/api/resource/v1alpha3/generated.pb.go
+++ b/hack/tools/vendor/k8s.io/api/resource/v1alpha3/generated.pb.go
@@ -25,18 +25,12 @@ import (
io "io"
proto "github.com/gogo/protobuf/proto"
- github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
- v11 "k8s.io/api/core/v1"
- resource "k8s.io/apimachinery/pkg/api/resource"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
math "math"
math_bits "math/bits"
reflect "reflect"
strings "strings"
-
- k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types"
)
// Reference imports to suppress errors if they are not otherwise used.
@@ -50,15 +44,15 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
-func (m *AllocatedDeviceStatus) Reset() { *m = AllocatedDeviceStatus{} }
-func (*AllocatedDeviceStatus) ProtoMessage() {}
-func (*AllocatedDeviceStatus) Descriptor() ([]byte, []int) {
+func (m *CELDeviceSelector) Reset() { *m = CELDeviceSelector{} }
+func (*CELDeviceSelector) ProtoMessage() {}
+func (*CELDeviceSelector) Descriptor() ([]byte, []int) {
return fileDescriptor_66649ee9bbcd89d2, []int{0}
}
-func (m *AllocatedDeviceStatus) XXX_Unmarshal(b []byte) error {
+func (m *CELDeviceSelector) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
-func (m *AllocatedDeviceStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+func (m *CELDeviceSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
@@ -66,27 +60,27 @@ func (m *AllocatedDeviceStatus) XXX_Marshal(b []byte, deterministic bool) ([]byt
}
return b[:n], nil
}
-func (m *AllocatedDeviceStatus) XXX_Merge(src proto.Message) {
- xxx_messageInfo_AllocatedDeviceStatus.Merge(m, src)
+func (m *CELDeviceSelector) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CELDeviceSelector.Merge(m, src)
}
-func (m *AllocatedDeviceStatus) XXX_Size() int {
+func (m *CELDeviceSelector) XXX_Size() int {
return m.Size()
}
-func (m *AllocatedDeviceStatus) XXX_DiscardUnknown() {
- xxx_messageInfo_AllocatedDeviceStatus.DiscardUnknown(m)
+func (m *CELDeviceSelector) XXX_DiscardUnknown() {
+ xxx_messageInfo_CELDeviceSelector.DiscardUnknown(m)
}
-var xxx_messageInfo_AllocatedDeviceStatus proto.InternalMessageInfo
+var xxx_messageInfo_CELDeviceSelector proto.InternalMessageInfo
-func (m *AllocationResult) Reset() { *m = AllocationResult{} }
-func (*AllocationResult) ProtoMessage() {}
-func (*AllocationResult) Descriptor() ([]byte, []int) {
+func (m *DeviceSelector) Reset() { *m = DeviceSelector{} }
+func (*DeviceSelector) ProtoMessage() {}
+func (*DeviceSelector) Descriptor() ([]byte, []int) {
return fileDescriptor_66649ee9bbcd89d2, []int{1}
}
-func (m *AllocationResult) XXX_Unmarshal(b []byte) error {
+func (m *DeviceSelector) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
-func (m *AllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+func (m *DeviceSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
@@ -94,27 +88,27 @@ func (m *AllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, er
}
return b[:n], nil
}
-func (m *AllocationResult) XXX_Merge(src proto.Message) {
- xxx_messageInfo_AllocationResult.Merge(m, src)
+func (m *DeviceSelector) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceSelector.Merge(m, src)
}
-func (m *AllocationResult) XXX_Size() int {
+func (m *DeviceSelector) XXX_Size() int {
return m.Size()
}
-func (m *AllocationResult) XXX_DiscardUnknown() {
- xxx_messageInfo_AllocationResult.DiscardUnknown(m)
+func (m *DeviceSelector) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceSelector.DiscardUnknown(m)
}
-var xxx_messageInfo_AllocationResult proto.InternalMessageInfo
+var xxx_messageInfo_DeviceSelector proto.InternalMessageInfo
-func (m *BasicDevice) Reset() { *m = BasicDevice{} }
-func (*BasicDevice) ProtoMessage() {}
-func (*BasicDevice) Descriptor() ([]byte, []int) {
+func (m *DeviceTaint) Reset() { *m = DeviceTaint{} }
+func (*DeviceTaint) ProtoMessage() {}
+func (*DeviceTaint) Descriptor() ([]byte, []int) {
return fileDescriptor_66649ee9bbcd89d2, []int{2}
}
-func (m *BasicDevice) XXX_Unmarshal(b []byte) error {
+func (m *DeviceTaint) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
-func (m *BasicDevice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+func (m *DeviceTaint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
@@ -122,27 +116,27 @@ func (m *BasicDevice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
}
return b[:n], nil
}
-func (m *BasicDevice) XXX_Merge(src proto.Message) {
- xxx_messageInfo_BasicDevice.Merge(m, src)
+func (m *DeviceTaint) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceTaint.Merge(m, src)
}
-func (m *BasicDevice) XXX_Size() int {
+func (m *DeviceTaint) XXX_Size() int {
return m.Size()
}
-func (m *BasicDevice) XXX_DiscardUnknown() {
- xxx_messageInfo_BasicDevice.DiscardUnknown(m)
+func (m *DeviceTaint) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceTaint.DiscardUnknown(m)
}
-var xxx_messageInfo_BasicDevice proto.InternalMessageInfo
+var xxx_messageInfo_DeviceTaint proto.InternalMessageInfo
-func (m *CELDeviceSelector) Reset() { *m = CELDeviceSelector{} }
-func (*CELDeviceSelector) ProtoMessage() {}
-func (*CELDeviceSelector) Descriptor() ([]byte, []int) {
+func (m *DeviceTaintRule) Reset() { *m = DeviceTaintRule{} }
+func (*DeviceTaintRule) ProtoMessage() {}
+func (*DeviceTaintRule) Descriptor() ([]byte, []int) {
return fileDescriptor_66649ee9bbcd89d2, []int{3}
}
-func (m *CELDeviceSelector) XXX_Unmarshal(b []byte) error {
+func (m *DeviceTaintRule) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
-func (m *CELDeviceSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+func (m *DeviceTaintRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
@@ -150,27 +144,27 @@ func (m *CELDeviceSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, e
}
return b[:n], nil
}
-func (m *CELDeviceSelector) XXX_Merge(src proto.Message) {
- xxx_messageInfo_CELDeviceSelector.Merge(m, src)
+func (m *DeviceTaintRule) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceTaintRule.Merge(m, src)
}
-func (m *CELDeviceSelector) XXX_Size() int {
+func (m *DeviceTaintRule) XXX_Size() int {
return m.Size()
}
-func (m *CELDeviceSelector) XXX_DiscardUnknown() {
- xxx_messageInfo_CELDeviceSelector.DiscardUnknown(m)
+func (m *DeviceTaintRule) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceTaintRule.DiscardUnknown(m)
}
-var xxx_messageInfo_CELDeviceSelector proto.InternalMessageInfo
+var xxx_messageInfo_DeviceTaintRule proto.InternalMessageInfo
-func (m *Counter) Reset() { *m = Counter{} }
-func (*Counter) ProtoMessage() {}
-func (*Counter) Descriptor() ([]byte, []int) {
+func (m *DeviceTaintRuleList) Reset() { *m = DeviceTaintRuleList{} }
+func (*DeviceTaintRuleList) ProtoMessage() {}
+func (*DeviceTaintRuleList) Descriptor() ([]byte, []int) {
return fileDescriptor_66649ee9bbcd89d2, []int{4}
}
-func (m *Counter) XXX_Unmarshal(b []byte) error {
+func (m *DeviceTaintRuleList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
-func (m *Counter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+func (m *DeviceTaintRuleList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
@@ -178,27 +172,27 @@ func (m *Counter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
}
return b[:n], nil
}
-func (m *Counter) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Counter.Merge(m, src)
+func (m *DeviceTaintRuleList) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceTaintRuleList.Merge(m, src)
}
-func (m *Counter) XXX_Size() int {
+func (m *DeviceTaintRuleList) XXX_Size() int {
return m.Size()
}
-func (m *Counter) XXX_DiscardUnknown() {
- xxx_messageInfo_Counter.DiscardUnknown(m)
+func (m *DeviceTaintRuleList) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceTaintRuleList.DiscardUnknown(m)
}
-var xxx_messageInfo_Counter proto.InternalMessageInfo
+var xxx_messageInfo_DeviceTaintRuleList proto.InternalMessageInfo
-func (m *CounterSet) Reset() { *m = CounterSet{} }
-func (*CounterSet) ProtoMessage() {}
-func (*CounterSet) Descriptor() ([]byte, []int) {
+func (m *DeviceTaintRuleSpec) Reset() { *m = DeviceTaintRuleSpec{} }
+func (*DeviceTaintRuleSpec) ProtoMessage() {}
+func (*DeviceTaintRuleSpec) Descriptor() ([]byte, []int) {
return fileDescriptor_66649ee9bbcd89d2, []int{5}
}
-func (m *CounterSet) XXX_Unmarshal(b []byte) error {
+func (m *DeviceTaintRuleSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
-func (m *CounterSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+func (m *DeviceTaintRuleSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
@@ -206,27 +200,27 @@ func (m *CounterSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
}
return b[:n], nil
}
-func (m *CounterSet) XXX_Merge(src proto.Message) {
- xxx_messageInfo_CounterSet.Merge(m, src)
+func (m *DeviceTaintRuleSpec) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceTaintRuleSpec.Merge(m, src)
}
-func (m *CounterSet) XXX_Size() int {
+func (m *DeviceTaintRuleSpec) XXX_Size() int {
return m.Size()
}
-func (m *CounterSet) XXX_DiscardUnknown() {
- xxx_messageInfo_CounterSet.DiscardUnknown(m)
+func (m *DeviceTaintRuleSpec) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceTaintRuleSpec.DiscardUnknown(m)
}
-var xxx_messageInfo_CounterSet proto.InternalMessageInfo
+var xxx_messageInfo_DeviceTaintRuleSpec proto.InternalMessageInfo
-func (m *Device) Reset() { *m = Device{} }
-func (*Device) ProtoMessage() {}
-func (*Device) Descriptor() ([]byte, []int) {
+func (m *DeviceTaintSelector) Reset() { *m = DeviceTaintSelector{} }
+func (*DeviceTaintSelector) ProtoMessage() {}
+func (*DeviceTaintSelector) Descriptor() ([]byte, []int) {
return fileDescriptor_66649ee9bbcd89d2, []int{6}
}
-func (m *Device) XXX_Unmarshal(b []byte) error {
+func (m *DeviceTaintSelector) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
-func (m *Device) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+func (m *DeviceTaintSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
@@ -234,10718 +228,616 @@ func (m *Device) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
}
return b[:n], nil
}
-func (m *Device) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Device.Merge(m, src)
+func (m *DeviceTaintSelector) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceTaintSelector.Merge(m, src)
}
-func (m *Device) XXX_Size() int {
+func (m *DeviceTaintSelector) XXX_Size() int {
return m.Size()
}
-func (m *Device) XXX_DiscardUnknown() {
- xxx_messageInfo_Device.DiscardUnknown(m)
+func (m *DeviceTaintSelector) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceTaintSelector.DiscardUnknown(m)
}
-var xxx_messageInfo_Device proto.InternalMessageInfo
+var xxx_messageInfo_DeviceTaintSelector proto.InternalMessageInfo
-func (m *DeviceAllocationConfiguration) Reset() { *m = DeviceAllocationConfiguration{} }
-func (*DeviceAllocationConfiguration) ProtoMessage() {}
-func (*DeviceAllocationConfiguration) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{7}
-}
-func (m *DeviceAllocationConfiguration) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *DeviceAllocationConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
-}
-func (m *DeviceAllocationConfiguration) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceAllocationConfiguration.Merge(m, src)
-}
-func (m *DeviceAllocationConfiguration) XXX_Size() int {
- return m.Size()
-}
-func (m *DeviceAllocationConfiguration) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceAllocationConfiguration.DiscardUnknown(m)
+func init() {
+ proto.RegisterType((*CELDeviceSelector)(nil), "k8s.io.api.resource.v1alpha3.CELDeviceSelector")
+ proto.RegisterType((*DeviceSelector)(nil), "k8s.io.api.resource.v1alpha3.DeviceSelector")
+ proto.RegisterType((*DeviceTaint)(nil), "k8s.io.api.resource.v1alpha3.DeviceTaint")
+ proto.RegisterType((*DeviceTaintRule)(nil), "k8s.io.api.resource.v1alpha3.DeviceTaintRule")
+ proto.RegisterType((*DeviceTaintRuleList)(nil), "k8s.io.api.resource.v1alpha3.DeviceTaintRuleList")
+ proto.RegisterType((*DeviceTaintRuleSpec)(nil), "k8s.io.api.resource.v1alpha3.DeviceTaintRuleSpec")
+ proto.RegisterType((*DeviceTaintSelector)(nil), "k8s.io.api.resource.v1alpha3.DeviceTaintSelector")
}
-var xxx_messageInfo_DeviceAllocationConfiguration proto.InternalMessageInfo
-
-func (m *DeviceAllocationResult) Reset() { *m = DeviceAllocationResult{} }
-func (*DeviceAllocationResult) ProtoMessage() {}
-func (*DeviceAllocationResult) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{8}
+func init() {
+ proto.RegisterFile("k8s.io/api/resource/v1alpha3/generated.proto", fileDescriptor_66649ee9bbcd89d2)
}
-func (m *DeviceAllocationResult) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
+
+var fileDescriptor_66649ee9bbcd89d2 = []byte{
+ // 716 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xbf, 0x6f, 0xd3, 0x40,
+ 0x14, 0x8e, 0x9b, 0xa4, 0x24, 0x17, 0xda, 0xd2, 0xeb, 0x12, 0x55, 0xc5, 0xae, 0xdc, 0xa5, 0xa0,
+ 0xd6, 0x26, 0x01, 0x21, 0x04, 0x62, 0x20, 0x6d, 0x84, 0x80, 0x52, 0xd0, 0xb5, 0x02, 0x09, 0x15,
+ 0x89, 0xab, 0xf3, 0x9a, 0x98, 0xd8, 0xb1, 0xe5, 0x73, 0x22, 0xba, 0xf5, 0x4f, 0x60, 0x84, 0x8d,
+ 0xff, 0x86, 0x8c, 0x1d, 0x18, 0x3a, 0xa0, 0x88, 0x9a, 0xbf, 0x80, 0x95, 0x09, 0xdd, 0xf9, 0x12,
+ 0xa7, 0x8e, 0x28, 0x61, 0x8b, 0xbf, 0xfb, 0xde, 0xf7, 0xde, 0xf7, 0x7e, 0x28, 0x68, 0xa3, 0x7d,
+ 0x8f, 0x19, 0xb6, 0x67, 0x52, 0xdf, 0x36, 0x03, 0x60, 0x5e, 0x37, 0xb0, 0xc0, 0xec, 0x55, 0xa8,
+ 0xe3, 0xb7, 0xe8, 0x6d, 0xb3, 0x09, 0x1d, 0x08, 0x68, 0x08, 0x0d, 0xc3, 0x0f, 0xbc, 0xd0, 0xc3,
+ 0x2b, 0x31, 0xdb, 0xa0, 0xbe, 0x6d, 0x0c, 0xd9, 0xc6, 0x90, 0xbd, 0xbc, 0xd9, 0xb4, 0xc3, 0x56,
+ 0xf7, 0xd0, 0xb0, 0x3c, 0xd7, 0x6c, 0x7a, 0x4d, 0xcf, 0x14, 0x41, 0x87, 0xdd, 0x23, 0xf1, 0x25,
+ 0x3e, 0xc4, 0xaf, 0x58, 0x6c, 0xf9, 0x4e, 0x92, 0xda, 0xa5, 0x56, 0xcb, 0xee, 0x40, 0x70, 0x6c,
+ 0xfa, 0xed, 0x26, 0x07, 0x98, 0xe9, 0x42, 0x48, 0xcd, 0x5e, 0x25, 0x5d, 0xc2, 0xb2, 0xf9, 0xb7,
+ 0xa8, 0xa0, 0xdb, 0x09, 0x6d, 0x17, 0x26, 0x02, 0xee, 0xfe, 0x2b, 0x80, 0x59, 0x2d, 0x70, 0x69,
+ 0x3a, 0x4e, 0x7f, 0x8c, 0x16, 0xb7, 0xea, 0x3b, 0xdb, 0xd0, 0xb3, 0x2d, 0xd8, 0x03, 0x07, 0xac,
+ 0xd0, 0x0b, 0x70, 0x15, 0x21, 0xf8, 0xe0, 0x07, 0xc0, 0x98, 0xed, 0x75, 0xca, 0xca, 0xaa, 0xb2,
+ 0x5e, 0xac, 0xe1, 0xfe, 0x40, 0xcb, 0x44, 0x03, 0x0d, 0xd5, 0x47, 0x2f, 0x64, 0x8c, 0xa5, 0x1f,
+ 0xa0, 0xf9, 0x94, 0xca, 0x53, 0x94, 0xb5, 0xc0, 0x11, 0xe1, 0xa5, 0xaa, 0x69, 0x5c, 0xd6, 0x54,
+ 0x63, 0xa2, 0x86, 0xda, 0x95, 0x68, 0xa0, 0x65, 0xb7, 0xea, 0x3b, 0x84, 0x8b, 0xe8, 0xbf, 0x14,
+ 0x54, 0x8a, 0x09, 0xfb, 0xd4, 0xee, 0x84, 0xf8, 0x3a, 0xca, 0xb6, 0xe1, 0x58, 0x96, 0x56, 0x92,
+ 0xa5, 0x65, 0x9f, 0xc1, 0x31, 0xe1, 0x38, 0x5e, 0x43, 0xf9, 0x1e, 0x75, 0xba, 0x50, 0x9e, 0x11,
+ 0x84, 0x39, 0x49, 0xc8, 0xbf, 0xe2, 0x20, 0x89, 0xdf, 0xf0, 0x03, 0x34, 0x0b, 0x47, 0x47, 0x60,
+ 0x85, 0xe5, 0xac, 0x60, 0xad, 0x49, 0xd6, 0x6c, 0x5d, 0xa0, 0xbf, 0x07, 0xda, 0xe2, 0x58, 0xca,
+ 0x18, 0x24, 0x32, 0x04, 0xbf, 0x46, 0x45, 0xde, 0xd6, 0x47, 0x8d, 0x06, 0x34, 0xca, 0x39, 0x61,
+ 0xf1, 0xe6, 0x98, 0xc5, 0xd1, 0x0c, 0x0c, 0xbf, 0xdd, 0xe4, 0x00, 0x33, 0xf8, 0xa8, 0x8d, 0x5e,
+ 0xc5, 0xd8, 0xb7, 0x5d, 0xa8, 0xcd, 0x45, 0x03, 0xad, 0xb8, 0x3f, 0x14, 0x20, 0x89, 0xd6, 0xfd,
+ 0xc2, 0xa7, 0x2f, 0x5a, 0xe6, 0xe4, 0xfb, 0x6a, 0x46, 0xef, 0x2b, 0x68, 0x61, 0xac, 0x00, 0xd2,
+ 0x75, 0x00, 0xbf, 0x43, 0x05, 0xae, 0xd3, 0xa0, 0x21, 0x95, 0x8d, 0xbd, 0x35, 0x5d, 0xd6, 0x17,
+ 0x87, 0xef, 0xc1, 0x0a, 0x9f, 0x43, 0x48, 0x93, 0x49, 0x26, 0x18, 0x19, 0xa9, 0xe2, 0x3d, 0x94,
+ 0x63, 0x3e, 0x58, 0xa2, 0x73, 0xa5, 0x6a, 0xe5, 0xf2, 0xb1, 0xa5, 0xca, 0xdb, 0xf3, 0xc1, 0xaa,
+ 0x5d, 0x95, 0xf2, 0x39, 0xfe, 0x45, 0x84, 0x98, 0xfe, 0x55, 0x41, 0x4b, 0x29, 0xee, 0x8e, 0xcd,
+ 0x42, 0x7c, 0x30, 0x61, 0xc7, 0x98, 0xce, 0x0e, 0x8f, 0x16, 0x66, 0xae, 0xc9, 0x6c, 0x85, 0x21,
+ 0x32, 0x66, 0x85, 0xa0, 0xbc, 0x1d, 0x82, 0xcb, 0xca, 0x33, 0xab, 0xd9, 0xf5, 0x52, 0x75, 0xf3,
+ 0xbf, 0xbc, 0x24, 0x4b, 0xf3, 0x84, 0x6b, 0x90, 0x58, 0x4a, 0xff, 0x36, 0xe9, 0x84, 0xfb, 0xc4,
+ 0x2e, 0x9a, 0x6f, 0x5c, 0x58, 0x60, 0xe9, 0x67, 0xfa, 0x06, 0x8e, 0x36, 0x1f, 0x47, 0x03, 0x2d,
+ 0x75, 0x4b, 0x24, 0x25, 0x8e, 0x77, 0x51, 0x3e, 0xe4, 0x41, 0x72, 0x4c, 0x37, 0xa6, 0xce, 0x92,
+ 0xd8, 0x8a, 0xeb, 0x8f, 0x65, 0xf4, 0xcf, 0x33, 0x17, 0x6c, 0x8d, 0xf2, 0x3c, 0x44, 0x0b, 0x71,
+ 0xe6, 0x2d, 0x87, 0x32, 0xb6, 0x4b, 0x5d, 0x90, 0x37, 0xb7, 0x14, 0x0d, 0x34, 0xb9, 0x9d, 0xa3,
+ 0x27, 0x92, 0xe6, 0x62, 0x1d, 0xcd, 0x36, 0x02, 0xbb, 0x07, 0x81, 0x3c, 0x44, 0xc4, 0xcf, 0x6b,
+ 0x5b, 0x20, 0x44, 0xbe, 0xe0, 0x15, 0x94, 0xf3, 0x3d, 0xcf, 0x91, 0x47, 0x58, 0xe0, 0x9b, 0xf3,
+ 0xd2, 0xf3, 0x1c, 0x22, 0x50, 0xa1, 0x20, 0x44, 0xc5, 0x91, 0x0d, 0x15, 0x04, 0x42, 0xe4, 0x0b,
+ 0x7e, 0x8b, 0x8a, 0x4c, 0x16, 0xcc, 0xca, 0x79, 0x31, 0xeb, 0x8d, 0x69, 0x1a, 0x32, 0xea, 0xf8,
+ 0xa2, 0xec, 0x49, 0x71, 0x88, 0x30, 0x92, 0x28, 0xd6, 0x6a, 0xfd, 0x73, 0x35, 0x73, 0x7a, 0xae,
+ 0x66, 0xce, 0xce, 0xd5, 0xcc, 0x49, 0xa4, 0x2a, 0xfd, 0x48, 0x55, 0x4e, 0x23, 0x55, 0x39, 0x8b,
+ 0x54, 0xe5, 0x47, 0xa4, 0x2a, 0x1f, 0x7f, 0xaa, 0x99, 0x37, 0x2b, 0x97, 0xfd, 0xc5, 0xfc, 0x09,
+ 0x00, 0x00, 0xff, 0xff, 0x7e, 0xb1, 0x06, 0x7b, 0x81, 0x06, 0x00, 0x00,
}
-func (m *DeviceAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
+
+func (m *CELDeviceSelector) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
- return b[:n], nil
-}
-func (m *DeviceAllocationResult) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceAllocationResult.Merge(m, src)
-}
-func (m *DeviceAllocationResult) XXX_Size() int {
- return m.Size()
-}
-func (m *DeviceAllocationResult) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceAllocationResult.DiscardUnknown(m)
+ return dAtA[:n], nil
}
-var xxx_messageInfo_DeviceAllocationResult proto.InternalMessageInfo
-
-func (m *DeviceAttribute) Reset() { *m = DeviceAttribute{} }
-func (*DeviceAttribute) ProtoMessage() {}
-func (*DeviceAttribute) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{9}
+func (m *CELDeviceSelector) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *DeviceAttribute) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
+
+func (m *CELDeviceSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ i -= len(m.Expression)
+ copy(dAtA[i:], m.Expression)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Expression)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
}
-func (m *DeviceAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
+
+func (m *DeviceSelector) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
- return b[:n], nil
-}
-func (m *DeviceAttribute) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceAttribute.Merge(m, src)
-}
-func (m *DeviceAttribute) XXX_Size() int {
- return m.Size()
-}
-func (m *DeviceAttribute) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceAttribute.DiscardUnknown(m)
+ return dAtA[:n], nil
}
-var xxx_messageInfo_DeviceAttribute proto.InternalMessageInfo
-
-func (m *DeviceClaim) Reset() { *m = DeviceClaim{} }
-func (*DeviceClaim) ProtoMessage() {}
-func (*DeviceClaim) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{10}
-}
-func (m *DeviceClaim) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
+func (m *DeviceSelector) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *DeviceClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+
+func (m *DeviceSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.CEL != nil {
+ {
+ size, err := m.CEL.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
}
- return b[:n], nil
-}
-func (m *DeviceClaim) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceClaim.Merge(m, src)
-}
-func (m *DeviceClaim) XXX_Size() int {
- return m.Size()
-}
-func (m *DeviceClaim) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceClaim.DiscardUnknown(m)
+ return len(dAtA) - i, nil
}
-var xxx_messageInfo_DeviceClaim proto.InternalMessageInfo
-
-func (m *DeviceClaimConfiguration) Reset() { *m = DeviceClaimConfiguration{} }
-func (*DeviceClaimConfiguration) ProtoMessage() {}
-func (*DeviceClaimConfiguration) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{11}
-}
-func (m *DeviceClaimConfiguration) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *DeviceClaimConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
+func (m *DeviceTaint) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
- return b[:n], nil
-}
-func (m *DeviceClaimConfiguration) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceClaimConfiguration.Merge(m, src)
-}
-func (m *DeviceClaimConfiguration) XXX_Size() int {
- return m.Size()
-}
-func (m *DeviceClaimConfiguration) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceClaimConfiguration.DiscardUnknown(m)
+ return dAtA[:n], nil
}
-var xxx_messageInfo_DeviceClaimConfiguration proto.InternalMessageInfo
-
-func (m *DeviceClass) Reset() { *m = DeviceClass{} }
-func (*DeviceClass) ProtoMessage() {}
-func (*DeviceClass) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{12}
+func (m *DeviceTaint) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *DeviceClass) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
+
+func (m *DeviceTaint) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.TimeAdded != nil {
+ {
+ size, err := m.TimeAdded.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x22
+ }
+ i -= len(m.Effect)
+ copy(dAtA[i:], m.Effect)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Effect)))
+ i--
+ dAtA[i] = 0x1a
+ i -= len(m.Value)
+ copy(dAtA[i:], m.Value)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value)))
+ i--
+ dAtA[i] = 0x12
+ i -= len(m.Key)
+ copy(dAtA[i:], m.Key)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
}
-func (m *DeviceClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
+
+func (m *DeviceTaintRule) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
- return b[:n], nil
-}
-func (m *DeviceClass) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceClass.Merge(m, src)
-}
-func (m *DeviceClass) XXX_Size() int {
- return m.Size()
-}
-func (m *DeviceClass) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceClass.DiscardUnknown(m)
+ return dAtA[:n], nil
}
-var xxx_messageInfo_DeviceClass proto.InternalMessageInfo
-
-func (m *DeviceClassConfiguration) Reset() { *m = DeviceClassConfiguration{} }
-func (*DeviceClassConfiguration) ProtoMessage() {}
-func (*DeviceClassConfiguration) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{13}
-}
-func (m *DeviceClassConfiguration) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *DeviceClassConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
-}
-func (m *DeviceClassConfiguration) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceClassConfiguration.Merge(m, src)
-}
-func (m *DeviceClassConfiguration) XXX_Size() int {
- return m.Size()
-}
-func (m *DeviceClassConfiguration) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceClassConfiguration.DiscardUnknown(m)
+func (m *DeviceTaintRule) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
}
-var xxx_messageInfo_DeviceClassConfiguration proto.InternalMessageInfo
-
-func (m *DeviceClassList) Reset() { *m = DeviceClassList{} }
-func (*DeviceClassList) ProtoMessage() {}
-func (*DeviceClassList) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{14}
-}
-func (m *DeviceClassList) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *DeviceClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+func (m *DeviceTaintRule) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ {
+ size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
}
- return b[:n], nil
-}
-func (m *DeviceClassList) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceClassList.Merge(m, src)
-}
-func (m *DeviceClassList) XXX_Size() int {
- return m.Size()
-}
-func (m *DeviceClassList) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceClassList.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_DeviceClassList proto.InternalMessageInfo
-
-func (m *DeviceClassSpec) Reset() { *m = DeviceClassSpec{} }
-func (*DeviceClassSpec) ProtoMessage() {}
-func (*DeviceClassSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{15}
-}
-func (m *DeviceClassSpec) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *DeviceClassSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+ i--
+ dAtA[i] = 0x12
+ {
+ size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
}
- return b[:n], nil
-}
-func (m *DeviceClassSpec) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceClassSpec.Merge(m, src)
-}
-func (m *DeviceClassSpec) XXX_Size() int {
- return m.Size()
-}
-func (m *DeviceClassSpec) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceClassSpec.DiscardUnknown(m)
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
}
-var xxx_messageInfo_DeviceClassSpec proto.InternalMessageInfo
-
-func (m *DeviceConfiguration) Reset() { *m = DeviceConfiguration{} }
-func (*DeviceConfiguration) ProtoMessage() {}
-func (*DeviceConfiguration) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{16}
-}
-func (m *DeviceConfiguration) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *DeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
+func (m *DeviceTaintRuleList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
- return b[:n], nil
-}
-func (m *DeviceConfiguration) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceConfiguration.Merge(m, src)
-}
-func (m *DeviceConfiguration) XXX_Size() int {
- return m.Size()
-}
-func (m *DeviceConfiguration) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceConfiguration.DiscardUnknown(m)
+ return dAtA[:n], nil
}
-var xxx_messageInfo_DeviceConfiguration proto.InternalMessageInfo
-
-func (m *DeviceConstraint) Reset() { *m = DeviceConstraint{} }
-func (*DeviceConstraint) ProtoMessage() {}
-func (*DeviceConstraint) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{17}
-}
-func (m *DeviceConstraint) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *DeviceConstraint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
-}
-func (m *DeviceConstraint) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceConstraint.Merge(m, src)
-}
-func (m *DeviceConstraint) XXX_Size() int {
- return m.Size()
-}
-func (m *DeviceConstraint) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceConstraint.DiscardUnknown(m)
+func (m *DeviceTaintRuleList) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
}
-var xxx_messageInfo_DeviceConstraint proto.InternalMessageInfo
-
-func (m *DeviceCounterConsumption) Reset() { *m = DeviceCounterConsumption{} }
-func (*DeviceCounterConsumption) ProtoMessage() {}
-func (*DeviceCounterConsumption) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{18}
-}
-func (m *DeviceCounterConsumption) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *DeviceCounterConsumption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+func (m *DeviceTaintRuleList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
}
- return b[:n], nil
-}
-func (m *DeviceCounterConsumption) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceCounterConsumption.Merge(m, src)
-}
-func (m *DeviceCounterConsumption) XXX_Size() int {
- return m.Size()
-}
-func (m *DeviceCounterConsumption) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceCounterConsumption.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_DeviceCounterConsumption proto.InternalMessageInfo
-
-func (m *DeviceRequest) Reset() { *m = DeviceRequest{} }
-func (*DeviceRequest) ProtoMessage() {}
-func (*DeviceRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{19}
-}
-func (m *DeviceRequest) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *DeviceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+ {
+ size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
}
- return b[:n], nil
-}
-func (m *DeviceRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceRequest.Merge(m, src)
-}
-func (m *DeviceRequest) XXX_Size() int {
- return m.Size()
-}
-func (m *DeviceRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceRequest.DiscardUnknown(m)
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
}
-var xxx_messageInfo_DeviceRequest proto.InternalMessageInfo
-
-func (m *DeviceRequestAllocationResult) Reset() { *m = DeviceRequestAllocationResult{} }
-func (*DeviceRequestAllocationResult) ProtoMessage() {}
-func (*DeviceRequestAllocationResult) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{20}
-}
-func (m *DeviceRequestAllocationResult) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *DeviceRequestAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
+func (m *DeviceTaintRuleSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
- return b[:n], nil
-}
-func (m *DeviceRequestAllocationResult) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceRequestAllocationResult.Merge(m, src)
-}
-func (m *DeviceRequestAllocationResult) XXX_Size() int {
- return m.Size()
-}
-func (m *DeviceRequestAllocationResult) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceRequestAllocationResult.DiscardUnknown(m)
+ return dAtA[:n], nil
}
-var xxx_messageInfo_DeviceRequestAllocationResult proto.InternalMessageInfo
-
-func (m *DeviceSelector) Reset() { *m = DeviceSelector{} }
-func (*DeviceSelector) ProtoMessage() {}
-func (*DeviceSelector) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{21}
-}
-func (m *DeviceSelector) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
+func (m *DeviceTaintRuleSpec) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *DeviceSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+
+func (m *DeviceTaintRuleSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ {
+ size, err := m.Taint.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
}
- return b[:n], nil
-}
-func (m *DeviceSelector) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceSelector.Merge(m, src)
-}
-func (m *DeviceSelector) XXX_Size() int {
- return m.Size()
-}
-func (m *DeviceSelector) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceSelector.DiscardUnknown(m)
+ i--
+ dAtA[i] = 0x12
+ if m.DeviceSelector != nil {
+ {
+ size, err := m.DeviceSelector.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
}
-var xxx_messageInfo_DeviceSelector proto.InternalMessageInfo
-
-func (m *DeviceSubRequest) Reset() { *m = DeviceSubRequest{} }
-func (*DeviceSubRequest) ProtoMessage() {}
-func (*DeviceSubRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{22}
-}
-func (m *DeviceSubRequest) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *DeviceSubRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
+func (m *DeviceTaintSelector) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
- return b[:n], nil
-}
-func (m *DeviceSubRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceSubRequest.Merge(m, src)
-}
-func (m *DeviceSubRequest) XXX_Size() int {
- return m.Size()
-}
-func (m *DeviceSubRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceSubRequest.DiscardUnknown(m)
+ return dAtA[:n], nil
}
-var xxx_messageInfo_DeviceSubRequest proto.InternalMessageInfo
-
-func (m *DeviceTaint) Reset() { *m = DeviceTaint{} }
-func (*DeviceTaint) ProtoMessage() {}
-func (*DeviceTaint) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{23}
+func (m *DeviceTaintSelector) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *DeviceTaint) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *DeviceTaint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
-}
-func (m *DeviceTaint) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceTaint.Merge(m, src)
-}
-func (m *DeviceTaint) XXX_Size() int {
- return m.Size()
-}
-func (m *DeviceTaint) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceTaint.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_DeviceTaint proto.InternalMessageInfo
-func (m *DeviceTaintRule) Reset() { *m = DeviceTaintRule{} }
-func (*DeviceTaintRule) ProtoMessage() {}
-func (*DeviceTaintRule) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{24}
-}
-func (m *DeviceTaintRule) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *DeviceTaintRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+func (m *DeviceTaintSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Selectors) > 0 {
+ for iNdEx := len(m.Selectors) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Selectors[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x2a
+ }
}
- return b[:n], nil
-}
-func (m *DeviceTaintRule) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceTaintRule.Merge(m, src)
-}
-func (m *DeviceTaintRule) XXX_Size() int {
- return m.Size()
-}
-func (m *DeviceTaintRule) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceTaintRule.DiscardUnknown(m)
+ if m.Device != nil {
+ i -= len(*m.Device)
+ copy(dAtA[i:], *m.Device)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Device)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.Pool != nil {
+ i -= len(*m.Pool)
+ copy(dAtA[i:], *m.Pool)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Pool)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.Driver != nil {
+ i -= len(*m.Driver)
+ copy(dAtA[i:], *m.Driver)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Driver)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.DeviceClassName != nil {
+ i -= len(*m.DeviceClassName)
+ copy(dAtA[i:], *m.DeviceClassName)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.DeviceClassName)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
}
-var xxx_messageInfo_DeviceTaintRule proto.InternalMessageInfo
-
-func (m *DeviceTaintRuleList) Reset() { *m = DeviceTaintRuleList{} }
-func (*DeviceTaintRuleList) ProtoMessage() {}
-func (*DeviceTaintRuleList) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{25}
-}
-func (m *DeviceTaintRuleList) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *DeviceTaintRuleList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ offset -= sovGenerated(v)
+ base := offset
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
}
- return b[:n], nil
-}
-func (m *DeviceTaintRuleList) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceTaintRuleList.Merge(m, src)
-}
-func (m *DeviceTaintRuleList) XXX_Size() int {
- return m.Size()
+ dAtA[offset] = uint8(v)
+ return base
}
-func (m *DeviceTaintRuleList) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceTaintRuleList.DiscardUnknown(m)
+func (m *CELDeviceSelector) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Expression)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
}
-var xxx_messageInfo_DeviceTaintRuleList proto.InternalMessageInfo
-
-func (m *DeviceTaintRuleSpec) Reset() { *m = DeviceTaintRuleSpec{} }
-func (*DeviceTaintRuleSpec) ProtoMessage() {}
-func (*DeviceTaintRuleSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{26}
-}
-func (m *DeviceTaintRuleSpec) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *DeviceTaintRuleSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+func (m *DeviceSelector) Size() (n int) {
+ if m == nil {
+ return 0
}
- return b[:n], nil
-}
-func (m *DeviceTaintRuleSpec) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceTaintRuleSpec.Merge(m, src)
-}
-func (m *DeviceTaintRuleSpec) XXX_Size() int {
- return m.Size()
-}
-func (m *DeviceTaintRuleSpec) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceTaintRuleSpec.DiscardUnknown(m)
+ var l int
+ _ = l
+ if m.CEL != nil {
+ l = m.CEL.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
}
-var xxx_messageInfo_DeviceTaintRuleSpec proto.InternalMessageInfo
-
-func (m *DeviceTaintSelector) Reset() { *m = DeviceTaintSelector{} }
-func (*DeviceTaintSelector) ProtoMessage() {}
-func (*DeviceTaintSelector) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{27}
-}
-func (m *DeviceTaintSelector) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *DeviceTaintSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+func (m *DeviceTaint) Size() (n int) {
+ if m == nil {
+ return 0
}
- return b[:n], nil
-}
-func (m *DeviceTaintSelector) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceTaintSelector.Merge(m, src)
-}
-func (m *DeviceTaintSelector) XXX_Size() int {
- return m.Size()
-}
-func (m *DeviceTaintSelector) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceTaintSelector.DiscardUnknown(m)
+ var l int
+ _ = l
+ l = len(m.Key)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Value)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Effect)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.TimeAdded != nil {
+ l = m.TimeAdded.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
}
-var xxx_messageInfo_DeviceTaintSelector proto.InternalMessageInfo
-
-func (m *DeviceToleration) Reset() { *m = DeviceToleration{} }
-func (*DeviceToleration) ProtoMessage() {}
-func (*DeviceToleration) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{28}
-}
-func (m *DeviceToleration) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *DeviceToleration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+func (m *DeviceTaintRule) Size() (n int) {
+ if m == nil {
+ return 0
}
- return b[:n], nil
-}
-func (m *DeviceToleration) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeviceToleration.Merge(m, src)
-}
-func (m *DeviceToleration) XXX_Size() int {
- return m.Size()
-}
-func (m *DeviceToleration) XXX_DiscardUnknown() {
- xxx_messageInfo_DeviceToleration.DiscardUnknown(m)
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
}
-var xxx_messageInfo_DeviceToleration proto.InternalMessageInfo
-
-func (m *NetworkDeviceData) Reset() { *m = NetworkDeviceData{} }
-func (*NetworkDeviceData) ProtoMessage() {}
-func (*NetworkDeviceData) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{29}
-}
-func (m *NetworkDeviceData) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *NetworkDeviceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+func (m *DeviceTaintRuleList) Size() (n int) {
+ if m == nil {
+ return 0
}
- return b[:n], nil
-}
-func (m *NetworkDeviceData) XXX_Merge(src proto.Message) {
- xxx_messageInfo_NetworkDeviceData.Merge(m, src)
-}
-func (m *NetworkDeviceData) XXX_Size() int {
- return m.Size()
-}
-func (m *NetworkDeviceData) XXX_DiscardUnknown() {
- xxx_messageInfo_NetworkDeviceData.DiscardUnknown(m)
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
}
-var xxx_messageInfo_NetworkDeviceData proto.InternalMessageInfo
-
-func (m *OpaqueDeviceConfiguration) Reset() { *m = OpaqueDeviceConfiguration{} }
-func (*OpaqueDeviceConfiguration) ProtoMessage() {}
-func (*OpaqueDeviceConfiguration) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{30}
-}
-func (m *OpaqueDeviceConfiguration) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *OpaqueDeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
-}
-func (m *OpaqueDeviceConfiguration) XXX_Merge(src proto.Message) {
- xxx_messageInfo_OpaqueDeviceConfiguration.Merge(m, src)
-}
-func (m *OpaqueDeviceConfiguration) XXX_Size() int {
- return m.Size()
-}
-func (m *OpaqueDeviceConfiguration) XXX_DiscardUnknown() {
- xxx_messageInfo_OpaqueDeviceConfiguration.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_OpaqueDeviceConfiguration proto.InternalMessageInfo
-
-func (m *ResourceClaim) Reset() { *m = ResourceClaim{} }
-func (*ResourceClaim) ProtoMessage() {}
-func (*ResourceClaim) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{31}
-}
-func (m *ResourceClaim) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *ResourceClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
-}
-func (m *ResourceClaim) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ResourceClaim.Merge(m, src)
-}
-func (m *ResourceClaim) XXX_Size() int {
- return m.Size()
-}
-func (m *ResourceClaim) XXX_DiscardUnknown() {
- xxx_messageInfo_ResourceClaim.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ResourceClaim proto.InternalMessageInfo
-
-func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} }
-func (*ResourceClaimConsumerReference) ProtoMessage() {}
-func (*ResourceClaimConsumerReference) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{32}
-}
-func (m *ResourceClaimConsumerReference) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *ResourceClaimConsumerReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+func (m *DeviceTaintRuleSpec) Size() (n int) {
+ if m == nil {
+ return 0
}
- return b[:n], nil
-}
-func (m *ResourceClaimConsumerReference) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ResourceClaimConsumerReference.Merge(m, src)
-}
-func (m *ResourceClaimConsumerReference) XXX_Size() int {
- return m.Size()
-}
-func (m *ResourceClaimConsumerReference) XXX_DiscardUnknown() {
- xxx_messageInfo_ResourceClaimConsumerReference.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ResourceClaimConsumerReference proto.InternalMessageInfo
-
-func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} }
-func (*ResourceClaimList) ProtoMessage() {}
-func (*ResourceClaimList) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{33}
-}
-func (m *ResourceClaimList) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *ResourceClaimList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+ var l int
+ _ = l
+ if m.DeviceSelector != nil {
+ l = m.DeviceSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
}
- return b[:n], nil
-}
-func (m *ResourceClaimList) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ResourceClaimList.Merge(m, src)
-}
-func (m *ResourceClaimList) XXX_Size() int {
- return m.Size()
-}
-func (m *ResourceClaimList) XXX_DiscardUnknown() {
- xxx_messageInfo_ResourceClaimList.DiscardUnknown(m)
+ l = m.Taint.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
}
-var xxx_messageInfo_ResourceClaimList proto.InternalMessageInfo
-
-func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} }
-func (*ResourceClaimSpec) ProtoMessage() {}
-func (*ResourceClaimSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{34}
-}
-func (m *ResourceClaimSpec) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *ResourceClaimSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+func (m *DeviceTaintSelector) Size() (n int) {
+ if m == nil {
+ return 0
}
- return b[:n], nil
-}
-func (m *ResourceClaimSpec) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ResourceClaimSpec.Merge(m, src)
-}
-func (m *ResourceClaimSpec) XXX_Size() int {
- return m.Size()
-}
-func (m *ResourceClaimSpec) XXX_DiscardUnknown() {
- xxx_messageInfo_ResourceClaimSpec.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ResourceClaimSpec proto.InternalMessageInfo
-
-func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} }
-func (*ResourceClaimStatus) ProtoMessage() {}
-func (*ResourceClaimStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{35}
-}
-func (m *ResourceClaimStatus) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *ResourceClaimStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+ var l int
+ _ = l
+ if m.DeviceClassName != nil {
+ l = len(*m.DeviceClassName)
+ n += 1 + l + sovGenerated(uint64(l))
}
- return b[:n], nil
-}
-func (m *ResourceClaimStatus) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ResourceClaimStatus.Merge(m, src)
-}
-func (m *ResourceClaimStatus) XXX_Size() int {
- return m.Size()
-}
-func (m *ResourceClaimStatus) XXX_DiscardUnknown() {
- xxx_messageInfo_ResourceClaimStatus.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ResourceClaimStatus proto.InternalMessageInfo
-
-func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} }
-func (*ResourceClaimTemplate) ProtoMessage() {}
-func (*ResourceClaimTemplate) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{36}
-}
-func (m *ResourceClaimTemplate) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *ResourceClaimTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+ if m.Driver != nil {
+ l = len(*m.Driver)
+ n += 1 + l + sovGenerated(uint64(l))
}
- return b[:n], nil
-}
-func (m *ResourceClaimTemplate) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ResourceClaimTemplate.Merge(m, src)
-}
-func (m *ResourceClaimTemplate) XXX_Size() int {
- return m.Size()
-}
-func (m *ResourceClaimTemplate) XXX_DiscardUnknown() {
- xxx_messageInfo_ResourceClaimTemplate.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ResourceClaimTemplate proto.InternalMessageInfo
-
-func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} }
-func (*ResourceClaimTemplateList) ProtoMessage() {}
-func (*ResourceClaimTemplateList) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{37}
-}
-func (m *ResourceClaimTemplateList) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *ResourceClaimTemplateList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+ if m.Pool != nil {
+ l = len(*m.Pool)
+ n += 1 + l + sovGenerated(uint64(l))
}
- return b[:n], nil
-}
-func (m *ResourceClaimTemplateList) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ResourceClaimTemplateList.Merge(m, src)
-}
-func (m *ResourceClaimTemplateList) XXX_Size() int {
- return m.Size()
-}
-func (m *ResourceClaimTemplateList) XXX_DiscardUnknown() {
- xxx_messageInfo_ResourceClaimTemplateList.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ResourceClaimTemplateList proto.InternalMessageInfo
-
-func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} }
-func (*ResourceClaimTemplateSpec) ProtoMessage() {}
-func (*ResourceClaimTemplateSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{38}
-}
-func (m *ResourceClaimTemplateSpec) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *ResourceClaimTemplateSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+ if m.Device != nil {
+ l = len(*m.Device)
+ n += 1 + l + sovGenerated(uint64(l))
}
- return b[:n], nil
-}
-func (m *ResourceClaimTemplateSpec) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ResourceClaimTemplateSpec.Merge(m, src)
-}
-func (m *ResourceClaimTemplateSpec) XXX_Size() int {
- return m.Size()
-}
-func (m *ResourceClaimTemplateSpec) XXX_DiscardUnknown() {
- xxx_messageInfo_ResourceClaimTemplateSpec.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ResourceClaimTemplateSpec proto.InternalMessageInfo
-
-func (m *ResourcePool) Reset() { *m = ResourcePool{} }
-func (*ResourcePool) ProtoMessage() {}
-func (*ResourcePool) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{39}
-}
-func (m *ResourcePool) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *ResourcePool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+ if len(m.Selectors) > 0 {
+ for _, e := range m.Selectors {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
}
- return b[:n], nil
-}
-func (m *ResourcePool) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ResourcePool.Merge(m, src)
-}
-func (m *ResourcePool) XXX_Size() int {
- return m.Size()
-}
-func (m *ResourcePool) XXX_DiscardUnknown() {
- xxx_messageInfo_ResourcePool.DiscardUnknown(m)
+ return n
}
-var xxx_messageInfo_ResourcePool proto.InternalMessageInfo
-
-func (m *ResourceSlice) Reset() { *m = ResourceSlice{} }
-func (*ResourceSlice) ProtoMessage() {}
-func (*ResourceSlice) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{40}
+func sovGenerated(x uint64) (n int) {
+ return (math_bits.Len64(x|1) + 6) / 7
}
-func (m *ResourceSlice) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
-func (m *ResourceSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+func (this *CELDeviceSelector) String() string {
+ if this == nil {
+ return "nil"
}
- return b[:n], nil
-}
-func (m *ResourceSlice) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ResourceSlice.Merge(m, src)
-}
-func (m *ResourceSlice) XXX_Size() int {
- return m.Size()
-}
-func (m *ResourceSlice) XXX_DiscardUnknown() {
- xxx_messageInfo_ResourceSlice.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ResourceSlice proto.InternalMessageInfo
-
-func (m *ResourceSliceList) Reset() { *m = ResourceSliceList{} }
-func (*ResourceSliceList) ProtoMessage() {}
-func (*ResourceSliceList) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{41}
-}
-func (m *ResourceSliceList) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
+ s := strings.Join([]string{`&CELDeviceSelector{`,
+ `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`,
+ `}`,
+ }, "")
+ return s
}
-func (m *ResourceSliceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+func (this *DeviceSelector) String() string {
+ if this == nil {
+ return "nil"
}
- return b[:n], nil
-}
-func (m *ResourceSliceList) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ResourceSliceList.Merge(m, src)
-}
-func (m *ResourceSliceList) XXX_Size() int {
- return m.Size()
-}
-func (m *ResourceSliceList) XXX_DiscardUnknown() {
- xxx_messageInfo_ResourceSliceList.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ResourceSliceList proto.InternalMessageInfo
-
-func (m *ResourceSliceSpec) Reset() { *m = ResourceSliceSpec{} }
-func (*ResourceSliceSpec) ProtoMessage() {}
-func (*ResourceSliceSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_66649ee9bbcd89d2, []int{42}
-}
-func (m *ResourceSliceSpec) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
+ s := strings.Join([]string{`&DeviceSelector{`,
+ `CEL:` + strings.Replace(this.CEL.String(), "CELDeviceSelector", "CELDeviceSelector", 1) + `,`,
+ `}`,
+ }, "")
+ return s
}
-func (m *ResourceSliceSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
+func (this *DeviceTaintRule) String() string {
+ if this == nil {
+ return "nil"
}
- return b[:n], nil
-}
-func (m *ResourceSliceSpec) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ResourceSliceSpec.Merge(m, src)
-}
-func (m *ResourceSliceSpec) XXX_Size() int {
- return m.Size()
-}
-func (m *ResourceSliceSpec) XXX_DiscardUnknown() {
- xxx_messageInfo_ResourceSliceSpec.DiscardUnknown(m)
+ s := strings.Join([]string{`&DeviceTaintRule{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeviceTaintRuleSpec", "DeviceTaintRuleSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
}
-
-var xxx_messageInfo_ResourceSliceSpec proto.InternalMessageInfo
-
-func init() {
- proto.RegisterType((*AllocatedDeviceStatus)(nil), "k8s.io.api.resource.v1alpha3.AllocatedDeviceStatus")
- proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1alpha3.AllocationResult")
- proto.RegisterType((*BasicDevice)(nil), "k8s.io.api.resource.v1alpha3.BasicDevice")
- proto.RegisterMapType((map[QualifiedName]DeviceAttribute)(nil), "k8s.io.api.resource.v1alpha3.BasicDevice.AttributesEntry")
- proto.RegisterMapType((map[QualifiedName]resource.Quantity)(nil), "k8s.io.api.resource.v1alpha3.BasicDevice.CapacityEntry")
- proto.RegisterType((*CELDeviceSelector)(nil), "k8s.io.api.resource.v1alpha3.CELDeviceSelector")
- proto.RegisterType((*Counter)(nil), "k8s.io.api.resource.v1alpha3.Counter")
- proto.RegisterType((*CounterSet)(nil), "k8s.io.api.resource.v1alpha3.CounterSet")
- proto.RegisterMapType((map[string]Counter)(nil), "k8s.io.api.resource.v1alpha3.CounterSet.CountersEntry")
- proto.RegisterType((*Device)(nil), "k8s.io.api.resource.v1alpha3.Device")
- proto.RegisterType((*DeviceAllocationConfiguration)(nil), "k8s.io.api.resource.v1alpha3.DeviceAllocationConfiguration")
- proto.RegisterType((*DeviceAllocationResult)(nil), "k8s.io.api.resource.v1alpha3.DeviceAllocationResult")
- proto.RegisterType((*DeviceAttribute)(nil), "k8s.io.api.resource.v1alpha3.DeviceAttribute")
- proto.RegisterType((*DeviceClaim)(nil), "k8s.io.api.resource.v1alpha3.DeviceClaim")
- proto.RegisterType((*DeviceClaimConfiguration)(nil), "k8s.io.api.resource.v1alpha3.DeviceClaimConfiguration")
- proto.RegisterType((*DeviceClass)(nil), "k8s.io.api.resource.v1alpha3.DeviceClass")
- proto.RegisterType((*DeviceClassConfiguration)(nil), "k8s.io.api.resource.v1alpha3.DeviceClassConfiguration")
- proto.RegisterType((*DeviceClassList)(nil), "k8s.io.api.resource.v1alpha3.DeviceClassList")
- proto.RegisterType((*DeviceClassSpec)(nil), "k8s.io.api.resource.v1alpha3.DeviceClassSpec")
- proto.RegisterType((*DeviceConfiguration)(nil), "k8s.io.api.resource.v1alpha3.DeviceConfiguration")
- proto.RegisterType((*DeviceConstraint)(nil), "k8s.io.api.resource.v1alpha3.DeviceConstraint")
- proto.RegisterType((*DeviceCounterConsumption)(nil), "k8s.io.api.resource.v1alpha3.DeviceCounterConsumption")
- proto.RegisterMapType((map[string]Counter)(nil), "k8s.io.api.resource.v1alpha3.DeviceCounterConsumption.CountersEntry")
- proto.RegisterType((*DeviceRequest)(nil), "k8s.io.api.resource.v1alpha3.DeviceRequest")
- proto.RegisterType((*DeviceRequestAllocationResult)(nil), "k8s.io.api.resource.v1alpha3.DeviceRequestAllocationResult")
- proto.RegisterType((*DeviceSelector)(nil), "k8s.io.api.resource.v1alpha3.DeviceSelector")
- proto.RegisterType((*DeviceSubRequest)(nil), "k8s.io.api.resource.v1alpha3.DeviceSubRequest")
- proto.RegisterType((*DeviceTaint)(nil), "k8s.io.api.resource.v1alpha3.DeviceTaint")
- proto.RegisterType((*DeviceTaintRule)(nil), "k8s.io.api.resource.v1alpha3.DeviceTaintRule")
- proto.RegisterType((*DeviceTaintRuleList)(nil), "k8s.io.api.resource.v1alpha3.DeviceTaintRuleList")
- proto.RegisterType((*DeviceTaintRuleSpec)(nil), "k8s.io.api.resource.v1alpha3.DeviceTaintRuleSpec")
- proto.RegisterType((*DeviceTaintSelector)(nil), "k8s.io.api.resource.v1alpha3.DeviceTaintSelector")
- proto.RegisterType((*DeviceToleration)(nil), "k8s.io.api.resource.v1alpha3.DeviceToleration")
- proto.RegisterType((*NetworkDeviceData)(nil), "k8s.io.api.resource.v1alpha3.NetworkDeviceData")
- proto.RegisterType((*OpaqueDeviceConfiguration)(nil), "k8s.io.api.resource.v1alpha3.OpaqueDeviceConfiguration")
- proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaim")
- proto.RegisterType((*ResourceClaimConsumerReference)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimConsumerReference")
- proto.RegisterType((*ResourceClaimList)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimList")
- proto.RegisterType((*ResourceClaimSpec)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimSpec")
- proto.RegisterType((*ResourceClaimStatus)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimStatus")
- proto.RegisterType((*ResourceClaimTemplate)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimTemplate")
- proto.RegisterType((*ResourceClaimTemplateList)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimTemplateList")
- proto.RegisterType((*ResourceClaimTemplateSpec)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimTemplateSpec")
- proto.RegisterType((*ResourcePool)(nil), "k8s.io.api.resource.v1alpha3.ResourcePool")
- proto.RegisterType((*ResourceSlice)(nil), "k8s.io.api.resource.v1alpha3.ResourceSlice")
- proto.RegisterType((*ResourceSliceList)(nil), "k8s.io.api.resource.v1alpha3.ResourceSliceList")
- proto.RegisterType((*ResourceSliceSpec)(nil), "k8s.io.api.resource.v1alpha3.ResourceSliceSpec")
-}
-
-func init() {
- proto.RegisterFile("k8s.io/api/resource/v1alpha3/generated.proto", fileDescriptor_66649ee9bbcd89d2)
-}
-
-var fileDescriptor_66649ee9bbcd89d2 = []byte{
- // 2635 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x1a, 0x5b, 0x6f, 0x1c, 0x57,
- 0x39, 0xb3, 0xbb, 0x5e, 0xaf, 0xbf, 0x8d, 0x1d, 0xfb, 0x84, 0x84, 0x8d, 0x49, 0x77, 0x93, 0x09,
- 0x17, 0xa7, 0x75, 0xd6, 0x8d, 0x53, 0xb5, 0x85, 0x80, 0x84, 0xd7, 0x76, 0x52, 0xa7, 0x89, 0xe3,
- 0x9c, 0x75, 0x03, 0x81, 0x12, 0x18, 0xcf, 0x1e, 0xdb, 0x83, 0x67, 0x67, 0xa6, 0x73, 0x66, 0x9d,
- 0x5a, 0x42, 0xa8, 0xe2, 0x07, 0x54, 0xbc, 0xf2, 0x80, 0x2a, 0xf1, 0x50, 0x89, 0x17, 0xe0, 0x99,
- 0x17, 0x90, 0x40, 0x6a, 0x04, 0x3c, 0x44, 0xa2, 0x42, 0x15, 0x12, 0x0b, 0x59, 0x84, 0xf8, 0x0b,
- 0xc8, 0x4f, 0xe8, 0x5c, 0xe6, 0xba, 0x3b, 0xce, 0xac, 0x49, 0xac, 0x20, 0xf5, 0x6d, 0xf7, 0x3b,
- 0xdf, 0xed, 0x7c, 0xf7, 0x73, 0xe6, 0xc0, 0xec, 0xce, 0xeb, 0xb4, 0x6e, 0xd8, 0x73, 0x9a, 0x63,
- 0xcc, 0xb9, 0x84, 0xda, 0x1d, 0x57, 0x27, 0x73, 0xbb, 0x97, 0x35, 0xd3, 0xd9, 0xd6, 0xae, 0xcc,
- 0x6d, 0x11, 0x8b, 0xb8, 0x9a, 0x47, 0x5a, 0x75, 0xc7, 0xb5, 0x3d, 0x1b, 0x9d, 0x15, 0xd8, 0x75,
- 0xcd, 0x31, 0xea, 0x3e, 0x76, 0xdd, 0xc7, 0x9e, 0xbe, 0xb4, 0x65, 0x78, 0xdb, 0x9d, 0x8d, 0xba,
- 0x6e, 0xb7, 0xe7, 0xb6, 0xec, 0x2d, 0x7b, 0x8e, 0x13, 0x6d, 0x74, 0x36, 0xf9, 0x3f, 0xfe, 0x87,
- 0xff, 0x12, 0xcc, 0xa6, 0xd5, 0x88, 0x68, 0xdd, 0x76, 0x99, 0xd8, 0xa4, 0xc0, 0xe9, 0x57, 0x42,
- 0x9c, 0xb6, 0xa6, 0x6f, 0x1b, 0x16, 0x71, 0xf7, 0xe6, 0x9c, 0x9d, 0xad, 0xb8, 0xbe, 0xc3, 0x50,
- 0xd1, 0xb9, 0x36, 0xf1, 0xb4, 0x41, 0xb2, 0xe6, 0xd2, 0xa8, 0xdc, 0x8e, 0xe5, 0x19, 0xed, 0x7e,
- 0x31, 0xaf, 0x3e, 0x89, 0x80, 0xea, 0xdb, 0xa4, 0xad, 0x25, 0xe9, 0xd4, 0x0f, 0xf2, 0x70, 0x6a,
- 0xc1, 0x34, 0x6d, 0x9d, 0xc1, 0x96, 0xc8, 0xae, 0xa1, 0x93, 0xa6, 0xa7, 0x79, 0x1d, 0x8a, 0xbe,
- 0x08, 0xc5, 0x96, 0x6b, 0xec, 0x12, 0xb7, 0xa2, 0x9c, 0x53, 0x66, 0xc6, 0x1a, 0x13, 0x0f, 0xbb,
- 0xb5, 0x63, 0xbd, 0x6e, 0xad, 0xb8, 0xc4, 0xa1, 0x58, 0xae, 0xa2, 0x73, 0x50, 0x70, 0x6c, 0xdb,
- 0xac, 0xe4, 0x38, 0xd6, 0x71, 0x89, 0x55, 0x58, 0xb3, 0x6d, 0x13, 0xf3, 0x15, 0xce, 0x89, 0x73,
- 0xae, 0xe4, 0x13, 0x9c, 0x38, 0x14, 0xcb, 0x55, 0xa4, 0x03, 0xe8, 0xb6, 0xd5, 0x32, 0x3c, 0xc3,
- 0xb6, 0x68, 0xa5, 0x70, 0x2e, 0x3f, 0x53, 0x9e, 0x9f, 0xab, 0x87, 0x6e, 0x0e, 0x36, 0x56, 0x77,
- 0x76, 0xb6, 0x18, 0x80, 0xd6, 0x99, 0xfd, 0xea, 0xbb, 0x97, 0xeb, 0x8b, 0x3e, 0x5d, 0x03, 0x49,
- 0xe6, 0x10, 0x80, 0x28, 0x8e, 0xb0, 0x45, 0x6f, 0x42, 0xa1, 0xa5, 0x79, 0x5a, 0x65, 0xe4, 0x9c,
- 0x32, 0x53, 0x9e, 0xbf, 0x94, 0xca, 0x5e, 0xda, 0xad, 0x8e, 0xb5, 0x07, 0xcb, 0xef, 0x7a, 0xc4,
- 0xa2, 0x8c, 0x79, 0x89, 0xed, 0x6c, 0x49, 0xf3, 0x34, 0xcc, 0x99, 0xa0, 0x0d, 0x28, 0x5b, 0xc4,
- 0x7b, 0x60, 0xbb, 0x3b, 0x0c, 0x58, 0x29, 0x72, 0x9e, 0x51, 0x95, 0xfb, 0x23, 0xb3, 0xbe, 0x2a,
- 0x09, 0xf8, 0x9e, 0x19, 0x59, 0xe3, 0x44, 0xaf, 0x5b, 0x2b, 0xaf, 0x86, 0x7c, 0x70, 0x94, 0xa9,
- 0xfa, 0x47, 0x05, 0x26, 0xa5, 0x87, 0x0c, 0xdb, 0xc2, 0x84, 0x76, 0x4c, 0x0f, 0x7d, 0x17, 0x46,
- 0x85, 0xd1, 0x28, 0xf7, 0x4e, 0x79, 0xfe, 0x95, 0x83, 0x85, 0x0a, 0x69, 0x49, 0x36, 0x8d, 0x13,
- 0xd2, 0x58, 0xa3, 0x62, 0x9d, 0x62, 0x9f, 0x2b, 0xba, 0x0b, 0xc7, 0x2d, 0xbb, 0x45, 0x9a, 0xc4,
- 0x24, 0xba, 0x67, 0xbb, 0xdc, 0x73, 0xe5, 0xf9, 0x73, 0x51, 0x29, 0x2c, 0x4f, 0x98, 0xed, 0x57,
- 0x23, 0x78, 0x8d, 0xc9, 0x5e, 0xb7, 0x76, 0x3c, 0x0a, 0xc1, 0x31, 0x3e, 0xea, 0xdf, 0x8a, 0x50,
- 0x6e, 0x68, 0xd4, 0xd0, 0x85, 0x44, 0xf4, 0x43, 0x00, 0xcd, 0xf3, 0x5c, 0x63, 0xa3, 0xe3, 0xf1,
- 0xbd, 0x30, 0x9f, 0x7f, 0xf9, 0xe0, 0xbd, 0x44, 0xc8, 0xeb, 0x0b, 0x01, 0xed, 0xb2, 0xe5, 0xb9,
- 0x7b, 0x8d, 0x0b, 0xbe, 0xf7, 0xc3, 0x85, 0x1f, 0xfd, 0xbd, 0x36, 0x7e, 0xa7, 0xa3, 0x99, 0xc6,
- 0xa6, 0x41, 0x5a, 0xab, 0x5a, 0x9b, 0xe0, 0x88, 0x44, 0xb4, 0x0b, 0x25, 0x5d, 0x73, 0x34, 0xdd,
- 0xf0, 0xf6, 0x2a, 0x39, 0x2e, 0xfd, 0xb5, 0xec, 0xd2, 0x17, 0x25, 0xa5, 0x90, 0x7d, 0x5e, 0xca,
- 0x2e, 0xf9, 0xe0, 0x7e, 0xc9, 0x81, 0x2c, 0xf4, 0x03, 0x98, 0xd4, 0x6d, 0x8b, 0x76, 0xda, 0x84,
- 0x2e, 0xda, 0x1d, 0xcb, 0x23, 0x2e, 0xad, 0xe4, 0xb9, 0xfc, 0x57, 0xb3, 0x78, 0x52, 0xd2, 0x2c,
- 0x72, 0x16, 0x0e, 0x0f, 0xfc, 0x8a, 0x14, 0x3f, 0xb9, 0x98, 0xe0, 0x8b, 0xfb, 0x24, 0xa1, 0x19,
- 0x28, 0x31, 0xaf, 0x30, 0x9d, 0x2a, 0x05, 0x91, 0xb7, 0x4c, 0xf1, 0x55, 0x09, 0xc3, 0xc1, 0x6a,
- 0x5f, 0x1c, 0x8c, 0x3c, 0x9d, 0x38, 0x60, 0x1a, 0x68, 0xa6, 0xc9, 0x10, 0x28, 0x4f, 0x9b, 0x92,
- 0xd0, 0x60, 0x41, 0xc2, 0x70, 0xb0, 0x8a, 0xee, 0x40, 0xd1, 0xd3, 0x0c, 0xcb, 0xa3, 0x95, 0x51,
- 0x6e, 0x9f, 0x8b, 0x59, 0xec, 0xb3, 0xce, 0x28, 0xc2, 0x42, 0xc3, 0xff, 0x52, 0x2c, 0x19, 0x4d,
- 0x9b, 0x70, 0x22, 0x11, 0x38, 0x68, 0x12, 0xf2, 0x3b, 0x64, 0x4f, 0x94, 0x3a, 0xcc, 0x7e, 0xa2,
- 0x45, 0x18, 0xd9, 0xd5, 0xcc, 0x0e, 0xe1, 0x85, 0x2d, 0x5e, 0x29, 0xd2, 0x13, 0xcc, 0xe7, 0x8a,
- 0x05, 0xed, 0x57, 0x72, 0xaf, 0x2b, 0xd3, 0x3b, 0x30, 0x1e, 0x0b, 0x94, 0x01, 0xb2, 0x96, 0xe2,
- 0xb2, 0xea, 0x07, 0x15, 0xbd, 0x50, 0xf8, 0x9d, 0x8e, 0x66, 0x79, 0x86, 0xb7, 0x17, 0x11, 0xa6,
- 0x5e, 0x87, 0xa9, 0xc5, 0xe5, 0x9b, 0xb2, 0x90, 0xfb, 0xc6, 0x9e, 0x07, 0x20, 0xef, 0x3a, 0x2e,
- 0xa1, 0xac, 0x88, 0xc9, 0x72, 0x1e, 0xd4, 0xc9, 0xe5, 0x60, 0x05, 0x47, 0xb0, 0xd4, 0xfb, 0x30,
- 0x2a, 0xc3, 0x05, 0x35, 0x7d, 0xed, 0x94, 0xc3, 0x68, 0xd7, 0x18, 0x97, 0x92, 0x46, 0xee, 0x32,
- 0x26, 0x52, 0x59, 0xf5, 0x3f, 0x0a, 0x80, 0x14, 0xd0, 0x24, 0x1e, 0xeb, 0x22, 0x16, 0x8b, 0x46,
- 0x25, 0xde, 0x45, 0x78, 0x34, 0xf2, 0x15, 0xd4, 0x82, 0x92, 0xee, 0x67, 0x4a, 0x2e, 0x4b, 0xa6,
- 0x84, 0xdc, 0xfd, 0x9f, 0xb2, 0x48, 0x4c, 0x06, 0x89, 0xea, 0x67, 0x48, 0xc0, 0x79, 0x7a, 0x03,
- 0xc6, 0x63, 0xc8, 0x03, 0x9c, 0x75, 0x35, 0xee, 0xac, 0x2f, 0x64, 0xd2, 0x22, 0xea, 0xa3, 0x5d,
- 0x90, 0x9d, 0x2f, 0xc3, 0xae, 0x6f, 0xc0, 0xc8, 0x06, 0xab, 0x38, 0x52, 0xd8, 0xc5, 0xcc, 0xc5,
- 0xa9, 0x31, 0xc6, 0x4c, 0xce, 0x01, 0x58, 0xb0, 0x50, 0xdf, 0xcf, 0xc1, 0x0b, 0xc9, 0x46, 0xb0,
- 0x68, 0x5b, 0x9b, 0xc6, 0x56, 0xc7, 0xe5, 0x7f, 0xd0, 0xd7, 0xa1, 0x28, 0x58, 0x4a, 0x8d, 0x66,
- 0xfc, 0x04, 0x6a, 0x72, 0xe8, 0x7e, 0xb7, 0x76, 0x3a, 0x49, 0x2a, 0x56, 0xb0, 0xa4, 0x63, 0x79,
- 0xed, 0x92, 0x77, 0x3a, 0x84, 0x7a, 0xc2, 0x4b, 0xb2, 0xb2, 0x60, 0x09, 0xc3, 0xc1, 0x2a, 0x7a,
- 0x4f, 0x81, 0x93, 0x2d, 0x59, 0xcc, 0x22, 0x3a, 0xc8, 0x4e, 0x73, 0x39, 0x5b, 0x15, 0x8c, 0x10,
- 0x36, 0x3e, 0x27, 0x95, 0x3d, 0x39, 0x60, 0x11, 0x0f, 0x12, 0xa5, 0xfe, 0x4b, 0x81, 0xd3, 0x83,
- 0x3b, 0x23, 0xda, 0x84, 0x51, 0x97, 0xff, 0xf2, 0x9b, 0xd2, 0xd5, 0x2c, 0x0a, 0xc9, 0x6d, 0xa6,
- 0xf7, 0x59, 0xf1, 0x9f, 0x62, 0x9f, 0x39, 0xd2, 0xa1, 0xa8, 0x73, 0x9d, 0x64, 0x4c, 0x5f, 0x1d,
- 0xae, 0x8f, 0xc7, 0x2d, 0x10, 0xd4, 0x3b, 0x01, 0xc6, 0x92, 0xb5, 0xfa, 0x73, 0x05, 0x4e, 0x24,
- 0x0a, 0x14, 0xaa, 0x42, 0xde, 0xb0, 0x3c, 0x1e, 0x56, 0x79, 0xe1, 0xa3, 0x15, 0xcb, 0x13, 0x19,
- 0xca, 0x16, 0xd0, 0x79, 0x28, 0x6c, 0xb0, 0xb1, 0x2e, 0xcf, 0x8b, 0xf3, 0x78, 0xaf, 0x5b, 0x1b,
- 0x6b, 0xd8, 0xb6, 0x29, 0x30, 0xf8, 0x12, 0xfa, 0x12, 0x14, 0xa9, 0xe7, 0x1a, 0xd6, 0x96, 0xec,
- 0x21, 0x7c, 0x8e, 0x69, 0x72, 0x88, 0x40, 0x93, 0xcb, 0xe8, 0x45, 0x18, 0xdd, 0x25, 0x2e, 0x2f,
- 0x3e, 0x23, 0x1c, 0x93, 0x77, 0x87, 0xbb, 0x02, 0x24, 0x50, 0x7d, 0x04, 0xf5, 0x97, 0x39, 0x28,
- 0x4b, 0x07, 0x9a, 0x9a, 0xd1, 0x46, 0xf7, 0x22, 0x01, 0x25, 0x3c, 0xf1, 0xd2, 0x10, 0x9e, 0x08,
- 0x73, 0x7d, 0x40, 0x04, 0x12, 0x28, 0xb3, 0xce, 0xe8, 0xb9, 0xa2, 0xbd, 0x08, 0x07, 0xd4, 0x33,
- 0x06, 0x9e, 0x24, 0x6b, 0x9c, 0x94, 0x02, 0xca, 0x21, 0x8c, 0xe2, 0x28, 0x5f, 0x74, 0x3f, 0x70,
- 0xf1, 0x30, 0x0d, 0x9e, 0x6d, 0x3e, 0x9b, 0x77, 0x3f, 0x52, 0xa0, 0x92, 0x46, 0x14, 0xcb, 0x47,
- 0xe5, 0x50, 0xf9, 0x98, 0x3b, 0xba, 0x7c, 0xfc, 0xad, 0x12, 0xf1, 0x3d, 0xa5, 0xe8, 0x7b, 0x50,
- 0x62, 0x03, 0x3e, 0x9f, 0xd7, 0x45, 0xef, 0x79, 0x39, 0xdb, 0x71, 0xe0, 0xf6, 0xc6, 0xf7, 0x89,
- 0xee, 0xdd, 0x22, 0x9e, 0x16, 0xf6, 0xb9, 0x10, 0x86, 0x03, 0xae, 0xe8, 0x36, 0x14, 0xa8, 0x43,
- 0xf4, 0x61, 0x7a, 0x3c, 0x57, 0xad, 0xe9, 0x10, 0x3d, 0xac, 0xd7, 0xec, 0x1f, 0xe6, 0x8c, 0xd4,
- 0x9f, 0x46, 0x9d, 0x41, 0x69, 0xdc, 0x19, 0x69, 0x26, 0x56, 0x8e, 0xce, 0xc4, 0xbf, 0x09, 0x4a,
- 0x01, 0xd7, 0xef, 0xa6, 0x41, 0x3d, 0xf4, 0x76, 0x9f, 0x99, 0xeb, 0xd9, 0xcc, 0xcc, 0xa8, 0xb9,
- 0x91, 0x83, 0x2c, 0xf3, 0x21, 0x11, 0x13, 0xaf, 0xc2, 0x88, 0xe1, 0x91, 0xb6, 0x9f, 0x5f, 0x17,
- 0x33, 0xdb, 0x38, 0x1c, 0x1c, 0x56, 0x18, 0x3d, 0x16, 0x6c, 0xd4, 0x47, 0xf1, 0x1d, 0x30, 0xdb,
- 0xa3, 0xef, 0xc0, 0x18, 0x95, 0xc3, 0x8e, 0x5f, 0x25, 0x66, 0xb3, 0xc8, 0x09, 0xc6, 0xd5, 0x29,
- 0x29, 0x6a, 0xcc, 0x87, 0x50, 0x1c, 0x72, 0x8c, 0x64, 0x70, 0x6e, 0xa8, 0x0c, 0x4e, 0xf8, 0x3f,
- 0x35, 0x83, 0x5d, 0x18, 0xe4, 0x40, 0xf4, 0x6d, 0x28, 0xda, 0x8e, 0xf6, 0x4e, 0x30, 0x78, 0x3d,
- 0xe1, 0x64, 0x72, 0x9b, 0xe3, 0x0e, 0x0a, 0x13, 0x60, 0x32, 0xc5, 0x32, 0x96, 0x2c, 0xd5, 0xf7,
- 0x15, 0x98, 0x4c, 0x16, 0xb3, 0x21, 0xaa, 0xc5, 0x1a, 0x4c, 0xb4, 0x35, 0x4f, 0xdf, 0x0e, 0x1a,
- 0x8a, 0x3c, 0xff, 0xcf, 0xf4, 0xba, 0xb5, 0x89, 0x5b, 0xb1, 0x95, 0xfd, 0x6e, 0x0d, 0x5d, 0xeb,
- 0x98, 0xe6, 0x5e, 0xfc, 0x2c, 0x94, 0xa0, 0x57, 0x3f, 0xcc, 0x05, 0x99, 0xd3, 0x77, 0xb8, 0x61,
- 0x13, 0xac, 0x1e, 0x8c, 0x73, 0xc9, 0x09, 0x36, 0x1c, 0xf4, 0x70, 0x04, 0x0b, 0xb9, 0x7d, 0x03,
- 0xe3, 0xd2, 0xe1, 0x8e, 0x56, 0xcf, 0xd9, 0xf8, 0xf8, 0xd7, 0x02, 0x8c, 0xc7, 0x9a, 0x5c, 0x86,
- 0x31, 0x72, 0x01, 0x4e, 0xb4, 0xc2, 0xa8, 0xe4, 0xe7, 0x3e, 0xe1, 0xaf, 0xcf, 0x4a, 0xe4, 0x68,
- 0x4a, 0x71, 0xba, 0x24, 0x7e, 0x3c, 0xc7, 0xf2, 0x4f, 0x3d, 0xc7, 0xee, 0xc2, 0x84, 0x16, 0x8c,
- 0x35, 0xb7, 0xec, 0x96, 0x7f, 0x30, 0xad, 0x4b, 0xaa, 0x89, 0x85, 0xd8, 0xea, 0x7e, 0xb7, 0xf6,
- 0x99, 0xe4, 0x30, 0xc4, 0xe0, 0x38, 0xc1, 0x05, 0x5d, 0x80, 0x11, 0xee, 0x1d, 0x3e, 0x79, 0xe4,
- 0xc3, 0x9a, 0xc2, 0x0d, 0x8b, 0xc5, 0x1a, 0xba, 0x0c, 0x65, 0xad, 0xd5, 0x36, 0xac, 0x05, 0x5d,
- 0x27, 0xd4, 0x3f, 0x90, 0xf2, 0x71, 0x66, 0x21, 0x04, 0xe3, 0x28, 0x0e, 0xb2, 0x60, 0x62, 0xd3,
- 0x70, 0xa9, 0xb7, 0xb0, 0xab, 0x19, 0xa6, 0xb6, 0x61, 0x12, 0x79, 0x3c, 0xcd, 0x34, 0x3f, 0x34,
- 0x3b, 0x1b, 0xfe, 0x80, 0x72, 0xda, 0xdf, 0xdf, 0xb5, 0x18, 0x37, 0x9c, 0xe0, 0xce, 0x86, 0x15,
- 0xcf, 0x36, 0x89, 0xc8, 0x68, 0x5a, 0x29, 0x65, 0x17, 0xb6, 0x1e, 0x90, 0x85, 0xc3, 0x4a, 0x08,
- 0xa3, 0x38, 0xca, 0x57, 0xfd, 0x4b, 0x70, 0x46, 0x48, 0x99, 0x65, 0xd1, 0x45, 0x36, 0x19, 0xf3,
- 0x25, 0x19, 0x6f, 0x91, 0xe1, 0x96, 0x83, 0xb1, 0xbf, 0x1e, 0xb9, 0x42, 0xcc, 0x65, 0xba, 0x42,
- 0xcc, 0x67, 0xb8, 0x42, 0x2c, 0x1c, 0x78, 0x85, 0x98, 0x70, 0xe4, 0x48, 0x06, 0x47, 0x26, 0x0c,
- 0x5b, 0x7c, 0x46, 0x86, 0x7d, 0x1b, 0x26, 0x12, 0xa7, 0xf2, 0x1b, 0x90, 0xd7, 0x89, 0x29, 0x6b,
- 0xfb, 0x13, 0x2e, 0x0d, 0xfb, 0xce, 0xf4, 0x8d, 0xd1, 0x5e, 0xb7, 0x96, 0x5f, 0x5c, 0xbe, 0x89,
- 0x19, 0x13, 0xf5, 0xd7, 0x79, 0xbf, 0x9a, 0x87, 0xa1, 0xf5, 0x69, 0x59, 0xf8, 0x5f, 0xcb, 0x42,
- 0x22, 0x34, 0x46, 0x9f, 0x51, 0x68, 0xfc, 0x3b, 0x18, 0x7b, 0xf9, 0x3d, 0x15, 0x7a, 0x21, 0xd2,
- 0x33, 0x1a, 0x65, 0x49, 0x9e, 0x7f, 0x93, 0xec, 0x89, 0x06, 0x72, 0x21, 0xda, 0x40, 0xc6, 0x06,
- 0x5f, 0xaf, 0xa0, 0xab, 0x50, 0x24, 0x9b, 0x9b, 0x44, 0xf7, 0x64, 0x52, 0xf9, 0x17, 0xa3, 0xc5,
- 0x65, 0x0e, 0xdd, 0xef, 0xd6, 0xa6, 0x22, 0x22, 0x05, 0x10, 0x4b, 0x12, 0xf4, 0x0d, 0x18, 0xf3,
- 0x8c, 0x36, 0x59, 0x68, 0xb5, 0x48, 0x8b, 0xdb, 0xbb, 0x3c, 0xff, 0x62, 0xb6, 0x89, 0x70, 0xdd,
- 0x68, 0x13, 0x71, 0x58, 0x5c, 0xf7, 0x19, 0xe0, 0x90, 0x97, 0xfa, 0x30, 0x98, 0xdd, 0xb8, 0x58,
- 0xdc, 0x31, 0xc9, 0x11, 0x0c, 0xf9, 0xcd, 0xd8, 0x90, 0x7f, 0x39, 0xf3, 0xfd, 0x21, 0x53, 0x2f,
- 0x75, 0xd0, 0xff, 0x48, 0xf1, 0x87, 0xb6, 0x00, 0xf7, 0x08, 0x86, 0x69, 0x1c, 0x1f, 0xa6, 0x2f,
- 0x0d, 0xb5, 0x97, 0x94, 0x81, 0xfa, 0xe3, 0xfe, 0x9d, 0xf0, 0xa1, 0xba, 0x0d, 0x13, 0xad, 0x58,
- 0xaa, 0x0e, 0x73, 0x4e, 0xe1, 0xac, 0x82, 0x1c, 0x47, 0x2c, 0x53, 0xe3, 0x79, 0x8f, 0x13, 0xcc,
- 0xd9, 0x39, 0x81, 0x5f, 0xcf, 0x66, 0xbb, 0xe9, 0x8a, 0x5e, 0xf3, 0x06, 0xdb, 0x12, 0xfa, 0x0b,
- 0x36, 0xea, 0x4f, 0x72, 0xb1, 0x6d, 0x05, 0x72, 0xbe, 0xd6, 0x5f, 0xf3, 0x44, 0xa6, 0x9d, 0xcc,
- 0x54, 0xef, 0xd4, 0x44, 0x4f, 0x83, 0x01, 0xfd, 0xec, 0x6c, 0xac, 0x9f, 0x95, 0x12, 0xbd, 0x4c,
- 0x4d, 0xf4, 0x32, 0x18, 0xd0, 0xc7, 0x62, 0x55, 0x75, 0xe4, 0x69, 0x57, 0x55, 0xf5, 0x67, 0x39,
- 0xbf, 0x5d, 0x84, 0x45, 0xe9, 0x49, 0x65, 0xe7, 0x0d, 0x28, 0xd9, 0x0e, 0xc3, 0xb5, 0xfd, 0xad,
- 0xcf, 0xfa, 0x81, 0x7a, 0x5b, 0xc2, 0xf7, 0xbb, 0xb5, 0x4a, 0x92, 0xad, 0xbf, 0x86, 0x03, 0xea,
- 0xb0, 0x80, 0xe5, 0x33, 0x15, 0xb0, 0xc2, 0xf0, 0x05, 0x6c, 0x11, 0xa6, 0xc2, 0x02, 0xdb, 0x24,
- 0xba, 0x6d, 0xb5, 0xa8, 0xac, 0xf4, 0xa7, 0x7a, 0xdd, 0xda, 0xd4, 0x7a, 0x72, 0x11, 0xf7, 0xe3,
- 0xab, 0xbf, 0x50, 0x60, 0xaa, 0xef, 0x63, 0x1d, 0xba, 0x0a, 0xe3, 0x06, 0x9b, 0xc8, 0x37, 0x35,
- 0x9d, 0x44, 0x82, 0xe7, 0x94, 0x54, 0x6f, 0x7c, 0x25, 0xba, 0x88, 0xe3, 0xb8, 0xe8, 0x0c, 0xe4,
- 0x0d, 0xc7, 0xbf, 0x18, 0xe5, 0x1d, 0x7c, 0x65, 0x8d, 0x62, 0x06, 0x63, 0xad, 0x78, 0x5b, 0x73,
- 0x5b, 0x0f, 0x34, 0x97, 0xd5, 0x4a, 0x97, 0x4d, 0x2f, 0xf9, 0x78, 0x2b, 0x7e, 0x23, 0xbe, 0x8c,
- 0x93, 0xf8, 0xea, 0x87, 0x0a, 0x9c, 0x49, 0x3d, 0x04, 0x66, 0xfe, 0x9e, 0xab, 0x01, 0x38, 0x9a,
- 0xab, 0xb5, 0x89, 0x3c, 0x38, 0x1d, 0xe2, 0x33, 0x69, 0x50, 0x8e, 0xd7, 0x02, 0x46, 0x38, 0xc2,
- 0x54, 0xfd, 0x20, 0x07, 0xe3, 0x58, 0x46, 0xb0, 0xb8, 0xe5, 0x7b, 0xf6, 0x4d, 0xe0, 0x4e, 0xac,
- 0x09, 0x3c, 0x61, 0xdc, 0x8a, 0x29, 0x97, 0xd6, 0x02, 0xd0, 0x3d, 0x28, 0x52, 0xfe, 0xad, 0x3c,
- 0xdb, 0x9d, 0x75, 0x9c, 0x29, 0x27, 0x0c, 0x9d, 0x20, 0xfe, 0x63, 0xc9, 0x50, 0xed, 0x29, 0x50,
- 0x8d, 0xe1, 0xcb, 0x8f, 0x7a, 0x2e, 0x26, 0x9b, 0xc4, 0x25, 0x96, 0x4e, 0xd0, 0x2c, 0x94, 0x34,
- 0xc7, 0xb8, 0xee, 0xda, 0x1d, 0x47, 0x7a, 0x34, 0x68, 0x1c, 0x0b, 0x6b, 0x2b, 0x1c, 0x8e, 0x03,
- 0x0c, 0x86, 0xed, 0x6b, 0x24, 0xe3, 0x2a, 0x72, 0x33, 0x2a, 0xe0, 0x38, 0xc0, 0x08, 0x26, 0xc7,
- 0x42, 0xea, 0xe4, 0xd8, 0x80, 0x7c, 0xc7, 0x68, 0xc9, 0xeb, 0xdc, 0x97, 0xfd, 0x62, 0xf1, 0xd6,
- 0xca, 0xd2, 0x7e, 0xb7, 0x76, 0x3e, 0xed, 0x2d, 0x82, 0xb7, 0xe7, 0x10, 0x5a, 0x7f, 0x6b, 0x65,
- 0x09, 0x33, 0x62, 0xf5, 0x77, 0x0a, 0x4c, 0xc5, 0x36, 0x79, 0x04, 0x0d, 0x74, 0x2d, 0xde, 0x40,
- 0x5f, 0x1a, 0xc2, 0x65, 0x29, 0xed, 0xd3, 0x48, 0x6c, 0x82, 0xf7, 0xce, 0xf5, 0xe4, 0xf7, 0xf9,
- 0x8b, 0x99, 0x2f, 0x7d, 0xd3, 0x3f, 0xca, 0xab, 0x7f, 0xc8, 0xc1, 0xc9, 0x01, 0x51, 0x84, 0xee,
- 0x03, 0x84, 0xe3, 0xed, 0x00, 0xa3, 0x0d, 0x10, 0xd8, 0xf7, 0x89, 0x62, 0x82, 0x7f, 0x35, 0x0f,
- 0xa1, 0x11, 0x8e, 0x88, 0x42, 0xd9, 0x25, 0x94, 0xb8, 0xbb, 0xa4, 0x75, 0x8d, 0x57, 0x7f, 0x66,
- 0xba, 0xaf, 0x0e, 0x61, 0xba, 0xbe, 0xe8, 0x0d, 0xa7, 0x62, 0x1c, 0x32, 0xc6, 0x51, 0x29, 0xe8,
- 0x7e, 0x68, 0x42, 0xf1, 0x14, 0xe4, 0x4a, 0xa6, 0x1d, 0xc5, 0x5f, 0xb1, 0x1c, 0x60, 0xcc, 0x8f,
- 0x15, 0x38, 0x15, 0x53, 0x72, 0x9d, 0xb4, 0x1d, 0x53, 0xf3, 0x8e, 0x62, 0x22, 0xbd, 0x17, 0x2b,
- 0x46, 0xaf, 0x0d, 0x61, 0x49, 0x5f, 0xc9, 0xd4, 0xb9, 0xf4, 0xcf, 0x0a, 0x9c, 0x19, 0x48, 0x71,
- 0x04, 0xc9, 0xf5, 0xcd, 0x78, 0x72, 0x5d, 0x39, 0xc4, 0xbe, 0xd2, 0x2f, 0x7d, 0xcf, 0xa4, 0xda,
- 0xe1, 0xff, 0xb2, 0x7b, 0xa8, 0xbf, 0x52, 0xe0, 0xb8, 0x8f, 0xc9, 0xa6, 0xc3, 0x0c, 0xc7, 0xf5,
- 0x79, 0x00, 0xf9, 0x7e, 0xcb, 0xff, 0x30, 0x93, 0x0f, 0xf5, 0xbe, 0x1e, 0xac, 0xe0, 0x08, 0x16,
- 0xba, 0x01, 0xc8, 0xd7, 0xb0, 0x69, 0xfa, 0xd7, 0x9b, 0xbc, 0x05, 0xe4, 0x1b, 0xd3, 0x92, 0x16,
- 0xe1, 0x3e, 0x0c, 0x3c, 0x80, 0x4a, 0xfd, 0xbd, 0x12, 0xf6, 0x6d, 0x0e, 0x7e, 0x5e, 0x2d, 0xcf,
- 0x95, 0x4b, 0xb5, 0x7c, 0xb4, 0xef, 0x70, 0xcc, 0xe7, 0xb6, 0xef, 0x70, 0xed, 0x52, 0x52, 0xe2,
- 0x4f, 0x85, 0xc4, 0x2e, 0x78, 0x2a, 0x64, 0x9d, 0xf2, 0x6e, 0x46, 0x5e, 0xed, 0xc5, 0x4f, 0xf7,
- 0x07, 0xa8, 0xc3, 0xc2, 0x74, 0xe0, 0xf5, 0xdc, 0x6c, 0xe4, 0x3d, 0x51, 0x62, 0xba, 0xc8, 0xf0,
- 0xa6, 0xa8, 0xf0, 0x94, 0xde, 0x14, 0xcd, 0x46, 0xde, 0x14, 0x89, 0x9b, 0xbf, 0x70, 0x22, 0xea,
- 0x7f, 0x57, 0x74, 0x3b, 0xec, 0x2f, 0xe2, 0xce, 0xef, 0xf3, 0x59, 0x5a, 0xf4, 0x01, 0x4f, 0xe6,
- 0x30, 0x9c, 0x76, 0x88, 0x2b, 0xc0, 0xa1, 0x96, 0x2c, 0x53, 0x47, 0xb9, 0x32, 0xd3, 0xbd, 0x6e,
- 0xed, 0xf4, 0xda, 0x40, 0x0c, 0x9c, 0x42, 0x89, 0xb6, 0x61, 0x82, 0x6e, 0x6b, 0x2e, 0x69, 0x05,
- 0x8f, 0xc4, 0xc4, 0xc5, 0xef, 0x4c, 0xd6, 0xa7, 0x2f, 0xe1, 0xfd, 0x72, 0x33, 0xc6, 0x07, 0x27,
- 0xf8, 0x36, 0x1a, 0x0f, 0x1f, 0x57, 0x8f, 0x3d, 0x7a, 0x5c, 0x3d, 0xf6, 0xc9, 0xe3, 0xea, 0xb1,
- 0xf7, 0x7a, 0x55, 0xe5, 0x61, 0xaf, 0xaa, 0x3c, 0xea, 0x55, 0x95, 0x4f, 0x7a, 0x55, 0xe5, 0x1f,
- 0xbd, 0xaa, 0xf2, 0xe3, 0x7f, 0x56, 0x8f, 0x7d, 0xeb, 0xec, 0x41, 0x4f, 0x74, 0xff, 0x1b, 0x00,
- 0x00, 0xff, 0xff, 0xa5, 0x57, 0x37, 0xad, 0xc1, 0x2b, 0x00, 0x00,
-}
-
-func (m *AllocatedDeviceStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *AllocatedDeviceStatus) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *AllocatedDeviceStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.NetworkData != nil {
- {
- size, err := m.NetworkData.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x32
- }
- if m.Data != nil {
- {
- size, err := m.Data.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x2a
- }
- if len(m.Conditions) > 0 {
- for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x22
- }
- }
- i -= len(m.Device)
- copy(dAtA[i:], m.Device)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Device)))
- i--
- dAtA[i] = 0x1a
- i -= len(m.Pool)
- copy(dAtA[i:], m.Pool)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Pool)))
- i--
- dAtA[i] = 0x12
- i -= len(m.Driver)
- copy(dAtA[i:], m.Driver)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver)))
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *AllocationResult) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *AllocationResult) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *AllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.NodeSelector != nil {
- {
- size, err := m.NodeSelector.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x1a
- }
- {
- size, err := m.Devices.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *BasicDevice) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *BasicDevice) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *BasicDevice) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Taints) > 0 {
- for iNdEx := len(m.Taints) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Taints[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x3a
- }
- }
- if m.AllNodes != nil {
- i--
- if *m.AllNodes {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i--
- dAtA[i] = 0x30
- }
- if m.NodeSelector != nil {
- {
- size, err := m.NodeSelector.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x2a
- }
- if m.NodeName != nil {
- i -= len(*m.NodeName)
- copy(dAtA[i:], *m.NodeName)
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.NodeName)))
- i--
- dAtA[i] = 0x22
- }
- if len(m.ConsumesCounters) > 0 {
- for iNdEx := len(m.ConsumesCounters) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.ConsumesCounters[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x1a
- }
- }
- if len(m.Capacity) > 0 {
- keysForCapacity := make([]string, 0, len(m.Capacity))
- for k := range m.Capacity {
- keysForCapacity = append(keysForCapacity, string(k))
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity)
- for iNdEx := len(keysForCapacity) - 1; iNdEx >= 0; iNdEx-- {
- v := m.Capacity[QualifiedName(keysForCapacity[iNdEx])]
- baseI := i
- {
- size, err := (&v).MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- i -= len(keysForCapacity[iNdEx])
- copy(dAtA[i:], keysForCapacity[iNdEx])
- i = encodeVarintGenerated(dAtA, i, uint64(len(keysForCapacity[iNdEx])))
- i--
- dAtA[i] = 0xa
- i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
- i--
- dAtA[i] = 0x12
- }
- }
- if len(m.Attributes) > 0 {
- keysForAttributes := make([]string, 0, len(m.Attributes))
- for k := range m.Attributes {
- keysForAttributes = append(keysForAttributes, string(k))
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForAttributes)
- for iNdEx := len(keysForAttributes) - 1; iNdEx >= 0; iNdEx-- {
- v := m.Attributes[QualifiedName(keysForAttributes[iNdEx])]
- baseI := i
- {
- size, err := (&v).MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- i -= len(keysForAttributes[iNdEx])
- copy(dAtA[i:], keysForAttributes[iNdEx])
- i = encodeVarintGenerated(dAtA, i, uint64(len(keysForAttributes[iNdEx])))
- i--
- dAtA[i] = 0xa
- i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
- i--
- dAtA[i] = 0xa
- }
- }
- return len(dAtA) - i, nil
-}
-
-func (m *CELDeviceSelector) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *CELDeviceSelector) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *CELDeviceSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- i -= len(m.Expression)
- copy(dAtA[i:], m.Expression)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Expression)))
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *Counter) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Counter) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *Counter) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- {
- size, err := m.Value.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *CounterSet) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *CounterSet) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *CounterSet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Counters) > 0 {
- keysForCounters := make([]string, 0, len(m.Counters))
- for k := range m.Counters {
- keysForCounters = append(keysForCounters, string(k))
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForCounters)
- for iNdEx := len(keysForCounters) - 1; iNdEx >= 0; iNdEx-- {
- v := m.Counters[string(keysForCounters[iNdEx])]
- baseI := i
- {
- size, err := (&v).MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- i -= len(keysForCounters[iNdEx])
- copy(dAtA[i:], keysForCounters[iNdEx])
- i = encodeVarintGenerated(dAtA, i, uint64(len(keysForCounters[iNdEx])))
- i--
- dAtA[i] = 0xa
- i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
- i--
- dAtA[i] = 0x12
- }
- }
- i -= len(m.Name)
- copy(dAtA[i:], m.Name)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *Device) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *Device) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *Device) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.Basic != nil {
- {
- size, err := m.Basic.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- }
- i -= len(m.Name)
- copy(dAtA[i:], m.Name)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceAllocationConfiguration) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceAllocationConfiguration) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceAllocationConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- {
- size, err := m.DeviceConfiguration.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x1a
- if len(m.Requests) > 0 {
- for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- {
- i -= len(m.Requests[iNdEx])
- copy(dAtA[i:], m.Requests[iNdEx])
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Requests[iNdEx])))
- i--
- dAtA[i] = 0x12
- }
- }
- i -= len(m.Source)
- copy(dAtA[i:], m.Source)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Source)))
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceAllocationResult) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceAllocationResult) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Config) > 0 {
- for iNdEx := len(m.Config) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Config[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- }
- }
- if len(m.Results) > 0 {
- for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Results[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- }
- }
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceAttribute) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceAttribute) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.VersionValue != nil {
- i -= len(*m.VersionValue)
- copy(dAtA[i:], *m.VersionValue)
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.VersionValue)))
- i--
- dAtA[i] = 0x2a
- }
- if m.StringValue != nil {
- i -= len(*m.StringValue)
- copy(dAtA[i:], *m.StringValue)
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.StringValue)))
- i--
- dAtA[i] = 0x22
- }
- if m.BoolValue != nil {
- i--
- if *m.BoolValue {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i--
- dAtA[i] = 0x18
- }
- if m.IntValue != nil {
- i = encodeVarintGenerated(dAtA, i, uint64(*m.IntValue))
- i--
- dAtA[i] = 0x10
- }
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceClaim) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceClaim) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Config) > 0 {
- for iNdEx := len(m.Config) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Config[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x1a
- }
- }
- if len(m.Constraints) > 0 {
- for iNdEx := len(m.Constraints) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Constraints[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- }
- }
- if len(m.Requests) > 0 {
- for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Requests[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- }
- }
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceClaimConfiguration) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceClaimConfiguration) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceClaimConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- {
- size, err := m.DeviceConfiguration.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- if len(m.Requests) > 0 {
- for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- {
- i -= len(m.Requests[iNdEx])
- copy(dAtA[i:], m.Requests[iNdEx])
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Requests[iNdEx])))
- i--
- dAtA[i] = 0xa
- }
- }
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceClass) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceClass) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceClass) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- {
- size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- {
- size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceClassConfiguration) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceClassConfiguration) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceClassConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- {
- size, err := m.DeviceConfiguration.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceClassList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceClassList) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceClassList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Items) > 0 {
- for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- }
- }
- {
- size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceClassSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceClassSpec) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceClassSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Config) > 0 {
- for iNdEx := len(m.Config) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Config[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- }
- }
- if len(m.Selectors) > 0 {
- for iNdEx := len(m.Selectors) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Selectors[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- }
- }
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceConfiguration) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceConfiguration) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.Opaque != nil {
- {
- size, err := m.Opaque.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- }
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceConstraint) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceConstraint) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceConstraint) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.MatchAttribute != nil {
- i -= len(*m.MatchAttribute)
- copy(dAtA[i:], *m.MatchAttribute)
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.MatchAttribute)))
- i--
- dAtA[i] = 0x12
- }
- if len(m.Requests) > 0 {
- for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- {
- i -= len(m.Requests[iNdEx])
- copy(dAtA[i:], m.Requests[iNdEx])
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Requests[iNdEx])))
- i--
- dAtA[i] = 0xa
- }
- }
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceCounterConsumption) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceCounterConsumption) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceCounterConsumption) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Counters) > 0 {
- keysForCounters := make([]string, 0, len(m.Counters))
- for k := range m.Counters {
- keysForCounters = append(keysForCounters, string(k))
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForCounters)
- for iNdEx := len(keysForCounters) - 1; iNdEx >= 0; iNdEx-- {
- v := m.Counters[string(keysForCounters[iNdEx])]
- baseI := i
- {
- size, err := (&v).MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- i -= len(keysForCounters[iNdEx])
- copy(dAtA[i:], keysForCounters[iNdEx])
- i = encodeVarintGenerated(dAtA, i, uint64(len(keysForCounters[iNdEx])))
- i--
- dAtA[i] = 0xa
- i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
- i--
- dAtA[i] = 0x12
- }
- }
- i -= len(m.CounterSet)
- copy(dAtA[i:], m.CounterSet)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.CounterSet)))
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceRequest) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceRequest) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Tolerations) > 0 {
- for iNdEx := len(m.Tolerations) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Tolerations[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x42
- }
- }
- if len(m.FirstAvailable) > 0 {
- for iNdEx := len(m.FirstAvailable) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.FirstAvailable[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x3a
- }
- }
- if m.AdminAccess != nil {
- i--
- if *m.AdminAccess {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i--
- dAtA[i] = 0x30
- }
- i = encodeVarintGenerated(dAtA, i, uint64(m.Count))
- i--
- dAtA[i] = 0x28
- i -= len(m.AllocationMode)
- copy(dAtA[i:], m.AllocationMode)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.AllocationMode)))
- i--
- dAtA[i] = 0x22
- if len(m.Selectors) > 0 {
- for iNdEx := len(m.Selectors) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Selectors[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x1a
- }
- }
- i -= len(m.DeviceClassName)
- copy(dAtA[i:], m.DeviceClassName)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.DeviceClassName)))
- i--
- dAtA[i] = 0x12
- i -= len(m.Name)
- copy(dAtA[i:], m.Name)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceRequestAllocationResult) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceRequestAllocationResult) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceRequestAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Tolerations) > 0 {
- for iNdEx := len(m.Tolerations) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Tolerations[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x32
- }
- }
- if m.AdminAccess != nil {
- i--
- if *m.AdminAccess {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i--
- dAtA[i] = 0x28
- }
- i -= len(m.Device)
- copy(dAtA[i:], m.Device)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Device)))
- i--
- dAtA[i] = 0x22
- i -= len(m.Pool)
- copy(dAtA[i:], m.Pool)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Pool)))
- i--
- dAtA[i] = 0x1a
- i -= len(m.Driver)
- copy(dAtA[i:], m.Driver)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver)))
- i--
- dAtA[i] = 0x12
- i -= len(m.Request)
- copy(dAtA[i:], m.Request)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Request)))
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceSelector) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceSelector) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.CEL != nil {
- {
- size, err := m.CEL.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- }
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceSubRequest) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceSubRequest) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceSubRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Tolerations) > 0 {
- for iNdEx := len(m.Tolerations) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Tolerations[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x3a
- }
- }
- i = encodeVarintGenerated(dAtA, i, uint64(m.Count))
- i--
- dAtA[i] = 0x28
- i -= len(m.AllocationMode)
- copy(dAtA[i:], m.AllocationMode)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.AllocationMode)))
- i--
- dAtA[i] = 0x22
- if len(m.Selectors) > 0 {
- for iNdEx := len(m.Selectors) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Selectors[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x1a
- }
- }
- i -= len(m.DeviceClassName)
- copy(dAtA[i:], m.DeviceClassName)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.DeviceClassName)))
- i--
- dAtA[i] = 0x12
- i -= len(m.Name)
- copy(dAtA[i:], m.Name)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceTaint) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceTaint) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceTaint) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.TimeAdded != nil {
- {
- size, err := m.TimeAdded.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x22
- }
- i -= len(m.Effect)
- copy(dAtA[i:], m.Effect)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Effect)))
- i--
- dAtA[i] = 0x1a
- i -= len(m.Value)
- copy(dAtA[i:], m.Value)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value)))
- i--
- dAtA[i] = 0x12
- i -= len(m.Key)
- copy(dAtA[i:], m.Key)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key)))
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceTaintRule) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceTaintRule) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceTaintRule) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- {
- size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- {
- size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceTaintRuleList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceTaintRuleList) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceTaintRuleList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Items) > 0 {
- for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- }
- }
- {
- size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceTaintRuleSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceTaintRuleSpec) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceTaintRuleSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- {
- size, err := m.Taint.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- if m.DeviceSelector != nil {
- {
- size, err := m.DeviceSelector.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- }
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceTaintSelector) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceTaintSelector) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceTaintSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Selectors) > 0 {
- for iNdEx := len(m.Selectors) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Selectors[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x2a
- }
- }
- if m.Device != nil {
- i -= len(*m.Device)
- copy(dAtA[i:], *m.Device)
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Device)))
- i--
- dAtA[i] = 0x22
- }
- if m.Pool != nil {
- i -= len(*m.Pool)
- copy(dAtA[i:], *m.Pool)
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Pool)))
- i--
- dAtA[i] = 0x1a
- }
- if m.Driver != nil {
- i -= len(*m.Driver)
- copy(dAtA[i:], *m.Driver)
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Driver)))
- i--
- dAtA[i] = 0x12
- }
- if m.DeviceClassName != nil {
- i -= len(*m.DeviceClassName)
- copy(dAtA[i:], *m.DeviceClassName)
- i = encodeVarintGenerated(dAtA, i, uint64(len(*m.DeviceClassName)))
- i--
- dAtA[i] = 0xa
- }
- return len(dAtA) - i, nil
-}
-
-func (m *DeviceToleration) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *DeviceToleration) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *DeviceToleration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.TolerationSeconds != nil {
- i = encodeVarintGenerated(dAtA, i, uint64(*m.TolerationSeconds))
- i--
- dAtA[i] = 0x28
- }
- i -= len(m.Effect)
- copy(dAtA[i:], m.Effect)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Effect)))
- i--
- dAtA[i] = 0x22
- i -= len(m.Value)
- copy(dAtA[i:], m.Value)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value)))
- i--
- dAtA[i] = 0x1a
- i -= len(m.Operator)
- copy(dAtA[i:], m.Operator)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Operator)))
- i--
- dAtA[i] = 0x12
- i -= len(m.Key)
- copy(dAtA[i:], m.Key)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key)))
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *NetworkDeviceData) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *NetworkDeviceData) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *NetworkDeviceData) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- i -= len(m.HardwareAddress)
- copy(dAtA[i:], m.HardwareAddress)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.HardwareAddress)))
- i--
- dAtA[i] = 0x1a
- if len(m.IPs) > 0 {
- for iNdEx := len(m.IPs) - 1; iNdEx >= 0; iNdEx-- {
- i -= len(m.IPs[iNdEx])
- copy(dAtA[i:], m.IPs[iNdEx])
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.IPs[iNdEx])))
- i--
- dAtA[i] = 0x12
- }
- }
- i -= len(m.InterfaceName)
- copy(dAtA[i:], m.InterfaceName)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.InterfaceName)))
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *OpaqueDeviceConfiguration) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *OpaqueDeviceConfiguration) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *OpaqueDeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- {
- size, err := m.Parameters.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- i -= len(m.Driver)
- copy(dAtA[i:], m.Driver)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver)))
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *ResourceClaim) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ResourceClaim) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *ResourceClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- {
- size, err := m.Status.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x1a
- {
- size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- {
- size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *ResourceClaimConsumerReference) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ResourceClaimConsumerReference) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *ResourceClaimConsumerReference) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- i -= len(m.UID)
- copy(dAtA[i:], m.UID)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID)))
- i--
- dAtA[i] = 0x2a
- i -= len(m.Name)
- copy(dAtA[i:], m.Name)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i--
- dAtA[i] = 0x22
- i -= len(m.Resource)
- copy(dAtA[i:], m.Resource)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource)))
- i--
- dAtA[i] = 0x1a
- i -= len(m.APIGroup)
- copy(dAtA[i:], m.APIGroup)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup)))
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *ResourceClaimList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ResourceClaimList) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *ResourceClaimList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Items) > 0 {
- for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- }
- }
- {
- size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *ResourceClaimSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ResourceClaimSpec) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *ResourceClaimSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- {
- size, err := m.Devices.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *ResourceClaimStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ResourceClaimStatus) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *ResourceClaimStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Devices) > 0 {
- for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Devices[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x22
- }
- }
- if len(m.ReservedFor) > 0 {
- for iNdEx := len(m.ReservedFor) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.ReservedFor[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- }
- }
- if m.Allocation != nil {
- {
- size, err := m.Allocation.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- }
- return len(dAtA) - i, nil
-}
-
-func (m *ResourceClaimTemplate) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ResourceClaimTemplate) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *ResourceClaimTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- {
- size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- {
- size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *ResourceClaimTemplateList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ResourceClaimTemplateList) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *ResourceClaimTemplateList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Items) > 0 {
- for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- }
- }
- {
- size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *ResourceClaimTemplateSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ResourceClaimTemplateSpec) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *ResourceClaimTemplateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- {
- size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- {
- size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *ResourcePool) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ResourcePool) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *ResourcePool) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceSliceCount))
- i--
- dAtA[i] = 0x18
- i = encodeVarintGenerated(dAtA, i, uint64(m.Generation))
- i--
- dAtA[i] = 0x10
- i -= len(m.Name)
- copy(dAtA[i:], m.Name)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *ResourceSlice) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ResourceSlice) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *ResourceSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- {
- size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- {
- size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *ResourceSliceList) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ResourceSliceList) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *ResourceSliceList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Items) > 0 {
- for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- }
- }
- {
- size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func (m *ResourceSliceSpec) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *ResourceSliceSpec) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *ResourceSliceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.SharedCounters) > 0 {
- for iNdEx := len(m.SharedCounters) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.SharedCounters[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x42
- }
- }
- if m.PerDeviceNodeSelection != nil {
- i--
- if *m.PerDeviceNodeSelection {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i--
- dAtA[i] = 0x38
- }
- if len(m.Devices) > 0 {
- for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Devices[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x32
- }
- }
- i--
- if m.AllNodes {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i--
- dAtA[i] = 0x28
- if m.NodeSelector != nil {
- {
- size, err := m.NodeSelector.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x22
- }
- i -= len(m.NodeName)
- copy(dAtA[i:], m.NodeName)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeName)))
- i--
- dAtA[i] = 0x1a
- {
- size, err := m.Pool.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintGenerated(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- i -= len(m.Driver)
- copy(dAtA[i:], m.Driver)
- i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver)))
- i--
- dAtA[i] = 0xa
- return len(dAtA) - i, nil
-}
-
-func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
- offset -= sovGenerated(v)
- base := offset
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return base
-}
-func (m *AllocatedDeviceStatus) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Driver)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Pool)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Device)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Conditions) > 0 {
- for _, e := range m.Conditions {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if m.Data != nil {
- l = m.Data.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.NetworkData != nil {
- l = m.NetworkData.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *AllocationResult) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.Devices.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if m.NodeSelector != nil {
- l = m.NodeSelector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *BasicDevice) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if len(m.Attributes) > 0 {
- for k, v := range m.Attributes {
- _ = k
- _ = v
- l = v.Size()
- mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
- n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
- }
- }
- if len(m.Capacity) > 0 {
- for k, v := range m.Capacity {
- _ = k
- _ = v
- l = v.Size()
- mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
- n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
- }
- }
- if len(m.ConsumesCounters) > 0 {
- for _, e := range m.ConsumesCounters {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if m.NodeName != nil {
- l = len(*m.NodeName)
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.NodeSelector != nil {
- l = m.NodeSelector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.AllNodes != nil {
- n += 2
- }
- if len(m.Taints) > 0 {
- for _, e := range m.Taints {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *CELDeviceSelector) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Expression)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *Counter) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.Value.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *CounterSet) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Counters) > 0 {
- for k, v := range m.Counters {
- _ = k
- _ = v
- l = v.Size()
- mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
- n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
- }
- }
- return n
-}
-
-func (m *Device) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- if m.Basic != nil {
- l = m.Basic.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *DeviceAllocationConfiguration) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Source)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Requests) > 0 {
- for _, s := range m.Requests {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- l = m.DeviceConfiguration.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DeviceAllocationResult) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if len(m.Results) > 0 {
- for _, e := range m.Results {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Config) > 0 {
- for _, e := range m.Config {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DeviceAttribute) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if m.IntValue != nil {
- n += 1 + sovGenerated(uint64(*m.IntValue))
- }
- if m.BoolValue != nil {
- n += 2
- }
- if m.StringValue != nil {
- l = len(*m.StringValue)
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.VersionValue != nil {
- l = len(*m.VersionValue)
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *DeviceClaim) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if len(m.Requests) > 0 {
- for _, e := range m.Requests {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Constraints) > 0 {
- for _, e := range m.Constraints {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Config) > 0 {
- for _, e := range m.Config {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DeviceClaimConfiguration) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if len(m.Requests) > 0 {
- for _, s := range m.Requests {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- l = m.DeviceConfiguration.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DeviceClass) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DeviceClassConfiguration) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.DeviceConfiguration.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DeviceClassList) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DeviceClassSpec) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if len(m.Selectors) > 0 {
- for _, e := range m.Selectors {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Config) > 0 {
- for _, e := range m.Config {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DeviceConfiguration) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if m.Opaque != nil {
- l = m.Opaque.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *DeviceConstraint) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if len(m.Requests) > 0 {
- for _, s := range m.Requests {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if m.MatchAttribute != nil {
- l = len(*m.MatchAttribute)
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *DeviceCounterConsumption) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.CounterSet)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Counters) > 0 {
- for k, v := range m.Counters {
- _ = k
- _ = v
- l = v.Size()
- mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
- n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
- }
- }
- return n
-}
-
-func (m *DeviceRequest) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.DeviceClassName)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Selectors) > 0 {
- for _, e := range m.Selectors {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- l = len(m.AllocationMode)
- n += 1 + l + sovGenerated(uint64(l))
- n += 1 + sovGenerated(uint64(m.Count))
- if m.AdminAccess != nil {
- n += 2
- }
- if len(m.FirstAvailable) > 0 {
- for _, e := range m.FirstAvailable {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Tolerations) > 0 {
- for _, e := range m.Tolerations {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DeviceRequestAllocationResult) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Request)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Driver)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Pool)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Device)
- n += 1 + l + sovGenerated(uint64(l))
- if m.AdminAccess != nil {
- n += 2
- }
- if len(m.Tolerations) > 0 {
- for _, e := range m.Tolerations {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DeviceSelector) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if m.CEL != nil {
- l = m.CEL.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *DeviceSubRequest) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.DeviceClassName)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Selectors) > 0 {
- for _, e := range m.Selectors {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- l = len(m.AllocationMode)
- n += 1 + l + sovGenerated(uint64(l))
- n += 1 + sovGenerated(uint64(m.Count))
- if len(m.Tolerations) > 0 {
- for _, e := range m.Tolerations {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DeviceTaint) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Key)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Value)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Effect)
- n += 1 + l + sovGenerated(uint64(l))
- if m.TimeAdded != nil {
- l = m.TimeAdded.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *DeviceTaintRule) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DeviceTaintRuleList) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DeviceTaintRuleSpec) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if m.DeviceSelector != nil {
- l = m.DeviceSelector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- l = m.Taint.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *DeviceTaintSelector) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if m.DeviceClassName != nil {
- l = len(*m.DeviceClassName)
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.Driver != nil {
- l = len(*m.Driver)
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.Pool != nil {
- l = len(*m.Pool)
- n += 1 + l + sovGenerated(uint64(l))
- }
- if m.Device != nil {
- l = len(*m.Device)
- n += 1 + l + sovGenerated(uint64(l))
- }
- if len(m.Selectors) > 0 {
- for _, e := range m.Selectors {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *DeviceToleration) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Key)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Operator)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Value)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Effect)
- n += 1 + l + sovGenerated(uint64(l))
- if m.TolerationSeconds != nil {
- n += 1 + sovGenerated(uint64(*m.TolerationSeconds))
- }
- return n
-}
-
-func (m *NetworkDeviceData) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.InterfaceName)
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.IPs) > 0 {
- for _, s := range m.IPs {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- l = len(m.HardwareAddress)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *OpaqueDeviceConfiguration) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Driver)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Parameters.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ResourceClaim) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ResourceClaimConsumerReference) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.APIGroup)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Resource)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.UID)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ResourceClaimList) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ResourceClaimSpec) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.Devices.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ResourceClaimStatus) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if m.Allocation != nil {
- l = m.Allocation.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- if len(m.ReservedFor) > 0 {
- for _, e := range m.ReservedFor {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Devices) > 0 {
- for _, e := range m.Devices {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ResourceClaimTemplate) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ResourceClaimTemplateList) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ResourceClaimTemplateSpec) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ResourcePool) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Name)
- n += 1 + l + sovGenerated(uint64(l))
- n += 1 + sovGenerated(uint64(m.Generation))
- n += 1 + sovGenerated(uint64(m.ResourceSliceCount))
- return n
-}
-
-func (m *ResourceSlice) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.ObjectMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ResourceSliceList) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.ListMeta.Size()
- n += 1 + l + sovGenerated(uint64(l))
- if len(m.Items) > 0 {
- for _, e := range m.Items {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func (m *ResourceSliceSpec) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Driver)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.Pool.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.NodeName)
- n += 1 + l + sovGenerated(uint64(l))
- if m.NodeSelector != nil {
- l = m.NodeSelector.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- n += 2
- if len(m.Devices) > 0 {
- for _, e := range m.Devices {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if m.PerDeviceNodeSelection != nil {
- n += 2
- }
- if len(m.SharedCounters) > 0 {
- for _, e := range m.SharedCounters {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- return n
-}
-
-func sovGenerated(x uint64) (n int) {
- return (math_bits.Len64(x|1) + 6) / 7
-}
-func sozGenerated(x uint64) (n int) {
- return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (this *AllocatedDeviceStatus) String() string {
- if this == nil {
- return "nil"
- }
- repeatedStringForConditions := "[]Condition{"
- for _, f := range this.Conditions {
- repeatedStringForConditions += fmt.Sprintf("%v", f) + ","
- }
- repeatedStringForConditions += "}"
- s := strings.Join([]string{`&AllocatedDeviceStatus{`,
- `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`,
- `Pool:` + fmt.Sprintf("%v", this.Pool) + `,`,
- `Device:` + fmt.Sprintf("%v", this.Device) + `,`,
- `Conditions:` + repeatedStringForConditions + `,`,
- `Data:` + strings.Replace(fmt.Sprintf("%v", this.Data), "RawExtension", "runtime.RawExtension", 1) + `,`,
- `NetworkData:` + strings.Replace(this.NetworkData.String(), "NetworkDeviceData", "NetworkDeviceData", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *AllocationResult) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&AllocationResult{`,
- `Devices:` + strings.Replace(strings.Replace(this.Devices.String(), "DeviceAllocationResult", "DeviceAllocationResult", 1), `&`, ``, 1) + `,`,
- `NodeSelector:` + strings.Replace(fmt.Sprintf("%v", this.NodeSelector), "NodeSelector", "v11.NodeSelector", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *BasicDevice) String() string {
- if this == nil {
- return "nil"
- }
- repeatedStringForConsumesCounters := "[]DeviceCounterConsumption{"
- for _, f := range this.ConsumesCounters {
- repeatedStringForConsumesCounters += strings.Replace(strings.Replace(f.String(), "DeviceCounterConsumption", "DeviceCounterConsumption", 1), `&`, ``, 1) + ","
- }
- repeatedStringForConsumesCounters += "}"
- repeatedStringForTaints := "[]DeviceTaint{"
- for _, f := range this.Taints {
- repeatedStringForTaints += strings.Replace(strings.Replace(f.String(), "DeviceTaint", "DeviceTaint", 1), `&`, ``, 1) + ","
- }
- repeatedStringForTaints += "}"
- keysForAttributes := make([]string, 0, len(this.Attributes))
- for k := range this.Attributes {
- keysForAttributes = append(keysForAttributes, string(k))
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForAttributes)
- mapStringForAttributes := "map[QualifiedName]DeviceAttribute{"
- for _, k := range keysForAttributes {
- mapStringForAttributes += fmt.Sprintf("%v: %v,", k, this.Attributes[QualifiedName(k)])
- }
- mapStringForAttributes += "}"
- keysForCapacity := make([]string, 0, len(this.Capacity))
- for k := range this.Capacity {
- keysForCapacity = append(keysForCapacity, string(k))
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity)
- mapStringForCapacity := "map[QualifiedName]resource.Quantity{"
- for _, k := range keysForCapacity {
- mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[QualifiedName(k)])
- }
- mapStringForCapacity += "}"
- s := strings.Join([]string{`&BasicDevice{`,
- `Attributes:` + mapStringForAttributes + `,`,
- `Capacity:` + mapStringForCapacity + `,`,
- `ConsumesCounters:` + repeatedStringForConsumesCounters + `,`,
- `NodeName:` + valueToStringGenerated(this.NodeName) + `,`,
- `NodeSelector:` + strings.Replace(fmt.Sprintf("%v", this.NodeSelector), "NodeSelector", "v11.NodeSelector", 1) + `,`,
- `AllNodes:` + valueToStringGenerated(this.AllNodes) + `,`,
- `Taints:` + repeatedStringForTaints + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *CELDeviceSelector) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&CELDeviceSelector{`,
- `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *Counter) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Counter{`,
- `Value:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Value), "Quantity", "resource.Quantity", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *CounterSet) String() string {
- if this == nil {
- return "nil"
- }
- keysForCounters := make([]string, 0, len(this.Counters))
- for k := range this.Counters {
- keysForCounters = append(keysForCounters, k)
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForCounters)
- mapStringForCounters := "map[string]Counter{"
- for _, k := range keysForCounters {
- mapStringForCounters += fmt.Sprintf("%v: %v,", k, this.Counters[k])
- }
- mapStringForCounters += "}"
- s := strings.Join([]string{`&CounterSet{`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `Counters:` + mapStringForCounters + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *Device) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Device{`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `Basic:` + strings.Replace(this.Basic.String(), "BasicDevice", "BasicDevice", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceAllocationConfiguration) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeviceAllocationConfiguration{`,
- `Source:` + fmt.Sprintf("%v", this.Source) + `,`,
- `Requests:` + fmt.Sprintf("%v", this.Requests) + `,`,
- `DeviceConfiguration:` + strings.Replace(strings.Replace(this.DeviceConfiguration.String(), "DeviceConfiguration", "DeviceConfiguration", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceAllocationResult) String() string {
- if this == nil {
- return "nil"
- }
- repeatedStringForResults := "[]DeviceRequestAllocationResult{"
- for _, f := range this.Results {
- repeatedStringForResults += strings.Replace(strings.Replace(f.String(), "DeviceRequestAllocationResult", "DeviceRequestAllocationResult", 1), `&`, ``, 1) + ","
- }
- repeatedStringForResults += "}"
- repeatedStringForConfig := "[]DeviceAllocationConfiguration{"
- for _, f := range this.Config {
- repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "DeviceAllocationConfiguration", "DeviceAllocationConfiguration", 1), `&`, ``, 1) + ","
- }
- repeatedStringForConfig += "}"
- s := strings.Join([]string{`&DeviceAllocationResult{`,
- `Results:` + repeatedStringForResults + `,`,
- `Config:` + repeatedStringForConfig + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceAttribute) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeviceAttribute{`,
- `IntValue:` + valueToStringGenerated(this.IntValue) + `,`,
- `BoolValue:` + valueToStringGenerated(this.BoolValue) + `,`,
- `StringValue:` + valueToStringGenerated(this.StringValue) + `,`,
- `VersionValue:` + valueToStringGenerated(this.VersionValue) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceClaim) String() string {
- if this == nil {
- return "nil"
- }
- repeatedStringForRequests := "[]DeviceRequest{"
- for _, f := range this.Requests {
- repeatedStringForRequests += strings.Replace(strings.Replace(f.String(), "DeviceRequest", "DeviceRequest", 1), `&`, ``, 1) + ","
- }
- repeatedStringForRequests += "}"
- repeatedStringForConstraints := "[]DeviceConstraint{"
- for _, f := range this.Constraints {
- repeatedStringForConstraints += strings.Replace(strings.Replace(f.String(), "DeviceConstraint", "DeviceConstraint", 1), `&`, ``, 1) + ","
- }
- repeatedStringForConstraints += "}"
- repeatedStringForConfig := "[]DeviceClaimConfiguration{"
- for _, f := range this.Config {
- repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "DeviceClaimConfiguration", "DeviceClaimConfiguration", 1), `&`, ``, 1) + ","
- }
- repeatedStringForConfig += "}"
- s := strings.Join([]string{`&DeviceClaim{`,
- `Requests:` + repeatedStringForRequests + `,`,
- `Constraints:` + repeatedStringForConstraints + `,`,
- `Config:` + repeatedStringForConfig + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceClaimConfiguration) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeviceClaimConfiguration{`,
- `Requests:` + fmt.Sprintf("%v", this.Requests) + `,`,
- `DeviceConfiguration:` + strings.Replace(strings.Replace(this.DeviceConfiguration.String(), "DeviceConfiguration", "DeviceConfiguration", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceClass) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeviceClass{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeviceClassSpec", "DeviceClassSpec", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceClassConfiguration) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeviceClassConfiguration{`,
- `DeviceConfiguration:` + strings.Replace(strings.Replace(this.DeviceConfiguration.String(), "DeviceConfiguration", "DeviceConfiguration", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceClassList) String() string {
- if this == nil {
- return "nil"
- }
- repeatedStringForItems := "[]DeviceClass{"
- for _, f := range this.Items {
- repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "DeviceClass", "DeviceClass", 1), `&`, ``, 1) + ","
- }
- repeatedStringForItems += "}"
- s := strings.Join([]string{`&DeviceClassList{`,
- `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + repeatedStringForItems + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceClassSpec) String() string {
- if this == nil {
- return "nil"
- }
- repeatedStringForSelectors := "[]DeviceSelector{"
- for _, f := range this.Selectors {
- repeatedStringForSelectors += strings.Replace(strings.Replace(f.String(), "DeviceSelector", "DeviceSelector", 1), `&`, ``, 1) + ","
- }
- repeatedStringForSelectors += "}"
- repeatedStringForConfig := "[]DeviceClassConfiguration{"
- for _, f := range this.Config {
- repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "DeviceClassConfiguration", "DeviceClassConfiguration", 1), `&`, ``, 1) + ","
- }
- repeatedStringForConfig += "}"
- s := strings.Join([]string{`&DeviceClassSpec{`,
- `Selectors:` + repeatedStringForSelectors + `,`,
- `Config:` + repeatedStringForConfig + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceConfiguration) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeviceConfiguration{`,
- `Opaque:` + strings.Replace(this.Opaque.String(), "OpaqueDeviceConfiguration", "OpaqueDeviceConfiguration", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceConstraint) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeviceConstraint{`,
- `Requests:` + fmt.Sprintf("%v", this.Requests) + `,`,
- `MatchAttribute:` + valueToStringGenerated(this.MatchAttribute) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceCounterConsumption) String() string {
- if this == nil {
- return "nil"
- }
- keysForCounters := make([]string, 0, len(this.Counters))
- for k := range this.Counters {
- keysForCounters = append(keysForCounters, k)
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForCounters)
- mapStringForCounters := "map[string]Counter{"
- for _, k := range keysForCounters {
- mapStringForCounters += fmt.Sprintf("%v: %v,", k, this.Counters[k])
- }
- mapStringForCounters += "}"
- s := strings.Join([]string{`&DeviceCounterConsumption{`,
- `CounterSet:` + fmt.Sprintf("%v", this.CounterSet) + `,`,
- `Counters:` + mapStringForCounters + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceRequest) String() string {
- if this == nil {
- return "nil"
- }
- repeatedStringForSelectors := "[]DeviceSelector{"
- for _, f := range this.Selectors {
- repeatedStringForSelectors += strings.Replace(strings.Replace(f.String(), "DeviceSelector", "DeviceSelector", 1), `&`, ``, 1) + ","
- }
- repeatedStringForSelectors += "}"
- repeatedStringForFirstAvailable := "[]DeviceSubRequest{"
- for _, f := range this.FirstAvailable {
- repeatedStringForFirstAvailable += strings.Replace(strings.Replace(f.String(), "DeviceSubRequest", "DeviceSubRequest", 1), `&`, ``, 1) + ","
- }
- repeatedStringForFirstAvailable += "}"
- repeatedStringForTolerations := "[]DeviceToleration{"
- for _, f := range this.Tolerations {
- repeatedStringForTolerations += strings.Replace(strings.Replace(f.String(), "DeviceToleration", "DeviceToleration", 1), `&`, ``, 1) + ","
- }
- repeatedStringForTolerations += "}"
- s := strings.Join([]string{`&DeviceRequest{`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `DeviceClassName:` + fmt.Sprintf("%v", this.DeviceClassName) + `,`,
- `Selectors:` + repeatedStringForSelectors + `,`,
- `AllocationMode:` + fmt.Sprintf("%v", this.AllocationMode) + `,`,
- `Count:` + fmt.Sprintf("%v", this.Count) + `,`,
- `AdminAccess:` + valueToStringGenerated(this.AdminAccess) + `,`,
- `FirstAvailable:` + repeatedStringForFirstAvailable + `,`,
- `Tolerations:` + repeatedStringForTolerations + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceRequestAllocationResult) String() string {
- if this == nil {
- return "nil"
- }
- repeatedStringForTolerations := "[]DeviceToleration{"
- for _, f := range this.Tolerations {
- repeatedStringForTolerations += strings.Replace(strings.Replace(f.String(), "DeviceToleration", "DeviceToleration", 1), `&`, ``, 1) + ","
- }
- repeatedStringForTolerations += "}"
- s := strings.Join([]string{`&DeviceRequestAllocationResult{`,
- `Request:` + fmt.Sprintf("%v", this.Request) + `,`,
- `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`,
- `Pool:` + fmt.Sprintf("%v", this.Pool) + `,`,
- `Device:` + fmt.Sprintf("%v", this.Device) + `,`,
- `AdminAccess:` + valueToStringGenerated(this.AdminAccess) + `,`,
- `Tolerations:` + repeatedStringForTolerations + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceSelector) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeviceSelector{`,
- `CEL:` + strings.Replace(this.CEL.String(), "CELDeviceSelector", "CELDeviceSelector", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceSubRequest) String() string {
- if this == nil {
- return "nil"
- }
- repeatedStringForSelectors := "[]DeviceSelector{"
- for _, f := range this.Selectors {
- repeatedStringForSelectors += strings.Replace(strings.Replace(f.String(), "DeviceSelector", "DeviceSelector", 1), `&`, ``, 1) + ","
- }
- repeatedStringForSelectors += "}"
- repeatedStringForTolerations := "[]DeviceToleration{"
- for _, f := range this.Tolerations {
- repeatedStringForTolerations += strings.Replace(strings.Replace(f.String(), "DeviceToleration", "DeviceToleration", 1), `&`, ``, 1) + ","
- }
- repeatedStringForTolerations += "}"
- s := strings.Join([]string{`&DeviceSubRequest{`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `DeviceClassName:` + fmt.Sprintf("%v", this.DeviceClassName) + `,`,
- `Selectors:` + repeatedStringForSelectors + `,`,
- `AllocationMode:` + fmt.Sprintf("%v", this.AllocationMode) + `,`,
- `Count:` + fmt.Sprintf("%v", this.Count) + `,`,
- `Tolerations:` + repeatedStringForTolerations + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceTaint) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeviceTaint{`,
- `Key:` + fmt.Sprintf("%v", this.Key) + `,`,
- `Value:` + fmt.Sprintf("%v", this.Value) + `,`,
- `Effect:` + fmt.Sprintf("%v", this.Effect) + `,`,
- `TimeAdded:` + strings.Replace(fmt.Sprintf("%v", this.TimeAdded), "Time", "v1.Time", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceTaintRule) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeviceTaintRule{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeviceTaintRuleSpec", "DeviceTaintRuleSpec", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceTaintRuleList) String() string {
- if this == nil {
- return "nil"
- }
- repeatedStringForItems := "[]DeviceTaintRule{"
- for _, f := range this.Items {
- repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "DeviceTaintRule", "DeviceTaintRule", 1), `&`, ``, 1) + ","
- }
- repeatedStringForItems += "}"
- s := strings.Join([]string{`&DeviceTaintRuleList{`,
- `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + repeatedStringForItems + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceTaintRuleSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeviceTaintRuleSpec{`,
- `DeviceSelector:` + strings.Replace(this.DeviceSelector.String(), "DeviceTaintSelector", "DeviceTaintSelector", 1) + `,`,
- `Taint:` + strings.Replace(strings.Replace(this.Taint.String(), "DeviceTaint", "DeviceTaint", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceTaintSelector) String() string {
- if this == nil {
- return "nil"
- }
- repeatedStringForSelectors := "[]DeviceSelector{"
- for _, f := range this.Selectors {
- repeatedStringForSelectors += strings.Replace(strings.Replace(f.String(), "DeviceSelector", "DeviceSelector", 1), `&`, ``, 1) + ","
- }
- repeatedStringForSelectors += "}"
- s := strings.Join([]string{`&DeviceTaintSelector{`,
- `DeviceClassName:` + valueToStringGenerated(this.DeviceClassName) + `,`,
- `Driver:` + valueToStringGenerated(this.Driver) + `,`,
- `Pool:` + valueToStringGenerated(this.Pool) + `,`,
- `Device:` + valueToStringGenerated(this.Device) + `,`,
- `Selectors:` + repeatedStringForSelectors + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *DeviceToleration) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&DeviceToleration{`,
- `Key:` + fmt.Sprintf("%v", this.Key) + `,`,
- `Operator:` + fmt.Sprintf("%v", this.Operator) + `,`,
- `Value:` + fmt.Sprintf("%v", this.Value) + `,`,
- `Effect:` + fmt.Sprintf("%v", this.Effect) + `,`,
- `TolerationSeconds:` + valueToStringGenerated(this.TolerationSeconds) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *NetworkDeviceData) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&NetworkDeviceData{`,
- `InterfaceName:` + fmt.Sprintf("%v", this.InterfaceName) + `,`,
- `IPs:` + fmt.Sprintf("%v", this.IPs) + `,`,
- `HardwareAddress:` + fmt.Sprintf("%v", this.HardwareAddress) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *OpaqueDeviceConfiguration) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&OpaqueDeviceConfiguration{`,
- `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`,
- `Parameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Parameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ResourceClaim) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ResourceClaim{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimSpec", "ResourceClaimSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ResourceClaimStatus", "ResourceClaimStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ResourceClaimConsumerReference) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ResourceClaimConsumerReference{`,
- `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`,
- `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `UID:` + fmt.Sprintf("%v", this.UID) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ResourceClaimList) String() string {
- if this == nil {
- return "nil"
- }
- repeatedStringForItems := "[]ResourceClaim{"
- for _, f := range this.Items {
- repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaim", "ResourceClaim", 1), `&`, ``, 1) + ","
- }
- repeatedStringForItems += "}"
- s := strings.Join([]string{`&ResourceClaimList{`,
- `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + repeatedStringForItems + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ResourceClaimSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ResourceClaimSpec{`,
- `Devices:` + strings.Replace(strings.Replace(this.Devices.String(), "DeviceClaim", "DeviceClaim", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ResourceClaimStatus) String() string {
- if this == nil {
- return "nil"
- }
- repeatedStringForReservedFor := "[]ResourceClaimConsumerReference{"
- for _, f := range this.ReservedFor {
- repeatedStringForReservedFor += strings.Replace(strings.Replace(f.String(), "ResourceClaimConsumerReference", "ResourceClaimConsumerReference", 1), `&`, ``, 1) + ","
- }
- repeatedStringForReservedFor += "}"
- repeatedStringForDevices := "[]AllocatedDeviceStatus{"
- for _, f := range this.Devices {
- repeatedStringForDevices += strings.Replace(strings.Replace(f.String(), "AllocatedDeviceStatus", "AllocatedDeviceStatus", 1), `&`, ``, 1) + ","
- }
- repeatedStringForDevices += "}"
- s := strings.Join([]string{`&ResourceClaimStatus{`,
- `Allocation:` + strings.Replace(this.Allocation.String(), "AllocationResult", "AllocationResult", 1) + `,`,
- `ReservedFor:` + repeatedStringForReservedFor + `,`,
- `Devices:` + repeatedStringForDevices + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ResourceClaimTemplate) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ResourceClaimTemplate{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimTemplateSpec", "ResourceClaimTemplateSpec", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ResourceClaimTemplateList) String() string {
- if this == nil {
- return "nil"
- }
- repeatedStringForItems := "[]ResourceClaimTemplate{"
- for _, f := range this.Items {
- repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaimTemplate", "ResourceClaimTemplate", 1), `&`, ``, 1) + ","
- }
- repeatedStringForItems += "}"
- s := strings.Join([]string{`&ResourceClaimTemplateList{`,
- `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + repeatedStringForItems + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ResourceClaimTemplateSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ResourceClaimTemplateSpec{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimSpec", "ResourceClaimSpec", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ResourcePool) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ResourcePool{`,
- `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `Generation:` + fmt.Sprintf("%v", this.Generation) + `,`,
- `ResourceSliceCount:` + fmt.Sprintf("%v", this.ResourceSliceCount) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ResourceSlice) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ResourceSlice{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceSliceSpec", "ResourceSliceSpec", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ResourceSliceList) String() string {
- if this == nil {
- return "nil"
- }
- repeatedStringForItems := "[]ResourceSlice{"
- for _, f := range this.Items {
- repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceSlice", "ResourceSlice", 1), `&`, ``, 1) + ","
- }
- repeatedStringForItems += "}"
- s := strings.Join([]string{`&ResourceSliceList{`,
- `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
- `Items:` + repeatedStringForItems + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ResourceSliceSpec) String() string {
- if this == nil {
- return "nil"
- }
- repeatedStringForDevices := "[]Device{"
- for _, f := range this.Devices {
- repeatedStringForDevices += strings.Replace(strings.Replace(f.String(), "Device", "Device", 1), `&`, ``, 1) + ","
- }
- repeatedStringForDevices += "}"
- repeatedStringForSharedCounters := "[]CounterSet{"
- for _, f := range this.SharedCounters {
- repeatedStringForSharedCounters += strings.Replace(strings.Replace(f.String(), "CounterSet", "CounterSet", 1), `&`, ``, 1) + ","
- }
- repeatedStringForSharedCounters += "}"
- s := strings.Join([]string{`&ResourceSliceSpec{`,
- `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`,
- `Pool:` + strings.Replace(strings.Replace(this.Pool.String(), "ResourcePool", "ResourcePool", 1), `&`, ``, 1) + `,`,
- `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`,
- `NodeSelector:` + strings.Replace(fmt.Sprintf("%v", this.NodeSelector), "NodeSelector", "v11.NodeSelector", 1) + `,`,
- `AllNodes:` + fmt.Sprintf("%v", this.AllNodes) + `,`,
- `Devices:` + repeatedStringForDevices + `,`,
- `PerDeviceNodeSelection:` + valueToStringGenerated(this.PerDeviceNodeSelection) + `,`,
- `SharedCounters:` + repeatedStringForSharedCounters + `,`,
- `}`,
- }, "")
- return s
-}
-func valueToStringGenerated(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
-}
-func (m *AllocatedDeviceStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: AllocatedDeviceStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: AllocatedDeviceStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Driver = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Pool = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Device = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Conditions = append(m.Conditions, v1.Condition{})
- if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Data == nil {
- m.Data = &runtime.RawExtension{}
- }
- if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NetworkData", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.NetworkData == nil {
- m.NetworkData = &NetworkDeviceData{}
- }
- if err := m.NetworkData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *AllocationResult) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: AllocationResult: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: AllocationResult: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Devices.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NodeSelector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.NodeSelector == nil {
- m.NodeSelector = &v11.NodeSelector{}
- }
- if err := m.NodeSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *BasicDevice) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: BasicDevice: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: BasicDevice: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Attributes == nil {
- m.Attributes = make(map[QualifiedName]DeviceAttribute)
- }
- var mapkey QualifiedName
- mapvalue := &DeviceAttribute{}
- for iNdEx < postIndex {
- entryPreIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- if fieldNum == 1 {
- var stringLenmapkey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapkey |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapkey := int(stringLenmapkey)
- if intStringLenmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapkey := iNdEx + intStringLenmapkey
- if postStringIndexmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- if postStringIndexmapkey > l {
- return io.ErrUnexpectedEOF
- }
- mapkey = QualifiedName(dAtA[iNdEx:postStringIndexmapkey])
- iNdEx = postStringIndexmapkey
- } else if fieldNum == 2 {
- var mapmsglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- mapmsglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if mapmsglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postmsgIndex := iNdEx + mapmsglen
- if postmsgIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postmsgIndex > l {
- return io.ErrUnexpectedEOF
- }
- mapvalue = &DeviceAttribute{}
- if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
- return err
- }
- iNdEx = postmsgIndex
- } else {
- iNdEx = entryPreIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > postIndex {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- m.Attributes[QualifiedName(mapkey)] = *mapvalue
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Capacity == nil {
- m.Capacity = make(map[QualifiedName]resource.Quantity)
- }
- var mapkey QualifiedName
- mapvalue := &resource.Quantity{}
- for iNdEx < postIndex {
- entryPreIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- if fieldNum == 1 {
- var stringLenmapkey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapkey |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapkey := int(stringLenmapkey)
- if intStringLenmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapkey := iNdEx + intStringLenmapkey
- if postStringIndexmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- if postStringIndexmapkey > l {
- return io.ErrUnexpectedEOF
- }
- mapkey = QualifiedName(dAtA[iNdEx:postStringIndexmapkey])
- iNdEx = postStringIndexmapkey
- } else if fieldNum == 2 {
- var mapmsglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- mapmsglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if mapmsglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postmsgIndex := iNdEx + mapmsglen
- if postmsgIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postmsgIndex > l {
- return io.ErrUnexpectedEOF
- }
- mapvalue = &resource.Quantity{}
- if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
- return err
- }
- iNdEx = postmsgIndex
- } else {
- iNdEx = entryPreIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > postIndex {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- m.Capacity[QualifiedName(mapkey)] = *mapvalue
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ConsumesCounters", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ConsumesCounters = append(m.ConsumesCounters, DeviceCounterConsumption{})
- if err := m.ConsumesCounters[len(m.ConsumesCounters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := string(dAtA[iNdEx:postIndex])
- m.NodeName = &s
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NodeSelector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.NodeSelector == nil {
- m.NodeSelector = &v11.NodeSelector{}
- }
- if err := m.NodeSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field AllNodes", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.AllNodes = &b
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Taints", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Taints = append(m.Taints, DeviceTaint{})
- if err := m.Taints[len(m.Taints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *CELDeviceSelector) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CELDeviceSelector: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CELDeviceSelector: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Expression = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Counter) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Counter: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Counter: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *CounterSet) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CounterSet: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CounterSet: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Counters", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Counters == nil {
- m.Counters = make(map[string]Counter)
- }
- var mapkey string
- mapvalue := &Counter{}
- for iNdEx < postIndex {
- entryPreIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- if fieldNum == 1 {
- var stringLenmapkey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapkey |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapkey := int(stringLenmapkey)
- if intStringLenmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapkey := iNdEx + intStringLenmapkey
- if postStringIndexmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- if postStringIndexmapkey > l {
- return io.ErrUnexpectedEOF
- }
- mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
- iNdEx = postStringIndexmapkey
- } else if fieldNum == 2 {
- var mapmsglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- mapmsglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if mapmsglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postmsgIndex := iNdEx + mapmsglen
- if postmsgIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postmsgIndex > l {
- return io.ErrUnexpectedEOF
- }
- mapvalue = &Counter{}
- if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
- return err
- }
- iNdEx = postmsgIndex
- } else {
- iNdEx = entryPreIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > postIndex {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- m.Counters[mapkey] = *mapvalue
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Device) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Device: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Device: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Basic", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Basic == nil {
- m.Basic = &BasicDevice{}
- }
- if err := m.Basic.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceAllocationConfiguration) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceAllocationConfiguration: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceAllocationConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Source = AllocationConfigSource(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceAllocationResult) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceAllocationResult: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceAllocationResult: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Results = append(m.Results, DeviceRequestAllocationResult{})
- if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Config = append(m.Config, DeviceAllocationConfiguration{})
- if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceAttribute) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceAttribute: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceAttribute: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field IntValue", wireType)
- }
- var v int64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.IntValue = &v
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.BoolValue = &b
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := string(dAtA[iNdEx:postIndex])
- m.StringValue = &s
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field VersionValue", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := string(dAtA[iNdEx:postIndex])
- m.VersionValue = &s
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceClaim) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceClaim: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceClaim: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Requests = append(m.Requests, DeviceRequest{})
- if err := m.Requests[len(m.Requests)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Constraints", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Constraints = append(m.Constraints, DeviceConstraint{})
- if err := m.Constraints[len(m.Constraints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Config = append(m.Config, DeviceClaimConfiguration{})
- if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceClaimConfiguration) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceClaimConfiguration: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceClaimConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceClass) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceClass: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceClass: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceClassConfiguration) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceClassConfiguration: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceClassConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceClassList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceClassList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceClassList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, DeviceClass{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceClassSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceClassSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceClassSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Selectors = append(m.Selectors, DeviceSelector{})
- if err := m.Selectors[len(m.Selectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Config = append(m.Config, DeviceClassConfiguration{})
- if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceConfiguration) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceConfiguration: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Opaque", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Opaque == nil {
- m.Opaque = &OpaqueDeviceConfiguration{}
- }
- if err := m.Opaque.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceConstraint) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceConstraint: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceConstraint: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field MatchAttribute", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := FullyQualifiedName(dAtA[iNdEx:postIndex])
- m.MatchAttribute = &s
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceCounterConsumption) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceCounterConsumption: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceCounterConsumption: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CounterSet", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.CounterSet = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Counters", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Counters == nil {
- m.Counters = make(map[string]Counter)
- }
- var mapkey string
- mapvalue := &Counter{}
- for iNdEx < postIndex {
- entryPreIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- if fieldNum == 1 {
- var stringLenmapkey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapkey |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapkey := int(stringLenmapkey)
- if intStringLenmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- postStringIndexmapkey := iNdEx + intStringLenmapkey
- if postStringIndexmapkey < 0 {
- return ErrInvalidLengthGenerated
- }
- if postStringIndexmapkey > l {
- return io.ErrUnexpectedEOF
- }
- mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
- iNdEx = postStringIndexmapkey
- } else if fieldNum == 2 {
- var mapmsglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- mapmsglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if mapmsglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postmsgIndex := iNdEx + mapmsglen
- if postmsgIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postmsgIndex > l {
- return io.ErrUnexpectedEOF
- }
- mapvalue = &Counter{}
- if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
- return err
- }
- iNdEx = postmsgIndex
- } else {
- iNdEx = entryPreIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > postIndex {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- m.Counters[mapkey] = *mapvalue
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceRequest) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceRequest: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceRequest: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field DeviceClassName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.DeviceClassName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Selectors = append(m.Selectors, DeviceSelector{})
- if err := m.Selectors[len(m.Selectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field AllocationMode", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.AllocationMode = DeviceAllocationMode(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType)
- }
- m.Count = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Count |= int64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field AdminAccess", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.AdminAccess = &b
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field FirstAvailable", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.FirstAvailable = append(m.FirstAvailable, DeviceSubRequest{})
- if err := m.FirstAvailable[len(m.FirstAvailable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 8:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Tolerations", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Tolerations = append(m.Tolerations, DeviceToleration{})
- if err := m.Tolerations[len(m.Tolerations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceRequestAllocationResult) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceRequestAllocationResult: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceRequestAllocationResult: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Request = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Driver = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Pool = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Device = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field AdminAccess", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.AdminAccess = &b
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Tolerations", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Tolerations = append(m.Tolerations, DeviceToleration{})
- if err := m.Tolerations[len(m.Tolerations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceSelector) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceSelector: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceSelector: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CEL", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.CEL == nil {
- m.CEL = &CELDeviceSelector{}
- }
- if err := m.CEL.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceSubRequest) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceSubRequest: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceSubRequest: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field DeviceClassName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.DeviceClassName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Selectors = append(m.Selectors, DeviceSelector{})
- if err := m.Selectors[len(m.Selectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field AllocationMode", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.AllocationMode = DeviceAllocationMode(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType)
- }
- m.Count = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Count |= int64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Tolerations", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Tolerations = append(m.Tolerations, DeviceToleration{})
- if err := m.Tolerations[len(m.Tolerations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceTaint) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceTaint: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceTaint: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Key = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Value = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Effect", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Effect = DeviceTaintEffect(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field TimeAdded", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.TimeAdded == nil {
- m.TimeAdded = &v1.Time{}
- }
- if err := m.TimeAdded.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceTaintRule) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceTaintRule: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceTaintRule: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceTaintRuleList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceTaintRuleList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceTaintRuleList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, DeviceTaintRule{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceTaintRuleSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceTaintRuleSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceTaintRuleSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field DeviceSelector", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.DeviceSelector == nil {
- m.DeviceSelector = &DeviceTaintSelector{}
- }
- if err := m.DeviceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Taint", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Taint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceTaintSelector) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceTaintSelector: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceTaintSelector: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field DeviceClassName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := string(dAtA[iNdEx:postIndex])
- m.DeviceClassName = &s
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := string(dAtA[iNdEx:postIndex])
- m.Driver = &s
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := string(dAtA[iNdEx:postIndex])
- m.Pool = &s
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := string(dAtA[iNdEx:postIndex])
- m.Device = &s
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Selectors = append(m.Selectors, DeviceSelector{})
- if err := m.Selectors[len(m.Selectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *DeviceToleration) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: DeviceToleration: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: DeviceToleration: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Key = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Operator = DeviceTolerationOperator(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Value = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Effect", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Effect = DeviceTaintEffect(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field TolerationSeconds", wireType)
- }
- var v int64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.TolerationSeconds = &v
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *NetworkDeviceData) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: NetworkDeviceData: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NetworkDeviceData: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field InterfaceName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.InterfaceName = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field IPs", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.IPs = append(m.IPs, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field HardwareAddress", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.HardwareAddress = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *OpaqueDeviceConfiguration) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: OpaqueDeviceConfiguration: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: OpaqueDeviceConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Driver = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Parameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ResourceClaim) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ResourceClaim: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ResourceClaim: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ResourceClaimConsumerReference: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ResourceClaimConsumerReference: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.APIGroup = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Resource = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ResourceClaimList) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ResourceClaimList: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ResourceClaimList: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Items = append(m.Items, ResourceClaim{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ResourceClaimSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ResourceClaimSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Devices.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ResourceClaimStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ResourceClaimStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Allocation", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Allocation == nil {
- m.Allocation = &AllocationResult{}
- }
- if err := m.Allocation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ReservedFor", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ReservedFor = append(m.ReservedFor, ResourceClaimConsumerReference{})
- if err := m.ReservedFor[len(m.ReservedFor)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Devices = append(m.Devices, AllocatedDeviceStatus{})
- if err := m.Devices[len(m.Devices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
+func (this *DeviceTaintRuleList) String() string {
+ if this == nil {
+ return "nil"
}
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
+ repeatedStringForItems := "[]DeviceTaintRule{"
+ for _, f := range this.Items {
+ repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "DeviceTaintRule", "DeviceTaintRule", 1), `&`, ``, 1) + ","
}
- return nil
+ repeatedStringForItems += "}"
+ s := strings.Join([]string{`&DeviceTaintRuleList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + repeatedStringForItems + `,`,
+ `}`,
+ }, "")
+ return s
}
-func (m *ResourceClaimTemplate) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ResourceClaimTemplate: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ResourceClaimTemplate: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipGenerated(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
+func (this *DeviceTaintRuleSpec) String() string {
+ if this == nil {
+ return "nil"
}
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
+ s := strings.Join([]string{`&DeviceTaintRuleSpec{`,
+ `DeviceSelector:` + strings.Replace(this.DeviceSelector.String(), "DeviceTaintSelector", "DeviceTaintSelector", 1) + `,`,
+ `Taint:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Taint), "DeviceTaint", "DeviceTaint", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeviceTaintSelector) String() string {
+ if this == nil {
+ return "nil"
}
- return nil
+ repeatedStringForSelectors := "[]DeviceSelector{"
+ for _, f := range this.Selectors {
+ repeatedStringForSelectors += strings.Replace(strings.Replace(f.String(), "DeviceSelector", "DeviceSelector", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForSelectors += "}"
+ s := strings.Join([]string{`&DeviceTaintSelector{`,
+ `DeviceClassName:` + valueToStringGenerated(this.DeviceClassName) + `,`,
+ `Driver:` + valueToStringGenerated(this.Driver) + `,`,
+ `Pool:` + valueToStringGenerated(this.Pool) + `,`,
+ `Device:` + valueToStringGenerated(this.Device) + `,`,
+ `Selectors:` + repeatedStringForSelectors + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
}
-func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error {
+func (m *CELDeviceSelector) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -10968,50 +860,17 @@ func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: ResourceClaimTemplateList: wiretype end group for non-group")
+ return fmt.Errorf("proto: CELDeviceSelector: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: ResourceClaimTemplateList: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: CELDeviceSelector: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType)
}
- var msglen int
+ var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -11021,25 +880,23 @@ func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= int(b&0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
- if msglen < 0 {
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
- postIndex := iNdEx + msglen
+ postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Items = append(m.Items, ResourceClaimTemplate{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
+ m.Expression = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -11062,7 +919,7 @@ func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error {
+func (m *DeviceSelector) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -11075,58 +932,25 @@ func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error {
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ResourceClaimTemplateSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ResourceClaimTemplateSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeviceSelector: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeviceSelector: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field CEL", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -11153,7 +977,10 @@ func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ if m.CEL == nil {
+ m.CEL = &CELDeviceSelector{}
+ }
+ if err := m.CEL.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -11178,7 +1005,7 @@ func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *ResourcePool) Unmarshal(dAtA []byte) error {
+func (m *DeviceTaint) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -11201,15 +1028,15 @@ func (m *ResourcePool) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: ResourcePool: wiretype end group for non-group")
+ return fmt.Errorf("proto: DeviceTaint: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: ResourcePool: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: DeviceTaint: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -11237,13 +1064,13 @@ func (m *ResourcePool) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Name = string(dAtA[iNdEx:postIndex])
+ m.Key = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType)
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
}
- m.Generation = 0
+ var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -11253,16 +1080,61 @@ func (m *ResourcePool) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Generation |= int64(b&0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Value = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ResourceSliceCount", wireType)
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Effect", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Effect = DeviceTaintEffect(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TimeAdded", wireType)
}
- m.ResourceSliceCount = 0
+ var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -11272,11 +1144,28 @@ func (m *ResourcePool) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.ResourceSliceCount |= int64(b&0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.TimeAdded == nil {
+ m.TimeAdded = &v1.Time{}
+ }
+ if err := m.TimeAdded.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
@@ -11298,7 +1187,7 @@ func (m *ResourcePool) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *ResourceSlice) Unmarshal(dAtA []byte) error {
+func (m *DeviceTaintRule) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -11321,10 +1210,10 @@ func (m *ResourceSlice) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: ResourceSlice: wiretype end group for non-group")
+ return fmt.Errorf("proto: DeviceTaintRule: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: ResourceSlice: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: DeviceTaintRule: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
@@ -11414,7 +1303,7 @@ func (m *ResourceSlice) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *ResourceSliceList) Unmarshal(dAtA []byte) error {
+func (m *DeviceTaintRuleList) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -11437,10 +1326,10 @@ func (m *ResourceSliceList) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: ResourceSliceList: wiretype end group for non-group")
+ return fmt.Errorf("proto: DeviceTaintRuleList: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: ResourceSliceList: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: DeviceTaintRuleList: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
@@ -11505,7 +1394,7 @@ func (m *ResourceSliceList) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Items = append(m.Items, ResourceSlice{})
+ m.Items = append(m.Items, DeviceTaintRule{})
if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -11531,7 +1420,7 @@ func (m *ResourceSliceList) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *ResourceSliceSpec) Unmarshal(dAtA []byte) error {
+func (m *DeviceTaintRuleSpec) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -11554,17 +1443,17 @@ func (m *ResourceSliceSpec) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: ResourceSliceSpec: wiretype end group for non-group")
+ return fmt.Errorf("proto: DeviceTaintRuleSpec: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: ResourceSliceSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: DeviceTaintRuleSpec: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field DeviceSelector", wireType)
}
- var stringLen uint64
+ var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -11574,27 +1463,31 @@ func (m *ResourceSliceSpec) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= uint64(b&0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
- intStringLen := int(stringLen)
- if intStringLen < 0 {
+ if msglen < 0 {
return ErrInvalidLengthGenerated
}
- postIndex := iNdEx + intStringLen
+ postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Driver = string(dAtA[iNdEx:postIndex])
+ if m.DeviceSelector == nil {
+ m.DeviceSelector = &DeviceTaintSelector{}
+ }
+ if err := m.DeviceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
iNdEx = postIndex
case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Taint", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -11621,13 +1514,63 @@ func (m *ResourceSliceSpec) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := m.Pool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ if err := m.Taint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
- case 3:
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeviceTaintSelector) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeviceTaintSelector: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeviceTaintSelector: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field DeviceClassName", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -11655,13 +1598,14 @@ func (m *ResourceSliceSpec) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.NodeName = string(dAtA[iNdEx:postIndex])
+ s := string(dAtA[iNdEx:postIndex])
+ m.DeviceClassName = &s
iNdEx = postIndex
- case 4:
+ case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NodeSelector", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType)
}
- var msglen int
+ var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -11671,53 +1615,30 @@ func (m *ResourceSliceSpec) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= int(b&0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
- if msglen < 0 {
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
- postIndex := iNdEx + msglen
+ postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if m.NodeSelector == nil {
- m.NodeSelector = &v11.NodeSelector{}
- }
- if err := m.NodeSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
+ s := string(dAtA[iNdEx:postIndex])
+ m.Driver = &s
iNdEx = postIndex
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field AllNodes", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.AllNodes = bool(v != 0)
- case 6:
+ case 3:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType)
}
- var msglen int
+ var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -11727,31 +1648,30 @@ func (m *ResourceSliceSpec) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= int(b&0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
- if msglen < 0 {
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
- postIndex := iNdEx + msglen
+ postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Devices = append(m.Devices, Device{})
- if err := m.Devices[len(m.Devices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
+ s := string(dAtA[iNdEx:postIndex])
+ m.Pool = &s
iNdEx = postIndex
- case 7:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field PerDeviceNodeSelection", wireType)
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType)
}
- var v int
+ var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -11761,16 +1681,28 @@ func (m *ResourceSliceSpec) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= int(b&0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
- b := bool(v != 0)
- m.PerDeviceNodeSelection = &b
- case 8:
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := string(dAtA[iNdEx:postIndex])
+ m.Device = &s
+ iNdEx = postIndex
+ case 5:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field SharedCounters", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -11797,8 +1729,8 @@ func (m *ResourceSliceSpec) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.SharedCounters = append(m.SharedCounters, CounterSet{})
- if err := m.SharedCounters[len(m.SharedCounters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ m.Selectors = append(m.Selectors, DeviceSelector{})
+ if err := m.Selectors[len(m.Selectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
diff --git a/hack/tools/vendor/k8s.io/api/resource/v1alpha3/generated.proto b/hack/tools/vendor/k8s.io/api/resource/v1alpha3/generated.proto
index 103cafc6ad5c..d334479007ea 100644
--- a/hack/tools/vendor/k8s.io/api/resource/v1alpha3/generated.proto
+++ b/hack/tools/vendor/k8s.io/api/resource/v1alpha3/generated.proto
@@ -21,8 +21,6 @@ syntax = "proto2";
package k8s.io.api.resource.v1alpha3;
-import "k8s.io/api/core/v1/generated.proto";
-import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
@@ -30,149 +28,6 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
// Package-wide variables from generator "generated".
option go_package = "k8s.io/api/resource/v1alpha3";
-// AllocatedDeviceStatus contains the status of an allocated device, if the
-// driver chooses to report it. This may include driver-specific information.
-message AllocatedDeviceStatus {
- // Driver specifies the name of the DRA driver whose kubelet
- // plugin should be invoked to process the allocation once the claim is
- // needed on a node.
- //
- // Must be a DNS subdomain and should end with a DNS domain owned by the
- // vendor of the driver.
- //
- // +required
- optional string driver = 1;
-
- // This name together with the driver name and the device name field
- // identify which device was allocated (`//`).
- //
- // Must not be longer than 253 characters and may contain one or more
- // DNS sub-domains separated by slashes.
- //
- // +required
- optional string pool = 2;
-
- // Device references one device instance via its name in the driver's
- // resource pool. It must be a DNS label.
- //
- // +required
- optional string device = 3;
-
- // Conditions contains the latest observation of the device's state.
- // If the device has been configured according to the class and claim
- // config references, the `Ready` condition should be True.
- //
- // Must not contain more than 8 entries.
- //
- // +optional
- // +listType=map
- // +listMapKey=type
- repeated .k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 4;
-
- // Data contains arbitrary driver-specific data.
- //
- // The length of the raw data must be smaller or equal to 10 Ki.
- //
- // +optional
- optional .k8s.io.apimachinery.pkg.runtime.RawExtension data = 5;
-
- // NetworkData contains network-related information specific to the device.
- //
- // +optional
- optional NetworkDeviceData networkData = 6;
-}
-
-// AllocationResult contains attributes of an allocated resource.
-message AllocationResult {
- // Devices is the result of allocating devices.
- //
- // +optional
- optional DeviceAllocationResult devices = 1;
-
- // NodeSelector defines where the allocated resources are available. If
- // unset, they are available everywhere.
- //
- // +optional
- optional .k8s.io.api.core.v1.NodeSelector nodeSelector = 3;
-}
-
-// BasicDevice defines one device instance.
-message BasicDevice {
- // Attributes defines the set of attributes for this device.
- // The name of each attribute must be unique in that set.
- //
- // The maximum number of attributes and capacities combined is 32.
- //
- // +optional
- map attributes = 1;
-
- // Capacity defines the set of capacities for this device.
- // The name of each capacity must be unique in that set.
- //
- // The maximum number of attributes and capacities combined is 32.
- //
- // +optional
- map capacity = 2;
-
- // ConsumesCounters defines a list of references to sharedCounters
- // and the set of counters that the device will
- // consume from those counter sets.
- //
- // There can only be a single entry per counterSet.
- //
- // The total number of device counter consumption entries
- // must be <= 32. In addition, the total number in the
- // entire ResourceSlice must be <= 1024 (for example,
- // 64 devices with 16 counters each).
- //
- // +optional
- // +listType=atomic
- // +featureGate=DRAPartitionableDevices
- repeated DeviceCounterConsumption consumesCounters = 3;
-
- // NodeName identifies the node where the device is available.
- //
- // Must only be set if Spec.PerDeviceNodeSelection is set to true.
- // At most one of NodeName, NodeSelector and AllNodes can be set.
- //
- // +optional
- // +oneOf=DeviceNodeSelection
- // +featureGate=DRAPartitionableDevices
- optional string nodeName = 4;
-
- // NodeSelector defines the nodes where the device is available.
- //
- // Must only be set if Spec.PerDeviceNodeSelection is set to true.
- // At most one of NodeName, NodeSelector and AllNodes can be set.
- //
- // +optional
- // +oneOf=DeviceNodeSelection
- // +featureGate=DRAPartitionableDevices
- optional .k8s.io.api.core.v1.NodeSelector nodeSelector = 5;
-
- // AllNodes indicates that all nodes have access to the device.
- //
- // Must only be set if Spec.PerDeviceNodeSelection is set to true.
- // At most one of NodeName, NodeSelector and AllNodes can be set.
- //
- // +optional
- // +oneOf=DeviceNodeSelection
- // +featureGate=DRAPartitionableDevices
- optional bool allNodes = 6;
-
- // If specified, these are the driver-defined taints.
- //
- // The maximum number of taints is 4.
- //
- // This is an alpha field and requires enabling the DRADeviceTaints
- // feature gate.
- //
- // +optional
- // +listType=atomic
- // +featureGate=DRADeviceTaints
- repeated DeviceTaint taints = 7;
-}
-
// CELDeviceSelector contains a CEL expression for selecting a device.
message CELDeviceSelector {
// Expression is a CEL expression which evaluates a single device. It
@@ -230,503 +85,6 @@ message CELDeviceSelector {
optional string expression = 1;
}
-// Counter describes a quantity associated with a device.
-message Counter {
- // Value defines how much of a certain device counter is available.
- //
- // +required
- optional .k8s.io.apimachinery.pkg.api.resource.Quantity value = 1;
-}
-
-// CounterSet defines a named set of counters
-// that are available to be used by devices defined in the
-// ResourceSlice.
-//
-// The counters are not allocatable by themselves, but
-// can be referenced by devices. When a device is allocated,
-// the portion of counters it uses will no longer be available for use
-// by other devices.
-message CounterSet {
- // CounterSet is the name of the set from which the
- // counters defined will be consumed.
- //
- // +required
- optional string name = 1;
-
- // Counters defines the counters that will be consumed by the device.
- // The name of each counter must be unique in that set and must be a DNS label.
- //
- // To ensure this uniqueness, capacities defined by the vendor
- // must be listed without the driver name as domain prefix in
- // their name. All others must be listed with their domain prefix.
- //
- // The maximum number of counters is 32.
- //
- // +required
- map counters = 2;
-}
-
-// Device represents one individual hardware instance that can be selected based
-// on its attributes. Besides the name, exactly one field must be set.
-message Device {
- // Name is unique identifier among all devices managed by
- // the driver in the pool. It must be a DNS label.
- //
- // +required
- optional string name = 1;
-
- // Basic defines one device instance.
- //
- // +optional
- // +oneOf=deviceType
- optional BasicDevice basic = 2;
-}
-
-// DeviceAllocationConfiguration gets embedded in an AllocationResult.
-message DeviceAllocationConfiguration {
- // Source records whether the configuration comes from a class and thus
- // is not something that a normal user would have been able to set
- // or from a claim.
- //
- // +required
- optional string source = 1;
-
- // Requests lists the names of requests where the configuration applies.
- // If empty, its applies to all requests.
- //
- // References to subrequests must include the name of the main request
- // and may include the subrequest using the format [/]. If just
- // the main request is given, the configuration applies to all subrequests.
- //
- // +optional
- // +listType=atomic
- repeated string requests = 2;
-
- optional DeviceConfiguration deviceConfiguration = 3;
-}
-
-// DeviceAllocationResult is the result of allocating devices.
-message DeviceAllocationResult {
- // Results lists all allocated devices.
- //
- // +optional
- // +listType=atomic
- repeated DeviceRequestAllocationResult results = 1;
-
- // This field is a combination of all the claim and class configuration parameters.
- // Drivers can distinguish between those based on a flag.
- //
- // This includes configuration parameters for drivers which have no allocated
- // devices in the result because it is up to the drivers which configuration
- // parameters they support. They can silently ignore unknown configuration
- // parameters.
- //
- // +optional
- // +listType=atomic
- repeated DeviceAllocationConfiguration config = 2;
-}
-
-// DeviceAttribute must have exactly one field set.
-message DeviceAttribute {
- // IntValue is a number.
- //
- // +optional
- // +oneOf=ValueType
- optional int64 int = 2;
-
- // BoolValue is a true/false value.
- //
- // +optional
- // +oneOf=ValueType
- optional bool bool = 3;
-
- // StringValue is a string. Must not be longer than 64 characters.
- //
- // +optional
- // +oneOf=ValueType
- optional string string = 4;
-
- // VersionValue is a semantic version according to semver.org spec 2.0.0.
- // Must not be longer than 64 characters.
- //
- // +optional
- // +oneOf=ValueType
- optional string version = 5;
-}
-
-// DeviceClaim defines how to request devices with a ResourceClaim.
-message DeviceClaim {
- // Requests represent individual requests for distinct devices which
- // must all be satisfied. If empty, nothing needs to be allocated.
- //
- // +optional
- // +listType=atomic
- repeated DeviceRequest requests = 1;
-
- // These constraints must be satisfied by the set of devices that get
- // allocated for the claim.
- //
- // +optional
- // +listType=atomic
- repeated DeviceConstraint constraints = 2;
-
- // This field holds configuration for multiple potential drivers which
- // could satisfy requests in this claim. It is ignored while allocating
- // the claim.
- //
- // +optional
- // +listType=atomic
- repeated DeviceClaimConfiguration config = 3;
-}
-
-// DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.
-message DeviceClaimConfiguration {
- // Requests lists the names of requests where the configuration applies.
- // If empty, it applies to all requests.
- //
- // References to subrequests must include the name of the main request
- // and may include the subrequest using the format [/]. If just
- // the main request is given, the configuration applies to all subrequests.
- //
- // +optional
- // +listType=atomic
- repeated string requests = 1;
-
- optional DeviceConfiguration deviceConfiguration = 2;
-}
-
-// DeviceClass is a vendor- or admin-provided resource that contains
-// device configuration and selectors. It can be referenced in
-// the device requests of a claim to apply these presets.
-// Cluster scoped.
-//
-// This is an alpha type and requires enabling the DynamicResourceAllocation
-// feature gate.
-message DeviceClass {
- // Standard object metadata
- // +optional
- optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
-
- // Spec defines what can be allocated and how to configure it.
- //
- // This is mutable. Consumers have to be prepared for classes changing
- // at any time, either because they get updated or replaced. Claim
- // allocations are done once based on whatever was set in classes at
- // the time of allocation.
- //
- // Changing the spec automatically increments the metadata.generation number.
- optional DeviceClassSpec spec = 2;
-}
-
-// DeviceClassConfiguration is used in DeviceClass.
-message DeviceClassConfiguration {
- optional DeviceConfiguration deviceConfiguration = 1;
-}
-
-// DeviceClassList is a collection of classes.
-message DeviceClassList {
- // Standard list metadata
- // +optional
- optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
-
- // Items is the list of resource classes.
- repeated DeviceClass items = 2;
-}
-
-// DeviceClassSpec is used in a [DeviceClass] to define what can be allocated
-// and how to configure it.
-message DeviceClassSpec {
- // Each selector must be satisfied by a device which is claimed via this class.
- //
- // +optional
- // +listType=atomic
- repeated DeviceSelector selectors = 1;
-
- // Config defines configuration parameters that apply to each device that is claimed via this class.
- // Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor
- // configuration applies to exactly one driver.
- //
- // They are passed to the driver, but are not considered while allocating the claim.
- //
- // +optional
- // +listType=atomic
- repeated DeviceClassConfiguration config = 2;
-}
-
-// DeviceConfiguration must have exactly one field set. It gets embedded
-// inline in some other structs which have other fields, so field names must
-// not conflict with those.
-message DeviceConfiguration {
- // Opaque provides driver-specific configuration parameters.
- //
- // +optional
- // +oneOf=ConfigurationType
- optional OpaqueDeviceConfiguration opaque = 1;
-}
-
-// DeviceConstraint must have exactly one field set besides Requests.
-message DeviceConstraint {
- // Requests is a list of the one or more requests in this claim which
- // must co-satisfy this constraint. If a request is fulfilled by
- // multiple devices, then all of the devices must satisfy the
- // constraint. If this is not specified, this constraint applies to all
- // requests in this claim.
- //
- // References to subrequests must include the name of the main request
- // and may include the subrequest using the format