diff --git a/.golangci.yaml b/.golangci.yaml index d46231c41..d886a4fb1 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -40,6 +40,9 @@ linters-settings: - pkg: github.com/crunchydata/postgres-operator/internal/testing/* desc: The "internal/testing" packages should be used only in tests. + - pkg: k8s.io/client-go/discovery + desc: Use the "internal/kubernetes" package instead. + tests: files: ['$test'] deny: @@ -93,6 +96,11 @@ linters-settings: issues: exclude-generated: strict exclude-rules: + # This internal package is the one place we want to do API discovery. + - linters: [depguard] + path: internal/kubernetes/discovery.go + text: k8s.io/client-go/discovery + # These value types have unmarshal methods. # https://github.com/raeperd/recvcheck/issues/7 - linters: [recvcheck]