-
Notifications
You must be signed in to change notification settings - Fork 56
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
scalyr-agent-2-config --export-config should resolve symbol links #705
Comments
@schra I think you may have a syntax error on your export command. Could you try the following command and see if this works for you?
This command successfully exports all config files from the k8s agent pod. I don't see the symbolic links you were observing in your environment.
Your original command "cat agent.d/agent.json" returns nothing because |
Sure:
Because you wanted to run your exact command: there is a whitespace mising
Now run the command again but with the whitespace. See #704 why this command fails (this is another bug)
Again, see #704 for the workaround command that I'll now use
But did you also use a ConfigMap that mounted the files into the pod? Our ConfigMap mounts to /etc/scalyr-agent-2/agent.d. Using ConfigMaps is what you also recommend in your documentation.
Well, we have two agent.json's in our setup. We have |
@schra Sorry about missing the white space in the sample command. I think #704 is a bug on 2.1.15 which I can't reproduce on 2.1.17. I will create a bug report for the engineering to fix it. Regards to the configMap setting, the recommended way is to add the additional configurations to the
The above configuration is an example from our documentation. Is this similar to what you have?
This is much easier than mounting the pod configs to local files. The export function is mainly designed for the files that were initially edited inside of containers, and later users need to export them to local disk for reusing the same configs to bake a custom Scalyr agent pod. |
No worries, and thank you :)
This exactly what we do in our deployment. But k8s seems to mount the files from the configmap weirdly because they seem to be symbol links. |
@schra I was able to reproduce the same result, but I do think that this is expected behavior. Exporting agent config files helps you create a configMap
https://app.scalyr.com/help/scalyr-agent-k8s#export-config Since you already had the configMap created, you should be able to edit the configMap directly with It seems that there is a workaround solution by adding |
What
The instructions from https://app.scalyr.com/help/scalyr-agent-k8s#export-config don't work.
scalyr-agent-2-config --export-config
doesn't export the configuration such that I could customize it.Why
Files under
agent.d/
are symbol links to non-existent files (files that are not part of the tar archive):We are also using the official (unmodified) Docker image and only customize via ConfigMaps.
Docker image version: 2.1.15
Definition of done
Resolve symbol links when exporting the configuration files via
scalyr-agent-2-config --export-config
The text was updated successfully, but these errors were encountered: