The Simplest Way to Make Jenkins and Portworx Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use jenkins and portworx to run build jobs with safe container storage. Jenkins runs the build steps while Portworx keeps the disk data safe across nodes. This pairing lets build agents start fast and keep their cached files. When a node fails, a new build pod mounts the exact same volume right away. How jenkins and portworx share keys and data Jenkins runs a main server that starts short worker pods on a cluster. Each worker pod needs a disk volume to hold code and build files. Portw

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Teams use jenkins and portworx to run build jobs with safe container storage. Jenkins runs the build steps while Portworx keeps the disk data safe across nodes.

This pairing lets build agents start fast and keep their cached files. When a node fails, a new build pod mounts the exact same volume right away.

How jenkins and portworx share keys and data

Jenkins runs a main server that starts short worker pods on a cluster. Each worker pod needs a disk volume to hold code and build files.

Portworx pools the disks across your cluster nodes into one shared store. When Jenkins asks Kubernetes for a disk, Portworx creates and attaches that volume.

The two tools talk through cluster roles and storage claims. Jenkins uses a cluster service account to ask the cluster API for new pods and disks.

Portworx checks its own role rules and secret keys before it mounts the volume. If the keys match, the worker pod gets read and write rights on the disk.

Data flows from the build job right onto the mounted block volume. Portworx copies those blocks to other nodes so no single disk crash loses build data.

Teams also use Portworx snapshots during test runs. A Jenkins job can trigger a snapshot of a test database volume before it runs a new build.

Common risks with shared accounts and wide tokens

Many teams give the Jenkins service account full admin rights on the cluster. That wide token lets any build job read or delete any Portworx volume.

A bad script in one build pipeline could wipe out shared volumes for other teams. Shared service accounts also make it hard to see who ran a bad command.

Another common bug happens when old worker pods do not let go of their disks. If a job crashes hard, the volume lock can stay stuck on a dead node.

Jenkins Pipeline Security + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

The next build job then hangs while it waits for the disk to mount. Teams often fix this by hand with broad admin keys that nobody tracks in logs.

Unlogged storage actions create big blind spots during a security review. You can see that a volume changed, but you do not know which user did it.

Volume snapshots can also hold live customer data from test databases. Without data masking to rewrite emails, phone numbers, or card numbers, build logs might leak raw records.

Scoping roles and network paths between both tools

Start by giving each team folder in Jenkins its own Kubernetes namespace. Create a dedicated service account in each namespace with small, tight role rules.

Map each service account to a specific Portworx storage class. This step stops a build job in one group from mounting disks owned by another group.

Never store long-lived admin tokens inside Jenkins job scripts. Use short-lived cluster tokens that expire as soon as the build step finishes.

Lock down the network path between worker pods and the storage control plane. Worker pods only need to mount their assigned disk, not call the storage admin API.

Use Kubernetes network rules to block build pods from talking to storage management ports. Only the cluster control plane and trusted operators should reach those ports.

Set clear volume limits so a runaway build cannot fill the whole storage pool. Put strict quotas on disk size and snapshot counts for every build namespace.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Why do Jenkins build pods get stuck waiting for a Portworx volume?

A crashed pod can leave a stale volume lock on an old node. Check that the old pod is fully gone so Portworx can move the mount.

Should every Jenkins agent share one large Portworx volume?

No, sharing one big volume across all jobs creates file lock clashes and security risks. Give each build pipeline its own scoped volume claim instead.

How can teams protect sensitive data inside Portworx test snapshots?

Restrict snapshot access by namespace and apply masking to rewrite emails, phone numbers, and national IDs in query results during test runs.

The query runs. The emails stay hidden.