Skip to content

Commit b62e798

Browse files
author
Jarl
committed
making host domain optional for ingress controller
1 parent ccdd4d1 commit b62e798

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

lib/utils/deployment.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const buildDeploymentRoutingManifest = config => {
4848
}
4949
},
5050
spec: {
51-
...(routing.ssl
51+
...(routing.ssl && routing.domain
5252
? {
5353
tls: [
5454
{
@@ -60,7 +60,11 @@ const buildDeploymentRoutingManifest = config => {
6060
: {}),
6161
rules: [
6262
{
63-
host: routing.domain,
63+
...(routing.domain
64+
? {
65+
host: routing.domain,
66+
}
67+
: {}),
6468
http: {
6569
paths: [
6670
{
@@ -126,7 +130,7 @@ const buildGlobalRoutingManifest = config => {
126130
annotations,
127131
},
128132
spec: {
129-
...(routing.ssl
133+
...(routing.ssl && routing.domain
130134
? {
131135
tls: [
132136
{
@@ -138,7 +142,11 @@ const buildGlobalRoutingManifest = config => {
138142
: {}),
139143
rules: [
140144
{
141-
host: routing.domain,
145+
...(routing.domain
146+
? {
147+
host: routing.domain,
148+
}
149+
: {}),
142150
http: {
143151
paths: routing.rules.map(rule => ({
144152
path: rule.path,

lib/utils/schemas.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const deploymentSchema = Joi.object().keys({
5555
});
5656

5757
const rootRoutingSchema = Joi.object().keys({
58-
domain: Joi.string().required(),
58+
domain: Joi.string(),
5959
ssl: Joi.boolean().default(true),
6060
ingressClass: Joi.string().default(''),
6161
lbCert: Joi.string().default(''),

0 commit comments

Comments
 (0)