Skip to content

Commit

Permalink
fix: grpc port
Browse files Browse the repository at this point in the history
  • Loading branch information
raffis committed Dec 12, 2024
1 parent 7b90007 commit 19dc277
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions internal/controllers/ratelimitservice_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ func (r *RateLimitServiceReconciler) requestsForChangeBySelector(ctx context.Con

var reqs []reconcile.Request
for _, service := range list.Items {

var namespaces corev1.NamespaceList
if service.Spec.NamespaceSelector == nil {
namespaces.Items = append(namespaces.Items, corev1.Namespace{
Expand Down Expand Up @@ -475,6 +474,7 @@ func (r *RateLimitServiceReconciler) reconcile(ctx context.Context, service infr
ContainerPort: 8080,
},
{
Name: "grpc",
ContainerPort: 8081,
},
},
Expand All @@ -488,10 +488,6 @@ func (r *RateLimitServiceReconciler) reconcile(ctx context.Context, service infr
"/bin/ratelimit",
},
Env: []corev1.EnvVar{
corev1.EnvVar{
Name: "LOG_LEVEL",
Value: "debug",
},
corev1.EnvVar{
Name: "RUNTIME_SUBDIRECTORY",
Value: "runtime",
Expand Down Expand Up @@ -549,9 +545,14 @@ func (r *RateLimitServiceReconciler) reconcile(ctx context.Context, service infr
Ports: []corev1.ServicePort{
{
Name: "http",
Port: 80,
Port: 8080,
TargetPort: intstr.IntOrString{StrVal: "http", Type: intstr.String},
},
{
Name: "grpc",
Port: 8081,
TargetPort: intstr.IntOrString{StrVal: "grpc", Type: intstr.String},
},
},
Selector: map[string]string{
"app.kubernetes.io/instance": "ratelimit",
Expand Down

0 comments on commit 19dc277

Please sign in to comment.