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

Use StrategicMergePatch to apply overrides #175

Merged
merged 2 commits into from
Apr 18, 2024
Merged

Conversation

lllamnyp
Copy link
Collaborator

This commit removes the custom etcdaenixiov1alpha1.PodSpec type in favor of corev1.PodSpec. As a result, StrategicMergePatch may be used to correctly applythe overrides from EtcdCluster.Spec.PodTemplate.Spec on top of the default PodSpec, generated by the operator. In turn, this allows removal of dozens of lines of code responsible for custom merging logic.

Makefile Outdated Show resolved Hide resolved
Copy link
Member

@hiddenmarten hiddenmarten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update Makefile as an example from the thread.

This commit removes the custom etcdaenixiov1alpha1.PodSpec type in
favor of corev1.PodSpec. As a result, StrategicMergePatch may be used
to correctly applythe overrides from EtcdCluster.Spec.PodTemplate.Spec
on top of the default PodSpec, generated by the operator. In turn, this
allows removal of dozens of lines of code responsible for custom merging
logic.
@lllamnyp lllamnyp merged commit bee8012 into main Apr 18, 2024
8 checks passed
@lllamnyp lllamnyp deleted the feat/corev1-podspec branch April 18, 2024 04:26
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

Successfully merging this pull request may close these issues.

None yet

6 participants