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.1.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.1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kaniko_deploy-1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 092ca9db002d0c24f71dcc607221a8ae69949eb94d6e46923d134bff8c2934c4
MD5 5b4265c99764bc22199f006c5757e206
BLAKE2b-256 61c3c2b12b7b1867b09a63a8f747875bb89d2000ab692fa702e45f42f795a02a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kaniko_deploy-1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.8 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1070fb4c0efbec5bfaac497c64649ac5a9c1d05ff8554f4c6ee846cbc252608d
MD5 45b841f027741ecf5a3bf4146ea64c20
BLAKE2b-256 339dedea6f288da6a5e3d4f339fa486a028b0d0ec94cb455fe1c57ea9811e475

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