Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update kustomize version that's shipped in kubectl? #1500

Closed
pascalgn opened this issue Sep 5, 2019 · 13 comments · Fixed by kubernetes/kubernetes#98946
Closed

Update kustomize version that's shipped in kubectl? #1500

pascalgn opened this issue Sep 5, 2019 · 13 comments · Fixed by kubernetes/kubernetes#98946
Assignees
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@pascalgn
Copy link

pascalgn commented Sep 5, 2019

Not sure where the right repository is for this, maybe here, maybe https://github.com/kubernetes/kubectl, maybe https://github.com/kubernetes/kubernetes?

Kubernetes has just released v1.16.0-beta.2 and so far I haven't seen anything about a new kustomize version in the changelogs. I think if we want to have an updated version shipped in kubectl 1.16, we need to do something in the near future.

Are there any plans for updating the kustomize version that's integrated into kubectl?

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 4, 2019
@dijitali
Copy link

It was mentioned in #1267 (comment) that the intention is for each kubectl release to use the latest kustomize version.

Is this issue the correct place to be tracking progress on this?

Just for context: the mismatch in functionality is a proving bit inconvenient for us when we're trying to build automation around kustomize.

See also: #1424

@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 15, 2020
@dijitali
Copy link

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Jan 15, 2020
@dijitali
Copy link

Not sure if I'm supposed to marking this issue as fresh. My apologies if not.

From my perspective I think this is still an issue and some guidance would be appreciated as we're attempting to use kustomize in automation.

Sounds like from the discussion in kubernetes/kubernetes#85146 that there might be a different approach proposed here?

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 14, 2020
@ofek
Copy link
Contributor

ofek commented Apr 18, 2020

Any update on this?

@dijitali
Copy link

/remove-lifecycle stale

@Shell32-Natsu
Copy link
Contributor

Shell32-Natsu commented Nov 9, 2020

Another umbrella issue about removing apimachinery and related libraries. #2506

@monopole
Copy link
Contributor

monopole commented Jan 27, 2021

Update: targetting kubectl release v1.21, code freeze.

Per: https://www.kubernetes.dev/resources/release/

Tuesday, February 9th: Week 5 - Enhancements Freeze
Tuesday, March 9th: Week 9 - Code Freeze

The best way to help on this issue is use and report bugs in the latest standalone version of kustomize in the 3.9 series - e.g. v3.9.2.

This instance of the kustomize CLI uses the same kustomize libraries which will be linked into kubectl via normal import mechanisms; we're shaking some final bugs.

Kustomize releases every two weeks, while kubectl releases at most once a qtr.

monopole added a commit to monopole/kustomize that referenced this issue Feb 4, 2021
The PR seeks to expose some of the top level kustomize
commands (especially `build`) for reuse in other command
line tools (expecially `kubectl`, see kubernetes-sigs#1500).

```
REPO/api/go.mod
REPO/api/builtins
REPO/api/kommands <- new
REPO/api/...
```

This would make `api` module depend on cobra.  That's bad
for people who want to depend on the api, but want to write
their own commands at their own version of cobra.  The
commands module and the api module should remain distinct.

Put them in a new module along side `api`, e.g. `

```
REPO/api/go.mod
REPO/api/builtins
REPO/api/...
REPO/kommands/go.mod
REPO/kommands/build
REPO/kommands/edit
REPO/kommands/...
```

This has the problem (or advantage) that the commands and
the kustomize binary now evolve separately with their own
version numbers.

Just move them up out of internal.

```
REPO/api/go.mod
REPO/api/builtins
REPO/api/...
REPO/kustomize/go.mod
REPO/kustomize/main.go
REPO/kustomize/kommands/build
REPO/kustomize/kommands/edit
REPO/kustomize/kommands/...
```

Outside users, e.g. kubectl, could then

```
import sigs.k8s.io/kustomize/kustomize/v3/kommands/build
```

and hopefully still get the `main` package
as they do now via:

```
go get sigs.k8s.io/kustomize/kustomize/v3
```
monopole added a commit to monopole/kustomize that referenced this issue Feb 4, 2021
The PR seeks to expose some of the top level kustomize
commands (especially `build`) for reuse in other command
line tools (expecially `kubectl`, see kubernetes-sigs#1500).

Options

1. Expose the commands in the `api` module.

```
REPO/api/go.mod
REPO/api/builtins
REPO/api/kommands <- new
REPO/api/...
```

Disadvantage: This would make `api` module depend on cobra.  That's
bad for people who want to depend on the api, but want to write their
own commands at their own version of cobra.  The commands module and
the api module should remain distinct.

2. Expose the commands in their own `commands` module.

They'd appear alongside `api`, e.g. `

```
REPO/api/go.mod
REPO/api/builtins
REPO/api/...
REPO/commands/go.mod
REPO/commands/build
REPO/commands/edit
REPO/commands/...
```

Advantage: The commands would be consumed by the kustomize binary and
the kubectl binary in the same way.

Disadvantage: THe kustomize binary module and the commands module
would evolve separately with their own version numbers, creating
confusion.

3. Expose the commands in the existing `kustomize` module

```
REPO/api/go.mod
REPO/api/builtins
REPO/api/...
REPO/kustomize/go.mod
REPO/kustomize/main.go
REPO/kustomize/kommands/build
REPO/kustomize/kommands/edit
REPO/kustomize/kommands/...
```

Outside users, e.g. kubectl, could then

```
import sigs.k8s.io/kustomize/kustomize/v3/kommands/build
```

and hopefully still get the `main` package
as they do now via:

```
go get sigs.k8s.io/kustomize/kustomize/v3
```

Advantage: 1) The commands and the kustomize binary sit at the same
version, so it's easy to see which version of kustomize is being used
by some other CLI. 2) The path to the binary doesn't change.

Disadvantage: It appears to be non-standard to place a main package at
the top level of a module that also ships subpackages.  Usually `main`
packages live as leaves under a directory called `cmd`.  This might
cause some problems.  If so, we can go with option 4.

4. Same as 3, but move `main.go` down one step.

```
REPO/api/go.mod
REPO/api/builtins
REPO/api/...
REPO/kustomize/go.mod
REPO/kustomize/cmd/main.go
REPO/kustomize/kommands/build
REPO/kustomize/kommands/edit
REPO/kustomize/kommands/...
```
monopole added a commit to monopole/kustomize that referenced this issue Feb 4, 2021
The PR seeks to expose some of the top level kustomize
commands (especially `build`) for reuse in other command
line tools (expecially `kubectl`, see kubernetes-sigs#1500).

Options

1. Expose the commands in the `api` module.

```
REPO/api/go.mod
REPO/api/builtins
REPO/api/kommands <- new
REPO/api/...
```

Disadvantage: This would make `api` module depend on cobra.  That's
bad for people who want to depend on the api, but want to write their
own commands at their own version of cobra.  The commands module and
the api module should remain distinct.

2. Expose the commands in their own `commands` module.

They'd appear alongside `api`, e.g. `

```
REPO/api/go.mod
REPO/api/builtins
REPO/api/...
REPO/commands/go.mod
REPO/commands/build
REPO/commands/edit
REPO/commands/...
```

Advantage: The commands would be consumed by the kustomize binary and
the kubectl binary in the same way.

Disadvantage: The kustomize binary module and the commands module
would evolve separately with their own version numbers, creating
confusion.

3. Expose the commands in the existing `kustomize` module

```
REPO/api/go.mod
REPO/api/builtins
REPO/api/...
REPO/kustomize/go.mod
REPO/kustomize/main.go
REPO/kustomize/commands/build
REPO/kustomize/commands/edit
REPO/kustomize/commands/...
```

Outside users, e.g. kubectl, could then

```
import sigs.k8s.io/kustomize/kustomize/v3/commands/build
```

and hopefully still get the `main` package
as they do now via:

```
go get sigs.k8s.io/kustomize/kustomize/v3
```

Advantage: 1) The commands and the kustomize binary sit at the same
version, so it's easy to see which version of kustomize is being used
by some other CLI. 2) The path to the binary doesn't change.

Disadvantage: It appears to be non-standard to place a main package at
the top level of a module that also ships subpackages.  Usually `main`
packages live as leaves under a directory called `cmd`.  This might
cause some problems.  If so, we can go with option 4.

4. Same as 3, but move `main.go` down one step.

```
REPO/api/go.mod
REPO/api/builtins
REPO/api/...
REPO/kustomize/go.mod
REPO/kustomize/cmd/main.go
REPO/kustomize/commands/build
REPO/kustomize/commands/edit
REPO/kustomize/commands/...
```
monopole added a commit to monopole/kustomize that referenced this issue Feb 4, 2021
The PR exposes some of the top level kustomize commands
(especially `build`) for reuse in other command line tools
(expecially `kubectl`, see kubernetes-sigs#1500).

This PR represents option 3 from the following list of ways
this exposure could be arranged.

1. Expose the commands in the `api` module.

```
REPO/api/go.mod
REPO/api/builtins
REPO/api/commands <- new
REPO/api/...
```

Disadvantage: This would make `api` module depend on cobra.
That's bad for clients that want to depend on the api, but
want to write their own commands at their own version of
cobra.  The `api` module shouldn't depend on UX libraries
like cobra.

2. Expose the commands in their own `commands` module.

They'd appear alongside `api`, e.g. `

```
REPO/api/go.mod
REPO/api/builtins
REPO/api/...
REPO/commands/go.mod
REPO/commands/build
REPO/commands/edit
REPO/commands/...
```

Advantage: The commands would be consumed by the kustomize
binary and the kubectl binary in the same way.

Disadvantage: The kustomize binary module and the commands
module could evolve separately with their own version
numbers, creating confusion.

3. Expose the commands in the existing `kustomize` module

```
REPO/api/go.mod
REPO/api/builtins
REPO/api/...
REPO/kustomize/go.mod
REPO/kustomize/main.go
REPO/kustomize/commands/build
REPO/kustomize/commands/edit
REPO/kustomize/commands/...
```

Outside users, e.g. kubectl, could then

```
import sigs.k8s.io/kustomize/kustomize/v3/commands/build
```

and hopefully still get the `main` package
as they do now via:

```
go get sigs.k8s.io/kustomize/kustomize/v3
```

Advantage: 1) The kustomize binary ships at the same version
as the commands - which makes sense as the binary's
_version_ refers to how the CLI operates (command names,
flags, etc.).  This makes it easy to related the version of
a kustomize binary with the version of commands running in
some other CLI binary.  2) The path to the kustomize binary
doesn't change.

Disadvantage: It's an atypical Go module arrangement.
Usually `main` packages live as leaves under a directory
called `cmd` inside a module, rather than at the _top_ of
the module.  This might cause some problems.  If so, we can
go with option 4.

4. Same as 3, but move `main.go` (the `main` package) down one step.

```
REPO/api/go.mod
REPO/api/builtins
REPO/api/...
REPO/kustomize/go.mod
REPO/kustomize/cmd/main.go
REPO/kustomize/commands/build
REPO/kustomize/commands/edit
REPO/kustomize/commands/...
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants