Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions api/v1/webspherelibertyapplication_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ type WebSphereLibertyApplicationSpec struct {
// DNS settings for the application pod.
// +operator-sdk:csv:customresourcedefinitions:order=36,type=spec,displayName="DNS"
DNS *WebSphereLibertyApplicationDNS `json:"dns,omitempty"`

// The list of hosts and IPs that will be inejcted into the application pod's hosts file
// +operator-sdk:csv:customresourcedefinitions:order=37,type=spec,displayName="Host Aliases"
HostAliases *[]corev1.HostAlias `json:"hostAliases,omitempty"`
}

// Defines the DNS
Expand Down Expand Up @@ -1417,6 +1421,10 @@ func (d *WebSphereLibertyApplicationDNS) GetConfig() *corev1.PodDNSConfig {
return d.PodDNSConfig
}

func (cr *WebSphereLibertyApplication) GetHostAliases() *[]corev1.HostAlias {
return cr.Spec.HostAliases
}

// Initialize sets default values
func (cr *WebSphereLibertyApplication) Initialize() {
if cr.Spec.PullPolicy == nil {
Expand Down
11 changes: 11 additions & 0 deletions api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ metadata:
capabilities: Auto Pilot
categories: Application Runtime
containerImage: icr.io/cpopen/websphere-liberty-operator:daily
createdAt: "2025-12-03T04:52:57Z"
createdAt: "2025-12-04T21:43:47Z"
description: Deploy and manage containerized Liberty applications
features.operators.openshift.io/disconnected: "true"
olm.skipRange: '>=1.0.0 <1.5.2'
Expand Down Expand Up @@ -496,6 +496,10 @@ spec:
path: affinity.nodeAffinity
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:nodeAffinity
- description: The list of hosts and IPs that will be inejcted into the application
pod's hosts file
displayName: Host Aliases
path: hostAliases
- description: Controls the nodes the pod are scheduled to run on, based on
labels on the pods that are already running on the node.
displayName: Pod Affinity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1986,6 +1986,27 @@ spec:
description: Expose the application externally via a Route, a Knative
Route or an Ingress resource.
type: boolean
hostAliases:
description: The list of hosts and IPs that will be inejcted into
the application pod's hosts file
items:
description: |-
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
pod's hosts file.
properties:
hostnames:
description: Hostnames for the above IP address.
items:
type: string
type: array
x-kubernetes-list-type: atomic
ip:
description: IP address of the host file entry.
type: string
required:
- ip
type: object
type: array
initContainers:
description: List of containers to run before other containers in
a pod.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1982,6 +1982,27 @@ spec:
description: Expose the application externally via a Route, a Knative
Route or an Ingress resource.
type: boolean
hostAliases:
description: The list of hosts and IPs that will be inejcted into
the application pod's hosts file
items:
description: |-
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
pod's hosts file.
properties:
hostnames:
description: Hostnames for the above IP address.
items:
type: string
type: array
x-kubernetes-list-type: atomic
ip:
description: IP address of the host file entry.
type: string
required:
- ip
type: object
type: array
initContainers:
description: List of containers to run before other containers in
a pod.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,10 @@ spec:
path: affinity.nodeAffinity
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:nodeAffinity
- description: The list of hosts and IPs that will be inejcted into the application
pod's hosts file
displayName: Host Aliases
path: hostAliases
- description: Controls the nodes the pod are scheduled to run on, based on
labels on the pods that are already running on the node.
displayName: Pod Affinity
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/WASdev/websphere-liberty-operator
go 1.25

require (
github.com/OpenLiberty/open-liberty-operator v0.8.1-0.20251124214343-4fee1b0d8d1e
github.com/application-stacks/runtime-component-operator v1.0.0-20220602-0850.0.20251120112423-05f65c81aa36
github.com/OpenLiberty/open-liberty-operator v0.8.1-0.20251205192201-a970b41cd059
github.com/application-stacks/runtime-component-operator v1.0.0-20220602-0850.0.20251205191742-7d2acc4b2262
github.com/cert-manager/cert-manager v1.16.5
github.com/go-logr/logr v1.4.3
github.com/openshift/api v0.0.0-20250710004639-926605d3338b
Expand Down
8 changes: 8 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@ github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ
github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE=
github.com/OpenLiberty/open-liberty-operator v0.8.1-0.20251124214343-4fee1b0d8d1e h1:7pCncY3KcsAge1E1E9tYo1ZM2bcfsg7dJ4XLKraVmkI=
github.com/OpenLiberty/open-liberty-operator v0.8.1-0.20251124214343-4fee1b0d8d1e/go.mod h1:ghwA2Fvfq6YphR93lp8vKEJ7mLYT1+sEvI6re16Kn0c=
github.com/OpenLiberty/open-liberty-operator v0.8.1-0.20251204214137-5ca60f4cd9b2 h1:ilDDB59Pg5LbvCJie1ngYlA5b5E2rgvXUrqqxOj3Yxw=
github.com/OpenLiberty/open-liberty-operator v0.8.1-0.20251204214137-5ca60f4cd9b2/go.mod h1:EhcP2pLDj4DYAfmIkEbr58G8TWoMjjiGnym1SRWPjEo=
github.com/OpenLiberty/open-liberty-operator v0.8.1-0.20251205192201-a970b41cd059 h1:gOlnFOcC6kwV91hoUhYERYLF6o+pZd048WZgMvK05vc=
github.com/OpenLiberty/open-liberty-operator v0.8.1-0.20251205192201-a970b41cd059/go.mod h1:NSTbyXbAcZws1HiAaShAnJRhAkZeowXXXGZ6008GyRk=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/application-stacks/runtime-component-operator v1.0.0-20220602-0850.0.20251120112423-05f65c81aa36 h1:fweyU4TX3vSrbWecLy6FYjIgnoybPdoJbOiZsoV+iDw=
github.com/application-stacks/runtime-component-operator v1.0.0-20220602-0850.0.20251120112423-05f65c81aa36/go.mod h1:Hs5AbE9J+rLM34IAc75X7dtxnrzFg2AvG1XYLcX/ApU=
github.com/application-stacks/runtime-component-operator v1.0.0-20220602-0850.0.20251204180254-1ccb32f60589 h1:oURgG664at9aK0yhgarnQVWwo7Sw9uGjnoN9LsA9b2Y=
github.com/application-stacks/runtime-component-operator v1.0.0-20220602-0850.0.20251204180254-1ccb32f60589/go.mod h1:Hs5AbE9J+rLM34IAc75X7dtxnrzFg2AvG1XYLcX/ApU=
github.com/application-stacks/runtime-component-operator v1.0.0-20220602-0850.0.20251205191742-7d2acc4b2262 h1:EIG09vyeKaj4v3WjOvc+xRvvmeo4OLyWyOyYACT+oEE=
github.com/application-stacks/runtime-component-operator v1.0.0-20220602-0850.0.20251205191742-7d2acc4b2262/go.mod h1:Hs5AbE9J+rLM34IAc75X7dtxnrzFg2AvG1XYLcX/ApU=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
Expand Down
21 changes: 21 additions & 0 deletions internal/deploy/kubectl/websphereliberty-app-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1985,6 +1985,27 @@ spec:
description: Expose the application externally via a Route, a Knative
Route or an Ingress resource.
type: boolean
hostAliases:
description: The list of hosts and IPs that will be inejcted into
the application pod's hosts file
items:
description: |-
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
pod's hosts file.
properties:
hostnames:
description: Hostnames for the above IP address.
items:
type: string
type: array
x-kubernetes-list-type: atomic
ip:
description: IP address of the host file entry.
type: string
required:
- ip
type: object
type: array
initContainers:
description: List of containers to run before other containers in
a pod.
Expand Down
21 changes: 21 additions & 0 deletions internal/deploy/kustomize/daily/base/websphere-liberty-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1985,6 +1985,27 @@ spec:
description: Expose the application externally via a Route, a Knative
Route or an Ingress resource.
type: boolean
hostAliases:
description: The list of hosts and IPs that will be inejcted into
the application pod's hosts file
items:
description: |-
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
pod's hosts file.
properties:
hostnames:
description: Hostnames for the above IP address.
items:
type: string
type: array
x-kubernetes-list-type: atomic
ip:
description: IP address of the host file entry.
type: string
required:
- ip
type: object
type: array
initContainers:
description: List of containers to run before other containers in
a pod.
Expand Down