@intentius/chant-lexicon-k8s 0.1.22 → 0.1.23
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/dist/integrity.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "a40500a319710239828776b5e04b46374aeb39f60313b0cb3f9770d9bc844d8c",
|
|
5
5
|
"meta.json": "8e9c0279eb8666c8b181897a55f614c7e803fed6fc6cb549249d8f998aa764d2",
|
|
6
6
|
"types/index.d.ts": "7eb3017762f49faa57dae1d71f3e77a08e52ac8fc7eeab192cba4e981b7efed6",
|
|
7
7
|
"rules/argo-appset-single-project.ts": "afa9f310753aa2d475f35012b13135b2dfaebed2a35d44edbe185ebc07673674",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"skills/chant-k8s-aks.md": "e18f0e2b055f72cd7a37deaf258d7027c2d4d3e286e8fd4975b27a1f981a3ad9",
|
|
51
51
|
"skills/chant-k8s-argo.md": "b1a0b826559d8c5033a479c5781efaf650320f0aee4419d8841170bd3393cea5"
|
|
52
52
|
},
|
|
53
|
-
"composite": "
|
|
53
|
+
"composite": "2aaafe56e3fec2c11f54aacbc10457a680b4b06216f9da5ec80b9e1376fbaf32"
|
|
54
54
|
}
|
package/dist/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1486,6 +1486,8 @@ describe("SecureIngress", () => {
|
|
|
1486
1486
|
test("creates certificate when clusterIssuer set", () => {
|
|
1487
1487
|
const result = SecureIngress({ ...minProps, clusterIssuer: "letsencrypt-prod" });
|
|
1488
1488
|
expect(result.certificate).toBeDefined();
|
|
1489
|
+
// A real cert-manager Certificate, not the former Ingress-proxy placeholder.
|
|
1490
|
+
expect(result.certificate!.constructor.name).toBe("Certificate");
|
|
1489
1491
|
const certSpec = p(result.certificate!).spec as any;
|
|
1490
1492
|
expect(certSpec.issuerRef.name).toBe("letsencrypt-prod");
|
|
1491
1493
|
expect(certSpec.dnsNames).toEqual(["app.example.com"]);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { Composite, mergeDefaults } from "@intentius/chant";
|
|
9
|
-
import { Ingress } from "../generated";
|
|
9
|
+
import { Ingress, Certificate } from "../generated";
|
|
10
10
|
|
|
11
11
|
export interface SecureIngressHost {
|
|
12
12
|
/** Hostname (e.g., "api.example.com"). */
|
|
@@ -44,7 +44,7 @@ export interface SecureIngressProps {
|
|
|
44
44
|
|
|
45
45
|
export interface SecureIngressResult {
|
|
46
46
|
ingress: InstanceType<typeof Ingress>;
|
|
47
|
-
certificate?: InstanceType<typeof
|
|
47
|
+
certificate?: InstanceType<typeof Certificate>; // cert-manager.io/v1 Certificate
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/**
|
|
@@ -135,8 +135,10 @@ export const SecureIngress = Composite<SecureIngressProps>((props) => {
|
|
|
135
135
|
const result: Record<string, any> = { ingress };
|
|
136
136
|
|
|
137
137
|
if (clusterIssuer) {
|
|
138
|
-
//
|
|
139
|
-
|
|
138
|
+
// A real cert-manager Certificate (the ingress-shim annotation on the Ingress
|
|
139
|
+
// above is also set, so either path issues the cert; the explicit resource
|
|
140
|
+
// makes the cert lifecycle declarable).
|
|
141
|
+
result.certificate = new Certificate(mergeDefaults({
|
|
140
142
|
metadata: {
|
|
141
143
|
name: secretName,
|
|
142
144
|
...(namespace && { namespace }),
|