Documentation
¶
Index ¶
- 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 AzureProperties
- type CloudAPIAdaptor
- type CloudProvisioner
- type InstallOverlay
- 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
Constants ¶
This section is empty.
Variables ¶
var Action string
var AzureProps = &AzureProperties{}
Functions ¶
func AddNodeRoleWorkerLabel ¶ added in v0.8.0
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 AzureProperties ¶
type AzureProperties struct {
SubscriptionID string
ClientID string
ResourceGroupName string
ClusterName string
Location string
SSHKeyID string
SubnetName string
VnetName string
SubnetID string
ImageID string
SshUserName string
ManagedIdentityName string
IsCIManaged bool
CaaImage string
IsSelfManaged bool
InstanceSize string
NodeName string
OsType string
ResourceGroupClient *armresources.ResourceGroupsClient
ManagedVnetClient *armnetwork.VirtualNetworksClient
ManagedSubnetClient *armnetwork.SubnetsClient
ManagedAksClient *armcontainerservice.ManagedClustersClient
ManagedVmClient *armcompute.VirtualMachinesClient
FederatedIdentityCredentialsClient *armmsi.FederatedIdentityCredentialsClient
// contains filtered or unexported fields
}
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
type KustomizeOverlay ¶
type KustomizeOverlay struct {
// contains filtered or unexported fields
}
func NewKustomizeOverlay ¶
func NewKustomizeOverlay(dir string) (*KustomizeOverlay, error)
func (*KustomizeOverlay) AddToPatchesStrategicMerge ¶ added in v0.7.0
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 ¶ added in v0.6.0
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