Skip to content

Commit a48c19f

Browse files
authored
Merge pull request #3097 from KnVerey/update_kustomize_krm_keps
Update KEPS 2299 and 2953
2 parents 2f7a0c7 + da69692 commit a48c19f

File tree

4 files changed

+109
-43
lines changed

4 files changed

+109
-43
lines changed

keps/sig-cli/2299-kustomize-plugin-composition/README.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ transformers:
158158
# generate resources for a Java application
159159
- apiVersion: example.com/v1
160160
kind: JavaApplication
161-
provider: {container: {image: docker.example.co/kustomize_transformers/java:v1.0.0}}
161+
runtime: {container: {image: docker.example.co/kustomize_transformers/java:v1.0.0}}
162162
metadata:
163163
name: my-app
164164
spec:
@@ -167,7 +167,7 @@ transformers:
167167
# transform resources to inject a logger
168168
- apiVersion: example.com/v1
169169
kind: Logger
170-
provider: {container: {image: docker.example.co/kustomize_transformers/logger:v1.0.3}}
170+
runtime: {container: {image: docker.example.co/kustomize_transformers/logger:v1.0.3}}
171171
metadata:
172172
name: logger
173173
```
@@ -199,7 +199,7 @@ transformers:
199199
# transform resources from imported transformers to inject metrics
200200
- apiVersion: example.com/v1
201201
kind: Prometheus
202-
provider: {container: {image: docker.example.co/kustomize_transformers/prometheus:v1.0.2}}
202+
runtime: {container: {image: docker.example.co/kustomize_transformers/prometheus:v1.0.2}}
203203
metadata:
204204
name: metrics
205205
spec:
@@ -230,7 +230,7 @@ graduation to beta does not require this. `Composition` support MUST be included
230230
#### Plugin execution flags
231231

232232
This KEP does not propose any changes to the flags used to gate plugins, or to the parameters
233-
available to configure container/exec/starlark plugin execution. All plugin execution from either
233+
available to configure container/exec plugin execution. All plugin execution from either
234234
Kind will remain gated behind `--enable-alpha-plugins`, as well as existing additional flags for
235235
particular plugin provider types. Any changes to plugin gating should apply identically to both
236236
Kinds. This does limit the usefulness of `Composition` within `kubectl -k` for the time being, since
@@ -290,7 +290,7 @@ transformerOverrides:
290290
transformers:
291291
- apiVersion: example.com/v1
292292
kind: Prometheus
293-
provider:
293+
runtime:
294294
container:
295295
image: example/prometheus:v1.0.2
296296
metadata:
@@ -308,8 +308,7 @@ Notes:
308308
- One notable difference from `Kustomization` is that in addition to being able to provide a path to
309309
a file containing the transformer config, you can specify the config itself (not strigified)
310310
inline.
311-
- A second difference is the introduction of a top-level reserved `provider` field, replacing the
312-
JSON annotation currently used for this information.
311+
- The examples here use a new a top-level reserved `runtime` field instead of the JSON annotation currently used for this information. This field may be introduced as part of KEP 2953. It does not block this KEP, and usage within Kustomization and Composition will be identical regardless.
313312
- The `metadata.name` field is defaulted to `Kind` in kebab case. However, `metadata.name` MUST be
314313
specified when using multiple independent instances of the same GVK within a `Composition` tree.
315314

@@ -343,7 +342,7 @@ definitions:
343342
minLength: 1
344343
maxLength: 253
345344
pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
346-
provider:
345+
runtime:
347346
type: object
348347
additionalProperties: false
349348
properties:
@@ -356,7 +355,7 @@ definitions:
356355
image:
357356
type: string
358357
minLength: 1
359-
starlark:
358+
exec:
360359
type: object
361360
required:
362361
- path
@@ -491,18 +490,16 @@ Testing can be done purely on the client-side without the need for a cluster.
491490

492491
#### Alpha
493492

494-
- `Composition` implemented with an alpha GV and supported by `kustomize build`
495-
- Compatibility with existing built-in transformers
496-
- `ResourceAccumulator` extracted as a transformer
497-
- `transformer`, `transformersFrom` and `transformerOverrides` fields implemented.
498-
- reserved `provider` field
493+
- `Composition` implemented with an alpha GV and supported by `kustomize build`. This includes implementing the `transformer`, `transformersFrom`, `transformerOverrides` and `transformerOrder` fields.
494+
- `ResourceGenerator` extracted as a transformer
495+
- Introduce a way to use default `fieldSpecs` when invoking builtin transformers from the transformers field (and generators from the generators field, etc.).
496+
- Built-in generators updated to work in transformers fields
499497
- Basic documentation added to the Kustomize website.
500498

501499
#### Beta
502500

503501
- `Composition` beta GV supported by `kustomize build`
504502
- `Kustomization` transformer implemented
505-
- `transformerOrder` field implemented
506503
- `Composition` supported by the `resources`, `transformers`, `generators` and `validators` fields
507504
in `Kustomization` and `Component`
508505
- Thorough documentation and examples published on the Kustomize website.
@@ -657,6 +654,7 @@ N/A -- feature is client-side-only
657654

658655
- April 27, 2021: Provisional KEP merged
659656
- August 2021: Proposal updated and marked implementable.
657+
- December 2021: Prototype PR opened at [kustomize/#4323](https://github.com/kubernetes-sigs/kustomize/pull/4323) and KEP updated to reflect additional work discovered.
660658

661659
<!--
662660
Major milestones in the lifecycle of a KEP should be tracked in this section. Major milestones might

keps/sig-cli/2299-kustomize-plugin-composition/kep.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ approvers:
1717
see-also:
1818
- "/keps/sig-cli/993-kustomize-generators-transformers"
1919
stage: alpha
20-
latest-milestone: "v1.23"
20+
latest-milestone: "v1.24"

0 commit comments

Comments
 (0)