Skip to content

Extra ObjectMeta struct included in CloudStackMachineTemplateResource #166

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

Closed
maxdrib opened this issue Sep 27, 2022 · 1 comment
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@maxdrib
Copy link
Contributor

maxdrib commented Sep 27, 2022

/kind bug

What steps did you take and what happened:
Create a kind cluster and install CAPC on it. Attempting to serialize a CloudStackMachineTemplate resource and then apply the result to a K8s cluster. This returned the following error:

"error: error validating \"STDIN\": error validating data: unknown object type \"nil\" in CloudStackMachineTemplate.spec.template.metadata.creationTimestamp; if you choose to ignore these errors, turn validation off with --validate=false\n"

It's basically causing the issue described in kubernetes/kubernetes#67610

What did you expect to happen:
I expected to be able to serialize the Go object to bytes, and then apply it with kubectl without having an extra ObjectMeta resource included to worry about. This ObjectMeta does not appear to be used anywhere in CAPC and should be removed. I should not have to set the creationTimestamp field either since as the comment says

	// CreationTimestamp is a timestamp representing the server time when this object was
	// created. It is not guaranteed to be set in happens-before order across separate operations.
	// Clients may not set this value. It is represented in RFC3339 form and is in UTC.

Anything else you would like to add:
This ObjectMeta does not appear to be used anywhere in CAPC and should be removed. However, this would require a new CAPC api version bump

Environment:

  • Cluster-api-provider-cloudstack version: main
  • Kubernetes version: (use kubectl version): 1.21
  • OS (e.g. from /etc/os-release):
@maxdrib
Copy link
Contributor Author

maxdrib commented Oct 31, 2022

Resolved by #176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants