mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 15:47:14 +01:00
pkg/types: ensure kubebuilder can build correct documentation
go generate ./pkg/types/installconfig.go
This commit is contained in:
@@ -14,3 +14,4 @@ rules:
|
||||
|
||||
ignore: |
|
||||
vendor/
|
||||
data/data/install.openshift.io_installconfigs.yaml
|
||||
|
||||
1240
data/data/install.openshift.io_installconfigs.yaml
Normal file
1240
data/data/install.openshift.io_installconfigs.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -4,17 +4,25 @@ package aws
|
||||
// on AWS.
|
||||
type MachinePool struct {
|
||||
// Zones is list of availability zones that can be used.
|
||||
//
|
||||
// +optional
|
||||
Zones []string `json:"zones,omitempty"`
|
||||
|
||||
// InstanceType defines the ec2 instance type.
|
||||
// eg. m4-large
|
||||
//
|
||||
// +optional
|
||||
InstanceType string `json:"type"`
|
||||
|
||||
// AMIID is the AMI that should be used to boot the ec2 instance.
|
||||
// If set, the AMI should belong to the same region as the cluster.
|
||||
//
|
||||
// +optional
|
||||
AMIID string `json:"amiID,omitempty"`
|
||||
|
||||
// EC2RootVolume defines the root volume for EC2 instances in the machine pool.
|
||||
//
|
||||
// +optional
|
||||
EC2RootVolume `json:"rootVolume"`
|
||||
}
|
||||
|
||||
@@ -54,9 +62,16 @@ func (a *MachinePool) Set(required *MachinePool) {
|
||||
type EC2RootVolume struct {
|
||||
// IOPS defines the amount of provisioned IOPS. This is only valid
|
||||
// for type io1.
|
||||
//
|
||||
// +kubebuilder:validation:Minimum=0
|
||||
// +optional
|
||||
IOPS int `json:"iops"`
|
||||
|
||||
// Size defines the size of the volume in gibibytes (GiB).
|
||||
//
|
||||
// +kubebuilder:validation:Minimum=0
|
||||
Size int `json:"size"`
|
||||
|
||||
// Type defines the type of the volume.
|
||||
Type string `json:"type"`
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ package aws
|
||||
type Platform struct {
|
||||
// AMIID is the AMI that should be used to boot machines for the cluster.
|
||||
// If set, the AMI should belong to the same region as the cluster.
|
||||
//
|
||||
// +optional
|
||||
AMIID string `json:"amiID,omitempty"`
|
||||
|
||||
// Region specifies the AWS region where the cluster will be created.
|
||||
@@ -13,6 +15,8 @@ type Platform struct {
|
||||
// Subnets specifies existing subnets (by ID) where cluster
|
||||
// resources will be created. Leave unset to have the installer
|
||||
// create subnets in a new VPC on your behalf.
|
||||
//
|
||||
// +optional
|
||||
Subnets []string `json:"subnets,omitempty"`
|
||||
|
||||
// UserTags additional keys and values that the installer will add
|
||||
@@ -44,5 +48,7 @@ type ServiceEndpoint struct {
|
||||
// URL is fully qualified URI with scheme https, that overrides the default generated
|
||||
// endpoint for a client.
|
||||
// This must be provided and cannot be empty.
|
||||
//
|
||||
// +kubebuilder:validation:Pattern=`^https://`
|
||||
URL string `json:"url"`
|
||||
}
|
||||
|
||||
@@ -5,19 +5,27 @@ package azure
|
||||
type MachinePool struct {
|
||||
// Zones is list of availability zones that can be used.
|
||||
// eg. ["1", "2", "3"]
|
||||
//
|
||||
// +optional
|
||||
Zones []string `json:"zones,omitempty"`
|
||||
|
||||
// InstanceType defines the azure instance type.
|
||||
// eg. Standard_DS_V2
|
||||
//
|
||||
// +optional
|
||||
InstanceType string `json:"type"`
|
||||
|
||||
// OSDisk defines the storage for instance.
|
||||
//
|
||||
// +optional
|
||||
OSDisk `json:"osDisk"`
|
||||
}
|
||||
|
||||
// OSDisk defines the disk for machines on Azure.
|
||||
type OSDisk struct {
|
||||
// DiskSizeGB defines the size of disk in GB.
|
||||
//
|
||||
// +kubebuilder:validation:Minimum=0
|
||||
DiskSizeGB int32 `json:"diskSizeGB"`
|
||||
}
|
||||
|
||||
|
||||
@@ -18,15 +18,23 @@ type Platform struct {
|
||||
DefaultMachinePlatform *MachinePool `json:"defaultMachinePlatform,omitempty"`
|
||||
|
||||
// NetworkResourceGroupName specifies the network resource group that contains an existing VNet
|
||||
//
|
||||
// +optional
|
||||
NetworkResourceGroupName string `json:"networkResourceGroupName,omitempty"`
|
||||
|
||||
// VirtualNetwork specifies the name of an existing VNet for the installer to use
|
||||
//
|
||||
// +optional
|
||||
VirtualNetwork string `json:"virtualNetwork,omitempty"`
|
||||
|
||||
// ControlPlaneSubnet specifies an existing subnet for use by the control plane nodes
|
||||
//
|
||||
// +optional
|
||||
ControlPlaneSubnet string `json:"controlPlaneSubnet,omitempty"`
|
||||
|
||||
// ComputeSubnet specifies an existing subnet for use by compute nodes
|
||||
//
|
||||
// +optional
|
||||
ComputeSubnet string `json:"computeSubnet,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -25,8 +25,10 @@ type Host struct {
|
||||
type Platform struct {
|
||||
// LibvirtURI is the identifier for the libvirtd connection. It must be
|
||||
// reachable from the host where the installer is run.
|
||||
// +optional
|
||||
// Default is qemu:///system
|
||||
//
|
||||
// +kubebuilder:default="qemu:///system"
|
||||
// +optional
|
||||
LibvirtURI string `json:"libvirtURI,omitempty"`
|
||||
|
||||
// ClusterProvisioningIP is the IP on the dedicated provisioning network
|
||||
@@ -38,6 +40,8 @@ type Platform struct {
|
||||
// BootstrapProvisioningIP is the IP used on the bootstrap VM to
|
||||
// bring up provisioning services that are used to create the
|
||||
// control-plane machines
|
||||
//
|
||||
// +kubebuilder:validation:Format=ip
|
||||
// +optional
|
||||
BootstrapProvisioningIP string `json:"bootstrapProvisioningIP,omitempty"`
|
||||
|
||||
@@ -80,23 +84,31 @@ type Platform struct {
|
||||
DefaultMachinePlatform *MachinePool `json:"defaultMachinePlatform,omitempty"`
|
||||
|
||||
// APIVIP is the VIP to use for internal API communication
|
||||
//
|
||||
// +kubebuilder:validation:Format=ip
|
||||
APIVIP string `json:"apiVIP"`
|
||||
|
||||
// IngressVIP is the VIP to use for ingress traffic
|
||||
//
|
||||
// +kubebuilder:validation:Format=ip
|
||||
IngressVIP string `json:"ingressVIP"`
|
||||
|
||||
// DNSVIP is the VIP to use for internal DNS communication
|
||||
//
|
||||
// +kubebuilder:validation:Format=ip
|
||||
DNSVIP string `json:"dnsVIP"`
|
||||
|
||||
// BootstrapOSImage is a URL to override the default OS image
|
||||
// for the bootstrap node. The URL must contain a sha256 hash of the image
|
||||
// e.g https://mirror.example.com/images/qemu.qcow2.gz?sha256=a07bd...
|
||||
//
|
||||
// +optional
|
||||
BootstrapOSImage string `json:"bootstrapOSImage,omitempty" validate:"omitempty,osimageuri,urlexist"`
|
||||
|
||||
// ClusterOSImage is a URL to override the default OS image
|
||||
// for cluster nodes. The URL must contain a sha256 hash of the image
|
||||
// e.g https://mirror.example.com/images/metal.qcow2.gz?sha256=3b5a8...
|
||||
//
|
||||
// +optional
|
||||
ClusterOSImage string `json:"clusterOSImage,omitempty" validate:"omitempty,osimageuri,urlexist"`
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
//+groupName="install.openshift.io"
|
||||
//+versionName="v1"
|
||||
|
||||
// Package types defines structures for installer configuration and
|
||||
// management.
|
||||
package types
|
||||
|
||||
@@ -3,10 +3,14 @@ package gcp
|
||||
// MachinePool stores the configuration for a machine pool installed on GCP.
|
||||
type MachinePool struct {
|
||||
// Zones is list of availability zones that can be used.
|
||||
//
|
||||
// +optional
|
||||
Zones []string `json:"zones,omitempty"`
|
||||
|
||||
// InstanceType defines the GCP instance type.
|
||||
// eg. n1-standard-4
|
||||
//
|
||||
// +optional
|
||||
InstanceType string `json:"type"`
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ var (
|
||||
)
|
||||
|
||||
// PublishingStrategy is a strategy for how various endpoints for the cluster are exposed.
|
||||
// +kubebuilder:validation:Enum="";External;Internal
|
||||
type PublishingStrategy string
|
||||
|
||||
const (
|
||||
@@ -54,6 +55,8 @@ const (
|
||||
InternalPublishingStrategy PublishingStrategy = "Internal"
|
||||
)
|
||||
|
||||
//go:generate go run ../../vendor/sigs.k8s.io/controller-tools/cmd/controller-gen crd:crdVersions=v1 paths=. output:dir=../../data/data/
|
||||
|
||||
// InstallConfig is the configuration for an OpenShift install.
|
||||
type InstallConfig struct {
|
||||
// +optional
|
||||
@@ -63,6 +66,7 @@ type InstallConfig struct {
|
||||
|
||||
// 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"`
|
||||
|
||||
@@ -104,11 +108,16 @@ type InstallConfig struct {
|
||||
ImageContentSources []ImageContentSource `json:"imageContentSources,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`.
|
||||
// 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"`
|
||||
}
|
||||
|
||||
@@ -189,28 +198,33 @@ func (p *Platform) Name() string {
|
||||
|
||||
// Networking defines the pod network provider in the cluster.
|
||||
type Networking struct {
|
||||
// NetworkType is the type of network to install.
|
||||
// NetworkType is the type of network to install. The default is OpenShiftSDN
|
||||
//
|
||||
// +kubebuilder:default=OpenShiftSDN
|
||||
// +optional
|
||||
// Default is OpenShiftSDN.
|
||||
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.
|
||||
// +optional
|
||||
// Default is 10.0.0.0/16 for all platforms other than libvirt.
|
||||
// For libvirt, the default is 192.168.126.0/24.
|
||||
//
|
||||
// +optional
|
||||
MachineNetwork []MachineNetworkEntry `json:"machineNetwork,omitempty"`
|
||||
|
||||
// ClusterNetwork is the list of IP address pools for pods.
|
||||
// +optional
|
||||
// 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.
|
||||
// +optional
|
||||
// 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"`
|
||||
|
||||
// Deprected types, scheduled to be removed
|
||||
@@ -251,6 +265,7 @@ type ClusterNetworkEntry struct {
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
package libvirt
|
||||
|
||||
// Network is the configuration of the libvirt network.
|
||||
type Network struct {
|
||||
// +optional
|
||||
// Default is tt0.
|
||||
IfName string `json:"if,omitempty"`
|
||||
}
|
||||
@@ -6,18 +6,31 @@ type Platform 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).
|
||||
// +optional
|
||||
// Default is qemu+tcp://192.168.122.1/system
|
||||
//
|
||||
// +kubebuilder:default="qemu+tcp://192.168.122.1/system"
|
||||
// +optional
|
||||
URI string `json:"URI,omitempty"`
|
||||
|
||||
// DefaultMachinePlatform is the default configuration used when
|
||||
// installing on libvirt for machine pools which do not define their
|
||||
// own platform configuration.
|
||||
// +optional
|
||||
// Default will set the image field to the latest RHCOS image.
|
||||
//
|
||||
// +optional
|
||||
DefaultMachinePlatform *MachinePool `json:"defaultMachinePlatform,omitempty"`
|
||||
|
||||
// Network
|
||||
// +optional
|
||||
Network *Network `json:"network,omitempty"`
|
||||
}
|
||||
|
||||
// Network is the configuration of the libvirt network.
|
||||
type Network struct {
|
||||
// The interface make used for the network.
|
||||
// Default is tt0.
|
||||
//
|
||||
// +kubebuilder:default="tt0"
|
||||
// +optional
|
||||
IfName string `json:"if,omitempty"`
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
)
|
||||
|
||||
// HyperthreadingMode is the mode of hyperthreading for a machine.
|
||||
// +kubebuilder:validation:Enum="";Enabled;Disabled
|
||||
type HyperthreadingMode string
|
||||
|
||||
const (
|
||||
@@ -22,6 +23,7 @@ const (
|
||||
)
|
||||
|
||||
// Architecture is the instruction set architecture for the machines in a pool.
|
||||
// +kubebuilder:validation:Enum="";amd64
|
||||
type Architecture string
|
||||
|
||||
const (
|
||||
@@ -44,12 +46,17 @@ type MachinePool struct {
|
||||
|
||||
// Hyperthreading determines the mode of hyperthreading that machines in the
|
||||
// pool will utilize.
|
||||
// +optional
|
||||
// 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"`
|
||||
}
|
||||
|
||||
|
||||
@@ -5,28 +5,35 @@ package ovirt
|
||||
type Platform struct {
|
||||
// The target cluster under which all VMs will run
|
||||
ClusterID string `json:"ovirt_cluster_id"`
|
||||
|
||||
// The target storage domain under which all VM disk would be created.
|
||||
StorageDomainID string `json:"ovirt_storage_domain_id"`
|
||||
// The target network of all the network interfaces of the nodes.
|
||||
|
||||
// NetworkName is the target network of all the network interfaces of the nodes.
|
||||
// When no ovirt_network_name is provided it defaults to `ovirtmgmt` network, which is a default network for every ovirt cluster.
|
||||
// +optional
|
||||
//Omitting defaults to ovirtmgmt network which is a default network for every ovirt cluster.
|
||||
NetworkName string `json:"ovirt_network_name,omitempty"`
|
||||
//VNICProfileID defines the VNIC profile ID to use the the VM network interfaces.
|
||||
|
||||
// VNICProfileID defines the VNIC profile ID to use the the VM network interfaces.
|
||||
// When no vnicProfileID is provided it will be set to the profile of the network. If there are multiple
|
||||
// profiles for the network, the installer requires you to explicitly set the vnicProfileID.
|
||||
// +optional
|
||||
// Default will set the vnic profile id to the profile of the network. If there are multiple
|
||||
// profiles for that network the installation exits.
|
||||
VNICProfileID string `json:"vnicProfileID,omitempty"`
|
||||
|
||||
// APIVIP is an IP which will be served by bootstrap and then pivoted masters, using keepalived
|
||||
APIVIP string `json:"api_vip"`
|
||||
|
||||
// DNSVIP is the IP of the internal DNS which will be operated by the cluster
|
||||
DNSVIP string `json:"dns_vip"`
|
||||
|
||||
// IngressIP is an external IP which routes to the default ingress controller.
|
||||
// The IP is a suitable target of a wildcard DNS record used to resolve default route host names.
|
||||
IngressVIP string `json:"ingress_vip"`
|
||||
|
||||
// DefaultMachinePlatform is the default configuration used when
|
||||
// installing on ovirt for machine pools which do not define their
|
||||
// own platform configuration.
|
||||
// +optional
|
||||
// Default will set the image field to the latest RHCOS image.
|
||||
// +optional
|
||||
DefaultMachinePlatform *MachinePool `json:"defaultMachinePlatform,omitempty"`
|
||||
}
|
||||
|
||||
@@ -4,22 +4,32 @@ package vsphere
|
||||
// on vSphere.
|
||||
type MachinePool struct {
|
||||
// NumCPUs is the total number of virtual processor cores to assign a vm.
|
||||
//
|
||||
// +optional
|
||||
NumCPUs int32 `json:"cpus"`
|
||||
|
||||
// NumCoresPerSocket is the number of cores per socket in a vm. The number
|
||||
// of vCPUs on the vm will be NumCPUs/NumCoresPerSocket.
|
||||
//
|
||||
// +optional
|
||||
NumCoresPerSocket int32 `json:"coresPerSocket"`
|
||||
|
||||
// Memory is the size of a VM's memory in MB.
|
||||
//
|
||||
// +optional
|
||||
MemoryMiB int64 `json:"memoryMB"`
|
||||
|
||||
// OSDisk defines the storage for instance.
|
||||
//
|
||||
// +optional
|
||||
OSDisk `json:"osDisk"`
|
||||
}
|
||||
|
||||
// OSDisk defines the disk for a virtual machine.
|
||||
type OSDisk struct {
|
||||
// DiskSizeGB defines the size of disk in GB.
|
||||
//
|
||||
// +optional
|
||||
DiskSizeGB int32 `json:"diskSizeGB"`
|
||||
}
|
||||
|
||||
|
||||
@@ -28,9 +28,15 @@ type Platform struct {
|
||||
ClusterOSImage string `json:"clusterOSImage,omitempty"`
|
||||
|
||||
// APIVIP is the virtual IP address for the api endpoint
|
||||
//
|
||||
// +kubebuilder:validation:format=ip
|
||||
// +optional
|
||||
APIVIP string `json:"apiVIP,omitempty"`
|
||||
|
||||
// IngressVIP is the virtual IP address for ingress
|
||||
//
|
||||
// +kubebuilder:validation:format=ip
|
||||
// +optional
|
||||
IngressVIP string `json:"ingressVIP,omitempty"`
|
||||
|
||||
// DefaultMachinePlatform is the default configuration used when
|
||||
|
||||
Reference in New Issue
Block a user