models

package
v0.0.0-...-54d739a Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ClusterImageSetProperty = "clusterimageset"

ClusterImageSetProperty is the name of the Hive cluster image set that will be used for the installation of the cluster. The default is to calculate it from the OCM version. For example, if the OCP version is `4.10.38` then the value will be `openshift-v4.10.38`.

View Source
const OCPMirrorProperty = "OC_OCP_MIRROR"

OCPMirrorProperty is the base URL for the OCP mirror that will be used to download the `release.txt` file. The default is to use `https://mirror.openshift.com/pub/openshift-v4/clients/ocp/` and there is usually no need to change it. This is only intended for use in unit tests.

View Source
const OCPRCHOSReleaseProperty = "OC_RHCOS_RELEASE"

OCPRCHOSReleaseProperty is the full release number of the Red Hat Enterprise Linux CoreOS to be used for the installation of clusters. If not specified this will be extracted from the `release.txt` file corresponding to the version specified in `OC_OCP_VERSION`.

View Source
const OCPTagProperty = "OC_OCP_TAG"

OCPTagProperty is the image tag of the OpenShift version. If not specified then the tag will be calculated adding the `-x86_64` suffix. For example, of the value of `OC_OCP_VERSION` is `4.10.38` then the value of this will be `4.10.38-x86_64`.

View Source
const OCPVersionProperty = "OC_OCP_VERSION"

OCPVersionProperty is the name of the property used to define the OpenShift version to be used for the installation of clusters.

View Source
const ODFVersionProperty = "OC_ODF_VERSION"

ODFVersionProperty is the name of the property used to define the OpenShift Data Foundation version that should be installed in clusters.

View Source
const RegistryProperty = "REGISTRY"

RegistryProperty is the URL of a custom image registry to use for the clusters.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	InternalIP net.IP
	ExternalIP net.IP
}

type BMC

type BMC struct {
	Pass string
	URL  string
	User string
}

type Cluster

type Cluster struct {
	API             API
	DNS             DNS
	ImageSet        string
	Ingress         Ingress
	Name            string
	Nodes           []*Node
	PullSecret      []byte
	SNO             bool
	SSH             SSH
	TPM             bool
	ClusterNetworks []*ClusterNetwork
	MachineNetworks []*MachineNetwork
	ServiceNetworks []*ServiceNetwork
	Kubeconfig      []byte
	Registry        Registry
}

func (*Cluster) ControlPlaneNodes

func (c *Cluster) ControlPlaneNodes() []*Node

ContorlPlaneNodes returns an slice containing only the control plane nodes of the cluster.

func (*Cluster) LookupNode

func (c *Cluster) LookupNode(name string) *Node

LookupNode returns an node with the given name, or nil if there is no such node.

func (*Cluster) NodeNames

func (c *Cluster) NodeNames() []string

NodeNames returns a slice containing the names of the nodes.

func (*Cluster) WorkerNodes

func (c *Cluster) WorkerNodes() []*Node

WorkerNodes returns an slice containing only the workr nodes of the cluster.

type ClusterNetwork

type ClusterNetwork struct {
	CIDR       *net.IPNet
	HostPrefix int
}

type Config

type Config struct {
	Properties map[string]string
	Clusters   []*Cluster
}

func (*Config) ClusterNames

func (c *Config) ClusterNames() []string

ClusterNames returns a slice containing the names of the cluster.

func (*Config) LookupCluster

func (c *Config) LookupCluster(name string) *Cluster

LookupCluster returns the cluser with the given name, or nil if no such cluster exists.

type DNS

type DNS struct {
	Domain string
}

type IP

type IP struct {
	Address net.IP
	Prefix  int
}

IP represents an IP addess together with the prefix length that indicates the network part.

func ParseIP

func ParseIP(s string) (ip *IP, err error)

ParseIP parses the given text as an IP address and mask. The expected input is a string like 192.168.122.123/24.

func (*IP) String

func (i *IP) String() string

String generates a string representing the given IP address and prefix. For example, for IP address 192.168.122.123 with mask 255.255.255.0 the result will be 192.168.122.123/24.

type Ingress

type Ingress struct {
	InternalIP net.IP
	ExternalIP net.IP
}

type MachineNetwork

type MachineNetwork struct {
	CIDR *net.IPNet
}

type NIC

type NIC struct {
	Name string
	MAC  string
}

type Node

type Node struct {
	Kind         NodeKind
	Name         string
	Hostname     string
	BMC          BMC
	RootDisk     string
	StorageDisks []string
	InternalNIC  *NIC
	InternalIP   *IP
	ExternalNIC  *NIC
	ExternalIP   *IP
	IgnoredNICs  []string
}

func (*Node) Index

func (n *Node) Index() string

Index extracts the index from the name of the node. For example, if the name is `worker123` then the index will be `123`. This is needed because currently some of our pipelines rely on node names having that index. This will be removed when those pipelines have been updatedd, so refrain from using it.

type NodeKind

type NodeKind string
const (
	NodeKindControlPlane NodeKind = "ControlPlane"
	NodeKindWorker       NodeKind = "Worker"
)

type Registry

type Registry struct {
	URL string
	CA  []byte
}

type SSH

type SSH struct {
	PrivateKey []byte
	PublicKey  []byte
}

type ServiceNetwork

type ServiceNetwork struct {
	CIDR *net.IPNet
}

Jump to

Keyboard shortcuts

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