Documentation ¶
Index ¶
- Constants
- func InitPhaseParams(ctx context.Context, cli kubernetes.Interface, tp *TemplateParams, ...) error
- func RenderArgs(args map[string]interface{}, tp TemplateParams) (map[string]interface{}, error)
- func RenderArtifacts(arts map[string]crv1alpha1.Artifact, tp TemplateParams) (map[string]crv1alpha1.Artifact, error)
- func RenderObjectRefs(in map[string]crv1alpha1.ObjectReference, tp TemplateParams) (map[string]crv1alpha1.ObjectReference, error)
- func UpdateDeferPhaseParams(ctx context.Context, tp *TemplateParams, output map[string]interface{})
- func UpdatePhaseParams(ctx context.Context, tp *TemplateParams, phaseName string, ...)
- type Credential
- type CredentialType
- type DeploymentConfigParams
- type DeploymentParams
- type KeyPair
- type KopiaServerCreds
- type NamespaceParams
- type PVCParams
- type Phase
- type Profile
- type RepositoryServer
- type RepositoryServerCredentials
- type StatefulSetParams
- type TemplateParams
Constants ¶
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 ¶
func RenderObjectRefs(in map[string]crv1alpha1.ObjectReference, tp TemplateParams) (map[string]crv1alpha1.ObjectReference, error)
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
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 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 ¶
NamespaceParams are params for namespaces
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 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 PodAnnotations map[string]string PodLabels map[string]string }
TemplateParams are the values that will change between separate runs of Phases.
func New ¶
func New(ctx context.Context, cli kubernetes.Interface, dynCli dynamic.Interface, crCli versioned.Interface, osCli osversioned.Interface, as crv1alpha1.ActionSpec) (*TemplateParams, error)
New function fetches and returns the desired params