Skip to content

Commit 159dc88

Browse files
committed
[tls] Support for telemetry
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The certs get direct mounted to the appropriate place in etc/pki/tls/certs/%s.crt|key and a CA bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem . Job deployments for bootstrap/cron get the CA bundle added if configured. Signed-off-by: Veronika Fisarova <[email protected]> Depends-On: openstack-k8s-operators/lib-common#428
1 parent cce4d37 commit 159dc88

22 files changed

+593
-15
lines changed

api/bases/telemetry.openstack.org_autoscalings.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,36 @@ spec:
316316
maximum: 65535
317317
minimum: 1
318318
type: integer
319+
tls:
320+
description: TLS - Parameters related to the TLS
321+
properties:
322+
api:
323+
description: API tls type which encapsulates for API services
324+
properties:
325+
internal:
326+
description: Internal GenericService - holds the secret for
327+
the internal endpoint
328+
properties:
329+
secretName:
330+
description: SecretName - holding the cert, key for the
331+
service
332+
type: string
333+
type: object
334+
public:
335+
description: Public GenericService - holds the secret for
336+
the public endpoint
337+
properties:
338+
secretName:
339+
description: SecretName - holding the cert, key for the
340+
service
341+
type: string
342+
type: object
343+
type: object
344+
caBundleSecretName:
345+
description: CaBundleSecretName - holding the CA certs in a pre-created
346+
bundle file
347+
type: string
348+
type: object
319349
required:
320350
- heatInstance
321351
type: object

api/bases/telemetry.openstack.org_ceilometers.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,17 @@ spec:
105105
type: string
106106
sgCoreImage:
107107
type: string
108+
tls:
109+
description: TLS - Parameters related to the TLS
110+
properties:
111+
caBundleSecretName:
112+
description: CaBundleSecretName - holding the CA certs in a pre-created
113+
bundle file
114+
type: string
115+
secretName:
116+
description: SecretName - holding the cert, key for the service
117+
type: string
118+
type: object
108119
required:
109120
- centralImage
110121
- computeImage

api/bases/telemetry.openstack.org_telemetries.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,36 @@ spec:
335335
maximum: 65535
336336
minimum: 1
337337
type: integer
338+
tls:
339+
description: TLS - Parameters related to the TLS
340+
properties:
341+
api:
342+
description: API tls type which encapsulates for API services
343+
properties:
344+
internal:
345+
description: Internal GenericService - holds the secret
346+
for the internal endpoint
347+
properties:
348+
secretName:
349+
description: SecretName - holding the cert, key for
350+
the service
351+
type: string
352+
type: object
353+
public:
354+
description: Public GenericService - holds the secret
355+
for the public endpoint
356+
properties:
357+
secretName:
358+
description: SecretName - holding the cert, key for
359+
the service
360+
type: string
361+
type: object
362+
type: object
363+
caBundleSecretName:
364+
description: CaBundleSecretName - holding the CA certs in
365+
a pre-created bundle file
366+
type: string
367+
type: object
338368
required:
339369
- heatInstance
340370
type: object
@@ -416,6 +446,17 @@ spec:
416446
type: string
417447
sgCoreImage:
418448
type: string
449+
tls:
450+
description: TLS - Parameters related to the TLS
451+
properties:
452+
caBundleSecretName:
453+
description: CaBundleSecretName - holding the CA certs in
454+
a pre-created bundle file
455+
type: string
456+
secretName:
457+
description: SecretName - holding the cert, key for the service
458+
type: string
459+
type: object
419460
required:
420461
- centralImage
421462
- computeImage

api/go.mod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module github.com/openstack-k8s-operators/telemetry-operator/api
22

3-
go 1.20
3+
go 1.21
4+
5+
toolchain go1.21.1
46

57
require (
68
github.com/onsi/ginkgo/v2 v2.14.0

api/go.sum

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8Yc
99
github.com/emicklei/go-restful/v3 v3.11.2 h1:1onLa9DcsMYO9P+CXaL0dStDqQ2EHHXLiz+BtnqkLAU=
1010
github.com/emicklei/go-restful/v3 v3.11.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
1111
github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U=
12+
github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
1213
github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg=
1314
github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ=
1415
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
@@ -55,7 +56,9 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm
5556
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
5657
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
5758
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
59+
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
5860
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
61+
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
5962
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
6063
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
6164
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@@ -90,16 +93,19 @@ github.com/rhobs/obo-prometheus-operator/pkg/apis/monitoring v0.64.1-rhobs3/go.m
9093
github.com/rhobs/observability-operator v0.0.20 h1:u4Ejzq/Yt3rY4b/apKhpgYIvmp+MpcV9hhEzhzedpk4=
9194
github.com/rhobs/observability-operator v0.0.20/go.mod h1:F+exF/48C17xz9Ci9WK9Ri53Z9EZdad0otSOpeFxCXE=
9295
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
96+
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
9397
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
9498
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
9599
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
96100
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
97101
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
98102
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
103+
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
99104
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
100105
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
101106
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
102107
go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A=
108+
go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4=
103109
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
104110
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
105111
go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo=
@@ -169,6 +175,7 @@ google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7
169175
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
170176
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
171177
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
178+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
172179
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
173180
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
174181
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

api/v1beta1/autoscaling_types.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ package v1beta1
1818

1919
import (
2020
condition "github.com/openstack-k8s-operators/lib-common/modules/common/condition"
21+
"github.com/openstack-k8s-operators/lib-common/modules/common/tls"
2122
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2223

23-
"github.com/openstack-k8s-operators/lib-common/modules/common/util"
2424
"github.com/openstack-k8s-operators/lib-common/modules/common/service"
25+
"github.com/openstack-k8s-operators/lib-common/modules/common/util"
2526
)
2627

2728
const (
@@ -37,7 +38,6 @@ const (
3738
DbSyncHash = "dbsync"
3839
)
3940

40-
4141
// Aodh defines the aodh component spec
4242
type Aodh struct {
4343
// RabbitMQ instance name
@@ -109,6 +109,11 @@ type Aodh struct {
109109

110110
// +kubebuilder:validation:Required
111111
ListenerImage string `json:"listenerImage"`
112+
113+
// +kubebuilder:validation:Optional
114+
// +operator-sdk:csv:customresourcedefinitions:type=spec
115+
// TLS - Parameters related to the TLS
116+
TLS tls.API `json:"tls,omitempty"`
112117
}
113118

114119
// APIOverrideSpec to override the generated manifest of several child resources.

api/v1beta1/ceilometer_types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package v1beta1
1818

1919
import (
2020
condition "github.com/openstack-k8s-operators/lib-common/modules/common/condition"
21+
"github.com/openstack-k8s-operators/lib-common/modules/common/tls"
2122
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2223

2324
"github.com/openstack-k8s-operators/lib-common/modules/common/util"
@@ -90,6 +91,11 @@ type CeilometerSpec struct {
9091

9192
// +kubebuilder:validation:Required
9293
NodeExporterImage string `json:"nodeExporterImage"`
94+
95+
// +kubebuilder:validation:Optional
96+
// +operator-sdk:csv:customresourcedefinitions:type=spec
97+
// TLS - Parameters related to the TLS
98+
TLS tls.SimpleService `json:"tls,omitempty"`
9399
}
94100

95101
// CeilometerStatus defines the observed state of Ceilometer

api/v1beta1/zz_generated.deepcopy.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,36 @@ spec:
316316
maximum: 65535
317317
minimum: 1
318318
type: integer
319+
tls:
320+
description: TLS - Parameters related to the TLS
321+
properties:
322+
api:
323+
description: API tls type which encapsulates for API services
324+
properties:
325+
internal:
326+
description: Internal GenericService - holds the secret for
327+
the internal endpoint
328+
properties:
329+
secretName:
330+
description: SecretName - holding the cert, key for the
331+
service
332+
type: string
333+
type: object
334+
public:
335+
description: Public GenericService - holds the secret for
336+
the public endpoint
337+
properties:
338+
secretName:
339+
description: SecretName - holding the cert, key for the
340+
service
341+
type: string
342+
type: object
343+
type: object
344+
caBundleSecretName:
345+
description: CaBundleSecretName - holding the CA certs in a pre-created
346+
bundle file
347+
type: string
348+
type: object
319349
required:
320350
- heatInstance
321351
type: object

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,17 @@ spec:
105105
type: string
106106
sgCoreImage:
107107
type: string
108+
tls:
109+
description: TLS - Parameters related to the TLS
110+
properties:
111+
caBundleSecretName:
112+
description: CaBundleSecretName - holding the CA certs in a pre-created
113+
bundle file
114+
type: string
115+
secretName:
116+
description: SecretName - holding the cert, key for the service
117+
type: string
118+
type: object
108119
required:
109120
- centralImage
110121
- computeImage

0 commit comments

Comments
 (0)