github.com/argoproj/argo-cd@v1.8.7/test/e2e/testdata/ksonnet/components/guestbook-ui.jsonnet (about) 1 local env = std.extVar("__ksonnet/environments"); 2 local params = std.extVar("__ksonnet/params").components["guestbook-ui"]; 3 [ 4 { 5 "apiVersion": "v1", 6 "kind": "Service", 7 "metadata": { 8 "name": params.name 9 }, 10 "spec": { 11 "ports": [ 12 { 13 "port": params.servicePort, 14 "targetPort": params.containerPort 15 } 16 ], 17 "selector": { 18 "app": params.name 19 }, 20 "type": params.type 21 } 22 }, 23 { 24 "apiVersion": "apps/v1", 25 "kind": "Deployment", 26 "metadata": { 27 "name": params.name 28 }, 29 "spec": { 30 "progressDeadlineSeconds": 5, 31 "replicas": params.replicas, 32 "revisionHistoryLimit": 3, 33 "selector": { 34 "matchLabels": { 35 "app": params.name 36 }, 37 }, 38 "template": { 39 "metadata": { 40 "labels": { 41 "app": params.name 42 } 43 }, 44 "spec": { 45 "containers": [ 46 { 47 "image": params.image, 48 "name": params.name, 49 "ports": [ 50 { 51 "containerPort": params.containerPort 52 } 53 ], 54 } + (if params.command != null then { command: [ params.command ] } else {}), 55 ] 56 } 57 } 58 } 59 } 60 ]