mirror of
https://github.com/openfaas/faas.git
synced 2025-06-09 08:46:48 +00:00
Remove service namespace from scale request
This field doesn't appear to be used and is supplied via the querystring which faas-netes (the only ns-enabled provider already consumes) Related to PR: https://github.com/openfaas/faas-netes/pull/671 Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
parent
3e46a62ce2
commit
11ff356cce
@ -27,13 +27,6 @@ type ExternalServiceQuery struct {
|
||||
AuthInjector middleware.AuthInjector
|
||||
}
|
||||
|
||||
// ScaleServiceRequest request scaling of replica
|
||||
type ScaleServiceRequest struct {
|
||||
ServiceName string `json:"serviceName"`
|
||||
ServiceNamespace string `json:"serviceNamespace"`
|
||||
Replicas uint64 `json:"replicas"`
|
||||
}
|
||||
|
||||
// NewExternalServiceQuery proxies service queries to external plugin via HTTP
|
||||
func NewExternalServiceQuery(externalURL url.URL, authInjector middleware.AuthInjector) scaling.ServiceQuery {
|
||||
timeout := 3 * time.Second
|
||||
@ -134,10 +127,9 @@ func (s ExternalServiceQuery) GetReplicas(serviceName, serviceNamespace string)
|
||||
func (s ExternalServiceQuery) SetReplicas(serviceName, serviceNamespace string, count uint64) error {
|
||||
var err error
|
||||
|
||||
scaleReq := ScaleServiceRequest{
|
||||
scaleReq := types.ScaleServiceRequest{
|
||||
ServiceName: serviceName,
|
||||
Replicas: count,
|
||||
ServiceNamespace: serviceNamespace,
|
||||
}
|
||||
|
||||
requestBody, err := json.Marshal(scaleReq)
|
||||
|
Loading…
x
Reference in New Issue
Block a user