Details
-
Task
-
Resolution: Unresolved
-
Major
-
None
-
7.1.2
-
None
-
None
-
Local Kubernetes Cluster using Autonomous Operator v2.4 and https://github.com/couchbase-partners/helm-charts v2.4.0
-
0
Description
We are importing the Couchbase operator as a subchart with version 2.4.0, and attempting to use the ClusterIP option for{{ networking.exposedFeatureServiceTemplate.spec.type}} is resulting in the following error as the operator tries to create services for the Couchbase pods:
{"level":"info","ts":1686234233.1629214,"logger":"cluster","msg":"Reconciliation failed", "error":"Service "couchbase-0000" is invalid: spec.externalTrafficPolicy: Invalid value: "Local": may only be set when type is 'NodePort' or 'LoadBalancer'"}
This results in the pods being marked as unready and the operator never creating the buckets specified in the helm chart:
Here is the networking field of the CouchbaseCluster resource created on deployment:
networking:
adminConsoleServiceTemplate:
metadata: {}
spec:
type: ClusterIP
adminConsoleServiceType: NodePort
adminConsoleServices:
- data
exposedFeatureServiceTemplate:
metadata: {}
spec:
type: ClusterIP
exposedFeatureServiceType: NodePort
exposedFeatures:
- client
- xdcr
waitForAddressReachable: 10m0s
waitForAddressReachableDelay: 2m0s
Here are the values we are setting for it in the top-level chart:
networking:
adminConsoleServiceTemplate:
spec:
type: ClusterIP
adminConsoleServices:
- data
disableUIOverHTTP: false
disableUIOverHTTPS: false
exposeAdminConsole: true
exposedFeatureServiceTemplate:
spec:
type: ClusterIP
exposedFeatures:
- client
- xdcr
waitForAddressReachable: 10m
waitForAddressReachableDelay: 2m
As you can see, the externalTrafficPolicy is not set, but it seems to be processed as though it was set to "Local". Trying to pass in the value as null still results in the same error. It's worth noting that the CRD itself says that the default value for externalTrafficPolicy would be "Cluster", though trying to use "Cluster" as the value results in the same error but with "Local" replaced by "Cluster".
Below is the stack trace from the operator error:
"stack":
"github.com/couchbase/couchbase-operator/pkg/util/k8sutil.reconcileService\n\tgithub.com/couchbase/couchbase-operator/pkg/util/k8sutil/services.go:547
github.com/couchbase/couchbase-operator/pkg/util/k8sutil.ReconcilePodService\n\tgithub.com/couchbase/couchbase-operator/pkg/util/k8sutil/services.go:938
github.com/couchbase/couchbase-operator/pkg/cluster.(*Cluster).reconcilePodServices
github.com/couchbase/couchbase-operator/pkg/cluster/reconcile.go:311
github.com/couchbase/couchbase-operator/pkg/cluster.(*ReconcileMachine).handleNodeServices
github.com/couchbase/couchbase-operator/pkg/cluster/nodereconcile.go:1005
github.com/couchbase/couchbase-operator/pkg/cluster.(*ReconcileMachine).exec
github.com/couchbase/couchbase-operator/pkg/cluster/nodereconcile.go:307
github.com/couchbase/couchbase-operator/pkg/cluster.(*Cluster).reconcileMembers
github.com/couchbase/couchbase-operator/pkg/cluster/reconcile.go:260
github.com/couchbase/couchbase-operator/pkg/cluster.(*Cluster).reconcile
github.com/couchbase/couchbase-operator/pkg/cluster/reconcile.go:172
github.com/couchbase/couchbase-operator/pkg/cluster.(*Cluster).runReconcile
github.com/couchbase/couchbase-operator/pkg/cluster/cluster.go:481
github.com/couchbase/couchbase-operator/pkg/cluster.(*Cluster).Update
github.com/couchbase/couchbase-operator/pkg/cluster/cluster.go:524
github.com/couchbase/couchbase-operator/pkg/controller.(*CouchbaseClusterReconciler).Reconcile
github.com/couchbase/couchbase-operator/pkg/controller/controller.go:90
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
sigs.k8s.io/controller-runtime@v0.11.0/pkg/internal/controller/controller.go:114
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
sigs.k8s.io/controller-runtime@v0.11.0/pkg/internal/controller/controller.go:311\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
sigs.k8s.io/controller-runtime@v0.11.0/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
sigs.k8s.io/controller-runtime@v0.11.0/pkg/internal/controller/controller.go:227"