#!/bin/bash

# ID of your Azure subscription
export SUBSCRIPTION_ID=

# globally unique and only lowercase alphanumeric characters allowed
# only lowercase alphanumeric characters, example: terraform33fef3fgs
export STORAGE_ACCOUNT_NAME=

# unique within Azure subscription
# example: nevis-cluster
export RESOURCE_GROUP_NAME=

# The name of the Resource Group where the Kubernetes Nodes should exist.
# unique within Azure subscription
# example: nevis-cluster-nodes
export NODE_RESOURCE_GROUP_NAME=

# name of the Kubernetes cluster, recommended to be the same as the resource group name
# example: nevis-cluster
export CLUSTER_NAME=

export VNET_NAME="${RESOURCE_GROUP_NAME}-vnet"

# azure location where the resources will be created
export LOCATION="West Europe"

#location in short, lowercase format, for example "westeurope" instead of "West Europe", "eastus2" instead of "East US 2" etc.
export LOCATION_DNS="westeurope"

# Kubernetes version to use on the cluster (this guide currently only support 1.20.*, 1.21*, 1.22* and 1.23.*)
# Default version could be outdated, command to list available versions:
# az aks get-versions --location 'West Europe' -o table |grep ^1.23 |cut -f 1 -d" "
export KUBERNETES_VERSION="1.25.6"

# VM type for the cluster nodes. More info about possible options: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/compute-benchmark-scores
# Because of the way memory is reserved: https://docs.microsoft.com/en-us/azure/aks/concepts-clusters-workloads#resource-reservations
# a VM type with at least 16GB of memory is recommended. By default 2 node will be created, which later can be easily scaled up or down.
export VM_SIZE="Standard_D4s_v5"

# unique within Azure region
# example: nevisk8s, default domain will have the following format:  DNS_PREFIX.LOCATION_DNS.cloudapp.azure.com
export DNS_PREFIX=

# option to enable role based access control, for more information visit: https://kubernetes.io/docs/reference/access-authn-authz/rbac/
export RBAC_ENABLED="true"

# Information used for the Certificate Signing Request in automatic key management, by the nevisOperator
# example CH
export CSR_COUNTRY=
# example Zurich
export CSR_PROVINCE=
# example Zurich
export CSR_LOCALITY=
# example Nevis Security AG
export CSR_ORGANIZATION=
# example Nevis
export CRS_ORGANIZATIONAL_UNIT=
# example no-reply@nevis-security.com
export CSR_EMAIL_ADDRESS=

# name of the database server, has to be unique
# example nevisk8smariadb
export DB_SERVER=

# user name of the root user for the database server, can't be "root"
# example: dbroot
export DB_ROOT_USER=

# admin user of the Kubernetes cluster, can't be "admin"
# example k8sadmin
export ADMIN_USER=

# the database user that will be created for admin4, to do the schema updates in the database
# example: schemauser
export ADMIN4DB_SCHEMA_USER=

# the password for the schema user
export ADMIN4DB_SCHEMA_PASSWORD=

# the database user that will be created for admin4, to connect to the database during operation
# example: applicationuser
export ADMIN4DB_APP_USER=

# the password for the application user
export ADMIN4DB_APP_PASSWORD=

# globally unique DNS label, only lowercase alphanumeric characters allowed / the registry will be accessible at <CONTAINER_REGISTRY_NAME>.azurecr.io
# example: nevisk8s
export CONTAINER_REGISTRY_NAME=

# GIT deployment repository
# example: git@github.com:nevis/deploy.git
export GIT_URL=

# private key to deploy to GIT( reads the previously generated key file)
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export PRIVATE_KEY=`cat $DIR/id_rsa`

# key to access storage (generated by resource group creation, will be added after cluster bootstrapping is done)
export ARM_ACCESS_KEY=

# DB root password (generated by cluster creation, will be added after kubernetes is set up)
export DB_ROOT_PASSWORD=

# public IPs to access ingress (generated by cluster creation, will be added after kubernetes is set up)
export PUBLIC_IP=
