| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -73,6 +73,7 @@ func (r *SecurityPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Reque | |||
| 73 | 73 | ||
| 74 | 74 | desiredState, err := policyCR.Spec.ToProtobuf(r.CentralClient.GetNotifiers()) | |
| 75 | 75 | if err != nil { | |
| 76 | + _ = r.CentralClient.FlushCache(ctx) | ||
| 76 | 77 | policyCR.Status = configstackroxiov1alpha1.SecurityPolicyStatus{ | |
| 77 | 78 | Accepted: false, | |
| 78 | 79 | Message: err.Error(), | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -317,7 +317,7 @@ func (c *client) FlushCache(ctx context.Context) error { | |||
| 317 | 317 | return nil | |
| 318 | 318 | } | |
| 319 | 319 | ||
| 320 | - log.Info("Flushing policy cache") | ||
| 320 | + log.Info("Flushing caches") | ||
| 321 | 321 | ||
| 322 | 322 | log.Debug("Listing policies") | |
| 323 | 323 | allPolicies, err := c.centralSvc.ListPolicies(ctx) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -163,7 +163,7 @@ func (pc *PolicyAsCodeSuite) TestCreateDefaultCR() { | |||
| 163 | 163 | _, err := pc.k8sClient.Create(pc.ctx, pc.toUnstructured(k8sPolicy), metav1.CreateOptions{}) | |
| 164 | 164 | pc.Require().NoError(err) | |
| 165 | 165 | ||
| 166 | - message := "status never udpated" | ||
| 166 | + message := "status never updated" | ||
| 167 | 167 | timer := time.NewTimer(time.Second * 5) | |
| 168 | 168 | for { | |
| 169 | 169 | select { | |
@@ -187,7 +187,7 @@ func (pc *PolicyAsCodeSuite) TestRenameToDefaultCR() { | |||
| 187 | 187 | pc.Require().NoError(err) | |
| 188 | 188 | pc.fromUnstructured(u, k8sPolicy) | |
| 189 | 189 | ||
| 190 | - message := "status never udpated" | ||
| 190 | + message := "status never updated" | ||
| 191 | 191 | timer := time.NewTimer(time.Second * 5) | |
| 192 | 192 | for { | |
| 193 | 193 | accepted := false | |
@@ -320,7 +320,7 @@ func (pc *PolicyAsCodeSuite) createPolicyInK8s(toCreate *v1alpha1.SecurityPolicy | |||
| 320 | 320 | _, err := pc.k8sClient.Create(pc.ctx, pc.toUnstructured(toCreate), metav1.CreateOptions{}) | |
| 321 | 321 | pc.Require().NoError(err) | |
| 322 | 322 | ||
| 323 | - message := "status never udpated" | ||
| 323 | + message := "status never updated" | ||
| 324 | 324 | timer := time.NewTimer(time.Second * 5) | |
| 325 | 325 | for { | |
| 326 | 326 | select { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments