Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

for demo install support if istio use revision install #213

Merged
Show file tree
Hide file tree
Changes from 2 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
19 changes: 19 additions & 0 deletions demo/common_func.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash


#set -x

function LabelIstioInjectLabel()
{
ns=$1
echo $ns
label=`kubectl get po -n istio-system |grep istiod | awk '{print $1}' |xargs kubectl get po -o yaml -n istio-system |grep -A 1 REVIS |grep value: |awk '{print $2}'`
echo $label
if [ $label != "" ];then
kubectl label namespace $ns istio.io/rev=$label --overwrite
else
kubectl label namespace $ns istio-injection=enabled --overwrite=true
fi
return 0;
}

6 changes: 4 additions & 2 deletions demo/dubbo/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
# limitations under the License.

BASEDIR=$(dirname "$0")
source $BASEDIR/../common_func.sh


kubectl create ns dubbo
kubectl label namespace dubbo istio-injection=enabled --overwrite=true
LabelIstioInjectLabel dubbo
kubectl apply -f $BASEDIR/dubbo-sample.yaml -n dubbo
kubectl apply -f $BASEDIR/serviceentry.yaml -n dubbo
kubectl apply -f $BASEDIR/destinationrule.yaml -n dubbo
kubectl apply -f $BASEDIR/virtualservice-traffic-splitting.yaml -n dubbo
kubectl apply -f $BASEDIR/virtualservice-traffic-splitting.yaml -n dubbo
4 changes: 3 additions & 1 deletion demo/kafka/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
# limitations under the License.

BASEDIR=$(dirname "$0")
source $BASEDIR/../common_func.sh


kubectl create ns kafka
kubectl label namespace kafka istio-injection=enabled --overwrite=true
LabelIstioInjectLabel kafka
helm repo add zhaohuabing https://zhaohuabing.github.io/helm-repo
helm repo update
helm install my-release --set persistence.enabled=false --set zookeeper.persistence.enabled=false zhaohuabing/kafka -n kafka
Expand Down
6 changes: 4 additions & 2 deletions demo/metaprotocol-dubbo/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
# limitations under the License.

BASEDIR=$(dirname "$0")
source $BASEDIR/../common_func.sh


kubectl create ns meta-dubbo
kubectl label namespace meta-dubbo istio-injection=enabled --overwrite=true
LabelIstioInjectLabel meta-dubbo
kubectl apply -f $BASEDIR/../../k8s/aeraki-bootstrap-config.yaml -n meta-dubbo
kubectl apply -f $BASEDIR/dubbo-sample.yaml -n meta-dubbo
kubectl apply -f $BASEDIR/serviceentry.yaml -n meta-dubbo
kubectl apply -f $BASEDIR/destinationrule.yaml -n meta-dubbo
kubectl apply -f $BASEDIR/destinationrule.yaml -n meta-dubbo
6 changes: 4 additions & 2 deletions demo/metaprotocol-qza/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
# limitations under the License.

BASEDIR=$(dirname "$0")
source $BASEDIR/../common_func.sh


kubectl create ns meta-qza
kubectl label namespace meta-qza istio-injection=enabled --overwrite=true
LabelIstioInjectLabel meta-qza
kubectl apply -f $BASEDIR/qza-protocol.yaml -n istio-system
kubectl apply -f $BASEDIR/../../k8s/aeraki-bootstrap-config.yaml -n meta-qza
kubectl apply -f $BASEDIR/qza-sample.yaml -n meta-qza
kubectl apply -f $BASEDIR/destinationrule.yaml -n meta-qza
kubectl apply -f $BASEDIR/destinationrule.yaml -n meta-qza
6 changes: 4 additions & 2 deletions demo/metaprotocol-thrift/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
# limitations under the License.

BASEDIR=$(dirname "$0")
source $BASEDIR/../common_func.sh


kubectl create ns meta-thrift
kubectl label namespace meta-thrift istio-injection=enabled --overwrite=true
LabelIstioInjectLabel meta-thrift
kubectl apply -f $BASEDIR/../../k8s/aeraki-bootstrap-config.yaml -n meta-thrift
kubectl apply -f $BASEDIR/thrift-sample.yaml -n meta-thrift
kubectl apply -f $BASEDIR/destinationrule.yaml -n meta-thrift
kubectl create cm rate-limit-config -n meta-thrift --from-file $BASEDIR/rate-limit-server/config.yaml
kubectl apply -f $BASEDIR/rate-limit-server/rate-limit-server.yaml -n meta-thrift
kubectl apply -f $BASEDIR/rate-limit-server/rate-limit-server.yaml -n meta-thrift
6 changes: 4 additions & 2 deletions demo/metaprotocol-trpc/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
# limitations under the License.

BASEDIR=$(dirname "$0")
source $BASEDIR/../common_func.sh


kubectl create ns meta-trpc
kubectl label namespace meta-trpc istio-injection=enabled --overwrite=true
LabelIstioInjectLabel meta-trpc
kubectl apply -f $BASEDIR/trpc-protocol.yaml -n istio-system
kubectl apply -f $BASEDIR/../../k8s/aeraki-bootstrap-config.yaml -n meta-trpc
kubectl apply -f $BASEDIR/trpc-sample.yaml -n meta-trpc
kubectl apply -f $BASEDIR/destinationrule.yaml -n meta-trpc
kubectl apply -f $BASEDIR/destinationrule.yaml -n meta-trpc
6 changes: 4 additions & 2 deletions demo/metaprotocol-videopacket/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
# limitations under the License.

BASEDIR=$(dirname "$0")
source $BASEDIR/../common_func.sh


kubectl create ns meta-videopacket
kubectl label namespace meta-videopacket istio-injection=enabled --overwrite=true
LabelIstioInjectLabel meta-videopacket
kubectl apply -f $BASEDIR/videopacket-protocol.yaml -n istio-system
kubectl apply -f $BASEDIR/../../k8s/aeraki-bootstrap-config.yaml -n meta-videopacket
kubectl apply -f $BASEDIR/videopacket-sample.yaml -n meta-videopacket
kubectl apply -f $BASEDIR/destinationrule.yaml -n meta-videopacket
kubectl apply -f $BASEDIR/destinationrule.yaml -n meta-videopacket
6 changes: 4 additions & 2 deletions demo/thrift/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
# limitations under the License.

BASEDIR=$(dirname "$0")
source $BASEDIR/../common_func.sh


kubectl create ns thrift
kubectl label namespace thrift istio-injection=enabled --overwrite=true
LabelIstioInjectLabel thrift
kubectl apply -f $BASEDIR/thrift-sample.yaml -n thrift
kubectl apply -f $BASEDIR/destinationrule.yaml -n thrift
kubectl apply -f $BASEDIR/virtualservice-traffic-splitting.yaml -n thrift
kubectl apply -f $BASEDIR/virtualservice-traffic-splitting.yaml -n thrift