param

package
v0.0.0-...-e889ff3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 22 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DeploymentKind       = "deployment"
	StatefulSetKind      = "statefulset"
	DeploymentConfigKind = "deploymentconfig"
	PVCKind              = "pvc"
	NamespaceKind        = "namespace"
	SecretKind           = "secret"
)

Variables

This section is empty.

Functions

func InitPhaseParams

func InitPhaseParams(ctx context.Context, cli kubernetes.Interface, tp *TemplateParams, phaseName string, objects map[string]crv1alpha1.ObjectReference) error

InitPhaseParams initializes the TemplateParams with Phase information

func RenderArgs

func RenderArgs(args map[string]interface{}, tp TemplateParams) (map[string]interface{}, error)

RenderArgs function renders the arguments required for execution

func RenderArtifacts

func RenderArtifacts(arts map[string]crv1alpha1.Artifact, tp TemplateParams) (map[string]crv1alpha1.Artifact, error)

RenderArtifacts function renders the artifacts required for execution

func RenderObjectRefs

RenderObjectRefs function renders object refs from TemplateParams

func UpdateDeferPhaseParams

func UpdateDeferPhaseParams(ctx context.Context, tp *TemplateParams, output map[string]interface{})

UpdateDeferPhaseParams updates the TemplateParams deferPhase output with passed output This output would be generated/passed by execution of the phase

func UpdatePhaseParams

func UpdatePhaseParams(ctx context.Context, tp *TemplateParams, phaseName string, output map[string]interface{})

UpdatePhaseParams updates the TemplateParams with Phase information

Types

type Credential

type Credential struct {
	Type              CredentialType
	KeyPair           *KeyPair
	Secret            *corev1.Secret
	KopiaServerSecret *KopiaServerCreds
}

Credential resolves the storage

type CredentialType

type CredentialType string

CredentialType

const (
	CredentialTypeKeyPair CredentialType = "keyPair"
	CredentialTypeSecret  CredentialType = "secret"
	CredentialTypeKopia   CredentialType = "kopia"
)

type DeploymentConfigParams

type DeploymentConfigParams struct {
	Name                   string
	Namespace              string
	Pods                   []string
	Containers             [][]string
	PersistentVolumeClaims map[string]map[string]string
}

DeploymentConfigParams are params for deploymentconfig, will be used if working on open shift cluster https://docs.openshift.com/container-platform/4.1/applications/deployments/what-deployments-are.html

type DeploymentParams

type DeploymentParams struct {
	Name                   string
	Namespace              string
	Pods                   []string
	Containers             [][]string
	PersistentVolumeClaims map[string]map[string]string
}

DeploymentParams are params for deployments

type KeyPair

type KeyPair struct {
	ID     string
	Secret string
}

KeyPair is a credential that contains two strings: an ID and a secret.

type KopiaServerCreds

type KopiaServerCreds struct {
	Username       string
	Hostname       string
	Password       string
	Cert           string
	ConnectOptions map[string]int
}

KopiaServerCreds contains creds to communicate with Kopia server

type NamespaceParams

type NamespaceParams struct {
	Name      string
	Namespace string
}

NamespaceParams are params for namespaces

type PVCParams

type PVCParams struct {
	Name      string
	Namespace string
}

PVCParams are params for persistent volume claims

type Phase

type Phase struct {
	Secrets map[string]corev1.Secret
	Output  map[string]interface{}
}

Phase represents a Blueprint phase and contains the phase output

type Profile

type Profile struct {
	Location      crv1alpha1.Location
	Credential    Credential
	SkipSSLVerify bool
}

Profile contains where to store artifacts and how to access them.

type RepositoryServer

type RepositoryServer struct {
	Name            string
	Namespace       string
	ServerInfo      crv1alpha1.ServerInfo
	Username        string
	Credentials     RepositoryServerCredentials
	Address         string
	ContentCacheMB  int
	MetadataCacheMB int
}

RepositoryServer contains fields from Repository server CR that will be used to resolve go templates for repository server in blueprint

type RepositoryServerCredentials

type RepositoryServerCredentials struct {
	ServerTLS        corev1.Secret
	ServerUserAccess corev1.Secret
}

type StatefulSetParams

type StatefulSetParams struct {
	Name                   string
	Namespace              string
	Pods                   []string
	Containers             [][]string
	PersistentVolumeClaims map[string]map[string]string
}

StatefulSetParams are params for stateful sets.

type TemplateParams

type TemplateParams struct {
	StatefulSet      *StatefulSetParams
	DeploymentConfig *DeploymentConfigParams
	Deployment       *DeploymentParams
	PVC              *PVCParams
	Namespace        *NamespaceParams
	ArtifactsIn      map[string]crv1alpha1.Artifact
	ConfigMaps       map[string]corev1.ConfigMap
	Secrets          map[string]corev1.Secret
	Time             string
	Profile          *Profile
	RepositoryServer *RepositoryServer
	Options          map[string]string
	Object           map[string]interface{}
	Phases           map[string]*Phase
	DeferPhase       *Phase
	PodOverride      crv1alpha1.JSONMap
}

TemplateParams are the values that will change between separate runs of Phases.

func New

New function fetches and returns the desired params

Jump to

Keyboard shortcuts

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