This document describes the types introduced by the WildFly Operator to be consumed by users.

WildFlyServer

WildFlyServer defines a custom WildFly resource.

Field Description Scheme Required

metadata

Standard object’s metadata (more info)

metav1.ObjectMeta

false

spec

Specification of the desired behaviour of the WildFly deployment (more info)

WildFlyServerSpec

true

status

Most recent observed status of the WildFly deployment. Read-only. (more info)

WildFlyServerStatus

false

WildFlyServerList

WildFlyServerList defines a list of WildFly deployments

Field Description Scheme Required

metadata

Standard list’s metadata (more info)

metav1.ListMeta

false

items

List of WildFlyServer

[]WildFlyServer

true

WildFlyServerSpec

WildFlyServerSpec is a specification of the desired behavior of the WildFly resource.

It uses a StatefulSet with a pod spec that mounts the volume specified by storage on /opt/jboss/wildfly/standalone/data.

Field Description Scheme Required

applicationImage

Name of the application image to be deployed

string

true

replicas

Replicas is the desired number of replicas for the application

int32

true

bootableJar

BootableJar specifies whether the application image is using WildFly S2I Builder/Runtime images or Bootable Jar. If omitted, it defaults to false (application image is expected to use WildFly S2I Builder/Runtime images)

bool

false

standaloneConfigMap

spec to specify how standalone configuration can be read from a ConfigMap

*StandaloneConfigMapSpec

false

resources

Resources spec to specify the request or limits of the Stateful Set. If omitted, the namespace defaults are used (more info).

*Resources

false

securityContext

SecurityContext spec to define privilege and access control settings for the pod containers created by the Stateful set. If omitted default privileges are used (more info)

*corev1.SecurityContext

false

storage

Storage spec to specify how storage should be used. If omitted, an EmptyDir is used (that will not persist data across pod restart)

*StorageSpec

false

serviceAccountName

Name of the ServiceAccount to use to run the WildFlyServer Pods

string

false

envFrom

List of environment variable present in the containers from source (either ConfigMap or Secret)

[]corev1.EnvFromSource

false

env

List of environment variable present in the containers

[]corev1.EnvVar

false

secrets

List of secret names to mount as volumes in the containers. Each secret is mounted as a read-only volume under /etc/secrets/<secret name>

string[]

false

configMaps

List of ConfigMap names to mount as volumes in the containers. Each config map is mounted as a read-only volume under /etc/configmaps/<config map name>

string[]

false

disableHTTPRoute

Disable the creation a route to the HTTP port of the application service (false if omitted)

bool

false

sessionAffinity

If connections from the same client IP are passed to the same WildFlyServer instance/pod each time (false if omitted)

bool

false

Resources

Resources defines the configured resources for a WildflyServer resource. If the Resources field is not defined or Request or Limits is empty, this resource is removed from the StatefulSet The description of this resource is a standard Container resource and uses the scheme for corev1.ResourceRequirements.

StorageSpec

StorageSpec defines the configured storage for a WildFlyServer resource. If neither an emptyDir nor a volumeClaimTemplate is defined, a default EmptyDir will be used.

The Operator will configure the StatefulSet using information from this StorageSpec to mount a volume dedicated to the standalone/data directory used by WildFly to persist its own data (e.g. transaction log). If an EmptyDir is used, the data will not survive a pod restart. If the application deployed on WildFly relies on transaction, make sure to specify a volumeClaimTemplate that so that the same persistent volume can be reused upon pod restarts.

Field Description Scheme Required

emptyDir

EmptyDirVolumeSource to be used by the WildFly StatefulSet

*corev1.EmptyDirVolumeSource

false

volumeClaimTemplate

A PersistentVolumeClaim spec to configure Resources requirements to store WildFly standalone data directory. The name of the template is derived from the WildFlyServer name. The corresponding volume will be mounted in ReadWriteOnce access mode.

corev1.PersistentVolumeClaim

false

StandaloneConfigMapSpec

StandaloneConfigMapSpec defines how WildFly standalone configuration can be read from a ConfigMap. If omitted, WildFly uses its standalone.xml configuration from its image.

Field Description Scheme Required

name

Name of the ConfigMap containing the standalone configuration XML file.

string

true

key

Key of the ConfigMap whose value is the standalone configuration XML file. If omitted, the spec will look for the standalone.xml key.

string

false

WildFlyServerStatus

WildFlyServerStatus is the most recent observed status of the WildFly deployment. Read-only.

Field Description Scheme Required

replicas

Replicas is the actual number of replicas for the application

int32

true

selector

selector for pods, used by HorizontalPodAutoscaler

string

false

hosts

Hosts that route to the application HTTP service

[]string

true

pods

Status of the pods

[]PodStatus

true

scalingdownPods

Number of pods which are under scale down cleaning process

int32

true

PodStatus

PodStatus is the most recent observed status of a pod running the WildFly application.

Field Description Scheme Required

name

Name of the Pod

string

true

podIP

IP address allocated to the pod

string

true

state

State of the pod from perspective of scale down process. By default it’s active which means it serves requests.

string

false