Skip to content

Commit

Permalink
Dev template (labring#3960)
Browse files Browse the repository at this point in the history
* Add app.sealos.io support template CRD.

Signed-off-by: zzjin <[email protected]>

* Combine GVK into one.

Signed-off-by: zzjin <[email protected]>

* Rebase ignore.

Signed-off-by: zzjin <[email protected]>

* Fix typo.

Signed-off-by: zzjin <[email protected]>

* Update yaml name.
Rebase controller version.

Signed-off-by: zzjin <[email protected]>

* Remove unused mod.

Signed-off-by: zzjin <[email protected]>

* Make pre-deploy to update.

Signed-off-by: zzjin <[email protected]>

* Fix default json tag.

Signed-off-by: zzjin <[email protected]>

---------

Signed-off-by: zzjin <[email protected]>
  • Loading branch information
zzjin committed Sep 19, 2023
1 parent 094ce77 commit 6f3c32c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 21 deletions.
2 changes: 1 addition & 1 deletion controllers/app/api/v1/template_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const (
type InputData struct {
Description string `json:"description,omitempty"`
Type InputDataType `json:"type"`
Default string `json:"value,omitempty"`
Default string `json:"default,omitempty"`
Required bool `json:"required,omitempty"`
}

Expand Down
4 changes: 2 additions & 2 deletions controllers/app/config/crd/bases/app.sealos.io_templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ spec:
inputs:
additionalProperties:
properties:
default:
type: string
description:
type: string
required:
type: boolean
type:
type: string
value:
type: string
required:
- type
type: object
Expand Down
4 changes: 2 additions & 2 deletions controllers/app/config/samples/app_v1beta1_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ metadata:
spec:
title: 'FastGpt'
url: 'https://fastgpt.run/'
git_repo: 'https://github.com/labring/FastGPT'
gitRepo: 'https://github.com/labring/FastGPT'
author: 'sealos'
description: 'Fast GPT allows you to use your own openai API KEY to quickly call the openai interface, currently integrating Gpt35, Gpt4 and embedding. You can build your own knowledge base.'
readme: 'https://raw.githubusercontent.com/labring/FastGPT/main/README.md'
icon: 'https://avatars.githubusercontent.com/u/50446880?s=96&v=4'
template_type: inline
templateType: inline
defaults:
app_name:
type: string
Expand Down
21 changes: 5 additions & 16 deletions controllers/app/deploy/manifests/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,47 +169,36 @@ spec:
type: object
description:
type: string
git_repo:
gitRepo:
type: string
icon:
type: string
inputs:
additionalProperties:
properties:
default:
type: string
description:
type: string
required:
type: boolean
type:
type: string
value:
type: string
required:
- description
- required
- type
- value
type: object
type: object
readme:
type: string
template_type:
templateType:
type: string
title:
type: string
url:
type: string
required:
- author
- defaults
- description
- git_repo
- icon
- inputs
- readme
- template_type
- templateType
- title
- url
type: object
status:
description: TemplateStatus defines the observed state of Template
Expand Down

0 comments on commit 6f3c32c

Please sign in to comment.