Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object's TypeMeta is empty #413

Closed
mickael-carl opened this issue May 19, 2018 · 3 comments
Closed

Object's TypeMeta is empty #413

mickael-carl opened this issue May 19, 2018 · 3 comments

Comments

@mickael-carl
Copy link

mickael-carl commented May 19, 2018

Running the following:

package main

import (
    "log"

    metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    "k8s.io/client-go/kubernetes"
    "k8s.io/client-go/tools/clientcmd"
    _ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
)   
    
func main() {
    config, err := clientcmd.BuildConfigFromFlags("", "/home/carlm/.kube/config")
    clientset, err := kubernetes.NewForConfig(config) 
    
    configMaps, err := clientset.CoreV1().ConfigMaps("some-namespace").List(metav1.ListOptions{})
    log.Print(configMaps.Items[0].TypeMeta)
    log.Print(configMaps.TypeMeta)
}   

should yield non-empty TypeMetas but actually yields nothing in both cases ("{ }"). I believe this has also been mentioned here.

@liggitt
Copy link
Member

liggitt commented May 19, 2018

Reported in kubernetes/kubernetes#3030

Fix in progress in kubernetes/kubernetes#63972

@nikhita
Copy link
Member

nikhita commented Jun 24, 2018

Dupe of #308

@mickael-carl
Copy link
Author

Thanks for pointing it out!

lyarwood added a commit to lyarwood/kubevirt that referenced this issue Oct 25, 2022
EnsureKubeVirtGroupVersionKind ensures a provided object registered with
KubeVirts generated schema has GVK set correctly. This is required as
client-go continues to return objects without TypeMeta set as set out in
the following closed but often cited issue:

Object's TypeMeta is empty
kubernetes/client-go#413

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
lyarwood added a commit to lyarwood/kubevirt that referenced this issue Oct 26, 2022
EnsureKubeVirtGroupVersionKind ensures a provided object registered with
KubeVirts generated schema has GVK set correctly. This is required as
client-go continues to return objects without TypeMeta set as set out in
the following closed but often cited issue:

Object's TypeMeta is empty
kubernetes/client-go#413

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
lyarwood added a commit to lyarwood/kubevirt that referenced this issue Oct 26, 2022
EnsureKubeVirtGroupVersionKind ensures a provided object registered with
KubeVirts generated schema has GVK set correctly. This is required as
client-go continues to return objects without TypeMeta set as set out in
the following closed but often cited issue:

Object's TypeMeta is empty
kubernetes/client-go#413

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
lyarwood added a commit to lyarwood/kubevirt that referenced this issue Oct 27, 2022
GenerateKubeVirtGroupVersionKind ensures a provided object registered
with KubeVirts generated schema has GVK set correctly. This is required
as client-go continues to return objects without TypeMeta set as set out
in the following closed but often cited issue:

Object's TypeMeta is empty
kubernetes/client-go#413

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
lyarwood added a commit to lyarwood/kubevirt that referenced this issue Oct 27, 2022
GenerateKubeVirtGroupVersionKind ensures a provided object registered
with KubeVirts generated schema has GVK set correctly. This is required
as client-go continues to return objects without TypeMeta set as set out
in the following closed but often cited issue:

Object's TypeMeta is empty
kubernetes/client-go#413

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
lyarwood added a commit to lyarwood/kubevirt that referenced this issue Oct 31, 2022
GenerateKubeVirtGroupVersionKind ensures a provided object registered
with KubeVirts generated schema has GVK set correctly. This is required
as client-go continues to return objects without TypeMeta set as set out
in the following closed but often cited issue:

Object's TypeMeta is empty
kubernetes/client-go#413

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
lyarwood added a commit to lyarwood/kubevirt that referenced this issue Nov 14, 2022
GenerateKubeVirtGroupVersionKind ensures a provided object registered
with KubeVirts generated schema has GVK set correctly. This is required
as client-go continues to return objects without TypeMeta set as set out
in the following closed but often cited issue:

Object's TypeMeta is empty
kubernetes/client-go#413

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
lyarwood added a commit to lyarwood/kubevirt that referenced this issue Nov 14, 2022
GenerateKubeVirtGroupVersionKind ensures a provided object registered
with KubeVirts generated schema has GVK set correctly. This is required
as client-go continues to return objects without TypeMeta set as set out
in the following closed but often cited issue:

Object's TypeMeta is empty
kubernetes/client-go#413

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
lyarwood added a commit to lyarwood/kubevirt that referenced this issue Nov 14, 2022
GenerateKubeVirtGroupVersionKind ensures a provided object registered
with KubeVirts generated schema has GVK set correctly. This is required
as client-go continues to return objects without TypeMeta set as set out
in the following closed but often cited issue:

Object's TypeMeta is empty
kubernetes/client-go#413

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
lyarwood added a commit to lyarwood/kubevirt that referenced this issue Nov 16, 2022
GenerateKubeVirtGroupVersionKind ensures a provided object registered
with KubeVirts generated schema has GVK set correctly. This is required
as client-go continues to return objects without TypeMeta set as set out
in the following closed but often cited issue:

Object's TypeMeta is empty
kubernetes/client-go#413

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
lyarwood added a commit to lyarwood/kubevirt that referenced this issue Nov 16, 2022
GenerateKubeVirtGroupVersionKind ensures a provided object registered
with KubeVirts generated schema has GVK set correctly. This is required
as client-go continues to return objects without TypeMeta set as set out
in the following closed but often cited issue:

Object's TypeMeta is empty
kubernetes/client-go#413

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
lyarwood added a commit to lyarwood/kubevirt that referenced this issue Nov 16, 2022
GenerateKubeVirtGroupVersionKind ensures a provided object registered
with KubeVirts generated schema has GVK set correctly. This is required
as client-go continues to return objects without TypeMeta set as set out
in the following closed but often cited issue:

Object's TypeMeta is empty
kubernetes/client-go#413

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
kubevirt-bot pushed a commit to kubevirt-bot/kubevirt that referenced this issue Nov 17, 2022
GenerateKubeVirtGroupVersionKind ensures a provided object registered
with KubeVirts generated schema has GVK set correctly. This is required
as client-go continues to return objects without TypeMeta set as set out
in the following closed but often cited issue:

Object's TypeMeta is empty
kubernetes/client-go#413

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
lyarwood added a commit to lyarwood/kubevirt that referenced this issue Nov 17, 2022
GenerateKubeVirtGroupVersionKind ensures a provided object registered
with KubeVirts generated schema has GVK set correctly. This is required
as client-go continues to return objects without TypeMeta set as set out
in the following closed but often cited issue:

Object's TypeMeta is empty
kubernetes/client-go#413

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants