summaryrefslogtreecommitdiffstats
path: root/k8s/k8sclient/k8sclient.py
AgeCommit message (Collapse)AuthorFilesLines
2021-04-09Add configuration of external tls init container - CMPv2Tomasz Wrobel1-10/+38
- Add configuration of certificates exists in secret - Add configuration of secret contains passwords Issue-ID: OOM-2712 Signed-off-by: Tomasz Wrobel <tomasz.wrobel@nokia.com> Change-Id: I4e0d6fb3717fdf19b5110a83d9273fd7bcf75757
2021-02-26Add certificate custom resource creation when CertManager CMPv2 integration ↵Tomasz Wrobel1-9/+214
is enabled Issue-ID: DCAEGEN2-2440 Signed-off-by: Tomasz Wrobel <tomasz.wrobel@nokia.com> Change-Id: Icc2006af0520d592bfdf46d4f9fe419d7b5bc81e
2021-02-24Add a method for creating a secret with a generated password.Jan Malkiewicz1-0/+48
Issue-ID: DCAEGEN2-2440 Signed-off-by: Jan Malkiewicz <jan.malkiewicz@nokia.com> Change-Id: Ib56b193d0ae8ae1822ec7dac04a22ca767e9ecab
2021-02-18Fix bug with default mode format in ConfigMapVolumeSource and upgrade ↵Edyta Krukowska1-1/+1
k8splugn to 3.5.3 Issue-ID: DCAEGEN2-2546 Signed-off-by: Edyta Krukowska <edyta.krukowska@nokia.com> Change-Id: If1eef2d7b6a8c7b3403d927895e20534f0137492
2021-02-05Fix conditions for volumesEdyta Krukowska1-2/+2
Issue-ID: DCAEGEN2-2546 Signed-off-by: Edyta Krukowska <edyta.krukowska@nokia.com> Change-Id: I62bb6a9bc6ed2efefafa491331ad1c5c477a924b
2021-02-04Upgrade k8s to use configMapEdyta Krukowska1-87/+140
Issue-ID: DCAEGEN2-2546 Signed-off-by: Edyta Krukowska <edyta.krukowska@nokia.com> Change-Id: I41bacf0b9de239e21cc9900c408f10cea75f83c1
2020-12-10Add option to use services with ipv6JerzySzachniewicz1-15/+43
Issue-ID: DCAEGEN2-2388 Signed-off-by: JerzySzachniewicz <jerzy.szachniewicz@nokia.com> Change-Id: I34ca694b38e9c3121ec7a0bd95c92071392052d3 Signed-off-by: JerzySzachniewicz <jerzy.szachniewicz@nokia.com>
2020-09-30[k8splugin] Update plugin to use OOM CertServicePiotr Marcinkiewicz1-8/+8
- Replace AAF CertService with OOM CertService - Rename truststore merger init container to cert post processor Issue-ID: OOM-2526 Signed-off-by: Piotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com> Change-Id: If3aecb9c62970e338c694ff7ae2dadf94c4daa8b
2020-09-17Label k8s Deployments for healthcheckJack Lucas1-1/+2
Issue-ID: DCAEGEN2-2433 Signed-off-by: Jack Lucas <jflos@sonoris.net> Change-Id: I12b5ca5d0c70d7c8d42c1ec1ce88841d2cf25cd7
2020-09-03[k8splugin] Add support to move CMPv2 keystore in place of AAFCertManRemigiusz Janeczek1-3/+24
keystore Make secret with certs for cert-service-client container configurable Issue-ID: DCAEGEN2-2253 Signed-off-by: Remigiusz Janeczek <remigiusz.janeczek@nokia.com> Change-Id: Ia17d3a1f32d2118aa6d5380e32ac5afb5ad2d017
2020-08-28Add init container support for truststore merger.Jan Malkiewicz1-7/+58
Issue-ID: DCAEGEN2-2253 Signed-off-by: Jan Malkiewicz <jan.malkiewicz@nokia.com> Change-Id: I98f27834b36cad333728d41ec079b86a090e77f3
2020-07-29Adapt DCAE CFY K8S Plugin with K8S 1.17 version of APIsSylwia_Jakubek1-10/+12
Issue-ID: DCAEGEN2-2309 Signed-off-by: Sylwia Jakubek <sylwia.jakubek@nokia.com> Change-Id: I40db1bcaae65f6d30a71ac7831b6c316e82b5576
2020-07-24Add support to request certificates from CMPv2 server in DCAE cloudify ↵Joanna Jeremicz1-0/+53
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-06-02move plugins from from ccsdk to dcaegen2Hansen, Tony (th1395)1-1/+0
copy dmaap, helm, pgaas and sshkeyshare plugins from ccsdk to dcaegen2 Change-Id: Ib257495de6c275c45f0c87a4b42ac21a2fab7979 Signed-off-by: Hansen, Tony (th1395) <th1395@att.com> Issue-ID: DCAEGEN2-2207 Signed-off-by: Hansen, Tony (th1395) <th1395@att.com>
2020-04-29Remove ContainerizedPlatformContainer from typesJack Lucas1-7/+1
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-30/+21
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-96/+103
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-11-26Support python3 in all pluginsMiroslav Los1-6/+5
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-4/+4
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-16/+37
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-2/+2
Issue-ID: DCAEGEN2-1009 Change-Id: Ieb770b6562123dda78fd4b8c8c514d30767ad7fb Signed-off-by: Jack Lucas <jflucas@research.att.com>
2019-04-02Change kubeconfig file locationJack Lucas1-1/+1
By putting kubeconfig in its own directory, we make sure updates to the underlying configMap become visible to the plugin without restarting CM. Issue-ID: DCAEGEN2-1136 Change-Id: Ifbc5bed31cdcf285b1cf845427679f631eaa4645 Signed-off-by: Jack Lucas <jflucas@research.att.com>
2019-03-22add comment on 63 label length, fix _parse_volumesJason Luo1-1/+1
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-23/+30
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-5/+18
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-02-28Add k8sclient unit testsJack Lucas1-3/+3
Change-Id: I4b664865618bf87822af325e2c2dd43e71c0bdac Issue-ID: DCAEGEN2-1261 Signed-off-by: Jack Lucas <jflucas@research.att.com>
2019-02-27Add resource_config to specify CPU and menoryJason Luo1-4/+19
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-10-12Add support for UDP port mappingJack Lucas1-14/+29
Issue-ID: DCAEGEN2-796 Change-Id: I09038d0bc7154b989f9ce9e328da57aac0020597 Signed-off-by: Jack Lucas <jflucas@research.att.com>
2018-09-18Don't change to https when use_tls is setAndrew Gauld1-2/+2
The k8s plugin's behavior of setting the health check probe type scheme to https when it was http and the use_tls flag is set is causing a problem for the Policy Handler. This change leaves the health check type alone, so, if it was http, it stays http even if use_tls is set. Change-Id: If004876f5142889abe0b24aeb4c0fdedaea3ab2b Issue-ID: DCAEGEN2-591 Signed-off-by: Andrew Gauld <ag1282@att.com>
2018-09-10Add support for TLS init containerJack Lucas1-7/+31
Change-Id: I118af2c8a0294ffc89e045f8cdae24dfb7e57ab6 Issue-ID: DCAEGEN2-591 Signed-off-by: Jack Lucas <jflucas@research.att.com>
2018-08-01Fix k8splugin to accept intervals as stringsJack Lucas1-2/+28
Also update type file to point to new plugin version Add unit tests for parsing interval Change RE to be non-Python specific Use uppercase for RE constant and unit conversion factors Issue-ID: DCAEGEN2-649 Change-Id: I1de728b3efd0725d4a3da996d95ec61e68f56ab4 Signed-off-by: Jack Lucas <jflucas@research.att.com>
2018-07-25Add policy update notification supportJack Lucas1-4/+106
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-27/+77
- 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-3/+54
Change-Id: Iaf222957bc7aa049e3d8d6d1c290435767487387 Issue-ID: DCAEGEN2-503 Signed-off-by: Jack Lucas <jflucas@research.att.com>
2018-04-17Support for /var/run/secrets/kubernetes.ioJack Lucas1-2/+21
Change-Id: If259892dd332981654bcad6b1e07037afbf31c7d Issue-ID: DCAEGEN2-447 Signed-off-by: Jack Lucas <jflucas@research.att.com>
2018-03-23Add DCAE Kubernetes pluginJack Lucas1-0/+324
Change-Id: Ic329f77bb09dcccfd49a34a8f84d387e8da929c6 Issue-ID: DCAEGEN2-410 Signed-off-by: Jack Lucas <jflucas@research.att.com>