-
Notifications
You must be signed in to change notification settings - Fork 0
Add examples, concepts, and getting started documentation #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Apps | ||
|
|
||
| Koptan provides application resources that represent application definitions at a higher level than native Kubernetes resources. | ||
|
|
||
| ## Supported App Resources | ||
|
|
||
| Koptan currently defines: | ||
|
|
||
| - `GoApp` | ||
| - `DotnetApp` | ||
| - `JavaApp` | ||
|
|
||
| These types are defined in: | ||
|
|
||
| - `api/v1alpha/goapp_types.go` | ||
| - `api/v1alpha/dotnetapp_types.go` | ||
| - `api/v1alpha/javaapp_types.go` | ||
|
|
||
| ## Purpose | ||
|
|
||
| An App resource is intended to describe an application in a language-aware way. | ||
|
|
||
| Instead of directly creating lower-level Kubernetes objects, users define an application using an App custom resource and let Koptan reconcile the desired state. | ||
|
|
||
| ## Why Separate App Types? | ||
|
|
||
| Different languages often require different build or packaging behavior. | ||
|
|
||
| For that reason, Koptan models them as separate resources rather than a single generic application type. | ||
|
|
||
| ## Related Resources | ||
|
|
||
| An App resource is related to: | ||
|
|
||
| - **Slipway**, which represents build-oriented workflow | ||
| - **Voyage**, which represents deployment-oriented workflow |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Concepts | ||
|
|
||
| This section introduces the main concepts in Koptan. | ||
|
|
||
| Koptan centers around three resource groups: | ||
|
|
||
| - **Apps** | ||
| - **Slipway** | ||
| - **Voyage** | ||
|
|
||
| Together, these resources provide a structured way to define, build, and manage applications in Kubernetes. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # Slipway | ||
|
|
||
| `Slipway` is a Koptan resource associated with build-oriented workflow. | ||
|
|
||
| ## Purpose | ||
|
|
||
| Slipway represents the part of the operator responsible for preparing or building application artifacts. | ||
|
|
||
| In practical terms, this may include operations such as: | ||
|
|
||
| - fetching source code | ||
| - preparing build context | ||
| - running language-specific build logic | ||
| - producing deployable output | ||
|
|
||
| ## Implementation Clues in the Repository | ||
|
|
||
| Relevant files include: | ||
|
|
||
| - `api/v1alpha/slipway_types.go` | ||
| - `internal/controller/slipway_controller.go` | ||
| - `internal/controller/slipway_build.go` | ||
|
|
||
| ## Relationship to Other Resources | ||
|
|
||
| Slipway works alongside: | ||
|
|
||
| - **App** resources, which describe the application | ||
| - **Voyage**, which represents the runtime or deployment stage |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Voyage | ||
|
|
||
| `Voyage` is a Koptan resource associated with deployment-oriented workflow. | ||
|
|
||
| ## Purpose | ||
|
|
||
| Voyage represents the stage where an application moves from build output into a running state on Kubernetes. | ||
|
|
||
| Depending on how the operator evolves, this may include concerns such as: | ||
|
|
||
| - rollout | ||
| - runtime configuration | ||
| - deployment reconciliation | ||
| - lifecycle management | ||
|
|
||
| ## Implementation Clues in the Repository | ||
|
|
||
| Relevant files include: | ||
|
|
||
| - `api/v1alpha/voyage_types.go` | ||
| - `internal/controller/voyage_controller.go` | ||
|
|
||
| ## Relationship to Other Resources | ||
|
|
||
| Voyage works with: | ||
|
|
||
| - **App** resources, which define the application | ||
| - **Slipway**, which handles build-oriented workflow | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # App Example | ||
|
|
||
| An App resource defines the source code repository for an application. | ||
|
|
||
| Koptan currently supports multiple app kinds, including: | ||
|
|
||
| - `GoApp` | ||
| - `JavaApp` | ||
| - `DotnetApp` | ||
|
|
||
| The only required field is the source repository. The examples below show minimal definitions for each app type. | ||
|
|
||
| === "GoApp" | ||
|
|
||
| ```yaml | ||
| apiVersion: koptan.felukka.org/v1alpha | ||
| kind: GoApp | ||
| metadata: | ||
| name: feedme | ||
| spec: | ||
| source: | ||
| repo: https://github.com/example/feedme | ||
| ``` | ||
|
|
||
| === "JavaApp" | ||
|
|
||
| ```yaml | ||
| apiVersion: koptan.felukka.org/v1alpha | ||
| kind: JavaApp | ||
| metadata: | ||
| name: orders-service | ||
| spec: | ||
| source: | ||
| repo: https://github.com/example/orders-service | ||
| ``` | ||
|
|
||
| === "DotnetApp" | ||
|
|
||
| ```yaml | ||
| apiVersion: koptan.felukka.org/v1alpha | ||
| kind: DotnetApp | ||
| metadata: | ||
| name: payments-service | ||
| spec: | ||
| source: | ||
| repo: https://github.com/example/payments-service | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Examples | ||
|
|
||
| This section provides simple examples of the three main Koptan resources: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Explain the relations and dependency more between the three phases |
||
|
|
||
| - **App**: defines the application source repository | ||
| - **Slipway**: connects an app to the build pipeline | ||
| - **Voyage**: deploys the built application | ||
|
|
||
| A typical Koptan workflow looks like this: | ||
|
|
||
| 1. Create an App resource | ||
| 2. Create a Slipway that references the App | ||
| 3. Create a Voyage that references the Slipway | ||
|
|
||
| Use the pages in this section to see minimal working examples for each resource. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # Slipway Example | ||
|
|
||
| A Slipway connects an application to the build pipeline. | ||
|
|
||
| It references an existing App using `name` and `kind`. | ||
|
|
||
| ## Examples | ||
|
|
||
| === "GoApp" | ||
|
|
||
| ```yaml | ||
| apiVersion: koptan.felukka.org/v1alpha | ||
| kind: Slipway | ||
| metadata: | ||
| name: feedme | ||
| spec: | ||
| appRef: | ||
| name: feedme | ||
| kind: GoApp | ||
| ``` | ||
|
Comment on lines
+11
to
+20
|
||
|
|
||
| === "JavaApp" | ||
|
|
||
| ```yaml | ||
| apiVersion: koptan.felukka.org/v1alpha | ||
| kind: Slipway | ||
| metadata: | ||
| name: orders-service | ||
| spec: | ||
| appRef: | ||
| name: orders-service | ||
| kind: JavaApp | ||
| ``` | ||
|
|
||
| === "DotnetApp" | ||
|
|
||
| ```yaml | ||
| apiVersion: koptan.felukka.org/v1alpha | ||
| kind: Slipway | ||
| metadata: | ||
| name: payments-service | ||
| spec: | ||
| appRef: | ||
| name: payments-service | ||
| kind: DotnetApp | ||
| ``` | ||
|
|
||
| ## Apply a Slipway | ||
|
|
||
| ```bash | ||
| kubectl apply -f slipway.yaml | ||
|
Comment on lines
+50
to
+51
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
|
|
||
| --- | ||
|
|
||
| # 📄 `docs/examples/voyage.md` | ||
|
|
||
| ```md | ||
| # Voyage Example | ||
|
Comment on lines
+2
to
+7
|
||
|
|
||
| A Voyage deploys an application using a Slipway. | ||
|
|
||
| It defines how the application runs inside the cluster. | ||
|
|
||
| ## Examples | ||
|
|
||
| === "Minimal" | ||
|
|
||
| ```yaml | ||
| apiVersion: koptan.felukka.org/v1alpha | ||
| kind: Voyage | ||
| metadata: | ||
| name: feedme | ||
| spec: | ||
| slipwayRef: | ||
| name: feedme | ||
| port: 8080 | ||
| ``` | ||
|
|
||
| === "With Replicas & Env" | ||
|
|
||
| ```yaml | ||
| apiVersion: koptan.felukka.org/v1alpha | ||
| kind: Voyage | ||
| metadata: | ||
| name: feedme | ||
| spec: | ||
| slipwayRef: | ||
| name: feedme | ||
| port: 8080 | ||
| replicas: 2 | ||
| env: | ||
| - name: ENV | ||
| value: production | ||
| - name: LOG_LEVEL | ||
| value: info | ||
| ``` | ||
|
|
||
| === "With Health Check" | ||
|
|
||
| ```yaml | ||
| apiVersion: koptan.felukka.org/v1alpha | ||
| kind: Voyage | ||
| metadata: | ||
| name: feedme | ||
| spec: | ||
| slipwayRef: | ||
| name: feedme | ||
| port: 8080 | ||
| replicas: 2 | ||
| healthCheck: | ||
| path: /health | ||
| port: 8080 | ||
| initialDelaySeconds: 10 | ||
| periodSeconds: 5 | ||
| ``` | ||
|
|
||
| ## Apply a Voyage | ||
|
|
||
| ```bash | ||
| kubectl apply -f voyage.yaml | ||
|
Comment on lines
+68
to
+69
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Getting Started | ||
|
|
||
| This section explains how to install Koptan and begin using its custom resources. | ||
|
|
||
| It is intended for first-time users who want to: | ||
|
|
||
| - install the operator | ||
| - verify the CRDs are available | ||
| - create an initial App resource | ||
| - understand the basic usage flow |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to mention here the installation method using helm repo and helm chart. this is like way around |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Installation | ||
|
|
||
| Koptan is installed as a Kubernetes operator. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| Before installing Koptan, make sure you have: | ||
|
|
||
| - a Kubernetes cluster | ||
| - `kubectl` configured for that cluster | ||
| - permissions to install CRDs and controller resources | ||
|
|
||
| ## Install the CRDs | ||
|
|
||
| You can install the CRDs using the manifests under `config/crd`. | ||
|
|
||
| Example: | ||
|
|
||
| ```bash | ||
| kubectl apply -k config/crd |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,24 @@ | ||||||||||
|
|
||||||||||
| # Quickstart | ||||||||||
|
|
||||||||||
| This page shows a minimal example of using Koptan. | ||||||||||
|
|
||||||||||
| ## Step 1: Install the Operator | ||||||||||
|
|
||||||||||
| Make sure Koptan and its CRDs are installed. | ||||||||||
|
|
||||||||||
| See the Installation page for details. | ||||||||||
|
|
||||||||||
| ## Step 2: Create an App Resource | ||||||||||
|
|
||||||||||
| Koptan supports multiple application resource types, including `GoApp`, `DotnetApp`, and `JavaApp`. | ||||||||||
|
|
||||||||||
| A minimal example is shown below: | ||||||||||
|
|
||||||||||
| ```yaml | ||||||||||
| apiVersion: koptan.felukka.sh/v1alpha1 | ||||||||||
|
||||||||||
| apiVersion: koptan.felukka.sh/v1alpha1 | |
| apiVersion: koptan.felukka.org/v1alpha |
Copilot
AI
Mar 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The YAML code fence is opened but never closed, which will break page rendering in MkDocs. Add a closing triple-backtick after the example manifest.
Copilot
AI
Mar 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GoAppSpec requires spec.source (with at least repo), but this example uses spec: {} which will fail validation/admission. Update the minimal example to include spec.source.repo (and optionally revision).
| {} | |
| source: | |
| repo: https://github.com/my-org/my-go-app.git | |
| revision: main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.