Skip to content

Commit

Permalink
feat: Make API endpoint configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
pkanal committed Jul 17, 2023
1 parent 4f9e454 commit 2ea2fe9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ spec:
spec:
containers:
- name: hny-ebpf-agent
# image: hny/ebpf-agent:local
image: ghcr.io/honeycombio/ebpf-agent:dev
image: hny/ebpf-agent:local
# image: ghcr.io/honeycombio/ebpf-agent:dev
imagePullPolicy: IfNotPresent
env:
- name: HONEYCOMB_API_KEY
Expand All @@ -54,6 +54,8 @@ spec:
key: api-key
- name: HONEYCOMB_DATASET
value: ebpf-agent-go
- name: HONEYCOMB_API_ENDPOINT
value: $HONEYCOMB_API_ENDPOINT
securityContext:
capabilities:
add:
Expand Down
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ func main() {
log.Fatalf("Failed to get host kernel version: %v", err)
}
log.Printf("Host kernel version: %s\n", kernelVersion)

log.Printf("Host kernel version: %s\n", os.Getenv("HONEYCOMB_API_ENDPOINT"))
// setup libhoney
libhoney.Init(libhoney.Config{
APIKey: os.Getenv("HONEYCOMB_API_KEY"),
APIKey: os.Getenv("HONEYCOMB_API_KEY"),
Dataset: os.Getenv("HONEYCOMB_DATASET"),
APIHost: os.Getenv("HONEYCOMB_API_ENDPOINT"),
})
defer libhoney.Close()

Expand Down

0 comments on commit 2ea2fe9

Please sign in to comment.