k8s-ardoq-bridge

Development

Requirements

Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this:

git commit -m "A brief summary of the commit
> 
> A paragraph describing what changed and its impact."

Coding Convention

Start reading our code, and you’ll get the hang of it. We try to prioritise readability (not always possible), nevertheless:

Linting

Go

We simply use go fmt. Simple is better and “60% of the time, it works every time.” :)

Helm Charts

We use both https://github.com/helm/chart-testing and helm lint. Again, simple is better.

Testing

We have a number of Ginkgo integration and unit tests under tests split based on functionality. Please write tests,if possible, for any new code.

Debugging

Install dependencies

go install github.com/google/pprof@latest
brew install graphviz

Run the service locally

ARDOQ_BASEURI=https://{custom_domain_here}/api/  ARDOQ_ORG={org_label_here} ARDOQ_WORKSPACE_ID={workspace_id_here} ARDOQ_APIKEY={key_here} ARDOQ_CLUSTER=local make run

pprof index page

open http://localhost:7777/debug/pprof

Inspect cpu profile

go tool pprof http://localhost:7777/debug/pprof/profile

Code References

Remember D.R.Y. and K.I.S.S

#StayLazy