Hi Rodrigo,
Thank you for your response and patience.
As mentioned, I picked nagios as the example, since it has a lot of
configuration scattered around in different directories.
I would like to have similar function of config map that could store a tree
structure, are there cleaner solutions? Currently I am creating a config map
per directory with files. So for the example below, I would have to create 4
config maps.
The cleaner way that I know would be using repository, as you can just mount
the entire directory structure of the repo, however it's not the best way to go
for a production system.
For example :
root@ubuntu-trusty-64:~# tree temp/
temp/
├── a.ini
├── suba
│ ├── b.ini
│ └── script
│ └── z.py
└── subb
└── d.ini
3 directories, 4 files
Doing : (oc of openshift)
oc create configmap nested --from-file temp/
Only picks up the first level files, it does not pick up the sub directories.
root@ubuntu-trusty-64:~# oc get configmap nested -o yaml
apiVersion: v1
data:
a.ini: |
a=1
kind: ConfigMap
metadata:
creationTimestamp: 2016-11-13T23:05:54Z
name: nested
namespace: docker-podawan
resourceVersion: "60500003"
selfLink: /api/v1/namespaces/docker-podawan/configmaps/nested
uid: babfd8e3-a9f5-11e6-8c9c-0000b5387b75
On Saturday, November 12, 2016 at 7:05:37 AM UTC-8, Rodrigo Campos wrote:
> You can have it mount some files I'm subdirectories (it will create them for
> you).
>
>
> I'm omy phone, but you can specify mappings. So key "a" will be mapped to
> "something/something else/somename". Ans it will create all the dirs and the
> file will be be seen with name "somename".
>
>
> Is that enough? What do you want to achieve, exactly?
>
> On Saturday, November 12, 2016, <[email protected]> wrote:
> Thank you for the response. As mentioned on my previous email, I figured out
> that you can create a config map of an entire 1-level directory.
>
>
>
> However, the context of this is Nagios, where configuration files are stored
> in nested directories.
>
>
>
> config-root
>
> config_loc_A
>
> config_loc_A_2
>
> config_loc_B
>
>
>
> What I am currently doing is create a config map for each directory level.
>
>
>
> That's why I am looking for a cleaner solution.
>
>
>
> Thanks.
>
>
>
>
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Kubernetes user discussion and Q&A" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
>
> To post to this group, send email to [email protected].
>
> Visit this group at https://groups.google.com/group/kubernetes-users.
>
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.