On Tue, Mar 14, 2017 at 5:59 PM, Danesh Kuruppu <[email protected]> wrote:

>
> We have to understand the pattern to follow when modifying/removing/adding
>> an item in a *list* with deployment.yaml. Copying the entire list to
>> deployment.yaml and modify accordingly is the straight-forward approach.
>>
>> But that does not scale well if the number of items is quite big like in
>> this config file [1]. May be we are overseeing something? Kernel folks,
>> please clarify.
>>
>> [1] https://github.com/wso2/carbon-identity-mgt/blob/master/
>> features/org.wso2.carbon.identity.claim.feature/resourc
>> es/conf/profile-mapping.yaml
>>
>>
>
> Currently we have to copy the entire list to deployment.yaml to
> add/modify/remove an item in a list, if you are getting the configuration
> object from config provider. We cannot edit bean variable value partially
> from the deployment.yaml.
> In this case, rather getting configuration bean object from the config
> provider, we can get only the configurations defined in the deployment.yaml
> from the method[1] and do the add/modify/delete logic at the component
> level.
>

Danesh, we can handle adding an item to a list with this method. But I
don't think we can do modifications or deletions since there is no way to
identify the existing item to modify. I don't see an immediate way to fix
this via deployment.yaml either!! One alternative is to identify this type
of configuration files, and keep them as it is.

Thanks.


> You need to pass the namespace value defined in bean class. So service
> will provide the configurations defined in the deployment.yaml as a Map. If
> configurations are not defined, it will return null.
>
> 1. https://github.com/wso2/carbon-kernel/blob/master/
> core/src/main/java/org/wso2/carbon/kernel/configprovider/
> ConfigProvider.java#L45
>
> Thanks
> --
>
> *Danesh Kuruppu*
> Senior Software Engineer | WSO2
> Curren
> Email: [email protected]
> Mobile: +94 (77) 1690552 <077%20169%200552>
> Web: WSO2 Inc <https://wso2.com/signature>
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to