-
Notifications
You must be signed in to change notification settings - Fork 128
[ISSUE 57] add rocketmq api #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| apiVersion: apiextensions.k8s.io/v1beta1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| name: rocketmqs.rocketmq.apache.org | ||
| spec: | ||
| group: rocketmq.apache.org | ||
| names: | ||
| kind: Rocketmq | ||
| listKind: RocketmqList | ||
| plural: rocketmqs | ||
| singular: rocketmq | ||
| scope: Namespaced | ||
| subresources: | ||
| status: {} | ||
| validation: | ||
| openAPIV3Schema: | ||
| properties: | ||
| apiVersion: | ||
| description: "APIVersion defines the versioned schema of this representation | ||
| of an object. Servers should convert recognized schemas to the latest | ||
| internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources" | ||
| type: string | ||
| kind: | ||
| description: 'Kind is a string value representing the REST resource this | ||
| object represents. Servers may infer this from the endpoint the client | ||
| submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' | ||
| type: string | ||
| metadata: | ||
| type: object | ||
| spec: | ||
| properties: | ||
| broker: | ||
| description: Broker defines rocketmq broker spec info | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The CRD validation schema defines There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The CRD does not require broker or nameService and provides no nested schema. Invalid or misspelled cluster configuration is accepted and reconciled into empty child CRs instead of being rejected at admission. |
||
| type: object | ||
| nameService: | ||
| description: NameService defines rocketmq name service spec info | ||
| type: object | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| console: | ||
| description: Console defines rocketmq console deployment info | ||
| type: object | ||
| status: | ||
| properties: | ||
| nameService: | ||
| description: 'INSERT ADDITIONAL STATUS FIELD - define observed state | ||
| of cluster Important: Run "operator-sdk generate k8s" to regenerate | ||
| code after modifying this file Add custom validation using kubebuilder | ||
| tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html | ||
| NameService is the name of name service' | ||
| type: string | ||
| broker: | ||
| description: 'INSERT ADDITIONAL STATUS FIELD - define observed state | ||
| of cluster Important: Run "operator-sdk generate k8s" to regenerate | ||
| code after modifying this file Add custom validation using kubebuilder | ||
| tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html | ||
| Brokers is the name of broker' | ||
| type: string | ||
| required: | ||
| - nameService | ||
| - broker | ||
| type: object | ||
| version: v1alpha1 | ||
| versions: | ||
| - name: v1alpha1 | ||
| served: true | ||
| storage: true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,7 @@ metadata: | |
| spec: | ||
| type: NodePort | ||
| selector: | ||
| name_service_cr: ${rocketmq-name}-name-service | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The selector There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Service now requires name_service_cr=${rocketmq-name}-name-service, but generated Console pods only receive app and console-cr labels. The Service will have no endpoints; kubectl also does not expand this placeholder. |
||
| app: rocketmq-console | ||
| ports: | ||
| - port: 8080 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CRD uses
apiextensions.k8s.io/v1beta1which has been deprecated since Kubernetes 1.16 and removed in 1.22. Consider migrating toapiextensions.k8s.io/v1for forward compatibility.