this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

doc/tutorial/kubernetes: fix invalid user commands

Closes #994
https://github.com/cuelang/cue/pull/994

GitOrigin-RevId: 867ab688ab1d58abcc44e7583b6fdd2f6544c229
Change-Id: Ia60d93adc87d2059771df78cf00e9ecfce143e35
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/9921
Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>

authored by

Yujun Zhang and committed by
Marcel van Lohuizen
aa61ee7f 67bf363b

+66 -218
+1 -1
doc/tutorial/kubernetes/manual/services/k8s.cue
··· 114 114 for v in X.volume { 115 115 name: v.name 116 116 mountPath: v.mountPath 117 - if v.subPath != null | true { 117 + if v.subPath != null { 118 118 subPath: v.subPath 119 119 } 120 120 if v.readOnly {
+1 -1
doc/tutorial/kubernetes/manual/services/ls_tool.cue
··· 5 5 command: ls: { 6 6 task: print: { 7 7 kind: "print" 8 - Lines = [ 8 + let Lines = [ 9 9 for x in objects { 10 10 "\(x.kind) \t\(x.metadata.labels.component) \t\(x.metadata.name)" 11 11 }
+64 -216
doc/tutorial/kubernetes/testdata/manual.out
··· 1456 1456 image: "gcr.io/myproj/events:v0.1.31" 1457 1457 args: ["-cert=/etc/ssl/server.pem", "-key=/etc/ssl/server.key", "-grpc=:7788"] 1458 1458 volumeMounts: [{ 1459 - name: v.name 1460 - mountPath: v.mountPath 1461 - if v.subPath != null | true { 1462 - subPath: v.subPath 1463 - } 1464 - if v.readOnly { 1465 - readOnly: v.readOnly 1466 - } 1459 + name: "secret-volume" 1460 + mountPath: "/etc/ssl" 1467 1461 }] 1468 1462 ports: [{ 1469 1463 name: "grpc" ··· 1635 1629 image: "gcr.io/myproj/tasks:v0.2.6" 1636 1630 args: [] 1637 1631 volumeMounts: [{ 1638 - name: v.name 1639 - mountPath: v.mountPath 1640 - if v.subPath != null | true { 1641 - subPath: v.subPath 1642 - } 1643 - if v.readOnly { 1644 - readOnly: v.readOnly 1645 - } 1632 + name: "secret-volume" 1633 + mountPath: "/etc/ssl" 1646 1634 }] 1647 1635 ports: [{ 1648 1636 name: "https" ··· 1774 1762 image: "gcr.io/myproj/updater:v0.1.0" 1775 1763 args: ["-key=/etc/certs/updater.pem"] 1776 1764 volumeMounts: [{ 1777 - name: v.name 1778 - mountPath: v.mountPath 1779 - if v.subPath != null | true { 1780 - subPath: v.subPath 1781 - } 1782 - if v.readOnly { 1783 - readOnly: v.readOnly 1784 - } 1765 + name: "secret-updater" 1766 + mountPath: "/etc/certs" 1785 1767 }] 1786 1768 ports: [{ 1787 1769 name: "http" ··· 1925 1907 image: "gcr.io/myproj/watcher:v0.1.0" 1926 1908 args: [] 1927 1909 volumeMounts: [{ 1928 - name: v.name 1929 - mountPath: v.mountPath 1930 - if v.subPath != null | true { 1931 - subPath: v.subPath 1932 - } 1933 - if v.readOnly { 1934 - readOnly: v.readOnly 1935 - } 1910 + name: "secret-volume" 1911 + mountPath: "/etc/ssl" 1936 1912 }] 1937 1913 ports: [{ 1938 1914 name: "https" ··· 2140 2116 periodSeconds: 3 2141 2117 } 2142 2118 volumeMounts: [{ 2143 - name: v.name 2144 - mountPath: v.mountPath 2145 - if v.subPath != null | true { 2146 - subPath: v.subPath 2147 - } 2148 - if v.readOnly { 2149 - readOnly: v.readOnly 2150 - } 2119 + name: "ssd-caller" 2120 + mountPath: "/logs" 2151 2121 }, { 2152 - name: v.name 2153 - mountPath: v.mountPath 2154 - if v.subPath != null | true { 2155 - subPath: v.subPath 2156 - } 2157 - if v.readOnly { 2158 - readOnly: v.readOnly 2159 - } 2122 + name: "secret-ssh-key" 2123 + readOnly: true 2124 + mountPath: "/sslcerts" 2160 2125 }, { 2161 - name: v.name 2162 - mountPath: v.mountPath 2163 - if v.subPath != null | true { 2164 - subPath: v.subPath 2165 - } 2166 - if v.readOnly { 2167 - readOnly: v.readOnly 2168 - } 2126 + name: "secret-caller" 2127 + readOnly: true 2128 + mountPath: "/etc/certs" 2169 2129 }] 2170 2130 ports: [{ 2171 2131 name: "client" ··· 2361 2321 periodSeconds: 3 2362 2322 } 2363 2323 volumeMounts: [{ 2364 - name: v.name 2365 - mountPath: v.mountPath 2366 - if v.subPath != null | true { 2367 - subPath: v.subPath 2368 - } 2369 - if v.readOnly { 2370 - readOnly: v.readOnly 2371 - } 2324 + name: "secret-ssh-key" 2325 + readOnly: true 2326 + mountPath: "/sslcerts" 2372 2327 }, { 2373 - name: v.name 2374 - mountPath: v.mountPath 2375 - if v.subPath != null | true { 2376 - subPath: v.subPath 2377 - } 2378 - if v.readOnly { 2379 - readOnly: v.readOnly 2380 - } 2328 + name: "dishwasher-disk" 2329 + mountPath: "/logs" 2381 2330 }, { 2382 - name: v.name 2383 - mountPath: v.mountPath 2384 - if v.subPath != null | true { 2385 - subPath: v.subPath 2386 - } 2387 - if v.readOnly { 2388 - readOnly: v.readOnly 2389 - } 2331 + name: "secret-dishwasher" 2332 + readOnly: true 2333 + mountPath: "/etc/certs" 2390 2334 }] 2391 2335 ports: [{ 2392 2336 name: "client" ··· 2570 2514 periodSeconds: 3 2571 2515 } 2572 2516 volumeMounts: [{ 2573 - name: v.name 2574 - mountPath: v.mountPath 2575 - if v.subPath != null | true { 2576 - subPath: v.subPath 2577 - } 2578 - if v.readOnly { 2579 - readOnly: v.readOnly 2580 - } 2517 + name: "expiditer-disk" 2518 + mountPath: "/logs" 2581 2519 }, { 2582 - name: v.name 2583 - mountPath: v.mountPath 2584 - if v.subPath != null | true { 2585 - subPath: v.subPath 2586 - } 2587 - if v.readOnly { 2588 - readOnly: v.readOnly 2589 - } 2520 + name: "secret-expiditer" 2521 + readOnly: true 2522 + mountPath: "/etc/certs" 2590 2523 }] 2591 2524 ports: [{ 2592 2525 name: "client" ··· 2767 2700 periodSeconds: 3 2768 2701 } 2769 2702 volumeMounts: [{ 2770 - name: v.name 2771 - mountPath: v.mountPath 2772 - if v.subPath != null | true { 2773 - subPath: v.subPath 2774 - } 2775 - if v.readOnly { 2776 - readOnly: v.readOnly 2777 - } 2703 + name: "secret-headchef" 2704 + readOnly: true 2705 + mountPath: "/sslcerts" 2778 2706 }, { 2779 - name: v.name 2780 - mountPath: v.mountPath 2781 - if v.subPath != null | true { 2782 - subPath: v.subPath 2783 - } 2784 - if v.readOnly { 2785 - readOnly: v.readOnly 2786 - } 2707 + name: "headchef-disk" 2708 + mountPath: "/logs" 2787 2709 }] 2788 2710 ports: [{ 2789 2711 name: "client" ··· 2968 2890 periodSeconds: 3 2969 2891 } 2970 2892 volumeMounts: [{ 2971 - name: v.name 2972 - mountPath: v.mountPath 2973 - if v.subPath != null | true { 2974 - subPath: v.subPath 2975 - } 2976 - if v.readOnly { 2977 - readOnly: v.readOnly 2978 - } 2893 + name: "secret-kitchen" 2894 + readOnly: true 2895 + mountPath: "/etc/certs" 2979 2896 }, { 2980 - name: v.name 2981 - mountPath: v.mountPath 2982 - if v.subPath != null | true { 2983 - subPath: v.subPath 2984 - } 2985 - if v.readOnly { 2986 - readOnly: v.readOnly 2987 - } 2897 + name: "linecook-disk" 2898 + mountPath: "/logs" 2988 2899 }] 2989 2900 ports: [{ 2990 2901 name: "client" ··· 3169 3080 periodSeconds: 3 3170 3081 } 3171 3082 volumeMounts: [{ 3172 - name: v.name 3173 - mountPath: v.mountPath 3174 - if v.subPath != null | true { 3175 - subPath: v.subPath 3176 - } 3177 - if v.readOnly { 3178 - readOnly: v.readOnly 3179 - } 3083 + name: "secret-ssh-key" 3084 + readOnly: true 3085 + mountPath: "/etc/certs" 3180 3086 }, { 3181 - name: v.name 3182 - mountPath: v.mountPath 3183 - if v.subPath != null | true { 3184 - subPath: v.subPath 3185 - } 3186 - if v.readOnly { 3187 - readOnly: v.readOnly 3188 - } 3087 + name: "pastrychef-disk" 3088 + mountPath: "/logs" 3189 3089 }] 3190 3090 ports: [{ 3191 3091 name: "client" ··· 3520 3420 image: "prom/alertmanager:v0.15.2" 3521 3421 args: ["--config.file=/etc/alertmanager/alerts.yaml", "--storage.path=/alertmanager", "--web.external-url=https://alertmanager.example.com"] 3522 3422 volumeMounts: [{ 3523 - name: v.name 3524 - mountPath: v.mountPath 3525 - if v.subPath != null | true { 3526 - subPath: v.subPath 3527 - } 3528 - if v.readOnly { 3529 - readOnly: v.readOnly 3530 - } 3423 + name: "config-volume" 3424 + mountPath: "/etc/alertmanager" 3531 3425 }, { 3532 - name: v.name 3533 - mountPath: v.mountPath 3534 - if v.subPath != null | true { 3535 - subPath: v.subPath 3536 - } 3537 - if v.readOnly { 3538 - readOnly: v.readOnly 3539 - } 3426 + name: "alertmanager" 3427 + mountPath: "/alertmanager" 3540 3428 }] 3541 3429 ports: [{ 3542 3430 name: "alertmanager" ··· 3747 3635 value: "admin" 3748 3636 }] 3749 3637 volumeMounts: [{ 3750 - name: v.name 3751 - mountPath: v.mountPath 3752 - if v.subPath != null | true { 3753 - subPath: v.subPath 3754 - } 3755 - if v.readOnly { 3756 - readOnly: v.readOnly 3757 - } 3638 + name: "grafana-volume" 3639 + mountPath: "/var/lib/grafana" 3758 3640 }] 3759 3641 ports: [{ 3760 3642 name: "grafana" ··· 3955 3837 image: "quay.io/prometheus/node-exporter:v0.16.0" 3956 3838 args: ["--path.procfs=/host/proc", "--path.sysfs=/host/sys"] 3957 3839 volumeMounts: [{ 3958 - name: v.name 3959 - mountPath: v.mountPath 3960 - if v.subPath != null | true { 3961 - subPath: v.subPath 3962 - } 3963 - if v.readOnly { 3964 - readOnly: v.readOnly 3965 - } 3840 + name: "proc" 3841 + readOnly: true 3842 + mountPath: "/host/proc" 3966 3843 }, { 3967 - name: v.name 3968 - mountPath: v.mountPath 3969 - if v.subPath != null | true { 3970 - subPath: v.subPath 3971 - } 3972 - if v.readOnly { 3973 - readOnly: v.readOnly 3974 - } 3844 + name: "sys" 3845 + readOnly: true 3846 + mountPath: "/host/sys" 3975 3847 }] 3976 3848 ports: [{ 3977 3849 name: "scrape" ··· 4379 4251 image: "prom/prometheus:v2.4.3" 4380 4252 args: ["--config.file=/etc/prometheus/prometheus.yml", "--web.external-url=https://prometheus.example.com"] 4381 4253 volumeMounts: [{ 4382 - name: v.name 4383 - mountPath: v.mountPath 4384 - if v.subPath != null | true { 4385 - subPath: v.subPath 4386 - } 4387 - if v.readOnly { 4388 - readOnly: v.readOnly 4389 - } 4254 + name: "config-volume" 4255 + mountPath: "/etc/prometheus" 4390 4256 }] 4391 4257 ports: [{ 4392 4258 name: "web" ··· 4833 4699 image: "skippy/oauth2_proxy:2.0.1" 4834 4700 args: ["--config=/etc/authproxy/authproxy.cfg"] 4835 4701 volumeMounts: [{ 4836 - name: v.name 4837 - mountPath: v.mountPath 4838 - if v.subPath != null | true { 4839 - subPath: v.subPath 4840 - } 4841 - if v.readOnly { 4842 - readOnly: v.readOnly 4843 - } 4702 + name: "config-volume" 4703 + mountPath: "/etc/authproxy" 4844 4704 }] 4845 4705 ports: [{ 4846 4706 name: "client" ··· 5051 4911 image: "gcr.io/myproj/goget:v0.5.1" 5052 4912 args: [] 5053 4913 volumeMounts: [{ 5054 - name: v.name 5055 - mountPath: v.mountPath 5056 - if v.subPath != null | true { 5057 - subPath: v.subPath 5058 - } 5059 - if v.readOnly { 5060 - readOnly: v.readOnly 5061 - } 4914 + name: "secret-volume" 4915 + mountPath: "/etc/ssl" 5062 4916 }] 5063 4917 ports: [{ 5064 4918 name: "https" ··· 5415 5269 image: "nginx:1.11.10-alpine" 5416 5270 args: [] 5417 5271 volumeMounts: [{ 5418 - name: v.name 5419 - mountPath: v.mountPath 5420 - if v.subPath != null | true { 5421 - subPath: v.subPath 5422 - } 5423 - if v.readOnly { 5424 - readOnly: v.readOnly 5425 - } 5272 + name: "secret-volume" 5273 + mountPath: "/etc/ssl" 5426 5274 }, { 5427 5275 name: "config-volume" 5428 5276 subPath: "nginx.conf"