Help us shape the future of Go! Take the 2026 Go Developer Survey

dnsrecord

package
v1.151.4 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// DefaultInterval is the default interval for retry operations.
	DefaultInterval = 5 * time.Second
	// DefaultSevereThreshold is the default threshold until an error reported by another component is treated as
	// 'severe'.
	DefaultSevereThreshold = 15 * time.Second
	// DefaultTimeout is the default timeout and defines how long Gardener should wait for a successful reconciliation
	// of a DNSRecord resource.
	DefaultTimeout = 2 * time.Minute
)

Variables

View Source
var TimeNow = time.Now

TimeNow returns the current time. Exposed for testing.

View Source
var WaitUntilExtensionObjectReady = extensions.WaitUntilExtensionObjectReady

WaitUntilExtensionObjectReady is an alias for extensions.WaitUntilExtensionObjectReady. Exposed for tests.

Functions

This section is empty.

Types

type CredentialsDeployFunc

type CredentialsDeployFunc func(context.Context, client.Client, *corev1.Secret) error

CredentialsDeployFunc is a function type that deploys credentials into a given secret.

func CredentialsDeployerFromCredentials

func CredentialsDeployerFromCredentials(credentials client.Object, referringObj client.Object) CredentialsDeployFunc

CredentialsDeployerFromCredentials returns a CredentialsDeployFunc based on the type of the provided credentials.

func DeploySecretCredentials

func DeploySecretCredentials(secretData map[string][]byte) CredentialsDeployFunc

DeploySecretCredentials returns a CredentialsDeployFunc that deploys the given secret data into a Secret.

func DeployWorkloadIdentityCredentials

func DeployWorkloadIdentityCredentials(workloadIdentity *securityv1alpha1.WorkloadIdentity, referringObj client.Object) CredentialsDeployFunc

DeployWorkloadIdentityCredentials returns a CredentialsDeployFunc that deploys the given Workload Identity credentials into a Secret.

type Interface

type Interface interface {
	component.DeployMigrateWaiter
	GetValues() *Values
	SetRecordType(extensionsv1alpha1.DNSRecordType)
	SetValues([]string)
}

Interface is an interface for managing DNSRecords

func New

func New(
	log logr.Logger,
	client client.Client,
	values *Values,
	waitInterval time.Duration,
	waitSevereThreshold time.Duration,
	waitTimeout time.Duration,
	deployCredentials CredentialsDeployFunc,
) Interface

New creates a new instance that implements component.DeployMigrateWaiter.

type Values

type Values struct {
	// Namespace is the Shoot namespace in the seed.
	Namespace string
	// Name is the name of the DNSRecord resource. Commonly the Shoot's name + the purpose of the DNS record.
	Name string
	// SecretName is the name of the secret referenced by the DNSRecord resource.
	SecretName string
	// ReconcileOnlyOnChangeOrError specifies that the DNSRecord resource should only be reconciled when first created
	// or if its last operation was not successful or if its desired state has changed compared to the current one.
	ReconcileOnlyOnChangeOrError bool
	// AnnotateOperation indicates if the DNSRecord resource shall be annotated with the respective
	// "gardener.cloud/operation" (forcing a reconciliation or restoration). If this is false then the DNSRecord object
	// will be created/updated but the extension controller will not act upon it.
	AnnotateOperation bool
	// Type is the type of the DNSRecord provider.
	Type string
	// Class holds the extension class used to control the responsibility for multiple provider extensions.
	Class *extensionsv1alpha1.ExtensionClass
	// UseExistingSecret indicates whether to use an existing secret referenced by SecretName instead of creating/updating
	// it with the given credentials.
	UseExistingSecret bool
	// Zone is the DNS hosted zone of the DNSRecord.
	Zone *string
	// DNSName is the fully qualified domain name of the DNSRecord.
	DNSName string
	// RecordType is the record type of the DNSRecord.
	RecordType extensionsv1alpha1.DNSRecordType
	// Values is the list of values of the DNSRecord.
	Values []string
	// TTL is the time to live in seconds of the DNSRecord.
	TTL *int64
	// IPStack is the indication of the IP stack used for the DNSRecord. It can be ipv4, ipv6 or dual-stack.
	IPStack string
	// Labels is a set of labels that should be applied to the DNSRecord resource.
	Labels map[string]string
}

Values contains the values used to create DNSRecord resources.

Directories

Path Synopsis
Package dnsrecord is a generated GoMock package.
Package dnsrecord is a generated GoMock package.

Jump to

Keyboard shortcuts

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