generated from IBM/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OCTOPUS-697: OCP login operation is invoked before NFS deployment
Signed-off-by: Chandan Abhyankar <[email protected]>
- Loading branch information
1 parent
76c7e7a
commit 3597583
Showing
5 changed files
with
70 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
- hosts: all | ||
|
||
handlers: | ||
- import_tasks: ../handlers/main.yml | ||
|
||
tasks: | ||
|
||
- name: Create nfs-provisioner Project | ||
kubernetes.core.k8s: | ||
state: present | ||
proxy: "http://{{ nfs_server }}:3128" | ||
definition: "{{ lookup('template', '../templates/nfs-ns.yml') }}" | ||
|
||
- name: Create RBAC for nfs-provisioner | ||
kubernetes.core.k8s: | ||
state: present | ||
proxy: "http://{{ nfs_server }}:3128" | ||
definition: "{{ lookup('template', '../templates/nfs-rbac.yml') }}" | ||
|
||
- name: Setup Authorization | ||
shell: "export HTTPS_PROXY=http://{{ nfs_server }}:3128 && oc adm policy add-scc-to-user hostmount-anyuid system:serviceaccount:nfs-provisioner:nfs-client-provisioner" | ||
|
||
- name: Create Deployment for nfs-provisioner | ||
kubernetes.core.k8s: | ||
state: present | ||
proxy: "http://{{ nfs_server }}:3128" | ||
definition: "{{ lookup('template', '../templates/nfs-deployment.yml.j2') }}" | ||
|
||
- name: Create Storage Class for nfs | ||
kubernetes.core.k8s: | ||
state: present | ||
proxy: "http://{{ nfs_server }}:3128" | ||
definition: "{{ lookup('template', '../templates/nfs-sc.yml') }}" | ||
|
||
- name: Ensure nfs-provisioner Pod is up and running fine | ||
shell: "export HTTPS_PROXY=http://{{ nfs_server }}:3128 && oc get pods -n nfs-provisioner" | ||
register: pod_output | ||
until: pod_output.stdout.find("Running") != -1 | ||
retries: 10 | ||
delay: 30 | ||
|
||
- name: Remove the block storage as the default. | ||
shell: | | ||
export HTTPS_PROXY=http://{{ nfs_server }}:3128 \ | ||
&& oc patch storageclass ibmc-vpc-block-10iops-tier -p '{"metadata": {"annotations": {"storageclass.kubernetes.io/is-default-class": "false"}}}' | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters