This repository was archived by the owner on May 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
This repository was archived by the owner on May 24, 2023. It is now read-only.
Number of replicas is needed #69
Copy link
Copy link
Closed
Labels
bugAn issue reporting a potential bugAn issue reporting a potential bug
Description
Describe the bug
When deployed without it, the operator cannot create the controller.
To Reproduce
Steps to reproduce the behavior:
- Deploy the following instance:
apiVersion: k8s.nginx.org/v1alpha1
kind: NginxIngressController
metadata:
name: nginx-ingress-controller
namespace: default
spec:
type: deployment
image:
repository: nginx/nginx-ingress
tag: 1.9.1
pullPolicy: Always
serviceType: NodePort
enableCRDs: False
nginxPlus: False
- View logs on the operator.
- See error like:
{"level":"error","ts":1614670022.4628859,"logger":"controller","msg":"Reconciler error","controller":"nginxingresscontroller-controller","name":"nginx-ingress-controller","namespace":"default","error":"NginxIngressController.k8s.nginx.org \"nginx-ingress-controller\" is invalid: spec.replicas: Invalid value: \"null\": spec.replicas in body must be of type integer: \"null\"","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\tgithub.com/go-logr/zapr@v0.1.1/zapr.go:128\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tsigs.k8s.io/controller-runtime@v0.6.3/pkg/internal/controller/controller.go:246\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsigs.k8s.io/controller-runtime@v0.6.3/pkg/internal/controller/controller.go:218\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\tsigs.k8s.io/controller-runtime@v0.6.3/pkg/internal/controller/controller.go:197\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1\n\tk8s.io/apimachinery@v0.18.9/pkg/util/wait/wait.go:155\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil\n\tk8s.io/apimachinery@v0.18.9/pkg/util/wait/wait.go:156\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\tk8s.io/apimachinery@v0.18.9/pkg/util/wait/wait.go:133\nk8s.io/apimachinery/pkg/util/wait.Until\n\tk8s.io/apimachinery@v0.18.9/pkg/util/wait/wait.go:90"}
Expected behavior
According with the docs, replicas shold be 1 if missing.
Your environment
- Version of the NGINX Ingress Operator - master
- Version of the Ingress Controller - 1.9.1
- Version of Kubernetes - 1.20.4
- Kubernetes platform - kubeadm
- Using NGINX
Metadata
Metadata
Assignees
Labels
bugAn issue reporting a potential bugAn issue reporting a potential bug