mirror of
https://github.com/argoproj/argocd-example-apps.git
synced 2024-11-10 09:09:50 +01:00
60 lines
1.4 KiB
Plaintext
60 lines
1.4 KiB
Plaintext
local env = std.extVar("__ksonnet/environments");
|
|
local params = std.extVar("__ksonnet/params").components["guestbook-ui"];
|
|
[
|
|
{
|
|
"apiVersion": "v1",
|
|
"kind": "Service",
|
|
"metadata": {
|
|
"name": params.name
|
|
},
|
|
"spec": {
|
|
"ports": [
|
|
{
|
|
"port": params.servicePort,
|
|
"targetPort": params.containerPort
|
|
}
|
|
],
|
|
"selector": {
|
|
"app": params.name
|
|
},
|
|
"type": params.type
|
|
}
|
|
},
|
|
{
|
|
"apiVersion": "apps/v1",
|
|
"kind": "Deployment",
|
|
"metadata": {
|
|
"name": params.name
|
|
},
|
|
"spec": {
|
|
"replicas": params.replicas,
|
|
"revisionHistoryLimit": 3,
|
|
"selector": {
|
|
"matchLabels": {
|
|
"app": params.name
|
|
},
|
|
},
|
|
"template": {
|
|
"metadata": {
|
|
"labels": {
|
|
"app": params.name
|
|
}
|
|
},
|
|
"spec": {
|
|
"containers": [
|
|
{
|
|
"image": params.image,
|
|
"name": params.name,
|
|
"ports": [
|
|
{
|
|
"containerPort": params.containerPort
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|