pullsecret

package
v0.0.0-...-ed9f9c9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 9 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(oc *api.OpenShiftCluster, ps string) (string, error)

func Merge

func Merge(_base, _ps string) (string, bool, error)

Merge returns _ps over _base. If both _ps and _base have a given key, the version of it in _ps wins.

func RemoveKey

func RemoveKey(_ps, key string) (string, error)

func SetRegistryProfiles

func SetRegistryProfiles(_ps string, rps ...*api.RegistryProfile) (string, bool, error)

func UnmarshalSecretData

func UnmarshalSecretData(ps *corev1.Secret) (map[string]string, error)

Unmarshal pull-secret data which is stored in corev1.Secret.Data the data has form:

{"auths": {"secret key": {"auth": "secret value"}, "secret key": {"auth": "secret value"}}}

returns map of extracted secrets in a form:

{"secret key": "secret value"}

error is returned when parsing fails

func Validate

func Validate(_ps string) error

Types

type UserPass

type UserPass struct {
	Username string
	Password string
}

func Extract

func Extract(rawPullSecret, domain string) (*UserPass, error)

Extract decodes a username and password for a given domain from a JSON-encoded pull secret (e.g. from docker auth)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL