Skip to content

Document K8s agent storage: SELinux spc_t, custom RWO class, CSI IAM#3246

Open
NickJosevski wants to merge 2 commits into
mainfrom
nickjosevski/dev-299-guides-for-kubernetes-agent-storage-class-options
Open

Document K8s agent storage: SELinux spc_t, custom RWO class, CSI IAM#3246
NickJosevski wants to merge 2 commits into
mainfrom
nickjosevski/dev-299-guides-for-kubernetes-agent-storage-class-options

Conversation

@NickJosevski

Copy link
Copy Markdown
Contributor

What & why

Improves Kubernetes agent Storage guidance for scenarios customers hit but that were undocumented — surfaced by DEV-299 (Credit One Bank, via Dustin), where setting up the agent with EBS/gp3 on EKS required several steps with no docs coverage.

All edits are in src/pages/docs/kubernetes/targets/kubernetes-agent/storage.md:

  • SELinux-enforced clusters (OpenShift, EKS on Bottlerocket / Amazon Linux 2023): new section documenting agent + scriptPods securityContext.seLinuxOptions.type: spc_t, with both YAML and --set forms, plus the OpenShift SCC alternative. This exact workaround ({"seLinuxOptions":{"type":"spc_t"}}) was previously undocumented anywhere.
  • Custom ReadWriteOnce StorageClass (e.g. EBS gp3, Azure Disk): clarifies it's valid alongside the RWX multi-node case, and that it still co-locates script pods on the Tentacle node.
  • Cloud CSI driver IAM/trust prerequisites: IRSA on EKS, Workload Identity on GKE, plus a cross-link to the existing scriptPod service-account annotation guidance.

Verification

Tested end-to-end against the octopusdeploy/kubernetes-agent Helm chart v3.8.1:

  • helm template confirms every value path renders correctly onto the agent pod securityContext, the PVC (ReadWriteOnce + custom storageClassName), and the tentacle OCTOPUS__K8STENTACLE__PODSECURITYCONTEXTJSON env that carries the script-pod security context.
  • Live install on a local (OrbStack) cluster: a custom RWO StorageClass produced a Bound RWO PVC that the tentacle pod mounted at /octopus, and the API server accepted the spc_t securityContext on the live pod.

Not reproducible on the local cluster: actual SELinux enforcement (OrbStack nodes aren't SELinux-enforcing) — the config is verified valid and accepted end-to-end; the enforcement effect is OS/cloud-specific, which the wording is scoped to.

Notes

  • Adds Bottlerocket, IRSA, SELinux to dictionary-octopus.txt for spellcheck.
  • Deliberately not included: the larger per-provider setup tutorials (EKS/AKS/GKE/OpenShift) from the original request — that's the SME-heavy piece that led to DEV-299 being canceled. These edits deliver most of the practical value without it.

🤖 Generated with Claude Code

Addresses DEV-299 (Kubernetes agent storage class setup). Adds guidance
for scenarios customers hit but that were undocumented:

- SELinux-enforced clusters (OpenShift, EKS Bottlerocket/AL2023): document
  agent + scriptPods securityContext seLinuxOptions type spc_t, with YAML
  and --set forms, plus the OpenShift SCC alternative.
- Custom ReadWriteOnce StorageClass (e.g. EBS gp3, Azure Disk), clarifying
  it is valid alongside the RWX multi-node case and still co-locates script
  pods on the Tentacle node.
- Cloud CSI driver IAM/trust prerequisites (IRSA on EKS, Workload Identity
  on GKE) and a cross-link to the scriptPod service account annotation.

Verified end-to-end against kubernetes-agent Helm chart v3.8.1: helm
template confirms the value paths render onto the agent pod, PVC, and the
tentacle PODSECURITYCONTEXTJSON env; a live install on a local cluster
confirmed a custom RWO PVC binds and mounts and the API server accepts the
spc_t securityContext.

Adds Bottlerocket, IRSA, SELinux to the spellcheck dictionary.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Editing storage.md brought the whole file into the spellcheck diff,
surfacing the pre-existing `skuname` word in the Azure Files section.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@team-marketing-branch-protections

Copy link
Copy Markdown

Pull request environment is available at https://stoctodocspr3246.z22.web.core.windows.net.

You can view the ephemeral environment status in Octopus Deploy.

This environment will be automatically deprovisioned when the pull request is closed, or after 7 days of inactivity.

@steve-fenton-octopus steve-fenton-octopus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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.

3 participants