Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a container wrapper op with Default GCP auth #310

Closed
IronPan opened this issue Nov 19, 2018 · 4 comments
Closed

Create a container wrapper op with Default GCP auth #310

IronPan opened this issue Nov 19, 2018 · 4 comments
Assignees

Comments

@IronPan
Copy link
Member

IronPan commented Nov 19, 2018

Currently to create a container op with default GCP service account mounted, one need to

op =  dsl.ContainerOp(name = foo,image = 'gcr.io/bar')
op.set_volumes([k8s_client.V1Volume(name='gcp-credentials', secret=k8s_client.V1SecretVolumeSource(secret_name='user-gcp-sa'))])
op.set_volume_mounts([k8s_client.V1VolumeMount(mount_path='/secret/gcp-credentials', name='gcp-credentials')])
op.set_env_variables([k8s_client.V1EnvVar(name='GOOGLE_APPLICATION_CREDENTIALS',value='/secret/gcp-credentials/user-gcp-sa.json')]) 

We can provide a strongly typed op to wraps this

@Ark-kun
Copy link
Contributor

Ark-kun commented Dec 18, 2018

Fixed in #430

@Ark-kun
Copy link
Contributor

Ark-kun commented Dec 18, 2018

/close

@k8s-ci-robot
Copy link
Contributor

@Ark-kun: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

1 similar comment
@k8s-ci-robot
Copy link
Contributor

@Ark-kun: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants