Skip to content

Commit

Permalink
Merge pull request #30 from RedHatInsights/notifier
Browse files Browse the repository at this point in the history
Add notifier field to Frontend spec, make args optional on method
  • Loading branch information
psav authored Apr 19, 2022
2 parents e108d43 + 273fb24 commit a806fa1
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 19 deletions.
3 changes: 2 additions & 1 deletion api/v1alpha1/bundle_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type BundlePermissionArgs []string

type BundlePermission struct {
Method string `json:"method" yaml:"method"`
Args []BundlePermissionArgs `json:"args" yaml:"args"`
Args []BundlePermissionArgs `json:"args,omitempty" yaml:"args,omitempty"`
}

type BundleNavItem struct {
Expand All @@ -50,6 +50,7 @@ type LeafBundleNavItem struct {
Product string `json:"product,omitempty" yaml:"product,omitempty"`
IsExternal bool `json:"isExternal,omitempty" yaml:"isExternal,omitempty"`
Filterable bool `json:"filterable,omitempty" yaml:"filterable,omitempty"`
Notifier string `json:"notifier,omitempty" yaml:"notifier,omitempty"`
Permissions []BundlePermission `json:"permissions,omitempty" yaml:"permissions,omitempty"`
}

Expand Down
14 changes: 8 additions & 6 deletions config/crd/bases/cloud.redhat.com_bundles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ spec:
type: string
isExternal:
type: boolean
notifier:
type: string
permissions:
items:
properties:
Expand All @@ -82,7 +84,6 @@ spec:
method:
type: string
required:
- args
- method
type: object
type: array
Expand All @@ -106,7 +107,6 @@ spec:
method:
type: string
required:
- args
- method
type: object
type: array
Expand All @@ -125,6 +125,8 @@ spec:
type: string
isExternal:
type: boolean
notifier:
type: string
permissions:
items:
properties:
Expand All @@ -137,7 +139,6 @@ spec:
method:
type: string
required:
- args
- method
type: object
type: array
Expand Down Expand Up @@ -191,6 +192,8 @@ spec:
type: string
isExternal:
type: boolean
notifier:
type: string
permissions:
items:
properties:
Expand All @@ -203,7 +206,6 @@ spec:
method:
type: string
required:
- args
- method
type: object
type: array
Expand All @@ -227,7 +229,6 @@ spec:
method:
type: string
required:
- args
- method
type: object
type: array
Expand All @@ -246,6 +247,8 @@ spec:
type: string
isExternal:
type: boolean
notifier:
type: string
permissions:
items:
properties:
Expand All @@ -258,7 +261,6 @@ spec:
method:
type: string
required:
- args
- method
type: object
type: array
Expand Down
7 changes: 4 additions & 3 deletions config/crd/bases/cloud.redhat.com_frontends.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ spec:
type: string
isExternal:
type: boolean
notifier:
type: string
permissions:
items:
properties:
Expand All @@ -154,7 +156,6 @@ spec:
method:
type: string
required:
- args
- method
type: object
type: array
Expand All @@ -178,7 +179,6 @@ spec:
method:
type: string
required:
- args
- method
type: object
type: array
Expand All @@ -197,6 +197,8 @@ spec:
type: string
isExternal:
type: boolean
notifier:
type: string
permissions:
items:
properties:
Expand All @@ -209,7 +211,6 @@ spec:
method:
type: string
required:
- args
- method
type: object
type: array
Expand Down
21 changes: 12 additions & 9 deletions deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ objects:
type: string
isExternal:
type: boolean
notifier:
type: string
permissions:
items:
properties:
Expand All @@ -92,7 +94,6 @@ objects:
method:
type: string
required:
- args
- method
type: object
type: array
Expand All @@ -116,7 +117,6 @@ objects:
method:
type: string
required:
- args
- method
type: object
type: array
Expand All @@ -135,6 +135,8 @@ objects:
type: string
isExternal:
type: boolean
notifier:
type: string
permissions:
items:
properties:
Expand All @@ -147,7 +149,6 @@ objects:
method:
type: string
required:
- args
- method
type: object
type: array
Expand Down Expand Up @@ -201,6 +202,8 @@ objects:
type: string
isExternal:
type: boolean
notifier:
type: string
permissions:
items:
properties:
Expand All @@ -213,7 +216,6 @@ objects:
method:
type: string
required:
- args
- method
type: object
type: array
Expand All @@ -237,7 +239,6 @@ objects:
method:
type: string
required:
- args
- method
type: object
type: array
Expand All @@ -256,6 +257,8 @@ objects:
type: string
isExternal:
type: boolean
notifier:
type: string
permissions:
items:
properties:
Expand All @@ -268,7 +271,6 @@ objects:
method:
type: string
required:
- args
- method
type: object
type: array
Expand Down Expand Up @@ -531,6 +533,8 @@ objects:
type: string
isExternal:
type: boolean
notifier:
type: string
permissions:
items:
properties:
Expand All @@ -543,7 +547,6 @@ objects:
method:
type: string
required:
- args
- method
type: object
type: array
Expand All @@ -567,7 +570,6 @@ objects:
method:
type: string
required:
- args
- method
type: object
type: array
Expand All @@ -586,6 +588,8 @@ objects:
type: string
isExternal:
type: boolean
notifier:
type: string
permissions:
items:
properties:
Expand All @@ -598,7 +602,6 @@ objects:
method:
type: string
required:
- args
- method
type: object
type: array
Expand Down
1 change: 1 addition & 0 deletions docs/antora/modules/ROOT/pages/api_reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ FrontendSpec defines the desired state of Frontend
| *`product`* __string__ |
| *`isExternal`* __boolean__ |
| *`filterable`* __boolean__ |
| *`notifier`* __string__ |
| *`permissions`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlepermission[$$BundlePermission$$]__ |
|===

Expand Down

0 comments on commit a806fa1

Please sign in to comment.