This guide explains how to set up secrets in Google Cloud Secret Manager for the PlayMeme Helm chart deployment.
gcloud services enable secretmanager.googleapis.com$PASSWORD = -join ((48..57) + (65..90) + (97..122) | Get-Random -Count 32 | ForEach-Object {[char]$_})
echo -n $PASSWORD | gcloud secrets create playmeme-postgres-password --data-file=- --replication-policy="automatic"Create the admin wallets secret (comma-separated list of Solana wallet addresses):
# Replace with your actual admin wallet addresses
$ADMIN_WALLETS = "wallet1_address,wallet2_address,wallet3_address"
echo -n $ADMIN_WALLETS | gcloud secrets create playmeme-admin-wallets --data-file=- --replication-policy="automatic"Important:
- Use comma-separated wallet addresses (no spaces, or trim spaces)
- Example:
"ABC123...,XYZ789...,DEF456..." - These wallets will have admin access to the admin panel and can update configuration values
Grant the Secret Manager Secret Accessor role to your GKE service account. The default compute service account uses your project number:
$PROJECT_ID = "your-project-id"
$PROJECT_NUMBER = gcloud projects describe $PROJECT_ID --format="value(projectNumber)"
$GKE_SA = "$PROJECT_NUMBER-compute@developer.gserviceaccount.com"
gcloud projects add-iam-policy-binding $PROJECT_ID `
--member="serviceAccount:$GKE_SA" `
--role="roles/secretmanager.secretAccessor"Note: If your GKE cluster uses a custom service account, find it with:
gcloud container clusters describe CLUSTER_NAME --zone=ZONE --format="value(nodeConfig.serviceAccount)"Then grant the role to that service account instead.
After deploying with Helm, verify secrets are mounted:
# Check SecretProviderClass
kubectl get secretproviderclass
# Check Kubernetes secrets created by CSI driver
kubectl get secrets | grep playmeme
# Verify pods can access secrets
kubectl describe pod -l app=playmeme-backend | grep -A 5 "Mounts:"- Verify secret name in
values.yamlmatches the secret in GCP Secret Manager - Check that
gcp.projectIdis set correctly invalues.yaml
- Ensure the service account has
roles/secretmanager.secretAccessorrole - Verify the service account email matches your GKE cluster's service account