Documentation ¶
Index ¶
- Variables
- func Bool(v bool) *bool
- func Int(v int) *int
- func NewBootkubeAssets(cfg BootkubeConfig) ([]asset.Asset, error)
- func NewServer(config *Config) (http.Handler, error)
- func NewTectonicAssets(assets []asset.Asset, config *TectonicConfig, m metrics) ([]asset.Asset, error)
- type BootkubeConfig
- type Cluster
- type Config
- type CreateOperation
- type Image
- type Images
- type ListItems
- type MatchboxClient
- type MatchboxConfig
- type Node
- type OIDCIssuer
- type PlatformsValue
- type ServiceStatus
- type StatusChecker
- type TectonicAWSChecker
- type TectonicAWSCluster
- type TectonicConfig
- type TectonicMetalChecker
- type TectonicMetalCluster
- func (c *TectonicMetalCluster) GenerateAssets() ([]asset.Asset, error)
- func (c *TectonicMetalCluster) Initialize() error
- func (c *TectonicMetalCluster) Kind() string
- func (c *TectonicMetalCluster) Publish(ctx context.Context) error
- func (c *TectonicMetalCluster) StatusChecker() (StatusChecker, error)
- type TectonicUpdaterConfig
- type TerraformApplyHandlerInput
- type TerraformDestroyHandlerInput
Constants ¶
This section is empty.
Variables ¶
var KnownPlatforms = []string{
"aws-tf",
"bare-metal-tf",
"azure",
"openstack",
}
KnownPlatforms is the list of supported platforms.
Functions ¶
func NewBootkubeAssets ¶
func NewBootkubeAssets(cfg BootkubeConfig) ([]asset.Asset, error)
NewBootkubeAssets wraps bootkube default asset generation and replace specific assets to fit our needs (e.g. OIDC).
func NewTectonicAssets ¶
func NewTectonicAssets(assets []asset.Asset, config *TectonicConfig, m metrics) ([]asset.Asset, error)
NewTectonicAssets generates Kubernetes manifests for Tectonic clusters.
Types ¶
type BootkubeConfig ¶
type BootkubeConfig struct { bootkube.Config OIDCIssuer *OIDCIssuer }
BootkubeConfig represents the configuration needed to generate Bootkube assets.
type Cluster ¶
type Cluster interface { // Initialize validates cluster fields and sets any defaults. Initialize() error // GenerateAssets generates cluster provisioning assets. GenerateAssets() ([]asset.Asset, error) // StatusChecker returns a checker for the status of cluster components. StatusChecker() (StatusChecker, error) // Kind returns the kind name of a cluster. Kind() string // Publish writes configs to a provisioning service. Publish(context.Context) error }
A Cluster defines cluster setup operations and steps.
type Config ¶
type Config struct { // If not "", serve assets from this local directory rather than from binassets AssetDir string // List of platform names to support Platforms []string // Whether the server was started with --dev DevMode bool // Cookie Sessions CookieSigningSecret string // Allow cookies to be sent over HTTP DisableSecureCookie bool }
Config configures a server.
type CreateOperation ¶
type CreateOperation struct { // Kind of cluster which should be created ClusterKind string `json:"clusterKind"` // Cluster properties ClusterData json.RawMessage `json:"cluster"` // If true, don't actually create cluster. Just generate assets. DryRun bool `json:"dryRun"` }
CreateOperation defines a cluster creation request.
func (*CreateOperation) Cluster ¶
func (o *CreateOperation) Cluster() (Cluster, error)
Cluster parses cluster kind and data to return a Cluster.
type Image ¶
type Image struct {
Version string `json:"version"`
}
Image represents a versioned set of OS image assets.
type Images ¶
type Images struct {
CoreOS []Image `json:"coreos"`
}
Images represents the list images response format.
type MatchboxClient ¶
type MatchboxClient struct {
// contains filtered or unexported fields
}
MatchboxClient allows Cluster manifests to be written to the matchbox service.
func NewMatchboxClient ¶
func NewMatchboxClient(config *MatchboxConfig) (*MatchboxClient, error)
NewMatchboxClient returns a new MatchboxClient.
func (*MatchboxClient) Close ¶
func (c *MatchboxClient) Close() error
Close closes the client's connections.
type MatchboxConfig ¶
MatchboxConfig configures a matchbox client with PEM encoded TLS credentials.
type Node ¶
type Node struct { // FQDN Name string `json:"name"` // MAC Address MAC *macAddr `json:"mac"` }
The Node type can simplify generation of cluster manifests.
type OIDCIssuer ¶
OIDCIssuer is the OIDC configuration for the Bootkube assets.
type PlatformsValue ¶
type PlatformsValue struct {
Names []string
}
PlatformsValue is a flag.Value/flag.Getter compatible type for reading platform arguments
func (*PlatformsValue) Set ¶
func (p *PlatformsValue) Set(s string) error
Set parses a command line value into Names, or returns an error.
func (*PlatformsValue) String ¶
func (p *PlatformsValue) String() string
String formats the platform list in a command-line-acceptable way
type ServiceStatus ¶
type ServiceStatus struct { Instance string `json:"instance"` Message string `json:"message"` Ready bool `json:"ready"` RemoteAddr string `json:"remoteAddr"` Addrs []string `json:"addrs"` }
ServiceStatus gives the status of an instance of a service.
func EtcdHealth ¶
func EtcdHealth(client *http.Client, endpoint string) ServiceStatus
EtcdHealth returns the ServiceStatus of the given Node's etcd instance.
func KubeletHealth ¶
func KubeletHealth(client *http.Client, endpoint string) ServiceStatus
KubeletHealth returns the ServiceStatus of the Kubelet via read-only port.
func TectonicConsoleHealth ¶
func TectonicConsoleHealth(client *http.Client, endpoint string) ServiceStatus
TectonicConsoleHealth returns the ServiceStatus of the Tectonic Console.
type StatusChecker ¶
type StatusChecker interface { // Status returns the status of cluster components and services. Status() ([]byte, error) }
StatusChecker is a client for checking the status of cluster components.
type TectonicAWSChecker ¶
type TectonicAWSChecker struct { AccessKeyID string SecretAccessKey string SessionToken string Region string ControllerDomain string TectonicDomain string Cluster *cloudforms.Cluster }
TectonicAWSChecker is a serializable StatusChecker for Tectonic AWS clusters.
func (TectonicAWSChecker) Status ¶
func (c TectonicAWSChecker) Status() ([]byte, error)
Status checks the state of AWS infrastructure, on-host kubelets, and Tectonic components in the cluster.
type TectonicAWSCluster ¶
type TectonicAWSCluster struct { CloudForm *cloudforms.Config `json:"cloudForm"` // AWS api credential AccessKeyID string `json:"accessKeyID"` SecretAccessKey string `json:"secretAccessKey"` SessionToken string `json:"sessionToken"` // Custom Certificate Authority (optional) CACertificate string `json:"caCertificate"` CAPrivateKey string `json:"caPrivateKey"` // Tectonic Tectonic *TectonicConfig `json:"tectonic"` // contains filtered or unexported fields }
TectonicAWSCluster provisions a Tectonic self-hosted Kubernetes cluster on AWS EC2.
func (*TectonicAWSCluster) GenerateAssets ¶
func (c *TectonicAWSCluster) GenerateAssets() ([]asset.Asset, error)
GenerateAssets generates cluster provisioning assets.
func (*TectonicAWSCluster) Initialize ¶
func (c *TectonicAWSCluster) Initialize() error
Initialize validates cluster data and sets defaults.
func (*TectonicAWSCluster) Kind ¶
func (c *TectonicAWSCluster) Kind() string
Kind returns the kind name of a cluster.
func (*TectonicAWSCluster) Publish ¶
func (c *TectonicAWSCluster) Publish(ctx context.Context) error
Publish pushes the Cloud Formation template to AWS.
func (*TectonicAWSCluster) StatusChecker ¶
func (c *TectonicAWSCluster) StatusChecker() (StatusChecker, error)
StatusChecker returns a StatusChecker for Tectonic AWS clusters.
type TectonicConfig ¶
type TectonicConfig struct { ControllerDomain string `json:"-"` TectonicDomain string `json:"-"` License string `json:"license"` Dockercfg string `json:"dockercfg"` // Identity IdentityAdminUser string `json:"identityAdminUser"` IdentityAdminPassword []byte `json:"identityAdminPassword"` // Ingress IngressKind string `json:"ingressKind"` // Updater Updater TectonicUpdaterConfig `json:"updater"` }
TectonicConfig holds variables needed when generating Tectonic templates or assets.
func (*TectonicConfig) AssertValid ¶
func (t *TectonicConfig) AssertValid() error
AssertValid validates the Tectonic data for common errors.
type TectonicMetalChecker ¶
TectonicMetalChecker is a serializable StatusChecker for Tectonic bare-metal clusters.
func (TectonicMetalChecker) Status ¶
func (c TectonicMetalChecker) Status() ([]byte, error)
Status checks the state of etcd, on-host kublets, and Tectonic components in the cluster.
type TectonicMetalCluster ¶
type TectonicMetalCluster struct { // Matchbox HTTP name/IP and port MatchboxHTTP string `json:"matchboxHTTP"` // Matchbox gRPC API name/IP and port MatchboxRPC string `json:"matchboxRPC"` // Matchbox certificate authority for verifying the server's identity MatchboxCA string `json:"matchboxCA"` // Matchbox client certificate and key for authentication MatchboxClientCert string `json:"matchboxClientCert"` MatchboxClientKey string `json:"matchboxClientKey"` // CoreOS PXE and install channel/version Channel string `json:"channel"` Version string `json:"version"` // External etcd client endpoint, e.g. etcd.example.com:2379 ExternalETCDClient string `json:"externalETCDClient"` // Kubernetes Control Plane nodes ControllerDomain string `json:"controllerDomain"` Controllers []Node `json:"controllers"` // Kuberntes Worker nodes Workers []Node `json:"workers"` // Admin SSH Public Keys SSHAuthorizedKeys []string `json:"sshAuthorizedKeys"` // Custom Certificate Authority (optional) CACertificate string `json:"caCertificate"` CAPrivateKey string `json:"caPrivateKey"` PodCIDR string `json:"podCIDR"` ServiceCIDR string `json:"serviceCIDR"` // Computed IPs for self-hosted Kubernetes APIServiceIP net.IP DNSServiceIP net.IP // Tectonic TectonicDomain string `json:"tectonicDomain"` Tectonic *TectonicConfig `json:"tectonic"` // contains filtered or unexported fields }
TectonicMetalCluster provisions a Tectonic self-hosted Kuberntes cluster on physical machines (bare metal).
func (*TectonicMetalCluster) GenerateAssets ¶
func (c *TectonicMetalCluster) GenerateAssets() ([]asset.Asset, error)
GenerateAssets generates cluster assets.
func (*TectonicMetalCluster) Initialize ¶
func (c *TectonicMetalCluster) Initialize() error
Initialize validates cluster data and sets defaults.
func (*TectonicMetalCluster) Kind ¶
func (c *TectonicMetalCluster) Kind() string
Kind returns the kind name.
func (*TectonicMetalCluster) Publish ¶
func (c *TectonicMetalCluster) Publish(ctx context.Context) error
Publish writes profiles, groups, and Ignition to a matchbox service.
func (*TectonicMetalCluster) StatusChecker ¶
func (c *TectonicMetalCluster) StatusChecker() (StatusChecker, error)
StatusChecker returns a StatusChecker for Tectonic metal clusters.
type TectonicUpdaterConfig ¶
type TectonicUpdaterConfig struct { Enabled bool `json:"enabled"` // Omaha configuration Server string `json:"server"` Channel string `json:"channel"` AppID string `json:"appID"` }
TectonicUpdaterConfig represents the configuration for the Tectonic Channel Operator.
type TerraformApplyHandlerInput ¶
type TerraformApplyHandlerInput struct { Platform string `json:"platform"` Credentials terraform.Credentials `json:"credentials"` AdminPassword []byte `json:"adminPassword"` Variables map[string]interface{} `json:"variables"` License string `json:"license"` PullSecret string `json:"pullSecret"` DryRun bool `json:"dryRun"` Retry bool `json:"retry"` }
TerraformApplyHandlerInput describes the input expected by the terraformApplyHandler HTTP Handler.
type TerraformDestroyHandlerInput ¶
type TerraformDestroyHandlerInput struct { Platform string `json:"platform"` Credentials terraform.Credentials `json:"credentials"` }
TerraformDestroyHandlerInput describes the input expected by the terraformDestroyHandler HTTP Handler.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package asset abstracts generated asset representations.
|
Package asset abstracts generated asset representations. |
aws
|
|
Package version provides the build version.
|
Package version provides the build version. |