Embed CRD to be submitted by the operator
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
This commit is contained in:
parent
8480a80d62
commit
7cb8170d1c
|
|
@ -106,3 +106,6 @@ mocks
|
|||
ui/.npm/
|
||||
|
||||
.DS_Store
|
||||
|
||||
# temp build files
|
||||
pkg/apis/acid.zalan.do/v1/postgresql.crd.yaml
|
||||
|
|
|
|||
4
Makefile
4
Makefile
|
|
@ -55,6 +55,7 @@ default: local
|
|||
clean:
|
||||
rm -rf build
|
||||
rm $(GENERATED)
|
||||
rm pkg/apis/acid.zalan.do/v1/postgresql.crd.yaml
|
||||
|
||||
verify:
|
||||
hack/verify-codegen.sh
|
||||
|
|
@ -72,6 +73,7 @@ $(GENERATED_CRDS): $(GENERATED)
|
|||
@sed -i -e 's/listKind: PostgresqlList/listKind: postgresqlList/' manifests/postgresql.crd.yaml
|
||||
@hack/adjust_postgresql_crd.sh
|
||||
@mv manifests/acid.zalan.do_postgresteams.yaml manifests/postgresteam.crd.yaml
|
||||
@cp manifests/postgresql.crd.yaml pkg/apis/acid.zalan.do/v1/postgresql.crd.yaml
|
||||
|
||||
local: ${SOURCES} $(GENERATED_CRDS)
|
||||
CGO_ENABLED=${CGO_ENABLED} go build -o build/${BINARY} $(LOCAL_BUILD_FLAGS) -ldflags "$(LDFLAGS)" $(SOURCES)
|
||||
|
|
@ -103,7 +105,7 @@ vet:
|
|||
@go vet $(PKG)
|
||||
@staticcheck $(PKG)
|
||||
|
||||
test: mocks $(GENERATED)
|
||||
test: mocks $(GENERATED) $(GENERATED_CRDS)
|
||||
GO111MODULE=on go test ./...
|
||||
|
||||
codegen: $(GENERATED)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -103,7 +103,11 @@ func (c *Controller) createOperatorCRD(desiredCrd *apiextv1.CustomResourceDefini
|
|||
}
|
||||
|
||||
func (c *Controller) createPostgresCRD() error {
|
||||
return c.createOperatorCRD(acidv1.PostgresCRD(c.opConfig.CRDCategories))
|
||||
crd, err := acidv1.PostgresCRD(c.opConfig.CRDCategories)
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not create Postgres CRD object: %v", err)
|
||||
}
|
||||
return c.createOperatorCRD(crd)
|
||||
}
|
||||
|
||||
func (c *Controller) createConfigurationCRD() error {
|
||||
|
|
|
|||
Loading…
Reference in New Issue