/
rpaasflavor_types.go
58 lines (45 loc) · 1.74 KB
/
rpaasflavor_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
50
51
52
53
54
55
56
57
58
// Copyright 2020 tsuru authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// RpaasFlavorSpec defines the desired state of RpaasFlavor
type RpaasFlavorSpec struct {
// Description provides a human readable description about this flavor.
// +optional
Description string `json:"description,omitempty"`
// InstanceTemplate defines a template which allows to override the
// associated RpaasInstance.
// +optional
InstanceTemplate *RpaasInstanceSpec `json:"instanceTemplate,omitempty"`
// Default defines if the flavor should be applied by default on
// every service instance. Default flavors cannot be listed on RpaasFlavorList.
// +optional
Default bool `json:"default,omitempty"`
// CreationOnly defines if the flavor could be used only in the moment of creation of instance
// +optional
CreationOnly bool `json:"creationOnly,omitempty"`
// IncompatibleFlavors defines which other flavors cannot be used with this flavor
// +optional
IncompatibleFlavors []string `json:"incompatibleFlavors,omitempty"`
}
// +kubebuilder:object:root=true
// RpaasFlavor is the Schema for the rpaasflavors API
// +k8s:openapi-gen=true
type RpaasFlavor struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec RpaasFlavorSpec `json:"spec,omitempty"`
}
// +kubebuilder:object:root=true
// RpaasFlavorList contains a list of RpaasFlavor
type RpaasFlavorList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []RpaasFlavor `json:"items"`
}
func init() {
SchemeBuilder.Register(&RpaasFlavor{}, &RpaasFlavorList{})
}