dockerRegistry

package
v0.6.13 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const ALL_CLUSTER_ID string = "-1"
View Source
const IMAGE_PULL_SECRET_KEY_IN_VALUES_YAML = "imagePullSecrets"
View Source
const IPS_CREDENTIAL_TYPE_CUSTOM_CREDENTIAL = "CUSTOM_CREDENTIAL"
View Source
const IPS_CREDENTIAL_TYPE_NAME = "NAME"
View Source
const IPS_CREDENTIAL_TYPE_SAME_AS_REGISTRY = "SAME_AS_REGISTRY"

Variables

This section is empty.

Functions

func BuildIpsData

func BuildIpsData(dockerRegistryUrl, dockerRegistryUsername, dockerRegistryPassword, dockerRegistryEmail string) map[string][]byte

func BuildIpsName

func BuildIpsName(dockerRegistryId string, ipsCredentialType string, ipsCredentialValue string) string

eg: quayio-dtron-ips

func CheckIfImagePullSecretAccessProvided

func CheckIfImagePullSecretAccessProvided(appliedClusterIdsCsv string, ignoredClusterIdsCsv string, clusterId int) bool

func CreateCredentialForEcr

func CreateCredentialForEcr(awsRegion, awsAccessKey, awsSecretKey string) (string, string, error)

returns username and password

func GetUsernamePasswordFromIpsSecret

func GetUsernamePasswordFromIpsSecret(dockerRegistryUrl string, data map[string][]byte) (string, string)

func SetIpsNameInValues

func SetIpsNameInValues(valuesContent []byte, ipsName string) ([]byte, error)

Types

type DockerIpsCustomCredential

type DockerIpsCustomCredential struct {
	Server   string `json:"server"`
	Username string `json:"username"`
	Password string `json:"password"`
	Email    string `json:"email"`
}

type DockerRegistryIpsConfigService

type DockerRegistryIpsConfigService interface {
	IsImagePullSecretAccessProvided(dockerRegistryId string, clusterId int) (bool, error)
	HandleImagePullSecretOnApplicationDeployment(environment *repository2.Environment, ciPipelineId int, valuesFileContent []byte) ([]byte, error)
}

type DockerRegistryIpsConfigServiceImpl

type DockerRegistryIpsConfigServiceImpl struct {
	// contains filtered or unexported fields
}

func NewDockerRegistryIpsConfigServiceImpl

func NewDockerRegistryIpsConfigServiceImpl(logger *zap.SugaredLogger, dockerRegistryIpsConfigRepository repository.DockerRegistryIpsConfigRepository,
	k8sUtil *util.K8sUtil, clusterService cluster.ClusterService, ciPipelineRepository pipelineConfig.CiPipelineRepository,
	dockerArtifactStoreRepository repository.DockerArtifactStoreRepository) *DockerRegistryIpsConfigServiceImpl

func (DockerRegistryIpsConfigServiceImpl) HandleImagePullSecretOnApplicationDeployment

func (impl DockerRegistryIpsConfigServiceImpl) HandleImagePullSecretOnApplicationDeployment(environment *repository2.Environment, ciPipelineId int, valuesFileContent []byte) ([]byte, error)

func (DockerRegistryIpsConfigServiceImpl) IsImagePullSecretAccessProvided

func (impl DockerRegistryIpsConfigServiceImpl) IsImagePullSecretAccessProvided(dockerRegistryId string, clusterId int) (bool, error)

Jump to

Keyboard shortcuts

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