package config
import "k8s.io/kubectl/pkg/config"
Index ¶
- Constants
- Variables
- type AliasOverride
- func (in *AliasOverride) DeepCopy() *AliasOverride
- func (in *AliasOverride) DeepCopyInto(out *AliasOverride)
- type CommandDefaults
- func (in *CommandDefaults) DeepCopy() *CommandDefaults
- func (in *CommandDefaults) DeepCopyInto(out *CommandDefaults)
- type CommandOptionDefault
- func (in *CommandOptionDefault) DeepCopy() *CommandOptionDefault
- func (in *CommandOptionDefault) DeepCopyInto(out *CommandOptionDefault)
- type Preference
Constants ¶
const GroupName = "kubectl.config.k8s.io"
GroupName is the group name used in this package
Variables ¶
var ( // SchemeBuilder is the scheme builder with scheme init functions to run for this API package SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme is a global function that registers this API group & version to a scheme AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
SchemeGroupVersion is group version used to register these objects
Types ¶
type AliasOverride ¶
type AliasOverride struct { // Name is the name of alias that can only include alphabetical characters // If the alias name conflicts with the built-in command, // built-in command will be used. Name string // Command is the single or set of commands to execute, such as "set env" or "create" Command string // PrependArgs stores the arguments such as resource names, etc. // These arguments are inserted after the alias name. PrependArgs []string // AppendArgs stores the arguments such as resource names, etc. // These arguments are appended to the USER_ARGS. AppendArgs []string // Options is allocated to store the option definitions of alias. // Options only modify the default value of the option and if // user explicitly passes a value, explicit one is used. Options []CommandOptionDefault }
AliasOverride stores the alias definitions.
func (*AliasOverride) DeepCopy ¶
func (in *AliasOverride) DeepCopy() *AliasOverride
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AliasOverride.
func (*AliasOverride) DeepCopyInto ¶
func (in *AliasOverride) DeepCopyInto(out *AliasOverride)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CommandDefaults ¶
type CommandDefaults struct { // Command refers to a command whose flag's default value is changed. Command string // Options is a list of options storing different default values. Options []CommandOptionDefault }
CommandDefaults stores the commands and their associated option's default values.
func (*CommandDefaults) DeepCopy ¶
func (in *CommandDefaults) DeepCopy() *CommandDefaults
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommandDefaults.
func (*CommandDefaults) DeepCopyInto ¶
func (in *CommandDefaults) DeepCopyInto(out *CommandDefaults)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CommandOptionDefault ¶
type CommandOptionDefault struct { // Option name (long form, without dashes). Name string // In a string format of a default value. It will be parsed // by kubectl to the compatible value of the option. Default string }
CommandOptionDefault stores the name and the specified default value of an option.
func (*CommandOptionDefault) DeepCopy ¶
func (in *CommandOptionDefault) DeepCopy() *CommandOptionDefault
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommandOptionDefault.
func (*CommandOptionDefault) DeepCopyInto ¶
func (in *CommandOptionDefault) DeepCopyInto(out *CommandOptionDefault)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Preference ¶
type Preference struct { metav1.TypeMeta // Defaults allow changing default option values of commands. // This is especially useful, when user doesn't want to explicitly // set options each time. // +optional Defaults []CommandDefaults // Aliases allow defining command aliases for existing kubectl commands, with optional default option values. // If the alias name collides with a built-in command, built-in command always takes precedence. // Option overrides defined in the defaults section do NOT apply to aliases for the same command. // kubectl [ALIAS NAME] [USER_OPTIONS] [USER_EXPLICIT_ARGS] expands to // kubectl [COMMAND] # built-in command alias points to // [KUBERC_PREPEND_ARGS] // [USER_OPTIONS] // [KUBERC_OPTIONS] # rest of the options that are not passed by user in [USER_OPTIONS] // [USER_EXPLICIT_ARGS] // [KUBERC_APPEND_ARGS] // e.g. // - name: runx // command: run // options: // - name: image // default: nginx // appendArgs: // - -- // - custom-arg1 // For example, if user invokes "kubectl runx test-pod" command, // this will be expanded to "kubectl run --image=nginx test-pod -- custom-arg1" // - name: getn // command: get // options: // - name: output // default: wide // prependArgs: // - node // "kubectl getn control-plane-1" expands to "kubectl get node control-plane-1 --output=wide" // "kubectl getn control-plane-1 --output=json" expands to "kubectl get node --output=json control-plane-1" // +optional Aliases []AliasOverride }
Preference stores elements of KubeRC configuration file
func (*Preference) DeepCopy ¶
func (in *Preference) DeepCopy() *Preference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Preference.
func (*Preference) DeepCopyInto ¶
func (in *Preference) DeepCopyInto(out *Preference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Preference) DeepCopyObject ¶
func (in *Preference) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
Source Files ¶
doc.go register.go types.go zz_generated.deepcopy.go
Directories ¶
Path | Synopsis |
---|---|
pkg/config/fuzzer | |
pkg/config/scheme | |
pkg/config/v1alpha1 | |
pkg/config/v1beta1 |
- Version
- v0.34.0-alpha.1
- Published
- Jun 16, 2025
- Platform
- js/wasm
- Imports
- 3 packages
- Last checked
- 3 hours ago –
Tools for package owners.