Skip to content
This repository was archived by the owner on Dec 21, 2023. It is now read-only.
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
26 changes: 26 additions & 0 deletions istio-configuration/configure-istio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,31 @@ fi

echo "External IP for istio-ingressgateway is ${INGRESS_IP}, creating configmaps..."

K8S_VERSION=$(kubectl version -ojson)
K8S_VERSION_MINOR=$(echo "$K8S_VERSION" | jq -r .serverVersion.minor)

if [[ "$K8S_VERSION_MINOR" < "19" ]]
then
echo "Detected Kubernetes version < 1.19"
# Applying ingress-manifest
kubectl apply -f - <<EOF
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: istio
name: api-keptn-ingress
namespace: keptn
spec:
rules:
- host: $INGRESS_IP.nip.io
http:
paths:
- backend:
serviceName: api-gateway-nginx
servicePort: 80
EOF
else
# Applying ingress-manifest
kubectl apply -f - <<EOF
apiVersion: networking.k8s.io/v1
Expand All @@ -39,6 +64,7 @@ spec:
port:
number: 80
EOF
fi

# Applying public gateway
kubectl apply -f - <<EOF
Expand Down
25 changes: 25 additions & 0 deletions quickstart/expose-keptn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,30 @@ SLEEP_TIME=5

print_headline "Configuring Ingress for your local installation"

K8S_VERSION=$(kubectl version -ojson)
K8S_VERSION_MINOR=$(echo "$K8S_VERSION" | jq -r .serverVersion.minor)

if [[ "$K8S_VERSION_MINOR" < "19" ]]
then
echo "Detected Kubernetes version < 1.19"
# Applying ingress-manifest
kubectl apply -f - <<EOF
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: api-keptn-ingress
namespace: keptn
annotations:
ingress.kubernetes.io/ssl-redirect: "false"
spec:
rules:
- http:
paths:
- backend:
serviceName: api-gateway-nginx
servicePort: 80
EOF
else
# Applying ingress-manifest
kubectl apply -f - <<EOF
apiVersion: networking.k8s.io/v1
Expand All @@ -93,6 +117,7 @@ spec:
port:
number: 80
EOF
fi

verify_test_step $? "Applying public gateway failed"

Expand Down
24 changes: 24 additions & 0 deletions quickstart/multistage-delivery.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,29 @@ helm install prometheus prometheus-community/prometheus --namespace monitoring -

verify_test_step $? "Install prometheus failed"

K8S_VERSION=$(kubectl version -ojson)
K8S_VERSION_MINOR=$(echo "$K8S_VERSION" | jq -r .serverVersion.minor)

if [[ "$K8S_VERSION_MINOR" < "19" ]]
then
echo "Detected Kubernetes version < 1.19"
# Applying ingress-manifest
kubectl apply -f - <<EOF
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: prometheus-ingress
namespace: monitoring
spec:
rules:
- host: prometheus.$INGRESS_IP.nip.io
http:
paths:
- backend:
serviceName: prometheus-server
servicePort: 80
EOF
else
kubectl apply -f - <<EOF
apiVersion: networking.k8s.io/v1
kind: Ingress
Expand All @@ -155,6 +178,7 @@ spec:
port:
number: 80
EOF
fi

verify_test_step $? "Applying Ingress for Prometheus failed"

Expand Down