Skip to content

Commit

Permalink
[CLOUDGA-20737] Add Feature flag for DB audit (#227)
Browse files Browse the repository at this point in the history
Co-authored-by: aquatiko <[email protected]>
  • Loading branch information
aquatiko and aquatiko authored Apr 22, 2024
1 parent 90c548a commit f257362
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 204 deletions.
1 change: 1 addition & 0 deletions cmd/db_audit_logs_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ var _ = Describe("Db Audit", func() {
Expect(err).ToNot(HaveOccurred())
os.Setenv("YBM_HOST", fmt.Sprintf("http://%s", server.Addr()))
os.Setenv("YBM_APIKEY", "test-token")
os.Setenv("YBM_FF_DB_AUDIT_LOGS", "true")
})

Context("When associating DB Audit config", func() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func init() {
rootCmd.AddCommand(user.UserCmd)
rootCmd.AddCommand(metrics_exporter.MetricsExporterCmd)
rootCmd.AddCommand(integration.IntegrationCmd)
rootCmd.AddCommand(db_audit_logs_exporter.DbAuditLogsExporterCmd)
util.AddCommandIfFeatureFlag(rootCmd, db_audit_logs_exporter.DbAuditLogsExporterCmd, util.DB_AUDIT_LOGS)
util.AddCommandIfFeatureFlag(rootCmd, tools.ToolsCmd, util.TOOLS)
util.AddCommandIfFeatureFlag(rootCmd, cdc.CdcCmd, util.CDC)

Expand Down
1 change: 1 addition & 0 deletions cmd/util/feature_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const (
TOOLS FeatureFlag = "TOOLS"
AZURE_CIDR_ALLOWED FeatureFlag = "AZURE_CIDR_ALLOWED"
ENTERPRISE_SECURITY FeatureFlag = "ENTERPRISE_SECURITY"
DB_AUDIT_LOGS FeatureFlag = "DB_AUDIT_LOGS"
)

func (f FeatureFlag) String() string {
Expand Down
1 change: 0 additions & 1 deletion docs/ybm.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ ybm [flags]
* [ybm backup](ybm_backup.md) - Manage backup operations of a cluster
* [ybm cluster](ybm_cluster.md) - Manage cluster operations
* [ybm completion](ybm_completion.md) - Generate the autocompletion script for the specified shell
* [ybm db-audit-logs-exporter](ybm_db-audit-logs-exporter.md) - Manage DB Audit Logs
* [ybm integration](ybm_integration.md) - Manage Integration
* [ybm metrics-exporter](ybm_metrics-exporter.md) - Manage Metrics Exporter
* [ybm network-allow-list](ybm_network-allow-list.md) - Manage Network Allow Lists
Expand Down
39 changes: 0 additions & 39 deletions docs/ybm_db-audit-logs-exporter.md

This file was deleted.

44 changes: 0 additions & 44 deletions docs/ybm_db-audit-logs-exporter_assign.md

This file was deleted.

36 changes: 0 additions & 36 deletions docs/ybm_db-audit-logs-exporter_list.md

This file was deleted.

38 changes: 0 additions & 38 deletions docs/ybm_db-audit-logs-exporter_unassign.md

This file was deleted.

45 changes: 0 additions & 45 deletions docs/ybm_db-audit-logs-exporter_update.md

This file was deleted.

0 comments on commit f257362

Please sign in to comment.