diff --git a/api/v1alpha1/docs/apiref.adoc b/api/v1alpha1/docs/apiref.adoc index df648409..d012ef39 100644 --- a/api/v1alpha1/docs/apiref.adoc +++ b/api/v1alpha1/docs/apiref.adoc @@ -593,8 +593,6 @@ HostConfig contains all configuration parameters of the host operator | *`deactivation`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-deactivationconfig[$$DeactivationConfig$$]__ | Keeps parameters concerned with user deactivation + | | Optional: \{} + -| *`metrics`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-metricsconfig[$$MetricsConfig$$]__ | Keeps parameters concerned with metrics + | | Optional: \{} + - | *`notifications`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-notificationsconfig[$$NotificationsConfig$$]__ | Keeps parameters concerned with notifications + | | Optional: \{} + | *`registrationService`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-registrationserviceconfig[$$RegistrationServiceConfig$$]__ | Keeps parameters necessary for the registration service + | | Optional: \{} + @@ -1003,8 +1001,6 @@ Member contains the status of a member cluster | *`apiEndpoint`* __string__ | APIEndpoint is the server API URL of the cluster + | | Optional: \{} + | *`clusterName`* __string__ | The cluster identifier + | | -| *`spaceCount`* __integer__ | Number of Spaces created within the member cluster + | | Optional: \{} + - | *`memberStatus`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-memberstatusstatus[$$MemberStatusStatus$$]__ | The array of member status objects + | | |=== @@ -1289,45 +1285,6 @@ Members contains all configuration for member operators |=== -[id="{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-metric"] -==== Metric - -_Underlying type:_ _object_ - - - - - -.Appears In: -**** -- xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-toolchainstatusstatus[$$ToolchainStatusStatus$$] -**** - - - -[id="{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-metricsconfig"] -==== MetricsConfig - - - -MetricsConfig contains all configuration parameters related to metrics gathering - - - -.Appears In: -**** -- xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-hostconfig[$$HostConfig$$] -**** - -[cols="20a,50a,15a,15a", options="header"] -|=== -| Field | Description | Default | Validation -| *`forceSynchronization`* __boolean__ | ForceSynchronization is a flag used to trigger synchronization of the metrics + -based on the resources rather than on the content of `ToolchainStatus.status.metrics` + | | Optional: \{} + - -|=== - - [id="{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-nstemplateset"] ==== NSTemplateSet @@ -3718,8 +3675,6 @@ ToolchainStatusStatus defines the observed state of the toolchain, including hos | *`members`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-member[$$Member$$] array__ | Members is an array of member status objects + | | Optional: \{} + -| *`metrics`* __object (keys:string, values:xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-metric[$$Metric$$])__ | Metrics is a map that stores metrics to be exposed on Prometheus. + | | Optional: \{} + - | *`hostRoutes`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-hostroutes[$$HostRoutes$$]__ | HostRoutes/URLs of the host cluster, such as Proxy URL + | | Optional: \{} + | *`conditions`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-condition[$$Condition$$] array__ | Conditions is an array of the current overall toolchain status conditions + diff --git a/api/v1alpha1/toolchainconfig_types.go b/api/v1alpha1/toolchainconfig_types.go index f8fd99c9..597286bd 100644 --- a/api/v1alpha1/toolchainconfig_types.go +++ b/api/v1alpha1/toolchainconfig_types.go @@ -52,10 +52,6 @@ type HostConfig struct { // +optional Deactivation DeactivationConfig `json:"deactivation,omitempty"` - // Keeps parameters concerned with metrics - // +optional - Metrics MetricsConfig `json:"metrics,omitempty"` - // Keeps parameters concerned with notifications // +optional Notifications NotificationsConfig `json:"notifications,omitempty"` @@ -152,15 +148,6 @@ type ToolchainSecret struct { Ref *string `json:"ref,omitempty"` } -// MetricsConfig contains all configuration parameters related to metrics gathering -// +k8s:openapi-gen=true -type MetricsConfig struct { - // ForceSynchronization is a flag used to trigger synchronization of the metrics - // based on the resources rather than on the content of `ToolchainStatus.status.metrics` - // +optional - ForceSynchronization *bool `json:"forceSynchronization,omitempty"` -} - // NotificationsConfig contains all configuration parameters related to notifications // +k8s:openapi-gen=true type NotificationsConfig struct { diff --git a/api/v1alpha1/toolchainstatus_types.go b/api/v1alpha1/toolchainstatus_types.go index e21d555e..3ca12089 100644 --- a/api/v1alpha1/toolchainstatus_types.go +++ b/api/v1alpha1/toolchainstatus_types.go @@ -52,12 +52,6 @@ const ( ToolchainStatusMemberToolchainClusterMissingReason = "MemberToolchainClusterMissing" ToolchainStatusMemberStatusConsoleRouteUnavailableReason = "ConsoleRouteUnavailable" ToolchainStatusMemberStatusRoutesAvailableReason = "RoutesAvailable" - - // Metric Keys - // MasterUserRecordsPerDomainMetricKey the key to store the metric for the number of MasterUserRecords per email address domain - MasterUserRecordsPerDomainMetricKey = "masterUserRecordsPerDomain" - // UserSignupsPerActivationAndDomainMetricKey the key to store the metric for the number of UserSignups per activations and per email address domain - UserSignupsPerActivationAndDomainMetricKey = "userSignupsPerActivationAndDomain" ) // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. @@ -93,12 +87,6 @@ type ToolchainStatusStatus struct { // +listMapKey=clusterName Members []Member `json:"members,omitempty" patchStrategy:"merge" patchMergeKey:"clusterName"` - // Metrics is a map that stores metrics to be exposed on Prometheus. - // +optional - // +mapType=atomic - // +patchStrategy=merge - Metrics map[string]Metric `json:"metrics,omitempty" patchStrategy:"merge"` - // HostRoutes/URLs of the host cluster, such as Proxy URL // +optional HostRoutes HostRoutes `json:"hostRoutes,omitempty"` @@ -130,8 +118,6 @@ type HostRoutes struct { Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` } -type Metric map[string]int - // HostOperatorStatus defines the observed state of a toolchain's host operator // +k8s:openapi-gen=true type HostOperatorStatus struct { @@ -229,10 +215,6 @@ type Member struct { // The cluster identifier ClusterName string `json:"clusterName"` - // Number of Spaces created within the member cluster - // +optional - SpaceCount int `json:"spaceCount,omitempty"` - // The array of member status objects MemberStatus MemberStatusStatus `json:"memberStatus"` } @@ -271,7 +253,6 @@ type RevisionCheck struct { // +k8s:openapi-gen=true // +kubebuilder:subresource:status // +kubebuilder:resource:scope=Namespaced -// +kubebuilder:printcolumn:name="MURs",type="integer",JSONPath=`.status.hostOperator.masterUserRecordCount` // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=`.status.conditions[?(@.type=="Ready")].status` // +kubebuilder:printcolumn:name="Last Updated",type="string",JSONPath=`.status.conditions[?(@.type=="Ready")].lastUpdatedTime` // +kubebuilder:validation:XPreserveUnknownFields diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index a48cf053..94364f9a 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -434,7 +434,6 @@ func (in *HostConfig) DeepCopyInto(out *HostConfig) { } in.AutomaticApproval.DeepCopyInto(&out.AutomaticApproval) in.Deactivation.DeepCopyInto(&out.Deactivation) - in.Metrics.DeepCopyInto(&out.Metrics) in.Notifications.DeepCopyInto(&out.Notifications) in.RegistrationService.DeepCopyInto(&out.RegistrationService) in.Tiers.DeepCopyInto(&out.Tiers) @@ -1089,47 +1088,6 @@ func (in *Members) DeepCopy() *Members { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in Metric) DeepCopyInto(out *Metric) { - { - in := &in - *out = make(Metric, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metric. -func (in Metric) DeepCopy() Metric { - if in == nil { - return nil - } - out := new(Metric) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MetricsConfig) DeepCopyInto(out *MetricsConfig) { - *out = *in - if in.ForceSynchronization != nil { - in, out := &in.ForceSynchronization, &out.ForceSynchronization - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsConfig. -func (in *MetricsConfig) DeepCopy() *MetricsConfig { - if in == nil { - return nil - } - out := new(MetricsConfig) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NSTemplateSet) DeepCopyInto(out *NSTemplateSet) { *out = *in @@ -3470,24 +3428,6 @@ func (in *ToolchainStatusStatus) DeepCopyInto(out *ToolchainStatusStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.Metrics != nil { - in, out := &in.Metrics, &out.Metrics - *out = make(map[string]Metric, len(*in)) - for key, val := range *in { - var outVal map[string]int - if val == nil { - (*out)[key] = nil - } else { - inVal := (*in)[key] - in, out := &inVal, &outVal - *out = make(Metric, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - (*out)[key] = outVal - } - } in.HostRoutes.DeepCopyInto(&out.HostRoutes) if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions diff --git a/api/v1alpha1/zz_generated.openapi.go b/api/v1alpha1/zz_generated.openapi.go index 55ff93e8..e11ca24b 100644 --- a/api/v1alpha1/zz_generated.openapi.go +++ b/api/v1alpha1/zz_generated.openapi.go @@ -58,7 +58,6 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/codeready-toolchain/api/api/v1alpha1.MemberStatusSpec": schema_codeready_toolchain_api_api_v1alpha1_MemberStatusSpec(ref), "github.com/codeready-toolchain/api/api/v1alpha1.MemberStatusStatus": schema_codeready_toolchain_api_api_v1alpha1_MemberStatusStatus(ref), "github.com/codeready-toolchain/api/api/v1alpha1.Members": schema_codeready_toolchain_api_api_v1alpha1_Members(ref), - "github.com/codeready-toolchain/api/api/v1alpha1.MetricsConfig": schema_codeready_toolchain_api_api_v1alpha1_MetricsConfig(ref), "github.com/codeready-toolchain/api/api/v1alpha1.NSTemplateSet": schema_codeready_toolchain_api_api_v1alpha1_NSTemplateSet(ref), "github.com/codeready-toolchain/api/api/v1alpha1.NSTemplateSetClusterResources": schema_codeready_toolchain_api_api_v1alpha1_NSTemplateSetClusterResources(ref), "github.com/codeready-toolchain/api/api/v1alpha1.NSTemplateSetNamespace": schema_codeready_toolchain_api_api_v1alpha1_NSTemplateSetNamespace(ref), @@ -593,13 +592,6 @@ func schema_codeready_toolchain_api_api_v1alpha1_HostConfig(ref common.Reference Ref: ref("github.com/codeready-toolchain/api/api/v1alpha1.DeactivationConfig"), }, }, - "metrics": { - SchemaProps: spec.SchemaProps{ - Description: "Keeps parameters concerned with metrics", - Default: map[string]interface{}{}, - Ref: ref("github.com/codeready-toolchain/api/api/v1alpha1.MetricsConfig"), - }, - }, "notifications": { SchemaProps: spec.SchemaProps{ Description: "Keeps parameters concerned with notifications", @@ -652,7 +644,7 @@ func schema_codeready_toolchain_api_api_v1alpha1_HostConfig(ref common.Reference }, }, Dependencies: []string{ - "github.com/codeready-toolchain/api/api/v1alpha1.AutomaticApprovalConfig", "github.com/codeready-toolchain/api/api/v1alpha1.DeactivationConfig", "github.com/codeready-toolchain/api/api/v1alpha1.MetricsConfig", "github.com/codeready-toolchain/api/api/v1alpha1.NotificationsConfig", "github.com/codeready-toolchain/api/api/v1alpha1.PublicViewerConfiguration", "github.com/codeready-toolchain/api/api/v1alpha1.RegistrationServiceConfig", "github.com/codeready-toolchain/api/api/v1alpha1.SpaceConfig", "github.com/codeready-toolchain/api/api/v1alpha1.TiersConfig", "github.com/codeready-toolchain/api/api/v1alpha1.ToolchainStatusConfig", "github.com/codeready-toolchain/api/api/v1alpha1.UsersConfig"}, + "github.com/codeready-toolchain/api/api/v1alpha1.AutomaticApprovalConfig", "github.com/codeready-toolchain/api/api/v1alpha1.DeactivationConfig", "github.com/codeready-toolchain/api/api/v1alpha1.NotificationsConfig", "github.com/codeready-toolchain/api/api/v1alpha1.PublicViewerConfiguration", "github.com/codeready-toolchain/api/api/v1alpha1.RegistrationServiceConfig", "github.com/codeready-toolchain/api/api/v1alpha1.SpaceConfig", "github.com/codeready-toolchain/api/api/v1alpha1.TiersConfig", "github.com/codeready-toolchain/api/api/v1alpha1.ToolchainStatusConfig", "github.com/codeready-toolchain/api/api/v1alpha1.UsersConfig"}, } } @@ -1233,13 +1225,6 @@ func schema_codeready_toolchain_api_api_v1alpha1_Member(ref common.ReferenceCall Format: "", }, }, - "spaceCount": { - SchemaProps: spec.SchemaProps{ - Description: "Number of Spaces created within the member cluster", - Type: []string{"integer"}, - Format: "int32", - }, - }, "memberStatus": { SchemaProps: spec.SchemaProps{ Description: "The array of member status objects", @@ -1537,26 +1522,6 @@ func schema_codeready_toolchain_api_api_v1alpha1_Members(ref common.ReferenceCal } } -func schema_codeready_toolchain_api_api_v1alpha1_MetricsConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MetricsConfig contains all configuration parameters related to metrics gathering", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "forceSynchronization": { - SchemaProps: spec.SchemaProps{ - Description: "ForceSynchronization is a flag used to trigger synchronization of the metrics based on the resources rather than on the content of `ToolchainStatus.status.metrics`", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - } -} - func schema_codeready_toolchain_api_api_v1alpha1_NSTemplateSet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -4734,36 +4699,6 @@ func schema_codeready_toolchain_api_api_v1alpha1_ToolchainStatusStatus(ref commo }, }, }, - "metrics": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Metrics is a map that stores metrics to be exposed on Prometheus.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - }, - }, - }, "hostRoutes": { SchemaProps: spec.SchemaProps{ Description: "HostRoutes/URLs of the host cluster, such as Proxy URL",