Skip to content

Commit 5a307e0

Browse files
Merge pull request #44 from simonpasquier/merge-upstream
Merge upstream
2 parents f84d70d + e08751c commit 5a307e0

8 files changed

Lines changed: 29 additions & 73 deletions

File tree

.bingo/Variables.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ $(JSONNETFMT): $(BINGO_DIR)/jsonnetfmt.mod
7777
@echo "(re)installing $(GOBIN)/jsonnetfmt-v0.21.0"
7878
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=jsonnetfmt.mod -o=$(GOBIN)/jsonnetfmt-v0.21.0 "github.com/google/go-jsonnet/cmd/jsonnetfmt"
7979

80-
KUBEVAL := $(GOBIN)/kubeval-v0.0.0-20201005082916-38668c6c5b23
81-
$(KUBEVAL): $(BINGO_DIR)/kubeval.mod
80+
KUBECONFORM := $(GOBIN)/kubeconform-v0.7.0
81+
$(KUBECONFORM): $(BINGO_DIR)/kubeconform.mod
8282
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
83-
@echo "(re)installing $(GOBIN)/kubeval-v0.0.0-20201005082916-38668c6c5b23"
84-
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=kubeval.mod -o=$(GOBIN)/kubeval-v0.0.0-20201005082916-38668c6c5b23 "github.com/instrumenta/kubeval"
83+
@echo "(re)installing $(GOBIN)/kubeconform-v0.7.0"
84+
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=kubeconform.mod -o=$(GOBIN)/kubeconform-v0.7.0 "github.com/yannh/kubeconform/cmd/kubeconform"
8585

8686
OAPI_CODEGEN := $(GOBIN)/oapi-codegen-v2.5.1
8787
$(OAPI_CODEGEN): $(BINGO_DIR)/oapi-codegen.mod

.bingo/kubeconform.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
2+
3+
go 1.24.10
4+
5+
require github.com/yannh/kubeconform v0.7.0 // cmd/kubeconform

.bingo/kubeconform.sum

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
2+
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
3+
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
4+
github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU=
5+
github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk=
6+
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1 h1:PKK9DyHxif4LZo+uQSgXNqs0jj5+xZwwfKHgph2lxBw=
7+
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU=
8+
github.com/yannh/kubeconform v0.7.0 h1:ZFfniR8VChrWQxaxTUGnNrxw8RIDkjVBrjdhXSamwjw=
9+
github.com/yannh/kubeconform v0.7.0/go.mod h1:oHO1wjM16sTRW6s41HJUox+tD69qOTE5ZVQ9HeqX+xM=
10+
golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4=
11+
golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA=
12+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
13+
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
14+
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=

.bingo/kubeval.mod

Lines changed: 0 additions & 5 deletions
This file was deleted.

.bingo/kubeval.sum

Lines changed: 0 additions & 57 deletions
This file was deleted.

.bingo/variables.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ JSONNET="${GOBIN}/jsonnet-v0.21.0"
2828

2929
JSONNETFMT="${GOBIN}/jsonnetfmt-v0.21.0"
3030

31-
KUBEVAL="${GOBIN}/kubeval-v0.0.0-20201005082916-38668c6c5b23"
31+
KUBECONFORM="${GOBIN}/kubeconform-v0.7.0"
3232

3333
OAPI_CODEGEN="${GOBIN}/oapi-codegen-v2.5.1"
3434

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ ${MANIFESTS}: examples/main.jsonnet jsonnet/lib/* | $(JSONNET) $(GOJSONTOYAML)
283283
$(JSONNET) -m ${MANIFESTS} examples/main.jsonnet | xargs -I{} sh -c 'cat {} | $(GOJSONTOYAML) > {}.yaml && rm -f {}' -- {
284284

285285
.PHONY: validate
286-
validate: $(KUBEVAL)
287-
$(KUBEVAL) ${MANIFESTS}/*.yaml
286+
validate: $(KUBECONFORM)
287+
$(KUBECONFORM) -exit-on-error -summary -output json ${MANIFESTS}
288288

289289
JSONNET_SRC = $(shell find . -name 'vendor' -prune -o -name 'examples/vendor' -prune -o -name 'tmp' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print)
290290
JSONNETFMT_CMD := $(JSONNETFMT) -n 2 --max-blank-lines 2 --string-style s --comment-style s

authentication/authentication.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@ var providerFactories map[string]ProviderFactory
1919
// providersMtx is used to protect the providerFactories.
2020
var providersMtx sync.RWMutex
2121

22-
func init() {
23-
providerFactories = make(map[string]ProviderFactory)
24-
}
25-
2622
// onboardNewProvider is used by the providers to register themselves.
2723
func onboardNewProvider(providerType string, factory ProviderFactory) {
2824
providersMtx.Lock()
2925
defer providersMtx.Unlock()
26+
if providerFactories == nil {
27+
providerFactories = map[string]ProviderFactory{}
28+
}
3029

3130
providerFactories[providerType] = factory
3231
}

0 commit comments

Comments
 (0)