summaryrefslogtreecommitdiffstats
path: root/k8s/k8splugin/tasks.py
AgeCommit message (Collapse)AuthorFilesLines
2021-02-04Upgrade k8s to use configMapEdyta Krukowska1-1/+2
Issue-ID: DCAEGEN2-2546 Signed-off-by: Edyta Krukowska <edyta.krukowska@nokia.com> Change-Id: I41bacf0b9de239e21cc9900c408f10cea75f83c1
2020-08-28Add init container support for truststore merger.Jan Malkiewicz1-1/+3
Issue-ID: DCAEGEN2-2253 Signed-off-by: Jan Malkiewicz <jan.malkiewicz@nokia.com> Change-Id: I98f27834b36cad333728d41ec079b86a090e77f3
2020-08-10Certificates from CMPv2 server - handle incorrect blueprintJoanna Jeremicz1-0/+19
K8splugin will stop without deployment creation when external_cert does not contain all the required parameters Bugfix: K8splugin will not create cert-service-client init container by default Issue-ID: DCAEGEN2-2252 DCAEGEN2-2380 Signed-off-by: Joanna Jeremicz <joanna.jeremicz@nokia.com> Change-Id: Ibb6ada925ad8c7f1609e01ba9021a7dbcf0fe644
2020-07-24Add support to request certificates from CMPv2 server in DCAE cloudify ↵Joanna Jeremicz1-0/+16
blueprints If the blueprint specifies that the component uses external TLS via the `external_cert` property, the `Deployment` includes an additional init container and the component's container. The init container populates the external TLS certificate artifacts in mounted volume. The container requires CMPv2 CertService to work properly. Issue-ID: DCAEGEN2-2252 Signed-off-by: Joanna Jeremicz <joanna.jeremicz@nokia.com> Change-Id: I90cb79120ffaf634fc1f5b8a03a83abb30deb2b7
2020-04-29Remove ContainerizedPlatformContainer from typesJack Lucas1-110/+3
Also allow environment variables to specified via docker_config Issue-ID: DCAEGEN2-1791 Issue-ID: DCAEGEN2-2215 Change-Id: If6b3b206856031d3c2aa3a5f787c1be30bdc4afd Signed-off-by: Jack Lucas <jflucas@research.att.com>
2020-02-25Provide cacert in JKS format for clientsJack Lucas1-7/+6
Issue-ID: DCAEGEN2-1938 Signed-off-by: Jack Lucas <jflucas@research.att.com> Change-Id: Ic9a852bb058075b2b03aa6382ed33e23a4cca8b5
2020-01-17Address k8s plugin code smells reported by sonarMiroslav Los1-23/+21
Make 'resources' argument to k8sclient.k8sclient.deploy an optional kwarg, update its uses and document it. Split off code reported complex from deploy into functions. Tweak a nested if in tasks. Signed-off-by: Miroslav Los <miroslav.los@pantheon.tech> Issue-ID: DCAEGEN2-2006 Change-Id: I13a091de9207bab1c7d4eee3179263c5d994ffbf
2019-12-12Customize python import for kubernetes pluginMiroslav Los1-0/+3
Cloudify manager fails to find the plugin without this helper. The original code, cloudify-python-importer, is unmaintained. It is just one module, licensed under Apache2.0 as well. It also needs a python3 fix, hence the module code is added here. Note that what the modification does should not be necessary, and a proper root cause and fix needs to be found eventually. Signed-off-by: Miroslav Los <miroslav.los@pantheon.tech> Issue-ID: DCAEGEN2-1988 Change-Id: I28274dff902204362d7f5b6f97ac3381ff8b5411
2019-11-26Support python3 in all pluginsMiroslav Los1-23/+17
Unify tox/requirements/setup.py requirement specifications. Do not set upper version limits if possible. Drop uuid as dependency included with standard library. Drop import of unmaintained cloudify_importer without python3 version. Use PEP 508 URLs in requirements for non-PyPI (github) releases. Use cloudify-common 5 release; pre-release package for python3. Rewrite uses of map with loops/comprehensions. Signed-off-by: Miroslav Los <miroslav.los@pantheon.tech> Issue-ID: DCAEGEN2-1956 Change-Id: I7b3ceb97a628e3af5bda3178d182f4207069e86d
2019-07-17Move DR subscriber creation before container start5.0.2-ONAP5.0.1-ONAPelaltoJack Lucas1-97/+29
Also update Kubernetes client library version Fix bug that allowed generating a too-long k8s deployment name. Issue-ID: DCAEGEN2-1651 Issue-ID: DCAEGEN2-1653 Issue-ID: DCAEGEN2-1667 Change-Id: Ied859073fb01d8623278cf9e58c1dcc26fed1712 Signed-off-by: Jack Lucas <jflucas@research.att.com>
2019-07-01Add TLS support for client-only appsJack Lucas1-1/+9
Also enhance unit tests to do more robust checking of results. Issue-ID: DCAEGEN2-1550 Change-Id: Icf6e5357d828e19db73bb58b98fd60e9f111d0dc Signed-off-by: Jack Lucas <jflucas@research.att.com>
2019-04-19Fix DR subscriber failure4.0.0-ONAPdublinJack Lucas1-15/+8
Issue-ID: DCAEGEN2-1009 Change-Id: Ieb770b6562123dda78fd4b8c8c514d30767ad7fb Signed-off-by: Jack Lucas <jflucas@research.att.com>
2019-03-22add comment on 63 label length, fix _parse_volumesJason Luo1-0/+2
change to v['container'].get('mode') to allow mode value be absent Issue-ID: DCAEGEN2-1126 Change-Id: I12fe257995f466238f64b06e6cf80f3cc2654c5b Signed-off-by: Jason Luo <cl4531@att.com>
2019-03-18Add multi-cluster supportJack Lucas1-8/+28
Issue-ID: DCAEGEN2-1136 Change-Id: I314e5d8c501198b3e87c45813201498935c7bacc Signed-off-by: Jack Lucas <jflucas@research.att.com>
2019-03-12add liveness probe, fix readiness prob execJason Luo1-10/+16
liveness and readiness probes may run script with arguments, ports and volumes are optional instead of mandatory, test_tasks.py accept ports[] and volumes[] fix the issue of labels which are logner than 63 Issue-ID: DCAEGEN2-1126 Change-Id: Id2f893adc300bf508c0512a51b3665872d36f674 Signed-off-by: Jason Luo <cl4531@att.com>
2019-03-06Undeploy k8s artifacts on timeoutJack Lucas1-13/+21
Issue-ID: DCAEGEN2-987 Change-Id: I35a2dcdb7b7f1b7280dba6593a9ee2b8921b6df9 Signed-off-by: Jack Lucas <jflucas@research.att.com>
2019-02-27Add resource_config to specify CPU and menoryJason Luo1-5/+18
Enhance K8s plugin used by DCAE Platform to specify CPU and memory Issue-ID: DCAEGEN2-1126 Change-Id: I2431b0b7f67f855122ed4494aa21cad0f99dcc37 Signed-off-by: Jason Luo <cl4531@att.com>
2018-09-10Add support for TLS init containerJack Lucas1-0/+10
Change-Id: I118af2c8a0294ffc89e045f8cdae24dfb7e57ab6 Issue-ID: DCAEGEN2-591 Signed-off-by: Jack Lucas <jflucas@research.att.com>
2018-08-17Add checks on runtime props for uninstallJack Lucas1-19/+29
Change-Id: Ib2e37713068e77126914d1af3bc238fc0119ef93 Issue-ID: DCAEGEN2-695 Signed-off-by: Jack Lucas <jflucas@research.att.com>
2018-07-25Add policy update notification supportJack Lucas1-91/+74
Use k8s terminology instead of Docker terminology Remove some redundant logging Change-Id: Ic8e581ebde9ea062a7d0e145465425eec1db57c3 Issue-ID: DCAEGEN2-504 Signed-off-by: Jack Lucas <jflucas@research.att.com>
2018-07-17Add support for updating image.Jack Lucas1-34/+59
- Refactor type file to reduce duplication - General code cleanup Change-Id: I80354736100dcd3544db2f751335d704bd240666 Issue-ID: DCAEGEN2-543 Signed-off-by: Jack Lucas <jflucas@research.att.com>
2018-06-18Create k8s readiness probeJack Lucas1-18/+15
Change-Id: Iaf222957bc7aa049e3d8d6d1c290435767487387 Issue-ID: DCAEGEN2-503 Signed-off-by: Jack Lucas <jflucas@research.att.com>
2018-04-05Set up env variables correctlyJack Lucas1-2/+2
Change-Id: I4752510a4e36d8dc19d923a817c7fb687d78fa22 Issue-ID: DCAEGEN2-432 Signed-off-by: Jack Lucas <jflucas@research.att.com>
2018-03-23Add DCAE Kubernetes pluginJack Lucas1-0/+682
Change-Id: Ic329f77bb09dcccfd49a34a8f84d387e8da929c6 Issue-ID: DCAEGEN2-410 Signed-off-by: Jack Lucas <jflucas@research.att.com>