Skip to content

Self-links are not cleaned up when exporting resources #33767

@0xmichalis

Description

@0xmichalis

I have noticed it a couple of times that when I am trying to export a resource, selflinks stay around and the namespace is not part of the link anymore.

[mkargaki@dhcp129-211 kubernetes.github.io]$ kc get quota -o yaml
apiVersion: v1
items:
- apiVersion: v1
  kind: ResourceQuota
  metadata:
    creationTimestamp: 2016-09-29T16:53:38Z
    name: object-counts
    namespace: default
    resourceVersion: "63"
    selfLink: /api/v1/namespaces/default/resourcequotas/object-counts
    uid: 4494594b-8665-11e6-9fad-68f72840e7df
  spec:
    hard:
      pods: "2"
  status:
    hard:
      pods: "2"
    used:
      pods: "0"
kind: List
metadata: {}
$ kc get quota object-counts --export -o yaml
apiVersion: v1
kind: ResourceQuota
metadata:
  creationTimestamp: null
  name: object-counts
  selfLink: /api/v1/namespaces//resourcequotas/object-counts
spec:
  hard:
    pods: "2"
status: {}

We could maybe have this issue as a duplicate of #24855 but I thought we already cleaned up object meta.

@kubernetes/sig-apps

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/kubectlkind/bugCategorizes issue or PR as related to a bug.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.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