reference

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Overview

Package reference provides a way to reference Kubernetes resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalSecretReference

type LocalSecretReference struct {
	// Name is the name of the secret.
	Name string `json:"name"`
}

LocalSecretReference is a reference to a secret in the same namespace. +kubebuilder:object:generate=true

func (*LocalSecretReference) Resolve

func (ref *LocalSecretReference) Resolve(ctx context.Context, reader client.Reader, scheme *runtime.Scheme, parent runtime.Object) (runtime.Object, error)

Resolve resolves the reference to its underlying secret.

type ObjectReference

type ObjectReference struct {
	// Name is the name of the resource.
	Name string `json:"name,omitempty"`
	// Namespace is the namespace of the resource.
	Namespace string `json:"namespace,omitempty"`
	// APIVersion is the API version of the resource.
	APIVersion string `json:"apiVersion,omitempty"`
	// Kind is the kind of the resource.
	Kind string `json:"kind,omitempty"`
}

ObjectReference is a reference to an arbitrary Kubernetes resource. +kubebuilder:object:generate=true

func (*ObjectReference) Resolve

func (ref *ObjectReference) Resolve(ctx context.Context, reader client.Reader, scheme *runtime.Scheme, parent runtime.Object) (runtime.Object, error)

Resolve resolves the reference to its underlying resource.

type ObjectWithReferences

type ObjectWithReferences interface {
	// ResolveReferences resolves all references in the object.
	ResolveReferences(ctx context.Context, reader client.Reader, scheme *runtime.Scheme) error
}

type Reference

type Reference interface {
	// Resolve resolves the reference to its underlying resource.
	Resolve(ctx context.Context, reader client.Reader, scheme *runtime.Scheme, parent runtime.Object) (runtime.Object, error)
}

Jump to

Keyboard shortcuts

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