-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from adrianchiris/add-e2e-tests
Add E2E tests
- Loading branch information
Showing
17 changed files
with
808 additions
and
258 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,5 +25,8 @@ go.work.sum | |
build/ | ||
bin/ | ||
|
||
# artifact dirs | ||
artifacts/ | ||
|
||
# IDE | ||
.vscode |
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
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,8 @@ | ||
kind: Cluster | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
name: ${CLUSTER_NAME} | ||
nodes: | ||
- role: control-plane | ||
- role: worker | ||
- role: worker | ||
- role: worker |
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,53 @@ | ||
#!/bin/bash | ||
# 2024 NVIDIA CORPORATION & AFFILIATES | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the License); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an AS IS BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
set -o nounset | ||
set -o pipefail | ||
set -o errexit | ||
|
||
if [[ "${TRACE-0}" == "1" ]]; then | ||
set -o xtrace | ||
fi | ||
|
||
CLUSTER_NAME="${CLUSTER_NAME:-"mn-op"}" | ||
SCRIPT_DIR="$(dirname "$(realpath "$0")")" | ||
KIND_BIN=${KIND_BIN:-"unknown"} | ||
KUBECTL_BIN=${KUBECTL_BIN:-"kubectl"} | ||
CERT_MANAGER_VERSION=${CERT_MANAGER_VERSION:-"v1.15.3"} | ||
CERT_MANAGER_NAMESPACE=${CERT_MANAGER_NAMESPACE:-"cert-manager"} | ||
|
||
function kind() { | ||
${KIND_BIN} $@ | ||
} | ||
|
||
function kubectl() { | ||
${KUBECTL_BIN} $@ | ||
} | ||
|
||
function label_worker_nodes() { | ||
# label worker nodes as workers. we do this here since doing it in kind config file does not work. | ||
kubectl label nodes --all node-role.kubernetes.io/worker= | ||
kubectl label node ${CLUSTER_NAME}-control-plane node-role.kubernetes.io/worker- | ||
} | ||
|
||
if [[ "${KIND_BIN}" == "unknown" ]]; then | ||
echo "KIND_BIN not provided. Aborting." >&2 | ||
exit 1 | ||
fi | ||
|
||
echo "Creating kind cluster ${CLUSTER_NAME}" | ||
CLUSTER_NAME=${CLUSTER_NAME} envsubst < ${SCRIPT_DIR}/e2e-cluster.yaml.template > ${SCRIPT_DIR}/e2e-cluster.yaml | ||
kind create cluster --config ${SCRIPT_DIR}/e2e-cluster.yaml | ||
rm -f ${SCRIPT_DIR}/e2e-cluster.yaml | ||
label_worker_nodes |
Oops, something went wrong.