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

feat(auth): Support operator management of instances with password protected admin ports #135

Closed diffuse closed 10 months ago

diffuse commented 10 months ago

This PR allows the operator to manage instances of dragonfly that have the argument --admin_nopass=false and authentication enabled.

There are updates to the README included, but in short: a secret in the namespace dragonfly-operator-system must be created in the form:

apiVersion: v1
kind: Secret
type: Opaque
metadata:
  name: dragonfly-admin-secret
  namespace: dragonfly-operator-system
data:
  password: c29tZS1wYXNzd29yZA==

Which the operator will use to open authenticated admin connections and to set masterauth on replicas.

I'm having a bit of trouble running all of the tests on minikube (some appear to hang, etc). I'd like to add some new tests for this feature, but since I can't run all of the originals successfully, I'm opening this PR and asking for advisement.

Let me know what you think/if you see any issues. Thanks for this project!

(this addresses https://github.com/dragonflydb/dragonfly-operator/issues/133)

diffuse commented 10 months ago

Woops, I rebased to sign the last few commits and it looks like it broke the history. I'll fix it and will open a new PR.