Documentation
¶
Overview ¶
Copyright (C) 2021-2023, Kubefirst
This program is licensed under MIT. See the LICENSE file for more details.
Copyright (C) 2021-2023, Kubefirst ¶
This program is licensed under MIT. See the LICENSE file for more details.
Copyright (C) 2021-2023, Kubefirst ¶
This program is licensed under MIT. See the LICENSE file for more details.
Copyright (C) 2021-2023, Kubefirst ¶
This program is licensed under MIT. See the LICENSE file for more details.
Copyright (C) 2021-2023, Kubefirst ¶
This program is licensed under MIT. See the LICENSE file for more details.
Copyright (C) 2021-2023, Kubefirst ¶
This program is licensed under MIT. See the LICENSE file for more details.
Index ¶
- type AWSAuth
- type AkamaiAuth
- type AzureAuth
- type CivoAuth
- type CloudDefault
- type CloudProviderDefaults
- type CloudflareAuth
- type Cluster
- type ClusterDefinition
- type ClusterServiceList
- type DigitaloceanAuth
- type Environment
- type EvalSSHKeyRequest
- type GitAuth
- type GitopsCatalogApp
- type GitopsCatalogAppCreateRequest
- type GitopsCatalogAppDeleteRequest
- type GitopsCatalogAppKeys
- type GitopsCatalogAppValidateRequest
- type GitopsCatalogApps
- type GoogleAuth
- type K3sAuth
- type ProxyImportRequest
- type ProxyRequest
- type PushBucketObject
- type SecretListReference
- type Service
- type StateStoreCredentials
- type StateStoreDetails
- type VaultAuth
- type VultrAuth
- type WorkloadCluster
- type WorkloadClusterSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSAuth ¶
type AWSAuth struct {
AccessKeyID string `bson:"access_key_id" json:"access_key_id"`
SecretAccessKey string `bson:"secret_access_key" json:"secret_access_key"`
SessionToken string `bson:"session_token" json:"session_token"`
}
AWSAuth holds necessary auth credentials for interacting with aws
type AkamaiAuth ¶
type AkamaiAuth struct {
Token string `bson:"token" json:"token"`
}
AkamaiAuth holds necessary auth credentials for interacting with civo
type AzureAuth ¶ added in v0.115.0
type AzureAuth struct {
ClientID string `bson:"client_id" json:"client_id"`
ClientSecret string `bson:"client_secret" json:"client_secret"`
TenantID string `bson:"tenant_id" json:"tenant_id"`
SubscriptionID string `bson:"subscription_id" json:"subscription_id"`
}
AzureAuth holds necessary auth credentials for interacting with azure
func (*AzureAuth) ValidateAuthCredentials ¶ added in v0.120.0
type CivoAuth ¶
type CivoAuth struct {
Token string `bson:"token" json:"token"`
}
CivoAuth holds necessary auth credentials for interacting with civo
type CloudDefault ¶
type CloudProviderDefaults ¶
type CloudProviderDefaults struct {
Akamai CloudDefault `json:"akamai"`
Aws CloudDefault `json:"aws"`
Azure CloudDefault `json:"azure"`
Civo CloudDefault `json:"civo"`
DigitalOcean CloudDefault `json:"do"`
Google CloudDefault `json:"google"`
Vultr CloudDefault `json:"vultr"`
K3d CloudDefault `json:"k3d"`
}
type CloudflareAuth ¶
type CloudflareAuth struct {
Token string `bson:"token" json:"token"` // DEPRECATED: please transition to APIToken
APIToken string `bson:"api_token" json:"api_token"`
OriginCaIssuerKey string `bson:"origin_ca_issuer_key" json:"origin_ca_issuer_key"`
}
CloudflareAuth holds necessary auth credentials for interacting with vultr
type Cluster ¶
type Cluster struct {
ID primitive.ObjectID `bson:"_id" json:"_id"`
CreationTimestamp string `bson:"creation_timestamp" json:"creation_timestamp"`
// Status
Status string `bson:"status" json:"status"`
LastCondition string `bson:"last_condition" json:"last_condition"`
InProgress bool `bson:"in_progress" json:"in_progress"`
// Identifiers
AlertsEmail string `bson:"alerts_email" json:"alerts_email"`
CloudProvider string `bson:"cloud_provider" json:"cloud_provider"`
CloudRegion string `bson:"cloud_region" json:"cloud_region"`
ClusterName string `bson:"cluster_name" json:"cluster_name"`
ClusterID string `bson:"cluster_id" json:"cluster_id"`
ClusterType string `bson:"cluster_type" json:"cluster_type"`
DomainName string `bson:"domain_name" json:"domain_name"`
SubdomainName string `bson:"subdomain_name" json:"subdomain_name,omitempty"`
DNSProvider string `bson:"dns_provider" json:"dns_provider"`
PostInstallCatalogApps []GitopsCatalogApp `bson:"post_install_catalog_apps,omitempty" json:"post_install_catalog_apps,omitempty"`
// Auth
AkamaiAuth AkamaiAuth `bson:"akamai_auth,omitempty" json:"akamai_auth,omitempty"`
AWSAuth AWSAuth `bson:"aws_auth,omitempty" json:"aws_auth,omitempty"`
AzureAuth AzureAuth `json:"azure_auth,omitempty"`
CivoAuth CivoAuth `bson:"civo_auth,omitempty" json:"civo_auth,omitempty"`
DigitaloceanAuth DigitaloceanAuth `bson:"do_auth,omitempty" json:"do_auth,omitempty"`
VultrAuth VultrAuth `bson:"vultr_auth,omitempty" json:"vultr_auth,omitempty"`
CloudflareAuth CloudflareAuth `bson:"cloudflare_auth,omitempty" json:"cloudflare_auth,omitempty"`
GitAuth GitAuth `bson:"git_auth,omitempty" json:"git_auth,omitempty"`
VaultAuth VaultAuth `bson:"vault_auth,omitempty" json:"vault_auth,omitempty"`
GoogleAuth GoogleAuth `bson:"google_auth,omitempty" json:"google_auth,omitempty"`
K3sAuth K3sAuth `bson:"k3s_auth,omitempty" json:"k3s_auth,omitempty"`
GitopsTemplateURL string `bson:"gitops_template_url" json:"gitops_template_url"`
GitopsTemplateBranch string `bson:"gitops_template_branch" json:"gitops_template_branch"`
GitProvider string `bson:"git_provider" json:"git_provider"`
GitProtocol string `bson:"git_protocol" json:"git_protocol"`
GitHost string `bson:"git_host" json:"git_host"`
GitlabOwnerGroupID int `bson:"gitlab_owner_group_id" json:"gitlab_owner_group_id"`
AtlantisWebhookSecret string `bson:"atlantis_webhook_secret" json:"atlantis_webhook_secret"`
AtlantisWebhookURL string `bson:"atlantis_webhook_url" json:"atlantis_webhook_url"`
KubefirstTeam string `bson:"kubefirst_team" json:"kubefirst_team"`
AMIType string `bson:"ami_type,omitempty" json:"ami_type,omitempty"`
NodeType string `bson:"node_type" json:"node_type" binding:"required"`
NodeCount int `bson:"node_count" json:"node_count" binding:"required"`
LogFileName string `bson:"log_file,omitempty" json:"log_file,omitempty"`
StateStoreCredentials StateStoreCredentials `bson:"state_store_credentials,omitempty" json:"state_store_credentials,omitempty"`
StateStoreDetails StateStoreDetails `bson:"state_store_details,omitempty" json:"state_store_details,omitempty"`
ArgoCDUsername string `bson:"argocd_username" json:"argocd_username"`
ArgoCDPassword string `bson:"argocd_password" json:"argocd_password"`
ArgoCDAuthToken string `bson:"argocd_auth_token" json:"argocd_auth_token"`
// Container Registry and Secrets
ECR bool `bson:"ecr" json:"ecr"`
// kms
AWSAccountID string `bson:"aws_account_id,omitempty" json:"aws_account_id,omitempty"`
AWSKMSKeyID string `bson:"aws_kms_key_id,omitempty" json:"aws_kms_key_id,omitempty"`
AWSKMSKeyDetokenizedCheck bool `bson:"aws_kms_key_detokenized_check" json:"aws_kms_key_detokenized_check"`
// Azure
AzureDNSZoneResourceGroup string `bson:"azure_dns_zone_resource_group,omitempty" json:"azure_dns_zone_resource_group,omitempty"`
// Telemetry
UseTelemetry bool `bson:"use_telemetry"`
// Checks
InstallKubefirstPro bool `bson:"install_kubefirst_pro,omitempty" json:"install_kubefirst_pro,omitempty"`
InstallToolsCheck bool `bson:"install_tools_check" json:"install_tools_check"`
DomainLivenessCheck bool `bson:"domain_liveness_check" json:"domain_liveness_check"`
StateStoreCredsCheck bool `bson:"state_store_creds_check" json:"state_store_creds_check"`
StateStoreCreateCheck bool `bson:"state_store_create_check" json:"state_store_create_check"`
GitInitCheck bool `bson:"git_init_check" json:"git_init_check"`
KbotSetupCheck bool `bson:"kbot_setup_check" json:"kbot_setup_check"`
GitopsReadyCheck bool `bson:"gitops_ready_check" json:"gitops_ready_check"`
GitTerraformApplyCheck bool `bson:"git_terraform_apply_check" json:"git_terraform_apply_check"`
GitopsPushedCheck bool `bson:"gitops_pushed_check" json:"gitops_pushed_check"`
CloudTerraformApplyCheck bool `bson:"cloud_terraform_apply_check" json:"cloud_terraform_apply_check"`
CloudTerraformApplyFailedCheck bool `bson:"cloud_terraform_apply_failed_check" json:"cloud_terraform_apply_failed_check"`
ClusterSecretsCreatedCheck bool `bson:"cluster_secrets_created_check" json:"cluster_secrets_created_check"`
ArgoCDInstallCheck bool `bson:"argocd_install_check" json:"argocd_install_check"`
ArgoCDInitializeCheck bool `bson:"argocd_initialize_check" json:"argocd_initialize_check"`
ArgoCDCreateRegistryCheck bool `bson:"argocd_create_registry_check" json:"argocd_create_registry_check"`
ArgoCDDeleteRegistryCheck bool `bson:"argocd_delete_registry_check" json:"argocd_delete_registry_check"`
VaultInitializedCheck bool `bson:"vault_initialized_check" json:"vault_initialized_check"`
VaultTerraformApplyCheck bool `bson:"vault_terraform_apply_check" json:"vault_terraform_apply_check"`
UsersTerraformApplyCheck bool `bson:"users_terraform_apply_check" json:"users_terraform_apply_check"`
FinalCheck bool `bson:"final_check" json:"final_check"`
WorkloadClusters []WorkloadCluster `bson:"workload_clusters,omitempty" json:"workload_clusters,omitempty"`
}
Cluster describes the configuration storage for a Kubefirst cluster object
type ClusterDefinition ¶
type ClusterDefinition struct {
// Cluster
AdminEmail string `json:"admin_email" binding:"required"`
CloudProvider string `json:"cloud_provider" binding:"required,oneof=akamai aws azure civo digitalocean google k3s vultr"`
CloudRegion string `json:"cloud_region" binding:"required"`
ClusterName string `json:"cluster_name,omitempty"`
DomainName string `json:"domain_name" binding:"required"`
SubdomainName string `json:"subdomain_name,omitempty"`
DNSProvider string `json:"dns_provider,omitempty" binding:"required"`
Type string `json:"type" binding:"required,oneof=mgmt workload"`
ForceDestroy bool `bson:"force_destroy,omitempty" json:"force_destroy,omitempty"`
NodeType string `json:"node_type" binding:"required"`
NodeCount int `json:"node_count" binding:"required"`
PostInstallCatalogApps []GitopsCatalogApp `bson:"post_install_catalog_apps,omitempty" json:"post_install_catalog_apps,omitempty"`
InstallKubefirstPro bool `bson:"install_kubefirst_pro,omitempty" json:"install_kubefirst_pro,omitempty"`
// Git
GitopsTemplateURL string `json:"gitops_template_url"`
GitopsTemplateBranch string `json:"gitops_template_branch"`
GitProvider string `json:"git_provider" binding:"required,oneof=github gitlab"`
GitProtocol string `json:"git_protocol" binding:"required,oneof=ssh https"`
// AWS
ECR bool `json:"ecr,omitempty"`
AMIType string `json:"ami_type" binding:"required_if=CloudProvider aws"`
// Azure
AzureDNSZoneResourceGroup string `json:"azure_dns_zone_resource_group,omitempty"`
// Auth
AkamaiAuth AkamaiAuth `json:"akamai_auth,omitempty"`
AWSAuth AWSAuth `json:"aws_auth,omitempty"`
AzureAuth AzureAuth `json:"azure_auth,omitempty"`
CivoAuth CivoAuth `json:"civo_auth,omitempty"`
DigitaloceanAuth DigitaloceanAuth `json:"do_auth,omitempty"`
VultrAuth VultrAuth `json:"vultr_auth,omitempty"`
CloudflareAuth CloudflareAuth `json:"cloudflare_auth,omitempty"`
GoogleAuth GoogleAuth `json:"google_auth,omitempty"`
K3sAuth K3sAuth `json:"k3s_auth,omitempty"`
GitAuth GitAuth `json:"git_auth,omitempty"`
LogFileName string `bson:"log_file,omitempty" json:"log_file,omitempty"`
}
ClusterDefinition describes an incoming request to create a cluster
type ClusterServiceList ¶
type ClusterServiceList struct {
ClusterName string `bson:"cluster_name" json:"cluster_name"`
Services []Service `bson:"services" json:"services"`
}
ClusterServiceList tracks services per cluster
type DigitaloceanAuth ¶
type DigitaloceanAuth struct {
Token string `bson:"token" json:"token"`
SpacesKey string `bson:"spaces_key" json:"spaces_key"`
SpacesSecret string `bson:"spaces_secret" json:"spaces_secret"`
}
DigitaloceanAuth holds necessary auth credentials for interacting with digitalocean
type Environment ¶
type Environment struct {
ID primitive.ObjectID `bson:"_id" json:"_id"`
Name string `bson:"name" json:"name"`
Color string `bson:"color" json:"color"`
Description string `bson:"description,omitempty" json:"description,omitempty"`
CreationTimestamp string `bson:"creation_timestamp" json:"creation_timestamp"`
}
type EvalSSHKeyRequest ¶
type GitAuth ¶
type GitAuth struct {
Token string `bson:"git_token,omitempty" json:"git_token,omitempty"`
User string `bson:"git_username,omitempty" json:"git_username,omitempty"`
Owner string `bson:"git_owner,omitempty" json:"git_owner,omitempty"`
PublicKey string `bson:"public_key,omitempty" json:"public_key,omitempty"`
PrivateKey string `bson:"private_key,omitempty" json:"private_key,omitempty"`
PublicKeys string `bson:"public_keys,omitempty" json:"public_keys,omitempty"`
}
Auth for Git Provider
type GitopsCatalogApp ¶
type GitopsCatalogApp struct {
Category string `bson:"category" json:"category" yaml:"category"`
ConfigKeys []GitopsCatalogAppKeys `bson:"config_keys" json:"config_keys" yaml:"configKeys"`
Description string `bson:"description" json:"description" yaml:"description"`
DisplayName string `bson:"display_name" json:"display_name" yaml:"displayName"`
ImageURL string `bson:"image_url" json:"image_url" yaml:"imageUrl"`
IsTemplate bool `bson:"is_template" json:"is_template" yaml:"is_template"`
Name string `bson:"name" json:"name" yaml:"name"`
SecretKeys []GitopsCatalogAppKeys `bson:"secret_keys" json:"secret_keys" yaml:"secretKeys"`
CloudDenylist []string `bson:"cloudDenylist" json:"cloudDenylist" yaml:"cloudDenylist"`
GitDenylist []string `bson:"gitDenylist" json:"gitDenylist" yaml:"gitDenylist"`
}
GitopsCatalogApp describes a Kubefirst gitops catalog application
type GitopsCatalogAppCreateRequest ¶
type GitopsCatalogAppCreateRequest struct {
IsTemplate bool `bson:"is_template" json:"is_template"`
User string `bson:"user" json:"user"`
SecretKeys []GitopsCatalogAppKeys `bson:"secret_keys,omitempty" json:"secret_keys,omitempty"`
ConfigKeys []GitopsCatalogAppKeys `bson:"config_keys,omitempty" json:"config_keys,omitempty"`
WorkloadClusterName string `bson:"workload_cluster_name" json:"workload_cluster_name"`
Environment string `bson:"environment" json:"environment"`
}
GitopsCatalogAppCreateRequest describes a request to create a service for a cluster based on a gitops catalog app
type GitopsCatalogAppKeys ¶
type GitopsCatalogAppKeys struct {
Name string `bson:"name" json:"name" yaml:"name"`
Label string `bson:"label,omitempty" json:"label,omitempty" yaml:"label,omitempty"`
Value string `bson:"value,omitempty" json:"value,omitempty" yaml:"value,omitempty"`
Env string `bson:"env,omitempty" json:"env,omitempty" yaml:"env,omitempty"`
}
GitopsCatalogAppSecretKey describes a required secret value when creating a service based on a gitops catalog app
type GitopsCatalogAppValidateRequest ¶
type GitopsCatalogAppValidateRequest struct {
CanDeleteService bool `bson:"can_delete_service" json:"can_delete_service"`
}
GitopsCatalogAppValidateRequest
type GitopsCatalogApps ¶
type GitopsCatalogApps struct {
Name string `bson:"name" json:"name" yaml:"name"`
Apps []GitopsCatalogApp `bson:"apps" json:"apps" yaml:"apps"`
}
GitopsCatalogApps lists all active gitops catalog app options
type GoogleAuth ¶
type K3sAuth ¶
type K3sAuth struct {
K3sServersPrivateIps []string `bson:"servers_private_ips,omitempty" json:"servers_private_ips,omitempty"`
K3sServersPublicIps []string `bson:"servers_public_ips,omitempty" json:"servers_public_ips,omitempty"`
K3sServersArgs []string `bson:"servers_args,omitempty" json:"servers_args,omitempty"`
K3sSSHUser string `bson:"ssh_user,omitempty" json:"ssh_user,omitempty"`
K3sSSHPrivateKey string `bson:"ssh_privatekey,omitempty" json:"ssh_privatekey,omitempty"`
}
type ProxyImportRequest ¶
type ProxyRequest ¶
type ProxyRequest struct {
URL string `bson:"url" json:"url"`
}
type PushBucketObject ¶
type PushBucketObject struct {
LocalFilePath string `json:"local_file_path"`
RemoteFilePath string `json:"remote_file_path"`
ContentType string `json:"content_type"`
}
PushBucketObject
type SecretListReference ¶
type SecretListReference struct {
Name string `bson:"name" json:"name"`
List []string `bson:"list" json:"list"`
}
AWSAuth holds necessary auth credentials for interacting with aws
type Service ¶
type Service struct {
Name string `bson:"name" json:"name"`
Default bool `bson:"default" json:"default"`
Description string `bson:"description" json:"description"`
Image string `bson:"image" json:"image"`
Links []string `bson:"links" json:"links"`
Status string `bson:"status" json:"status"`
CreatedBy string `bson:"created_by" json:"created_by"`
}
Service defines an individual cluster service
type StateStoreCredentials ¶
type StateStoreCredentials struct {
AccessKeyID string `bson:"access_key_id,omitempty" json:"access_key_id,omitempty"`
SecretAccessKey string `bson:"secret_access_key,omitempty" json:"secret_access_key,omitempty"`
SessionToken string `bson:"session_token,omitempty" json:"session_token,omitempty"`
Name string `bson:"name,omitempty" json:"name,omitempty"`
ID string `bson:"id,omitempty" json:"id,omitempty"`
}
StateStoreCredentials
type StateStoreDetails ¶
type StateStoreDetails struct {
Name string `bson:"name,omitempty" json:"name,omitempty"`
ID string `bson:"id,omitempty" json:"id,omitempty"`
Hostname string `bson:"hostname,omitempty" json:"hostname,omitempty"`
AWSStateStoreBucket string `bson:"aws_state_store_bucket,omitempty" json:"aws_state_store_bucket,omitempty"`
AWSArtifactsBucket string `bson:"aws_artifacts_bucket,omitempty" json:"aws_artifacts_bucket,omitempty"`
}
StateStoreDetails
type VultrAuth ¶
type VultrAuth struct {
Token string `bson:"token" json:"token"`
}
VultrAuth holds necessary auth credentials for interacting with vultr
type WorkloadCluster ¶
type WorkloadCluster struct {
AdminEmail string `bson:"admin_email,omitempty" json:"admin_email,omitempty"`
CloudProvider string `bson:"cloud_provider,omitempty" json:"cloud_provider,omitempty"`
ClusterID string `bson:"cluster_id,omitempty" json:"cluster_id,omitempty"`
ClusterName string `bson:"cluster_name,omitempty" json:"cluster_name,omitempty"`
ClusterType string `bson:"cluster_type,omitempty" json:"cluster_type,omitempty"`
CloudRegion string `bson:"cloud_region,omitempty" json:"cloud_region,omitempty"`
CreationTimestamp string `bson:"creation_timestamp" json:"creation_timestamp"`
DomainName string `bson:"domain_name,omitempty" json:"domain_name,omitempty"`
DNSProvider string `bson:"dns_provider,omitempty" json:"dns_provider,omitempty"`
Environment Environment `bson:"environment,omitempty" json:"environment,omitempty"`
GitAuth GitAuth `bson:"git_auth,omitempty" json:"git_auth,omitempty"`
InstanceSize string `bson:"instance_size,omitempty" json:"instance_size,omitempty"`
NodeType string `bson:"node_type,omitempty" json:"node_type,omitempty"`
NodeCount int `bson:"node_count,omitempty" json:"node_count,omitempty"`
Status string `bson:"status,omitempty" json:"status,omitempty"`
}
type WorkloadClusterSet ¶
type WorkloadClusterSet struct {
Clusters []WorkloadCluster `json:"clusters"`
}