Skip to main content

No project description provided

Project description

README.md

About tool

This tool can be used to create and push a docker image from local or open remote directory to docker hub(can be private). For local directories, tool will create a persistent-volume, persitent-volume-claim, and kaniko-pod temporary and all will be deleted once the image has been pushed to the docker hub.

Installation

pip install kaniko_deploy

pre-requisites

Make sure you have connection with kubernetes : *for remote kubenetes obtain kubernetes config file and set it's path to env var KUBECONFIG ,(else keep it at respective OS ~/.kube/config path)

For local dirs, the directories should be mounted if using minikube, then mount using minikube mount $WORKDIR:/<your-kube-work-dir>

steps

1. For local directories open the terminal wherever your project is (anywhere for remote directories)
2. either create python3.12 virtual env and then install the kaniko_build(recommended) or can be installed globally also 
3. you can opt to create volume.yaml, volume-claim.yaml (once for each project) so to provide configs as user's requirements or wish else you by default some values will be taken if not provided by optional flags (like pvc storage, pod name, ..etc)
4. refer the below mentioned few example commands as per your requirements or you can use --help flag

replace the username, email and docker repo with yours (if docker secrets are not present then password will be asked for first time)

Exmaple command

  1. for remote directories python -m kaniko_deploy deploy --context_dir=git://github.com//Imoustak/kaniko-build-demo.git --docker_filepath=dockerfile --docker_username=<your-docker-username> --docker_email=<your-docker-email> --docker_repo=<your-repo>

  2. Running in you current dir WITH volume.yaml & volume-claim.yaml files python -m kaniko_deploy deploy --context_dir=. --docker_filepath=Dockerfile --docker_username=<your-docker-username> --docker_email=<your-docker-email> --docker_repo=<your-repo> --read_manifest

Running in you current dir WITHOUT volume.yaml & volume-claim.yaml files python -m kaniko_deploy deploy --context_dir=. --docker_filepath=Dockerfile --docker_username=<your-docker-username> --docker_email=<your-docker-email> --docker_repo=<your-repo>

Note: Currently this is desgined for namespace default only, can be further editted to handle dynamic namespaces Secret name for docker-registry is considered as "docker-registry-secret" ans it is not deleted after process

to do

  • add function to get logs if got any errors from k8 while in process
  • add caching for kaniko
  • add custom exceptions and terminate gracefully
  • add functionality for aws or any other cloud volume mount
  • check other kaniko flags(or features) to imporve this tool
  • write test cases
  • logs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kaniko_deploy-1.0.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kaniko_deploy-1.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file kaniko_deploy-1.0.tar.gz.

File metadata

  • Download URL: kaniko_deploy-1.0.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for kaniko_deploy-1.0.tar.gz
Algorithm Hash digest
SHA256 79a6a9224ed1aeb7697d7a8828c77ab7e076bbf83ec7223a5f54f5804a1973a0
MD5 76bd6883b12b457c9a5780276928506b
BLAKE2b-256 62d32aeffa7f1eba37754befbaaf0098407285ebc6686abb3626c0d7065a9d2e

See more details on using hashes here.

File details

Details for the file kaniko_deploy-1.0-py3-none-any.whl.

File metadata

  • Download URL: kaniko_deploy-1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for kaniko_deploy-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a5503177948eb20842789cda3697b8691ef6a916039563968178d839ecf8906
MD5 4ebfbfc168a2493d29382261d67285fe
BLAKE2b-256 e3a44d0e159800881bc788aa20c2ccf1b825468463228cff6955d47216ed2b75

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page