mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-29 04:47:17 +00:00
Signed-off-by: shuai-zh <shuaiz8023@gmail.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
47 lines
1.1 KiB
Text
47 lines
1.1 KiB
Text
local service = import 'vendor/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,
|
|
]
|