v1alpha1

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1alpha1 is for the shared File logic across both the cluster and distro api's

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinarySelector

type BinarySelector struct {
	// Roles arbitrary list of roles to upload files too
	Roles []string `json:"roles,omitempty"`
	// Profile what type of node to upload files too
	Profile string `json:"profile,omitempty" jsonschema:"enum=worker,enum=controller"`
	// Package what type of engine binary will be used to install
	Package string `json:"package,omitempty" jsonschema:"enum=rpm,enum=apt,enum=binary"`
}

BinarySelector allows for filtering files based on certain criteria

type LocalFile

type LocalFile struct {
	// Path to the file that will be uploaded
	Path string
	// PermMode permission of the file
	PermMode string
}

LocalFile runtime information that will be used for the local files

type ZarfDistroKind

type ZarfDistroKind string

ZarfDistroKind type

type ZarfFile

type ZarfFile struct {
	// Data file contents
	Data string `json:"data,omitempty"`
	// Executable if the file should have executable permissions
	Executable bool `json:"executable,omitempty"`
	// ExtractPath used to extract a file from a tar ball
	ExtractPath string `json:"extractPath,omitempty"`
	// Group to which the file will be owned by
	Group string `json:"group,omitempty"`
	// Name id, not the actual file name
	Name string `json:"name,omitempty"`
	// PermMode what permissions will be applied to the file
	PermMode any `json:"perm,omitempty"`
	// Selector used to determine if this file should be uploaded to the node
	Selector BinarySelector `json:"selector,omitempty"`
	// Shasum is used to check the file during sourcing of the distro package
	Shasum string `json:"shasum,omitempty"`
	// Source path the file should be found during package creation
	Source string `json:"source"`
	// Symlinks that will be created from the Target file
	Symlinks []string `json:"symlinks,omitempty"`
	// Target path on the remote host that will created
	Target string `json:"target"`
	// TargetIsDir if the target is a directory, normally used for image upload logic
	TargetIsDir bool `json:"isDirectory,omitempty"`
	// User to which the file will be owned by
	User string `json:"user,omitempty"`
	// Base is runtime option
	Base string `json:"-"`
	// PermString is runtime option
	PermString string `json:"-"`
	// DirPermString is runtime option
	DirPermString string `json:"-"`
	// OriginalTarget is runtime option
	OriginalTarget string `json:"-"`
	// LocalSource is runtime option
	LocalSource LocalFile `json:"-"`
}

ZarfFile used by both Distro and Cluster logic

func (*ZarfFile) HasData

func (u *ZarfFile) HasData() bool

HasData if the Data is not empty

func (*ZarfFile) Owner

func (u *ZarfFile) Owner() string

Owner returns a chown compatible user:group string from User and Group, or empty when neither are set.

func (*ZarfFile) String

func (u *ZarfFile) String() string

String returns the file bundle name or if it is empty, the source.

func (*ZarfFile) TargetDirectory

func (u *ZarfFile) TargetDirectory() string

TargetDirectory returns the directory for the target file

func (*ZarfFile) UnmarshalYAML

func (u *ZarfFile) UnmarshalYAML(unmarshal func(any) error) error

UnmarshalYAML sets in some sane defaults when unmarshaling the data from yaml

type ZarfFiles

type ZarfFiles []*ZarfFile

ZarfFiles an interface to allow for implementing the Filter function

func (ZarfFiles) Filter

func (files ZarfFiles) Filter(filter func(f *ZarfFile) bool) ZarfFiles

Filter returns a filtered list of Files. The filter function should return true for files matching the criteria.

Directories

Path Synopsis
Package cluster is for the api representation of Cluster
Package cluster is for the api representation of Cluster
Package distro is for the api representation of Distro Package
Package distro is for the api representation of Distro Package

Jump to

Keyboard shortcuts

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