Skip to content

Commit

Permalink
fix: ensure grafana does not install plugins from the internet (#993)
Browse files Browse the repository at this point in the history
## Description

The Grafana 11.3.0 update contained a [new default pre-install
plugin](https://grafana.com/docs/grafana/latest/whatsnew/whats-new-in-v11-3/#explore-logs).
While this plugin would be nice, the method of installation involves
reaching out to `grafana.com` on startup to download and install the
plugin. To workaround this for the time being this PR disables the
pre-install functionality.

In reviewing you should notice that before the change there are log
failures reaching out to grafana:
```
logger=plugin.backgroundinstaller t=2024-11-07T18:42:14.912141481Z level=info msg="Installing plugin" pluginId=grafana-lokiexplore-app version=
logger=plugin.backgroundinstaller t=2024-11-07T18:42:14.939302134Z level=error msg="Failed to install plugin" pluginId=grafana-lokiexplore-app version= error="Get \"https://grafana.com/api/plugins/grafana-lokiexplore-app/versions\": read tcp 10.42.0.36:49118->34.120.177.193:443: read: connection reset by peer"
```

After this change those failures do not exist.

## Related Issue

Related to #992

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor
Guide](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md)
followed
  • Loading branch information
mjnagel authored Nov 8, 2024
1 parent 7cdd742 commit f3def45
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/grafana/values/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ grafana.ini:
feedback_links_enabled: false
plugins:
public_key_retrieval_disabled: true
preinstall_disabled: true # Ensure we don't try to install plugins from grafana.com which would fail in the airgap
auth:
# Disable the login form to force users to use SSO
disable_login_form: true
Expand Down Expand Up @@ -72,18 +73,18 @@ autoscaling:
name: cpu
target:
type: Utilization
averageUtilization: 70 # Adjust based on expected load
averageUtilization: 70 # Adjust based on expected load
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: 75 # Optional, based on memory usage patterns
averageUtilization: 75 # Optional, based on memory usage patterns
# Scaling behavior (optional): Controls how fast to scale up or down
behavior:
scaleDown:
stabilizationWindowSeconds: 300 # Prevent rapid scaling down
stabilizationWindowSeconds: 300 # Prevent rapid scaling down
policies:
- type: Pods
value: 1
periodSeconds: 300 # Scale down one pod every 5 minutes
periodSeconds: 300 # Scale down one pod every 5 minutes

0 comments on commit f3def45

Please sign in to comment.