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

refactor: use kubernetes custom resource to execute helm install #11

Open
AmitKumarDas opened this issue Sep 2, 2020 · 0 comments
Open
Assignees

Comments

@AmitKumarDas
Copy link

ProblemStatement: I want to simplify below codebase by dividing them into two separate blocks where each block is embedded into specific Kubernetes custom resources. These custom resources should be invoked only if they satisfy the eligibility criteria. These custom resources are engineered to handle executing the terminal commands as well as their outputs (stdop, stderr, streaming, timeout, retries, etc).

if [ "$USE_KUBERA_REPO" == "true" ]
then

  echo -e "\nDeploying Kubera using kubera-charts repo\n"
  echo -e "\nCloning $KUBERA_BRANCH branch of kubera-charts repo\n"
  git clone -b "$KUBERA_BRANCH" https://"$GIT_USERNAME":"$GIT_PASSWORD"@github.com/mayadata-io/kubera-charts.git
  cd kubera-charts

  echo -e "\nSet release version,openebsRCEnable,maxMemberCountInOneProject and URL"
  echo -e "\nInstalling Kubera using kubera-charts/values.yaml"
  helm install --namespace kubera kubera \
  --set server.url="$URL" \
  --set server.release="$RELEASE" \
  --set server.openebsRCEnable=true \
  --set server.maxMemberCountInOneProject=50 -f values.yaml .

else

  echo -e "\nDeploying Kubera using official Kubera charts\n"
  helm repo update

  echo -e "\nAdd kubera in local repository"
  helm repo add kubera https://charts.mayadata.io/

  echo -e "\nApply helm chart"
  helm install kubera kubera/kubera-charts \
  --set server.url="$URL" \
  --set server.release="$RELEASE" \
  --set server.maxMemberCountInOneProject=100 \
  --set server.openebsRCEnable=true \
  -n kubera

fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants