alchemy-kubernetes-addons 0.1.0-alpha.0
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/LICENSE +17 -0
- package/README.md +327 -0
- package/dist/index.d.mts +527 -0
- package/dist/index.mjs +1600 -0
- package/package.json +53 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
import { Input, Resource, Stack, Stage } from "alchemy";
|
|
2
|
+
import * as Output from "alchemy/Output";
|
|
3
|
+
import * as Provider from "alchemy/Provider";
|
|
4
|
+
import * as Kubernetes from "alchemy/Kubernetes";
|
|
5
|
+
import * as Effect from "effect/Effect";
|
|
6
|
+
import * as Layer from "effect/Layer";
|
|
7
|
+
import * as Redacted from "effect/Redacted";
|
|
8
|
+
import * as Cloudflare from "alchemy/Cloudflare";
|
|
9
|
+
import * as Telemetry from "alchemy/Telemetry";
|
|
10
|
+
import { S3BucketAccess } from "alchemy-s3-access";
|
|
11
|
+
//#region src/client.d.ts
|
|
12
|
+
interface KubernetesObjectRef {
|
|
13
|
+
apiVersion: string;
|
|
14
|
+
kind: string;
|
|
15
|
+
name: string;
|
|
16
|
+
namespace?: string;
|
|
17
|
+
}
|
|
18
|
+
interface KubernetesObjectReadiness {
|
|
19
|
+
ready: boolean;
|
|
20
|
+
terminal: boolean;
|
|
21
|
+
detail: string;
|
|
22
|
+
}
|
|
23
|
+
declare const kubernetesObjectReadiness: (object: unknown) => KubernetesObjectReadiness;
|
|
24
|
+
declare class KubernetesReadinessError extends Error {
|
|
25
|
+
readonly object: KubernetesObjectRef;
|
|
26
|
+
readonly timedOut: boolean;
|
|
27
|
+
readonly name = "KubernetesReadinessError";
|
|
28
|
+
constructor(message: string, object: KubernetesObjectRef, timedOut: boolean);
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/cloudflare-external-dns.d.ts
|
|
32
|
+
declare const EXTERNAL_DNS_CHART_VERSION = "1.21.1";
|
|
33
|
+
declare const EXTERNAL_DNS_IMAGE = "registry.k8s.io/external-dns/external-dns:v0.21.0@sha256:f53faaf71cb270d1ca9dce6ea0c94bfebf1a18696263487f0fbc74b9bf2bd7ff";
|
|
34
|
+
interface CloudflareExternalDnsProps {
|
|
35
|
+
cluster: Input<Kubernetes.ClusterLike>;
|
|
36
|
+
zone: Cloudflare.Zone.Zone;
|
|
37
|
+
policy: "sync" | "upsert-only";
|
|
38
|
+
proxied?: boolean;
|
|
39
|
+
token?: Input<Redacted.Redacted<string>>;
|
|
40
|
+
/** Optional non-secret revision for externally managed tokens. */
|
|
41
|
+
tokenRevision?: Input<string>;
|
|
42
|
+
namespace?: string;
|
|
43
|
+
releaseName?: string;
|
|
44
|
+
timeoutSeconds?: number;
|
|
45
|
+
}
|
|
46
|
+
interface CloudflareExternalDnsResult {
|
|
47
|
+
zone: Cloudflare.Zone.Zone;
|
|
48
|
+
zoneId: Input<string>;
|
|
49
|
+
domain: Input<string>;
|
|
50
|
+
namespace: string;
|
|
51
|
+
releaseName: string;
|
|
52
|
+
txtOwnerId: string;
|
|
53
|
+
tokenManaged: boolean;
|
|
54
|
+
}
|
|
55
|
+
interface CloudflareExternalDnsPlanProps {
|
|
56
|
+
zoneId: Input<string>;
|
|
57
|
+
domain: Input<string>;
|
|
58
|
+
policy: "sync" | "upsert-only";
|
|
59
|
+
proxied: boolean;
|
|
60
|
+
releaseName: string;
|
|
61
|
+
txtOwnerId: string;
|
|
62
|
+
secretName: string;
|
|
63
|
+
namespaceRevision: Input<string>;
|
|
64
|
+
secretRevision: Input<string>;
|
|
65
|
+
tokenRevision?: Input<string> | undefined;
|
|
66
|
+
}
|
|
67
|
+
interface CloudflareExternalDnsPlan {
|
|
68
|
+
values: Record<string, unknown>;
|
|
69
|
+
}
|
|
70
|
+
declare const planCloudflareExternalDns: ({ zoneId, domain, policy, proxied, releaseName, txtOwnerId, secretName, namespaceRevision, secretRevision, tokenRevision }: CloudflareExternalDnsPlanProps) => CloudflareExternalDnsPlan;
|
|
71
|
+
/** Install a zone-scoped Cloudflare ExternalDNS controller. */
|
|
72
|
+
declare const CloudflareExternalDns: (id: string, props: CloudflareExternalDnsProps) => Effect.Effect<{
|
|
73
|
+
zone: Cloudflare.Zone.Zone;
|
|
74
|
+
zoneId: Output.Output<string, never>;
|
|
75
|
+
domain: Output.Output<string, never>;
|
|
76
|
+
namespace: string;
|
|
77
|
+
releaseName: string;
|
|
78
|
+
txtOwnerId: string;
|
|
79
|
+
tokenManaged: boolean;
|
|
80
|
+
}, import("effect/Cause").UnknownError, Providers | Stack | Stage | Kubernetes.Providers | Cloudflare.Providers>;
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region src/cert-manager.d.ts
|
|
83
|
+
declare const CERT_MANAGER_CHART = "oci://quay.io/jetstack/charts/cert-manager";
|
|
84
|
+
declare const CERT_MANAGER_CHART_VERSION = "v1.21.1";
|
|
85
|
+
declare const CERT_MANAGER_IMAGE_VERSION = "v1.21.1";
|
|
86
|
+
interface CertManagerProps {
|
|
87
|
+
cluster: Input<Kubernetes.ClusterLike>;
|
|
88
|
+
namespace?: string;
|
|
89
|
+
releaseName?: string;
|
|
90
|
+
timeoutSeconds?: number;
|
|
91
|
+
}
|
|
92
|
+
interface CertManagerResult {
|
|
93
|
+
namespace: Input<string>;
|
|
94
|
+
clusterResourceNamespace: Input<string>;
|
|
95
|
+
releaseName: string;
|
|
96
|
+
chart: Kubernetes.HelmChart;
|
|
97
|
+
readiness: Readiness;
|
|
98
|
+
}
|
|
99
|
+
declare const validateCertManagerProps: (props: CertManagerProps) => void;
|
|
100
|
+
declare const certManagerHelmValues: (namespace: string, namespaceRevision: Input<string>) => Record<string, unknown>;
|
|
101
|
+
/** Install cert-manager and wait for its CRDs and control plane. */
|
|
102
|
+
declare const CertManager: (id: string, props: CertManagerProps) => Effect.Effect<{
|
|
103
|
+
namespace: Output.Output<string, never>;
|
|
104
|
+
clusterResourceNamespace: Output.Output<string, never>;
|
|
105
|
+
releaseName: string;
|
|
106
|
+
chart: Kubernetes.HelmChart;
|
|
107
|
+
readiness: Readiness;
|
|
108
|
+
}, import("effect/Cause").UnknownError, Providers | Kubernetes.Providers>;
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region src/cloudflare-acme-issuer.d.ts
|
|
111
|
+
declare const LETSENCRYPT_STAGING_URL = "https://acme-staging-v02.api.letsencrypt.org/directory";
|
|
112
|
+
declare const LETSENCRYPT_PRODUCTION_URL = "https://acme-v02.api.letsencrypt.org/directory";
|
|
113
|
+
interface CloudflareAcmeIssuerProps {
|
|
114
|
+
cluster: Input<Kubernetes.ClusterLike>;
|
|
115
|
+
certManager: CertManagerResult;
|
|
116
|
+
zone: Cloudflare.Zone.Zone;
|
|
117
|
+
email: string;
|
|
118
|
+
environment: "staging" | "production";
|
|
119
|
+
token?: Input<Redacted.Redacted<string>>;
|
|
120
|
+
name?: string;
|
|
121
|
+
timeoutSeconds?: number;
|
|
122
|
+
}
|
|
123
|
+
interface CloudflareAcmeIssuerResult {
|
|
124
|
+
name: Input<string>;
|
|
125
|
+
issuerRef: {
|
|
126
|
+
name: Input<string>;
|
|
127
|
+
kind: "ClusterIssuer";
|
|
128
|
+
group: "cert-manager.io";
|
|
129
|
+
};
|
|
130
|
+
environment: "staging" | "production";
|
|
131
|
+
tokenManaged: boolean;
|
|
132
|
+
tokenSecretName: string;
|
|
133
|
+
accountKeySecretName: string;
|
|
134
|
+
readiness: Readiness;
|
|
135
|
+
}
|
|
136
|
+
interface CloudflareAcmeIssuerManifestProps {
|
|
137
|
+
name: string;
|
|
138
|
+
email: string;
|
|
139
|
+
environment: "staging" | "production";
|
|
140
|
+
domain: Input<string>;
|
|
141
|
+
tokenSecretName: string;
|
|
142
|
+
accountKeySecretName: string;
|
|
143
|
+
certManagerRevision: Input<string>;
|
|
144
|
+
tokenSecretRevision: Input<string>;
|
|
145
|
+
}
|
|
146
|
+
declare const cloudflareAcmeIssuerName: (id: string, environment: "staging" | "production") => string;
|
|
147
|
+
declare const cloudflareAcmeIssuerTokenPolicies: (zoneId: string) => Cloudflare.ApiToken.Policy[];
|
|
148
|
+
declare const validateCloudflareAcmeIssuerProps: (props: CloudflareAcmeIssuerProps) => void;
|
|
149
|
+
declare const cloudflareAcmeIssuerManifest: ({ name, email, environment, domain, tokenSecretName, accountKeySecretName, certManagerRevision, tokenSecretRevision }: CloudflareAcmeIssuerManifestProps) => {
|
|
150
|
+
apiVersion: string;
|
|
151
|
+
kind: string;
|
|
152
|
+
metadata: {
|
|
153
|
+
name: string;
|
|
154
|
+
annotations: {
|
|
155
|
+
"alchemy.run/cert-manager-revision": Input<string>;
|
|
156
|
+
"alchemy.run/token-secret-revision": Input<string>;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
spec: {
|
|
160
|
+
acme: {
|
|
161
|
+
email: string;
|
|
162
|
+
server: string;
|
|
163
|
+
privateKeySecretRef: {
|
|
164
|
+
name: string;
|
|
165
|
+
};
|
|
166
|
+
solvers: {
|
|
167
|
+
selector: {
|
|
168
|
+
dnsZones: Input<string>[];
|
|
169
|
+
};
|
|
170
|
+
dns01: {
|
|
171
|
+
cloudflare: {
|
|
172
|
+
apiTokenSecretRef: {
|
|
173
|
+
name: string;
|
|
174
|
+
key: string;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
}[];
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
/** Create a zone-scoped Cloudflare DNS-01 ClusterIssuer. */
|
|
183
|
+
declare const CloudflareAcmeIssuer: (id: string, props: CloudflareAcmeIssuerProps) => Effect.Effect<{
|
|
184
|
+
name: Output.Output<string, never>;
|
|
185
|
+
issuerRef: {
|
|
186
|
+
name: Output.Output<string, never>;
|
|
187
|
+
kind: "ClusterIssuer";
|
|
188
|
+
group: "cert-manager.io";
|
|
189
|
+
};
|
|
190
|
+
environment: "staging" | "production";
|
|
191
|
+
tokenManaged: boolean;
|
|
192
|
+
tokenSecretName: string;
|
|
193
|
+
accountKeySecretName: string;
|
|
194
|
+
readiness: Readiness;
|
|
195
|
+
}, import("effect/Cause").UnknownError, Providers | Kubernetes.Providers | Cloudflare.Providers>;
|
|
196
|
+
//#endregion
|
|
197
|
+
//#region src/otel-collector.d.ts
|
|
198
|
+
declare const OTEL_COLLECTOR_CHART_VERSION = "0.171.0";
|
|
199
|
+
declare const OTEL_COLLECTOR_IMAGE = "otel/opentelemetry-collector-contrib@sha256:c5918f78992ee73b0d6f0e599423ac5ec52dd5d9726733114d6eca53d5a32ed5";
|
|
200
|
+
type OtelSignal = "traces" | "logs" | "metrics";
|
|
201
|
+
interface OtelCollectorBasicAuthSecretRef {
|
|
202
|
+
namespace: string;
|
|
203
|
+
name: string;
|
|
204
|
+
usernameKey: string;
|
|
205
|
+
passwordKey: string;
|
|
206
|
+
/** Changes to this non-secret value force pods to reload Secret-backed env. */
|
|
207
|
+
resourceVersion: Input<string | undefined>;
|
|
208
|
+
}
|
|
209
|
+
interface OtelCollectorDestination {
|
|
210
|
+
endpoints: Telemetry.OtlpOptions;
|
|
211
|
+
encoding?: "json" | "proto";
|
|
212
|
+
authentication?: {
|
|
213
|
+
type: "basic";
|
|
214
|
+
secretRef: OtelCollectorBasicAuthSecretRef;
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
interface OtelCollectorProps {
|
|
218
|
+
cluster: Input<Kubernetes.ClusterLike>;
|
|
219
|
+
destination: OtelCollectorDestination;
|
|
220
|
+
namespace?: string;
|
|
221
|
+
releaseName?: string;
|
|
222
|
+
/** Own a new namespace. Defaults off when authentication references a Secret. */
|
|
223
|
+
createNamespace?: boolean;
|
|
224
|
+
timeoutSeconds?: number;
|
|
225
|
+
}
|
|
226
|
+
interface OtelCollectorResult {
|
|
227
|
+
namespace: string;
|
|
228
|
+
releaseName: string;
|
|
229
|
+
serviceName: string;
|
|
230
|
+
signals: OtelSignal[];
|
|
231
|
+
otelEndpoint: string;
|
|
232
|
+
otelTracesEndpoint: string;
|
|
233
|
+
otelLogsEndpoint: string;
|
|
234
|
+
otelMetricsEndpoint: string;
|
|
235
|
+
otlp: Telemetry.OtlpOptions;
|
|
236
|
+
}
|
|
237
|
+
interface OtelCollectorPlanProps {
|
|
238
|
+
releaseName: string;
|
|
239
|
+
destination: OtelCollectorDestination;
|
|
240
|
+
namespaceRevision: Input<string>;
|
|
241
|
+
headerSecretName: string;
|
|
242
|
+
headerSecretRevision?: Input<string> | undefined;
|
|
243
|
+
basicSecretRevision?: Input<string | undefined> | undefined;
|
|
244
|
+
}
|
|
245
|
+
interface OtelCollectorPlan {
|
|
246
|
+
signals: OtelSignal[];
|
|
247
|
+
headerSecretData: Record<string, string | Redacted.Redacted<string> | Input<string | Redacted.Redacted<string>>>;
|
|
248
|
+
values: Record<string, unknown>;
|
|
249
|
+
}
|
|
250
|
+
declare const planOtelCollector: ({ releaseName, destination, namespaceRevision, headerSecretName, headerSecretRevision, basicSecretRevision }: OtelCollectorPlanProps) => OtelCollectorPlan;
|
|
251
|
+
/** Deploy a minimal OTLP/HTTP gateway for one downstream destination. */
|
|
252
|
+
declare const OtelCollector: (id: string, props: OtelCollectorProps) => Effect.Effect<{
|
|
253
|
+
otelEndpoint: string;
|
|
254
|
+
otelTracesEndpoint: string;
|
|
255
|
+
otelLogsEndpoint: string;
|
|
256
|
+
otelMetricsEndpoint: string;
|
|
257
|
+
otlp: Telemetry.OtlpOptions;
|
|
258
|
+
namespace: string;
|
|
259
|
+
releaseName: string;
|
|
260
|
+
serviceName: string;
|
|
261
|
+
signals: OtelSignal[];
|
|
262
|
+
}, import("effect/Cause").UnknownError, Providers | Kubernetes.Providers>;
|
|
263
|
+
//#endregion
|
|
264
|
+
//#region src/parseable.d.ts
|
|
265
|
+
declare const PARSEABLE_CHART_VERSION = "3.2.1";
|
|
266
|
+
declare const PARSEABLE_IMAGE = "quay.io/parseablehq/parseable:v3.1.0";
|
|
267
|
+
interface ParseableStagingProps {
|
|
268
|
+
/** Persistent staging space for acknowledged data waiting to reach S3. */
|
|
269
|
+
size?: string;
|
|
270
|
+
storageClass?: string;
|
|
271
|
+
}
|
|
272
|
+
interface ParseableIngressProps {
|
|
273
|
+
host: string;
|
|
274
|
+
/** Existing ingress class. The add-on does not install an ingress controller. */
|
|
275
|
+
className?: string;
|
|
276
|
+
/** Existing TLS Secret, normally issued by cert-manager. */
|
|
277
|
+
tlsSecretName?: string;
|
|
278
|
+
}
|
|
279
|
+
interface ParseableProps {
|
|
280
|
+
cluster: Input<Kubernetes.ClusterLike>;
|
|
281
|
+
storage: S3BucketAccess;
|
|
282
|
+
namespace?: string;
|
|
283
|
+
releaseName?: string;
|
|
284
|
+
admin?: {
|
|
285
|
+
username?: string;
|
|
286
|
+
password?: Redacted.Redacted<string>;
|
|
287
|
+
};
|
|
288
|
+
staging?: ParseableStagingProps;
|
|
289
|
+
streams?: {
|
|
290
|
+
logs?: string;
|
|
291
|
+
traces?: string;
|
|
292
|
+
metrics?: string;
|
|
293
|
+
};
|
|
294
|
+
ingress?: ParseableIngressProps;
|
|
295
|
+
timeoutSeconds?: number;
|
|
296
|
+
}
|
|
297
|
+
/** Axiom-shaped endpoint names for standard OTEL environment variables. */
|
|
298
|
+
interface ParseableOtlpEndpoints {
|
|
299
|
+
otelEndpoint: string;
|
|
300
|
+
otelTracesEndpoint: string;
|
|
301
|
+
otelLogsEndpoint: string;
|
|
302
|
+
otelMetricsEndpoint: string;
|
|
303
|
+
}
|
|
304
|
+
interface ParseableResult extends ParseableOtlpEndpoints {
|
|
305
|
+
namespace: string;
|
|
306
|
+
releaseName: string;
|
|
307
|
+
serviceName: string;
|
|
308
|
+
streams: {
|
|
309
|
+
logs: string;
|
|
310
|
+
traces: string;
|
|
311
|
+
metrics: string;
|
|
312
|
+
};
|
|
313
|
+
internalUrl: string;
|
|
314
|
+
uiUrl: string;
|
|
315
|
+
admin: {
|
|
316
|
+
username: string;
|
|
317
|
+
password: Input<Redacted.Redacted<string>>;
|
|
318
|
+
};
|
|
319
|
+
credentialsSecretRef: {
|
|
320
|
+
namespace: string;
|
|
321
|
+
name: string;
|
|
322
|
+
usernameKey: "username";
|
|
323
|
+
passwordKey: "password";
|
|
324
|
+
resourceVersion: Input<string | undefined>;
|
|
325
|
+
};
|
|
326
|
+
/** Endpoint-only OTLP shape. Authentication is mounted from the Secret by the collector. */
|
|
327
|
+
endpoints: Pick<Telemetry.OtlpOptions, "url" | "traces" | "logs" | "metrics">;
|
|
328
|
+
ingress?: {
|
|
329
|
+
host: string;
|
|
330
|
+
url: string;
|
|
331
|
+
tls: boolean;
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
interface ParseableHelmValuesProps {
|
|
335
|
+
releaseName: string;
|
|
336
|
+
secretName: Input<string>;
|
|
337
|
+
secretResourceVersion: Input<string>;
|
|
338
|
+
forcePathStyle?: boolean | undefined;
|
|
339
|
+
staging: ParseableStagingProps;
|
|
340
|
+
}
|
|
341
|
+
declare const parseableHelmValues: ({ releaseName, secretName, secretResourceVersion, forcePathStyle, staging }: ParseableHelmValuesProps) => Record<string, unknown>;
|
|
342
|
+
/** Deploy Parseable OSS with S3 durability and its bundled web UI. */
|
|
343
|
+
declare const Parseable: (id: string, props: ParseableProps) => Effect.Effect<{
|
|
344
|
+
ingress?: {
|
|
345
|
+
host: string;
|
|
346
|
+
url: string;
|
|
347
|
+
tls: boolean;
|
|
348
|
+
};
|
|
349
|
+
namespace: string;
|
|
350
|
+
releaseName: string;
|
|
351
|
+
serviceName: string;
|
|
352
|
+
streams: {
|
|
353
|
+
logs: string;
|
|
354
|
+
traces: string;
|
|
355
|
+
metrics: string;
|
|
356
|
+
};
|
|
357
|
+
internalUrl: string;
|
|
358
|
+
uiUrl: string;
|
|
359
|
+
otelEndpoint: string;
|
|
360
|
+
otelTracesEndpoint: string;
|
|
361
|
+
otelLogsEndpoint: string;
|
|
362
|
+
otelMetricsEndpoint: string;
|
|
363
|
+
admin: {
|
|
364
|
+
username: string;
|
|
365
|
+
password: Redacted.Redacted<string> | Output.ObjectExpr<Redacted.Redacted<string>, never>;
|
|
366
|
+
};
|
|
367
|
+
credentialsSecretRef: {
|
|
368
|
+
namespace: string;
|
|
369
|
+
name: string;
|
|
370
|
+
usernameKey: "username";
|
|
371
|
+
passwordKey: "password";
|
|
372
|
+
resourceVersion: Output.Output<string | undefined, never>;
|
|
373
|
+
};
|
|
374
|
+
endpoints: Pick<Telemetry.OtlpOptions, "logs" | "url" | "traces" | "metrics">;
|
|
375
|
+
}, import("effect/Cause").UnknownError, Providers | Kubernetes.Providers | import("alchemy").Provider<import("alchemy").Random>>;
|
|
376
|
+
//#endregion
|
|
377
|
+
//#region src/container-registry.d.ts
|
|
378
|
+
declare const CONTAINER_REGISTRY_CHART = "oci://ghcr.io/project-zot/helm-charts/zot";
|
|
379
|
+
declare const CONTAINER_REGISTRY_CHART_VERSION = "0.1.122";
|
|
380
|
+
declare const CONTAINER_REGISTRY_IMAGE = "ghcr.io/project-zot/zot-minimal:v2.1.20@sha256:73f26433b341f4a319963f7c5e169858663a10565e4037e71605737daee202ee";
|
|
381
|
+
interface ContainerRegistryIngressProps {
|
|
382
|
+
host: string;
|
|
383
|
+
/** Existing IngressClass. The add-on does not install an ingress controller. */
|
|
384
|
+
className?: string;
|
|
385
|
+
/** TLS Secret in the registry namespace. The add-on does not issue it. */
|
|
386
|
+
tlsSecretName: string;
|
|
387
|
+
annotations?: Record<string, string>;
|
|
388
|
+
}
|
|
389
|
+
interface ContainerRegistryGarbageCollectionProps {
|
|
390
|
+
/** Zot/Go duration. @default "24h" */
|
|
391
|
+
interval?: string;
|
|
392
|
+
/** Minimum age before unreferenced content is collected. @default "24h" */
|
|
393
|
+
delay?: string;
|
|
394
|
+
/** Daily UTC start window in HH:MM-HH:MM form. @default "02:00-04:00" */
|
|
395
|
+
timeWindowUtc?: string;
|
|
396
|
+
}
|
|
397
|
+
interface ContainerRegistryPullSecretsProps {
|
|
398
|
+
/** Pre-existing application namespaces that receive Docker pull credentials. */
|
|
399
|
+
namespaces: string[];
|
|
400
|
+
/** @default `${releaseName}-pull` */
|
|
401
|
+
name?: string;
|
|
402
|
+
}
|
|
403
|
+
interface ContainerRegistryProps {
|
|
404
|
+
cluster: Input<Kubernetes.ClusterLike>;
|
|
405
|
+
storage: S3BucketAccess;
|
|
406
|
+
ingress: ContainerRegistryIngressProps;
|
|
407
|
+
namespace?: string;
|
|
408
|
+
releaseName?: string;
|
|
409
|
+
/** Own the registry namespace. Disable when another resource owns it. @default true */
|
|
410
|
+
createNamespace?: boolean;
|
|
411
|
+
/** Relative prefix reserved for registry objects in the supplied bucket. @default "registry" */
|
|
412
|
+
storagePrefix?: string;
|
|
413
|
+
credentials?: {
|
|
414
|
+
username?: string;
|
|
415
|
+
password?: Redacted.Redacted<string>;
|
|
416
|
+
};
|
|
417
|
+
pullSecrets?: ContainerRegistryPullSecretsProps;
|
|
418
|
+
garbageCollection?: ContainerRegistryGarbageCollectionProps;
|
|
419
|
+
timeoutSeconds?: number;
|
|
420
|
+
}
|
|
421
|
+
interface ContainerRegistryPullSecretRef {
|
|
422
|
+
namespace: string;
|
|
423
|
+
name: string;
|
|
424
|
+
resourceVersion: Input<string | undefined>;
|
|
425
|
+
}
|
|
426
|
+
interface ContainerRegistryResult {
|
|
427
|
+
namespace: string;
|
|
428
|
+
releaseName: string;
|
|
429
|
+
serviceName: string;
|
|
430
|
+
host: string;
|
|
431
|
+
url: string;
|
|
432
|
+
imagePrefix: string;
|
|
433
|
+
internalUrl: string;
|
|
434
|
+
credentials: {
|
|
435
|
+
username: string;
|
|
436
|
+
password: Input<Redacted.Redacted<string>>;
|
|
437
|
+
};
|
|
438
|
+
pullSecretRefs: ContainerRegistryPullSecretRef[];
|
|
439
|
+
ingress: {
|
|
440
|
+
host: string;
|
|
441
|
+
url: string;
|
|
442
|
+
tls: true;
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
interface ContainerRegistryHelmValuesProps {
|
|
446
|
+
releaseName: string;
|
|
447
|
+
storage: Pick<S3BucketAccess, "endpoint" | "region" | "bucket" | "forcePathStyle" | "sessionToken">;
|
|
448
|
+
storagePrefix: string;
|
|
449
|
+
storageSecretName: string;
|
|
450
|
+
storageSecretRevision: Input<string>;
|
|
451
|
+
authSecretName: string;
|
|
452
|
+
authSecretRevision: Input<string>;
|
|
453
|
+
namespaceRevision: Input<string>;
|
|
454
|
+
ingress: ContainerRegistryIngressProps;
|
|
455
|
+
username: string;
|
|
456
|
+
garbageCollection: Required<ContainerRegistryGarbageCollectionProps>;
|
|
457
|
+
}
|
|
458
|
+
declare const validateContainerRegistryProps: (props: ContainerRegistryProps) => void;
|
|
459
|
+
declare const containerRegistryHtpasswd: (username: string, password: Redacted.Redacted<string>, saltSeed: Redacted.Redacted<string>) => Redacted.Redacted<string>;
|
|
460
|
+
declare const containerRegistryDockerConfig: (host: string, username: string, password: Redacted.Redacted<string>) => Redacted.Redacted<string>;
|
|
461
|
+
declare const containerRegistryHelmValues: ({ releaseName, storage, storagePrefix, storageSecretName, storageSecretRevision, authSecretName, authSecretRevision, namespaceRevision, ingress, username, garbageCollection }: ContainerRegistryHelmValuesProps) => Record<string, unknown>;
|
|
462
|
+
/** Deploy a private, HTTPS-only, S3-backed OCI/Docker registry. */
|
|
463
|
+
declare const ContainerRegistry: (id: string, props: ContainerRegistryProps) => Effect.Effect<{
|
|
464
|
+
namespace: string;
|
|
465
|
+
releaseName: string;
|
|
466
|
+
serviceName: string;
|
|
467
|
+
host: string;
|
|
468
|
+
url: string;
|
|
469
|
+
imagePrefix: string;
|
|
470
|
+
internalUrl: string;
|
|
471
|
+
credentials: {
|
|
472
|
+
username: string;
|
|
473
|
+
password: Redacted.Redacted<string> | Output.ObjectExpr<Redacted.Redacted<string>, never>;
|
|
474
|
+
};
|
|
475
|
+
pullSecretRefs: ContainerRegistryPullSecretRef[];
|
|
476
|
+
ingress: {
|
|
477
|
+
host: string;
|
|
478
|
+
url: string;
|
|
479
|
+
tls: true;
|
|
480
|
+
};
|
|
481
|
+
}, import("effect/Cause").UnknownError, Providers | Kubernetes.Providers | import("alchemy").Provider<import("alchemy").Random>>;
|
|
482
|
+
//#endregion
|
|
483
|
+
//#region src/index.d.ts
|
|
484
|
+
declare const Providers_base: Provider.ProviderCollection<Providers, "KubernetesAddons">;
|
|
485
|
+
declare class Providers extends Providers_base {}
|
|
486
|
+
interface SecretProps {
|
|
487
|
+
cluster: Kubernetes.ClusterLike;
|
|
488
|
+
name: string;
|
|
489
|
+
namespace?: string;
|
|
490
|
+
type?: string;
|
|
491
|
+
immutable?: boolean;
|
|
492
|
+
stringData: Record<string, string | Redacted.Redacted<string>>;
|
|
493
|
+
}
|
|
494
|
+
type Secret = Resource<"KubernetesAddons.Secret", SecretProps, {
|
|
495
|
+
connection: Kubernetes.Connection;
|
|
496
|
+
name: string;
|
|
497
|
+
namespace: string;
|
|
498
|
+
type: string;
|
|
499
|
+
uid: string | undefined;
|
|
500
|
+
resourceVersion: string | undefined;
|
|
501
|
+
}, Record<never, never>, Providers>;
|
|
502
|
+
declare const SecretResource: import("alchemy").ResourceClass<Secret>;
|
|
503
|
+
/** Write-only Kubernetes Secret with Redacted request-boundary handling. */
|
|
504
|
+
declare const Secret: typeof SecretResource;
|
|
505
|
+
declare const SecretProvider: () => Layer.Layer<Provider.Provider<Secret>, never, never>;
|
|
506
|
+
interface ReadinessProps {
|
|
507
|
+
cluster: Kubernetes.ClusterLike;
|
|
508
|
+
objects: KubernetesObjectRef[];
|
|
509
|
+
revision: string;
|
|
510
|
+
timeoutSeconds?: number;
|
|
511
|
+
}
|
|
512
|
+
type Readiness = Resource<"KubernetesAddons.Readiness", ReadinessProps, {
|
|
513
|
+
connection: Kubernetes.Connection;
|
|
514
|
+
objects: KubernetesObjectRef[];
|
|
515
|
+
revision: string;
|
|
516
|
+
}, Record<never, never>, Providers>;
|
|
517
|
+
declare const Readiness: import("alchemy").ResourceClass<Readiness>;
|
|
518
|
+
declare const ReadinessProvider: () => Layer.Layer<Provider.Provider<Readiness>, never, never>;
|
|
519
|
+
interface ReadyHelmChartProps extends Omit<Kubernetes.HelmChartProps, "cluster" | "wait" | "timeoutSeconds"> {
|
|
520
|
+
cluster: Input<Kubernetes.ClusterLike>;
|
|
521
|
+
timeoutSeconds?: number;
|
|
522
|
+
}
|
|
523
|
+
/** Apply an Alchemy Helm chart, then wait for its CRDs and workloads. */
|
|
524
|
+
declare const ReadyHelmChart: (id: string, props: ReadyHelmChartProps) => Effect.Effect<Kubernetes.HelmChart, never, Providers | Kubernetes.Providers>;
|
|
525
|
+
declare const providers: () => Layer.Layer<Providers | Provider.Provider<import("alchemy").Random>, never, never>;
|
|
526
|
+
//#endregion
|
|
527
|
+
export { CERT_MANAGER_CHART, CERT_MANAGER_CHART_VERSION, CERT_MANAGER_IMAGE_VERSION, CONTAINER_REGISTRY_CHART, CONTAINER_REGISTRY_CHART_VERSION, CONTAINER_REGISTRY_IMAGE, CertManager, type CertManagerProps, type CertManagerResult, CloudflareAcmeIssuer, type CloudflareAcmeIssuerProps, type CloudflareAcmeIssuerResult, CloudflareExternalDns, type CloudflareExternalDnsPlan, type CloudflareExternalDnsProps, type CloudflareExternalDnsResult, ContainerRegistry, type ContainerRegistryGarbageCollectionProps, type ContainerRegistryIngressProps, type ContainerRegistryProps, type ContainerRegistryPullSecretRef, type ContainerRegistryPullSecretsProps, type ContainerRegistryResult, EXTERNAL_DNS_CHART_VERSION, EXTERNAL_DNS_IMAGE, type KubernetesObjectReadiness, type KubernetesObjectRef, KubernetesReadinessError, LETSENCRYPT_PRODUCTION_URL, LETSENCRYPT_STAGING_URL, OTEL_COLLECTOR_CHART_VERSION, OTEL_COLLECTOR_IMAGE, OtelCollector, type OtelCollectorBasicAuthSecretRef, type OtelCollectorDestination, type OtelCollectorPlan, type OtelCollectorProps, type OtelCollectorResult, type OtelSignal, PARSEABLE_CHART_VERSION, PARSEABLE_IMAGE, Parseable, type ParseableIngressProps, type ParseableOtlpEndpoints, type ParseableProps, type ParseableResult, type ParseableStagingProps, Providers, Readiness, ReadinessProps, ReadinessProvider, ReadyHelmChart, ReadyHelmChartProps, Secret, SecretProps, SecretProvider, certManagerHelmValues, cloudflareAcmeIssuerManifest, cloudflareAcmeIssuerName, cloudflareAcmeIssuerTokenPolicies, containerRegistryDockerConfig, containerRegistryHelmValues, containerRegistryHtpasswd, kubernetesObjectReadiness, parseableHelmValues, planCloudflareExternalDns, planOtelCollector, providers, validateCertManagerProps, validateCloudflareAcmeIssuerProps, validateContainerRegistryProps };
|