diff --git a/README.md b/README.md index 02becd2..f45bbc3 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ annotations.scaling.exporter.replica.min | "integer" ``` -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: "{{ .Release.Name }}" @@ -54,14 +54,17 @@ spec: metrics: - type: External external: - metricName: "prescaling_metric" - metricSelector: + metric: + name: "prescaling_metric" + selector: matchLabels: deployment: "{{ .Release.Name }}" - targetValue: 10 + target + type: Value + value: 10 ``` -> It's important to set the `targetValue` to 10. The metric's value provided by the exporter in order to scale is 11. The scale up of pods will be gradual. Currently, the increment is carried out 10% by 10%. +> It's important to set the `target.value` to 10. The metric's value provided by the exporter in order to scale is 11. The scale up of pods will be gradual. Currently, the increment is carried out 10% by 10%. ## Configure prometheus adapter diff --git a/docs/docs.go b/docs/docs.go index f2c7175..18ca03e 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1,5 +1,4 @@ -// Package docs GENERATED BY SWAG; DO NOT EDIT -// This file was generated by swaggo/swag +// Package docs Code generated by swaggo/swag. DO NOT EDIT package docs import "github.com/swaggo/swag" @@ -71,8 +70,8 @@ const docTemplate = `{ } ], "responses": { - "201": { - "description": "Created", + "200": { + "description": "OK", "schema": { "$ref": "#/definitions/services.PrescalingEventOutput" } @@ -86,7 +85,7 @@ const docTemplate = `{ } } }, - "/api/v1/events/current": { + "/api/v1/events/current/": { "get": { "description": "Get current prescaling Event", "consumes": [ @@ -228,9 +227,6 @@ const docTemplate = `{ "200": { "description": "OK" }, - "204": { - "description": "No Content" - }, "400": { "description": "Bad Request", "schema": { @@ -347,6 +343,8 @@ var SwaggerInfo = &swag.Spec{ Description: "This API was built with FastAPI to deal with prescaling recordings in CRD", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, + LeftDelim: "{{", + RightDelim: "}}", } func init() { diff --git a/docs/swagger.json b/docs/swagger.json index 727dc41..c3525b3 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -62,8 +62,8 @@ } ], "responses": { - "201": { - "description": "Created", + "200": { + "description": "OK", "schema": { "$ref": "#/definitions/services.PrescalingEventOutput" } @@ -77,7 +77,7 @@ } } }, - "/api/v1/events/current": { + "/api/v1/events/current/": { "get": { "description": "Get current prescaling Event", "consumes": [ @@ -219,9 +219,6 @@ "200": { "description": "OK" }, - "204": { - "description": "No Content" - }, "400": { "description": "Bad Request", "schema": { @@ -326,4 +323,4 @@ } } } -} +} \ No newline at end of file diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 14eaad0..111da01 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -103,8 +103,8 @@ paths: produces: - application/json responses: - "201": - description: Created + "200": + description: OK schema: $ref: '#/definitions/services.PrescalingEventOutput' "500": @@ -130,9 +130,6 @@ paths: responses: "200": description: OK - responses: - "204": - description: No Content "400": description: Bad Request schema: @@ -202,7 +199,7 @@ paths: summary: Update a prescaling Event by name tags: - prescalingevent - /api/v1/events/current: + /api/v1/events/current/: get: consumes: - application/json