Documentation
¶
Index ¶
- Constants
- func GetConfigMapData(ctx context.Context, c client.Client, configMapName, keyName string) (map[string]interface{}, error)
- func GetDNSClass(ctx context.Context, c client.Client, podNamespace string) (configv1alpha1.DNSClass, error)
- func UpdateAnnotation(obj client.Object, key, value string)
- type DnsClassPredicate
- type Workload
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 ¶
UpdateAnnotation updates or adds an annotation to a Kubernetes object
Types ¶
type DnsClassPredicate ¶
DnsClassPredicate is a predicate for DNSClass objects
func (*DnsClassPredicate) Create ¶
func (*DnsClassPredicate) Create(e event.CreateEvent) bool
Create checks if a DNSClass object is marked as reconciled
func (*DnsClassPredicate) Delete ¶
func (*DnsClassPredicate) Delete(e event.DeleteEvent) bool
Delete always returns false for DNSClass deletion events
func (*DnsClassPredicate) Generic ¶
func (*DnsClassPredicate) Generic(e event.GenericEvent) bool
Generic always returns false for generic events
func (*DnsClassPredicate) Update ¶
func (*DnsClassPredicate) Update(e event.UpdateEvent) bool
Update checks if a DNSClass object is updated
Click to show internal directories.
Click to hide internal directories.