Skip to content

package and packagemetadata SMD and SSA are broken after k8s.io 0.36 module updates #1855

Description

@chappjc

What steps did you take:

Server-side apply (kubectl apply --server-side) against a Package or PackageMetadata object.

kubectl apply --server-side --field-manager=repro -f - <<'EOF'
apiVersion: data.packaging.carvel.dev/v1alpha1
kind: PackageMetadata
metadata:
  name: repro.example.com
  namespace: default
spec:
  displayName: "repro"
EOF

What happened:

Error from server: failed to create manager for existing fields: failed to convert new object
(...) to smd typed: no corresponding type for data.packaging.carvel.dev/v1alpha1, Kind=PackageMetadata

What did you expect:

packagemetadata.data.packaging.carvel.dev/repro.example.com serverside-applied

(SSA works as it did in v0.59.8 and prior.)

Anything else you would like to add:

In addition to SSA not working, kapp-controller can be seen logging [SHOULD NOT HAPPEN] failed to update managedFields for existing packages and packagemetadatas, with the practical effect that .metadata.managedFields on these objects goes stale. Structured merge diff, which SSA relies on, is no longer working for these types.

Bisected the issue to v0.60.0 (last good: v0.59.8). It's actually a side effect of the k8s.io module bumps in v0.60.0 (k8s.io/api, k8s.io/apimachinery, k8s.io/apiserver, k8s.io/client-go v0.30.1 bumped to v0.36.0): #1829

Types in pkg/apiserver/apis/datapackaging/v1alpha1 do not implement the new opt-in OpenAPIModelNamer convention (see kubernetes/kubernetes#131755, kubernetes/kube-openapi#563, kubernetes/kube-openapi#537), which is a known source source of issues with this k8s.io update, e.g. kubernetes-sigs/aws-load-balancer-controller#4543 and karmada-io/karmada#7255

More about the OpenAPI issue in this gist: https://gist.github.com/chappjc/abadce8b5abbfcfd677bd3688ad81e28#demo-the-served-openapi-document

Environment:

  • kapp Controller version: v0.60.4
  • Kubernetes version: v1.34.9

Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue describes a defect or unexpected behavior

    Type

    No type

    Projects

    • Status
      Closed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions