Skip to content

Commit

Permalink
update: kubesphere-config add kubeovn enabled config
Browse files Browse the repository at this point in the history
Signed-off-by: linruichao <[email protected]>
  • Loading branch information
fafucoder committed Dec 18, 2020
1 parent 5c5c457 commit 654e1c5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions roles/ks-core/config/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
{{ bin_dir }}/kubectl get cm -n kubesphere-system kubesphere-config -o jsonpath='{.data.kubesphere\.yaml}' | grep "sonarQube:" -A 2 | grep "host" | awk '{print $2}'
register: sonarqube_host

- name: KubeSphere | Geting networking plugin
shell: >
{{ bin_dir }}/kubectl get daemonset -n kube-system | grep 'kube-ovn-cni'
register: kubeovn
ignore_errors: true

- name: KubeSphere | Getting sonarqube token
shell: >
{{ bin_dir }}/kubectl get cm -n kubesphere-system kubesphere-config -o jsonpath='{.data.kubesphere\.yaml}' | grep "sonarQube:" -A 2 | grep "token" | awk '{print $2}'
Expand All @@ -27,6 +33,11 @@
- devops.sonarqube.externalSonarUrl is defined
- devops.sonarqube.externalSonarToken is defined

- set_fact:
kubeovn: "true"
when:
- kubeovn is defined and kubeovn.stdout is defined and kubeovn.stdout != ""

- block:
- name: KubeSphere | Getting es host
shell: >
Expand Down
4 changes: 4 additions & 0 deletions roles/ks-core/config/templates/kubesphere-config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ data:
network:
enableNetworkPolicy: true
{% endif %}
{% if kubeovn is defined %}
kubeovn:
enabled: true
{% endif %}
{% if devops.enabled is defined and devops.enabled == true %}
devops:
host: http://ks-jenkins.kubesphere-devops-system.svc/
Expand Down

0 comments on commit 654e1c5

Please sign in to comment.