-
Notifications
You must be signed in to change notification settings - Fork 345
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
Rename Size
to Replicas
#270
Comments
Should we keep |
I guess as the apiGroup has changed, then we could make this a breaking change (clearly marked in changelog)? Although in general if it doesn't complicate code too much, it would be easier to deprecate. |
It requires both options to co-exist. Right now, the migration path from the old Edit: expanding a bit on the above, here's what it would look like to have both. The types, such as // JaegerCollectorSpec defines the options to be used when deploying the collector
type JaegerCollectorSpec struct {
// Size represents the number of replicas to create for this service. DEPRECATED, use `Replicas` instead.
Size int `json:"size"`
// Replicas represents the number of replicas to create for this service.
Replicas *int `json:"replicas"`
Image string `json:"image"`
Options Options `json:"options"`
JaegerCommonSpec
} Then, functions like // NewCollector builds a new Collector struct based on the given spec
func NewCollector(jaeger *v1.Jaeger) *Collector {
if jaeger.Spec.Collector.Replicas == nil {
replicaSize := 1
if jaeger.Spec.Collector.Size > 0 {
replicaSize = jaeger.Spec.Collector.Size
}
jaeger.Spec.Collector.Replicas = &replicaSize
}
if jaeger.Spec.Collector.Image == "" {
jaeger.Spec.Collector.Image = fmt.Sprintf("%s:%s", viper.GetString("jaeger-collector-image"), viper.GetString("jaeger-version"))
}
return &Collector{jaeger: jaeger}
} |
From #207 (comment)
The text was updated successfully, but these errors were encountered: