Skip to content

Commit

Permalink
helm添加国内repo url
Browse files Browse the repository at this point in the history
  • Loading branch information
lusyoe authored and gjmzj committed May 31, 2018
1 parent f3b788a commit 7da2a40
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions roles/helm/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ helm_cert_cn: helm001
tiller_sa: tiller
tiller_cert_cn: tiller001
tiller_image: jmgao1983/tiller:v2.9.1
repo_url: https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
1 change: 1 addition & 0 deletions roles/helm/helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
tiller_sa: tiller
tiller_cert_cn: tiller001
tiller_image: jmgao1983/tiller:v2.9.1
repo_url: https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
7 changes: 4 additions & 3 deletions roles/helm/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
-profile=kubernetes {{ tiller_cert_cn }}-csr.json | {{ bin_dir }}/cfssljson -bare {{ tiller_cert_cn }}"

- name: 准备rbac配置
template: src=helm-rbac.yaml.j2 dest=~/helm-rbac.yaml
template: src=helm-rbac.yaml.j2 dest=./helm-rbac.yaml

- name: 在k8s上创建rbac
shell: "{{ bin_dir }}/kubectl apply -f ~/helm-rbac.yaml"
shell: "{{ bin_dir }}/kubectl apply -f ./helm-rbac.yaml"
ignore_errors: true

- name: 安装tiller
Expand All @@ -37,7 +37,8 @@
--tls-ca-cert {{ ca_dir }}/ca.pem \
--service-account {{ tiller_sa }} \
--tiller-namespace {{ helm_namespace }} \
--tiller-image {{ tiller_image }}"
--tiller-image {{ tiller_image }} \
--stable-repo-url {{ repo_url }}"
ignore_errors: true

- name: 配置helm客户端
Expand Down

0 comments on commit 7da2a40

Please sign in to comment.