kcl-lang.io/kpm@v0.8.7-0.20240520061008-9fc4c5efc8c7/test/e2e/test_suites/test_data/test_kpm_run_quiet/main.k (about) 1 import catalog.models.schema.v1 as ac 2 import catalog.models.schema.v1.workload as wl 3 import catalog.models.schema.v1.workload.container as c 4 import catalog.models.schema.v1.workload.container.probe as p 5 import catalog.models.schema.v1.monitoring as m 6 7 # base.k declares reusable configurations for all stacks. 8 helloworld: ac.AppConfiguration { 9 workload: wl.Service { 10 containers: { 11 "nginx": c.Container { 12 image: "nginx:v1" 13 # Run the following command as defined 14 command: ["/bin/sh", "-c", "echo hi"] 15 # Extra arguments append to command defined above 16 args: ["/bin/sh", "-c", "echo hi"] 17 env: { 18 # An environment variable of name "env1" and value "VALUE" will be set 19 "env1": "VALUE" 20 # An environment variable of name "env2" and value of the key "key" in the 21 # secret named "sec-name" will be set. 22 "env2": "secret://sec-name/key" 23 } 24 # Run the command "/bin/sh -c echo hi", as defined above, in the directory "/tmp" 25 workingDir: "/tmp" 26 # Configure a HTTP readiness probe 27 readinessProbe: p.Probe { 28 probeHandler: p.Http { 29 url: "http://localhost:80" 30 } 31 initialDelaySeconds: 10 32 } 33 } 34 } 35 # Set the replicas 36 replicas: 2 37 } 38 }