Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update: kubesphere-config add kubeovn enabled config #1203

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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