mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
Signed-off-by: shuai-zh <[email protected]> Signed-off-by: Michael Crenshaw <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Michael Crenshaw <[email protected]>
24 lines
322 B
Jsonnet
24 lines
322 B
Jsonnet
local new(params) = {
|
|
apiVersion: 'v1',
|
|
kind: 'Service',
|
|
metadata: {
|
|
name: params.name,
|
|
},
|
|
spec: {
|
|
ports: [
|
|
{
|
|
port: params.servicePort,
|
|
targetPort: params.containerPort,
|
|
},
|
|
],
|
|
selector: {
|
|
app: params.name,
|
|
},
|
|
type: params.type,
|
|
},
|
|
};
|
|
|
|
{
|
|
new:: new,
|
|
}
|