generated from crossplane/provider-template
/
environment_types.go
68 lines (53 loc) · 2.33 KB
/
environment_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
59
60
61
62
63
64
65
66
67
68
package v1alpha1
import (
"reflect"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
)
// EnvironmentParameters are the configurable fields of a Environment.
type EnvironmentParameters struct {
ConfigurableField string `json:"configurableField"`
}
// EnvironmentObservation are the observable fields of a Environment.
type EnvironmentObservation struct {
ObservableField string `json:"observableField,omitempty"`
}
// An EnvironmentSpec defines the desired state of a Environment.
type EnvironmentSpec struct {
xpv1.ResourceSpec `json:",inline"`
ForProvider EnvironmentParameters `json:"forProvider"`
}
// An EnvironmentStatus represents the observed state of a Environment.
type EnvironmentStatus struct {
xpv1.ResourceStatus `json:",inline"`
AtProvider EnvironmentObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// A Environment is an example API type.
// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status"
// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,template}
type Environment struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec EnvironmentSpec `json:"spec"`
Status EnvironmentStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// EnvironmentList contains a list of Environment
type EnvironmentList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Environment `json:"items"`
}
// Environment type metadata.
var (
EnvironmentKind = reflect.TypeOf(Environment{}).Name()
EnvironmentGroupKind = schema.GroupKind{Group: Group, Kind: EnvironmentKind}.String()
EnvironmentKindAPIVersion = EnvironmentKind + "." + SchemeGroupVersion.String()
EnvironmentGroupVersionKind = SchemeGroupVersion.WithKind(EnvironmentKind)
)