Documentation
¶
Index ¶
Constants ¶
View Source
const ( EnvNameAWSAccessKey = "AWS_ACCESS_KEY_ID" EnvNameAWSSecretKey = "AWS_SECRET_ACCESS_KEY" EnvNameAWSSessionToken = "AWS_SESSION_TOKEN" EnvNameAWSRegion = "AWS_REGION" EnvNameAWSB64EcodedCredentials = "AWS_B64ENCODED_CREDENTIALS" EnvNameHCloudToken = "HCLOUD_TOKEN" EnvNameRobotUser = "ROBOT_USER" EnvNameRobotPassword = "ROBOT_PASSWORD" EnvNameKubeconfig = "KUBECONFIG" )
Environment variable names.
View Source
const ( FlagNameDebug = "debug" FlagNameK8sVersion = "k8s-version" FlagNameManagementClusterName = "management-cluster-name" FlagNameManagementClusterNameDefaultValue = "management-cluster" FlagNameConfigsDirectoy = "configs-directory" FlagNameSkipMonitoringSetup = "skip-monitoring-setup" FlagNameSkipKubePrometheusBuild = "skip-kube-prometheus-build" FlagNameSkipPRFlow = "skip-pr-flow" FlagNameSkipClusterctlMove = "skip-clusterctl-move" FlagNameAWSAccessKeyID = "aws-access-key-id" FlagNameAWSSecretAccessKey = "aws-secret-access-key" FlagNameAWSSessionToken = "aws-session-token" FlagNameAWSRegion = "aws-region" FlagNameAMIID = "ami-id" FlagNameAzureClientSecret = "azure-client-secret" FlagNameImageID = "image-id" FlagNameHetznerAPIToken = "hetzner-cloud-api-token" FlagNameHetznerRobotUsername = "hetzner-robot-username" FlagNameHetznerRobotPassword = "hetzner-robot-password" )
CLI flags.
View Source
const ( KubeAPIServerFlagAuditPolicyFile = "audit-policy-file" KubeAPIServerFlagAuditLogPath = "audit-log-path" )
Kube API server CLI flags.
View Source
const ( CloudProviderAWS = "aws" CloudProviderHetzner = "hetzner" CloudProviderAzure = "azure" CloudProviderLocal = "local" )
Cloud providers.
View Source
const ( NamespaceArgoCD = "argocd" ReleaseNameArgoCD = "argocd" ArgoCDProjectKubeAid = "kubeaid" // Apps. ArgoCDAppRoot = "root" ArgoCDAppCapiCluster = "capi-cluster" ArgoCDAppHetznerRobot = "hetzner-robot" ArgoCDAppClusterAutoscaler = "cluster-autoscaler" ArgoCDAppVelero = "velero" ArgoCDAppKubePrometheus = "kube-prometheus" ArgoCDExternalSnapshotter = "external-snapshotter" )
ArgoCD.
View Source
const ( BlobContainerNameOIDCProvider = "oidc-provider" AzureBlobNameOpenIDConfiguration = ".well-known/openid-configuration" AzureBlobNameJWKSDocument = "openid/v1/jwks" // Grants full access to manage all resources, but does not allow you to assign roles in Azure // RBAC, manage assignments in Azure Blueprints, or share image galleries. AzureRoleIDContributor = "b24988ac-6180-42a0-ab88-20f7382dd24c" // Provides full access to Azure Storage blob containers and data, including assigning POSIX // access control. AzureRoleIDStorageBlobDataOwner = "b7e6dc6d-f1e8-4753-8033-0f276bb0955b" AzureResponseStatusCodeResourceAlreadyExists = 409 UAMIClusterAPI = "cluster-api" UAMIVelero = "velero" UAMISealedSecretsBackuper = "sealed-secrets-backuper" )
Azure
View Source
const ( // Namespaces. NamespaceVelero = "velero" NamespaceSealedSecrets = "sealed-secrets" // Service Accounts. ServiceAccountCAPZ = "capz-manager" ServiceAccountASO = "azureserviceoperator-default" ServiceAccountVelero = "velero" ServiceAccountSealedSecrets = "sealed-secrets" )
View Source
const ( FileNameGeneralConfig = "general.yaml" FileNameSecretsConfig = "secrets.yaml" RepoURLObmondoKubeAid = "https://github.com/Obmondo/KubeAid" ClusterTypeManagement = "management" ClusterTypeMain = "main" SSHPublicKeyPrefixOpenSSH = "ssh-rsa " SSHPublicKeyPrefixPEM = "-----BEGIN PUBLIC KEY-----" GzippedFilenameSuffix = ".gz" )
Miscellaneous.
View Source
const ( TemplateNameK3DConfig = "templates/k3d.config.yaml.tmpl" // For KubePrometheus. TemplateNameKubePrometheusArgoCDApp = "argocd-apps/templates/kube-prometheus.yaml.tmpl" TemplateNameKubePrometheusVars = "cluster-vars.jsonnet.tmpl" )
Miscallaneous.
Variables ¶
View Source
var ( OutputDirectory = "./outputs" OutputPathGeneratedConfigsDirectory = path.Join(OutputDirectory, "configs/") OutputPathGeneratedGeneralConfigFile = path.Join( OutputPathGeneratedConfigsDirectory, FileNameGeneralConfig, ) OutputPathGeneratedSecretsConfigFile = path.Join( OutputPathGeneratedConfigsDirectory, FileNameSecretsConfig, ) OutputPathLogFile = path.Join(OutputDirectory, ".log") OutputPathManagementClusterK3DConfig = path.Join(OutputDirectory, "k3d.config.yaml") OutputPathManagementClusterHostKubeconfig = path.Join( OutputDirectory, "kubeconfigs/clusters/management/host.yaml", ) OutputPathManagementClusterContainerKubeconfig = path.Join( OutputDirectory, "kubeconfigs/clusters/management/container.yaml", ) OutputPathMainClusterKubeconfig = path.Join(OutputDirectory, "kubeconfigs/clusters/main.yaml") OutputPathJWKSDocument = path.Join( OutputDirectory, "workload-identity/openid-provider/jwks.json", ) )
Output paths.
View Source
var ( CommonNonSecretTemplateNames = []string{ "kubeaid-bootstrap-script.general.yaml.tmpl", "argocd-apps/templates/argocd.yaml.tmpl", "argocd-apps/values-argocd.yaml.tmpl", "argocd-apps/Chart.yaml", "argocd-apps/templates/root.yaml.tmpl", "argocd-apps/templates/cert-manager.yaml.tmpl", "argocd-apps/values-cert-manager.yaml.tmpl", "argocd-apps/templates/sealed-secrets.yaml.tmpl", "argocd-apps/values-sealed-secrets.yaml.tmpl", "argocd-apps/templates/secrets.yaml.tmpl", } CommonSecretTemplateNames = []string{ "sealed-secrets/argocd/kubeaid-config.yaml.tmpl", } )
Common template names.
View Source
var ( AWSSpecificNonSecretTemplateNames = []string{ "argocd-apps/templates/ccm-aws.yaml.tmpl", "argocd-apps/values-ccm-aws.yaml.tmpl", } AWSSpecificSecretTemplateNames = []string{ "sealed-secrets/capi-cluster/cloud-credentials.yaml.tmpl", } AWSDisasterRecoverySpecificNonSecretTemplateNames = []string{ "argocd-apps/templates/kube2iam.yaml.tmpl", "argocd-apps/values-kube2iam.yaml.tmpl", "argocd-apps/templates/velero.yaml.tmpl", "argocd-apps/values-velero.yaml.tmpl", "argocd-apps/templates/k8s-configs.yaml.tmpl", "k8s-configs/sealed-secrets.namespace.yaml.tmpl", "k8s-configs/velero.namespace.yaml.tmpl", } )
AWS specific template names.
View Source
var ( TemplateNameOpenIDConfig = "templates/openid-configuration.json.tmpl" AzureSpecificNonSecretTemplateNames = []string{ "argocd-apps/templates/ccm-azure.yaml.tmpl", "argocd-apps/values-ccm-azure.yaml.tmpl", "argocd-apps/templates/azuredisk-csi-driver.yaml.tmpl", "argocd-apps/values-azuredisk-csi-driver.yaml.tmpl", "argocd-apps/templates/azure-workload-identity-webhook.yaml.tmpl", "argocd-apps/values-azure-workload-identity-webhook.yaml.tmpl", } AzureSpecificSecretTemplateNames = []string{ "sealed-secrets/capi-cluster/service-account-issuer-keys.yaml.tmpl", } AzureDisasterRecoverySpecificNonSecretTemplateNames = []string{ "argocd-apps/templates/velero.yaml.tmpl", "argocd-apps/values-velero.yaml.tmpl", } AzureDisasterRecoverySpecificSecretTemplateNames = []string{ "sealed-secrets/sealed-secrets/backup-sealed-secrets-pod-env.yaml.tmpl", } )
Azure specific template names.
View Source
var ( HCloudSpecificNonSecretTemplateNames = []string{ "argocd-apps/templates/ccm-hetzner.yaml.tmpl", "argocd-apps/values-ccm-hetzner.yaml.tmpl", "argocd-apps/templates/hcloud-csi-driver.yaml.tmpl", "argocd-apps/values-hcloud-csi-driver.yaml.tmpl", } HCloudSpecificSecretTemplateNames = []string{ "sealed-secrets/kube-system/cloud-credentials.yaml.tmpl", "sealed-secrets/capi-cluster/cloud-credentials.yaml.tmpl", } )
Hetzner specific template names.
View Source
var ( TemplateNameAWSGeneralConfig = "files/templates/aws.general.config.yaml.tmpl" TemplateNameAWSSecretsConfig = "files/templates/aws.secrets.config.yaml.tmpl" TemplateNameAzureGeneralConfig = "files/templates/azure.general.config.yaml.tmpl" TemplateNameAzureSecretsConfig = "files/templates/azure.secrets.config.yaml.tmpl" TemplateNameHetznerGeneralConfig = "files/templates/hetzner.general.config.yaml.tmpl" TemplateNameHetznerSecretsConfig = "files/templates/hetzner.secrets.config.yaml.tmpl" TemplateNameLocalGeneralConfig = "files/templates/local.general.config.yaml.tmpl" TemplateNameLocalSecretsConfig = "files/templates/local.secrets.config.yaml.tmpl" )
Config template names.
View Source
var (
CommonCloudNonSecretTemplateNames = []string{
"argocd-apps/templates/cilium.yaml.tmpl",
"argocd-apps/values-cilium.yaml.tmpl",
"argocd-apps/templates/cluster-api.yaml.tmpl",
"argocd-apps/values-cluster-api.yaml.tmpl",
"argocd-apps/templates/capi-cluster.yaml.tmpl",
"argocd-apps/values-capi-cluster.yaml.tmpl",
"argocd-apps/templates/cluster-autoscaler.yaml.tmpl",
"argocd-apps/values-cluster-autoscaler.yaml.tmpl",
"argocd-apps/templates/external-snapshotter.yaml.tmpl",
}
)
Common template names (for clusters being provisioned in any of the supported cloud providers).
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.