-
Notifications
You must be signed in to change notification settings - Fork 127
[ISSUE #176] Support manage multi cluster #183
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
9254794
fe34a95
6f14b62
d83e947
bd2abd2
392e6bc
983b6a2
d8b14ea
4fa2c0a
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 |
|---|---|---|
|
|
@@ -16,4 +16,4 @@ | |
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
| name: {{ template "rocketmq-operator.serviceAccountName" . }} | ||
| name: rocketmq-operator | ||
|
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 ServiceAccount name is now hardcoded to 'rocketmq-operator' instead of using the Helm template |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,9 @@ import ( | |
| // BrokerSpec defines the desired state of Broker | ||
|
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. No test changes detected alongside source modifications. Consider adding tests to cover the changes. |
||
| // +k8s:openapi-gen=true | ||
| type BrokerSpec struct { | ||
| // RocketMqName is the name of the RocketMQ cluster. | ||
| RocketMqName string `json:"rocketMqName,omitempty"` | ||
|
|
||
| // INSERT ADDITIONAL SPEC FIELDS - desired 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 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,12 +22,19 @@ import ( | |
| metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
| ) | ||
|
|
||
| const ( | ||
|
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. ControllerRocketMqNameIndexKey is defined as |
||
| ControllerRocketMqNameIndexKey = "spec.rocketMqNameNamespaced" | ||
| ) | ||
|
|
||
| // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! | ||
| // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. | ||
|
|
||
| // ControllerSpec defines the desired state of Controller | ||
| // +k8s:openapi-gen=true | ||
| type ControllerSpec struct { | ||
| // RocketMqName is the name of the RocketMQ cluster | ||
| RocketMqName string `json:"rocketMqName,omitempty"` | ||
|
|
||
| // INSERT ADDITIONAL SPEC FIELDS - desired 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 | ||
|
|
||
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.
The ClusterRoleBinding is now hardcoded to namespace 'default' and ServiceAccount name 'rocketmq-operator'. This breaks any deployment that installs the operator into a non-default namespace (which is very common). The original templated version used
{{ .Release.Namespace }}and{{ template "rocketmq-operator.serviceAccountName" . }}which correctly adapted to the Helm release configuration. This is a backward-incompatible regression for all users deploying to namespaces other than 'default'.