Skip to content

Commit 3dd95c2

Browse files
committed
feat: initial scaffold with working ComputeServer
1 parent d3f5447 commit 3dd95c2

111 files changed

Lines changed: 6908 additions & 202 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [qaiser42]

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Bug report
2+
description: Something is broken or behaving unexpectedly.
3+
labels: ["bug", "needs-triage"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to file a bug report. Please redact any secrets or project IDs you don't want public.
9+
- type: input
10+
id: version
11+
attributes:
12+
label: stackit-nuke version
13+
description: Output of `stackit-nuke --version`
14+
placeholder: "v0.1.0"
15+
validations:
16+
required: true
17+
- type: input
18+
id: platform
19+
attributes:
20+
label: Platform
21+
placeholder: "linux/amd64, darwin/arm64, ghcr image, ..."
22+
validations:
23+
required: true
24+
- type: textarea
25+
id: what-happened
26+
attributes:
27+
label: What happened?
28+
description: Describe the buggy behavior. Logs at `--log-level=debug` are gold.
29+
validations:
30+
required: true
31+
- type: textarea
32+
id: expected
33+
attributes:
34+
label: What did you expect to happen?
35+
validations:
36+
required: true
37+
- type: textarea
38+
id: repro
39+
attributes:
40+
label: Steps to reproduce
41+
placeholder: |
42+
1. Config:
43+
```yaml
44+
...
45+
```
46+
2. Run: `stackit-nuke run --config config.yaml ...`
47+
3. Observe: ...
48+
validations:
49+
required: true
50+
- type: textarea
51+
id: extra
52+
attributes:
53+
label: Anything else?
54+
description: Stack traces, related issues, screenshots, etc.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Security report
4+
url: https://github.com/qaiser42/stackit-nuke/security/advisories/new
5+
about: Please report security vulnerabilities privately, not via issues.
6+
- name: Question / discussion
7+
url: https://github.com/qaiser42/stackit-nuke/discussions
8+
about: Ask questions in Discussions instead of opening an issue.

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Feature request
2+
description: Suggest a new feature or improvement.
3+
labels: ["enhancement", "needs-triage"]
4+
body:
5+
- type: textarea
6+
id: problem
7+
attributes:
8+
label: Problem
9+
description: What are you trying to do? What's blocking you today?
10+
validations:
11+
required: true
12+
- type: textarea
13+
id: proposal
14+
attributes:
15+
label: Proposed solution
16+
description: What would you like stackit-nuke to do? CLI shape, config shape, behavior.
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: alternatives
21+
attributes:
22+
label: Alternatives considered
23+
- type: checkboxes
24+
id: scope
25+
attributes:
26+
label: Scope
27+
options:
28+
- label: This is for a new resource type
29+
- label: This affects the CLI / config schema
30+
- label: This affects the engine (libnuke) — likely upstream
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: New resource type
2+
description: Request support for an additional STACKIT resource.
3+
labels: ["resource", "enhancement", "needs-triage"]
4+
body:
5+
- type: input
6+
id: service
7+
attributes:
8+
label: STACKIT service
9+
placeholder: "iaas, objectstorage, ske, postgresflex, dns, ..."
10+
validations:
11+
required: true
12+
- type: input
13+
id: resource
14+
attributes:
15+
label: Resource type
16+
placeholder: "Server, Volume, Bucket, Cluster, Zone, ..."
17+
validations:
18+
required: true
19+
- type: input
20+
id: sdk
21+
attributes:
22+
label: SDK package
23+
description: The Go SDK package that owns this resource.
24+
placeholder: "github.com/stackitcloud/stackit-sdk-go/services/iaas/v2api"
25+
- type: textarea
26+
id: list-delete
27+
attributes:
28+
label: List + Delete API endpoints
29+
placeholder: |
30+
List: GET /v2/projects/{projectId}/regions/{region}/servers
31+
Delete: DELETE /v2/projects/{projectId}/regions/{region}/servers/{serverId}
32+
- type: textarea
33+
id: notes
34+
attributes:
35+
label: Dependencies / notes
36+
description: Does this depend on other resources? Special preconditions before delete (detach, drain, empty)?

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!-- Thanks for contributing! Keep PRs focused — one resource or one concern per PR. -->
2+
3+
## What
4+
5+
<!-- One-line summary of the change. -->
6+
7+
## Why
8+
9+
<!-- Motivation: bug, missing resource, behavior fix, infra cleanup, ... -->
10+
11+
## How
12+
13+
<!-- Anything non-obvious about the implementation. SDK choices, edge cases handled, dependencies added. -->
14+
15+
## Checklist
16+
17+
- [ ] `make test` passes locally
18+
- [ ] `make lint` passes locally
19+
- [ ] New resource? Added to `realImpls` in `resources/registry_test.go` and has a per-resource test
20+
- [ ] New resource? Added a docs page under `docs/resources/` and a nav entry in `mkdocs.yml`
21+
- [ ] No AI attribution in the commit message (project policy)
22+
- [ ] Conventional Commits subject (`feat:`, `fix:`, `docs:`, ...)
23+
24+
## Tested against
25+
26+
<!-- e.g. "STACKIT project xxx-xxx in eu01 with N test servers; deletion confirmed" or "unit tests only" -->

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gomod
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
- package-ecosystem: github-actions
8+
directory: /
9+
schedule:
10+
interval: weekly

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: ci
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v5
17+
- uses: actions/setup-go@v6
18+
with:
19+
go-version: "1.26"
20+
- uses: golangci/golangci-lint-action@v6
21+
with:
22+
version: latest
23+
24+
test:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v5
28+
- uses: actions/setup-go@v6
29+
with:
30+
go-version: "1.26"
31+
- run: go mod download
32+
- run: go test -timeout 120s -race -cover ./...
33+
34+
build:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v5
38+
- uses: actions/setup-go@v6
39+
with:
40+
go-version: "1.26"
41+
- run: go build -o /tmp/stackit-nuke ./
42+
- run: /tmp/stackit-nuke --version

.github/workflows/docs.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "docs/**"
8+
- "mkdocs.yml"
9+
- ".github/workflows/docs.yml"
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
concurrency:
18+
group: pages
19+
cancel-in-progress: false
20+
21+
jobs:
22+
deploy:
23+
runs-on: ubuntu-latest
24+
environment:
25+
name: github-pages
26+
url: ${{ steps.deployment.outputs.page_url }}
27+
steps:
28+
- uses: actions/checkout@v5
29+
- uses: actions/configure-pages@v5
30+
- uses: actions/setup-python@v6
31+
with:
32+
python-version: "3.x"
33+
- run: echo "cache_id=$(date --utc '+%V')" >> "$GITHUB_ENV"
34+
- uses: actions/cache@v4
35+
with:
36+
key: mkdocs-material-${{ env.cache_id }}
37+
path: .cache
38+
restore-keys: |
39+
mkdocs-material-
40+
- run: pip install mkdocs-material
41+
- run: mkdocs build
42+
- uses: actions/upload-pages-artifact@v4
43+
with:
44+
path: public/
45+
- id: deployment
46+
uses: actions/deploy-pages@v4

.github/workflows/release.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags: ["v*"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
packages: write
11+
id-token: write
12+
13+
jobs:
14+
release:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v5
18+
with:
19+
fetch-depth: 0
20+
21+
- uses: actions/setup-go@v6
22+
with:
23+
go-version: "1.26"
24+
25+
- uses: docker/setup-qemu-action@v3
26+
- uses: docker/setup-buildx-action@v3
27+
28+
- uses: docker/login-action@v3
29+
with:
30+
registry: ghcr.io
31+
username: ${{ github.actor }}
32+
password: ${{ secrets.GITHUB_TOKEN }}
33+
34+
- uses: sigstore/cosign-installer@v3
35+
- uses: ko-build/setup-ko@v0.9
36+
env:
37+
KO_DOCKER_REPO: ghcr.io/${{ github.repository }}
38+
39+
- name: snapshot args
40+
if: startsWith(github.ref, 'refs/tags/') == false
41+
run: echo "GORELEASER_ARGS=--snapshot --clean" >> "$GITHUB_ENV"
42+
43+
- name: release args
44+
if: startsWith(github.ref, 'refs/tags/')
45+
run: echo "GORELEASER_ARGS=--clean" >> "$GITHUB_ENV"
46+
47+
- uses: goreleaser/goreleaser-action@v6
48+
with:
49+
distribution: goreleaser
50+
version: latest
51+
args: release ${{ env.GORELEASER_ARGS }}
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
55+
- name: ko publish
56+
if: startsWith(github.ref, 'refs/tags/')
57+
env:
58+
KO_DOCKER_REPO: ghcr.io/${{ github.repository }}
59+
run: |
60+
ko build --bare --tags="${GITHUB_REF_NAME},latest" --platform=linux/amd64,linux/arm64 ./
61+
62+
- name: cosign image
63+
if: startsWith(github.ref, 'refs/tags/')
64+
env:
65+
COSIGN_EXPERIMENTAL: "1"
66+
run: |
67+
cosign sign --yes ghcr.io/${{ github.repository }}:${GITHUB_REF_NAME}

0 commit comments

Comments
 (0)