Skip to content

Commit

Permalink
CO-45 Requeue DNSRecord if zone not found (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
rxbn authored Mar 8, 2022
1 parent ae29f5e commit e20cebf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion controllers/account_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func (r *AccountReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
log.Error(err, "Failed to update Account status")
return ctrl.Result{}, err
}
return ctrl.Result{RequeueAfter: 30 * time.Second}, err
return ctrl.Result{RequeueAfter: time.Second * 30}, err
}

var managedZones []cloudflare.Zone
Expand Down
4 changes: 2 additions & 2 deletions controllers/dnsrecord_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (r *DNSRecordReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
log.Error(err, "Failed to update DNSRecord status")
return ctrl.Result{}, err
}
return ctrl.Result{RequeueAfter: 5 * time.Second}, err
return ctrl.Result{RequeueAfter: time.Second * 5}, err
}

zones := &cfv1beta1.ZoneList{}
Expand All @@ -92,7 +92,7 @@ func (r *DNSRecordReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
log.Error(err, "Failed to update DNSRecord status")
return ctrl.Result{}, err
}
return ctrl.Result{}, err
return ctrl.Result{RequeueAfter: time.Second * 5}, err
}

if dnsRecordZone.Status.Phase != "Active" {
Expand Down
2 changes: 1 addition & 1 deletion controllers/zone_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (r *ZoneReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.
log.Error(err, "Failed to update Zone status")
return ctrl.Result{}, err
}
return ctrl.Result{RequeueAfter: 5 * time.Second}, err
return ctrl.Result{RequeueAfter: time.Second * 5}, err
}

_, err = r.Cf.ZoneDetails(ctx, instance.Spec.ID)
Expand Down
8 changes: 4 additions & 4 deletions docs/content/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ cloudflare-operator requires a number of CRD resources, which must be installed
Installing CRDs with kubectl:

```bash
kubectl apply -f https://github.com/containeroo/cloudflare-operator/releases/download/v0.1.0/crds.yaml
kubectl apply -f https://github.com/containeroo/cloudflare-operator/releases/download/v0.1.1/crds.yaml
```

4. Install cloudflare-operator
Expand All @@ -44,7 +44,7 @@ helm install \
cloudflare-operator containeroo/cloudflare-operator \
--namespace cloudflare-operator \
--create-namespace \
--version v0.1.0
--version v0.1.1
```

A full list of available Helm values is on [cloudflare-operator’s ArtifactHub page](https://artifacthub.io/packages/helm/containeroo/cloudflare-operator).
Expand All @@ -58,7 +58,7 @@ helm template \
cloudflare-operator containeroo/cloudflare-operator \
--namespace cloudflare-operator \
--create-namespace \
--version v0.1.0 \
--version v0.1.1 \
--set your.value=here
```

Expand Down Expand Up @@ -93,7 +93,7 @@ Finally, delete the cloudflare-operator CustomResourceDefinitions using the link
This command will also remove installed cloudflare-operator objects. All cloudflare-operator resources will be removed by Kubernetes' garbage collector.

```bash
kubectl delete -f https://github.com/containeroo/cloudflare-operator/releases/download/v0.1.0/crds.yaml
kubectl delete -f https://github.com/containeroo/cloudflare-operator/releases/download/v0.1.1/crds.yaml
```

## Namespace Stuck in Terminating State
Expand Down

0 comments on commit e20cebf

Please sign in to comment.