The Simplest Way to Make Crossplane and Pagerduty Work Like They Should

Published
Length
4 min read

Luis Felipe Dias

All posts

Crossplane and Pagerduty work together to manage incident response rules straight from Kubernetes. You define cloud resources in code, and the system sets up alert schedules right away. Teams often build cloud databases and queues faster than they set up alerts. When a new app goes live without an on-call schedule, outages go unseen. Tying these two tools together fixes that gap at the start. Every time a team spins up a new database, the cluster also builds the alert path. Engineers do not nee

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.

Crossplane and Pagerduty work together to manage incident response rules straight from Kubernetes. You define cloud resources in code, and the system sets up alert schedules right away.

Teams often build cloud databases and queues faster than they set up alerts. When a new app goes live without an on-call schedule, outages go unseen. Tying these two tools together fixes that gap at the start. Every time a team spins up a new database, the cluster also builds the alert path. Engineers do not need to click through web menus to link a new service to a team schedule. The control plane reads the desired state and makes the right API calls on its own.

How crossplane and pagerduty share keys and state

To make crossplane and pagerduty talk, you install a provider package in your cluster. This provider runs as a controller pod inside your control plane. It watches custom objects that describe your services, teams, and alert policies.

The controller needs an API key to make changes in your alert account. You store this key inside a standard Kubernetes secret in a locked namespace. The provider reads the key and sends web requests to the external API. When an engineer writes a manifest for a new service, the controller reads that file. It then checks if that service already exists in the incident platform.

If the service is missing, the controller sends a write request to create it. The API sends back a unique ID and an integration key for that new service. The controller saves that integration key into a new cluster secret for your monitoring tools. It also runs a loop to check if anyone changed the settings by hand. If someone edits a schedule in the web UI, the controller puts it back to match your code.

Common failure modes and how to scope roles

The biggest risk in this setup comes from using one wide API key. Many teams create a single admin token and give it to the cluster controller. If an attacker reads that cluster secret, they can delete all your incident rules. They can also read phone numbers and emails from your user profiles. A shared service account also makes audit logs hard to read during a security review. Every single change in the incident log looks like it came from the same bot user.

Another common issue is hitting rate limits when the cluster checks too many objects at once. If hundreds of services sync at the same minute, the API blocks the requests. Your alert rules then fall out of sync with your actual cloud apps. Unlogged queries from the cluster also leave blind spots for your security team.

Crossplane Composition Security + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

You can fix these risks by scoping down your keys and network paths. Instead of one global key, create scoped tokens for each team or namespace. Give each provider config only the rights it needs to manage its own team services. Lock down Kubernetes role rules so developers cannot read the secrets that hold API tokens. Set up network policies so only the provider pod can send traffic out to the incident API. You should also slow down the sync timer on the controller so it does not flood the remote server.

Building a clean workflow for new services

A clean setup pairs your cloud resources and alert rules into one template. Platform teams use compositions to bundle a database, a monitoring rule, and an incident service together. Developers only fill out a short claim file with their app name and team name. They do not need to know how the alert API works under the hood.

When a developer merges that small file to Git, the cluster starts to work. It builds the cloud storage and sets up the alert target at the same time. The output key from the incident tool flows straight into the cluster monitoring agent. If the new database runs out of disk space ten minutes later, the right engineer gets a page. When the team deletes the app later, the cluster cleans up the old alert rules too. This keeps your incident account clean and free of dead services.

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

What happens if the cluster loses network access to the incident API?

Existing alert rules keep working in the cloud because they live on the external platform. The cluster controller simply waits and retries its sync loop until the network path comes back.

How do we stop the controller from overwriting urgent manual schedule changes?

Keep human shift swaps out of your cluster manifests and only manage base services and escalation paths in code. You can also set the management policy on a resource to observe only during an active outage.

Where should we store the integration keys that the provider creates?

Configure the managed resource to write connection outputs directly to a Kubernetes secret in the app namespace. Your alert manager can then mount that secret and send alerts without exposing the token in Git.

The query runs. The emails stay hidden.