-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MGMT-8356: Deploy assisted-service and its components to kind cluster
instead of minikube for local subsystem testing
- Loading branch information
Showing
8 changed files
with
211 additions
and
130 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,19 @@ | ||
kind: Ingress | ||
apiVersion: networking.k8s.io/v1 | ||
metadata: | ||
name: wiremock | ||
namespace: REPLACE_NAMESPACE | ||
annotations: | ||
haproxy.router.openshift.io/timeout: 120s | ||
spec: | ||
rules: | ||
- host: REPLACE_HOSTNAME | ||
http: | ||
paths: | ||
- path: "/__admin/mappings" | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: wiremock | ||
port: | ||
number: 8080 |
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,11 @@ | ||
kind: Cluster | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
nodes: | ||
- role: control-plane | ||
extraPortMappings: | ||
- containerPort: 80 | ||
hostPort: 80 | ||
protocol: TCP | ||
- containerPort: 30000 | ||
hostPort: 5432 | ||
protocol: TCP |
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,60 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o nounset | ||
set -o errexit | ||
set -o pipefail | ||
|
||
KIND_VERSION="0.17.0" | ||
|
||
__dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
|
||
function check() { | ||
if [ "$(kind --version)" == "kind version $KIND_VERSION" ]; then | ||
return 0 | ||
else | ||
echo "Does not have 'kind' with version $KIND_VERSION!" | ||
return 1 | ||
fi | ||
} | ||
|
||
function install() { | ||
if check; then | ||
return 0 | ||
fi | ||
|
||
echo "Installing kind $KIND_VERSION..." | ||
sudo curl --retry 5 --connect-timeout 30 -L https://kind.sigs.k8s.io/dl/v$KIND_VERSION/kind-linux-amd64 -o /usr/local/bin/kind | ||
sudo chmod u+x /usr/local/bin/kind | ||
echo "Installed successfully!" | ||
} | ||
|
||
function setup_contour() { | ||
# based on https://kind.sigs.k8s.io/docs/user/ingress/#contour | ||
# for more information about contour, see: https://projectcontour.io | ||
kubectl apply -f https://projectcontour.io/quickstart/contour.yaml | ||
kubectl rollout status -n projectcontour daemonset envoy --timeout 2m | ||
kubectl rollout status -n projectcontour deployment contour --timeout 2m | ||
} | ||
|
||
function create() { | ||
check | ||
|
||
if ! kind export kubeconfig &> /dev/null ; then | ||
KIND_EXPERIMENTAL_PROVIDER=podman kind create cluster --config $__dir/kind-config.yaml | ||
else | ||
echo "Cluster already existing. Skipping creation" | ||
fi | ||
|
||
setup_contour | ||
} | ||
|
||
function delete() { | ||
kind delete cluster | ||
} | ||
|
||
if [ $# -eq 0 ]; then | ||
echo "Usage: $__dir/kind.sh (install|check|create)" | ||
exit 1 | ||
else | ||
$@ | ||
fi |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.