Implement replica transformer as patch alternative

This commit is contained in:
Damien Robichaud
2019-05-29 18:27:39 -07:00
parent 109988d105
commit 5000a2e503
7 changed files with 206 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ import (
"sigs.k8s.io/kustomize/pkg/gvk"
"sigs.k8s.io/kustomize/pkg/image"
"sigs.k8s.io/kustomize/pkg/replica"
)
const (
@@ -79,6 +80,10 @@ type Kustomization struct {
// patch, but this operator is simpler to specify.
Images []image.Image `json:"images,omitempty" yaml:"images,omitempty"`
// Replicas is a list of {resourcename, count} that allows for simpler replica
// specification. This can also be done with a patch.
Replicas []replica.Replica `json:"replicas,omitempty" yaml:"replicas,omitempty"`
// Vars allow things modified by kustomize to be injected into a
// container specification. A var is a name (e.g. FOO) associated
// with a field in a specific resource instance. The field must