-
Notifications
You must be signed in to change notification settings - Fork 0
Configure Grafana with no-auth access and Tilt link #3
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
Conversation
Configures Grafana across all environments (mop-central, mop-cloud, mop-edge) to: - Disable authentication entirely via anonymous auth with Admin role - Disable login form - Enable ingress with grafana.gudo11y.local hostname - Add Grafana dashboard link to Tilt UI for easy access during development This enables quick access to Grafana dashboards without login prompts, streamlining the local development experience. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Code Review - PR #3: Configure Grafana with no-auth access and Tilt linkSummaryThis PR enables authentication-free Grafana access for local development across all three environments (central, cloud, edge) and adds Tilt UI integration. Overall, the implementation is clean and follows the project's Jsonnet patterns well. ✅ Strengths
🔒 Security ConcernsCritical: Production Deployment RiskSeverity: HIGH The configuration disables all authentication and grants anonymous Admin role: 'auth.anonymous'+: {
enabled: true,
org_role: 'Admin', // ⚠️ Full admin access without authentication
},
auth+: {
disable_login_form: true,
}, Issues:
Recommendations:
local isLocal = std.extVar('env') == 'local'; // or similar mechanism
'grafana.ini'+: if isLocal then {
'auth.anonymous'+: { enabled: true, org_role: 'Admin' },
auth+: { disable_login_form: true },
} else {},
🐛 Potential Issues1. Inconsistent Domain UsageFile: Both hosts: [
common.central.grafana_domain, // ← Using "central" domain
], Expected: Should these environments have their own domain configurations?
Impact: All environments point to same hostname, which could cause:
Recommendation: Either:
2. Missing Ingress ClassFiles: All three environment files The ingress configuration doesn't specify an ingress+: {
enabled: true,
hosts: [...],
// Missing: ingressClassName
} Impact:
Recommendation: ingress+: {
enabled: true,
ingressClassName: 'nginx', // or whatever you're using in minikube
hosts: [...],
} 3. Namespace InconsistencyFile: namespace: 'monitoring', // ← Hardcoded While namespace: common.namespace, // ← References common.libsonnet Impact: Inconsistent patterns across environments; harder to maintain Recommendation: Either use 📝 Code Quality Suggestions1. Reduce Configuration DuplicationThe Grafana auth config is duplicated across all three files. Consider extracting to // In tanka/lib/common.libsonnet
{
grafana:: {
noAuthConfig:: {
'grafana.ini'+: {
'auth.anonymous'+: {
enabled: true,
org_role: 'Admin',
},
auth+: {
disable_login_form: true,
},
},
},
},
} Then in each environment: 'grafana.ini'+: common.grafana.noAuthConfig['grafana.ini'], Benefits: Single source of truth, easier to modify/remove later 2. Incomplete Test PlanFrom the PR description:
Recommendation: Complete manual testing before merge to ensure:
🎯 Best Practices1. Missing Host Configuration DocumentationUsers need to configure # /etc/hosts
127.0.0.1 grafana.gudo11y.local Recommendation: Add this to PR description or update project README/docs 2. Tiltfile CommentThe comment in # --- links to services --- # Current
# --- Service Links (accessible in Tilt UI) --- # Suggested ✨ Performance ConsiderationsNo significant performance concerns. The configuration changes are declarative and don't introduce runtime overhead. 🧪 Test CoverageMissing: No automated tests for Grafana configuration Recommendations:
tk show tanka/environments/mop-central | grep "auth.anonymous"
Summary & VerdictOverall Assessment: Good implementation with clean Jsonnet code, but has critical security concerns that must be addressed. Required Changes:
Recommended Changes:
Approval: Conditional - please address security concerns before merging. Great work on the consistent implementation across environments! The Tilt integration is a nice DX improvement. 🚀 |
Summary
Configures Grafana across all environments to enable quick, authentication-free access during development with direct link integration in Tilt UI.
Changes
grafana.gudo11y.local
hostnameConfiguration Details
Grafana Settings
Environments Updated
Tilt Link
Added
link('http://grafana.gudo11y.local', 'Grafana Dashboard')
to Tiltfile for easy access from Tilt UI.Access
Once deployed:
tilt up
Test Plan
🤖 Generated with Claude Code