cmd

package
v1.20.2 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: MIT Imports: 64 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UpgradeParamsToAdd = []paramTuple{}

UpgradeParamsToAdd Linux Kernel Parameters to-add for upgrades to 1.2. This is for multiple parameters that need to be added with the same key. e.g. ifname=mgmt0:01:02:03:04:05:06

  1. ifnames Ifnames have changed on nodes that have two NICs.

    1.0 --> 1.2 ----------------------------------- OCP port1 mgmt0 mgmt0 OCP port2 mgmt1 sun0 PCIe port1 mgmt2 mgmt1 PCIe port2 mgmt3 sun1

View Source
var UpgradeParamsToDelete = []string{
	"bond",
	"bootdev",
	"hwprobe",
	"ip",
	"rd.peerdns",
	"rd.net.dhcp.retry",
	"vlan",
}

UpgradeParamsToDelete Linux Kernel Parameters to-remove for upgrades to 1.2.

  1. bond

    Remove any bond settings; a more simple bond config is passed-in with UpgradeParamsToSet.

  2. bootdev

    This is not necessary to have anymore, it has no effect.

  3. hwprobe

    Previously thought to ensure the bond comes up, this actually has no effect.

  4. ip

    We do need one of these to exist, so we set it in UpgradeParamsToSet. This ensures we purge all undesirables and start fresh.

  5. rd.peerdns

    Cease and desist any unofficial DNS from "peers" and use what the DHCP Authority has given us.

  6. vlan

    VLANs are now entirely driven by CSI and cloud-init, thus they no longer exist as hardcodes in kernel parameters. These must be removed to prevent conflicts with any dynamic VLAN changes. These also provide incorrect interface names, relative to CSM 1.2 the VLAN interface names have changed.

View Source
var UpgradeParamsToSet = []paramTuple{{
	// contains filtered or unexported fields
}, {
	// contains filtered or unexported fields
}, {
	// contains filtered or unexported fields
}}

UpgradeParamsToSet Linux Kernel Parameters to-set for upgrades to 1.2.

  1. ip=mgmt0:dhcp

    DHCP must be setup. The bond will be formed during cloud-init

  2. rd.peerdns=0

    Set to prevent inconsistent DNS resolution (e.g. always use the actual Domain Name Server and not each other).

  3. rd.net.dhcp.retry=5

    Set to ensure we wait out STP blocks, at least giving them more chances than 3 (from 1.0).

Functions

func AllocateIps

func AllocateIps(ncns []*csi.LogicalNCN, networks map[string]*csi.IPV4Network)

AllocateIps distributes IP reservations for each of the NCNs within the networks

func Copy

func Copy(srcFile, dstFile string) error

Copy is the main copy function

func CopyArtifactsToPart

func CopyArtifactsToPart(src string, dest string, regex string)

CopyArtifactsToPart copies files needed to the PITDATA partition

func CopyDirectory

func CopyDirectory(scrDir, dest string) error

CopyDirectory copies a directory

func CopySymLink(source, dest string) error

CopySymLink checks and copy symlinks

func CreateIfNotExists

func CreateIfNotExists(dir string, perm os.FileMode) error

CreateIfNotExists creates it if it doesn't

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func Exists

func Exists(filePath string) bool

Exists checks if a file exists

func GetArtifact

func GetArtifact(dirpath string, url string) (err error)

GetArtifact downloads kernels, initrd, and squashfs images

func PadRight

func PadRight(str, pad string, lenght int) string

PadRight adds nice formatting for strings

func PrintConfig

func PrintConfig(v *viper.Viper)

PrintConfig : Dump all configuration information as a yaml file on stdout

func WalkMatch

func WalkMatch(root, pattern string) ([]string, error)

WalkMatch finds files on a pattern match

Types

type CACerts

type CACerts struct {
	RemoveDefaults bool     `json:"remove-defaults"`
	Trusted        []string `json:"trusted"`
}

CACerts - For storage of ca-certs cloud-init update

type CloudInitGlobal

type CloudInitGlobal struct {
	Global struct {
		Metadata `json:"meta-data"`
	}
}

CloudInitGlobal - Boilerplate for cloud-init hierarchical structure

type Customizations

type Customizations struct {
	Spec struct {
		Kubernetes struct {
			SealedSecrets map[string]SealedSecret `yaml:"sealed_secrets"`
		}
	}
	// contains filtered or unexported fields
}

Customizations - Minimum customizations (shasta-cfg) struct to access sealed secrets

type Metadata

type Metadata struct {
	CACerts `json:"ca-certs"`
}

Metadata - Boilerplate for cloud-init hierarchical structure

type SealedSecret

type SealedSecret struct {
	Spec struct {
		EncryptedData map[string]string `yaml:"encryptedData"`
		Template      struct {
			Metadata struct {
				Annotations map[string]string
			}
		}
	}
}

SealedSecret - Minimum struct to determine secret scope and access encrypted data

Jump to

Keyboard shortcuts

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