Skip to content

Commit

Permalink
Disable features (#482)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored Sep 19, 2024
1 parent bda875e commit 4a8a167
Show file tree
Hide file tree
Showing 8 changed files with 137 additions and 28 deletions.
3 changes: 3 additions & 0 deletions apis/ui/v1alpha1/feature_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ type FeatureSpec struct {
// Required specifies whether this feature is mandatory or not for enabling the respecting FeatureSet.
// +optional
Recommended bool `json:"recommended,omitempty"`
// Disabled specify whether this feature set is disabled.
// +optional
Disabled bool `json:"disabled,omitempty"`
// Requirements specifies the requirements to enable this feature.
// +optional
Requirements Requirements `json:"requirements,omitempty"`
Expand Down
3 changes: 3 additions & 0 deletions apis/ui/v1alpha1/featureset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ type FeatureSetSpec struct {
// Required specify whether this feature set is mandatory or not for using the UI.
// +optional
Recommended bool `json:"recommended,omitempty"`
// Disabled specify whether this feature set is disabled.
// +optional
Disabled bool `json:"disabled,omitempty"`
// RequiredFeatures specifies list of features that are necessary to consider this feature set as ready.
// +optional
RequiredFeatures []string `json:"requiredFeatures,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,123 @@ spec:
required:
- usage
type: object
gateway:
properties:
hostname:
type: string
ip:
type: string
name:
type: string
namespace:
type: string
services:
description: Services is an optional configuration for services
used to expose database
items:
properties:
alias:
description: Alias represents the identifier of the service.
type: string
ports:
items:
description: GatewayPort contains information on Gateway
service's port.
properties:
backendServicePort:
description: Number of the port to access the backend
service.
format: int32
type: integer
name:
description: The name of this port within the gateway
service.
type: string
nodePort:
description: The port on each node on which this
gateway service is exposed when type is NodePort
or LoadBalancer.
format: int32
type: integer
port:
description: The port that will be exposed by the
gateway service.
format: int32
type: integer
required:
- port
type: object
type: array
required:
- alias
- ports
type: object
type: array
ui:
description: UI is an optional list of database web uis
items:
properties:
alias:
description: Alias represents the identifier of the service.
This should match the db ui chart name
type: string
helmRelease:
description: HelmRelease is the name of the helm release
used to deploy this ui The name format is typically
<alias>-<db-name>
properties:
name:
default: ""
description: 'Name of the referent. This field is
effectively required, but due to backwards compatibility
is allowed to be empty. Instances of this type with
an empty value here are almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind,
uid? More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen
doesn''t need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.'
type: string
type: object
x-kubernetes-map-type: atomic
port:
description: GatewayPort contains information on Gateway
service's port.
properties:
backendServicePort:
description: Number of the port to access the backend
service.
format: int32
type: integer
name:
description: The name of this port within the gateway
service.
type: string
nodePort:
description: The port on each node on which this gateway
service is exposed when type is NodePort or LoadBalancer.
format: int32
type: integer
port:
description: The port that will be exposed by the
gateway service.
format: int32
type: integer
required:
- port
type: object
url:
description: URL of the database ui
type: string
required:
- alias
- port
- url
type: object
type: array
required:
- name
- namespace
type: object
monitoring:
properties:
refs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ spec:
query:
properties:
byLabel:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -132,7 +132,6 @@ spec:
- ocm_bind
- offshoot
- ops
- placed_into
- policy
- recommended_for
- restore_into
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ spec:
properties:
labels:
items:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -85,7 +85,6 @@ spec:
- ocm_bind
- offshoot
- ops
- placed_into
- policy
- recommended_for
- restore_into
Expand Down Expand Up @@ -230,7 +229,7 @@ spec:
query:
properties:
byLabel:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -247,7 +246,6 @@ spec:
- ocm_bind
- offshoot
- ops
- placed_into
- policy
- recommended_for
- restore_into
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ spec:
query:
properties:
byLabel:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -133,7 +133,6 @@ spec:
- ocm_bind
- offshoot
- ops
- placed_into
- policy
- recommended_for
- restore_into
Expand Down Expand Up @@ -365,7 +364,7 @@ spec:
query:
properties:
byLabel:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -382,7 +381,6 @@ spec:
- ocm_bind
- offshoot
- ops
- placed_into
- policy
- recommended_for
- restore_into
Expand Down Expand Up @@ -631,7 +629,7 @@ spec:
query:
properties:
byLabel:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -648,7 +646,6 @@ spec:
- ocm_bind
- offshoot
- ops
- placed_into
- policy
- recommended_for
- restore_into
Expand Down Expand Up @@ -874,7 +871,7 @@ spec:
query:
properties:
byLabel:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -891,7 +888,6 @@ spec:
- ocm_bind
- offshoot
- ops
- placed_into
- policy
- recommended_for
- restore_into
Expand Down Expand Up @@ -1153,7 +1149,7 @@ spec:
query:
properties:
byLabel:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -1170,7 +1166,6 @@ spec:
- ocm_bind
- offshoot
- ops
- placed_into
- policy
- recommended_for
- restore_into
Expand Down
Loading

0 comments on commit 4a8a167

Please sign in to comment.