Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce DCN DT #392

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions automation/vars/dcn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
vas:
dcn:
stages:
- path: examples/dt/dcn/control-plane/nncp
wait_conditions:
- >-
oc -n openstack wait nncp
-l osp/nncm-config-type=standard
--for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured
--timeout=60s
values:
- name: network-values
src_file: values.yaml
build_output: nncp.yaml

- path: examples/dt/dcn/control-plane
wait_conditions:
- >-
oc -n openstack wait osctlplane controlplane --for condition=Ready
--timeout=30m
values:
- name: network-values
src_file: nncp/values.yaml
build_output: ../control-plane.yaml
11 changes: 11 additions & 0 deletions dt/dcn/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# DT: DCN

If you are looking for information on how to deploy the DCN VA, then
please see the
[DCN README in the examples directory](../../examples/dt/dcn/README.md).

This directory, `architecture/dt/dcn/`, exists so that the
[kustomization.yaml](../../examples/dt/dcn/kustomization.yaml)
in the examples directory for the DCN VA, reference it by path as a
component. Its contents are likely uninteresting unless you want to
understand how kustomize was implemented in this repository.
46 changes: 46 additions & 0 deletions dt/dcn/edpm-post-ceph/deployment/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

transformers:
# Set namespace to OpenStack on all namespaced objects without a namespace
- |-
apiVersion: builtin
kind: NamespaceTransformer
metadata:
name: _ignored_
namespace: openstack
setRoleBindingSubjects: none
unsetOnly: true
fieldSpecs:
- path: metadata/name
kind: Namespace
create: true

components:
- ../../../../lib/dataplane/deployment

replacements:
- source:
kind: ConfigMap
name: edpm-deployment-values-post-ceph
fieldPath: data.deployment.name
targets:
- select:
kind: OpenStackDataPlaneDeployment
fieldPaths:
- metadata.name
options:
create: true

- source:
kind: ConfigMap
name: edpm-deployment-values-post-ceph
fieldPath: data.nodeset_name
targets:
- select:
kind: OpenStackDataPlaneDeployment
fieldPaths:
- spec.nodeSets.*
options:
create: true
10 changes: 10 additions & 0 deletions dt/dcn/edpm-post-ceph/nodeset/ceph_secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: v1
data:
ceph.client.openstack.keyring: _ignored_
ceph.conf: _ignored_
kind: Secret
metadata:
name: ceph-conf-files
namespace: openstack
type: Opaque
17 changes: 17 additions & 0 deletions dt/dcn/edpm-post-ceph/nodeset/extra_mounts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
apiVersion: dataplane.openstack.org/v1beta1
kind: OpenStackDataPlaneNodeSet
metadata:
name: openstack-edpm
spec:
nodeTemplate:
extraMounts:
- extraVolType: Ceph
mounts:
- mountPath: /etc/ceph
name: ceph
readOnly: true
volumes:
- name: ceph
secret:
secretName: ceph-conf-files
252 changes: 252 additions & 0 deletions dt/dcn/edpm-post-ceph/nodeset/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

transformers:
# Set namespace to OpenStack on all namespaced objects without a namespace
- |-
apiVersion: builtin
kind: NamespaceTransformer
metadata:
name: _ignored_
namespace: openstack
setRoleBindingSubjects: none
unsetOnly: true
fieldSpecs:
- path: metadata/name
kind: Namespace
create: true

components:
- ../../../../lib/control-plane
- ../../../../lib/dataplane/nodeset

resources:
- ceph_secret.yaml
- nova_ceph.yaml

patches:
- target:
kind: OpenStackDataPlaneNodeSet
name: .*
path: extra_mounts.yaml

replacements:
- source:
kind: ConfigMap
name: edpm-nodeset-values-post-ceph
fieldPath: data.nodeset_name
targets:
- select:
kind: OpenStackDataPlaneNodeSet
fieldPaths:
- metadata.name
options:
create: true

# Control plane custom service configs
- source:
kind: ConfigMap
name: service-values
fieldPath: data.nova.customServiceConfig
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.nova.customServiceConfig
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.neutron.template.customServiceConfig
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.neutron.template.customServiceConfig
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.cinderBackup.customServiceConfig
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.cinder.template.cinderBackup.customServiceConfig
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.cinderVolumes
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.cinder.template.cinderVolumes
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.cinderAPI.replicas
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.cinder.template.cinderAPI.replicas
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.cinderBackup.replicas
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.cinder.template.cinderBackup.replicas
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.glance.customServiceConfig
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.glance.template.customServiceConfig
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.glance.glanceAPIs
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.glance.template.glanceAPIs
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.manila.enabled
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.manila.enabled
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.manila.manilaAPI.customServiceConfig
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.manila.template.manilaAPI.customServiceConfig
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.manila.manilaShares.share1.customServiceConfig
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.manila.template.manilaShares.share1.customServiceConfig
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.extraMounts
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.extraMounts
options:
create: true
# Ceph keyring
- source:
kind: ConfigMap
name: edpm-nodeset-values-post-ceph
fieldPath: data.ceph_conf
targets:
- select:
kind: Secret
name: ceph-conf-files
fieldPaths:
- data
options:
create: true
# Nova Ceph conf
- source:
kind: ConfigMap
name: edpm-nodeset-values-post-ceph
fieldPath: data.nova.ceph.conf
targets:
- select:
kind: ConfigMap
name: ceph-nova
fieldPaths:
- data.03-ceph-nova\.conf
options:
create: true
- source:
kind: ConfigMap
name: edpm-nodeset-values-post-ceph
fieldPath: data.nova.name
targets:
- select:
kind: ConfigMap
name: ceph-nova
fieldPaths:
- metadata.name
options:
create: true
- source:
kind: ConfigMap
name: edpm-nodeset-values-post-ceph
fieldPath: data.nova.dataSources
targets:
- select:
kind: OpenStackDataPlaneService
fieldPaths:
- spec.dataSources
options:
create: true
# Dataplane services override (overrides ../../../lib/dataplane which
# is using edpm-nodeset-values ConfigMap)
- source:
kind: ConfigMap
name: edpm-nodeset-values-post-ceph
fieldPath: data.nodeset.services
targets:
- select:
kind: OpenStackDataPlaneNodeSet
fieldPaths:
- spec.services
options:
create: true
- source:
kind: ConfigMap
name: edpm-nodeset-values-post-ceph
fieldPath: data.customDataplanService.name
targets:
- select:
kind: OpenStackDataPlaneService
fieldPaths:
- metadata.name
options:
create: true
Loading