konveyor / move2kube

Move2Kube is a command-line tool for automating creation of Infrastructure as code (IaC) artifacts. It has inbuilt support for creating IaC artifacts for replatforming to Kubernetes/Openshift.
https://move2kube.konveyor.io/
Apache License 2.0
383 stars 118 forks source link

Disable admin console on wildfly images #919

Open deewhyweb opened 1 year ago

deewhyweb commented 1 year ago

When running wildfly or JBoss images on kubernetes the admin console is not required. All configuration changes should be made using scripts at image build time or on startup using the jboss-cli.

Disabling the admin console will allow the health check required by the wildfly operator to work without causing any potential security implications. For the health check to work the management interface needs to be available on 0.0.0.0

The OpenShift JBoss image defaults to disabled admin console. It does this by using a standalon-openshift.xml configuration with the console disabled.

I recommend we do something similar, e.g. include a custom standalone.xml, or edit the standalone.xml using an xml parser in the dockerfile.

deewhyweb commented 1 year ago

Add console-enabled="false" to in standalone.xml (or host.xml):

Raw

...(snip)...
HarikrishnanBalagopal commented 5 months ago
The OpenShift JBoss image defaults to disabled admin console. It does this by using a standalon-openshift.xml configuration with the console disabled.

@deewhyweb would using the Openshift JBoss image instead of UBI https://github.com/konveyor/move2kube/blob/14357a9fae3030877022219b8759ddbeb7ba83f1/assets/built-in/transformers/dockerfilegenerator/java/jboss/templates/Dockerfile.jboss#L2 fix this issue?