Class CrdCompatibilityChecker
- java.lang.Object
-
- org.apache.flink.kubernetes.operator.api.validation.CrdCompatibilityChecker
-
public class CrdCompatibilityChecker extends java.lang.ObjectUtility for checking backward CRD compatibility.The aim is to provide a very strict compatibility check logic initially that can be improved over time with compatible type changes if necessary by CRD updates
It performs the following checks:
- No property removed from any object
- No enum value removed from enums (changing enum to string is allowed)
- No type changes for fields
- No type changes for array/map items
- No change in extra properties of field schema definitions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCrdCompatibilityChecker.CompatibilityErrorCompatibility Error class.
-
Constructor Summary
Constructors Constructor Description CrdCompatibilityChecker()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static voidcheckObjectCompatibility(java.lang.String path, com.fasterxml.jackson.databind.JsonNode oldNode, com.fasterxml.jackson.databind.JsonNode newNode)protected static voidcheckStringTypeCompatibility(java.lang.String path, com.fasterxml.jackson.databind.JsonNode oldNode, com.fasterxml.jackson.databind.JsonNode newNode)protected static voidcheckTypeCompatibility(java.lang.String path, com.fasterxml.jackson.databind.JsonNode oldNode, com.fasterxml.jackson.databind.JsonNode newNode)static voidmain(java.lang.String[] args)protected static voidverifyOtherPropsMatch(java.lang.String path, com.fasterxml.jackson.databind.JsonNode oldNode, com.fasterxml.jackson.databind.JsonNode newNode)
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.io.IOException- Throws:
java.io.IOException
-
checkObjectCompatibility
protected static void checkObjectCompatibility(java.lang.String path, com.fasterxml.jackson.databind.JsonNode oldNode, com.fasterxml.jackson.databind.JsonNode newNode)
-
checkTypeCompatibility
protected static void checkTypeCompatibility(java.lang.String path, com.fasterxml.jackson.databind.JsonNode oldNode, com.fasterxml.jackson.databind.JsonNode newNode)
-
verifyOtherPropsMatch
protected static void verifyOtherPropsMatch(java.lang.String path, com.fasterxml.jackson.databind.JsonNode oldNode, com.fasterxml.jackson.databind.JsonNode newNode)
-
checkStringTypeCompatibility
protected static void checkStringTypeCompatibility(java.lang.String path, com.fasterxml.jackson.databind.JsonNode oldNode, com.fasterxml.jackson.databind.JsonNode newNode)
-
-