mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-18 19:02:52 +02:00
Embed CRD to be submitted by the operator
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
This commit is contained in:
@@ -106,3 +106,6 @@ mocks
|
|||||||
ui/.npm/
|
ui/.npm/
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
# temp build files
|
||||||
|
pkg/apis/acid.zalan.do/v1/postgresql.crd.yaml
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ default: local
|
|||||||
clean:
|
clean:
|
||||||
rm -rf build
|
rm -rf build
|
||||||
rm $(GENERATED)
|
rm $(GENERATED)
|
||||||
|
rm pkg/apis/acid.zalan.do/v1/postgresql.crd.yaml
|
||||||
|
|
||||||
verify:
|
verify:
|
||||||
hack/verify-codegen.sh
|
hack/verify-codegen.sh
|
||||||
@@ -72,6 +73,7 @@ $(GENERATED_CRDS): $(GENERATED)
|
|||||||
@sed -i -e 's/listKind: PostgresqlList/listKind: postgresqlList/' manifests/postgresql.crd.yaml
|
@sed -i -e 's/listKind: PostgresqlList/listKind: postgresqlList/' manifests/postgresql.crd.yaml
|
||||||
@hack/adjust_postgresql_crd.sh
|
@hack/adjust_postgresql_crd.sh
|
||||||
@mv manifests/acid.zalan.do_postgresteams.yaml manifests/postgresteam.crd.yaml
|
@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)
|
local: ${SOURCES} $(GENERATED_CRDS)
|
||||||
CGO_ENABLED=${CGO_ENABLED} go build -o build/${BINARY} $(LOCAL_BUILD_FLAGS) -ldflags "$(LDFLAGS)" $(SOURCES)
|
CGO_ENABLED=${CGO_ENABLED} go build -o build/${BINARY} $(LOCAL_BUILD_FLAGS) -ldflags "$(LDFLAGS)" $(SOURCES)
|
||||||
@@ -103,7 +105,7 @@ vet:
|
|||||||
@go vet $(PKG)
|
@go vet $(PKG)
|
||||||
@staticcheck $(PKG)
|
@staticcheck $(PKG)
|
||||||
|
|
||||||
test: mocks $(GENERATED)
|
test: mocks $(GENERATED) $(GENERATED_CRDS)
|
||||||
GO111MODULE=on go test ./...
|
GO111MODULE=on go test ./...
|
||||||
|
|
||||||
codegen: $(GENERATED)
|
codegen: $(GENERATED)
|
||||||
|
|||||||
+16
-1065
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 {
|
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 {
|
func (c *Controller) createConfigurationCRD() error {
|
||||||
|
|||||||
Reference in New Issue
Block a user