k8sop

package
v0.0.0-...-3ec049e Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package k8sop is responsible of the implementation involving helm and Kubernetes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SwitchKubeConfig

func SwitchKubeConfig(clusterConfigs config.K8S, project, stage string) (kubeConfigPath string, err error)

Types

type DeploymentInfo

type DeploymentInfo struct {
	Available int32
	ImageTag  string
	Ready     int32
	Updated   int32
}

func GetDeploymentInfo

func GetDeploymentInfo(ctx context.Context, kubeConfigPath string, name string) (DeploymentInfo, error)

GetDeploymentInfo return the status of current deployments for the specific service

type Metadata

type Metadata struct {
	Namespace string `json:"namespace"`
}

type ReleaseInfo

type ReleaseInfo struct {
	Name      string `json:"releaseName"`
	Namespace string
	Status    string `json:"releaseStatus"`
}

func ListReleases

func ListReleases(ctx context.Context, kubeConfigPath string) (releaseInfo []ReleaseInfo, err error)

type ReleaseStatus

type ReleaseStatus struct {
	Status   ReleaseInfo `json:"status"`
	Metadata Metadata    `json:"metadata"`
}

type ReleaseVersion

type ReleaseVersion struct {
	AutoScaling struct {
		Enabled     bool
		MaxReplicas int
		MinReplicas int
	}
	ImageTag     string
	ReplicaCount int
	Version      int
}

func ListHelmReleaseVersion

func ListHelmReleaseVersion(kubeConfigPath string, name, namespace string, maxHistory int) ([]ReleaseVersion, error)

Jump to

Keyboard shortcuts

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