ai-governance
Generate and enforce policy gates for AI coding agents (Copilot, Claude Code) — real-time session hooks that deny protected-path edits and dangerous commands,…
OpenShift SCC diagnosis and hardening, Route TLS patterns, OpenShift GitOps app delivery, and cluster upgrade validation.
> /plugin marketplace add nitinjain999/platform-skills > /plugin install platform-skills@platform-skills
How it fires
How this command gets triggered: by you, by Claude, or both.
/openshiftContext preview
What this command does when you run it.
OpenShift SCC diagnosis and hardening, Route TLS patterns, OpenShift GitOps app delivery, and cluster upgrade validation.
name: openshift description: OpenShift SCC diagnosis and hardening, Route TLS patterns, OpenShift GitOps app delivery, and cluster upgrade validation. argument-hint: "[scc|route|gitops|upgrade|debug] [namespace or manifest path]" title: "OpenShift Command" sidebar_label: "openshift" custom_edit_url: null
Structured guidance for OpenShift SecurityContextConstraints, Routes, GitOps app delivery, and cluster upgrades.
/platform-skills:openshift scc # diagnose SCC rejections, grant minimum SCC, document exceptions /platform-skills:openshift route # Route TLS modes, troubleshoot 503/504, Route vs Ingress decision /platform-skills:openshift gitops # OpenShift GitOps (Argo CD) app delivery, sync waves, app-of-apps /platform-skills:openshift upgrade # pre-upgrade validation, operator impact, post-upgrade checks /platform-skills:openshift debug # structured debug — symptom → SCC | Route | Operator | Runtime
---
When invoked with no arguments, ask before proceeding:
**Q1 — Mode?**
What do you need? 1. scc — SCC rejection diagnosis, minimum SCC generation, Pod Security Admission interaction 2. route — Route TLS modes, 503/504 diagnosis, Route vs Ingress vs Gateway API decision 3. gitops — OpenShift GitOps (Argo CD), app-of-apps, sync waves, SCC + Argo interaction 4. upgrade — pre-upgrade checks, operator approval, post-upgrade validation, rollback 5. debug — general structured debug for any OpenShift symptom Enter 1–5 or mode name:
**Q2 — Context** (after mode selected):
---
**Triggers:** SCC, SecurityContextConstraints, forbidden, unable to validate, runAsUser, privileged, capability, hostPath
Read `references/openshift.md` → SecurityContextConstraints section before responding.
# What SCC is currently assigned to a running pod
oc get pod <pod-name> -n <namespace> \
-o jsonpath='{.metadata.annotations.openshift\.io/scc}'
# Simulate which SCC a service account would get for a given manifest
oc adm policy scc-subject-review -z <service-account> -n <namespace> \
-f <manifest.yaml>
# List subjects allowed to use a specific SCC (users, groups, service accounts)
oc adm policy who-can use scc restricted-v2 -n <namespace>| Rejection message | Root cause | Fix | |---|---|---| | `unable to validate against any security context constraint` | No SCC grants the requested privilege | Grant a custom SCC with only what is needed | | `runAsUser` rejected | Fixed UID outside the namespace UID range | Remove `runAsUser`, let OpenShift assign; or use `anyuid` (document exception) | | `privileged` capability denied | Container requests `CAP_NET_ADMIN`, `CAP_SYS_PTRACE`, etc. | Remove the capability or create a custom SCC granting only that capability | | `hostPath` volume denied | Pod mounts a host directory | Replace with `emptyDir` or PVC; if required, grant `hostmount-anyuid` to the SA | | `allowPrivilegeEscalation` rejected | `securityContext.allowPrivilegeEscalation: true` | Set to `false` — this is enforced by `restricted-v2` |
# custom-scc.yaml — grant only what is needed apiVersion: security.openshift.io/v1 kind: SecurityContextConstraints metadata: name: custom-net-admin allowPrivilegedContainer: false allowPrivilegeEscalation: false runAsUser: type: MustRunAsRange seLinuxContext: type: MustRunAs fsGroup: type: MustRunAs supplementalGroups: type: RunAsAny allowedCapabilities: - NET_ADMIN volumes: - configMap - emptyDir - projected - secret - persistentVolumeClaim
oc apply -f custom-scc.yaml oc adm policy add-scc-to-user custom-net-admin \ -z <service-account> -n <namespace> # Verify oc adm policy who-can use scc custom-net-admin -n <namespace>
OpenShift 4.11+ runs both SCC and Kubernetes Pod Security Admission. PSA labels on the namespace add a second check — a pod blocked by PSA will not reach SCC evaluation.
# Check PSA labels on the namespace
oc get namespace <namespace> \
-o jsonpath='{.metadata.labels}' | jq 'with_entries(select(.key | startswith("pod-security")))'If PSA blocks what SCC permits, set the PSA label to match the granted SCC level or use `audit` mode while rolling out.
**Rollback:** Delete the `ClusterRoleBinding` or `RoleBinding` that grants the SCC. This revokes the SCC from the SA without affecting the SCC object itself.
---
**Triggers:** Route, 503, 504, TLS, edge, passthrough, reencrypt, timeout, route not admitted, no traffic
Read `references/openshift.md` → Routes and ingress section before responding.
| Scenario | Termination | |---|---| | Standard HTTPS, cert managed by router | `edge` | | Pod handles its own TLS (mTLS, specific cert) | `passthrough` | | End-to-end encryption with separate frontend and backend certs | `reencrypt` | | WebSocket / gRPC | `passthrough` or `edge` + timeout annotation |
# Edge — most common
apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: my-app
namespace: app-team
spec:
host: my-app.apps.cluster.example.com
to:
kind: Service
name: my-app
port:
targetPort: 8080
tls:
termination: edge
insecA production-grade field handbook for platform, DevOps, SRE, and cloud engineers covering Kubernetes, Flux CD, Terraform, GitHub Actions, AWS, OPA/Rego, KEDA, Karpenter, supply chain security, Falco, observability, and more.
Repo: nitinjain999/platform-skills
Generate and enforce policy gates for AI coding agents (Copilot, Claude Code) — real-time session hooks that deny protected-path edits and dangerous commands,…
Generate, convert, and maintain animated GitHub-safe Markdown documents with animated SVG diagrams. Covers four SVG patterns (architecture flow, lifecycle…
AWS profile management for MCP servers — discover profiles across SSO, Granted, and assumed-role chains, check credential TTL, switch profiles across VS Code…
Structured guidance for AWS CloudFront distributions, WAF web ACLs, Lambda@Edge, CloudFront Functions, Firewall Manager multi-account enforcement, and IAM/IRSA…
Azure identity (Workload Identity, OIDC, Entra ID), resource tagging, AKS platform patterns, RBAC scoping, and production-readiness review — with Terraform…
Design, run, and debug Chaos Engineering experiments on Kubernetes using Litmus Chaos v3 and Chaos Mesh v2. Covers fault injection (pod-delete, network-loss,…