Hello,
I have installed the Dragonfly operator in my cluster (via Helm) chart v1.33.1. I have been testing how I can pass configuration arguments using a manifest.
For example:
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
spec:
replicas: 3
resources:
requests:
cpu: 550m
memory: 550Mi
limits:
cpu: 600m
memory: 750Mi
labels:
app.kubernetes.io/name: dragonfly
annotations:
prometheus.io/scrape: "true"
prometheus.io/path: /metrics
prometheus.io/port: "9999"
args:
- --primary_port_http_enabled=true
- --requirepass=$(DFLY_requirepass)
- --admin_port=9999
env:
- name: DFLY_requirepass
valueFrom:
secretKeyRef:
name: dragonfly-auth # The name of your secret
key: password # The key within the secret
snapshot:
cron: "*/15 * * * *"
persistentVolumeClaimSpec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 750Mi
topologySpreadConstraints:
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app.kubernetes.io/name: dragonfly
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- "dragonfly"
topologyKey: kubernetes.io/hostname
This configuration runs, and the state is good. However, digging a little deeper I am not sure what to think about the arguements I’ve passed.
~ kubectl get po dragonfly-sample-0 -oyaml | grep arg -A10
- args:
- --alsologtostderr
- --primary_port_http_enabled=false
- --admin_port=9999
- --admin_nopass
- --primary_port_http_enabled=true
- --requirepass=$(DFLY_requirepass)
- --admin_port=9999
- --dir=/dragonfly/snapshots
- --snapshot_cron=*/15 * * * *
Some of these arguments are present even if I don’t add the spec.args section to my Dragonfly Kind manifest.
Further:
~ kubectl exec -it dragonfly-sample-0 -- /bin/sh
# ps ax
PID TTY STAT TIME COMMAND
1 ? Ssl 0:06 dragonfly --logtostderr --alsologtostderr --primary_port_http_enabled=false --admin_port=9999 --admin_nopass --primary_port_http_enabled=true --requirepass=password --admin_port=9999 --dir=/dra
1608 pts/0 Ss 0:00 /bin/sh
1631 pts/0 R+ 0:00 ps ax
This is all unexepected, especially the primary_port_http_enabled=false AND primary_port_http_enabled=true.
Is there something I am doing wrong?