#!/bin/bash

mkdir -p /etc/deploy
echo $PRED_CONFIG |base64 -d > $KUBECONFIG
sed -i s/APPNAME/$CONTAINER_NAME/g deployment-pred.yaml
sed -i s/NAMESPACE/$PRED_REPO/g deployment-pred.yaml
sed -i s/CONPORT/$PORT/g deployment-pred.yaml
sed -i s/TAG/$TAG/g deployment-pred.yaml
sed -i s/DOMAIN/$PRED_DOMAIN/g deployment-pred.yaml

if [ $1 ==1 ]
then
    kubectl apply -f deployment-pred.yaml
else 
    kubectl apply -f deployment-huidu.yaml
fi
