Commit Graph

2 Commits

Author SHA1 Message Date
songxiao-wang87
4f254674fa Making a run test.
Signed-off-by: songxiao-wang87 <wang.xiaosong23@zte.com.cn>
2021-04-25 10:46:18 +08:00
Spencer Peterson
bd44ef811d Fix kube-addon-manager overwriting resources with EnsureExists
The addon manager readme states

> - Addons with label `addonmanager.kubernetes.io/mode=EnsureExists` will be checked for
> existence only. Users can edit these addons as they want.

However, the start_addon function was using `kubectl apply` to create
resources regardless of mode. This change switches between `kubectl
create` and `kubectl apply` depending on mode.

Additionally implemented tests for create_resource fn

 - Refactor functions and main executable
 - Quick tests in bash
 - Tests for Reconcile, EnsureExists behavior
 - Check for completeness with multi resource configs
2020-09-24 21:26:56 +00:00