diff --git a/api/v1alpha1/docs/apiref.adoc b/api/v1alpha1/docs/apiref.adoc index 8d036e1a..f736a5d7 100644 --- a/api/v1alpha1/docs/apiref.adoc +++ b/api/v1alpha1/docs/apiref.adoc @@ -2124,6 +2124,16 @@ Consumed by host operator and set as env var on registration-service deployment | *`registrationServiceURL`* __string__ | RegistrationServiceURL is the URL used to a ccess the registration service + | | | *`replicas`* __integer__ | Replicas specifies the number of replicas to use for the registration service deployment + | | | *`verification`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-registrationserviceverificationconfig[$$RegistrationServiceVerificationConfig$$]__ | Keeps parameters necessary for the registration service verification config + | | +| *`uiCanaryDeploymentWeight`* __integer__ | UICanaryDeploymentWeight specifies the threshold of users that will be using the new UI. + +This configuration option is just a temporary solution for rolling out our new RHDH based UI using canary deployment strategy. + +Once we switch all our users to the new UI this will be removed. + +How this works: + +- backend returns a weight + +- old UI assigns a sticky random number for each user + +- if the user has a number within the weight returned from the backend than user get's redirect to new UI + +- if the user has a number above the weight they keep using the current UI + | | Maximum: 100 + +Minimum: 0 + + |=== diff --git a/api/v1alpha1/toolchainconfig_types.go b/api/v1alpha1/toolchainconfig_types.go index 1d934b17..137833c0 100644 --- a/api/v1alpha1/toolchainconfig_types.go +++ b/api/v1alpha1/toolchainconfig_types.go @@ -244,6 +244,20 @@ type RegistrationServiceConfig struct { // Keeps parameters necessary for the registration service verification config // +optional Verification RegistrationServiceVerificationConfig `json:"verification,omitempty"` + + // UICanaryDeploymentWeight specifies the threshold of users that will be using the new UI. + // This configuration option is just a temporary solution for rolling out our new RHDH based UI using canary deployment strategy. + // Once we switch all our users to the new UI this will be removed. + // How this works: + // - backend returns a weight + // - old UI assigns a sticky random number for each user + // - if the user has a number within the weight returned from the backend than user get's redirect to new UI + // - if the user has a number above the weight they keep using the current UI + // + // +optional + // +kubebuilder:validation:Minimum=0 + // +kubebuilder:validation:Maximum=100 + UICanaryDeploymentWeight *int `json:"uiCanaryDeploymentWeight,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 87b6b8f6..875f4420 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -2061,6 +2061,11 @@ func (in *RegistrationServiceConfig) DeepCopyInto(out *RegistrationServiceConfig **out = **in } in.Verification.DeepCopyInto(&out.Verification) + if in.UICanaryDeploymentWeight != nil { + in, out := &in.UICanaryDeploymentWeight, &out.UICanaryDeploymentWeight + *out = new(int) + **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 01535db9..5fa7f5ff 100644 --- a/api/v1alpha1/zz_generated.openapi.go +++ b/api/v1alpha1/zz_generated.openapi.go @@ -2815,6 +2815,13 @@ func schema_codeready_toolchain_api_api_v1alpha1_RegistrationServiceConfig(ref c Ref: ref("github.com/codeready-toolchain/api/api/v1alpha1.RegistrationServiceVerificationConfig"), }, }, + "uiCanaryDeploymentWeight": { + SchemaProps: spec.SchemaProps{ + Description: "UICanaryDeploymentWeight specifies the threshold of users that will be using the new UI. This configuration option is just a temporary solution for rolling out our new RHDH based UI using canary deployment strategy. Once we switch all our users to the new UI this will be removed. How this works: - backend returns a weight - old UI assigns a sticky random number for each user - if the user has a number within the weight returned from the backend than user get's redirect to new UI - if the user has a number above the weight they keep using the current UI", + Type: []string{"integer"}, + Format: "int32", + }, + }, }, }, },