Skip to content

Commit

Permalink
Merge pull request #167 from sjflausino/main
Browse files Browse the repository at this point in the history
1.3.10
  • Loading branch information
sjflausino authored Jun 12, 2024
2 parents 2694f87 + 95ec242 commit ba20119
Show file tree
Hide file tree
Showing 18 changed files with 698 additions and 32 deletions.
6 changes: 3 additions & 3 deletions lib/versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ export VKPR_EXTERNAL_DNS_VERSION="1.10.1" \
VKPR_KEYCLOAK_VERSION="14.1.0" \
VKPR_LOKI_VERSION="2.9.11" \
VKPR_PROMETHEUS_STACK_VERSION="55.5.0" \
VKPR_POSTGRESQL_VERSION="12.5.1" \
VKPR_POSTGRESQL_HA_VERSION="11.6.1" \
VKPR_POSTGRESQL_VERSION="15.2.1" \
VKPR_POSTGRESQL_HA_VERSION="14.0.0" \
VKPR_INGRESS_NGINX_VERSION="4.7.0" \
VKPR_CERT_MANAGER_VERSION="v1.12.3" \
VKPR_KONG_VERSION="2.19.0" \
VKPR_KONG_VERSION="2.37.0" \
VKPR_CONSUL_VERSION="1.2.1" \
VKPR_VAULT_VERSION="0.25.0" \
VKPR_ARGOCD_VERSION="5.42.3" \
Expand Down
4 changes: 2 additions & 2 deletions vkpr/kong/install/src/unix/formula/objects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ createKongSecretsBasicAuth() {
local DRY_FLAG="$(dryRunK8s "kong-admin-basicauth")"

eval $VKPR_KUBECTL create secret generic kong-admin-basicauth -n $VKPR_ENV_KONG_NAMESPACE \
--from-literal="kongCredType=basic-auth" \
--from-literal=username=kong_admin \
--from-literal=password=$VKPR_ENV_KONG_RBAC_ADMIN_PASSWORD $DRY_FLAG

RESULT=$?
debug "Create $PG_SECRET status = $RESULT"
[ $DRY_RUN = false ] && trace "$($VKPR_KUBECTL label secret/kong-admin-basicauth app\.kubernetes\.io/managed-by=vkpr "$KONG_NAMESPACE")"
[ $DRY_RUN = false ] && trace "$($VKPR_KUBECTL label secret/kong-admin-basicauth app\.kubernetes\.io/managed-by=vkpr "$KONG_NAMESPACE")" && \
trace "$($VKPR_KUBECTL label secret/kong-admin-basicauth konghq\.com/credential=basic-auth "$KONG_NAMESPACE")"
debug "kong-admin-basicauth"
}

Expand Down
4 changes: 2 additions & 2 deletions vkpr/kong/install/src/unix/formula/setting/kong-cp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ settingKong() {
.admin.ingress.hostname = \"api.manager.$VKPR_ENV_GLOBAL_DOMAIN\" |
.manager.ingress.hostname = \"manager.$VKPR_ENV_GLOBAL_DOMAIN\" |
.env.admin_gui_url = \"https://manager.$VKPR_ENV_GLOBAL_DOMAIN\" |
.env.admin_api_uri = \"https://api.manager.$VKPR_ENV_GLOBAL_DOMAIN\" |
.env.admin_gui_api_url = \"https://api.manager.$VKPR_ENV_GLOBAL_DOMAIN\" |
"
fi

Expand Down Expand Up @@ -118,7 +118,7 @@ settingKongProvider(){
.admin.annotations.[\"dev.okteto.com/auto-ingress\"] = \"true\" |
.manager.annotations.[\"dev.okteto.com/auto-ingress\"] = \"true\" |
.env.admin_gui_url = \"https://kong-kong-manager-$OKTETO_NAMESPACE.cloud.okteto.net\" |
.env.admin_api_uri = \"https://kong-kong-admin-$OKTETO_NAMESPACE.cloud.okteto.net\" |
.env.admin_gui_api_url = \"https://kong-kong-admin-$OKTETO_NAMESPACE.cloud.okteto.net\" |
.env.pg_host = \"postgres-postgresql\" |
.env.pg_password.valueFrom.secretKeyRef.key = \"postgres-password\"
"
Expand Down
4 changes: 2 additions & 2 deletions vkpr/kong/install/src/unix/formula/setting/kong-dbless.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ settingKong() {
YQ_VALUES="$YQ_VALUES |
.proxy.annotations.[\"external-dns.alpha.kubernetes.io/hostname\"] = \"$VKPR_ENV_GLOBAL_DOMAIN\" |
.env.admin_gui_url = \"https://manager.$VKPR_ENV_GLOBAL_DOMAIN\" |
.env.admin_api_uri = \"https://manager.$VKPR_ENV_GLOBAL_DOMAIN\" |
.env.admin_gui_api_url = \"https://manager.$VKPR_ENV_GLOBAL_DOMAIN\" |
.env.proxy_url = \"https://$VKPR_ENV_GLOBAL_DOMAIN\" |
.admin.ingress.hostname = \"manager.$VKPR_ENV_GLOBAL_DOMAIN\" |
.manager.ingress.hostname = \"manager.$VKPR_ENV_GLOBAL_DOMAIN\"
Expand Down Expand Up @@ -105,7 +105,7 @@ settingKongProvider(){
.proxy.annotations.[\"dev.okteto.com/auto-ingress\"] = \"true\" |
.proxy.type = \"ClusterIP\" |
.env.admin_gui_url = \"https://kong-kong-manager-$OKTETO_NAMESPACE.cloud.okteto.net\" |
.env.admin_api_uri = \"https://kong-kong-admin-$OKTETO_NAMESPACE.cloud.okteto.net\" |
.env.admin_gui_api_url = \"https://kong-kong-admin-$OKTETO_NAMESPACE.cloud.okteto.net\" |
.env.proxy_url = \"https://kong-kong-proxy-$OKTETO_NAMESPACE.cloud.okteto.net\"
"
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ settingKong() {
.manager.ingress.hostname = \"manager.$VKPR_ENV_GLOBAL_DOMAIN\" |
.env.proxy_url = \"https://$VKPR_ENV_GLOBAL_DOMAIN\" |
.env.admin_gui_url = \"https://manager.$VKPR_ENV_GLOBAL_DOMAIN/manager\" |
.env.admin_api_uri = \"https://manager.$VKPR_ENV_GLOBAL_DOMAIN\"
.env.admin_gui_api_url = \"https://manager.$VKPR_ENV_GLOBAL_DOMAIN\"
"
fi

Expand Down Expand Up @@ -147,7 +147,7 @@ settingKongProvider(){
.proxy.annotations.[\"dev.okteto.com/auto-ingress\"] = \"true\" |
.proxy.type = \"ClusterIP\" |
.env.admin_gui_url = \"https://kong-kong-manager-$OKTETO_NAMESPACE.cloud.okteto.net\" |
.env.admin_api_uri = \"https://kong-kong-admin-$OKTETO_NAMESPACE.cloud.okteto.net\" |
.env.admin_gui_api_url = \"https://kong-kong-admin-$OKTETO_NAMESPACE.cloud.okteto.net\" |
.env.proxy_url = \"https://kong-kong-proxy-$OKTETO_NAMESPACE.cloud.okteto.net\" |
.env.pg_host = \"postgres-postgresql\" |
.env.pg_password.valueFrom.secretKeyRef.key = \"postgres-password\"
Expand Down
4 changes: 2 additions & 2 deletions vkpr/kong/install/src/unix/formula/setting/kong-standard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ settingKong() {
.manager.ingress.hostname = \"manager.$VKPR_ENV_GLOBAL_DOMAIN\" |
.env.proxy_url = \"https://$VKPR_ENV_GLOBAL_DOMAIN\" |
.env.admin_gui_url = \"https://manager.$VKPR_ENV_GLOBAL_DOMAIN/manager\" |
.env.admin_api_uri = \"https://manager.$VKPR_ENV_GLOBAL_DOMAIN\"
.env.admin_gui_api_url = \"https://manager.$VKPR_ENV_GLOBAL_DOMAIN\"
"
fi

Expand Down Expand Up @@ -147,7 +147,7 @@ settingKongProvider(){
.proxy.annotations.[\"dev.okteto.com/auto-ingress\"] = \"true\" |
.proxy.type = \"ClusterIP\" |
.env.admin_gui_url = \"https://kong-kong-manager-$OKTETO_NAMESPACE.cloud.okteto.net\" |
.env.admin_api_uri = \"https://kong-kong-admin-$OKTETO_NAMESPACE.cloud.okteto.net\" |
.env.admin_gui_api_url = \"https://kong-kong-admin-$OKTETO_NAMESPACE.cloud.okteto.net\" |
.env.proxy_url = \"https://kong-kong-proxy-$OKTETO_NAMESPACE.cloud.okteto.net\" |
.env.pg_host = \"postgres-postgresql\" |
.env.pg_password.valueFrom.secretKeyRef.key = \"postgres-password\"
Expand Down
4 changes: 2 additions & 2 deletions vkpr/kong/install/src/utils/kong-cp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
pg_port: 5432
log_level: notice
admin_gui_url: "http://manager.localhost:8000"
admin_api_uri: "http://api.manager.localhost:8000"
admin_gui_api_url: "http://api.manager.localhost:8000"
admin_session_conf:
valueFrom:
secretKeyRef:
Expand All @@ -32,7 +32,7 @@ env:
key: password
image:
repository: kong/kong-gateway
tag: "3.2.2.1-amazonlinux-2022"
tag: "3.4.3.7-20240423-amazonlinux-2023"
admin:
enabled: true
type: ClusterIP
Expand Down
4 changes: 2 additions & 2 deletions vkpr/kong/install/src/utils/kong-dbless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ env:
log_level: notice
admin_gui_url: "http://manager.localhost:8000"
admin_gui_path: "/manager"
admin_api_uri: "http://manager.localhost:8000"
admin_gui_api_url: "http://manager.localhost:8000"
proxy_url: "http://localhost:8000"
image:
repository: kong/kong-gateway
tag: "3.2.2.1-amazonlinux-2022"
tag: "3.4.3.7-20240423-amazonlinux-2023"
admin:
enabled: true
type: ClusterIP
Expand Down
2 changes: 1 addition & 1 deletion vkpr/kong/install/src/utils/kong-dp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
proxy_url: "http://localhost:8000"
image:
repository: kong/kong-gateway
tag: "3.2.2.1-amazonlinux-2022"
tag: "3.4.3.7-20240423-amazonlinux-2023"
admin:
enabled: false
proxy:
Expand Down
4 changes: 2 additions & 2 deletions vkpr/kong/install/src/utils/kong-standard-ba.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ env:
proxy_url: "http://localhost:8000"
admin_gui_url: "http://manager.localhost:8000"
admin_gui_path: "/manager"
admin_api_uri: "http://manager.localhost:8000"
admin_gui_api_url: "http://manager.localhost:8000"
image:
repository: kong/kong-gateway
tag: "3.2.2.1-amazonlinux-2022"
tag: "3.4.3.7-20240423-amazonlinux-2023"
admin:
annotations:
konghq.com/plugins: kong-admin-basicauth
Expand Down
4 changes: 2 additions & 2 deletions vkpr/kong/install/src/utils/kong.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
proxy_url: "http://localhost:8000"
admin_gui_url: "http://manager.localhost:8000"
admin_gui_path: "/manager"
admin_api_uri: "http://manager.localhost:8000"
admin_gui_api_url: "http://manager.localhost:8000"
admin_session_conf:
valueFrom:
secretKeyRef:
Expand All @@ -30,7 +30,7 @@ env:
key: password
image:
repository: kong/kong-gateway
tag: "3.2.2.1-amazonlinux-2022"
tag: "3.4.3.7-20240423-amazonlinux-2023"
admin:
enabled: true
type: ClusterIP
Expand Down
7 changes: 4 additions & 3 deletions vkpr/loki/install/src/unix/formula/formula.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ existGrafana() {
PWD_GRAFANA=$($VKPR_KUBECTL get secret --namespace "$VKPR_ENV_GRAFANA_NAMESPACE" prometheus-stack-grafana -o=jsonpath="{.data.admin-password}" | base64 -d)
debug "server=grafana login=$LOGIN_GRAFANA password=$PWD_GRAFANA"

createGrafanaDashboard "$(dirname "$0")/utils/dashboard.json" "$VKPR_ENV_GRAFANA_NAMESPACE"
# createGrafanaDashboard "$(dirname "$0")/utils/dashboard.json" "$VKPR_ENV_GRAFANA_NAMESPACE"
$VKPR_KUBECTL apply -f "$(dirname "$0")/utils/dashboard.yml" -n $VKPR_ENV_LOKI_NAMESPACE
createGrafanaDatasource "$LOGIN_GRAFANA" "$PWD_GRAFANA"
}

Expand All @@ -108,7 +109,7 @@ createGrafanaDatasource() {

EXIST_LOKI_DATASOURCE=$(curl -skX GET -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN_API_GRAFANA" \
http://$GRAFANA_ADDRESS/api/datasources/name/loki
http://$GRAFANA_ADDRESS/api/datasources/name/Loki
)
debug "$EXIST_LOKI_DATASOURCE"

Expand All @@ -117,7 +118,7 @@ createGrafanaDatasource() {
return
fi

local LOKI_DATASOURCE=$($VKPR_JQ -e ".url = \"loki.$VKPR_ENV_LOKI_NAMESPACE:3100\"" "$(dirname "$0")"/utils/datasource.json)
local LOKI_DATASOURCE=$($VKPR_JQ -e ".url = \"http://loki.$VKPR_ENV_LOKI_NAMESPACE:3100\"" "$(dirname "$0")"/utils/datasource.json)

curl -sK -X -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN_API_GRAFANA" \
-d "$LOKI_DATASOURCE" \
Expand Down
Loading

0 comments on commit ba20119

Please sign in to comment.