This repository hosts a general set of models used to parse HTTP responses and a single test to provide a comparison between two versions of opencost
.
- The version of
opencost
that you wish to compare should exist in the../opencost
directory relative to this repository. - A "target" opencost version running in Kubernetes (and accessible
Service
) that can be used to compare against the local version. - A Prometheus server that is being used by the target (and accessible
Service
).
port-forward
the remote [shared] PrometheusService
to your local machine on port9011
kubectl port-forward -n <namespace> svc/<prometheus-server> 9011:80
port-forward
the remote [shared]opencost
Service
to your local machine on port9007
kubectl port-forward -n <namespace> svc/<opencost-service> 9007:9003
- Run the test with
KUBECOST_NAMESPACE=<namespace>
and turn off timeout:
KUBECOST_NAMESPACE=kubecost go test ./... -v -timeout=0