Skip to content

Commit e72170f

Browse files
committed
update crds
1 parent 7cb3f50 commit e72170f

31 files changed

Lines changed: 146 additions & 785 deletions

api/pkg/apis/v1alpha1/model/campaign.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,11 @@ func (c ActivationState) DeepEquals(other IDeepEquals) (bool, error) {
126126
}
127127

128128
type CampaignSpec struct {
129-
FirstStage string `json:"firstStage,omitempty"`
130-
Stages map[string]StageSpec `json:"stages,omitempty"`
131-
SelfDriving bool `json:"selfDriving,omitempty"`
129+
FirstStage string `json:"firstStage,omitempty"`
130+
Stages map[string]StageSpec `json:"stages,omitempty"`
131+
SelfDriving bool `json:"selfDriving,omitempty"`
132+
Version string `json:"version,omitempty"`
133+
RootResource string `json:"rootResource,omitempty"`
132134
}
133135

134136
func (c CampaignSpec) DeepEquals(other IDeepEquals) (bool, error) {

api/pkg/apis/v1alpha1/model/campaigncontainer.go

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,19 @@ import (
1111
)
1212

1313
type CampaignContainerState struct {
14-
ObjectMeta ObjectMeta `json:"metadata,omitempty"`
15-
Spec *CampaignContainerSpec `json:"spec,omitempty"`
14+
ObjectMeta ObjectMeta `json:"metadata,omitempty"`
15+
Spec *CampaignContainerSpec `json:"spec,omitempty"`
16+
Status *CampaignContainerStatus `json:"status,omitempty"`
1617
}
1718

1819
type CampaignContainerSpec struct {
19-
Name string `json:"name,omitempty"`
2020
}
2121

22-
func (c CampaignContainerSpec) DeepEquals(other IDeepEquals) (bool, error) {
23-
otherC, ok := other.(CampaignContainerSpec)
24-
if !ok {
25-
return false, errors.New("parameter is not a CampaignContainerSpec type")
26-
}
27-
28-
if c.Name != otherC.Name {
29-
return false, nil
30-
}
22+
type CampaignContainerStatus struct {
23+
Properties map[string]string `json:"properties"`
24+
}
3125

26+
func (c CampaignContainerSpec) DeepEquals(other IDeepEquals) (bool, error) {
3227
return true, nil
3328
}
3429

api/pkg/apis/v1alpha1/model/catalog.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@ type ObjectRef struct {
3131
Metadata map[string]string `json:"metadata,omitempty"`
3232
}
3333
type CatalogSpec struct {
34-
Type string `json:"type"`
35-
Metadata map[string]string `json:"metadata,omitempty"`
36-
Properties map[string]interface{} `json:"properties"`
37-
ParentName string `json:"parentName,omitempty"`
38-
ObjectRef ObjectRef `json:"objectRef,omitempty"`
39-
Generation string `json:"generation,omitempty"`
34+
Type string `json:"type"`
35+
Metadata map[string]string `json:"metadata,omitempty"`
36+
Properties map[string]interface{} `json:"properties"`
37+
ParentName string `json:"parentName,omitempty"`
38+
ObjectRef ObjectRef `json:"objectRef,omitempty"`
39+
Generation string `json:"generation,omitempty"`
40+
Version string `json:"version,omitempty"`
41+
RootResource string `json:"rootResource,omitempty"`
4042
}
4143

4244
type CatalogStatus struct {

api/pkg/apis/v1alpha1/model/catalogcontainer.go

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,19 @@ import (
1212

1313
// TODO: all state objects should converge to this paradigm: id, spec and status
1414
type CatalogContainerState struct {
15-
ObjectMeta ObjectMeta `json:"metadata,omitempty"`
16-
Spec *CatalogContainerSpec `json:"spec,omitempty"`
15+
ObjectMeta ObjectMeta `json:"metadata,omitempty"`
16+
Spec *CatalogContainerSpec `json:"spec,omitempty"`
17+
Status *CatalogContainerStatus `json:"status,omitempty"`
1718
}
1819

1920
type CatalogContainerSpec struct {
20-
Name string `json:"name"`
2121
}
2222

23-
func (c CatalogContainerSpec) DeepEquals(other IDeepEquals) (bool, error) {
24-
otherC, ok := other.(CatalogContainerSpec)
25-
if !ok {
26-
return false, errors.New("parameter is not a CatalogContainerSpec type")
27-
}
28-
29-
if c.Name != otherC.Name {
30-
return false, nil
31-
}
23+
type CatalogContainerStatus struct {
24+
Properties map[string]string `json:"properties"`
25+
}
3226

27+
func (c CatalogContainerSpec) DeepEquals(other IDeepEquals) (bool, error) {
3328
return true, nil
3429
}
3530

api/pkg/apis/v1alpha1/model/instance.go

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,18 @@ type (
2323
// InstanceSpec defines the spec property of the InstanceState
2424
// +kubebuilder:object:generate=true
2525
InstanceSpec struct {
26-
DisplayName string `json:"displayName,omitempty"`
27-
Scope string `json:"scope,omitempty"`
28-
Parameters map[string]string `json:"parameters,omitempty"` //TODO: Do we still need this?
29-
Metadata map[string]string `json:"metadata,omitempty"`
30-
Solution string `json:"solution"`
31-
Target TargetSelector `json:"target,omitempty"`
32-
Topologies []TopologySpec `json:"topologies,omitempty"`
33-
Pipelines []PipelineSpec `json:"pipelines,omitempty"`
34-
Arguments map[string]map[string]string `json:"arguments,omitempty"`
35-
Generation string `json:"generation,omitempty"`
26+
DisplayName string `json:"displayName,omitempty"`
27+
Scope string `json:"scope,omitempty"`
28+
Parameters map[string]string `json:"parameters,omitempty"` //TODO: Do we still need this?
29+
Metadata map[string]string `json:"metadata,omitempty"`
30+
Solution string `json:"solution"`
31+
Target TargetSelector `json:"target,omitempty"`
32+
Topologies []TopologySpec `json:"topologies,omitempty"`
33+
Pipelines []PipelineSpec `json:"pipelines,omitempty"`
34+
Arguments map[string]map[string]string `json:"arguments,omitempty"`
35+
Generation string `json:"generation,omitempty"`
36+
Version string `json:"version,omitempty"`
37+
RootResource string `json:"rootResource,omitempty"`
3638
}
3739

3840
// TargertRefSpec defines the target the instance will deploy to

api/pkg/apis/v1alpha1/model/instancecontainer.go

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,19 @@ import (
1111
)
1212

1313
type InstanceContainerState struct {
14-
ObjectMeta ObjectMeta `json:"metadata,omitempty"`
15-
Spec *InstanceContainerSpec `json:"spec,omitempty"`
14+
ObjectMeta ObjectMeta `json:"metadata,omitempty"`
15+
Spec *InstanceContainerSpec `json:"spec,omitempty"`
16+
Status *InstanceContainerStatus `json:"status,omitempty"`
1617
}
1718

1819
type InstanceContainerSpec struct {
19-
Name string `json:"name,omitempty"`
2020
}
2121

22-
func (c InstanceContainerSpec) DeepEquals(other IDeepEquals) (bool, error) {
23-
otherC, ok := other.(InstanceContainerSpec)
24-
if !ok {
25-
return false, errors.New("parameter is not a InstanceContainerSpec type")
26-
}
27-
28-
if c.Name != otherC.Name {
29-
return false, nil
30-
}
22+
type InstanceContainerStatus struct {
23+
Properties map[string]string `json:"properties"`
24+
}
3125

26+
func (c InstanceContainerSpec) DeepEquals(other IDeepEquals) (bool, error) {
3227
return true, nil
3328
}
3429

api/pkg/apis/v1alpha1/model/solution.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ type (
1717
}
1818

1919
SolutionSpec struct {
20-
DisplayName string `json:"displayName,omitempty"`
21-
Metadata map[string]string `json:"metadata,omitempty"`
22-
Components []ComponentSpec `json:"components,omitempty"`
20+
DisplayName string `json:"displayName,omitempty"`
21+
Metadata map[string]string `json:"metadata,omitempty"`
22+
Components []ComponentSpec `json:"components,omitempty"`
23+
Version string `json:"version,omitempty"`
24+
RootResource string `json:"rootResource,omitempty"`
2325
}
2426
)
2527

api/pkg/apis/v1alpha1/model/solutioncontainer.go

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,19 @@ import (
1111
)
1212

1313
type SolutionContainerState struct {
14-
ObjectMeta ObjectMeta `json:"metadata,omitempty"`
15-
Spec *SolutionContainerSpec `json:"spec,omitempty"`
14+
ObjectMeta ObjectMeta `json:"metadata,omitempty"`
15+
Spec *SolutionContainerSpec `json:"spec,omitempty"`
16+
Status *SolutionContainerStatus `json:"status,omitempty"`
1617
}
1718

1819
type SolutionContainerSpec struct {
19-
Name string `json:"name,omitempty"`
2020
}
2121

22-
func (c SolutionContainerSpec) DeepEquals(other IDeepEquals) (bool, error) {
23-
otherC, ok := other.(SolutionContainerSpec)
24-
if !ok {
25-
return false, errors.New("parameter is not a SolutionContainerSpec type")
26-
}
27-
28-
if c.Name != otherC.Name {
29-
return false, nil
30-
}
22+
type SolutionContainerStatus struct {
23+
Properties map[string]string `json:"properties"`
24+
}
3125

26+
func (c SolutionContainerSpec) DeepEquals(other IDeepEquals) (bool, error) {
3227
return true, nil
3328
}
3429

api/pkg/apis/v1alpha1/model/target.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ type (
3131
Topologies []TopologySpec `json:"topologies,omitempty"`
3232
ForceRedeploy bool `json:"forceRedeploy,omitempty"`
3333
Generation string `json:"generation,omitempty"`
34+
Version string `json:"version,omitempty"`
35+
RootResource string `json:"rootResource,omitempty"`
3436
}
3537
)
3638

api/pkg/apis/v1alpha1/model/targetcontainer.go

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,19 @@ import (
1111
)
1212

1313
type TargetContainerState struct {
14-
ObjectMeta ObjectMeta `json:"metadata,omitempty"`
15-
Spec *TargetContainerSpec `json:"spec,omitempty"`
14+
ObjectMeta ObjectMeta `json:"metadata,omitempty"`
15+
Spec *TargetContainerSpec `json:"spec,omitempty"`
16+
Status *TargetContainerStatus `json:"status,omitempty"`
1617
}
1718

1819
type TargetContainerSpec struct {
19-
Name string `json:"name,omitempty"`
2020
}
2121

22-
func (c TargetContainerSpec) DeepEquals(other IDeepEquals) (bool, error) {
23-
otherC, ok := other.(TargetContainerSpec)
24-
if !ok {
25-
return false, errors.New("parameter is not a TargetContainerSpec type")
26-
}
27-
28-
if c.Name != otherC.Name {
29-
return false, nil
30-
}
22+
type TargetContainerStatus struct {
23+
Properties map[string]string `json:"properties"`
24+
}
3125

26+
func (c TargetContainerSpec) DeepEquals(other IDeepEquals) (bool, error) {
3227
return true, nil
3328
}
3429

0 commit comments

Comments
 (0)