kubernetes/apiextensions-apiserver

Long name registers but shortname doesn't

gouthamve opened this issue · 3 comments

Related to #5 #6

Here there are TPRs with version v1alpha1 and a CRD with the same group but version v1. There used to be a prometheus TPR with v1alpha1 but that was deleted and a CRD was created in its place.

Are there chances that we are somehow still routing requests to the TPR?

➜  prometheus-operator git:(v1-move) ✗ kc get customresourcedefinition -oyaml
apiVersion: v1
items:
- apiVersion: apiextensions.k8s.io/v1beta1
  kind: CustomResourceDefinition
  metadata:
    creationTimestamp: 2017-08-10T03:37:14Z
    name: prometheuses.monitoring.coreos.com
    namespace: ""
    resourceVersion: "35219"
    selfLink: /apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/prometheuses.monitoring.coreos.com
    uid: 3379b97d-7d7d-11e7-9b87-080027e7de4b
  spec:
    group: monitoring.coreos.com
    names:
      kind: Prometheus
      listKind: PrometheusList
      plural: prometheuses
      shortNames:
      - prom
      singular: prometheus
    scope: Namespaced
    version: v1
  status:
    acceptedNames:
      kind: Prometheus
      listKind: PrometheusList
      plural: prometheuses
      shortNames:
      - prom
      singular: prometheus
    conditions:
    - lastTransitionTime: null
      message: no conflicts found
      reason: NoConflicts
      status: "True"
      type: NamesAccepted
    - lastTransitionTime: 2017-08-10T03:37:14Z
      message: the initial names have been accepted
      reason: InitialNamesAccepted
      status: "True"
      type: Established
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""
➜  prometheus-operator git:(v1-move) ✗ kc get prometheus; kc get prom
No resources found.
the server doesn't have a resource type "prom"
➜  prometheus-operator git:(v1-move) ✗ kc get crd
the server doesn't have a resource type "crd"
➜  prometheus-operator git:(v1-move) ✗ kc get thirdpartyresources -oyaml
apiVersion: v1
items:
- apiVersion: extensions/v1beta1
  description: Managed Alertmanager cluster
  kind: ThirdPartyResource
  metadata:
    creationTimestamp: 2017-08-10T03:34:30Z
    name: alertmanager.monitoring.coreos.com
    namespace: ""
    resourceVersion: "35020"
    selfLink: /apis/extensions/v1beta1/thirdpartyresources/alertmanager.monitoring.coreos.com
    uid: d1bcf01b-7d7c-11e7-9b87-080027e7de4b
  versions:
  - name: v1alpha1
- apiVersion: extensions/v1beta1
  description: Prometheus monitoring for a service
  kind: ThirdPartyResource
  metadata:
    creationTimestamp: 2017-08-10T03:34:30Z
    name: service-monitor.monitoring.coreos.com
    namespace: ""
    resourceVersion: "35026"
    selfLink: /apis/extensions/v1beta1/thirdpartyresources/service-monitor.monitoring.coreos.com
    uid: d1f053d2-7d7c-11e7-9b87-080027e7de4b
  versions:
  - name: v1alpha1
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close