kiwigrid / secret-replicator

11 stars 4 forks source link

replicate secrets based on a regex #7

Closed orphaner closed 4 years ago

orphaner commented 4 years ago

Hello,

here is a small PR that fits on of my needs: the possibility to replicate secrets based on a regex.

I've not been able to run the unit test locally:

[0] % make test
go generate ./pkg/... ./cmd/...
go fmt ./pkg/... ./cmd/...
go vet ./pkg/... ./cmd/...
go run vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go all
CRD manifests generated under '/home/nicolas/geek/golang/src/github.com/kiwigrid/secret-replicator/config/crds' 
RBAC manifests generated under '/home/nicolas/geek/golang/src/github.com/kiwigrid/secret-replicator/config/rbac' 
go test ./pkg/... ./cmd/... -coverprofile cover.out
?       github.com/kiwigrid/secret-replicator/pkg/apis  [no test files]
?       github.com/kiwigrid/secret-replicator/pkg/controller    [no test files]
2019/11/12 15:07:39 failed to start the controlplane. retried 5 times
FAIL    github.com/kiwigrid/secret-replicator/pkg/controller/namespace  0.010s
2019/11/12 15:07:39 failed to start the controlplane. retried 5 times
FAIL    github.com/kiwigrid/secret-replicator/pkg/controller/secret 0.010s
?       github.com/kiwigrid/secret-replicator/pkg/service   [no test files]
?       github.com/kiwigrid/secret-replicator/pkg/webhook   [no test files]
?       github.com/kiwigrid/secret-replicator/cmd/manager   [no test files]
FAIL
make: *** [Makefile:9: test] Error 1

But I've been able to build my custom image and the regex part seems to to be OK.

I hope it'll help. Nicolas

orphaner commented 4 years ago

Hello,

thanks for the merge :) Could you create a new release with that feature?

Thanks again Nicolas