while adding support for init container, i came across repeated key/values being added into nodeSpec and druidSpec
on higher level i plan to introduce the following changes
Have a common spec which shall include all key/values common to all nodeSpec, druidSpec.
a common spec to have a spec having key/values common to both.
a container spec to have container specific key/value common to container as well as initContainer
pseudo
type DruidSpec struct {
.......
.......
CommmonSpec `json:",inline,omitempty"`
......
}
type DruidNodeSpec struct {
.......
.......
CommmonSpec `json:",inline,omitempty"`
......
}
type CommmonSpec struct {
// Optional: node selector to be used by Druid statefulsets
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// Optional: toleration to be used in order to run Druid on nodes tainted
Tolerations []v1.Toleration `json:"tolerations,omitempty"`
// Optional: affinity to be used to for enabling node, pod affinity and anti-affinity
Affinity *v1.Affinity `json:"affinity,omitempty"`
}
All changes will fully compatible with the current CR structure.
pseudo
All changes will fully compatible with the current CR structure.
cc @himanshug @nishantmonu51