Skip to content

Commit c9f31d9

Browse files
authored
fix: improve configmap settings related to kargo admin account (#305)
1 parent 3bf35f2 commit c9f31d9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

akp/types/kargo_instance.go

+10
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ func (k *KargoInstance) Update(ctx context.Context, diagnostics *diag.Diagnostic
3434

3535
// Convert ConfigMap values, ensuring booleans are converted to strings
3636
configMap := exportResp.GetKargoConfigmap().AsMap()
37+
if !k.KargoConfigMap.IsNull() {
38+
existingConfigMap := k.KargoConfigMap.Elements()
39+
for key, value := range existingConfigMap {
40+
if _, exists := configMap[key]; !exists {
41+
if strVal, ok := value.(types.String); ok {
42+
configMap[key] = strVal.ValueString()
43+
}
44+
}
45+
}
46+
}
3747
for k, v := range configMap {
3848
switch val := v.(type) {
3949
case bool:

0 commit comments

Comments
 (0)