What does this PR do / why we need it:
Before this PR, container resource didn't reconcile due to the type mismatch for func GetValueOrDefault, This change returns the resource requirement if it's not nil, And return empty/default resource requirement if nil.
Have you updated the necessary documentation?
[ ] Documentation update is required by this PR.
[ ] Documentation has been updated.
Which issue(s) this PR fixes:
Fixes #?
How to test changes / Special notes to the reviewer:
run
make install run
Run test kuttl k8s test 1-010kubectl kuttl test ./tests/k8s --config ./tests/kuttl-tests.yaml --test 1-010_validate_resource_limit_changes
What type of PR is this? /kind bug
What does this PR do / why we need it: Before this PR, container resource didn't reconcile due to the type mismatch for func GetValueOrDefault, This change returns the resource requirement if it's not nil, And return empty/default resource requirement if nil.
Have you updated the necessary documentation?
Which issue(s) this PR fixes:
Fixes #?
How to test changes / Special notes to the reviewer:
run
make install run
Run test kuttl k8s test
1-010
kubectl kuttl test ./tests/k8s --config ./tests/kuttl-tests.yaml --test 1-010_validate_resource_limit_changes