Documentation ¶
Index ¶
- func FluxChangeDiff(currentSpec, newSpec *cluster.Spec) *types.ChangeDiff
- type FileGenerator
- func (g *FileGenerator) Init(writer filewriter.FileWriter, eksaSystemDir, fluxSystemDir string) error
- func (g *FileGenerator) WriteClusterConfig(clusterSpec *cluster.Spec, datacenterConfig providers.DatacenterConfig, ...) error
- func (g *FileGenerator) WriteEksaFiles(clusterSpec *cluster.Spec, datacenterConfig providers.DatacenterConfig, ...) error
- func (g *FileGenerator) WriteEksaKustomization() error
- func (g *FileGenerator) WriteFluxKustomization(clusterSpec *cluster.Spec) error
- func (g *FileGenerator) WriteFluxPatch(clusterSpec *cluster.Spec) error
- func (g *FileGenerator) WriteFluxSync() error
- func (g *FileGenerator) WriteFluxSystemFiles(clusterSpec *cluster.Spec) error
- type Flux
- func (f *Flux) Bootstrap(ctx context.Context, cluster *types.Cluster, clusterSpec *cluster.Spec) error
- func (f *Flux) BootstrapGit(ctx context.Context, cluster *types.Cluster, clusterSpec *cluster.Spec) error
- func (f *Flux) BootstrapGithub(ctx context.Context, cluster *types.Cluster, clusterSpec *cluster.Spec) error
- func (f *Flux) CleanupGitRepo(ctx context.Context, clusterSpec *cluster.Spec) error
- func (f *Flux) ForceReconcileGitRepo(ctx context.Context, cluster *types.Cluster, clusterSpec *cluster.Spec) error
- func (f *Flux) Install(ctx context.Context, cluster *types.Cluster, oldSpec, newSpec *cluster.Spec) error
- func (f *Flux) InstallGitOps(ctx context.Context, cluster *types.Cluster, clusterSpec *cluster.Spec, ...) error
- func (f *Flux) PauseClusterResourcesReconcile(ctx context.Context, cluster *types.Cluster, clusterSpec *cluster.Spec, ...) error
- func (f *Flux) ResumeClusterResourcesReconcile(ctx context.Context, cluster *types.Cluster, clusterSpec *cluster.Spec, ...) error
- func (f *Flux) Uninstall(ctx context.Context, cluster *types.Cluster, clusterSpec *cluster.Spec) error
- func (f *Flux) UpdateGitEksaSpec(ctx context.Context, clusterSpec *cluster.Spec, ...) error
- func (f *Flux) Upgrade(ctx context.Context, managementCluster *types.Cluster, ...) (*types.ChangeDiff, error)
- func (f *Flux) Validations(ctx context.Context, clusterSpec *cluster.Spec) []validations.Validation
- type FluxClient
- type GitClient
- type GitOpsFluxClient
- type KubeClient
- type Templater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FluxChangeDiff ¶
func FluxChangeDiff(currentSpec, newSpec *cluster.Spec) *types.ChangeDiff
Types ¶
type FileGenerator ¶
type FileGenerator struct {
// contains filtered or unexported fields
}
func NewFileGenerator ¶
func NewFileGenerator() *FileGenerator
func NewFileGeneratorWithWriterTemplater ¶
func NewFileGeneratorWithWriterTemplater(fluxWriter, eksaWriter filewriter.FileWriter, fluxTemplater, eksaTemplater Templater) *FileGenerator
NewFileGeneratorWithWriterTemplater takes flux and eksa writer and templater interface to build the generator. This is only for testing.
func (*FileGenerator) Init ¶
func (g *FileGenerator) Init(writer filewriter.FileWriter, eksaSystemDir, fluxSystemDir string) error
func (*FileGenerator) WriteClusterConfig ¶
func (g *FileGenerator) WriteClusterConfig(clusterSpec *cluster.Spec, datacenterConfig providers.DatacenterConfig, machineConfigs []providers.MachineConfig) error
func (*FileGenerator) WriteEksaFiles ¶
func (g *FileGenerator) WriteEksaFiles(clusterSpec *cluster.Spec, datacenterConfig providers.DatacenterConfig, machineConfigs []providers.MachineConfig) error
func (*FileGenerator) WriteEksaKustomization ¶
func (g *FileGenerator) WriteEksaKustomization() error
func (*FileGenerator) WriteFluxKustomization ¶
func (g *FileGenerator) WriteFluxKustomization(clusterSpec *cluster.Spec) error
func (*FileGenerator) WriteFluxPatch ¶
func (g *FileGenerator) WriteFluxPatch(clusterSpec *cluster.Spec) error
func (*FileGenerator) WriteFluxSync ¶
func (g *FileGenerator) WriteFluxSync() error
func (*FileGenerator) WriteFluxSystemFiles ¶
func (g *FileGenerator) WriteFluxSystemFiles(clusterSpec *cluster.Spec) error
type Flux ¶
type Flux struct {
// contains filtered or unexported fields
}
func NewFlux ¶
func NewFlux(fluxClient FluxClient, kubeClient KubeClient, gitTools *gitFactory.GitTools, cliConfig *config.CliConfig) *Flux
func NewFluxFromGitOpsFluxClient ¶
func NewFluxFromGitOpsFluxClient(fluxClient GitOpsFluxClient, gitClient GitClient, writer filewriter.FileWriter, cliConfig *config.CliConfig) *Flux
func (*Flux) BootstrapGit ¶
func (*Flux) BootstrapGithub ¶
func (*Flux) CleanupGitRepo ¶
func (*Flux) ForceReconcileGitRepo ¶
func (*Flux) InstallGitOps ¶
func (*Flux) PauseClusterResourcesReconcile ¶ added in v0.11.2
func (*Flux) ResumeClusterResourcesReconcile ¶ added in v0.11.2
func (*Flux) UpdateGitEksaSpec ¶
func (f *Flux) UpdateGitEksaSpec(ctx context.Context, clusterSpec *cluster.Spec, datacenterConfig providers.DatacenterConfig, machineConfigs []providers.MachineConfig) error
func (*Flux) Validations ¶
func (f *Flux) Validations(ctx context.Context, clusterSpec *cluster.Spec) []validations.Validation
type FluxClient ¶
type FluxClient interface { BootstrapGithub(ctx context.Context, cluster *types.Cluster, fluxConfig *v1alpha1.FluxConfig) error BootstrapGit(ctx context.Context, cluster *types.Cluster, fluxConfig *v1alpha1.FluxConfig, cliConfig *config.CliConfig) error Uninstall(ctx context.Context, cluster *types.Cluster, fluxConfig *v1alpha1.FluxConfig) error Reconcile(ctx context.Context, cluster *types.Cluster, fluxConfig *v1alpha1.FluxConfig) error }
FluxClient is an interface that abstracts the basic commands of flux executable.
type GitClient ¶
type GitClient interface { GetRepo(ctx context.Context) (repo *git.Repository, err error) CreateRepo(ctx context.Context, opts git.CreateRepoOpts) error Clone(ctx context.Context) error Push(ctx context.Context) error Pull(ctx context.Context, branch string) error PathExists(ctx context.Context, owner, repo, branch, path string) (exists bool, err error) Add(filename string) error Remove(filename string) error Commit(message string) error Branch(name string) error Init() error }
type GitOpsFluxClient ¶
type GitOpsFluxClient interface { BootstrapGithub(ctx context.Context, cluster *types.Cluster, fluxConfig *v1alpha1.FluxConfig) error BootstrapGit(ctx context.Context, cluster *types.Cluster, fluxConfig *v1alpha1.FluxConfig, cliConfig *config.CliConfig) error Uninstall(ctx context.Context, cluster *types.Cluster, fluxConfig *v1alpha1.FluxConfig) error GetCluster(ctx context.Context, cluster *types.Cluster, clusterSpec *cluster.Spec) (eksaCluster *v1alpha1.Cluster, err error) DisableResourceReconcile(ctx context.Context, cluster *types.Cluster, resourceType, objectName, namespace string) error EnableResourceReconcile(ctx context.Context, cluster *types.Cluster, resourceType, objectName, namespace string) error Reconcile(ctx context.Context, cluster *types.Cluster, fluxConfig *v1alpha1.FluxConfig) error ForceReconcile(ctx context.Context, cluster *types.Cluster, namespace string) error DeleteSystemSecret(ctx context.Context, cluster *types.Cluster, namespace string) error }
type KubeClient ¶
type KubeClient interface { GetEksaCluster(ctx context.Context, cluster *types.Cluster, clusterName string) (*v1alpha1.Cluster, error) UpdateAnnotation(ctx context.Context, resourceType, objectName string, annotations map[string]string, opts ...executables.KubectlOpt) error RemoveAnnotation(ctx context.Context, resourceType, objectName string, key string, opts ...executables.KubectlOpt) error DeleteSecret(ctx context.Context, managementCluster *types.Cluster, secretName, namespace string) error }
KubeClient is an interface that abstracts the basic commands of kubectl executable.
type Templater ¶
type Templater interface {
WriteToFile(templateContent string, data interface{}, fileName string, f ...filewriter.FileOptionsFunc) (filePath string, err error)
}
Click to show internal directories.
Click to hide internal directories.