@@ -28,7 +28,8 @@ type DummySpec struct {
2828 // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
2929 // Important: Run "make" to regenerate code after modifying this file
3030
31- // Message is an example field of Dummy.
31+ // Message is a field of Dummy Spec.
32+ // +kubebuilder:default:="I'm just a dummy"
3233 // +operator-sdk:csv:customresourcedefinitions:type=spec
3334 Message string `json:"message,omitempty"`
3435}
@@ -38,13 +39,20 @@ type DummyStatus struct {
3839 // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
3940 // Important: Run "make" to regenerate code after modifying this file
4041
41- // SpecEcho is an example field of Dummy Status.
42+ // SpecEcho is an field of Dummy Status.
43+ // +kubebuilder:default:="I'm just a dummy"
4244 // +operator-sdk:csv:customresourcedefinitions:type=status
4345 SpecEcho string `json:"specEcho,omitempty"`
46+
47+ // PodStatus is an field of Dummy Status.
48+ // +kubebuilder:default:="Pending"
49+ // +operator-sdk:csv:customresourcedefinitions:type=status
50+ PodStatus string `json:"podStatus,omitempty"`
4451}
4552
4653//+kubebuilder:object:root=true
4754//+kubebuilder:subresource:status
55+ //+kubebuilder:resource:scope=Namespaced
4856
4957// Dummy is the Schema for the dummies API
5058type Dummy struct {
@@ -65,5 +73,13 @@ type DummyList struct {
6573}
6674
6775func init () {
68- SchemeBuilder .Register (& Dummy {}, & DummyList {})
76+ SchemeBuilder .Register (& Dummy {
77+ Spec : DummySpec {
78+ Message : "I'm just a dummy" ,
79+ },
80+ Status : DummyStatus {
81+ SpecEcho : "I'm just a dummy" ,
82+ PodStatus : "Pending" ,
83+ },
84+ }, & DummyList {})
6985}
0 commit comments