/
oam_types.go
49 lines (42 loc) · 1.16 KB
/
oam_types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package v3
import (
projectv3 "github.com/hd-Li/types/apis/project.cattle.io/v3"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
/*
apiVersion: core.oam.dev/v1alpha1
kind: ComponentSchematic
metadata:
name: frontend
annotations:
version: "1.0.0"
description: Node.js Web Server
spec:
workloadType: core.oam.dev/v1alpha1.Server
parameters:
- name: database
type: string
required: false
containers:
- name: frontend
ports:
- containerPort: 3000
name: http
image: janakiramm/todo:v1
env:
- name: DB
value: db
fromParam: database*/
type AppTraits struct{}
type ApplicationConfigurationSpec struct {
Parameters []projectv3.Parameter `json:"parameters,omitempty"`
Components []projectv3.Component `json:"components"`
AppTraits AppTraits `json:"appTraits,omitempty"`
}
type ApplicationConfigurationTemplate struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ApplicationConfigurationSpec `json:"spec"`
Status ApplicationConfigurationStatus `json:"status,omitempty"`
}
type ApplicationConfigurationStatus struct{}