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
Ability to execute both native and custom interpreters for a given kind
Why is this needed:
In #4766, I added support for retaining member-cluster Service Account UID and Token. We currently have a ResourceInterpreterCustomization for Secrets of type generic with a particular label, but because the target is only by apiVersion/kind, my custom interpreter takes over and never evaluates the built-in native interpreter.
I see two ways of solving this:
Evaluate both native and custom interpreter -- this may lead to a change in behavior for users of karmada
Ability to add label selector to ResourceInterpreterCustomization .spec.target
apiVersion: config.karmada.io/v1alpha1kind: ResourceInterpreterCustomizationmetadata:
name: secretspec:
target:
apiVersion: v1kind: Secretcustomizations:
retention:
luaScript: | function Retain(desiredObj, observedObj) if desiredObj.type == "kubernetes.io/service-account-token" then -- NOW I HAVE TO DUPLICATE THE LOGIC THAT IS IN THE NATIVE ONE elseif observedObj.metadata.labels["example.com/duplicate"] == "true" then if desiredObj.data ~= nil then if desiredObj.data["tls.crt"] ~= nil then desiredObj.data = observedObj.data end end end return desiredObj end
The text was updated successfully, but these errors were encountered:
What would you like to be added:
Ability to execute both native and custom interpreters for a given kind
Why is this needed:
In #4766, I added support for retaining member-cluster Service Account UID and Token. We currently have a
ResourceInterpreterCustomization
for Secrets of type generic with a particular label, but because the target is only by apiVersion/kind, my custom interpreter takes over and never evaluates the built-in native interpreter.I see two ways of solving this:
.spec.target
The text was updated successfully, but these errors were encountered: