Skip to content

Commit

Permalink
Set default value to TektonConfig object
Browse files Browse the repository at this point in the history
Currently when running the Tekton operator if the controller pod is up
and webhook pod is not ready the controller will create the TektonConfig
object and that TektonConfig object will not have any default values.

This PR add the default values to TektonConfig object whenever the CR
get's created by the Controller so that even if the webhook pod is not
ready the TektonConfig CR can still have the default values.
  • Loading branch information
vinamra28 committed Sep 21, 2021
1 parent a3d2802 commit 5b64361
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/reconciler/shared/tektonconfig/tektonconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, tc *v1alpha1.TektonConfi
return nil
}

tc.SetDefaults(ctx)

if err := r.extension.PreReconcile(ctx, tc); err != nil {
// If prereconcile updates the TektonConfig CR, it returns an error
// to reconcile
Expand Down

0 comments on commit 5b64361

Please sign in to comment.