registry

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigName      = "config.yml"
	RegistryCtlName = "registryctl"
)
View Source
const (
	VolumeName                            = "registry-config"
	CtlVolumeName                         = "registryctl-config"
	ConfigPath                            = "/etc/registry"
	CtlConfigPath                         = "/etc/registryctl"
	CompatibilitySchema1Path              = ConfigPath + "/compatibility-schema1"
	CompatibilitySchema1VolumeName        = "compatibility-schema1-certificate"
	AuthenticationHTPasswdPath            = ConfigPath + "/auth"
	AuthenticationHTPasswdVolumeName      = "authentication-htpasswd"
	InternalCertificatesVolumeName        = "internal-certificates"
	CtlInternalCertificatesVolumeName     = "ctl-internal-certificates"
	InternalCertificateAuthorityDirectory = "/harbor_cust_cert"
	InternalCertificatesPath              = ConfigPath + "/ssl"
	CtlInternalCertificatesPath           = CtlConfigPath + "/ssl"
	StorageName                           = "storage"
	StoragePath                           = "/var/lib/registry"
	HealthPath                            = "/"
	CtlHealthPath                         = "/api/health"
	StorageServiceCAName                  = "storage-service-ca"
	StorageServiceCAMountPath             = "/harbor_cust_cert/custom-ca-bundle.crt"
	GcsJSONKeyFilePath                    = "/etc/gcs/gcs-key.json"
)
View Source
const (
	DefaultRequeueWait               = 2 * time.Second
	DefaultConfigTemplateFileName    = "registry-config.yaml.tmpl"
	DefaultCtlConfigTemplateFileName = "registryctl-config.yaml.tmpl"
	CtlConfigTemplateKey             = "template-content-ctl"
)

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, configStore *configstore.Store) (commonCtrl.Reconciler, error)

Types

type NetworkPolicy

type NetworkPolicy graph.Resource

type Reconciler

type Reconciler struct {
	*commonCtrl.Controller
}

Reconciler reconciles a Registry object.

func (*Reconciler) AddIngressNetworkPolicy

func (r *Reconciler) AddIngressNetworkPolicy(ctx context.Context, registry *goharborv1.Registry) (NetworkPolicy, error)

func (*Reconciler) AddNetworkPolicies

func (r *Reconciler) AddNetworkPolicies(ctx context.Context, registry *goharborv1.Registry) error

func (*Reconciler) AddResources

func (r *Reconciler) AddResources(ctx context.Context, resource resources.Resource) error

func (*Reconciler) ApplyAzureStorageEnvs

func (r *Reconciler) ApplyAzureStorageEnvs(ctx context.Context, registry *goharborv1.Registry, deploy *appsv1.Deployment) error

func (*Reconciler) ApplyFilesystemStorageEnvs

func (r *Reconciler) ApplyFilesystemStorageEnvs(ctx context.Context, registry *goharborv1.Registry, deploy *appsv1.Deployment) error

func (*Reconciler) ApplyGcsStorageEnvs

func (r *Reconciler) ApplyGcsStorageEnvs(ctx context.Context, registry *goharborv1.Registry, deploy *appsv1.Deployment) error

func (*Reconciler) ApplyInMemoryStorageEnvs

func (r *Reconciler) ApplyInMemoryStorageEnvs(ctx context.Context, registry *goharborv1.Registry, deploy *appsv1.Deployment) error

func (*Reconciler) ApplyOssStorageEnvs

func (r *Reconciler) ApplyOssStorageEnvs(ctx context.Context, registry *goharborv1.Registry, deploy *appsv1.Deployment) error

func (*Reconciler) ApplyS3StorageEnvs

func (r *Reconciler) ApplyS3StorageEnvs(ctx context.Context, registry *goharborv1.Registry, deploy *appsv1.Deployment) error

func (*Reconciler) ApplyStorageConfiguration

func (r *Reconciler) ApplyStorageConfiguration(ctx context.Context, registry *goharborv1.Registry, deploy *appsv1.Deployment) error

func (*Reconciler) ApplySwiftStorageEnvs

func (r *Reconciler) ApplySwiftStorageEnvs(ctx context.Context, registry *goharborv1.Registry, deploy *appsv1.Deployment) error

func (*Reconciler) CleanUpRegistryCtlResources

func (r *Reconciler) CleanUpRegistryCtlResources(ctx context.Context, registryCtl *goharborv1.RegistryController) (err error)

CleanUpRegistryCtlResources cleanup registryctl related resources.

func (*Reconciler) DeleteResourceIfExist

func (r *Reconciler) DeleteResourceIfExist(ctx context.Context, key client.ObjectKey, obj client.Object) error

DeleteResourceIfExist deletes existed resources.

func (*Reconciler) GetAuthenticationSecrets

func (r *Reconciler) GetAuthenticationSecrets(ctx context.Context, registry *goharborv1.Registry) ([]graph.Resource, error)

func (*Reconciler) GetConfigFuncs

func (r *Reconciler) GetConfigFuncs(ctx context.Context, registry *goharborv1.Registry) (template.FuncMap, error)

func (*Reconciler) GetConfigMap

func (r *Reconciler) GetConfigMap(ctx context.Context, registry *goharborv1.Registry) (*corev1.ConfigMap, error)

func (*Reconciler) GetCtlConfigMap

func (r *Reconciler) GetCtlConfigMap(ctx context.Context, registryCtl *goharborv1.RegistryController) (*corev1.ConfigMap, error)

func (*Reconciler) GetCtlService

func (r *Reconciler) GetCtlService(ctx context.Context, registryCtl *goharborv1.RegistryController) (*corev1.Service, error)

func (*Reconciler) GetDataFuncFromArraySecret

func (r *Reconciler) GetDataFuncFromArraySecret(ctx context.Context, getter func(int) (interface{}, types.NamespacedName, error), itemsCount int) (func(interface{}) (map[string]string, error), error)

func (*Reconciler) GetDeployment

func (r *Reconciler) GetDeployment(ctx context.Context, registry *goharborv1.Registry) (*appsv1.Deployment, error)

func (*Reconciler) GetHTTPSecrets

func (r *Reconciler) GetHTTPSecrets(ctx context.Context, registry *goharborv1.Registry) ([]graph.Resource, error)

func (*Reconciler) GetHookDataFunc

func (r *Reconciler) GetHookDataFunc(ctx context.Context, registry *goharborv1.Registry) (interface{}, error)

func (*Reconciler) GetIngressNetworkPolicy

func (r *Reconciler) GetIngressNetworkPolicy(ctx context.Context, registry *goharborv1.Registry) (*netv1.NetworkPolicy, error)

func (*Reconciler) GetRegistryCtl

func (r *Reconciler) GetRegistryCtl(ctx context.Context, registry *goharborv1.Registry) (*goharborv1.RegistryController, error)

func (*Reconciler) GetRegistryMiddlewareDataFunc

func (r *Reconciler) GetRegistryMiddlewareDataFunc(ctx context.Context, registry *goharborv1.Registry) (interface{}, error)

func (*Reconciler) GetReportingDataFunc

func (r *Reconciler) GetReportingDataFunc(ctx context.Context, registry *goharborv1.Registry) (interface{}, error)

func (*Reconciler) GetRepositoryMiddlewareDataFunc

func (r *Reconciler) GetRepositoryMiddlewareDataFunc(ctx context.Context, registry *goharborv1.Registry) (interface{}, error)

func (*Reconciler) GetS3StorageSecrets

func (r *Reconciler) GetS3StorageSecrets(ctx context.Context, registry *goharborv1.Registry) ([]graph.Resource, error)

func (*Reconciler) GetSecrets

func (r *Reconciler) GetSecrets(ctx context.Context, registry *goharborv1.Registry) ([]graph.Resource, error)

func (*Reconciler) GetService

func (r *Reconciler) GetService(ctx context.Context, registry *goharborv1.Registry) (*corev1.Service, error)

func (*Reconciler) GetStorageMiddlewareDataFunc

func (r *Reconciler) GetStorageMiddlewareDataFunc(ctx context.Context, registry *goharborv1.Registry) (interface{}, error)

func (*Reconciler) GetStorageSecrets

func (r *Reconciler) GetStorageSecrets(ctx context.Context, registry *goharborv1.Registry) ([]graph.Resource, error)

func (*Reconciler) GetSwiftStorageSecrets

func (r *Reconciler) GetSwiftStorageSecrets(ctx context.Context, registry *goharborv1.Registry) ([]graph.Resource, error)

func (*Reconciler) NewEmpty

func (r *Reconciler) NewEmpty(_ context.Context) resources.Resource

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error

func (*Reconciler) Template

func (r *Reconciler) Template(ctx context.Context) (*template.ConfigTemplate, error)

Jump to

Keyboard shortcuts

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