Skip to content

Commit

Permalink
Merge pull request #44 from kexa-io/dev
Browse files Browse the repository at this point in the history
default file & grafana admin secret
  • Loading branch information
aeppling authored Oct 2, 2024
2 parents 412b5d0 + 4af65d2 commit 9d2f94a
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 21 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ the following save addon in your "_default.json_":
]
```

*Create your Grafana admin user*
```bash
kubectl create secret generic kexa-grafana-admin-secret --from-literal=admin-user=admin --from-literal=admin-password=strongpassword -n kexa
```

*Upload your Kexa configuration (default.json)*
```bash
kubectl create secret generic kexa-configuration-secret --from-file=default.json=default.json -n kexa
Expand Down
11 changes: 1 addition & 10 deletions charts/kexa-chart/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,10 @@ kubectl get secret --namespace kexa my-postgresql -o jsonpath="{.data.postgres-p

#### Grafana Dashboard ####

# Linux: Get & decode Grafana password
kubectl get secret -n kexa kexa-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo

# Windows: Get Grafana's hashed password
kubectl get secret --namespace kexa YOUR_RELEASE_NAME-grafana -o jsonpath="{.data.admin-password}"

# Windows: Decode hashed Grafana password
[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String("YOUR_HASHED_PASSWORD_HERE"))

# Forwarding port
kubectl port-forward svc/YOUR_RELEASE_NAME-grafana 8080:80 -n kexa

# Login with 'admin' and password you got
# Login with the credentials you created as Kubernetes secret.
# All dashboards and database connection to Postgres are already set


Expand Down
26 changes: 15 additions & 11 deletions charts/kexa-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace: kexa
hostConfigPath: /mnt/host/c/your/path/to/tmpconfig
hostConfigFolder: tmpconfig
uselocalRules: false
rulesPvcStorageClass: standard
rulesPvcStorageClass: default

kubernetesAddon:
enabled: true
Expand Down Expand Up @@ -58,17 +58,21 @@ postgresql:
enabled: true
size: 10Gi

grafana.ini:
database:
type: "postgres"
host: "my-postgresql.kexa.svc.cluster.local"
name: "kexa_export_database"
user: "kexa_postgres_user"
password: "my_postgres_password"
ssl_mode: "disable"


grafana:
env:
GF_SECURITY_ALLOW_EMBEDDING: true
GF_SECURITY_COOKIE_SECURE: false
server:
domain: localhost
root_url: http://localhost:8082/
enable_cors: true
service:
port: 8082
targetPort: 3000
admin:
existingSecret: "kexa-grafana-admin-secret"
userKey: admin-user
passwordKey: admin-password
config:
grafana.ini:
dashboards:
Expand Down
19 changes: 19 additions & 0 deletions default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"kubernetes":[
{
"description": "organization 4urcloud",
"prefix": "KUBE1_",
"rules": [
"kubernetesConsumptions"
]
}
],
"save": [
{
"type": "postgres",
"name": "Postgres local cluster",
"urlName": "POSTGRES_STRING",
"description": "Database to save the data (local cluster)"
}
]
}

0 comments on commit 9d2f94a

Please sign in to comment.