Coder Social home page Coder Social logo

weaveworks / progressive-delivery Goto Github PK

View Code? Open in Web Editor NEW
1.0 7.0 2.0 1.9 MB

This repository contains the progressive delivery API handlers that Weave GitOps Enterprise serves.

Makefile 0.96% Go 76.49% Shell 10.15% Starlark 0.41% Dockerfile 0.36% TypeScript 11.63%
flagger weave-gitops-enterprise

progressive-delivery's Introduction

progressive-delivery

This repository contains the progressive delivery API handlers that Weave GitOps Enterprise serves.

Local development environment

To install all dependencies use make dependencies.

Publish new version

Update package.json with the new version and run make publish-js-lib

Start dev server

Use Tilt to deploy the dev-server on the cluster:

make dev-cluster

To install extra resources, use the ./tools/install-resources.sh script:

❯ ./tools/install-resources.sh -h
usage: ./tools/install-resources.sh [-i] [-f] [-c]

Install extra resources.

OPTIONS:
   -c|--canaries     Install Canary objects
   -f|--flagger      Install Flagger
   -i|--istio        Install Istio
   -h|--help         Show this message

Use ea gRPC client to interact with the API, for example:

Example queries

❯ grpcurl -plaintext localhost:9002 ProgressiveDeliveryService.ListCanaries
{
  "canaries": [
    {
      "name": "hello-world",
      "clusterName": "Default",
      "provider": "traefik",
      "targetReference": {
        "kind": "Deployment",
        "name": "hello-world"
      },
      "targetDeployment": {
        "uid": "4b871207-63e7-4981-b067-395c59b3676b",
        "resourceVersion": "1997",
        "fluxLabels": {
          "kustomizeNamespace": "hello-world",
          "kustomizeName": "hello-world"
        }
      },
      "status": {
        "phase": "Initialized",
        "lastTransitionTime": "2022-06-03T12:36:23Z",
        "conditions": [
          {
            "type": "Promoted",
            "status": "True",
            "lastUpdateTime": "2022-06-03T12:36:23Z",
            "lastTransitionTime": "2022-06-03T12:36:23Z",
            "reason": "Initialized",
            "message": "Deployment initialization completed."
          }
        ]
      }
    }
  ],
  "nextPageToken": "eyJDb250aW51ZVRva2VucyI6eyJEZWZhdWx0Ijp7ImNhcGQtc3lzdGVtIjoiIiwiY2FwaS1rdWJlYWRtLWJvb3RzdHJhcC1zeXN0ZW0iOiIiLCJjYXBpLWt1YmVhZG0tY29udHJvbC1wbGFuZS1zeXN0ZW0iOiIiLCJjYXBpLXN5c3RlbSI6IiIsImNlcnQtbWFuYWdlciI6IiIsImRlZmF1bHQiOiIiLCJkZXgiOiIiLCJmbGFnZ2VyIjoiIiwiZmx1eC1zeXN0ZW0iOiIiLCJoZWxsby13b3JsZCI6IiIsImt1YmUtbm9kZS1sZWFzZSI6IiIsImt1YmUtcHVibGljIjoiIiwia3ViZS1zeXN0ZW0iOiIiLCJsb2NhbC1wYXRoLXN0b3JhZ2UiOiIiLCJ0cmFlZmlrIjoiIn19fQo="
}
❯ grpcurl \
    -d '{"clusterName": "Default", "name": "hello-world", "namespace": "hello-world"}' \
    -plaintext localhost:9002 ProgressiveDeliveryService.GetCanary
{
  "canary": {
    "namespace": "hello-world",
    "name": "hello-world",
    "clusterName": "Default",
    "provider": "traefik",
    "targetReference": {
      "kind": "Deployment",
      "name": "hello-world"
    },
    "targetDeployment": {
      "uid": "4b871207-63e7-4981-b067-395c59b3676b",
      "resourceVersion": "3394152",
      "fluxLabels": {
        "kustomizeNamespace": "hello-world",
        "kustomizeName": "hello-world"
      }
    },
    "status": {
      "phase": "Succeeded",
      "failedChecks": 1,
      "lastTransitionTime": "2022-06-10T10:29:03Z",
      "conditions": [
        {
          "type": "Promoted",
          "status": "True",
          "lastUpdateTime": "2022-06-10T10:29:03Z",
          "lastTransitionTime": "2022-06-10T10:29:03Z",
          "reason": "Succeeded",
          "message": "Canary analysis completed successfully, promotion finished."
        }
      ]
    },
    "deploymentStrategy": "canary"
  },
  "automation": {
    "kind": "Kustomization",
    "name": "hello-world",
    "namespace": "hello-world"
  }
}

progressive-delivery's People

Contributors

enekofb avatar foot avatar jpellizzari avatar luizbafilho avatar rparmer avatar weaveworks-admin-bot avatar yiannistri avatar yitsushi avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.