Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions config/federation/resourceinterpreters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,35 @@ spec:
end
return desiredObj
end
---
apiVersion: config.karmada.io/v1alpha1
kind: ResourceInterpreterCustomization
metadata:
name: gateway.envoyproxy.io-securitypolicy
spec:
target:
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: SecurityPolicy
customizations:
statusAggregation:
luaScript: >
function AggregateStatus(desiredObj, statusItems)
if statusItems == nil or #statusItems == 0 then
return desiredObj
end
if desiredObj.status == nil then
desiredObj.status = {}
end

local item = statusItems[1]
if item == nil or item.status == nil then
return desiredObj
end

-- TODO(jreese) implement proper aggregation logic. Would be good to
-- think through how to represent propagation status across clusters.
if item.status.ancestors ~= nil then
desiredObj.status.ancestors = item.status.ancestors
end
return desiredObj
end
Loading