Skip to content

Commit 49c4872

Browse files
committed
Fix pre-commit
1 parent 13ef450 commit 49c4872

File tree

8 files changed

+22
-37
lines changed

8 files changed

+22
-37
lines changed

api/v1beta1/cloudkitty_types.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,20 @@ const (
4646
type CloudKittySpecBase struct {
4747
CloudKittyTemplate `json:",inline"`
4848

49-
// +kubebuilder:validation:Required
49+
// +kubebuilder:validation:Optional
5050
// +kubebuilder:default=openstack
5151
// MariaDB instance name
5252
// Right now required by the maridb-operator to get the credentials from the instance to create the DB
5353
// Might not be required in future
5454
DatabaseInstance string `json:"databaseInstance"`
5555

56-
// +kubebuilder:validation:Required
56+
// +kubebuilder:validation:Optional
5757
// +kubebuilder:default=rabbitmq
5858
// RabbitMQ instance name
5959
// Needed to request a transportURL that is created and used in CloudKitty
6060
RabbitMqClusterName string `json:"rabbitMqClusterName"`
6161

62-
// +kubebuilder:validation:Required
62+
// +kubebuilder:validation:Optional
6363
// +kubebuilder:default=memcached
6464
// Memcached instance name.
6565
MemcachedInstance string `json:"memcachedInstance"`
@@ -111,11 +111,11 @@ type CloudKittySpecBase struct {
111111
type CloudKittySpecCore struct {
112112
CloudKittySpecBase `json:",inline"`
113113

114-
// +kubebuilder:validation:Required
114+
// +kubebuilder:validation:Optional
115115
// CloudKittyAPI - Spec definition for the API service of this CloudKitty deployment
116116
CloudKittyAPI CloudKittyAPITemplateCore `json:"cloudKittyAPI"`
117117

118-
// +kubebuilder:validation:Required
118+
// +kubebuilder:validation:Optional
119119
// CloudKittyProc - Spec definition for the Scheduler service of this CloudKitty deployment
120120
CloudKittyProc CloudKittyProcTemplateCore `json:"cloudKittyProc"`
121121
}
@@ -124,11 +124,11 @@ type CloudKittySpecCore struct {
124124
type CloudKittySpec struct {
125125
CloudKittySpecBase `json:",inline"`
126126

127-
// +kubebuilder:validation:Required
127+
// +kubebuilder:validation:Optional
128128
// CloudKittyAPI - Spec definition for the API service of this CloudKitty deployment
129129
CloudKittyAPI CloudKittyAPITemplate `json:"cloudKittyAPI"`
130130

131-
// +kubebuilder:validation:Required
131+
// +kubebuilder:validation:Optional
132132
// CloudKittyProc - Spec definition for the Scheduler service of this CloudKitty deployment
133133
CloudKittyProc CloudKittyProcTemplate `json:"cloudKittyProc"`
134134
}
@@ -145,7 +145,7 @@ type CloudKittyTemplate struct {
145145
// DatabaseAccount - optional MariaDBAccount used for cloudkitty DB, defaults to cloudkitty
146146
DatabaseAccount string `json:"databaseAccount"`
147147

148-
// +kubebuilder:validation:Required
148+
// +kubebuilder:validation:Optional
149149
// Secret containing OpenStack password information
150150
Secret string `json:"secret"`
151151

@@ -171,6 +171,7 @@ type CloudKittyServiceTemplate struct {
171171
CustomServiceConfig string `json:"customServiceConfig,omitempty"`
172172

173173
// +kubebuilder:validation:Optional
174+
// +listType=atomic
174175
// CustomServiceConfigSecrets - customize the service config using this parameter to specify Secrets
175176
// that contain sensitive service config data. The content of each Secret gets added to the
176177
// /etc/<service>/<service>.conf.d directory as a custom config file.
@@ -182,6 +183,7 @@ type CloudKittyServiceTemplate struct {
182183
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
183184

184185
// +kubebuilder:validation:Optional
186+
// +listType=atomic
185187
// NetworkAttachments is a list of NetworkAttachment resource names to expose the services to the given network
186188
NetworkAttachments []string `json:"networkAttachments,omitempty"`
187189

api/v1beta1/cloudkittyapi_types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ type CloudKittyAPITemplateCore struct {
4646

4747
// CloudKittyAPITemplate defines the input parameters for the CloudKitty API service
4848
type CloudKittyAPITemplate struct {
49-
// +kubebuilder:validation:Required
49+
// +kubebuilder:validation:Optional
5050
// ContainerImage - CloudKitty Container Image URL (will be set to environmental default if empty)
5151
ContainerImage string `json:"containerImage"`
5252

@@ -61,15 +61,15 @@ type CloudKittyAPISpec struct {
6161
// Input parameters for the CloudKitty API service
6262
CloudKittyAPITemplate `json:",inline"`
6363

64-
// +kubebuilder:validation:Required
64+
// +kubebuilder:validation:Optional
6565
// DatabaseHostname - CloudKitty Database Hostname
6666
DatabaseHostname string `json:"databaseHostname"`
6767

68-
// +kubebuilder:validation:Required
68+
// +kubebuilder:validation:Optional
6969
// Secret containing RabbitMq transport URL
7070
TransportURLSecret string `json:"transportURLSecret"`
7171

72-
// +kubebuilder:validation:Required
72+
// +kubebuilder:validation:Optional
7373
// ServiceAccount - service account name used internally to provide CloudKitty services the default SA name
7474
ServiceAccount string `json:"serviceAccount"`
7575
}

api/v1beta1/cloudkittyproc_types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ type CloudKittyProcTemplateCore struct {
4242

4343
// CloudKittyProcTemplate defines the input parameters for the CloudKitty Processor service
4444
type CloudKittyProcTemplate struct {
45-
// +kubebuilder:validation:Required
45+
// +kubebuilder:validation:Optional
4646
// ContainerImage - CloudKitty Container Image URL (will be set to environmental default if empty)
4747
ContainerImage string `json:"containerImage"`
4848

@@ -57,15 +57,15 @@ type CloudKittyProcSpec struct {
5757
// Input parameters for the CloudKitty Processor service
5858
CloudKittyProcTemplate `json:",inline"`
5959

60-
// +kubebuilder:validation:Required
60+
// +kubebuilder:validation:Optional
6161
// DatabaseHostname - CloudKitty Database Hostname
6262
DatabaseHostname string `json:"databaseHostname"`
6363

64-
// +kubebuilder:validation:Required
64+
// +kubebuilder:validation:Optional
6565
// Secret containing RabbitMq transport URL
6666
TransportURLSecret string `json:"transportURLSecret"`
6767

68-
// +kubebuilder:validation:Required
68+
// +kubebuilder:validation:Optional
6969
// ServiceAccount - service account name used internally to provide CloudKitty services the default SA name
7070
ServiceAccount string `json:"serviceAccount"`
7171
}

controllers/cloudkittyapi_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ func (r *CloudKittyAPIReconciler) reconcileInit(
583583
if instance.Status.APIEndpoints == nil {
584584
instance.Status.APIEndpoints = map[string]map[string]string{}
585585
}
586-
instance.Status.APIEndpoints[cloudkitty.ServiceName] = apiEndpointsV3
586+
instance.Status.APIEndpoints[cloudkitty.ServiceName] = apiEndpoints
587587
// V2 - end
588588

589589
// expose service - end

pkg/cloudkittyproc/statefulset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,4 +149,4 @@ func StatefulSet(
149149
}
150150

151151
return statefulset
152-
}
152+
}

templates/cloudkitty/bin/healthcheck.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,4 @@ def stopper(signal_number=None, frame=None):
151151
except KeyboardInterrupt:
152152
pass
153153
finally:
154-
stop()
154+
stop()

templates/cloudkitty/config/cloudkitty-api-uwsgi.ini

Lines changed: 0 additions & 17 deletions
This file was deleted.

templates/cloudkitty/config/metrics.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@ metrics:
7474
- state
7575
mutate: NUMBOOL
7676
extra_args:
77-
aggregation_method: max
77+
aggregation_method: max

0 commit comments

Comments
 (0)