Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Validations for WorkloadGroups, fixed issue with references. #8062

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hhovsepy
Copy link
Contributor

@hhovsepy hhovsepy commented Jan 14, 2025

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.

apiVersion: networking.istio.io/v1
kind: WorkloadGroup
metadata:
  name: ratings-vm
  namespace: bookinfo
spec:
  metadata:
    labels:
      app: ratings-vm
  template:
    serviceAccount: bookinfo-ratings
---
apiVersion: networking.istio.io/v1
kind: WorkloadGroup
metadata:
  name: ratings-vm2
  namespace: bookinfo
spec:
  metadata:
    labels:
      app: ratings-vm
  template:
    serviceAccount: wrong

Screenshot From 2025-01-20 12-38-35

Automation testing

Added unit tests.

Issue reference

#8058
Docs: kiali/kiali.io#853

@hhovsepy hhovsepy marked this pull request as ready for review January 15, 2025 15:58
@hhovsepy hhovsepy requested a review from ferhoyos January 15, 2025 15:58
@hhovsepy hhovsepy self-assigned this Jan 15, 2025
@hhovsepy hhovsepy marked this pull request as draft January 17, 2025 12:53
lint

Test Sidecars with correct labels without class

Added validation KIA1702

Fixed Labels to WG.Spec.Metadata.Labels
@hhovsepy hhovsepy marked this pull request as ready for review January 20, 2025 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

1 participant