v1alpha1

package
v0.1.1-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package v1alpha1 provides the ImageSetConfiguration and Metadata used for configuring oc imageset.

Index

Constants

View Source
const ImageSetConfigurationKind = "ImageSetConfiguration"

ImageSetConfiguration object kind.

View Source
const MetadataKind = "Metadata"

Metadata object kind.

Variables

View Source
var (
	GroupVersion = schema.GroupVersion{Group: group, Version: version}
)

Functions

This section is empty.

Types

type AdditionalImages

type AdditionalImages struct {
	Image `json:",inline"`
}

type Blob

type Blob struct {
	ID string `json:"id"`
	// NamespaceName of image that owns this blob.
	// Required for blob lookups during the publish step.
	NamespaceName string `json:"namespaceName"`
}

type BlockedImages

type BlockedImages struct {
	Image `json:",inline"`
}

type Chart

type Chart struct {
	Name    string `json:"name"`
	Version string `json:"version,omitempty"`
	Path    string `json:"path,omitempty"`
	// ImagePaths are custom JSON paths for images location
	// in the helm manifest or templates
	ImagePaths []string `json:"imagepaths,omitempty"`
}

Chart is the information an individual Helm chart

type Helm

type Helm struct {
	// Repo is the helm repository containing the charts
	Repos []Repo `json:"repos,omitempty"`
	// Local is the configuration for locally stored helm charts
	Local []Chart `json:"local,omitempty"`
}

type Image

type Image struct {
	// Name of the image. This should be an exact image pin (registry/namespace/name@sha256:<hash>)
	// but is not required to be.
	Name string `json:"name"`
	// PullSecret for the image. Must be a file ref, as this value may be stored unencrypted.
	PullSecret string `json:"pullSecret,omitempty"`
}

Image contains image pull information.

type ImageSetConfiguration

type ImageSetConfiguration struct {
	metav1.TypeMeta `json:",inline"`

	ImageSetConfigurationSpec `json:",inline"`
}

ImageSetConfiguration configures image set creation.

func LoadConfig

func LoadConfig(data []byte) (c ImageSetConfiguration, err error)

type ImageSetConfigurationSpec

type ImageSetConfigurationSpec struct {
	Mirror Mirror `json:"mirror"`
	// ArchiveSize is the size of the segmented archive in GB
	ArchiveSize int64 `json:"archiveSize,omitempty"`
	// StorageConfig for reading/writing metadata and files.
	StorageConfig StorageConfig `json:"storageConfig"`
}

type InlinedIndex

type InlinedIndex json.RawMessage

func (InlinedIndex) MarshalJSON

func (index InlinedIndex) MarshalJSON() ([]byte, error)

func (*InlinedIndex) Write

func (index *InlinedIndex) Write(data []byte) (int, error)

type Manifest

type Manifest struct {
	Name  string `json:"name"`
	Image string `json:"image"`
	// NamespaceName of image that owns this manifest.
	NamespaceName string `json:"namespaceName"`
}

type Metadata

type Metadata struct {
	metav1.TypeMeta `json:",inline"`

	MetadataSpec `json:",inline"`
}

Metadata configures image set creation.

func LoadMetadata

func LoadMetadata(data []byte) (m Metadata, err error)

func NewMetadata

func NewMetadata() Metadata

func (*Metadata) MarshalJSON

func (m *Metadata) MarshalJSON() ([]byte, error)

type MetadataSpec

type MetadataSpec struct {
	// Uid uniquely identifies this metadata object.
	Uid uuid.UUID `json:"uid"`
	// Past is a slice containing information for
	// all mirrors created for an imageset
	PastMirrors PastMirrors `json:"pastMirrors"`
	// PastFiles is a slice containing information for
	// all files created for an imageset
	PastBlobs []Blob `json:"pastBlobs"`
}

type Mirror

type Mirror struct {
	OCP              OCP                `json:"ocp,omitempty"`
	Operators        []Operator         `json:"operators,omitempty"`
	AdditionalImages []AdditionalImages `json:"additionalImages,omitempty"`
	Helm             Helm               `json:"helm,omitempty"`
	BlockedImages    []BlockedImages    `json:"blockedImages,omitempty"`
	Samples          []SampleImages     `json:"samples,omitempty"`
}

type OCP

type OCP struct {
	Graph    bool             `json:"graph,omitempty"`
	Channels []ReleaseChannel `json:"channels,omitempty"`
	// PullSecret for the release image. Must be a file ref,
	// as this value may be stored unencrypted.
	PullSecret string `json:"pullSecret,omitempty"`
}

type Operator

type Operator struct {
	// Mirror specific operator packages, channels, and versions, and their dependencies.
	// If HeadsOnly is true, these objects are mirrored on top of heads of all channels.
	// Otherwise, only these specific objects are mirrored.
	action.DiffIncludeConfig `json:",inline"`

	// Catalog image to mirror. This image must be pullable and available for subsequent
	// pulls on later mirrors unless WriteIndex or InlineIndex are set.
	// This image should be an exact image pin (registry/namespace/name@sha256:<hash>)
	// but is not required to be.
	Catalog string `json:"catalog"`
	// PullSecret for the image. Must be a file ref, as this value may be stored unencrypted.
	PullSecret string `json:"pullSecret,omitempty"`
	// HeadsOnly mode mirrors only channel heads of all packages in the catalog.
	// Channels specified in DiffIncludeConfig will override this setting;
	// heads will still be included, but prior versions may also be included.
	HeadsOnly bool `json:"headsOnly,omitempty"`
	// WriteIndex directs the mirrorer to store the catalog's declarative config
	// index representation as a file.
	// Only set this option if not using git as a backend, which experiences
	// degraded performance with file sizes of 100MB.
	// InlineIndex and WriteIndex cannot both be set.
	WriteIndex bool `json:"writeIndex,omitempty"`
	// InlineIndex directs the mirrorer to store the catalog's declarative config
	// index representation within the metadata file itself.
	// Only set this option if the index is small or not using git as a backend,
	// which experiences degraded performance with file sizes of 100MB.
	// InlineIndex and WriteIndex cannot both be set.
	InlineIndex bool `json:"inlineIndex,omitempty"`
}

Operator configures operator catalog mirroring.

type OperatorMetadata

type OperatorMetadata struct {
	// Catalog references a catalog name from the mirror spec.
	Catalog string `json:"catalog"`
	// ImagePin is the resolved sha256 image name of Catalog.
	// This image will be pulled using the pull secret
	// in the metadata's Mirror config for this catalog.
	ImagePin string `json:"imagePin"`
}

OperatorMetadata holds an Operator's post-mirror metadata.

type PastMirror

type PastMirror struct {
	Timestamp int        `json:"timestamp"`
	Sequence  int        `json:"sequence"`
	Manifests []Manifest `json:"manifests"`
	Blobs     []Blob     `json:"blobs"`
	Mirror    Mirror     `json:"mirror"`
	// Operators are metadata about the set of mirrored operators in a mirror operation.
	Operators []OperatorMetadata `json:"operators,omitempty"`
}

type PastMirrors

type PastMirrors []PastMirror

PastMirrors is a sortable slice of PastMirro's.

func (PastMirrors) Len

func (pms PastMirrors) Len() int

func (PastMirrors) Less

func (pms PastMirrors) Less(i, j int) bool

func (PastMirrors) Swap

func (pms PastMirrors) Swap(i, j int)

type RegistryConfig

type RegistryConfig struct {
	// ImageURL at which the image can be pulled.
	ImageURL string `json:"imageURL"`
	SkipTLS  bool   `json:"skipTLS"`
}

RegistryConfig configures a registry-based storage.

type ReleaseChannel

type ReleaseChannel struct {
	Name     string   `json:"name"`
	Versions []string `json:"versions"`
}

type Repo

type Repo struct {
	// URL is the url of the helm repository
	URL string `json:"url"`
	// Name is the name of the helm repository
	Name string `json:"name"`
	// Charts is a list of charts to pull from the repo
	Charts []Chart `json:"charts"`
}

Repo is the configuration for a Helm Repo

type SampleImages

type SampleImages struct {
	Image `json:",inline"`
}

type StorageConfig

type StorageConfig struct {
	Registry *RegistryConfig `json:"registry,omitempty"`
}

StorageConfig configures how metadata is stored.

Jump to

Keyboard shortcuts

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