Skip to content

Commit

Permalink
APB: Fix wrong structured logs
Browse files Browse the repository at this point in the history
There are specific reasons for when we want
to use the structured logs a.k.a InfoS versus
when we want to use the formatted logs a.k.a Infof.

Most of these logs are using the Infof format while
using the InfoS function unfortunately. This causes
logs like:

I0629 20:41:28.798703  114685 master_controller.go:200] "Repairing Admin Policy Based External Route Services"
I0629 20:41:28.798985  114685 repair.go:30] "Syncing exgw routes took %v" 265.415µs="(MISSING)"
I0629 20:41:28.799084  114685 external_controller_pod.go:42] "Processing gateway pod %s/%s with matching policies %+v" openshift-dns="node-resolver-cmhvr" []="(MISSING)"
I0629 20:41:28.799116  114685 external_controller_pod.go:42] "Processing gateway pod %s/%s with matching policies %+v" openshift-etcd="installer-7-ip-10-0-156-153.us-east-2.compute.internal" []="(MISSING)"
I0629 20:41:28.799137  114685 external_controller_pod.go:42] "Processing gateway pod %s/%s with matching policies %+v" openshift-etcd="revision-pruner-7-ip-10-0-144-208.us-east-2.compute.internal" []="(MISSING)"
I0629 20:41:28.799152  114685 external_controller_pod.go:42] "Processing gateway pod %s/%s with matching policies %+v" openshift-kube-apiserver="installer-8-ip-10-0-224-168.us-east-2.compute.internal" []="(MISSING)"
I0629 20:41:28.799170  114685 external_controller_pod.go:42] "Processing gateway pod %s/%s with matching policies %+v" openshift-oauth-apiserver="apiserver-669859c5fb-7m7q6" []="(MISSING)"

Let's change it back to Infof in places where
the key=value format is not used.

Signed-off-by: Surya Seetharaman <[email protected]>
  • Loading branch information
tssurya authored and jcaamano committed Jul 5, 2023
1 parent 6870575 commit 5e446a6
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (nadController *NetAttachDefinitionController) start() error {
return fmt.Errorf("failed to sync all existing NAD entries: %v", err)
}

klog.Info("Starting workers for %s NAD controller", nadController.name)
klog.Infof("Starting workers for %s NAD controller", nadController.name)
for i := 0; i < numberOfWorkers; i++ {
nadController.wg.Add(1)
go func() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (m *externalPolicyManager) removePolicyFromNamespace(targetNamespace string
return err
}

klog.V(4).InfoS("Deleting APB policy %s in namespace cache %s", policy.Name, targetNamespace)
klog.V(4).Infof("Deleting APB policy %s in namespace cache %s", policy.Name, targetNamespace)
cacheInfo.Policies = cacheInfo.Policies.Delete(policy.Name)
if len(cacheInfo.Policies) == 0 {
m.namespaceInfoSyncCache.Delete(targetNamespace)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ func (m *externalPolicyManager) syncPod(pod *v1.Pod, podLister corev1listers.Pod
m.unlockNamespaceInfoCache(pod.Namespace)
}
}
klog.V(4).InfoS("Processing gateway pod %s/%s with matching policies %+v", pod.Namespace, pod.Name, policies.UnsortedList())
klog.V(4).Infof("Processing gateway pod %s/%s with matching policies %+v", pod.Namespace, pod.Name, policies.UnsortedList())
for policyName := range policies {
klog.V(5).InfoS("Queueing policy %s", policyName)
klog.V(5).Infof("Queueing policy %s", policyName)
routeQueue.Add(policyName)
}

Expand Down Expand Up @@ -101,13 +101,13 @@ func (m *externalPolicyManager) listPoliciesUsingPodGateway(key ktypes.Namespace
return nil, err
}
for _, p := range policies {
klog.V(5).InfoS("Checking for policy %s to have pod %s", p.Name, key)
klog.V(5).Infof("Checking for policy %s to have pod %s", p.Name, key)
pp, err := m.processExternalRoutePolicy(p)
if err != nil {
return nil, err
}
if _, found := pp.dynamicGateways[key]; found {
klog.V(5).InfoS("Policy %s has pod %s", p.Name, key)
klog.V(5).Infof("Policy %s has pod %s", p.Name, key)
ret = append(ret, p)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ import (
)

func (m *externalPolicyManager) syncRoutePolicy(policyName string, routeQueue workqueue.RateLimitingInterface) (*adminpolicybasedrouteapi.AdminPolicyBasedExternalRoute, error) {
klog.V(5).InfoS("Processing sync for APB %s", policyName)
klog.V(5).Infof("Processing sync for APB %s", policyName)
routePolicy, err := m.routeLister.Get(policyName)
if err != nil && !apierrors.IsNotFound(err) {
return nil, err
}
if apierrors.IsNotFound(err) || !routePolicy.DeletionTimestamp.IsZero() {
// DELETE use case
klog.V(4).InfoS("Deleting policy %s", policyName)
klog.V(4).Infof("Deleting policy %s", policyName)
err = m.processDeletePolicy(policyName)
if err != nil {
return nil, fmt.Errorf("failed to delete Admin Policy Based External Route %s:%w", policyName, err)
Expand All @@ -37,7 +37,7 @@ func (m *externalPolicyManager) syncRoutePolicy(policyName string, routeQueue wo
currentPolicy, found, _ := m.getRoutePolicyFromCache(routePolicy.Name)
if !found {
// ADD use case
klog.V(4).InfoS("Adding policy %s", routePolicy.Name)
klog.V(4).Infof("Adding policy %s", routePolicy.Name)
err := m.processAddPolicy(routePolicy)
if err != nil {
return routePolicy, fmt.Errorf("failed to create Admin Policy Based External Route %s:%w", routePolicy.Name, err)
Expand All @@ -47,15 +47,15 @@ func (m *externalPolicyManager) syncRoutePolicy(policyName string, routeQueue wo

if reflect.DeepEqual(currentPolicy.Spec, routePolicy.Spec) {
// Reconcile changes to namespace or pod
klog.V(5).InfoS("Reconciling policy %s with updates to namespace or pods", routePolicy.Name)
klog.V(5).Infof("Reconciling policy %s with updates to namespace or pods", routePolicy.Name)
err := m.reconcilePolicyWithNamespacesAndPods(currentPolicy)
if err != nil {
return routePolicy, fmt.Errorf("failed to create Admin Policy Based External Route %s:%w", routePolicy.Name, err)
}
return routePolicy, nil
}
// UPDATE policy use case
klog.V(4).InfoS("Updating policy %s", routePolicy.Name)
klog.V(4).Infof("Updating policy %s", routePolicy.Name)
err = m.processUpdatePolicy(currentPolicy, routePolicy)
if err != nil {
return routePolicy, fmt.Errorf("failed to update Admin Policy Based External Route %s:%w", routePolicy.Name, err)
Expand Down Expand Up @@ -101,7 +101,7 @@ func (m *externalPolicyManager) hasPolicyInNamespace(policyName, namespaceName s

nsInfo, found := m.getNamespaceInfoFromCache(namespaceName)
if !found {
klog.V(5).InfoS("Namespace %s not found while consolidating namespaces using policy %s", namespaceName, policyName)
klog.V(5).Infof("Namespace %s not found while consolidating namespaces using policy %s", namespaceName, policyName)
return false
}
defer m.unlockNamespaceInfoCache(namespaceName)
Expand All @@ -113,7 +113,7 @@ func (m *externalPolicyManager) processPolicyDiscrepancyInNamespace(nsName strin
discrepancyFunc func(string, *adminpolicybasedrouteapi.AdminPolicyBasedExternalRoute, *namespaceInfo) error) error {
cacheInfo, found := m.getNamespaceInfoFromCache(nsName)
if !found {
klog.V(5).InfoS("Namespace %s not found in cache, creating", nsName)
klog.V(5).Infof("Namespace %s not found in cache, creating", nsName)
cacheInfo = m.newNamespaceInfoInCache(nsName)
}
defer m.unlockNamespaceInfoCache(nsName)
Expand All @@ -131,7 +131,7 @@ func (m *externalPolicyManager) reconcilePolicyWithNamespacesAndPods(routePolicy
targetNs.Insert(ns.Name)
}

klog.V(4).InfoS("Reconciling namespaces %+v for policy %s", strings.Join(targetNs.UnsortedList(), ", "), routePolicy.Name)
klog.V(4).Infof("Reconciling namespaces %+v for policy %s", strings.Join(targetNs.UnsortedList(), ", "), routePolicy.Name)
// reconcile Namespaces
currentNs, err := m.listNamespacesWithPolicy(routePolicy.Name)
if err != nil {
Expand Down Expand Up @@ -172,15 +172,15 @@ func (m *externalPolicyManager) reconcilePolicyWithNamespacesAndPods(routePolicy
func (m *externalPolicyManager) processReconciliationWithNamespace(nsName string) error {
cacheInfo, found := m.getNamespaceInfoFromCache(nsName)
if !found {
klog.V(5).InfoS("Namespace %s not found in cache", nsName)
klog.V(5).Infof("Namespace %s not found in cache", nsName)
return nil
}
defer m.unlockNamespaceInfoCache(nsName)
policies := make([]*adminpolicybasedrouteapi.AdminPolicyBasedExternalRoute, 0)
for policy := range cacheInfo.Policies {
cachedPolicy, found, markedForDeletion := m.getRoutePolicyFromCache(policy)
if !found {
klog.V(5).InfoS("Policy %s not found while calculating all policies in a namespace", policy)
klog.V(5).Infof("Policy %s not found while calculating all policies in a namespace", policy)
continue
}
if markedForDeletion {
Expand Down Expand Up @@ -234,7 +234,7 @@ func (m *externalPolicyManager) processReconciliationWithNamespace(nsName string
}

func (m *externalPolicyManager) calculateStaticGateways(allProcessedGWIPs, cachedStaticGWInfo gatewayInfoList) (gatewayInfoList, sets.Set[string], sets.Set[string]) {
klog.V(5).InfoS("Processed static policies: %+v", allProcessedGWIPs)
klog.V(5).Infof("Processed static policies: %+v", allProcessedGWIPs)
ipsToKeep := sets.New[string]()
invalidGWIPs := sets.New[string]()
newGateways := make(gatewayInfoList, 0)
Expand All @@ -243,7 +243,7 @@ func (m *externalPolicyManager) calculateStaticGateways(allProcessedGWIPs, cache
info := newGatewayInfo(sets.New[string](), gwInfo.BFDEnabled)
for ip := range gwInfo.Gateways.items {
if !cachedStaticGWInfo.HasIP(ip) {
klog.V(5).InfoS("PP to cacheInfo: static GW IP %s not found in namespace cache ", ip)
klog.V(5).Infof("PP to cacheInfo: static GW IP %s not found in namespace cache ", ip)
invalidGWIPs.Insert(ip)
continue
}
Expand All @@ -260,7 +260,7 @@ func (m *externalPolicyManager) calculateStaticGateways(allProcessedGWIPs, cache
for _, cachedInfo := range cachedStaticGWInfo {
for ip := range cachedInfo.Gateways.items {
if !allProcessedGWIPs.HasIP(ip) {
klog.V(5).InfoS("CacheInfo-> static GW IP %v not found in processed policies", ip)
klog.V(5).Infof("CacheInfo-> static GW IP %v not found in processed policies", ip)
invalidGWIPs.Insert(ip)
}
}
Expand All @@ -269,7 +269,7 @@ func (m *externalPolicyManager) calculateStaticGateways(allProcessedGWIPs, cache
}

func (m *externalPolicyManager) calculateDynamicGateways(allProcessedGWIPs, cachedDynamicGWInfo map[ktypes.NamespacedName]*gatewayInfo) (map[ktypes.NamespacedName]*gatewayInfo, sets.Set[string], sets.Set[string]) {
klog.V(5).InfoS("Processed dynamic policies: %+v", allProcessedGWIPs)
klog.V(5).Infof("Processed dynamic policies: %+v", allProcessedGWIPs)
// In order to delete the invalid GWs, the logic has to collect all the valid GW IPs as well as the invalid ones.
// This is due to implementation requirements by the network clients: for the NB interaction (master controller), only the invalid GWs is needed
// but when interacting with the conntrack (node controller), it requires to use only the valid GWs due to a white listing approach
Expand All @@ -282,12 +282,12 @@ func (m *externalPolicyManager) calculateDynamicGateways(allProcessedGWIPs, cach
v2, ok := cachedDynamicGWInfo[k]
if ok && !v1.Equal(v2) {
// podGW not found or its gatewayInfo does not match, remove it
klog.V(5).InfoS("PP to cacheInfo: invalid GW IP %+v compared to %+v", v2, v1)
klog.V(5).Infof("PP to cacheInfo: invalid GW IP %+v compared to %+v", v2, v1)
invalidGWIPs.Insert(v2.Gateways.UnsortedList()...)
continue
}
// store th gatewayInfo in the map
klog.V(5).InfoS("Storing %s when removing pod GWs ", k)
klog.V(5).Infof("Storing %s when removing pod GWs ", k)
newGateways[k] = v1
ipsToKeep.Insert(v1.Gateways.UnsortedList()...)
}
Expand All @@ -297,7 +297,7 @@ func (m *externalPolicyManager) calculateDynamicGateways(allProcessedGWIPs, cach
for k, v := range cachedDynamicGWInfo {
if _, ok := allProcessedGWIPs[k]; !ok {
// IP not found in the processed policies, it means the pod gateway information is no longer applicable
klog.V(5).InfoS("CacheInfo-> GW IP %+v not found in processed policies", k)
klog.V(5).Infof("CacheInfo-> GW IP %+v not found in processed policies", k)
invalidGWIPs.Insert(v.Gateways.UnsortedList()...)
}
}
Expand Down Expand Up @@ -347,16 +347,16 @@ func (m *externalPolicyManager) processDeletePolicy(policyName string) error {
// mark the policy for deletion.
// if it's already marked continue processing the delete action as this could be a retry attempt from a previous failed delete run.
// if it's no longer in the cache, return nil
klog.V(5).InfoS("Getting route %s and marking it for deletion", policyName)
klog.V(5).Infof("Getting route %s and marking it for deletion", policyName)
routePolicy, found := m.getAndMarkRoutePolicyForDeletionInCache(policyName)
if !found {
klog.V(5).InfoS("Policy %s not found", policyName)
klog.V(5).Infof("Policy %s not found", policyName)
return nil
}
for _, ns := range m.getAllNamespacesNamesInCache() {
cacheInfo, found := m.getNamespaceInfoFromCache(ns)
if !found {
klog.V(5).InfoS("Attempting to delete policy %s from a namespace that does not exist %s", routePolicy.Name, ns)
klog.V(5).Infof("Attempting to delete policy %s from a namespace that does not exist %s", routePolicy.Name, ns)
continue
}
var err error
Expand All @@ -368,12 +368,12 @@ func (m *externalPolicyManager) processDeletePolicy(policyName string) error {
return err
}
}
klog.V(5).InfoS("Proceeding to delete route %s from cache", routePolicy.Name)
klog.V(5).Infof("Proceeding to delete route %s from cache", routePolicy.Name)
err := m.deleteRoutePolicyFromCache(routePolicy.Name)
if err != nil {
return err
}
klog.V(4).InfoS("Deleted Admin Policy Based External Route %s", routePolicy.Name)
klog.V(4).Infof("Deleted Admin Policy Based External Route %s", routePolicy.Name)
return nil
}

Expand Down Expand Up @@ -488,7 +488,7 @@ func (m *externalPolicyManager) deletePolicyInNamespace(namespaceName, policyNam
invalidGWIPs := gwInfo.Gateways.Difference(coexistingIPs)
// Filter out the IPs from the coexisting list that are to be kept by calculating the difference between the coexising and those IPs that are to be deleted and not coexisting at the same time.
ipsToKeep := coexistingIPs.Difference(invalidGWIPs)
klog.V(4).InfoS("Coexisting %s, invalid %s, ipsToKeep %s", strings.Join(sets.List(coexistingIPs), ","), strings.Join(sets.List(invalidGWIPs), ","), strings.Join(sets.List(ipsToKeep), ","))
klog.V(4).Infof("Coexisting %s, invalid %s, ipsToKeep %s", strings.Join(sets.List(coexistingIPs), ","), strings.Join(sets.List(invalidGWIPs), ","), strings.Join(sets.List(ipsToKeep), ","))
if len(invalidGWIPs) == 0 {
continue
}
Expand Down Expand Up @@ -533,7 +533,7 @@ func (m *externalPolicyManager) deletePolicyInNamespace(namespaceName, policyNam
invalidGWIPs := gwInfo.Gateways.Difference(coexistingIPs)
// Filter out the IPs from the coexisting list that are to be kept by calculating the difference between the coexising and those IPs that are to be deleted and not coexisting at the same time.
ipsToKeep := coexistingIPs.Difference(invalidGWIPs)
klog.V(4).InfoS("Coexisting %s, invalid %s, ipsToKeep %s", strings.Join(sets.List(coexistingIPs), ","), strings.Join(sets.List(invalidGWIPs), ","), strings.Join(sets.List(ipsToKeep), ","))
klog.V(4).Infof("Coexisting %s, invalid %s, ipsToKeep %s", strings.Join(sets.List(coexistingIPs), ","), strings.Join(sets.List(invalidGWIPs), ","), strings.Join(sets.List(ipsToKeep), ","))
if len(invalidGWIPs) == 0 {
continue
}
Expand All @@ -542,11 +542,11 @@ func (m *externalPolicyManager) deletePolicyInNamespace(namespaceName, policyNam

if gwInfo.Gateways.Difference(invalidGWIPs).Len() == 0 {
// delete cached information for the pod gateway
klog.V(5).InfoS("Deleting cache entry for dynamic hop %s", gwPodNamespacedName)
klog.V(5).Infof("Deleting cache entry for dynamic hop %s", gwPodNamespacedName)
delete(cacheInfo.DynamicGateways, gwPodNamespacedName)
continue
}
klog.V(4).InfoS("Deleting dynamic hop IPs in gateway info %s", strings.Join(sets.List(invalidGWIPs), ","))
klog.V(4).Infof("Deleting dynamic hop IPs in gateway info %s", strings.Join(sets.List(invalidGWIPs), ","))
gwInfo.Gateways.Delete(invalidGWIPs.UnsortedList()...)
}
// Processing IPs
Expand Down Expand Up @@ -580,7 +580,7 @@ func (m *externalPolicyManager) applyProcessedPolicyToNamespace(namespaceName, p
cacheInfo.DynamicGateways[pod] = newGatewayInfo(info.Gateways.items, info.BFDEnabled)

}
klog.V(4).InfoS("Adding policy %s to namespace %s", policyName, namespaceName)
klog.V(4).Infof("Adding policy %s to namespace %s", policyName, namespaceName)
cacheInfo.Policies = cacheInfo.Policies.Insert(policyName)
return nil
}
Expand All @@ -591,7 +591,7 @@ func (m *externalPolicyManager) applyProcessedPolicyToNamespace(namespaceName, p
// * Apply the static and dynamic hop entries in the namespaces impacted by the updated version of the policy that are in the updated version but not in the current version.
// * Store the updated policy in the route policy cache.
func (m *externalPolicyManager) processUpdatePolicy(currentPolicy, updatedPolicy *adminpolicybasedrouteapi.AdminPolicyBasedExternalRoute) error {
klog.V(5).InfoS("Processing update for Admin Policy Based External Route '%s'", currentPolicy.Name)
klog.V(5).Infof("Processing update for Admin Policy Based External Route '%s'", currentPolicy.Name)

// To update the policies, first we'll process the diff between old and new and remove the discrepancies that are not found in the new object.
// Afterwards, we'll process the diff between the new and the old and apply the new policies not found in the old policy, ensuring that we are not reduplicating the gatewayInfo.
Expand Down Expand Up @@ -665,7 +665,7 @@ func (m *externalPolicyManager) removeDiscrepanciesInRoutePolicy(currentPolicy,
if err != nil {
return err
}
klog.V(4).InfoS("Removing discrepancies between current and updated policy: namespaces %+v, static hop IPs %+v, dynamic hop IPs %+v", unmatchingNamespaces, unmatchingStaticHops, unmatchingDynamicHops)
klog.V(4).Infof("Removing discrepancies between current and updated policy: namespaces %+v, static hop IPs %+v, dynamic hop IPs %+v", unmatchingNamespaces, unmatchingStaticHops, unmatchingDynamicHops)
// Delete the namespaces where this policy no longer applies
for unmatchNs := range unmatchingNamespaces {
cacheInfo, found := m.getNamespaceInfoFromCache(unmatchNs)
Expand Down Expand Up @@ -789,14 +789,14 @@ func (m *externalPolicyManager) processExternalRoutePolicy(policy *adminpolicyba
errors = append(errors, err)
}
if len(staticGWInfo) > 0 {
klog.V(5).InfoS("Found static hops for policy %s:%+v", policy.Name, staticGWInfo)
klog.V(5).Infof("Found static hops for policy %s:%+v", policy.Name, staticGWInfo)
}
dynamicGWInfo, err := m.processDynamicHopsGatewayInformation(policy.Spec.NextHops.DynamicHops)
if err != nil {
errors = append(errors, err)
}
if len(dynamicGWInfo) > 0 {
klog.V(5).InfoS("Found dynamic hops for policy %s:%+v", policy.Name, dynamicGWInfo)
klog.V(5).Infof("Found dynamic hops for policy %s:%+v", policy.Name, dynamicGWInfo)
}
if len(errors) > 0 {
return nil, kerrors.NewAggregate(errors)
Expand Down
12 changes: 6 additions & 6 deletions go-controller/pkg/ovn/controller/apbroute/master_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func NewExternalMasterController(

func (c *ExternalGatewayMasterController) Run(threadiness int) {
defer utilruntime.HandleCrash()
klog.V(4).InfoS("Starting Admin Policy Based Route Controller")
klog.V(4).Info("Starting Admin Policy Based Route Controller")

c.routePolicyInformer.Start(c.stopCh)

Expand Down Expand Up @@ -245,7 +245,7 @@ func (c *ExternalGatewayMasterController) processNextPolicyWorkItem(wg *sync.Wai

defer c.routeQueue.Done(key)

klog.V(4).InfoS("Processing policy %s", key)
klog.V(4).Infof("Processing policy %s", key)
policy, err := c.mgr.syncRoutePolicy(key.(string), c.routeQueue)
if err != nil {
klog.Errorf("Failed to sync APB policy %s: %v", key, err)
Expand All @@ -254,7 +254,7 @@ func (c *ExternalGatewayMasterController) processNextPolicyWorkItem(wg *sync.Wai
err = c.updateStatusAPBExternalRoute(policy, err)
if err != nil {
if c.routeQueue.NumRequeues(key) < maxRetries {
klog.V(4).InfoS("Error found while processing policy %s: %w", key, err)
klog.V(4).Infof("Error found while processing policy %s: %w", key, err)
c.routeQueue.AddRateLimited(key)
return true
}
Expand Down Expand Up @@ -403,7 +403,7 @@ func (c *ExternalGatewayMasterController) processNextNamespaceWorkItem(wg *sync.
err := c.mgr.syncNamespace(obj.(*v1.Namespace), c.routeQueue)
if err != nil {
if c.namespaceQueue.NumRequeues(obj) < maxRetries {
klog.V(4).InfoS("Error found while processing namespace %s:%w", obj.(*v1.Namespace), err)
klog.V(4).Infof("Error found while processing namespace %s:%w", obj.(*v1.Namespace), err)
c.namespaceQueue.AddRateLimited(obj)
return true
}
Expand Down Expand Up @@ -495,7 +495,7 @@ func (c *ExternalGatewayMasterController) processNextPodWorkItem(wg *sync.WaitGr
err := c.mgr.syncPod(p, c.podLister, c.routeQueue)
if err != nil {
if c.podQueue.NumRequeues(obj) < maxRetries {
klog.V(4).InfoS("Error found while processing pod %s/%s:%w", p.Namespace, p.Name, err)
klog.V(4).Infof("Error found while processing pod %s/%s:%v", p.Namespace, p.Name, err)
c.podQueue.AddRateLimited(obj)
return true
}
Expand Down Expand Up @@ -561,7 +561,7 @@ func updateStatus(route *adminpolicybasedrouteapi.AdminPolicyBasedExternalRoute,
route.Status.LastTransitionTime = metav1.Time{Time: time.Now()}
route.Status.Status = adminpolicybasedrouteapi.SuccessStatus
route.Status.Messages = append(route.Status.Messages, fmt.Sprintf("Configured external gateway IPs: %s", gwIPs))
klog.V(4).InfoS("Updating Admin Policy Based External Route %s with Status: %s, Message: %s", route.Name, route.Status.Status, route.Status.Messages[len(route.Status.Messages)-1])
klog.V(4).Infof("Updating Admin Policy Based External Route %s with Status: %s, Message: %s", route.Name, route.Status.Status, route.Status.Messages[len(route.Status.Messages)-1])
}

// AddHybridRoutePolicyForPod exposes the function addHybridRoutePolicyForPod
Expand Down
Loading

0 comments on commit 5e446a6

Please sign in to comment.