cluster

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const (
	FluxDefaultNamespace = "flux-system"
	FluxDefaultBranch    = "main"
)

Variables

This section is empty.

Functions

func ApplyExtraObjects

func ApplyExtraObjects(ctx context.Context, clusterClient ClusterClient, cluster *types.Cluster, clusterSpec *Spec) error

func BuildMapForWorkerNodeGroupsByName added in v0.7.1

func BuildMapForWorkerNodeGroupsByName(workerNodeGroups []eksav1alpha1.WorkerNodeGroupConfiguration) map[string]eksav1alpha1.WorkerNodeGroupConfiguration

func GetBundlesForCluster added in v0.6.0

func GetBundlesForCluster(ctx context.Context, cluster *v1alpha1.Cluster, fetch BundlesFetch) (*v1alpha1release.Bundles, error)

func GetEksdRelease

func GetEksdRelease(cliVersion version.Info, clusterConfig *eksav1alpha1.Cluster) (*v1alpha1.EksDRelease, *eksdv1alpha1.Release, error)

func GetGitOpsForCluster added in v0.6.1

func GetGitOpsForCluster(ctx context.Context, cluster *v1alpha1.Cluster, fetch GitOpsFetch) (*v1alpha1.GitOpsConfig, error)

func LoadManagement added in v0.6.0

func LoadManagement(kubeconfig string) (*types.Cluster, error)

func NodeGroupsToDelete added in v0.7.1

func NodeGroupsToDelete(currentSpec, newSpec *Spec) []eksav1alpha1.WorkerNodeGroupConfiguration

Types

type BundlesFetch added in v0.6.0

type BundlesFetch func(ctx context.Context, name, namespace string) (*v1alpha1release.Bundles, error)

type ClusterClient

type ClusterClient interface {
	ApplyKubeSpecFromBytes(ctx context.Context, cluster *types.Cluster, data []byte) error
}

type GitOpsFetch added in v0.6.1

type GitOpsFetch func(ctx context.Context, name, namespace string) (*v1alpha1.GitOpsConfig, error)

type KubeDistro

type KubeDistro struct {
	Kubernetes          VersionedRepository
	CoreDNS             VersionedRepository
	Etcd                VersionedRepository
	NodeDriverRegistrar v1alpha1.Image
	LivenessProbe       v1alpha1.Image
	ExternalAttacher    v1alpha1.Image
	ExternalProvisioner v1alpha1.Image
	Pause               v1alpha1.Image
	EtcdImage           v1alpha1.Image
	EtcdVersion         string
	AwsIamAuthIamge     v1alpha1.Image
}

type KubeObjects

type KubeObjects map[string][]byte

func BuildExtraObjects

func BuildExtraObjects(clusterSpec *Spec) KubeObjects

func (KubeObjects) Names

func (objs KubeObjects) Names() []string

func (KubeObjects) Values

func (objs KubeObjects) Values() [][]byte

type Manifest

type Manifest struct {
	Filename string
	Content  []byte
}

type ManifestReader added in v0.6.1

type ManifestReader struct {
	*files.Reader
}

func NewManifestReader added in v0.6.1

func NewManifestReader(opts ...files.ReaderOpt) *ManifestReader

func (*ManifestReader) GetBundles added in v0.6.1

func (m *ManifestReader) GetBundles(bundlesURL string) (*v1alpha1.Bundles, error)

func (*ManifestReader) GetEksdRelease added in v0.6.1

func (m *ManifestReader) GetEksdRelease(versionsBundle *v1alpha1.VersionsBundle) (*eksdv1alpha1.Release, error)

func (*ManifestReader) GetReleases added in v0.6.1

func (m *ManifestReader) GetReleases(releasesManifest string) (*v1alpha1.Release, error)

type Spec

type Spec struct {
	*eksav1alpha1.Cluster
	OIDCConfig       *eksav1alpha1.OIDCConfig
	AWSIamConfig     *eksav1alpha1.AWSIamConfig
	GitOpsConfig     *eksav1alpha1.GitOpsConfig
	DatacenterConfig *metav1.ObjectMeta

	VersionsBundle *VersionsBundle

	Bundles           *v1alpha1.Bundles
	ManagementCluster *types.Cluster
	// contains filtered or unexported fields
}

func BuildSpecForCluster added in v0.6.0

func BuildSpecForCluster(ctx context.Context, cluster *v1alpha1.Cluster, bundlesFetch BundlesFetch, gitOpsFetch GitOpsFetch) (*Spec, error)

func BuildSpecFromBundles

func BuildSpecFromBundles(cluster *eksav1alpha1.Cluster, bundles *v1alpha1.Bundles, opts ...SpecOpt) (*Spec, error)

func NewSpec

func NewSpec(opts ...SpecOpt) *Spec

func NewSpecFromClusterConfig added in v0.6.1

func NewSpecFromClusterConfig(clusterConfigPath string, cliVersion version.Info, opts ...SpecOpt) (*Spec, error)

func (*Spec) DeepCopy added in v0.6.0

func (s *Spec) DeepCopy() *Spec

func (*Spec) GetBundles added in v0.6.0

func (s *Spec) GetBundles(cliVersion version.Info) (*v1alpha1.Bundles, error)

func (*Spec) GetRelease added in v0.6.0

func (s *Spec) GetRelease(cliVersion version.Info) (*v1alpha1.EksARelease, error)

func (*Spec) GetReleaseManifestUrl added in v0.6.0

func (s *Spec) GetReleaseManifestUrl() string

func (*Spec) KubeDistroImages added in v0.6.0

func (s *Spec) KubeDistroImages() []v1alpha1.Image

func (*Spec) LoadManifest

func (s *Spec) LoadManifest(manifest v1alpha1.Manifest) (*Manifest, error)

func (*Spec) SetDefaultGitOps

func (cs *Spec) SetDefaultGitOps()

type SpecOpt

type SpecOpt func(*Spec)

func WithEmbedFS

func WithEmbedFS(embedFS embed.FS) SpecOpt

func WithGitOpsConfig added in v0.6.1

func WithGitOpsConfig(gitOpsConfig *eksav1alpha1.GitOpsConfig) SpecOpt

func WithManagementCluster added in v0.6.0

func WithManagementCluster(cluster *types.Cluster) SpecOpt

func WithOverrideBundlesManifest added in v0.6.0

func WithOverrideBundlesManifest(fileURL string) SpecOpt

func WithReleasesManifest

func WithReleasesManifest(manifestURL string) SpecOpt

func WithUserAgent added in v0.6.1

func WithUserAgent(userAgent string) SpecOpt

type VersionedRepository

type VersionedRepository struct {
	Repository, Tag string
}

type VersionsBundle

type VersionsBundle struct {
	*v1alpha1.VersionsBundle
	KubeDistro *KubeDistro
}

func (*VersionsBundle) Images added in v0.6.0

func (vb *VersionsBundle) Images() []v1alpha1.Image

func (*VersionsBundle) KubeDistroImages added in v0.7.0

func (vb *VersionsBundle) KubeDistroImages() []v1alpha1.Image

func (*VersionsBundle) Ovas added in v0.6.0

func (vb *VersionsBundle) Ovas() []v1alpha1.Archive

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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