configure tls on ingress
This commit is contained in:
parent
c8c8c7f712
commit
3d9b8c252e
|
@ -14,3 +14,7 @@ spec:
|
|||
- backend:
|
||||
serviceName: grafana
|
||||
servicePort: http
|
||||
tls:
|
||||
- hosts:
|
||||
- grafana.knurrli.tbrnt.ch
|
||||
secretName: grafana-ingress-cert
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
|
||||
local pvc = k.core.v1.persistentVolumeClaim;
|
||||
local ingress = k.extensions.v1beta1.ingress;
|
||||
local ingressTls = ingress.mixin.spec.tlsType;
|
||||
local ingressRule = ingress.mixin.spec.rulesType;
|
||||
local httpIngressPath = ingressRule.mixin.http.pathsType;
|
||||
|
||||
|
@ -56,6 +57,11 @@ local kp =
|
|||
httpIngressPath.mixin.backend.withServiceName('grafana') +
|
||||
httpIngressPath.mixin.backend.withServicePort('http')
|
||||
),
|
||||
) +
|
||||
ingress.mixin.spec.withTls(
|
||||
ingressTls.new() +
|
||||
ingressTls.withHosts('grafana.knurrli.tbrnt.ch') +
|
||||
ingressTls.withSecretName('grafana-ingress-cert')
|
||||
),
|
||||
},
|
||||
};
|
||||
|
|
Reference in a new issue