types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package types defines structures for user-supplied installer configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSMachinePoolPlatform

type AWSMachinePoolPlatform struct {
	// InstanceType defines the ec2 instance type.
	// eg. m4-large
	InstanceType string `json:"type"`

	// IAMRoleName defines the IAM role associated
	// with the ec2 instance.
	IAMRoleName string `json:"iamRoleName"`

	// EC2RootVolume defines the storage for ec2 instance.
	EC2RootVolume `json:"rootVolume"`
}

AWSMachinePoolPlatform stores the configuration for a machine pool installed on AWS.

type AWSPlatform

type AWSPlatform struct {
	// Region specifies the AWS region where the cluster will be created.
	Region string `json:"region"`

	// UserTags specifies additional tags for AWS resources created for the cluster.
	UserTags map[string]string `json:"userTags,omitempty"`

	// DefaultMachinePlatform is the default configuration used when
	// installing on AWS for machine pools which do not define their own
	// platform configuration.
	DefaultMachinePlatform *AWSMachinePoolPlatform `json:"defaultMachinePlatform,omitempty"`

	// VPCID specifies the vpc to associate with the cluster.
	// If empty, new vpc will be created.
	// +optional
	VPCID string `json:"vpcID"`

	// VPCCIDRBlock
	// +optional
	VPCCIDRBlock string `json:"vpcCIDRBlock"`
}

AWSPlatform stores all the global configuration that all machinesets use.

type Admin

type Admin struct {
	// Email is the email address of the admin user.
	Email string `json:"email"`
	// Password is the password of the admin user.
	Password string `json:"password"`
	// SSHKey to use for the access to compute instances.
	SSHKey string `json:"sshKey,omitempty"`
}

Admin is the configuration for the admin user.

type ClusterAWSPlatformMetadata

type ClusterAWSPlatformMetadata struct {
	Region string `json:"region"`
	// Most AWS resources are tagged with these tags as identifier.
	Identifier map[string]string `json:"identifier"`
}

ClusterAWSPlatformMetadata contains AWS metadata.

type ClusterLibvirtPlatformMetadata

type ClusterLibvirtPlatformMetadata struct {
	URI string `json:"uri"`
}

ClusterLibvirtPlatformMetadata contains libvirt metadata.

type ClusterMetadata

type ClusterMetadata struct {
	ClusterName             string `json:"clusterName"`
	ClusterPlatformMetadata `json:",inline"`
}

ClusterMetadata contains information regarding the cluster that was created by installer.

type ClusterOpenStackPlatformMetadata

type ClusterOpenStackPlatformMetadata struct {
	Region string `json:"region"`
	// Most OpenStack resources are tagged with these tags as identifier.
	Identifier map[string]string `json:"identifier"`
}

ClusterOpenStackPlatformMetadata contains OpenStack metadata.

type ClusterPlatformMetadata

type ClusterPlatformMetadata struct {
	AWS       *ClusterAWSPlatformMetadata       `json:"aws,omitempty"`
	OpenStack *ClusterOpenStackPlatformMetadata `json:"openstack,omitempty"`
	Libvirt   *ClusterLibvirtPlatformMetadata   `json:"libvirt,omitempty"`
}

ClusterPlatformMetadata contains metadata for platfrom.

func (*ClusterPlatformMetadata) Platform

func (cpm *ClusterPlatformMetadata) Platform() string

Platform returns a string representation of the platform (e.g. "aws" if AWS is non-nil). It returns an empty string if no platform is configured.

type EC2RootVolume

type EC2RootVolume struct {
	// IOPS defines the iops for the instance.
	IOPS int `json:"iops"`
	// Size defines the size of the instance.
	Size int `json:"size"`
	// Type defines the type of the instance.
	Type string `json:"type"`
}

EC2RootVolume defines the storage for an ec2 instance.

type InstallConfig

type InstallConfig struct {
	// +optional
	metav1.TypeMeta `json:",inline"`

	metav1.ObjectMeta `json:"metadata"`

	// ClusterID is the ID of the cluster.
	ClusterID string `json:"clusterID"`

	// Admin is the configuration for the admin user.
	Admin Admin `json:"admin"`

	// BaseDomain is the base domain to which the cluster should belong.
	BaseDomain string `json:"baseDomain"`

	// Networking defines the pod network provider in the cluster.
	Networking `json:"networking"`

	// Machines is the list of MachinePools that need to be installed.
	Machines []MachinePool `json:"machines"`

	// Platform is the configuration for the specific platform upon which to
	// perform the installation.
	Platform `json:"platform"`

	// PullSecret is the secret to use when pulling images.
	PullSecret string `json:"pullSecret"`
}

InstallConfig is the configuration for an OpenShift install.

func (*InstallConfig) MasterCount

func (c *InstallConfig) MasterCount() int

MasterCount returns the number of replicas in the master machine pool, defaulting to one if no machine pool was found.

type LibvirtMachinePoolPlatform

type LibvirtMachinePoolPlatform struct {
	// ImagePool is the name of the libvirt storage pool to which the storage
	// volume containing the OS image belongs.
	ImagePool string `json:"imagePool,omitempty"`
	// ImageVolume is the name of the libvirt storage volume containing the OS
	// image.
	ImageVolume string `json:"imageVolume,omitempty"`

	// Image is the URL to the OS image.
	// E.g. "http://aos-ostree.rhev-ci-vms.eng.rdu2.redhat.com/rhcos/images/cloud/latest/rhcos-qemu.qcow2.gz"
	Image string `json:"image"`
}

LibvirtMachinePoolPlatform stores the configuration for a machine pool installed on libvirt.

type LibvirtNetwork

type LibvirtNetwork struct {
	// Name is the name of the nework.
	Name string `json:"name"`
	// IfName is the name of the network interface.
	IfName string `json:"if"`
	// IPRange is the range of IPs to use.
	IPRange string `json:"ipRange"`
}

LibvirtNetwork is the configuration of the libvirt network.

type LibvirtPlatform

type LibvirtPlatform struct {
	// URI is the identifier for the libvirtd connection.  It must be
	// reachable from both the host (where the installer is run) and the
	// cluster (where the cluster-API controller pod will be running).
	URI string `json:"URI"`

	// DefaultMachinePlatform is the default configuration used when
	// installing on AWS for machine pools which do not define their own
	// platform configuration.
	DefaultMachinePlatform *LibvirtMachinePoolPlatform `json:"defaultMachinePlatform,omitempty"`

	// Network
	Network LibvirtNetwork `json:"network"`

	// MasterIPs
	MasterIPs []net.IP `json:"masterIPs"`
}

LibvirtPlatform stores all the global configuration that all machinesets use.

type MachinePool

type MachinePool struct {
	// Name is the name of the machine pool.
	Name string `json:"name"`

	// Replicas is the count of machines for this machine pool.
	// Default is 1.
	Replicas *int64 `json:"replicas"`

	// Platform is configuration for machine pool specific to the platfrom.
	Platform MachinePoolPlatform `json:"platform"`
}

MachinePool is a pool of machines to be installed.

type MachinePoolPlatform

type MachinePoolPlatform struct {
	// AWS is the configuration used when installing on AWS.
	AWS *AWSMachinePoolPlatform `json:"aws,omitempty"`

	// Libvirt is the configuration used when installing on libvirt.
	Libvirt *LibvirtMachinePoolPlatform `json:"libvirt,omitempty"`

	// OpenStack is the configuration used when installing on OpenStack.
	OpenStack *OpenStackMachinePoolPlatform `json:"openstack,omitempty"`
}

MachinePoolPlatform is the platform-specific configuration for a machine pool. Only one of the platforms should be set.

type NetworkType

type NetworkType string

NetworkType defines the pod network provider in the cluster.

const (
	// NetworkTypeOpenshiftSDN is used to install with SDN.
	NetworkTypeOpenshiftSDN NetworkType = "openshift-sdn"
	// NetworkTypeOpenshiftOVN is used to install with OVN.
	NetworkTypeOpenshiftOVN NetworkType = "openshift-ovn"
)

type Networking

type Networking struct {
	Type        NetworkType `json:"type"`
	ServiceCIDR ipnet.IPNet `json:"serviceCIDR"`
	PodCIDR     ipnet.IPNet `json:"podCIDR"`
}

Networking defines the pod network provider in the cluster.

type OpenStackMachinePoolPlatform

type OpenStackMachinePoolPlatform struct {
	// FlavorName defines the OpenStack Nova flavor.
	// eg. m1.large
	FlavorName string `json:"type"`

	// OpenStackRootVolume defines the storage for Nova instance.
	OpenStackRootVolume `json:"rootVolume"`
}

OpenStackMachinePoolPlatform stores the configuration for a machine pool installed on OpenStack.

type OpenStackPlatform

type OpenStackPlatform struct {
	// Region specifies the OpenStack region where the cluster will be created.
	Region string `json:"region"`

	// VPCID specifies the vpc to associate with the cluster.
	// If empty, new vpc will be created.
	// +optional
	VPCID string `json:"vpcID"`

	// NetworkCIDRBlock
	// +optional
	NetworkCIDRBlock string `json:"NetworkCIDRBlock"`

	// BaseImage
	// Name of image to use from OpenStack cloud
	BaseImage string `json:"baseImage"`

	// Cloud
	// Name of OpenStack cloud to use from clouds.yaml
	Cloud string `json:"cloud"`

	// ExternalNetwork
	// The OpenStack external network to be used for installation.
	ExternalNetwork string `json:"externalNetwork"`
}

OpenStackPlatform stores all the global configuration that all machinesets use.

type OpenStackRootVolume

type OpenStackRootVolume struct {
	// IOPS defines the iops for the instance.
	IOPS int `json:"iops"`
	// Size defines the size of the instance.
	Size int `json:"size"`
	// Type defines the type of the instance.
	Type string `json:"type"`
}

OpenStackRootVolume defines the storage for a Nova instance.

type Platform

type Platform struct {
	// AWS is the configuration used when installing on AWS.
	AWS *AWSPlatform `json:"aws,omitempty"`

	// Libvirt is the configuration used when installing on libvirt.
	Libvirt *LibvirtPlatform `json:"libvirt,omitempty"`

	// OpenStack is the configuration used when installing on OpenStack.
	OpenStack *OpenStackPlatform `json:"openstack,omitempty"`
}

Platform is the configuration for the specific platform upon which to perform the installation. Only one of the platform configuration should be set.

Directories

Path Synopsis
aws

Jump to

Keyboard shortcuts

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