Hi,there
I want to edit the options in corefile which belongs to a coredns configmap,
using client.core_v1_api.read_namespaced_config_map('coredns', 'kube-system').get('data').get('Corefile').get('.:53') , i can get the corefile of ".:53".
but how can i edit the option in this core file, for example,changing "cache 30" to "cache 50"?
it seems that the core file i get was treated as string type in the program.
Is there any convenient ways to do this?
Any reply would be appreciated.
it seems that the core file i get was treated as string
Yes, Configmap values are strings, the Corefile is a single Configmap value.
Editing the Configmap via API would require string manipulation.
You could look at this package I recently wrote to facilitate editing Corefiles. Specifically New() and Corefile.ToString()
it seems that the core file i get was treated as string
Yes, Configmap values are strings, the Corefile is a single Configmap value.
Editing the Configmap via API would require string manipulation.
You could look at this package I recently wrote to facilitate editing Corefiles. Specifically
New()andCorefile.ToString()
@chrisohaver Thanks a lot
/label: question
/close
Most helpful comment
Yes, Configmap values are strings, the Corefile is a single Configmap value.
Editing the Configmap via API would require string manipulation.
You could look at this package I recently wrote to facilitate editing Corefiles. Specifically
New()andCorefile.ToString()