Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
Update kustomize examples and docs
Browse files Browse the repository at this point in the history
Signed-off-by: Fabricio Aguiar <[email protected]>
  • Loading branch information
fao89 committed Mar 13, 2024
1 parent 9a00c47 commit 370a373
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 44 deletions.
44 changes: 0 additions & 44 deletions docs/assemblies/proc_creating-a-set-of-data-plane-nodes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,51 +32,7 @@ Create an `OpenStackDataPlaneNodeSet` CR for each logical grouping of nodes in y
====
If desired, update the `values.yaml` file with values from your environment and add other kustomizations as needed before generating the CRs. Alternatively, the generated CRS can be directly edited before being applied.
====
+

. The sample `OpenStackDataPlaneNodeSet` CR is connected to `cell1` by default. If you added additional Compute cells to the control plane and you want to connect the node set to one of the other cells, then you must create a custom service for the node set that includes the `Secret` CR for the cell:

.. Create a custom `nova` service that includes the `Secret` CR for the cell to connect to:
+
[subs=+quotes]
----
apiVersion: dataplane.openstack.org/v1beta1
kind: OpenStackDataPlaneService
metadata:
name: *nova-cell-custom*
spec:
label: dataplane-deployment-custom-service
playbook: osp.edpm.nova
...
secrets:
- nova-cell2-compute-config <1>
----
+
<1> The `Secret` CR generated by the control plane for the cell.
+
For information about how to create a custom service, see xref:proc_creating-a-custom-service_dataplane[Creating a custom service].

.. Replace the `nova` service in your `OpenStackDataPlaneNodeSet` CR with your custom `nova` service:
+
[subs=+quotes]
----
apiVersion: dataplane.openstack.org/v1beta1
kind: OpenStackDataPlaneNodeSet
metadata:
name: openstack-edpm-ipam
spec:
services:
- configure-network
- validate-network
- install-os
- configure-os
- run-os
- ovn
- libvirt
- *nova-cell-custom*
- telemetry
----
+
[NOTE]
Do not change the order of the default services.

Expand Down
33 changes: 33 additions & 0 deletions examples/nova_cell_custom/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

namespace: openstack

components:
- ../base

resources:
- openstackdataplanenovaservice.yaml

configMapGenerator:
- name: nova-extra-config
files:
- 25-nova-extra.conf=nova-extra.conf
options:
disableNameSuffixHash: true

patches:
- target:
kind: OpenStackDataPlaneService
name: nova
patch: |-
- op: replace
path: /metadata/name
value: nova-custom
- op: add
path: /spec/configMaps
value:
- nova-extra-config
configurations:
- servicename.yaml
3 changes: 3 additions & 0 deletions examples/nova_cell_custom/nova-extra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[compute]
cpu_shared_set = 2,6
cpu_dedicated_set = 1,3,5,7
20 changes: 20 additions & 0 deletions examples/nova_cell_custom/openstackdataplanenovaservice.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: dataplane.openstack.org/v1beta1
kind: OpenStackDataPlaneService
metadata:
name: nova
spec:
secrets:
- nova-cell1-compute-config
# NOTE: this Secret needs to be created before deploying the data plane.
# It should contain an ssh key-pair in the secret fields: ssh-privatekey
# and ssh-publickey
- nova-migration-ssh-key
playbook: osp.edpm.nova
tlsCert:
contents:
- dnsnames
- ips
networks:
- ctlplane
issuer: osp-rootca-issuer-internal
caCerts: combined-ca-bundle
10 changes: 10 additions & 0 deletions examples/nova_cell_custom/servicename.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file is for teaching kustomize how to substitute OpenStackDataPlaneService name reference in OpenStackDataPlaneNodeSet
nameReference:
- kind: OpenStackDataPlaneService
version: v1beta1
group: dataplane.openstack.org
fieldSpecs:
- kind: OpenStackDataPlaneNodeSet
version: v1beta1
group: dataplane.openstack.org
path: spec/services

0 comments on commit 370a373

Please sign in to comment.