Documentation
¶
Index ¶
- Variables
- func WithCustomAzureLoginURL(url string) option
- func WithCustomGCPMetadataServerURL(url string) option
- func WithHttpClient(client *http.Client) option
- func WithNamespace(namespace string) option
- type AWSProvider
- type Auth
- type AzureProvider
- type Credentials
- type GCPProvider
- type GoogleToken
- type Provider
- type ProviderID
- type SecretRef
- type WorkloadIdentity
Constants ¶
This section is empty.
Variables ¶
var ( ErrSecretRefNotSet = errors.New("Auth secret reference not set") ErrAuthSecretValueNotFound = errors.New("Auth secret value not found") )
var (
ErrUnexpectedHost = errors.New("Unexpected host")
)
var (
ErrUnexpectedResponse = errors.New("Unexpected response")
)
Functions ¶
func WithCustomAzureLoginURL ¶ added in v0.25.0
func WithCustomAzureLoginURL(url string) option
func WithCustomGCPMetadataServerURL ¶ added in v0.25.0
func WithCustomGCPMetadataServerURL(url string) option
func WithHttpClient ¶ added in v0.25.0
func WithNamespace ¶ added in v0.25.0
func WithNamespace(namespace string) option
Types ¶
type AWSProvider ¶ added in v0.17.0
AWSProvider is the dedicated provider for accessing AWS services.
func (*AWSProvider) FetchCredentials ¶ added in v0.17.0
func (provider *AWSProvider) FetchCredentials(ctx context.Context) (*Credentials, error)
type Auth ¶ added in v0.25.0
type Auth struct {
SecretRef *SecretRef `json:"secretRef"`
WorkloadIdentity *WorkloadIdentity `json:"workloadIdentity"`
}
Auth contains methods for repository/registry authentication.
type AzureProvider ¶ added in v0.19.0
AzureProvider is the dedicated provider for accessing Azure cloud services.
func (*AzureProvider) FetchCredentials ¶ added in v0.19.0
func (provider *AzureProvider) FetchCredentials(ctx context.Context) (*Credentials, error)
type Credentials ¶
Workload credentials used for cloud provider authentication and accessing cloud provider services.
func ReadCredentials ¶ added in v0.25.0
func ReadCredentials( ctx context.Context, host string, auth Auth, kubeClient kube.Client[unstructured.Unstructured, unstructured.Unstructured], opts ...option, ) (*Credentials, error)
type GCPProvider ¶ added in v0.17.0
GCPProvider is the dedicated provider for accessing Google Cloud services.
func (*GCPProvider) FetchCredentials ¶ added in v0.17.0
func (provider *GCPProvider) FetchCredentials(ctx context.Context) (*Credentials, error)
type GoogleToken ¶
type GoogleToken struct {
AccessToken string `json:"access_token"`
ExpiresIn int `json:"expires_in"`
TokenType string `json:"token_type"`
}
Access token for accessing google services like artifact registry.
type Provider ¶ added in v0.17.0
type Provider interface {
// FetchCredentials uses the configured provider identity and access management approach to receive credentials for accessing cloud provider services, like container registries.
FetchCredentials(context.Context) (*Credentials, error)
}
A Provider is a widely recognized cloud computing platform that provides several services for managing access and hosting containers.
func GetProvider ¶ added in v0.17.0
func GetProvider( providerID ProviderID, host url.URL, httpClient *http.Client, azureLoginURL string, gcpMetadataServerURL string, ) Provider
GetProvider constructs a cloud Provider based on the given identifier or nil if no provider for given identifier could be constructed. Currently supported: gcp, aws, azure
type ProviderID ¶ added in v0.17.0
type ProviderID string
const ( AWS ProviderID = "aws" GCP ProviderID = "gcp" Azure ProviderID = "azure" )
type SecretRef ¶ added in v0.25.0
type SecretRef struct {
Name string `json:"name"`
}
SecretRef is the reference to the secret containing the repository/registry authentication.
type WorkloadIdentity ¶ added in v0.25.0
type WorkloadIdentity struct {
Provider ProviderID `json:"provider"`
}
WorkloadIdentity is a keyless approach used for repository/registry authentication.