-
Notifications
You must be signed in to change notification settings - Fork 726
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
Conversation
# Empty credentials file when using Workflow Identity | ||
credentialsFile: "" | ||
# If enableWorkflowIdentity is true, the projects uses Workflow Identity for authentication | ||
enableWorkflowIdentity: true |
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.
Can we do something like:
if len(credentialsFile) == 0 {
// consider it is using workload identity
} else {
//
}
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.
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
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.
I think informing the users that Workflow Identity is supported in the doc might be better than in the code.
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.
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") | |||
} |
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.
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.
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.
fixed
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
* 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
Added enableWorkflowIdentity flag to PubSubEventSource.
Added Workflow Identity toggle in gcp-pubsub gateway based on enableWorkflowIdentity flag.
Closing #503