1
0
mirror of https://github.com/rancher/types.git synced 2025-08-31 21:00:16 +00:00

change to app, mapping catalogKind, track tag on catalog

This commit is contained in:
Daishan Peng
2018-02-01 15:14:07 -07:00
committed by Darren Shepherd
parent fbf9301cbc
commit bb5aa0187b
3 changed files with 12 additions and 6 deletions

View File

@@ -25,6 +25,12 @@ type CatalogSpec struct {
type CatalogStatus struct {
LastRefreshTimestamp string `json:"lastRefreshTimestamp,omitempty"`
Commit string `json:"commit,omitempty"`
// helmVersionCommits records hash of each helm template version
HelmVersionCommits map[string]VersionCommits `json:"helmVersionCommits,omitempty"`
}
type VersionCommits struct {
Value map[string]string `json:"Value,omitempty"`
}
type Template struct {

View File

@@ -214,7 +214,7 @@ func authnTypes(schemas *types.Schemas) *types.Schemas {
func stackTypes(schema *types.Schemas) *types.Schemas {
return schema.
MustImportAndCustomize(&Version, v3.Stack{}, func(schema *types.Schema) {
MustImportAndCustomize(&Version, v3.App{}, func(schema *types.Schema) {
schema.ResourceActions = map[string]types.Action{
"upgrade": {
Input: "templateVersionId",

View File

@@ -5,16 +5,16 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type Stack struct {
type App struct {
types.Namespaced
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec StackSpec `json:"spec,omitempty"`
Status StackStatus `json:"status,omitempty"`
Spec AppSpec `json:"spec,omitempty"`
Status AppStatus `json:"status,omitempty"`
}
type StackSpec struct {
type AppSpec struct {
ProjectName string `json:"projectName,omitempty" norman:"type=reference[project]"`
Description string `json:"description,omitempty"`
InstallNamespace string `json:"installNamespace,omitempty"`
@@ -27,7 +27,7 @@ type StackSpec struct {
Groups []string `json:"groups,omitempty"`
}
type StackStatus struct {
type AppStatus struct {
Releases []ReleaseInfo `json:"releases,omitempty"`
}