Skip to content
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

dbaas opensearch: remove top-level max-index-count flag #611

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cmd/dbaas_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ type dbaasServiceCreateCmd struct {
OpensearchIndexTemplateNumberOfShards int64 `cli-flag:"opensearch-index-template-number-of-shards" cli-usage:"The number of primary shards that an index should have." cli-hidden:""`
OpensearchIPFilter []string `cli-flag:"opensearch-ip-filter" cli-usage:"Allow incoming connections from CIDR address block" cli-hidden:""`
OpensearchKeepIndexRefreshInterval bool `cli-flag:"opensearch-keep-index-refresh-interval" cli-usage:"index.refresh_interval is reset to default value for every index to be sure that indices are always visible to search. Set to true disable this." cli-hidden:""`
OpensearchMaxIndexCount int64 `cli-flag:"opensearch-max-index-count" cli-usage:"Maximum number of indexes to keep before deleting the oldest one" cli-hidden:""`
OpensearchDashboardEnabled bool `cli-flag:"opensearch-dashboard-enabled" cli-usage:"Enable or disable OpenSearch Dashboards (default: true)" cli-hidden:""`
OpensearchDashboardMaxOldSpaceSize int64 `cli-flag:"opensearch-dashboard-max-old-space-size" cli-usage:"Memory limit in MiB for OpenSearch Dashboards. Note: The memory reserved by OpenSearch Dashboards is not available for OpenSearch. (default: 128)" cli-hidden:""`
OpensearchDashboardRequestTimeout int64 `cli-flag:"opensearch-dashboard-request-timeout" cli-usage:"Timeout in milliseconds for requests made by OpenSearch Dashboards towards OpenSearch (default: 30000)" cli-hidden:""`
Expand Down
4 changes: 0 additions & 4 deletions cmd/dbaas_create_opensearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ func (c *dbaasServiceCreateCmd) createOpensearch(cmd *cobra.Command, _ []string)
db.OpensearchSettings = &settings
}

if cmd.Flags().Changed(mustCLICommandFlagName(c, &c.OpensearchMaxIndexCount)) {
db.MaxIndexCount = &c.OpensearchMaxIndexCount
}

if cmd.Flags().Changed(mustCLICommandFlagName(c, &c.OpensearchDashboardEnabled)) {
db.OpensearchDashboards.Enabled = &c.OpensearchDashboardEnabled
}
Expand Down
3 changes: 0 additions & 3 deletions cmd/dbaas_show_opensearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ type dbServiceOpensearchShowOutput struct {
IndexPatterns []dbServiceOpensearchIndexPatternShowOutput `json:"index-patterns,omitempty"`
IndexTemplate *dbServiceOpensearchIndexTemplateShowOutput `json:"index-template,omitempty"`
KeepIndexRefreshInterval bool `json:"keep-index-refresh-interval,omitempty"`
MaxIndexCount int64 `json:"max-index-count,omitempty"`
Dashboard *dbServiceOpensearchDashboardShowOutput `json:"opensearch-dashboards,omitempty"`
Users []dbServiceOpensearchUserShowOutput `json:"users,omitempty"`
}
Expand Down Expand Up @@ -113,7 +112,6 @@ func formatDatabaseServiceOpensearchTable(t *table.Table, o *dbServiceOpensearch
t.Append([]string{"IndexTemplate", indexTemplate})

t.Append([]string{"KeepIndexRefreshInterval", fmt.Sprint(o.KeepIndexRefreshInterval)})
t.Append([]string{"MaxIndexCount", strconv.FormatInt(o.MaxIndexCount, 10)})

var dashboard string
if o.Dashboard != nil {
Expand Down Expand Up @@ -337,7 +335,6 @@ func opensearchShowDatabase(db *oapi.DbaasServiceOpensearch, zone string) (outpu
IndexPatterns: indexPatterns,
IndexTemplate: indexTemplate,
KeepIndexRefreshInterval: utils.DefaultBool(db.KeepIndexRefreshInterval, false),
MaxIndexCount: utils.DefaultInt64(db.MaxIndexCount, 0),
Dashboard: dashboard,
Users: users,
},
Expand Down
1 change: 0 additions & 1 deletion cmd/dbaas_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ type dbaasServiceUpdateCmd struct {
KafkaSettings string `cli-flag:"kafka-settings" cli-usage:"Kafka configuration settings (JSON format)" cli-hidden:""`

// "opensearch" type specific flags
OpensearchMaxIndexCount int64 `cli-flag:"opensearch-max-index-count" cli-usage:"Maximum number of indexes to keep before deleting the oldest one" cli-hidden:""`
OpensearchKeepIndexRefreshInterval bool `cli-flag:"opensearch-keep-index-refresh-interval" cli-usage:"index.refresh_interval is reset to default value for every index to be sure that indices are always visible to search. Set to true disable this." cli-hidden:""`
OpensearchIPFilter []string `cli-flag:"opensearch-ip-filter" cli-usage:"Allow incoming connections from CIDR address block" cli-hidden:""`
OpensearchIndexPatterns string `cli-flag:"opensearch-index-patterns" cli-usage:"JSON Array of index patterns (https://openapi-v2.exoscale.com/#operation-get-dbaas-service-opensearch-200-index-patterns)" cli-hidden:""`
Expand Down
5 changes: 0 additions & 5 deletions cmd/dbaas_update_opensearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ func (c *dbaasServiceUpdateCmd) updateOpensearch(cmd *cobra.Command, _ []string)
updated = true
}

if cmd.Flags().Changed(mustCLICommandFlagName(c, &c.OpensearchMaxIndexCount)) {
db.MaxIndexCount = &c.OpensearchMaxIndexCount
updated = true
}

if cmd.Flags().Changed(mustCLICommandFlagName(c, &c.OpensearchDashboardEnabled)) {
db.OpensearchDashboards.Enabled = &c.OpensearchDashboardEnabled
updated = true
Expand Down
Loading