@@ -125,24 +125,24 @@ local k = import "github.com/grafana/jsonnet-libs/ksonnet-util/kausal.libsonnet"
125
125
// use locals to extract the parts we need
126
126
local deployment = k.apps.v1.deployment,
127
127
local container = k.core.v1.container,
128
- local port = k.core.v1.containerPort,
128
+ local containerPort = k.core.v1.containerPort,
129
129
local service = k.core.v1.service,
130
130
// defining the objects:
131
131
new(name, port):: {
132
132
// deployment constructor: name, replicas, containers
133
133
deployment: deployment.new(name, replicas=1, containers=[
134
134
// container constructor
135
- container.new(, " grafana/grafana" )
136
- + container.withPorts( // add ports to the container
137
- [port.new("ui", 3000)] // port constructor
138
- ),
135
+ container.new('grafana', ' grafana/grafana' )
136
+ + container.withPorts([ // add ports to the container
137
+ containerPort.newNamed(name='ui', containerPort= 3000),
138
+ ] ),
139
139
]),
140
140
141
141
// instead of using a service constructor, our wrapper provides
142
142
// a handy helper to automatically generate a service for a Deployment
143
- service: k.util.serv.util. serviceFor(self.deployment)
144
- + service.mixin.spec.withType(" NodePort" ),
145
- }
143
+ service: k.util.serviceFor(self.deployment)
144
+ + service.mixin.spec.withType(' NodePort' ),
145
+ },
146
146
}
147
147
```
148
148
0 commit comments