Notice something off about this package? Help us keep the marketplace safe and trustworthy by reporting inappropriate content or behavior.
Report this packageA Crossplane Configuration for setting up GCP Workload Identity to enable Kubernetes workloads to authenticate with Google Cloud services using service accounts.
This Configuration provides a Composite Resource Definition (XRD) and Composition for automating the setup of GCP Workload Identity, which allows Kubernetes pods to authenticate to Google Cloud services without storing service account keys.
The configuration automates:
This Configuration requires:
Install this Configuration using the Crossplane CLI:
kubectl crossplane install configuration ghcr.io/livewyer-ops/crossplane-configuration-gcp-workload-identity:latest
Or create a Configuration resource:
apiVersion: pkg.crossplane.io/v1
kind: Configuration
metadata:
name: gcp-workload-identity
spec:
package: ghcr.io/livewyer-ops/crossplane-configuration-gcp-workload-identity:latest
Create a WorkloadIdentity resource:
apiVersion: gcp.livewyer.io/v1alpha1
kind: WorkloadIdentity
metadata:
name: my-app-workload-identity
namespace: default
spec:
forProvider:
projectId: my-gcp-project
serviceAccountName: my-app
roles:
- roles/storage.objectViewer
- roles/cloudsql.client
additionalProjects:
- projectId: another-project
roles:
- roles/secretmanager.secretAccessor
| Parameter | Required | Description |
|---|---|---|
projectId | Yes | GCP project ID where the service account will be created |
roles | Yes | List of IAM roles to grant in the primary project |
serviceAccountName | No | Name for the Kubernetes Service Account |
serviceAccountNamespace | No | Namespace for the Kubernetes Service Account (defaults to resource namespace) |
additionalProjects | No | List of additional projects with roles to grant access |
automountServiceAccountToken | No | Enable automatic token mounting (default: true) |
See the examples/ directory for more usage examples:
Build the Configuration package using the Crossplane CLI:
crossplane xpkg build
With custom options:
crossplane xpkg build --package-root=. --package-file=gcp-workload-identity.xpkg --examples-root=./examples
Login to your registry:
crossplane xpkg login
Push the package:
crossplane xpkg push -f gcp-workload-identity.xpkg your-org/crossplane-configuration-gcp-workload-identity:v1.0.0
MIT License - see LICENSE for details
Maintained by Livewyer - bowen@livewyer.com