Skip to content

Commit 6a2f93b

Browse files
authored
[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
1 parent f5baa29 commit 6a2f93b

File tree

4 files changed

+21
-9
lines changed

4 files changed

+21
-9
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ $ make deploy
6464

6565
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`.
6666

67+
Or you can deploy the RocketMQ Operator by [helm](https://helm.sh/):
68+
69+
```
70+
$ helm install rocketmq-operator charts/rocketmq-operator
71+
```
72+
6773
3. Use command ```kubectl get pods``` to check the RocketMQ Operator deploy status like:
6874

6975
```
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Your release is named {{ .Release.Name }}. To check the status of the release, run:
2+
3+
$ kubectl -n {{ .Release.Namespace }} get pods -l "name=rocketmq-operator"
4+

charts/rocketmq-operator/templates/role_binding.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
kind: ClusterRoleBinding
1716
apiVersion: rbac.authorization.k8s.io/v1
17+
kind: ClusterRoleBinding
1818
metadata:
19-
name: rocketmq-operator
20-
subjects:
21-
- kind: ServiceAccount
22-
name: rocketmq-operator
23-
namespace: default
19+
name: {{ include "rocketmq-operator.fullname" . }}
20+
labels:
21+
{{- include "rocketmq-operator.labels" . | nindent 4 }}
2422
roleRef:
25-
kind: ClusterRole
26-
name: rocketmq-operator
2723
apiGroup: rbac.authorization.k8s.io
24+
kind: ClusterRole
25+
name: {{ template "rocketmq-operator.fullname" . }}
26+
subjects:
27+
- name: {{ template "rocketmq-operator.serviceAccountName" . }}
28+
namespace: {{ .Release.Namespace | quote }}
29+
kind: ServiceAccount

charts/rocketmq-operator/templates/service_account.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
apiVersion: v1
1717
kind: ServiceAccount
1818
metadata:
19-
name: rocketmq-operator
19+
name: {{ template "rocketmq-operator.serviceAccountName" . }}

0 commit comments

Comments
 (0)