fix(deps): update stackit sdk modules (#846)

* fix(deps): update stackit sdk modules

* feat: Use new generated enums

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>

---------

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>
Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
Co-authored-by: Alexander Dahmen <alexander.dahmen@inovex.de>
This commit is contained in:
stackit-pipeline 2025-05-19 09:56:41 +02:00 committed by GitHub
parent 5d844a84d6
commit 7ce802769c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 222 additions and 225 deletions

View file

@ -896,7 +896,7 @@ func (r *clusterResource) createOrUpdateCluster(ctx context.Context, diags *diag
core.LogAndAddError(ctx, diags, "Error creating/updating cluster", fmt.Sprintf("Cluster creation waiting: %v", err))
return
}
if waitResp.Status.Error != nil && waitResp.Status.Error.Message != nil && *waitResp.Status.Error.Code == skeWait.InvalidArgusInstanceErrorCode {
if waitResp.Status.Error != nil && waitResp.Status.Error.Message != nil && *waitResp.Status.Error.Code == ske.RUNTIMEERRORCODE_ARGUS_INSTANCE_NOT_FOUND {
core.LogAndAddWarning(ctx, diags, "Warning during creating/updating cluster", fmt.Sprintf("Cluster is in Impaired state due to an invalid argus instance id, the cluster is usable but metrics won't be forwarded: %s", *waitResp.Status.Error.Message))
}
@ -934,7 +934,7 @@ func toNodepoolsPayload(ctx context.Context, m *Model, availableMachineVersions
ts := []ske.Taint{}
for _, v := range taintsModel {
t := ske.Taint{
Effect: conversion.StringValueToPointer(v.Effect),
Effect: ske.TaintGetEffectAttributeType(conversion.StringValueToPointer(v.Effect)),
Key: conversion.StringValueToPointer(v.Key),
Value: conversion.StringValueToPointer(v.Value),
}
@ -972,7 +972,7 @@ func toNodepoolsPayload(ctx context.Context, m *Model, availableMachineVersions
}
cn := ske.CRI{
Name: conversion.StringValueToPointer(nodePool.CRI),
Name: ske.CRIGetNameAttributeType(conversion.StringValueToPointer(nodePool.CRI)),
}
providedVersionMin := conversion.StringValueToPointer(nodePool.OSVersionMin)
@ -1462,7 +1462,7 @@ func mapNodePools(ctx context.Context, cl *ske.Cluster, m *Model) error {
}
if nodePoolResp.Cri != nil {
nodePool["cri"] = types.StringPointerValue(nodePoolResp.Cri.Name)
nodePool["cri"] = types.StringValue(string(nodePoolResp.Cri.GetName()))
}
taintsInModel := false
@ -1526,7 +1526,7 @@ func mapTaints(t *[]ske.Taint, nodePool map[string]attr.Value, existInModel bool
for i, taintResp := range *t {
taint := map[string]attr.Value{
"effect": types.StringPointerValue(taintResp.Effect),
"effect": types.StringValue(string(taintResp.GetEffect())),
"key": types.StringPointerValue(taintResp.Key),
"value": types.StringPointerValue(taintResp.Value),
}

View file

@ -118,7 +118,7 @@ func TestMapFields(t *testing.T) {
AllowSystemComponents: utils.Ptr(true),
AvailabilityZones: &[]string{"z1", "z2"},
Cri: &ske.CRI{
Name: utils.Ptr("cri"),
Name: ske.CRINAME_DOCKER.Ptr(),
},
Labels: &map[string]string{"k": "v"},
Machine: &ske.Machine{
@ -135,7 +135,7 @@ func TestMapFields(t *testing.T) {
Name: utils.Ptr("node"),
Taints: &[]ske.Taint{
{
Effect: utils.Ptr("effect"),
Effect: ske.TAINTEFFECT_NO_EXECUTE.Ptr(),
Key: utils.Ptr("key"),
Value: utils.Ptr("value"),
},
@ -198,14 +198,14 @@ func TestMapFields(t *testing.T) {
types.ObjectValueMust(
taintTypes,
map[string]attr.Value{
"effect": types.StringValue("effect"),
"effect": types.StringValue(string(ske.TAINTEFFECT_NO_EXECUTE)),
"key": types.StringValue("key"),
"value": types.StringValue("value"),
},
),
},
),
"cri": types.StringValue("cri"),
"cri": types.StringValue(string(ske.CRINAME_DOCKER)),
"availability_zones": types.ListValueMust(
types.StringType,
[]attr.Value{
@ -502,7 +502,7 @@ func TestMapFields(t *testing.T) {
},
),
"taints": types.ListValueMust(types.ObjectType{AttrTypes: taintTypes}, []attr.Value{}),
"cri": types.StringValue("cri"),
"cri": types.StringValue(string(ske.CRINAME_DOCKER)),
"availability_zones": types.ListValueMust(
types.StringType,
[]attr.Value{
@ -561,7 +561,7 @@ func TestMapFields(t *testing.T) {
{
AvailabilityZones: &[]string{"z1", "z2"},
Cri: &ske.CRI{
Name: utils.Ptr("cri"),
Name: ske.CRINAME_DOCKER.Ptr(),
},
Labels: &map[string]string{"k": "v"},
Machine: &ske.Machine{
@ -623,7 +623,7 @@ func TestMapFields(t *testing.T) {
},
),
"taints": types.ListValueMust(types.ObjectType{AttrTypes: taintTypes}, []attr.Value{}),
"cri": types.StringValue("cri"),
"cri": types.StringValue(string(ske.CRINAME_DOCKER)),
"availability_zones": types.ListValueMust(
types.StringType,
[]attr.Value{