Skip to content

Commit beb51ff

Browse files
Merge branch 'master' into pgread
2 parents d832c10 + 690de81 commit beb51ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+896
-48
lines changed

apis/kubedb/v1/elasticsearch_types.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,3 +398,21 @@ const (
398398
ElasticsearchNodeRoleTypeTransform ElasticsearchNodeRoleType = "transform"
399399
ElasticsearchNodeRoleTypeCoordinating ElasticsearchNodeRoleType = "coordinating"
400400
)
401+
402+
var _ Accessor = &Elasticsearch{}
403+
404+
func (m *Elasticsearch) GetObjectMeta() metav1.ObjectMeta {
405+
return m.ObjectMeta
406+
}
407+
408+
func (m *Elasticsearch) GetConditions() []kmapi.Condition {
409+
return m.Status.Conditions
410+
}
411+
412+
func (m *Elasticsearch) SetCondition(cond kmapi.Condition) {
413+
m.Status.Conditions = setCondition(m.Status.Conditions, cond)
414+
}
415+
416+
func (m *Elasticsearch) RemoveCondition(typ string) {
417+
m.Status.Conditions = removeCondition(m.Status.Conditions, typ)
418+
}

apis/kubedb/v1/kafka_types.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,3 +245,21 @@ type KafkaList struct {
245245
metav1.ListMeta `json:"metadata,omitempty"`
246246
Items []Kafka `json:"items"`
247247
}
248+
249+
var _ Accessor = &Kafka{}
250+
251+
func (k *Kafka) GetObjectMeta() metav1.ObjectMeta {
252+
return k.ObjectMeta
253+
}
254+
255+
func (k *Kafka) GetConditions() []kmapi.Condition {
256+
return k.Status.Conditions
257+
}
258+
259+
func (k *Kafka) SetCondition(cond kmapi.Condition) {
260+
k.Status.Conditions = setCondition(k.Status.Conditions, cond)
261+
}
262+
263+
func (k *Kafka) RemoveCondition(typ string) {
264+
k.Status.Conditions = removeCondition(k.Status.Conditions, typ)
265+
}

apis/kubedb/v1/mariadb_types.go

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ type MariaDBSpec struct {
9797
// +optional
9898
Monitor *mona.AgentSpec `json:"monitor,omitempty"`
9999

100-
// ConfigSecret is an optional field to provide custom configuration file for database (i.e custom-mysql.cnf).
100+
// ConfigSecret is an optional field to provide custom configuration file for database (i.e custom-MariaDB.cnf).
101101
// If specified, this file will be used as configuration file otherwise default configuration file will be used.
102102
ConfigSecret *core.LocalObjectReference `json:"configSecret,omitempty"`
103103

@@ -218,3 +218,21 @@ type MaxScaleSpec struct {
218218
// If specified, this file will be merged with default configuration file.
219219
ConfigSecret *core.LocalObjectReference `json:"configSecret,omitempty"`
220220
}
221+
222+
var _ Accessor = &MariaDB{}
223+
224+
func (m *MariaDB) GetObjectMeta() metav1.ObjectMeta {
225+
return m.ObjectMeta
226+
}
227+
228+
func (m *MariaDB) GetConditions() []kmapi.Condition {
229+
return m.Status.Conditions
230+
}
231+
232+
func (m *MariaDB) SetCondition(cond kmapi.Condition) {
233+
m.Status.Conditions = setCondition(m.Status.Conditions, cond)
234+
}
235+
236+
func (m *MariaDB) RemoveCondition(typ string) {
237+
m.Status.Conditions = removeCondition(m.Status.Conditions, typ)
238+
}

apis/kubedb/v1/memcached_types.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,21 @@ type MemcachedList struct {
153153
// Items is a list of Memcached TPR objects
154154
Items []Memcached `json:"items,omitempty"`
155155
}
156+
157+
var _ Accessor = &Memcached{}
158+
159+
func (m *Memcached) GetObjectMeta() metav1.ObjectMeta {
160+
return m.ObjectMeta
161+
}
162+
163+
func (m *Memcached) GetConditions() []kmapi.Condition {
164+
return m.Status.Conditions
165+
}
166+
167+
func (m *Memcached) SetCondition(cond kmapi.Condition) {
168+
m.Status.Conditions = setCondition(m.Status.Conditions, cond)
169+
}
170+
171+
func (m *Memcached) RemoveCondition(typ string) {
172+
m.Status.Conditions = removeCondition(m.Status.Conditions, typ)
173+
}

apis/kubedb/v1/mongodb_types.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,3 +364,21 @@ type MongoDBList struct {
364364
// Items is a list of MongoDB TPR objects
365365
Items []MongoDB `json:"items,omitempty"`
366366
}
367+
368+
var _ Accessor = &MongoDB{}
369+
370+
func (m *MongoDB) GetObjectMeta() metav1.ObjectMeta {
371+
return m.ObjectMeta
372+
}
373+
374+
func (m *MongoDB) GetConditions() []kmapi.Condition {
375+
return m.Status.Conditions
376+
}
377+
378+
func (m *MongoDB) SetCondition(cond kmapi.Condition) {
379+
m.Status.Conditions = setCondition(m.Status.Conditions, cond)
380+
}
381+
382+
func (m *MongoDB) RemoveCondition(typ string) {
383+
m.Status.Conditions = removeCondition(m.Status.Conditions, typ)
384+
}

apis/kubedb/v1/mysql_types.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,3 +273,21 @@ type MySQLList struct {
273273
// Items is a list of MySQL TPR objects
274274
Items []MySQL `json:"items,omitempty"`
275275
}
276+
277+
var _ Accessor = &MySQL{}
278+
279+
func (m *MySQL) GetObjectMeta() metav1.ObjectMeta {
280+
return m.ObjectMeta
281+
}
282+
283+
func (m *MySQL) GetConditions() []kmapi.Condition {
284+
return m.Status.Conditions
285+
}
286+
287+
func (m *MySQL) SetCondition(cond kmapi.Condition) {
288+
m.Status.Conditions = setCondition(m.Status.Conditions, cond)
289+
}
290+
291+
func (m *MySQL) RemoveCondition(typ string) {
292+
m.Status.Conditions = removeCondition(m.Status.Conditions, typ)
293+
}

apis/kubedb/v1/openapi_generated.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/kubedb/v1/perconaxtradb_types.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,21 @@ type PerconaXtraDBList struct {
161161
// Items is a list of PerconaXtraDB TPR objects
162162
Items []PerconaXtraDB `json:"items,omitempty"`
163163
}
164+
165+
var _ Accessor = &PerconaXtraDB{}
166+
167+
func (m *PerconaXtraDB) GetObjectMeta() metav1.ObjectMeta {
168+
return m.ObjectMeta
169+
}
170+
171+
func (m *PerconaXtraDB) GetConditions() []kmapi.Condition {
172+
return m.Status.Conditions
173+
}
174+
175+
func (m *PerconaXtraDB) SetCondition(cond kmapi.Condition) {
176+
m.Status.Conditions = setCondition(m.Status.Conditions, cond)
177+
}
178+
179+
func (m *PerconaXtraDB) RemoveCondition(typ string) {
180+
m.Status.Conditions = removeCondition(m.Status.Conditions, typ)
181+
}

apis/kubedb/v1/pgbouncer_types.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,3 +256,21 @@ const (
256256
// This is the most secure of the currently provided methods, but it is not supported by older client libraries.
257257
PgBouncerClientAuthModeScram PgBouncerClientAuthMode = "scram-sha-256"
258258
)
259+
260+
var _ Accessor = &PgBouncer{}
261+
262+
func (p *PgBouncer) GetObjectMeta() metav1.ObjectMeta {
263+
return p.ObjectMeta
264+
}
265+
266+
func (p *PgBouncer) GetConditions() []kmapi.Condition {
267+
return p.Status.Conditions
268+
}
269+
270+
func (p *PgBouncer) SetCondition(cond kmapi.Condition) {
271+
p.Status.Conditions = setCondition(p.Status.Conditions, cond)
272+
}
273+
274+
func (p *PgBouncer) RemoveCondition(typ string) {
275+
p.Status.Conditions = removeCondition(p.Status.Conditions, typ)
276+
}

apis/kubedb/v1/postgres_types.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,3 +479,21 @@ const (
479479
PostgresStorageTypeHDD PostgresStorageType = "hdd"
480480
PostgresStorageTypeSAN PostgresStorageType = "san"
481481
)
482+
483+
var _ Accessor = &Postgres{}
484+
485+
func (m *Postgres) GetObjectMeta() metav1.ObjectMeta {
486+
return m.ObjectMeta
487+
}
488+
489+
func (m *Postgres) GetConditions() []kmapi.Condition {
490+
return m.Status.Conditions
491+
}
492+
493+
func (m *Postgres) SetCondition(cond kmapi.Condition) {
494+
m.Status.Conditions = setCondition(m.Status.Conditions, cond)
495+
}
496+
497+
func (m *Postgres) RemoveCondition(typ string) {
498+
m.Status.Conditions = removeCondition(m.Status.Conditions, typ)
499+
}

0 commit comments

Comments
 (0)