rhecosystemappeng / dbaas-operator Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
While running the command make bundle
I get stuck at operator-sdk generate kustomize manifests -q
, I get the following error:
/home/resoni/Documents/redhat/dbaas-operator/bin/controller-gen "crd:trivialVersions=true,preserveUnknownFields=false" rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
operator-sdk generate kustomize manifests -q
Error: error reading configuration: error unmarshalling project configuration: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal array into Go struct field Config.layout of type string
Usage:
operator-sdk generate kustomize manifests [flags]
Examples:
$ operator-sdk generate kustomize manifests
Display name for the operator (required):
> memcached-operator
...
$ tree config/manifests
config/manifests
├── bases
│ └── memcached-operator.clusterserviceversion.yaml
└── kustomization.yaml
# After generating kustomize bases and a kustomization.yaml, you can generate a bundle or package manifests.
# To generate a bundle:
$ kustomize build config/manifests | operator-sdk generate bundle --version 0.0.1
# To generate package manifests:
$ kustomize build config/manifests | operator-sdk generate packagemanifests --version 0.0.1
Flags:
--apis-dir string Root directory for API type defintions
-h, --help help for manifests
--input-dir string Directory containing existing kustomize files
--interactive When set to false, if no kustomize base exists, an interactive command prompt will be presented to accept non-inferrable metadata
--output-dir string Directory to write kustomize files
--package string Package name
-q, --quiet Run in quiet mode
Global Flags:
--verbose Enable verbose logging
FATA[0000] error reading configuration: error unmarshalling project configuration: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal array into Go struct field Config.layout of type string
make: *** [Makefile:211: bundle] Error 1
My go and operator-sdk versions are:
[resoni@resoni ~/Documents/redhat/dbaas-operator (main)]$go version
go version go1.16.7 linux/amd64
[resoni@resoni ~/Documents/redhat/dbaas-operator (main)]$operator-sdk version
operator-sdk version: "v1.3.0", commit: "1abf57985b43bf6a59dcd18147b3c574fa57d3f6", kubernetes version: "1.19.4", go version: "go1.15.5", GOOS: "linux", GOARCH: "amd64"
2021-12-17T20:15:39.014Z ERROR controller-runtime.manager.controller.dbaasconnection Could not update connection status {"reconciler group": "dbaas.redhat.com", "reconciler kind": "DBaaSConnection", "name": "dbaas-cluster1-6b4167e45f", "namespace": "openshift-dbaas-operator", "DBaaS Connection": "openshift-dbaas-operator/dbaas-cluster1-6b4167e45f", "error": "DBaaSConnection.dbaas.redhat.com \"dbaas-cluster1-6b4167e45f\" is invalid: [status.conditions.reason: Invalid value: \"\": status.conditions.reason in body should be at least 1 chars long, status.conditions.status: Unsupported value: \"\": supported values: \"True\", \"False\", \"Unknown\", status.conditions.type: Invalid value: \"\": status.conditions.type in body should match '^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$']"}
github.com/RHEcosystemAppEng/dbaas-operator/controllers.(*DBaaSConnectionReconciler).Reconcile
/workspace/controllers/dbaasconnection_controller.go:91
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
/root/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:298
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/root/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:253
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/root/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:214
2021-12-17T20:15:39.014Z ERROR controller-runtime.manager.controller.dbaasconnection Reconciler error {"reconciler group": "dbaas.redhat.com", "reconciler kind": "DBaaSConnection", "name": "dbaas-cluster1-6b4167e45f", "namespace": "openshift-dbaas-operator", "error": "DBaaSConnection.dbaas.redhat.com \"dbaas-cluster1-6b4167e45f\" is invalid: [status.conditions.reason: Invalid value: \"\": status.conditions.reason in body should be at least 1 chars long, status.conditions.status: Unsupported value: \"\": supported values: \"True\", \"False\", \"Unknown\", status.conditions.type: Invalid value: \"\": status.conditions.type in body should match '^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$']"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/root/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:253
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/root/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:214
Ref. https://github.com/servicebinding/spec#provisioned-service
Here is an example from another operator: https://github.com/rabbitmq/cluster-operator/blob/f79f2a571077a89e47f6e8350a7adc4586138848/api/v1beta1/rabbitmqcluster_status.go#L20
The current annotation-based approach is supported in SBO. But SBO encourages every service provider to follow the core spec recommended Provisioned Service based approach.
Currently, the provider API of any new provider operator for integration with OpenShift Database Access (DBaaS) must have the domain "dbaas.redhat.com" and version "v1beta1". This is because DBaaS Operator needs to create provider Customer Resources for the corresponding DBaaSInventory, DBaaSInstance, and DBaaSConnection CRs and watch their status. In order to create such objects, it needs to know:
a) The DBaaS API version (v1alpha1 or v1beta1) the provider operator supports. This version is specified in the provider registration CR in the groupVersion field:
https://github.com/RHEcosystemAppEng/dbaas-operator/blob/main/api/v1beta1/dbaasprovider.go#L120
Note that for any new provider operators, v1beta1 is recommended as v1alpha1 will be deprecated later.
b) The provider operator API group version. It has to be "dbaas.redhat.com/v1beta1' currently.
This issue is to allow the provider operator to use a version other than v1beta1 for its API. It can be achieved by adding a providerGroupVersion field to the provider registration CR.
Opened this issue so these broken links don't get forgotten.
In the docs/api/asciidoc/ref.adoc
file we have 4 broken internal (xref) links:
xref:{anchor_prefix}-github-com-rhecosystemappeng-dbaas-operator-api-v1beta1-dbaasproviderconnection[$$DBaaSProviderConnection$$]
xref:{anchor_prefix}-github-com-rhecosystemappeng-dbaas-operator-api-v1beta1-dbaasproviderinstance[$$DBaaSProviderInstance$$]
xref:{anchor_prefix}-github-com-rhecosystemappeng-dbaas-operator-api-v1beta1-dbaasproviderinventory[$$DBaaSProviderInventory$$]
xref:{anchor_prefix}-github-com-rhecosystemappeng-dbaas-operator-api-v1beta1-databaseservice[$$DatabaseService$$]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.