systemconfig

package
v0.0.0-...-51b2d08 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DockerCertsDir

func DockerCertsDir() string

func ParseRegistryCerts

func ParseRegistryCerts(dataMap map[string]string) []registryCertTuple

ParseRegistryCerts parses the registry certs from a map of registry url to cert This map, in ocp, is stored in the data field of the configmap "image-registry-certificates" in the openshift-image-registry namespace.

func PolicyConfPath

func PolicyConfPath() string

func RegistriesConfPath

func RegistriesConfPath() string

func RegistryCertsDir

func RegistryCertsDir() string

Types

type IConfigSyncer

type IConfigSyncer interface {

	// StoreImageRegistryConf stores the allowedRegistries and blockedRegistries in the structs representing the
	// registries.conf and policy.json files. It fails if both allowedRegistries and blockedRegistries are set.
	StoreImageRegistryConf(allowedRegistries []string, blockedRegistries []string, insecureRegistries []string) error

	StoreRegistryCerts(registryCertTuples []registryCertTuple) error

	UpdateRegistryMirroringConfig(registry string, mirrors []string, pullType PullType) error
	DeleteRegistryMirroringConfig(registry string) error
	CleanupRegistryMirroringConfig() error

	Run(ctx context.Context) error
	// contains filtered or unexported methods
}

func SystemConfigSyncerSingleton

func SystemConfigSyncerSingleton() IConfigSyncer

SystemConfigSyncerSingleton returns the singleton instance of the SystemConfigSyncer

type Mirror

type Mirror struct {
	Location       string   `toml:"location"`
	PullFromMirror PullType `toml:"pull-from-mirror"`
}

type PullType

type PullType string
const (
	PullTypeDigestOnly PullType = sysregistriesv2.MirrorByDigestOnly
	PullTypeTagOnly    PullType = sysregistriesv2.MirrorByTagOnly
)

type SystemConfigSyncer

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

func (*SystemConfigSyncer) CleanupRegistryMirroringConfig

func (s *SystemConfigSyncer) CleanupRegistryMirroringConfig() error

func (*SystemConfigSyncer) DeleteRegistryMirroringConfig

func (s *SystemConfigSyncer) DeleteRegistryMirroringConfig(registry string) error

func (*SystemConfigSyncer) Run

func (*SystemConfigSyncer) StoreImageRegistryConf

func (s *SystemConfigSyncer) StoreImageRegistryConf(allowedRegistries []string, blockedRegistries []string, insecureRegistries []string) error

func (*SystemConfigSyncer) StoreRegistryCerts

func (s *SystemConfigSyncer) StoreRegistryCerts(registryCertTuples []registryCertTuple) error

func (*SystemConfigSyncer) UpdateRegistryMirroringConfig

func (s *SystemConfigSyncer) UpdateRegistryMirroringConfig(registry string, mirrors []string, pullType PullType) error

Jump to

Keyboard shortcuts

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