credentials

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 3 Imported by: 11

Documentation

Index

Constants

View Source
const (
	NutanixTrustBundleKindString    = NutanixTrustBundleKind("String")
	NutanixTrustBundleKindConfigMap = NutanixTrustBundleKind("ConfigMap")
)
View Source
const (
	// Secret kind is enum value
	SecretKind = NutanixCredentialKind("Secret")
)

Variables

This section is empty.

Functions

func ParseCredentials

func ParseCredentials(credsData []byte) (*types.ApiCredentials, error)

Types

type BasicAuth

type BasicAuth struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

+kubebuilder:object:generate=true

func (*BasicAuth) DeepCopy

func (in *BasicAuth) DeepCopy() *BasicAuth

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

func (*BasicAuth) DeepCopyInto

func (in *BasicAuth) DeepCopyInto(out *BasicAuth)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BasicAuthCredential

type BasicAuthCredential struct {
	// The Basic Auth (username, password) for the Prism Central
	PrismCentral PrismCentralBasicAuth `json:"prismCentral"`
	// The Basic Auth (username, password) for the Prism Elements (clusters).
	PrismElements []PrismElementBasicAuth `json:"prismElements"`
}

BasicAuthCredential is payload in Credential.Data for type of BasicAuthCredentialType

type Credential

type Credential struct {
	Type CredentialType  `json:"type"`
	Data json.RawMessage `json:"data"`
}

+kubebuilder:object:generate=true

func (*Credential) DeepCopy

func (in *Credential) DeepCopy() *Credential

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

func (*Credential) DeepCopyInto

func (in *Credential) DeepCopyInto(out *Credential)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CredentialType

type CredentialType string

CredentialType describes authentication mechanism like basic auth.

const (
	// BasicAuthCredentialType is username/password based authentication.
	BasicAuthCredentialType CredentialType = "basic_auth"

	// KeyName is secret
	KeyName = "credentials"
)

type NutanixCredentialKind

type NutanixCredentialKind string

type NutanixCredentialReference

type NutanixCredentialReference struct {
	// Kind of the Nutanix credential
	// +kubebuilder:validation:Enum=Secret
	Kind NutanixCredentialKind `json:"kind"`
	// Name of the credential.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`
	// namespace of the credential.
	// +optional
	Namespace string `json:"namespace"`
}

+kubebuilder:object:generate=true

func (*NutanixCredentialReference) DeepCopy

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

func (*NutanixCredentialReference) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NutanixCredentials

type NutanixCredentials struct {
	Credentials []Credential `json:"credentials"`
}

NutanixCredentials is list of credentials to be embedded in other objects like Kubernetes secrets. +kubebuilder:object:generate=true

func (*NutanixCredentials) DeepCopy

func (in *NutanixCredentials) DeepCopy() *NutanixCredentials

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

func (*NutanixCredentials) DeepCopyInto

func (in *NutanixCredentials) DeepCopyInto(out *NutanixCredentials)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NutanixPrismEndpoint

type NutanixPrismEndpoint struct {
	// address is the endpoint address (DNS name or IP address) of the Nutanix Prism Central or Element (cluster)
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MaxLength=256
	Address string `json:"address"`
	// port is the port number to access the Nutanix Prism Central or Element (cluster)
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=65535
	// +kubebuilder:default=9440
	Port int32 `json:"port"`
	// use insecure connection to Prism endpoint
	// +kubebuilder:default=false
	// +optional
	Insecure bool `json:"insecure"`
	// AdditionalTrustBundle is a PEM encoded x509 cert for the RootCA that was used to create the certificate
	// for a Prism Central that uses certificates that were issued by a non-publicly trusted RootCA. The trust
	// bundle is added to the cert pool used to authenticate the TLS connection to the Prism Central.
	// +optional
	AdditionalTrustBundle *NutanixTrustBundleReference `json:"additionalTrustBundle,omitempty"`
	// Pass credential information for the target Prism instance
	// +optional
	CredentialRef *NutanixCredentialReference `json:"credentialRef,omitempty"`
}

NutanixPrismEndpoint defines a Nutanix API endpoint with reference to credentials. Credentials are stored in Kubernetes secrets. +kubebuilder:object:generate=true

func (*NutanixPrismEndpoint) DeepCopy

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

func (*NutanixPrismEndpoint) DeepCopyInto

func (in *NutanixPrismEndpoint) DeepCopyInto(out *NutanixPrismEndpoint)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NutanixTrustBundleKind added in v0.3.1

type NutanixTrustBundleKind string

type NutanixTrustBundleReference added in v0.3.1

type NutanixTrustBundleReference struct {
	// Kind of the Nutanix trust bundle
	// +kubebuilder:validation:Enum=String;ConfigMap
	Kind NutanixTrustBundleKind `json:"kind"`
	// Data of the trust bundle if Kind is String.
	// +optional
	Data string `json:"data"`
	// Name of the credential.
	// +optional
	Name string `json:"name"`
	// namespace of the credential.
	// +optional
	Namespace string `json:"namespace"`
}

NutanixTrustBundleReference is a reference to a Nutanix trust bundle. +kubebuilder:object:generate=true

func (*NutanixTrustBundleReference) DeepCopy added in v0.3.1

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

func (*NutanixTrustBundleReference) DeepCopyInto added in v0.3.1

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PrismCentralBasicAuth

type PrismCentralBasicAuth struct {
	BasicAuth `json:",inline"`
}

+kubebuilder:object:generate=true

func (*PrismCentralBasicAuth) DeepCopy

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

func (*PrismCentralBasicAuth) DeepCopyInto

func (in *PrismCentralBasicAuth) DeepCopyInto(out *PrismCentralBasicAuth)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PrismElementBasicAuth

type PrismElementBasicAuth struct {
	BasicAuth `json:",inline"`
	// Name is the unique resource name of the Prism Element (cluster) in the Prism Central's domain
	Name string `json:"name"`
}

+kubebuilder:object:generate=true

func (*PrismElementBasicAuth) DeepCopy

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

func (*PrismElementBasicAuth) DeepCopyInto

func (in *PrismElementBasicAuth) DeepCopyInto(out *PrismElementBasicAuth)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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