Skip to content

Commit

Permalink
Cherry pick eventing for mTLS mode change and 30s reconciliation trig…
Browse files Browse the repository at this point in the history
…gering (#18185)

* Change mTLS mode to `PERMISSIVE` (#18155)

* Change mTLS mode to `PERMISSIVE`

* add http label for prometheus on eventing-controller

* Trigger reconciliation every 30 seconds if failed to start NATS (#18183)

* Trigger reconciliation every 30 seconds if failed to start NATS controller

* image bump

* fix lint

---------

Co-authored-by: Muhammad Faizan <[email protected]>
  • Loading branch information
friedrichwilken and mfaizanse authored Sep 15, 2023
1 parent 254a6fc commit 5bd6bc4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"encoding/json"
"fmt"
"os"
"time"

"github.com/pkg/errors"
"go.uber.org/zap"
Expand Down Expand Up @@ -64,6 +65,8 @@ const (
secretKeyClientSecret = "client_secret"
secretKeyTokenURL = "token_url"
secretKeyCertsURL = "certs_url"

reconcileInterval = 30 * time.Second
)

var (
Expand Down Expand Up @@ -212,7 +215,8 @@ func (r *Reconciler) reconcileNATSBackend(ctx context.Context, backendStatus *ev
if updateErr := r.syncBackendStatus(ctx, backendStatus, nil); updateErr != nil {
return ctrl.Result{}, errors.Wrapf(err, "failed to update status while starting NATS controller")
}
return ctrl.Result{}, err
r.namedLogger().Errorf("failed to start NATS controller: %v", err)
return ctrl.Result{RequeueAfter: reconcileInterval}, nil
}

// Delete secret for publisher proxy if it exists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ spec:
matchLabels: {{- include "controller.peerAuth.selectorLabels" . | nindent 6 }}
portLevelMtls:
{{ .Values.metrics.config.port }}:
mode: STRICT
mode: PERMISSIVE
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
labels: {{- include "controller.labels" . | nindent 4 }}
annotations:
prometheus.io/scrape: "true"
prometheus.io/scheme: http
prometheus.io/port: {{ .Values.metrics.config.port | quote }}
spec:
type: ClusterIP
Expand Down

0 comments on commit 5bd6bc4

Please sign in to comment.