From 69923fd46c6999e09f70a6d0001c81d9280fd307 Mon Sep 17 00:00:00 2001 From: coolworld2049 Date: Sun, 4 Jun 2023 05:23:46 +0300 Subject: [PATCH] monitoring --- .idea/dataSources.xml | 2 +- .idea/vcs.xml | 1 - deployment/k8s/cli.sh | 155 +- .../{issuer-staging.yaml => issuer.yaml} | 0 .../auth-postgresql-configmap.yaml | 5 +- deployment/k8s/k8s/auth/auth-configmap.yaml | 2 +- .../k8s/k8s/monitoring/dashboard-10000.json | 1459 +++++++++++++++++ .../k8s/monitoring/datasource-prometheus.yaml | 9 + .../k8s/k8s/monitoring/grafana.values.yaml | 17 + deployment/k8s/k8s/monitoring/pmm-values.yaml | 258 +++ deployment/k8s/k8s/store/store-configmap.yaml | 2 +- deployment/k8s/tools/kubeapps.sh | 105 -- deployment/k8s/tools/velerobackup.sh | 53 - 13 files changed, 1848 insertions(+), 220 deletions(-) rename deployment/k8s/k8s-dev/{issuer-staging.yaml => issuer.yaml} (100%) create mode 100644 deployment/k8s/k8s/monitoring/dashboard-10000.json create mode 100644 deployment/k8s/k8s/monitoring/datasource-prometheus.yaml create mode 100644 deployment/k8s/k8s/monitoring/grafana.values.yaml create mode 100644 deployment/k8s/k8s/monitoring/pmm-values.yaml delete mode 100644 deployment/k8s/tools/kubeapps.sh delete mode 100644 deployment/k8s/tools/velerobackup.sh diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml index 714aaf4..1959701 100644 --- a/.idea/dataSources.xml +++ b/.idea/dataSources.xml @@ -129,7 +129,7 @@ mongo true com.dbschema.MongoJdbcDriver - mongodb://localhost:30017/ + mongodb://localhost:27017/ $ProjectFileDir$ diff --git a/.idea/vcs.xml b/.idea/vcs.xml index ff0de36..94a25f7 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -2,6 +2,5 @@ - \ No newline at end of file diff --git a/deployment/k8s/cli.sh b/deployment/k8s/cli.sh index 8f412cd..1523750 100644 --- a/deployment/k8s/cli.sh +++ b/deployment/k8s/cli.sh @@ -4,10 +4,11 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "${SCRIPT_DIR}"/../../.env -SCRIPT_DIR="${SCRIPT_DIR}"/k8s +if [ "$STAGE" == 'test' ]; then + STAGE=dev +fi -PG_SERVICE_NAME=auth-postgresql -MONGO_SERVICE_NAME=store-mongo +SCRIPT_DIR="${SCRIPT_DIR}"/k8s NAMESPACE="${PROJECT_NAME:-fastapi-ecommerce}" RED='\033[0;31m' @@ -22,7 +23,7 @@ log() { echo -e "${color}$@${NC}" } -process_files_in_folder() { +process_dir_files() { local action="$1" local folder_path="$2" log "${YELLOW}${action} *.yaml files in folder $folder_path, namespace: ${NAMESPACE} ...${NC}" @@ -43,87 +44,65 @@ process_files_in_folder() { #----------------------------- install_auth_postgresql() { - log "\n${GREEN}Deploy auth-postgresql..." - # bitnami postgres + log "\n${GREEN}Deploy auth_postgresql..." helm repo add bitnami https://charts.bitnami.com/bitnami kubectl apply -f "${SCRIPT_DIR}"/auth-postgresql/auth-postgresql-configmap.yaml -n "${NAMESPACE}" - helm install "$PG_SERVICE_NAME" -f "${SCRIPT_DIR}/auth-postgresql/auth-postgresql-values.yaml" \ - oci://registry-1.docker.io/bitnamicharts/postgresql -n "${NAMESPACE}" - - # # percona postgres operator - # path="${SCRIPT_DIR}"/auth-postgresql/percona-postgresql-operator - # [ -d "$path" ] || mkdir "$path" - # git clone -b v2.1.0 https://github.com/percona/percona-postgresql-operator "$path" - # - # cd "$path" || log "${RED} ERROR" - # kubectl create namespace postgres-operator - # kubectl config set-context "$(kubectl config current-context)" --namespace=postgres-operator - # kubectl apply --server-side -f deploy/bundle.yaml - # kubectl apply -f deploy/cr.yaml - # cd "$(dirname "$path")" || log "${RED} ERROR" - # - # log "${YELLOW}Get secrets..." - # sleep 3 - # kubectl get secret cluster1-pguser-cluster1 --template='{{"user: "}}{{.data.user | base64decode}}{{"\npassword: "}}{{.data.password | base64decode}}' - # log "\n" + helm install auth-postgresql -f "${SCRIPT_DIR}/auth-postgresql/auth-postgresql-values.yaml" -n "${NAMESPACE}" \ + oci://registry-1.docker.io/bitnamicharts/postgresql + } delete_auth_postgresql() { - log "\n${GREEN}Deleting auth-postgresql..." - - # bitnami postgres + log "\n${GREEN}Delete auth_postgresql..." kubectl delete -f "${SCRIPT_DIR}/auth-postgresql/auth-postgresql-configmap.yaml" -n "${NAMESPACE}" - helm uninstall "$PG_SERVICE_NAME" -n "${NAMESPACE}" - - # # percona postgres operator - kubectl delete all --all -n postgres-operator + helm delete auth-postgresql -n "${NAMESPACE}" } install_auth_postgresql_bench() { log "\n${GREEN}Deploy auth_postgresql_bench..." kubectl create configmap auth-postgresql-bench-configmap \ --from-file="${SCRIPT_DIR}"/auth-postgresql-bench/scripts/pgbench.sh -n "${NAMESPACE}" - process_files_in_folder apply "${SCRIPT_DIR}"/auth-postgresql-bench + process_dir_files apply "${SCRIPT_DIR}"/auth-postgresql-bench } delete_auth_postgresql_bench() { log "\n${GREEN}Delete auth_postgresql_bench..." kubectl delete configmap auth-postgresql-bench-configmap -n "${NAMESPACE}" - process_files_in_folder delete "${SCRIPT_DIR}"/auth-postgresql-bench + process_dir_files delete "${SCRIPT_DIR}"/auth-postgresql-bench } install_auth() { log "\n${GREEN}Deploy auth..." - process_files_in_folder apply "${SCRIPT_DIR}"/auth + process_dir_files apply "${SCRIPT_DIR}"/auth } delete_auth() { log "\n${GREEN}Delete auth..." - process_files_in_folder delete "${SCRIPT_DIR}"/auth + process_dir_files delete "${SCRIPT_DIR}"/auth } #----------------------------- install_store_mongo() { log "\n${GREEN}Deploy store-mongo..." - helm install "$MONGO_SERVICE_NAME" -f "${SCRIPT_DIR}/store-mongo/store-mongo-values.yaml" \ + helm install store-mongo -f "${SCRIPT_DIR}/store-mongo/store-mongo-values.yaml" \ oci://registry-1.docker.io/bitnamicharts/mongodb -n "${NAMESPACE}" } delete_store_mongo() { log "\n${GREEN}Delete store-mongo..." - helm delete "$MONGO_SERVICE_NAME" -n "${NAMESPACE}" - process_files_in_folder delete "${SCRIPT_DIR}"/store-mongo + helm delete store-mongo -n "${NAMESPACE}" + process_dir_files delete "${SCRIPT_DIR}"/store-mongo } install_store() { log "\n${GREEN}Deploy store..." - process_files_in_folder apply "${SCRIPT_DIR}"/store + process_dir_files apply "${SCRIPT_DIR}"/store } delete_store() { log "\n${GREEN}Delete store..." - process_files_in_folder delete "${SCRIPT_DIR}"/store + process_dir_files delete "${SCRIPT_DIR}"/store } #----------------------------- @@ -143,31 +122,69 @@ install_cert_manager() { log "\n${GREEN}Deploy cert_manager..." kubectl create namespace cert-manager kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.12.1/cert-manager.yaml - echo -e "${GREEN}cert-manager has been installed successfully.${RESET}" } delete_cert_manager() { log "\n${GREEN}Delete cert_manager..." kubectl delete -f https://github.com/jetstack/cert-manager/releases/download/v1.12.1/cert-manager.yaml - echo -e "${GREEN}cert-manager has been deleted successfully.${RESET}" } #----------------------------- -install_ingress_network() { - install_ingress_nginx - install_cert_manager - until process_files_in_folder apply "${SCRIPT_DIR}-${STAGE}"; do - sleep 5 - log "${YELLOW}Try again${NC}" - done - exit +install_kubeapps() { + helm repo add bitnami https://charts.bitnami.com/bitnami + kubectl create namespace kubeapps + helm install kubeapps --namespace kubeapps bitnami/kubeapps + kubectl create --namespace default serviceaccount kubeapps-operator + kubectl create clusterrolebinding kubeapps-operator \ + --clusterrole=cluster-admin \ + --serviceaccount=default:kubeapps-operator + cat < {{ pod_name }}", + "metric": "network", + "refId": "A", + "step": 10 + }, + { + "expr": "- sum (rate (container_network_transmit_bytes_total{image!=\"\",name=~\"^k8s_.*\",kubernetes_io_hostname=~\"^$Node$\"}[$interval])) by (pod_name)", + "format": "time_series", + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "<- {{ pod_name }}", + "metric": "network", + "refId": "B", + "step": 10 + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Pods network I/O ($interval avg)", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "10s", + "schemaVersion": 16, + "style": "dark", + "tags": [ + "kubernetes" + ], + "templating": { + "list": [ + { + "auto": true, + "auto_count": 20, + "auto_min": "2m", + "current": { + "text": "auto", + "value": "$__auto_interval_interval" + }, + "hide": 2, + "label": null, + "name": "interval", + "options": [ + { + "selected": true, + "text": "auto", + "value": "$__auto_interval_interval" + }, + { + "selected": false, + "text": "1m", + "value": "1m" + }, + { + "selected": false, + "text": "10m", + "value": "10m" + }, + { + "selected": false, + "text": "30m", + "value": "30m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + }, + { + "selected": false, + "text": "6h", + "value": "6h" + }, + { + "selected": false, + "text": "12h", + "value": "12h" + }, + { + "selected": false, + "text": "1d", + "value": "1d" + }, + { + "selected": false, + "text": "7d", + "value": "7d" + }, + { + "selected": false, + "text": "14d", + "value": "14d" + }, + { + "selected": false, + "text": "30d", + "value": "30d" + } + ], + "query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d", + "refresh": 2, + "skipUrlSync": false, + "type": "interval" + }, + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "allValue": ".*", + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "hide": 0, + "includeAll": true, + "label": null, + "multi": false, + "name": "Node", + "options": [], + "query": "label_values(kubernetes_io_hostname)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "Cluster Monitoring for Kubernetes", + "uid": "JABGX_-mz", + "version": 1 +} \ No newline at end of file diff --git a/deployment/k8s/k8s/monitoring/datasource-prometheus.yaml b/deployment/k8s/k8s/monitoring/datasource-prometheus.yaml new file mode 100644 index 0000000..64b865b --- /dev/null +++ b/deployment/k8s/k8s/monitoring/datasource-prometheus.yaml @@ -0,0 +1,9 @@ +datasources: +# - name: Prometheus +# type: prometheus +# url: http://monitoring-prometheus-kube-prometheus:9090 + - name: auth-postgresql-primary-metrics + type: prometheus + url: http://auth-postgresql-exporter-prometheus-postgres-exporter:80/metrics + readOnly: false + editable: true \ No newline at end of file diff --git a/deployment/k8s/k8s/monitoring/grafana.values.yaml b/deployment/k8s/k8s/monitoring/grafana.values.yaml new file mode 100644 index 0000000..9143c95 --- /dev/null +++ b/deployment/k8s/k8s/monitoring/grafana.values.yaml @@ -0,0 +1,17 @@ +service: + type: NodePort + nodePorts: + grafana: 30011 + +persistence: + enabled: false + +dashboardsProvider: + enabled: true + +datasources: + secretName: datasource-secret + +dashboardsConfigMaps: + - configMapName: dashboard-10000 + filename: dashboard-10000.json \ No newline at end of file diff --git a/deployment/k8s/k8s/monitoring/pmm-values.yaml b/deployment/k8s/k8s/monitoring/pmm-values.yaml new file mode 100644 index 0000000..0f9d0a8 --- /dev/null +++ b/deployment/k8s/k8s/monitoring/pmm-values.yaml @@ -0,0 +1,258 @@ +## @section Percona Monitoring and Management (PMM) parameters +## Default values for PMM. +## This is a YAML-formatted file. +## Declare variables to be passed into your templates. + +## PMM image version +## ref: https://hub.docker.com/r/percona/pmm-server/tags +## @param image.repository PMM image repository +## @param image.pullPolicy PMM image pull policy +## @param image.tag PMM image tag (immutable tags are recommended) +## @param image.imagePullSecrets Global Docker registry secret names as an array +## +image: + repository: percona/pmm-server + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "2.37.0" + imagePullSecrets: [] + +## PMM environment variables +## ref: https://docs.percona.com/percona-monitoring-and-management/setting-up/server/docker.html#environment-variables +## +pmmEnv: + ## @param pmmEnv.DISABLE_UPDATES Disables a periodic check for new PMM versions as well as ability to apply upgrades using the UI (need to be disabled in k8s environment as updates rolled with helm/container update) + ## + DISABLE_UPDATES: "1" +# ENABLE_DBAAS: "1" +# optional variables to integrate Grafana with internal iDP, see also secret part +# GF_AUTH_GENERIC_OAUTH_ENABLED: 'true' +# GF_AUTH_GENERIC_OAUTH_SCOPES: '' +# GF_AUTH_GENERIC_OAUTH_AUTH_URL: '' +# GF_AUTH_GENERIC_OAUTH_TOKEN_URL: '' +# GF_AUTH_GENERIC_OAUTH_API_URL: '' +# GF_AUTH_GENERIC_OAUTH_ALLOWED_DOMAINS: '' + +## @param pmmResources optional [Resources](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) requested for [PMM container](https://docs.percona.com/percona-monitoring-and-management/setting-up/server/index.html#set-up-pmm-server) + ## pmmResources: + ## requests: + ## memory: "32Gi" + ## cpu: "8" + ## limits: + ## memory: "64Gi" + ## cpu: "32" +pmmResources: {} + +## Readiness probe Config +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes +## @param readyProbeConf.initialDelaySeconds Number of seconds after the container has started before readiness probes is initiated +## @param readyProbeConf.periodSeconds How often (in seconds) to perform the probe +## @param readyProbeConf.failureThreshold When a probe fails, Kubernetes will try failureThreshold times before giving up +## +readyProbeConf: + initialDelaySeconds: 1 + periodSeconds: 5 + failureThreshold: 6 + +## @section PMM secrets +## +secret: + ## @param secret.name Defines the name of the k8s secret that holds passwords and other secrets + ## + name: pmm-secret + ## @param secret.create If true then secret will be generated by Helm chart. Otherwise it is expected to be created by user. + ## + create: true + ## @param secret.pmm_password Initial PMM password - it changes only on the first deployment, ignored if PMM was already provisioned and just restarted. If PMM admin password is not set, it will be generated. + ## E.g. + ## pmm_password: admin + ## + ## To get password execute `kubectl get secret pmm-secret -o jsonpath='{.data.PMM_ADMIN_PASSWORD}' | base64 --decode` + ## + pmm_password: "admin" + ## + # GF_AUTH_GENERIC_OAUTH_CLIENT_ID optional client ID to integrate Grafana with internal iDP, requires other env defined as well under pmmEnv + # GF_AUTH_GENERIC_OAUTH_CLIENT_ID: + # GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET optional secret to integrate Grafana with internal iDP, requires other env defined as well under pmmEnv + # GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET: + +## @param certs Optional certificates, if not provided PMM would use generated self-signed certificates, +## please provide your own signed ssl certificates like this: +## certs: + ## name: pmm-certs + ## files: + ## certificate.crt: + ## certificate.key: + ## ca-certs.pem: + ## dhparam.pem: +certs: {} + +## @section PMM network configuration +## Service configuration +## +service: + ## @param service.name Service name that is dns name monitoring services would send data to. `monitoring-service` used by default by pmm-client in Percona operators. + ## + name: monitoring-service + ## @param service.type Kubernetes Service type + ## + type: NodePort + + ## Ports 443 and/or 80 + ## + ports: + ## @param service.ports[0].port https port number + - port: 443 + ## @param service.ports[0].targetPort target port to map for statefulset and ingress + targetPort: https + ## @param service.ports[0].protocol protocol for https + protocol: TCP + ## @param service.ports[0].name port name + name: https + ## @param service.ports[1].port http port number + - port: 80 + ## @param service.ports[1].targetPort target port to map for statefulset and ingress + targetPort: http + ## @param service.ports[1].protocol protocol for http + protocol: TCP + ## @param service.ports[1].name port name + name: http + +## Ingress controller configuration +## +ingress: + ## @param ingress.enabled -- Enable ingress controller resource + enabled: false + ## @param ingress.nginxInc -- Using ingress controller from NGINX Inc + nginxInc: false + ## @param ingress.annotations -- Ingress annotations configuration + annotations: {} + ## kubernetes.io/ingress.class: nginx + ## kubernetes.io/tls-acme: "true" + ### nginx proxy to https + ## nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" + ## @param ingress.community.annotations -- Ingress annotations configuration for community managed ingress (nginxInc = false) + community: + annotations: {} + ## kubernetes.io/ingress.class: nginx + ## kubernetes.io/tls-acme: "true" + ## @param ingress.ingressClassName -- Sets the ingress controller class name to use. + ingressClassName: "" + + ## Ingress resource hostnames and path mappings + hosts: + ## @param ingress.hosts[0].host hostname + - host: chart-example.local + ## @param ingress.hosts[0].paths path mapping + paths: [] + + ## @param ingress.pathType -- How ingress paths should be treated. + pathType: Prefix + + ## @param ingress.tls -- Ingress TLS configuration + tls: [] + ## - secretName: chart-example-tls + ## hosts: + ## - chart-example.local + +## @section PMM storage configuration +## Claiming storage for PMM using Persistent Volume Claims (PVC) +## ref: https://kubernetes.io/docs/user-guide/persistent-volumes/ +## +storage: + ## @param storage.name name of PVC + name: pmm-storage + ## @param storage.storageClassName optional PMM data Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + storageClassName: "" + ## + ## @param storage.size size of storage [depends](https://docs.percona.com/percona-monitoring-and-management/setting-up/server/index.html#set-up-pmm-server) on number of monitored services and data retention + ## + size: 10Gi + ## + ## @param storage.dataSource VolumeSnapshot to start from + ## + dataSource: {} + ## name: before-vX.Y.Z-upgrade + ## kind: VolumeSnapshot + ## apiGroup: snapshot.storage.k8s.io + ## + ## @param storage.selector select existing PersistentVolume + ## + selector: {} + ## matchLabels: + ## release: "stable" + ## matchExpressions: + ## - key: environment + ## operator: In + ## values: + ## - dev + +## @section PMM kubernetes configurations +## @param nameOverride String to partially override common.names.fullname template with a string (will prepend the release name) +## +nameOverride: "" + +## @param extraLabels Labels to add to all deployed objects +## +extraLabels: {} + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +## @param serviceAccount.create Specifies whether a ServiceAccount should be created +## @param serviceAccount.annotations Annotations for service account. Evaluated as a template. Only used if `create` is `true`. +## @param serviceAccount.name Name of the service account to use. If not set and create is true, a name is generated using the fullname template. +## +serviceAccount: + create: true + annotations: {} + name: "pmm-service-account" + +## @param podAnnotations Pod annotations +## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +## +podAnnotations: {} + +## @param podSecurityContext Configure Pods Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod +## E.g +## podSecurityContext: + ## fsGroup: 2000 +## +podSecurityContext: {} + +## @param securityContext Configure Container Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod +## securityContext.capabilities The capabilities to add/drop when running containers +## securityContext.runAsUser Set pmm containers' Security Context runAsUser +## securityContext.runAsNonRoot Set pmm container's Security Context runAsNonRoot +## E.g. +## securityContext: + ## capabilities: + ## drop: + ## - ALL + ## readOnlyRootFilesystem: true + ## runAsNonRoot: true + ## runAsUser: 1000 +securityContext: {} + + +## @param nodeSelector Node labels for pod assignment +## Ref: https://kubernetes.io/docs/user-guide/node-selection/ +## +nodeSelector: {} + +## @param tolerations Tolerations for pod assignment +## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ +## +tolerations: [] + +## @param affinity Affinity for pod assignment +## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity +## +affinity: {} \ No newline at end of file diff --git a/deployment/k8s/k8s/store/store-configmap.yaml b/deployment/k8s/k8s/store/store-configmap.yaml index 5d549d0..a8c5e7e 100644 --- a/deployment/k8s/k8s/store/store-configmap.yaml +++ b/deployment/k8s/k8s/store/store-configmap.yaml @@ -4,7 +4,7 @@ metadata: name: store-configmap namespace: fastapi-ecommerce data: - STAGE: "prod" + STAGE: "test" APP_MODULE: "store_service.main:app" AUTH_SERVICE_LOGIN_PATH: "/api/v1/login/access-token" AUTH_SERVICE_URL: "http://auth-svc:8081" diff --git a/deployment/k8s/tools/kubeapps.sh b/deployment/k8s/tools/kubeapps.sh deleted file mode 100644 index 60664ed..0000000 --- a/deployment/k8s/tools/kubeapps.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env bash - -# Detect the platform -unameOut="$(uname -s)" -case "${unameOut}" in -Linux*) platform="linux" ;; -Darwin*) platform="mac" ;; -CYGWIN*) platform="win" ;; -MINGW*) platform="win" ;; -*) platform="unknown" ;; -esac - -if [[ "$platform" == "unknown" ]]; then - echo -e "\e[91mUnknown platform: $unameOut\e[0m" - exit 1 -fi - -install_kubeapps() { - helm repo add bitnami https://charts.bitnami.com/bitnami - kubectl create namespace kubeapps - helm install kubeapps --namespace kubeapps bitnami/kubeapps - - kubectl create --namespace default serviceaccount kubeapps-operator - kubectl create clusterrolebinding kubeapps-operator --clusterrole=cluster-admin --serviceaccount=default:kubeapps-operator - cat <