Documentation ¶
Overview ¶
Package cluster is a generated GoMock package.
Index ¶
- Constants
- func AddIfNotExists(list []string, item string) []string
- func DeleteSpecifyDir(dir string) error
- func DeleteSpecifyFile(filename string) error
- func GenerateNodePort(usedPorts []int) int
- func GetApplicationSetElements(data []byte) ([]string, error)
- func GetClustersDir(dir string) string
- func GetHostClusterAppsetFilePath(dir string) string
- func GetHostClusterNames(filePath string) (hostClusterNames []string, err error)
- func GetHostClustesrDir(dir string) string
- func GetRuntimesDir(dir string) string
- func GetTenantProductionDir(dir string) string
- func GetVclusterNames(filePath string) (vclusterNames []string, err error)
- func GetVclustersDir(dir, subDir string) string
- func IsHostCluser(cluster *resourcev1alpha1.Cluster) bool
- func IsPhysicalRuntime(cluster *resourcev1alpha1.Cluster) bool
- func IsValidRuntimeAppSetFilename(filename string) bool
- func IsVirtualRuntime(cluster *resourcev1alpha1.Cluster) bool
- func RemoveStringFromArray(arr []string, target string) []string
- func ReplaceFilePath(filePath, oldDir, newDir string) (newPath string)
- func ReplacePlaceholders(data string, placeholder, value string) string
- func WriteConfigFile(filePath, content string) error
- type Argocd
- type ClusterRegistration
- func (r *ClusterRegistration) CheckHostClusterDirExists() error
- func (r *ClusterRegistration) DeleteCluster() error
- func (r *ClusterRegistration) DeleteClusterByType(config *Config) (*nodestree.Node, error)
- func (r *ClusterRegistration) DeleteClusterToKustomization() (err error)
- func (r *ClusterRegistration) DeleteFileIfAppSetHasNoElements() error
- func (r *ClusterRegistration) DeleteHostCluster(nodes *nodestree.Node) error
- func (r *ClusterRegistration) DeleteHostClusterAppSet() error
- func (r *ClusterRegistration) DeleteRuntime(nodes *nodestree.Node) error
- func (r *ClusterRegistration) DeleteRuntimeAppSet() error
- func (r *ClusterRegistration) DeleteVclusterAppSet() error
- func (r *ClusterRegistration) Execute(nodes *nodestree.Node) error
- func (r *ClusterRegistration) GetAndDeleteHostClusterNames() error
- func (r *ClusterRegistration) GetAndDeleteVclusterNames() error
- func (r *ClusterRegistration) GetAndMergeHostClusterNames() error
- func (r *ClusterRegistration) GetAndMergeVclusterNames() error
- func (r *ClusterRegistration) GetArgocdURL() (string, error)
- func (r *ClusterRegistration) GetTraefikNodePortToHostCluster(tenantLocalPath, hostCluster string) (int, error)
- func (r *ClusterRegistration) InitializeDependencies(param *ClusterRegistrationParam) error
- func (r *ClusterRegistration) LoadTemplateNodesTree(ignorePath, ignoreFile []string) (nodes nodestree.Node, err error)
- func (r *ClusterRegistration) OverlayTemplateDirectoryPlaceholder(nodes *nodestree.Node, placeholder string, replaceVaule string)
- func (r *ClusterRegistration) Remove() error
- func (r *ClusterRegistration) ReplaceFilePath(nodes *nodestree.Node)
- func (r *ClusterRegistration) Save() error
- func (r *ClusterRegistration) SaveClusterByType(config *Config) (*nodestree.Node, error)
- func (r *ClusterRegistration) SaveClusterToKustomization() (err error)
- func (r *ClusterRegistration) SaveHostCluster(nodes *nodestree.Node) error
- func (r *ClusterRegistration) SaveRuntime(nodes *nodestree.Node) error
- func (r *ClusterRegistration) WriteCluster() error
- func (r *ClusterRegistration) WriteFileToTenantConfigRepository(nodes *nodestree.Node) error
- type ClusterRegistrationOperator
- type ClusterRegistrationParam
- type ClusterUsage
- type CommonConfig
- type Config
- func (c *Config) GetRemoveHostClusterConfig() (ignorePath, ignoreFile []string)
- func (c *Config) GetRemovePhysicalRuntimeConfig() (ignorePath, ignoreFile []string)
- func (c *Config) GetRemoveVirtualRuntimeConfig() (ignorePath, ignoreFile []string)
- func (c *Config) GetSaveHostClusterConfig() (ignorePath, ignoreFile []string)
- func (c *Config) GetSavePhysicalRuntimeConfig() (ignorePath, ignoreFile []string)
- func (c *Config) GetSaveVirtualRuntimeConfig() (ignorePath, ignoreFile []string)
- type HostCluster
- type HostClusterConfig
- type MockClusterRegistrationOperator
- func (m *MockClusterRegistrationOperator) EXPECT() *MockClusterRegistrationOperatorMockRecorder
- func (m *MockClusterRegistrationOperator) GetArgocdURL() (string, error)
- func (m *MockClusterRegistrationOperator) GetTraefikNodePortToHostCluster(tenantLocalPath, hostCluster string) (int, error)
- func (m *MockClusterRegistrationOperator) InitializeDependencies(param *ClusterRegistrationParam) error
- func (m *MockClusterRegistrationOperator) Remove() error
- func (m *MockClusterRegistrationOperator) Save() error
- type MockClusterRegistrationOperatorMockRecorder
- func (mr *MockClusterRegistrationOperatorMockRecorder) GetArgocdURL() *gomock.Call
- func (mr *MockClusterRegistrationOperatorMockRecorder) GetTraefikNodePortToHostCluster(tenantLocalPath, hostCluster interface{}) *gomock.Call
- func (mr *MockClusterRegistrationOperatorMockRecorder) InitializeDependencies(param interface{}) *gomock.Call
- func (mr *MockClusterRegistrationOperatorMockRecorder) Remove() *gomock.Call
- func (mr *MockClusterRegistrationOperatorMockRecorder) Save() *gomock.Call
- type Remove
- type Runtime
- type RuntimeConfig
- type RuntimeNameAndApiServer
- type Save
- type Traefik
- type Vcluster
Constants ¶
const (
ClusterfilterFileName = "clusterignorerule"
)
Variables ¶
This section is empty.
Functions ¶
func AddIfNotExists ¶
func DeleteSpecifyDir ¶
func DeleteSpecifyFile ¶
func GenerateNodePort ¶
func GetClustersDir ¶
func GetHostClusterNames ¶
func GetHostClustesrDir ¶
func GetRuntimesDir ¶
func GetTenantProductionDir ¶
func GetVclusterNames ¶
func GetVclustersDir ¶
func IsHostCluser ¶
func IsHostCluser(cluster *resourcev1alpha1.Cluster) bool
func IsPhysicalRuntime ¶
func IsPhysicalRuntime(cluster *resourcev1alpha1.Cluster) bool
func IsVirtualRuntime ¶
func IsVirtualRuntime(cluster *resourcev1alpha1.Cluster) bool
func RemoveStringFromArray ¶
func ReplaceFilePath ¶
func ReplacePlaceholders ¶
func WriteConfigFile ¶
Types ¶
type ClusterRegistration ¶
type ClusterRegistration struct { Cluster *resourcev1alpha1.Cluster ClusterResouceFiles []string ClusterTemplateRepoLocalPath string TenantConfigRepoLocalPath string RepoURL string CaBundle string Usage ClusterUsage HostCluster *HostCluster HostClusterNames []string VclusterNames []string Vcluster *Vcluster RuntimeNameAndApiServers []*RuntimeNameAndApiServer Runtime *Runtime Traefik *Traefik NautesConfigs nautesconfigs.Nautes GitConfigs nautesconfigs.GitRepo SecretConfigs nautesconfigs.SecretRepo OauthConfigs nautesconfigs.OAuth }
func (*ClusterRegistration) CheckHostClusterDirExists ¶
func (r *ClusterRegistration) CheckHostClusterDirExists() error
func (*ClusterRegistration) DeleteCluster ¶
func (r *ClusterRegistration) DeleteCluster() error
func (*ClusterRegistration) DeleteClusterByType ¶
func (r *ClusterRegistration) DeleteClusterByType(config *Config) (*nodestree.Node, error)
func (*ClusterRegistration) DeleteClusterToKustomization ¶
func (r *ClusterRegistration) DeleteClusterToKustomization() (err error)
func (*ClusterRegistration) DeleteFileIfAppSetHasNoElements ¶
func (r *ClusterRegistration) DeleteFileIfAppSetHasNoElements() error
func (*ClusterRegistration) DeleteHostCluster ¶
func (r *ClusterRegistration) DeleteHostCluster(nodes *nodestree.Node) error
func (*ClusterRegistration) DeleteHostClusterAppSet ¶
func (r *ClusterRegistration) DeleteHostClusterAppSet() error
func (*ClusterRegistration) DeleteRuntime ¶
func (r *ClusterRegistration) DeleteRuntime(nodes *nodestree.Node) error
func (*ClusterRegistration) DeleteRuntimeAppSet ¶
func (r *ClusterRegistration) DeleteRuntimeAppSet() error
func (*ClusterRegistration) DeleteVclusterAppSet ¶
func (r *ClusterRegistration) DeleteVclusterAppSet() error
func (*ClusterRegistration) Execute ¶
func (r *ClusterRegistration) Execute(nodes *nodestree.Node) error
func (*ClusterRegistration) GetAndDeleteHostClusterNames ¶
func (r *ClusterRegistration) GetAndDeleteHostClusterNames() error
func (*ClusterRegistration) GetAndDeleteVclusterNames ¶
func (r *ClusterRegistration) GetAndDeleteVclusterNames() error
func (*ClusterRegistration) GetAndMergeHostClusterNames ¶
func (r *ClusterRegistration) GetAndMergeHostClusterNames() error
func (*ClusterRegistration) GetAndMergeVclusterNames ¶
func (r *ClusterRegistration) GetAndMergeVclusterNames() error
func (*ClusterRegistration) GetArgocdURL ¶
func (r *ClusterRegistration) GetArgocdURL() (string, error)
func (*ClusterRegistration) GetTraefikNodePortToHostCluster ¶
func (r *ClusterRegistration) GetTraefikNodePortToHostCluster(tenantLocalPath, hostCluster string) (int, error)
func (*ClusterRegistration) InitializeDependencies ¶
func (r *ClusterRegistration) InitializeDependencies(param *ClusterRegistrationParam) error
func (*ClusterRegistration) LoadTemplateNodesTree ¶
func (r *ClusterRegistration) LoadTemplateNodesTree(ignorePath, ignoreFile []string) (nodes nodestree.Node, err error)
func (*ClusterRegistration) OverlayTemplateDirectoryPlaceholder ¶
func (r *ClusterRegistration) OverlayTemplateDirectoryPlaceholder(nodes *nodestree.Node, placeholder string, replaceVaule string)
func (*ClusterRegistration) Remove ¶
func (r *ClusterRegistration) Remove() error
func (*ClusterRegistration) ReplaceFilePath ¶
func (r *ClusterRegistration) ReplaceFilePath(nodes *nodestree.Node)
func (*ClusterRegistration) Save ¶
func (r *ClusterRegistration) Save() error
func (*ClusterRegistration) SaveClusterByType ¶
func (r *ClusterRegistration) SaveClusterByType(config *Config) (*nodestree.Node, error)
func (*ClusterRegistration) SaveClusterToKustomization ¶
func (r *ClusterRegistration) SaveClusterToKustomization() (err error)
func (*ClusterRegistration) SaveHostCluster ¶
func (r *ClusterRegistration) SaveHostCluster(nodes *nodestree.Node) error
func (*ClusterRegistration) SaveRuntime ¶
func (r *ClusterRegistration) SaveRuntime(nodes *nodestree.Node) error
func (*ClusterRegistration) WriteCluster ¶
func (r *ClusterRegistration) WriteCluster() error
func (*ClusterRegistration) WriteFileToTenantConfigRepository ¶
func (r *ClusterRegistration) WriteFileToTenantConfigRepository(nodes *nodestree.Node) error
type ClusterRegistrationOperator ¶
type ClusterRegistrationOperator interface { InitializeDependencies(param *ClusterRegistrationParam) error GetArgocdURL() (string, error) GetTraefikNodePortToHostCluster(tenantLocalPath, hostCluster string) (int, error) Save() error Remove() error }
func NewClusterRegistration ¶
func NewClusterRegistration() ClusterRegistrationOperator
type ClusterUsage ¶
type ClusterUsage string
type CommonConfig ¶
type Config ¶
type Config struct { Save Save `yaml:"save"` Remove Remove `yaml:"remove"` Common CommonConfig `yaml:"common"` }
func NewClusterFileConfig ¶
func (*Config) GetRemoveHostClusterConfig ¶
func (*Config) GetRemovePhysicalRuntimeConfig ¶
func (*Config) GetRemoveVirtualRuntimeConfig ¶
func (*Config) GetSaveHostClusterConfig ¶
func (*Config) GetSavePhysicalRuntimeConfig ¶
func (*Config) GetSaveVirtualRuntimeConfig ¶
type HostCluster ¶
type HostClusterConfig ¶
type MockClusterRegistrationOperator ¶
type MockClusterRegistrationOperator struct {
// contains filtered or unexported fields
}
MockClusterRegistrationOperator is a mock of ClusterRegistrationOperator interface.
func NewMockClusterRegistrationOperator ¶
func NewMockClusterRegistrationOperator(ctrl *gomock.Controller) *MockClusterRegistrationOperator
NewMockClusterRegistrationOperator creates a new mock instance.
func (*MockClusterRegistrationOperator) EXPECT ¶
func (m *MockClusterRegistrationOperator) EXPECT() *MockClusterRegistrationOperatorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClusterRegistrationOperator) GetArgocdURL ¶
func (m *MockClusterRegistrationOperator) GetArgocdURL() (string, error)
GetArgocdURL mocks base method.
func (*MockClusterRegistrationOperator) GetTraefikNodePortToHostCluster ¶
func (m *MockClusterRegistrationOperator) GetTraefikNodePortToHostCluster(tenantLocalPath, hostCluster string) (int, error)
GetTraefikNodePortToHostCluster mocks base method.
func (*MockClusterRegistrationOperator) InitializeDependencies ¶
func (m *MockClusterRegistrationOperator) InitializeDependencies(param *ClusterRegistrationParam) error
InitializeDependencies mocks base method.
func (*MockClusterRegistrationOperator) Remove ¶
func (m *MockClusterRegistrationOperator) Remove() error
Remove mocks base method.
func (*MockClusterRegistrationOperator) Save ¶
func (m *MockClusterRegistrationOperator) Save() error
Save mocks base method.
type MockClusterRegistrationOperatorMockRecorder ¶
type MockClusterRegistrationOperatorMockRecorder struct {
// contains filtered or unexported fields
}
MockClusterRegistrationOperatorMockRecorder is the mock recorder for MockClusterRegistrationOperator.
func (*MockClusterRegistrationOperatorMockRecorder) GetArgocdURL ¶
func (mr *MockClusterRegistrationOperatorMockRecorder) GetArgocdURL() *gomock.Call
GetArgocdURL indicates an expected call of GetArgocdURL.
func (*MockClusterRegistrationOperatorMockRecorder) GetTraefikNodePortToHostCluster ¶
func (mr *MockClusterRegistrationOperatorMockRecorder) GetTraefikNodePortToHostCluster(tenantLocalPath, hostCluster interface{}) *gomock.Call
GetTraefikNodePortToHostCluster indicates an expected call of GetTraefikNodePortToHostCluster.
func (*MockClusterRegistrationOperatorMockRecorder) InitializeDependencies ¶
func (mr *MockClusterRegistrationOperatorMockRecorder) InitializeDependencies(param interface{}) *gomock.Call
InitializeDependencies indicates an expected call of InitializeDependencies.
func (*MockClusterRegistrationOperatorMockRecorder) Remove ¶
func (mr *MockClusterRegistrationOperatorMockRecorder) Remove() *gomock.Call
Remove indicates an expected call of Remove.
func (*MockClusterRegistrationOperatorMockRecorder) Save ¶
func (mr *MockClusterRegistrationOperatorMockRecorder) Save() *gomock.Call
Save indicates an expected call of Save.
type Remove ¶
type Remove struct { HostCluster HostClusterConfig `yaml:"hostCluster"` PhysicalRuntime RuntimeConfig `yaml:"physicalRuntime"` VirtualRuntime RuntimeConfig `yaml:"virtualRuntime"` }
type RuntimeConfig ¶
type RuntimeNameAndApiServer ¶
func AddOrUpdate ¶
func AddOrUpdate(list []*RuntimeNameAndApiServer, item *RuntimeNameAndApiServer) []*RuntimeNameAndApiServer
func DeleteRuntimeByName ¶
func DeleteRuntimeByName(runtimeList []*RuntimeNameAndApiServer, name string) []*RuntimeNameAndApiServer
type Save ¶
type Save struct { HostCluster HostClusterConfig `yaml:"hostCluster"` PhysicalRuntime RuntimeConfig `yaml:"physicalRuntime"` VirtualRuntime RuntimeConfig `yaml:"virtualRuntime"` }
type Vcluster ¶
type Vcluster struct { Name string Namespace string ApiServer string HttpsNodePort string TlsSan string HostCluster *HostCluster }
func ConstructVcluster ¶
func ConstructVcluster(param *ClusterRegistrationParam) (*Vcluster, error)