Skip to content

Commit 364b576

Browse files
Lily Hemarkxnelson
authored andcommitted
Voyager update (#641)
* update setup.sh * fix typo
1 parent fc87006 commit 364b576

File tree

3 files changed

+38
-6
lines changed

3 files changed

+38
-6
lines changed

kubernetes/samples/charts/util/setup.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,43 @@ function createTraefik() {
7777
exit 1
7878
}
7979

80+
81+
function purgeCRDs() {
82+
# get rid of Voyager crd deletion deadlock: https://github.com/kubernetes/kubernetes/issues/60538
83+
crds=(certificates ingresses)
84+
for crd in "${crds[@]}"; do
85+
pairs=($(kubectl get ${crd}.voyager.appscode.com --all-namespaces -o jsonpath='{range .items[*]}{.metadata.name} {.metadata.namespace} {end}' || true))
86+
total=${#pairs[*]}
87+
88+
# save objects
89+
if [ $total -gt 0 ]; then
90+
echo "dumping ${crd} objects into ${crd}.yaml"
91+
kubectl get ${crd}.voyager.appscode.com --all-namespaces -o yaml >${crd}.yaml
92+
fi
93+
94+
for ((i = 0; i < $total; i += 2)); do
95+
name=${pairs[$i]}
96+
namespace=${pairs[$i + 1]}
97+
# remove finalizers
98+
kubectl patch ${crd}.voyager.appscode.com $name -n $namespace -p '{"metadata":{"finalizers":[]}}' --type=merge
99+
# delete crd object
100+
echo "deleting ${crd} $namespace/$name"
101+
kubectl delete ${crd}.voyager.appscode.com $name -n $namespace
102+
done
103+
104+
# delete crd
105+
kubectl delete crd ${crd}.voyager.appscode.com || true
106+
done
107+
# delete user roles
108+
kubectl delete clusterroles appscode:voyager:edit appscode:voyager:view
109+
}
110+
80111
function deleteVoyager() {
81112
if [ "$(helm list | grep voyager-operator | wc -l)" = 1 ]; then
82113
echo "Delete Voyager Operator. "
83114
helm delete --purge voyager-operator
84115
kubectl delete ns voyager
116+
purgeCRDs
85117
else
86118
echo "Voyager operator has already been deleted."
87119
fi

kubernetes/samples/charts/voyager/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ $ helm install appscode/voyager --name voyager-operator --version 7.4.0 \
2929
--namespace voyager \
3030
--set cloudProvider=baremetal \
3131
--set apiserver.ca="$(onessl get kube-ca)" \
32-
--set apiserver.enableValidatingWebhook=true
32+
--set apiserver.enableValidatingWebhook=false
3333
```
3434
## Optionally, download the Voyager Helm chart
3535
If you want, you can download the Voyager Helm chart and untar it into a local folder:

site/ingress.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,20 @@ After the Ingress controller is running, it monitors Ingress resources in given
2424
1. Install Ingress Resource(s)
2525
Ingress resources contain routing rules to one or more backends. And Ingress controller is responsible to apply the rules to the underline load balancer.
2626
There are two approaches to create the Ingress resource:
27-
1. Use the helm chart [ingress-per-domain](kubernetes/samples/charts/ingress-per-domain).
27+
1. Use the helm chart [ingress-per-domain](../kubernetes/samples/charts/ingress-per-domain).
2828
Each Ingress provider support a bunch of different annotations in Ingress resources. This helm chart allows you to define the routing rules without dealing with the detailed provider-specific annotations. Currently we support two Ingress providers: Traefik and Voyager. The limitation of the helm chart is that it only support one WebLogic cluster as the backend.
2929

3030
1. Create and install the Ingress yaml manually.
3131
Manually edit the Ingress yaml file and then install it to the k8s cluster.
3232

3333
## Guide and samples for Traefik and Voyager/HAProxy
3434
Traefik and Voyager/HAProxy are both popular Ingress providers. We provide detail guide to install and configure these two Ingress providers, specially in front of WebLogic domain(s).
35-
- [Treafik guide](kubernetes/samples/charts/traefik/README.md)
36-
- [Voyager guide](kubernetes/samples/charts/voyager/README.md)
35+
- [Treafik guide](../kubernetes/samples/charts/traefik/README.md)
36+
- [Voyager guide](../kubernetes/samples/charts/voyager/README.md)
3737

3838
We also provide Ingress samples for these two Ingress providers, with multiple WebLogic clusters as the backends and covering different routing rules, host-routing and path-routing, and TLS termination.
39-
- [Treafik samples](kubernetes/samples/charts/traefik/samples)
40-
- [Voyager samples](kubernetes/samples/charts/voyager/samples)
39+
- [Treafik samples](../kubernetes/samples/charts/traefik/samples)
40+
- [Voyager samples](../kubernetes/samples/charts/voyager/samples)
4141

4242

4343

0 commit comments

Comments
 (0)