Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2021.7.x
- Puppet >= 7.24 < 9.0.0
- , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'deric-skopeo', '0.3.2'
Learn more about managing modules with a PuppetfileDocumentation
puppet-skopeo
A module to manage synchronization between Docker/OCI registries.
Usage
include skopeo
And configure synchronization rules:
skopeo::sync:
k8s:
src: registry.k8s.io
dest: local.reg
matrix:
images:
- kube-apiserver
- kube-controller-manager
versions:
- 1.27.1
- 1.28.2
skopeo::sync:
repo:
src: index.docker.io
dest: local.reg
dest_type: dir
by_tag:
'some_image': 'v2.4'
'debian': '^12\.\d$'
args:
sign-by: AF123DA
src-authfile: /some/path
Configuration
All Puppet variables are documented in REFERENCE.md.
Reference
Table of Contents
Classes
Public Classes
skopeo
: skopeo image synchronization
Private Classes
skopeo::config
: Manage common configurationskopeo::install
: Manage skopeo binary installation
Defined types
skopeo::sync
: Manage configuration for scopeo sync
Data types
Skopeo::Args
: Optional argumentsSkopeo::ByTag
: Images with tag/version specificationSkopeo::DestType
: Source transport typeSkopeo::Matrix
: Configuration images X versions to syncSkopeo::SrcType
: Source transport typeSkopeo::SyncType
: Configuration of synchronization targets
Classes
skopeo
skopeo image synchronization
Parameters
The following parameters are available in the skopeo
class:
user
Data type: String
User account used for command execution
group
Data type: String
manage_package
Data type: Boolean
Whether package should be installed by this module
manage_user
Data type: Boolean
Whether user should be managed by this module
manage_group
Data type: Boolean
Whether group should be managed by this module
package_ensure
Data type: String
present
, absent
or specific package version
uid
Data type: Optional[Integer]
user id
Default value: undef
base_dir
Data type: Stdlib::Unixpath
Work dir (home dir) for scopeo configs
log_dir
Data type: Stdlib::Unixpath
Directory for storing logs
sync
Data type: Skopeo::SyncType
Synchronization config, see examples
Default value: {}
args
Data type: Skopeo::Args
Optional arguments as Hash
Default value: {}
Defined types
skopeo::sync
Sync copies Docker/OCI images from source to destination registry
Examples
skopeo::sync { 'registry':
src => 'index.docker.io',
dest => 'my.registry',
}
Parameters
The following parameters are available in the skopeo::sync
defined type:
src
src_type
dest
dest_prefix
dest_type
args
matrix
by_tag
tls_verify
redirect_logs
on_change
user
group
base_dir
log_dir
src
Data type: String
Source registry
src_type
Data type: Skopeo::SrcType
Source transport: docker
,dir
or yaml
. Default is yaml
Default value: 'yaml'
dest
Data type: String
Destination registry
dest_prefix
Data type: Optional[String]
Set prefix for destination registry
Default value: undef
dest_type
Data type: Skopeo::DestType
Destination transport, either docker
or dir
. Default: docker
Default value: 'docker'
args
Data type: Skopeo::Args
Optional key-value arguments passed to the sync command
Default value: $skopeo::args
matrix
Data type: Optional[Skopeo::Matrix]
A hash with images
and versions
array that will be cross joined
Default value: undef
by_tag
Data type: Skopeo::ByTag
Hash containing image name and version (regexp)
Default value: {}
tls_verify
Data type: Boolean
HTTPS TLS verification
Default value: true
redirect_logs
Data type: Boolean
Whether logs should be redirected to a file stored in the log_dir
Default value: true
on_change
Data type: Boolean
Whether synchronization should be performed upon config change
Default value: true
user
Data type: String
Default value: $skopeo::user
group
Data type: String
Default value: $skopeo::group
base_dir
Data type: Stdlib::Unixpath
Default value: $skopeo::base_dir
log_dir
Data type: Stdlib::Unixpath
Default value: $skopeo::log_dir
Data types
Skopeo::Args
Optional arguments
Alias of Hash[String[1], Optional[String]]
Skopeo::ByTag
Images with tag/version specification
Alias of Hash[String[1], String[1]]
Skopeo::DestType
Source transport type
Alias of Enum['docker', 'dir']
Skopeo::Matrix
Configuration images X versions to sync
Alias of
Struct[{
images => Array[String[1]],
versions => Array[String[1]],
}]
Skopeo::SrcType
Source transport type
Alias of Enum['docker', 'dir', 'yaml']
Skopeo::SyncType
Configuration of synchronization targets
Alias of
Hash[String[1], Struct[{
src => String[1],
dest => String[1],
Optional[dest_prefix] => String[1],
Optional[src_type] => Skopeo::SrcType,
Optional[dest_type] => Skopeo::DestType,
Optional[matrix] => Skopeo::Matrix,
Optional[by_tag] => Skopeo::ByTag,
Optional[tls_verify] => Boolean,
Optional[redirect_logs] => Boolean,
Optional[on_change] => Boolean,
Optional[user] => String,
Optional[group] => String,
Optional[base_dir] => Stdlib::Unixpath,
Optional[log_dir] => Stdlib::Unixpath,
Optional[args] => Hash[String,String],
}]]
Changelog
All notable changes to this project will be documented in this file.
Release 0.3.2 (2024-06-27)
- Avoid using
stdlib::merge()
use native+
operator instead
Release 0.3.1 (2024-06-25)
- Use prefixed
stdlib::to_yaml
Release 0.3.0 (2024-06-21)
- BC use
stdlib::ensure_packages
function, require stdlib >= 9
Release 0.2.0 (2024-05-24)
- Optional user and group management
Release 0.1.0 (2024-02-08)
Initial release
Dependencies
- puppetlabs/stdlib (>= 9.0.0 < 10.0.0)