31 lines
722 B
Text
31 lines
722 B
Text
function(ingress={ class: 'none', tls: "true", domains: ['quay.example.com'] })
|
|
|
|
{
|
|
apiVersion: "extensions/v1beta1",
|
|
kind: "Ingress",
|
|
metadata: {
|
|
annotations: {
|
|
"kubernetes.io/ingress.class": ingress.class,
|
|
[if std.type(ingress.tls) == "string" then ingress.tls]: "true"} +
|
|
if std.objectHas(ingress, "annotations") then ingress.annotations else {},
|
|
name: "quay-enterprise",
|
|
},
|
|
|
|
spec: {
|
|
rules: [{
|
|
host: domain,
|
|
http: {
|
|
paths: [{
|
|
backend: {
|
|
serviceName: "quay-enterprise",
|
|
servicePort: 80,},
|
|
path: "/"}]},
|
|
} for domain in ingress.domains],
|
|
} +
|
|
|
|
if std.type(ingress.tls) == "string" then
|
|
{tls: [{
|
|
hosts: ingress.domains,
|
|
secretName: "quay-enterprise-tls",
|
|
}]} else {},
|
|
}
|