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

feat: enabling workflow identity for GKE #593

Merged
merged 9 commits into from
Apr 23, 2020
Merged

Conversation

chaseterry
Copy link
Contributor

Added enableWorkflowIdentity flag to PubSubEventSource.
Added Workflow Identity toggle in gcp-pubsub gateway based on enableWorkflowIdentity flag.

Closing #503

@chaseterry chaseterry changed the title enabling workflow identity for GKE feat: enabling workflow identity for GKE Apr 15, 2020
# Empty credentials file when using Workflow Identity
credentialsFile: ""
# If enableWorkflowIdentity is true, the projects uses Workflow Identity for authentication
enableWorkflowIdentity: true
Copy link
Member

Choose a reason for hiding this comment

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

Can we do something like:

if len(credentialsFile) == 0 {
// consider it is using workload identity
} else {
//
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That would make it simpler, but I think it's helpful to include the enableWorkflowIdentity flag to inform users that Workflow Identity is an option

Copy link
Member

Choose a reason for hiding this comment

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

I think informing the users that Workflow Identity is supported in the doc might be better than in the code.

@VaibhavPage VaibhavPage self-requested a review April 22, 2020 21:14
Copy link
Contributor

@VaibhavPage VaibhavPage left a comment

Choose a reason for hiding this comment

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

The tests will fail, this line https://github.com/argoproj/argo-events/blob/gke-workload-identity/gateways/server/gcp-pubsub/validate.go#L68 , you need to update validate method. Make sure to run make test.

@@ -65,8 +66,5 @@ func validate(eventSource *v1alpha1.PubSubEventSource) error {
if eventSource.Topic == "" {
return fmt.Errorf("must specify topic")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

You want to check if the EnableWorkloadIdentity is set to true, if so, then its fine to not have credentialsFile else it is required to have the credentialsFile.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link
Contributor

@VaibhavPage VaibhavPage left a comment

Choose a reason for hiding this comment

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

LGTM

@chaseterry chaseterry merged commit be49e97 into master Apr 23, 2020
@VaibhavPage VaibhavPage deleted the gke-workload-identity branch May 5, 2020 18:36
juliev0 pushed a commit to juliev0/argo-events that referenced this pull request Mar 29, 2022
* enabling workflow identity for GKE

* Updated gcp-pubsub-workflow-identity.yaml to remove unneccesary double quotes

* updating gcp-pubsub-workflow-identity.yaml

* removed extra pubsub client

* updated gcp pubsub validate

* update gcp pubsub validate

* condense gcp pubsub examples
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.

None yet

3 participants