quick-tent-21350
05/22/2023, 9:29 AMMETAFLOW_KUBERNETES_SERVICE_ACCOUNT=metaflow-metaflow-service. Then, we used that env var METAFLOW_DATASTORE_SYSROOT_GS=<gs://metaflow-storage> to define our GCP bucket. Now, when we are running the HelloCloudFlow script (python hello.py run) with the @kubernetes annotation, a new pod is being spawned in our cluster that uses the above-mentioned service account (we have checked it by describing the pod) but we are getting this error: Caller does not have storage.objects.get access. How else can we authorize that spawned job pod to have access to our GS bucket if the service account itself doesn’t work? We cannot find any other information regarding this issue in the metaflow docs.
Thanksancient-application-36103
05/22/2023, 3:20 PMuser
05/22/2023, 4:11 PMMETAFLOW_KUBERNETES_SERVICE_ACOCUNT=K in the generated metaflow config.json.
It sounds like you would like to bring your own GSA G2 / KSA K2. The simplest way would be to examine how existing G / K are setup in the metaflow-tools terraform templates today, and replicate that (with the divergences you need on G2's perms).
Other alternatives usually involves you injecting GSA creds into the pod through some other mechanism. E.g. METAFLOW_KUBERNETES_SECRETS=X means the k8s secret X will have its keys injected as environment variables of the metaflow task pod.