mirror of https://github.com/easzlab/kubeasz.git
fix helm安装使用kube-system命名空间执行错误
parent
0ca5f7fdd9
commit
a96acfce07
|
@ -21,6 +21,11 @@
|
|||
-config={{ ca_dir }}/ca-config.json \
|
||||
-profile=kubernetes {{ tiller_cert_cn }}-csr.json | {{ bin_dir }}/cfssljson -bare {{ tiller_cert_cn }}"
|
||||
|
||||
- name: 获取当前集群所有 namespaces
|
||||
shell: "{{ bin_dir }}/kubectl get ns"
|
||||
register: current_ns
|
||||
run_once: true
|
||||
|
||||
- name: 准备rbac配置
|
||||
template: src=helm-rbac.yaml.j2 dest=/opt/kube/helm-rbac.yaml
|
||||
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
# 绑定helm sa到 cluster-admin,这样可以兼容现有需要集群特权的charts
|
||||
#
|
||||
#
|
||||
{% if helm_namespace not in current_ns.stdout %}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: {{ helm_namespace }}
|
||||
{% endif %}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
|
|
Loading…
Reference in New Issue