v1alpha1

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: BSD-3-Clause Imports: 7 Imported by: 4 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	LabelNameTenant       = "syn.tools/tenant"
	FinalizerName         = "cluster.lieutenant.syn.tools"
	PipelineFinalizerName = "cluster.lieutenant.syn.tools/pipelines"

	// DeleteProtectionAnnotation defines the delete protection annotation name
	DeleteProtectionAnnotation = "syn.tools/protected-delete"
)
View Source
const (
	GitLab      = GitType("gitlab")
	GitHub      = GitType("github")
	Gitea       = GitType("gitea")
	TypeUnknown = GitType("")
)

GitType enum values

View Source
const (
	// AutoRepoType managed by the git controller
	AutoRepoType = RepoType("auto")
	// UnmanagedRepoType by the git controller. These objects are only used as data store
	UnmanagedRepoType = RepoType("unmanaged")
	// DefaultRepoType is auto
	DefaultRepoType = RepoType("")
)
View Source
const (
	Created       GitPhase       = "created"
	Creating      GitPhase       = "creating"
	Failed        GitPhase       = "failed"
	PhaseUnknown  GitPhase       = ""
	ArchivePolicy DeletionPolicy = "Archive"
	DeletePolicy  DeletionPolicy = "Delete"
	RetainPolicy  DeletionPolicy = "Retain"
	CreatePolicy  CreationPolicy = "Create"
	AdoptPolicy   CreationPolicy = "Adopt"
)

GitPhase enum values

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "syn.tools", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type AccessToken added in v1.10.0

type AccessToken struct {
	// SecretRef references the secret the access token is stored in
	SecretRef string `json:"secretRef,omitempty"`
}

func (*AccessToken) DeepCopy added in v1.10.0

func (in *AccessToken) DeepCopy() *AccessToken

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessToken.

func (*AccessToken) DeepCopyInto added in v1.10.0

func (in *AccessToken) DeepCopyInto(out *AccessToken)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BootstrapToken

type BootstrapToken struct {
	// Token is the actual token to register the cluster
	Token string `json:"token,omitempty"`
	// ValidUntil timespan how long the token is valid. If the token is
	// used after this timestamp it will be rejected.
	ValidUntil metav1.Time `json:"validUntil,omitempty"`
	// TokenValid indicates if the token is still valid or was already used.
	TokenValid bool `json:"tokenValid,omitempty"`
}

BootstrapToken this key is used only once for Steward to register.

func (*BootstrapToken) DeepCopy

func (in *BootstrapToken) DeepCopy() *BootstrapToken

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BootstrapToken.

func (*BootstrapToken) DeepCopyInto

func (in *BootstrapToken) DeepCopyInto(out *BootstrapToken)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Cluster

type Cluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ClusterSpec   `json:"spec,omitempty"`
	Status ClusterStatus `json:"status,omitempty"`
}

Cluster is the Schema for the clusters API +kubebuilder:subresource:status +kubebuilder:resource:path=clusters,scope=Namespaced +kubebuilder:printcolumn:name="Display Name",type="string",JSONPath=".spec.displayName" +kubebuilder:printcolumn:name="Tenant",type="string",JSONPath=".spec.tenantRef.name" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (*Cluster) DeepCopy

func (in *Cluster) DeepCopy() *Cluster

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.

func (*Cluster) DeepCopyInto

func (in *Cluster) DeepCopyInto(out *Cluster)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Cluster) DeepCopyObject

func (in *Cluster) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Cluster) GetCreationPolicy added in v1.5.0

func (c *Cluster) GetCreationPolicy() CreationPolicy

GetCreationPolicy returns the object's creation policy

func (*Cluster) GetDeletionPolicy

func (c *Cluster) GetDeletionPolicy() DeletionPolicy

GetDeletionPolicy returns the object's deletion policy

func (*Cluster) GetDisplayName

func (c *Cluster) GetDisplayName() string

GetDisplayName returns the display name of the object

func (*Cluster) GetEnableCompilePipeline added in v1.11.0

func (c *Cluster) GetEnableCompilePipeline() bool

func (*Cluster) GetGitTemplate

func (c *Cluster) GetGitTemplate() *GitRepoTemplate

GetGitTemplate returns the git repository template

func (*Cluster) GetMeta

func (c *Cluster) GetMeta() metav1.ObjectMeta

func (*Cluster) GetSpec

func (c *Cluster) GetSpec() interface{}

func (*Cluster) GetStatus

func (c *Cluster) GetStatus() interface{}

func (*Cluster) GetTenantRef

func (c *Cluster) GetTenantRef() corev1.LocalObjectReference

GetTenantRef returns the tenant of this CR

func (*Cluster) SetGitRepoURLAndHostKeys

func (c *Cluster) SetGitRepoURLAndHostKeys(URL, hostKeys string)

SetGitRepoURLAndHostKeys updates the GitRepoURL and the GitHostKeys in the Cluster at once

type ClusterList

type ClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Cluster `json:"items"`
}

ClusterList contains a list of Cluster

func (*ClusterList) DeepCopy

func (in *ClusterList) DeepCopy() *ClusterList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList.

func (*ClusterList) DeepCopyInto

func (in *ClusterList) DeepCopyInto(out *ClusterList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterList) DeepCopyObject

func (in *ClusterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterSpec

type ClusterSpec struct {
	// DisplayName of cluster which could be different from metadata.name. Allows cluster renaming should it be needed.
	DisplayName string `json:"displayName,omitempty"`
	// GitRepoURL git repository storing the cluster configuration catalog. If this is set, no gitRepoTemplate is needed.
	GitRepoURL string `json:"gitRepoURL,omitempty"`
	// SSH GitHostKeys of the git server
	GitHostKeys string `json:"gitHostKeys,omitempty"`
	// GitRepoTemplate template for managing the GitRepo object.
	GitRepoTemplate *GitRepoTemplate `json:"gitRepoTemplate,omitempty"`
	// TenantRef reference to Tenant object the cluster belongs to.
	TenantRef corev1.LocalObjectReference `json:"tenantRef,omitempty"`
	// TenantGitRepoRevision allows to configure the revision of the tenant configuration to use. It can be any git tree-ish reference. The revision from the tenant will be inherited if left empty.
	TenantGitRepoRevision string `json:"tenantGitRepoRevision,omitempty"`
	// GlobalGitRepoRevision allows to configure the revision of the global configuration to use. It can be any git tree-ish reference. The revision from the tenant will be inherited if left empty.
	GlobalGitRepoRevision string `json:"globalGitRepoRevision,omitempty"`
	// TokenLifetime set the token lifetime
	TokenLifeTime string `json:"tokenLifeTime,omitempty"`
	// Facts are key/value pairs for statically configured facts
	Facts Facts `json:"facts,omitempty"`
	// DeletionPolicy defines how the external resources should be treated upon CR deletion.
	// Retain: will not delete any external resources
	// Delete: will delete the external resources
	// Archive: will archive the external resources, if it supports that
	// +kubebuilder:validation:Enum=Delete;Retain;Archive
	DeletionPolicy DeletionPolicy `json:"deletionPolicy,omitempty"`
	// CreationPolicy defines how the external resources should be treated upon CR creation.
	// Create: will only create a new external resource and will not manage already existing resources
	// Adopt:  will create a new external resource or will adopt and manage an already existing resource
	// +kubebuilder:validation:Enum=Create;Adopt
	CreationPolicy CreationPolicy `json:"creationPolicy,omitempty"`
	// EnableCompilePipeline determines whether the gitops compile pipeline should be set up for this cluster
	EnableCompilePipeline bool `json:"enableCompilePipeline,omitempty"`
}

ClusterSpec defines the desired state of Cluster

func (*ClusterSpec) DeepCopy

func (in *ClusterSpec) DeepCopy() *ClusterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec.

func (*ClusterSpec) DeepCopyInto

func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterStatus

type ClusterStatus struct {
	// BootstrapTokenValid validity of the bootstrap token, set by the Lieutenant API.
	BootstrapToken *BootstrapToken `json:"bootstrapToken,omitempty"`
	// Facts are key/value pairs for dynamically fetched facts
	Facts Facts `json:"facts,omitempty"`
	// CompileMeta contains information about the last compilation with Commodore.
	CompileMeta CompileMeta `json:"compileMeta,omitempty"`
}

ClusterStatus defines the observed state of Cluster

func (*ClusterStatus) DeepCopy

func (in *ClusterStatus) DeepCopy() *ClusterStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus.

func (*ClusterStatus) DeepCopyInto

func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CompileMeta added in v1.6.0

type CompileMeta struct {
	// LastCompile is the time of the last successful compilation.
	LastCompile metav1.Time `json:"lastCompile,omitempty"`
	// CommodoreBuildInfo is the freeform build information reported by the Commodore binary used for the last compilation.
	CommodoreBuildInfo map[string]string `json:"commodoreBuildInfo,omitempty"`
	// Global contains the information of the global configuration used for the last compilation.
	Global CompileMetaVersionInfo `json:"global,omitempty"`
	// Tenant contains the information of the tenant configuration used for the last compilation.
	Tenant CompileMetaVersionInfo `json:"tenant,omitempty"`
	// Packages contains the information of the packages used for the last compilation.
	Packages map[string]CompileMetaVersionInfo `json:"packages,omitempty"`
	// Instances contains the information of the component instances used for the last compilation.
	// The key is the name of the component instance.
	Instances map[string]CompileMetaInstanceVersionInfo `json:"instances,omitempty"`
}

CompileMeta contains information about the last compilation with Commodore.

func (*CompileMeta) DeepCopy added in v1.6.0

func (in *CompileMeta) DeepCopy() *CompileMeta

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompileMeta.

func (*CompileMeta) DeepCopyInto added in v1.6.0

func (in *CompileMeta) DeepCopyInto(out *CompileMeta)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CompileMetaInstanceVersionInfo added in v1.6.0

type CompileMetaInstanceVersionInfo struct {
	CompileMetaVersionInfo `json:",inline"`

	// Component is the name of a component instance.
	Component string `json:"component,omitempty"`
}

CompileMetaInstanceVersionInfo contains information about the version of a component instance.

func (*CompileMetaInstanceVersionInfo) DeepCopy added in v1.6.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompileMetaInstanceVersionInfo.

func (*CompileMetaInstanceVersionInfo) DeepCopyInto added in v1.6.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CompileMetaVersionInfo added in v1.6.0

type CompileMetaVersionInfo struct {
	// URL is the URL of the git repository.
	URL string `json:"url,omitempty"`
	// GitSHA is the git commit SHA of the used commit.
	GitSHA string `json:"gitSha,omitempty"`
	// Version is the version of the configuration.
	// Can point to a tag, branch or any other git reference.
	Version string `json:"version,omitempty"`
	// Path is the path inside the git repository where the configuration is stored.
	Path string `json:"path,omitempty"`
}

CompileMetaVersionInfo contains information about the version of a configuration repo or a package.

func (*CompileMetaVersionInfo) DeepCopy added in v1.6.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompileMetaVersionInfo.

func (*CompileMetaVersionInfo) DeepCopyInto added in v1.6.0

func (in *CompileMetaVersionInfo) DeepCopyInto(out *CompileMetaVersionInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CompilePipelineSpec added in v1.11.0

type CompilePipelineSpec struct {
	// Enabled enables or disables the compile pipeline for this tenant
	Enabled bool `json:"enabled,omitempty"`
	// Pipelines contains a map of filenames and file contents, specifying files which are added to the GitRepoTemplate in order to set up the automatically configured compile pipeline
	PipelineFiles map[string]string `json:"pipelineFiles,omitempty"`
}

func (*CompilePipelineSpec) DeepCopy added in v1.11.0

func (in *CompilePipelineSpec) DeepCopy() *CompilePipelineSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompilePipelineSpec.

func (*CompilePipelineSpec) DeepCopyInto added in v1.11.0

func (in *CompilePipelineSpec) DeepCopyInto(out *CompilePipelineSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CompilePipelineStatus added in v1.11.0

type CompilePipelineStatus struct {
	// Clusters contains the list of all clusters for which the automatically configured compile pipeline is enabled
	Clusters []string `json:"clusters,omitempty"`
}

func (*CompilePipelineStatus) DeepCopy added in v1.11.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompilePipelineStatus.

func (*CompilePipelineStatus) DeepCopyInto added in v1.11.0

func (in *CompilePipelineStatus) DeepCopyInto(out *CompilePipelineStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CreationPolicy added in v1.5.0

type CreationPolicy string

CreationPolicy defines the type creation policy

type DeletionPolicy

type DeletionPolicy string

DeletionPolicy defines the type deletion policy

type DeployKey

type DeployKey struct {
	// Type defines what type the key is (rsa, ed25519, etc...)
	Type string `json:"type,omitempty"`
	// Key is the actual key
	Key string `json:"key,omitempty"`
	// WriteAccess if the key has RW access or not
	WriteAccess bool `json:"writeAccess,omitempty"`
}

DeployKey defines an SSH key to be used for git operations.

func (*DeployKey) DeepCopy

func (in *DeployKey) DeepCopy() *DeployKey

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployKey.

func (*DeployKey) DeepCopyInto

func (in *DeployKey) DeepCopyInto(out *DeployKey)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DeployKeyStatus added in v1.13.0

type DeployKeyStatus struct {
	DeployKey `json:",inline"`
	// SecretRef is the name of the secret in which the SSH keypair is stored.
	SecretRef corev1.LocalObjectReference `json:"secretRef,omitempty"`
}

DeployKeyStatus tracks the status for a generated Deploy Key

func (*DeployKeyStatus) DeepCopy added in v1.13.0

func (in *DeployKeyStatus) DeepCopy() *DeployKeyStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployKeyStatus.

func (*DeployKeyStatus) DeepCopyInto added in v1.13.0

func (in *DeployKeyStatus) DeepCopyInto(out *DeployKeyStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DeployKeyTemplate added in v1.13.0

type DeployKeyTemplate struct {
	// Type defines what type the key is. For key generation, currently only `ssh-rsa` and `ssh-ed25519` are supported.
	Type string `json:"type,omitempty"`
	// WriteAccess if the key has RW access or not
	WriteAccess bool `json:"writeAccess,omitempty"`
}

DeployKeyTemplate defines an SSH key to be generated for git operations.

func (*DeployKeyTemplate) DeepCopy added in v1.13.0

func (in *DeployKeyTemplate) DeepCopy() *DeployKeyTemplate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployKeyTemplate.

func (*DeployKeyTemplate) DeepCopyInto added in v1.13.0

func (in *DeployKeyTemplate) DeepCopyInto(out *DeployKeyTemplate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EnvVar added in v1.10.0

type EnvVar struct {
	// Name of the environment variable
	// +required
	Name string `json:"name"`
	// Value of the environment variable
	// +optional
	Value string `json:"value,omitempty"`

	// ValueFrom is a reference to an object that contains the value of the environment variable
	// +optional
	ValueFrom *EnvVarSource `json:"valueFrom,omitempty"`

	// GitlabOptions contains additional options for GitLab CI variables
	// +optional
	GitlabOptions EnvVarGitlabOptions `json:"gitlabOptions,omitempty"`
}

EnvVar represents an environment added to the CI system of the Git repository.

func (*EnvVar) DeepCopy added in v1.10.0

func (in *EnvVar) DeepCopy() *EnvVar

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVar.

func (*EnvVar) DeepCopyInto added in v1.10.0

func (in *EnvVar) DeepCopyInto(out *EnvVar)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EnvVarGitlabOptions added in v1.10.0

type EnvVarGitlabOptions struct {
	// Description is a description of the CI variable.
	// +optional
	Description string `json:"description,omitempty"`
	// Protected will expose the variable only in protected branches and tags.
	// +optional
	Protected bool `json:"protected,omitempty"`
	// Masked will mask the variable in the job logs.
	// +optional
	Masked bool `json:"masked,omitempty"`
	// Raw will prevent the variable from being expanded.
	// +optional
	Raw bool `json:"raw,omitempty"`
}

func (*EnvVarGitlabOptions) DeepCopy added in v1.10.0

func (in *EnvVarGitlabOptions) DeepCopy() *EnvVarGitlabOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVarGitlabOptions.

func (*EnvVarGitlabOptions) DeepCopyInto added in v1.10.0

func (in *EnvVarGitlabOptions) DeepCopyInto(out *EnvVarGitlabOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EnvVarSource added in v1.10.0

type EnvVarSource struct {
	// Selects a key of a secret in the pod's namespace
	// +optional
	SecretKeyRef *corev1.SecretKeySelector `json:"secretKeyRef,omitempty"`
}

EnvVarSource represents a source for the value of an EnvVar.

func (*EnvVarSource) DeepCopy added in v1.10.0

func (in *EnvVarSource) DeepCopy() *EnvVarSource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVarSource.

func (*EnvVarSource) DeepCopyInto added in v1.10.0

func (in *EnvVarSource) DeepCopyInto(out *EnvVarSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Facts

type Facts map[string]string

Facts is a map of arbitrary facts for the cluster

func (Facts) DeepCopy

func (in Facts) DeepCopy() Facts

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Facts.

func (Facts) DeepCopyInto

func (in Facts) DeepCopyInto(out *Facts)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GitPhase

type GitPhase string

GitPhase is the enum for the git phase status

type GitRepo

type GitRepo struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   GitRepoSpec   `json:"spec,omitempty"`
	Status GitRepoStatus `json:"status,omitempty"`
}

GitRepo is the Schema for the gitrepos API +kubebuilder:subresource:status +kubebuilder:resource:path=gitrepos,scope=Namespaced +kubebuilder:printcolumn:name="Display Name",type="string",JSONPath=".spec.displayName" +kubebuilder:printcolumn:name="Repo Name",type="string",JSONPath=".spec.repoName" +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (*GitRepo) DeepCopy

func (in *GitRepo) DeepCopy() *GitRepo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepo.

func (*GitRepo) DeepCopyInto

func (in *GitRepo) DeepCopyInto(out *GitRepo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GitRepo) DeepCopyObject

func (in *GitRepo) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*GitRepo) GetCreationPolicy added in v1.5.0

func (g *GitRepo) GetCreationPolicy() CreationPolicy

GetCreationPolicy returns the object's creation policy

func (*GitRepo) GetDeletionPolicy

func (g *GitRepo) GetDeletionPolicy() DeletionPolicy

GetDeletionPolicy returns the object's deletion policy

func (*GitRepo) GetDisplayName

func (g *GitRepo) GetDisplayName() string

GetDisplayName returns the display name of the object

func (*GitRepo) GetGitTemplate

func (g *GitRepo) GetGitTemplate() *GitRepoTemplate

GetGitTemplate returns the git repository template

func (*GitRepo) GetMeta

func (g *GitRepo) GetMeta() metav1.ObjectMeta

func (*GitRepo) GetSpec

func (g *GitRepo) GetSpec() interface{}

func (*GitRepo) GetStatus

func (g *GitRepo) GetStatus() interface{}

func (*GitRepo) GetTenantRef

func (g *GitRepo) GetTenantRef() corev1.LocalObjectReference

GetTenantRef returns the tenant of this CR

func (*GitRepo) SetGitRepoURLAndHostKeys

func (g *GitRepo) SetGitRepoURLAndHostKeys(URL, hostKeys string)

SetGitRepoURLAndHostKeys is currenlty a noop for gitrepo

type GitRepoList

type GitRepoList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []GitRepo `json:"items"`
}

GitRepoList contains a list of GitRepo

func (*GitRepoList) DeepCopy

func (in *GitRepoList) DeepCopy() *GitRepoList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepoList.

func (*GitRepoList) DeepCopyInto

func (in *GitRepoList) DeepCopyInto(out *GitRepoList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GitRepoList) DeepCopyObject

func (in *GitRepoList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type GitRepoSpec

type GitRepoSpec struct {
	GitRepoTemplate `json:",inline"`
	// TenantRef references the tenant this repo belongs to
	TenantRef corev1.LocalObjectReference `json:"tenantRef,omitempty"`
}

GitRepoSpec defines the desired state of GitRepo

func (*GitRepoSpec) DeepCopy

func (in *GitRepoSpec) DeepCopy() *GitRepoSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepoSpec.

func (*GitRepoSpec) DeepCopyInto

func (in *GitRepoSpec) DeepCopyInto(out *GitRepoSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GitRepoStatus

type GitRepoStatus struct {
	// Updated by Operator with current phase. The GitPhase enum will be used for application logic
	// as using it directly would only print an integer.
	Phase *GitPhase `json:"phase,omitempty"`
	// Type autodiscovered Git repo type. Same behaviour for the enum as with the Phase.
	Type GitType `json:"type,omitempty"`
	// URL computed Git repository URL
	URL string `json:"url,omitempty"`
	// SSH HostKeys of the git server
	HostKeys string `json:"hostKeys,omitempty"`
	// LastAppliedCIVariables contains the last applied CI variables as a json string
	LastAppliedCIVariables string `json:"lastAppliedCIVariables,omitempty"`
	// GeneratedDeployKeys contains all SSH deploy keys that were generated for the git repo
	GeneratedDeployKeys map[string]DeployKeyStatus `json:"generatedDeployKeys,omitempty"`
}

GitRepoStatus defines the observed state of GitRepo

func (*GitRepoStatus) DeepCopy

func (in *GitRepoStatus) DeepCopy() *GitRepoStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepoStatus.

func (*GitRepoStatus) DeepCopyInto

func (in *GitRepoStatus) DeepCopyInto(out *GitRepoStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GitRepoTemplate

type GitRepoTemplate struct {
	// APISecretRef reference to secret containing connection information
	APISecretRef corev1.SecretReference `json:"apiSecretRef,omitempty"`
	// DeployKeys optional list of SSH deploy keys. If not set, not deploy keys will be configured
	DeployKeys map[string]DeployKey `json:"deployKeys,omitempty"`
	// Path to Git repository
	GeneratedDeployKeys map[string]DeployKeyTemplate `json:"generatedDeployKeys,omitempty"`
	// Path to Git repository
	Path string `json:"path,omitempty"`
	// RepoName name of Git repository
	RepoName string `json:"repoName,omitempty"`
	// RepoType specifies if a repo should be managed by the git controller. A value of 'unmanaged' means it's not manged by the controller
	// +kubebuilder:validation:Enum=auto;unmanaged
	RepoType RepoType `json:"repoType,omitempty"`
	// DisplayName of Git repository
	DisplayName string `json:"displayName,omitempty"`
	// TemplateFiles is a list of files that should be pushed to the repository
	// after its creation.
	TemplateFiles map[string]string `json:"templateFiles,omitempty"`
	// DeletionPolicy defines how the external resources should be treated upon CR deletion.
	// Retain: will not delete any external resources
	// Delete: will delete the external resources
	// Archive: will archive the external resources, if it supports that
	// +kubebuilder:validation:Enum=Delete;Retain;Archive
	DeletionPolicy DeletionPolicy `json:"deletionPolicy,omitempty"`
	// CreationPolicy defines how the external resources should be treated upon CR creation.
	// Create: will only create a new external resource and will not manage already existing resources
	// Adopt:  will create a new external resource or will adopt and manage an already existing resource
	// +kubebuilder:validation:Enum=Create;Adopt
	CreationPolicy CreationPolicy `json:"creationPolicy,omitempty"`
	// AccessToken contains configuration for storing an access token in a secret.
	// If set, the Lieutenant operator will store an access token into this secret, which can be used to access the Git repository.
	// The token is stored under the key "token".
	// In the case of GitLab, this would be a Project Access Token with read-write access to the repository.
	AccessToken AccessToken `json:"accessToken,omitempty"`
	// CIVariables is a list of key-value pairs that will be set as CI variables in the Git repository.
	//
	// The variables are not expanded like PodSpec environment variables.
	CIVariables []EnvVar `json:"ciVariables,omitempty"`
}

GitRepoTemplate is used for templating git repos, it does not contain the tenantRef as it will be added by the controller creating the template instance.

func (*GitRepoTemplate) DeepCopy

func (in *GitRepoTemplate) DeepCopy() *GitRepoTemplate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepoTemplate.

func (*GitRepoTemplate) DeepCopyInto

func (in *GitRepoTemplate) DeepCopyInto(out *GitRepoTemplate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GitType

type GitType string

GitType as the enum for git types

type RepoType

type RepoType string

RepoType specifies the type of the repo

type Tenant

type Tenant struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   TenantSpec   `json:"spec,omitempty"`
	Status TenantStatus `json:"status,omitempty"`
}

Tenant is the Schema for the tenants API +kubebuilder:subresource:status +kubebuilder:resource:path=tenants,scope=Namespaced +kubebuilder:printcolumn:name="Display Name",type="string",JSONPath=".spec.displayName" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (*Tenant) ApplyTemplate

func (t *Tenant) ApplyTemplate(template *TenantTemplate) error

ApplyTemplate recursively merges in the values of the given template. The values of the tenant takes precedence.

func (*Tenant) DeepCopy

func (in *Tenant) DeepCopy() *Tenant

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tenant.

func (*Tenant) DeepCopyInto

func (in *Tenant) DeepCopyInto(out *Tenant)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Tenant) DeepCopyObject

func (in *Tenant) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Tenant) GetCompilePipelineSpec added in v1.11.0

func (t *Tenant) GetCompilePipelineSpec() *CompilePipelineSpec

GetCompilePipelineSpec returns the compile pipeline spec

func (*Tenant) GetCompilePipelineStatus added in v1.11.0

func (t *Tenant) GetCompilePipelineStatus() *CompilePipelineStatus

GetCompilePipelineStatus returns the compile pipeline status

func (*Tenant) GetCreationPolicy added in v1.5.0

func (t *Tenant) GetCreationPolicy() CreationPolicy

GetCreationPolicy returns the object's creation policy

func (*Tenant) GetDeletionPolicy

func (t *Tenant) GetDeletionPolicy() DeletionPolicy

GetDeletionPolicy returns the object's deletion policy

func (*Tenant) GetDisplayName

func (t *Tenant) GetDisplayName() string

GetDisplayName returns the display name of the object

func (*Tenant) GetGitTemplate

func (t *Tenant) GetGitTemplate() *GitRepoTemplate

GetGitTemplate returns the git repository template

func (*Tenant) GetMeta

func (t *Tenant) GetMeta() metav1.ObjectMeta

func (*Tenant) GetSpec

func (t *Tenant) GetSpec() interface{}

func (*Tenant) GetStatus

func (t *Tenant) GetStatus() interface{}

func (*Tenant) GetTenantRef

func (t *Tenant) GetTenantRef() corev1.LocalObjectReference

GetTenantRef returns the tenant of this CR

func (*Tenant) SetGitRepoURLAndHostKeys

func (t *Tenant) SetGitRepoURLAndHostKeys(URL, _ string)

SetGitRepoURLAndHostKeys will only set the URL for the tenant

type TenantList

type TenantList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Tenant `json:"items"`
}

TenantList contains a list of Tenant

func (*TenantList) DeepCopy

func (in *TenantList) DeepCopy() *TenantList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantList.

func (*TenantList) DeepCopyInto

func (in *TenantList) DeepCopyInto(out *TenantList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TenantList) DeepCopyObject

func (in *TenantList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TenantSpec

type TenantSpec struct {
	// DisplayName is the display name of the tenant.
	DisplayName string `json:"displayName,omitempty"`
	// GitRepoURL git repository storing the tenant configuration. If this is set, no gitRepoTemplate is needed.
	GitRepoURL string `json:"gitRepoURL,omitempty"`
	// GitRepoRevision allows to configure the revision of the tenant configuration to use. It can be any git tree-ish reference. Defaults to HEAD if left empty.
	GitRepoRevision string `json:"gitRepoRevision,omitempty"`
	// GlobalGitRepoURL git repository storing the global configuration.
	GlobalGitRepoURL string `json:"globalGitRepoURL,omitempty"`
	// GlobalGitRepoRevision allows to configure the revision of the global configuration to use. It can be any git tree-ish reference. Defaults to HEAD if left empty.
	GlobalGitRepoRevision string `json:"globalGitRepoRevision,omitempty"`
	// GitRepoTemplate Template for managing the GitRepo object. If not set, no GitRepo object will be created.
	GitRepoTemplate *GitRepoTemplate `json:"gitRepoTemplate,omitempty"`
	// DeletionPolicy defines how the external resources should be treated upon CR deletion.
	// Retain: will not delete any external resources
	// Delete: will delete the external resources
	// Archive: will archive the external resources, if it supports that
	// +kubebuilder:validation:Enum=Delete;Retain;Archive
	DeletionPolicy DeletionPolicy `json:"deletionPolicy,omitempty"`
	// CreationPolicy defines how the external resources should be treated upon CR creation.
	// Create: will only create a new external resource and will not manage already existing resources
	// Adopt:  will create a new external resource or will adopt and manage an already existing resource
	// +kubebuilder:validation:Enum=Create;Adopt
	CreationPolicy CreationPolicy `json:"creationPolicy,omitempty"`
	// ClusterTemplate defines a template which will be used to set defaults for the clusters of this tenant.
	// The fields within this can use Go templating.
	// See https://syn.tools/lieutenant-operator/explanations/templating.html for details.
	ClusterTemplate *ClusterSpec `json:"clusterTemplate,omitempty"`
	// CompilePipeline contains the configuration for the automatically configured compile pipelines on this tenant
	CompilePipeline *CompilePipelineSpec `json:"compilePipeline,omitempty"`
}

TenantSpec defines the desired state of Tenant

func (*TenantSpec) DeepCopy

func (in *TenantSpec) DeepCopy() *TenantSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantSpec.

func (*TenantSpec) DeepCopyInto

func (in *TenantSpec) DeepCopyInto(out *TenantSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TenantStatus

type TenantStatus struct {
	// CompilePipeline contains the status of the automatically configured compile pipelines on this tenant
	CompilePipeline *CompilePipelineStatus `json:"compilePipeline,omitempty"`
}

TenantStatus defines the observed state of Tenant

func (*TenantStatus) DeepCopy

func (in *TenantStatus) DeepCopy() *TenantStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantStatus.

func (*TenantStatus) DeepCopyInto

func (in *TenantStatus) DeepCopyInto(out *TenantStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TenantTemplate

type TenantTemplate struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec TenantSpec `json:"spec,omitempty"`
}

TenantTemplate is the Schema for the tenant templates API +kubebuilder:subresource:status +kubebuilder:resource:path=tenanttemplates,scope=Namespaced +kubebuilder:printcolumn:name="Display Name",type="string",JSONPath=".spec.displayName" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (*TenantTemplate) DeepCopy

func (in *TenantTemplate) DeepCopy() *TenantTemplate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantTemplate.

func (*TenantTemplate) DeepCopyInto

func (in *TenantTemplate) DeepCopyInto(out *TenantTemplate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TenantTemplate) DeepCopyObject

func (in *TenantTemplate) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TenantTemplateList

type TenantTemplateList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []TenantTemplate `json:"items"`
}

TenantTemplateList contains a list of TenantTemplate

func (*TenantTemplateList) DeepCopy

func (in *TenantTemplateList) DeepCopy() *TenantTemplateList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantTemplateList.

func (*TenantTemplateList) DeepCopyInto

func (in *TenantTemplateList) DeepCopyInto(out *TenantTemplateList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TenantTemplateList) DeepCopyObject

func (in *TenantTemplateList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

Jump to

Keyboard shortcuts

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