Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #115 from triggermesh/task/prepare-readme-before-r…
Browse files Browse the repository at this point in the history
…elease

Docs: prepare readme before release
  • Loading branch information
Pablo Mercado committed Apr 28, 2023
2 parents e38ca33 + 8240d88 commit 7869153
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 18 deletions.
64 changes: 46 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,68 @@
# Scoby
![TriggerMesh Logo](docs/assets/images/triggermesh-logo.png)

![CodeQL](https://github.com/triggermesh/scoby/actions/workflows/codeql.yaml/badge.svg?branch=main)
![Static](https://github.com/triggermesh/scoby/actions/workflows/static.yaml/badge.svg?branch=main)
[![Go Report Card](https://goreportcard.com/badge/github.com/triggermesh/scoby)](https://goreportcard.com/report/github.com/triggermesh/scoby)
[![Release](https://img.shields.io/github/v/release/triggermesh/scoby?label=release)](https://github.com/triggermesh/scoby/releases)
[![Slack](https://img.shields.io/badge/Slack-Join%20chat-4a154b?style=flat&logo=slack)](https://join.slack.com/t/triggermesh-community/shared_invite/zt-1kngevosm-MY7kqn9h6bT08hWh8PeltA)

Generic Kubernetes controller for simple workloads.

![scoby](docs/../docs/assets/harrison-kugler-kombucha.jpg)
![scoby](docs/assets/images/harrison-kugler-kombucha.jpg)
> photo by [Harrison Kugler](https://unsplash.com/@harrisonkugler?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)
## Description

Scoby is a controller that generates controllers :infinity:, and makes it easy to manage application instances as Kubernetes objects.
Scoby is a controller that creates controllers dynamically :infinity:, and makes it easy to manage your application instances as Kubernetes objects.

Registrations are the core object of Scoby, they contain references to user a provided container image,a CRD, and workload generation parameters.
In shoft, Scoby is the shortest path between your application's container image and Kubernetes end users.

- The container image provided at the registration must receive parameters via environment variables.
- The CRD must contain all supported parameters and validations. Scoby does not add extra validations and parses user created objects without comparing with the registered CRD.
- Workloads generated by Scoby can be Deployments (with optional Service) or Knative Services. Custom Resource instances will generate environment variables that can be highly customized.
![scoby user overview](docs/assets/images/scoby-user-overview.png)

Registered CRDs will get a controller that reacts to object instances in a strictly declarative manner.
Given a container image containinng an application, a Kubernetes CRD that defines the application spec, and an Scoby registration that configures rendering, end users will be able to manage instances of your application at Kubernetes.

![scoby summary](docs/../docs/assets/scoby-summary.png)
## Primer

## Install The Development Version
There are 3 steps needed to create your Kubernetes native application:

Development version can be installed using [ko](https://github.com/ko-build/ko)
- Build the image: create a container image that Scoby can use. Parameters need to be passed via environment variables.
- Create the CRD: Scoby will use the CRD elements to create the environment variables that your application needs. Make sure your add all your validations via CRD.
- Create the CRDRegistration: the registration informs Scoby about how the CRD elements are transformed into environment variables, what image to use, and what type of workload should be created.

```console
ko apply -f ./config
A registration could look as simple as this:

```yaml
apiVersion: scoby.triggermesh.io/v1alpha1
kind: CRDRegistration
metadata:
name: myapp
spec:
crd: myapp.myorganization.io
workload:
fromImage:
repo: myorganization/myapp:v1
```

Scoby can also run locally pointing to a Kubernetes cluster, make sure the CRD registration exists.
## Install

To install Scoby at a Kubernetes cluster apply manifests for both CRDs and Controller:

```console
# Apply registration
kubectl apply -f config/300-crdregistration.yaml
# Install Scoby CRDs
kubectl apply -f https://github.com/triggermesh/scoby/releases/latest/download/scoby-crds.yaml

# Install Scoby Controller
kubectl apply -f https://github.com/triggermesh/scoby/releases/latest/download/scoby.yaml
```

Refer to [releases](https://github.com/triggermesh/scoby/releases) for further information.

# Run controller
go run cmd/scoby-controller/main.go
### Development Version

Development version can be installed using [ko](https://github.com/ko-build/ko)

```console
ko apply -f ./config
```

## Usage
Expand Down
Binary file added docs/assets/images/scoby-user-overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/triggermesh-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/assets/scoby-summary.png
Binary file not shown.
3 changes: 3 additions & 0 deletions docs/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,5 +190,8 @@ The response from the finalize hook call might include the same information as t
"permantent": "true|false",
"continue": "true|false"
},
"status": {

}
}
```
3 changes: 3 additions & 0 deletions pkg/hook/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ type HookResponse struct {
// HookResponseFinalize is the expected finalize reply from configured hooks.
type HookResponseFinalize struct {
Error *HookResponseError `json:"error,omitempty"`

// Status whose elements should be merged with those that Scoby creates.
Status *commonv1alpha1.Status `json:"status,omitempty"`
}

// HookResponseError contains the information that Scoby needs to
Expand Down

0 comments on commit 7869153

Please sign in to comment.