shipyard-controller

command module
v0.0.0-...-318a3d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 33 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Shipyard Controller

Installation

The shipyard-controller is installed as a part of keptn

Deploy in your Kubernetes cluster

This service should be automatically deployed when executing keptn install or installing Keptn from a Helm chart. If you still want to deploy it manually in your Keptn Kubernetes, you can either

  • use the manifest deploy/service.yaml from this repository and apply it
    kubectl apply -f deploy/service.yaml
    
  • build locally (from source) and deploy it using
    export SKAFFOLD_DEFAULT_REPO=containerregistry # e.g., docker.io/username
    skaffold run --tail  
    
    Note: When stopping skaffold (e.g., using CTRL-C) the deployment will automatically be cleaned up

Delete in your Kubernetes cluster

To delete a deployed shipyard-controller, use the manifest deploy/service.yaml from this repository and delete the Kubernetes resources:

kubectl delete -f deploy/service.yaml

Generate Swagger doc from source

  1. Download and install Swag for Go by calling go install github.com/swaggo/swag/cmd/swag in fresh terminal.
  2. cd to the Shipyard Controller's root folder and run swag init --parseDependency

Technical Details

Sequence handling

The shipyard controller orchestrates sequences by listening for certain events, such as .triggered events that should trigger a sequence, or events that indicate the start/completion of a task execution by one of Keptns execution plane services. Further, it is responsible for the following tasks:

  • Dispatching sequences while ensuring that there are no multiple sequences running in the same stage for the same service at any given point in time
  • Sending out .triggered events that indicate that a task within a sequence should be executed
  • Cancelling sequences when a timeout for a task has been detected

The following flow charts illustrate the workflow of how these responsibilities are handled by the shipyard controller:

Reception of a .triggered event:

handleTriggeredEvent

Dispatching Sequences:

sequenceDispatcher

Watching for timed out tasks:

sequenceWatcher

Keep track of .started events:

handleStartedEvent

Keep track of .finished events:

handleFinishedEvent

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
internal
db
api

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL