Skip to content

Commit

Permalink
Change imds_v1 node_configuration field for EKS default value to true. (
Browse files Browse the repository at this point in the history
#187)

* Change imds_v1 node_configuration for EKS default value to true.
* Remove deprecated fields: castai_eks_clusterid, castai_cluster_token

---------

Co-authored-by: Adam Pasyniuk <adam@cast.ai>
  • Loading branch information
apasyniuk and apasyniuk authored Jul 12, 2023
1 parent cdbc10c commit d0c755e
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 98 deletions.
2 changes: 2 additions & 0 deletions castai/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import (
const (
FieldDeleteNodesOnDisconnect = "delete_nodes_on_disconnect"
FieldClusterCredentialsId = "credentials_id"
FieldClusterID = "cluster_id"
FieldClusterToken = "cluster_token"
)

func resourceCastaiClusterDelete(ctx context.Context, data *schema.ResourceData, meta interface{}) diag.Diagnostics {
Expand Down
46 changes: 0 additions & 46 deletions castai/data_source_eks_cluster_id.go

This file was deleted.

4 changes: 0 additions & 4 deletions castai/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,12 @@ func Provider(version string) *schema.Provider {
"castai_rebalancing_job": resourceRebalancingJob(),
"castai_node_configuration": resourceNodeConfiguration(),
"castai_node_configuration_default": resourceNodeConfigurationDefault(),
// TODO: remove with next major release.
"castai_cluster_token": resourceClusterToken(),
},

DataSourcesMap: map[string]*schema.Resource{
"castai_eks_settings": dataSourceEKSSettings(),
"castai_eks_user_arn": dataSourceEKSClusterUserARN(),
"castai_gke_user_policies": dataSourceGKEPolicies(),
// TODO: remove with next major release.
"castai_eks_clusterid": dataSourceEKSClusterID(),
},

ConfigureContextFunc: providerConfigure(version),
Expand Down
46 changes: 0 additions & 46 deletions castai/resource_cluster_token.go

This file was deleted.

3 changes: 2 additions & 1 deletion castai/resource_node_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ func resourceNodeConfiguration() *schema.Resource {
"imds_v1": {
Type: schema.TypeBool,
Optional: true,
Description: "Allow IMDSv1, the default is true",
Default: true,
Description: "When the value is true both IMDSv1 and IMDSv2 are enabled. Setting the value to false disables permanently IMDSv1 and might affect legacy workloads running on the node created with this configuration. The default is true if the flag isn't provided",
},
"imds_hop_limit": {
Type: schema.TypeInt,
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/node_configuration.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d0c755e

Please sign in to comment.