Skip to content

Commit

Permalink
Add search index to Frontend spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyperkid123 committed Oct 14, 2024
1 parent 4a3dd44 commit 2deaa51
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 0 deletions.
11 changes: 11 additions & 0 deletions api/v1alpha1/frontend_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ type ServiceMonitorConfig struct {
Disabled bool `json:"disabled,omitempty"`
}

type SearchEntry struct {
ID string `json:"id" yaml:"id"`
Href string `json:"href" yaml:"href"`
Title string `json:"title" yaml:"title"`
Description string `json:"description" yaml:"description"`
AltTitle []string `json:"alt_title" yaml:"alt_title"`
IsExternal bool `json:"isExternal" yaml:"isExternal"`
}

// FrontendSpec defines the desired state of Frontend
type FrontendSpec struct {
Disabled bool `json:"disabled,omitempty" yaml:"disabled,omitempty"`
Expand All @@ -57,6 +66,8 @@ type FrontendSpec struct {
AkamaiCacheBustDisable bool `json:"akamaiCacheBustDisable,omitempty" yaml:"akamaiCacheBustDisable,omitempty"`
// Files to cache bust
AkamaiCacheBustPaths []string `json:"akamaiCacheBustPaths,omitempty" yaml:"akamaiCacheBustPaths,omitempty"`
// The search index partials for the resource
SearchEntries []*SearchEntry `json:"searchEntries,omitempty" yaml:"searchEntries,omitempty"`
}

var ReconciliationSuccessful = "ReconciliationSuccessful"
Expand Down
31 changes: 31 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

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

27 changes: 27 additions & 0 deletions config/crd/bases/cloud.redhat.com_frontends.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,33 @@ spec:
- title
type: object
type: array
searchEntries:
description: The search index partials for the resource
items:
properties:
alt_title:
items:
type: string
type: array
description:
type: string
href:
type: string
id:
type: string
isExternal:
type: boolean
title:
type: string
required:
- alt_title
- description
- href
- id
- isExternal
- title
type: object
type: array
service:
type: string
serviceMonitor:
Expand Down
27 changes: 27 additions & 0 deletions deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,33 @@ objects:
- title
type: object
type: array
searchEntries:
description: The search index partials for the resource
items:
properties:
alt_title:
items:
type: string
type: array
description:
type: string
href:
type: string
id:
type: string
isExternal:
type: boolean
title:
type: string
required:
- alt_title
- description
- href
- id
- isExternal
- title
type: object
type: array
service:
type: string
serviceMonitor:
Expand Down

0 comments on commit 2deaa51

Please sign in to comment.