-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add gcp secret parameter to container op #261
Conversation
/assign @gaoning777 @Ark-kun |
Pull Request Test Coverage Report for Build 363
💛 - Coveralls |
sdk/python/kfp/compiler/compiler.py
Outdated
@@ -144,6 +144,17 @@ def _op_to_template(self, op): | |||
if op.cpu_request: | |||
template['container']['resources']['requests']['cpu'] = op.cpu_request | |||
|
|||
if op.gcp_secret: | |||
template['container']['env'] = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
template['container']['env'] = [
{
'name': 'GOOGLE_APPLICATION_CREDENTIALS',
'value': '/secret/gcp-credentials/user-gcp-sa.json',
},
]
template['container']['volumeMounts'] = [
{
'name': 'gcp-credentials',
'mountPath': '/secret/gcp-credentials',
},
]
template['volumes'] = [
{
'name': 'gcp-credentials',
'secret': {
'secretName': op.gcp_secret,
}
},
]
golden_output = { | ||
'container': { | ||
'image': 'image', | ||
'args': [ | ||
'echo {{inputs.parameters.msg1}} {{inputs.parameters.msg2}} | tee /tmp/message.txt' | ||
], | ||
'command': ['sh', '-c'], | ||
'env': { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you test running this pipeline?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please create the secret in your cluster, compile a pipeline, submit it to the cluster and check for errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with Alexey for testing it manually before merging
It would be great to have an integration test for this in future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gaoning777 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
1 similar comment
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gaoning777 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/approve cancel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting for the test results.
Added issue about per-container volumes to Argo argoproj/argo-workflows#1094 |
/lgtm |
/test presubmit-e2e-test |
…w#261) * Add a python function to GC old Argo workflows and cloud endpoints kubeflow/testing#53 GC old Argo Workflows kubeflow/testing#87 cron job to GC old resources. kubeflow/testing#268 Maximum number of services reached. * Fix lint. * Revert files that shouldn't be checked in. * Fix loop termination criterion.
* Add support for response in OpenAPI * Add unit tests for responses * Update E2E tests for responses * Cleanup * Add panic for unexpected error * Encapsulate req + resp schemas * Update tests for new Schema params and templatize * Rm newline
…#261) * update scheduledworkflow image to run with pipelinerun * update complete label to based on PersistedFinalState
This would allow specifying gcp secret to the container, for accessing all GCP API.
This change is