1Password/onepassword-operator

Deployment reconciling is not working for Deployments with GRPC health check configured

evheniyt opened this issue · 0 comments

Your environment

Operator Version: 1.5.0

Connect Server Version: 1.5.7

Kubernetes Version: 1.23.1

What happened?

Starting from 1.23 Kubernetes allows using grpc health probes. When using grpc health probes onepassword-connect-operator is failing to reconciling the Deployment with error: livenessProbe: Required value: must specify a handler type

{"level":"info","ts":1669577053.985605,"logger":"controller_deployment","msg":"Reconciling Deployment","Request.Namespace":"test","Request.Name":"test-service"}
{"level":"error","ts":1669577053.9912837,"logger":"controller-runtime.controller","msg":"Reconciler error","controller":"deployment-controller","request":"test/test-service","error":"Deployment.apps \"test-service\" is invalid: [spec.template.spec.containers[0].livenessProbe: Required value: must specify a handler type, spec.template.spec.containers[0].startupProbe: Required value: must specify a handler type, spec.template.spec.containers[0].readinessProbe: Required value: must specify a handler type]","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/workspace/vendor/github.com/go-logr/zapr/zapr.go:128\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:258\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:232\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:211\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1\n\t/workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:155\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil\n\t/workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:156\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133\nk8s.io/apimachinery/pkg/util/wait.Until\n\t/workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:90"}

The health check prob is configured in Deployment like this:

livenessProbe:                                                                                                                                                                                              
  failureThreshold: 3                                                                                                                                                                                       
  grpc:                                                                                                                                                                                                     
    port: 5003                                                                                                                                                                                              
    service: ""                                                                                                                                                                                             
  initialDelaySeconds: 5                                                                                                                                                                                    
  periodSeconds: 30                                                                                                                                                                                         
  successThreshold: 1                                                                                                                                                                                       
  timeoutSeconds: 5

What did you expect to happen?

onepassword-connect-operator should successfully reconcile a Deployment with grpc health probs

Steps to reproduce

  1. Create a Deployment with grpc health probs
  2. onepassword-connect-operator will fail to reconcile this Deployment.

Notes & Logs