Documentation ¶
Index ¶
- Constants
- Variables
- func AddNodeRoleWorkerLabel(ctx context.Context, clusterName string, cfg *envconf.Config) error
- func AllPodsRunning(ctx context.Context, cfg *envconf.Config, namespace string) error
- func BuildKustomizeOverlayAsYaml(overlayDir string) ([]byte, error)
- func GetDaemonSetOwnedPods(ctx context.Context, cfg *envconf.Config, daemonset *appsv1.DaemonSet) (*corev1.PodList, error)
- type CloudAPIAdaptor
- type CloudProvisioner
- type InstallOverlay
- type KbsInstallOverlay
- type KeyBrokerService
- type KustomizeOverlay
- func (kh *KustomizeOverlay) AddToPatchesStrategicMerge(fileName string) error
- func (kh *KustomizeOverlay) Apply(ctx context.Context, cfg *envconf.Config) error
- func (kh *KustomizeOverlay) Delete(ctx context.Context, cfg *envconf.Config) error
- func (kh *KustomizeOverlay) SetKustomizeConfigMapGeneratorLiteral(cmgName string, key string, value string) (err error)
- func (kh *KustomizeOverlay) SetKustomizeImage(imageName string, key string, value string) (err error)
- func (kh *KustomizeOverlay) SetKustomizeSecretGeneratorFile(sgName string, file string) (err error)
- func (kh *KustomizeOverlay) SetKustomizeSecretGeneratorLiteral(secretName string, key string, value string) (err error)
- func (kh *KustomizeOverlay) YamlReload() error
- type NewInstallOverlayFunc
- type NewProvisionerFunc
- type PatchLabel
Constants ¶
const PodWaitTimeout = time.Second * 30
Waiting timeout for bringing up the pod
Variables ¶
var Action string
var NewInstallOverlayFunctions = make(map[string]NewInstallOverlayFunc)
var NewProvisionerFunctions = make(map[string]NewProvisionerFunc)
Functions ¶
func AddNodeRoleWorkerLabel ¶
Adds the worker label to all workers nodes in a given cluster
func AllPodsRunning ¶
TODO: convert this into a klient/wait/conditions
func BuildKustomizeOverlayAsYaml ¶
BuildAsYaml only build the overlay directory and returns the manifest as the YAML representation.
Types ¶
type CloudAPIAdaptor ¶
type CloudAPIAdaptor struct {
// contains filtered or unexported fields
}
func NewCloudAPIAdaptor ¶
func NewCloudAPIAdaptor(provider string, installDir string) (*CloudAPIAdaptor, error)
func (*CloudAPIAdaptor) Delete ¶
Deletes the peer pods installation including the controller manager.
func (*CloudAPIAdaptor) Deploy ¶
func (p *CloudAPIAdaptor) Deploy(ctx context.Context, cfg *envconf.Config, props map[string]string) error
Deploy installs Peer Pods on the cluster.
func (*CloudAPIAdaptor) DoKustomize ¶
func (p *CloudAPIAdaptor) DoKustomize(ctx context.Context, cfg *envconf.Config)
type CloudProvisioner ¶
type CloudProvisioner interface { CreateCluster(ctx context.Context, cfg *envconf.Config) error CreateVPC(ctx context.Context, cfg *envconf.Config) error DeleteCluster(ctx context.Context, cfg *envconf.Config) error DeleteVPC(ctx context.Context, cfg *envconf.Config) error GetProperties(ctx context.Context, cfg *envconf.Config) map[string]string UploadPodvm(imagePath string, ctx context.Context, cfg *envconf.Config) error }
CloudProvisioner defines operations to provision the environment on cloud providers.
func GetCloudProvisioner ¶
func GetCloudProvisioner(provider string, propertiesFile string) (CloudProvisioner, error)
GetCloudProvisioner returns a CloudProvisioner implementation
type InstallOverlay ¶
type InstallOverlay interface { // Apply applies the overlay. Equivalent to the `kubectl apply -k` command Apply(ctx context.Context, cfg *envconf.Config) error // Delete deletes the overlay. Equivalent to the `kubectl delete -k` command Delete(ctx context.Context, cfg *envconf.Config) error // Edit changes overlay files Edit(ctx context.Context, cfg *envconf.Config, properties map[string]string) error }
InstallOverlay defines common operations to an install overlay (install/overlays/*)
func GetInstallOverlay ¶
func GetInstallOverlay(provider string, installDir string) (InstallOverlay, error)
GetInstallOverlay returns the InstallOverlay implementation for the provider
func NewBaseKbsInstallOverlay ¶
func NewBaseKbsInstallOverlay(installDir string) (InstallOverlay, error)
func NewKbsInstallOverlay ¶
func NewKbsInstallOverlay(installDir string) (InstallOverlay, error)
type KbsInstallOverlay ¶
type KbsInstallOverlay struct {
// contains filtered or unexported fields
}
KbsInstallOverlay implements the InstallOverlay interface
type KeyBrokerService ¶
type KeyBrokerService struct {
// contains filtered or unexported fields
}
func NewKeyBrokerService ¶
func NewKeyBrokerService(clusterName string) (*KeyBrokerService, error)
func (*KeyBrokerService) GetKbsPodIP ¶
type KustomizeOverlay ¶
type KustomizeOverlay struct { ConfigDir string // path to the overlay directory Yaml []byte // Resources built in YAML }
func NewKustomizeOverlay ¶
func NewKustomizeOverlay(dir string) (*KustomizeOverlay, error)
func (*KustomizeOverlay) AddToPatchesStrategicMerge ¶
func (kh *KustomizeOverlay) AddToPatchesStrategicMerge(fileName string) error
func (*KustomizeOverlay) Apply ¶
Apply builds the configuration directory and deploy the resulted manifest.
func (*KustomizeOverlay) Delete ¶
Delete builds the overlay directory and delete the resulted resources.
func (*KustomizeOverlay) SetKustomizeConfigMapGeneratorLiteral ¶
func (kh *KustomizeOverlay) SetKustomizeConfigMapGeneratorLiteral(cmgName string, key string, value string) (err error)
SetKustomizeConfigMapGeneratorLiteral updates the kustomization YAML by setting `value` to `key` on the `cmgName` ConfigMapGenerator literals. If `key` does not exist then a new entry is added.
func (*KustomizeOverlay) SetKustomizeImage ¶
func (kh *KustomizeOverlay) SetKustomizeImage(imageName string, key string, value string) (err error)
SetKustomizeImage updates the kustomization YAML by setting `value` to `key` on the `Image`. If `key` does not exist then a new entry is added.
func (*KustomizeOverlay) SetKustomizeSecretGeneratorFile ¶
func (kh *KustomizeOverlay) SetKustomizeSecretGeneratorFile(sgName string, file string) (err error)
SetKustomizeSecretGeneratorFile updates the kustomization YAML by adding the `file` on the `sgName` SecretGenerator files.
func (*KustomizeOverlay) SetKustomizeSecretGeneratorLiteral ¶
func (kh *KustomizeOverlay) SetKustomizeSecretGeneratorLiteral(secretName string, key string, value string) (err error)
SetKustomizeSecretGeneratorLiteral updates the kustomization YAML by setting `value` to `key` on the `secretName` SecretGenerator literals. If `key` does not exist then a new entry is added.
func (*KustomizeOverlay) YamlReload ¶
func (kh *KustomizeOverlay) YamlReload() error
type NewInstallOverlayFunc ¶
type NewInstallOverlayFunc func(installDir, provider string) (InstallOverlay, error)
type NewProvisionerFunc ¶
type NewProvisionerFunc func(properties map[string]string) (CloudProvisioner, error)