Skip to content

Commit 72883dc

Browse files
Deydra71openshift-merge-bot[bot]
authored andcommitted
[tlse] tls for PlacementAPI pod configuration
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The certs are mounted to in var/lib/config-data/tls/certs/%s.crt|key and a CA bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem. Server cert and key are intended to be moved by kolla to /etc/pki/tls/certs|private. Depends-On: openstack-k8s-operators/lib-common#428 Signed-off-by: Veronika Fisarova <[email protected]>
1 parent 2729bbc commit 72883dc

24 files changed

+873
-30
lines changed

api/bases/placement.openstack.org_placementapis.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,36 @@ spec:
365365
description: ServiceUser - optional username used for this service
366366
to register in keystone
367367
type: string
368+
tls:
369+
description: TLS - Parameters related to the TLS
370+
properties:
371+
api:
372+
description: API tls type which encapsulates for API services
373+
properties:
374+
internal:
375+
description: Internal GenericService - holds the secret for
376+
the internal endpoint
377+
properties:
378+
secretName:
379+
description: SecretName - holding the cert, key for the
380+
service
381+
type: string
382+
type: object
383+
public:
384+
description: Public GenericService - holds the secret for
385+
the public endpoint
386+
properties:
387+
secretName:
388+
description: SecretName - holding the cert, key for the
389+
service
390+
type: string
391+
type: object
392+
type: object
393+
caBundleSecretName:
394+
description: CaBundleSecretName - holding the CA certs in a pre-created
395+
bundle file
396+
type: string
397+
type: object
368398
required:
369399
- containerImage
370400
- databaseInstance

api/v1beta1/placementapi_types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package v1beta1
1919
import (
2020
condition "github.com/openstack-k8s-operators/lib-common/modules/common/condition"
2121
"github.com/openstack-k8s-operators/lib-common/modules/common/service"
22+
"github.com/openstack-k8s-operators/lib-common/modules/common/tls"
2223
"github.com/openstack-k8s-operators/lib-common/modules/common/util"
2324

2425
corev1 "k8s.io/api/core/v1"
@@ -115,6 +116,11 @@ type PlacementAPISpec struct {
115116
// +kubebuilder:validation:Optional
116117
// Override, provides the ability to override the generated manifest of several child resources.
117118
Override APIOverrideSpec `json:"override,omitempty"`
119+
120+
// +kubebuilder:validation:Optional
121+
// +operator-sdk:csv:customresourcedefinitions:type=spec
122+
// TLS - Parameters related to the TLS
123+
TLS tls.API `json:"tls,omitempty"`
118124
}
119125

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

api/v1beta1/zz_generated.deepcopy.go

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

config/crd/bases/placement.openstack.org_placementapis.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,36 @@ spec:
365365
description: ServiceUser - optional username used for this service
366366
to register in keystone
367367
type: string
368+
tls:
369+
description: TLS - Parameters related to the TLS
370+
properties:
371+
api:
372+
description: API tls type which encapsulates for API services
373+
properties:
374+
internal:
375+
description: Internal GenericService - holds the secret for
376+
the internal endpoint
377+
properties:
378+
secretName:
379+
description: SecretName - holding the cert, key for the
380+
service
381+
type: string
382+
type: object
383+
public:
384+
description: Public GenericService - holds the secret for
385+
the public endpoint
386+
properties:
387+
secretName:
388+
description: SecretName - holding the cert, key for the
389+
service
390+
type: string
391+
type: object
392+
type: object
393+
caBundleSecretName:
394+
description: CaBundleSecretName - holding the CA certs in a pre-created
395+
bundle file
396+
type: string
397+
type: object
368398
required:
369399
- containerImage
370400
- databaseInstance
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: placement.openstack.org/v1beta1
2+
kind: PlacementAPI
3+
metadata:
4+
name: placement
5+
spec:
6+
serviceUser: placement
7+
customServiceConfig: |
8+
[DEFAULT]
9+
debug = true
10+
databaseInstance: openstack
11+
databaseUser: placement
12+
debug:
13+
dbSync: false
14+
service: false
15+
preserveJobs: false
16+
replicas: 1
17+
secret: placement-secret
18+
tls:
19+
api:
20+
internal:
21+
secretName: cert-internal-svc
22+
public:
23+
secretName: cert-public-svc
24+
caBundleSecretName: combined-ca-bundle

0 commit comments

Comments
 (0)