mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
Add periodic ingress reconciliations.
This commit is contained in:
parent
31d8f1128c
commit
99aac62a5a
@ -711,10 +711,13 @@ func (ic *IngressController) reconcileIngress(ingress types.NamespacedName) {
|
||||
objMeta, err := conversion.NewCloner().DeepCopy(clusterIngress.ObjectMeta)
|
||||
if err != nil {
|
||||
glog.Errorf("Error deep copying ObjectMeta: %v", err)
|
||||
ic.deliverIngress(ingress, ic.ingressReviewDelay, true)
|
||||
|
||||
}
|
||||
desiredIngress.ObjectMeta, ok = objMeta.(v1.ObjectMeta)
|
||||
if !ok {
|
||||
glog.Errorf("Internal error: Failed to cast to v1.ObjectMeta: %v", objMeta)
|
||||
ic.deliverIngress(ingress, ic.ingressReviewDelay, true)
|
||||
}
|
||||
// Merge any annotations and labels on the federated ingress onto the underlying cluster ingress,
|
||||
// overwriting duplicates.
|
||||
@ -747,6 +750,7 @@ func (ic *IngressController) reconcileIngress(ingress types.NamespacedName) {
|
||||
if len(operations) == 0 {
|
||||
// Everything is in order
|
||||
glog.V(4).Infof("Ingress %q is up-to-date in all clusters - no propagation to clusters required.", ingress)
|
||||
ic.deliverIngress(ingress, ic.ingressReviewDelay, false)
|
||||
return
|
||||
}
|
||||
glog.V(4).Infof("Calling federatedUpdater.Update() - operations: %v", operations)
|
||||
@ -759,4 +763,6 @@ func (ic *IngressController) reconcileIngress(ingress types.NamespacedName) {
|
||||
ic.deliverIngress(ingress, ic.ingressReviewDelay, true)
|
||||
return
|
||||
}
|
||||
// Schedule another periodic reconciliation, only to account for possible bugs in watch processing.
|
||||
ic.deliverIngress(ingress, ic.ingressReviewDelay, false)
|
||||
}
|
||||
|
@ -99,7 +99,6 @@ func TestIngressController(t *testing.T) {
|
||||
Name: "test-ingress",
|
||||
Namespace: "mynamespace",
|
||||
SelfLink: "/api/v1/namespaces/mynamespace/ingress/test-ingress",
|
||||
// TODO: Remove: Annotations: map[string]string{},
|
||||
},
|
||||
Status: extensions_v1beta1.IngressStatus{
|
||||
LoadBalancer: api_v1.LoadBalancerStatus{
|
||||
|
Loading…
Reference in New Issue
Block a user