Skip to content

tagesspiegel/terraform-metakube-cluster

Repository files navigation

Terraform Metakube Cluster

This module creates a Kubernetes cluster on Metakube. It uses the metakube-provider to create the cluster.

Requirements

Name Version
kubernetes 2.27.0
metakube 5.2.4

Providers

Name Version
kubernetes 2.27.0
metakube 5.2.4

Modules

No modules.

Resources

Name Type
kubernetes_cluster_role_binding_v1.argod resource
kubernetes_cluster_role_v1.argod resource
kubernetes_namespace.argod resource
kubernetes_priority_class_v1.this resource
kubernetes_secret_v1.argod resource
kubernetes_service_account_v1.argod resource
metakube_cluster.this resource
metakube_cluster_role_binding.this resource
metakube_node_deployment.this resource
kubernetes_secret_v1.argod data source
metakube_k8s_version.cluster data source

Inputs

Name Description Type Default Required
additional_priority_classes Additional priority classes to create. In form name -> value map(number) {} no
argocd_daemon_enabled Create a dedicated ArgoCD daemon namespace and service account for the cluster. bool false no
argocd_daemon_name Name of the ArgoCD daemon namespace. string "argo-daemon" no
cidr_ranges All different CIDR ranges for the different needed IP ranges for a cluster
object({
services_cidr = string
pods_cidr = string
})
{
"pods_cidr": "10.0.0.0/16",
"services_cidr": "10.240.0.0/16"
}
no
cluster_name Name of the created cluster (must be unique per Metakube project) string n/a yes
cluster_rbac The RBAC configuration for the cluster. The key is the name of the cluster role and the value is a list of subjects.
map(list(object({
kind = string
name = string
})))
n/a yes
cluster_update_window The update window for the cluster. If set to null, no update window will be set.
object({
start = string
length = string
})
null no
dc_name Datacenter name at SysEleven (DBl, ...) string "syseleven-dbl1" no
default_priority_classes_enabled Enable the creation of the default priority classes. If set to false, the default priority classes will not be created. Default priority classes are: ingress-critical (100000000), monitoring-critical (99900000), logging-critical (99800000), platform-critical (99700000) bool true no
k8s_version Version of the created K8s Cluster (see available version in Metakube)
object({
major = number
minor = number
patch = optional(number)
})
{
"major": 1,
"minor": 28
}
no
metakube_project_id The ID of the metakube project string n/a yes
node_pools List all node pools that should be created in the cluster
map(object({
replicas = object({
min = number
max = number
})
labels = optional(map(string))
os_config = object({
image = string
auto_update = bool
})
node_config = object({
flavor = string
use_floating_ip = bool
})
taints = optional(list(object({
key = string
value = string
effect = string
})))
}))
n/a yes
openstack_application_credential_id The OpenStack application credential ID to use for the metakube cluster string n/a yes
openstack_application_credential_secret The OpenStack application credential to use for the metakube cluster string n/a yes
openstack_network_config The network configuration for the metakube cluster. Either network_name or subnet_id or subnet_cidr must be set.
object({
network_name = optional(string)
subnet_id = optional(string)
subnet_cidr = optional(string)
})
n/a yes
syseleven_auth_realm The realm to use for the syseleven auth string n/a yes

Outputs

Name Description
argo_daemon_service_account_token The ArgoCD daemon service account token
kube_config The kubeconfig for the metakube cluster (admin config).
kube_config_ca_certificate The Kubernetes cluster CA data
kube_config_host The Kubernetes cluster server address
kube_config_token The Kubernetes cluster user token
kube_config_username The Kubernetes cluster user name
metakube_cluster_id The ID of the metakube cluster