Skip to content

Commit

Permalink
Add required features to page and sections
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Mar 6, 2024
1 parent d59136d commit 545cf04
Show file tree
Hide file tree
Showing 19 changed files with 416 additions and 19 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ require (
kmodules.xyz/custom-resources v0.29.1
kmodules.xyz/go-containerregistry v0.0.12
kmodules.xyz/monitoring-agent-api v0.29.0
kmodules.xyz/resource-metadata v0.18.2-0.20240305072030-4af218cbf5cc
kmodules.xyz/resource-metadata v0.18.2-0.20240306074651-039a1764f682
kmodules.xyz/resource-metrics v0.29.1
kmodules.xyz/sets v0.29.0
kubeops.dev/falco-ui-server v0.0.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3478,8 +3478,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.29.0 h1:GHLhxxT9jU1N8+FvOCCeJNyU5g0duYS46UGrs6AHNLY=
kmodules.xyz/offshoot-api v0.29.0/go.mod h1:5NxhBblXoDHWStx9HCDJR2KFTwYjEZ7i1Id3jelIunw=
kmodules.xyz/resource-metadata v0.18.2-0.20240305072030-4af218cbf5cc h1:71zh3d5bhL8GnT00sw/X/yMtO6BbaCRMnaM6eRs6SkI=
kmodules.xyz/resource-metadata v0.18.2-0.20240305072030-4af218cbf5cc/go.mod h1:/PzX1PGdN2IC7u4OMlZq11wlLHEePD+mynw6hwOozPk=
kmodules.xyz/resource-metadata v0.18.2-0.20240306074651-039a1764f682 h1:UzGyYLiMxouvi6765b1R6iAb7v7plJwU+fLVBHo1kxY=
kmodules.xyz/resource-metadata v0.18.2-0.20240306074651-039a1764f682/go.mod h1:/PzX1PGdN2IC7u4OMlZq11wlLHEePD+mynw6hwOozPk=
kmodules.xyz/resource-metrics v0.29.1 h1:gP4SNosdDGFImpne52mnQtHacmnllYkTMcYL//p/ltM=
kmodules.xyz/resource-metrics v0.29.1/go.mod h1:OuG/QobZ7o8GFHl/u3lqaUR0fDZDegxtV8Vdh+MNBD4=
kmodules.xyz/sets v0.29.0 h1:ZX/qOECzUob95JhhRtngJElHSlJ1UNNdwK4hTEy+nl0=
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 @@ -54,8 +54,10 @@ type ResourceLayoutSpec struct {
}

type ResourcePageLayout struct {
Name string `json:"name"`
Sections []SectionLayout `json:"sections,omitempty"`
Name string `json:"name"`
// +optional
RequiredFeatureSets map[string]FeatureList `json:"requiredFeatureSets,omitempty"`
Sections []SectionLayout `json:"sections,omitempty"`
}

type SectionLayout struct {
Expand All @@ -64,6 +66,8 @@ type SectionLayout struct {
Info *PageBlockLayout `json:"info,omitempty"`
Insight *PageBlockLayout `json:"insight,omitempty"`
Blocks []PageBlockLayout `json:"blocks,omitempty"`
// +optional
RequiredFeatureSets map[string]FeatureList `json:"requiredFeatureSets,omitempty"`
}

type PageBlockLayout struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ type ResourceOutlineSpec struct {
}

type ResourcePageOutline struct {
Name string `json:"name"`
Sections []SectionOutline `json:"sections,omitempty"`
Name string `json:"name"`
// +optional
RequiredFeatureSets map[string]FeatureList `json:"requiredFeatureSets,omitempty"`
Sections []SectionOutline `json:"sections,omitempty"`
}

type SectionOutline struct {
Expand All @@ -65,6 +67,8 @@ type SectionOutline struct {
Info *PageBlockOutline `json:"info,omitempty"`
Insight *PageBlockOutline `json:"insight,omitempty"`
Blocks []PageBlockOutline `json:"blocks,omitempty"`
// +optional
RequiredFeatureSets map[string]FeatureList `json:"requiredFeatureSets,omitempty"`
}

// +kubebuilder:validation:Enum=Block;Self;SubTable;Connection;Custom
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 @@ -273,6 +273,12 @@ spec:
properties:
name:
type: string
requiredFeatureSets:
additionalProperties:
items:
type: string
type: array
type: object
sections:
items:
properties:
Expand Down Expand Up @@ -1035,6 +1041,12 @@ spec:
type: object
name:
type: string
requiredFeatureSets:
additionalProperties:
items:
type: string
type: array
type: object
type: object
type: array
required:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,12 @@ spec:
properties:
name:
type: string
requiredFeatureSets:
additionalProperties:
items:
type: string
type: array
type: object
sections:
items:
properties:
Expand Down Expand Up @@ -1130,6 +1136,12 @@ spec:
type: object
name:
type: string
requiredFeatureSets:
additionalProperties:
items:
type: string
type: array
type: object
type: object
type: array
required:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ spec:
- kubedb
- kubedb-opscenter
- name: Insights
requiredFeatureSets:
opscenter-datastore:
- kubedb
- kubedb-opscenter
opscenter-monitoring:
- monitoring-operator
sections:
- blocks:
- actions:
Expand Down Expand Up @@ -344,6 +350,10 @@ spec:
view:
name: supervisor.appscode.com-v1alpha1-recommendations-kubedb
- name: Backups
requiredFeatureSets:
opscenter-backup:
- stash
- stash-opscenter
sections:
- blocks:
- actions:
Expand Down Expand Up @@ -419,6 +429,9 @@ spec:
- kind: Custom
name: CVE Report
name: CVE Report
requiredFeatureSets:
opscenter-security:
- scanner
- blocks:
- kind: Block
name: rbac.authorization.k8s.io-v1-accesscontrols
Expand All @@ -427,14 +440,27 @@ spec:
- kind: Block
name: cert-manager.io-v1-tls
name: TLS
requiredFeatureSets:
opscenter-security:
- cert-manager
- blocks:
- kind: Block
name: policy-v1-policies
name: Policies
requiredFeatureSets:
opscenter-security:
- gatekeeper
- gatekeeper-templates
- gatekeeper-constraints
- gatekeeper-grafana-dashboards
- blocks:
- kind: Block
name: falco.appscode.com-v1alpha1-falcoevents-app
name: Runtime Security
requiredFeatureSets:
opscenter-security:
- falco
- falco-ui-server
resource:
group: kubedb.com
kind: Elasticsearch
Expand Down
Loading

0 comments on commit 545cf04

Please sign in to comment.