Conversation
This was referenced Feb 21, 2023
4e66edf to
7f0d7cf
Compare
mumoshu
added a commit
that referenced
this pull request
Feb 26, 2023
Bumping controller-runtime from 0.14.1 to 0.14.4 (#2261) seem to break our integration test: ``` unable to install CRDs onto control plane: unable to create CRD instances: unable to create CRD "ephemeralrunners.actions.github.com": CustomResourceDefinition.apiextensions.k8s.io "ephemeralrunners.actions.github.com" is invalid: [spec.validation.openAPIV3Schema.properties[spec].properties[spec].properties[volumes].items.properties[ephemeral].properties[volumeClaimTemplate].properties[spec].properties[resources].properties[claims].x-kubernetes-list-type: Required value: must be map if x-kubernetes-list-map-keys is non-empty, spec.validation.openAPIV3Schema.properties[spec].properties[spec].properties[ephemeralContainers].items.properties[resources].properties[claims].x-kubernetes-list-type: Required value: must be map if x-kubernetes-list-map-keys is non-empty, spec.validation.openAPIV3Schema.properties[spec].properties[spec].properties[containers].items.properties[resources].properties[claims].x-kubernetes-list-type: Required value: must be map if x-kubernetes-list-map-keys is non-empty, spec.validation.openAPIV3Schema.properties[spec].properties[spec].properties[initContainers].items.properties[resources].properties[claims].x-kubernetes-list-type: Required value: must be map if x-kubernetes-list-map-keys is non-empty] ``` The offending field, "x-kubernetes-list-map-keys", was already there before the upgrade. We previously fixed a similar issue for "x-kubernetes-list-type" in #2132. At that time we already had "x-kubernetes-list-map-keys" but the integration test didn't fail. Presuming this might be due to new K8s dependencies or controller-runtime envtest change, I'd like to just drop the field like we've already done for -type field in #2132. Ref #2132 Ref #2261
mumoshu
added a commit
that referenced
this pull request
Feb 26, 2023
Bumping controller-runtime from 0.14.1 to 0.14.4 (#2261) seem to break our integration test: ``` unable to install CRDs onto control plane: unable to create CRD instances: unable to create CRD "ephemeralrunners.actions.github.com": CustomResourceDefinition.apiextensions.k8s.io "ephemeralrunners.actions.github.com" is invalid: [spec.validation.openAPIV3Schema.properties[spec].properties[spec].properties[volumes].items.properties[ephemeral].properties[volumeClaimTemplate].properties[spec].properties[resources].properties[claims].x-kubernetes-list-type: Required value: must be map if x-kubernetes-list-map-keys is non-empty, spec.validation.openAPIV3Schema.properties[spec].properties[spec].properties[ephemeralContainers].items.properties[resources].properties[claims].x-kubernetes-list-type: Required value: must be map if x-kubernetes-list-map-keys is non-empty, spec.validation.openAPIV3Schema.properties[spec].properties[spec].properties[containers].items.properties[resources].properties[claims].x-kubernetes-list-type: Required value: must be map if x-kubernetes-list-map-keys is non-empty, spec.validation.openAPIV3Schema.properties[spec].properties[spec].properties[initContainers].items.properties[resources].properties[claims].x-kubernetes-list-type: Required value: must be map if x-kubernetes-list-map-keys is non-empty] ``` To be clear, the offending field, "x-kubernetes-list-map-keys", is new, and was NOT there before the upgrade. We previously fixed a similar issue for "x-kubernetes-list-type" in #2132, by adding a post-processing step to our CRD generation make target to remove the offending fields. This commit refactors the post-processing logic into a new make target. The CRD generation target uses the new target for removing both "x-kubernetes-list-type" and the new "x-kubernetes-list-map-keys" fields. Ref #2132 Ref #2261
Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.14.1 to 0.14.4. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/master/RELEASE.md) - [Commits](kubernetes-sigs/controller-runtime@v0.14.1...v0.14.4) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumping controller-runtime from 0.14.1 to 0.14.4 (#2261) seem to break our integration test: ``` unable to install CRDs onto control plane: unable to create CRD instances: unable to create CRD "ephemeralrunners.actions.github.com": CustomResourceDefinition.apiextensions.k8s.io "ephemeralrunners.actions.github.com" is invalid: [spec.validation.openAPIV3Schema.properties[spec].properties[spec].properties[volumes].items.properties[ephemeral].properties[volumeClaimTemplate].properties[spec].properties[resources].properties[claims].x-kubernetes-list-type: Required value: must be map if x-kubernetes-list-map-keys is non-empty, spec.validation.openAPIV3Schema.properties[spec].properties[spec].properties[ephemeralContainers].items.properties[resources].properties[claims].x-kubernetes-list-type: Required value: must be map if x-kubernetes-list-map-keys is non-empty, spec.validation.openAPIV3Schema.properties[spec].properties[spec].properties[containers].items.properties[resources].properties[claims].x-kubernetes-list-type: Required value: must be map if x-kubernetes-list-map-keys is non-empty, spec.validation.openAPIV3Schema.properties[spec].properties[spec].properties[initContainers].items.properties[resources].properties[claims].x-kubernetes-list-type: Required value: must be map if x-kubernetes-list-map-keys is non-empty] ``` To be clear, the offending field, "x-kubernetes-list-map-keys", is new, and was NOT there before the upgrade. We previously fixed a similar issue for "x-kubernetes-list-type" in #2132, by adding a post-processing step to our CRD generation make target to remove the offending fields. This commit refactors the post-processing logic into a new make target. The CRD generation target uses the new target for removing both "x-kubernetes-list-type" and the new "x-kubernetes-list-map-keys" fields. Ref #2132 Ref #2261
c6301b6 to
dc89cf4
Compare
mumoshu
reviewed
Feb 27, 2023
| $(YQ) '.spec.preserveUnknownFields = false' --inplace "$$YAMLFILE" ; \ | ||
| done | ||
| make manifests-gen-crds-fix DELETE_KEY=x-kubernetes-list-type | ||
| make manifests-gen-crds-fix DELETE_KEY=x-kubernetes-list-map-keys |
Collaborator
There was a problem hiding this comment.
The new k8s.io dependency seems to have resulted in controller-gen additionally generating x-kubernetes-list-map-keys fields for pod specs embedded in CRDs.
This line removes the fields so that CRD validation passes.
mumoshu
reviewed
Feb 27, 2023
| for YAMLFILE in config/crd/bases/actions*.yaml; do \ | ||
| $(YQ) '.spec.preserveUnknownFields = false' --inplace "$$YAMLFILE" ; \ | ||
| done | ||
| make manifests-gen-crds-fix DELETE_KEY=x-kubernetes-list-type |
Collaborator
There was a problem hiding this comment.
Note that we have already been removing x-kubernetes-list-type fields since #2132, and this is just another way to do it.
TingluoHuang
approved these changes
Feb 28, 2023
Collaborator
|
Thank you for your review @TingluoHuang! Merging. |
unpollito
pushed a commit
to DistruApp/actions-runner-controller
that referenced
this pull request
Jan 21, 2026
actions#2261) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps sigs.k8s.io/controller-runtime from 0.14.1 to 0.14.4.
Release notes
Sourced from sigs.k8s.io/controller-runtime's releases.
Commits
b9940ed✨ Provide a truly lazy restmapper (#2179)5055a52Merge pull request #2165 from vincepri/deprecate-component-config63e5fef[0.14] Deprecate component configuration packageb718c5dMerge pull request #2154 from k8s-infra-cherrypick-robot/cherry-pick-2126-to-...849d99bMerge pull request #2152 from k8s-infra-cherrypick-robot/cherry-pick-2151-to-...ece809b🌱 Bump kubebuilder-release-tools to v0.3.08ad99d8✨ Add additional SubResource* functions for FieldOwner (#2153)b55cd2aUpdate golanci-lint script7a4c6ecMerge pull request #2146 from sbueringer/pr-bump-0.14-to-v0.26.17697a5eBump k8s.io/* to v0.26.1Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)