The Simplest Way to Make Cloud Run and Linstor Work Like They Should
Pairing cloud run and linstor lets stateless apps talk to persistent block storage clusters. Cloud Run runs your frontend apps while Linstor manages storage volumes on your servers. This setup helps teams scale web tasks fast while keeping data safe on disks. Serverless containers cannot attach raw block devices on their own. Instead, your Cloud Run app calls an API or storage controller over a private network. That controller manages Linstor volumes for your stateful backend services. How da
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.
Pairing cloud run and linstor lets stateless apps talk to persistent block storage clusters. Cloud Run runs your frontend apps while Linstor manages storage volumes on your servers.
This setup helps teams scale web tasks fast while keeping data safe on disks. Serverless containers cannot attach raw block devices on their own. Instead, your Cloud Run app calls an API or storage controller over a private network. That controller manages Linstor volumes for your stateful backend services.
How data and roles flow between cloud run and linstor
Cloud Run runs containers that spin up and down based on user traffic. Linstor manages replicated block storage volumes across a group of Linux hosts. Because Cloud Run is stateless, it does not mount Linstor disks directly to containers. Instead, Cloud Run talks to the Linstor controller API or a middle data service.
To make this work, you first link your serverless app to your private network. You use a private network connector so traffic stays off the public internet. Your Cloud Run service uses a Google Cloud service account for its identity. That identity proves who the app is before it sends requests across the network.
On the other side, the Linstor controller listens for API calls from trusted hosts. You set up client certificates or token checks on the Linstor controller API. When a Cloud Run task needs to provision or check a volume, it sends a request. The controller checks the key, runs the storage task, and returns the status.
Database nodes or file servers on virtual machines mount the actual Linstor block volumes. Cloud Run apps then read and write data by talking to those stateful servers. This split keeps your web tier fast and your storage tier redundant.
Common failure modes and how to scope network paths
Many teams make mistakes when they first link serverless apps to storage controllers. The most common error is using one shared API key for every Cloud Run service. If one app leaks that key, an attacker can delete volumes across the cluster. Another bad habit is opening the Linstor controller port to the whole internal network.
End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Unlogged requests also create huge blind spots during an outage or security audit. When five services share one account, your logs cannot show which app changed a volume. You also risk data loss if a test app talks to a live storage pool.
You can fix these risks by scoping down both network paths and user roles. Give each Cloud Run app its own service identity and its own client certificate. Set strict firewall rules so only specific Cloud Run subnets reach the Linstor controller port. Block all other apps from talking to the storage management API.
If your Cloud Run apps talk to databases backed by Linstor, lock down those paths too. Create separate database users for each app with read or write rules as needed. Turn on data masking to rewrite sensitive fields like emails, phone numbers, or card numbers in query results.
Managing storage operations and audit logs
Good operations need clear logs for every storage change and data query. When an engineer or an app creates a volume, you need to know who did it. Standardize how your team and your apps reach the Linstor API and backend databases.
Do not let developers store long-lived Linstor certificates on their laptops for manual fixes. Route human tasks and automated scripts through a single check point that logs every action. Keep production storage pools separate from staging pools at the network level. Review your access logs each week to spot strange volume changes or failed logins.
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
Can Cloud Run mount a Linstor block volume directly?
No, Cloud Run containers cannot mount raw block devices or run kernel modules. Cloud Run talks to the Linstor API for management or connects to servers that mount the volumes.
How should Cloud Run reach a private Linstor cluster?
Use a private VPC connector in Google Cloud to route traffic over internal IP addresses. Pair this with strict firewall rules that only allow traffic to the Linstor controller port.
How do we secure Linstor API calls from serverless apps?
Use mutual TLS client certificates or scoped API tokens stored in a secret manager. Give each Cloud Run service a unique identity and rotate those secrets on a set schedule.
Related guides
In this post