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

TypeMeta : Kind + ApiVersion are empty when the object is processed the first time #202

Closed
cmoulliard opened this issue Nov 9, 2018 · 0 comments · Fixed by #212
Closed

Comments

@cmoulliard
Copy link

Bug

Original ticket : operator-framework/operator-sdk#727

When I create a Component's custom resource, the component is well created and the MetaData well defined (Kind, ApiVersion)

oc get cp/fruit-client -o yaml                
apiVersion: component.k8s.io/v1alpha1
kind: Component
metadata:
  name: fruit-client
  namespace: my-spring-app
spec:
  deployment: innerloop
  exposeService: true
  runtime: springboot
  version: 1.5.16

but when the reconcile's function of the controller fetch the Component, then the Kind, ApiVersion fields are empty

What is the root cause of this issue ?

screenshot 2018-11-09 12 27 43

Environment

okd : 3.11 (= kubernetes v1.11)
operator-sdk : v0.1.1+git

Project

Code of the API : https://github.com/snowdrop/component-operator/tree/operator-0.1.1/pkg/apis
Code of the controller : https://github.com/snowdrop/component-operator/blob/operator-0.1.1/pkg/controller/component/handler.go#L94

Hypothesis

As described here I suspect that we have a deepCopy issue the first time that we get the object from the cache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant