Documentation ¶
Index ¶
- Constants
- Variables
- func CheckAccess(endpoint, username, password, org string, requestedAction ScopeAction) error
- func EnsureDockerHubSecret(username string, password string, namespace string, ...) error
- func GetCredentialsFromConfigJSON(configJson []byte) (map[string]Credentials, error)
- func GetDockerHubPullSecret(clientset kubernetes.Interface, namespace string, appNamespace string, ...) (*corev1.Secret, error)
- func GetECRBasicAuthToken(ecrEndpoint, username, password string) (string, error)
- func IsECREndpoint(endpoint string) bool
- func LoadAuthForRegistry(endpoint string) (string, string, error)
- func MakeProxiedImageURL(proxyHost string, appSlug string, image string) string
- func PullSecretForDockerHub(username string, password string, kuberneteNamespace string) (*corev1.Secret, error)
- func SecretNameFromPrefix(namePrefix string) string
- type BearerToken
- type Credentials
- type DockerCfgJSON
- type DockercfgAuth
- type ImagePullSecrets
- type Login
- type RegistryOptions
- type RegistryProxyInfo
- type ScopeAction
Constants ¶
View Source
const DockerHubRegistryName = "index.docker.io"
View Source
const DockerHubSecretName = "kotsadm-dockerhub"
Variables ¶
View Source
var ErrDockerHubCredentialsExist = errors.New("dockerhub credentials exists")
Functions ¶
func CheckAccess ¶
func CheckAccess(endpoint, username, password, org string, requestedAction ScopeAction) error
func EnsureDockerHubSecret ¶
func GetCredentialsFromConfigJSON ¶
func GetCredentialsFromConfigJSON(configJson []byte) (map[string]Credentials, error)
func GetDockerHubPullSecret ¶
func GetECRBasicAuthToken ¶
func IsECREndpoint ¶
func MakeProxiedImageURL ¶
func PullSecretForDockerHub ¶
func SecretNameFromPrefix ¶
Types ¶
type BearerToken ¶
type BearerToken struct { Token string `json:"token"` AccessToken string `json:"access_token"` ExpiresIn int `json:"expires_in"` IssuedAt time.Time `json:"issued_at"` // contains filtered or unexported fields }
Copied from github.com/containers/image/docker Time fields aren't used
type Credentials ¶
func GetCredentialsForRegistryFromConfigJSON ¶
func GetCredentialsForRegistryFromConfigJSON(configJson []byte, registry string) (Credentials, error)
func GetDockerHubCredentials ¶
func GetDockerHubCredentials(clientset kubernetes.Interface, namespace string) (Credentials, error)
type DockerCfgJSON ¶
type DockerCfgJSON struct {
Auths map[string]DockercfgAuth `json:"auths"`
}
type DockercfgAuth ¶
type DockercfgAuth struct {
Auth string `json:"auth,omitempty"`
}
type ImagePullSecrets ¶
type ImagePullSecrets struct { AdminConsoleSecret *corev1.Secret AppSecret *corev1.Secret DockerHubSecret *corev1.Secret }
func PullSecretForRegistries ¶
type Login ¶
func GetECRLogin ¶
type RegistryOptions ¶
type RegistryProxyInfo ¶
func ProxyEndpointFromLicense ¶
func ProxyEndpointFromLicense(license *kotsv1beta1.License) *RegistryProxyInfo
func (*RegistryProxyInfo) ToSlice ¶
func (r *RegistryProxyInfo) ToSlice() []string
type ScopeAction ¶
type ScopeAction string
const ( ActionPull ScopeAction = "pull" ActionPush ScopeAction = "push" )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.