Browse Source

Test

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

2
guestbook/guestbook-ui-deployment.yaml

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

35
jsonnet-guestbook-tla/guestbook-ui.jsonnet

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

Loading…
Cancel
Save