Giter Site home page Giter Site logo

googlecontainertools / skaffold Goto Github PK

View Code? Open in Web Editor NEW
14.7K 185.0 1.6K 141.06 MB

Easy and Repeatable Kubernetes Development

Home Page: https://skaffold.dev/

License: Apache License 2.0

Makefile 0.19% Go 96.27% Python 0.06% Shell 0.71% Ruby 0.01% Dockerfile 0.33% JavaScript 1.50% Java 0.04% HTML 0.52% CSS 0.16% Groovy 0.01% Batchfile 0.02% Starlark 0.02% PHP 0.02% NSIS 0.05% TypeScript 0.01% Mustache 0.01% Procfile 0.01% Smarty 0.03% Slim 0.05%
kubernetes developer-tools docker containers

skaffold's Introduction


Code Coverage LICENSE Releases

Skaffold is a command line tool that facilitates continuous development for Kubernetes applications. You can iterate on your application source code locally then deploy to local or remote Kubernetes clusters. Skaffold handles the workflow for building, pushing and deploying your application. It also provides building blocks and describe customizations for a CI/CD pipeline.


Or, check out our Github Releases page for release info or to install a specific version.

Demo

Features

  • Blazing fast local development
    • optimized source-to-deploy - Skaffold detects changes in your source code and handles the pipeline to build, push, and deploy your application automatically with policy based image tagging
    • continuous feedback - Skaffold automatically aggregates logs from deployed resources and forwards container ports to your local machine
  • Project portability
    • share with other developers - Skaffold is the easiest way to share your project with the world: git clone and skaffold run
    • context aware - use Skaffold profiles, user level config, environment variables and flags to describe differences in environments
    • CI/CD building blocks - use skaffold run end-to-end, or use individual Skaffold phases to build up your CI/CD pipeline. skaffold render outputs hydrated Kubernetes manifests that can be used in GitOps workflows.
  • Pluggable, declarative configuration for your project
    • skaffold init - Skaffold discovers your files and generates its own config file
    • multi-component apps - Skaffold supports applications consisting of multiple components
    • bring your own tools - Skaffold has a pluggable architecture to integrate with any build or deploy tool
  • Lightweight
    • client-side only - Skaffold has no cluster-side component, so there is no overhead or maintenance burden
    • minimal pipeline - Skaffold provides an opinionated, minimal pipeline to keep things simple

Check out our examples page for more complex workflows!

IDE integrations

For a managed experience of Skaffold you can install the Google Cloud Code extensions:

It can manage and keep Skaffold up-to-date while providing a more guided startup experience, along with providing and managing other common dependencies, and works with any kubernetes cluster.

Contributing to Skaffold

We welcome any contributions from the community with open arms - Skaffold wouldn't be where it is today without contributions from the community! Have a look at our contribution guide for more information on how to get started on sending your first PR.

Community

Come hang out with us!

Office Hours

We hold open office hours on the last Wednesday of the month at 9:30 AM Pacific Time. This is an open forum for anyone to show up and bring ideas, concerns, or just in general come hang out with the team! This is also a great time to get direct feedback on contributions, or give us feedback on ways you think we can improve the project. Come show us how you're using Skaffold!

Join the skaffold-users mailing list to get the calendar invite directly on your calendar. You can access the hangouts invite directly from this calendar invite.

Survey

Your feedback is very valuable to us! We have an anonymous user feedback survey - please help us by spending a quick 5 minutes to tell us how satisfied you are with Skaffold, and what improvements we should make! You can also run skaffold survey from your terminal to open the survey directly in your default browser.

Survey Link - https://forms.gle/BMTbGQXLWSdn7vEs6

Support

Skaffold is generally available and considered production ready. Detailed feature maturity information and how we deprecate features are described in our Deprecation Policy.

Security Disclosures

Please see our security disclosure process. All security advisories are managed on Github.

skaffold's People

Contributors

aaron-prindle avatar ahmetb avatar balopat avatar briandealwis avatar cedrickring avatar chrisge4 avatar coollog avatar corneliusweig avatar dependabot[bot] avatar dgageot avatar dlorenc avatar ericzzzzzzz avatar felixtran39 avatar garethjevans avatar gsquared94 avatar halvards avatar isaacpd avatar loosebazooka avatar marlongamez avatar michaelfig avatar nkubala avatar prary avatar priyamodali avatar pscarey avatar r2d4 avatar renzodavid9 avatar tadcordle avatar tejal29 avatar tstromberg avatar yuwenma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

skaffold's Issues

Tag Spec Validation

We need to make sure that some parameters are valid docker tags before it gets to the downstream tools and fails. We should vendor in the validation from docker/moby

Improve build and deploy output from docker daemon/registry

We are not processing the messages from the docker daemon or registry properly, so output isn't as pretty as it should be. We should compress status updates for the same layers, add progress bars, etc.

Example:

abe52c89597f: Verifying Checksum
abe52c89597f: Download complete
96e333289084: Verifying Checksum
96e333289084: Download complete
39cd5f38ffb8: Verifying Checksum
39cd5f38ffb8: Download complete
503166935590: Verifying Checksum
503166935590: Download complete
ce145c5cf4da: Verifying Checksum
ce145c5cf4da: Download complete
503166935590: Pull complete
abe52c89597f: Pull complete
ce145c5cf4da: Pull complete
96e333289084: Pull complete
39cd5f38ffb8: Pull complete

Command that helps maintainers debug user issues

In other projects I've worked on, there has been a command (something like skaffold debug) that puts together either a bundle of artifacts or prints out information that can be useful for maintainers to either reproduce or further debug issues that are reported. We could add a note to the issue template that asks users to run this command and add the info to their report.

Handle optional port-forwarding

I started to go down the route of figuring out how to work with Skaffold and use a remote debugger (delve in my case).

The only thing I really needed from Skaffold was for it to be able to reconfigure a port-forwarding setup to one of the new pods that was created.

I think it could look something like:

portForwarding:
  - labelSelector:
      app: my-app
      component: backend
    port: 2345
  - labelSelector:
      app: my-app
      component: frontend
    port: 8080:80

Skaffold could pick the most recently deployed pod that matches the selectors, although some more precise detection of the "right pod" may be necessary.

Integration tests for all examples

All examples should be covered by integration tests. We should always keep examples up to date with new changes, and convey to the users clearly when there are breaking change. We can do this with release notes or config comments.

Updates of workloads due to ConfigMap changes

When a ConfigMap manifest is updated, users may want that to automatically update the workload that it references. Unfortunately the deployment will only update if the configmap name or any other field changes in the spec.

[Dockerfile] Resolve envvar when ENV inherited from parent image

We don't currently support the scenario when an ENV is inherited from the parent image and then used in the source of a COPY or ADD. As a short term solution, we can add the entire context, but we might want to figure out a way to resolve those ENVs without adding everything.

Build and deploy prechecks

Add prechecks to both builders and deployers to ensure basic conditions before the pipeline is ran. This could be implemented as an interface that both Builder and Deployer embed.

Some ideas for prechecks:

  • LocalBuilder: Ensure connection to docker daemon
  • KubectlDeploy: Ensure connection to cluster, kubectl installed
  • HelmDeploy: Ensure connection to cluster, helm installed, (tiller installed?)

Should these prechecks also verify manifest conditions? I think eventually we might want to add some sort of linting of kubernetes resources, and possibly extend that to skaffold resources.

Subcommands for build and deploy implementations

Exposing the build and deploy steps as single runnable commands

$ skaffold build local
$ skaffold deploy helm --chart-path

We could autogenerate most, if not all, of the command by iterating over BuildType and DeployType and then generating flags based on the parameters on the subtypes like LocalBuild. Each command would output a go-template BuildResult or DeployResult.

Dockerfile, Context resolution should have its own function

https://github.com/GoogleCloudPlatform/skaffold/blob/910aa891c5f2dc28cdc95602067f0a1ca45f5806/pkg/skaffold/build/local.go#L60-L62

https://github.com/GoogleCloudPlatform/skaffold/blob/87beed031679b0e350ef6e3c07c3fa57001f43cb/pkg/skaffold/watch/watch.go#L107-L109

We should mimic the resolution that the docker cli does here. We support a very basic version here, but it should be its own function to infer workspace and dockerfile paths.

Dockerfile="" ====> Dockerfile="Dockerfile"
Workspace="" ====> Workspace="."

Dockerfile="" ====> Dockerfile="Dockerfile"
Workspace="dir/Dockerfile" ====> Workspace="dir"

[Meta] How do we want to use GitHub Projects?

A few possible ideas:

  1. Have a new "project" for every release
  • Might make more sense once we've gotten some users
  1. Have a new "project" for alpha, beta, GA
  • At the early stages (pre-release), tracking alpha and beta features might be more valuable than releases
  1. Don't use it at all
  • GitHub projects just recently added support for automatically moving "cards" from different stages based on status. In short, there are a lot of features missing and its historically been hard to use.
  1. One large meta project that has subtabs broken down by releases or milestones

I've started a basic version of 2. I don't have strong opinions here and would love to hear your thoughts or what you've seen work well @viglesiasce @dlorenc

envsubst on certain skaffold fields

Do we want to expand bash substitutions in some skaffold fields? It is a bit of feature creep, but might be useful for complete portability of skaffold.yaml

We could ship examples for other repos by including a workspace: $GOPATH/src/path/to/project, so that we don't need to keep all of the example code here, only the example configuration.

It also makes paths less fragile, since its not so dependent on where the user actually runs skaffold run.

Here's a library we could use (note: haven't used it before, this is just the result of a quick google search)
https://github.com/drone/envsubst

Track Deployed Artifacts

Opening an issue to get some discussion started on how skaffold can keep track of what it's deploying through the various deployers we support (helm, kubectl apply, ksonnet, etc.).

Tracking these artifacts can help with things like #94 and deletion cases.

For kubectl, we know the manifest paths so we could parse those YAMLs and apply labels, or build a label selector?

For helm, we know the release names so we can query them with helm list or something similar.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.