Skip to content

Commit

Permalink
Merge pull request #2589 from carapace-sh/kubectl-updates-v0.31.2
Browse files Browse the repository at this point in the history
kubectl: updates from v0.31.2
  • Loading branch information
rsteube authored Nov 9, 2024
2 parents d1a318b + 820d521 commit 41a0297
Show file tree
Hide file tree
Showing 42 changed files with 59 additions and 98 deletions.
18 changes: 0 additions & 18 deletions completers/kubectl_completer/cmd/alpha_auth.go

This file was deleted.

26 changes: 0 additions & 26 deletions completers/kubectl_completer/cmd/alpha_auth_whoami.go

This file was deleted.

4 changes: 1 addition & 3 deletions completers/kubectl_completer/cmd/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,17 @@ func init() {
applyCmd.Flags().Bool("overwrite", false, "Automatically resolve conflicts between the modified and live configuration by using values from the modified configuration")
applyCmd.Flags().Bool("prune", false, "Automatically delete resource objects, that do not appear in the configs and are created by either apply or create --save-config. Should be used with either -l or --all.")
applyCmd.Flags().StringSlice("prune-allowlist", []string{}, "Overwrite the default allowlist with <group/version/kind> for --prune")
applyCmd.Flags().StringSlice("prune-whitelist", []string{}, "Overwrite the default whitelist with <group/version/kind> for --prune")
applyCmd.Flags().Bool("record", false, "Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.")
applyCmd.Flags().BoolP("recursive", "R", false, "Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.")
applyCmd.Flags().StringP("selector", "l", "", "Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2). Matching objects must satisfy all of the specified label constraints.")
applyCmd.Flags().Bool("server-side", false, "If true, apply runs in the server instead of the client.")
applyCmd.Flags().Bool("show-managed-fields", false, "If true, keep the managedFields when printing objects in JSON or YAML format.")
applyCmd.Flags().String("template", "", "Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].")
applyCmd.Flags().String("timeout", "", "The length of time to wait before giving up on a delete, zero means determine a timeout from the size of the object")
applyCmd.Flags().String("validate", "", "Validation mode.")
applyCmd.Flags().String("validate", "", "Must be one of: strict (or true), warn, ignore (or false).")
applyCmd.Flags().Bool("wait", false, "If true, wait for resources to be gone before returning. This waits for finalizers.")
applyCmd.Flag("cascade").NoOptDefVal = " "
applyCmd.Flag("dry-run").NoOptDefVal = " "
applyCmd.Flag("prune-whitelist").Hidden = true
applyCmd.Flag("record").Hidden = true
applyCmd.Flag("validate").NoOptDefVal = " "
rootCmd.AddCommand(applyCmd)
Expand Down
2 changes: 1 addition & 1 deletion completers/kubectl_completer/cmd/apply_editLastApplied.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func init() {
apply_editLastAppliedCmd.Flags().BoolP("recursive", "R", false, "Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.")
apply_editLastAppliedCmd.Flags().Bool("show-managed-fields", false, "If true, keep the managedFields when printing objects in JSON or YAML format.")
apply_editLastAppliedCmd.Flags().String("template", "", "Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].")
apply_editLastAppliedCmd.Flags().String("validate", "", "Validation mode.")
apply_editLastAppliedCmd.Flags().String("validate", "", "Must be one of: strict (or true), warn, ignore (or false).")
apply_editLastAppliedCmd.Flags().Bool("windows-line-endings", false, "Defaults to the line ending native to your platform.")
apply_editLastAppliedCmd.Flag("record").Hidden = true
apply_editLastAppliedCmd.Flag("validate").NoOptDefVal = " "
Expand Down
2 changes: 1 addition & 1 deletion completers/kubectl_completer/cmd/certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

var certificateCmd = &cobra.Command{
Use: "certificate SUBCOMMAND",
Short: "Modify certificate resources.",
Short: "Modify certificate resources",
GroupID: "cluster management",
Run: func(cmd *cobra.Command, args []string) {},
}
Expand Down
3 changes: 3 additions & 0 deletions completers/kubectl_completer/cmd/config_setCredentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ func init() {
config_setCredentialsCmd.Flags().StringSlice("exec-arg", []string{}, "New arguments for the exec credential plugin command for the user entry in kubeconfig")
config_setCredentialsCmd.Flags().String("exec-command", "", "Command for the exec credential plugin for the user entry in kubeconfig")
config_setCredentialsCmd.Flags().StringSlice("exec-env", []string{}, "'key=value' environment values for the exec credential plugin")
config_setCredentialsCmd.Flags().String("exec-interactive-mode", "", "InteractiveMode of the exec credentials plugin for the user entry in kubeconfig")
config_setCredentialsCmd.Flags().String("exec-provide-cluster-info", "", "ProvideClusterInfo of the exec credentials plugin for the user entry in kubeconfig")
config_setCredentialsCmd.Flags().String("password", "", "password for the user entry in kubeconfig")
config_setCredentialsCmd.Flags().String("token", "", "token for the user entry in kubeconfig")
config_setCredentialsCmd.Flags().String("username", "", "username for the user entry in kubeconfig")
config_setCredentialsCmd.Flag("embed-certs").NoOptDefVal = " "
config_setCredentialsCmd.Flag("exec-provide-cluster-info").NoOptDefVal = " "
configCmd.AddCommand(config_setCredentialsCmd)

carapace.Gen(config_setCredentialsCmd).FlagCompletion(carapace.ActionMap{
Expand Down
2 changes: 1 addition & 1 deletion completers/kubectl_completer/cmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func init() {
createCmd.Flags().StringP("selector", "l", "", "Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2). Matching objects must satisfy all of the specified label constraints.")
createCmd.Flags().Bool("show-managed-fields", false, "If true, keep the managedFields when printing objects in JSON or YAML format.")
createCmd.Flags().String("template", "", "Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].")
createCmd.Flags().String("validate", "", "Validation mode.")
createCmd.Flags().String("validate", "", "Must be one of: strict (or true), warn, ignore (or false).")
createCmd.Flags().Bool("windows-line-endings", false, "Only relevant if --edit=true. Defaults to the line ending native to your platform.")
createCmd.Flag("dry-run").NoOptDefVal = " "
createCmd.Flag("record").Hidden = true
Expand Down
2 changes: 1 addition & 1 deletion completers/kubectl_completer/cmd/create_clusterrole.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func init() {
create_clusterroleCmd.Flags().Bool("save-config", false, "If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.")
create_clusterroleCmd.Flags().Bool("show-managed-fields", false, "If true, keep the managedFields when printing objects in JSON or YAML format.")
create_clusterroleCmd.Flags().String("template", "", "Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].")
create_clusterroleCmd.Flags().String("validate", "", "Validation mode.")
create_clusterroleCmd.Flags().String("validate", "", "Must be one of: strict (or true), warn, ignore (or false).")
create_clusterroleCmd.Flags().StringSlice("verb", []string{}, "Verb that applies to the resources contained in the rule")
create_clusterroleCmd.Flag("dry-run").NoOptDefVal = " "
create_clusterroleCmd.Flag("validate").NoOptDefVal = " "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func init() {
create_clusterrolebindingCmd.Flags().Bool("show-managed-fields", false, "If true, keep the managedFields when printing objects in JSON or YAML format.")
create_clusterrolebindingCmd.Flags().String("template", "", "Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].")
create_clusterrolebindingCmd.Flags().StringSlice("user", []string{}, "Usernames to bind to the clusterrole. The flag can be repeated to add multiple users.")
create_clusterrolebindingCmd.Flags().String("validate", "", "Validation mode.")
create_clusterrolebindingCmd.Flags().String("validate", "", "Must be one of: strict (or true), warn, ignore (or false).")
create_clusterrolebindingCmd.MarkFlagRequired("clusterrole")
create_clusterrolebindingCmd.Flag("dry-run").NoOptDefVal = " "
create_clusterrolebindingCmd.Flag("validate").NoOptDefVal = " "
Expand Down
2 changes: 1 addition & 1 deletion completers/kubectl_completer/cmd/create_configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func init() {
create_configmapCmd.Flags().Bool("save-config", false, "If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.")
create_configmapCmd.Flags().Bool("show-managed-fields", false, "If true, keep the managedFields when printing objects in JSON or YAML format.")
create_configmapCmd.Flags().String("template", "", "Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].")
create_configmapCmd.Flags().String("validate", "", "Validation mode.")
create_configmapCmd.Flags().String("validate", "", "Must be one of: strict (or true), warn, ignore (or false).")
create_configmapCmd.Flag("dry-run").NoOptDefVal = " "
create_configmapCmd.Flag("validate").NoOptDefVal = " "
createCmd.AddCommand(create_configmapCmd)
Expand Down
2 changes: 1 addition & 1 deletion completers/kubectl_completer/cmd/create_cronjob.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func init() {
create_cronjobCmd.Flags().String("schedule", "", "A schedule in the Cron format the job should be run with.")
create_cronjobCmd.Flags().Bool("show-managed-fields", false, "If true, keep the managedFields when printing objects in JSON or YAML format.")
create_cronjobCmd.Flags().String("template", "", "Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].")
create_cronjobCmd.Flags().String("validate", "", "Validation mode.")
create_cronjobCmd.Flags().String("validate", "", "Must be one of: strict (or true), warn, ignore (or false).")
create_cronjobCmd.Flag("dry-run").NoOptDefVal = " "
create_cronjobCmd.MarkFlagRequired("image")
create_cronjobCmd.MarkFlagRequired("schedule")
Expand Down
6 changes: 3 additions & 3 deletions completers/kubectl_completer/cmd/create_deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ func init() {
create_deploymentCmd.Flags().Bool("allow-missing-template-keys", false, "If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.")
create_deploymentCmd.Flags().String("dry-run", "", "Must be \"none\", \"server\", or \"client\". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.")
create_deploymentCmd.Flags().String("field-manager", "", "Name of the manager used to track field ownership.")
create_deploymentCmd.Flags().StringSlice("image", []string{}, "Image names to run.")
create_deploymentCmd.Flags().StringSlice("image", []string{}, "Image names to run. A deployment can have multiple images set for multi-container pod.")
create_deploymentCmd.Flags().StringP("output", "o", "", "Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).")
create_deploymentCmd.Flags().String("port", "", "The port that this container exposes.")
create_deploymentCmd.Flags().String("port", "", "The containerPort that this deployment exposes.")
create_deploymentCmd.Flags().StringP("replicas", "r", "", "Number of replicas to create. Default is 1.")
create_deploymentCmd.Flags().Bool("save-config", false, "If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.")
create_deploymentCmd.Flags().Bool("show-managed-fields", false, "If true, keep the managedFields when printing objects in JSON or YAML format.")
create_deploymentCmd.Flags().String("template", "", "Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].")
create_deploymentCmd.Flags().String("validate", "", "Validation mode.")
create_deploymentCmd.Flags().String("validate", "", "Must be one of: strict (or true), warn, ignore (or false).")
create_deploymentCmd.Flag("dry-run").NoOptDefVal = " "
create_deploymentCmd.MarkFlagRequired("image")
create_deploymentCmd.Flag("validate").NoOptDefVal = " "
Expand Down
2 changes: 1 addition & 1 deletion completers/kubectl_completer/cmd/create_ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func init() {
create_ingressCmd.Flags().Bool("save-config", false, "If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.")
create_ingressCmd.Flags().Bool("show-managed-fields", false, "If true, keep the managedFields when printing objects in JSON or YAML format.")
create_ingressCmd.Flags().String("template", "", "Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].")
create_ingressCmd.Flags().String("validate", "", "Validation mode.")
create_ingressCmd.Flags().String("validate", "", "Must be one of: strict (or true), warn, ignore (or false).")
create_ingressCmd.Flag("dry-run").NoOptDefVal = " "
create_ingressCmd.Flag("validate").NoOptDefVal = " "
createCmd.AddCommand(create_ingressCmd)
Expand Down
2 changes: 1 addition & 1 deletion completers/kubectl_completer/cmd/create_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func init() {
create_jobCmd.Flags().Bool("save-config", false, "If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.")
create_jobCmd.Flags().Bool("show-managed-fields", false, "If true, keep the managedFields when printing objects in JSON or YAML format.")
create_jobCmd.Flags().String("template", "", "Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].")
create_jobCmd.Flags().String("validate", "", "Validation mode.")
create_jobCmd.Flags().String("validate", "", "Must be one of: strict (or true), warn, ignore (or false).")
create_jobCmd.Flag("dry-run").NoOptDefVal = " "
create_jobCmd.Flag("validate").NoOptDefVal = " "
createCmd.AddCommand(create_jobCmd)
Expand Down
2 changes: 1 addition & 1 deletion completers/kubectl_completer/cmd/create_namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func init() {
create_namespaceCmd.Flags().Bool("save-config", false, "If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.")
create_namespaceCmd.Flags().Bool("show-managed-fields", false, "If true, keep the managedFields when printing objects in JSON or YAML format.")
create_namespaceCmd.Flags().String("template", "", "Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].")
create_namespaceCmd.Flags().String("validate", "", "Validation mode.")
create_namespaceCmd.Flags().String("validate", "", "Must be one of: strict (or true), warn, ignore (or false).")
create_namespaceCmd.Flag("dry-run").NoOptDefVal = " "
create_namespaceCmd.Flag("validate").NoOptDefVal = " "
createCmd.AddCommand(create_namespaceCmd)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func init() {
create_poddisruptionbudgetCmd.Flags().String("selector", "", "A label selector to use for this budget. Only equality-based selector requirements are supported.")
create_poddisruptionbudgetCmd.Flags().Bool("show-managed-fields", false, "If true, keep the managedFields when printing objects in JSON or YAML format.")
create_poddisruptionbudgetCmd.Flags().String("template", "", "Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].")
create_poddisruptionbudgetCmd.Flags().String("validate", "", "Validation mode.")
create_poddisruptionbudgetCmd.Flags().String("validate", "", "Must be one of: strict (or true), warn, ignore (or false).")
create_poddisruptionbudgetCmd.Flag("dry-run").NoOptDefVal = " "
create_poddisruptionbudgetCmd.Flag("validate").NoOptDefVal = " "
createCmd.AddCommand(create_poddisruptionbudgetCmd)
Expand Down
2 changes: 1 addition & 1 deletion completers/kubectl_completer/cmd/create_priorityclass.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func init() {
create_priorityclassCmd.Flags().Bool("save-config", false, "If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.")
create_priorityclassCmd.Flags().Bool("show-managed-fields", false, "If true, keep the managedFields when printing objects in JSON or YAML format.")
create_priorityclassCmd.Flags().String("template", "", "Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].")
create_priorityclassCmd.Flags().String("validate", "", "Validation mode.")
create_priorityclassCmd.Flags().String("validate", "", "Must be one of: strict (or true), warn, ignore (or false).")
create_priorityclassCmd.Flags().String("value", "", "the value of this priority class.")
create_priorityclassCmd.Flag("dry-run").NoOptDefVal = " "
create_priorityclassCmd.Flag("validate").NoOptDefVal = " "
Expand Down
2 changes: 1 addition & 1 deletion completers/kubectl_completer/cmd/create_quota.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func init() {
create_quotaCmd.Flags().String("scopes", "", "A comma-delimited set of quota scopes that must all match each object tracked by the quota.")
create_quotaCmd.Flags().Bool("show-managed-fields", false, "If true, keep the managedFields when printing objects in JSON or YAML format.")
create_quotaCmd.Flags().String("template", "", "Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].")
create_quotaCmd.Flags().String("validate", "", "Validation mode.")
create_quotaCmd.Flags().String("validate", "", "Must be one of: strict (or true), warn, ignore (or false).")
create_quotaCmd.Flag("dry-run").NoOptDefVal = " "
create_quotaCmd.Flag("validate").NoOptDefVal = " "
createCmd.AddCommand(create_quotaCmd)
Expand Down
Loading

0 comments on commit 41a0297

Please sign in to comment.