mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-21 06:31:07 +02:00
* unsets kubernetes manual config properties when saving local cluster option * fixes test
19 lines
551 B
JavaScript
19 lines
551 B
JavaScript
import ApplicationSerializer from '../application';
|
|
|
|
export default class KubernetesConfigSerializer extends ApplicationSerializer {
|
|
primaryKey = 'backend';
|
|
|
|
serialize() {
|
|
const json = super.serialize(...arguments);
|
|
// remove backend value from payload
|
|
delete json.backend;
|
|
// ensure that values from a previous manual configuration are unset
|
|
if (json.disable_local_ca_jwt === false) {
|
|
json.kubernetes_ca_cert = null;
|
|
json.kubernetes_host = null;
|
|
json.service_account_jwt = null;
|
|
}
|
|
return json;
|
|
}
|
|
}
|