Skip to content

Add destroy action to ocp_console_embed role#71

Open
andrew-jones wants to merge 4 commits into
mainfrom
remove-workload
Open

Add destroy action to ocp_console_embed role#71
andrew-jones wants to merge 4 commits into
mainfrom
remove-workload

Conversation

@andrew-jones
Copy link
Copy Markdown
Collaborator

Adds a destroy action to the ocp4_workload_ocp_console_embed role, adopting the standard ACTION dispatcher pattern used by core_workloads roles. This enables clean teardown of the webhook, RBAC, IngressController header customizations, and namespace when the workload is removed.

Changes

  • Refactor tasks/main.yml into the standard ACTION-based dispatcher (provision / destroy)
  • Move existing provision logic unchanged into tasks/workload.yml
  • Add tasks/remove_workload.yml that reverses the provision in correct order: removes MutatingWebhookConfiguration, resets IngressController httpHeaders, cleans up RBAC from openshift-authentication, deletes the workload namespace, and waits for the OAuth route to revert to passthrough

andrew-jones and others added 4 commits May 20, 2026 12:48
Cover the healthz endpoint (200/503), unknown paths (404), valid
admission requests, oversized body rejection (413), malformed JSON
fallback to allow, missing UID handling, and exception-in-handler
fail-open behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add all 16 configurable variables from defaults/main.yml to the
README, organized into required and optional sections. Add
prerequisites (OCP 4.x, kubernetes.core collection) and note that
the IngressController patch affects all default-ingress routes.

Co-authored-by: Cursor <cursoragent@cursor.com>
…destroy

The provision path may scale down router replicas to match schedulable
worker nodes, but destroy never cleared the override. Use a JSON merge
patch to set spec.replicas to null so the ingress operator resumes
managing the replica count.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant