The Simplest Way to Make Jetty and Tekton Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use jetty and tekton together to build, test, and ship Java web apps on Kubernetes. Tekton runs the build pipeline in pods, while Jetty hosts the compiled web app in runtime containers. This pairing keeps web builds fast and portable across clusters. A pipeline task compiles the Java source, packages the archive, and builds a container image with Jetty inside. When the pipeline finishes, the cluster starts the new Jetty pods to serve user traffic. How login keys, roles, and data flow be

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 jetty and tekton together to build, test, and ship Java web apps on Kubernetes. Tekton runs the build pipeline in pods, while Jetty hosts the compiled web app in runtime containers.

This pairing keeps web builds fast and portable across clusters. A pipeline task compiles the Java source, packages the archive, and builds a container image with Jetty inside. When the pipeline finishes, the cluster starts the new Jetty pods to serve user traffic.

How login keys, roles, and data flow between jetty and tekton

Data moves between these two tools in three clear stages during a standard pipeline run. First, a Tekton task reads source code from a Git repo and compiles the Java files. Second, the task packs the web archive into a base image that runs the Jetty server. Third, a deploy task pushes that image to a registry and updates the cluster workload.

Identity and permissions matter at every single step of this build and deploy flow. Tekton tasks run under a Kubernetes service account attached to the pipeline pod. That service account needs permission to push images to your container registry. It also needs role rules to update the Jetty deployment in the target namespace.

Once the Jetty pod starts, it uses its own separate service account to run the web app. Jetty reads startup settings and database keys from mounted secrets or environment variables. It also uses TLS certs to encrypt web traffic between clients and the Java server. Keeping build identities separate from runtime identities prevents pipeline tasks from reading production database data.

Common failure modes and how to scope roles and network paths

Many teams hit trouble when they share one service account between build tasks and live apps. If a Tekton runner and a Jetty pod share a role, the build pod gains live database rights. A broken script or bad dependency in the build can then touch production data. Overbroad cluster admin tokens in pipeline tasks create a huge blast radius during a breach.

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

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Unlogged changes and secret sprawl cause another common set of failures for platform teams. Engineers often paste static registry keys or admin passwords right into pipeline task definitions. When a build fails or a Jetty pod crashes, teams end up running manual shell commands in pods. Without clear audit logs on those commands, you cannot see who changed a server setting.

You can fix these gaps by scoping both identity roles and network paths between the two tools. Give the Tekton build account rights to push images and update only one specific namespace. Give the Jetty runtime account read rights to only the secrets needed for that single web app. Rotate registry keys and TLS certs on a strict schedule so old credentials expire fast.

Lock down network paths with Kubernetes network policies in both the build and runtime namespaces. Allow Tekton pods to reach only the Git host, package mirror, and container registry. Block Tekton pods from talking to internal databases or live Jetty backend ports. On the runtime side, allow ingress controllers to reach Jetty ports while blocking outbound calls to unknown hosts.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.

Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

Should Tekton deploy war files directly to a running Jetty server?

No, copying files into a live server causes drift across pods. Instead, have Tekton build an immutable container image with Jetty and the web archive baked in.

How should we pass database keys to Jetty during a Tekton deploy?

Never store database keys inside Tekton pipeline definitions or container images. Let Tekton deploy the pod spec, and mount keys into Jetty at runtime from a secret store.

How can we limit what a Tekton task can change in a Jetty namespace?

Bind the Tekton service account to a scoped Kubernetes Role in the target Jetty namespace. Grant write permissions only on deployments and services, and block access to secrets.

The query runs. The emails stay hidden.