@@ -65,12 +65,22 @@ type RabbitmqClusterSpec struct {
65
65
}
66
66
67
67
type RabbitmqClusterOverrideSpec struct {
68
- StatefulSet * StatefulSet `json:"statefulSet,omitempty"`
68
+ StatefulSet * StatefulSet `json:"statefulSet,omitempty"`
69
+ ClientService * ClientService `json:"clientService,omitempty"`
70
+ }
71
+
72
+ type ClientService struct {
73
+ // +optional
74
+ * EmbeddedLabelsAnnotations `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
75
+ // Spec defines the behavior of a service.
76
+ // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
77
+ // +optional
78
+ Spec * corev1.ServiceSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
69
79
}
70
80
71
81
type StatefulSet struct {
72
82
// +optional
73
- * EmbeddedObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
83
+ * EmbeddedLabelsAnnotations `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
74
84
// Spec defines the desired identities of pods in this set.
75
85
// +optional
76
86
Spec * StatefulSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
@@ -134,9 +144,26 @@ type StatefulSetSpec struct {
134
144
UpdateStrategy * appsv1.StatefulSetUpdateStrategy `json:"updateStrategy,omitempty" protobuf:"bytes,7,opt,name=updateStrategy"`
135
145
}
136
146
147
+ // It is used in ClientService and StatefulSet
148
+ type EmbeddedLabelsAnnotations struct {
149
+ // Map of string keys and values that can be used to organize and categorize
150
+ // (scope and select) objects. May match selectors of replication controllers
151
+ // and services.
152
+ // More info: http://kubernetes.io/docs/user-guide/labels
153
+ // +optional
154
+ Labels map [string ]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"`
155
+
156
+ // Annotations is an unstructured key value map stored with a resource that may be
157
+ // set by external tools to store and retrieve arbitrary metadata. They are not
158
+ // queryable and should be preserved when modifying objects.
159
+ // More info: http://kubernetes.io/docs/user-guide/annotations
160
+ // +optional
161
+ Annotations map [string ]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"`
162
+ }
163
+
137
164
// EmbeddedObjectMeta contains a subset of the fields included in k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta
138
165
// Only fields which are relevant to embedded resources are included.
139
- // It is used in StatefulSet, PersistentVolumeClaim, and PodTemplate
166
+ // It is used in PersistentVolumeClaim and PodTemplate
140
167
type EmbeddedObjectMeta struct {
141
168
// Name must be unique within a namespace. Is required when creating resources, although
142
169
// some resources may allow a client to request the generation of an appropriate name
0 commit comments