Skip to content

Support multiple hostnames and custom domains

Alexandre Lossent requested to merge multi_hostnames into master

This adds support for multiple hostnames, changing hostnames (wordpress requires that old hostnames remain in the list of hostnames) and custom domains.

Highlights:

  • we need to migrate from single .spec.wordpress.hostname to multi-valued .spec.wordpress.hostnames. We do this in 3 steps: step 1 we add hostnames and support both hostname and hostnames; step 2 we copy hostname to hostnames in all resources; step 3 we remove hostname.
  • new operator configmap to deploy in okd4-install (like other operators that support custom domains)
  • new wordpress sites seem broken but it seems for reasons unrelated to this change, see below

Detailed follow-up work for deployment:

  • test new wordpress instance on dev cluster (@alossent) => setup looks OK but wordpress doesn't start: error mysqlcheck: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory (error doesn't seem related to this MR?)
  • test converting an existing wordpress instance from previous version of the operator on dev cluster. Probably there will be a short downtime as Routes get replaced by Ingress => OTG needed
  • before deployment:
    • MR to okd4-install to add the wordpress-operator-configuration configmap (copy grafana-operator-configuration) - this will need to be deployed before we can update the operator in staging/prod
    • set the new wordpress-operator.cern.ch/pause-reconcile=true label on the white-rabbit-collaboration-website project's instance (RQF2560124) using multiple domains + custom domains
  • immediately after deployment:
    • copy spec.wordpress.hostname to spec.wordpress.hostnames on all wordpress resources that don't already have it (app-cat-stg and app-catalogue)
    • @alossent will need to normalize white-rabbit-collaboration-website and remove temp workaround
    • check the kicon project which also uses a custom domain but some external proxy, not sure if it'll get a certificate successfully in this setup?
    • update the hostnameinfosources https://gitlab.cern.ch/paas-tools/okd4-install/-/blob/master/chart/values-app-catalogue.yaml#L588 to use spec.wordpress.hostnames (app-cat-stg and app-catalogue) and deploy the change quickly
  • follow-up MR to create a new version of the operator that removes the spec.wordpress.hostname field and keeps only spec.wordpress.hostnames and other cleanup after the transition (indicated by TODO next to spec.wordpress.hostname). Do this quickly after deploying this version, we don't want/need a long transition period
Edited by Alexandre Lossent

Merge request reports