Documentation
¶
Index ¶
- Constants
- func CleanupTiller(logger log.FieldLogger, kubeConfigPath string) error
- func MigrateRelease(logger log.FieldLogger, kubeConfigPath string, release string) error
- type Helm2ListOutput
- type HelmListOutput
- type KopsProvisioner
- func (provisioner *KopsProvisioner) CreateCluster(cluster *model.Cluster, awsClient aws.AWS) error
- func (provisioner *KopsProvisioner) CreateClusterInstallation(cluster *model.Cluster, installation *model.Installation, ...) error
- func (provisioner *KopsProvisioner) DeleteCluster(cluster *model.Cluster, awsClient aws.AWS) error
- func (provisioner *KopsProvisioner) DeleteClusterInstallation(cluster *model.Cluster, installation *model.Installation, ...) error
- func (provisioner *KopsProvisioner) ExecClusterInstallationCLI(cluster *model.Cluster, clusterInstallation *model.ClusterInstallation, ...) ([]byte, error)
- func (provisioner *KopsProvisioner) ExecMattermostCLI(cluster *model.Cluster, clusterInstallation *model.ClusterInstallation, ...) ([]byte, error)
- func (provisioner *KopsProvisioner) GetClusterInstallationResource(cluster *model.Cluster, installation *model.Installation, ...) (*mmv1alpha1.ClusterInstallation, error)
- func (provisioner *KopsProvisioner) GetClusterResources(cluster *model.Cluster, onlySchedulable bool) (*k8s.ClusterResources, error)
- func (provisioner *KopsProvisioner) GetPublicLoadBalancerEndpoint(cluster *model.Cluster, namespace string) (string, error)
- func (provisioner *KopsProvisioner) HibernateClusterInstallation(cluster *model.Cluster, installation *model.Installation, ...) error
- func (provisioner *KopsProvisioner) PrepareCluster(cluster *model.Cluster) bool
- func (provisioner *KopsProvisioner) ProvisionCluster(cluster *model.Cluster, awsClient aws.AWS) error
- func (provisioner *KopsProvisioner) RefreshKopsMetadata(cluster *model.Cluster) error
- func (provisioner *KopsProvisioner) ResizeCluster(cluster *model.Cluster) error
- func (provisioner *KopsProvisioner) UpdateClusterInstallation(cluster *model.Cluster, installation *model.Installation, ...) error
- func (provisioner *KopsProvisioner) UpgradeCluster(cluster *model.Cluster, awsClient aws.AWS) error
- func (provisioner *KopsProvisioner) VerifyClusterInstallationMatchesConfig(cluster *model.Cluster, installation *model.Installation, ...) (bool, error)
- type Utility
Constants ¶
const DefaultKubernetesVersion = "0.0.0"
DefaultKubernetesVersion is the default value for a kubernetes cluster version value.
Variables ¶
This section is empty.
Functions ¶
func CleanupTiller ¶ added in v0.31.0
func CleanupTiller(logger log.FieldLogger, kubeConfigPath string) error
CleanupTiller cleans up all Helm 2 releases together with Tiller
func MigrateRelease ¶ added in v0.31.0
func MigrateRelease(logger log.FieldLogger, kubeConfigPath string, release string) error
MigrateRelease migrates Helm release from Helm 2 to Helm 3
Types ¶
type Helm2ListOutput ¶ added in v0.31.0
type Helm2ListOutput struct {
Releases []helm2ReleaseJSON `json:"Releases"`
}
Helm2ListOutput is a struct for holding the unmarshaled representation of the output from helm list --output json (for Helm 2)
type HelmListOutput ¶ added in v0.14.0
type HelmListOutput []helmReleaseJSON
HelmListOutput is a struct for holding the unmarshaled representation of the output from helm list --output json
type KopsProvisioner ¶
type KopsProvisioner struct {
// contains filtered or unexported fields
}
KopsProvisioner provisions clusters using kops+terraform.
func NewKopsProvisioner ¶
func NewKopsProvisioner(s3StateStore, owner string, useExistingAWSResources bool, allowCIDRRangeList []string, resourceUtil *utils.ResourceUtil, logger log.FieldLogger, store model.InstallationDatabaseStoreInterface) *KopsProvisioner
NewKopsProvisioner creates a new KopsProvisioner. TODO(gsagula): Consider replacing all these paramaters with a struct for readability.
func (*KopsProvisioner) CreateCluster ¶
CreateCluster creates a cluster using kops and terraform.
func (*KopsProvisioner) CreateClusterInstallation ¶
func (provisioner *KopsProvisioner) CreateClusterInstallation(cluster *model.Cluster, installation *model.Installation, clusterInstallation *model.ClusterInstallation, awsClient aws.AWS) error
CreateClusterInstallation creates a Mattermost installation within the given cluster.
func (*KopsProvisioner) DeleteCluster ¶
DeleteCluster deletes a previously created cluster using kops and terraform.
func (*KopsProvisioner) DeleteClusterInstallation ¶
func (provisioner *KopsProvisioner) DeleteClusterInstallation(cluster *model.Cluster, installation *model.Installation, clusterInstallation *model.ClusterInstallation) error
DeleteClusterInstallation deletes a Mattermost installation within the given cluster.
func (*KopsProvisioner) ExecClusterInstallationCLI ¶ added in v0.27.0
func (provisioner *KopsProvisioner) ExecClusterInstallationCLI(cluster *model.Cluster, clusterInstallation *model.ClusterInstallation, args ...string) ([]byte, error)
ExecClusterInstallationCLI execs the provided command on the defined cluster installation.
func (*KopsProvisioner) ExecMattermostCLI ¶ added in v0.2.0
func (provisioner *KopsProvisioner) ExecMattermostCLI(cluster *model.Cluster, clusterInstallation *model.ClusterInstallation, args ...string) ([]byte, error)
ExecMattermostCLI invokes the Mattermost CLI for the given cluster installation with the given args.
func (*KopsProvisioner) GetClusterInstallationResource ¶
func (provisioner *KopsProvisioner) GetClusterInstallationResource(cluster *model.Cluster, installation *model.Installation, clusterInstallation *model.ClusterInstallation) (*mmv1alpha1.ClusterInstallation, error)
GetClusterInstallationResource gets the cluster installation resource from the kubernetes API.
func (*KopsProvisioner) GetClusterResources ¶ added in v0.2.0
func (provisioner *KopsProvisioner) GetClusterResources(cluster *model.Cluster, onlySchedulable bool) (*k8s.ClusterResources, error)
GetClusterResources returns a snapshot of resources of a given cluster.
func (*KopsProvisioner) GetPublicLoadBalancerEndpoint ¶ added in v0.23.0
func (provisioner *KopsProvisioner) GetPublicLoadBalancerEndpoint(cluster *model.Cluster, namespace string) (string, error)
GetPublicLoadBalancerEndpoint returns the public load balancer endpoint of the NGINX service.
func (*KopsProvisioner) HibernateClusterInstallation ¶ added in v0.21.0
func (provisioner *KopsProvisioner) HibernateClusterInstallation(cluster *model.Cluster, installation *model.Installation, clusterInstallation *model.ClusterInstallation) error
HibernateClusterInstallation updates a cluster installation to consume fewer resources.
func (*KopsProvisioner) PrepareCluster ¶
func (provisioner *KopsProvisioner) PrepareCluster(cluster *model.Cluster) bool
PrepareCluster ensures a cluster object is ready for provisioning.
func (*KopsProvisioner) ProvisionCluster ¶
func (provisioner *KopsProvisioner) ProvisionCluster(cluster *model.Cluster, awsClient aws.AWS) error
ProvisionCluster installs all the baseline kubernetes resources needed for managing installations. This can be called on an already-provisioned cluster to reprovision with the newest version of the resources.
func (*KopsProvisioner) RefreshKopsMetadata ¶ added in v0.21.0
func (provisioner *KopsProvisioner) RefreshKopsMetadata(cluster *model.Cluster) error
RefreshKopsMetadata updates the kops metadata of a cluster with the current values of the running cluster.
func (*KopsProvisioner) ResizeCluster ¶ added in v0.19.0
func (provisioner *KopsProvisioner) ResizeCluster(cluster *model.Cluster) error
ResizeCluster resizes a cluster.
func (*KopsProvisioner) UpdateClusterInstallation ¶
func (provisioner *KopsProvisioner) UpdateClusterInstallation(cluster *model.Cluster, installation *model.Installation, clusterInstallation *model.ClusterInstallation) error
UpdateClusterInstallation updates the cluster installation spec to match the installation specification.
func (*KopsProvisioner) UpgradeCluster ¶
UpgradeCluster upgrades a cluster to the latest recommended production ready k8s version.
func (*KopsProvisioner) VerifyClusterInstallationMatchesConfig ¶ added in v0.31.0
func (provisioner *KopsProvisioner) VerifyClusterInstallationMatchesConfig(cluster *model.Cluster, installation *model.Installation, clusterInstallation *model.ClusterInstallation) (bool, error)
VerifyClusterInstallationMatchesConfig attempts to verify that a cluster installation custom resource matches the configuration that is defined in the provisioner NOTE: this does NOT ensure that other resources such as network policies for that namespace are correct. Also, the values checked are ONLY values that are defined by both the installation and group configuration.
type Utility ¶ added in v0.11.0
type Utility interface { // CreateOrUpgrade is responsible for deploying the utility in the // cluster and then for updating it if it already exists when called CreateOrUpgrade() error // Destroy can be used if special care must be taken for deleting a // utility from a cluster Destroy() error // Migrate can be used if special care must be taken for migrating a // utility from a cluster Migrate() error // ActualVersion returns the utility's last reported actual version, // at the time of Create or Upgrade. This version will remain valid // unless something interacts with the cluster out of band, at which // time it will be invalid until Upgrade is called again ActualVersion() string // DesiredVersion returns the utility's target version, which has been // requested, but may not yet have been reconciled DesiredVersion() string // Name returns the canonical string-version name for the utility, // used throughout the application Name() string }
A Utility is a service that runs one per cluster but is not part of k8s itself, nor is it part of a ClusterInstallation or an Installation