-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ed3befc
commit 0e7a78a
Showing
6 changed files
with
91 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
# Deploy CRDs and vcluster with the plugin, connect to vcluster and apply resources in resources folder for testing | ||
|
||
PLUGIN_IMAGE=$1 | ||
MYDIR=$(dirname $0) | ||
ROOT_DIR=$MYDIR/../../ | ||
RESOURCES_FILE=$MYDIR/../../../.e2e/vcluster-resources.yaml | ||
|
||
kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.70.0/example/prometheus-operator-crd-full/monitoring.coreos.com_podmonitors.yaml | ||
kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.70.0/example/prometheus-operator-crd-full/monitoring.coreos.com_servicemonitors.yaml | ||
helm upgrade --install --repo https://charts.loft.sh vcluster vcluster --version v0.20.0-beta.5 --values $MYDIR/vcluster-values.yaml --values $ROOT_DIR/plugin.yaml --set plugins.prometheus-operator-resources.image=$PLUGIN_IMAGE --wait | ||
|
||
vcluster connect vcluster -n default -- kubectl get servicemonitor && vcluster connect vcluster -n default -- kubectl get podmonitor | ||
|
||
res=$? | ||
secondsWaited=0 | ||
timeout=300 | ||
|
||
while [ $res -ne 0 ] && [ $secondsWaited -lt $timeout ]; do | ||
echo "Waiting for CRDs to get created, sleep for 30 seconds..." | ||
sleep 30 | ||
secondsWaited=$((secondsWaited + 30)) | ||
vcluster connect vcluster -n default -- kubectl get servicemonitor && vcluster connect vcluster -n default -- kubectl get podmonitor | ||
res=$? | ||
done | ||
|
||
if [ $res -ne 0 ]; then | ||
echo "Timed out waiting for CRDs to get created in vcluster" | ||
exit 1 | ||
fi | ||
|
||
cat $RESOURCES_FILE | vcluster connect vcluster -n default -- kubectl -n default apply -f - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
controlPlane: | ||
advanced: | ||
serviceAccount: | ||
enabled: false | ||
name: default | ||
statefulSet: | ||
probes: | ||
livenessProbe: | ||
enabled: false | ||
readinessProbe: | ||
enabled: false | ||
distro: | ||
k3s: | ||
enabled: true | ||
rbac: | ||
clusterRole: | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters