-
Notifications
You must be signed in to change notification settings - Fork 125
Add octavia service to SKMO central and leaf regions #759
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| --- | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: edpm-nodeset-values | ||
| data: | ||
| nodeset: | ||
| ansible: | ||
| ansibleVars: | ||
| edpm_ovn_bridge_mappings: | ||
| - "datacentre:br-ex" | ||
| - "octavia:octbr" | ||
| edpm_network_config_template: | | ||
| --- | ||
| {% set mtu_list = [ctlplane_mtu] %} | ||
| {% for network in nodeset_networks %} | ||
| {% set _ = mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) %} | ||
| {%- endfor %} | ||
| {% set min_viable_mtu = mtu_list | max %} | ||
| network_config: | ||
| - type: interface | ||
| name: nic1 | ||
| use_dhcp: true | ||
| mtu: {{ min_viable_mtu }} | ||
| - type: ovs_bridge | ||
| name: {{ neutron_physical_bridge_name }} | ||
| mtu: {{ min_viable_mtu }} | ||
| use_dhcp: false | ||
| dns_servers: {{ ctlplane_dns_nameservers }} | ||
| domain: {{ dns_search_domains }} | ||
| addresses: | ||
| - ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }} | ||
| routes: {{ ctlplane_host_routes }} | ||
| members: | ||
| - type: interface | ||
| name: nic2 | ||
| mtu: {{ min_viable_mtu }} | ||
| # force the MAC address of the bridge to this interface | ||
| primary: true | ||
| {% for network in nodeset_networks %} | ||
| - type: vlan | ||
| mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} | ||
| vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }} | ||
| addresses: | ||
| - ip_netmask: | ||
| {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} | ||
| routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} | ||
| {% endfor %} | ||
| - type: ovs_bridge | ||
| name: octbr | ||
| mtu: {{ min_viable_mtu }} | ||
| use_dhcp: false | ||
| members: | ||
| - type: vlan | ||
| mtu: {{ min_viable_mtu }} | ||
| vlan_id: 23 | ||
| device: nic2 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| # OVN Octavia compute bridge overlay for EDPM nodesets. | ||
| apiVersion: kustomize.config.k8s.io/v1alpha1 | ||
| kind: Component | ||
|
|
||
| patches: | ||
| - target: | ||
| kind: ConfigMap | ||
| name: edpm-nodeset-values | ||
| path: edpm-octavia-ansible-vars.yaml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| # Provide octavia-network-values ConfigMap for use by replacements. | ||
| apiVersion: kustomize.config.k8s.io/v1alpha1 | ||
| kind: Component | ||
|
|
||
| resources: | ||
| - octavia-network-values.yaml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # local-config: octavia keys for replacements (static oc kustomize; ci-gen also adds octavia at deploy) | ||
| --- | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: octavia-network-values | ||
| annotations: | ||
| config.kubernetes.io/local-config: "true" | ||
| data: | ||
| octavia: | ||
| dnsDomain: octavia.example.com | ||
| mtu: 1500 | ||
| vlan: 23 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This [1] https://github.com/openstack-k8s-operators/architecture/pull/759/changes#diff-f56986a4376344555d922a11476626568461efa2c013fcf4ecd8720cbe518209R141-R150 |
||
| base_iface: enp7s0 | ||
| subnets: | ||
| - allocationRanges: | ||
| - end: 172.23.0.250 | ||
| start: 172.23.0.100 | ||
| cidr: 172.23.0.0/24 | ||
| name: subnet1 | ||
| vlan: 23 | ||
| net-attach-def: | | ||
| { | ||
| "cniVersion": "0.3.1", | ||
| "name": "octavia", | ||
| "type": "bridge", | ||
| "bridge": "octbr", | ||
| "ipam": { | ||
| "type": "whereabouts", | ||
| "range": "172.23.0.0/24", | ||
| "range_start": "172.23.0.30", | ||
| "range_end": "172.23.0.70", | ||
| "routes": [ | ||
| { | ||
| "dst": "172.24.0.0/16", | ||
| "gw": "172.23.0.150" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| # Patch service-values ConfigMap with Octavia service parameters. | ||
| apiVersion: kustomize.config.k8s.io/v1alpha1 | ||
| kind: Component | ||
|
|
||
| patches: | ||
| - target: | ||
| kind: ConfigMap | ||
| name: service-values | ||
| path: octavia-service-values.yaml |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No rationale, I moved them to |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # Octavia keys for service-values ConfigMap (shared by central and leaf control planes) | ||
| --- | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: service-values | ||
| annotations: | ||
| config.kubernetes.io/local-config: "true" | ||
| data: | ||
| ovn: | ||
| ovnController: | ||
| nicMappings: | ||
| octavia: octbr | ||
| octavia: | ||
| enabled: true | ||
| amphoraImageContainerImage: quay.io/gthiemonge/octavia-amphora-image | ||
| apacheContainerImage: registry.redhat.io/ubi9/httpd-24:latest | ||
| octaviaAPI: | ||
| networkAttachments: | ||
| - internalapi | ||
| octaviaHousekeeping: | ||
| networkAttachments: | ||
| - octavia | ||
| octaviaHealthManager: | ||
| networkAttachments: | ||
| - octavia | ||
| octaviaWorker: | ||
| networkAttachments: | ||
| - octavia |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Octavia replacement blocks in this file and |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
|
|
||
| resources: | ||
| - ../../../multi-namespace/control-plane/networking | ||
| - octavia-netattach.yaml | ||
|
|
||
| components: | ||
| - ../../../../../va/multi-namespace-skmo/networking-octavia |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All the config here is identical across all three nodes. Do we need to use a label selector? Could we just drop the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking at it, the selectors really seem redundant. However I'm not sure about @vakwetu originial idea/purpose (maybe for future testing expansion), so I'd keep it if it's not a blocker.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No worries. We can always improve it later in a follow-up if @vakwetu agrees. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @vakwetu confirmed that |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| --- | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
|
|
||
| # ci_gen_kustomize_values writes env-specific network-values to the base | ||
| # values.yaml before build (see automation vars src_file). | ||
| resources: | ||
| - ../../../../multi-namespace/control-plane/networking/nncp | ||
|
|
||
| components: | ||
| - ../../../components/octavia-network-values | ||
|
|
||
| patches: | ||
| - target: | ||
| kind: NodeNetworkConfigurationPolicy | ||
| patch: |- | ||
| - op: add | ||
| path: /spec/desiredState/interfaces/- | ||
| value: | ||
| description: Octavia vlan host interface | ||
| name: octavia | ||
| state: up | ||
| type: vlan | ||
| vlan: | ||
| base-iface: _replaced_ | ||
| id: _replaced_ | ||
| - target: | ||
| kind: NodeNetworkConfigurationPolicy | ||
| patch: |- | ||
| - op: add | ||
| path: /spec/desiredState/interfaces/- | ||
| value: | ||
| description: Octavia bridge | ||
| mtu: 1500 | ||
| name: octbr | ||
| type: linux-bridge | ||
| bridge: | ||
| options: | ||
| stp: | ||
| enabled: false | ||
| port: | ||
| - name: octavia | ||
|
|
||
| replacements: | ||
| - source: | ||
| kind: ConfigMap | ||
| name: octavia-network-values | ||
| fieldPath: data.octavia.base_iface | ||
| targets: | ||
| - select: | ||
| kind: NodeNetworkConfigurationPolicy | ||
| fieldPaths: | ||
| - spec.desiredState.interfaces.[name=octavia].vlan.base-iface | ||
| - source: | ||
| kind: ConfigMap | ||
| name: octavia-network-values | ||
| fieldPath: data.octavia.vlan | ||
| targets: | ||
| - select: | ||
| kind: NodeNetworkConfigurationPolicy | ||
| fieldPaths: | ||
| - spec.desiredState.interfaces.[name=octavia].vlan.id |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When this is built (via [1]), there is no associated |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| --- | ||
| apiVersion: k8s.cni.cncf.io/v1 | ||
| kind: NetworkAttachmentDefinition | ||
| metadata: | ||
| name: octavia | ||
| namespace: openstack | ||
| labels: | ||
| osp/net: octavia | ||
| osp/net-attach-def-type: standard | ||
| spec: | ||
| config: | | ||
| _replaced_ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: octavia-ca-passphrase | ||
| type: Opaque | ||
| stringData: | ||
| server-ca-passphrase: "12345678" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*values.yamlshould ideally exist in theexamplesdir and not inva,dtorlibdirs. The*values.yamlfiles are exposed in theexamplesdir as the interfaces for user customization.