pmk

package
v0.0.0-...-179c803 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

Copyright © 2020 The Platform9 Systems Inc.

Copyright © 2020 The Platform9 Systems Inc.

Copyright © 2020 The Platform9 Systems Inc.

Index

Constants

View Source
const (
	// Response Status Codes
	HostAgentCertless = 200
	HostAgentLegacy   = 404
)
View Source
const (
	// ConfigFile is used to store config information
	ConfigFile string = "pf9_config.json"
	// DefaultConfigDir is the default path for config file
	DefaultConfigDir string = "~/"
	// LogFile specifies the filename to which CLI logs o/p and errors
	LogFile string = "pf9ctl.log"

	// AWS cloud provider
	AWS CloudProviderType = "aws"
	// GCP cloud provider
	GCP CloudProviderType = "gcp"
	// BareOS on-prem cloud provider
	BareOS CloudProviderType = "local"
	// Openstack cloud provider
	Openstack CloudProviderType = "openstack"
	// Flannel network plugin for k8s networking
	Flannel CNIBackend = "flannel"
	// Calico network plugin for k8s networking
	Calico CNIBackend = "calico"
	// Weave network plugin for k8s networking
	Weave CNIBackend = "weave"
)

Variables

View Source
var HostAgent int

This variable is assigned with StatusCode during hostagent installation

View Source
var IsRemoteExecutor bool
View Source
var WarningOptionalChecks bool
This flag is set true, to have warning "!" message,

when user passes --skip-checks and optional checks fails.

Functions

func Bootstrap

func Bootstrap(ctx objects.Config, c client.Client, req qbert.ClusterCreateRequest, keystoneAuth keystone.KeystoneAuth, bootConfig objects.NodeConfig) error

Bootstrap simply onboards the local node and attaches it as master to a newly created cluster.

func CheckAmazonPovider

func CheckAmazonPovider(awsIamUser, awsID, awsSecret, awsRegion string) bool

func CheckAvailabilityZonesCount

func CheckAvailabilityZonesCount(awsID, awsSecret, awsRegion string) bool

func CheckAzureProvider

func CheckAzureProvider(tenantID, appID, subID, secretKey string) bool

func CheckGoogleProvider

func CheckGoogleProvider(path, projectName, serviceAccountEmail string) bool

func CheckIfAllowed

func CheckIfAllowed(results []*iamAws.EvaluationResult) bool

func CheckIfRoleExists

func CheckIfRoleExists(bindings []*iam.Binding, name string) bool

func CheckPermissions

func CheckPermissions(arn *string, svc *iamAws.IAM, actions []string) bool

func CheckRoleAssignment

func CheckRoleAssignment(result assignment.RoleAssignmentListResult, subID string) bool

func CheckSudo

func CheckSudo(exec cmdexec.Executor) bool

func DecommissionNode

func DecommissionNode(cfg *objects.Config, nc objects.NodeConfig, removePf9 bool)

func DeleteClusterBootstrap

func DeleteClusterBootstrap(clusterID string, c client.Client, keystoneAuth keystone.KeystoneAuth, token string)

Deleting the cluster if the node is not attached to the cluster

func DisableUnattendedUpdates

func DisableUnattendedUpdates(allClients client.Client)

func EnableUnattendedUpdates

func EnableUnattendedUpdates(allClients client.Client)

func GetIp

func GetIp() net.IP

func IsEnabledUnattendedUpdates

func IsEnabledUnattendedUpdates(allClients client.Client) bool

func OpenOSReleaseFile

func OpenOSReleaseFile(exec cmdexec.Executor) (string, error)

func PreReqBootstrap

func PreReqBootstrap(executor cmdexec.Executor) (bool, bool, error)

Checks Prerequisites for Bootstrap Command

func PrepNode

func PrepNode(ctx objects.Config, allClients client.Client, auth keystone.KeystoneAuth) error

PrepNode sets up prerequisites for k8s stack

func StartUnattendedUpdates

func StartUnattendedUpdates(allClients client.Client)

func StatusUnattendedUpdates

func StatusUnattendedUpdates(allClients client.Client) bool

func StopUnattendedUpdates

func StopUnattendedUpdates(allClients client.Client)

func ValidatePlatform

func ValidatePlatform(exec cmdexec.Executor) (string, error)

Types

type CNIBackend

type CNIBackend string

CNIBackend specifies the networking solution used for the k8s cluster

type CheckNodeResult

type CheckNodeResult string
const (
	PASS             CheckNodeResult = "pass"
	RequiredFail     CheckNodeResult = "requiredFail"
	OptionalFail     CheckNodeResult = "optionalFail"
	CleanInstallFail CheckNodeResult = "cleanInstallFail"
)

func CheckNode

func CheckNode(ctx objects.Config, allClients client.Client, auth keystone.KeystoneAuth, nc objects.NodeConfig) (CheckNodeResult, error)

CheckNode checks the prerequisites for k8s stack

type CloudProviderType

type CloudProviderType string

CloudProviderType specifies the infrastructure where the cluster runs

Jump to

Keyboard shortcuts

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