WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only

OpenLiberty Operator - setting hostAliases

  • 1.  OpenLiberty Operator - setting hostAliases

    Posted Fri February 28, 2025 10:20 AM

    We are using the OpenLiberty operator on RedHat Openshift to deploy Liberty applications. Now we've hit a requirement to add a hostname for DNS resultion to the /etc/hosts on the pod. While de Deployment CRD provides the `hostAliases` YAML key for that this is missing in the OpenLibertyApplication CRD. There is an issue from 202 open for that (Add hostAlias (/etc/hosts entry) in OpenLibertyApplication CR · Issue #211 · OpenLiberty/open-liberty-operator) but unfortunately not really a solution so far.

    For us it becomes even harder as we are using ArgoCD to deploy the Helm chart which creats the OpenLibertyApplication manifest. So patching the Deployment created by the Operator via a PostSync Hook might not work as the Hook might run before the Operator updates the deployment. I'm not aware of a way to sync these two tasks. 

    Thanks a lot in advance for any advice, Hermann



    ------------------------------
    Hermann Huebler
    Cloud Architect
    Alpium IT Solutions GmbH
    Vienna
    Austria

    #IBMChampion
    ------------------------------