Skip to content

Commit 33a4869

Browse files
Update docs to include about PlacementAPI
Includes updation of design, development docs, README.md Signed-off-by: Amartya Sinha <amsinha@redhat.com>
1 parent 3a237b5 commit 33a4869

3 files changed

Lines changed: 71 additions & 27 deletions

File tree

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
# nova-operator
22

3-
A golang operator for openstack nova lifecycle management
3+
A golang operator for OpenStack Nova and Placement lifecycle management
44

55
## nova-operator Goal
66

7-
The goal of nova-operator is to manage custom resource that define a nova control plane (CRD).
8-
Nova operator continuously monitors the state of Nova CR and takes actions to ensure that the desired state is applied and reflected in nova pods. These pods run actual nova services, nova-operators ensure they are deployed, scaled, and configured correctly.
9-
**Note:** Nova CR is created by openstack-operator as per user initial deployment.
7+
The goal of nova-operator is to manage custom resources that define an OpenStack
8+
Nova control plane and the Placement API service. The operator continuously
9+
monitors the state of Nova and PlacementAPI CRs and takes actions to ensure that
10+
the desired state is applied and reflected in the service pods. These pods run
11+
actual nova and placement services; nova-operator ensures they are deployed,
12+
scaled, and configured correctly.
13+
**Note:** Nova and PlacementAPI CRs are created by openstack-operator as part of
14+
the initial deployment.
1015

1116
## Description
1217

1318
This operator is built using the operator-sdk framework to provide day one and day two
14-
lifecycle management of the OpenStack nova service on an OpenShift cluster.
19+
lifecycle management of the OpenStack Nova and Placement services on an OpenShift
20+
cluster. The Placement service code that previously lived in placement-operator is
21+
now managed by this operator.
1522

1623
## Getting Started
1724

doc/design.md

Lines changed: 53 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,44 @@
1-
# Goals of the Nova operator
1+
# Goals of the nova-operator
22

33
The high-level goal is to provide a set of APIs in a form of Kubernetes Custom
44
Resource Definitions (CRD) implemented with Operator SDK to deploy OpenStack
5-
Nova control plane in OpenShift.
5+
Nova and Placement control plane services in OpenShift.
6+
7+
The Placement service code that previously lived in placement-operator is now
8+
managed by the same nova-operator binary and OLM bundle. There is no separate
9+
placement-operator deployment.
610

711
# Decisions
812

9-
1. The Nova operator provides a single top-level API for the OpenStack
13+
1. The nova-operator provides a single top-level Nova API for the OpenStack
1014
operator to instantiate a Nova control plane by creating a single Custom
1115
Resource (CR). We support this to hide any nova-specific deployment logic from
12-
the OpenStack operator.
13-
14-
2. The Nova operator allows deploying every Nova service independently by
15-
instantiating the matching Nova*ServiceType* CRD without the need to create
16-
higher-level CRDs. We support this to limit the dependency of each
17-
Nova*ServiceType* CRD to the minimum and by that to allow testing of each
18-
Nova*ServiceType* CRD in isolation. As a consequence the Nova*ServiceType* CRDs
19-
get their DB and message bus dependencies as Secret objects having user,
20-
password, and hostname fields. The top level Nova CRD is responsible to select
21-
the appropriate k8s Service instance to get the hostname of the service and to
22-
register a user there. Then the Nova CRD packages this connection information
23-
to Secret objects and pass those to lower level CRDs.
24-
25-
3. The Nova operator provides Nova Cells v2 aware deployment structure by
16+
the OpenStack operator. Placement has no equivalent top-level CR; only the
17+
PlacementAPI service CR exists.
18+
19+
2. The nova-operator allows deploying control plane services independently by
20+
instantiating a service-level CRD without the matching top-level CR. We support
21+
this to limit the dependency of each service CRD to the minimum and by that to
22+
allow testing of each service CRD in isolation. This applies to the
23+
Nova*ServiceType* CRDs and the PlacementAPI CRD.
24+
25+
1. For the Nova*ServiceType* CRDs, they get their DB and message bus
26+
dependencies as Secret objects having user, password, and hostname fields.
27+
The top level Nova CRD is responsible to select the
28+
appropriate k8s Service instance to get the hostname of the service and to
29+
register a user there. Then the Nova CRD packages this connection
30+
information to Secret objects and pass those to lower level CRDs.
31+
32+
2. For the PlacementAPI CRD, it gets its DB and service password
33+
dependencies from the Secret referenced in
34+
`PlacementAPI.Spec.Secret` and from the MariaDB instance referenced in
35+
`PlacementAPI.Spec.DatabaseInstance`. The openstack-operator is responsible
36+
to create the PlacementAPI CR and the supporting Secrets in the deployment
37+
namespace. Nova services such as nova-scheduler consume the placement API
38+
via a registered keystone endpoint; they do not deploy PlacementAPI as part
39+
of the Nova CR reconciliation.
40+
41+
3. The nova-operator provides Nova Cells v2 aware deployment structure by
2642
default to support scaling the deployment to more than one real cell without
2743
the need to restructure the existing deployment. This means:
2844

@@ -34,8 +50,9 @@ the need to restructure the existing deployment. This means:
3450

3551
# Design details
3652

37-
## Configuration generation
38-
The configuration for the podified nova services are generated into Secrets.
53+
## Nova configuration generation
54+
55+
The configuration for the podified Nova services are generated into Secrets.
3956
The top level services generate Secrets in the form of
4057
'`nova-<service-name>-config-data` (e.g. `nova-scheduler-config-data`). The
4158
cell level service config Secrets are named with the pattern
@@ -104,3 +121,20 @@ the neutron-metadata-agent:
104121
2. A secret that is shared between the nova-metadata service and the
105122
neutron-metadata-agent so the former can authenticate the requests from the
106123
latter.
124+
125+
## PlacementAPI configuration generation
126+
127+
The configuration for the podified placement-api service is generated into
128+
Secrets named after the PlacementAPI CR. For a PlacementAPI CR named
129+
`placement` the operator generates `<PlacementAPI name>-config-data` (e.g.
130+
`placement-config-data`) and `<PlacementAPI name>-scripts` (e.g.
131+
`placement-scripts`). Before the placement-api Deployment is created, the
132+
operator runs a db sync Job named `<PlacementAPI name>-db-sync`.
133+
134+
The config secrets will contain multiple keys if the user provided
135+
`CustomServiceConfig` in the service CR. These config secrets are mounted to
136+
the pod and kolla is used to copy the resulting config files to
137+
`/etc/placement/placement.conf.d/`. The nova-operator will generate the default
138+
configuration from templates under `templates/placement/api/` and copy the user
139+
defined snippet to the Secret to key `custom.conf`. So the user defined
140+
configuration always override the default config.

doc/developer.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ between the developers.
66

77
Please read the [developer guidelines](https://github.com/openstack-k8s-operators/docs/blob/main/developer.md)
88
from openstack-k8s-operator first. Also use that doc for guidelines that are
9-
true for the whole openstack-k8s-operator development and use this nova
10-
specific doc for nova specific guidelines.
9+
true for the whole openstack-k8s-operator development and use this doc for
10+
nova-operator specific guidelines.
1111

12-
## \<add the next nova specific guideline here\>
12+
nova-operator manages both OpenStack Nova and PlacementAPI CRs. Design choices
13+
and directory layout are documented in [design.md](design.md).
14+
15+
## \<add the next nova-operator specific guideline here\>

0 commit comments

Comments
 (0)