Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,20 @@
- `sqlserverflex`: [v1.5.0](services/sqlserverflex/CHANGELOG.md#v150)
- **Feature:** Introduction of multi API version support for the sqlserverflex SDK module. For more details please see the announcement on GitHub: https://github.com/stackitcloud/stackit-sdk-go/discussions/5062
- `v1api`: New package which can be used for communication with the sqlserverflex v1 API
- `v2api`: New package which can be used for communication with the sqlserverflex v1 API
- `v2api`: New package which can be used for communication with the sqlserverflex v2 API
- `v3alpha1api`: New package which can be used for communication with the sqlserverflex v3 alpha1 API
- `v3beta1api`: New package which can be used for communication with the sqlserverflex v3 beta1 API
- **Deprecation:** The contents in the root of this SDK module including the `wait` package are marked as deprecated and will be removed after 2026-09-30. Switch to the new packages for the available API versions instead.
- **Dependencies:** Bump STACKIT SDK core module from `v0.21.1` to `v0.22.0`
- `vpn`: [v0.1.0](services/vpn/CHANGELOG.md#v010)
- **New:** SDK module for vpn service
- `v1alpha1api`: New package which can be used for communication with the vpn v1 alpha1 API
- `ske`: [v1.8.0](services/ske/CHANGELOG.md#v180)
- **Feature:** Introduction of multi API version support for the ske SDK module. For more details please see the announcement on GitHub: https://github.com/stackitcloud/stackit-sdk-go/discussions/5062
- `v1api`: New package which can be used for communication with the ske v1 API
- `v2api`: New package which can be used for communication with the ske v2 API
- **Deprecation:** The contents in the root of this SDK module including the `wait` package are marked as deprecated and will be removed after 2026-09-30. Switch to the new packages for the available API versions instead.
- **Dependencies:** Bump STACKIT SDK core module from `v0.21.1` to `v0.22.0`

## Release (2026-02-20)
- `core`: [v0.21.1](core/CHANGELOG.md#v0211)
Expand Down
5 changes: 4 additions & 1 deletion examples/ske/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ module github.com/stackitcloud/stackit-sdk-go/examples/ske

go 1.21

// This is not needed in production. This is only here to point the golangci linter to the local version instead of the last release on GitHub.
replace github.com/stackitcloud/stackit-sdk-go/services/ske => ../../services/ske

require (
github.com/stackitcloud/stackit-sdk-go/core v0.21.1
github.com/stackitcloud/stackit-sdk-go/core v0.22.0
github.com/stackitcloud/stackit-sdk-go/services/ske v1.7.0
)

Expand Down
6 changes: 2 additions & 4 deletions examples/ske/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/stackitcloud/stackit-sdk-go/core v0.21.1 h1:Y/PcAgM7DPYMNqum0MLv4n1mF9ieuevzcCIZYQfm3Ts=
github.com/stackitcloud/stackit-sdk-go/core v0.21.1/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI=
github.com/stackitcloud/stackit-sdk-go/services/ske v1.7.0 h1:l1QjxW7sdE/6B6BZtHxbmus8XJdI9KDuXX3fwUa5fog=
github.com/stackitcloud/stackit-sdk-go/services/ske v1.7.0/go.mod h1:1Jr+ImrmPERxbYnlTy6O2aSZYNnREf2qQyysv6YC1RY=
github.com/stackitcloud/stackit-sdk-go/core v0.22.0 h1:6rViz7GnNwXSh51Lur5xuDzO8EWSZfN9J0HvEkBKq6c=
github.com/stackitcloud/stackit-sdk-go/core v0.22.0/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI=
52 changes: 26 additions & 26 deletions examples/ske/ske.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"

"github.com/stackitcloud/stackit-sdk-go/core/utils"
"github.com/stackitcloud/stackit-sdk-go/services/ske"
"github.com/stackitcloud/stackit-sdk-go/services/ske/wait"
ske "github.com/stackitcloud/stackit-sdk-go/services/ske/v2api"
"github.com/stackitcloud/stackit-sdk-go/services/ske/v2api/wait"
)

func main() {
Expand All @@ -32,91 +32,91 @@ func main() {
// }

// Get the ske clusters for your project
getClustersResp, err := skeClient.ListClusters(context.Background(), projectId, region).Execute()
getClustersResp, err := skeClient.DefaultAPI.ListClusters(context.Background(), projectId, region).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GetClusters`: %v\n", err)
} else {
fmt.Printf("Number of clusters: %v\n", len(*getClustersResp.Items))
fmt.Printf("Number of clusters: %v\n", len(getClustersResp.Items))
}

var availableVersion string
// Get the ske provider options
getOptionsResp, err := skeClient.ListProviderOptions(context.Background(), region).Execute()
getOptionsResp, err := skeClient.DefaultAPI.ListProviderOptions(context.Background(), region).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GetOptions`: %v\n", err)
} else {
availableVersions := *getOptionsResp.KubernetesVersions
availableVersions := getOptionsResp.KubernetesVersions
availableVersion = *availableVersions[0].Version
fmt.Printf("First available version: %v\n", availableVersion)
}

// Create an ske cluster
createInstancePayload := ske.CreateOrUpdateClusterPayload{
Kubernetes: &ske.Kubernetes{
Version: utils.Ptr(availableVersion),
Kubernetes: ske.Kubernetes{
Version: availableVersion,
},
Nodepools: &[]ske.Nodepool{
Nodepools: []ske.Nodepool{
{
AvailabilityZones: utils.Ptr([]string{"eu01-3"}),
Machine: &ske.Machine{
Image: &ske.Image{
Name: utils.Ptr("name"),
Version: utils.Ptr("3510.2.5"),
AvailabilityZones: []string{"eu01-3"},
Machine: ske.Machine{
Image: ske.Image{
Name: "name",
Version: "3510.2.5",
},
Type: utils.Ptr("b1.2"),
Type: "b1.2",
},
Maximum: utils.Ptr(int64(3)),
Minimum: utils.Ptr(int64(2)),
Name: utils.Ptr("my-nodepool"),
Volume: &ske.Volume{
Size: utils.Ptr(int64(20)),
Maximum: int32(3),
Minimum: int32(2),
Name: "my-nodepool",
Volume: ske.Volume{
Size: int32(20),
Type: utils.Ptr("storage_premium_perf0"),
},
},
},
}
clusterName := "cl-name"
createClusterResp, err := skeClient.CreateOrUpdateCluster(context.Background(), projectId, region, clusterName).CreateOrUpdateClusterPayload(createInstancePayload).Execute()
createClusterResp, err := skeClient.DefaultAPI.CreateOrUpdateCluster(context.Background(), projectId, region, clusterName).CreateOrUpdateClusterPayload(createInstancePayload).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CreateCluster`: %v\n", err)
} else {
fmt.Printf("Triggered creation of cluster with name \"%s\".\n", *createClusterResp.Name)
}

// Wait for cluster creation to complete
_, err = wait.CreateOrUpdateClusterWaitHandler(context.Background(), skeClient, projectId, region, clusterName).WaitWithContext(context.Background())
_, err = wait.CreateOrUpdateClusterWaitHandler(context.Background(), skeClient.DefaultAPI, projectId, region, clusterName).WaitWithContext(context.Background())
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CreateOrUpdateCluster`: %v\n", err)
} else {
fmt.Printf("Cluster created.\n")
}

// Start cluster credential rotation
_, err = skeClient.StartCredentialsRotationExecute(context.Background(), projectId, region, clusterName)
_, err = skeClient.DefaultAPI.StartCredentialsRotation(context.Background(), projectId, region, clusterName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StartCredentialsRotation`: %v\n", err)
} else {
fmt.Printf("Triggered start of cluster credentials rotation.\n")
}

// Wait for cluster credential rotation to be prepared
_, err = wait.StartCredentialsRotationWaitHandler(context.Background(), skeClient, projectId, region, clusterName).WaitWithContext(context.Background())
_, err = wait.StartCredentialsRotationWaitHandler(context.Background(), skeClient.DefaultAPI, projectId, region, clusterName).WaitWithContext(context.Background())
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StartRotateCredentials`: %v\n", err)
} else {
fmt.Printf("Cluster credentials ready to rotate.\n")
}

// Complete cluster credential rotation
_, err = skeClient.CompleteCredentialsRotationExecute(context.Background(), projectId, region, clusterName)
_, err = skeClient.DefaultAPI.CompleteCredentialsRotation(context.Background(), projectId, region, clusterName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CompleteCredentialsRotation`: %v\n", err)
} else {
fmt.Printf("Triggered completion of cluster credentials rotation.\n")
}

// Wait for cluster credential rotation to be completed
_, err = wait.CompleteCredentialsRotationWaitHandler(context.Background(), skeClient, projectId, region, clusterName).WaitWithContext(context.Background())
_, err = wait.CompleteCredentialsRotationWaitHandler(context.Background(), skeClient.DefaultAPI, projectId, region, clusterName).WaitWithContext(context.Background())
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CompleteRotateCredentials`: %v\n", err)
} else {
Expand Down
7 changes: 7 additions & 0 deletions services/ske/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## v1.8.0
- **Feature:** Introduction of multi API version support for the ske SDK module. For more details please see the announcement on GitHub: https://github.com/stackitcloud/stackit-sdk-go/discussions/5062
- `v1api`: New package which can be used for communication with the ske v1 API
- `v2api`: New package which can be used for communication with the ske v2 API
- **Deprecation:** The contents in the root of this SDK module including the `wait` package are marked as deprecated and will be removed after 2026-09-30. Switch to the new packages for the available API versions instead.
- **Dependencies:** Bump STACKIT SDK core module from `v0.21.1` to `v0.22.0`

## v1.7.0
- **Feature:** new model `AccessScope`
- **Feature:** new model `V2ControlPlaneNetwork`
Expand Down
2 changes: 1 addition & 1 deletion services/ske/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.7.0
v1.8.0
Loading
Loading