aboutsummaryrefslogtreecommitdiffstats
path: root/src/k8splugin/plugins/generic
AgeCommit message (Collapse)AuthorFilesLines
2021-10-04Fixed installation of CRD resourcesLukasz Rajewski1-1/+30
Issue-ID: MULTICLOUD-1397 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: Id8e653f1b5c61278ee2d64da409ac5b0685b36b8
2021-10-04Further fixes for config delete operationLukasz Rajewski1-53/+54
The issue was related with insufficient handlijg of different versions of config vs their delete operation handled by the plugin. Issue-ID: MULTICLOUD-1332 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: I90d896720fa89ebd66cb3290cdd9401272f5e3fd
2021-08-11Support pre/post install/delete hooks  hthieu1-1/+247
Update instance create and delete handler to support pre/post install/delete hooks.  Add hook.go: to execute and delete hook (base on delete policy).  Implement watchUntilReady in generic plugin to wait for readiness of hook rss. Add hook_sorter.go: to sort hook based on weight. User can define timeout for each type of hooks in overwrite-values. Variable name is k8s-rb-instance-pre-install-timeout (default 60s), k8s-rb-instance-post-install-timeout (default 600s), k8s-rb-instance-pre-delete-timeout (default 60s) and k8s-rb-instance-post-delete-timeout (600s). This is timeout for each hook of a hook event (not a total time). Add recovery capability to continue the execution of instantiation (create or delete) when the plugin stop unexpectedly. For now, this is disabled because we have data-race issue during test. Will enable when we find the solution. Add basic test for hooks (in hook_test.go) Add test for hook in instance_test For instance get request, we can request for full data by adding query param to the request: full=true. Issue-ID: MULTICLOUD-1347 Signed-off-by: hthieu <huu_trung.thieu@nokia-bell-labs.com> Change-Id: If2b4a90831b9bfce1af8b926e4062a7d706bee08
2021-08-05Update status check endpoint hthieu1-1/+1
  Update status check endpoint to use helm (3.5) official implementation of resource status check. Move utils to new module and update import. Issue-ID: MULTICLOUD-1372 Signed-off-by: hthieu <huu_trung.thieu@nokia-bell-labs.com> Change-Id: I57a827d09466f5f554c89c2fa5533696285f9c37
2021-05-05DeletePropagationPolicy changed to backgroundLukasz Rajewski1-1/+1
The policy is changed to Background operation which is default for helm application. Later on dedicated parametr will be added to the profile to let it be changed for particular helm chart. Issue-ID: MULTICLOUD-1338 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: I29978bc39fe6e1d10b0278fe10736ff1b7cc2006
2021-04-12Migrate to use Helm v3 librariesRitu Sood1-9/+10
Moving to Helm v3. Updated unit tests. Reworked Healthcheck Execution to align with v3 design. Helm v3 requires newer version for K8s libraries. Moved to use version 0.19.4. Issue-ID: MULTICLOUD-1295 Signed-off-by: Ritu Sood <ritu.sood@intel.com> Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: I091b75d69841dde56ad2c294cca2d5a0291ffa8f
2020-09-14Provide tests for nested labels provisioningKonrad Bańka1-1/+1
Issue-ID: MULTICLOUD-1179 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: I2f8facefc5299408a47dd9f8bdba9410aa8171de
2020-08-26Improve configure API to support k8s resource updationsvamshi.nemalikonda1-0/+56
Code fore review. Issue-ID: MULTICLOUD-1124 Change-Id: I6bb9786660f6760c15008132f1c254e7f9b39561 Signed-off-by: vamshi.nemalikonda <vn00480215@techmahindra.com> Improve configure API to support k8s resource updations create resource enabled. Issue-ID: MULTICLOUD-1124 Change-Id: I6bb9786660f6760c15008132f1c254e7f9b39561 Signed-off-by: vamshi.nemalikonda <vn00480215@techmahindra.com> Improve configure API to support k8s resource updations code improvements. Issue-ID: MULTICLOUD-1124 Change-Id: I6bb9786660f6760c15008132f1c254e7f9b39561 Signed-off-by: vamshi.nemalikonda <vn00480215@techmahindra.com> Improve configure API to support k8s resource updations fixing unit test failures. Issue-ID: MULTICLOUD-1124 Change-Id: I6bb9786660f6760c15008132f1c254e7f9b39561 Signed-off-by: vamshi.nemalikonda <vn00480215@techmahindra.com>
2019-08-07Add custom label to track created resourcesKiran Kamineni1-0/+15
Create a custom label on created resources Also, create it on pods where pods are being created. This will help us later for filtering and querying pods and resources. Issue-ID: MULTICLOUD-675 Change-Id: I4b4fce7b67f9f27559d99dcca94a9191b96cb7c6 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-08-05Merge "Add static compile time check to plugins"Bin Yang1-0/+3
2019-07-31Add static compile time check to pluginsKiran Kamineni1-1/+4
Add a static compile time check to plugins to make sure that any interface implementation mismatch is caught at compile time rather than runtime. Issue-ID: MULTICLOUD-666 Change-Id: I7f57774ad9384edb874cf64534f521014aea422f Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-07-22Minor improvement to log statementsKiran Kamineni1-7/+1
Removing some log statements that are cluttering the output. Added a log statement to print errors during instantiation. Issue-ID: MULTICLOUD-666 Change-Id: I76ad59c9cb36b5cb999573afec18e6f1adbed4ad Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-06-24Change the import paths for go get accessKiran Kamineni1-3/+3
This allows other projects to do a go get and use this repo. go get github.com/multicloud-k8s/src/k8splugin will do the job. import github.com/multicloud-k8s/src/k8splugin will import the root package Issue-ID: MULTICLOUD-666 Change-Id: I2f41c88c5a7fb3305b78cce8a83a0e102baa444c Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-06-06Plugin code refactoringKiran Kamineni1-10/+58
The plugin code has been refactored to implement a common interface. This will allow us to do plugin validation at loadtime of the plugin instead of at runtime. This also makes the code calling the plugins cleaner and easier to read. Issue-ID: MULTICLOUD-557 Change-Id: Ice2bcc9b850d7c0e1707dcc42132c63dd77472a7 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-25Use the unstructured type for decodeKiran Kamineni1-9/+3
Use the unstructured type in the into field. This allows us to remove the convert part of the code and also allows decoding for CRDs. Issue-ID: MULTICLOUD-585 Change-Id: I27ecdba7127ce63137dfbcd1c0a6938343b4e759 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-17Support non-namespaced objects in generic pluginKiran Kamineni1-3/+20
Generic plugin is not generic enough right now. It was assuming that objects are namespaced. This patch supports both types based on the Scope field in the mapping. Issue-ID: MULTICLOUD-557 Change-Id: I3ac512243d183b26cbf0aea2962dcd2a6492c887 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-16Replace Kind with GroupVersionKindKiran Kamineni1-16/+12
Kind is not unique to track resources in Kubernetes GroupVersionKind is unique. We are just using that to track our data. It is abstracted behind a couple of new types for templates and resources. This change makes a lot of the old kind based operations redundant and simplified. Issue-ID: MULTICLOUD-573 Change-Id: I8f4ded2ba6a0821a8fbd679dc99ce3a44d805524 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-10Add support for generic pluginKiran Kamineni1-0/+109
Add support for generic kinds We are currently using a known map to find the group version resource for a kind. Issue-ID: MULTICLOUD-350 Change-Id: I5a64f73760b73cf92b9a3fab8c22ad54e0a5f84f Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>