• Stars
    star
    1,710
  • Rank 27,288 (Top 0.6 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated 22 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A management framework for extending Kubernetes with Operators

Operator Lifecycle Manager Operator Lifecycle Manager

Container Repository on Quay.io License Go Report Card Slack Channel

Documentation

User documentation can be found on the OLM website.

Overview

This project is a component of the Operator Framework, an open source toolkit to manage Kubernetes native applications, called Operators, in an effective, automated, and scalable way. Read more in the introduction blog post and learn about practical use cases at the OLM website.

OLM extends Kubernetes to provide a declarative way to install, manage, and upgrade Operators and their dependencies in a cluster. It provides the following features:

Over-the-Air Updates and Catalogs

Kubernetes clusters are being kept up to date using elaborate update mechanisms today, more often automatically and in the background. Operators, being cluster extensions, should follow that. OLM has a concept of catalogs from which Operators are available to install and being kept up to date. In this model OLM allows maintainers granular authoring of the update path and gives commercial vendors a flexible publishing mechanism using channels.

Dependency Model

With OLMs packaging format Operators can express dependencies on the platform and on other Operators. They can rely on OLM to respect these requirements as long as the cluster is up. In this way, OLMs dependency model ensures Operators stay working during their long lifecycle across multiple updates of the platform or other Operators.

Discoverability

OLM advertises installed Operators and their services into the namespaces of tenants. They can discover which managed services are available and which Operator provides them. Administrators can rely on catalog content projected into a cluster, enabling discovery of Operators available to install.

Cluster Stability

Operators must claim ownership of their APIs. OLM will prevent conflicting Operators owning the same APIs being installed, ensuring cluster stability.

Declarative UI controls

Operators can behave like managed service providers. Their user interface on the command line are APIs. For graphical consoles OLM annotates those APIs with descriptors that drive the creation of rich interfaces and forms for users to interact with the Operator in a natural, cloud-like way.

Prerequisites

  • git
  • go version v1.12+.
  • docker version 17.03+.
  • kubectl version v1.11.3+.
  • Access to a Kubernetes v1.11.3+ cluster.

Getting Started

Check out the Getting Started section in the docs.

Installation

Install OLM on a Kubernetes cluster by following the installation guide.

For a complete end-to-end example of how OLM fits into the Operator Framework, see the Operator Framework website and the Getting Started guide on OperatorHub.io.

Contributing your Operator

Have an awesome Operator you want to share? Checkout the publishing docs to learn about contributing to OperatorHub.io.

Subscribe to a Package and Channel

Cloud Services can be installed from the catalog by subscribing to a channel in the corresponding package.

Kubernetes-native Applications

An Operator is an application-specific controller that extends the Kubernetes API to create, configure, manage, and operate instances of complex applications on behalf of a user.

OLM requires that applications be managed by an operator, but that doesn't mean that each application must write one from scratch. Depending on the level of control required you may:

  • Package up an existing set of resources for OLM with helm-app-operator-kit without writing a single line of go.
  • Use the operator-sdk to quickly build an operator from scratch.

The primary vehicle for describing operator requirements with OLM is a ClusterServiceVersion. Once you have an application packaged for OLM, you can deploy it with OLM by creating its ClusterServiceVersion in a namespace with a supporting OperatorGroup.

ClusterServiceVersions can be collected into CatalogSources which will allow automated installation and dependency resolution via an InstallPlan, and can be kept up-to-date with a Subscription.

Learn more about the components used by OLM by reading about the architecture and philosophy.

Key Concepts

CustomResourceDefinitions

OLM standardizes interactions with operators by requiring that the interface to an operator be via the Kubernetes API. Because we expect users to define the interfaces to their applications, OLM currently uses CRDs to define the Kubernetes API interactions.

Examples: EtcdCluster CRD, EtcdBackup CRD

Descriptors

OLM introduces the notion of β€œdescriptors” of both spec and status fields in kubernetes API responses. Descriptors are intended to indicate various properties of a field in order to make decisions about their content. For example, this can drive connecting two operators together (e.g. connecting the connection string from a mysql instance to a consuming application) and be used to drive rich interactions in a UI.

See an example of a ClusterServiceVersion with descriptors

Dependency Resolution

To minimize the effort required to run an application on kubernetes, OLM handles dependency discovery and resolution of applications running on OLM.

This is achieved through additional metadata on the application definition. Each operator must define:

  • The CRDs that it is responsible for managing.
    • e.g., the etcd operator manages EtcdCluster.
  • The CRDs that it depends on.
    • e.g., the vault operator depends on EtcdCluster, because Vault is backed by etcd.

Basic dependency resolution is then possible by finding, for each β€œrequired” CRD, the corresponding operator that manages it and installing it as well. Dependency resolution can be further constrained by the way a user interacts with catalogs.

Granularity

Dependency resolution is driven through the (Group, Version, Kind) of CRDs. This means that no updates can occur to a given CRD (of a particular Group, Version, Kind) unless they are completely backward compatible.

There is no way to express a dependency on a particular version of an operator (e.g. etcd-operator v0.9.0) or application instance (e.g. etcd v3.2.1). This encourages application authors to depend on the interface and not the implementation.

Discovery, Catalogs, and Automated Upgrades

OLM has the concept of catalogs, which are repositories of application definitions and CRDs.

Catalogs contain a set of Packages, which map β€œchannels” to a particular application definition. Channels allow package authors to write different upgrade paths for different users (e.g. alpha vs. stable).

Example: etcd package

Users can subscribe to channels and have their operators automatically updated when new versions are released.

Here's an example of a subscription:

apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: etcd
  namespace: olm
spec:
  channel: singlenamespace-alpha
  name: etcd
  source: operatorhubio-catalog
  sourceNamespace: olm

This will keep the etcd ClusterServiceVersion up to date as new versions become available in the catalog.

Catalogs are served internally over a grpc interface to OLM from operator-registry pods. Catalog data such as bundles are documented there as well.

Samples

To explore any operator samples using the OLM, see the https://operatorhub.io/ and its resources in Community Operators.

Community and how to get involved

Contributing

Check out the contributor documentation. Also, see the proposal docs and issues for ongoing or planned work.

Reporting bugs

See reporting bugs for details about reporting any issues.

Reporting flaky tests

See reporting flaky tests for details about reporting flaky tests.

License

Operator Lifecycle Manager is under Apache 2.0 license. See the LICENSE file for details.

More Repositories

1

operator-sdk

SDK for building Kubernetes applications. Provides high level APIs, useful abstractions, and project scaffolding.
Go
6,553
star
2

awesome-operators

A resource tracking a number of Operators out in the wild.
3,471
star
3

java-operator-sdk

Java SDK for building Kubernetes Operators
Java
794
star
4

getting-started

An end-to-end scenario showing how to use the Operator Framework.
535
star
5

community-operators

The canonical source for Kubernetes Operators that appear on OperatorHub.io, OpenShift Container Platform and OKD.
Dockerfile
419
star
6

operator-sdk-samples

Contains samples of operators built using the operator-sdk
Shell
237
star
7

operator-registry

Operator Registry runs in a Kubernetes or OpenShift cluster to provide operator catalog data to Operator Lifecycle Manager.
Go
188
star
8

helm-app-operator-kit

Tool for creating a Kubernetes Operator from a Helm Chart
Shell
132
star
9

operator-marketplace

Marketplace Operator
Go
109
star
10

kubectl-operator

Manage Kubernetes Operators from the command line
Go
68
star
11

helm-operator-plugins

Experimental refactoring of the operator-framework's helm operator
Go
47
star
12

rukpak

RukPak runs in a Kubernetes cluster and defines APIs for installing cloud native content
Go
41
star
13

operator-lib

This is a library to help Operator developers
Go
40
star
14

operatorhub.io

TypeScript
39
star
15

josdk-spring-boot-starter

Java
36
star
16

api

Contains the API definitions used by OLM and Marketplace
Go
29
star
17

java-operator-plugins

Operator SDK Java Plugin
Go
26
star
18

community

Community organizational documentations and process for Operator Framework
25
star
19

olm-book

Documentation for OLM
25
star
20

operator-sdk-ansible-util

A collection of Ansible assets for use with Ansible-based operators built with the operator-sdk.
Python
18
star
21

catalogd

On-cluster FBC catalog content server
Go
14
star
22

operator-manifests

Artisanally packaged Kubernetes Operators
Go
14
star
23

kubernetes-webooks-framework

Framework and tooling to support writing admission controllers and conversion hooks for Kubernetes in Java
Java
12
star
24

enhancements

10
star
25

audit

audit operator bundles and catalogs, producing a report.
Go
10
star
26

deppy

Deppy: The dependency resolver for Kubernetes
Go
10
star
27

olm-docs

Hugo doc site for https://github.com/operator-framework/operator-lifecycle-manager
SCSS
10
star
28

java-controller-runtime

Repo for the Java controller-runtime.
Java
8
star
29

combo

Go
8
star
30

olm-broker

Service Catalog integration for OLM
Go
8
star
31

ansible-operator-plugins

Experimental extraction/refactoring of the Operator SDK's ansible operator plugin
Go
7
star
32

operator-manifest-tools

Tooling that enables software release pipelines for operator manifests
Go
7
star
33

operator-controller

Go
7
star
34

cool-catalog

Repository that showcases example workflows for building OLM Catalogs via Declarative Configurations
Dockerfile
6
star
35

oria-operator

Go
5
star
36

index-mermaid-graph

a tool that produces SVG diagrams using OLM graphs as the input
Go
5
star
37

go-appr

Go client bindings for App Registry
5
star
38

operator-framework.io

Website for the framework at https://operatorframework.io
HTML
4
star
39

mock-extension-apiserver

Go
3
star
40

bundle-example

Dockerfile
3
star
41

community-operator-catalog

Community Operator Catalog
Shell
3
star
42

logos

2
star
43

tekton-scorecard-image

a SDK Scorecard custom image for the tekton operator
Java
1
star
44

tilt-support

Library of shared Tilt helpers
Starlark
1
star
45

test-infra

1
star
46

flake-analyzer

Go
1
star