Skip to content

Commit 5a4f3c8

Browse files
committed
[tls] Support for ceilometer, aodh
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 0d4f1ec commit 5a4f3c8

32 files changed

+878
-15
lines changed

api/bases/telemetry.openstack.org_autoscalings.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,36 @@ spec:
294294
description: ServiceUser - optional username used for this service
295295
to register in keystone
296296
type: string
297+
tls:
298+
description: TLS - Parameters related to the TLS
299+
properties:
300+
api:
301+
description: API tls type which encapsulates for API services
302+
properties:
303+
internal:
304+
description: Internal GenericService - holds the secret
305+
for the internal endpoint
306+
properties:
307+
secretName:
308+
description: SecretName - holding the cert, key for
309+
the service
310+
type: string
311+
type: object
312+
public:
313+
description: Public GenericService - holds the secret
314+
for the public endpoint
315+
properties:
316+
secretName:
317+
description: SecretName - holding the cert, key for
318+
the service
319+
type: string
320+
type: object
321+
type: object
322+
caBundleSecretName:
323+
description: CaBundleSecretName - holding the CA certs in
324+
a pre-created bundle file
325+
type: string
326+
type: object
297327
required:
298328
- apiImage
299329
- databaseInstance

api/bases/telemetry.openstack.org_ceilometers.yaml

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

api/bases/telemetry.openstack.org_telemetries.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,36 @@ spec:
308308
description: ServiceUser - optional username used for this
309309
service to register in keystone
310310
type: string
311+
tls:
312+
description: TLS - Parameters related to the TLS
313+
properties:
314+
api:
315+
description: API tls type which encapsulates for API services
316+
properties:
317+
internal:
318+
description: Internal GenericService - holds the secret
319+
for the internal endpoint
320+
properties:
321+
secretName:
322+
description: SecretName - holding the cert, key
323+
for the service
324+
type: string
325+
type: object
326+
public:
327+
description: Public GenericService - holds the secret
328+
for the public endpoint
329+
properties:
330+
secretName:
331+
description: SecretName - holding the cert, key
332+
for the service
333+
type: string
334+
type: object
335+
type: object
336+
caBundleSecretName:
337+
description: CaBundleSecretName - holding the CA certs
338+
in a pre-created bundle file
339+
type: string
340+
type: object
311341
required:
312342
- apiImage
313343
- databaseInstance
@@ -414,6 +444,17 @@ spec:
414444
type: string
415445
sgCoreImage:
416446
type: string
447+
tls:
448+
description: TLS - Parameters related to the TLS
449+
properties:
450+
caBundleSecretName:
451+
description: CaBundleSecretName - holding the CA certs in
452+
a pre-created bundle file
453+
type: string
454+
secretName:
455+
description: SecretName - holding the cert, key for the service
456+
type: string
457+
type: object
417458
required:
418459
- centralImage
419460
- computeImage

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"
@@ -84,6 +85,11 @@ type CeilometerSpec struct {
8485

8586
// +kubebuilder:validation:Required
8687
IpmiImage string `json:"ipmiImage"`
88+
89+
// +kubebuilder:validation:Optional
90+
// +operator-sdk:csv:customresourcedefinitions:type=spec
91+
// TLS - Parameters related to the TLS
92+
TLS tls.SimpleService `json:"tls,omitempty"`
8793
}
8894

8995
// 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
@@ -294,6 +294,36 @@ spec:
294294
description: ServiceUser - optional username used for this service
295295
to register in keystone
296296
type: string
297+
tls:
298+
description: TLS - Parameters related to the TLS
299+
properties:
300+
api:
301+
description: API tls type which encapsulates for API services
302+
properties:
303+
internal:
304+
description: Internal GenericService - holds the secret
305+
for the internal endpoint
306+
properties:
307+
secretName:
308+
description: SecretName - holding the cert, key for
309+
the service
310+
type: string
311+
type: object
312+
public:
313+
description: Public GenericService - holds the secret
314+
for the public endpoint
315+
properties:
316+
secretName:
317+
description: SecretName - holding the cert, key for
318+
the service
319+
type: string
320+
type: object
321+
type: object
322+
caBundleSecretName:
323+
description: CaBundleSecretName - holding the CA certs in
324+
a pre-created bundle file
325+
type: string
326+
type: object
297327
required:
298328
- apiImage
299329
- databaseInstance

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

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

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

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,36 @@ spec:
308308
description: ServiceUser - optional username used for this
309309
service to register in keystone
310310
type: string
311+
tls:
312+
description: TLS - Parameters related to the TLS
313+
properties:
314+
api:
315+
description: API tls type which encapsulates for API services
316+
properties:
317+
internal:
318+
description: Internal GenericService - holds the secret
319+
for the internal endpoint
320+
properties:
321+
secretName:
322+
description: SecretName - holding the cert, key
323+
for the service
324+
type: string
325+
type: object
326+
public:
327+
description: Public GenericService - holds the secret
328+
for the public endpoint
329+
properties:
330+
secretName:
331+
description: SecretName - holding the cert, key
332+
for the service
333+
type: string
334+
type: object
335+
type: object
336+
caBundleSecretName:
337+
description: CaBundleSecretName - holding the CA certs
338+
in a pre-created bundle file
339+
type: string
340+
type: object
311341
required:
312342
- apiImage
313343
- databaseInstance
@@ -414,6 +444,17 @@ spec:
414444
type: string
415445
sgCoreImage:
416446
type: string
447+
tls:
448+
description: TLS - Parameters related to the TLS
449+
properties:
450+
caBundleSecretName:
451+
description: CaBundleSecretName - holding the CA certs in
452+
a pre-created bundle file
453+
type: string
454+
secretName:
455+
description: SecretName - holding the cert, key for the service
456+
type: string
457+
type: object
417458
required:
418459
- centralImage
419460
- computeImage

0 commit comments

Comments
 (0)