internal/core/export: suport default picking
This introduces default picking for during export.
This is needed to implement the Final option
for Value.Syntax correctly.
Fixes #489
Change-Id: Ie2a4d687c3ce66c2f1c5c7e53b1138c257ec85ab
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/6889
Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/cue/types.go b/cue/types.go
index 6b566cb..2981a84 100644
--- a/cue/types.go
+++ b/cue/types.go
@@ -927,6 +927,7 @@
p := export.Profile{
Simplify: !o.raw,
+ TakeDefaults: o.final,
ShowOptional: !o.omitOptional && !o.concrete,
ShowDefinitions: !o.omitDefinitions && !o.concrete,
ShowHidden: !o.omitHidden && !o.concrete,
diff --git a/doc/tutorial/kubernetes/testdata/manual.out b/doc/tutorial/kubernetes/testdata/manual.out
index 0b494fc..be6bf4b 100644
--- a/doc/tutorial/kubernetes/testdata/manual.out
+++ b/doc/tutorial/kubernetes/testdata/manual.out
@@ -20,13 +20,13 @@
}
deployment: {
bartender: {
- name: *"bartender" | string
- kind: *"deployment" | "stateful" | "daemon"
- replicas: *1 | int
+ name: "bartender"
+ kind: "deployment"
+ replicas: 1
image: "gcr.io/myproj/bartender:v0.1.34"
expose: {
port: {
- http: *7080 | int
+ http: 7080
}
}
port: {}
@@ -34,7 +34,7 @@
args: []
env: {}
label: {
- app: *"bartender" | string
+ app: "bartender"
domain: "prod"
component: "frontend"
}
@@ -56,16 +56,16 @@
}
service: {
bartender: {
- name: *"bartender" | string
+ name: "bartender"
port: {
http: {
- name: *"http" | string
+ name: "http"
port: 7080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
label: {
- app: *"bartender" | string
+ app: "bartender"
domain: "prod"
component: "frontend"
}
@@ -79,23 +79,23 @@
apiVersion: "v1"
kind: "Service"
metadata: {
- name: *"bartender" | string
+ name: "bartender"
labels: {
- app: *"bartender" | string
+ app: "bartender"
domain: "prod"
component: "frontend"
}
}
spec: {
selector: {
- app: *"bartender" | string
+ app: "bartender"
domain: "prod"
component: "frontend"
}
ports: [{
- name: *"http" | string
+ name: "http"
port: 7080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -105,7 +105,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"bartender" | string
+ name: "bartender"
labels: {
component: "frontend"
}
@@ -114,7 +114,7 @@
template: {
metadata: {
labels: {
- app: *"bartender" | string
+ app: "bartender"
domain: "prod"
component: "frontend"
}
@@ -125,17 +125,17 @@
}
spec: {
containers: [{
- name: *"bartender" | string
+ name: "bartender"
image: "gcr.io/myproj/bartender:v0.1.34"
args: []
ports: [{
name: "http"
- containerPort: *7080 | int
+ containerPort: 7080
}]
}]
}
}
- replicas: *1 | int
+ replicas: 1
}
}
}
@@ -145,13 +145,13 @@
}
deployment: {
breaddispatcher: {
- name: *"breaddispatcher" | string
- kind: *"deployment" | "stateful" | "daemon"
- replicas: *1 | int
+ name: "breaddispatcher"
+ kind: "deployment"
+ replicas: 1
image: "gcr.io/myproj/breaddispatcher:v0.3.24"
expose: {
port: {
- http: *7080 | int
+ http: 7080
}
}
port: {}
@@ -162,7 +162,7 @@
args: ["-etcd=etcd:2379", "-event-server=events:7788"] | []
env: {}
label: {
- app: *"breaddispatcher" | string
+ app: "breaddispatcher"
domain: "prod"
component: "frontend"
}
@@ -184,16 +184,16 @@
}
service: {
breaddispatcher: {
- name: *"breaddispatcher" | string
+ name: "breaddispatcher"
port: {
http: {
- name: *"http" | string
+ name: "http"
port: 7080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
label: {
- app: *"breaddispatcher" | string
+ app: "breaddispatcher"
domain: "prod"
component: "frontend"
}
@@ -207,23 +207,23 @@
apiVersion: "v1"
kind: "Service"
metadata: {
- name: *"breaddispatcher" | string
+ name: "breaddispatcher"
labels: {
- app: *"breaddispatcher" | string
+ app: "breaddispatcher"
domain: "prod"
component: "frontend"
}
}
spec: {
selector: {
- app: *"breaddispatcher" | string
+ app: "breaddispatcher"
domain: "prod"
component: "frontend"
}
ports: [{
- name: *"http" | string
+ name: "http"
port: 7080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -233,7 +233,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"breaddispatcher" | string
+ name: "breaddispatcher"
labels: {
component: "frontend"
}
@@ -242,7 +242,7 @@
template: {
metadata: {
labels: {
- app: *"breaddispatcher" | string
+ app: "breaddispatcher"
domain: "prod"
component: "frontend"
}
@@ -253,17 +253,17 @@
}
spec: {
containers: [{
- name: *"breaddispatcher" | string
+ name: "breaddispatcher"
image: "gcr.io/myproj/breaddispatcher:v0.3.24"
args: ["-etcd=etcd:2379", "-event-server=events:7788"] | []
ports: [{
name: "http"
- containerPort: *7080 | int
+ containerPort: 7080
}]
}]
}
}
- replicas: *1 | int
+ replicas: 1
}
}
}
@@ -273,13 +273,13 @@
}
deployment: {
host: {
- name: *"host" | string
- kind: *"deployment" | "stateful" | "daemon"
+ name: "host"
+ kind: "deployment"
replicas: 2
image: "gcr.io/myproj/host:v0.1.10"
expose: {
port: {
- http: *7080 | int
+ http: 7080
}
}
port: {}
@@ -287,7 +287,7 @@
args: []
env: {}
label: {
- app: *"host" | string
+ app: "host"
domain: "prod"
component: "frontend"
}
@@ -309,16 +309,16 @@
}
service: {
host: {
- name: *"host" | string
+ name: "host"
port: {
http: {
- name: *"http" | string
+ name: "http"
port: 7080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
label: {
- app: *"host" | string
+ app: "host"
domain: "prod"
component: "frontend"
}
@@ -332,23 +332,23 @@
apiVersion: "v1"
kind: "Service"
metadata: {
- name: *"host" | string
+ name: "host"
labels: {
- app: *"host" | string
+ app: "host"
domain: "prod"
component: "frontend"
}
}
spec: {
selector: {
- app: *"host" | string
+ app: "host"
domain: "prod"
component: "frontend"
}
ports: [{
- name: *"http" | string
+ name: "http"
port: 7080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -358,7 +358,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"host" | string
+ name: "host"
labels: {
component: "frontend"
}
@@ -367,7 +367,7 @@
template: {
metadata: {
labels: {
- app: *"host" | string
+ app: "host"
domain: "prod"
component: "frontend"
}
@@ -378,12 +378,12 @@
}
spec: {
containers: [{
- name: *"host" | string
+ name: "host"
image: "gcr.io/myproj/host:v0.1.10"
args: []
ports: [{
name: "http"
- containerPort: *7080 | int
+ containerPort: 7080
}]
}]
}
@@ -398,13 +398,13 @@
}
deployment: {
maitred: {
- name: *"maitred" | string
- kind: *"deployment" | "stateful" | "daemon"
- replicas: *1 | int
+ name: "maitred"
+ kind: "deployment"
+ replicas: 1
image: "gcr.io/myproj/maitred:v0.0.4"
expose: {
port: {
- http: *7080 | int
+ http: 7080
}
}
port: {}
@@ -412,7 +412,7 @@
args: []
env: {}
label: {
- app: *"maitred" | string
+ app: "maitred"
domain: "prod"
component: "frontend"
}
@@ -434,16 +434,16 @@
}
service: {
maitred: {
- name: *"maitred" | string
+ name: "maitred"
port: {
http: {
- name: *"http" | string
+ name: "http"
port: 7080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
label: {
- app: *"maitred" | string
+ app: "maitred"
domain: "prod"
component: "frontend"
}
@@ -457,23 +457,23 @@
apiVersion: "v1"
kind: "Service"
metadata: {
- name: *"maitred" | string
+ name: "maitred"
labels: {
- app: *"maitred" | string
+ app: "maitred"
domain: "prod"
component: "frontend"
}
}
spec: {
selector: {
- app: *"maitred" | string
+ app: "maitred"
domain: "prod"
component: "frontend"
}
ports: [{
- name: *"http" | string
+ name: "http"
port: 7080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -483,7 +483,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"maitred" | string
+ name: "maitred"
labels: {
component: "frontend"
}
@@ -492,7 +492,7 @@
template: {
metadata: {
labels: {
- app: *"maitred" | string
+ app: "maitred"
domain: "prod"
component: "frontend"
}
@@ -503,17 +503,17 @@
}
spec: {
containers: [{
- name: *"maitred" | string
+ name: "maitred"
image: "gcr.io/myproj/maitred:v0.0.4"
args: []
ports: [{
name: "http"
- containerPort: *7080 | int
+ containerPort: 7080
}]
}]
}
}
- replicas: *1 | int
+ replicas: 1
}
}
}
@@ -523,9 +523,9 @@
}
deployment: {
valeter: {
- name: *"valeter" | string
- kind: *"deployment" | "stateful" | "daemon"
- replicas: *1 | int
+ name: "valeter"
+ kind: "deployment"
+ replicas: 1
image: "gcr.io/myproj/valeter:v0.0.4"
arg: {
http: ":8080"
@@ -540,7 +540,7 @@
args: ["-http=:8080", "-etcd=etcd:2379"] | []
env: {}
label: {
- app: *"valeter" | string
+ app: "valeter"
domain: "prod"
component: "frontend"
}
@@ -562,16 +562,16 @@
}
service: {
valeter: {
- name: *"valeter" | string
+ name: "valeter"
port: {
http: {
- name: *"http" | string
+ name: "http"
port: 8080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
label: {
- app: *"valeter" | string
+ app: "valeter"
domain: "prod"
component: "frontend"
}
@@ -585,23 +585,23 @@
apiVersion: "v1"
kind: "Service"
metadata: {
- name: *"valeter" | string
+ name: "valeter"
labels: {
- app: *"valeter" | string
+ app: "valeter"
domain: "prod"
component: "frontend"
}
}
spec: {
selector: {
- app: *"valeter" | string
+ app: "valeter"
domain: "prod"
component: "frontend"
}
ports: [{
- name: *"http" | string
+ name: "http"
port: 8080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -611,7 +611,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"valeter" | string
+ name: "valeter"
labels: {
component: "frontend"
}
@@ -620,7 +620,7 @@
template: {
metadata: {
labels: {
- app: *"valeter" | string
+ app: "valeter"
domain: "prod"
component: "frontend"
}
@@ -631,7 +631,7 @@
}
spec: {
containers: [{
- name: *"valeter" | string
+ name: "valeter"
image: "gcr.io/myproj/valeter:v0.0.4"
args: ["-http=:8080", "-etcd=etcd:2379"] | []
ports: [{
@@ -641,7 +641,7 @@
}]
}
}
- replicas: *1 | int
+ replicas: 1
}
}
}
@@ -651,13 +651,13 @@
}
deployment: {
waiter: {
- name: *"waiter" | string
- kind: *"deployment" | "stateful" | "daemon"
+ name: "waiter"
+ kind: "deployment"
image: "gcr.io/myproj/waiter:v0.3.0"
replicas: 5
expose: {
port: {
- http: *7080 | int
+ http: 7080
}
}
port: {}
@@ -665,7 +665,7 @@
args: []
env: {}
label: {
- app: *"waiter" | string
+ app: "waiter"
domain: "prod"
component: "frontend"
}
@@ -687,16 +687,16 @@
}
service: {
waiter: {
- name: *"waiter" | string
+ name: "waiter"
port: {
http: {
- name: *"http" | string
+ name: "http"
port: 7080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
label: {
- app: *"waiter" | string
+ app: "waiter"
domain: "prod"
component: "frontend"
}
@@ -710,23 +710,23 @@
apiVersion: "v1"
kind: "Service"
metadata: {
- name: *"waiter" | string
+ name: "waiter"
labels: {
- app: *"waiter" | string
+ app: "waiter"
domain: "prod"
component: "frontend"
}
}
spec: {
selector: {
- app: *"waiter" | string
+ app: "waiter"
domain: "prod"
component: "frontend"
}
ports: [{
- name: *"http" | string
+ name: "http"
port: 7080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -736,7 +736,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"waiter" | string
+ name: "waiter"
labels: {
component: "frontend"
}
@@ -745,7 +745,7 @@
template: {
metadata: {
labels: {
- app: *"waiter" | string
+ app: "waiter"
domain: "prod"
component: "frontend"
}
@@ -756,12 +756,12 @@
}
spec: {
containers: [{
- name: *"waiter" | string
+ name: "waiter"
image: "gcr.io/myproj/waiter:v0.3.0"
args: []
ports: [{
name: "http"
- containerPort: *7080 | int
+ containerPort: 7080
}]
}]
}
@@ -776,13 +776,13 @@
}
deployment: {
waterdispatcher: {
- name: *"waterdispatcher" | string
- kind: *"deployment" | "stateful" | "daemon"
- replicas: *1 | int
+ name: "waterdispatcher"
+ kind: "deployment"
+ replicas: 1
image: "gcr.io/myproj/waterdispatcher:v0.0.48"
expose: {
port: {
- http: *7080 | int
+ http: 7080
}
}
port: {}
@@ -793,7 +793,7 @@
args: ["-http=:8080", "-etcd=etcd:2379"] | []
env: {}
label: {
- app: *"waterdispatcher" | string
+ app: "waterdispatcher"
domain: "prod"
component: "frontend"
}
@@ -815,16 +815,16 @@
}
service: {
waterdispatcher: {
- name: *"waterdispatcher" | string
+ name: "waterdispatcher"
port: {
http: {
- name: *"http" | string
+ name: "http"
port: 7080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
label: {
- app: *"waterdispatcher" | string
+ app: "waterdispatcher"
domain: "prod"
component: "frontend"
}
@@ -838,23 +838,23 @@
apiVersion: "v1"
kind: "Service"
metadata: {
- name: *"waterdispatcher" | string
+ name: "waterdispatcher"
labels: {
- app: *"waterdispatcher" | string
+ app: "waterdispatcher"
domain: "prod"
component: "frontend"
}
}
spec: {
selector: {
- app: *"waterdispatcher" | string
+ app: "waterdispatcher"
domain: "prod"
component: "frontend"
}
ports: [{
- name: *"http" | string
+ name: "http"
port: 7080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -864,7 +864,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"waterdispatcher" | string
+ name: "waterdispatcher"
labels: {
component: "frontend"
}
@@ -873,7 +873,7 @@
template: {
metadata: {
labels: {
- app: *"waterdispatcher" | string
+ app: "waterdispatcher"
domain: "prod"
component: "frontend"
}
@@ -884,17 +884,17 @@
}
spec: {
containers: [{
- name: *"waterdispatcher" | string
+ name: "waterdispatcher"
image: "gcr.io/myproj/waterdispatcher:v0.0.48"
args: ["-http=:8080", "-etcd=etcd:2379"] | []
ports: [{
name: "http"
- containerPort: *7080 | int
+ containerPort: 7080
}]
}]
}
}
- replicas: *1 | int
+ replicas: 1
}
}
}
@@ -914,9 +914,9 @@
}
deployment: {
download: {
- name: *"download" | string
- kind: *"deployment" | "stateful" | "daemon"
- replicas: *1 | int
+ name: "download"
+ kind: "deployment"
+ replicas: 1
image: "gcr.io/myproj/download:v0.0.2"
expose: {
port: {
@@ -928,7 +928,7 @@
args: []
env: {}
label: {
- app: *"download" | string
+ app: "download"
domain: "prod"
component: "infra"
}
@@ -939,16 +939,16 @@
}
service: {
download: {
- name: *"download" | string
+ name: "download"
port: {
client: {
- name: *"client" | string
+ name: "client"
port: 7080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
label: {
- app: *"download" | string
+ app: "download"
domain: "prod"
component: "infra"
}
@@ -962,23 +962,23 @@
apiVersion: "v1"
kind: "Service"
metadata: {
- name: *"download" | string
+ name: "download"
labels: {
- app: *"download" | string
+ app: "download"
domain: "prod"
component: "infra"
}
}
spec: {
selector: {
- app: *"download" | string
+ app: "download"
domain: "prod"
component: "infra"
}
ports: [{
- name: *"client" | string
+ name: "client"
port: 7080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -988,7 +988,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"download" | string
+ name: "download"
labels: {
component: "infra"
}
@@ -997,14 +997,14 @@
template: {
metadata: {
labels: {
- app: *"download" | string
+ app: "download"
domain: "prod"
component: "infra"
}
}
spec: {
containers: [{
- name: *"download" | string
+ name: "download"
image: "gcr.io/myproj/download:v0.0.2"
args: []
ports: [{
@@ -1014,7 +1014,7 @@
}]
}
}
- replicas: *1 | int
+ replicas: 1
}
}
}
@@ -1024,7 +1024,7 @@
}
deployment: {
etcd: {
- name: *"etcd" | string
+ name: "etcd"
kind: "stateful"
replicas: 3
image: "quay.io/coreos/etcd:v3.3.10"
@@ -1132,7 +1132,7 @@
port: {}
args: ["-name=$(NAME)", "-data-dir=/data/etcd3", "-initial-advertise-peer-urls=http://$(IP):2380", "-listen-peer-urls=http://$(IP):2380", "-listen-client-urls=http://$(IP):2379,http://127.0.0.1:2379", "-advertise-client-urls=http://$(IP):2379", "-discovery=https://discovery.etcd.io/xxxxxx"] | []
label: {
- app: *"etcd" | string
+ app: "etcd"
domain: "prod"
component: "infra"
}
@@ -1141,17 +1141,17 @@
}
service: {
etcd: {
- name: *"etcd" | string
+ name: "etcd"
port: {
client: {
- name: *"client" | string
+ name: "client"
port: 2379
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
peer: {
- name: *"peer" | string
+ name: "peer"
port: 2380
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
kubernetes: {
@@ -1160,7 +1160,7 @@
}
}
label: {
- app: *"etcd" | string
+ app: "etcd"
domain: "prod"
component: "infra"
}
@@ -1175,24 +1175,24 @@
spec: {
clusterIP: "None"
selector: {
- app: *"etcd" | string
+ app: "etcd"
domain: "prod"
component: "infra"
}
ports: [{
- name: *"client" | string
+ name: "client"
port: 2379
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}, {
- name: *"peer" | string
+ name: "peer"
port: 2380
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
metadata: {
- name: *"etcd" | string
+ name: "etcd"
labels: {
- app: *"etcd" | string
+ app: "etcd"
domain: "prod"
component: "infra"
}
@@ -1205,7 +1205,7 @@
apiVersion: "apps/v1beta1"
kind: "StatefulSet"
metadata: {
- name: *"etcd" | string
+ name: "etcd"
labels: {
component: "infra"
}
@@ -1232,7 +1232,7 @@
template: {
metadata: {
labels: {
- app: *"etcd" | string
+ app: "etcd"
domain: "prod"
component: "infra"
}
@@ -1243,7 +1243,7 @@
}
spec: {
containers: [{
- name: *"etcd" | string
+ name: "etcd"
image: "quay.io/coreos/etcd:v3.3.10"
args: ["-name=$(NAME)", "-data-dir=/data/etcd3", "-initial-advertise-peer-urls=http://$(IP):2380", "-listen-peer-urls=http://$(IP):2380", "-listen-client-urls=http://$(IP):2379,http://127.0.0.1:2379", "-advertise-client-urls=http://$(IP):2379", "-discovery=https://discovery.etcd.io/xxxxxx"] | []
command: ["/usr/local/bin/etcd"]
@@ -1312,8 +1312,8 @@
}
deployment: {
events: {
- name: *"events" | string
- kind: *"deployment" | "stateful" | "daemon"
+ name: "events"
+ kind: "deployment"
replicas: 2
image: "gcr.io/myproj/events:v0.1.31"
arg: {
@@ -1333,10 +1333,10 @@
env: {}
volume: {
"secret-volume": {
- name: *"secret-volume" | string
+ name: "secret-volume"
mountPath: "/etc/ssl"
- subPath: *null | string
- readOnly: *false | true
+ subPath: null
+ readOnly: false
spec: {
secret: {
secretName: "biz-secrets"
@@ -1374,7 +1374,7 @@
}
}
label: {
- app: *"events" | string
+ app: "events"
domain: "prod"
component: "infra"
}
@@ -1383,16 +1383,16 @@
}
service: {
events: {
- name: *"events" | string
+ name: "events"
port: {
grpc: {
- name: *"grpc" | string
+ name: "grpc"
port: 7788
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
label: {
- app: *"events" | string
+ app: "events"
domain: "prod"
component: "infra"
}
@@ -1406,23 +1406,23 @@
apiVersion: "v1"
kind: "Service"
metadata: {
- name: *"events" | string
+ name: "events"
labels: {
- app: *"events" | string
+ app: "events"
domain: "prod"
component: "infra"
}
}
spec: {
selector: {
- app: *"events" | string
+ app: "events"
domain: "prod"
component: "infra"
}
ports: [{
- name: *"grpc" | string
+ name: "grpc"
port: 7788
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -1432,7 +1432,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"events" | string
+ name: "events"
labels: {
component: "infra"
}
@@ -1441,7 +1441,7 @@
template: {
metadata: {
labels: {
- app: *"events" | string
+ app: "events"
domain: "prod"
component: "infra"
}
@@ -1452,7 +1452,7 @@
}
spec: {
containers: [{
- name: *"events" | string
+ name: "events"
image: "gcr.io/myproj/events:v0.1.31"
args: ["-cert=/etc/ssl/server.pem", "-key=/etc/ssl/server.key", "-grpc=:7788"] | []
volumeMounts: [{
@@ -1488,7 +1488,7 @@
}
}
volumes: [{
- name: *"secret-volume" | string
+ name: "secret-volume"
}]
}
}
@@ -1502,9 +1502,9 @@
}
deployment: {
tasks: {
- name: *"tasks" | string
- kind: *"deployment" | "stateful" | "daemon"
- replicas: *1 | int
+ name: "tasks"
+ kind: "deployment"
+ replicas: 1
image: "gcr.io/myproj/tasks:v0.2.6"
port: {
http: 7080
@@ -1519,10 +1519,10 @@
env: {}
volume: {
"secret-volume": {
- name: *"secret-volume" | string
+ name: "secret-volume"
mountPath: "/etc/ssl"
- subPath: *null | string
- readOnly: *false | true
+ subPath: null
+ readOnly: false
spec: {
secret: {
secretName: "star-example-com-secrets"
@@ -1544,7 +1544,7 @@
}
}
label: {
- app: *"tasks" | string
+ app: "tasks"
domain: "prod"
component: "infra"
}
@@ -1553,10 +1553,10 @@
}
service: {
tasks: {
- name: *"tasks" | string
+ name: "tasks"
port: {
https: {
- name: *"https" | string
+ name: "https"
port: 443
targetPort: 7443
protocol: "TCP"
@@ -1569,7 +1569,7 @@
}
}
label: {
- app: *"tasks" | string
+ app: "tasks"
domain: "prod"
component: "infra"
}
@@ -1584,12 +1584,12 @@
spec: {
type: "LoadBalancer"
selector: {
- app: *"tasks" | string
+ app: "tasks"
domain: "prod"
component: "infra"
}
ports: [{
- name: *"https" | string
+ name: "https"
port: 443
targetPort: 7443
protocol: "TCP"
@@ -1597,9 +1597,9 @@
loadBalancerIP: "1.2.3.4"
}
metadata: {
- name: *"tasks" | string
+ name: "tasks"
labels: {
- app: *"tasks" | string
+ app: "tasks"
domain: "prod"
component: "infra"
}
@@ -1611,7 +1611,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"tasks" | string
+ name: "tasks"
labels: {
component: "infra"
}
@@ -1620,7 +1620,7 @@
template: {
metadata: {
labels: {
- app: *"tasks" | string
+ app: "tasks"
domain: "prod"
component: "infra"
}
@@ -1631,7 +1631,7 @@
}
spec: {
containers: [{
- name: *"tasks" | string
+ name: "tasks"
image: "gcr.io/myproj/tasks:v0.2.6"
args: []
volumeMounts: [{
@@ -1653,11 +1653,11 @@
}]
}]
volumes: [{
- name: *"secret-volume" | string
+ name: "secret-volume"
}]
}
}
- replicas: *1 | int
+ replicas: 1
}
}
}
@@ -1667,9 +1667,9 @@
}
deployment: {
updater: {
- name: *"updater" | string
- kind: *"deployment" | "stateful" | "daemon"
- replicas: *1 | int
+ name: "updater"
+ kind: "deployment"
+ replicas: 1
image: "gcr.io/myproj/updater:v0.1.0"
args: ["-key=/etc/certs/updater.pem"]
expose: {
@@ -1682,10 +1682,10 @@
env: {}
volume: {
"secret-updater": {
- name: *"secret-updater" | string
+ name: "secret-updater"
mountPath: "/etc/certs"
- subPath: *null | string
- readOnly: *false | true
+ subPath: null
+ readOnly: false
spec: {
secret: {
secretName: "updater-secrets"
@@ -1695,7 +1695,7 @@
}
}
label: {
- app: *"updater" | string
+ app: "updater"
domain: "prod"
component: "infra"
}
@@ -1705,16 +1705,16 @@
}
service: {
updater: {
- name: *"updater" | string
+ name: "updater"
port: {
http: {
- name: *"http" | string
+ name: "http"
port: 8080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
label: {
- app: *"updater" | string
+ app: "updater"
domain: "prod"
component: "infra"
}
@@ -1728,23 +1728,23 @@
apiVersion: "v1"
kind: "Service"
metadata: {
- name: *"updater" | string
+ name: "updater"
labels: {
- app: *"updater" | string
+ app: "updater"
domain: "prod"
component: "infra"
}
}
spec: {
selector: {
- app: *"updater" | string
+ app: "updater"
domain: "prod"
component: "infra"
}
ports: [{
- name: *"http" | string
+ name: "http"
port: 8080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -1754,7 +1754,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"updater" | string
+ name: "updater"
labels: {
component: "infra"
}
@@ -1763,14 +1763,14 @@
template: {
metadata: {
labels: {
- app: *"updater" | string
+ app: "updater"
domain: "prod"
component: "infra"
}
}
spec: {
containers: [{
- name: *"updater" | string
+ name: "updater"
image: "gcr.io/myproj/updater:v0.1.0"
args: ["-key=/etc/certs/updater.pem"]
volumeMounts: [{
@@ -1789,11 +1789,11 @@
}]
}]
volumes: [{
- name: *"secret-updater" | string
+ name: "secret-updater"
}]
}
}
- replicas: *1 | int
+ replicas: 1
}
}
}
@@ -1803,16 +1803,16 @@
}
deployment: {
watcher: {
- name: *"watcher" | string
- kind: *"deployment" | "stateful" | "daemon"
- replicas: *1 | int
+ name: "watcher"
+ kind: "deployment"
+ replicas: 1
image: "gcr.io/myproj/watcher:v0.1.0"
volume: {
"secret-volume": {
- name: *"secret-volume" | string
+ name: "secret-volume"
mountPath: "/etc/ssl"
- subPath: *null | string
- readOnly: *false | true
+ subPath: null
+ readOnly: false
spec: {
secret: {
secretName: "star-example-com-secrets"
@@ -1833,7 +1833,7 @@
args: []
env: {}
label: {
- app: *"watcher" | string
+ app: "watcher"
domain: "prod"
component: "infra"
}
@@ -1843,12 +1843,12 @@
}
service: {
watcher: {
- name: *"watcher" | string
+ name: "watcher"
port: {
https: {
- name: *"https" | string
+ name: "https"
port: 7788
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
kubernetes: {
@@ -1864,7 +1864,7 @@
}
}
label: {
- app: *"watcher" | string
+ app: "watcher"
domain: "prod"
component: "infra"
}
@@ -1879,21 +1879,21 @@
spec: {
type: "LoadBalancer"
selector: {
- app: *"watcher" | string
+ app: "watcher"
domain: "prod"
component: "infra"
}
ports: [{
- name: *"https" | string
+ name: "https"
port: 7788
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
loadBalancerIP: "1.2.3.4"
}
metadata: {
- name: *"watcher" | string
+ name: "watcher"
labels: {
- app: *"watcher" | string
+ app: "watcher"
domain: "prod"
component: "infra"
}
@@ -1905,7 +1905,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"watcher" | string
+ name: "watcher"
labels: {
component: "infra"
}
@@ -1914,14 +1914,14 @@
template: {
metadata: {
labels: {
- app: *"watcher" | string
+ app: "watcher"
domain: "prod"
component: "infra"
}
}
spec: {
containers: [{
- name: *"watcher" | string
+ name: "watcher"
image: "gcr.io/myproj/watcher:v0.1.0"
args: []
volumeMounts: [{
@@ -1943,11 +1943,11 @@
}]
}]
volumes: [{
- name: *"secret-volume" | string
+ name: "secret-volume"
}]
}
}
- replicas: *1 | int
+ replicas: 1
}
}
}
@@ -1967,8 +1967,8 @@
}
deployment: {
caller: {
- name: *"caller" | string
- kind: *"deployment" | "stateful" | "daemon"
+ name: "caller"
+ kind: "deployment"
replicas: 3
image: "gcr.io/myproj/caller:v0.20.14"
expose: {
@@ -1991,21 +1991,21 @@
volume: {
"caller-disk": {
name: "ssd-caller"
- mountPath: *"/logs" | string
- subPath: *null | string
- readOnly: *false | true
+ mountPath: "/logs"
+ subPath: null
+ readOnly: false
kubernetes: {}
spec: {
gcePersistentDisk: {
- pdName: *"ssd-caller" | string
+ pdName: "ssd-caller"
fsType: "ext4"
}
}
}
"secret-ssh-key": {
- name: *"secret-ssh-key" | string
+ name: "secret-ssh-key"
mountPath: "/sslcerts"
- subPath: *null | string
+ subPath: null
readOnly: true
spec: {
secret: {
@@ -2015,20 +2015,20 @@
kubernetes: {}
}
"secret-caller": {
- name: *"secret-caller" | string
- mountPath: *"/etc/certs" | string
- subPath: *null | string
+ name: "secret-caller"
+ mountPath: "/etc/certs"
+ subPath: null
readOnly: true
spec: {
secret: {
- secretName: *"caller-secrets" | string
+ secretName: "caller-secrets"
}
}
kubernetes: {}
}
}
label: {
- app: *"caller" | string
+ app: "caller"
domain: "prod"
component: "kitchen"
}
@@ -2060,16 +2060,16 @@
}
service: {
caller: {
- name: *"caller" | string
+ name: "caller"
port: {
client: {
- name: *"client" | string
+ name: "client"
port: 8080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
label: {
- app: *"caller" | string
+ app: "caller"
domain: "prod"
component: "kitchen"
}
@@ -2083,23 +2083,23 @@
apiVersion: "v1"
kind: "Service"
metadata: {
- name: *"caller" | string
+ name: "caller"
labels: {
- app: *"caller" | string
+ app: "caller"
domain: "prod"
component: "kitchen"
}
}
spec: {
selector: {
- app: *"caller" | string
+ app: "caller"
domain: "prod"
component: "kitchen"
}
ports: [{
- name: *"client" | string
+ name: "client"
port: 8080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -2109,7 +2109,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"caller" | string
+ name: "caller"
labels: {
component: "kitchen"
}
@@ -2118,7 +2118,7 @@
template: {
metadata: {
labels: {
- app: *"caller" | string
+ app: "caller"
domain: "prod"
component: "kitchen"
}
@@ -2128,7 +2128,7 @@
}
spec: {
containers: [{
- name: *"caller" | string
+ name: "caller"
image: "gcr.io/myproj/caller:v0.20.14"
args: ["-env=prod", "-logdir=/logs", "-event-server=events:7788", "-key=/etc/certs/client.key", "-cert=/etc/certs/client.pem", "-ca=/etc/certs/servfx.ca", "-ssh-tunnel-key=/sslcerts/tunnel-private.pem"] | []
livenessProbe: {
@@ -2175,9 +2175,9 @@
volumes: [{
name: "ssd-caller"
}, {
- name: *"secret-ssh-key" | string
+ name: "secret-ssh-key"
}, {
- name: *"secret-caller" | string
+ name: "secret-caller"
}]
}
}
@@ -2191,8 +2191,8 @@
}
deployment: {
dishwasher: {
- name: *"dishwasher" | string
- kind: *"deployment" | "stateful" | "daemon"
+ name: "dishwasher"
+ kind: "deployment"
replicas: 5
image: "gcr.io/myproj/dishwasher:v0.2.13"
expose: {
@@ -2211,9 +2211,9 @@
env: {}
volume: {
"secret-ssh-key": {
- name: *"secret-ssh-key" | string
+ name: "secret-ssh-key"
mountPath: "/sslcerts"
- subPath: *null | string
+ subPath: null
readOnly: true
spec: {
secret: {
@@ -2223,33 +2223,33 @@
kubernetes: {}
}
"dishwasher-disk": {
- name: *"dishwasher-disk" | string
- mountPath: *"/logs" | string
- subPath: *null | string
- readOnly: *false | true
+ name: "dishwasher-disk"
+ mountPath: "/logs"
+ subPath: null
+ readOnly: false
spec: {
gcePersistentDisk: {
- pdName: *"dishwasher-disk" | string
+ pdName: "dishwasher-disk"
fsType: "ext4"
}
}
kubernetes: {}
}
"secret-dishwasher": {
- name: *"secret-dishwasher" | string
- mountPath: *"/etc/certs" | string
- subPath: *null | string
+ name: "secret-dishwasher"
+ mountPath: "/etc/certs"
+ subPath: null
readOnly: true
spec: {
secret: {
- secretName: *"dishwasher-secrets" | string
+ secretName: "dishwasher-secrets"
}
}
kubernetes: {}
}
}
label: {
- app: *"dishwasher" | string
+ app: "dishwasher"
domain: "prod"
component: "kitchen"
}
@@ -2281,16 +2281,16 @@
}
service: {
dishwasher: {
- name: *"dishwasher" | string
+ name: "dishwasher"
port: {
client: {
- name: *"client" | string
+ name: "client"
port: 8080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
label: {
- app: *"dishwasher" | string
+ app: "dishwasher"
domain: "prod"
component: "kitchen"
}
@@ -2304,23 +2304,23 @@
apiVersion: "v1"
kind: "Service"
metadata: {
- name: *"dishwasher" | string
+ name: "dishwasher"
labels: {
- app: *"dishwasher" | string
+ app: "dishwasher"
domain: "prod"
component: "kitchen"
}
}
spec: {
selector: {
- app: *"dishwasher" | string
+ app: "dishwasher"
domain: "prod"
component: "kitchen"
}
ports: [{
- name: *"client" | string
+ name: "client"
port: 8080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -2330,7 +2330,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"dishwasher" | string
+ name: "dishwasher"
labels: {
component: "kitchen"
}
@@ -2339,7 +2339,7 @@
template: {
metadata: {
labels: {
- app: *"dishwasher" | string
+ app: "dishwasher"
domain: "prod"
component: "kitchen"
}
@@ -2349,7 +2349,7 @@
}
spec: {
containers: [{
- name: *"dishwasher" | string
+ name: "dishwasher"
image: "gcr.io/myproj/dishwasher:v0.2.13"
args: ["-env=prod", "-logdir=/logs", "-event-server=events:7788", "-ssh-tunnel-key=/etc/certs/tunnel-private.pem"] | []
livenessProbe: {
@@ -2394,11 +2394,11 @@
}]
}]
volumes: [{
- name: *"secret-ssh-key" | string
+ name: "secret-ssh-key"
}, {
- name: *"dishwasher-disk" | string
+ name: "dishwasher-disk"
}, {
- name: *"secret-dishwasher" | string
+ name: "secret-dishwasher"
}]
}
}
@@ -2412,9 +2412,9 @@
}
deployment: {
expiditer: {
- name: *"expiditer" | string
- kind: *"deployment" | "stateful" | "daemon"
- replicas: *1 | int
+ name: "expiditer"
+ kind: "deployment"
+ replicas: 1
image: "gcr.io/myproj/expiditer:v0.5.34"
expose: {
port: {
@@ -2432,33 +2432,33 @@
env: {}
volume: {
"expiditer-disk": {
- name: *"expiditer-disk" | string
- mountPath: *"/logs" | string
- subPath: *null | string
- readOnly: *false | true
+ name: "expiditer-disk"
+ mountPath: "/logs"
+ subPath: null
+ readOnly: false
spec: {
gcePersistentDisk: {
- pdName: *"expiditer-disk" | string
+ pdName: "expiditer-disk"
fsType: "ext4"
}
}
kubernetes: {}
}
"secret-expiditer": {
- name: *"secret-expiditer" | string
- mountPath: *"/etc/certs" | string
- subPath: *null | string
+ name: "secret-expiditer"
+ mountPath: "/etc/certs"
+ subPath: null
readOnly: true
spec: {
secret: {
- secretName: *"expiditer-secrets" | string
+ secretName: "expiditer-secrets"
}
}
kubernetes: {}
}
}
label: {
- app: *"expiditer" | string
+ app: "expiditer"
domain: "prod"
component: "kitchen"
}
@@ -2490,16 +2490,16 @@
}
service: {
expiditer: {
- name: *"expiditer" | string
+ name: "expiditer"
port: {
client: {
- name: *"client" | string
+ name: "client"
port: 8080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
label: {
- app: *"expiditer" | string
+ app: "expiditer"
domain: "prod"
component: "kitchen"
}
@@ -2513,23 +2513,23 @@
apiVersion: "v1"
kind: "Service"
metadata: {
- name: *"expiditer" | string
+ name: "expiditer"
labels: {
- app: *"expiditer" | string
+ app: "expiditer"
domain: "prod"
component: "kitchen"
}
}
spec: {
selector: {
- app: *"expiditer" | string
+ app: "expiditer"
domain: "prod"
component: "kitchen"
}
ports: [{
- name: *"client" | string
+ name: "client"
port: 8080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -2539,7 +2539,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"expiditer" | string
+ name: "expiditer"
labels: {
component: "kitchen"
}
@@ -2548,7 +2548,7 @@
template: {
metadata: {
labels: {
- app: *"expiditer" | string
+ app: "expiditer"
domain: "prod"
component: "kitchen"
}
@@ -2558,7 +2558,7 @@
}
spec: {
containers: [{
- name: *"expiditer" | string
+ name: "expiditer"
image: "gcr.io/myproj/expiditer:v0.5.34"
args: ["-env=prod", "-logdir=/logs", "-event-server=events:7788", "-ssh-tunnel-key=/etc/certs/tunnel-private.pem"] | []
livenessProbe: {
@@ -2594,13 +2594,13 @@
}]
}]
volumes: [{
- name: *"expiditer-disk" | string
+ name: "expiditer-disk"
}, {
- name: *"secret-expiditer" | string
+ name: "secret-expiditer"
}]
}
}
- replicas: *1 | int
+ replicas: 1
}
}
}
@@ -2610,9 +2610,9 @@
}
deployment: {
headchef: {
- name: *"headchef" | string
- kind: *"deployment" | "stateful" | "daemon"
- replicas: *1 | int
+ name: "headchef"
+ kind: "deployment"
+ replicas: 1
image: "gcr.io/myproj/headchef:v0.2.16"
expose: {
port: {
@@ -2629,25 +2629,25 @@
env: {}
volume: {
"secret-headchef": {
- name: *"secret-headchef" | string
+ name: "secret-headchef"
mountPath: "/sslcerts"
- subPath: *null | string
+ subPath: null
readOnly: true
kubernetes: {}
spec: {
secret: {
- secretName: *"headchef-secrets" | string
+ secretName: "headchef-secrets"
}
}
}
"headchef-disk": {
- name: *"headchef-disk" | string
- mountPath: *"/logs" | string
- subPath: *null | string
- readOnly: *false | true
+ name: "headchef-disk"
+ mountPath: "/logs"
+ subPath: null
+ readOnly: false
spec: {
gcePersistentDisk: {
- pdName: *"headchef-disk" | string
+ pdName: "headchef-disk"
fsType: "ext4"
}
}
@@ -2655,7 +2655,7 @@
}
}
label: {
- app: *"headchef" | string
+ app: "headchef"
domain: "prod"
component: "kitchen"
}
@@ -2687,16 +2687,16 @@
}
service: {
headchef: {
- name: *"headchef" | string
+ name: "headchef"
port: {
client: {
- name: *"client" | string
+ name: "client"
port: 8080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
label: {
- app: *"headchef" | string
+ app: "headchef"
domain: "prod"
component: "kitchen"
}
@@ -2710,23 +2710,23 @@
apiVersion: "v1"
kind: "Service"
metadata: {
- name: *"headchef" | string
+ name: "headchef"
labels: {
- app: *"headchef" | string
+ app: "headchef"
domain: "prod"
component: "kitchen"
}
}
spec: {
selector: {
- app: *"headchef" | string
+ app: "headchef"
domain: "prod"
component: "kitchen"
}
ports: [{
- name: *"client" | string
+ name: "client"
port: 8080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -2736,7 +2736,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"headchef" | string
+ name: "headchef"
labels: {
component: "kitchen"
}
@@ -2745,7 +2745,7 @@
template: {
metadata: {
labels: {
- app: *"headchef" | string
+ app: "headchef"
domain: "prod"
component: "kitchen"
}
@@ -2755,7 +2755,7 @@
}
spec: {
containers: [{
- name: *"headchef" | string
+ name: "headchef"
image: "gcr.io/myproj/headchef:v0.2.16"
args: ["-env=prod", "-logdir=/logs", "-event-server=events:7788"] | []
livenessProbe: {
@@ -2791,13 +2791,13 @@
}]
}]
volumes: [{
- name: *"secret-headchef" | string
+ name: "secret-headchef"
}, {
- name: *"headchef-disk" | string
+ name: "headchef-disk"
}]
}
}
- replicas: *1 | int
+ replicas: 1
}
}
}
@@ -2807,9 +2807,9 @@
}
deployment: {
linecook: {
- name: *"linecook" | string
- kind: *"deployment" | "stateful" | "daemon"
- replicas: *1 | int
+ name: "linecook"
+ kind: "deployment"
+ replicas: 1
image: "gcr.io/myproj/linecook:v0.1.42"
expose: {
port: {
@@ -2831,24 +2831,24 @@
volume: {
"secret-linecook": {
name: "secret-kitchen"
- mountPath: *"/etc/certs" | string
- subPath: *null | string
+ mountPath: "/etc/certs"
+ subPath: null
readOnly: true
kubernetes: {}
spec: {
secret: {
- secretName: *"linecook-secrets" | string
+ secretName: "linecook-secrets"
}
}
}
"linecook-disk": {
- name: *"linecook-disk" | string
- mountPath: *"/logs" | string
- subPath: *null | string
- readOnly: *false | true
+ name: "linecook-disk"
+ mountPath: "/logs"
+ subPath: null
+ readOnly: false
spec: {
gcePersistentDisk: {
- pdName: *"linecook-disk" | string
+ pdName: "linecook-disk"
fsType: "ext4"
}
}
@@ -2856,7 +2856,7 @@
}
}
label: {
- app: *"linecook" | string
+ app: "linecook"
domain: "prod"
component: "kitchen"
}
@@ -2888,16 +2888,16 @@
}
service: {
linecook: {
- name: *"linecook" | string
+ name: "linecook"
port: {
client: {
- name: *"client" | string
+ name: "client"
port: 8080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
label: {
- app: *"linecook" | string
+ app: "linecook"
domain: "prod"
component: "kitchen"
}
@@ -2911,23 +2911,23 @@
apiVersion: "v1"
kind: "Service"
metadata: {
- name: *"linecook" | string
+ name: "linecook"
labels: {
- app: *"linecook" | string
+ app: "linecook"
domain: "prod"
component: "kitchen"
}
}
spec: {
selector: {
- app: *"linecook" | string
+ app: "linecook"
domain: "prod"
component: "kitchen"
}
ports: [{
- name: *"client" | string
+ name: "client"
port: 8080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -2937,7 +2937,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"linecook" | string
+ name: "linecook"
labels: {
component: "kitchen"
}
@@ -2946,7 +2946,7 @@
template: {
metadata: {
labels: {
- app: *"linecook" | string
+ app: "linecook"
domain: "prod"
component: "kitchen"
}
@@ -2956,7 +2956,7 @@
}
spec: {
containers: [{
- name: *"linecook" | string
+ name: "linecook"
image: "gcr.io/myproj/linecook:v0.1.42"
args: ["-env=prod", "-logdir=/logs", "-event-server=events:7788", "-name=linecook", "-etcd=etcd:2379", "-reconnect-delay=1h", "--recovery-overlap=100000"] | []
livenessProbe: {
@@ -2994,11 +2994,11 @@
volumes: [{
name: "secret-kitchen"
}, {
- name: *"linecook-disk" | string
+ name: "linecook-disk"
}]
}
}
- replicas: *1 | int
+ replicas: 1
}
}
}
@@ -3008,9 +3008,9 @@
}
deployment: {
pastrychef: {
- name: *"pastrychef" | string
- kind: *"deployment" | "stateful" | "daemon"
- replicas: *1 | int
+ name: "pastrychef"
+ kind: "deployment"
+ replicas: 1
image: "gcr.io/myproj/pastrychef:v0.1.15"
expose: {
port: {
@@ -3032,8 +3032,8 @@
volume: {
"secret-pastrychef": {
name: "secret-ssh-key"
- mountPath: *"/etc/certs" | string
- subPath: *null | string
+ mountPath: "/etc/certs"
+ subPath: null
readOnly: true
spec: {
secret: {
@@ -3043,13 +3043,13 @@
kubernetes: {}
}
"pastrychef-disk": {
- name: *"pastrychef-disk" | string
- mountPath: *"/logs" | string
- subPath: *null | string
- readOnly: *false | true
+ name: "pastrychef-disk"
+ mountPath: "/logs"
+ subPath: null
+ readOnly: false
spec: {
gcePersistentDisk: {
- pdName: *"pastrychef-disk" | string
+ pdName: "pastrychef-disk"
fsType: "ext4"
}
}
@@ -3057,7 +3057,7 @@
}
}
label: {
- app: *"pastrychef" | string
+ app: "pastrychef"
domain: "prod"
component: "kitchen"
}
@@ -3089,16 +3089,16 @@
}
service: {
pastrychef: {
- name: *"pastrychef" | string
+ name: "pastrychef"
port: {
client: {
- name: *"client" | string
+ name: "client"
port: 8080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
label: {
- app: *"pastrychef" | string
+ app: "pastrychef"
domain: "prod"
component: "kitchen"
}
@@ -3112,23 +3112,23 @@
apiVersion: "v1"
kind: "Service"
metadata: {
- name: *"pastrychef" | string
+ name: "pastrychef"
labels: {
- app: *"pastrychef" | string
+ app: "pastrychef"
domain: "prod"
component: "kitchen"
}
}
spec: {
selector: {
- app: *"pastrychef" | string
+ app: "pastrychef"
domain: "prod"
component: "kitchen"
}
ports: [{
- name: *"client" | string
+ name: "client"
port: 8080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -3138,7 +3138,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"pastrychef" | string
+ name: "pastrychef"
labels: {
component: "kitchen"
}
@@ -3147,7 +3147,7 @@
template: {
metadata: {
labels: {
- app: *"pastrychef" | string
+ app: "pastrychef"
domain: "prod"
component: "kitchen"
}
@@ -3157,7 +3157,7 @@
}
spec: {
containers: [{
- name: *"pastrychef" | string
+ name: "pastrychef"
image: "gcr.io/myproj/pastrychef:v0.1.15"
args: ["-env=prod", "-logdir=/logs", "-event-server=events:7788", "-ssh-tunnel-key=/etc/certs/tunnel-private.pem", "-reconnect-delay=1m", "-etcd=etcd:2379", "-recovery-overlap=10000"] | []
livenessProbe: {
@@ -3195,11 +3195,11 @@
volumes: [{
name: "secret-ssh-key"
}, {
- name: *"pastrychef-disk" | string
+ name: "pastrychef-disk"
}]
}
}
- replicas: *1 | int
+ replicas: 1
}
}
}
@@ -3209,9 +3209,9 @@
}
deployment: {
souschef: {
- name: *"souschef" | string
- kind: *"deployment" | "stateful" | "daemon"
- replicas: *1 | int
+ name: "souschef"
+ kind: "deployment"
+ replicas: 1
image: "gcr.io/myproj/souschef:v0.5.3"
expose: {
port: {
@@ -3223,7 +3223,7 @@
args: []
env: {}
label: {
- app: *"souschef" | string
+ app: "souschef"
domain: "prod"
component: "kitchen"
}
@@ -3256,16 +3256,16 @@
}
service: {
souschef: {
- name: *"souschef" | string
+ name: "souschef"
port: {
client: {
- name: *"client" | string
+ name: "client"
port: 8080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
label: {
- app: *"souschef" | string
+ app: "souschef"
domain: "prod"
component: "kitchen"
}
@@ -3279,23 +3279,23 @@
apiVersion: "v1"
kind: "Service"
metadata: {
- name: *"souschef" | string
+ name: "souschef"
labels: {
- app: *"souschef" | string
+ app: "souschef"
domain: "prod"
component: "kitchen"
}
}
spec: {
selector: {
- app: *"souschef" | string
+ app: "souschef"
domain: "prod"
component: "kitchen"
}
ports: [{
- name: *"client" | string
+ name: "client"
port: 8080
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -3305,7 +3305,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"souschef" | string
+ name: "souschef"
labels: {
component: "kitchen"
}
@@ -3314,7 +3314,7 @@
template: {
metadata: {
labels: {
- app: *"souschef" | string
+ app: "souschef"
domain: "prod"
component: "kitchen"
}
@@ -3324,7 +3324,7 @@
}
spec: {
containers: [{
- name: *"souschef" | string
+ name: "souschef"
image: "gcr.io/myproj/souschef:v0.5.3"
args: []
livenessProbe: {
@@ -3342,7 +3342,7 @@
}]
}
}
- replicas: *1 | int
+ replicas: 1
}
}
}
@@ -3362,9 +3362,9 @@
}
deployment: {
alertmanager: {
- name: *"alertmanager" | string
- kind: *"deployment" | "stateful" | "daemon"
- replicas: *1 | int
+ name: "alertmanager"
+ kind: "deployment"
+ replicas: 1
kubernetes: {
spec: {
selector: {
@@ -3386,10 +3386,10 @@
env: {}
volume: {
"config-volume": {
- name: *"config-volume" | string
+ name: "config-volume"
mountPath: "/etc/alertmanager"
- subPath: *null | string
- readOnly: *false | true
+ subPath: null
+ readOnly: false
spec: {
configMap: {
name: "alertmanager"
@@ -3398,10 +3398,10 @@
kubernetes: {}
}
alertmanager: {
- name: *"alertmanager" | string
+ name: "alertmanager"
mountPath: "/alertmanager"
- subPath: *null | string
- readOnly: *false | true
+ subPath: null
+ readOnly: false
spec: {
emptyDir: {}
}
@@ -3409,7 +3409,7 @@
}
}
label: {
- app: *"alertmanager" | string
+ app: "alertmanager"
domain: "prod"
component: "mon"
}
@@ -3418,10 +3418,10 @@
}
service: {
alertmanager: {
- name: *"alertmanager" | string
+ name: "alertmanager"
label: {
name: "alertmanager"
- app: *"alertmanager" | string
+ app: "alertmanager"
domain: "prod"
component: "mon"
}
@@ -3429,7 +3429,7 @@
alertmanager: {
name: "main"
port: 9093
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
kubernetes: {
@@ -3468,10 +3468,10 @@
apiVersion: "v1"
kind: "Service"
metadata: {
- name: *"alertmanager" | string
+ name: "alertmanager"
labels: {
name: "alertmanager"
- app: *"alertmanager" | string
+ app: "alertmanager"
domain: "prod"
component: "mon"
}
@@ -3483,14 +3483,14 @@
spec: {
selector: {
name: "alertmanager"
- app: *"alertmanager" | string
+ app: "alertmanager"
domain: "prod"
component: "mon"
}
ports: [{
name: "main"
port: 9093
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -3500,7 +3500,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"alertmanager" | string
+ name: "alertmanager"
labels: {
component: "mon"
}
@@ -3509,14 +3509,14 @@
template: {
metadata: {
labels: {
- app: *"alertmanager" | string
+ app: "alertmanager"
domain: "prod"
component: "mon"
}
}
spec: {
containers: [{
- name: *"alertmanager" | string
+ name: "alertmanager"
image: "prom/alertmanager:v0.15.2"
args: ["--config.file=/etc/alertmanager/alerts.yaml", "--storage.path=/alertmanager", "--web.external-url=https://alertmanager.example.com"]
volumeMounts: [{
@@ -3544,9 +3544,9 @@
}]
}]
volumes: [{
- name: *"config-volume" | string
+ name: "config-volume"
}, {
- name: *"alertmanager" | string
+ name: "alertmanager"
}]
}
}
@@ -3555,7 +3555,7 @@
app: "alertmanager"
}
}
- replicas: *1 | int
+ replicas: 1
}
}
}
@@ -3594,9 +3594,9 @@
}
deployment: {
grafana: {
- name: *"grafana" | string
- kind: *"deployment" | "stateful" | "daemon"
- replicas: *1 | int
+ name: "grafana"
+ kind: "deployment"
+ replicas: 1
image: "grafana/grafana:4.5.2"
expose: {
port: {
@@ -3610,10 +3610,10 @@
args: []
volume: {
"grafana-volume": {
- name: *"grafana-volume" | string
+ name: "grafana-volume"
mountPath: "/var/lib/grafana"
- subPath: *null | string
- readOnly: *false | true
+ subPath: null
+ readOnly: false
spec: {
gcePersistentDisk: {
pdName: "grafana-volume"
@@ -3649,7 +3649,7 @@
}
}
label: {
- app: *"grafana" | string
+ app: "grafana"
domain: "prod"
component: "mon"
}
@@ -3668,16 +3668,16 @@
}
service: {
grafana: {
- name: *"grafana" | string
+ name: "grafana"
port: {
grafana: {
- name: *"grafana" | string
+ name: "grafana"
port: 3000
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
label: {
- app: *"grafana" | string
+ app: "grafana"
domain: "prod"
component: "mon"
}
@@ -3691,23 +3691,23 @@
apiVersion: "v1"
kind: "Service"
metadata: {
- name: *"grafana" | string
+ name: "grafana"
labels: {
- app: *"grafana" | string
+ app: "grafana"
domain: "prod"
component: "mon"
}
}
spec: {
selector: {
- app: *"grafana" | string
+ app: "grafana"
domain: "prod"
component: "mon"
}
ports: [{
- name: *"grafana" | string
+ name: "grafana"
port: 3000
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -3717,7 +3717,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"grafana" | string
+ name: "grafana"
labels: {
component: "mon"
}
@@ -3726,14 +3726,14 @@
template: {
metadata: {
labels: {
- app: *"grafana" | string
+ app: "grafana"
domain: "prod"
component: "mon"
}
}
spec: {
containers: [{
- name: *"grafana" | string
+ name: "grafana"
image: "grafana/grafana:4.5.2"
args: []
env: [{
@@ -3775,11 +3775,11 @@
}
}]
volumes: [{
- name: *"grafana-volume" | string
+ name: "grafana-volume"
}]
}
}
- replicas: *1 | int
+ replicas: 1
}
}
}
@@ -3789,9 +3789,9 @@
}
deployment: {
"node-exporter": {
- name: *"node-exporter" | string
+ name: "node-exporter"
kind: "daemon"
- replicas: *1 | int
+ replicas: 1
image: "quay.io/prometheus/node-exporter:v0.16.0"
expose: {
port: {
@@ -3804,9 +3804,9 @@
env: {}
volume: {
proc: {
- name: *"proc" | string
+ name: "proc"
mountPath: "/host/proc"
- subPath: *null | string
+ subPath: null
readOnly: true
spec: {
hostPath: {
@@ -3816,9 +3816,9 @@
kubernetes: {}
}
sys: {
- name: *"sys" | string
+ name: "sys"
mountPath: "/host/sys"
- subPath: *null | string
+ subPath: null
readOnly: true
spec: {
hostPath: {
@@ -3854,7 +3854,7 @@
}
}
label: {
- app: *"node-exporter" | string
+ app: "node-exporter"
domain: "prod"
component: "mon"
}
@@ -3863,12 +3863,12 @@
}
service: {
"node-exporter": {
- name: *"node-exporter" | string
+ name: "node-exporter"
port: {
scrape: {
name: "metrics"
port: 9100
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
kubernetes: {
@@ -3883,7 +3883,7 @@
}
}
label: {
- app: *"node-exporter" | string
+ app: "node-exporter"
domain: "prod"
component: "mon"
}
@@ -3899,9 +3899,9 @@
annotations: {
"prometheus.io/scrape": "true"
}
- name: *"node-exporter" | string
+ name: "node-exporter"
labels: {
- app: *"node-exporter" | string
+ app: "node-exporter"
domain: "prod"
component: "mon"
}
@@ -3910,14 +3910,14 @@
type: "ClusterIP"
clusterIP: "None"
selector: {
- app: *"node-exporter" | string
+ app: "node-exporter"
domain: "prod"
component: "mon"
}
ports: [{
name: "metrics"
port: 9100
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -3928,7 +3928,7 @@
"node-exporter": {
apiVersion: "extensions/v1beta1"
metadata: {
- name: *"node-exporter" | string
+ name: "node-exporter"
labels: {
component: "mon"
}
@@ -3937,7 +3937,7 @@
template: {
metadata: {
labels: {
- app: *"node-exporter" | string
+ app: "node-exporter"
domain: "prod"
component: "mon"
}
@@ -3946,12 +3946,12 @@
hostNetwork: true
hostPID: true
volumes: [{
- name: *"proc" | string
+ name: "proc"
}, {
- name: *"sys" | string
+ name: "sys"
}]
containers: [{
- name: *"node-exporter" | string
+ name: "node-exporter"
image: "quay.io/prometheus/node-exporter:v0.16.0"
args: ["--path.procfs=/host/proc", "--path.sysfs=/host/sys"]
volumeMounts: [{
@@ -3999,9 +3999,9 @@
}
deployment: {
prometheus: {
- name: *"prometheus" | string
- kind: *"deployment" | "stateful" | "daemon"
- replicas: *1 | int
+ name: "prometheus"
+ kind: "deployment"
+ replicas: 1
image: "prom/prometheus:v2.4.3"
args: ["--config.file=/etc/prometheus/prometheus.yml", "--web.external-url=https://prometheus.example.com"]
expose: {
@@ -4014,10 +4014,10 @@
env: {}
volume: {
"config-volume": {
- name: *"config-volume" | string
+ name: "config-volume"
mountPath: "/etc/prometheus"
- subPath: *null | string
- readOnly: *false | true
+ subPath: null
+ readOnly: false
spec: {
configMap: {
name: "prometheus"
@@ -4050,7 +4050,7 @@
}
}
label: {
- app: *"prometheus" | string
+ app: "prometheus"
domain: "prod"
component: "mon"
}
@@ -4059,10 +4059,10 @@
}
service: {
prometheus: {
- name: *"prometheus" | string
+ name: "prometheus"
label: {
name: "prometheus"
- app: *"prometheus" | string
+ app: "prometheus"
domain: "prod"
component: "mon"
}
@@ -4071,7 +4071,7 @@
name: "main"
port: 9090
nodePort: 30900
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
kubernetes: {
@@ -4326,10 +4326,10 @@
annotations: {
"prometheus.io/scrape": "true"
}
- name: *"prometheus" | string
+ name: "prometheus"
labels: {
name: "prometheus"
- app: *"prometheus" | string
+ app: "prometheus"
domain: "prod"
component: "mon"
}
@@ -4338,7 +4338,7 @@
type: "NodePort"
selector: {
name: "prometheus"
- app: *"prometheus" | string
+ app: "prometheus"
domain: "prod"
component: "mon"
}
@@ -4346,7 +4346,7 @@
name: "main"
port: 9090
nodePort: 30900
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -4356,7 +4356,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"prometheus" | string
+ name: "prometheus"
labels: {
component: "mon"
}
@@ -4365,7 +4365,7 @@
template: {
metadata: {
labels: {
- app: *"prometheus" | string
+ app: "prometheus"
domain: "prod"
component: "mon"
}
@@ -4375,7 +4375,7 @@
}
spec: {
containers: [{
- name: *"prometheus" | string
+ name: "prometheus"
image: "prom/prometheus:v2.4.3"
args: ["--config.file=/etc/prometheus/prometheus.yml", "--web.external-url=https://prometheus.example.com"]
volumeMounts: [{
@@ -4394,7 +4394,7 @@
}]
}]
volumes: [{
- name: *"config-volume" | string
+ name: "config-volume"
}]
}
}
@@ -4410,7 +4410,7 @@
maxUnavailable: 1
}
}
- replicas: *1 | int
+ replicas: 1
}
}
}
@@ -4670,9 +4670,9 @@
}
deployment: {
authproxy: {
- name: *"authproxy" | string
- kind: *"deployment" | "stateful" | "daemon"
- replicas: *1 | int
+ name: "authproxy"
+ kind: "deployment"
+ replicas: 1
image: "skippy/oauth2_proxy:2.0.1"
args: ["--config=/etc/authproxy/authproxy.cfg"]
expose: {
@@ -4685,10 +4685,10 @@
env: {}
volume: {
"config-volume": {
- name: *"config-volume" | string
+ name: "config-volume"
mountPath: "/etc/authproxy"
- subPath: *null | string
- readOnly: *false | true
+ subPath: null
+ readOnly: false
spec: {
configMap: {
name: "authproxy"
@@ -4698,7 +4698,7 @@
}
}
label: {
- app: *"authproxy" | string
+ app: "authproxy"
domain: "prod"
component: "proxy"
}
@@ -4708,16 +4708,16 @@
}
service: {
authproxy: {
- name: *"authproxy" | string
+ name: "authproxy"
port: {
client: {
- name: *"client" | string
+ name: "client"
port: 4180
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
label: {
- app: *"authproxy" | string
+ app: "authproxy"
domain: "prod"
component: "proxy"
}
@@ -4787,23 +4787,23 @@
apiVersion: "v1"
kind: "Service"
metadata: {
- name: *"authproxy" | string
+ name: "authproxy"
labels: {
- app: *"authproxy" | string
+ app: "authproxy"
domain: "prod"
component: "proxy"
}
}
spec: {
selector: {
- app: *"authproxy" | string
+ app: "authproxy"
domain: "prod"
component: "proxy"
}
ports: [{
- name: *"client" | string
+ name: "client"
port: 4180
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
}
}
@@ -4813,7 +4813,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"authproxy" | string
+ name: "authproxy"
labels: {
component: "proxy"
}
@@ -4822,14 +4822,14 @@
template: {
metadata: {
labels: {
- app: *"authproxy" | string
+ app: "authproxy"
domain: "prod"
component: "proxy"
}
}
spec: {
containers: [{
- name: *"authproxy" | string
+ name: "authproxy"
image: "skippy/oauth2_proxy:2.0.1"
args: ["--config=/etc/authproxy/authproxy.cfg"]
volumeMounts: [{
@@ -4848,11 +4848,11 @@
}]
}]
volumes: [{
- name: *"config-volume" | string
+ name: "config-volume"
}]
}
}
- replicas: *1 | int
+ replicas: 1
}
}
}
@@ -4928,9 +4928,9 @@
}
deployment: {
goget: {
- name: *"goget" | string
- kind: *"deployment" | "stateful" | "daemon"
- replicas: *1 | int
+ name: "goget"
+ kind: "deployment"
+ replicas: 1
image: "gcr.io/myproj/goget:v0.5.1"
expose: {
port: {
@@ -4943,10 +4943,10 @@
env: {}
volume: {
"secret-volume": {
- name: *"secret-volume" | string
+ name: "secret-volume"
mountPath: "/etc/ssl"
- subPath: *null | string
- readOnly: *false | true
+ subPath: null
+ readOnly: false
spec: {
secret: {
secretName: "goget-secrets"
@@ -4956,7 +4956,7 @@
}
}
label: {
- app: *"goget" | string
+ app: "goget"
domain: "prod"
component: "proxy"
}
@@ -4966,17 +4966,17 @@
}
service: {
goget: {
- name: *"goget" | string
+ name: "goget"
port: {
http: {
- name: *"http" | string
+ name: "http"
port: 443
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
https: {
- name: *"https" | string
+ name: "https"
port: 7443
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
kubernetes: {
@@ -4986,7 +4986,7 @@
}
}
label: {
- app: *"goget" | string
+ app: "goget"
domain: "prod"
component: "proxy"
}
@@ -5001,25 +5001,25 @@
spec: {
type: "LoadBalancer"
selector: {
- app: *"goget" | string
+ app: "goget"
domain: "prod"
component: "proxy"
}
ports: [{
- name: *"http" | string
+ name: "http"
port: 443
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}, {
- name: *"https" | string
+ name: "https"
port: 7443
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
loadBalancerIP: "1.3.5.7"
}
metadata: {
- name: *"goget" | string
+ name: "goget"
labels: {
- app: *"goget" | string
+ app: "goget"
domain: "prod"
component: "proxy"
}
@@ -5031,7 +5031,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"goget" | string
+ name: "goget"
labels: {
component: "proxy"
}
@@ -5040,14 +5040,14 @@
template: {
metadata: {
labels: {
- app: *"goget" | string
+ app: "goget"
domain: "prod"
component: "proxy"
}
}
spec: {
containers: [{
- name: *"goget" | string
+ name: "goget"
image: "gcr.io/myproj/goget:v0.5.1"
args: []
volumeMounts: [{
@@ -5066,11 +5066,11 @@
}]
}]
volumes: [{
- name: *"secret-volume" | string
+ name: "secret-volume"
}]
}
}
- replicas: *1 | int
+ replicas: 1
}
}
}
@@ -5080,9 +5080,9 @@
}
deployment: {
nginx: {
- name: *"nginx" | string
- kind: *"deployment" | "stateful" | "daemon"
- replicas: *1 | int
+ name: "nginx"
+ kind: "deployment"
+ replicas: 1
image: "nginx:1.11.10-alpine"
expose: {
port: {
@@ -5096,10 +5096,10 @@
env: {}
volume: {
"secret-volume": {
- name: *"secret-volume" | string
+ name: "secret-volume"
mountPath: "/etc/ssl"
- subPath: *null | string
- readOnly: *false | true
+ subPath: null
+ readOnly: false
spec: {
secret: {
secretName: "proxy-secrets"
@@ -5108,10 +5108,10 @@
kubernetes: {}
}
"config-volume": {
- name: *"config-volume" | string
+ name: "config-volume"
mountPath: "/etc/nginx/nginx.conf"
subPath: "nginx.conf"
- readOnly: *false | true
+ readOnly: false
spec: {
configMap: {
name: "nginx"
@@ -5121,7 +5121,7 @@
}
}
label: {
- app: *"nginx" | string
+ app: "nginx"
domain: "prod"
component: "proxy"
}
@@ -5131,17 +5131,17 @@
}
service: {
nginx: {
- name: *"nginx" | string
+ name: "nginx"
port: {
http: {
- name: *"http" | string
+ name: "http"
port: 80
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
https: {
- name: *"https" | string
+ name: "https"
port: 443
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}
}
kubernetes: {
@@ -5151,7 +5151,7 @@
}
}
label: {
- app: *"nginx" | string
+ app: "nginx"
domain: "prod"
component: "proxy"
}
@@ -5365,25 +5365,25 @@
spec: {
type: "LoadBalancer"
selector: {
- app: *"nginx" | string
+ app: "nginx"
domain: "prod"
component: "proxy"
}
ports: [{
- name: *"http" | string
+ name: "http"
port: 80
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}, {
- name: *"https" | string
+ name: "https"
port: 443
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
}]
loadBalancerIP: "1.3.4.5"
}
metadata: {
- name: *"nginx" | string
+ name: "nginx"
labels: {
- app: *"nginx" | string
+ app: "nginx"
domain: "prod"
component: "proxy"
}
@@ -5395,7 +5395,7 @@
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata: {
- name: *"nginx" | string
+ name: "nginx"
labels: {
component: "proxy"
}
@@ -5404,14 +5404,14 @@
template: {
metadata: {
labels: {
- app: *"nginx" | string
+ app: "nginx"
domain: "prod"
component: "proxy"
}
}
spec: {
containers: [{
- name: *"nginx" | string
+ name: "nginx"
image: "nginx:1.11.10-alpine"
args: []
volumeMounts: [{
@@ -5424,7 +5424,7 @@
readOnly: v.readOnly
}
}, {
- name: *"config-volume" | string
+ name: "config-volume"
subPath: "nginx.conf"
mountPath: "/etc/nginx/nginx.conf"
}]
@@ -5437,13 +5437,13 @@
}]
}]
volumes: [{
- name: *"secret-volume" | string
+ name: "secret-volume"
}, {
- name: *"config-volume" | string
+ name: "config-volume"
}]
}
}
- replicas: *1 | int
+ replicas: 1
}
}
}
diff --git a/doc/tutorial/kubernetes/testdata/quick.out b/doc/tutorial/kubernetes/testdata/quick.out
index cffb467..da4fd2e 100644
--- a/doc/tutorial/kubernetes/testdata/quick.out
+++ b/doc/tutorial/kubernetes/testdata/quick.out
@@ -14,10 +14,10 @@
bartender: {
spec: {
ports: [{
- port: *7080 | int32
- targetPort: *7080 | int32 | int
- name: *"client" | string
- protocol: *"TCP" | "UDP"
+ port: 7080
+ targetPort: 7080
+ name: "client"
+ protocol: "TCP"
}]
selector: {
app: "bartender"
@@ -40,7 +40,7 @@
deployment: {
bartender: {
spec: {
- replicas: *1 | int32
+ replicas: 1
selector: {}
template: {
metadata: {
@@ -60,7 +60,7 @@
image: "gcr.io/myproj/bartender:v0.1.34"
args: []
ports: [{
- containerPort: *7080 | int32
+ containerPort: 7080
}]
}]
}
@@ -84,10 +84,10 @@
breaddispatcher: {
spec: {
ports: [{
- port: *7080 | int32
- targetPort: *7080 | int32 | int
- name: *"client" | string
- protocol: *"TCP" | "UDP"
+ port: 7080
+ targetPort: 7080
+ name: "client"
+ protocol: "TCP"
}]
selector: {
app: "breaddispatcher"
@@ -110,7 +110,7 @@
deployment: {
breaddispatcher: {
spec: {
- replicas: *1 | int32
+ replicas: 1
selector: {}
template: {
metadata: {
@@ -130,7 +130,7 @@
image: "gcr.io/myproj/breaddispatcher:v0.3.24"
args: ["-etcd=etcd:2379", "-event-server=events:7788"]
ports: [{
- containerPort: *7080 | int32
+ containerPort: 7080
}]
}]
}
@@ -154,10 +154,10 @@
host: {
spec: {
ports: [{
- port: *7080 | int32
- targetPort: *7080 | int32 | int
- name: *"client" | string
- protocol: *"TCP" | "UDP"
+ port: 7080
+ targetPort: 7080
+ name: "client"
+ protocol: "TCP"
}]
selector: {
app: "host"
@@ -200,7 +200,7 @@
image: "gcr.io/myproj/host:v0.1.10"
args: []
ports: [{
- containerPort: *7080 | int32
+ containerPort: 7080
}]
}]
}
@@ -224,10 +224,10 @@
maitred: {
spec: {
ports: [{
- port: *7080 | int32
- targetPort: *7080 | int32 | int
- name: *"client" | string
- protocol: *"TCP" | "UDP"
+ port: 7080
+ targetPort: 7080
+ name: "client"
+ protocol: "TCP"
}]
selector: {
app: "maitred"
@@ -250,7 +250,7 @@
deployment: {
maitred: {
spec: {
- replicas: *1 | int32
+ replicas: 1
selector: {}
template: {
metadata: {
@@ -270,7 +270,7 @@
image: "gcr.io/myproj/maitred:v0.0.4"
args: []
ports: [{
- containerPort: *7080 | int32
+ containerPort: 7080
}]
}]
}
@@ -295,9 +295,9 @@
spec: {
ports: [{
name: "http"
- port: *8080 | int32
- protocol: *"TCP" | "UDP"
- targetPort: *8080 | int
+ port: 8080
+ protocol: "TCP"
+ targetPort: 8080
}]
selector: {
app: "valeter"
@@ -320,7 +320,7 @@
deployment: {
valeter: {
spec: {
- replicas: *1 | int32
+ replicas: 1
selector: {}
template: {
metadata: {
@@ -364,10 +364,10 @@
waiter: {
spec: {
ports: [{
- port: *7080 | int32
- targetPort: *7080 | int32 | int
- name: *"client" | string
- protocol: *"TCP" | "UDP"
+ port: 7080
+ targetPort: 7080
+ name: "client"
+ protocol: "TCP"
}]
selector: {
app: "waiter"
@@ -409,7 +409,7 @@
name: "waiter"
image: "gcr.io/myproj/waiter:v0.3.0"
ports: [{
- containerPort: *7080 | int32
+ containerPort: 7080
}]
}]
}
@@ -434,9 +434,9 @@
spec: {
ports: [{
name: "http"
- port: *7080 | int32
- protocol: *"TCP" | "UDP"
- targetPort: *7080 | int32 | int
+ port: 7080
+ protocol: "TCP"
+ targetPort: 7080
}]
selector: {
app: "waterdispatcher"
@@ -459,7 +459,7 @@
deployment: {
waterdispatcher: {
spec: {
- replicas: *1 | int32
+ replicas: 1
selector: {}
template: {
metadata: {
@@ -479,7 +479,7 @@
image: "gcr.io/myproj/waterdispatcher:v0.0.48"
args: ["-http=:8080", "-etcd=etcd:2379"]
ports: [{
- containerPort: *7080 | int32
+ containerPort: 7080
}]
}]
}
@@ -509,10 +509,10 @@
download: {
spec: {
ports: [{
- port: *7080 | int32
- targetPort: *7080 | int
- name: *"client" | string
- protocol: *"TCP" | "UDP"
+ port: 7080
+ targetPort: 7080
+ name: "client"
+ protocol: "TCP"
}]
selector: {
app: "download"
@@ -535,7 +535,7 @@
deployment: {
download: {
spec: {
- replicas: *1 | int32
+ replicas: 1
selector: {}
template: {
metadata: {
@@ -575,15 +575,15 @@
spec: {
clusterIP: "None"
ports: [{
- port: *2379 | int32
- targetPort: *2379 | int
- name: *"client" | string
- protocol: *"TCP" | "UDP"
+ port: 2379
+ targetPort: 2379
+ name: "client"
+ protocol: "TCP"
}, {
name: "peer"
- port: *2380 | int32
- protocol: *"TCP" | "UDP"
- targetPort: *2380 | int
+ port: 2380
+ protocol: "TCP"
+ targetPort: 2380
}]
selector: {
app: "etcd"
@@ -720,9 +720,9 @@
spec: {
ports: [{
name: "grpc"
- port: *7788 | int32
- protocol: *"TCP" | "UDP"
- targetPort: *7788 | int
+ port: 7788
+ protocol: "TCP"
+ targetPort: 7788
}]
selector: {
app: "events"
@@ -819,8 +819,8 @@
ports: [{
port: 443
name: "http"
- protocol: *"TCP" | "UDP"
- targetPort: *7443 | int
+ protocol: "TCP"
+ targetPort: 7443
}]
selector: {
app: "tasks"
@@ -843,7 +843,7 @@
deployment: {
tasks: {
spec: {
- replicas: *1 | int32
+ replicas: 1
selector: {}
template: {
metadata: {
@@ -898,10 +898,10 @@
updater: {
spec: {
ports: [{
- port: *8080 | int32
- targetPort: *8080 | int
- name: *"client" | string
- protocol: *"TCP" | "UDP"
+ port: 8080
+ targetPort: 8080
+ name: "client"
+ protocol: "TCP"
}]
selector: {
app: "updater"
@@ -924,7 +924,7 @@
deployment: {
updater: {
spec: {
- replicas: *1 | int32
+ replicas: 1
selector: {}
template: {
metadata: {
@@ -977,9 +977,9 @@
loadBalancerIP: "1.2.3.4."
ports: [{
name: "http"
- port: *7788 | int32
- protocol: *"TCP" | "UDP"
- targetPort: *7788 | int
+ port: 7788
+ protocol: "TCP"
+ targetPort: 7788
}]
selector: {
app: "watcher"
@@ -1002,7 +1002,7 @@
deployment: {
watcher: {
spec: {
- replicas: *1 | int32
+ replicas: 1
selector: {}
template: {
metadata: {
@@ -1059,10 +1059,10 @@
caller: {
spec: {
ports: [{
- port: *8080 | int32
- targetPort: *8080 | int
- name: *"client" | string
- protocol: *"TCP" | "UDP"
+ port: 8080
+ targetPort: 8080
+ name: "client"
+ protocol: "TCP"
}]
selector: {
app: "caller"
@@ -1106,9 +1106,9 @@
fsType: "ext4"
}
}, {
- name: *"secret-caller" | string
+ name: "secret-caller"
secret: {
- secretName: *"caller-secrets" | string
+ secretName: "caller-secrets"
}
}, {
name: "secret-ssh-key"
@@ -1121,10 +1121,10 @@
image: "gcr.io/myproj/caller:v0.20.14"
volumeMounts: [{
name: "ssd-caller"
- mountPath: *"/logs" | string
+ mountPath: "/logs"
}, {
- mountPath: *"/etc/certs" | string
- name: *"secret-caller" | string
+ mountPath: "/etc/certs"
+ name: "secret-caller"
readOnly: true
}, {
mountPath: "/sslcerts"
@@ -1165,10 +1165,10 @@
dishwasher: {
spec: {
ports: [{
- port: *8080 | int32
- targetPort: *8080 | int
- name: *"client" | string
- protocol: *"TCP" | "UDP"
+ port: 8080
+ targetPort: 8080
+ name: "client"
+ protocol: "TCP"
}]
selector: {
app: "dishwasher"
@@ -1206,15 +1206,15 @@
}
spec: {
volumes: [{
- name: *"dishwasher-disk" | string
+ name: "dishwasher-disk"
gcePersistentDisk: {
- pdName: *"dishwasher-disk" | string
+ pdName: "dishwasher-disk"
fsType: "ext4"
}
}, {
- name: *"secret-dishwasher" | string
+ name: "secret-dishwasher"
secret: {
- secretName: *"dishwasher-secrets" | string
+ secretName: "dishwasher-secrets"
}
}, {
name: "secret-ssh-key"
@@ -1226,11 +1226,11 @@
name: "dishwasher"
image: "gcr.io/myproj/dishwasher:v0.2.13"
volumeMounts: [{
- name: *"dishwasher-disk" | string
- mountPath: *"/logs" | string
+ name: "dishwasher-disk"
+ mountPath: "/logs"
}, {
mountPath: "/sslcerts"
- name: *"secret-dishwasher" | string
+ name: "secret-dishwasher"
readOnly: true
}, {
mountPath: "/etc/certs"
@@ -1271,10 +1271,10 @@
expiditer: {
spec: {
ports: [{
- port: *8080 | int32
- targetPort: *8080 | int
- name: *"client" | string
- protocol: *"TCP" | "UDP"
+ port: 8080
+ targetPort: 8080
+ name: "client"
+ protocol: "TCP"
}]
selector: {
app: "expiditer"
@@ -1297,7 +1297,7 @@
deployment: {
expiditer: {
spec: {
- replicas: *1 | int32
+ replicas: 1
selector: {}
template: {
metadata: {
@@ -1312,15 +1312,15 @@
}
spec: {
volumes: [{
- name: *"expiditer-disk" | string
+ name: "expiditer-disk"
gcePersistentDisk: {
- pdName: *"expiditer-disk" | string
+ pdName: "expiditer-disk"
fsType: "ext4"
}
}, {
- name: *"secret-expiditer" | string
+ name: "secret-expiditer"
secret: {
- secretName: *"expiditer-secrets" | string
+ secretName: "expiditer-secrets"
}
}]
containers: [{
@@ -1331,11 +1331,11 @@
containerPort: 8080
}]
volumeMounts: [{
- name: *"expiditer-disk" | string
- mountPath: *"/logs" | string
+ name: "expiditer-disk"
+ mountPath: "/logs"
}, {
- mountPath: *"/etc/certs" | string
- name: *"secret-expiditer" | string
+ mountPath: "/etc/certs"
+ name: "secret-expiditer"
readOnly: true
}]
livenessProbe: {
@@ -1368,10 +1368,10 @@
headchef: {
spec: {
ports: [{
- port: *8080 | int32
- targetPort: *8080 | int
- name: *"client" | string
- protocol: *"TCP" | "UDP"
+ port: 8080
+ targetPort: 8080
+ name: "client"
+ protocol: "TCP"
}]
selector: {
app: "headchef"
@@ -1394,7 +1394,7 @@
deployment: {
headchef: {
spec: {
- replicas: *1 | int32
+ replicas: 1
selector: {}
template: {
metadata: {
@@ -1409,26 +1409,26 @@
}
spec: {
volumes: [{
- name: *"headchef-disk" | string
+ name: "headchef-disk"
gcePersistentDisk: {
- pdName: *"headchef-disk" | string
+ pdName: "headchef-disk"
fsType: "ext4"
}
}, {
- name: *"secret-headchef" | string
+ name: "secret-headchef"
secret: {
- secretName: *"headchef-secrets" | string
+ secretName: "headchef-secrets"
}
}]
containers: [{
name: "headchef"
image: "gcr.io/myproj/headchef:v0.2.16"
volumeMounts: [{
- name: *"headchef-disk" | string
- mountPath: *"/logs" | string
+ name: "headchef-disk"
+ mountPath: "/logs"
}, {
mountPath: "/sslcerts"
- name: *"secret-headchef" | string
+ name: "secret-headchef"
readOnly: true
}]
args: ["-env=prod", "-logdir=/logs", "-event-server=events:7788"]
@@ -1465,10 +1465,10 @@
linecook: {
spec: {
ports: [{
- port: *8080 | int32
- targetPort: *8080 | int
- name: *"client" | string
- protocol: *"TCP" | "UDP"
+ port: 8080
+ targetPort: 8080
+ name: "client"
+ protocol: "TCP"
}]
selector: {
app: "linecook"
@@ -1491,7 +1491,7 @@
deployment: {
linecook: {
spec: {
- replicas: *1 | int32
+ replicas: 1
selector: {}
template: {
metadata: {
@@ -1506,9 +1506,9 @@
}
spec: {
volumes: [{
- name: *"linecook-disk" | string
+ name: "linecook-disk"
gcePersistentDisk: {
- pdName: *"linecook-disk" | string
+ pdName: "linecook-disk"
fsType: "ext4"
}
}, {
@@ -1521,11 +1521,11 @@
name: "linecook"
image: "gcr.io/myproj/linecook:v0.1.42"
volumeMounts: [{
- name: *"linecook-disk" | string
- mountPath: *"/logs" | string
+ name: "linecook-disk"
+ mountPath: "/logs"
}, {
name: "secret-kitchen"
- mountPath: *"/etc/certs" | string
+ mountPath: "/etc/certs"
readOnly: true
}]
args: ["-name=linecook", "-env=prod", "-logdir=/logs", "-event-server=events:7788", "-etcd", "etcd:2379", "-reconnect-delay", "1h", "-recovery-overlap", "100000"]
@@ -1562,10 +1562,10 @@
pastrychef: {
spec: {
ports: [{
- port: *8080 | int32
- targetPort: *8080 | int
- name: *"client" | string
- protocol: *"TCP" | "UDP"
+ port: 8080
+ targetPort: 8080
+ name: "client"
+ protocol: "TCP"
}]
selector: {
app: "pastrychef"
@@ -1588,7 +1588,7 @@
deployment: {
pastrychef: {
spec: {
- replicas: *1 | int32
+ replicas: 1
selector: {}
template: {
metadata: {
@@ -1603,9 +1603,9 @@
}
spec: {
volumes: [{
- name: *"pastrychef-disk" | string
+ name: "pastrychef-disk"
gcePersistentDisk: {
- pdName: *"pastrychef-disk" | string
+ pdName: "pastrychef-disk"
fsType: "ext4"
}
}, {
@@ -1618,11 +1618,11 @@
name: "pastrychef"
image: "gcr.io/myproj/pastrychef:v0.1.15"
volumeMounts: [{
- name: *"pastrychef-disk" | string
- mountPath: *"/logs" | string
+ name: "pastrychef-disk"
+ mountPath: "/logs"
}, {
name: "secret-ssh-key"
- mountPath: *"/etc/certs" | string
+ mountPath: "/etc/certs"
readOnly: true
}]
args: ["-env=prod", "-ssh-tunnel-key=/etc/certs/tunnel-private.pem", "-logdir=/logs", "-event-server=events:7788", "-reconnect-delay=1m", "-etcd=etcd:2379", "-recovery-overlap=10000"]
@@ -1659,10 +1659,10 @@
souschef: {
spec: {
ports: [{
- port: *8080 | int32
- targetPort: *8080 | int
- name: *"client" | string
- protocol: *"TCP" | "UDP"
+ port: 8080
+ targetPort: 8080
+ name: "client"
+ protocol: "TCP"
}]
selector: {
app: "souschef"
@@ -1685,7 +1685,7 @@
deployment: {
souschef: {
spec: {
- replicas: *1 | int32
+ replicas: 1
selector: {}
template: {
metadata: {
@@ -1755,9 +1755,9 @@
spec: {
ports: [{
name: "main"
- port: *9093 | int32
- protocol: *"TCP" | "UDP"
- targetPort: *9093 | int
+ port: 9093
+ protocol: "TCP"
+ targetPort: 9093
}]
selector: {
name: "alertmanager"
@@ -1773,7 +1773,7 @@
deployment: {
alertmanager: {
spec: {
- replicas: *1 | int32
+ replicas: 1
selector: {
matchLabels: {
app: "alertmanager"
@@ -1866,7 +1866,7 @@
ports: [{
name: "grafana"
port: 3000
- protocol: *"TCP" | "UDP"
+ protocol: "TCP"
targetPort: 3000
}]
selector: {
@@ -1897,7 +1897,7 @@
}
}
spec: {
- replicas: *1 | int32
+ replicas: 1
selector: {}
template: {
metadata: {
@@ -1975,9 +1975,9 @@
clusterIP: "None"
ports: [{
name: "metrics"
- port: *9100 | int32
- protocol: *"TCP" | "UDP"
- targetPort: *9100 | int
+ port: 9100
+ protocol: "TCP"
+ targetPort: 9100
}]
selector: {
app: "node-exporter"
@@ -2081,9 +2081,9 @@
ports: [{
name: "main"
nodePort: 30900
- port: *9090 | int32
- protocol: *"TCP" | "UDP"
- targetPort: *9090 | int
+ port: 9090
+ protocol: "TCP"
+ targetPort: 9090
}]
selector: {
name: "prometheus"
@@ -2099,7 +2099,7 @@
deployment: {
prometheus: {
spec: {
- replicas: *1 | int32
+ replicas: 1
strategy: {
rollingUpdate: {
maxSurge: 0
@@ -2411,10 +2411,10 @@
authproxy: {
spec: {
ports: [{
- port: *4180 | int32
- targetPort: *4180 | int
- name: *"client" | string
- protocol: *"TCP" | "UDP"
+ port: 4180
+ targetPort: 4180
+ name: "client"
+ protocol: "TCP"
}]
selector: {
app: "authproxy"
@@ -2437,7 +2437,7 @@
deployment: {
authproxy: {
spec: {
- replicas: *1 | int32
+ replicas: 1
selector: {}
template: {
metadata: {
@@ -2557,8 +2557,8 @@
ports: [{
port: 443
name: "https"
- protocol: *"TCP" | "UDP"
- targetPort: *7443 | int
+ protocol: "TCP"
+ targetPort: 7443
}]
selector: {
app: "goget"
@@ -2581,7 +2581,7 @@
deployment: {
goget: {
spec: {
- replicas: *1 | int32
+ replicas: 1
selector: {}
template: {
metadata: {
@@ -2633,14 +2633,14 @@
loadBalancerIP: "1.3.4.5"
ports: [{
name: "http"
- port: *80 | int32
- protocol: *"TCP" | "UDP"
- targetPort: *80 | int
+ port: 80
+ protocol: "TCP"
+ targetPort: 80
}, {
name: "https"
- port: *443 | int32
- protocol: *"TCP" | "UDP"
- targetPort: *443 | int
+ port: 443
+ protocol: "TCP"
+ targetPort: 443
}]
selector: {
app: "nginx"
@@ -2663,7 +2663,7 @@
deployment: {
nginx: {
spec: {
- replicas: *1 | int32
+ replicas: 1
selector: {}
template: {
metadata: {
diff --git a/internal/core/export/export.go b/internal/core/export/export.go
index 9c507f4..51f2209 100644
--- a/internal/core/export/export.go
+++ b/internal/core/export/export.go
@@ -28,6 +28,9 @@
type Profile struct {
Simplify bool
+ // TakeDefaults is used in Value mode to drop non-default values.
+ TakeDefaults bool
+
// TODO:
// IncludeDocs
ShowOptional bool
@@ -50,6 +53,11 @@
ShowDocs: true,
}
+var Final = &Profile{
+ Simplify: true,
+ TakeDefaults: true,
+}
+
var Raw = &Profile{
ShowOptional: true,
ShowDefinitions: true,
diff --git a/internal/core/export/testdata/adt.txtar b/internal/core/export/testdata/adt.txtar
index 49e7fbc..47a323f 100644
--- a/internal/core/export/testdata/adt.txtar
+++ b/internal/core/export/testdata/adt.txtar
@@ -194,5 +194,7 @@
_|_ // e3: undefined field 2
== Raw
_|_ // e3: undefined field 2
+== Final
+_|_ // e3: undefined field 2
== All
_|_ // e3: undefined field 2
diff --git a/internal/core/export/testdata/def.txtar b/internal/core/export/testdata/def.txtar
new file mode 100644
index 0000000..381535c
--- /dev/null
+++ b/internal/core/export/testdata/def.txtar
@@ -0,0 +1,24 @@
+-- in.cue --
+a: int | *2
+-- out/definition --
+a: int | *2
+-- out/doc --
+[]
+[a]
+-- out/value --
+== Simplified
+{
+ a: *2 | int
+}
+== Raw
+{
+ a: *2 | int
+}
+== Final
+{
+ a: 2
+}
+== All
+{
+ a: *2 | int
+}
diff --git a/internal/core/export/testdata/docs.txtar b/internal/core/export/testdata/docs.txtar
index 55a8a77..89ff118 100644
--- a/internal/core/export/testdata/docs.txtar
+++ b/internal/core/export/testdata/docs.txtar
@@ -220,6 +220,29 @@
field2: int
}
}
+== Final
+{
+ Foo: {
+ field1: int
+ field2: int
+ dup3: int
+ }
+ foos: {
+ MyFoo: {
+ field1: 0
+ field2: 1
+ dup3: int
+ }
+ }
+ bar: {
+ field1: int
+ field2: int
+ }
+ baz: {
+ field1: int
+ field2: int
+ }
+}
== All
{
// A Foo fooses stuff.
diff --git a/internal/core/export/testdata/let.txtar b/internal/core/export/testdata/let.txtar
index 331647c..2d0b306 100644
--- a/internal/core/export/testdata/let.txtar
+++ b/internal/core/export/testdata/let.txtar
@@ -15,6 +15,8 @@
{
#Foo: 2
}
+== Final
+{}
== All
{
#Foo: 2
diff --git a/internal/core/export/testdata/simplify.txtar b/internal/core/export/testdata/simplify.txtar
index 3eaa42e..f754b70 100644
--- a/internal/core/export/testdata/simplify.txtar
+++ b/internal/core/export/testdata/simplify.txtar
@@ -36,6 +36,13 @@
}
s: strings.MinRunes(4) & strings.MaxRunes(7)
}
+== Final
+{
+ x: {
+ y: int64
+ }
+ s: strings.MinRunes(4) & strings.MaxRunes(7)
+}
== All
{
x: {
diff --git a/internal/core/export/testdata/topo.txtar b/internal/core/export/testdata/topo.txtar
index 0d40a0f..a39c486 100644
--- a/internal/core/export/testdata/topo.txtar
+++ b/internal/core/export/testdata/topo.txtar
@@ -47,6 +47,15 @@
f: 4
g: 4
}
+== Final
+{
+ a: 1
+ b: 1
+ c: 2
+ e: 3
+ f: 4
+ g: 4
+}
== All
{
a: 1
diff --git a/internal/core/export/value.go b/internal/core/export/value.go
index 1761dfb..da0d853 100644
--- a/internal/core/export/value.go
+++ b/internal/core/export/value.go
@@ -80,6 +80,9 @@
}
func (e *exporter) value(n adt.Value, a ...adt.Conjunct) (result ast.Expr) {
+ if e.cfg.TakeDefaults {
+ n = adt.Default(n)
+ }
// Evaluate arc if needed?
// if e.concrete && !adt.IsConcrete(n.Value) {
diff --git a/internal/core/export/value_test.go b/internal/core/export/value_test.go
index 193555c..a75674d 100644
--- a/internal/core/export/value_test.go
+++ b/internal/core/export/value_test.go
@@ -61,6 +61,7 @@
}{
{"Simplified", export.Simplified.Value},
{"Raw", export.Raw.Value},
+ {"Final", export.Final.Value},
{"All", export.All.Value},
} {
fmt.Fprintln(t, "==", tc.name)
diff --git a/pkg/encoding/json/testdata/gen.txtar b/pkg/encoding/json/testdata/gen.txtar
index f07dbf7..6b737f9 100644
--- a/pkg/encoding/json/testdata/gen.txtar
+++ b/pkg/encoding/json/testdata/gen.txtar
@@ -14,6 +14,7 @@
x: int
y: json.Marshal({a: x})
}
+t9: json.MarshalStream([{a: 1}, {b: int | *2}])
-- out/json --
Errors:
a: error in call to encoding/json.Validate: invalid value 10 (out of bound <3)
@@ -36,4 +37,5 @@
// [incomplete] cannot convert incomplete value "int" to JSON
}
}
+ t9: (string){ "{\"a\":1}\n{\"b\":2}\n" }
}
diff --git a/pkg/encoding/yaml/testdata/gen.txtar b/pkg/encoding/yaml/testdata/gen.txtar
index 269680b..fe7e8d8 100644
--- a/pkg/encoding/yaml/testdata/gen.txtar
+++ b/pkg/encoding/yaml/testdata/gen.txtar
@@ -10,6 +10,8 @@
t5: yaml.ValidatePartial("a: 2\n---\na: 4", {a:<5})
t6: yaml.ValidatePartial("a: 2\n", {a:<5, b:int})
t7: yaml.MarshalStream([{a: 1}, {b: 2}])
+t8: yaml.Marshal({b: int | *2})
+t9: yaml.MarshalStream([{a: 1}, {b: int | *2}])
-- out/yaml --
Errors:
a: error in call to encoding/yaml.Validate: invalid value 4 (out of bound <3)
@@ -32,4 +34,6 @@
t5: (bool){ true }
t6: (bool){ true }
t7: (string){ "a: 1\n---\nb: 2\n" }
+ t8: (string){ "b: 2\n" }
+ t9: (string){ "a: 1\n---\nb: 2\n" }
}