Răsfoiți Sursa

add postman collection

jesse goodier 3 ani în urmă
părinte
comite
681e87d11d
3 a modificat fișierele cu 157 adăugiri și 14 ștergeri
  1. 0 14
      deploying-as-a-pod.md
  2. 1 0
      docs/README.md
  3. 156 0
      docs/opencost.postman_collection.json

+ 0 - 14
deploying-as-a-pod.md

@@ -1,14 +0,0 @@
-## Deploying as a pod
-
-See this page for all [Kubecost install options](http://docs.kubecost.com/install).
-
-If you would like to deploy the cost model (w/o dashboards) directly a pod on your cluster, complete the steps listed below.
-
-1. Set [this environment variable](https://github.com/opencost/opencost/blob/c211fbc1244a9da9667c7180a9e4c7f988d7978a/kubernetes/deployment.yaml#L33) to the address of your prometheus server
-2. `kubectl create namespace cost-model`
-3. `kubectl apply -f kubernetes/ --namespace cost-model`
-4. `kubectl port-forward --namespace cost-model service/cost-model 9003`
-
-To test that the server is running, you can hit [http://localhost:9003/costDataModel?timeWindow=1d](http://localhost:9003/costDataModel?timeWindow=1d)
-
-**Note:** This approach provides less functionality compared to other install options referenced above. Also, Prometheus and kube-state-metrics are external dependencies for this installation path.

+ 1 - 0
docs/README.md

@@ -0,0 +1 @@
+<https://www.opencost.io/docs/>

+ 156 - 0
docs/opencost.postman_collection.json

@@ -0,0 +1,156 @@
+{
+	"info": {
+		"_postman_id": "bba454a2-641d-4481-9ccd-0395a6054a20",
+		"name": "opencost",
+		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
+	},
+	"item": [
+		{
+			"name": "namespace costs/day",
+			"request": {
+				"method": "GET",
+				"header": [],
+				"url": {
+					"raw": "{{host}}/allocation/compute?aggregate=namespace&window=1d&accumulate=false&step=1d",
+					"host": [
+						"{{host}}"
+					],
+					"path": [
+						"allocation",
+						"compute"
+					],
+					"query": [
+						{
+							"key": "aggregate",
+							"value": "namespace"
+						},
+						{
+							"key": "window",
+							"value": "1d"
+						},
+						{
+							"key": "accumulate",
+							"value": "false"
+						},
+						{
+							"key": "step",
+							"value": "1d"
+						}
+					]
+				}
+			},
+			"response": []
+		},
+		{
+			"name": "cluster total",
+			"request": {
+				"method": "GET",
+				"header": [],
+				"url": {
+					"raw": "{{host}}/allocation/compute?aggregate=cluster&window=lastweek",
+					"host": [
+						"{{host}}"
+					],
+					"path": [
+						"allocation",
+						"compute"
+					],
+					"query": [
+						{
+							"key": "aggregate",
+							"value": "cluster"
+						},
+						{
+							"key": "window",
+							"value": "lastweek"
+						}
+					]
+				}
+			},
+			"response": []
+		},
+		{
+			"name": "namespace totals",
+			"request": {
+				"method": "GET",
+				"header": [],
+				"url": {
+					"raw": "{{host}}/allocation/compute?aggregate=namespace&window=7d",
+					"host": [
+						"{{host}}"
+					],
+					"path": [
+						"allocation",
+						"compute"
+					],
+					"query": [
+						{
+							"key": "aggregate",
+							"value": "namespace"
+						},
+						{
+							"key": "window",
+							"value": "7d"
+						}
+					]
+				}
+			},
+			"response": []
+		},
+		{
+			"name": "pod totals",
+			"request": {
+				"method": "GET",
+				"header": [],
+				"url": {
+					"raw": "{{host}}/allocation/compute?aggregate=pod&window=7d",
+					"host": [
+						"{{host}}"
+					],
+					"path": [
+						"allocation",
+						"compute"
+					],
+					"query": [
+						{
+							"key": "aggregate",
+							"value": "pod"
+						},
+						{
+							"key": "window",
+							"value": "7d"
+						}
+					]
+				}
+			},
+			"response": []
+		}
+	],
+	"event": [
+		{
+			"listen": "prerequest",
+			"script": {
+				"type": "text/javascript",
+				"exec": [
+					""
+				]
+			}
+		},
+		{
+			"listen": "test",
+			"script": {
+				"type": "text/javascript",
+				"exec": [
+					""
+				]
+			}
+		}
+	],
+	"variable": [
+		{
+			"key": "host",
+			"value": "http://localhost:9003",
+			"type": "default"
+		}
+	]
+}