From c6bbbab81603e73e7f666289cfd6afefd5f14a4e Mon Sep 17 00:00:00 2001 From: Sandro Flausino Date: Wed, 31 Jan 2024 14:19:58 -0300 Subject: [PATCH 1/5] fix(prometheus-stack) fix prometheus-stack formula references from loki on dashboard creation. --- vkpr/loki/install/src/unix/formula/formula.sh | 7 +- vkpr/loki/install/src/utils/dashboard.yml | 653 ++++++++++++++++++ vkpr/loki/install/src/utils/datasource.json | 4 +- .../unix/formula/setting/prometheus-stack.sh | 7 +- .../install/src/utils/prometheus-stack.yaml | 6 + 5 files changed, 668 insertions(+), 9 deletions(-) create mode 100644 vkpr/loki/install/src/utils/dashboard.yml diff --git a/vkpr/loki/install/src/unix/formula/formula.sh b/vkpr/loki/install/src/unix/formula/formula.sh index cd6b96f5..5910fdfe 100755 --- a/vkpr/loki/install/src/unix/formula/formula.sh +++ b/vkpr/loki/install/src/unix/formula/formula.sh @@ -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" } @@ -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" @@ -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" \ diff --git a/vkpr/loki/install/src/utils/dashboard.yml b/vkpr/loki/install/src/utils/dashboard.yml new file mode 100644 index 00000000..76e58ba2 --- /dev/null +++ b/vkpr/loki/install/src/utils/dashboard.yml @@ -0,0 +1,653 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: grafana-loki-dashboards + labels: + grafana_dashboard: "vkpr" +data: + kubernetes.json: | + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "Universal and flexible dashboard for logging", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 12611, + "graphTooltip": 0, + "iteration": 1657313783623, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "datasource", + "uid": "Loki" + }, + "description": "Total Count of log lines in the specified time range", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "color": "rgb(31, 255, 7)", + "text": "0" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(31, 255, 7)", + "value": null + }, + { + "color": "rgb(31, 255, 7)", + "value": 10 + }, + { + "color": "rgb(31, 255, 7)", + "value": 50 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 11, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.0", + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "Loki" + }, + "expr": "sum(count_over_time(({container=\"$container\", pod=~\"$pod\"})[$__interval]))", + "hide": false, + "refId": "A" + } + ], + "title": "Total Count of logs", + "type": "stat" + }, + { + "datasource": { + "type": "datasource", + "uid": "Loki" + }, + "description": "Total Count: of $searchable_pattern in the specified time range", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "color": "rgb(222, 15, 43)", + "text": "0" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(222, 15, 43)", + "value": null + }, + { + "color": "rgb(222, 15, 43)", + "value": 10 + }, + { + "color": "rgb(222, 15, 43)", + "value": 50 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 6, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.0", + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "Loki" + }, + "expr": "sum(count_over_time(({container=\"$container\", pod=~\"$pod\"} |~ \"(?i)$searchable_pattern\")[$__interval]))", + "hide": false, + "refId": "A" + } + ], + "title": "Total Count: of $searchable_pattern", + "type": "stat" + }, + { + "datasource": { + "type": "datasource", + "uid": "Loki" + }, + "description": "Live logs is a like 'tail -f' in a real time", + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 3 + }, + "id": 2, + "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": true, + "showTime": false, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "Loki" + }, + "expr": "{container=\"$container\", pod=~\"$pod\"}", + "hide": false, + "refId": "A" + } + ], + "title": "Live logs", + "type": "logs" + }, + { + "datasource": { + "uid": "${DS_NY-ALERTING2}" + }, + "gridPos": { + "h": 2, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 15, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.5.0", + "targets": [ + { + "refId": "A", + "target": "" + } + ], + "type": "text" + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "datasource", + "uid": "Loki" + }, + "decimals": 0, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 1, + "gridPos": { + "h": 9, + "w": 9, + "x": 0, + "y": 14 + }, + "hiddenSeries": false, + "id": 18, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 3, + "links": [], + "maxDataPoints": "", + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.5.0", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "Loki" + }, + "expr": "sum(count_over_time(({container=\"$container\", pod=~\"$pod\"} |~ \"(?i)$searchable_pattern\")[$__interval])) by (pod)", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Matched word: \"$searchable_pattern\" historical", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:425", + "decimals": 0, + "format": "short", + "label": "Count", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:426", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "datasource", + "uid": "Loki" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 10, + "gridPos": { + "h": 9, + "w": 9, + "x": 9, + "y": 14 + }, + "hiddenSeries": false, + "id": 10, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxDataPoints": 100, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.5.0", + "pointradius": 0.5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "Loki" + }, + "expr": "sum(rate(({container=\"$container\", pod=~\"$pod\"} |~ \"(?i)$searchable_pattern\")[30s])) by (pod)", + "hide": false, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "\"$searchable_pattern\" Rate per Pod", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:2804", + "format": "short", + "logBase": 10, + "show": true + }, + { + "$$hashKey": "object:2805", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "datasource": { + "type": "datasource", + "uid": "Loki" + }, + "fieldConfig": { + "defaults": { + "mappings": [ + { + "options": { + "match": "null", + "result": { + "color": "#299c46", + "text": "0" + } + }, + "type": "special" + } + ], + "max": 100, + "min": 0, + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#299c46", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 10 + }, + { + "color": "#C4162A", + "value": 50 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 6, + "x": 18, + "y": 14 + }, + "id": 9, + "links": [], + "maxDataPoints": 100, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": false + }, + "pluginVersion": "8.5.0", + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "Loki" + }, + "expr": "sum(count_over_time(({container=\"$container\", pod=~\"$pod\"} |~ \"(?i)$searchable_pattern\")[$__interval])) * 100 / sum(count_over_time(({container=\"$container\", pod=~\"$pod\"})[$__interval]))", + "hide": false, + "refId": "A" + } + ], + "title": "\"$searchable_pattern\" Percentage for specified time", + "type": "gauge" + } + ], + "refresh": "10s", + "schemaVersion": 36, + "style": "dark", + "tags": [ + "managed by vkpr", + "vkpr-loki", + "loki", + "vkpr", + "logging" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "datasource", + "value": "datasource" + }, + "datasource": { + "type": "datasource", + "uid": "Loki" + }, + "definition": "label_values({container=~\".+\"}, container)", + "hide": 0, + "includeAll": false, + "label": "Service", + "multi": false, + "name": "container", + "options": [], + "query": "label_values({container=~\".+\"}, container)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "datasource", + "uid": "Loki" + }, + "definition": "label_values({container=\"$container\"}, pod)", + "hide": 0, + "includeAll": true, + "label": "Pod", + "multi": false, + "name": "pod", + "options": [], + "query": "label_values({container=\"$container\"}, pod)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "error", + "value": "error" + }, + "hide": 0, + "label": "Search (case insensitive)", + "name": "searchable_pattern", + "options": [ + { + "selected": true, + "text": "", + "value": "" + } + ], + "query": "", + "skipUrlSync": false, + "type": "textbox" + } + ] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Logging Dashboard via datasource", + "weekStart": "" + } \ No newline at end of file diff --git a/vkpr/loki/install/src/utils/datasource.json b/vkpr/loki/install/src/utils/datasource.json index 9b5fffb4..d3c3014f 100644 --- a/vkpr/loki/install/src/utils/datasource.json +++ b/vkpr/loki/install/src/utils/datasource.json @@ -1,7 +1,7 @@ { - "name": "loki", + "name": "Loki", "type": "loki", - "url": "loki.vkpr:3100", + "url": "http://loki.vkpr:3100", "access": "proxy", "basicAuth": false, "editable": true diff --git a/vkpr/prometheus-stack/install/src/unix/formula/setting/prometheus-stack.sh b/vkpr/prometheus-stack/install/src/unix/formula/setting/prometheus-stack.sh index 3697a716..c9a782ee 100644 --- a/vkpr/prometheus-stack/install/src/unix/formula/setting/prometheus-stack.sh +++ b/vkpr/prometheus-stack/install/src/unix/formula/setting/prometheus-stack.sh @@ -1,12 +1,11 @@ #!/usr/bin/env bash settingPrometheusStack() { - [ $DRY_RUN = false ] && [ $LOKI = true ] && installLokiDatasource + [ $DRY_RUN = false ] && [ $LOKI = true ] && installLokiDatasource settingGrafanaValues settingPrometheusValues [[ "$VKPR_ENV_ALERTMANAGER" == true ]] && settingAlertManagerValues - if [[ "$VKPR_ENV_PROMETHEUS_STACK_EXPORTERS" == true ]]; then YQ_VALUES="$YQ_VALUES | .kubeApiServer.enabled = true | @@ -26,7 +25,7 @@ settingPrometheusStack() { YQ_VALUES="$YQ_VALUES | .grafana.additionalDataSources[0].name = \"Loki\" | .grafana.additionalDataSources[0].type = \"loki\" | - .grafana.additionalDataSources[0].url = \"http://loki.$VKPR_ENV_PROMETHEUS_STACK_NAMESPACE:3100\" | + .grafana.additionalDataSources[0].url = \"http://loki.$VKPR_ENV_LOKI_NAMESPACE:3100\" | .grafana.additionalDataSources[0].access = \"proxy\" | .grafana.additionalDataSources[0].basicAuth = false | .grafana.additionalDataSources[0].editable = true @@ -55,7 +54,7 @@ settingPrometheusStackEnvironment() { } installLokiDatasource(){ - if [[ $(checkPodName "$VKPR_ENV_PROMETHEUS_STACK_NAMESPACE" "loki-0") != "true" ]]; then + if [[ $(checkPodName "$VKPR_ENV_LOKI_NAMESPACE" "loki-0") != "true" ]]; then info "Initializing Loki to Prometheus-stack" [[ -f $CURRENT_PWD/vkpr.yaml ]] && cp "$CURRENT_PWD"/vkpr.yaml "$(dirname "$0")" rit vkpr loki install --default diff --git a/vkpr/prometheus-stack/install/src/utils/prometheus-stack.yaml b/vkpr/prometheus-stack/install/src/utils/prometheus-stack.yaml index fb6e0d5a..eada353b 100644 --- a/vkpr/prometheus-stack/install/src/utils/prometheus-stack.yaml +++ b/vkpr/prometheus-stack/install/src/utils/prometheus-stack.yaml @@ -22,6 +22,12 @@ grafana: enabled: true ingressClassName: nginx path: "/" + sidecar: + dashboards: + enabled: true + label: grafana_dashboard + labelValue: "vkpr" + searchNamespace: ALL dashboardsConfigMaps: homepage: homepage dashboardProviders: From d2eaad235989082c6fabcf3f4a3c24cb4b7bf5f9 Mon Sep 17 00:00:00 2001 From: Sandro Flausino Date: Fri, 1 Mar 2024 11:52:00 -0300 Subject: [PATCH 2/5] feat(postgresql) update postresql formula to estimate the volume of persistence --- vkpr/postgresql/install/config.json | 7 +++++++ vkpr/postgresql/install/src/unix/formula/formula.sh | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/vkpr/postgresql/install/config.json b/vkpr/postgresql/install/config.json index 0c01502f..69749d75 100755 --- a/vkpr/postgresql/install/config.json +++ b/vkpr/postgresql/install/config.json @@ -1,5 +1,12 @@ { "inputs": [ + { + "tutorial": "Specifies if the application will have High Availability", + "label": "Persistance ? (default is 8Gi)", + "name": "PERSISTANCE", + "type": "text", + "default": "8Gi" + }, { "tutorial": "Specifies if the application will have High Availability", "label": "HA ?", diff --git a/vkpr/postgresql/install/src/unix/formula/formula.sh b/vkpr/postgresql/install/src/unix/formula/formula.sh index 57c54933..90290bdf 100755 --- a/vkpr/postgresql/install/src/unix/formula/formula.sh +++ b/vkpr/postgresql/install/src/unix/formula/formula.sh @@ -36,7 +36,7 @@ formulaInputs() { checkGlobalConfig "$HA" "false" "postgresql.HA" "POSTGRESQL_HA" checkGlobalConfig "false" "false" "postgresql.metrics" "POSTGRESQL_METRICS" checkGlobalConfig "$VKPR_ENV_GLOBAL_NAMESPACE" "$VKPR_ENV_GLOBAL_NAMESPACE" "postgresql.namespace" "POSTGRESQL_NAMESPACE" - checkGlobalConfig "8Gi" "8Gi" "postgresql.persistanceSize" "POSTGRESQL_VOLUME_SIZE" + checkGlobalConfig "$PERSISTANCE" "8Gi" "postgresql.persistanceSize" "POSTGRESQL_VOLUME_SIZE" # External apps values checkGlobalConfig "$VKPR_ENV_GLOBAL_NAMESPACE" "$VKPR_ENV_GLOBAL_NAMESPACE" "prometheus-stack.namespace" "GRAFANA_NAMESPACE" From 1841db22e1b4852cd1cf5287bb38422de8ebd57f Mon Sep 17 00:00:00 2001 From: Sandro Flausino Date: Thu, 2 May 2024 15:24:20 -0300 Subject: [PATCH 3/5] update kong and postgresql charts version --- lib/versions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/versions.sh b/lib/versions.sh index 80a01b6a..5789d764 100644 --- a/lib/versions.sh +++ b/lib/versions.sh @@ -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" \ From 831444ea945b0c54d58bbb604f945fe2d257955d Mon Sep 17 00:00:00 2001 From: Sandro Flausino Date: Thu, 2 May 2024 15:24:53 -0300 Subject: [PATCH 4/5] fix label from kong basic auth secret --- vkpr/kong/install/src/unix/formula/objects.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vkpr/kong/install/src/unix/formula/objects.sh b/vkpr/kong/install/src/unix/formula/objects.sh index 25372cd0..2085874c 100644 --- a/vkpr/kong/install/src/unix/formula/objects.sh +++ b/vkpr/kong/install/src/unix/formula/objects.sh @@ -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" } From 14b97416b49e7e15229ff0cfefae659cc6e21411 Mon Sep 17 00:00:00 2001 From: Sandro Flausino Date: Thu, 2 May 2024 15:25:40 -0300 Subject: [PATCH 5/5] update kong image and new pattern from env admin_api_uri to admin_gui_api_url --- vkpr/kong/install/src/unix/formula/setting/kong-cp.sh | 4 ++-- vkpr/kong/install/src/unix/formula/setting/kong-dbless.sh | 4 ++-- .../kong/install/src/unix/formula/setting/kong-standard-ba.sh | 4 ++-- vkpr/kong/install/src/unix/formula/setting/kong-standard.sh | 4 ++-- vkpr/kong/install/src/utils/kong-cp.yaml | 4 ++-- vkpr/kong/install/src/utils/kong-dbless.yaml | 4 ++-- vkpr/kong/install/src/utils/kong-dp.yaml | 2 +- vkpr/kong/install/src/utils/kong-standard-ba.yaml | 4 ++-- vkpr/kong/install/src/utils/kong.yaml | 4 ++-- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/vkpr/kong/install/src/unix/formula/setting/kong-cp.sh b/vkpr/kong/install/src/unix/formula/setting/kong-cp.sh index d3df664a..10630af0 100644 --- a/vkpr/kong/install/src/unix/formula/setting/kong-cp.sh +++ b/vkpr/kong/install/src/unix/formula/setting/kong-cp.sh @@ -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 @@ -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\" " diff --git a/vkpr/kong/install/src/unix/formula/setting/kong-dbless.sh b/vkpr/kong/install/src/unix/formula/setting/kong-dbless.sh index c9c186b6..6f2c1090 100644 --- a/vkpr/kong/install/src/unix/formula/setting/kong-dbless.sh +++ b/vkpr/kong/install/src/unix/formula/setting/kong-dbless.sh @@ -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\" @@ -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 diff --git a/vkpr/kong/install/src/unix/formula/setting/kong-standard-ba.sh b/vkpr/kong/install/src/unix/formula/setting/kong-standard-ba.sh index 54c35c9a..5bb5136e 100644 --- a/vkpr/kong/install/src/unix/formula/setting/kong-standard-ba.sh +++ b/vkpr/kong/install/src/unix/formula/setting/kong-standard-ba.sh @@ -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 @@ -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\" diff --git a/vkpr/kong/install/src/unix/formula/setting/kong-standard.sh b/vkpr/kong/install/src/unix/formula/setting/kong-standard.sh index e6933716..12d05edd 100644 --- a/vkpr/kong/install/src/unix/formula/setting/kong-standard.sh +++ b/vkpr/kong/install/src/unix/formula/setting/kong-standard.sh @@ -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 @@ -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\" diff --git a/vkpr/kong/install/src/utils/kong-cp.yaml b/vkpr/kong/install/src/utils/kong-cp.yaml index df6a2ffe..c0c861e9 100644 --- a/vkpr/kong/install/src/utils/kong-cp.yaml +++ b/vkpr/kong/install/src/utils/kong-cp.yaml @@ -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: @@ -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 diff --git a/vkpr/kong/install/src/utils/kong-dbless.yaml b/vkpr/kong/install/src/utils/kong-dbless.yaml index a92f4d71..a3abcffa 100644 --- a/vkpr/kong/install/src/utils/kong-dbless.yaml +++ b/vkpr/kong/install/src/utils/kong-dbless.yaml @@ -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 diff --git a/vkpr/kong/install/src/utils/kong-dp.yaml b/vkpr/kong/install/src/utils/kong-dp.yaml index 849d808f..59e0ec45 100644 --- a/vkpr/kong/install/src/utils/kong-dp.yaml +++ b/vkpr/kong/install/src/utils/kong-dp.yaml @@ -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: diff --git a/vkpr/kong/install/src/utils/kong-standard-ba.yaml b/vkpr/kong/install/src/utils/kong-standard-ba.yaml index 352c1409..b56a1cbf 100644 --- a/vkpr/kong/install/src/utils/kong-standard-ba.yaml +++ b/vkpr/kong/install/src/utils/kong-standard-ba.yaml @@ -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 diff --git a/vkpr/kong/install/src/utils/kong.yaml b/vkpr/kong/install/src/utils/kong.yaml index da67d4f4..846aa86b 100644 --- a/vkpr/kong/install/src/utils/kong.yaml +++ b/vkpr/kong/install/src/utils/kong.yaml @@ -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: @@ -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