mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-29 12:57:16 +00:00
Fixes: https://github.com/argoproj/argo-cd/issues/10614 Signed-off-by: cleverhu <shouping.hu@daocloud.io> Signed-off-by: cleverhu <shouping.hu@daocloud.io> Co-authored-by: jannfis <jann@mistrust.net>
47 lines
1.1 KiB
Text
47 lines
1.1 KiB
Text
local service = import 'nested/service.libsonnet';
|
|
local params = import 'params.libsonnet';
|
|
|
|
function(tlaString, tlaCode)
|
|
[
|
|
service.new(params),
|
|
{
|
|
apiVersion: 'apps/v1beta2',
|
|
kind: 'Deployment',
|
|
metadata: {
|
|
name: params.name,
|
|
},
|
|
spec: {
|
|
replicas: params.replicas,
|
|
selector: {
|
|
matchLabels: {
|
|
app: params.name,
|
|
},
|
|
},
|
|
template: {
|
|
metadata: {
|
|
labels: {
|
|
app: params.name,
|
|
tlaString: tlaString,
|
|
tlaCode: tlaCode,
|
|
extVarString: std.extVar('extVarString'),
|
|
extVarCode: std.extVar('extVarCode'),
|
|
},
|
|
},
|
|
spec: {
|
|
containers: [
|
|
{
|
|
image: params.image,
|
|
name: params.name,
|
|
ports: [
|
|
{
|
|
containerPort: params.containerPort,
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
null,
|
|
]
|