mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-15 19:08:16 +00:00
Compare commits
13 Commits
api/v0.11.
...
api/v0.11.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00a9c59dd7 | ||
|
|
4dfc2a9507 | ||
|
|
2f17803c0a | ||
|
|
14cb815b5d | ||
|
|
a5df6f7fd9 | ||
|
|
6374d3d593 | ||
|
|
c3c7013f09 | ||
|
|
3277ff9dbf | ||
|
|
746bd18a8c | ||
|
|
d7763045ea | ||
|
|
30612cfd17 | ||
|
|
6a7caf4192 | ||
|
|
b73dfe7f35 |
2
Makefile
2
Makefile
@@ -12,7 +12,7 @@ MYGOBIN = $(shell go env GOPATH)/bin
|
||||
endif
|
||||
export PATH := $(MYGOBIN):$(PATH)
|
||||
MODULES := '"cmd/config" "api/" "kustomize/" "kyaml/"'
|
||||
LATEST_V4_RELEASE=v4.3.0
|
||||
LATEST_V4_RELEASE=v4.5.1
|
||||
|
||||
# Provide defaults for REPO_OWNER and REPO_NAME if not present.
|
||||
# Typically these values would be provided by Prow.
|
||||
|
||||
112
ROADMAP.md
Normal file
112
ROADMAP.md
Normal file
@@ -0,0 +1,112 @@
|
||||
# Kustomize roadmap 2022
|
||||
|
||||
Presented at the [January 26, 2022, SIG-CLI meeting](https://youtu.be/l2plzJ9MRlk?t=1321)
|
||||
|
||||
kustomize maintainers: @knverey, @natasha41575
|
||||
|
||||
[Objective: Improve contributor community](https://github.com/kubernetes-sigs/kustomize/blob/master/roadmap-2021.md#objective-improve-contributor-community)
|
||||
|
||||
[Objective: Improve end-user experience](https://github.com/kubernetes-sigs/kustomize/blob/master/roadmap-2021.md#objective-improve-end-user-experience)
|
||||
|
||||
[Objective: Improve extension experience](https://github.com/kubernetes-sigs/kustomize/blob/master/roadmap-2021.md#objective-improve-extension-experience)
|
||||
|
||||
## Objective: Improve contributor community
|
||||
|
||||
**_WHO: End user who also contributes source code._**
|
||||
|
||||
Top priority:
|
||||
|
||||
- Kustomization v1 (also end-user impact) ([PROJECT](https://github.com/kubernetes-sigs/kustomize/projects/12))
|
||||
- Remove the following fields:
|
||||
- [vars](https://github.com/kubernetes-sigs/kustomize/issues/2052)
|
||||
- [patchesJson6902, patchesStrategicMerge (consolidate on \`patches)](https://github.com/kubernetes-sigs/kustomize/issues/4376)
|
||||
- [helmChartInflationGenerator, helmCharts, helmGlobals](https://github.com/kubernetes-sigs/kustomize/issues/4401)
|
||||
- all long-deprecated fields in Kustomization v1 such as \`bases\` and those being accommodate by kustomize edit \[[see code snippet](https://github.com/kubernetes-sigs/kustomize/blob/ee4b7847f0beb6c0d2070673b10f23f7b3e92e82/api/types/fix.go#L15)\]
|
||||
- Ensure that \`kustomize edit fix\` handles migrations for all those, and that anything it changes is not still present in v1.
|
||||
- [Add reorder field](https://github.com/kubernetes-sigs/kustomize/issues/3913). Default should be FIFO and legacy should also be supported (could add alphabetic and custom sort support eventually). Replaces -reorder flag.
|
||||
- [Reconcile openapi and crds field](https://github.com/kubernetes-sigs/kustomize/issues/3944)
|
||||
- [Consider deprecating configurations field](https://github.com/kubernetes-sigs/kustomize/issues/3945) (old, pre-plugin, pre-openapi global configuration)
|
||||
- [Add a field to enable the managedby label](https://github.com/kubernetes-sigs/kustomize/issues/4047)
|
||||
|
||||
Second priority:
|
||||
|
||||
- Improve contributor documentation
|
||||
- [Instructions to upgrade kustomize-in-kubectl](https://github.com/kubernetes-sigs/kustomize/issues/3951)
|
||||
|
||||
Also very valuable to the project:
|
||||
|
||||
- [Improve the release process](https://github.com/kubernetes-sigs/kustomize/issues/3952) to support regular biweekly releases [PROJECT](https://github.com/kubernetes-sigs/kustomize/projects/7)
|
||||
- Release sigs.k8s.io/kustomize/api v1.0.0 [PROJECT](https://github.com/kubernetes-sigs/kustomize/projects/5)
|
||||
- [Reduce the public surface of the API module](https://github.com/kubernetes-sigs/kustomize/issues/3942)
|
||||
- [Vendor all transitive deps](https://github.com/kubernetes-sigs/kustomize/issues/3706). Since kustomize is in kubectl, we must do as kubectl does to manage deps, exposing new transitive deps in code review.
|
||||
- Project administration
|
||||
- [Rename master branch to main](https://github.com/kubernetes-sigs/kustomize/issues/3954)
|
||||
|
||||
|
||||
|
||||
## Objective: Improve end-user experience
|
||||
|
||||
**_WHO: End user that wants kustomize build artifacts (binaries, containers)._**
|
||||
|
||||
Top priorities:
|
||||
|
||||
- Bug fixes:
|
||||
- Fix bugs in basic anchor support: [issue query](https://github.com/kubernetes-sigs/kustomize/issues?q=is%3Aopen+is%3Aissue+label%3Aarea%2Fanchors)
|
||||
- integer keys support: [#3446](https://github.com/kubernetes-sigs/kustomize/issues/3446)
|
||||
- kyaml not respecting \`$patch replace|retainKeys\`: [#2037](https://github.com/kubernetes-sigs/kustomize/issues/2037)
|
||||
- kustomize removing quotes from namespace field values: [#4146](https://github.com/kubernetes-sigs/kustomize/issues/4146)
|
||||
- Kustomize doesn’t support metadata.generateName: [#641](https://github.com/kubernetes-sigs/kustomize/issues/641)
|
||||
- Send kustomize CLI version number into kubectl ([kubectl issue](https://github.com/kubernetes/kubectl/issues/797) / [kustomize issue](https://github.com/kubernetes-sigs/kustomize/issues/1424))
|
||||
- Kustomize performance investigations/improvements [PROJECT](https://github.com/kubernetes-sigs/kustomize/projects/13)
|
||||
- [Support generic resource references in name reference tracking](https://github.com/kubernetes-sigs/kustomize/issues/3418)
|
||||
- [KEP 4267: retain the resource origin and transformer data in annotations](https://github.com/kubernetes-sigs/kustomize/pull/4267)
|
||||
|
||||
Secondary priorities:
|
||||
|
||||
- kustomize cli v5 ([PROJECT](https://github.com/kubernetes-sigs/kustomize/projects/14))
|
||||
- [Drop the --reorder flag](https://github.com/kubernetes-sigs/kustomize/issues/3947)
|
||||
- [Graduate cfg read-only commands out of alpha](https://github.com/kubernetes-sigs/kustomize/issues/4090).
|
||||
- [Drop the –enable-managedby-label](https://github.com/kubernetes-sigs/kustomize/issues/4047)
|
||||
- Drop old plugin-related fields in favor of [the Catalog-style fields](https://github.com/kubernetes/enhancements/tree/master/keps/sig-cli/2906-kustomize-function-catalog).
|
||||
- [Drop the helm flags](https://github.com/kubernetes-sigs/kustomize/issues/4401)
|
||||
- [Confusion around namespace replacement](https://github.com/kubernetes-sigs/kustomize/issues/880).
|
||||
|
||||
Also very valuable to the project:
|
||||
|
||||
- [Overinclusion of root directory error in error messages](https://github.com/kubernetes-sigs/kustomize/issues/4348)
|
||||
- [Add kustomize localize command](https://github.com/kubernetes-sigs/kustomize/issues/3980)
|
||||
- [Fix Windows support in test suite](https://github.com/kubernetes-sigs/kustomize/issues/4001)
|
||||
- Improve end-user documentation [PROJECT](https://github.com/kubernetes-sigs/kustomize/projects/9)
|
||||
|
||||
|
||||
## Objective: Improve extension experience
|
||||
|
||||
**_WHO: Plugin developers: end users who extend kustomize, but don’t think about internals._**
|
||||
|
||||
This objective is described in detail in the [Kustomize Plugin Graduation KEP](https://github.com/kubernetes/enhancements/tree/master/keps/sig-cli/2953-kustomize-plugin-graduation) / [PROJECT](https://github.com/kubernetes-sigs/kustomize/projects/15) .
|
||||
|
||||
Top priorities:
|
||||
|
||||
- Fix core usability issues with KRM Function extensions:
|
||||
- [Better errors for function config failures](https://github.com/kubernetes-sigs/kustomize/issues/4398)
|
||||
- [Container KRM Mounts are not mounting via function parameters](https://github.com/kubernetes-sigs/kustomize/issues/4290)
|
||||
- [Resolution of local file references in extensions transformer configuration](https://github.com/kubernetes-sigs/kustomize/issues/4154)
|
||||
- [Do not silently ignore plugins when config has typo](https://github.com/kubernetes-sigs/kustomize/issues/4399)
|
||||
- [KRM Exec Function can't locate executable when referencing a base](https://github.com/kubernetes-sigs/kustomize/issues/4347)
|
||||
- Once core usability issues are fixed, [deprecate legacy exec and Go plugin support](https://github.com/kubernetes/enhancements/tree/master/keps/sig-cli/2953-kustomize-plugin-graduation)
|
||||
- [Catalog KEP](https://github.com/kubernetes/enhancements/tree/master/keps/sig-cli/2906-kustomize-function-catalog)
|
||||
|
||||
Secondary priorities:
|
||||
|
||||
- [Remove Starlark support](https://github.com/kubernetes-sigs/kustomize/issues/4349)
|
||||
- [Composition KEP](https://github.com/kubernetes/enhancements/pull/2300). The implementation is complete in [#4223](https://github.com/kubernetes-sigs/kustomize/pull/4323), but depends on:
|
||||
- [Convert resources and components to be backed by a reusable generator](https://github.com/kubernetes-sigs/kustomize/issues/4402)
|
||||
- [Enable explicitly invoked transformers to use default fieldSpecs](https://github.com/kubernetes-sigs/kustomize/issues/4404)
|
||||
- [Enable built-in generators to be used in the transformers field ](https://github.com/kubernetes-sigs/kustomize/issues/4403)
|
||||
|
||||
|
||||
Also very valuable to the project:
|
||||
|
||||
- [Improve docs for kyaml libraries](https://github.com/kubernetes-sigs/kustomize/issues/3950), especially by adding examples.
|
||||
- [Create a reserved field for plugin runtime information](https://github.com/kubernetes-sigs/kustomize/issues/4405)
|
||||
- [Develop new standard process for implementing builtin transformers](https://github.com/kubernetes-sigs/kustomize/issues/4400)
|
||||
@@ -77,6 +77,66 @@ spec:
|
||||
assert.NoError(t, fSys.RemoveAll(tmpDir.String()))
|
||||
}
|
||||
|
||||
func TestRemoteResourceGitHTTP(t *testing.T) {
|
||||
output := `apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
labels:
|
||||
app: myapp
|
||||
name: dev-myapp-pod
|
||||
spec:
|
||||
containers:
|
||||
- image: nginx:1.7.9
|
||||
name: nginx
|
||||
`
|
||||
tests := []struct {
|
||||
input []byte
|
||||
}{
|
||||
{
|
||||
input: []byte(`
|
||||
resources:
|
||||
- https://github.com/kubernetes-sigs/kustomize/examples/multibases/dev/?ref=v1.0.6
|
||||
`),
|
||||
},
|
||||
{
|
||||
input: []byte(`
|
||||
resources:
|
||||
- https://github.com/kubernetes-sigs/kustomize//examples/multibases/dev/?ref=v1.0.6
|
||||
`),
|
||||
},
|
||||
{
|
||||
input: []byte(`
|
||||
resources:
|
||||
- git::https://github.com/kubernetes-sigs/kustomize/examples/multibases/dev/?ref=v1.0.6
|
||||
`),
|
||||
},
|
||||
{
|
||||
input: []byte(`
|
||||
resources:
|
||||
- git::https://github.com/kubernetes-sigs/kustomize//examples/multibases/dev/?ref=v1.0.6
|
||||
`),
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
fSys := filesys.MakeFsOnDisk()
|
||||
b := krusty.MakeKustomizer(krusty.MakeDefaultOptions())
|
||||
tmpDir, err := filesys.NewTmpConfirmedDir()
|
||||
assert.NoError(t, err)
|
||||
assert.NoError(t, fSys.WriteFile(filepath.Join(tmpDir.String(), "kustomization.yaml"), test.input))
|
||||
m, err := b.Run(fSys, tmpDir.String())
|
||||
if utils.IsErrTimeout(err) {
|
||||
// Don't fail on timeouts.
|
||||
t.SkipNow()
|
||||
}
|
||||
assert.NoError(t, err)
|
||||
yml, err := m.AsYaml()
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, output, string(yml))
|
||||
assert.NoError(t, fSys.RemoveAll(tmpDir.String()))
|
||||
}
|
||||
}
|
||||
|
||||
func TestRemoteResourceWithHTTPError(t *testing.T) {
|
||||
fSys := filesys.MakeFsOnDisk()
|
||||
b := krusty.MakeKustomizer(krusty.MakeDefaultOptions())
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
package loader
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
@@ -298,7 +299,7 @@ func (fl *fileLoader) errIfRepoCycle(newRepoSpec *git.RepoSpec) error {
|
||||
}
|
||||
|
||||
// Load returns the content of file at the given path,
|
||||
// else an error. Relative paths are taken relative
|
||||
// else an error. Relative paths are taken relative
|
||||
// to the root.
|
||||
func (fl *fileLoader) Load(path string) ([]byte, error) {
|
||||
if u, err := url.Parse(path); err == nil && (u.Scheme == "http" || u.Scheme == "https") {
|
||||
@@ -314,6 +315,10 @@ func (fl *fileLoader) Load(path string) ([]byte, error) {
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
if resp.StatusCode < 200 || resp.StatusCode > 299 {
|
||||
_, err := git.NewRepoSpecFromUrl(path)
|
||||
if err == nil {
|
||||
return nil, errors.New("URL is a git repository")
|
||||
}
|
||||
return nil, fmt.Errorf("%w: status code %d (%s)", ErrorHTTP, resp.StatusCode, http.StatusText(resp.StatusCode))
|
||||
}
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
|
||||
@@ -6,7 +6,7 @@ require (
|
||||
github.com/rakyll/statik v0.1.7
|
||||
github.com/spf13/cobra v1.2.1
|
||||
github.com/stretchr/testify v1.7.0
|
||||
sigs.k8s.io/kustomize/api v0.11.0
|
||||
sigs.k8s.io/kustomize/api v0.11.1
|
||||
sigs.k8s.io/kustomize/kyaml v0.13.3
|
||||
)
|
||||
|
||||
|
||||
@@ -8,15 +8,10 @@ require (
|
||||
github.com/spf13/cobra v1.2.1
|
||||
github.com/spf13/pflag v1.0.5
|
||||
github.com/stretchr/testify v1.7.0
|
||||
sigs.k8s.io/kustomize/api v0.11.0
|
||||
sigs.k8s.io/kustomize/api v0.11.1
|
||||
sigs.k8s.io/kustomize/cmd/config v0.10.4
|
||||
sigs.k8s.io/kustomize/kyaml v0.13.3
|
||||
sigs.k8s.io/yaml v1.2.0
|
||||
)
|
||||
|
||||
exclude (
|
||||
sigs.k8s.io/kustomize/api v0.2.0
|
||||
sigs.k8s.io/kustomize/cmd/config v0.2.0
|
||||
)
|
||||
|
||||
replace sigs.k8s.io/kustomize/api => ../api
|
||||
|
||||
@@ -45,11 +45,13 @@ Thus, do `kyaml` first, then `cmd/config`, etc.
|
||||
|
||||
## Prep work
|
||||
|
||||
#### Prepare your source directory
|
||||
### ⚠️ IMPORTANT: Check for [release-blocking issues](https://github.com/kubernetes-sigs/kustomize/issues?q=label%3Arelease-blocker+is%3Aclosed)
|
||||
|
||||
The release scripts expect Kustomize code to be cloned at a path ending in `sigs.k8s.io/kustomize`. Run all commands from that directory unless otherwise specified.
|
||||
We use the `release-blocker` tag to track issues that need to be solved before the next release. Typically, this would be a new regression introduced on the master branch and not present in the previous release. If any such issues exist, the release should be delayed.
|
||||
|
||||
#### Consider fetching new OpenAPI data
|
||||
It is also a good idea to scan any [untriaged issues](https://github.com/kubernetes-sigs/kustomize/issues?q=is%3Aissue+is%3Aopen+label%3Aneeds-triage) for potential blockers we haven't labelled yet before proceeding.
|
||||
|
||||
### Consider fetching new OpenAPI data
|
||||
The Kubernetes OpenAPI data changes no more frequently than once per quarter.
|
||||
You can check the current builtin versions that kustomize is using with the
|
||||
following command.
|
||||
@@ -61,6 +63,12 @@ kustomize openapi info
|
||||
Instructions on how to get a new OpenAPI sample can be found in the
|
||||
[OpenAPI Readme].
|
||||
|
||||
### Set up the release tools
|
||||
|
||||
#### Prepare your source directory
|
||||
|
||||
The release scripts expect Kustomize code to be cloned at a path ending in `sigs.k8s.io/kustomize`. Run all commands from that directory unless otherwise specified.
|
||||
|
||||
#### Load some helper functions
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user