-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for custom and auto agent size #272
Conversation
@@ -152,7 +152,9 @@ Required: | |||
Optional: | |||
|
|||
- `app_replication` (Boolean) Enables Argo CD state replication to the managed cluster that allows disconnecting the cluster from Akuity Platform without losing core Argocd features | |||
- `auto_agent_size_config` (Attributes) Autoscaler config for auto agent size (see [below for nested schema](#nestedatt--spec--data--auto_agent_size_config)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we will need to add auto
and custom
to https://github.com/akuity/terraform-provider-akp/blob/main/akp/data_source_akp_cluster_schema.go#L84 and
https://github.com/akuity/terraform-provider-akp/blob/main/akp/resource_akp_cluster_schema.go#L145
@@ -0,0 +1,50 @@ | |||
data "akp_instance" "example" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's modify the template to include this and custom agent size example in the generated docs. We can just add them after here: https://github.com/akuity/terraform-provider-akp/blob/main/templates/resources/cluster.md.tmpl#L14-L20
one nitpick: I would use |
@junzebao Thank you! Fixed. |
|
||
func getResourcesDataSourceAttributes() map[string]schema.Attribute { | ||
return map[string]schema.Attribute{ | ||
"mem": schema.StringAttribute{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on @junzebao 's comment, this also needs to be "memory“?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revised. Was only revised custom agent size config, and now I've also revised auto agent size config. Thank you!
akp/resource_akp_cluster.go
Outdated
@@ -275,6 +276,9 @@ func buildClusterApplyRequest(ctx context.Context, diagnostics *diag.Diagnostics | |||
func buildClusters(ctx context.Context, diagnostics *diag.Diagnostics, cluster *types.Cluster) []*structpb.Struct { | |||
var cs []*structpb.Struct | |||
apiCluster := cluster.ToClusterAPIModel(ctx, diagnostics) | |||
if diagnostics.HasError() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the reason that we ignore the error here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jiachengxu This doesn't ignore error but rather exits early when having errors, for example input validation error. And then the diagnostic errors will be reported to users.
Fixes #259