-
Notifications
You must be signed in to change notification settings - Fork 374
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
Kubernetes provisioning example fails #924
Comments
Does anyone know of a fix for this issue? I'm hitting the same problem and can't see a workaround for this. |
Yes, I ran into this problem too when trying to pass the options as a CLI argument, instead, I opted to setting my dkron configuration in a For example, my server: false
data-dir: /opt/local/dkron
disable-http-tls: true
enable-prometheus: true
log-level: debug
ui: false
retry-join:
- provider=k8s namespace=dkron label_selector="app=dkron,component=server"
serf-reconnect-timeout: 5s
tags:
role: agent
type: worker I use configMapGenerator:
- name: dkron-agent-config
files:
- dkron.yml
- dkron-processor-slack.yml And my manifest looks something like this, I pass --config=/etc/dkron/dkron.yml as a CLI argument (note: I run dkron agents as a ---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: dkron-agent
labels:
app: dkron
component: agent
spec:
selector:
matchLabels:
app: dkron
component: agent
template:
metadata:
labels:
app: dkron
component: agent
spec:
serviceAccountName: dkron-agent-sa
volumes:
- name: dkron-agent-config
projected:
sources:
- configMap:
name: dkron-agent-config
containers:
- name: dkron-agent
image: <omitted>
args:
- agent
- --config=/etc/dkron/dkron.yml
ports:
- name: http
containerPort: 80
- name: grpc
containerPort: 6868
- name: serf
containerPort: 8946
imagePullPolicy: Always
volumeMounts:
- name: dkron-agent-config
mountPath: /etc/dkron
readOnly: true I use RBAC resources to control what apis/resources the dkron agents can interact with on the api-server when calling |
I no longer work at the same place when I first posted the comment, but trying to remember. I had a 3 node server cluster running on stateful sets. I recall it being extremely unstable, I would not at all recommend running your dkron servers in Kubernetes, the agents are fine. Yes dkron.yml was the same for all statefulsets. Cloud auto discovery for me did not work if it was defined in dkron.yml, it had to be passed via the cli. I would never recommend running the servers in kube, the implementation of raft here seems to be extremely buggy and unexpectedly breaks down/stops working at seemingly random times or if a host reboots. |
How did you get the CLI to work? That was the original problem in this issue. |
Take a look to https://github.com/distribworks/dkron-helm/blob/master/dkron/templates/server-statefulSet.yaml#L46 it should work just fine. Closing in the meantime |
Describe the bug
The Cloud Auto-join page for Kubernetes suggests
dkron agent --retry-join "provider=k8s label_selector=\"app=dkron,component=server\""
. However, this command results in cli args parse error messageinvalid argument "provider=k8s label_selector=\"app=dkron,component=server\"" for "--retry-join" flag: parse error on line 1, column 28: bare " in non-quoted-field
.To Reproduce
Expected behavior
When trying without quoting, e.g.
label_selector=foo=bar
, dkron log complainsso I would have expected this advise to work.
Specifications
Encountered with Docker image and on master branch at 2b2a2b2.
Additional context
On researching this, ran into containers/podman#2574 which I believe is a similar issue and suggests which suggests using
StringArray
instead ofStringSlice
. I do not have an easy way to run a locally built container in my Kubernetes cluster, so I can't easily test if that fix fully addresses this issue, just that the parsing test given above turns green with that fix.The text was updated successfully, but these errors were encountered: