Skip to content
Snippets Groups Projects
Commit 66139967 authored by Siarhei Poliak [EPAM / GCP]'s avatar Siarhei Poliak [EPAM / GCP] Committed by Oleksandr Kosse (EPAM)
Browse files

Gonrg 10405 cleanup bm related code

parent 818b3e15
No related branches found
No related tags found
1 merge request!609Gonrg 10405 cleanup bm related code
......@@ -20,28 +20,13 @@
## Common:
# - LEGAL_HOST
# - DATA_PARTITION_ID
## Baremetal:
# - OPENID_PROVIDER_URL
# - OPENID_PROVIDER_CLIENT_ID
# - OPENID_PROVIDER_CLIENT_SECRET
set -ex
get_token() {
if [ "${ONPREM_ENABLED}" == "true" ]; then
# id token
TOKEN="$(curl --location --silent --globoff --request POST "${OPENID_PROVIDER_URL}/protocol/openid-connect/token" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "grant_type=client_credentials" \
--data-urlencode "scope=openid" \
--data-urlencode "client_id=${OPENID_PROVIDER_CLIENT_ID}" \
--data-urlencode "client_secret=${OPENID_PROVIDER_CLIENT_SECRET}" | jq -r ".id_token")"
export TOKEN
else
# access token
TOKEN="$(gcloud auth print-access-token)"
export TOKEN
fi
}
update_legal_status() {
......@@ -66,11 +51,6 @@ update_legal_status() {
# Check variables
source ./validate-env.sh "PARTITION_HOST"
source ./validate-env.sh "LEGAL_HOST"
if [[ "${ONPREM_ENABLED}" == "true" ]]; then
source ./validate-env.sh "OPENID_PROVIDER_URL"
source ./validate-env.sh "OPENID_PROVIDER_CLIENT_ID"
source ./validate-env.sh "OPENID_PROVIDER_CLIENT_SECRET"
fi
# Get list of partitions
status_code=$(curl --location --request GET \
......
......@@ -97,7 +97,6 @@ First you need to set variables in **values.yaml** file using any code editor. S
| Name | Description | Type | Default |Required |
|------|-------------|------|---------|---------|
**global.domain** | your domain for the external endpoint, ex `example.com` | string | - | yes
**global.onPremEnabled** | whether on-prem is enabled | boolean | `false` | yes
**global.limitsEnabled** | whether CPU and memory limits are enabled | boolean | `true` | yes
**global.logLevel** | severity of logging level | string | `ERROR` | yes
**global.tier** | Only PROD must be used to enable autoscaling | string | "" | no
......
......@@ -6,4 +6,3 @@ metadata:
data:
LEGAL_HOST: {{ .Values.data.legalHost | quote }}
PARTITION_HOST: {{ .Values.data.partitionHost | quote }}
ONPREM_ENABLED: {{ .Values.global.onPremEnabled | quote }}
......@@ -4,7 +4,6 @@
global:
domain: ""
onPremEnabled: false
limitsEnabled: true
logLevel: "ERROR"
tier: ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment