Documentation
¶
Index ¶
- Variables
- func EnableModule(downloadedModulesDir, oldSymlinkPath, newSymlinkPath, modulePath string) error
- func EnsureModuleDocumentation(ctx context.Context, cli client.Client, ...) error
- func GenerateRegistryOptions(ri *RegistryConfig, logger *log.Logger) []cr.Option
- func GenerateRegistryOptionsFromModuleSource(ms *v1alpha1.ModuleSource, clusterUUID string, logger *log.Logger) []cr.Option
- func GetClusterUUID(ctx context.Context, cli client.Client) string
- func GetModuleSymlink(rootPath, moduleName string) (string, error)
- func GetModuleVersion(moduleSymlink string) (string, error)
- func GetNotificationConfig(ctx context.Context, cli client.Client) (releaseUpdater.NotificationConfig, error)
- func ModulePullOverrideExists(ctx context.Context, cli client.Client, moduleName string) (bool, error)
- func SyncModuleRegistrySpec(downloadedModulesDir, moduleName, moduleVersion string, ...) error
- func Update[Object client.Object](ctx context.Context, cli client.Client, object Object, ...) error
- func UpdatePolicy(ctx context.Context, cli client.Client, ...) (*v1alpha2.ModuleUpdatePolicy, error)
- func UpdateStatus[Object client.Object](ctx context.Context, cli client.Client, object Object, ...) error
- type DeckhouseRegistrySecret
- type FakeLayer
- type RegistryConfig
Constants ¶
This section is empty.
Variables ¶
var ErrAddressFieldIsNotFound = errors.New("secret has no address field")
var ErrCAFieldIsNotFound = errors.New("secret has no ca field")
var ErrClusterIsBootstrappedFieldIsNotFound = errors.New("secret has no clusterIsBootstrapped field")
var ErrDockerConfigFieldIsNotFound = errors.New("secret has no .dockerconfigjson field")
var ErrImageRegistryFieldIsNotFound = errors.New("secret has no imagesRegistry field")
var ErrPathFieldIsNotFound = errors.New("secret has no path field")
var ErrSchemeFieldIsNotFound = errors.New("secret has no scheme field")
Functions ¶
func EnableModule ¶ added in v1.67.0
EnableModule deletes old symlinks and creates a new one
func EnsureModuleDocumentation ¶ added in v1.67.0
func EnsureModuleDocumentation( ctx context.Context, cli client.Client, moduleName, moduleSource, moduleChecksum, moduleVersion, modulePath string, ownerRef metav1.OwnerReference, ) error
EnsureModuleDocumentation creates or updates module documentation
func GenerateRegistryOptions ¶
func GenerateRegistryOptions(ri *RegistryConfig, logger *log.Logger) []cr.Option
func GenerateRegistryOptionsFromModuleSource ¶ added in v1.65.0
func GenerateRegistryOptionsFromModuleSource(ms *v1alpha1.ModuleSource, clusterUUID string, logger *log.Logger) []cr.Option
GenerateRegistryOptionsFromModuleSource fetches settings from ModuleSource and generate registry options from them
func GetClusterUUID ¶ added in v1.67.0
GetClusterUUID gets uuid from the secret or generate a new one
func GetModuleSymlink ¶ added in v1.67.0
GetModuleSymlink walks over the root dir to find a module symlink by regexp
func GetModuleVersion ¶ added in v1.69.0
GetModuleVersion gets version of the module by symlink(/downloaded/modules/{moduleName})
func GetNotificationConfig ¶ added in v1.67.0
func GetNotificationConfig(ctx context.Context, cli client.Client) (releaseUpdater.NotificationConfig, error)
GetNotificationConfig gets config from discovery secret
func ModulePullOverrideExists ¶ added in v1.67.0
func ModulePullOverrideExists(ctx context.Context, cli client.Client, moduleName string) (bool, error)
ModulePullOverrideExists checks if module pull override for the module exists
func SyncModuleRegistrySpec ¶ added in v1.67.0
func SyncModuleRegistrySpec(downloadedModulesDir, moduleName, moduleVersion string, moduleSource *v1alpha1.ModuleSource) error
SyncModuleRegistrySpec compares and updates current registry settings of a deployed module (in the ./openapi/values.yaml file) and the registry settings set in the related module source
func Update ¶ added in v1.67.0
func Update[Object client.Object](ctx context.Context, cli client.Client, object Object, updater func(obj Object) bool) error
Update updates object with retryOnConflict to avoid conflict
func UpdatePolicy ¶ added in v1.67.0
func UpdatePolicy(ctx context.Context, cli client.Client, embeddedPolicy *helpers.ModuleUpdatePolicySpecContainer, moduleName string) (*v1alpha2.ModuleUpdatePolicy, error)
UpdatePolicy returns policy for the module, if no policy, embeddedPolicy is returned
Types ¶
type DeckhouseRegistrySecret ¶ added in v1.65.0
type DeckhouseRegistrySecret struct {
DockerConfig string
Address string
ClusterIsBootstrapped bool
ImageRegistry string
Path string
Scheme string
CA string
}
func ParseDeckhouseRegistrySecret ¶ added in v1.65.0
func ParseDeckhouseRegistrySecret(data map[string][]byte) (*DeckhouseRegistrySecret, error)
type FakeLayer ¶ added in v1.60.0
func (FakeLayer) Uncompressed ¶ added in v1.60.0
func (fl FakeLayer) Uncompressed() (io.ReadCloser, error)