Skip to content

Commit

Permalink
style(lint): fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jpeedroza committed May 5, 2022
1 parent ba32d5d commit c0e0690
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 24 deletions.
18 changes: 9 additions & 9 deletions vkpr/aws/eks/init/src/unix/formula/formula.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,21 @@ setVariablesGLAB() {
}

cloneRepository() {
git clone -q https://"$GITLAB_USERNAME":"$GITLAB_TOKEN"@gitlab.com/"$GITLAB_USERNAME"/aws-eks.git $VKPR_HOME/tmp/aws-eks
cd "$VKPR_HOME"/tmp/aws-eks
git clone -q https://"$GITLAB_USERNAME":"$GITLAB_TOKEN"@gitlab.com/"$GITLAB_USERNAME"/aws-eks.git "$VKPR_HOME"/tmp/aws-eks
cd "$VKPR_HOME"/tmp/aws-eks || exit
$VKPR_YQ eval -i "del(.node_groups) |
.cluster_name = \"$VKPR_ENV_EKS_CLUSTER_NAME\" |
.cluster_version = \"$VKPR_ENV_EKS_K8S_VERSION\" |
.node_groups."${VKPR_ENV_EKS_CLUSTER_NAME}".desired_capacity = \"$EKS_CLUSTER_SIZE\" |
.node_groups."${VKPR_ENV_EKS_CLUSTER_NAME}".max_capacity = \"$(( $EKS_CLUSTER_SIZE + 2 ))\" |
.node_groups."${VKPR_ENV_EKS_CLUSTER_NAME}".min_capacity = \"$EKS_CLUSTER_SIZE\" |
.node_groups."${VKPR_ENV_EKS_CLUSTER_NAME}".ami_type = \"AL2_x86_64\" |
.node_groups."${VKPR_ENV_EKS_CLUSTER_NAME}".instance_types[0] = \"$VKPR_ENV_EKS_CLUSTER_NODE_INSTANCE_TYPE\" |
.node_groups."${VKPR_ENV_EKS_CLUSTER_NAME}".capacity_type = \"$VKPR_ENV_EKS_CAPACITY_TYPE\"
.node_groups.${VKPR_ENV_EKS_CLUSTER_NAME}.desired_capacity = \"$EKS_CLUSTER_SIZE\" |
.node_groups.${VKPR_ENV_EKS_CLUSTER_NAME}.max_capacity = \"$(( EKS_CLUSTER_SIZE + 2 ))\" |
.node_groups.${VKPR_ENV_EKS_CLUSTER_NAME}.min_capacity = \"$EKS_CLUSTER_SIZE\" |
.node_groups.${VKPR_ENV_EKS_CLUSTER_NAME}.ami_type = \"AL2_x86_64\" |
.node_groups.${VKPR_ENV_EKS_CLUSTER_NAME}.instance_types[0] = \"$VKPR_ENV_EKS_CLUSTER_NODE_INSTANCE_TYPE\" |
.node_groups.${VKPR_ENV_EKS_CLUSTER_NAME}.capacity_type = \"$VKPR_ENV_EKS_CAPACITY_TYPE\"
" "$VKPR_HOME"/tmp/aws-eks/config/defaults.yml
git checkout -b "$VKPR_ENV_EKS_CLUSTER_NAME"
git commit -am "[VKPR] Initial configuration defaults.yml"
git push --set-upstream origin "$VKPR_ENV_EKS_CLUSTER_NAME"
cd - > /dev/null
cd - > /dev/null || exit
rm -rf "$VKPR_HOME"/tmp/aws-eks
}
2 changes: 1 addition & 1 deletion vkpr/aws/rds/destroy/src/unix/formula/formula.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

runFormula() {
aws rds delete-db-instance \
--db-instance-identifier $RDS_INSTANCE_NAME \
--db-instance-identifier "$RDS_INSTANCE_NAME" \
--skip-final-snapshot 1> /dev/null && echo "Database destroyed"
}
12 changes: 4 additions & 8 deletions vkpr/aws/rds/init/src/unix/formula/formula.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
#!/bin/bash



runFormula() {

validateAwsSecretKey "$AWS_SECRET_KEY"
validateAwsAccessKey "$AWS_ACCESS_KEY"
validateAwsRegion "$AWS_REGION"

aws rds create-db-instance \
--db-instance-identifier $RDS_INSTANCE_NAME \
--db-instance-class $RDS_INSTANCE_TYPE \
--db-instance-identifier "$RDS_INSTANCE_NAME" \
--db-instance-class "$RDS_INSTANCE_TYPE" \
--engine postgres \
--master-username $DBUSER \
--master-user-password $DBPASSWORD \
--master-username "$DBUSER" \
--master-user-password "$DBPASSWORD" \
--allocated-storage 20 1> /dev/null && echo "Database created"


}
4 changes: 2 additions & 2 deletions vkpr/kong/install/src/unix/formula/formula.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ addDependencies(){
\"secret\": \"$(openssl rand -base64 32)\",
\"cookie_secure\": false,
\"storage\": \"kong\",
\"cookie_domain\": \"manager.%s\"
\"cookie_domain\": \".%s\"
}" "$VKPR_ENV_GLOBAL_DOMAIN" > /tmp/config/admin_gui_session_conf

printf "{
Expand All @@ -57,7 +57,7 @@ addDependencies(){
\"secret\": \"$(openssl rand -base64 32)\",
\"cookie_secure\": false,
\"storage\": \"kong\",
\"cookie_domain\": \"portal.%s\"
\"cookie_domain\": \".%s\"
}" "$VKPR_ENV_GLOBAL_DOMAIN" > /tmp/config/portal_session_conf

if [[ "$VKPR_ENV_KONG_DEPLOY" == "hybrid" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion vkpr/vault/install/src/unix/formula/formula.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ settingVault() {
.data.AWS_SECRET_KEY = \"$(echo -n "$AWS_SECRET_KEY" | base64)\" |
.data.AWS_REGION = \"$(echo -n "$AWS_REGION" | base64)\" |
.data.VAULT_AWSKMS_SEAL_KEY_ID = \"$(echo -n "$($VKPR_JQ -r .credential.kmskeyid $RIT_CREDENTIALS_PATH/aws)" | base64)\" |
.data.AWS_KMS_ENDPOINT = \"$(echo -n "kms."$AWS_REGION".amazonaws.com" | base64)\"
.data.AWS_KMS_ENDPOINT = \"$(echo -n "kms.$AWS_REGION.amazonaws.com" | base64)\"
" "$(dirname "$0")"/utils/auto-unseal.yaml | $VKPR_KUBECTL apply -f -
;;
azure)
Expand Down
6 changes: 3 additions & 3 deletions vkpr/whoami/install/src/unix/formula/formula.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ installWhoami() {
settingWhoami

$VKPR_YQ eval "$YQ_VALUES" "$VKPR_WHOAMI_VALUES" \
| $VKPR_HELM upgrade -i --version "$VKPR_WHOAMI_VERSION" $HELM_NAMESPACE \
| $VKPR_HELM upgrade -i --version "$VKPR_WHOAMI_VERSION" "$HELM_NAMESPACE" \
--wait -f - whoami cowboysysop/whoami
}

Expand All @@ -60,9 +60,9 @@ settingWhoami() {
}

settingWhoamiProvider() {
ACTUAL_CONTEXT=$($VKPR_KUBECTL config get-contexts --no-headers | grep \* | xargs | awk -F " " '{print $2}')
ACTUAL_CONTEXT=$($VKPR_KUBECTL config get-contexts --no-headers | grep "\*" | xargs | awk -F " " '{print $2}')
if [[ "$VKPR_ENV_GLOBAL_PROVIDER" == "okteto" ]] || [[ $ACTUAL_CONTEXT == "cloud_okteto_com" ]]; then
OKTETO_NAMESPACE=$($VKPR_KUBECTL config get-contexts --no-headers | grep \* | xargs | awk -F " " '{print $NF}')
OKTETO_NAMESPACE=$($VKPR_KUBECTL config get-contexts --no-headers | grep "\*" | xargs | awk -F " " '{print $NF}')
HELM_NAMESPACE=""
YQ_VALUES="$YQ_VALUES |
.ingress.enabled = \"false\" |
Expand Down

0 comments on commit c0e0690

Please sign in to comment.