Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

fix(hcc): delete the dead existingPolicies injection option [R3-M11]

Alfredo Lopezbe5fdb4d616d
diff --git a/host-context-controller/package-lock.json b/host-context-controller/package-lock.json
index 9d66b3370..30f2b4c6e 100644
--- a/host-context-controller/package-lock.json
+++ b/host-context-controller/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-host-context-controller",
- "version": "0.1.203",
+ "version": "0.1.204",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-host-context-controller",
- "version": "0.1.203",
+ "version": "0.1.204",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"@clerum/image-policy": "file:../packages/image-policy",
diff --git a/host-context-controller/package.json b/host-context-controller/package.json
index c12e20a34..1532bdf16 100644
--- a/host-context-controller/package.json
+++ b/host-context-controller/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-host-context-controller",
- "version": "0.1.203",
+ "version": "0.1.204",
"description": "Host Context Controller - provides McpServer CRDs to mcp-host via REST API",
"main": "dist/main.js",
"engines": {
diff --git a/host-context-controller/src/networkPolicyReconciler.ts b/host-context-controller/src/networkPolicyReconciler.ts
index 7add53bc2..c824e90db 100644
--- a/host-context-controller/src/networkPolicyReconciler.ts
+++ b/host-context-controller/src/networkPolicyReconciler.ts
@@ -51,7 +51,6 @@ type JsonPatchOperation = {
type NetworkPolicyMutationOptions = {
isCurrent?: () => boolean
- existingPolicies?: k8s.V1NetworkPolicy[]
onRevoked?: () => void
/**
* Set only by a caller that reads the returned boolean and withholds
@@ -1785,25 +1784,23 @@ export class NetworkPolicyReconciler {
): Promise<void> {
const isCurrent = options.isCurrent ?? (() => true)
if (!isCurrent()) return
- let existingPolicies = options.existingPolicies
- if (!existingPolicies) {
- try {
- existingPolicies = await this.listExternalEgressPoliciesForServer(
- server.name,
- server.namespace
- )
- } catch (error) {
- if (!isCurrent()) return
- await this.writeExternalEgressStatus(
- server,
- [],
- 'False',
- 'InventoryListFailed',
- `Failed to list existing external egress policies: ${this.errorMessage(error)}`,
- isCurrent
- )
- throw error
- }
+ let existingPolicies: k8s.V1NetworkPolicy[]
+ try {
+ existingPolicies = await this.listExternalEgressPoliciesForServer(
+ server.name,
+ server.namespace
+ )
+ } catch (error) {
+ if (!isCurrent()) return
+ await this.writeExternalEgressStatus(
+ server,
+ [],
+ 'False',
+ 'InventoryListFailed',
+ `Failed to list existing external egress policies: ${this.errorMessage(error)}`,
+ isCurrent
+ )
+ throw error
}
if (!isCurrent()) return