Documentation
¶
Index ¶
- Constants
- Variables
- type BootstrapToken
- type Cluster
- func (in *Cluster) DeepCopy() *Cluster
- func (in *Cluster) DeepCopyInto(out *Cluster)
- func (in *Cluster) DeepCopyObject() runtime.Object
- func (c *Cluster) GetCreationPolicy() CreationPolicy
- func (c *Cluster) GetDeletionPolicy() DeletionPolicy
- func (c *Cluster) GetDisplayName() string
- func (c *Cluster) GetGitTemplate() *GitRepoTemplate
- func (c *Cluster) GetMeta() metav1.ObjectMeta
- func (c *Cluster) GetSpec() interface{}
- func (c *Cluster) GetStatus() interface{}
- func (c *Cluster) GetTenantRef() corev1.LocalObjectReference
- func (c *Cluster) SetGitRepoURLAndHostKeys(URL, hostKeys string)
- type ClusterList
- type ClusterSpec
- type ClusterStatus
- type CompileMeta
- type CompileMetaInstanceVersionInfo
- type CompileMetaVersionInfo
- type CreationPolicy
- type DeletionPolicy
- type DeployKey
- type Facts
- type GitPhase
- type GitRepo
- func (in *GitRepo) DeepCopy() *GitRepo
- func (in *GitRepo) DeepCopyInto(out *GitRepo)
- func (in *GitRepo) DeepCopyObject() runtime.Object
- func (g *GitRepo) GetCreationPolicy() CreationPolicy
- func (g *GitRepo) GetDeletionPolicy() DeletionPolicy
- func (g *GitRepo) GetDisplayName() string
- func (g *GitRepo) GetGitTemplate() *GitRepoTemplate
- func (g *GitRepo) GetMeta() metav1.ObjectMeta
- func (g *GitRepo) GetSpec() interface{}
- func (g *GitRepo) GetStatus() interface{}
- func (g *GitRepo) GetTenantRef() corev1.LocalObjectReference
- func (g *GitRepo) SetGitRepoURLAndHostKeys(URL, hostKeys string)
- type GitRepoList
- type GitRepoSpec
- type GitRepoStatus
- type GitRepoTemplate
- type GitType
- type RepoType
- type Tenant
- func (t *Tenant) ApplyTemplate(template *TenantTemplate) error
- func (in *Tenant) DeepCopy() *Tenant
- func (in *Tenant) DeepCopyInto(out *Tenant)
- func (in *Tenant) DeepCopyObject() runtime.Object
- func (t *Tenant) GetCreationPolicy() CreationPolicy
- func (t *Tenant) GetDeletionPolicy() DeletionPolicy
- func (t *Tenant) GetDisplayName() string
- func (t *Tenant) GetGitTemplate() *GitRepoTemplate
- func (t *Tenant) GetMeta() metav1.ObjectMeta
- func (t *Tenant) GetSpec() interface{}
- func (t *Tenant) GetStatus() interface{}
- func (t *Tenant) GetTenantRef() corev1.LocalObjectReference
- func (t *Tenant) SetGitRepoURLAndHostKeys(URL, _ string)
- type TenantList
- type TenantSpec
- type TenantStatus
- type TenantTemplate
- type TenantTemplateList
Constants ¶
const ( LabelNameTenant = "syn.tools/tenant" FinalizerName = "cluster.lieutenant.syn.tools" // DeleteProtectionAnnotation defines the delete protection annotation name DeleteProtectionAnnotation = "syn.tools/protected-delete" )
const ( GitLab = GitType("gitlab") GitHub = GitType("github") Gitea = GitType("gitea") TypeUnknown = GitType("") )
GitType enum values
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("") )
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 ¶
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 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
func (*Cluster) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Cluster) DeepCopyObject ¶
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 ¶
GetDisplayName returns the display name of the object
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) GetTenantRef ¶
func (c *Cluster) GetTenantRef() corev1.LocalObjectReference
GetTenantRef returns the tenant of this CR
func (*Cluster) SetGitRepoURLAndHostKeys ¶
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"`
}
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
func (in *CompileMetaInstanceVersionInfo) DeepCopy() *CompileMetaInstanceVersionInfo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompileMetaInstanceVersionInfo.
func (*CompileMetaInstanceVersionInfo) DeepCopyInto ¶ added in v1.6.0
func (in *CompileMetaInstanceVersionInfo) DeepCopyInto(out *CompileMetaInstanceVersionInfo)
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
func (in *CompileMetaVersionInfo) DeepCopy() *CompileMetaVersionInfo
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 CreationPolicy ¶ added in v1.5.0
type CreationPolicy string
CreationPolicy defines the type creation 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployKey.
func (*DeployKey) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Facts ¶
Facts is a map of arbitrary facts for the cluster
func (Facts) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Facts.
func (Facts) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepo.
func (*GitRepo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GitRepo) DeepCopyObject ¶
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 ¶
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) GetTenantRef ¶
func (g *GitRepo) GetTenantRef() corev1.LocalObjectReference
GetTenantRef returns the tenant of this CR
func (*GitRepo) SetGitRepoURLAndHostKeys ¶
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"`
}
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
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"`
}
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 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tenant.
func (*Tenant) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Tenant) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
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 ¶
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) GetTenantRef ¶
func (t *Tenant) GetTenantRef() corev1.LocalObjectReference
GetTenantRef returns the tenant of this CR
func (*Tenant) SetGitRepoURLAndHostKeys ¶
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"`
}
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 {
}
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.