Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm install with ClusterIP exposedFeatureServiceTemplate results in operator errors #114

Open
JPullen314 opened this issue Jun 8, 2023 · 0 comments

Comments

@JPullen314
Copy link

Hello,

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:
image

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/[email protected]/pkg/internal/controller/controller.go:114
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:311\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227"

Can anyone take a look at this? Any and all help is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant