Skip to content

Commit

Permalink
apply HTTP and GRPC port on command line
Browse files Browse the repository at this point in the history
  • Loading branch information
eguzki committed Nov 20, 2023
1 parent 2ea5461 commit f506a87
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/limitador/deployment_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package limitador

import (
"path/filepath"
"strconv"

appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -42,6 +43,14 @@ func DeploymentCommand(limObj *limitadorv1alpha1.Limitador, storageOptions Deplo
command = append(command, "--limit-name-in-labels")
}

// let's set explicitly the HTTP port,
// as it is being set in the readiness and liveness probe and in the service
command = append(command, "--http-port", strconv.Itoa(int(limObj.HTTPPort())))

// let's set explicitly the GRPC port,
// as it is being set in the service
command = append(command, "--rls-port", strconv.Itoa(int(limObj.GRPCPort())))

command = append(command, filepath.Join(LimitadorCMMountPath, LimitadorConfigFileName))
command = append(command, storageOptions.Command...)

Expand Down

0 comments on commit f506a87

Please sign in to comment.