diff --git a/Makefile b/Makefile index 69b905ba..d5e7e56c 100644 --- a/Makefile +++ b/Makefile @@ -38,6 +38,8 @@ endif .PHONY: golangci-lint GOLANGCILINT := $(LOCALBIN)/golangci-lint GOLANGCI_URL := https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh +start_date := 1970-01-01 + golangci-lint: $(LOCALBIN) ifeq (,$(wildcard $(GOLANGCILINT))) @ echo "📥 Downloading golangci-lint" @@ -105,12 +107,6 @@ else @ echo "Env not defined" endif -local-upload-data: - curl -vvvv -F "upload=@$(file);type=application/application/vnd.redhat.hccm.tar+tgz" \ - -H "x-rh-identity: ${b64_identity}" \ - -H "x-rh-request_id: testtesttest" \ - http://localhost:${INGRESS_PORT}/api/ingress/v1/upload - upload-msg-to-rosocp: echo ${ros_ocp_msg} | docker-compose -f scripts/docker-compose.yml exec -T kafka kafka-console-producer --topic hccm.ros.events --broker-list localhost:29092 @@ -118,9 +114,9 @@ upload-msg-to-rosocp: get-recommendations: ifdef env $(eval APIPOD=$(shell oc get pods -o custom-columns=POD:.metadata.name --no-headers -n ${env} | grep ros-ocp-backend-api)) - oc exec ${APIPOD} -c ros-ocp-backend-api -n ${env} -- /bin/bash -c 'curl -s -H "X-Rh-Identity: ${b64_identity}" -H "x-rh-request_id: testtesttest" http://localhost:8000/api/cost-management/v1/recommendations/openshift' | python -m json.tool + oc exec ${APIPOD} -c ros-ocp-backend-api -n ${env} -- /bin/bash -c 'curl -s -H "X-Rh-Identity: ${b64_identity}" -H "x-rh-request_id: testtesttest" http://localhost:8000/api/cost-management/v1/recommendations/openshift?start_date=${start_date}' | python -m json.tool else curl -s -H "x-rh-identity: ${b64_identity}" \ -H "x-rh-request_id: testtesttest" \ - http://localhost:8000/api/cost-management/v1/recommendations/openshift | python -m json.tool + http://localhost:8000/api/cost-management/v1/recommendations/openshift?start_date=${start_date} | python -m json.tool endif diff --git a/migrations/000003_create_workloads_table.up.sql b/migrations/000003_create_workloads_table.up.sql index 301fb8e1..e725b910 100644 --- a/migrations/000003_create_workloads_table.up.sql +++ b/migrations/000003_create_workloads_table.up.sql @@ -1,4 +1,4 @@ -CREATE TYPE workloadtype AS ENUM ('deployment', 'deploymentconfig', 'replicaset', 'replicationcontroller', 'statefulset', 'daemonset'); +CREATE TYPE workloadtype AS ENUM ('daemonset', 'deployment', 'deploymentconfig', 'replicaset', 'replicationcontroller', 'statefulset'); CREATE TABLE IF NOT EXISTS workloads( id BIGSERIAL PRIMARY KEY,