You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/kustomize.toolkit.fluxcd.io/v1/Kustomization/customizations.yaml
+73-12Lines changed: 73 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -22,22 +22,42 @@ spec:
22
22
statusAggregation:
23
23
luaScript: >
24
24
function AggregateStatus(desiredObj, statusItems)
25
+
if desiredObj.status == nil then
26
+
desiredObj.status = {}
27
+
end
28
+
if desiredObj.metadata.generation == nil then
29
+
desiredObj.metadata.generation = 0
30
+
end
31
+
if desiredObj.status.observedGeneration == nil then
32
+
desiredObj.status.observedGeneration = 0
33
+
end
34
+
35
+
-- Initialize status fields if status doest not exist
36
+
-- If the Kustomization is not spread to any cluster, its status also should be aggregated
Copy file name to clipboardExpand all lines: pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/kustomize.toolkit.fluxcd.io/v1/Kustomization/testdata/desired-kustomization.yaml
Copy file name to clipboardExpand all lines: pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/kustomize.toolkit.fluxcd.io/v1/Kustomization/testdata/observed-kustomization.yaml
Copy file name to clipboardExpand all lines: pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/kustomize.toolkit.fluxcd.io/v1/Kustomization/testdata/status-file.yaml
0 commit comments