Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update app cr define. #5207

Merged
merged 4 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 23 additions & 12 deletions controllers/app/api/v1/template_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

type I18nData struct {
Title string `json:"title,omitempty"`
URL string `json:"url,omitempty"`
GitRepo string `json:"gitRepo,omitempty"`
Description string `json:"description,omitempty"`
Readme string `json:"readme,omitempty"`
Icon string `json:"icon,omitempty"`
}

type TemplateType string

const (
Expand Down Expand Up @@ -57,18 +66,20 @@ type InputData struct {
type Inputs map[string]InputData

type TemplateData struct {
Title string `json:"title"`
URL string `json:"url,omitempty"`
GitRepo string `json:"gitRepo,omitempty"`
Author string `json:"author,omitempty"`
Description string `json:"description,omitempty"`
Readme string `json:"readme,omitempty"`
Icon string `json:"icon,omitempty"`
TemplateType TemplateType `json:"templateType"`
Draft bool `json:"draft,omitempty"`
Categories []string `json:"categories,omitempty"`
Defaults Defaults `json:"defaults,omitempty"`
Inputs Inputs `json:"inputs,omitempty"`
Title string `json:"title"`
URL string `json:"url,omitempty"`
GitRepo string `json:"gitRepo,omitempty"`
Author string `json:"author,omitempty"`
Description string `json:"description,omitempty"`
Readme string `json:"readme,omitempty"`
Icon string `json:"icon,omitempty"`
TemplateType TemplateType `json:"templateType"`
Locale string `json:"locale,omitempty"`
I18n map[string]I18nData `json:"i18n,omitempty"`
Draft bool `json:"draft,omitempty"`
Categories []string `json:"categories,omitempty"`
Defaults Defaults `json:"defaults,omitempty"`
Inputs Inputs `json:"inputs,omitempty"`
}

// TemplateSpec defines the desired state of Template
Expand Down
22 changes: 22 additions & 0 deletions controllers/app/api/v1/zz_generated.deepcopy.go

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

21 changes: 20 additions & 1 deletion controllers/app/config/crd/bases/app.sealos.io_instances.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright © 2023 sealos.
# Copyright © 2024 sealos.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -72,6 +72,23 @@ spec:
type: boolean
gitRepo:
type: string
i18n:
additionalProperties:
properties:
description:
type: string
gitRepo:
type: string
icon:
type: string
readme:
type: string
title:
type: string
url:
type: string
type: object
type: object
icon:
type: string
inputs:
Expand All @@ -89,6 +106,8 @@ spec:
- type
type: object
type: object
locale:
type: string
readme:
type: string
templateType:
Expand Down
21 changes: 20 additions & 1 deletion controllers/app/config/crd/bases/app.sealos.io_templates.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright © 2023 sealos.
# Copyright © 2024 sealos.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -72,6 +72,23 @@ spec:
type: boolean
gitRepo:
type: string
i18n:
additionalProperties:
properties:
description:
type: string
gitRepo:
type: string
icon:
type: string
readme:
type: string
title:
type: string
url:
type: string
type: object
type: object
icon:
type: string
inputs:
Expand All @@ -89,6 +106,8 @@ spec:
- type
type: object
type: object
locale:
type: string
readme:
type: string
templateType:
Expand Down
Loading