Documentation ¶
Index ¶
- Constants
- Variables
- func CheckAccess(endpoint, username, password string) 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 Credentials
- type DockerCfgJSON
- type DockercfgAuth
- type ImagePullSecrets
- type Login
- type RegistryProxyInfo
- type TempRegistry
- func (r *TempRegistry) GetImageLayers(image string) ([]types.Layer, error)
- func (r *TempRegistry) OverridePort(port string)
- func (r *TempRegistry) SrcRef(image string) (containerstypes.ImageReference, error)
- func (r *TempRegistry) Start(rootDir string) (finalError error)
- func (r *TempRegistry) Stop()
- func (r *TempRegistry) WaitForReady(timeout time.Duration) error
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 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 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 RegistryProxyInfo ¶
func GetRegistryProxyInfo ¶ added in v1.91.2
func GetRegistryProxyInfo(license *kotsv1beta1.License, installation *kotsv1beta1.Installation, app *kotsv1beta1.Application) *RegistryProxyInfo
func (*RegistryProxyInfo) ToSlice ¶
func (r *RegistryProxyInfo) ToSlice() []string
type TempRegistry ¶ added in v1.82.0
type TempRegistry struct {
// contains filtered or unexported fields
}
func (*TempRegistry) GetImageLayers ¶ added in v1.82.0
func (r *TempRegistry) GetImageLayers(image string) ([]types.Layer, error)
func (*TempRegistry) OverridePort ¶ added in v1.82.0
func (r *TempRegistry) OverridePort(port string)
This is only used for integration tests
func (*TempRegistry) SrcRef ¶ added in v1.82.0
func (r *TempRegistry) SrcRef(image string) (containerstypes.ImageReference, error)
func (*TempRegistry) Start ¶ added in v1.82.0
func (r *TempRegistry) Start(rootDir string) (finalError error)
Start will spin up a docker registry service in the background on a random port. Will use the given "rootDir" as storage. Caller is responsible for stopping the registry.
func (*TempRegistry) Stop ¶ added in v1.82.0
func (r *TempRegistry) Stop()
func (*TempRegistry) WaitForReady ¶ added in v1.82.0
func (r *TempRegistry) WaitForReady(timeout time.Duration) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.