dns

package
v0.0.0-...-5f3e536 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	TimeWaitProvider = time.Minute
)

Variables

View Source
var (
	ErrorWaitRecords = errors.New("waiting for Records")
	ErrorUnknownKind = errors.New("unknown kind")
	ErrorNoTemplate  = errors.New("no template specified")
)
View Source
var NewPayload = provider.NewPayload

Functions

func NewTemplate

func NewTemplate(name string) *template.Template

Types

type EndpointsData

type EndpointsData struct {
	TemplateData
	*corev1.Endpoints
}

func (*EndpointsData) Nodes

func (e *EndpointsData) Nodes() ([]NodeData, error)

func (*EndpointsData) Pods

func (e *EndpointsData) Pods() ([]PodData, error)

type GeneratorReconciler

type GeneratorReconciler[T dnsv1.GeneratorObject] struct {
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

GeneratorReconciler reconciles a Generator object

func (*GeneratorReconciler[T]) Reconcile

func (r *GeneratorReconciler[T]) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the Generator object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.18.4/pkg/reconcile

func (*GeneratorReconciler[T]) SetupWithManager

func (r *GeneratorReconciler[T]) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type IngressData

type IngressData struct {
	TemplateData
	*netv1.Ingress
}

func (*IngressData) Service

func (i *IngressData) Service(ruleIndex, pathIndex int) (*ServiceData, error)

type IngressTemplateData

type IngressTemplateData struct {
	TemplateData `json:",inline"`
	// contains filtered or unexported fields
}

func NewIngressTemplateData

func NewIngressTemplateData(data TemplateData, ingress *netv1.Ingress) *IngressTemplateData

func (*IngressTemplateData) Ingress

func (d *IngressTemplateData) Ingress() *IngressData

type NodeData

type NodeData struct {
	TemplateData
	*corev1.Node
}

func NewNodeTemplateData

func NewNodeTemplateData(data TemplateData, node *corev1.Node) *NodeData

func (*NodeData) Ready

func (n *NodeData) Ready() bool

type PodData

type PodData struct {
	TemplateData
	*corev1.Pod
}

func (*PodData) Node

func (p *PodData) Node() (*NodeData, error)

type ProviderReconciler

type ProviderReconciler[T dnsv1.ProviderObject] struct {
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

ProviderReconciler reconciles a Provider object

func (*ProviderReconciler[T]) Reconcile

func (r *ProviderReconciler[T]) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the Provider object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.18.4/pkg/reconcile

func (*ProviderReconciler[T]) SetupWithManager

func (r *ProviderReconciler[T]) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type RecordReconciler

type RecordReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

RecordReconciler reconciles a Record object

func (*RecordReconciler) Reconcile

func (r *RecordReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the Record object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.18.4/pkg/reconcile

func (*RecordReconciler) SetupWithManager

func (r *RecordReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type RecordTemplateData

type RecordTemplateData struct {
	TemplateData `json:",inline"`
	// contains filtered or unexported fields
}

func NewRecordTemplateData

func NewRecordTemplateData(data TemplateData, record *dnsv1.Record) *RecordTemplateData

func (*RecordTemplateData) Record

func (d *RecordTemplateData) Record() *dnsv1.Record

type ResourceWatcherReconciler

type ResourceWatcherReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Template *template.Template
	Recorder record.EventRecorder
	// contains filtered or unexported fields
}

ResourceWatcherReconciler reconciles a ResourceWatcher object

func (*ResourceWatcherReconciler) Reconcile

func (r *ResourceWatcherReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, _err error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the ResourceWatcher object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.18.4/pkg/reconcile

func (*ResourceWatcherReconciler) SetupWithManager

func (r *ResourceWatcherReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type ServiceData

type ServiceData struct {
	TemplateData
	*corev1.Service
}

func NewServiceTemplateData

func NewServiceTemplateData(data TemplateData, service *corev1.Service) *ServiceData

func (*ServiceData) Endpoints

func (s *ServiceData) Endpoints() (*EndpointsData, error)

type TemplateData

type TemplateData struct {
	// contains filtered or unexported fields
}

func NewTemplateData

func NewTemplateData(ctx context.Context, watcher *dnsv1.ResourceWatcher, client client.Client) TemplateData

func (*TemplateData) GetNamespace

func (d *TemplateData) GetNamespace() (*corev1.Namespace, error)

Directories

Path Synopsis
job

Jump to

Keyboard shortcuts

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