mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 01:50: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:
@@ -355,6 +355,7 @@ Replicas modified the number of replicas for a resource.
|
||||
E.g. Given this kubernetes Deployment fragment:
|
||||
|
||||
```
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: deployment-name
|
||||
spec:
|
||||
@@ -374,6 +375,17 @@ This field accepts a list, so many resources can
|
||||
be modified at the same time.
|
||||
|
||||
|
||||
#### Limitation
|
||||
As this declaration does not take in a `kind:` nor a `group:`
|
||||
it will match any `group` and `kind` that has a matching name and
|
||||
that is one of:
|
||||
- `Deployment`
|
||||
- `ReplicationController`
|
||||
- `ReplicaSet`
|
||||
- `StatefulSet`
|
||||
|
||||
For more complex use cases, revert to using a patch.
|
||||
|
||||
|
||||
### resources
|
||||
|
||||
|
||||
Reference in New Issue
Block a user