common

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// typeAvailable represents the status of the object reconciliation
	TypeAvailable = "Available"
	// typeDegraded represents the status used when DNSClass is deleted and the finalizer operations are must to occur.
	TypeDegraded = "Degraded"

	ReconcilePeriod = 1 * time.Second

	// Annotations to be used in resources
	DNSClassName = "kubedns-shepherd.io/dns-class-name"
	IsReconciled = "kubedns-shepherd.io/is-reconciled"
)

Definitions

Variables

This section is empty.

Functions

func GetConfigMapData added in v0.1.3

func GetConfigMapData(ctx context.Context, c client.Client, configMapName, keyName string) (map[string]interface{}, error)

GetConfigMapData gets specified data in given ConfigMap from kube-system namespace

func GetDNSClass

func GetDNSClass(ctx context.Context, c client.Client, podNamespace string) (configv1alpha1.DNSClass, error)

GetDNSClass finds the DNSClass for the pod object with its namespace

func UpdateAnnotation

func UpdateAnnotation(obj client.Object, key, value string)

UpdateAnnotation updates or adds an annotation to a Kubernetes object

Types

type DnsClassPredicate

type DnsClassPredicate struct {
	predicate.Funcs
}

DnsClassPredicate is a predicate for DNSClass objects

func (*DnsClassPredicate) Create

Create checks if a DNSClass object is marked as reconciled

func (*DnsClassPredicate) Delete

Delete always returns false for DNSClass deletion events

func (*DnsClassPredicate) Generic

Generic always returns false for generic events

func (*DnsClassPredicate) Update

Update checks if a DNSClass object is updated

type Workload

type Workload struct {
	Name      string
	Namespace string
	Kind      string
}

Workload used to define objects

Jump to

Keyboard shortcuts

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