Skip to content

Commit

Permalink
Upgrade dependencies (#1719)
Browse files Browse the repository at this point in the history
* Upgrade dependencies

Upgrade gatekeeper dependencies to the most recent libraries under which
all code compiles and all tests pass.

Signed-off-by: Will Beason <[email protected]>

* Fix lint issue

Signed-off-by: Will Beason <[email protected]>
  • Loading branch information
Will Beason (he/him) authored Dec 9, 2021
1 parent 9ee0f00 commit 18aed9e
Show file tree
Hide file tree
Showing 431 changed files with 22,082 additions and 21,444 deletions.
38 changes: 17 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,33 @@ module github.com/open-policy-agent/gatekeeper
go 1.16

require (
contrib.go.opencensus.io/exporter/prometheus v0.3.0
contrib.go.opencensus.io/exporter/prometheus v0.4.0
github.com/davecgh/go-spew v1.1.1
github.com/ghodss/yaml v1.0.0
github.com/go-logr/logr v0.4.0
github.com/go-logr/zapr v0.4.0
github.com/google/go-cmp v0.5.6
github.com/google/uuid v1.1.2
github.com/onsi/ginkgo v1.16.4
github.com/onsi/gomega v1.16.0
github.com/google/uuid v1.3.0
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.17.0
github.com/open-policy-agent/cert-controller v0.2.0
github.com/open-policy-agent/frameworks/constraint v0.0.0-20211123155909-217139c4a6bd
github.com/open-policy-agent/frameworks/constraint v0.0.0-20211203194222-02ea899f14c2
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.11.0
github.com/prometheus/common v0.30.0 // indirect
github.com/prometheus/procfs v0.7.1 // indirect
github.com/prometheus/statsd_exporter v0.21.0 // indirect
github.com/spf13/cobra v1.1.3
github.com/spf13/cobra v1.2.1
go.opencensus.io v0.23.0
go.uber.org/zap v1.19.0
golang.org/x/net v0.0.0-20210525063256-abc453219eb5
go.uber.org/zap v1.19.1
golang.org/x/net v0.0.0-20211203184738-4852103109b8
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac
google.golang.org/protobuf v1.27.1 // indirect
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
k8s.io/api v0.21.2
k8s.io/apiextensions-apiserver v0.21.2
k8s.io/apimachinery v0.21.2
k8s.io/client-go v0.21.2
k8s.io/klog/v2 v2.9.0
k8s.io/utils v0.0.0-20210802155522-efc7438f0176
sigs.k8s.io/controller-runtime v0.9.2
sigs.k8s.io/yaml v1.2.0
k8s.io/api v0.21.4
k8s.io/apiextensions-apiserver v0.21.4
k8s.io/apimachinery v0.21.4
k8s.io/client-go v0.21.4
k8s.io/klog/v2 v2.10.0
k8s.io/utils v0.0.0-20211203121628-587287796c64
sigs.k8s.io/controller-runtime v0.9.7
sigs.k8s.io/yaml v1.3.0
)
650 changes: 191 additions & 459 deletions go.sum

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions pkg/controller/constraint/constraint_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package constraint

import (
"context"
"errors"
"strings"
"sync"

Expand All @@ -34,7 +35,7 @@ import (
"github.com/open-policy-agent/gatekeeper/pkg/util"
"github.com/open-policy-agent/gatekeeper/pkg/watch"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -235,7 +236,7 @@ func (r *ReconcileConstraint) Reconcile(ctx context.Context, request reconcile.R
instance.SetNamespace(unpackedRequest.NamespacedName.Namespace)
instance.SetName(unpackedRequest.NamespacedName.Name)
} else if err := r.reader.Get(ctx, unpackedRequest.NamespacedName, instance); err != nil {
if !errors.IsNotFound(err) && !meta.IsNoMatchError(err) {
if !apierrors.IsNotFound(err) && !meta.IsNoMatchError(err) {
return reconcile.Result{}, err
}
deleted = true
Expand Down Expand Up @@ -307,7 +308,7 @@ func (r *ReconcileConstraint) Reconcile(ctx context.Context, request reconcile.R
} else {
r.log.Info("handling constraint delete", "instance", instance)
if _, err := r.opa.RemoveConstraint(ctx, instance); err != nil {
if opa.IsUnrecognizedConstraintError(err) {
if errors.Is(err, opa.ErrMissingConstraint) {
return reconcile.Result{}, err
}
}
Expand All @@ -328,7 +329,7 @@ func (r *ReconcileConstraint) Reconcile(ctx context.Context, request reconcile.R
statusObj.SetName(sName)
statusObj.SetNamespace(util.GetNamespace())
if err := r.writer.Delete(ctx, statusObj); err != nil {
if !errors.IsNotFound(err) {
if !apierrors.IsNotFound(err) {
return reconcile.Result{}, err
}
}
Expand All @@ -350,7 +351,7 @@ func (r *ReconcileConstraint) getOrCreatePodStatus(ctx context.Context, constrai
}
key := types.NamespacedName{Name: sName, Namespace: util.GetNamespace()}
if err := r.reader.Get(ctx, key, statusObj); err != nil {
if !errors.IsNotFound(err) {
if !apierrors.IsNotFound(err) {
return nil, err
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions vendor/contrib.go.opencensus.io/exporter/prometheus/go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

496 changes: 261 additions & 235 deletions vendor/contrib.go.opencensus.io/exporter/prometheus/go.sum

Large diffs are not rendered by default.

101 changes: 0 additions & 101 deletions vendor/github.com/bytecodealliance/wasmtime-go/BUILD.bazel

This file was deleted.

Loading

0 comments on commit 18aed9e

Please sign in to comment.