-
Notifications
You must be signed in to change notification settings - Fork 90
feat: support gcp service account key file and gcp doc #1090
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Dan Sun <[email protected]>
Signed-off-by: Dan Sun <[email protected]>
Signed-off-by: Dan Sun <[email protected]>
Signed-off-by: Dan Sun <[email protected]>
Signed-off-by: Dan Sun <[email protected]>
Signed-off-by: Dan Sun <[email protected]>
Signed-off-by: Dan Sun <[email protected]>
Signed-off-by: Dan Sun <[email protected]>
Signed-off-by: Dan Sun <[email protected]>
type GCPCredentialsFile struct { | ||
// SecretRef is the reference to the credential file. | ||
// | ||
// The secret should contain the AWS credentials file keyed on "credentials". |
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.
aws
@@ -285,3 +291,12 @@ type AWSOIDCExchangeToken struct { | |||
// +kubebuilder:validation:MinLength=1 | |||
AwsRoleArn string `json:"awsRoleArn"` | |||
} | |||
|
|||
// GCPCredentialsFile specifies the credentials file to use for the GCP provider. | |||
// Envoy reads the secret file to authenticate with GCP. |
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 we should fix the doc on AWSCredentialsFile as well but it's not Envoy who reads the credentials but Envoy AI Gateway controller does
creds, err := google.CredentialsFromJSON(ctx, []byte(g.gcpServiceAccountJSON), "https://www.googleapis.com/auth/cloud-platform") | ||
if err != nil { | ||
return err | ||
} | ||
token, err := creds.TokenSource.Token() | ||
if err != nil { | ||
return err | ||
} |
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.
when the secret gets updated, then the extproc config also gets updated, so it should fine to do this during the handler setup in newGCPHandler
Description
Added the support for GCP static service account credential file for an easier way to show case how to access GenAI models on GCP VertexAI.
Related Issues/PRs (if applicable)
Fixes #1015