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 Jan 18, 2021
1 parent b831a85 commit 8f319ca
Show file tree
Hide file tree
Showing 2 changed files with 14 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
3 changes: 3 additions & 0 deletions roles/ks-core/config/templates/kubesphere-config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ data:
{% if network.topology is defined and network.topology.type is defined and network.topology.type == "weave-scope" %}
weaveScopeHost: weave-scope-app.weave
{% endif %}
{% if kubeovn is defined %}
kubeovn:
enabled: true
{% endif %}
{% if devops.enabled is defined and devops.enabled == true %}
devops:
Expand Down

0 comments on commit 8f319ca

Please sign in to comment.