Skip to content

Commit

Permalink
add job ks-upgrade to upgrade custom role
Browse files Browse the repository at this point in the history
Signed-off-by: Wenhao Zhou <wenhaozhou@yunify.com>
  • Loading branch information
zhou1203 committed Oct 13, 2022
1 parent 08dd030 commit 6baf7f0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions roles/ks-migration/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,16 @@
- { path: migration, file: ks-upgrade.yaml }
- { path: migration, file: ks-devops-migration.yaml }

- name: Kubesphere | Checking role template
shell:
{{ bin_dir }}/kubectl get globalroles role-template-manage-users --show-labels | awk '(NR>=2){print $3}'
register: roletemplate_label

- name: KubeSphere | Creating migration job
shell: >
{{ bin_dir }}/kubectl apply -f {{ kubesphere_dir }}/ks-upgrade.yaml
when:
- roletemplate_label.stdout.find('iam.kubesphere.io/role-template=true') != -1

- name: KubeSphere | Checking devops status
shell: >
Expand Down

0 comments on commit 6baf7f0

Please sign in to comment.