Martin, That's an important observation. Thank you for bringing this to our attention.
Dmitry, Thanks for looking into this. Could we queue up a patch? That will offer the team the option to benefit from this significant reduction as soon as they are ready to merge it. Thanks, Adolfo On Wed, Apr 24, 2019, 05:01 Puzikov Dmitry <[email protected]> wrote: > Hi, Martin, > > > > I had some free minutes to look into readiness-check. > > Please find minimized image based on python:2-alpine here: > <https://cloud.docker.com/repository/docker/zhabba/readiness-check> > <https://cloud.docker.com/u/zhabba/repository/docker/zhabba/readiness-check> > https://hub.docker.com/r/zhabba/readiness-check > > Image size reduced to *99.7MB. * > > I've checked it with following command: > > > *touch /tmp/token; docker run --rm -it --env NAMESPACE=onap --env > KUBERNETES_SERVICE_HOST=localhost -v > /tmp:/var/run/secrets/kubernetes.io/serviceaccount/ > <http://kubernetes.io/serviceaccount/> zhabba/readiness-check -t 10 -c qwe* > > > Output is obvious as I don't have local k8s running, but script started > and tried to do what expected: > > > *2019-04-24 10:44:35,813 - INFO - Checking if qwe is ready* > *2019-04-24 10:44:35,814 WARNING Retrying (Retry(total=2, connect=None, > read=None, redirect=None, status=None)) after connection broken by > 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at > 0x7f3791e7f190>: Failed to establish a new connection: [Errno 111] > Connection refused',)': /api/v1/namespaces/onap/pods?watch=False* > *2019-04-24 10:44:35,814 WARNING Retrying (Retry(total=1, connect=None, > read=None, redirect=None, status=None)) after connection broken by > 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at > 0x7f3791e7f310>: Failed to establish a new connection: [Errno 111] > Connection refused',)': /api/v1/namespaces/onap/pods?watch=False* > *2019-04-24 10:44:35,815 WARNING Retrying (Retry(total=0, connect=None, > read=None, redirect=None, status=None)) after connection broken by > 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at > 0x7f3791e7f450>: Failed to establish a new connection: [Errno 111] > Connection refused',)': /api/v1/namespaces/onap/pods?watch=False* > *2019-04-24 10:44:35,815 - ERROR - Exception when calling > list_namespaced_pod: HTTPSConnectionPool(host='localhost', port=443): Max > retries exceeded with url: /api/v1/namespaces/onap/pods?watch=False (Caused > by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object > at 0x7f3791e7f550>: Failed to establish a new connection: [Errno 111] > Connection refused',))* > > > Regards, > > Dmitry > > > ------------------------------ > *From:* [email protected] <[email protected]> on > behalf of Klozik Martin <[email protected]> > *Sent:* Wednesday, April 24, 2019 11:16:19 AM > *To:* [email protected]; [email protected] > *Subject:* [onap-discuss] [cia] minimization candidate > OOMK8S/readiness-check > > Hi all, > > I'm not sure if readiness-check container minimization has been already > discussed. > > Anyhow, the container itself is part of every ONAP installation and even > with multiple versions. The container itself just runs a simple python > script, but it is based on Ubuntu and it installs also a lot of debugging > software. So it has about 600MB. By using python alpine image and by > removal of debugging packages, we can shrink it to few dozens of MBs. > > However it won't help if different ONAP helm charts will still point to > old Ubuntu based versions. *So part of the minimization process should be > a modification (and testing) of all helm charts to use the same small > readiness check container*. > > *Docker file:* > https://git.onap.org/oom/tree/kubernetes/readiness/docker/init/Dockerfile > > *Currently used image versions and their popularity:* > oom/kubernetes# grep -r "readiness-check:" | sed -e > "s/^.*readiness-check\:/readiness-check\:/" | sort | uniq -c > 4 readiness-check:1.1.0 > 125 readiness-check:2.0.0 > 1 readiness-check:2.0.1 > 15 readiness-check:2.0.2 > > *Sizes of readiness-images:* > # docker images | grep readiness > oomk8s/readiness-check 2.0.2 > cdfde4f65367 6 weeks ago 592MB > oomk8s/readiness-check 2.0.1 > a54f2020b856 8 months ago 632MB > oomk8s/readiness-check 2.0.0 > 867cb038e1d2 13 months ago 616MB > oomk8s/readiness-check 1.1.0 > c0cce3bbe795 14 months ago 585MB > > The number of image versions available at each k8s node is based on set of > ONAP components running there. In worst case all image versions are > available at all nodes. > > A quick look into docker inspect shows, that only 2.0.0 and 2.0.1 shares a > few layers. Thus I've tested it locally and all 4 images together *consume > over 2.3GB of disk space* (i.e. just 125MB is shared among them). > > *I would recommend readiness-check container image for minimization.* > > Best Regards, > Martin > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#16687): https://lists.onap.org/g/onap-discuss/message/16687 Mute This Topic: https://lists.onap.org/mt/31320038/21656 Group Owner: [email protected] Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
