Feat/stackittpr 196 ske improve acc test min/max config (#851)

* core(ske): first test working

* chore(ske): acceptance test min

* chore(ske): implement review findings
This commit is contained in:
Rüdiger Schmitz 2025-05-27 08:46:52 +02:00 committed by GitHub
parent d793342b76
commit 7d78a08263
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 521 additions and 332 deletions

View file

@ -0,0 +1,51 @@
variable "project_id" {}
variable "name" {}
variable "nodepool_availability_zone1" {}
variable "nodepool_machine_type" {}
variable "nodepool_maximum" {}
variable "nodepool_minimum" {}
variable "nodepool_name" {}
variable "kubernetes_version_min" {}
variable "maintenance_enable_kubernetes_version_updates" {}
variable "maintenance_enable_machine_image_version_updates" {}
variable "maintenance_start" {}
variable "maintenance_end" {}
variable "region" {}
resource "stackit_ske_cluster" "cluster" {
project_id = var.project_id
name = var.name
node_pools = [{
availability_zones = [var.nodepool_availability_zone1]
machine_type = var.nodepool_machine_type
maximum = var.nodepool_maximum
minimum = var.nodepool_minimum
name = var.nodepool_name
}
]
kubernetes_version_min = var.kubernetes_version_min
# even though the maintenance attribute is not mandatory,
# it is required for a consistent plan
# see https://jira.schwarz/browse/STACKITTPR-242
maintenance = {
enable_kubernetes_version_updates = var.maintenance_enable_kubernetes_version_updates
enable_machine_image_version_updates = var.maintenance_enable_machine_image_version_updates
start = var.maintenance_start
end = var.maintenance_end
}
region = var.region
}
resource "stackit_ske_kubeconfig" "kubeconfig" {
project_id = stackit_ske_cluster.cluster.project_id
cluster_name = stackit_ske_cluster.cluster.name
}
data "stackit_ske_cluster" "cluster" {
project_id = var.project_id
name = stackit_ske_cluster.cluster.name
}