Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the config v1alpha1 API group +kubebuilder:object:generate=true +groupName=credentialprovider.d2iq.com +k8s:defaulter-gen=TypeMeta
Copyright 2022 D2iQ, Inc. All rights reserved. SPDX-License-Identifier: Apache-2.0
Index ¶
- Variables
- func RegisterDefaults(scheme *runtime.Scheme) error
- func SetDefaults_MirrorConfig(obj *MirrorConfig)
- func SetObjectDefaults_DynamicCredentialProviderConfig(in *DynamicCredentialProviderConfig)
- type DynamicCredentialProviderConfig
- func (in *DynamicCredentialProviderConfig) DeepCopy() *DynamicCredentialProviderConfig
- func (in *DynamicCredentialProviderConfig) DeepCopyInto(out *DynamicCredentialProviderConfig)
- func (in *DynamicCredentialProviderConfig) DeepCopyObject() runtime.Object
- func (c *DynamicCredentialProviderConfig) Default()
- func (c *DynamicCredentialProviderConfig) ValidateCreate() (admission.Warnings, error)
- func (*DynamicCredentialProviderConfig) ValidateDelete() (admission.Warnings, error)
- func (c *DynamicCredentialProviderConfig) ValidateUpdate(_ runtime.Object) (admission.Warnings, error)
- type MirrorConfig
- type MirrorCredentialsStrategy
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{ Group: "credentialprovider.d2iq.com", Version: "v1alpha1", } // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
var APIVersions = map[string]schema.GroupVersion{ credentialproviderv1alpha1.SchemeGroupVersion.String(): credentialproviderv1alpha1.SchemeGroupVersion, credentialproviderv1beta1.SchemeGroupVersion.String(): credentialproviderv1beta1.SchemeGroupVersion, credentialproviderv1.SchemeGroupVersion.String(): credentialproviderv1.SchemeGroupVersion, }
Functions ¶
func RegisterDefaults ¶
RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.
func SetDefaults_MirrorConfig ¶
func SetDefaults_MirrorConfig(obj *MirrorConfig)
func SetObjectDefaults_DynamicCredentialProviderConfig ¶
func SetObjectDefaults_DynamicCredentialProviderConfig(in *DynamicCredentialProviderConfig)
Types ¶
type DynamicCredentialProviderConfig ¶
type DynamicCredentialProviderConfig struct { //nolint:revive // inline is not an official json struct tag value, but is required by Kubernetes. metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` //nolint:tagliatelle // This is the upstream convention. // Mirror is the optional mirror configuration. // +optional Mirror *MirrorConfig `json:"mirror,omitempty"` // CredentialProviders holds the configuration for the kubelet credential providers. Embeds the // `CredentialProviderConfig` kind from kubelet config API - see // https://github.com/kubernetes/kubelet/blob/v0.26.3/config/v1/types.go#L28 for info. // +optional CredentialProviders *kubeletconfigv1.CredentialProviderConfig `json:"credentialProviders,omitempty"` // CredentialProviderPluginBinDir is the directory where credential provider plugin binaries are located. CredentialProviderPluginBinDir string `json:"credentialProviderPluginBinDir,omitempty"` }
DynamicCredentialProviderConfig holds the configuration. +kubebuilder:object:root=true
func (*DynamicCredentialProviderConfig) DeepCopy ¶
func (in *DynamicCredentialProviderConfig) DeepCopy() *DynamicCredentialProviderConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicCredentialProviderConfig.
func (*DynamicCredentialProviderConfig) DeepCopyInto ¶
func (in *DynamicCredentialProviderConfig) DeepCopyInto(out *DynamicCredentialProviderConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DynamicCredentialProviderConfig) DeepCopyObject ¶
func (in *DynamicCredentialProviderConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*DynamicCredentialProviderConfig) Default ¶
func (c *DynamicCredentialProviderConfig) Default()
func (*DynamicCredentialProviderConfig) ValidateCreate ¶
func (c *DynamicCredentialProviderConfig) ValidateCreate() (admission.Warnings, error)
ValidateCreate implements webhook.Validator so a webhook can be registered for the type.
func (*DynamicCredentialProviderConfig) ValidateDelete ¶
func (*DynamicCredentialProviderConfig) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook can be registered for the type.
func (*DynamicCredentialProviderConfig) ValidateUpdate ¶
func (c *DynamicCredentialProviderConfig) ValidateUpdate( _ runtime.Object, ) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook can be registered for the type.
type MirrorConfig ¶
type MirrorConfig struct { // Endpoint is the registry endpoint to use for the mirror. The endpoint must be a valid url // with host specified. The scheme, host and path from the endpoint URL will be used. Endpoint string `json:"endpoint"` // CredentialStrategy specifies what strategy to employ when returning registry credentials. // Defaults to `MirrorCredentialsOnly`. // +optional //nolint:tagliatelle // Prevents stuttering. MirrorCredentialsStrategy MirrorCredentialsStrategy `json:"credentialsStrategy"` }
MirrorConfig holds the configuration for the optional registry mirror.
func (*MirrorConfig) DeepCopy ¶
func (in *MirrorConfig) DeepCopy() *MirrorConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MirrorConfig.
func (*MirrorConfig) DeepCopyInto ¶
func (in *MirrorConfig) DeepCopyInto(out *MirrorConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MirrorCredentialsStrategy ¶
type MirrorCredentialsStrategy string
MirrorCredentialsStrategy specifies how to handle mirror registry credentials. +kubebuilder:validation:Enum=MirrorCredentialsOnly;MirrorCredentialsFirst;MirrorCredentialsLast
const ( // MirrorCredentialsFirst specifies that the mirror credentials should be first in the chain of // credentials to return. The credentials response should therefore contain the mirror credentials // with the most specific match, i.e. on the whole requested image name. MirrorCredentialsFirst MirrorCredentialsStrategy = "MirrorCredentialsFirst" // MirrorCredentialsLast specifies that the mirror credentials should be last in the chain of // credentials to return. The credentials response should therefore contain the mirror credentials // with the least specific match, i.e. on wildcards only. MirrorCredentialsLast MirrorCredentialsStrategy = "MirrorCredentialsLast" // MirrorCredentialsOnly specifies that only the mirror credentials should returned. The // credentials response should therefore only contain the mirror credentials for every requested // image. MirrorCredentialsOnly MirrorCredentialsStrategy = "MirrorCredentialsOnly" )