Skip to content

Commit

Permalink
Add feature disable api
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Sep 19, 2024
1 parent 7aeea53 commit a3c2e59
Show file tree
Hide file tree
Showing 14 changed files with 161 additions and 32 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ require (
kmodules.xyz/go-containerregistry v0.0.12
kmodules.xyz/monitoring-agent-api v0.29.0
kmodules.xyz/offshoot-api v0.30.1
kmodules.xyz/resource-metadata v0.18.14-0.20240917114603-bda875e59b47
kmodules.xyz/resource-metadata v0.18.14-0.20240919220938-f2e5f6b9d9eb
kmodules.xyz/resource-metrics v0.30.4
kmodules.xyz/resource-metrics/utils v0.30.4
kmodules.xyz/sets v0.29.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -927,8 +927,8 @@ kmodules.xyz/monitoring-agent-api v0.29.0 h1:gpFl6OZrlMLb/ySMHdREI9EwGtnJ91oZBn9
kmodules.xyz/monitoring-agent-api v0.29.0/go.mod h1:iNbvaMTgVFOI5q2LJtGK91j4Dmjv4ZRiRdasGmWLKQI=
kmodules.xyz/offshoot-api v0.30.1 h1:TrulAYO+oBsXe9sZZGTmNWIuI8qD2izMpgcTSPvgAmI=
kmodules.xyz/offshoot-api v0.30.1/go.mod h1:T3mpjR6fui0QzOcmQvIuANytW48fe9ytmy/1cgx6D4g=
kmodules.xyz/resource-metadata v0.18.14-0.20240917114603-bda875e59b47 h1:+TCtVnnqzTp8EX7CC6IAZlS8V7AmSYs3EQKNTElk7WI=
kmodules.xyz/resource-metadata v0.18.14-0.20240917114603-bda875e59b47/go.mod h1:6OFjG5wBSIG24xVgN/iOZcAh0fg/YNGYftAmJgF4bjc=
kmodules.xyz/resource-metadata v0.18.14-0.20240919220938-f2e5f6b9d9eb h1:0r1srqYHj0ol5nim4DbuofNor9Ij1L1b9S26vDcEdqQ=
kmodules.xyz/resource-metadata v0.18.14-0.20240919220938-f2e5f6b9d9eb/go.mod h1:6OFjG5wBSIG24xVgN/iOZcAh0fg/YNGYftAmJgF4bjc=
kmodules.xyz/resource-metrics v0.30.4 h1:8HBPtYmo9ETY91gsc55JE8Z986+3ZuRq57M0wZ9npqI=
kmodules.xyz/resource-metrics v0.30.4/go.mod h1:w9+rz7/s/kGP1GWzYSuRdCn+l7EwpesmESSEHkLBnIQ=
kmodules.xyz/resource-metrics/utils v0.30.4 h1:bJS/x0Qr7N1FFdxugFbzZ/Es6HVs4ptsFlhkmgj3jac=
Expand Down
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
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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ spec:
description: Description specifies a short description of the service
this feature provides.
type: string
disabled:
description: Disabled specify whether this feature set is disabled.
type: boolean
featureBlock:
description: FeatureBlock specifies the ui block name of this feature.
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ spec:
description: Description specifies a short description of the services
this feature set provides.
type: string
disabled:
description: Disabled specify whether this feature set is disabled.
type: boolean
icons:
description: Icons is an optional list of icons for an application.
Icon information includes the source, size, and mime type. These
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 a3c2e59

Please sign in to comment.