Added Validations for WorkloadGroups, fixed issue with references. #8062
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe the change
Added 2 new Validation Warning messages for Workload Groups:
"Warning KIA1701 Service Account not found in this namespace".
"Warning KIA1702 More than one Workload Group with duplicate labels found in the same namespace"
Kiali does not list ServiceAccounts directly from the system but is listing them from the Pods.
That is why the notification severity is Warning not a Error.
Steps to test the PR
Create a WorkloadGroup with non existing Service Account, or with Service Account from other namespace, and with labels which exist in another WG in the same namespace.
Automation testing
Added unit tests.
Issue reference
#8058
Docs: kiali/kiali.io#853