Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change main.jsonnet to support current k8 #29

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 7 additions & 6 deletions production/sample/default/main.jsonnet
Expand Up @@ -27,9 +27,9 @@ local tns_mixin = import 'tns-mixin/mixin.libsonnet';
local container = k.core.v1.container,
local containerPort = k.core.v1.containerPort,
local envVar = k.core.v1.envVar,
local httpIngressPath = k.extensions.v1beta1.httpIngressPath,
local ingress = k.extensions.v1beta1.ingress,
local ingressRule = k.extensions.v1beta1.ingressRule,
local httpIngressPath = k.networking.v1.httpIngressPath,
local ingress = k.networking.v1.ingress,
local ingressRule = k.networking.v1.ingressRule,
local service = k.core.v1.service,

// Create a Grafana Agent daemon set to collect metrics, logs, and traces
Expand Down Expand Up @@ -205,16 +205,17 @@ local tns_mixin = import 'tns-mixin/mixin.libsonnet';
}),
}),

ingress: ingress.new() +
ingress: ingress.new('ingress') +
ingress.mixin.metadata.withName('ingress')
+ ingress.mixin.metadata.withAnnotationsMixin({
'ingress.kubernetes.io/ssl-redirect': 'false',
})
+ ingress.mixin.spec.withRules([
ingressRule.mixin.http.withPaths(
httpIngressPath.withPath('/') +
httpIngressPath.backend.withServiceName('nginx') +
httpIngressPath.backend.withServicePort(80)
httpIngressPath.withPathType('ImplementationSpecific') +
httpIngressPath.backend.service.withName('nginx') +
httpIngressPath.backend.service.port.withNumber(80)
),
])
,
Expand Down