Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default file & grafana admin secret #44

Merged
merged 3 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)"
}
]
}