Deck sync overriding all existing config


I’m new to Kong and I have been testing it and trying to understand the CICD part.

I’m trying to deploy configuration to Kong using decK. One thing that I noticed is whenever I use

deck sync

it overrides all the existing config. For example, let’s say in DEV env I have 2 services deployed, I want to deploy another one. Now when I generate the config and using sync command, it’s adding the new service but deleting the other 2 services. Is there a way to avoid this? This is also observed here on Kong User Call demo

In distributed config, I may have 100-1000s of APIs exposed on Kong, each API may have it’s own repo which contains API spec and kong configuration. Each time I update an API and use CICD to deploy the changes it deletes the other ones which is undesired. Using -s parameter to supply multiple config files is impractical if files > 10.

Could you please share your thoughts…

@Anurag - There is a way to act only on specified resources using tags. But I personally have not tried it.

Hi @Anurag you can use tag to resolve this issue.

By using this command your existing configuration will remain same and the new one will push to the gateway.

deck diff -s demo.yaml --select-tag MY_TEST_API
deck sync -s demo1.yaml --select-tag MY_TEST_API