mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 00:52:55 +00:00
Make the replica transformer kind aware.
The previous implementation had a bug and poorly handled types that should not have a `spec: replica:` field. Documentation is updated to reflect the change in behavior, and better highlights the cases where a patch should be used instead of this shorthand.
This commit is contained in:
@@ -239,10 +239,12 @@ func (kt *KustTarget) configureBuiltinReplicaCountTransformer(
|
||||
tConfig *config.TransformerConfig) (
|
||||
result []transformers.Transformer, err error) {
|
||||
var c struct {
|
||||
Replica types.Replica
|
||||
Replica types.Replica
|
||||
FieldSpecs []config.FieldSpec
|
||||
}
|
||||
for _, args := range kt.kustomization.Replicas {
|
||||
c.Replica = args
|
||||
c.FieldSpecs = tConfig.Replicas
|
||||
p := builtin.NewReplicaCountTransformerPlugin()
|
||||
err = kt.configureBuiltinPlugin(p, c, "replica")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user