mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-23 23:37:00 +00:00
Improvements to kyaml fn framework
This commit creates a new version of the alpha configuration functions framework. Goals include: - Make it easy to build multi-version APIs with the framework (not previously facilitated at all). - Simplify the framework's APIs where redundant configuration options exist (leaving the most powerful, replacing others with helpers to maintain usability they provided). - Make the Framework's APIs more consistent (e.g. between the various template types, usage of kio.Filter, field names) - Decouple responsibilities (e.g. command creation, resource list processing, generation of templating functions). - Make the framework even more powerfully pluggable (e.g. any kio.Filter can be a selector, and the selector the framework provides is itself a filter built from reusable abstractions). - Improve documentation. - Make container patches merge fields (notably list fields like `env`) correctly.
This commit is contained in:
6
kyaml/fn/framework/testdata/template-processor/container-patches/container.template.yaml
vendored
Normal file
6
kyaml/fn/framework/testdata/template-processor/container-patches/container.template.yaml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
# Copyright 2019 The Kubernetes Authors.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
env:
|
||||
- name: {{ .Spec.Key }}
|
||||
value: {{ .Spec.Value }}
|
||||
5
kyaml/fn/framework/testdata/template-processor/patches/patch.template.yaml
vendored
Normal file
5
kyaml/fn/framework/testdata/template-processor/patches/patch.template.yaml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# Copyright 2019 The Kubernetes Authors.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
spec:
|
||||
replicas: {{ .Spec.Replicas }}
|
||||
14
kyaml/fn/framework/testdata/template-processor/templates/deploy.template.yaml
vendored
Normal file
14
kyaml/fn/framework/testdata/template-processor/templates/deploy.template.yaml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
# Copyright 2019 The Kubernetes Authors.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: foo
|
||||
namespace: bar
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: foo
|
||||
image: {{ .Image }}
|
||||
Reference in New Issue
Block a user