From bb2c83abb3e732a8479f5358ba045df77503079b Mon Sep 17 00:00:00 2001 From: MikelAlejoBR Date: Fri, 10 Apr 2026 16:06:29 -0400 Subject: [PATCH] feature: type for "disabled integrations" in the config We want to be able to control the integrations that are displayed in the UI via the ToolchainConfig, and in order to do that we need to have a field that controls which integrations are disabled. SANDBOX-1769 --- api/v1alpha1/docs/apiref.adoc | 4 ++++ api/v1alpha1/toolchainconfig_types.go | 7 +++++++ api/v1alpha1/zz_generated.deepcopy.go | 5 +++++ api/v1alpha1/zz_generated.openapi.go | 20 ++++++++++++++++++++ 4 files changed, 36 insertions(+) diff --git a/api/v1alpha1/docs/apiref.adoc b/api/v1alpha1/docs/apiref.adoc index d012ef39..3697e67a 100644 --- a/api/v1alpha1/docs/apiref.adoc +++ b/api/v1alpha1/docs/apiref.adoc @@ -2133,6 +2133,10 @@ Optional: \{} + | *`workatoWebHookURL`* __string__ | WorkatoWebHookURL is used by the UI to push events to Marketo for analytics purposes. + The webhook URL is unique per environment. + | | Optional: \{} + +| *`disabledIntegrations`* __string array__ | DisabledIntegrations specifies the list of integrations that should be + +hidden/disabled in the UI. When nil or empty, all integrations are + +considered enabled. Only listed integrations are hidden. + | | Optional: \{} + + |=== diff --git a/api/v1alpha1/toolchainconfig_types.go b/api/v1alpha1/toolchainconfig_types.go index 597286bd..924357d1 100644 --- a/api/v1alpha1/toolchainconfig_types.go +++ b/api/v1alpha1/toolchainconfig_types.go @@ -250,6 +250,13 @@ type RegistrationServiceConfig struct { // The webhook URL is unique per environment. // +optional WorkatoWebHookURL *string `json:"workatoWebHookURL,omitempty"` + + // DisabledIntegrations specifies the list of integrations that should be + // hidden/disabled in the UI. When nil or empty, all integrations are + // considered enabled. Only listed integrations are hidden. + // +optional + // +listType=set + DisabledIntegrations []string `json:"disabledIntegrations,omitempty"` } // RegistrationServiceAnalyticsConfig contains the subset of registration service configuration parameters related to analytics diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 94364f9a..160cf284 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -1927,6 +1927,11 @@ func (in *RegistrationServiceConfig) DeepCopyInto(out *RegistrationServiceConfig *out = new(string) **out = **in } + if in.DisabledIntegrations != nil { + in, out := &in.DisabledIntegrations, &out.DisabledIntegrations + *out = make([]string, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistrationServiceConfig. diff --git a/api/v1alpha1/zz_generated.openapi.go b/api/v1alpha1/zz_generated.openapi.go index e11ca24b..7cb949bc 100644 --- a/api/v1alpha1/zz_generated.openapi.go +++ b/api/v1alpha1/zz_generated.openapi.go @@ -2631,6 +2631,26 @@ func schema_codeready_toolchain_api_api_v1alpha1_RegistrationServiceConfig(ref c Format: "", }, }, + "disabledIntegrations": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "DisabledIntegrations specifies the list of integrations that should be hidden/disabled in the UI. When nil or empty, all integrations are considered enabled. Only listed integrations are hidden.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, }, }, },