onosproject / onos-test

Integration test infrastructure for ONOS (µONOS Architecture)
Apache License 2.0
11 stars 17 forks source link

Avoid Using String in atomix config map #156

Closed Andrea-Campanella closed 4 years ago

Andrea-Campanella commented 4 years ago

https://github.com/onosproject/onos-test/blob/master/pkg/onit/k8s/onos-cli.go#L104

this method concatenates everything in a string for the it to be uses as a value in the atomix.yaml key. I'd prefer having these as separate k/v pairs in the configMap of K8s.

adibrastegarnia commented 4 years ago

@Andrea-Campanella I think it is already addressed correct? Can we close it?

kuujo commented 4 years ago

@adibrastegarnia it hasn't been changed. The code @Andrea-Campanella is referring to is here now: https://github.com/onosproject/onos-test/blob/master/pkg/onit/cluster/cli.go#L89-L94

However, we can't make it separate key/value pairs in a ConfigMap because separate key/value pairs in a CM are mounted as separate files in the file system. But this is writing the configuration file used by Atomix, so it needs to be a single key. The only related improvement we could do here is encode a struct to YAML rather than writing a string.

adibrastegarnia commented 4 years ago

@kuujo Good to know. I will take a look.