@@ -20,7 +20,7 @@ GITSTATUS = $(shell git status --porcelain || echo "no changes")
2020SOURCES = cmd/main.go
2121VERSION ?= $(shell git describe --tags --always --dirty)
2222CRD_SOURCES = $(shell find pkg/apis/zalando.org pkg/apis/acid.zalan.do -name '* .go' -not -name '* .deepcopy.go')
23- GENERATED_CRDS = manifests/postgresteam.crd.yaml
23+ GENERATED_CRDS = manifests/postgresteam.crd.yaml manifests/postgresql.crd.yaml
2424GENERATED = pkg/apis/zalando.org/v1/zz_generated.deepcopy.go pkg/apis/acid.zalan.do/v1/zz_generated.deepcopy.go
2525DIRS := cmd pkg
2626PKG := ` go list ./... | grep -v /vendor/ `
@@ -52,6 +52,7 @@ default: local
5252
5353clean :
5454 rm -rf build
55+ rm $(GENERATED )
5556
5657verify :
5758 hack/verify-codegen.sh
@@ -61,9 +62,13 @@ $(GENERATED): go.mod $(CRD_SOURCES)
6162
6263$(GENERATED_CRDS ) : $(GENERATED )
6364 go tool controller-gen crd:crdVersions=v1,allowDangerousTypes=true paths=./pkg/apis/acid.zalan.do/... output:crd:dir=manifests
64- # only generate postgresteam.crd.yaml for now
65+ # only generate postgresteam.crd.yaml and postgresql.crd.yaml for now
6566 @rm manifests/acid.zalan.do_operatorconfigurations.yaml
66- @rm manifests/acid.zalan.do_postgresqls.yaml
67+ @mv manifests/acid.zalan.do_postgresqls.yaml manifests/postgresql.crd.yaml
68+ @# hack to use lowercase kind and listKind
69+ @sed -i -e ' s/kind: Postgresql/kind: postgresql/' manifests/postgresql.crd.yaml
70+ @sed -i -e ' s/listKind: PostgresqlList/listKind: postgresqlList/' manifests/postgresql.crd.yaml
71+ @hack/adjust_postgresql_crd.sh
6772 @mv manifests/acid.zalan.do_postgresteams.yaml manifests/postgresteam.crd.yaml
6873
6974local : ${SOURCES} $(GENERATED_CRDS )
0 commit comments