Skip to content

Conversation

@awfabian-rs
Copy link
Contributor

The install scripts, etc. need to account for existing environments without Kube-OVN TLS.

Here, the install script looks at the OVN chart overrides and chooses a 'tcp' or 'ssl' connection string based on whether we have ENABLE_SSL set for Kube-OVN.

Additionally, installations without Kube-OVN TLS enabled won't have an OVN client TLS secret in the openstack namespace (or the kube-system namespace for that matter). Trying to make a volume from a non-existent secret would stop the pods from starting. k8s has an option to make a volume optional, though, so this commit also, with the secret volume in the base overrides, uses kustomize to make the volume optional. I don't believe the OpenStack helm charts would allow me to put this optional: true flag on the volume specification for the pods directly, so I just patched in it with kustomize

@awfabian-rs awfabian-rs marked this pull request as draft December 5, 2025 20:13
@awfabian-rs awfabian-rs marked this pull request as ready for review December 8, 2025 04:00
@awfabian-rs
Copy link
Contributor Author

The following PRs should get merged at the same time, as we don't want to
enable this for existing environments in a controlled manner. This explicitly
sets the ENABLE_SSL to false for our pre-existing environments:

This commit works, but note all of the following:

- Octavia must also talk to the OVN NB and SB using encryption
- Aside from Octavia, this would work for new installations, however:
    - it has overrides to mount a cert secret in the Neutron pods that won't
      exist for already-deployed installations with Kube-OVN's `ENABLE_SSL` set
      to false
        - which would cause those overrides to fail
    - I modified the Neutron install script to use 'ssl:' instead of 'tcp:'
        - that would also fail on existing installations with `ENABLE_SSL` set
          to false

So this commit needs additional work to:

1. Degrade gracefully so that an installation with `ENABLE_SSL: false` works
    - with respect to the secret mount and `tcp:` and `ssl:` NB and SB
      connection strings
2. Enable Octavia using TLS connections for the NB and SB for OVN

Or however we want to resolve that. Possibly, we could:

- take the NB and SB connection strings out of the Neutron install script and
  use the services like `ovn-nb.kube-ovn.svc.cluster.local` for NB and SB
  connections in the Neutron helm overrides, or
- modify the install script to try to use `yq` to collect whether we have
  `ENABLE_SSL` set to true as it walks through the overrides so that it can
  use `ssl:` or `tcp:` as appropriate in the overrides set on the helm install
  on the command line.
It works in a lab like this, but has the same rough edges as the Neutron commit,
namely, I put 'ssl:' in the install script and I believe it should choose or
install with 'tcp:' connections where we don't have Kube-OVN TLS enabled.

It felt a little hacky to put the volume mounts in
`octavia_amphora_provider.yaml.j2` in addition to the base overrides, but this
file ends up as `/tmp/octavia_helm_overrides.yaml` in a hyperconverged lab, and
the hyperconverged lab script, invoked with `-x` for extra components
(currently, k9s and _Octavia_), throws `-f /tmp/octavia_helm_overrides.yaml`
on the _Octavia_ install, and that clobbers mounting the certificate for OVN,
because it contains a list of volumes to mount to the pods, and that replaces
the list from the base overrides.

Additionally, I haven't yet verified what happens if namespace openstack
doesn't actually have a `ovn-client-tls` secret, which again amounts to the
as-of-yet not-fully-solved problem of detecting a cluster without _Kube-OVN_
TLS enabled and degrading gracefully

Also, as when doing this with Neutron, I would like to phase out using the
service IP and use service names like `ovn-nb.kube-system.svc.cluster.local`
The install scripts, etc. need to account for existing environments without
Kube-OVN TLS.

Here, the install script looks at the OVN chart overrides and chooses a 'tcp'
or 'ssl' connection string based on whether we have `ENABLE_SSL` set for
Kube-OVN.

Additionally, installations without Kube-OVN TLS enabled won't have an OVN
client TLS secret in the `openstack` namespace (or the `kube-system` namespace
for that matter). Trying to make a volume from a non-existent secret would stop
the pods from starting. k8s has an option to make a volume optional, though, so
this commit also, with the secret volume in the base overrides, uses _kustomize_
to make the volume optional. I don't believe the OpenStack helm charts would
allow me to put this `optional: true` flag on the volume specification for the
pods directly, so I just patched in it with _kustomize_
@awfabian-rs awfabian-rs force-pushed the PR-genestack-tls-OSPC-1624-branch01 branch from 1df6c1c to 76704ef Compare December 9, 2025 18:51
@awfabian-rs
Copy link
Contributor Author

  • I have successfully built hyperconverged labs with this where:
    • I have ENABLE_SSL: true and ENABLE_SSL: false and everything comes up both ways
    • I have built and tested OVN load balancers each way
  • The ENABLE_SSL: true setting essentially just encrypts connections to OVN's OVSDB
  • On the original jira OSPC-1624, we simply wanted to enable this on the development branch/main if it all seemed to work to continue the process of getting this fully integrated
    • Pursuant to that, see comment above with PRs so as not to have this accidentally roll out to our environments

@awfabian-rs awfabian-rs changed the title fix: Make Neutron and OVN installation work without Kube-OVN TLS. fix: Enable Kube-OVN TLS and configure Neutron and Octavia for it Dec 9, 2025
Copy link
Contributor

@dwith dwith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks thorough and well documented with https://rackspace.atlassian.net/browse/OSPC-1624. For consistency with overrides ENABLE_SSL this does need merged. As ENABLE_SSL is a toggle for protecting us from explicitly enabling this feature until we are ready, I approve. The additional volume mounts are needed for the secret.

@dwith dwith merged commit 3837de4 into rackerlabs:main Dec 9, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants