dragonflydb / dragonfly-operator

A Kubernetes operator to install and manage Dragonfly instances.
https://www.dragonflydb.io/docs/managing-dragonfly/operator/installation
Apache License 2.0
132 stars 28 forks source link

Request a fixed nodeport #204

Closed mueller-ma closed 3 months ago

mueller-ma commented 3 months ago

Did you search GitHub Issues and GitHub Discussions First?

Yes

Is your feature request related to a problem? Please describe.

I'd like to run a Dragonfly cluster in Kubernetes and publish it to services running outside Kubernetes. For this I changed the service to type NodePort. Now a random port is assinged to this service.

apiVersion: dragonflydb.io/v1alpha1
kind: Dragonfly
metadata:
  labels:
    app.kubernetes.io/name: dragonfly
    app.kubernetes.io/instance: dragonfly-sample
    app.kubernetes.io/part-of: dragonfly-operator
    app.kubernetes.io/managed-by: kustomize
    app.kubernetes.io/created-by: dragonfly-operator
  name: dragonfly-sample
  namespace: dragonfly
spec:
  serviceSpec:
    type: NodePort

Describe the solution you'd like

Add a new property spec.serviceSpec.nodePort to define a fixed port.

romange commented 3 months ago

Hello @mueller-ma , thank you for opening the issue. Would you like maybe contribute the fix?

mueller-ma commented 3 months ago

I created a PR, but need some help with that.