-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the local testing with Kind with some scripts to create and de…
…lete the cluster
- Loading branch information
Showing
6 changed files
with
77 additions
and
45 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
BASE_DIR="$SCRIPT_DIR/../../" | ||
OS_NAME=$(uname | tr '[:upper:]' '[:lower:]') | ||
KIND_CONFIG_FILE="$SCRIPT_DIR/kind-config-$OS_NAME.yaml" | ||
|
||
printf "%s\n" "Creating cluster with kind-config-$OS_NAME.yaml" | ||
kind --config $KIND_CONFIG_FILE create cluster | ||
#export KUBECONFIG="$(kind get kubeconfig)" | ||
|
||
kubectl get nodes | ||
|
||
printf "%s\n" "Build and load Operator image into kind cluster" | ||
./mvnw -C -B clean package | ||
docker build -f $BASE_DIR/src/main/docker/Dockerfile.jvm -t instana/instana-agent-operator $BASE_DIR | ||
kind load docker-image instana/instana-agent-operator | ||
|
||
printf "%s\n" "Load Agent image into kind cluster" | ||
docker pull instana/agent | ||
kind load docker-image instana/agent |
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,6 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
kind delete cluster | ||
#unset KUBECONFIG |
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,15 @@ | ||
kind: Cluster | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
nodes: | ||
- role: control-plane | ||
extraMounts: | ||
- containerPath: /hosthome | ||
hostPath: /Users | ||
- role: worker | ||
extraMounts: | ||
- containerPath: /hosthome | ||
hostPath: /Users | ||
- role: worker | ||
extraMounts: | ||
- containerPath: /hosthome | ||
hostPath: /Users |
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,15 @@ | ||
kind: Cluster | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
nodes: | ||
- role: control-plane | ||
extraMounts: | ||
- containerPath: /hosthome | ||
hostPath: /home | ||
- role: worker | ||
extraMounts: | ||
- containerPath: /hosthome | ||
hostPath: /home | ||
- role: worker | ||
extraMounts: | ||
- containerPath: /hosthome | ||
hostPath: /home |