Add warning during ske cluster creation when invalid argus instance id is provided (#32)
* Add warning during cluster creation if argus instance id is invalid * Update warning message * Add ske v0.1.1
This commit is contained in:
parent
d3cdbf0e2a
commit
46be7cfafd
3 changed files with 29 additions and 25 deletions
|
|
@ -584,6 +584,10 @@ func (r *clusterResource) createOrUpdateCluster(ctx context.Context, diags *diag
|
|||
core.LogAndAddError(ctx, diags, "Error creating/updating cluster", fmt.Sprintf("Wait result conversion, got %+v", wr))
|
||||
return
|
||||
}
|
||||
if got.Status.Error != nil && got.Status.Error.Message != nil && *got.Status.Error.Code == ske.InvalidArgusInstanceErrorCode {
|
||||
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", *got.Status.Error.Message))
|
||||
}
|
||||
|
||||
err = mapFields(ctx, got, model)
|
||||
if err != nil {
|
||||
core.LogAndAddError(ctx, diags, "Error creating/updating cluster", fmt.Sprintf("Processing API payload: %v", err))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue