Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefaultAccessTokenSource ¶
func GetDefaultAccessTokenSource(ctx context.Context) (oauth2.TokenSource, error)
GetDefaultAccessTokenSource gets the default gcloud access token, assuming the user has logged in with gcloud (the application-default context). This is intended for local development.
Types ¶
type ProjectCache ¶
type ProjectCache struct { }
func (*ProjectCache) Init ¶
func (r *ProjectCache) Init(mgr ctrl.Manager) error
Init performs one-off initialization of the object.
func (*ProjectCache) LookupByProjectID ¶
func (r *ProjectCache) LookupByProjectID(ctx context.Context, projectID string, tokenSource oauth2.TokenSource) (*ProjectInfo, error)
type ProjectInfo ¶
type RemoteClient ¶
type RemoteClient struct {
// contains filtered or unexported fields
}
func (*RemoteClient) DynamicClient ¶
func (r *RemoteClient) DynamicClient() (dynamic.Interface, error)
func (*RemoteClient) RESTMapper ¶
func (r *RemoteClient) RESTMapper() (meta.RESTMapper, error)
type RemoteClientGetter ¶
func (*RemoteClientGetter) GetRemoteClient ¶
func (r *RemoteClientGetter) GetRemoteClient(ctx context.Context, clusterRef Reference, defaultNamespace string) (*RemoteClient, error)
type WorkloadIdentityHelper ¶
type WorkloadIdentityHelper struct {
// contains filtered or unexported fields
}
WorkloadIdentityHelper is a helper class that does the exchanges needed for workload identity.
func (*WorkloadIdentityHelper) GetGcloudAccessTokenSource ¶
func (r *WorkloadIdentityHelper) GetGcloudAccessTokenSource(ctx context.Context, kubeServiceAccount types.NamespacedName, gcpServiceAccount string) (oauth2.TokenSource, error)
GetGcloudAccessTokenSource does the exchange to get a token for the specified GCP ServiceAccount.
Click to show internal directories.
Click to hide internal directories.