Skip to content

Commit

Permalink
Move apps.displayType to spec. (#3133)
Browse files Browse the repository at this point in the history
* Add type status hide/show system app.

Signed-off-by: zzjin <tczzjin@gmail.com>

* Fix typo

Signed-off-by: zzjin <tczzjin@gmail.com>

* Move status to spec displayType.

Signed-off-by: zzjin <tczzjin@gmail.com>

---------

Signed-off-by: zzjin <tczzjin@gmail.com>
  • Loading branch information
zzjin authored May 25, 2023
1 parent 99156c4 commit f010bc2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
20 changes: 17 additions & 3 deletions controllers/app/api/v1/app_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,25 @@ type MenuData struct {
HelpDocs string `json:"helpDocs,omitempty"`
}

type DisplayType string

// data types
const (
DisplayNormal DisplayType = "normal"
DisplayMore DisplayType = "more"
DisplayHidden DisplayType = "hidden"
)

// AppSpec defines the desired state of App
type AppSpec struct {
Name string `json:"name,omitempty"`
Icon string `json:"icon,omitempty"`
Type string `json:"type,omitempty"`
Name string `json:"name,omitempty"`
Icon string `json:"icon,omitempty"`
Type string `json:"type,omitempty"`

//+kubebuilder:validation:Enum={ normal, more, hidden, }
//+kubebuilder:validation:Optional
DisplayType DisplayType `json:"displayType,omitempty"`

Data Data `json:"data,omitempty"`
MenuData MenuData `json:"menuData,omitempty"`
}
Expand Down
6 changes: 6 additions & 0 deletions controllers/app/config/crd/bases/app.sealos.io_apps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ spec:
url:
type: string
type: object
displayType:
enum:
- normal
- more
- hidden
type: string
icon:
type: string
menuData:
Expand Down

0 comments on commit f010bc2

Please sign in to comment.