-
Feature
-
Resolution: Won't Do
-
Normal
-
None
-
None
The difference between must-have and mustonlyhave is:
- "Compliance setting = mustonlyhave" means RHACM will apply the configuration as defined in the policy on the cluster. For eg: new entries on the policy are added to the existing object + this would also mean that removing older entries in the policy would result in these entries being removed from the object. In short, `mustonlyhave` set defined changed object to exact state, like delete and create it again. So data will be the same as in YAML.
- "Compliance setting = must-have" means RHACM will have a merging behavior. For eg. new entries on the policy are added to the existing object, but if there are entries removed from the policy these are not removed from the service. Must-have works like logical OR - it appends defined data to an existing object, so if you change list in key A, it will append new values:
If the object is:
objectDefinition: apiVersion: v1 kind: Service metadata: name: <name> namespace: <namespace> spec: a: - valueA - valueB b: {...} c: {...}
Then with must-have :
complianceType: must-have objectDefinition: apiVersion: v1 kind: Service metadata: name: <name> namespace: <namespace> spec: a: - value-XYZ
will result in:
objectDefinition: apiVersion: v1 kind: Service metadata: name: <name> namespace: <namespace> spec: a: - valueA - valueB - value-XYZ b: {...} c: {...}
but mustonlyhave will result in:
objectDefinition: apiVersion: v1 kind: Service metadata: name: <name> namespace: <namespace> spec: a: - value-XYZ
So, the customer wants the flexibility to leave the key `b` an `c` untouched and change only `a` as with policy "mustonlyhave" so that the final result looks similar as below:
objectDefinition: apiVersion: v1 kind: Service metadata: name: <name> namespace: <namespace> spec: a: - value-XYZ b: {...} c: {...}
WHY RFE IS NEEDED?
At the moment, "mustonlyhave" set defined changed object to exact state, removing all the entries and including only those entries that were defined. Customer wants to have the flexibility to leave the untouched values and add/remove only those entries that were altered while using the policy "mustonlyhave".