create service and ingress for esrom

enable externalnames in traefik for esrom
This commit is contained in:
Pim Kunis 2024-04-08 21:17:28 +02:00
parent e184254dee
commit 2da2731654

View file

@ -99,7 +99,9 @@
options: "" options: ""
certResolver: "" certResolver: ""
domains: [] domains: []
providers:
kubernetesIngress:
allowExternalNameServices: true
''; '';
}; };
}; };
@ -117,6 +119,42 @@
}]; }];
}; };
}; };
services.esrom.spec = {
type = "ExternalName";
externalName = "esrom.dmz";
ports = [{
port = 80;
targetPort = 80;
}];
};
ingresses.esrom = {
metadata.annotations."cert-manager.io/cluster-issuer" = "letsencrypt";
spec = {
ingressClassName = "traefik";
rules = [{
host = "esrom.kun.is";
http.paths = [{
path = "/";
pathType = "Prefix";
backend.service = {
name = "esrom";
port.number = 80;
};
}];
}];
tls = [{
secretName = "esrom-tls";
hosts = [ "esrom.kun.is" ];
}];
};
};
}; };