Documentation
¶
Index ¶
Constants ¶
View Source
const ( KindFluxVersion = "2.2.2" FluxNamespace = "flux-system" // https://github.blog/changelog/2022-01-18-githubs-ssh-host-keys-are-now-published-in-the-api/ // curl -H "Accept: application/vnd.github.v3+json" -s https://api.github.com/meta | jq -r '.ssh_keys' // select the one that starts with "ecdsa-sha2-nistp256" GithubKnownHosts = "" /* 171-byte string literal not displayed */ // Cluster names and contexts // CURRENT NAME CLUSTER AUTHINFO NAMESPACE // cluster-mgmt-admin@cluster-mgmt cluster-mgmt cluster-mgmt-admin // kind-tmp-mgmt kind-tmp-mgmt kind-tmp-mgmt DefaultKindClusterName = "tmp-mgmt" DefaultKindClusterCtxName = "kind-tmp-mgmt" DefaultCAPIClusterNameTpl = "cluster-{{.Name}}" DefaultCAPIContextNameTpl = "cluster-{{.Name}}-admin@cluster-{{.Name}}" )
Variables ¶
View Source
var ProjectNamespaces = []string{FluxNamespace, "caaph-system"}
Functions ¶
This section is empty.
Types ¶
type ClusterConfig ¶
type ClusterConfig struct { Name string `mapstructure:"name"` Provider string `mapstructure:"provider"` KubernetesVersion string `mapstructure:"kubernetesVersion"` PodCIDR string `mapstructure:"podCIDR"` ManagementCluster string `mapstructure:"managementCluster"` Flux FluxConfig `mapstructure:"flux"` CNI CNIConfig `mapstructure:"cni"` AWS AWSConfig `mapstructure:"aws"` }
func GetCapiClusterConfig ¶
func GetCapiClusterConfig(clusterName string) ClusterConfig
TODO - this is a terrible terrible name. "ClusterConfig" here comes from the config of this app, but this misleading because CAPI client also has a config file TODO - also we might want to store the clusterName and context name inside this config instead of keeping it in stray variables and passing around.
type Config ¶
type Config struct { Clusters []ClusterConfig Github GithubConfig `mapstructure:"github"` KubeconfigPath string `mapstructure:"kubeconfigPath"` }
func LoadConfig ¶
type FluxConfig ¶
type GithubConfig ¶
type GithubConfig struct { User string `mapstructure:"user"` Branch string `mapstructure:"branch"` RepoName string `mapstructure:"repoName"` URL string GithubKnownHosts string }
TODO - URL and GithubKnownHosts are not expected to be provided by the user Is there a pattern to manage a data type where fields exposed to the user while others are used by other packages in the app, but preset with calculated const or default values
Click to show internal directories.
Click to hide internal directories.