Skip to content
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

config: Fix configuration files for sample-configmap #91

Closed
wants to merge 1 commit into from
Closed

config: Fix configuration files for sample-configmap #91

wants to merge 1 commit into from

Conversation

changzhi1990
Copy link
Contributor

@changzhi1990 changzhi1990 commented Jun 30, 2023

It tries to read the "nri-resource-policy.cfg" file from the configmap. But the configmap misses the "nri-resource-policy.cfg" key.

Otherwise, the pod can't start with the "no such file or directory" error.

The detailed error message is:

F0629 07:03:01.197013       1 log.go:486] failed to create resource manager: resource-manager: failed to load fallback configuration /etc/nri-resource-policy/nri-resource-policy.cfg: config error: failed to apply configuration from file: config error: failed to read file "/etc/nri-resource-policy/nri-resource-policy.cfg": open /etc/nri-resource-policy/nri-resource-policy.cfg: no such file or directory

It try to read the "nri-resource-policy.cfg" file from the
configmap. But the configmap miss the "nri-resource-policy.cfg" key.

Otherwise, the pod can't start with the "no such file or directory" error.

Signed-off-by: zhi.chang <[email protected]>
@klihub
Copy link
Collaborator

klihub commented Jul 9, 2023

@fmuyassarov Can you take a look at the overlay/kustomize/etc. setup we have ?

The quoted error message from the logs comes from the fallback config not being found. That config us normally a ConfigMap, but one which is mounted in the filesystem as a file at a fallback config location which is then passed to the plugin on the command line. Based on a quick glance at the commit in this PR, it does not look like doing the right thing. Could you try digging into what is the root cause of fallback config file not being found error ?

@fmuyassarov
Copy link
Collaborator

Hi @changzhi1990 can you give a bit more info how are you deploying the plugins into the k8s cluster and preferably share the deployment you are using ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants