@intentius/chant-lexicon-k8s 0.13.1 → 0.15.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-k8s",
3
- "version": "0.13.1",
3
+ "version": "0.15.0",
4
4
  "description": "Kubernetes lexicon for chant — declarative IaC in TypeScript",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -70,6 +70,6 @@
70
70
  "typescript": "^5.9.3"
71
71
  },
72
72
  "peerDependencies": {
73
- "@intentius/chant": "^0.13.1"
73
+ "@intentius/chant": "^0.15.0"
74
74
  }
75
75
  }
@@ -15,7 +15,7 @@
15
15
  import { exec } from "node:child_process";
16
16
  import { promisify } from "node:util";
17
17
  import type { ResourceMetadata } from "@intentius/chant/lexicon";
18
- import { hasOwnershipMarker, classifyOwnership } from "@intentius/chant/ownership";
18
+ import { hasOwnershipMarker, classifyOwnership, LABEL_OWNERSHIP_KEYS } from "@intentius/chant/ownership";
19
19
 
20
20
  const execAsync = promisify(exec);
21
21
 
@@ -109,7 +109,7 @@ export async function describeResources(options: {
109
109
  const { stdout } = await execAsync(cmd);
110
110
  const obj: KubectlResponse = JSON.parse(stdout);
111
111
  // owned filter: skip resources not carrying chant's marker label.
112
- if (options.owned && !hasOwnershipMarker(obj.metadata?.labels, "label")) {
112
+ if (options.owned && !hasOwnershipMarker(obj.metadata?.labels, LABEL_OWNERSHIP_KEYS)) {
113
113
  continue;
114
114
  }
115
115
  result[entityName] = {
@@ -117,7 +117,7 @@ export async function describeResources(options: {
117
117
  physicalId: obj.metadata?.uid,
118
118
  status: statusFromKubectl(obj),
119
119
  lastUpdated: obj.metadata?.creationTimestamp,
120
- ownership: classifyOwnership(obj.metadata?.labels, "label"),
120
+ ownership: classifyOwnership(obj.metadata?.labels, LABEL_OWNERSHIP_KEYS),
121
121
  attributes: pruneUndefined({
122
122
  namespace: obj.metadata?.namespace,
123
123
  labels: obj.metadata?.labels,