-
Notifications
You must be signed in to change notification settings - Fork 47
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
No way to mount Single FIle. #58
Comments
The listed cases are not supported, but there is another solution that you can try. https://gimlet.io/docs/onechart-reference#mounting-secrets-as-files
It is technically a secret resource in k8s not a configmap.. you can add the file content in the values file. Volumes configmap support is required feature and will land in OneChart. Thank you for the issue. |
I tried this but it is not solving the problem, as it mounts the files
however any files which exist in that directory would no longer be present.
I have even tried adding Subpath as recommended in Stack Overflow. But this
also leads to overwriting the full /etc/logrotate.d directory with one file
default.conf in this case.
fileSecrets:
- name: config
path: /etc/logrotate.d/
subPath: default.conf
secrets:
key.txt: Another File
default.conf: |
server {
listen 80;
server_name localhost;
proxy_pass https://www.google.com/;
}
}
Regards,
Amanpreet Singh.
…On Thu, Oct 13, 2022 at 4:36 PM Laszlo Fogas ***@***.***> wrote:
The listed cases are not supported, but there is another solution that you
can try.
https://gimlet.io/docs/onechart-reference#mounting-secrets-as-files
fileSecrets:
- name: rabbitmq-conf
path: /etc/rabbitmq
secrets:
rabbitmq.conf: |
this is the conf file content
definitions.json: |
this
is
a
multiline
secret
It is technically a secret resource in k8s not a configmap.. you can add
the file content in the values file.
Volumes configmap support is required feature and will land in OneChart.
Thank you for the issue.
—
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADEC5PUY2TMO45RSZWK4OLWC7UL3ANCNFSM6AAAAAARDYVQQE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Oh, yes. I hate that problem. Let me look at it. |
Follow-up 🪄hello @amanhigh, Case 1 (Mount an existing configMap as a file):volumes:
- existingConfigMap: map
path: /data/map.conf
subPath: map.conf Case 2 (Mount an emptyDir):volumes:
- emptyDir: true
path: /data
name: empty Case 3 (Mount a custom string as a file):volumes:
- fileName: blabla.conf
fileContent: |
multi-line-text
multi-line-text
path: /data |
I have usecase where i can't mount a directory but only a file.
Application uses a config /etc/tinyproxy.conf. Mounting /etc overrides all other configs. Hence there is need to just map single file.
Possible ways to do this
File using subPath from ConfigMap. But Voulmes don't support Config map currently.
https://stackoverflow.com/questions/44325048/kubernetes-configmap-only-one-file
Init Script that can run before Pod Start.
The text was updated successfully, but these errors were encountered: