Browse Source

Test

pull/157/head
geekboy1011 3 years ago
parent
commit
2e50421d13
  1. 2
      guestbook/guestbook-ui-deployment.yaml
  2. 23
      jsonnet-guestbook-tla/guestbook-ui.jsonnet

2
guestbook/guestbook-ui-deployment.yaml

@ -3,7 +3,7 @@ kind: Deployment
metadata:
name: guestbook-ui
labels:
branch: ARGOCD_APP_SOURCE_TARGET_REVISION
branch: $ARGOCD_APP_SOURCE_TARGET_REVISION
spec:
replicas: 1
revisionHistoryLimit: 3

23
jsonnet-guestbook-tla/guestbook-ui.jsonnet

@ -4,18 +4,18 @@ function (
name = "jsonnet-guestbook-ui",
replicas = 1,
servicePort = 80,
type="LoadBalancer"
)
[
{
type = "LoadBalancer")
[{
"apiVersion": "v1",
"kind": "Service",
"metadata": {
"name": name
"name": name,
"labels": {
"branch": ARGOCD_APP_SOURCE_TARGET_REVISION
}
},
"spec": {
"ports": [
{
"ports": [{
"port": servicePort,
"targetPort": containerPort
}
@ -25,8 +25,7 @@ function (
},
"type": type
}
},
{
}, {
"apiVersion": "apps/v1",
"kind": "Deployment",
"metadata": {
@ -47,12 +46,10 @@ function (
}
},
"spec": {
"containers": [
{
"containers": [{
"image": image,
"name": name,
"ports": [
{
"ports": [{
"containerPort": containerPort
}
]

Loading…
Cancel
Save