Documentation
¶
Index ¶
Constants ¶
const ( // SeedReconfigurationVersion is the current version of the // SeedReconfiguration struct. SeedReconfigurationVersion = 1 // BlockDeviceLabel is the volume label to be used for the image-based // installer configuration ISO. BlockDeviceLabel = "cluster-config" )
const (
// ImageBasedConfigVersion is the version supported by this package.
ImageBasedConfigVersion = "v1beta1"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionalTrustBundle ¶
type AdditionalTrustBundle struct {
// UserCaBundle keeps the contents of the user-ca-bundle ConfigMap in the
// openshift-config namepace.
UserCaBundle string `json:"userCaBundle"`
// ProxyConfigmapName is the Proxy CR trustedCA ConfigMap name.
ProxyConfigmapName string `json:"proxyConfigmapName"`
// ProxyConfigampBundle keeps the contents of the ProxyConfigmapName ConfigMap.
// It must be equal to the UserCaBundle when ProxyConfigmapName is
// user-ca-bundle.
ProxyConfigmapBundle string `json:"proxyConfigmapBundle"`
}
AdditionalTrustBundle represents the PEM-encoded X.509 certificate bundle that will be added to the nodes' trusted certificate store.
type ClientAuthCrypto ¶
type ClientAuthCrypto struct {
// AdminCACertificate is a PEM-encoded X.509 certificate.
AdminCACertificate string `json:"admin_ca_certificate,omitempty"`
}
ClientAuthCrypto contains the CA certificate used to sign the cluster's cryptographic objects.
type Config ¶
type Config struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// AdditionalNTPSources is a list of NTP sources (hostname or IP) to be added to all cluster
// hosts. They are added to any NTP sources that were configured through other means.
// +optional
AdditionalNTPSources []string `json:"additionalNTPSources,omitempty"`
// Hostname is the desired hostname of the SNO node.
Hostname string `json:"hostname,omitempty"`
// NetworkConfig is a YAML manifest that can be processed by nmstate, using custom
// marshaling/unmarshaling that will allow to populate nmstate config as plain yaml.
// +optional
NetworkConfig *aiv1beta1.NetConfig `json:"networkConfig,omitempty"`
// ReleaseRegistry is the container registry that hosts the OpenShift
// release-image content of the cluster during the deployment step.
// +optional
ReleaseRegistry string `json:"releaseRegistry,omitempty"`
// ClusterID is the desired cluster ID.
// Will be generated by the installer in case it is not provided.
// +optional
ClusterID string `json:"cluster_id,omitempty"`
// InfraID is the desired infra ID.
// Will be generated by the installer in case it is not provided.
// +optional
InfraID string `json:"infra_id,omitempty"`
// NodeLabels The desired node labels for the SNO node.
// +optional
NodeLabels map[string]string `json:"nodeLabels,omitempty"`
}
Config is the API for specifying configuration for the image-based configuration ISO.
type IngresssCrypto ¶
type IngresssCrypto struct {
// IngressCAPrivateKey is a PEM-encoded private key.
IngressCAPrivateKey string `json:"ingress_ca,omitempty"`
// IngressCertificateCN is the Subject.CN of the ingress CA certificate.
IngressCertificateCN string `json:"ingress_certificate_cn,omitempty"`
}
IngresssCrypto contains the ingrees CA certificate.
type InstallationConfig ¶
type InstallationConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// 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"`
// ExtraPartitionLabel label of extra partition used for /var/lib/containers.
// Default is var-lib-containers
// +optional
ExtraPartitionLabel string `json:"extraPartitionLabel,omitempty"`
// ExtraPartitionNumber number of extra partition used for /var/lib/containers.
// Default is 5
// +optional
ExtraPartitionNumber uint `json:"extraPartitionNumber,omitempty"`
// ExtraPartitionStart is the start of the /var/lib/containers partition. Free
// space before it will be allocated to system partition. It can be one of the
// following:
// - Positive number: partition will start at position 120Gb of the disk and extend to the end of the disk. Example: 120Gb
// - Negative number: partition will be of that precise size. Example: -40Gb
// It defaults to -40G (40GB before the end of the disk).
// +optional
ExtraPartitionStart string `json:"extraPartitionStart,omitempty"`
// IgnitionConfigOverride is a JSON string containing the user overrides for
// the Ignition configuration. It will be merged with the ignition config
// generated by the image-based installer. Supported Ignition version is 3.2.
// +optional
IgnitionConfigOverride string `json:"ignitionConfigOverride,omitempty"`
// ImageDigestSources lists sources/repositories for the release-image content.
// +optional
ImageDigestSources []types.ImageDigestSource `json:"imageDigestSources,omitempty"`
// InstallationDisk is the disk used to install the seed image. Provide the
// device by ID, e.g. /dev/by-id/ata-xxxxx
InstallationDisk string `json:"installationDisk"`
// NetworkConfig is a YAML manifest that can be processed by nmstate, using
// custom marshaling/unmarshaling that will allow to populate nmstate config
// as plain yaml.
// +optional
NetworkConfig *aiv1beta1.NetConfig `json:"networkConfig,omitempty"`
// Proxy defines the proxy settings for the cluster.
// If unset, the cluster will not be configured to use a proxy.
// +optional
Proxy *types.Proxy `json:"proxy,omitempty"`
// PullSecret is the secret to use when pulling images.
PullSecret string `json:"pullSecret"`
// ReleaseRegistry is the container image registry that hosts the OpenShift
// release-image content and is used when precaching the cluster's container
// images during the preparation/installation step only.
// +optional
ReleaseRegistry string `json:"releaseRegistry,omitempty"`
// SeedImage is the seed image to use for the installation. This image will be
// used to prepare the installation disk.
SeedImage string `json:"seedImage"`
// SeedVersion is the version of the seed image. It will be validated against
// the seed image version.
SeedVersion string `json:"seedVersion"`
// Shutdown is a flag to shutdown the host after installation. It defaults to
// false.
// +optional
Shutdown bool `json:"shutdown,omitempty"`
// SkipDiskCleanup is a flag to skip disk cleanup before installation. As part
// of installation we will try to format the disk this flag will skip that
// step. It defaults to false.
SkipDiskCleanup bool `json:"skipDiskCleanup,omitempty"`
// SSHKey is the public Secure Shell (SSH) key to provide access to instances.
SSHKey string `json:"sshKey,omitempty"`
// CoreosInstallerParams additional parameters for coreos-install command that will be used while writing os to disk
// Example: in order not to override earlier created installation disk partition, you can provide
// coreosInstallerArgs: []{"--save-partindex=6"} - this will save previously created partition number 6
// Allowed flags: "--append-karg", "--delete-karg", "--save-partlabel", "--save-partindex"
//
// +optional
CoreosInstallerArgs []string `json:"coreosInstallerArgs,omitempty"`
}
InstallationConfig is the API for specifying configuration for the image-based installation ISO.
type KubeAPICrypto ¶
type KubeAPICrypto struct {
ServingCrypto ServingCrypto
ClientAuthCrypto ClientAuthCrypto
}
KubeAPICrypto contains the kubernetes API private keys and certificates that are used to generate and sign the cluster's cryptographic objects.
type KubeConfigCryptoRetention ¶
type KubeConfigCryptoRetention struct {
KubeAPICrypto KubeAPICrypto
IngresssCrypto IngresssCrypto
}
KubeConfigCryptoRetention contains all the crypto material that is required for the image-based installer to ensure that the kubeconfigs can be used to access the cluster after its configuration.
type SeedReconfiguration ¶
type SeedReconfiguration struct {
// AdditionalTrustBundle keeps the PEM-encoded x.509 certificate bundle(s)
// that will be added to the nodes' trusted certificate store.
AdditionalTrustBundle AdditionalTrustBundle `json:"additionalTrustBundle,omitempty"`
// APIVersion is the version of this struct and it is used to detect breaking
// changes.
APIVersion int `json:"api_version"`
// BaseDomain is the desired base domain.
BaseDomain string `json:"base_domain,omitempty"`
// ClusterID is the desired cluster ID.
ClusterID string `json:"cluster_id,omitempty"`
// ClusterName is the desired cluster name.
ClusterName string `json:"cluster_name,omitempty"`
// ChronyConfig is the desired chrony configuration and it is used to populate
// the /etc/chrony.conf on the node.
ChronyConfig string `json:"chrony_config,omitempty"`
// Hostname is the desired hostname of the node.
Hostname string `json:"hostname,omitempty"`
// InfraID is the desired infra ID.
InfraID string `json:"infra_id,omitempty"`
// KubeadminPasswordHash is the hash of the password for the kubeadmin
// user, as can be found in the kubeadmin key of the kube-system/kubeadmin
// secret. This will replace the kubeadmin password of the seed cluster.
KubeadminPasswordHash string `json:"kubeadmin_password_hash,omitempty"`
// KubeconfigCryptoRetention contains all the crypto material that is required
// for the image-based installer to ensure that the generated kubeconfigs can
// be used to access the cluster after its configuration.
KubeconfigCryptoRetention KubeConfigCryptoRetention
// 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 Power VS.
// For Power VS, the default is 192.168.0.0/24.
MachineNetwork string `json:"machine_network,omitempty"`
// NodeIP is the desired IP address of the node.
NodeIP string `json:"node_ip,omitempty"`
// RawNMStateConfig contains the nmstate configuration YAML manifest as string.
// Example nmstate configurations can be found here: https://nmstate.io/examples.html.
RawNMStateConfig string `json:"raw_nm_state_config,omitempty"`
// RelaseRegistry is the container registry that hosts the release image of
// the seed cluster.
ReleaseRegistry string `json:"release_registry,omitempty"`
// SSHKey is the public Secure Shell (SSH) key that provides access to the
// node.
SSHKey string `json:"ssh_key,omitempty"`
// Proxy defines the proxy settings for the cluster.
// If unset, the cluster will not be configured to use a proxy.
Proxy *types.Proxy `json:"proxy,omitempty"`
// PullSecret is the secret to use when pulling images.
PullSecret string `json:"pull_secret,omitempty"`
// NodeLabels The desired node labels for the SNO node.
NodeLabels map[string]string `json:"node_labels,omitempty"`
}
SeedReconfiguration contains all the information that is required to transform a machine started from a single-node OpenShift (SNO) seed OCI image (which contains dummy seed configuration) into a SNO cluster with the desired configuration.
type ServingCrypto ¶
type ServingCrypto struct {
// LocalhostSignerPrivateKey is a PEM-encoded private key.
LocalhostSignerPrivateKey string `json:"localhost_signer_private_key,omitempty"`
// ServiceNetworkSignerPrivateKey is a PEM-encoded private key.
ServiceNetworkSignerPrivateKey string `json:"service_network_signer_private_key,omitempty"`
// LoadbalancerSignerPrivateKey is a PEM-encoded private key.
LoadbalancerSignerPrivateKey string `json:"loadbalancer_external_signer_private_key,omitempty"`
}
ServingCrypto contains the kubernetes API private keys that are used to generate the cluster's certificates.