aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2025-06-12 15:54:42 +0200
committerAleksandr Nogikh <nogikh@google.com>2025-06-13 12:28:02 +0000
commit1f72c409b75ea2adfb5410615b8fffd7f91b2690 (patch)
treef0e69fb6bb31ccd6622fffc19f9149ab948a00cc
parentf91459f0d77a22c0b1a4653a25e571f92d290637 (diff)
syz-cluster: fix migrate.job.yaml for local deployments
Use env from the global k8s configmap instead of requiring the user to pass the parameters explicitly. Set the missing labels that denied access from db-mgmt ot the Spanner emulator.
-rw-r--r--syz-cluster/Makefile2
-rw-r--r--syz-cluster/db-mgmt/migrate-job.yaml10
2 files changed, 8 insertions, 4 deletions
diff --git a/syz-cluster/Makefile b/syz-cluster/Makefile
index 59ae93591..b3eb340b3 100644
--- a/syz-cluster/Makefile
+++ b/syz-cluster/Makefile
@@ -97,7 +97,7 @@ k8s-config-dev:
k8s-config-gke: ensure-spanner-database-uri-env ensure-blob-storage-env ensure-workflow-artifacts-bucket
@kubectl kustomize ./overlays/gke/ | sed $(SED_EXPRESSIONS)
-migrate-job.yaml: ensure-spanner-database-uri-env
+migrate-job.yaml:
@cat db-mgmt/migrate-job.yaml | sed $(SED_EXPRESSIONS)
fetch-kernels-once.yaml:
diff --git a/syz-cluster/db-mgmt/migrate-job.yaml b/syz-cluster/db-mgmt/migrate-job.yaml
index 30e29385c..e10572a7d 100644
--- a/syz-cluster/db-mgmt/migrate-job.yaml
+++ b/syz-cluster/db-mgmt/migrate-job.yaml
@@ -9,13 +9,17 @@ spec:
ttlSecondsAfterFinished: 86400
backoffLimit: 0
template:
+ metadata:
+ labels:
+ app: db-mgmt
spec:
serviceAccountName: gke-db-admin-ksa
containers:
- name: migrate
image: ${IMAGE_PREFIX}db-mgmt:${IMAGE_TAG}
- env:
- - name: SPANNER_DATABASE_URI
- value: "${SPANNER_DATABASE_URI}"
+ imagePullPolicy: IfNotPresent
+ envFrom:
+ - configMapRef:
+ name: global-config-env
args: ["migrate"]
restartPolicy: Never