Skip to content

Commit b4c76a2

Browse files
author
Ahmed El-Sayed
authored
Merge pull request #127 from weaveworks/dev
release version 2.0.0
2 parents 2de8aad + a30a6c3 commit b4c76a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+4458
-155
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
env:
4444
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
4545
run: |
46-
go test -v -cover -covermode=atomic -coverprofile=coverage.txt ./...
46+
make test
4747
bash <(curl -s https://codecov.io/bash) -F unit
4848
4949
- name: Build docker image

Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust
5656
cd api && $(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=../config/crd/bases
5757
cp config/crd/bases/pac.weave.works_policies.yaml helm/crds
5858
cp config/crd/bases/pac.weave.works_policysets.yaml helm/crds
59+
cp config/crd/bases/pac.weave.works_policyconfigs.yaml helm/crds
60+
5961

6062
.PHONY: generate
6163
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
@@ -71,7 +73,7 @@ vet: ## Run go vet against code.
7173

7274
.PHONY: test
7375
test: manifests generate fmt vet envtest ## Run tests.
74-
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test ./... -coverprofile cover.out
76+
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test -v ./... -coverprofile cover.out
7577

7678
##@ Build
7779

@@ -127,12 +129,14 @@ deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in
127129
undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
128130
$(KUSTOMIZE) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
129131

130-
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
132+
LOCALBIN = $(shell pwd)/bin
133+
KUSTOMIZE = $(LOCALBIN)/kustomize
134+
CONTROLLER_GEN = $(LOCALBIN)/controller-gen
135+
131136
.PHONY: controller-gen
132137
controller-gen: ## Download controller-gen locally if necessary.
133138
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0)
134139

135-
KUSTOMIZE = $(shell pwd)/bin/kustomize
136140
.PHONY: kustomize
137141
kustomize: ## Download kustomize locally if necessary.
138142
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v3@v3.8.7)

PROJECT

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,47 @@ resources:
77
- api:
88
crdVersion: v1
99
namespaced: false
10-
- api:
10+
domain: weave.works
11+
kind: Policy
12+
path: api/v1
13+
version: v1
14+
- api:
1115
crdVersion: v2beta1
1216
namespaced: false
1317
domain: weave.works
1418
kind: Policy
15-
path: github.com/weaveworks/policy-agent/api/v1
16-
version: v1
19+
path: api/v1
20+
version: v2beta1
21+
- api:
22+
crdVersion: v2beta1
23+
namespaced: false
24+
domain: weave.works
25+
kind: PolicySet
26+
path: api/v1
27+
version: v2beta1
28+
- api:
29+
crdVersion: v2beta2
30+
namespaced: false
31+
domain: weave.works
32+
kind: Policy
33+
path: api/v1
34+
version: v2beta2
35+
- api:
36+
crdVersion: v2beta2
37+
namespaced: false
38+
domain: weave.works
39+
kind: PolicySet
40+
path: api/v1
41+
version: v2beta2
42+
- api:
43+
crdVersion: v2beta2
44+
namespaced: false
45+
domain: weave.works
46+
kind: PolicyConfig
47+
path: api/v1
48+
version: v2beta2
49+
webhooks:
50+
# defaulting: true
51+
validation: true
52+
webhookVersion: v1
1753
version: "3"

api/go.mod

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,49 @@ require (
99
)
1010

1111
require (
12+
github.com/beorn7/perks v1.0.1 // indirect
13+
github.com/cespare/xxhash/v2 v2.1.1 // indirect
14+
github.com/davecgh/go-spew v1.1.1 // indirect
15+
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
16+
github.com/fsnotify/fsnotify v1.5.1 // indirect
1217
github.com/go-logr/logr v1.2.0 // indirect
1318
github.com/gogo/protobuf v1.3.2 // indirect
19+
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
20+
github.com/golang/protobuf v1.5.2 // indirect
1421
github.com/google/go-cmp v0.5.5 // indirect
1522
github.com/google/gofuzz v1.1.0 // indirect
23+
github.com/google/uuid v1.1.2 // indirect
24+
github.com/googleapis/gnostic v0.5.5 // indirect
25+
github.com/imdario/mergo v0.3.12 // indirect
1626
github.com/json-iterator/go v1.1.12 // indirect
27+
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
1728
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
1829
github.com/modern-go/reflect2 v1.0.2 // indirect
30+
github.com/pkg/errors v0.9.1 // indirect
31+
github.com/prometheus/client_golang v1.11.0 // indirect
32+
github.com/prometheus/client_model v0.2.0 // indirect
33+
github.com/prometheus/common v0.28.0 // indirect
34+
github.com/prometheus/procfs v0.6.0 // indirect
35+
github.com/spf13/pflag v1.0.5 // indirect
1936
golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect
37+
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
38+
golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 // indirect
39+
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
2040
golang.org/x/text v0.3.7 // indirect
41+
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
42+
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
43+
google.golang.org/appengine v1.6.7 // indirect
44+
google.golang.org/protobuf v1.27.1 // indirect
2145
gopkg.in/inf.v0 v0.9.1 // indirect
2246
gopkg.in/yaml.v2 v2.4.0 // indirect
47+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
48+
k8s.io/api v0.23.4 // indirect
49+
k8s.io/client-go v0.23.4 // indirect
50+
k8s.io/component-base v0.23.4 // indirect
2351
k8s.io/klog/v2 v2.30.0 // indirect
52+
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
2453
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
2554
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
2655
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
56+
sigs.k8s.io/yaml v1.3.0 // indirect
2757
)

0 commit comments

Comments
 (0)