v1alpha1

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

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

Constants

This section is empty.

Variables

View Source
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
)

Functions

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicCredentialProviderConfig.

func (*DynamicCredentialProviderConfig) DeepCopyInto

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

ValidateCreate implements webhook.Validator so a webhook can be registered for the type.

func (*DynamicCredentialProviderConfig) ValidateDelete

ValidateDelete implements webhook.Validator so a webhook can be registered for the type.

func (*DynamicCredentialProviderConfig) ValidateUpdate

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"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL