clusterresource

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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
}

AWSCloudBuilder encapsulates cluster artifact generation logic specific to AWS.

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
}

AzureCloudBuilder encapsulates cluster artifact generation logic specific to Azure.

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

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

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

	// 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
}

Builder can be used to build all artifacts required for to create a ClusterDeployment.

func (*Builder) Build

func (o *Builder) Build() ([]runtime.Object, error)

Build generates all resources using the fields configured.

func (*Builder) Validate

func (o *Builder) Validate() error

Validate ensures that the builder's fields are logically configured and usable to generate the cluster resources.

type CloudBuilder

type CloudBuilder interface {
	// 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
}

GCPCloudBuilder encapsulates cluster artifact generation logic specific to GCP.

Jump to

Keyboard shortcuts

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