Declarative Continuous Deployment for Kubernetes
Find a file
Andrew Merenbach ab00aef75e
Generate swagger files (#278)
* Generate swagger files

* Add basic Swagger definitions

* Add reposerver swagger file

* Consolidate swagger files

* Move swagger files to swagger-ui directory instead

* Put swagger files in swagger-ui

* Fix order of operations

* Move back to swagger directory

* Serve API server swagger files raw for now

* Serve reposerver swagger files from API server

* Move back to subdirectories, thanks @alexmt

* Fix comment on application Rollback

* Update two more comments

* Fix comment in session.proto

* Update generated code

* Update generated swagger docs

* Fix comment for delete actions in cluster and repository swagger

* Set expected collisions and invoke mixins

* Update generated code

* Create swagger mixins from codegen

* Move swagger.json location, thanks @jazminGonzalez-Rivero

* Add ref cleanup for swagger combined

* Make fewer temp files when generating swagger

* Delete intermediate swagger files

* Serve new file at /swagger.json

* Set up UI server

* Update package lock

* Commit generated swagger.json files

* Add install commands for swagger

* Use ReDoc server instead of Swagger UI server

* Update lockfile

* Make URL paths more consistent

* Update package lock

* Separate out handlers for Swagger UI, JSON

* Rm unnecessary CORS headers

...since we're serving from the app server

* Simplify serving

* Further simplify serving code

* Update package lock

* Factor out swagger serving into util

* Add test for Swagger server

* Use ServeSwaggerUI method to run tests

* Update package lock

* Don't generate swagger for reposerver

* Reset to master Gopkg.lock and server/server.go

* Merge in prev change to server/server.go

* Redo changes to Gopkg.lock

* Fix number of conflicts

* Update generated swagger.json for server

* Fix issue with project feature error
2018-06-25 13:49:38 -07:00
.argo-ci Make sure api server started during fixture setup (#209) 2018-05-15 22:49:55 -07:00
cmd Remove local git credential test to prevent clobbering of OSX keychain credentials (resolves #315) 2018-06-24 03:39:05 -07:00
common Issue #295 - implement app destination permissions validation (#310) 2018-06-22 10:05:57 -07:00
controller Issue #275 - Application controller fails to get app state if app has resource without name (#285) 2018-06-14 09:08:22 -07:00
docs Update webhook.md to remove unnecessary step to restart server 2018-06-22 13:52:50 -07:00
errors Support persistence of repos as secrets 2018-02-21 03:01:43 -08:00
examples/guestbook Add progressing deadline to test app to fix e2e tets slowness 2018-06-12 08:54:47 -07:00
hack Generate swagger files (#278) 2018-06-25 13:49:38 -07:00
install Issue #295 - add project CRD, basic API and CLI implementation (#299) 2018-06-20 14:48:31 -07:00
pkg Projects bug fixes: GET /api/v1/projects should return default project, (#313) 2018-06-23 11:38:35 -07:00
reposerver Generate swagger files (#278) 2018-06-25 13:49:38 -07:00
server Generate swagger files (#278) 2018-06-25 13:49:38 -07:00
test Issue #295 - add project CRD, basic API and CLI implementation (#299) 2018-06-20 14:48:31 -07:00
util Generate swagger files (#278) 2018-06-25 13:49:38 -07:00
workflows Add workflow for blue-green deployments (#148) 2018-05-03 09:52:46 -07:00
.dockerignore Bump version file to 0.3.0. Add release target and cli-linux/darwin targets 2018-04-23 00:34:08 -07:00
.gitignore Initial project structure 2018-02-14 16:56:17 -08:00
CHANGELOG.md Add v0.4.0 changelog 2018-05-17 03:10:41 -07:00
CONTRIBUTING.md Generate swagger files (#278) 2018-06-25 13:49:38 -07:00
Dockerfile-argocd Update dependencies: ksonnet v0.11, golang v1.10, debian v9.4 (#296) 2018-06-18 14:34:10 -07:00
Dockerfile-ci-builder Update dependencies: ksonnet v0.11, golang v1.10, debian v9.4 (#296) 2018-06-18 14:34:10 -07:00
gometalinter.json Improve CI build stability 2018-05-07 12:44:14 -07:00
Gopkg.lock Generate swagger files (#278) 2018-06-25 13:49:38 -07:00
Gopkg.toml Generate swagger files (#278) 2018-06-25 13:49:38 -07:00
LICENSE Fix LICENSE copyright text 2018-06-21 01:03:50 -07:00
Makefile Add clean-debug make target to prevent packr from boxing debug artifacts into binaries 2018-06-15 14:31:26 -07:00
OWNERS Added OWNERS file 2018-05-02 18:24:50 -07:00
Procfile Update dependencies: ksonnet v0.11, golang v1.10, debian v9.4 (#296) 2018-06-18 14:34:10 -07:00
README.md Update feature list with SSO and Webhook integration 2018-05-10 17:51:51 -07:00
VERSION Automatically restart API server upon certificate changes (#292) 2018-06-15 14:16:50 -07:00
version.go Initial project structure 2018-02-14 16:56:17 -08:00

Argo CD - GitOps Continuous Delivery for Kubernetes

What is Argo CD?

Argo CD is a declarative, continuous delivery service based on ksonnet for Kubernetes.

Why Argo CD?

Application definitions, configurations, and environments should be declarative and version controlled. Application deployment and lifecycle management should be automated, auditable, and easy to understand.

Getting Started

Follow our getting started guide.

How it works

Argo CD uses git repositories as the source of truth for defining the desired application state as well as the target deployment environments. Kubernetes manifests are specified as ksonnet applications. Argo CD automates the deployment of the desired application states in the specified target environments.

Argo CD Architecture

Application deployments can track updates to branches, tags, or pinned to a specific version of manifests at a git commit. See tracking strategies for additional details about the different tracking strategies available.

Argo CD is implemented as a kubernetes controller which continuously monitors running applications and compares the current, live state against the desired target state (as specified in the git repo). A deployed application whose live state deviates from the target state is considered out-of-sync. Argo CD reports & visualizes the differences as well as providing facilities to automatically or manually sync the live state back to the desired target state. Any modifications made to the desired target state in the git repo can be automatically applied and reflected in the specified target environments.

For additional details, see architecture overview.

Features

  • Automated deployment of applications to specified target environments
  • Continuous monitoring of deployed applications
  • Automated or manual syncing of applications to its target state
  • Web and CLI based visualization of applications and differences between live vs. target state
  • Rollback/Roll-anywhere to any application state committed in the git repository
  • SSO Integration (OIDC, LDAP, SAML 2.0, GitLab, Microsoft, LinkedIn)
  • Webhook Integration (GitHub, BitBucket, GitLab)

What is ksonnet?

  • Jsonnet, the basis for ksonnet, is a domain specific configuration language, which provides extreme flexibility for composing and manipulating JSON/YAML specifications.
  • Ksonnet goes one step further by applying Jsonnet principles to Kubernetes manifests. It provides an opinionated file & directory structure to organize applications into reusable components, parameters, and environments. Environments can be hierarchical, which promotes both re-use and granular customization of application and environment specifications.

Why ksonnet?

Application configuration management is a hard problem and grows rapidly in complexity as you deploy more applications, against more and more environments. Current templating systems, such as Jinja, and Golang templating, are unnatural ways to maintain kubernetes manifests, and are not well suited to capture subtle configuration differences between environments. Its ability to compose and re-use application and environment configurations is also very limited.

Imagine we have a single guestbook application deployed in following environments:

Environment K8s Version Application Image DB Connection String Environment Vars Sidecars
minikube 1.10.0 jesse/guestbook:latest sql://locahost/db DEBUG=true
dev 1.9.0 app/guestbook:latest sql://dev-test/db DEBUG=true
staging 1.8.0 app/guestbook:e3c0263 sql://staging/db istio,dnsmasq
us-west-1 1.8.0 app/guestbook:abc1234 sql://prod/db FOO_FEATURE=true istio,dnsmasq
us-west-2 1.8.0 app/guestbook:abc1234 sql://prod/db istio,dnsmasq
us-east-1 1.9.0 app/guestbook:abc1234 sql://prod/db BAR_FEATURE=true istio,dnsmasq

Ksonnet:

  • Enables composition and re-use of common YAML specifications
  • Allows overrides, additions, and subtractions of YAML sub-components specific to each environment
  • Guarantees proper generation of K8s manifests suitable for the corresponding Kubernetes API version
  • Provides kubernetes-specific jsonnet libraries to enable concise definition of kubernetes manifests

Development Status

  • Argo CD is in early development

Roadmap

  • PreSync, PostSync, OutOfSync hooks
  • Customized application actions as Argo workflows
  • Blue/Green & canary upgrades