do not filter out compositionRevisionRef is updatePolicy is Manual
Signed-off-by: Miguel Ángel Ducanto Hadad <dukanto@gmail.com>
This commit is contained in:
parent
4db45cdc17
commit
2638840af5
|
@ -121,9 +121,10 @@ func (c *APIDryRunCompositeConfigurator) Configure(ctx context.Context, cm resou
|
|||
|
||||
// CompositionRevision is a special field which needs to be propagated
|
||||
// based on the Update policy. If the policy is `Manual`, we need to
|
||||
// overwrite the composite's value with the claim's
|
||||
// remove CompositionRevisionRef from wellKnownClaimFields, so it
|
||||
// does not get filtered out and is set correctly in composite
|
||||
if cp.GetCompositionUpdatePolicy() != nil && *cp.GetCompositionUpdatePolicy() == xpv1.UpdateManual {
|
||||
cp.SetCompositionRevisionReference(cm.GetCompositionRevisionReference())
|
||||
delete(wellKnownClaimFields, xcrd.CompositionRevisionRef)
|
||||
}
|
||||
|
||||
claimSpecFilter := xcrd.GetPropFields(wellKnownClaimFields)
|
||||
|
|
|
@ -25,6 +25,9 @@ const (
|
|||
LabelKeyClaimNamespace = "crossplane.io/claim-namespace"
|
||||
)
|
||||
|
||||
// CompositionRevisionRef should be propagated dynamically
|
||||
var CompositionRevisionRef = "compositionRevisionRef"
|
||||
|
||||
// PropagateSpecProps is the list of XRC spec properties to propagate
|
||||
// when translating an XRC into an XR and vice-versa.
|
||||
var PropagateSpecProps = []string{"compositionRef", "compositionSelector", "compositionUpdatePolicy", "compositionRevisionSelector"}
|
||||
|
|
Loading…
Reference in New Issue