@intentius/chant-lexicon-k3s 0.44.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -0
- package/dist/codegen/docs.d.ts +7 -0
- package/dist/codegen/docs.d.ts.map +1 -0
- package/dist/codegen/generate-cli.d.ts +3 -0
- package/dist/codegen/generate-cli.d.ts.map +1 -0
- package/dist/codegen/generate-lexicon.d.ts +19 -0
- package/dist/codegen/generate-lexicon.d.ts.map +1 -0
- package/dist/codegen/generate-typescript.d.ts +11 -0
- package/dist/codegen/generate-typescript.d.ts.map +1 -0
- package/dist/codegen/generate.d.ts +15 -0
- package/dist/codegen/generate.d.ts.map +1 -0
- package/dist/codegen/naming.d.ts +13 -0
- package/dist/codegen/naming.d.ts.map +1 -0
- package/dist/codegen/package.d.ts +17 -0
- package/dist/codegen/package.d.ts.map +1 -0
- package/dist/codegen/parse.d.ts +93 -0
- package/dist/codegen/parse.d.ts.map +1 -0
- package/dist/generated/index.d.ts +8 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/runtime.d.ts +5 -0
- package/dist/generated/runtime.d.ts.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/integrity.json +10 -0
- package/dist/lint/audit-catalog.d.ts +13 -0
- package/dist/lint/audit-catalog.d.ts.map +1 -0
- package/dist/lint/post-synth/index.d.ts +3 -0
- package/dist/lint/post-synth/index.d.ts.map +1 -0
- package/dist/lint/post-synth/k3s-helpers.d.ts +19 -0
- package/dist/lint/post-synth/k3s-helpers.d.ts.map +1 -0
- package/dist/lint/post-synth/k3s101.d.ts +13 -0
- package/dist/lint/post-synth/k3s101.d.ts.map +1 -0
- package/dist/lint/post-synth/k3s102.d.ts +11 -0
- package/dist/lint/post-synth/k3s102.d.ts.map +1 -0
- package/dist/lint/post-synth/k3s103.d.ts +11 -0
- package/dist/lint/post-synth/k3s103.d.ts.map +1 -0
- package/dist/lint/post-synth/k3s104.d.ts +12 -0
- package/dist/lint/post-synth/k3s104.d.ts.map +1 -0
- package/dist/lint/post-synth/k3s105.d.ts +11 -0
- package/dist/lint/post-synth/k3s105.d.ts.map +1 -0
- package/dist/lint/rules/index.d.ts +5 -0
- package/dist/lint/rules/index.d.ts.map +1 -0
- package/dist/lint/rules/token-literal.d.ts +17 -0
- package/dist/lint/rules/token-literal.d.ts.map +1 -0
- package/dist/lsp/completions.d.ts +7 -0
- package/dist/lsp/completions.d.ts.map +1 -0
- package/dist/lsp/hover.d.ts +6 -0
- package/dist/lsp/hover.d.ts.map +1 -0
- package/dist/manifest.json +6 -0
- package/dist/meta.json +37 -0
- package/dist/okf/index.md +9 -0
- package/dist/okf/types/Agent.md +55 -0
- package/dist/okf/types/Registries.md +14 -0
- package/dist/okf/types/Server.md +122 -0
- package/dist/package-cli.d.ts +3 -0
- package/dist/package-cli.d.ts.map +1 -0
- package/dist/plugin.d.ts +8 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/serializer.d.ts +37 -0
- package/dist/serializer.d.ts.map +1 -0
- package/dist/skills/chant-k3s.md +90 -0
- package/dist/spec/fetch.d.ts +39 -0
- package/dist/spec/fetch.d.ts.map +1 -0
- package/dist/types/index.d.ts +370 -0
- package/dist/validate-cli.d.ts +3 -0
- package/dist/validate-cli.d.ts.map +1 -0
- package/dist/validate.d.ts +15 -0
- package/dist/validate.d.ts.map +1 -0
- package/package.json +68 -0
- package/src/codegen/docs.ts +25 -0
- package/src/codegen/generate-cli.ts +8 -0
- package/src/codegen/generate-lexicon.ts +58 -0
- package/src/codegen/generate-typescript.ts +63 -0
- package/src/codegen/generate.test.ts +157 -0
- package/src/codegen/generate.ts +116 -0
- package/src/codegen/naming.ts +42 -0
- package/src/codegen/package.ts +28 -0
- package/src/codegen/parse.ts +386 -0
- package/src/generated/.gitkeep +0 -0
- package/src/generated/index.d.ts +370 -0
- package/src/generated/index.ts +13 -0
- package/src/generated/lexicon-k3s.json +37 -0
- package/src/generated/runtime.ts +4 -0
- package/src/index.ts +11 -0
- package/src/lint/audit-catalog.ts +53 -0
- package/src/lint/post-synth/index.ts +15 -0
- package/src/lint/post-synth/k3s-helpers.ts +34 -0
- package/src/lint/post-synth/k3s101.ts +58 -0
- package/src/lint/post-synth/k3s102.ts +59 -0
- package/src/lint/post-synth/k3s103.ts +38 -0
- package/src/lint/post-synth/k3s104.ts +44 -0
- package/src/lint/post-synth/k3s105.ts +52 -0
- package/src/lint/post-synth/post-synth.test.ts +137 -0
- package/src/lint/rules/index.ts +7 -0
- package/src/lint/rules/token-literal.test.ts +53 -0
- package/src/lint/rules/token-literal.ts +87 -0
- package/src/lsp/completions.test.ts +10 -0
- package/src/lsp/completions.ts +25 -0
- package/src/lsp/hover.test.ts +10 -0
- package/src/lsp/hover.ts +43 -0
- package/src/package-cli.ts +24 -0
- package/src/plugin.test.ts +17 -0
- package/src/plugin.ts +129 -0
- package/src/serializer.acceptance.test.ts +137 -0
- package/src/serializer.test.ts +172 -0
- package/src/serializer.ts +191 -0
- package/src/skills/chant-k3s.md +90 -0
- package/src/spec/fetch.ts +80 -0
- package/src/validate-cli.ts +5 -0
- package/src/validate.ts +41 -0
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
// Code generated by chant k3s generate. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
// --- k3s Entity classes ---
|
|
4
|
+
|
|
5
|
+
export declare class Agent {
|
|
6
|
+
constructor(props: {
|
|
7
|
+
/** (cluster) Server to connect to */
|
|
8
|
+
server: string;
|
|
9
|
+
/** (logging) Log to standard error as well as file (if set) */
|
|
10
|
+
alsologtostderr?: boolean;
|
|
11
|
+
/** (listener) bind address (default: 0.0.0.0) */
|
|
12
|
+
"bind-address"?: string;
|
|
13
|
+
/** (agent/runtime) Disable embedded containerd and use the CRI socket at the given path; when used with --docker this sets the docker socket path */
|
|
14
|
+
"container-runtime-endpoint"?: string;
|
|
15
|
+
/** (agent/data) Folder to hold state */
|
|
16
|
+
"data-dir"?: string;
|
|
17
|
+
/** (logging) Turn on debug logs */
|
|
18
|
+
debug?: boolean;
|
|
19
|
+
/** (agent/runtime) Set the default runtime in containerd */
|
|
20
|
+
"default-runtime"?: string;
|
|
21
|
+
/** (agent/networking) (experimental) Disable the agent's client-side load-balancer and connect directly to the configured server address */
|
|
22
|
+
"disable-apiserver-lb"?: boolean;
|
|
23
|
+
/** (agent/containerd) Disables containerd's fallback default registry endpoint when a mirror is configured for that registry */
|
|
24
|
+
"disable-default-registry-endpoint"?: boolean;
|
|
25
|
+
/** (agent/runtime) (experimental) Use cri-dockerd instead of containerd */
|
|
26
|
+
docker?: boolean;
|
|
27
|
+
/** (experimental) Enable pprof endpoint on supervisor port */
|
|
28
|
+
"enable-pprof"?: boolean;
|
|
29
|
+
/** (agent/networking) Override default flannel cni config file */
|
|
30
|
+
"flannel-cni-conf"?: string;
|
|
31
|
+
/** (agent/networking) Override default flannel config file */
|
|
32
|
+
"flannel-conf"?: string;
|
|
33
|
+
/** (agent/networking) Override default flannel interface */
|
|
34
|
+
"flannel-iface"?: string;
|
|
35
|
+
/** (agent/node) The path to the directory where credential provider plugin binaries are located (default: /var/lib/rancher/credentialprovider/bin) */
|
|
36
|
+
"image-credential-provider-bin-dir"?: string;
|
|
37
|
+
/** (agent/node) The path to the credential provider plugin config file (default: /var/lib/rancher/credentialprovider/config.yaml) */
|
|
38
|
+
"image-credential-provider-config"?: string;
|
|
39
|
+
/** (agent/runtime) Disable embedded containerd image service and use remote image service socket at the given path. If not specified, defaults to --container-runtime-endpoint. */
|
|
40
|
+
"image-service-endpoint"?: string;
|
|
41
|
+
/** (agent/flags) Customized flag for kube-proxy process */
|
|
42
|
+
"kube-proxy-arg"?: string | string[];
|
|
43
|
+
/** (agent/flags) Customized flag for kubelet process */
|
|
44
|
+
"kubelet-arg"?: string | string[];
|
|
45
|
+
/** (agent/node) Local port for supervisor client load-balancer. If the supervisor and apiserver are not colocated an additional port 1 less than this port will also be used for the apiserver client load-balancer. (default: 6444) */
|
|
46
|
+
"lb-server-port"?: number;
|
|
47
|
+
/** (logging) Log to file */
|
|
48
|
+
log?: string;
|
|
49
|
+
/** (agent/networking) external DNS addresses to advertise for node */
|
|
50
|
+
"node-external-dns"?: string | string[];
|
|
51
|
+
/** (agent/networking) IPv4/IPv6 external IP addresses to advertise for node */
|
|
52
|
+
"node-external-ip"?: string | string[];
|
|
53
|
+
/** (agent/networking) internal DNS addresses to advertise for node */
|
|
54
|
+
"node-internal-dns"?: string | string[];
|
|
55
|
+
/** (agent/networking) IPv4/IPv6 addresses to advertise for node */
|
|
56
|
+
"node-ip"?: string | string[];
|
|
57
|
+
/** (agent/node) Registering and starting kubelet with set of labels */
|
|
58
|
+
"node-label"?: string | string[];
|
|
59
|
+
/** (agent/node) Node name */
|
|
60
|
+
"node-name"?: string;
|
|
61
|
+
/** (agent/node) Registering kubelet with set of taints */
|
|
62
|
+
"node-taint"?: string | string[];
|
|
63
|
+
/** (agent/containerd) Allows non-root pods to access devices by setting device_ownership_from_security_context=true in the containerd CRI config */
|
|
64
|
+
"nonroot-devices"?: boolean;
|
|
65
|
+
/** (agent/runtime) Customized pause image for containerd or docker sandbox (default: rancher/mirrored-pause:3.10.2) */
|
|
66
|
+
"pause-image"?: string;
|
|
67
|
+
/** (experimental) Prefer bundled userspace binaries over host binaries */
|
|
68
|
+
"prefer-bundled-bin"?: boolean;
|
|
69
|
+
/** (agent/runtime) Private registry configuration file */
|
|
70
|
+
"private-registry"?: string;
|
|
71
|
+
/** (agent/node) Kernel tuning behavior. If set, error if kernel tunables are different than kubelet defaults. */
|
|
72
|
+
"protect-kernel-defaults"?: boolean;
|
|
73
|
+
/** (agent/networking) Kubelet resolv.conf file */
|
|
74
|
+
"resolv-conf"?: string;
|
|
75
|
+
/** (experimental) Run rootless */
|
|
76
|
+
rootless?: boolean;
|
|
77
|
+
/** (agent/node) Enable SELinux in containerd */
|
|
78
|
+
selinux?: boolean;
|
|
79
|
+
/** (agent/runtime) Override default containerd snapshotter */
|
|
80
|
+
snapshotter?: string;
|
|
81
|
+
/** (cluster) Token file to use for authentication */
|
|
82
|
+
"token-file"?: string;
|
|
83
|
+
/** (logging) Number for the log level verbosity */
|
|
84
|
+
v?: number;
|
|
85
|
+
/** (logging) Comma-separated list of FILE_PATTERN=LOG_LEVEL settings for file-filtered logging */
|
|
86
|
+
vmodule?: string;
|
|
87
|
+
/** (agent/networking) (experimental) Credentials for the VPN provider. It must include the provider name and join key in the format name=<vpn-provider>,joinKey=<key>[,controlServerURL=<url>][,extraArgs=<args>] */
|
|
88
|
+
"vpn-auth"?: string;
|
|
89
|
+
/** (agent/networking) (experimental) File containing credentials for the VPN provider. It must include the provider name and join key in the format name=<vpn-provider>,joinKey=<key>[,controlServerURL=<url>][,extraArgs=<args>] */
|
|
90
|
+
"vpn-auth-file"?: string;
|
|
91
|
+
/** (agent/node) Append id to node name */
|
|
92
|
+
"with-node-id"?: boolean;
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export declare class Mirror {
|
|
97
|
+
constructor(props: {
|
|
98
|
+
/** Mirror endpoint URLs, tried in order */
|
|
99
|
+
endpoint?: string | string[];
|
|
100
|
+
/** Image name rewrite rules (regex to replacement) */
|
|
101
|
+
rewrite?: Record<string, string>;
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export declare class Registries {
|
|
106
|
+
constructor(props: {
|
|
107
|
+
/** Registry endpoint to auth/TLS configuration */
|
|
108
|
+
configs?: Record<string, RegistryConfig>;
|
|
109
|
+
/** Registry name (or wildcard) to mirror configuration */
|
|
110
|
+
mirrors?: Record<string, Mirror>;
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export declare class RegistryAuth {
|
|
115
|
+
constructor(props: {
|
|
116
|
+
/** Basic auth password. A literal here fails K3SC002 */
|
|
117
|
+
password?: string;
|
|
118
|
+
/** Bearer token. A literal here fails K3SC002 */
|
|
119
|
+
token?: string;
|
|
120
|
+
/** Basic auth username */
|
|
121
|
+
username?: string;
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export declare class RegistryConfig {
|
|
126
|
+
constructor(props: {
|
|
127
|
+
/** Credentials for the registry */
|
|
128
|
+
auth?: RegistryAuth;
|
|
129
|
+
/** TLS settings for the registry */
|
|
130
|
+
tls?: RegistryTLS;
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export declare class RegistryTLS {
|
|
135
|
+
constructor(props: {
|
|
136
|
+
/** CA bundle path on the node */
|
|
137
|
+
ca_file?: string;
|
|
138
|
+
/** Client certificate path on the node */
|
|
139
|
+
cert_file?: string;
|
|
140
|
+
/** Skip TLS verification. K3SS002 flags this */
|
|
141
|
+
insecure_skip_verify?: boolean;
|
|
142
|
+
/** Client key path on the node */
|
|
143
|
+
key_file?: string;
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export declare class Server {
|
|
148
|
+
constructor(props: {
|
|
149
|
+
/** (listener) IPv4/IPv6 address that apiserver uses to advertise to members of the cluster (default: node-external-ip/node-ip) */
|
|
150
|
+
"advertise-address"?: string;
|
|
151
|
+
/** (listener) Port that apiserver uses to advertise to members of the cluster (default: https-listen-port) */
|
|
152
|
+
"advertise-port"?: number;
|
|
153
|
+
/** (cluster) File containing the agent secret */
|
|
154
|
+
"agent-token-file"?: string;
|
|
155
|
+
/** (logging) Log to standard error as well as file (if set) */
|
|
156
|
+
alsologtostderr?: boolean;
|
|
157
|
+
/** (listener) bind address (default: 0.0.0.0) */
|
|
158
|
+
"bind-address"?: string;
|
|
159
|
+
/** (networking) IPv4/IPv6 network CIDRs to use for pod IPs (default: 10.42.0.0/16) */
|
|
160
|
+
"cluster-cidr"?: string | string[];
|
|
161
|
+
/** (networking) IPv4/IPv6 Cluster IP for coredns service. Should be in your service-cidr range (default: 10.43.0.10) */
|
|
162
|
+
"cluster-dns"?: string | string[];
|
|
163
|
+
/** (networking) Cluster Domain (default: cluster.local) */
|
|
164
|
+
"cluster-domain"?: string;
|
|
165
|
+
/** (cluster) Initialize a new cluster using embedded Etcd */
|
|
166
|
+
"cluster-init"?: boolean;
|
|
167
|
+
/** (cluster) Forget all peers and become sole member of a new cluster */
|
|
168
|
+
"cluster-reset"?: boolean;
|
|
169
|
+
/** (db) Path to snapshot file to be restored */
|
|
170
|
+
"cluster-reset-restore-path"?: string;
|
|
171
|
+
/** (agent/runtime) Disable embedded containerd and use the CRI socket at the given path; when used with --docker this sets the docker socket path */
|
|
172
|
+
"container-runtime-endpoint"?: string;
|
|
173
|
+
/** (data) Folder to hold state default /var/lib/rancher/ or ${HOME}/.rancher/ if not root */
|
|
174
|
+
"data-dir"?: string;
|
|
175
|
+
/** (db) TLS Certificate Authority file used to secure datastore backend communication */
|
|
176
|
+
"datastore-cafile"?: string;
|
|
177
|
+
/** (db) TLS certification file used to secure datastore backend communication */
|
|
178
|
+
"datastore-certfile"?: string;
|
|
179
|
+
/** (db) Specify etcd, NATS, MySQL, Postgres, or SQLite (default) data source name */
|
|
180
|
+
"datastore-endpoint"?: string;
|
|
181
|
+
/** (db) TLS key file used to secure datastore backend communication */
|
|
182
|
+
"datastore-keyfile"?: string;
|
|
183
|
+
/** (logging) Turn on debug logs */
|
|
184
|
+
debug?: boolean;
|
|
185
|
+
/** (storage) Default local storage path for local provisioner storage class */
|
|
186
|
+
"default-local-storage-path"?: string;
|
|
187
|
+
/** (agent/runtime) Set the default runtime in containerd */
|
|
188
|
+
"default-runtime"?: string;
|
|
189
|
+
/** (components) Do not deploy packaged components and delete any deployed components (valid values: ) */
|
|
190
|
+
disable?: string | string[];
|
|
191
|
+
/** (components) Disable default cloud controller manager */
|
|
192
|
+
"disable-cloud-controller"?: boolean;
|
|
193
|
+
/** (agent/containerd) Disables containerd's fallback default registry endpoint when a mirror is configured for that registry */
|
|
194
|
+
"disable-default-registry-endpoint"?: boolean;
|
|
195
|
+
/** (components) Disable Helm controller */
|
|
196
|
+
"disable-helm-controller"?: boolean;
|
|
197
|
+
/** (components) Disable running kube-proxy */
|
|
198
|
+
"disable-kube-proxy"?: boolean;
|
|
199
|
+
/** (components) Disable default network policy controller */
|
|
200
|
+
"disable-network-policy"?: boolean;
|
|
201
|
+
/** (components) Disable Kubernetes default scheduler */
|
|
202
|
+
"disable-scheduler"?: boolean;
|
|
203
|
+
/** (agent/runtime) (experimental) Use cri-dockerd instead of containerd */
|
|
204
|
+
docker?: boolean;
|
|
205
|
+
/** (networking) One of 'agent', 'cluster', 'pod', 'disabled' (default: agent) */
|
|
206
|
+
"egress-selector-mode"?: string;
|
|
207
|
+
/** (components) Enable embedded distributed container registry; requires use of embedded containerd; when enabled agents will also listen on the supervisor port */
|
|
208
|
+
"embedded-registry"?: boolean;
|
|
209
|
+
/** (experimental) Enable pprof endpoint on supervisor port */
|
|
210
|
+
"enable-pprof"?: boolean;
|
|
211
|
+
/** (flags) Customized flag for etcd process */
|
|
212
|
+
"etcd-arg"?: string | string[];
|
|
213
|
+
/** (db) Disable automatic etcd snapshots */
|
|
214
|
+
"etcd-disable-snapshots"?: boolean;
|
|
215
|
+
/** (db) Expose etcd metrics to client interface */
|
|
216
|
+
"etcd-expose-metrics"?: boolean;
|
|
217
|
+
/** (db) Enable backup to S3 */
|
|
218
|
+
"etcd-s3"?: boolean;
|
|
219
|
+
/** (db) S3 access key */
|
|
220
|
+
"etcd-s3-access-key"?: string;
|
|
221
|
+
/** (db) S3 bucket name */
|
|
222
|
+
"etcd-s3-bucket"?: string;
|
|
223
|
+
/** (db) S3 bucket lookup type, one of 'auto', 'dns', 'path'; default is 'auto' if not set */
|
|
224
|
+
"etcd-s3-bucket-lookup-type"?: string;
|
|
225
|
+
/** (db) Name of secret in the kube-system namespace used to configure S3, if etcd-s3 is enabled and no other etcd-s3 options are set */
|
|
226
|
+
"etcd-s3-config-secret"?: string;
|
|
227
|
+
/** (db) S3 endpoint url (default: s3.amazonaws.com) */
|
|
228
|
+
"etcd-s3-endpoint"?: string;
|
|
229
|
+
/** (db) S3 custom CA cert to connect to S3 endpoint */
|
|
230
|
+
"etcd-s3-endpoint-ca"?: string;
|
|
231
|
+
/** (db) S3 folder */
|
|
232
|
+
"etcd-s3-folder"?: string;
|
|
233
|
+
/** (db) Disables S3 over HTTPS */
|
|
234
|
+
"etcd-s3-insecure"?: boolean;
|
|
235
|
+
/** (db) Proxy server to use when connecting to S3, overriding any proxy-releated environment variables */
|
|
236
|
+
"etcd-s3-proxy"?: string;
|
|
237
|
+
/** (db) S3 region / bucket location (optional) (default: us-east-1) */
|
|
238
|
+
"etcd-s3-region"?: string;
|
|
239
|
+
/** (db) S3 retention limit */
|
|
240
|
+
"etcd-s3-retention"?: number;
|
|
241
|
+
/** (db) S3 secret key */
|
|
242
|
+
"etcd-s3-secret-key"?: string;
|
|
243
|
+
/** (db) S3 session token */
|
|
244
|
+
"etcd-s3-session-token"?: string;
|
|
245
|
+
/** (db) Disables S3 SSL certificate validation */
|
|
246
|
+
"etcd-s3-skip-ssl-verify"?: boolean;
|
|
247
|
+
/** (db) S3 timeout */
|
|
248
|
+
"etcd-s3-timeout"?: string;
|
|
249
|
+
/** (db) Compress etcd snapshot */
|
|
250
|
+
"etcd-snapshot-compress"?: boolean;
|
|
251
|
+
/** (db) Directory to save db snapshots. (default: ${data-dir}/server/db/snapshots) */
|
|
252
|
+
"etcd-snapshot-dir"?: string;
|
|
253
|
+
/** (db) Set the base name of etcd snapshots, appended with UNIX timestamp (default: etcd-snapshot) */
|
|
254
|
+
"etcd-snapshot-name"?: string;
|
|
255
|
+
/** (db) Snapshot reconcile interval */
|
|
256
|
+
"etcd-snapshot-reconcile-interval"?: string;
|
|
257
|
+
/** (db) Number of snapshots to retain */
|
|
258
|
+
"etcd-snapshot-retention"?: number;
|
|
259
|
+
/** (db) Snapshot interval time in cron spec. eg. every 5 hours '0 *\/5 * * *' (default: 0 *\/12 * * *) */
|
|
260
|
+
"etcd-snapshot-schedule-cron"?: string;
|
|
261
|
+
/** (networking) Backend (valid values: 'none', 'vxlan', 'host-gw', 'wireguard-native' (default: vxlan) */
|
|
262
|
+
"flannel-backend"?: string;
|
|
263
|
+
/** (agent/networking) Override default flannel cni config file */
|
|
264
|
+
"flannel-cni-conf"?: string;
|
|
265
|
+
/** (agent/networking) Override default flannel config file */
|
|
266
|
+
"flannel-conf"?: string;
|
|
267
|
+
/** (networking) Use node external IP addresses for Flannel traffic */
|
|
268
|
+
"flannel-external-ip"?: boolean;
|
|
269
|
+
/** (agent/networking) Override default flannel interface */
|
|
270
|
+
"flannel-iface"?: string;
|
|
271
|
+
/** (networking) Enable IPv6 masquerading for pod */
|
|
272
|
+
"flannel-ipv6-masq"?: boolean;
|
|
273
|
+
/** (flags) Customized flag for helm-controller process */
|
|
274
|
+
"helm-controller-arg"?: string | string[];
|
|
275
|
+
/** (listener) HTTPS listen port (default: 6443) */
|
|
276
|
+
"https-listen-port"?: number;
|
|
277
|
+
/** (agent/node) The path to the directory where credential provider plugin binaries are located (default: /var/lib/rancher/credentialprovider/bin) */
|
|
278
|
+
"image-credential-provider-bin-dir"?: string;
|
|
279
|
+
/** (agent/node) The path to the credential provider plugin config file (default: /var/lib/rancher/credentialprovider/config.yaml) */
|
|
280
|
+
"image-credential-provider-config"?: string;
|
|
281
|
+
/** (agent/runtime) Disable embedded containerd image service and use remote image service socket at the given path. If not specified, defaults to --container-runtime-endpoint. */
|
|
282
|
+
"image-service-endpoint"?: string;
|
|
283
|
+
/** (flags) Customized flag for kube-apiserver process */
|
|
284
|
+
"kube-apiserver-arg"?: string | string[];
|
|
285
|
+
/** (flags) Customized flag for kube-cloud-controller-manager process */
|
|
286
|
+
"kube-cloud-controller-manager-arg"?: string | string[];
|
|
287
|
+
/** (flags) Customized flag for kube-controller-manager process */
|
|
288
|
+
"kube-controller-manager-arg"?: string | string[];
|
|
289
|
+
/** (agent/flags) Customized flag for kube-proxy process */
|
|
290
|
+
"kube-proxy-arg"?: string | string[];
|
|
291
|
+
/** (flags) Customized flag for kube-scheduler process */
|
|
292
|
+
"kube-scheduler-arg"?: string | string[];
|
|
293
|
+
/** (agent/flags) Customized flag for kubelet process */
|
|
294
|
+
"kubelet-arg"?: string | string[];
|
|
295
|
+
/** (agent/node) Local port for supervisor client load-balancer. If the supervisor and apiserver are not colocated an additional port 1 less than this port will also be used for the apiserver client load-balancer. (default: 6444) */
|
|
296
|
+
"lb-server-port"?: number;
|
|
297
|
+
/** (logging) Log to file */
|
|
298
|
+
log?: string;
|
|
299
|
+
/** (agent/networking) external DNS addresses to advertise for node */
|
|
300
|
+
"node-external-dns"?: string | string[];
|
|
301
|
+
/** (agent/networking) IPv4/IPv6 external IP addresses to advertise for node */
|
|
302
|
+
"node-external-ip"?: string | string[];
|
|
303
|
+
/** (agent/networking) internal DNS addresses to advertise for node */
|
|
304
|
+
"node-internal-dns"?: string | string[];
|
|
305
|
+
/** (agent/networking) IPv4/IPv6 addresses to advertise for node */
|
|
306
|
+
"node-ip"?: string | string[];
|
|
307
|
+
/** (agent/node) Registering and starting kubelet with set of labels */
|
|
308
|
+
"node-label"?: string | string[];
|
|
309
|
+
/** (agent/node) Node name */
|
|
310
|
+
"node-name"?: string;
|
|
311
|
+
/** (agent/node) Registering kubelet with set of taints */
|
|
312
|
+
"node-taint"?: string | string[];
|
|
313
|
+
/** (agent/containerd) Allows non-root pods to access devices by setting device_ownership_from_security_context=true in the containerd CRI config */
|
|
314
|
+
"nonroot-devices"?: boolean;
|
|
315
|
+
/** (agent/runtime) Customized pause image for containerd or docker sandbox (default: rancher/mirrored-pause:3.10.2) */
|
|
316
|
+
"pause-image"?: string;
|
|
317
|
+
/** (experimental) Prefer bundled userspace binaries over host binaries */
|
|
318
|
+
"prefer-bundled-bin"?: boolean;
|
|
319
|
+
/** (agent/runtime) Private registry configuration file */
|
|
320
|
+
"private-registry"?: string;
|
|
321
|
+
/** (agent/node) Kernel tuning behavior. If set, error if kernel tunables are different than kubelet defaults. */
|
|
322
|
+
"protect-kernel-defaults"?: boolean;
|
|
323
|
+
/** (agent/networking) Kubelet resolv.conf file */
|
|
324
|
+
"resolv-conf"?: string;
|
|
325
|
+
/** (experimental) Run rootless */
|
|
326
|
+
rootless?: boolean;
|
|
327
|
+
/** Enable secret encryption at rest */
|
|
328
|
+
"secrets-encryption"?: boolean;
|
|
329
|
+
/** (experimental) Secret encryption provider (valid values: 'aescbc', 'secretbox') (default: aescbc) */
|
|
330
|
+
"secrets-encryption-provider"?: string;
|
|
331
|
+
/** (agent/node) Enable SELinux in containerd */
|
|
332
|
+
selinux?: boolean;
|
|
333
|
+
/** (cluster) Server to connect to, used to join a cluster */
|
|
334
|
+
server?: string;
|
|
335
|
+
/** (networking) IPv4/IPv6 network CIDRs to use for service IPs (default: 10.43.0.0/16) */
|
|
336
|
+
"service-cidr"?: string | string[];
|
|
337
|
+
/** (networking) Port range to reserve for services with NodePort visibility (default: 30000-32767) */
|
|
338
|
+
"service-node-port-range"?: string;
|
|
339
|
+
/** (networking) Namespace of the pods for the servicelb component (default: kube-system) */
|
|
340
|
+
"servicelb-namespace"?: string;
|
|
341
|
+
/** (agent/runtime) Override default containerd snapshotter */
|
|
342
|
+
snapshotter?: string;
|
|
343
|
+
/** (experimental/components) Enable serving internal metrics on the supervisor port; when enabled agents will also listen on the supervisor port */
|
|
344
|
+
"supervisor-metrics"?: boolean;
|
|
345
|
+
/** (agent/runtime) Private registry to be used for all system images */
|
|
346
|
+
"system-default-registry"?: string;
|
|
347
|
+
/** (listener) Add additional hostnames or IPv4/IPv6 addresses as Subject Alternative Names on the server TLS cert */
|
|
348
|
+
"tls-san"?: string | string[];
|
|
349
|
+
/** (listener) Protect the server TLS cert by refusing to add Subject Alternative Names not associated with the kubernetes apiserver service, server nodes, or values of the tls-san option (default: true) (default: true) */
|
|
350
|
+
"tls-san-security"?: boolean;
|
|
351
|
+
/** (cluster) File containing the token */
|
|
352
|
+
"token-file"?: string;
|
|
353
|
+
/** (logging) Number for the log level verbosity */
|
|
354
|
+
v?: number;
|
|
355
|
+
/** (logging) Comma-separated list of FILE_PATTERN=LOG_LEVEL settings for file-filtered logging */
|
|
356
|
+
vmodule?: string;
|
|
357
|
+
/** (agent/networking) (experimental) Credentials for the VPN provider. It must include the provider name and join key in the format name=<vpn-provider>,joinKey=<key>[,controlServerURL=<url>][,extraArgs=<args>] */
|
|
358
|
+
"vpn-auth"?: string;
|
|
359
|
+
/** (agent/networking) (experimental) File containing credentials for the VPN provider. It must include the provider name and join key in the format name=<vpn-provider>,joinKey=<key>[,controlServerURL=<url>][,extraArgs=<args>] */
|
|
360
|
+
"vpn-auth-file"?: string;
|
|
361
|
+
/** (agent/node) Append id to node name */
|
|
362
|
+
"with-node-id"?: boolean;
|
|
363
|
+
/** (client) Write kubeconfig for admin client to this file */
|
|
364
|
+
"write-kubeconfig"?: string;
|
|
365
|
+
/** (client) Write kubeconfig with this group */
|
|
366
|
+
"write-kubeconfig-group"?: string;
|
|
367
|
+
/** (client) Write kubeconfig with this mode */
|
|
368
|
+
"write-kubeconfig-mode"?: string;
|
|
369
|
+
});
|
|
370
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Code generated by chant generate. DO NOT EDIT.
|
|
2
|
+
import { createResource, createProperty } from "./runtime";
|
|
3
|
+
|
|
4
|
+
export const Agent = createResource("K3s::Agent", "k3s", {});
|
|
5
|
+
export const Registries = createResource("K3s::Registries", "k3s", {});
|
|
6
|
+
export const Server = createResource("K3s::Server", "k3s", {});
|
|
7
|
+
|
|
8
|
+
export const Mirror = createProperty("K3s::Mirror", "k3s");
|
|
9
|
+
export const RegistryAuth = createProperty("K3s::RegistryAuth", "k3s");
|
|
10
|
+
export const RegistryConfig = createProperty("K3s::RegistryConfig", "k3s");
|
|
11
|
+
export const RegistryTLS = createProperty("K3s::RegistryTLS", "k3s");
|
|
12
|
+
|
|
13
|
+
// Re-exports for convenience
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Agent": {
|
|
3
|
+
"resourceType": "K3s::Agent",
|
|
4
|
+
"kind": "resource",
|
|
5
|
+
"lexicon": "k3s"
|
|
6
|
+
},
|
|
7
|
+
"Mirror": {
|
|
8
|
+
"resourceType": "K3s::Mirror",
|
|
9
|
+
"kind": "property",
|
|
10
|
+
"lexicon": "k3s"
|
|
11
|
+
},
|
|
12
|
+
"Registries": {
|
|
13
|
+
"resourceType": "K3s::Registries",
|
|
14
|
+
"kind": "resource",
|
|
15
|
+
"lexicon": "k3s"
|
|
16
|
+
},
|
|
17
|
+
"RegistryAuth": {
|
|
18
|
+
"resourceType": "K3s::RegistryAuth",
|
|
19
|
+
"kind": "property",
|
|
20
|
+
"lexicon": "k3s"
|
|
21
|
+
},
|
|
22
|
+
"RegistryConfig": {
|
|
23
|
+
"resourceType": "K3s::RegistryConfig",
|
|
24
|
+
"kind": "property",
|
|
25
|
+
"lexicon": "k3s"
|
|
26
|
+
},
|
|
27
|
+
"RegistryTLS": {
|
|
28
|
+
"resourceType": "K3s::RegistryTLS",
|
|
29
|
+
"kind": "property",
|
|
30
|
+
"lexicon": "k3s"
|
|
31
|
+
},
|
|
32
|
+
"Server": {
|
|
33
|
+
"resourceType": "K3s::Server",
|
|
34
|
+
"kind": "resource",
|
|
35
|
+
"lexicon": "k3s"
|
|
36
|
+
}
|
|
37
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Plugin
|
|
2
|
+
export { k3sPlugin } from "./plugin";
|
|
3
|
+
|
|
4
|
+
// Serializer
|
|
5
|
+
export { k3sSerializer } from "./serializer";
|
|
6
|
+
|
|
7
|
+
// Generated resources — export everything from generated index
|
|
8
|
+
export * from "./generated/index";
|
|
9
|
+
|
|
10
|
+
// The pinned upstream release and its Docker image tag form
|
|
11
|
+
export { K3S_VERSION, K3S_IMAGE_TAG } from "./spec/fetch";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The k3s lexicon's chant audit catalog — metadata for its post-synth
|
|
3
|
+
* checks, contributed via k3sPlugin.auditCatalog() (#687, #1346). Every
|
|
4
|
+
* post-synth check has an entry, or the check contributes nothing to
|
|
5
|
+
* `chant audit`, silently.
|
|
6
|
+
*
|
|
7
|
+
* All five checks read the chant model (`ctx.entities`) rather than the
|
|
8
|
+
* emitted YAML — an emitted config.yaml carries no marker naming its own
|
|
9
|
+
* role — so every entry is constructed directly with `yamlBased: false`.
|
|
10
|
+
*/
|
|
11
|
+
import type { RuleMeta } from "@intentius/chant/audit/catalog";
|
|
12
|
+
|
|
13
|
+
function entityRule(
|
|
14
|
+
id: string,
|
|
15
|
+
category: RuleMeta["category"],
|
|
16
|
+
title: string,
|
|
17
|
+
remediation: string,
|
|
18
|
+
): RuleMeta {
|
|
19
|
+
return { id, tier: "merge-worthy", fixKind: "guidance", category, title, remediation, yamlBased: false };
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const k3sAuditCatalog: Record<string, RuleMeta> = {
|
|
23
|
+
K3S101: entityRule(
|
|
24
|
+
"K3S101",
|
|
25
|
+
"security",
|
|
26
|
+
"Literal join token in a k3s config",
|
|
27
|
+
"Remove the `token` value; point `token-file` at a path on the host instead.",
|
|
28
|
+
),
|
|
29
|
+
K3S102: entityRule(
|
|
30
|
+
"K3S102",
|
|
31
|
+
"security",
|
|
32
|
+
"Literal registry credential in registries.yaml",
|
|
33
|
+
"Remove the credential from the declaration; configure registry auth on the host.",
|
|
34
|
+
),
|
|
35
|
+
K3S103: entityRule(
|
|
36
|
+
"K3S103",
|
|
37
|
+
"correctness",
|
|
38
|
+
"Agent config with no server to join",
|
|
39
|
+
"Set `server: https://<server-host>:6443` on the agent declaration.",
|
|
40
|
+
),
|
|
41
|
+
K3S104: entityRule(
|
|
42
|
+
"K3S104",
|
|
43
|
+
"security",
|
|
44
|
+
"Kubeconfig written wider than 0644",
|
|
45
|
+
"Drop `write-kubeconfig-mode`, or keep it at 0600/0644.",
|
|
46
|
+
),
|
|
47
|
+
K3S105: entityRule(
|
|
48
|
+
"K3S105",
|
|
49
|
+
"security",
|
|
50
|
+
"Registry TLS verification disabled",
|
|
51
|
+
"Remove `insecure_skip_verify`; pin the registry CA via `ca_file`.",
|
|
52
|
+
),
|
|
53
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Code generated by chant generate. DO NOT EDIT.
|
|
2
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
3
|
+
import { k3s101 } from "./k3s101";
|
|
4
|
+
import { k3s102 } from "./k3s102";
|
|
5
|
+
import { k3s103 } from "./k3s103";
|
|
6
|
+
import { k3s104 } from "./k3s104";
|
|
7
|
+
import { k3s105 } from "./k3s105";
|
|
8
|
+
|
|
9
|
+
export const postSynthChecks: PostSynthCheck[] = [
|
|
10
|
+
k3s101,
|
|
11
|
+
k3s102,
|
|
12
|
+
k3s103,
|
|
13
|
+
k3s104,
|
|
14
|
+
k3s105,
|
|
15
|
+
];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared helpers for the k3s post-synth checks.
|
|
3
|
+
*
|
|
4
|
+
* These checks read the chant model (`ctx.entities`), not the emitted
|
|
5
|
+
* YAML: an emitted config.yaml carries no marker naming its own role, so
|
|
6
|
+
* the entity type is the only honest way to know a document is a server
|
|
7
|
+
* config, an agent config, or a registries file. The audit catalog marks
|
|
8
|
+
* every entity-based check `yamlBased: false` accordingly.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type { PostSynthContext } from "@intentius/chant/lint/post-synth";
|
|
12
|
+
|
|
13
|
+
export interface K3sEntity {
|
|
14
|
+
name: string;
|
|
15
|
+
entityType: string;
|
|
16
|
+
props: Record<string, unknown>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Every declared k3s entity of one type, with its props. */
|
|
20
|
+
export function entitiesOfType(ctx: PostSynthContext, entityType: string): K3sEntity[] {
|
|
21
|
+
const out: K3sEntity[] = [];
|
|
22
|
+
for (const [name, entity] of ctx.entities) {
|
|
23
|
+
const e = entity as { entityType?: string; props?: unknown };
|
|
24
|
+
if (e.entityType !== entityType) continue;
|
|
25
|
+
const props =
|
|
26
|
+
typeof e.props === "object" && e.props !== null ? (e.props as Record<string, unknown>) : {};
|
|
27
|
+
out.push({ name, entityType, props });
|
|
28
|
+
}
|
|
29
|
+
return out;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function configEntities(ctx: PostSynthContext): K3sEntity[] {
|
|
33
|
+
return [...entitiesOfType(ctx, "K3s::Server"), ...entitiesOfType(ctx, "K3s::Agent")];
|
|
34
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* K3S101: a literal join token reached the build.
|
|
3
|
+
*
|
|
4
|
+
* The typed surface omits `token` / `agent-token` (#1601) and K3S001
|
|
5
|
+
* catches the literal at source. This is the backstop for the path both
|
|
6
|
+
* miss: a raw prop object built at runtime, spread in, or emitted by a
|
|
7
|
+
* composite. If the key is present with a non-empty string value in the
|
|
8
|
+
* entity the build serialized, the emitted config.yaml carries the
|
|
9
|
+
* cluster's join secret, and the build fails.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import type {
|
|
13
|
+
PostSynthCheck,
|
|
14
|
+
PostSynthContext,
|
|
15
|
+
PostSynthDiagnostic,
|
|
16
|
+
} from "@intentius/chant/lint/post-synth";
|
|
17
|
+
import { configEntities } from "./k3s-helpers";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* `token`/`agent-token`/`cluster-secret` are the join secret. The etcd S3
|
|
21
|
+
* pair are snapshot-store credentials the flag surface types as plain
|
|
22
|
+
* strings — k3s's own docs point at `etcd-s3-config-secret` (a Secret on
|
|
23
|
+
* the cluster) for exactly this reason.
|
|
24
|
+
*/
|
|
25
|
+
const SECRET_KEYS = [
|
|
26
|
+
"token",
|
|
27
|
+
"agent-token",
|
|
28
|
+
"cluster-secret",
|
|
29
|
+
"etcd-s3-secret-key",
|
|
30
|
+
"etcd-s3-session-token",
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
export const k3s101: PostSynthCheck = {
|
|
34
|
+
id: "K3S101",
|
|
35
|
+
description: "A k3s config entity carries a literal join token",
|
|
36
|
+
|
|
37
|
+
check(ctx: PostSynthContext): PostSynthDiagnostic[] {
|
|
38
|
+
const diagnostics: PostSynthDiagnostic[] = [];
|
|
39
|
+
for (const entity of configEntities(ctx)) {
|
|
40
|
+
for (const key of SECRET_KEYS) {
|
|
41
|
+
const value = entity.props[key];
|
|
42
|
+
if (typeof value === "string" && value.length > 0) {
|
|
43
|
+
diagnostics.push({
|
|
44
|
+
checkId: "K3S101",
|
|
45
|
+
severity: "error",
|
|
46
|
+
message:
|
|
47
|
+
`"${entity.name}" carries a literal \`${key}\` — the emitted config.yaml would ` +
|
|
48
|
+
"contain the secret. Use the file/Secret reference form instead " +
|
|
49
|
+
"(`token-file`, `etcd-s3-config-secret`).",
|
|
50
|
+
entity: entity.name,
|
|
51
|
+
lexicon: "k3s",
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return diagnostics;
|
|
57
|
+
},
|
|
58
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* K3S102: registry credentials as literals.
|
|
3
|
+
*
|
|
4
|
+
* registries.yaml supports inline `auth.password` / `auth.token`, and a
|
|
5
|
+
* committed estate that uses them has published its registry credentials.
|
|
6
|
+
* The TLS file paths beside them are host paths — those are fine; it is
|
|
7
|
+
* the credential values that must come from somewhere else.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type {
|
|
11
|
+
PostSynthCheck,
|
|
12
|
+
PostSynthContext,
|
|
13
|
+
PostSynthDiagnostic,
|
|
14
|
+
} from "@intentius/chant/lint/post-synth";
|
|
15
|
+
import { entitiesOfType } from "./k3s-helpers";
|
|
16
|
+
|
|
17
|
+
export const k3s102: PostSynthCheck = {
|
|
18
|
+
id: "K3S102",
|
|
19
|
+
description: "registries.yaml carries a literal registry credential",
|
|
20
|
+
|
|
21
|
+
check(ctx: PostSynthContext): PostSynthDiagnostic[] {
|
|
22
|
+
const diagnostics: PostSynthDiagnostic[] = [];
|
|
23
|
+
for (const entity of entitiesOfType(ctx, "K3s::Registries")) {
|
|
24
|
+
const configs = entity.props.configs;
|
|
25
|
+
if (typeof configs !== "object" || configs === null) continue;
|
|
26
|
+
for (const [registry, config] of Object.entries(configs as Record<string, unknown>)) {
|
|
27
|
+
const auth = resolveProps(config)?.auth;
|
|
28
|
+
const authProps = resolveProps(auth);
|
|
29
|
+
if (!authProps) continue;
|
|
30
|
+
for (const key of ["password", "token"]) {
|
|
31
|
+
const value = authProps[key];
|
|
32
|
+
if (typeof value === "string" && value.length > 0) {
|
|
33
|
+
diagnostics.push({
|
|
34
|
+
checkId: "K3S102",
|
|
35
|
+
severity: "error",
|
|
36
|
+
message:
|
|
37
|
+
`"${entity.name}" carries a literal \`${key}\` for registry "${registry}" — ` +
|
|
38
|
+
"a committed registries.yaml is a leaked credential. Configure registry auth " +
|
|
39
|
+
"on the host outside the declaration.",
|
|
40
|
+
entity: entity.name,
|
|
41
|
+
lexicon: "k3s",
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return diagnostics;
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/** A nested value may be a plain object or a property declarable carrying props. */
|
|
52
|
+
function resolveProps(value: unknown): Record<string, unknown> | undefined {
|
|
53
|
+
if (typeof value !== "object" || value === null) return undefined;
|
|
54
|
+
const obj = value as Record<string, unknown>;
|
|
55
|
+
if (typeof obj.props === "object" && obj.props !== null && "entityType" in obj) {
|
|
56
|
+
return obj.props as Record<string, unknown>;
|
|
57
|
+
}
|
|
58
|
+
return obj;
|
|
59
|
+
}
|