Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Gh 561 #580

Merged
merged 2 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ config/deploy/**/_*
/ratelimitpolicy.yaml
/echo_httproute.yaml

/control-plane.yaml
/workload*.yaml

cmd/controller/__debug_bin

# Submariner broker config
/broker-info.subm*
/broker-info.subm*
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,18 @@ func (r *DNSHealthCheckProbeReconciler) Reconcile(ctx context.Context, req ctrl.
additionalHeaders, err := getAdditionalHeaders(ctx, r.Client, probeObj)

if err != nil {
//update probe status, ignore update errors
_ = r.Client.Status().Update(ctx, probeObj)
f := false
logger.V(1).Info(
"error getting additional headers for probe",
"secret name", probeObj.Spec.AdditionalHeadersRef.Name,
"error", err)
//update probe status
probeObj.Status.Healthy = &f
probeObj.Status.LastCheckedAt = metav1.Now()
updateErr := r.Client.Status().Update(ctx, probeObj)
if updateErr != nil {
logger.V(1).Info("error updating probe status", "error", updateErr)
}
return ctrl.Result{}, err
}

Expand Down Expand Up @@ -160,7 +170,7 @@ func getAdditionalHeaders(ctx context.Context, clt client.Client, probeObj *v1al
} else if err != nil {
probeError := fmt.Errorf("error retrieving additional headers secret %v/%v: %w", secretKey.Namespace, secretKey.Name, err)
probeObj.Status.ConsecutiveFailures = 0
probeObj.Status.Reason = "additional headers secret not found"
probeObj.Status.Reason = fmt.Sprintf("additional headers secret '%v' not found", secretKey.Name)
return additionalHeaders, probeError
}
for k, v := range additionalHeadersSecret.Data {
Expand Down