diff --git a/cmd/integration/integration.go b/cmd/integration/integration.go index d4ed251..ae8fe11 100644 --- a/cmd/integration/integration.go +++ b/cmd/integration/integration.go @@ -177,11 +177,8 @@ func init() { createIntegrationCmd.Flags().StringToString("victoriametrics-spec", nil, `Configuration for victoriametrics. Please provide key value pairs as follows: endpoint=`) - - if util.IsFeatureFlagEnabled(util.GOOGLECLOUD_INTEGRATION) { - createIntegrationCmd.Flags().String("googlecloud-cred-filepath", "", `Filepath for Google Cloud service account credentials. + createIntegrationCmd.Flags().String("googlecloud-cred-filepath", "", `Filepath for Google Cloud service account credentials. Please provide absolute file path`) - } IntegrationCmd.AddCommand(listIntegrationCmd) @@ -277,10 +274,6 @@ func setIntegrationConfiguration(cmd *cobra.Command, IntegrationName string, sin sumoLogicSpec := ybmclient.NewSumologicTelemetryProviderSpec(installationToken, accessId, accessKey) IntegrationSpec.SetSumologicSpec(*sumoLogicSpec) case ybmclient.TELEMETRYPROVIDERTYPEENUM_GOOGLECLOUD: - if !util.IsFeatureFlagEnabled(util.GOOGLECLOUD_INTEGRATION) { - return nil, fmt.Errorf("Integration of type GOOGLECLOUD is currently not supported") - } - if !cmd.Flags().Changed("googlecloud-cred-filepath") { return nil, fmt.Errorf("googlecloud-cred-filepath is required for googlecloud sink") } diff --git a/cmd/integration_test.go b/cmd/integration_test.go index 1d42b6d..1f9d043 100644 --- a/cmd/integration_test.go +++ b/cmd/integration_test.go @@ -49,7 +49,6 @@ var _ = Describe("Integration", 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_GOOGLECLOUD_INTEGRATION", "true") }) Context("When type is Datadog", func() { @@ -265,26 +264,6 @@ ddd GOOGLECLOUD`)) session.Kill() }) }) - Context("When type is googlecloud and ff is false", func() { - It("should return unknown flag error", func() { - os.Setenv("YBM_FF_GOOGLECLOUD_INTEGRATION", "false") - cmd := exec.Command(compiledCLIPath, "integration", "create", "--config-name", "testgcp", "--type", "googlecloud", "--googlecloud-cred-filepath", "./test/fixtures/googlecloud-test-creds.json") - session, err := gexec.Start(cmd, GinkgoWriter, GinkgoWriter) - Expect(err).NotTo(HaveOccurred()) - session.Wait(2) - Expect(session.Err).Should(gbytes.Say("unknown flag: --googlecloud-cred-filepath")) - session.Kill() - }) - It("should return 'unsupported integration' error", func() { - os.Setenv("YBM_FF_GOOGLECLOUD_INTEGRATION", "false") - cmd := exec.Command(compiledCLIPath, "integration", "create", "--config-name", "testgcp", "--type", "googlecloud", "--datadog-spec", "site=test,api-key=c4XXXXXXXXXXXXXXXXXXXXXXXXXXXX3d") - session, err := gexec.Start(cmd, GinkgoWriter, GinkgoWriter) - Expect(err).NotTo(HaveOccurred()) - session.Wait(2) - Expect(session.Err).Should(gbytes.Say("Integration of type GOOGLECLOUD is currently not supported")) - session.Kill() - }) - }) Context("When listing telememtry providers", func() { It("should return the list of config", func() { statusCode = 200 diff --git a/cmd/util/feature_flags.go b/cmd/util/feature_flags.go index b189842..f01675d 100644 --- a/cmd/util/feature_flags.go +++ b/cmd/util/feature_flags.go @@ -25,17 +25,16 @@ import ( type FeatureFlag string const ( - CDC FeatureFlag = "CDC" - CONFIGURE_URL FeatureFlag = "CONFIGURE_URL" - NODE_OP FeatureFlag = "NODE_OPS" - TOOLS FeatureFlag = "TOOLS" - AZURE_CIDR_ALLOWED FeatureFlag = "AZURE_CIDR_ALLOWED" - ENTERPRISE_SECURITY FeatureFlag = "ENTERPRISE_SECURITY" - PITR_CONFIG FeatureFlag = "PITR_CONFIG" - PITR_RESTORE FeatureFlag = "PITR_RESTORE" - CONNECTION_POOLING FeatureFlag = "CONNECTION_POOLING" - GOOGLECLOUD_INTEGRATION FeatureFlag = "GOOGLECLOUD_INTEGRATION" - DR FeatureFlag = "DR" + CDC FeatureFlag = "CDC" + CONFIGURE_URL FeatureFlag = "CONFIGURE_URL" + NODE_OP FeatureFlag = "NODE_OPS" + TOOLS FeatureFlag = "TOOLS" + AZURE_CIDR_ALLOWED FeatureFlag = "AZURE_CIDR_ALLOWED" + ENTERPRISE_SECURITY FeatureFlag = "ENTERPRISE_SECURITY" + PITR_CONFIG FeatureFlag = "PITR_CONFIG" + PITR_RESTORE FeatureFlag = "PITR_RESTORE" + CONNECTION_POOLING FeatureFlag = "CONNECTION_POOLING" + DR FeatureFlag = "DR" ) func (f FeatureFlag) String() string { diff --git a/docs/ybm_integration_create.md b/docs/ybm_integration_create.md index a6b6bd1..5a7e80a 100644 --- a/docs/ybm_integration_create.md +++ b/docs/ybm_integration_create.md @@ -13,18 +13,26 @@ ybm integration create [flags] ### Options ``` - --config-name string [REQUIRED] The name of the Integration - --type string [REQUIRED] The type of third party Integration sink - --datadog-spec stringToString Configuration for Datadog. - Please provide key value pairs as follows: - api-key=,site= (default []) - --grafana-spec stringToString Configuration for Grafana. - Please provide key value pairs as follows: - access-policy-token=,zone=,instance-id=,org-slug= (default []) - --sumologic-spec stringToString Configuration for sumologic. - Please provide key value pairs as follows: - access-key=,access-id=,installation-token= (default []) - -h, --help help for create + --config-name string [REQUIRED] The name of the Integration + --type string [REQUIRED] The type of third party Integration sink + --datadog-spec stringToString Configuration for Datadog. + Please provide key value pairs as follows: + api-key=,site= (default []) + --grafana-spec stringToString Configuration for Grafana. + Please provide key value pairs as follows: + access-policy-token=,zone=,instance-id=,org-slug= (default []) + --sumologic-spec stringToString Configuration for sumologic. + Please provide key value pairs as follows: + access-key=,access-id=,installation-token= (default []) + --prometheus-spec stringToString Configuration for prometheus. + Please provide key value pairs as follows: + endpoint= (default []) + --victoriametrics-spec stringToString Configuration for victoriametrics. + Please provide key value pairs as follows: + endpoint= (default []) + --googlecloud-cred-filepath string Filepath for Google Cloud service account credentials. + Please provide absolute file path + -h, --help help for create ``` ### Options inherited from parent commands