We’re runnign flyte on GCP. When I click on the St...
# ask-the-community
a
We’re runnign flyte on GCP. When I click on the Stackdriver logs link on a given task in the console, it brings me to the log explorer in GCP, but in the url of the link, it has
project=
with no project populated. This means it takes me to the last project I was on, which often isn’t the flyte project. Is there a way to populate that in the url so that it takes me to correct project each time?
the bot recommended adding the project here, which I’m trying out
Copy code
task_logs:
  plugins:
    k8s-array:
      logs:
        config:
          stackdriver-enabled: true
          stackdriver-logresourcename: k8s_container
          gcp-project: <OUR PROJECT>
Looks like that ended up working. I also added
gcp-project
under
task_logs.plugins.logs
, not sure which of the two successfully changed it
y
if it works then it works, but looking at the plugin it looks like those fields are deprecated. https://github.com/flyteorg/flyte/blob/ef8fe40ef2cfe7442acbcecc7869e0fe748c4f3c/flyteplugins/go/tasks/logs/config.go#L25
a
Interesting, good to know. I’ll check out that thread, thanks!
y
though i’m not sure the gcpproject has a {{ }} template variable, so you’ll have to just write it into the template string. the default that the thread mentioned is here: https://github.com/flyteorg/flyte/blob/ef8fe40ef2cfe7442acbcecc7869e0fe748c4f3c/flyteplugins/go/tasks/logs/logging_utils.go#L110
a
Do you mean adding something similar to
{{ .podName }}
? Sorry I’m not quite following how that line works
It looks like the %s should pull from
cfg.GCPProjectName
, though I’m not sure where that value is set. edit: Oh, I think that’s what you’re saying is deprecated..