https://kep.k8s.io/3638 has been promoted to stable back in 1.32 so now
is the right time to drop this feature gate entirely.
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
Kubernetes-commit: d1b5f268b48eda4bb8acdeef52407c27add9e076
Removing this restrictions will allow us to use these commands with the
new resize subresource.
Kubernetes-commit: e1ca63489f2b788f893ab37a27242ce319e1eaf6
* Remove KUBECTL_DEBUG_CUSTOM_PROFILE env var
* Add e2e test for custom profile in kubectl debug
* Keep feature flag until 1.33
* Update comment
* Simplify tests by relying on test framework functionality
* Rename import alias to better to pass verify-import-alias
Kubernetes-commit: 1caf9a150b794a7c4a17e63a54b902ec0b0be570
The canonical import for json-patch v4 is
gopkg.in/evanphx/json-patch.v4 (see
https://github.com/evanphx/json-patch/blob/master/README.md#get-it for
reference).
Using the v4-specific path should also reduce the risk of unwanted v5
upgrade attempts, because they won't be offered as automated upgrades
by dependency upgrade management tools, and they won't happen through
indirect dependencies (see
https://github.com/kubernetes/kubernetes/pull/120327 for context).
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Kubernetes-commit: 5300466a5c8988b479a151ceb77f49dd00065c83
This PR adds `custom` flag to let user customizes debug resources.
`custom` flag accepts partial container spec in json format.
Kubernetes-commit: af2dadcb18a0411a0f9aa286c743801efdb81049
* Promote plugin resolution to beta
* Not use plugin for kubectl create -f command execution
`kubectl create -f` is legitimate command execution and we shouldn't
search plugins if user invokes this.
* Add integration test for plugin resolution for create command
* Reintroduce feature flag to ability to disable it explicitly
Kubernetes-commit: 074a8b00840e85cc95fd83b1825b14ab21ad09c4
Since explain openapiv3 has been moved to beta already, there is no
point to having this environment variable.
This PR removes it.
Kubernetes-commit: 4d8f569b037d2979c1d9c5825e5227aadfc8077f
* Enable plugin resolution as subcommand for selected builtin commands
This PR adds external plugin resolution as subcommand for selected builtin
commands if subcommand does not exist as builtin.
In it's alpha stage, this will only be enabled for create command and
this feature is hidden behind `KUBECTL_ENABLE_CMD_SHADOW` environment variable.
* Rename parameter to exactMatch to better reflect
Kubernetes-commit: a901bb630b5a353898c1b35df582a7faeef160a0
validate flag does not have default value defined when there is no
parameter passed, therefore it tries to use next irrelevant flag.
This PR defines NoOptDefVal for validate flag which is set "strict".
Kubernetes-commit: 0245e74590a658ea911f1e5cacd270960883af2d
Some of these changes are cosmetic (repeatedly calling klog.V instead of
reusing the result), others address real issues:
- Logging a message only above a certain verbosity threshold without
recording that verbosity level (if klog.V().Enabled() { klog.Info... }):
this matters when using a logging backend which records the verbosity
level.
- Passing a format string with parameters to a logging function that
doesn't do string formatting.
All of these locations where found by the enhanced logcheck tool from
https://github.com/kubernetes/klog/pull/297.
In some cases it reports false positives, but those can be suppressed with
source code comments.
Kubernetes-commit: edffc700a43e610f641907290a5152ca593bad79
For 1.23, we removed the kubectl `--dry-run` empty default value (`--dry-run`)
and boolean values (`--dry-run=true` and `--dry-run=false`). This change
required requiring users to specify `--dry-run=client` or `--dry-run=server`
due to a deprecation. This change was made in #105327.
After reconsideration, this change is not worth the churn for users.
It's likely that many users rely on these values for automated and manual use
cases.
This change reverts #105327 and re-introduces the values `--dry-run`,
`--dry-run=true`, and `--dry-run=false`.
Kubernetes-commit: cc4998b2b131ca9906b847600bd5ad3be70eff3a
This commit teaches the completion function to repeat resource names
when supported by the command. The logic checks if a resource name
has already been specified by the user and does not include it again
when repeating the completion.
For example, the get command can receive multiple pods names, therefore
with this commit we have:
kubectl get pod pod1 [tab]
will provide completion of pod names again, but not show 'pod1' since
it is already part of the command-line.
The improvement affects the following commands:
- annotate
- apply edit-last-applied
- apply view-last-applied
- autoscale
- delete
- describe
- edit
- expose
- get
- label
- patch
- rollout history
- rollout pause
- rollout restart
- rollout resume
- rollout undo
- scale
- taint
Note that "rollout status" only accepts a single resource name, unlike
the other "rollout ..." commands; this required the creation of a
special completion function that did not repeat just for that case.
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
Kubernetes-commit: 7aa5cb40316dbeb970250ee0835fbd597fd19a20
The boolean values for --dry-run have been deprecated for removal since
1.18, more than 2 releases.
The default value for --dry-run with the flag set and unspecified has
been deprecated for removal since 1.18, more than 2 releases.
Both values are now removed in this change. Any kubectl --dry-run
usage no longer accepts --dry-run=(true|false) boolean values and usage
now requires that a value of (client|server|none) is specified.
Kubernetes-commit: e0b7a85ee5b5d546bec2dc0e8cbf5cd4c0c684d8
The behavior of the container defaulting in attach/exec is inconsistent
and should be unified. As a user, when we default the vast majority of
pods will have a small number of containers and so printing the container
names inline (as kubectl logs did) is more appropriate. The debug message
we printed about using describe was already longer than 99% of all pod
container names, so we were wasting user time.
Unify container selection for exec and attach to be consistent with old
behavior. Properly handle the --quiet flag (should not print in that case)
for both commands. Remove EnableCmdSuggestion and the machinery it needs.
The message now prints:
> Defaulted container "etcdctl" out of: etcdctl, etcd, etcd-metrics, etcd-ensure-env-vars (init), etcd-resources-copy (init)
Kubernetes-commit: 43e8ebbbcd3f57d18d8151efb6242f88a763b06d