Documentation
¶
Overview ¶
pkg/provider/google/provider.go
Google Cloud provider for Orkestra.
Handles the "google" block in Katalog declarations. Uses the official Google Cloud Go SDKs.
Supported resource kinds:
gcs — Google Cloud Storage bucket (create, set labels, delete) pubsub — Pub/Sub topic (create, set labels, delete) and subscription (create, delete) cloudsql — Cloud SQL instance (create, update tier, delete — PostgreSQL / MySQL)
Installation:
go get cloud.google.com/go/storage go get cloud.google.com/go/pubsub go get google.golang.org/api/sqladmin/v1 go get golang.org/x/oauth2/google
Registration:
p, err := googleprovider.NewFromAuth(ctx, auth) registry.Register(p)
Auth keys (providers[].auth block):
project — GCP project ID (required) credentialsFile — path to service account JSON (default: ADC / GOOGLE_APPLICATION_CREDENTIALS) credentialsJSON — inline service account JSON (alternative to credentialsFile)
Application Default Credentials (ADC) are used when no explicit credentials are provided. This means the provider works out of the box on GKE with Workload Identity.
Katalog:
providers:
- name: google
required: true
auth:
project: "$GCP_PROJECT"
operatorBox:
providers:
google:
- gcs:
name: "{{ .metadata.name }}-{{ .metadata.namespace }}"
location: US
storageClass: STANDARD
uniformAccess: "true"
- pubsub:
topic: "{{ .metadata.name }}-events"
subscription: "{{ .metadata.name }}-events-sub"
ackDeadline: "20"
- cloudsql:
name: "{{ .metadata.name }}-db"
databaseVersion: POSTGRES_15
tier: db-f1-micro
region: us-central1
when:
- field: spec.needsDatabase
equals: "true"
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements orktypes.Provider for the "google" block.
func New ¶
New creates a Google Cloud provider for the given project using Application Default Credentials.
func NewFromAuth ¶
NewFromAuth creates a Google Cloud provider from a Katalog auth map. Keys: project, credentialsFile, credentialsJSON.