Skip to content

Commit

Permalink
Set upgrade context on webhook
Browse files Browse the repository at this point in the history
This ensures that the automatic upgrades that we do in
`SetDefaults` (e.g. `binding` to `bindings`) are actually
persisted in etcd.

Previously we only did these upgrades on each reconcile
but did not persist them.

Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
  • Loading branch information
dibyom authored and tekton-robot committed Jan 23, 2020
1 parent ac7d1bf commit 1e9396a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cmd/webhook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package main

import (
"context"
"log"

"github.com/tektoncd/pipeline/pkg/system"
Expand Down Expand Up @@ -81,9 +80,7 @@ func main() {
}

// Decorate contexts with the current state of the config.
ctxFunc := func(ctx context.Context) context.Context {
return ctx
}
ctxFunc := v1alpha1.WithUpgradeViaDefaulting

controller, err := webhook.New(kubeClient, options, admissionControllers, logger, ctxFunc)
if err != nil {
Expand Down

0 comments on commit 1e9396a

Please sign in to comment.