Skip to content

Updated Readme #10

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

Merged
merged 3 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 60 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# [ WIP ] ConsoleApplication Operator
# ConsoleApplication Operator

**Note: For the latest updates, please refer to the `development` branch. Some features in this README may not be in main yet.**

The ConsoleApplication Operator is a Kubernetes operator designed to automate the deployment of applications on OpenShift from Git URLs using custom resources. This operator provides a streamlined and efficient approach to manage application lifecycle processes such as building, deploying, and serving applications without needing to manually fill out forms in the OpenShift Web Console.

Expand All @@ -10,6 +12,63 @@ The ConsoleApplication Operator is a Kubernetes operator designed to automate th
- **Status Tracking**: Utilizes a database to persist state and track the progress of resource creation.
- **Error Handling**: Ensures proper error handling and status updates for failed operations.

## Architecture Diagram

<img src="docs/images/console-application-operator-architecture.png" alt="ConsoleApplication Operator Architecture" width="400" height="450">

## Project Status

**Project status:** *alpha*

**Current API version:** `v1alpha1`

## Getting Started

Currently,you would need to have an OpenShift cluster, as the operator supports only BuildConfig to build container images from source. In the subsequent versions, we plan to substitute BuildConfig with Shipwright or tools like S2I and Buildah to build container images in any Kubernetes cluster.

Ensure you have the following tools installed:

- Golang compiler supported by the Go team (1.22+)
- Operator SDK version (1.35.x+)
- Access to OpenShift cluster
- Quay.io account to store container images

## Installation

Currently, the operator is not available in the OperatorHub. You can install the operator by building the operator image and deploying it to your OpenShift cluster.

To install the operator, follow these steps:

**Clone the repository:**

```sh
git clone https://github.com/openshift-console/console-application-operator && cd console-application-operator
```

**Set the environment variables in the `.env` file:**

```sh
QUAY_AUTH_TOKEN=<your-quay-auth-token>
QUAY_USER_NAME=<your-quay-username>
```

**Build and push the operator image to Quay.io:**

```sh
make container-build
make container-push
```

**Install the operator on the OpenShift cluster:**

```sh
make install
```

## Development

Please refer to the following [instructions](docs/DEVELOPMENT.md) .

## License

This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
75 changes: 75 additions & 0 deletions docs/DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Development Guide

This document provides guidelines and instructions for setting up the development environment and contributing to the project.

## Set Environment Variables

Create `.env` file in the root directory of the project and add the following environment variables:

```sh
QUAY_AUTH_TOKEN=<your-quay-auth-token>
QUAY_USER_NAME=<your-quay-username>
```

## Viewing available Make targets

To view all available Make targets, run:

```sh
make help
```

## Building Operator image

To build and push the operator image to Quay.io, run:

```sh
make container-build
make container-push
```

## Running Tests

You can run the unit tests using the following command:

```sh
make test
```

## Running Lint

To run the lint checks, execute:

```sh
make lint
```

## Deploying Operator

Ensure KUBECONFIG points to target OpenShift cluster. To deploy the operator, run:

```sh
make deploy
```

## Create `ConsoleApplication` Custom Resource (CR)

To create a `ConsoleApplication` CR, run:

```sh
kubectl create -k examples/success.yaml
```

## Uninstalling Operator

Ensure KUBECONFIG points to target OpenShift cluster. Let's begin by deleting the payload image first with:

```sh
kubectl delete -k examples/success.yaml
```

Subsequently, proceed with uninstalling the operator:

```sh
make undeploy
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading