flux

package module
v0.0.0-...-d1b097e Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

README

Flux

We believe in GitOps:

  • You declaratively describe the entire desired state of your system in git. This includes the apps, config, dashboards, monitoring and everything else.
  • What can be described can be automated. Use YAMLs to enforce conformance of the system. You don't need to run kubectl, all changes go through git. Use diff tools to detect divergence between observed and desired state and get notifications.
  • You push code not containers. Everything is controlled through pull requests. There is no learning curve for new devs, they just use your standard git PR process. The history in git allows you to recover from any snapshot as you have a sequence of transactions. It is much more transparent to make operational changes by pull request, e.g. fix a production issue via a pull request instead of making changes to the running system.

Flux is a tool that automatically ensures that the state of a cluster matches the config in git. It uses an operator in the cluster to trigger deployments inside Kubernetes, which means you don't need a separate CD tool. It monitors all relevant image repositories, detects new images, triggers deployments and updates the desired running configuration based on that (and a configurable policy).

The benefits are: you don't need to grant your CI access to the cluster, every change is atomic and transactional, git has your audit log. Each transaction either fails or succeeds cleanly. You're entirely code centric and don't need new infrastructure.

Deployment Pipeline

CircleCI GoDoc

What Flux does

Flux is most useful when used as a deployment tool at the end of a Continuous Delivery pipeline. Flux will make sure that your new container images and config changes are propagated to the cluster.

Features

Its major features are:

Relation to Weave Cloud

Weave Cloud is a SaaS product by Weaveworks that includes Flux, as well as:

  • a UI and alerts for deployments: nicely integrated overview, all Flux operations just a click away.
  • full observability and insights into your cluster: Instantly start using monitoring dashboards for your cluster, hosted 13 months of history, use a realtime map of your cluster to debug and analyse its state.

If you want to learn more about Weave Cloud, you can see it in action on its homepage.

Get started with Flux

Get started by browsing through the documentation below:

Integrations

As Flux is Open Source, integrations are very straight-forward. Here are a few popular ones you might want to check out:

Community & Developer information

We welcome all kinds of contributions to Flux, be it code, issues you found, documentation, external tools, help and support or anything else really.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting a Flux project maintainer, or Alexis Richardson <alexis@weave.works>. Please refer to our code of conduct as well.

To familiarise yourself with the project and how things work, you might be interested in the following:

Getting Help

If you have any questions about Flux and continuous delivery:

Your feedback is always welcome!

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidServiceID = errors.New("invalid service ID")

	LegacyServiceIDRegexp = regexp.MustCompile("^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$")
	// The namespace and name commponents are (apparently
	// non-normatively) defined in
	// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/architecture/identifiers.md
	// In practice, more punctuation is used than allowed there;
	// specifically, people use underscores as well as dashes and dots, and in names, colons.
	ResourceIDRegexp            = regexp.MustCompile("^([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)/([a-zA-Z0-9_.:-]+)$")
	UnqualifiedResourceIDRegexp = regexp.MustCompile("^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_.:-]+)$")
)

Functions

This section is empty.

Types

type ResourceID

type ResourceID struct {
	// contains filtered or unexported fields
}

ResourceID is an opaque type which uniquely identifies a resource in an orchestrator.

func MakeResourceID

func MakeResourceID(namespace, kind, name string) ResourceID

MakeResourceID constructs a ResourceID from constituent components.

func MustParseResourceID

func MustParseResourceID(s string) ResourceID

MustParseResourceID constructs a ResourceID from a string representation, panicing if the format is invalid.

func ParseResourceID

func ParseResourceID(s string) (ResourceID, error)

ParseResourceID constructs a ResourceID from a string representation if possible, returning an error value otherwise.

func ParseResourceIDOptionalNamespace

func ParseResourceIDOptionalNamespace(namespace, s string) (ResourceID, error)

ParseResourceIDOptionalNamespace constructs a ResourceID from either a fully qualified string representation, or an unqualified kind/name representation and the supplied namespace.

func (ResourceID) Components

func (id ResourceID) Components() (namespace, kind, name string)

Components returns the constituent components of a ResourceID

func (ResourceID) MarshalJSON

func (id ResourceID) MarshalJSON() ([]byte, error)

MarshalJSON encodes a ResourceID as a JSON string. This is done to maintain backwards compatibility with previous flux versions where the ResourceID is a plain string.

func (ResourceID) MarshalText

func (id ResourceID) MarshalText() (text []byte, err error)

MarshalText encodes a ResourceID as a flat string; this is required because ResourceIDs are sometimes used as map keys.

func (*ResourceID) UnmarshalJSON

func (id *ResourceID) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON decodes a ResourceID from a JSON string. This is done to maintain backwards compatibility with previous flux versions where the ResourceID is a plain string.

func (*ResourceID) UnmarshalText

func (id *ResourceID) UnmarshalText(text []byte) error

MarshalText decodes a ResourceID from a flat string; this is required because ResourceIDs are sometimes used as map keys.

type ResourceIDSet

type ResourceIDSet map[ResourceID]struct{}

func (ResourceIDSet) Add

func (s ResourceIDSet) Add(ids []ResourceID)

func (ResourceIDSet) Contains

func (s ResourceIDSet) Contains(id ResourceID) bool

func (ResourceIDSet) Intersection

func (s ResourceIDSet) Intersection(others ResourceIDSet) ResourceIDSet

func (ResourceIDSet) String

func (s ResourceIDSet) String() string

func (ResourceIDSet) ToSlice

func (s ResourceIDSet) ToSlice() ResourceIDs

func (ResourceIDSet) Without

func (s ResourceIDSet) Without(others ResourceIDSet) ResourceIDSet

type ResourceIDs

type ResourceIDs []ResourceID

func (ResourceIDs) Contains

func (ids ResourceIDs) Contains(id ResourceID) bool

func (ResourceIDs) Intersection

func (ids ResourceIDs) Intersection(others ResourceIDSet) ResourceIDSet

func (ResourceIDs) Len

func (p ResourceIDs) Len() int

func (ResourceIDs) Less

func (p ResourceIDs) Less(i, j int) bool

func (ResourceIDs) Sort

func (p ResourceIDs) Sort()

func (ResourceIDs) Swap

func (p ResourceIDs) Swap(i, j int)

func (ResourceIDs) Without

func (ids ResourceIDs) Without(others ResourceIDSet) (res ResourceIDs)

Directories

Path Synopsis
api
v10
This package defines the types for Flux API version 10.
This package defines the types for Flux API version 10.
v11
This package defines the types for Flux API version 11.
This package defines the types for Flux API version 11.
v6
v9
This package defines the types for Flux API version 9.
This package defines the types for Flux API version 9.
cmd
git
integrations
apis/flux.weave.works/v1beta1
+k8s:deepcopy-gen=package,register +groupName=flux.weave.works Package v1beta1 is the v1beta1 version of the API.
+k8s:deepcopy-gen=package,register +groupName=flux.weave.works Package v1beta1 is the v1beta1 version of the API.
apis/helm.integrations.flux.weave.works/v1alpha2
Package v1 is the v1 version of the API.
Package v1 is the v1 version of the API.
helm/chartsync
This package has the algorithm for making sure the Helm releases in the cluster match what are defined in the HelmRelease resources.
This package has the algorithm for making sure the Helm releases in the cluster match what are defined in the HelmRelease resources.
helm/status
This package is for maintaining the link between `HelmRelease` resources and the Helm releases to which they correspond.
This package is for maintaining the link between `HelmRelease` resources and the Helm releases to which they correspond.
This package has types for dealing with image registries (e.g., quay.io, DockerHub, Google Container Registry, ..).
This package has types for dealing with image registries (e.g., quay.io, DockerHub, Google Container Registry, ..).
cache
This package implements an image metadata cache given a backing k-v store.
This package implements an image metadata cache given a backing k-v store.
cache/memcached
This package implements an image DB cache using memcached.
This package implements an image DB cache using memcached.
rpc
This is a `net/rpc`-compatible implementation of a client and server for `flux/api.Server`.
This is a `net/rpc`-compatible implementation of a client and server for `flux/api.Server`.

Jump to

Keyboard shortcuts

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