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

Move k8s configuration for go to its own pacakge #74

Merged
merged 2 commits into from
May 29, 2024

Conversation

honourfish
Copy link
Contributor

@honourfish honourfish commented May 28, 2024

Overview

  • move k8s configuration out of logger package into its own package
  • ensure we have a WithLogger option and we set it during service startup

Testing

Services

Service logs Before:

2024/05/29 09:25:34 INFO GOMEMLIMIT is updated package=github.com/KimMachineGun/automemlimit/memlimit GOMEMLIMIT=120795955
{"level":"info","ts":1716974734.8232272,"caller":"maxprocs/maxprocs.go:47","msg":"maxprocs: Honoring GOMAXPROCS=\"1\" as set in environment"}

Service logs After:

{"level":"info","ts":1716976942.7399347,"caller":"slog/handler.go:117","msg":"INFO GOMEMLIMIT is updated package=github.com/KimMachineGun/automemlimit/memlimit GOMEMLIMIT=120795955"}
{"level":"info","ts":1716976942.7402217,"caller":"maxprocs/maxprocs.go:47","msg":"maxprocs: Honoring GOMAXPROCS=\"1\" as set in environment","servicename":"merklebuilderv1"}
{"level":"info","ts":1716976942.7402833,"caller":"startup/run.go:30","msg":"Go Configuration: &{GoMaxProcs:1 GoMemLimit:120795955 GoVersion:go1.22.2}","servicename":"merklebuilderv1"}

Demos

Integrity Demo Before:

2024/05/29 11:14:05 INFO memory is not limited, skipping: %v package=github.com/KimMachineGun/automemlimit/memlimit !BADKEY="memory is not limited"

Event included on merkle log: true

Integrity Demo After:

Event included on merkle log: true

re: AB#9542

@honourfish honourfish requested a review from eccles May 29, 2024 10:16
@honourfish honourfish merged commit dd2783b into main May 29, 2024
2 checks passed
@honourfish honourfish deleted the dev/jgough/9542-k8package branch May 29, 2024 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants