8000 1.30 adds tags that break `imagePullSecrets` · Issue #124540 · kubernetes/kubernetes · GitHub
[go: up one dir, main page]

Skip to content

1.30 adds tags that break imagePullSecrets #124540

@pmalek

Description

@pmalek

Problem statement

Using code-generator's client-gen in version 1.30 adds several new fields to generated CRDs:

                           imagePullSecrets:
                             description: |-
                               ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
                               If specified, these secrets will be passed to individual puller implementations for them to use.
                               More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
                             items:
                               description: |-
                                 LocalObjectReference contains enough information to let you locate the
                                 referenced object inside the same namespace.
                               properties:
                                 name:
                                   description: |-
                                     Name of the referent.
                                     More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
                                     TODO: Add other useful fields. apiVersion, kind, uid?
                                   type: string
                               type: object
                               x-kubernetes-map-type: atomic
                             type: array
+                            x-kubernetes-list-map-keys:
+                            - name
+                            x-kubernetes-list-type: map

This in turn makes the CRDs fail to be applied on the cluster (note: the CRD in question has PodTemplateSpec embedded as a field)

Error from server (Invalid): CustomResourceDefinition.apiextensions.k8s.io "dataplanes.gateway-operator.konghq.com" is invalid: [spec.validation.openAPIV3Schema.properties[spec].properties[deployment].properties[podTemplateSpec].properties[spec].properties[hostAliases].items.properties[ip].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property, spec.validation.openAPIV3Schema.properties[spec].properties[deployment].properties[podTemplateSpec].properties[spec].properties[imagePullSecrets].items.properties[name].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property]

Proposed solution

It would seem that LocalObjectReference (which is the underlying type of ImagePullSecrets)
is missing some code markers? Not sure at this moment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.sig/api-machineryCategorizes an issue or PR as relevant to SIG API Machinery.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0