-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add image-based installation config type
Signed-off-by: Michail Resvanis <[email protected]>
- Loading branch information
Showing
1 changed file
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
package imagebased | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
|
||
aiv1beta1 "github.com/openshift/assisted-service/api/v1beta1" | ||
"github.com/openshift/installer/pkg/types" | ||
) | ||
|
||
// ImageBasedConfigVersion is the version supported by this package. | ||
const ImageBasedConfigVersion = "v1beta1" | ||
|
||
// InstallationConfig is the API for specifying configuration for the | ||
// image-based installation ISO. | ||
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 varlibcontainers | ||
// +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"` | ||
|
||
// 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"` | ||
} |