Skip to content

Commit

Permalink
dashboard changed to use Grafana time range control (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
k8spacket committed Mar 6, 2024
1 parent 5ca9d01 commit 0a6e493
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 21 deletions.
2 changes: 1 addition & 1 deletion charts/k8spacket/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ description: A Helm chart for k8spacket tool
maintainers:
- name: k8spacket
email: k8spacket@gmail.com
version: 2.0.0
version: 2.0.1
appVersion: 2.0.0
6 changes: 2 additions & 4 deletions charts/k8spacket/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
1. Get the application URL by running these commands:
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "k8spacket.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
Installation completed.
See https://k8spacket.github.io/k8spacket/#installation, to check how to configure Grafana to use k8spacket.
12 changes: 8 additions & 4 deletions charts/k8spacket/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,10 @@ spec:
env:
- name: K8S_PACKET_NAME_LABEL_VALUE
value: {{ include "k8spacket.name" . }}
- name: K8S_PACKET_HIDE_SRC_PORT
value: {{ .Values.k8sPacket.metrics.hideSourcePort | quote }}
- name: K8S_PACKET_REVERSE_GEOIP2_DB_PATH
value: {{ .Values.k8sPacket.metrics.reverseLookup.geoipDBPath }}
value: {{ .Values.k8sPacket.reverseLookup.geoipDBPath }}
- name: K8S_PACKET_REVERSE_WHOIS_REGEXP
value: {{ .Values.k8sPacket.metrics.reverseLookup.whoisRegexp }}
value: {{ .Values.k8sPacket.reverseLookup.whoisRegexp }}
- name: K8S_PACKET_TCP_LISTENER_PORT
value: {{ .Values.k8sPacket.tcp.listener.port | quote }}
- name: K8S_PACKET_TCP_LISTENER_INTERFACES_COMMAND
Expand All @@ -88,8 +86,14 @@ spec:
value: {{ .Values.k8sPacket.tcp.listener.interfaces.refreshPeriod }}
- name: K8S_PACKET_TCP_PERSISTENT_DURATION
value: {{ .Values.k8sPacket.tcp.connection.persistentDuration }}
- name: K8S_PACKET_TCP_METRICS_ENABLED
value: {{ .Values.k8sPacket.tcp.metrics.enabled | quote }}
- name: K8S_PACKET_TCP_METRICS_HIDE_SRC_PORT
value: {{ .Values.k8sPacket.tcp.metrics.hideSourcePort | quote }}
- name: K8S_PACKET_TLS_CERTIFICATE_CACHE_TTL
value: {{ .Values.k8sPacket.tls.certificate.cache.ttl }}
- name: K8S_PACKET_TLS_METRICS_ENABLED
value: {{ .Values.k8sPacket.tls.metrics.enabled | quote }}
volumeMounts:
- mountPath: /home/k8spacket/plugins
name: plugins
Expand Down
29 changes: 17 additions & 12 deletions charts/k8spacket/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,14 @@ tolerations: []
k8sPacket:
## Available plugin releases. Custom plugins can be provided
plugins:
- https://github.com/k8spacket/plugins/releases/download/v2.0.0/nodegraph-$(arch).so
- https://github.com/k8spacket/plugins/releases/download/v2.0.0/tls-parser-$(arch).so
metrics:
## Hide source port when 'true' (set to string value 'dynamic' instead of decimal real source port) for Prometheus metrics cardinality reasons
hideSourcePort: true
reverseLookup:
## Reverse lookup db file based on GeoLite2 Free Geolocation Data
## See: https://dev.maxmind.com/geoip/geolite2-free-geolocation-data?lang=en
geoipDBPath: "/home/k8spacket/GeoLite2-City.mmdb"
## Whois result match regexp
whoisRegexp: "(?:OrgName:|org-name:)\\s*(.*)"
- https://github.com/k8spacket/plugins/releases/download/v2.0.1/nodegraph-$(arch).so
- https://github.com/k8spacket/plugins/releases/download/v2.0.1/tls-parser-$(arch).so
reverseLookup:
## Reverse lookup db file based on GeoLite2 Free Geolocation Data
## See: https://dev.maxmind.com/geoip/geolite2-free-geolocation-data?lang=en
geoipDBPath: "/home/k8spacket/GeoLite2-City.mmdb"
## Whois result match regexp
whoisRegexp: "(?:OrgName:|org-name:)\\s*(.*)"
tcp:
connection:
## When a connection is treated as persistent
Expand All @@ -78,8 +75,16 @@ k8sPacket:
command: "ip address | grep @ | sed -E 's/.* (\\w+)@.*/\\1/' | tr '\\n' ',' | sed 's/.$//'"
## How often refresh the list of network interfaces to listen
refreshPeriod: "10s"
metrics:
## Enabled/disabled exposing TCP Prometheus metrics
enabled: true
## Hide source port when 'true' (set to string value 'dynamic' instead of decimal real source port) for Prometheus metrics cardinality reasons
hideSourcePort: true
tls:
certificate:
cache:
## How long scraped TLS certificates are stored in a cache
ttl: "24h"
ttl: "24h"
metrics:
## Enabled/disabled exposing TLS Prometheus metrics
enabled: true

0 comments on commit 0a6e493

Please sign in to comment.