This is an automated email from the ASF dual-hosted git repository.
caigy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-operator.git
The following commit(s) were added to refs/heads/master by this push:
new 6a2f93b [ISSUE #178] add helm installation guides and support
installing operator in namespaces other than default (#175)
6a2f93b is described below
commit 6a2f93b48a8d3e827480964640279210ecb04336
Author: yangw <[email protected]>
AuthorDate: Mon Sep 18 11:43:09 2023 +0800
[ISSUE #178] add helm installation guides and support installing operator
in namespaces other than default (#175)
* Add helm isntall related docs
* Support install operator non-default namespace
---
README.md | 6 ++++++
charts/rocketmq-operator/templates/NOTES.txt | 4 ++++
charts/rocketmq-operator/templates/role_binding.yaml | 18 ++++++++++--------
.../rocketmq-operator/templates/service_account.yaml | 2 +-
4 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/README.md b/README.md
index 6b2e5f9..e6e8672 100644
--- a/README.md
+++ b/README.md
@@ -64,6 +64,12 @@ $ make deploy
If you get error `rocketmq-operator/bin/controller-gen: No such file or
directory`, please run `go version` to check the version of Golang, the main
version should be 1.16. Then run `go mod tidy` before run `make deploy`.
+Or you can deploy the RocketMQ Operator by [helm](https://helm.sh/):
+
+```
+$ helm install rocketmq-operator charts/rocketmq-operator
+```
+
3. Use command ```kubectl get pods``` to check the RocketMQ Operator deploy
status like:
```
diff --git a/charts/rocketmq-operator/templates/NOTES.txt
b/charts/rocketmq-operator/templates/NOTES.txt
new file mode 100644
index 0000000..a134945
--- /dev/null
+++ b/charts/rocketmq-operator/templates/NOTES.txt
@@ -0,0 +1,4 @@
+Your release is named {{ .Release.Name }}. To check the status of the release,
run:
+
+ $ kubectl -n {{ .Release.Namespace }} get pods -l "name=rocketmq-operator"
+
diff --git a/charts/rocketmq-operator/templates/role_binding.yaml
b/charts/rocketmq-operator/templates/role_binding.yaml
index f330555..fc8ce95 100644
--- a/charts/rocketmq-operator/templates/role_binding.yaml
+++ b/charts/rocketmq-operator/templates/role_binding.yaml
@@ -13,15 +13,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
metadata:
- name: rocketmq-operator
-subjects:
-- kind: ServiceAccount
- name: rocketmq-operator
- namespace: default
+ name: {{ include "rocketmq-operator.fullname" . }}
+ labels:
+ {{- include "rocketmq-operator.labels" . | nindent 4 }}
roleRef:
- kind: ClusterRole
- name: rocketmq-operator
apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: {{ template "rocketmq-operator.fullname" . }}
+subjects:
+ - name: {{ template "rocketmq-operator.serviceAccountName" . }}
+ namespace: {{ .Release.Namespace | quote }}
+ kind: ServiceAccount
\ No newline at end of file
diff --git a/charts/rocketmq-operator/templates/service_account.yaml
b/charts/rocketmq-operator/templates/service_account.yaml
index 2dde8f9..8f1a58f 100644
--- a/charts/rocketmq-operator/templates/service_account.yaml
+++ b/charts/rocketmq-operator/templates/service_account.yaml
@@ -16,4 +16,4 @@
apiVersion: v1
kind: ServiceAccount
metadata:
- name: rocketmq-operator
+ name: {{ template "rocketmq-operator.serviceAccountName" . }}