Skip to content

add workload identity docs#223

Merged
jennybc merged 5 commits into
r-lib:mainfrom
MarkEdmondson1234:workload-id-docs
Jan 27, 2023
Merged

add workload identity docs#223
jennybc merged 5 commits into
r-lib:mainfrom
MarkEdmondson1234:workload-id-docs

Conversation

@MarkEdmondson1234

@MarkEdmondson1234 MarkEdmondson1234 commented Nov 21, 2022

Copy link
Copy Markdown
Contributor

Closes #197, relates to #222

@jennybc jennybc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much for this! I made a few comments inline.

Once we resolve those conversations and this is "done", I will do one round of copy edits and do stuff like "one sentence per line", FYI. And then I'll merge it.

Comment thread vignettes/non-interactive-auth.Rmd Outdated
Comment thread vignettes/non-interactive-auth.Rmd Outdated
iam.gke.io/gcp-service-account=my-service-key@my-project.iam.gserviceaccount.com
```

This key will now be available to add to pods within the cluster. For Airflow, you can pass them in using the `GKEPodOperator(...., namespace='my-namespace', service_account_name='bq-service-account')`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the call to GKEPodOperator() R code? If so, can you add namespace qualification, e.g. pkg::fcn()?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not, its Airflow code and now I look its recently updated to GKEStartPodOperator - I will update the example with a link https://github.com/GoogleCloudPlatform/python-docs-samples/blob/HEAD/composer/workflows/gke_operator.py

Comment thread vignettes/non-interactive-auth.Rmd Outdated
# code within the Docker container

options(gargle.gce.use_ip = TRUE)
gargle::credentials_gce("my-service-key@my-project.iam.gserviceaccount.com")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be a call to PKG_auth(service_account = "my-service-key@my-project.iam.gserviceaccount.com"), yeah? If the PKG package is using gargle in the standard way, then I think this should "just work" and is using higher-level, more user-facing functions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'm stuck a bit with my "old" way to be sure which auth method is used, but the preferred way you specify should be encouraged

@jennybc

jennybc commented Nov 22, 2022

Copy link
Copy Markdown
Member

@MarkEdmondson1234 So do you consider this done and I am free to make more cosmetic / stylistic changes and merge?

@MarkEdmondson1234

Copy link
Copy Markdown
Contributor Author

Yes please do

@jennybc jennybc merged commit ed21af6 into r-lib:main Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to run Workload Identity on GKE

2 participants