aboutsummaryrefslogtreecommitdiffstats
path: root/src/k8splugin/plugins/namespace/plugin.go
AgeCommit message (Collapse)AuthorFilesLines
2021-10-04Further fixes for config delete operationLukasz Rajewski1-4/+9
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/+18
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-5/+6
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-08-26Improve configure API to support k8s resource updationsvamshi.nemalikonda1-0/+5
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-07-31Add static compile time check to pluginsKiran Kamineni1-0/+3
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-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-25/+35
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-01-25Use a standard Go project layoutVictor Morales1-4/+4
This project wasn't following some Standard Go Project Layout guidelines(https://github.com/golang-standards/project-layout). This change pretends to organize the source code and following those guidelines. Change-Id: I61085ac20f28069cede013f83034bed06892d87c Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-ID: MULTICLOUD-301
2018-09-25Improve Namespaces UTsVictor Morales1-10/+8
The current implementation of Unit Tests for Namespaces wasn't validating sucessful cases properly. This change fix that gap and increase the coverage number. Change-Id: Iddc0aca3b52ea8ffebca7dccfc94d4d99e052b06 Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-ID: MULTICLOUD-301
2018-09-18Add UTs to pluginsVictor Morales1-22/+52
Deployment, service and namespace are plugins which offers CRUD operations to manage their resources. They haven't implemented Unit Tests which makes fragile to change/refactor the source code. This change adds their corresponding Unit Tests and defines a standard interface. Change-Id: I1e1eb40f1a18ba33c74069a117462c8df17767ac Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-ID: MULTICLOUD-301
2018-08-24Seed code for k8s multicloud pluginShashank Kumar Shankar1-0/+68
This patch provides the initial seed code for the multicloud Kubernetes plugin and also provides the plugin feature to add new Kubernetes kinds. Change-Id: Ie5ee414656665070cde2834c4855ac2ebc179a9a Issue-ID: MULTICLOUD-301 Signed-off-by: Shashank Kumar Shankar <shashank.kumar.shankar@intel.com> Signed-off-by: Victor Morales <victor.morales@intel.com>