neo4j / helm-charts

Apache License 2.0
59 stars 52 forks source link

[Bug]: Error while installing : services "dev-neo4j" already exists #275

Closed soumiksamanta closed 9 months ago

soumiksamanta commented 10 months ago

Contact Details

soumik.samanta@nokia.com

What happened?

I have the following override

nameOverride: neo4j neo4j: name: neo4j edition: "enterprise" acceptLicenseAgreement: "yes" password: "mainstreet" resources: cpu: "1000m" memory: "4Gi" volumes: data: mode: "defaultStorageClass" services: admin: enabled: false neo4j: spec: type: ClusterIP

myrepo is a JFrog artifactory where I had uploaded the standalone chart

` helm install dev myrepo/neo4j-standalone -f fsp-charts/fss-dev.yaml --debug install.go:200: [debug] Original chart version: "" install.go:217: [debug] CHART PATH: /home/samanta/.cache/helm/repository/neo4j-standalone-4.4.21.tgz

client.go:134: [debug] creating 8 resource(s) Error: INSTALLATION FAILED: 1 error occurred:

helm.go:84: [debug] 1 error occurred:

INSTALLATION FAILED main.newInstallCmd.func2 helm.sh/helm/v3/cmd/helm/install.go:147 github.com/spf13/cobra.(Command).execute github.com/spf13/cobra@v1.6.1/command.go:916 github.com/spf13/cobra.(Command).ExecuteC github.com/spf13/cobra@v1.6.1/command.go:1044 github.com/spf13/cobra.(*Command).Execute github.com/spf13/cobra@v1.6.1/command.go:968 main.main helm.sh/helm/v3/cmd/helm/helm.go:83 runtime.main runtime/proc.go:250 runtime.goexit runtime/asm_amd64.s:1598 `

However I see all the k8s objects are created

kubectl get all | grep neo4j pod/dev-neo4j-0 1/1 Running 0 4m45s service/dev-neo4j ClusterIP 10.101.108.69 7687/TCP,7474/TCP,7473/TCP 4m45s statefulset.apps/dev-neo4j 1/1 4m45s

k8s: v1.28.4 helm: v3.12.3

Chart Name

Neo4j Cluster (v4.4.x)

Chart Version

4.4.21

Environment

Local Machine

Relevant log output

No response

Code of Conduct

soumiksamanta commented 10 months ago

Looks like the chart is generating two Service manifests `

Source: neo4j-standalone/templates/neo4j-svc.yaml

ClusterIP service for bolt / http connections

apiVersion: v1 kind: Service metadata: name: "dev-neo4j" namespace: "default" labels: helm.neo4j.com/neo4j.name: "neo4j" app: "neo4j" helm.neo4j.com/instance: "dev-neo4j" helm.neo4j.com/service: "default"
spec: publishNotReadyAddresses: false type: ClusterIP selector: app: "neo4j" helm.neo4j.com/instance: "dev-neo4j" ports:

soumiksamanta commented 10 months ago

Fixed it by disabling neo4j service in the override. I understand that the helm doc mentions A LoadBalancer Service for external Neo4j driver applications and Neo4j Browser

I think the value for type should not be exposed for override, if its only for LoadBalance type

harshitsinghvi22 commented 9 months ago

@soumiksamanta thanks for raising the issue.

Yes , the neo4j service type is of loadbalancer type however to provide more flexibility and options to the user we have exposed the type which is set to default "LoadBalancer"

the helm chart by default gives you a service for LB type with multiCluster functionality , along with a service of ClusterIP type with just three ports.

We will keep the type expose for time being so as to give the users more flexibility.

However , we can decide in future to add an enabled flag to the default clusterIP just incase users want to use the neo4j service type as the ClusterIP