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

[API] not using core/v1 pod spec #132

Closed
Bo0km4n opened this issue Apr 10, 2024 · 4 comments
Closed

[API] not using core/v1 pod spec #132

Bo0km4n opened this issue Apr 10, 2024 · 4 comments

Comments

@Bo0km4n
Copy link

Bo0km4n commented Apr 10, 2024

https://github.com/aenix-io/etcd-operator/blob/main/api/v1alpha1/etcdcluster_types.go#L140

etcd cluster pod template has a member: "PodSpec".
I seems like this field has same values as https://pkg.go.dev/k8s.io/[email protected]/core/v1#PodSpec

Why doesn't use official package's struct, you defined by original?
If there is no specific reason, I think should import and use official package's struct

@sergeyshevch
Copy link
Member

sergeyshevch commented Apr 10, 2024

Initially, the spec was inspired by the Victoriametrics operator and highly changed by the maintainers team.

Our type gives us the ability to disable the propagation of some fields. Also, we can make sure that podSpec will work correctly in all K8s versions that the operator should support.

If you need some fields that are now not presented in our podSpec, please rise an issue and we will add it.

Also all contributions are always welcome!

@Bo0km4n
Copy link
Author

Bo0km4n commented Apr 11, 2024

I figured out a background, thank you.

The cluster controller create or update etcd pods from above PodSpec, so it should replace spec type to k8s core v1.
By doing so, you can notice new pod spec feature and deprecated it when update k8s dependencies.
I will contribute about this!

@lllamnyp
Copy link
Member

Thanks for your suggestion. The maintainers are divided in opinions on this matter. I would encourage you to offer your viewpoint under #172.

@lllamnyp
Copy link
Member

This is completed by #175. Let us know what you think and feel free to comment or open a new issue if you feel that there's more work to be done in this direction.

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