Skip to content

Commit 3a033cc

Browse files
author
Juan Larriba
committed
Rebasing on top of main
2 parents 4e29d36 + c5a86d3 commit 3a033cc

20 files changed

+213
-178
lines changed

api/bases/telemetry.openstack.org_metricstorages.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1169,10 +1169,11 @@ spec:
11691169
type: string
11701170
strategy:
11711171
default: persistent
1172-
description: Strategy to use for storage. Can be "persistent"
1173-
or empty, in which case a COO default is used
1172+
description: Strategy to use for storage. Can be "persistent",
1173+
"ephemeral" or empty, in which case a COO default is used
11741174
enum:
11751175
- persistent
1176+
- ephemeral
11761177
type: string
11771178
type: object
11781179
type: object

api/bases/telemetry.openstack.org_telemetries.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1728,10 +1728,12 @@ spec:
17281728
type: string
17291729
strategy:
17301730
default: persistent
1731-
description: Strategy to use for storage. Can be "persistent"
1732-
or empty, in which case a COO default is used
1731+
description: Strategy to use for storage. Can be "persistent",
1732+
"ephemeral" or empty, in which case a COO default is
1733+
used
17331734
enum:
17341735
- persistent
1736+
- ephemeral
17351737
type: string
17361738
type: object
17371739
type: object

api/go.mod

+14-14
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ module github.com/openstack-k8s-operators/telemetry-operator/api
33
go 1.20
44

55
require (
6-
github.com/onsi/ginkgo/v2 v2.19.0
6+
github.com/onsi/ginkgo/v2 v2.20.1
77
github.com/onsi/gomega v1.34.1
8-
github.com/openstack-k8s-operators/infra-operator/apis v0.4.1-0.20240729052254-84df6dfc07a9
9-
github.com/openstack-k8s-operators/lib-common/modules/common v0.4.1-0.20240730142703-7fd3da600c9d
8+
github.com/openstack-k8s-operators/infra-operator/apis v0.4.1-0.20240813061654-72bf12d9b73e
9+
github.com/openstack-k8s-operators/lib-common/modules/common v0.4.1-0.20240905123813-174296c09ec6
1010
github.com/rhobs/observability-operator v0.0.28
11-
k8s.io/api v0.28.12
12-
k8s.io/apimachinery v0.28.12
13-
k8s.io/client-go v0.28.12
11+
k8s.io/api v0.28.13
12+
k8s.io/apimachinery v0.28.13
13+
k8s.io/client-go v0.28.13
1414
sigs.k8s.io/controller-runtime v0.16.6
1515
)
1616

@@ -34,7 +34,7 @@ require (
3434
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
3535
github.com/google/go-cmp v0.6.0 // indirect
3636
github.com/google/gofuzz v1.2.0 // indirect
37-
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect
37+
github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 // indirect
3838
github.com/google/uuid v1.6.0 // indirect
3939
github.com/imdario/mergo v0.3.16 // indirect
4040
github.com/josharian/intern v1.0.0 // indirect
@@ -54,21 +54,21 @@ require (
5454
go.uber.org/multierr v1.11.0 // indirect
5555
go.uber.org/zap v1.27.0 // indirect
5656
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
57-
golang.org/x/net v0.27.0 // indirect
57+
golang.org/x/net v0.28.0 // indirect
5858
golang.org/x/oauth2 v0.16.0 // indirect
59-
golang.org/x/sys v0.22.0 // indirect
60-
golang.org/x/term v0.22.0 // indirect
61-
golang.org/x/text v0.16.0 // indirect
59+
golang.org/x/sys v0.23.0 // indirect
60+
golang.org/x/term v0.23.0 // indirect
61+
golang.org/x/text v0.17.0 // indirect
6262
golang.org/x/time v0.5.0 // indirect
63-
golang.org/x/tools v0.23.0 // indirect
63+
golang.org/x/tools v0.24.0 // indirect
6464
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
6565
google.golang.org/appengine v1.6.8 // indirect
6666
google.golang.org/protobuf v1.34.1 // indirect
6767
gopkg.in/inf.v0 v0.9.1 // indirect
6868
gopkg.in/yaml.v2 v2.4.0 // indirect
6969
gopkg.in/yaml.v3 v3.0.1 // indirect
70-
k8s.io/apiextensions-apiserver v0.28.12 // indirect
71-
k8s.io/component-base v0.28.12 // indirect
70+
k8s.io/apiextensions-apiserver v0.28.13 // indirect
71+
k8s.io/component-base v0.28.13 // indirect
7272
k8s.io/klog/v2 v2.120.1 // indirect
7373
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
7474
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect

api/go.sum

+28-28
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN
4343
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
4444
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
4545
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
46-
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg=
47-
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw=
46+
github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k=
47+
github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=
4848
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
4949
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
5050
github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
@@ -66,14 +66,14 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G
6666
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
6767
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
6868
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
69-
github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA=
70-
github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To=
69+
github.com/onsi/ginkgo/v2 v2.20.1 h1:YlVIbqct+ZmnEph770q9Q7NVAz4wwIiVNahee6JyUzo=
70+
github.com/onsi/ginkgo/v2 v2.20.1/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI=
7171
github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k=
7272
github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY=
73-
github.com/openstack-k8s-operators/infra-operator/apis v0.4.1-0.20240729052254-84df6dfc07a9 h1:qu0yjV+5qo7NfeOYSZhup6hJTjvhsu0lcm+gi7BRf+E=
74-
github.com/openstack-k8s-operators/infra-operator/apis v0.4.1-0.20240729052254-84df6dfc07a9/go.mod h1:2ktst0o1cCCUpB1HyWhKoNosumpRJBj3hUX48sAEsuM=
75-
github.com/openstack-k8s-operators/lib-common/modules/common v0.4.1-0.20240730142703-7fd3da600c9d h1:WfEUkOxDpMnnYo+mQTJc9juoY85me/V6ubNAsOHdjnc=
76-
github.com/openstack-k8s-operators/lib-common/modules/common v0.4.1-0.20240730142703-7fd3da600c9d/go.mod h1:YlNmaOTuZNZvwlOfosPI94od/V2Itektn9KWThRzylI=
73+
github.com/openstack-k8s-operators/infra-operator/apis v0.4.1-0.20240813061654-72bf12d9b73e h1:uW/cTpjOCntECsmSa9+jiGoaVG7y3XUWxj4ErEywGDA=
74+
github.com/openstack-k8s-operators/infra-operator/apis v0.4.1-0.20240813061654-72bf12d9b73e/go.mod h1:0DYz6gT2jQtQe4HvtVHB//41PpyTSpWpzcFrdxn1eww=
75+
github.com/openstack-k8s-operators/lib-common/modules/common v0.4.1-0.20240905123813-174296c09ec6 h1:VSbVNzUa41hybq/lZi0L8bNv/yzYyNylc8yKSEO+ZCA=
76+
github.com/openstack-k8s-operators/lib-common/modules/common v0.4.1-0.20240905123813-174296c09ec6/go.mod h1:6zxa5xg9uvpObVKFSJa/SA+vDDlgh0Q1aswxDB2XbxU=
7777
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
7878
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
7979
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
@@ -120,8 +120,8 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL
120120
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
121121
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
122122
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
123-
golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
124-
golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
123+
golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE=
124+
golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg=
125125
golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ=
126126
golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o=
127127
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -135,27 +135,27 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
135135
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
136136
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
137137
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
138-
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
139-
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
138+
golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM=
139+
golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
140140
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
141141
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
142-
golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk=
143-
golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4=
142+
golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU=
143+
golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk=
144144
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
145145
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
146146
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
147147
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
148-
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
149-
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
148+
golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
149+
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
150150
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
151151
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
152152
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
153153
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
154154
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
155155
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
156156
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
157-
golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg=
158-
golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI=
157+
golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24=
158+
golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ=
159159
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
160160
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
161161
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -177,16 +177,16 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
177177
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
178178
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
179179
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
180-
k8s.io/api v0.28.12 h1:C2hpsaso18pqn0Dmkfnbv/YCctozTC3KGGuZ6bF7zhQ=
181-
k8s.io/api v0.28.12/go.mod h1:qjswI+whxvf9LAKD4sEYHfy+WgHGWeH+H5sCRQMwZAQ=
182-
k8s.io/apiextensions-apiserver v0.28.12 h1:6GA64rylk5q0mbXfHHFVgfL1jx/4p6RU+Y+ni2DUuZc=
183-
k8s.io/apiextensions-apiserver v0.28.12/go.mod h1:Len29ySvb/fnrXvioTxg2l6iFi97B53Bm3/jBMBllCE=
184-
k8s.io/apimachinery v0.28.12 h1:VepMEVOi9o7L/4wMAXJq+3BK9tqBIeerTB+HSOTKeo0=
185-
k8s.io/apimachinery v0.28.12/go.mod h1:zUG757HaKs6Dc3iGtKjzIpBfqTM4yiRsEe3/E7NX15o=
186-
k8s.io/client-go v0.28.12 h1:li7iRPRQF3vDki6gTxT/kXWJvw3BkJSdjVPVhDTZQec=
187-
k8s.io/client-go v0.28.12/go.mod h1:yEzH2Z+nEGlrnKyHJWcJsbOr5tGdIj04dj1TVQOg0wE=
188-
k8s.io/component-base v0.28.12 h1:ZNq6QFFGCPjaAzWqYHaQRoAY5seoK3vP0pZOjgxOzNc=
189-
k8s.io/component-base v0.28.12/go.mod h1:8zI5TmGuHX6R5Lay61Ox7wb+dsEENl0NBmVSiHMQu1c=
180+
k8s.io/api v0.28.13 h1:0Sw8MjdkmrJAF/uVv09HXSZ3cQauVyZHQWKt8hiiKo4=
181+
k8s.io/api v0.28.13/go.mod h1:7hlRF5wArzXf0qbRRT2TMtHRa5SHBEVJhA02JpTxj9Q=
182+
k8s.io/apiextensions-apiserver v0.28.13 h1:+Q3jtMXBxvURuW0tzW1UsZMPud3T4OvgVPuI/uQUEQ8=
183+
k8s.io/apiextensions-apiserver v0.28.13/go.mod h1:yThTxyuc0ba1rXKZNK2aQNIbFxmGcU+CPc8YB40IGj0=
184+
k8s.io/apimachinery v0.28.13 h1:0O2mk2i0Yi+xkron0lK//biI21F1eGXb4eXECLU5v7g=
185+
k8s.io/apimachinery v0.28.13/go.mod h1:zUG757HaKs6Dc3iGtKjzIpBfqTM4yiRsEe3/E7NX15o=
186+
k8s.io/client-go v0.28.13 h1:kHgFOxWwAsa8VxL6Oylo10V6euobub9Jo0wyEWrhrWk=
187+
k8s.io/client-go v0.28.13/go.mod h1:IudvInbWfd+6WLreEVnBnZJCGFaSROCFbny9jFTkk7g=
188+
k8s.io/component-base v0.28.13 h1:hNgX2QcMt7Z5vy/9MB2rodbvBJj6H4Jq1JZDqGvVuf8=
189+
k8s.io/component-base v0.28.13/go.mod h1:G37g+bIAcjV2cAMEpFG2SEN7NgRFMizqSksOLpPN2bM=
190190
k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=
191191
k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
192192
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag=

api/v1beta1/metricstorage_types.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ type PersistentStorage struct {
4242

4343
// Storage defines the options used for storage of metrics
4444
type Storage struct {
45-
// Strategy to use for storage. Can be "persistent"
45+
// Strategy to use for storage. Can be "persistent", "ephemeral"
4646
// or empty, in which case a COO default is used
4747
// +kubebuilder:validation:Optional
48-
// +kubebuilder:validation:Enum=persistent
48+
// +kubebuilder:validation:Enum=persistent;ephemeral
4949
// +kubebuilder:default=persistent
5050
Strategy string `json:"strategy"`
5151

@@ -57,7 +57,7 @@ type Storage struct {
5757
// Used to specify the options of persistent storage when
5858
// strategy = "persistent"
5959
// +kubebuilder:validation:Optional
60-
Persistent PersistentStorage `json:"persistent"`
60+
Persistent *PersistentStorage `json:"persistent,omitempty"`
6161
}
6262

6363
// MonitoringStack defines the options for a Red Hat supported metric storage

api/v1beta1/metricstorage_webhook.go

+3
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ func (storage *Storage) Default() {
8181
storage.Retention = "24h"
8282
}
8383
if storage.Strategy == "persistent" {
84+
storage.Persistent = &PersistentStorage{}
8485
storage.Persistent.Default()
86+
} else {
87+
storage.Persistent = nil
8588
}
8689
}
8790

api/v1beta1/zz_generated.deepcopy.go

+5-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/telemetry.openstack.org_metricstorages.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1169,10 +1169,11 @@ spec:
11691169
type: string
11701170
strategy:
11711171
default: persistent
1172-
description: Strategy to use for storage. Can be "persistent"
1173-
or empty, in which case a COO default is used
1172+
description: Strategy to use for storage. Can be "persistent",
1173+
"ephemeral" or empty, in which case a COO default is used
11741174
enum:
11751175
- persistent
1176+
- ephemeral
11761177
type: string
11771178
type: object
11781179
type: object

config/crd/bases/telemetry.openstack.org_telemetries.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1728,10 +1728,12 @@ spec:
17281728
type: string
17291729
strategy:
17301730
default: persistent
1731-
description: Strategy to use for storage. Can be "persistent"
1732-
or empty, in which case a COO default is used
1731+
description: Strategy to use for storage. Can be "persistent",
1732+
"ephemeral" or empty, in which case a COO default is
1733+
used
17331734
enum:
17341735
- persistent
1736+
- ephemeral
17351737
type: string
17361738
type: object
17371739
type: object

controllers/aodh_controller.go

+22-9
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ func (r *AutoscalingReconciler) reconcileInitAodh(
112112
_, _, err := secret.GetSecret(ctx, helper, instance.Spec.Aodh.Secret, instance.Namespace)
113113
if err != nil {
114114
if k8s_errors.IsNotFound(err) {
115-
return ctrl.Result{RequeueAfter: time.Duration(10) * time.Second}, fmt.Errorf("OpenStack secret %s not found", instance.Spec.Aodh.Secret)
115+
Log.Info(fmt.Sprintf("OpenStack secret %s not found", instance.Spec.Aodh.Secret))
116+
return ctrl.Result{RequeueAfter: time.Duration(10) * time.Second}, nil
116117
}
117118
return ctrl.Result{}, err
118119
}
@@ -500,7 +501,7 @@ func (r *AutoscalingReconciler) reconcileNormalAodh(
500501
//
501502
// Validate the CA cert secret if provided
502503
if instance.Spec.Aodh.TLS.CaBundleSecretName != "" {
503-
hash, ctrlResult, err := tls.ValidateCACertSecret(
504+
hash, err := tls.ValidateCACertSecret(
504505
ctx,
505506
helper.GetClient(),
506507
types.NamespacedName{
@@ -509,33 +510,45 @@ func (r *AutoscalingReconciler) reconcileNormalAodh(
509510
},
510511
)
511512
if err != nil {
513+
if k8s_errors.IsNotFound(err) {
514+
instance.Status.Conditions.Set(condition.FalseCondition(
515+
condition.TLSInputReadyCondition,
516+
condition.RequestedReason,
517+
condition.SeverityInfo,
518+
fmt.Sprintf(condition.TLSInputReadyWaitingMessage, instance.Spec.Aodh.TLS.CaBundleSecretName)))
519+
return ctrl.Result{}, nil
520+
}
512521
instance.Status.Conditions.Set(condition.FalseCondition(
513522
condition.TLSInputReadyCondition,
514523
condition.ErrorReason,
515524
condition.SeverityWarning,
516525
condition.TLSInputErrorMessage,
517526
err.Error()))
518-
return ctrlResult, err
519-
} else if (ctrlResult != ctrl.Result{}) {
520-
return ctrlResult, nil
527+
return ctrl.Result{}, err
521528
}
522529

523530
if hash != "" {
524531
configVars[tls.CABundleKey] = env.SetValue(hash)
525532
}
526533

527534
// Validate API service certs secrets
528-
certsHash, ctrlResult, err := instance.Spec.Aodh.TLS.API.ValidateCertSecrets(ctx, helper, instance.Namespace)
535+
certsHash, err := instance.Spec.Aodh.TLS.API.ValidateCertSecrets(ctx, helper, instance.Namespace)
529536
if err != nil {
537+
if k8s_errors.IsNotFound(err) {
538+
instance.Status.Conditions.Set(condition.FalseCondition(
539+
condition.TLSInputReadyCondition,
540+
condition.RequestedReason,
541+
condition.SeverityInfo,
542+
fmt.Sprintf(condition.TLSInputReadyWaitingMessage, err.Error())))
543+
return ctrl.Result{}, nil
544+
}
530545
instance.Status.Conditions.Set(condition.FalseCondition(
531546
condition.TLSInputReadyCondition,
532547
condition.ErrorReason,
533548
condition.SeverityWarning,
534549
condition.TLSInputErrorMessage,
535550
err.Error()))
536-
return ctrlResult, err
537-
} else if (ctrlResult != ctrl.Result{}) {
538-
return ctrlResult, nil
551+
return ctrl.Result{}, err
539552
}
540553

541554
configVars[tls.TLSHashName] = env.SetValue(certsHash)

0 commit comments

Comments
 (0)