Documentation ¶
Index ¶
- Constants
- Variables
- func ContentHash(s string, n int) string
- func EnsureDeleteFinalizer(ing *v1beta1.Ingress, ingClient client.IngressInterface, finalizerKey string) error
- func EnsureDeleteServiceFinalizer(service *v1.Service, key string, kubeClient kubernetes.Interface) error
- func EnsureFinalizer(ing *v1beta1.Ingress, ingClient client.IngressInterface, finalizerKey string) (*v1beta1.Ingress, error)
- func EnsureServiceFinalizer(service *v1.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 *v1beta1.Ingress) string
- func IsDeletionCandidate(m meta_v1.ObjectMeta) bool
- func IsDeletionCandidateForGivenFinalizer(m meta_v1.ObjectMeta, key string) bool
- func NamespacedName(ing *v1beta1.Ingress) string
- func ToIngressKeys(ings []*v1beta1.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" )
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 *v1beta1.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 *v1.Service, key string, kubeClient kubernetes.Interface) error
removeFinalizer patches the service to remove finalizer.
func EnsureFinalizer ¶
func EnsureFinalizer(ing *v1beta1.Ingress, ingClient client.IngressInterface, finalizerKey string) (*v1beta1.Ingress, error)
EnsureFinalizer ensures that the specified finalizer exists on given Ingress.
func EnsureServiceFinalizer ¶ added in v1.9.0
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 ToIngressKeys ¶
ToIngressKeys returns a list of ingress keys for given list of ingresses.
Types ¶
This section is empty.