From 3f0aead7ef77c09fea9fd584f1d5c2757082e17a Mon Sep 17 00:00:00 2001 From: gejames <55845783+gejames@users.noreply.github.com> Date: Thu, 14 Jul 2022 14:59:23 -0700 Subject: [PATCH] Ocp4 workload nginx (#5099) * initiall commit * initial commit * added variables to default/main.yml * fixed jinja2 issue in podman push * fixed misspelliing in defaults/main.yml * added templates for ocp * fixed issue with nginx-controller.j2 * remove unused files * added nginx-operatorgroup.j2 * cleaned up some code * updating main.yml * adding nginxStatus section to nginx-controller * updated nginx-controller.j2 * updated repo for nginxplus image to quay.io * fixed repo * updated workload.yml k8s_info module name * fixed linting errors * fixed linting errors * fixed linting errors * Update pre_workload.yml * fixed tempaltes for ver1.0.0 of operator * fixed tempaltes for ver1.0.0 of operator * fixed tempaltes for ver1.0.0 of operator * fixed tempaltes for ver1.0.0 of operator * added until/retry to task in workload.yml * added cluster role files * added nginx-scc.j2 * reworked workload.yml to not use podman * Update workload-old.yml fixed extra spaces in worload-old.yml to fast linter * Delete workload-old.yml removed to clean up task dir. * cleaned up workload.yml for lint * fix trailing spaces * fixed some minor naming issues and added some error logic to workload shell tasks * updated variable names to include workload name * fixed file name for rhpds_ci.html * updated image ubi * updated image ubi * remove quay.io secret in post_workload.yml * remove quay.io secret in post_workload.yml * converted shell oc commands to templates * created j2 files and for registry secret and imagestream * added logic to test if pods are running * increase timeouts and wait wating for pod to come up. * added waits * comment out test if pod is running * commented delete secret task * added task to restart pod * added task to restart pod * added task to restart pod * removed code to add vscode.yml * changed image tag to latest * added links in ci html and fixed typo in workload.yml Co-authored-by: George James Co-authored-by: Cameron Skidmore Co-authored-by: LoboTheFalcon <39635240+cskidmo@users.noreply.github.com> --- .../ocp4_workload_nginxplus/defaults/main.yml | 2 +- .../ocp4_workload_nginxplus/files/rhpds_ci.html | 5 +++-- .../ocp4_workload_nginxplus/tasks/post_workload.yml | 3 --- .../ocp4_workload_nginxplus/templates/nginx-subscription.j2 | 3 +-- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/ansible/roles_ocp_workloads/ocp4_workload_nginxplus/defaults/main.yml b/ansible/roles_ocp_workloads/ocp4_workload_nginxplus/defaults/main.yml index d95d32ceaf4..1e0ea19f4ab 100644 --- a/ansible/roles_ocp_workloads/ocp4_workload_nginxplus/defaults/main.yml +++ b/ansible/roles_ocp_workloads/ocp4_workload_nginxplus/defaults/main.yml @@ -9,7 +9,7 @@ ocp4_workload_nginxplus_rebuild_k8s_venv: false ocp4_workload_nginxplus_base_url: "quay.io" ocp4_workload_nginxplus_private_registry_url: "quay.io/redhat-gpst" ocp4_workload_nginxplus_image_name: "nginx-plus-ingress" -ocp4_workload_nginxplus_image_tag: "2.2.2-ubi" +ocp4_workload_nginxplus_image_tag: "latest" ocp4_workload_nginxplus_namespace: nginx-ingress ocp4_workload_nginxplus_secret_name: quay-login diff --git a/ansible/roles_ocp_workloads/ocp4_workload_nginxplus/files/rhpds_ci.html b/ansible/roles_ocp_workloads/ocp4_workload_nginxplus/files/rhpds_ci.html index b6732072500..221c1c59a6b 100644 --- a/ansible/roles_ocp_workloads/ocp4_workload_nginxplus/files/rhpds_ci.html +++ b/ansible/roles_ocp_workloads/ocp4_workload_nginxplus/files/rhpds_ci.html @@ -22,7 +22,8 @@

Handling Cluster Traffic in OpenShift with the NGINX INgress Operator

Quick Links

@@ -31,7 +32,7 @@

Audience

Provisioning Time?

- ~60 min. + ~60 min.

IMPORTANT: This instance is shutdown and deleted after 48 hours. diff --git a/ansible/roles_ocp_workloads/ocp4_workload_nginxplus/tasks/post_workload.yml b/ansible/roles_ocp_workloads/ocp4_workload_nginxplus/tasks/post_workload.yml index d063572c49c..95689de77c6 100644 --- a/ansible/roles_ocp_workloads/ocp4_workload_nginxplus/tasks/post_workload.yml +++ b/ansible/roles_ocp_workloads/ocp4_workload_nginxplus/tasks/post_workload.yml @@ -10,9 +10,6 @@ name: "{{ ocp4_workload_nginxplus_secret_name }}" state: absent -#- name: install vscode -# include_playbook: vscode_install.yml - # Leave these as the last tasks in the playbook # --------------------------------------------- diff --git a/ansible/roles_ocp_workloads/ocp4_workload_nginxplus/templates/nginx-subscription.j2 b/ansible/roles_ocp_workloads/ocp4_workload_nginxplus/templates/nginx-subscription.j2 index 82ccddab763..75c399794f5 100644 --- a/ansible/roles_ocp_workloads/ocp4_workload_nginxplus/templates/nginx-subscription.j2 +++ b/ansible/roles_ocp_workloads/ocp4_workload_nginxplus/templates/nginx-subscription.j2 @@ -10,5 +10,4 @@ spec: installPlanApproval: {{ ocp4_workload_nginxplus_ic_sub_spec_install_plan }} name: {{ ocp4_workload_nginxplus_ic_sub_spec_name }} source: {{ ocp4_workload_nginxplus_ic_sub_spec_source }} - sourceNamespace: {{ ocp4_workload_nginxplus_ic_sub_spec_source_namespace }} - startingCSV: {{ ocp4_workload_nginxplus_ic_sub_spec_starting_csv }} + sourceNamespace: {{ ocp4_workload_nginxplus_ic_sub_spec_source_namespace }} \ No newline at end of file