Documentation ¶
Index ¶
- type AWSCloudBuilder
- type AzureCloudBuilder
- type Builder
- type CloudBuilder
- type GCPCloudBuilder
- type InstallConfigTemplate
- type OpenStackCloudBuilder
- func (p *OpenStackCloudBuilder) CredsSecretName(o *Builder) string
- func (p *OpenStackCloudBuilder) GenerateCloudObjects(o *Builder) []runtime.Object
- func (p *OpenStackCloudBuilder) GenerateCredentialsSecret(o *Builder) *corev1.Secret
- func (p *OpenStackCloudBuilder) GetCloudPlatform(o *Builder) hivev1.Platform
- type OvirtCloudBuilder
- type VSphereCloudBuilder
- func (p *VSphereCloudBuilder) CredsSecretName(o *Builder) string
- func (p *VSphereCloudBuilder) GenerateCloudObjects(o *Builder) []runtime.Object
- func (p *VSphereCloudBuilder) GenerateCredentialsSecret(o *Builder) *corev1.Secret
- func (p *VSphereCloudBuilder) GetCloudPlatform(o *Builder) hivev1.Platform
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSCloudBuilder ¶
type AWSCloudBuilder struct { // AccessKeyID is the AWS access key ID. AccessKeyID string // SecretAccessKey is the AWS secret access key. SecretAccessKey string RoleARN, ExternalID string // UserTags are user-provided tags to add to resources. UserTags map[string]string // Region is the AWS region to which to install the cluster Region string PrivateLink bool }
AWSCloudBuilder encapsulates cluster artifact generation logic specific to AWS.
func NewAWSCloudBuilderFromAssumeRole ¶ added in v1.1.1
func NewAWSCloudBuilderFromAssumeRole(role *hivev1aws.AssumeRole) *AWSCloudBuilder
func NewAWSCloudBuilderFromSecret ¶ added in v1.0.6
func NewAWSCloudBuilderFromSecret(credsSecret *corev1.Secret) *AWSCloudBuilder
func (*AWSCloudBuilder) CredsSecretName ¶ added in v1.0.11
func (p *AWSCloudBuilder) CredsSecretName(o *Builder) string
func (*AWSCloudBuilder) GenerateCloudObjects ¶ added in v1.1.0
func (p *AWSCloudBuilder) GenerateCloudObjects(o *Builder) []runtime.Object
func (*AWSCloudBuilder) GenerateCredentialsSecret ¶ added in v1.0.11
func (p *AWSCloudBuilder) GenerateCredentialsSecret(o *Builder) *corev1.Secret
func (*AWSCloudBuilder) GetCloudPlatform ¶ added in v1.0.11
func (p *AWSCloudBuilder) GetCloudPlatform(o *Builder) hivev1.Platform
type AzureCloudBuilder ¶
type AzureCloudBuilder struct { // ServicePrincipal is the bytes from a service principal file, typically ~/.azure/osServicePrincipal.json. ServicePrincipal []byte // BaseDomainResourceGroupName is the resource group where the base domain for this cluster is configured. BaseDomainResourceGroupName string // Region is the Azure region to which to install the cluster. Region string }
AzureCloudBuilder encapsulates cluster artifact generation logic specific to Azure.
func NewAzureCloudBuilderFromSecret ¶ added in v1.0.6
func NewAzureCloudBuilderFromSecret(credsSecret *corev1.Secret) *AzureCloudBuilder
func (*AzureCloudBuilder) CredsSecretName ¶ added in v1.0.11
func (p *AzureCloudBuilder) CredsSecretName(o *Builder) string
func (*AzureCloudBuilder) GenerateCloudObjects ¶ added in v1.1.0
func (p *AzureCloudBuilder) GenerateCloudObjects(o *Builder) []runtime.Object
func (*AzureCloudBuilder) GenerateCredentialsSecret ¶ added in v1.0.11
func (p *AzureCloudBuilder) GenerateCredentialsSecret(o *Builder) *corev1.Secret
func (*AzureCloudBuilder) GetCloudPlatform ¶ added in v1.0.11
func (p *AzureCloudBuilder) GetCloudPlatform(o *Builder) hivev1.Platform
type Builder ¶
type Builder struct { // Name is the name of your Cluster. Will be used for both the ClusterDeployment.Name and the // ClusterDeployment.Spec.ClusterName, which encompasses the subdomain and cloud provider resource // tagging. Name string // Namespace where the ClusterDeployment and all associated artifacts will be created. Namespace string // Labels are labels to be added to the ClusterDeployment. Labels map[string]string // Annotations are annotations to be added to the ClusterDeployment. Annotations map[string]string // CloudBuilder encapsulates logic for building the objects for a specific cloud. CloudBuilder CloudBuilder // PullSecret is the secret to use when pulling images. PullSecret string // SSHPrivateKey is an optional SSH key to configure on hosts in the cluster. This would // typically be read from ~/.ssh/id_rsa. SSHPrivateKey string // SSHPublicKey is an optional public SSH key to configure on hosts in the cluster. This would // typically be read from ~/.ssh/id_rsa.pub. Must match the SSHPrivateKey. SSHPublicKey string // InstallOnce indicates that the provision job should not be retried on failure. InstallOnce bool // BaseDomain is the DNS base domain to be used for the cluster. BaseDomain string // WorkerNodesCount is the number of worker nodes to create in the cluster initially. WorkerNodesCount int64 // ManageDNS can be set to true to enable Hive's automatic DNS zone creation and forwarding. (assuming // this is properly configured in HiveConfig) ManageDNS bool // DeleteAfter is the duration after which the cluster should be automatically destroyed, relative to // creationTimestamp. Stored as an annotation on the ClusterDeployment. DeleteAfter string // HibernateAfter is the duration after which a running cluster should be automatically hibernated. HibernateAfter *time.Duration // ServingCert is the contents of a serving certificate to be used for the cluster. ServingCert string // ServingCertKey is the contents of a key for the ServingCert. ServingCertKey string // CredentailsMode is the Cloud Credential Operator mode to force in the generated install-config. // Typically left unset for the default ('Mint' mode), or set to 'Manual'. CredentialsMode string // Adopt is a flag indicating we're adopting a pre-existing cluster. Adopt bool // AdoptAdminKubeconfig is a cluster administrator admin kubeconfig typically obtained // from openshift-install. Required when adopting pre-existing clusters. AdoptAdminKubeconfig []byte // AdoptClusterID is the unique generated ID for a cluster being adopted. // Required when adopting pre-existing clusters. AdoptClusterID string // AdoptInfraID is the unique generated infrastructure ID for a cluster being adopted. // Required when adopting pre-existing clusters. AdoptInfraID string // AdoptAdminUsername is the admin username for an adopted cluster, typically written to disk // after openshift-install create-cluster. This field is optional when adopting. AdoptAdminUsername string // AdoptAdminPassword is the admin password for an adopted cluster, typically written to disk // after openshift-install create-cluster. This field is optional when adopting. AdoptAdminPassword string // InstallerManifests is a map of filename strings to bytes for files to inject into the installers // manifests dir before launching create-cluster. InstallerManifests map[string][]byte // ImageSet is the ClusterImageSet to use for this cluster. ImageSet string // ReleaseImage is a specific OpenShift release image to install this cluster with. Will override // ImageSet. ReleaseImage string // MachineNetwork is the subnet to use for the cluster's machine network. MachineNetwork string // SkipMachinePools should be true if you do not want Hive to manage MachineSets in the spoke cluster once it is installed. SkipMachinePools bool // AdditionalTrustBundle is a PEM-encoded X.509 certificate bundle // that will be added to the nodes' trusted certificate store. AdditionalTrustBundle string // InstallConfig Secret to be used as template for deployment install-config InstallConfigTemplate string // CentralMachineManagement CentralMachineManagement bool // BoundServiceAccountSigningKey is the private key used to sign ServiceAccounts. Primarily used for provisioning clusters that use AWS Security Token Service. BoundServiceAccountSigningKey string // PublishStrategy defines the publishing strategy for the install-config. PublishStrategy string }
Builder can be used to build all artifacts required for to create a ClusterDeployment.
func (*Builder) GeneratePullSecretSecret ¶ added in v1.0.11
GeneratePullSecretSecret returns a Kubernetes Secret containing the pull secret to be used for pulling images.
func (*Builder) GetPullSecretSecretName ¶ added in v1.0.11
TODO: handle long cluster names.
type CloudBuilder ¶
type CloudBuilder interface { GetCloudPlatform(o *Builder) hivev1.Platform CredsSecretName(o *Builder) string GenerateCredentialsSecret(o *Builder) *corev1.Secret // GenerateCloudObjects returns any additional resources needed for a particular cloud provider. GenerateCloudObjects(o *Builder) []runtime.Object // contains filtered or unexported methods }
CloudBuilder interface exposes the functions we will use to set cloud specific portions of the cluster's resources.
type GCPCloudBuilder ¶
type GCPCloudBuilder struct { // ServicePrincipal is the bytes from a service account file, typically ~/.gcp/osServiceAccount.json. ServiceAccount []byte // ProjectID is the GCP project to use. ProjectID string // Region is the GCP region to which to install the cluster. Region string }
GCPCloudBuilder encapsulates cluster artifact generation logic specific to GCP.
func NewGCPCloudBuilderFromSecret ¶ added in v1.0.6
func NewGCPCloudBuilderFromSecret(credsSecret *corev1.Secret) (*GCPCloudBuilder, error)
func (*GCPCloudBuilder) CredsSecretName ¶ added in v1.0.11
func (p *GCPCloudBuilder) CredsSecretName(o *Builder) string
func (*GCPCloudBuilder) GenerateCloudObjects ¶ added in v1.1.0
func (p *GCPCloudBuilder) GenerateCloudObjects(o *Builder) []runtime.Object
func (*GCPCloudBuilder) GenerateCredentialsSecret ¶ added in v1.0.11
func (p *GCPCloudBuilder) GenerateCredentialsSecret(o *Builder) *corev1.Secret
func (*GCPCloudBuilder) GetCloudPlatform ¶ added in v1.0.11
func (p *GCPCloudBuilder) GetCloudPlatform(o *Builder) hivev1.Platform
type InstallConfigTemplate ¶ added in v1.0.16
type InstallConfigTemplate struct { MetaData *metav1.ObjectMeta `json:"metadata"` BaseDomain string `json:"baseDomain"` // contains filtered or unexported fields }
InstallConfigTemplate allows for overlaying generic InstallConfig with parts known to Hive
func (*InstallConfigTemplate) MarshalJSON ¶ added in v1.0.16
func (i *InstallConfigTemplate) MarshalJSON() ([]byte, error)
MarshalJSON will merge the known fields from InstallConfigTemplate
func (*InstallConfigTemplate) UnmarshalJSON ¶ added in v1.0.16
func (i *InstallConfigTemplate) UnmarshalJSON(bytes []byte) error
UnmarshalJSON will extract the known types in InstallConfigTemplate
type OpenStackCloudBuilder ¶ added in v1.0.1
type OpenStackCloudBuilder struct { // APIFloatingIP is the OpenStack Floating IP for the cluster to use for its API APIFloatingIP string // IngressFloatingIP is the OpenStack Floating IP for the cluster to use for its Ingress IngressFloatingIP string // Cloud is the named section from the clouds.yaml in the Secret containing the creds. Cloud string // CloudsYAMLContent is the data that will be used as the clouds.yaml file for // cluster provisioning. CloudsYAMLContent []byte // ExternalNetwork is the OpenStack network to install the cluster into. ExternalNetwork string // ComputeFlavor is the OpenStack flavor type to use for workers and to set // the default for other machine pools. ComputeFlavor string // MasterFlavor is the OpenStack flavor type to use for master instances. MasterFlavor string }
OpenStackCloudBuilder encapsulates cluster artifact generation logic specific to OpenStack.
func (*OpenStackCloudBuilder) CredsSecretName ¶ added in v1.0.11
func (p *OpenStackCloudBuilder) CredsSecretName(o *Builder) string
func (*OpenStackCloudBuilder) GenerateCloudObjects ¶ added in v1.1.0
func (p *OpenStackCloudBuilder) GenerateCloudObjects(o *Builder) []runtime.Object
func (*OpenStackCloudBuilder) GenerateCredentialsSecret ¶ added in v1.0.11
func (p *OpenStackCloudBuilder) GenerateCredentialsSecret(o *Builder) *corev1.Secret
func (*OpenStackCloudBuilder) GetCloudPlatform ¶ added in v1.0.11
func (p *OpenStackCloudBuilder) GetCloudPlatform(o *Builder) hivev1.Platform
type OvirtCloudBuilder ¶ added in v1.0.6
type OvirtCloudBuilder struct { // OvirtConfig is the data that will be used as the ovirt-config.yaml file for // cluster provisioning. OvirtConfig []byte // The target cluster under which all VMs will run ClusterID string // The target storage domain under which all VM disk would be created. StorageDomainID string // The target network of all the network interfaces of the nodes. Omitting defaults to ovirtmgmt // network which is a default network for every oVirt cluster. NetworkName string // APIVIP is an IP which will be served by bootstrap and then pivoted masters, using keepalived APIVIP string // 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 // CACert is the CA certificate(s) used to communicate with oVirt. CACert []byte }
OvirtCloudBuilder encapsulates cluster artifact generation logic specific to oVirt.
func (*OvirtCloudBuilder) CredsSecretName ¶ added in v1.0.11
func (p *OvirtCloudBuilder) CredsSecretName(o *Builder) string
func (*OvirtCloudBuilder) GenerateCloudObjects ¶ added in v1.1.0
func (p *OvirtCloudBuilder) GenerateCloudObjects(o *Builder) []runtime.Object
func (*OvirtCloudBuilder) GenerateCredentialsSecret ¶ added in v1.0.11
func (p *OvirtCloudBuilder) GenerateCredentialsSecret(o *Builder) *corev1.Secret
func (*OvirtCloudBuilder) GetCloudPlatform ¶ added in v1.0.11
func (p *OvirtCloudBuilder) GetCloudPlatform(o *Builder) hivev1.Platform
type VSphereCloudBuilder ¶ added in v1.0.5
type VSphereCloudBuilder struct { // VCenter is the domain name or IP address of the vCenter. VCenter string // Username is the name of the user to use to connect to the vCenter. Username string // Password is the password for the user to use to connect to the vCenter. Password string // Datacenter is the name of the datacenter to use in the vCenter. Datacenter string // DefaultDatastore is the default datastore to use for provisioning volumes. DefaultDatastore string // Folder is the name of the folder that will be used and/or created for // virtual machines. Folder string // Cluster is the name of the cluster virtual machines will be cloned into. Cluster string // APIVIP is the virtual IP address for the api endpoint APIVIP string // IngressVIP is the virtual IP address for ingress IngressVIP string // Network specifies the name of the network to be used by the cluster. Network string // CACert is the CA certificate(s) used to communicate with the vCenter. CACert []byte }
VSphereCloudBuilder encapsulates cluster artifact generation logic specific to vSphere.
func (*VSphereCloudBuilder) CredsSecretName ¶ added in v1.0.11
func (p *VSphereCloudBuilder) CredsSecretName(o *Builder) string
func (*VSphereCloudBuilder) GenerateCloudObjects ¶ added in v1.1.0
func (p *VSphereCloudBuilder) GenerateCloudObjects(o *Builder) []runtime.Object
func (*VSphereCloudBuilder) GenerateCredentialsSecret ¶ added in v1.0.11
func (p *VSphereCloudBuilder) GenerateCredentialsSecret(o *Builder) *corev1.Secret
func (*VSphereCloudBuilder) GetCloudPlatform ¶ added in v1.0.11
func (p *VSphereCloudBuilder) GetCloudPlatform(o *Builder) hivev1.Platform