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

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

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

env

List of environment variable present in the containers

[]corev1.EnvVar

false

envFrom

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

[]corev1.EnvFromSource

false

livenessProbe

Defines the periodic probe of container liveness. Container will be restarted if the probe fails

*ProbeSpec

false

readinessProbe

defines the periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails

*ProbeSpec

false

replicas

Replicas is the desired number of replicas for the application

int32

true

resources

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

*Resources

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

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

serviceAccountName

Name of the ServiceAccount to use to run the WildFlyServer Pods

string

false

sessionAffinity

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

bool

false

standaloneConfigMap

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

*StandaloneConfigMapSpec

false

startupProbe

Indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod’s lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. Contrary to the livenessProbe and readinessProbe, the startupProbe will not be created by default unless it is explicitly configured.

*ProbeSpec

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

ProbeSpec

ProbeSpec describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. The Operator configures the exec/httpGet fields of the Probe. Notice these fields are not exposed to the user since they are an implementation detail that depends on the server image used to create the application image.

Field Description Scheme Required

ProbeHandler

Defines a specific action between Exec or HTTPGet action that should be taken in a probe. If Exec and HTTPGet handlers are both defined, the Operator will configure the Exec handler and will ignore the HTTPGet one.

*ProbeHandler

false

failureThreshold

Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.

integer

false

initialDelaySeconds

Number of seconds after the container has started before probes are initiated. It defaults to 60 seconds for liveness probe. It defaults to 10 seconds for readiness probe. It defaults to 0 seconds for startup probe. Minimum value is 0.

integer

false

periodSeconds

How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.

integer

false

successThreshold

Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.

integer

false

timeoutSeconds

Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1.

integer

false

ProbeHandler

ProbeHandler defines a specific action between Exec or HTTPGet that should be taken in a probe. If Exec and HTTPGet handlers are both defined, the Operator will configure the Exec handler and will ignore the HTTPGet one.

Field Description Scheme Required

Exec

Specifies a command action to take.

ExecAction

false

HTTPGet

HTTPGet specifies the http request to perform.

HTTPGetAction

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