Documentation ¶
Index ¶
- Constants
- Variables
- func ContentHash(s string, n int) string
- func EnsureDeleteFinalizer(ing *v1.Ingress, ingClient client.IngressInterface, finalizerKey string) error
- func EnsureDeleteServiceFinalizer(service *corev1.Service, key string, kubeClient kubernetes.Interface) error
- func EnsureFinalizer(ing *v1.Ingress, ingClient client.IngressInterface, finalizerKey string) (*v1.Ingress, error)
- func EnsureServiceFinalizer(service *corev1.Service, key string, kubeClient kubernetes.Interface) error
- func HasFinalizer(m meta_v1.ObjectMeta) bool
- func HasGivenFinalizer(m meta_v1.ObjectMeta, key string) bool
- func IngressKeyFunc(ing *v1.Ingress) string
- func IsDeletionCandidate(m meta_v1.ObjectMeta) bool
- func IsDeletionCandidateForGivenFinalizer(m meta_v1.ObjectMeta, key string) bool
- func NamespacedName(ing *v1.Ingress) string
- func PatchIngressObjectMetadata(ic client.IngressInterface, ing *v1.Ingress, ...) (*v1.Ingress, error)
- func PatchIngressStatus(ic client.IngressInterface, ing *v1.Ingress, newStatus v1.IngressStatus) (*v1.Ingress, error)
- func ToIngressKeys(ings []*v1.Ingress) []string
Constants ¶
const ( // FinalizerKey is the string representing the Ingress finalizer. FinalizerKey = "networking.gke.io/ingress-finalizer" // FinalizerKeyV2 is the string representing the Ingress finalizer version. // Ingress with V2 finalizer uses V2 frontend naming scheme. FinalizerKeyV2 = "networking.gke.io/ingress-finalizer-V2" // TODO remove the 2 definitions once they are added in legacy-cloud-providers/gce // LegacyILBFinalizer key is used to identify ILB services whose resources are managed by service controller. LegacyILBFinalizer = "gke.networking.io/l4-ilb-v1" // ILBFinalizerV2 is the finalizer used by newer controllers that implement Internal LoadBalancer services. ILBFinalizerV2 = "gke.networking.io/l4-ilb-v2" // NegFinalizerKey is the finalizer used by neg controller to ensure NEG CRs are deleted after corresponding negs are deleted NegFinalizerKey = "networking.gke.io/neg-finalizer" // NetLBFinalizerV2 is the finalizer used by newer controllers that manage L4 External LoadBalancer services. NetLBFinalizerV2 = "gke.networking.io/l4-netlb-v2" )
Variables ¶
var (
KeyFunc = cache.DeletionHandlingMetaNamespaceKeyFunc
)
Functions ¶
func ContentHash ¶
ContentHash creates a content hash string of length n of s utilizing sha256. WARNING: PLEASE DO NOT CHANGE THE HASH FUNCTION.
func EnsureDeleteFinalizer ¶
func EnsureDeleteFinalizer(ing *v1.Ingress, ingClient client.IngressInterface, finalizerKey string) error
EnsureDeleteFinalizer ensures that the specified finalizer is deleted from given Ingress.
func EnsureDeleteServiceFinalizer ¶ added in v1.9.0
func EnsureDeleteServiceFinalizer(service *corev1.Service, key string, kubeClient kubernetes.Interface) error
removeFinalizer patches the service to remove finalizer.
func EnsureFinalizer ¶
func EnsureFinalizer(ing *v1.Ingress, ingClient client.IngressInterface, finalizerKey string) (*v1.Ingress, error)
EnsureFinalizer ensures that the specified finalizer exists on given Ingress.
func EnsureServiceFinalizer ¶ added in v1.9.0
func EnsureServiceFinalizer(service *corev1.Service, key string, kubeClient kubernetes.Interface) error
EnsureServiceFinalizer patches the service to add finalizer.
func HasFinalizer ¶
func HasFinalizer(m meta_v1.ObjectMeta) bool
HasFinalizer is true if the passed in meta has an ingress finalizer.
func HasGivenFinalizer ¶
func HasGivenFinalizer(m meta_v1.ObjectMeta, key string) bool
HasGivenFinalizer is true if the passed in meta has the specified finalizer.
func IngressKeyFunc ¶
IngressKeyFunc returns ingress key for given ingress as generated by Ingress Store. This falls back to utility function in case of an error. Note: Ingress Store and NamespacedName both return same key in general. But, Ingress Store returns <name> where as NamespacedName returns /<name> when <namespace> is empty.
func IsDeletionCandidate ¶
func IsDeletionCandidate(m meta_v1.ObjectMeta) bool
IsDeletionCandidate is true if the passed in meta contains an ingress finalizer.
func IsDeletionCandidateForGivenFinalizer ¶
func IsDeletionCandidateForGivenFinalizer(m meta_v1.ObjectMeta, key string) bool
IsDeletionCandidateForGivenFinalizer is true if the passed in meta contains the specified finalizer.
func NamespacedName ¶
NamespacedName returns namespaced name string of a given ingress. Note: This is used for logging.
func PatchIngressObjectMetadata ¶ added in v1.10.0
func PatchIngressObjectMetadata(ic client.IngressInterface, ing *v1.Ingress, newObjectMetadata metav1.ObjectMeta) (*v1.Ingress, error)
PatchIngressObjectMetadata patches the given ingress's metadata based on new ingress metadata.
func PatchIngressStatus ¶ added in v1.10.0
func PatchIngressStatus(ic client.IngressInterface, ing *v1.Ingress, newStatus v1.IngressStatus) (*v1.Ingress, error)
PatchIngressStatus patches the given ingress's Status based on new ingress status.
func ToIngressKeys ¶
ToIngressKeys returns a list of ingress keys for given list of ingresses.
Types ¶
This section is empty.