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

Address DiscoverySelectors conflict #261

Merged
merged 22 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions eks-anywhere-common/Addons/Partner/Solo.io/namespace.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
apiVersion: v1
kind: Namespace
metadata:
name: istio-system
name: solo-istio-system
labels:
istio.io/rev: 1-18-3-solo
aws.conformance.vendor: solo.io
aws.conformance.vendor-solution: solo-istiod
aws.conformance.vendor-solution-version: 1.18.3-eks-a
aws.conformance.vendor-solution-version: 1.18.3-eks-a
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
Expand Down
15 changes: 13 additions & 2 deletions eks-anywhere-common/Addons/Partner/Solo.io/solo-istiod.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: solo-istiod
namespace: istio-system
namespace: solo-istio-system
spec:
chart:
spec:
Expand All @@ -14,4 +13,16 @@ spec:
name: solo-istiod-charts
namespace: flux-system
version: 1.18.3-eks-a
values:
revision: 1-18-3-solo
pilot:
env:
ENABLE_ENHANCED_RESOURCE_SCOPING: "true" # need this before v1.22
global:
istioNamespace: solo-istio-system
meshConfig:
PetrMc marked this conversation as resolved.
Show resolved Hide resolved
discoverySelectors:
- matchLabels:
aws.conformance.vendor: solo.io
aws.conformance.vendor-solution: solo-istiod
interval: 1m0s
5 changes: 4 additions & 1 deletion eks-anywhere-common/Testers/Solo.io/solo-istiod-testJob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ apiVersion: batch/v1
kind: CronJob
metadata:
name: solo-istiod-health-test
namespace: istio-system
namespace: solo-istio-system
spec:
schedule: "10 10 * * *"
jobTemplate:
spec:
template:
metadata:
annotations:
sidecar.istio.io/inject: "false"
spec:
containers:
- name: solo-istiod-healthtest
Expand Down
24 changes: 12 additions & 12 deletions eks-anywhere-common/Testers/Solo.io/solo-istiod-testjob-script.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: tetsjob-script
namespace: istio-system
namespace: solo-istio-system
data:
run-functional-tests.sh: |-
#!/bin/sh

# Cleanup function to remove resources
cleanup() {
echo "Cleaning up resources..."
kubectl delete gateway httpbin-gateway -n istio-system
kubectl delete deployment custom-ingressgateway -n istio-system
kubectl delete gateway httpbin-gateway -n solo-istio-system
kubectl delete deployment custom-ingressgateway -n solo-istio-system
# Any additional cleanup commands go here
echo "Cleanup completed."
}
Expand All @@ -33,7 +33,7 @@ data:
kind: Deployment
metadata:
name: custom-ingressgateway
namespace: istio-system
namespace: solo-istio-system
spec:
replicas: 1
selector:
Expand All @@ -53,7 +53,7 @@ data:
EOF

# Verify the custom gateway has been deployed
kubectl get deployment custom-ingressgateway -n istio-system
kubectl get deployment custom-ingressgateway -n solo-istio-system
}

deploy_test_gateway() {
Expand All @@ -63,7 +63,7 @@ data:
kind: Gateway
metadata:
name: httpbin-gateway
namespace: istio-system
namespace: solo-istio-system
spec:
selector:
istio: custom-ingress-gw # this should match the label of your Istio ingress gateway deployment
Expand All @@ -77,7 +77,7 @@ data:
EOF

# Verify the Gateway has been created
kubectl get gateway httpbin-gateway -n istio-system
kubectl get gateway httpbin-gateway -n solo-istio-system
}

deploy_test_virtualservice() {
Expand All @@ -87,7 +87,7 @@ data:
kind: VirtualService
metadata:
name: httpbin-virtualservice
namespace: istio-system
namespace: solo-istio-system
spec:
hosts:
- "httpbin.example.com"
Expand All @@ -105,15 +105,15 @@ data:
EOF

# Verify the VirtualService has been created
kubectl get virtualservice httpbin-virtualservice -n istio-system
kubectl get virtualservice httpbin-virtualservice -n solo-istio-system
}

check_istio_gateway_config() {
# Get the name of the Istio ingressgateway pod
local ingress_gateway_pod=$(kubectl get pod -l istio=custom-ingress-gw -n istio-system -o jsonpath='{.items[0].metadata.name}')
local ingress_gateway_pod=$(kubectl get pod -l istio=custom-ingress-gw -n solo-istio-system -o jsonpath='{.items[0].metadata.name}')

# Check if the ingress gateway has received configuration from Istiod
local gateway_status=$(kubectl exec "$ingress_gateway_pod" -n istio-system -- curl -s 'http://localhost:15000/config_dump')
local gateway_status=$(kubectl exec "$ingress_gateway_pod" -n solo-istio-system -- curl -s 'http://localhost:15000/config_dump')

if echo "$gateway_status" | grep 'httpbin.example.com'; then
echo "Istio Ingress Gateway has received correct configuration from Istiod."
Expand All @@ -127,7 +127,7 @@ data:

# Wait for the custom ingress gateway deployment to be ready
echo "Waiting for the custom ingress gateway deployment to be ready..."
kubectl rollout status deployment/custom-ingressgateway -n istio-system || error_exit "Custom Istio Ingress Gateway deployment is not ready."
kubectl rollout status deployment/custom-ingressgateway -n solo-istio-system || error_exit "Custom Istio Ingress Gateway deployment is not ready."

echo "Deploying test gateway..."
deploy_test_gateway || error_exit "Failed to deploy test gateway."
Expand Down
6 changes: 3 additions & 3 deletions eks-anywhere-common/Testers/Solo.io/test-job-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: solo-istiod-job-role
namespace: istio-system
namespace: solo-istio-system
rules:
- apiGroups: [""]
resources: ["pods", "pods/exec", "services"]
Expand All @@ -18,11 +18,11 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: solo-istiod-job-rolebinding
namespace: istio-system
namespace: solo-istio-system
subjects:
- kind: ServiceAccount
name: default
namespace: istio-system
namespace: solo-istio-system
roleRef:
kind: Role
name: solo-istiod-job-role
Expand Down