Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClusterInfo ¶
type ClusterInfo struct { *Config Index ClusterNumber Password string }
func NewClusterInfo ¶
func NewClusterInfo(ctx context.Context, cfg *Config, i ClusterNumber) *ClusterInfo
func (*ClusterInfo) BasicAuth ¶
func (c *ClusterInfo) BasicAuth() string
func (*ClusterInfo) Domain ¶
func (c *ClusterInfo) Domain() string
type ClusterLogin ¶
type ClusterLogin struct { // Username for basic auth logins. Defaults to workshopctl. Username string `json:"username"` // CommonPassword sets the same password for VS code and all basic auth // for all clusters. If unset, a random password will be generated. CommonPassword string `json:"commonPassword"` // UniquePasswords tells whether every cluster should have its own password. // By default false, which means all clusters share CommonPassword. If true, // CommonPassword will be ignored and all clusters' passwords will be generated. UniquePasswords bool `json:"uniquePasswords"` }
type ClusterNumber ¶
type ClusterNumber uint16
func (ClusterNumber) ClusterDir ¶
func (n ClusterNumber) ClusterDir() string
func (ClusterNumber) Domain ¶
func (n ClusterNumber) Domain(rootDomain string) string
func (ClusterNumber) KubeConfigPath ¶
func (n ClusterNumber) KubeConfigPath() string
func (ClusterNumber) String ¶
func (n ClusterNumber) String() string
func (ClusterNumber) Subdomain ¶
func (n ClusterNumber) Subdomain() string
type Config ¶
type Config struct { // The prefix to use for all identifying names/tags/etc. // This allows an user to have multiple workshop environments at once in the same provider Name string `json:"name"` // CloudProvider specifies what cloud provider to use and how to authenticate with it. CloudProvider Provider `json:"cloudProvider"` // DNSProvider specifies what dns provider to use and how to authenticate with it. DNSProvider Provider `json:"dnsProvider"` RootDomain string `json:"rootDomain"` // How many clusters should be created? Clusters uint16 `json:"clusters"` // Where to store the manifests for collaboration? Git Git `json:"git"` // Whom to contact by Let's Encrypt LetsEncryptEmail string `json:"letsEncryptEmail"` Tutorials Tutorials `json:"tutorials"` ClusterLogin ClusterLogin `json:"clusterLogin"` NodeGroups []NodeGroup `json:"nodeGroups"` }
type Git ¶
type Git struct { // Repo specifies where the "infra" git repo should be Repo string `json:"repo"` RepoStruct gitprovider.UserRepositoryRef `json:"-"` // The ServiceAccount struct is embedded and inlined into this struct ServiceAccount `json:",inline"` }
type Provider ¶
type Provider struct { // Name of the provider. For now, only "digitalocean" is supported. Name string `json:"name"` // The ServiceAccount struct is embedded and inlined into the provider ServiceAccount `json:",inline"` // Provider-specific data ProviderSpecific map[string]string `json:"providerSpecific,omitempty"` }
type ServiceAccount ¶
type ServiceAccount struct { // ServiceAccountPath specifies the file path to the service account ServiceAccountPath string `json:"serviceAccountPath"` // The contents of ServiceAccountPath, read at runtime and never marshalled. ServiceAccountContent string `json:"-"` }
func (ServiceAccount) TokenSource ¶
func (sa ServiceAccount) TokenSource() oauth2.TokenSource
If the ServiceAccount is an oauth2 token, this helper method might be useful for the implementing provider
Click to show internal directories.
Click to hide internal directories.