FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Adding first consumer Neutron router flavors(interface only) to sync … · rackerlabs/understack@0b0ef7a · GitHub

Commit 0b0ef7a

Browse files
Adding first consumer Neutron router flavors(interface only) to sync operator
1 parent efa4b53 commit 0b0ef7a

21 files changed

Lines changed: 2239 additions & 9 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{{- if eq (include "understack.isEnabled" (list $.Values.site "openstack_sync_plugins")) "true" }}
2+
{{- $app := $.Values.site.openstack_sync_plugins }}
3+
---
4+
apiVersion: argoproj.io/v1alpha1
5+
kind: Application
6+
metadata:
7+
name: {{ printf "%s-%s" $.Release.Name "openstack-sync-plugins" }}
8+
finalizers:
9+
- resources-finalizer.argocd.argoproj.io
10+
annotations:
11+
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
12+
{{- with $app.wave }}
13+
argocd.argoproj.io/sync-wave: {{ quote . }}
14+
{{- end }}
15+
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
16+
spec:
17+
destination:
18+
namespace: {{ $.Values.site.openstack.namespace }}
19+
server: {{ $.Values.cluster_server }}
20+
project: understack
21+
sources:
22+
- path: components/openstack-sync-plugins
23+
ref: understack
24+
repoURL: {{ include "understack.understack_url" $ }}
25+
targetRevision: {{ include "understack.understack_ref" $ }}
26+
- path: {{ include "understack.deploy_path" $ }}/openstack-sync-plugins
27+
ref: deploy
28+
repoURL: {{ include "understack.deploy_url" $ }}
29+
targetRevision: {{ include "understack.deploy_ref" $ }}
30+
syncPolicy:
31+
automated:
32+
prune: true
33+
selfHeal: true
34+
syncOptions:
35+
- ServerSideApply=true
36+
- RespectIgnoreDifferences=true
37+
- ApplyOutOfSyncOnly=true
38+
{{- end }}

‎charts/argocd-understack/values.yaml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,18 @@ site:
310310
# -- Enable/disable deploying OpenStack sync shell-operator
311311
# @default -- false
312312
enabled: false
313+
# -- Sync wave for deployment ordering
314+
# @default -- 4
315+
wave: 4
316+
317+
# -- OpenStack sync custom resources
318+
openstack_sync_plugins:
319+
# -- Enable/disable deploying OpenStack sync custom resources
320+
# @default -- false
321+
enabled: false
322+
# -- Sync wave for deployment ordering
323+
# @default -- 5
324+
wave: 5
313325

314326
# -- RabbitMQ Cluster Operator (site deployment)
315327
rabbitmq_system:
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
name: neutronrouterflavors.neutron.understack.rackspace.net
6+
spec:
7+
group: neutron.understack.rackspace.net
8+
names:
9+
kind: NeutronRouterFlavor
10+
listKind: NeutronRouterFlavorList
11+
plural: neutronrouterflavors
12+
shortNames:
13+
- nrf
14+
singular: neutronrouterflavor
15+
scope: Namespaced
16+
versions:
17+
- name: v1alpha1
18+
served: true
19+
storage: true
20+
additionalPrinterColumns:
21+
- name: Flavor
22+
type: string
23+
jsonPath: .spec.name
24+
- name: ServiceType
25+
type: string
26+
jsonPath: .spec.service_type
27+
- name: Driver
28+
type: string
29+
jsonPath: .spec.driver
30+
- name: SyncStatus
31+
type: string
32+
jsonPath: .status.syncStatus
33+
- name: Age
34+
type: date
35+
jsonPath: .metadata.creationTimestamp
36+
schema:
37+
openAPIV3Schema:
38+
description: NeutronRouterFlavor defines one Neutron router flavor and its service profile.
39+
type: object
40+
required:
41+
- spec
42+
properties:
43+
apiVersion:
44+
type: string
45+
kind:
46+
type: string
47+
metadata:
48+
type: object
49+
spec:
50+
type: object
51+
required:
52+
- name
53+
- driver
54+
properties:
55+
name:
56+
description: Neutron router flavor name.
57+
type: string
58+
minLength: 1
59+
maxLength: 255
60+
pattern: ^[A-Za-z0-9._-]+$
61+
service_type:
62+
description: Neutron service type for the flavor.
63+
type: string
64+
enum:
65+
- L3_ROUTER_NAT
66+
minLength: 1
67+
maxLength: 255
68+
default: L3_ROUTER_NAT
69+
service_provider:
70+
description: Optional Neutron service provider name used when generating Neutron configuration.
71+
type: string
72+
minLength: 1
73+
maxLength: 255
74+
pattern: ^[A-Za-z0-9._-]+$
75+
description:
76+
description: Description stored on the Neutron router flavor.
77+
type: string
78+
maxLength: 1024
79+
driver:
80+
description: Service profile driver class.
81+
type: string
82+
minLength: 1
83+
maxLength: 1024
84+
pattern: ^[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)+$
85+
profile_description:
86+
description: Description stored on the Neutron service profile.
87+
type: string
88+
maxLength: 1024
89+
profile_id:
90+
description: Existing Neutron service profile ID to attach instead of creating or discovering one.
91+
type: string
92+
format: uuid
93+
meta_info:
94+
description: Service profile metainfo payload.
95+
type: object
96+
properties:
97+
resource_class:
98+
description: Resource class consumed by a physical router provider.
99+
type: string
100+
minLength: 1
101+
maxLength: 255
102+
pattern: ^[A-Za-z0-9._:-]+$
103+
vni_alloc:
104+
description: VNI allocation mode for VRF router providers.
105+
type: string
106+
enum:
107+
- "off"
108+
- "on"
109+
- auto
110+
status:
111+
description: NeutronRouterFlavorStatus defines the observed sync state.
112+
type: object
113+
properties:
114+
syncStatus:
115+
description: SyncStatus indicates the synchronization state with Neutron.
116+
type: string
117+
enum:
118+
- Synced
119+
- Failed
120+
- Unknown
121+
lastSyncTime:
122+
description: LastSyncTime is the last time the operator attempted to sync the flavor.
123+
type: string
124+
format: date-time
125+
observedGeneration:
126+
description: ObservedGeneration is the metadata generation last processed by the operator.
127+
type: integer
128+
format: int64
129+
message:
130+
description: Message provides details about the last sync attempt.
131+
type: string
132+
maxLength: 2048
133+
conditions:
134+
description: Conditions describe current observed state.
135+
type: array
136+
items:
137+
type: object
138+
required:
139+
- type
140+
- status
141+
properties:
142+
type:
143+
type: string
144+
status:
145+
type: string
146+
enum:
147+
- "True"
148+
- "False"
149+
- Unknown
150+
reason:
151+
type: string
152+
message:
153+
type: string
154+
maxLength: 2048
155+
lastTransitionTime:
156+
type: string
157+
format: date-time
158+
subresources:
159+
status: {}

‎components/openstack-sync-operator/templates/_helpers.tpl‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ Create the name of the service account to use.
6060
{{- end }}
6161

6262
{{/*
63-
Checksum for hook settings that affect shell-operator startup configuration.
63+
Build the checksum used on the Deployment pod template. When hook settings
64+
change, this checksum changes and Kubernetes restarts the pod. That restart is
65+
required because shell-operator reads hook watches only when the pod starts.
6466
*/}}
6567
{{- define "openstack-sync-operator.hookConfigChecksum" -}}
6668
{{- include "openstack-sync-operator.configuredHooks" . | fromYaml | toJson | sha256sum -}}

‎components/openstack-sync-operator/values.yaml‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,29 @@ openstack:
2222
cloudsSecretName: infrasetup
2323
cloudsSecretKey: clouds.yaml
2424

25+
# Built-in plugin enablement. Site values normally only override these booleans
26+
# and selected pluginData.<name>.hook.env values.
27+
# Built-in hook configuration. Site values normally override only:
28+
# - plugins.<name>: enable or disable a hook
29+
# - pluginData.<name>.hook.env: override selected hook env values
30+
#
31+
# Helm turns these hook settings into a checksum on the Deployment pod template.
32+
# When these values change, the checksum changes, so Kubernetes restarts the pod.
33+
# That restart is required because shell-operator reads hook watches only when
34+
# the pod starts.
35+
plugins:
36+
neutronRouterFlavors: false
37+
38+
pluginData:
39+
neutronRouterFlavors:
40+
hook:
41+
path: /hooks/router_flavors.py
42+
crd: crds/neutron.understack.rackspace.net_neutronrouterflavors.yaml
43+
envPrefix: NEUTRON_ROUTER_FLAVOR
44+
env:
45+
SYNC_CRONTAB: "0 * * * *"
46+
PRUNE: "false"
47+
2548
hooks: {}
2649

2750
podAnnotations: {}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
5+
resources:
6+
- neutron-router-flavors
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# yaml-language-server: $schema=https://rackerlabs.github.io/understack/schema/openstack-sync/neutron-router-flavor.schema.json
2+
---
3+
apiVersion: neutron.understack.rackspace.net/v1alpha1
4+
kind: NeutronRouterFlavor
5+
metadata:
6+
name: dynamic-vrf
7+
labels:
8+
app.kubernetes.io/name: openstack-sync-plugins
9+
app.kubernetes.io/component: neutron-router-flavors
10+
app.kubernetes.io/part-of: openstack-sync
11+
spec:
12+
name: dynamic_vrf
13+
service_type: L3_ROUTER_NAT
14+
description: Dynamic Fabric VRF (auto VNI)
15+
driver: neutron_understack.l3_router.vrf.Vrf
16+
profile_description: Dynamic Fabric VRF (auto VNI)
17+
meta_info:
18+
vni_alloc: auto
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
5+
resources:
6+
- pa1410.yaml
7+
- dynamic-vrf.yaml
8+
- static-vrf.yaml
9+
- svi.yaml
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# yaml-language-server: $schema=https://rackerlabs.github.io/understack/schema/openstack-sync/neutron-router-flavor.schema.json
2+
---
3+
apiVersion: neutron.understack.rackspace.net/v1alpha1
4+
kind: NeutronRouterFlavor
5+
metadata:
6+
name: pa1410
7+
labels:
8+
app.kubernetes.io/name: openstack-sync-plugins
9+
app.kubernetes.io/component: neutron-router-flavors
10+
app.kubernetes.io/part-of: openstack-sync
11+
spec:
12+
name: pa1410
13+
service_type: L3_ROUTER_NAT
14+
description: Physical PA 1410
15+
driver: neutron_understack.l3_router.palo_alto.PaloAlto
16+
profile_description: Physical PA 1410
17+
meta_info:
18+
resource_class: pa1410
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# yaml-language-server: $schema=https://rackerlabs.github.io/understack/schema/openstack-sync/neutron-router-flavor.schema.json
2+
---
3+
apiVersion: neutron.understack.rackspace.net/v1alpha1
4+
kind: NeutronRouterFlavor
5+
metadata:
6+
name: static-vrf
7+
labels:
8+
app.kubernetes.io/name: openstack-sync-plugins
9+
app.kubernetes.io/component: neutron-router-flavors
10+
app.kubernetes.io/part-of: openstack-sync
11+
spec:
12+
name: static_vrf
13+
service_type: L3_ROUTER_NAT
14+
description: Static Fabric VRF (admin supplied VNI)
15+
driver: neutron_understack.l3_router.vrf.Vrf
16+
profile_description: Static Fabric VRF (admin supplied VNI)
17+
meta_info:
18+
vni_alloc: "on"

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL