example(edge): basic example on how to deploy edge #62

Open
mauritz.uphoff wants to merge 1 commit from example/stec-example into main

Description

Checklist

  • The CI pipeline passed successfully.
## Description <!-- **Please link some issue here describing what you are trying to achieve.** --> ## Checklist - [ ] The CI pipeline passed successfully.
example(edge): basic example on how to deploy edge
All checks were successful
Default CI / Check for Open TODOs (pull_request) Successful in 44s
AI PR Review / AI PR Review (pull_request) Successful in 44s
Default CI / Pre-Commit Hooks (pull_request) Successful in 2m4s
6346716698

πŸ€– AI PR Review

Reviewing changes up to 63467166

πŸ“ Spelling & Grammar

βœ… No spelling or grammar issues found.

πŸ—οΈ Infrastructure Changes
  • Creates STACKIT provider configuration with beta resources enabled
  • Defines variables for project, region, service account, STEC plan, cluster config, and node specs
  • Sets up STEC management instance, kubeconfig, and token resources
  • Creates a routed network with DNS servers and security group with full TCP/UDP egress/ingress rules
  • Pre-creates network interfaces for control plane and worker nodes
  • Uses local-exec to generate Talos image via script, then reads resulting image ID
  • Provisions control plane and worker VMs using the generated image and pre-created NICs
  • Applies EdgeCluster CRD via script after VMs register as EdgeHosts
  • Exposes outputs for STEC UI, kubeconfigs, and talosconfig

⚠️ Destructive: All resources are new and will be created β€” no deletions or replacements. No safer alternative needed.

πŸ”’ Security Review

βœ… No security issues found.

πŸ“ Example Consistency

βœ… Example follows repository conventions.

πŸ“š Example README

βœ… Example READMEs are complete.

πŸ“š Module Variable & Output Coverage

No relevant changes to review.

πŸ’¬ Commit Messages

βœ… Commit messages are descriptive.


Generated automatically β€” treat as a hint, not a gate.

## πŸ€– AI PR Review > Reviewing changes up to [`63467166`](https://professional-service.git.onstackit.cloud/professional-service-best-practices/professional-service/commit/6346716698bc75a88b651e08f6d7af35ace8374d) <details> <summary>πŸ“ Spelling & Grammar</summary> βœ… No spelling or grammar issues found. </details> <details> <summary>πŸ—οΈ Infrastructure Changes</summary> - Creates STACKIT provider configuration with beta resources enabled - Defines variables for project, region, service account, STEC plan, cluster config, and node specs - Sets up STEC management instance, kubeconfig, and token resources - Creates a routed network with DNS servers and security group with full TCP/UDP egress/ingress rules - Pre-creates network interfaces for control plane and worker nodes - Uses local-exec to generate Talos image via script, then reads resulting image ID - Provisions control plane and worker VMs using the generated image and pre-created NICs - Applies EdgeCluster CRD via script after VMs register as EdgeHosts - Exposes outputs for STEC UI, kubeconfigs, and talosconfig ⚠️ Destructive: All resources are new and will be created β€” no deletions or replacements. No safer alternative needed. </details> <details> <summary>πŸ”’ Security Review</summary> βœ… No security issues found. </details> <details> <summary>πŸ“ Example Consistency</summary> βœ… Example follows repository conventions. </details> <details> <summary>πŸ“š Example README</summary> βœ… Example READMEs are complete. </details> <details> <summary>πŸ“š Module Variable & Output Coverage</summary> _No relevant changes to review._ </details> <details> <summary>πŸ’¬ Commit Messages</summary> βœ… Commit messages are descriptive. </details> --- _Generated automatically β€” treat as a hint, not a gate._
mauritz.uphoff force-pushed example/stec-example from 6346716698 to 4974afe494 2026-08-17 07:24:09 +00:00 Compare

πŸ€– AI PR Review

Reviewing changes up to 4974afe4

πŸ“ Spelling & Grammar

βœ… No spelling or grammar issues found.

πŸ—οΈ Infrastructure Changes
  • Creates STACKIT provider configuration with beta resources enabled
  • Defines variables for STACKIT project, region, service account, and cluster parameters
  • ⚠️ Creates STEC management instance and associated kubeconfig/token resources
  • Creates network with security groups and egress/ingress rules for cluster nodes
  • Creates network interfaces for control plane and worker nodes
  • Generates Talos image via local-exec script and uploads to STACKIT IaaS
  • Creates control plane and worker VMs using the generated Talos image
  • Applies EdgeCluster CRD via local-exec script to form Kubernetes cluster
  • Exposes outputs for STEC UI, kubeconfigs, and talosconfig
# For safer STEC instance management, consider using a lifecycle block to prevent accidental deletion:
resource "stackit_edgecloud_instance" "this" {
  project_id   = var.stackit_project_id
  display_name = var.stec_instance_name
  plan_id      = var.stec_plan_id

  lifecycle {
    prevent_destroy = true
  }
}
πŸ”’ Security Review

βœ… No security issues found.

πŸ“ Example Consistency

βœ… Example follows repository conventions.

πŸ“š Example README

βœ… Example READMEs are complete.

πŸ“š Module Variable & Output Coverage

No relevant changes to review.

πŸ’¬ Commit Messages

βœ… Commit messages are descriptive.


Generated automatically β€” treat as a hint, not a gate.

## πŸ€– AI PR Review > Reviewing changes up to [`4974afe4`](https://professional-service.git.onstackit.cloud/professional-service-best-practices/professional-service/commit/4974afe494df1beebb03848f7401cd55f2737fea) <details> <summary>πŸ“ Spelling & Grammar</summary> βœ… No spelling or grammar issues found. </details> <details> <summary>πŸ—οΈ Infrastructure Changes</summary> - Creates STACKIT provider configuration with beta resources enabled - Defines variables for STACKIT project, region, service account, and cluster parameters - ⚠️ Creates STEC management instance and associated kubeconfig/token resources - Creates network with security groups and egress/ingress rules for cluster nodes - Creates network interfaces for control plane and worker nodes - Generates Talos image via local-exec script and uploads to STACKIT IaaS - Creates control plane and worker VMs using the generated Talos image - Applies EdgeCluster CRD via local-exec script to form Kubernetes cluster - Exposes outputs for STEC UI, kubeconfigs, and talosconfig ```hcl # For safer STEC instance management, consider using a lifecycle block to prevent accidental deletion: resource "stackit_edgecloud_instance" "this" { project_id = var.stackit_project_id display_name = var.stec_instance_name plan_id = var.stec_plan_id lifecycle { prevent_destroy = true } } ``` </details> <details> <summary>πŸ”’ Security Review</summary> βœ… No security issues found. </details> <details> <summary>πŸ“ Example Consistency</summary> βœ… Example follows repository conventions. </details> <details> <summary>πŸ“š Example README</summary> βœ… Example READMEs are complete. </details> <details> <summary>πŸ“š Module Variable & Output Coverage</summary> _No relevant changes to review._ </details> <details> <summary>πŸ’¬ Commit Messages</summary> βœ… Commit messages are descriptive. </details> --- _Generated automatically β€” treat as a hint, not a gate._
@ -0,0 +27,4 @@
# --- EdgeImage CRD ----------------------------------------------------------
>&2 echo "==> Applying EdgeImage '${IMAGE_NAME}'..."

This could be done with the Kubernetes Terraform provider and only do the download in the shell script

This could be done with the Kubernetes Terraform provider and only do the download in the shell script
@ -0,0 +58,4 @@
# --- Create EdgeCluster ------------------------------------------------------
MANIFEST=$(mktemp)
cat > "${MANIFEST}" <<YAML

This could be done with the Kubernetes Terraform provider and only do the waiting in the shell script

This could be done with the Kubernetes Terraform provider and only do the waiting in the shell script
Author
Owner

I had the same idea. But I've only run into issues due to the fact that terraform is unable to poll an arbitrary CRD status field and block until a condition is met. Replacing it with the Kubernetes provider would require keeping the wait logic anyway (in null_resource), giving you more moving parts and worse error messages for no real gain.

I had the same idea. But I've only run into issues due to the fact that terraform is unable to poll an arbitrary CRD status field and block until a condition is met. Replacing it with the Kubernetes provider would require keeping the wait logic anyway (in null_resource), giving you more moving parts and worse error messages for no real gain.
dominik.lembke marked this conversation as resolved
All checks were successful
Default CI / Check for Open TODOs (pull_request) Successful in 43s
AI PR Review / AI PR Review (pull_request) Successful in 50s
Default CI / Pre-Commit Hooks (pull_request) Successful in 2m34s
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin example/stec-example:example/stec-example
git switch example/stec-example

Merge

Merge the changes and update on STACKIT Git.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff example/stec-example
git switch example/stec-example
git rebase main
git switch main
git merge --ff-only example/stec-example
git switch example/stec-example
git rebase main
git switch main
git merge --no-ff example/stec-example
git switch main
git merge --squash example/stec-example
git switch main
git merge --ff-only example/stec-example
git switch main
git merge example/stec-example
git push origin main
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
professional-service-best-practices/professional-service!62
No description provided.