types

package
v0.0.0-...-c53fdc3 Latest Latest
Warning

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

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

Documentation

Overview

Package types defines structures for installer configuration and management.

Index

Constants

View Source
const (
	// MachinePoolComputeRoleName name associated with the compute machinepool.
	MachinePoolComputeRoleName = "worker"
	// MachinePoolEdgeRoleName name associated with the compute edge machinepool.
	MachinePoolEdgeRoleName = "edge"
	// MachinePoolControlPlaneRoleName name associated with the control plane machinepool.
	MachinePoolControlPlaneRoleName = "master"
)
View Source
const (
	// ArchitectureAMD64 indicates AMD64 (x86_64).
	ArchitectureAMD64 = "amd64"
	// ArchitectureS390X indicates s390x (IBM System Z).
	ArchitectureS390X = "s390x"
	// ArchitecturePPC64LE indicates ppc64 little endian (Power PC)
	ArchitecturePPC64LE = "ppc64le"
	// ArchitectureARM64 indicates arm (aarch64) systems
	ArchitectureARM64 = "arm64"
)
View Source
const (
	// InstallConfigVersion is the version supported by this package.
	// If you bump this, you must also update the list of convertable values in
	// pkg/types/conversion/installconfig.go
	InstallConfigVersion = "v1"
)

Variables

View Source
var (
	// PlatformNames is a slice with all the visibly-supported
	// platform names in alphabetical order. This is the list of
	// platforms presented to the user in the interactive wizard.
	PlatformNames = []string{
		openstack.Name,
	}
	// HiddenPlatformNames is a slice with all the
	// hidden-but-supported platform names. This list isn't presented
	// to the user in the interactive wizard.
	HiddenPlatformNames = []string{}

	// FCOS is a setting to enable Fedora CoreOS-only modifications
	FCOS = false
	// SCOS is a setting to enable CentOS Stream CoreOS-only modifications
	SCOS = false
)

Functions

This section is empty.

Types

type Architecture

type Architecture string

Architecture is the instruction set architecture for the machines in a pool. +kubebuilder:validation:Enum="";amd64

type BootstrapInPlace

type BootstrapInPlace struct {
	// InstallationDisk is the target disk drive for coreos-installer
	InstallationDisk string `json:"installationDisk"`
}

BootstrapInPlace defines the configuration for bootstrap-in-place installation

type CPUPartitioningMode

type CPUPartitioningMode string

CPUPartitioningMode defines how the nodes should be setup for partitioning the CPU Sets. +kubebuilder:validation:Enum=None;AllNodes

const (
	// CPUPartitioningNone means that no CPU Partitioning is on in this cluster infrastructure.
	CPUPartitioningNone CPUPartitioningMode = "None"
	// CPUPartitioningAllNodes means that all nodes are configured with CPU Partitioning in this cluster.
	CPUPartitioningAllNodes CPUPartitioningMode = "AllNodes"
)

type Capabilities

type Capabilities struct {
	// baselineCapabilitySet selects an initial set of
	// optional capabilities to enable, which can be extended via
	// additionalEnabledCapabilities. The default is vCurrent.
	// +optional
	BaselineCapabilitySet configv1.ClusterVersionCapabilitySet `json:"baselineCapabilitySet,omitempty"`

	// additionalEnabledCapabilities extends the set of managed
	// capabilities beyond the baseline defined in
	// baselineCapabilitySet. The default is an empty set.
	// +optional
	AdditionalEnabledCapabilities []configv1.ClusterVersionCapability `json:"additionalEnabledCapabilities,omitempty"`
}

Capabilities selects the managed set of optional, core cluster components.

type ClusterMetadata

type ClusterMetadata struct {
	// ClusterName is the name for the cluster.
	ClusterName string `json:"clusterName"`
	// ClusterID is a globally unique ID that is used to identify an Openshift cluster.
	ClusterID string `json:"clusterID"`
	// InfraID is an ID that is used to identify cloud resources created by the installer.
	InfraID                 string `json:"infraID"`
	ClusterPlatformMetadata `json:",inline"`
}

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

type ClusterNetworkEntry

type ClusterNetworkEntry struct {
	// CIDR is the IP block address pool.
	CIDR ipnet.IPNet `json:"cidr"`

	// HostPrefix is the prefix size to allocate to each node from the CIDR.
	// For example, 24 would allocate 2^8=256 adresses to each node. If this
	// field is not used by the plugin, it can be left unset.
	// +optional
	HostPrefix int32 `json:"hostPrefix,omitempty"`

	// The size of blocks to allocate from the larger pool.
	// This is the length in bits - so a 9 here will allocate a /23.
	// +optional
	DeprecatedHostSubnetLength int32 `json:"hostSubnetLength,omitempty"`
}

ClusterNetworkEntry is a single IP address block for pod IP blocks. IP blocks are allocated with size 2^HostSubnetLength.

type ClusterPlatformMetadata

type ClusterPlatformMetadata struct {
	OpenStack *openstack.Metadata `json:"openstack,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 ClusterQuota

type ClusterQuota struct {
	Stub *StubQuota `json:"gcp,omitempty"`
}

ClusterQuota contains the size, in cloud quota, of the cluster that was created by installer.

type CredentialsMode

type CredentialsMode string

CredentialsMode is the mode by which CredentialsRequests will be satisfied. +kubebuilder:validation:Enum="";Mint;Passthrough;Manual

const (
	// ManualCredentialsMode indicates that cloud-credential-operator should not process any CredentialsRequests.
	ManualCredentialsMode CredentialsMode = "Manual"

	// MintCredentialsMode indicates that cloud-credential-operator should be creating users for each
	// CredentialsRequest.
	MintCredentialsMode CredentialsMode = "Mint"

	// PassthroughCredentialsMode indicates that cloud-credential-operator should just copy over the cluster's
	// cloud credentials for each CredentialsRequest.
	PassthroughCredentialsMode CredentialsMode = "Passthrough"
)

type HyperthreadingMode

type HyperthreadingMode string

HyperthreadingMode is the mode of hyperthreading for a machine. +kubebuilder:validation:Enum="";Enabled;Disabled

const (
	// HyperthreadingEnabled indicates that hyperthreading is enabled.
	HyperthreadingEnabled HyperthreadingMode = "Enabled"
	// HyperthreadingDisabled indicates that hyperthreading is disabled.
	HyperthreadingDisabled HyperthreadingMode = "Disabled"
)

type ImageContentSource

type ImageContentSource struct {
	// Source is the repository that users refer to, e.g. in image pull specifications.
	Source string `json:"source"`

	// Mirrors is one or more repositories that may also contain the same images.
	// +optional
	Mirrors []string `json:"mirrors,omitempty"`
}

ImageContentSource defines a list of sources/repositories that can be used to pull content. The field is deprecated. Please use imageDigestSources.

type ImageDigestSource

type ImageDigestSource struct {
	// Source is the repository that users refer to, e.g. in image pull specifications.
	Source string `json:"source"`

	// Mirrors is one or more repositories that may also contain the same images.
	// +optional
	Mirrors []string `json:"mirrors,omitempty"`
}

ImageDigestSource defines a list of sources/repositories that can be used to pull content.

type InstallConfig

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

	metav1.ObjectMeta `json:"metadata"`

	// AdditionalTrustBundle is a PEM-encoded X.509 certificate bundle
	// that will be added to the nodes' trusted certificate store.
	//
	// +optional
	AdditionalTrustBundle string `json:"additionalTrustBundle,omitempty"`

	// AdditionalTrustBundlePolicy determines when to add the AdditionalTrustBundle
	// to the nodes' trusted certificate store. "Proxyonly" is the default.
	// The field can be set to following specified values.
	// "Proxyonly" : adds the AdditionalTrustBundle to nodes when http/https proxy is configured.
	// "Always" : always adds AdditionalTrustBundle.
	AdditionalTrustBundlePolicy PolicyType `json:"additionalTrustBundlePolicy,omitempty"`

	// SSHKey is the public Secure Shell (SSH) key to provide access to instances.
	// +optional
	SSHKey string `json:"sshKey,omitempty"`

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

	// Networking is the configuration for the pod network provider in
	// the cluster.
	*Networking `json:"networking,omitempty"`

	// ControlPlane is the configuration for the machines that comprise the
	// control plane.
	// +optional
	ControlPlane *MachinePool `json:"controlPlane,omitempty"`

	// Compute is the configuration for the machines that comprise the
	// compute nodes.
	// +optional
	Compute []MachinePool `json:"compute,omitempty"`

	// 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"`

	// Proxy defines the proxy settings for the cluster.
	// If unset, the cluster will not be configured to use a proxy.
	// +optional
	Proxy *Proxy `json:"proxy,omitempty"`

	// ImageContentSources lists sources/repositories for the release-image content.
	// The field is deprecated. Please use imageDigestSources.
	// +optional
	DeprecatedImageContentSources []ImageContentSource `json:"imageContentSources,omitempty"`

	// ImageDigestSources lists sources/repositories for the release-image content.
	// +optional
	ImageDigestSources []ImageDigestSource `json:"imageDigestSources,omitempty"`

	// Publish controls how the user facing endpoints of the cluster like the Kubernetes API, OpenShift routes etc. are exposed.
	// When no strategy is specified, the strategy is "External".
	//
	// +kubebuilder:default=External
	// +optional
	Publish PublishingStrategy `json:"publish,omitempty"`

	// FIPS configures https://www.nist.gov/itl/fips-general-information
	//
	// +kubebuilder:default=false
	// +optional
	FIPS bool `json:"fips,omitempty"`

	// CPUPartitioning determines if a cluster should be setup for CPU workload partitioning at install time.
	// When this field is set the cluster will be flagged for CPU Partitioning allowing users to segregate workloads to
	// specific CPU Sets. This does not make any decisions on workloads it only configures the nodes to allow CPU Partitioning.
	// The "AllNodes" value will setup all nodes for CPU Partitioning, the default is "None".
	//
	// +kubebuilder:default="None"
	// +optional
	CPUPartitioning CPUPartitioningMode `json:"cpuPartitioningMode,omitempty"`

	// CredentialsMode is used to explicitly set the mode with which CredentialRequests are satisfied.
	//
	// If this field is set, then the installer will not attempt to query the cloud permissions before attempting
	// installation. If the field is not set or empty, then the installer will perform its normal verification that the
	// credentials provided are sufficient to perform an installation.
	//
	// There are three possible values for this field, but the valid values are dependent upon the platform being used.
	// "Mint": create new credentials with a subset of the overall permissions for each CredentialsRequest
	// "Passthrough": copy the credentials with all of the overall permissions for each CredentialsRequest
	// "Manual": CredentialsRequests must be handled manually by the user
	//
	// For each of the following platforms, the field can set to the specified values. For all other platforms, the
	// field must not be set.
	// AWS: "Mint", "Passthrough", "Manual"
	// Azure: "Passthrough", "Manual"
	// AzureStack: "Manual"
	// GCP: "Mint", "Passthrough", "Manual"
	// IBMCloud: "Manual"
	// AlibabaCloud: "Manual"
	// PowerVS: "Manual"
	// Nutanix: "Manual"
	// +optional
	CredentialsMode CredentialsMode `json:"credentialsMode,omitempty"`

	// BootstrapInPlace is the configuration for installing a single node
	// with bootstrap in place installation.
	BootstrapInPlace *BootstrapInPlace `json:"bootstrapInPlace,omitempty"`

	// Capabilities configures the installation of optional core cluster components.
	// +optional
	Capabilities *Capabilities `json:"capabilities,omitempty"`

	// FeatureSet enables features that are not part of the default feature set.
	// Valid values are "Default", "TechPreviewNoUpgrade" and "CustomNoUpgrade".
	// When omitted, the "Default" feature set is used.
	// +optional
	FeatureSet configv1.FeatureSet `json:"featureSet,omitempty"`

	// FeatureGates enables a set of custom feature gates.
	// May only be used in conjunction with FeatureSet "CustomNoUpgrade".
	// Features may be enabled or disabled by providing a true or false value for the feature gate.
	// E.g. "featureGates": ["FeatureGate1=true", "FeatureGate2=false"].
	// +optional
	FeatureGates []string `json:"featureGates,omitempty"`
}

InstallConfig is the configuration for an OpenShift install.

func (*InstallConfig) ClusterDomain

func (c *InstallConfig) ClusterDomain() string

ClusterDomain returns the DNS domain that all records for a cluster must belong to.

func (*InstallConfig) IsFCOS

func (c *InstallConfig) IsFCOS() bool

IsFCOS returns true if Fedora CoreOS-only modifications are enabled

func (*InstallConfig) IsOKD

func (c *InstallConfig) IsOKD() bool

IsOKD returns true if community-only modifications are enabled

func (*InstallConfig) IsSCOS

func (c *InstallConfig) IsSCOS() bool

IsSCOS returns true if CentOs Stream CoreOS-only modifications are enabled

func (*InstallConfig) IsSingleNodeOpenShift

func (c *InstallConfig) IsSingleNodeOpenShift() bool

IsSingleNodeOpenShift returns true if the install-config has been configured for bootstrapInPlace

func (*InstallConfig) WorkerMachinePool

func (c *InstallConfig) WorkerMachinePool() *MachinePool

WorkerMachinePool retrieves the worker MachinePool from InstallConfig.Compute

type MachineNetworkEntry

type MachineNetworkEntry struct {
	// CIDR is the IP block address pool for machines within the cluster.
	CIDR ipnet.IPNet `json:"cidr"`
}

MachineNetworkEntry is a single IP address block for node IP blocks.

type MachinePool

type MachinePool struct {
	// Name is the name of the machine pool.
	// For the control plane machine pool, the name will always be "master".
	// For the compute machine pools, the only valid name is "worker".
	Name string `json:"name"`

	// Replicas is the machine count for the machine pool.
	Replicas *int64 `json:"replicas,omitempty"`

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

	// Hyperthreading determines the mode of hyperthreading that machines in the
	// pool will utilize.
	// Default is for hyperthreading to be enabled.
	//
	// +kubebuilder:default=Enabled
	// +optional
	Hyperthreading HyperthreadingMode `json:"hyperthreading,omitempty"`

	// Architecture is the instruction set architecture of the machine pool.
	// Defaults to amd64.
	//
	// +kubebuilder:default=amd64
	// +optional
	Architecture Architecture `json:"architecture,omitempty"`
}

MachinePool is a pool of machines to be installed.

type MachinePoolPlatform

type MachinePoolPlatform struct {
	// OpenStack is the configuration used when installing on OpenStack.
	OpenStack *openstack.MachinePool `json:"openstack,omitempty"`
}

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

func (*MachinePoolPlatform) Name

func (p *MachinePoolPlatform) Name() string

Name 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 Networking

type Networking struct {
	// NetworkType is the type of network to install.
	// The default value is OVNKubernetes.
	//
	// +kubebuilder:default=OVNKubernetes
	// +optional
	NetworkType string `json:"networkType,omitempty"`

	// MachineNetwork is the list of IP address pools for machines.
	// This field replaces MachineCIDR, and if set MachineCIDR must
	// be empty or match the first entry in the list.
	// Default is 10.0.0.0/16 for all platforms other than libvirt and Power VS.
	// For libvirt, the default is 192.168.126.0/24.
	// For Power VS, the default is 192.168.0.0/24.
	//
	// +optional
	MachineNetwork []MachineNetworkEntry `json:"machineNetwork,omitempty"`

	// ClusterNetwork is the list of IP address pools for pods.
	// Default is 10.128.0.0/14 and a host prefix of /23.
	//
	// +optional
	ClusterNetwork []ClusterNetworkEntry `json:"clusterNetwork,omitempty"`

	// ServiceNetwork is the list of IP address pools for services.
	// Default is 172.30.0.0/16.
	// NOTE: currently only one entry is supported.
	//
	// +kubebuilder:validation:MaxItems=1
	// +optional
	ServiceNetwork []ipnet.IPNet `json:"serviceNetwork,omitempty"`

	// Deprecated way to configure an IP address pool for machines.
	// Replaced by MachineNetwork which allows for multiple pools.
	// +optional
	DeprecatedMachineCIDR *ipnet.IPNet `json:"machineCIDR,omitempty"`

	// Deprecated name for NetworkType
	// +optional
	DeprecatedType string `json:"type,omitempty"`

	// Deprecated way to configure an IP address pool for services.
	// Replaced by ServiceNetwork which allows for multiple pools.
	// +optional
	DeprecatedServiceCIDR *ipnet.IPNet `json:"serviceCIDR,omitempty"`

	// Deprecated name for ClusterNetwork
	// +optional
	DeprecatedClusterNetworks []ClusterNetworkEntry `json:"clusterNetworks,omitempty"`
}

Networking defines the pod network provider in the cluster.

type Platform

type Platform struct {
	// OpenStack is the configuration used when installing on OpenStack.
	// +optional
	OpenStack *openstack.Platform `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.

func (*Platform) Name

func (p *Platform) Name() string

Name 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 PolicyType

type PolicyType string

PolicyType is for usage polices that are applied to additionalTrustBundle. +kubebuilder:validation:Enum="";Proxyonly;Always

const (
	// PolicyProxyOnly  enables use of AdditionalTrustBundle when http/https proxy is configured.
	PolicyProxyOnly PolicyType = "Proxyonly"
	// PolicyAlways ignores all conditions and uses AdditionalTrustBundle.
	PolicyAlways PolicyType = "Always"
)

type Proxy

type Proxy struct {
	// HTTPProxy is the URL of the proxy for HTTP requests.
	// +optional
	HTTPProxy string `json:"httpProxy,omitempty"`

	// HTTPSProxy is the URL of the proxy for HTTPS requests.
	// +optional
	HTTPSProxy string `json:"httpsProxy,omitempty"`

	// NoProxy is a comma-separated list of domains and CIDRs for which the proxy should not be used.
	// +optional
	NoProxy string `json:"noProxy,omitempty"`
}

Proxy defines the proxy settings for the cluster. At least one of HTTPProxy or HTTPSProxy is required.

type PublishingStrategy

type PublishingStrategy string

PublishingStrategy is a strategy for how various endpoints for the cluster are exposed. +kubebuilder:validation:Enum="";External;Internal

const (
	// ExternalPublishingStrategy exposes endpoints for the cluster to the Internet.
	ExternalPublishingStrategy PublishingStrategy = "External"
	// InternalPublishingStrategy exposes the endpoints for the cluster to the private network only.
	InternalPublishingStrategy PublishingStrategy = "Internal"
)

type StubQuota

type StubQuota struct {
}

Directories

Path Synopsis
Package openstack contains OpenStack-specific structures for installer configuration and management.
Package openstack contains OpenStack-specific structures for installer configuration and management.

Jump to

Keyboard shortcuts

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