Skip to content

Commit 67eab11

Browse files
committed
docs: update readme
1 parent 5a7e6a3 commit 67eab11

File tree

1 file changed

+109
-77
lines changed

1 file changed

+109
-77
lines changed

README.md

Lines changed: 109 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,146 @@
1-
# uniflow-operator
2-
// TODO(user): Add simple overview of use/purpose
1+
Uniflow Operator
32

4-
## Description
5-
// TODO(user): An in-depth paragraph about your project and overview of use
3+
The Uniflow Operator is a Kubernetes controller designed for managing Service and Revision resources. It tracks workflow changes and ensures seamless deployment of serverless workloads using Knative. This operator simplifies the orchestration and versioning of workflows in dynamic environments.
64

7-
## Getting Started
5+
Features
86

9-
### Prerequisites
10-
- go version v1.21.0+
11-
- docker version 17.03+.
12-
- kubectl version v1.11.3+.
13-
- Access to a Kubernetes v1.11.3+ cluster.
7+
Dynamic Revision Management
148

15-
### To Deploy on the cluster
16-
**Build and push your image to the location specified by `IMG`:**
9+
• Automatically creates and manages Revision resources based on Service updates.
10+
• Supports version control for services and workflows.
1711

18-
```sh
19-
make docker-build docker-push IMG=<some-registry>/uniflow-operator:tag
20-
```
12+
Efficient Resource Cleanup
2113

22-
**NOTE:** This image ought to be published in the personal registry you specified.
23-
And it is required to have access to pull the image from the working environment.
24-
Make sure you have the proper permission to the registry if the above commands don’t work.
14+
• Automatically removes outdated Revisions while retaining the latest version.
15+
• Ensures optimal resource utilization.
2516

26-
**Install the CRDs into the cluster:**
17+
Knative Integration
2718

28-
```sh
29-
make install
30-
```
19+
• Leverages Knative Serving to provide serverless deployment for workflows.
20+
• Supports real-time and scalable workload management.
3121

32-
**Deploy the Manager to the cluster with the image specified by `IMG`:**
22+
Event-Driven Reconciliation
3323

34-
```sh
35-
make deploy IMG=<some-registry>/uniflow-operator:tag
36-
```
24+
• Listens to workflow changes and dynamically updates Kubernetes resources.
25+
• Ensures system state aligns with user-defined specifications.
3726

38-
> **NOTE**: If you encounter RBAC errors, you may need to grant yourself cluster-admin
39-
privileges or be logged in as admin.
27+
Getting Started
4028

41-
**Create instances of your solution**
42-
You can apply the samples (examples) from the config/sample:
29+
Prerequisites
4330

44-
```sh
45-
kubectl apply -k config/samples/
46-
```
31+
• Kubernetes 1.24 or later
32+
• Knative Serving installed
33+
• Helm 3 (optional for installation)
4734

48-
>**NOTE**: Ensure that the samples has default values to test it out.
35+
Installation
4936

50-
### To Uninstall
51-
**Delete the instances (CRs) from the cluster:**
37+
1. Clone the Repository
5238

53-
```sh
54-
kubectl delete -k config/samples/
55-
```
39+
git clone https://github.com/siyul-park/uniflow-operator.git
40+
cd uniflow-operator
5641

57-
**Delete the APIs(CRDs) from the cluster:**
42+
2. Deploy Custom Resource Definitions (CRDs)
5843

59-
```sh
60-
make uninstall
61-
```
44+
kubectl apply -f config/crd/bases
6245

63-
**UnDeploy the controller from the cluster:**
46+
3. Deploy the Controller
6447

65-
```sh
66-
make undeploy
67-
```
48+
kubectl apply -f config/manager
6849

69-
## Project Distribution
50+
4. Verify Deployment
7051

71-
Following are the steps to build the installer and distribute this project to users.
52+
kubectl get pods -n uniflow-system
7253

73-
1. Build the installer for the image built and published in the registry:
54+
Usage
7455

75-
```sh
76-
make build-installer IMG=<some-registry>/uniflow-operator:tag
77-
```
56+
Define a Service
7857

79-
NOTE: The makefile target mentioned above generates an 'install.yaml'
80-
file in the dist directory. This file contains all the resources built
81-
with Kustomize, which are necessary to install this project without
82-
its dependencies.
58+
Create a Service manifest:
8359

84-
2. Using the installer
60+
apiVersion: uniflow.dev/v1
61+
kind: Service
62+
metadata:
63+
name: example-service
64+
spec:
65+
template:
66+
metadata:
67+
labels:
68+
app: example
69+
spec:
70+
containers:
71+
- name: example-container
72+
image: example-image:latest
8573

86-
Users can just run kubectl apply -f <URL for YAML BUNDLE> to install the project, i.e.:
74+
Apply the configuration:
8775

88-
```sh
89-
kubectl apply -f https://raw.githubusercontent.com/<org>/uniflow-operator/<tag or branch>/dist/install.yaml
90-
```
76+
kubectl apply -f service.yaml
9177

92-
## Contributing
93-
// TODO(user): Add detailed information on how you would like others to contribute to this project
78+
Monitor Revisions
9479

95-
**NOTE:** Run `make help` for more information on all potential `make` targets
80+
Check created Revisions:
9681

97-
More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)
82+
kubectl get revisions -n <namespace>
9883

99-
## License
84+
Inspect Service status:
10085

101-
Copyright 2024.
86+
kubectl describe service example-service
10287

103-
Licensed under the Apache License, Version 2.0 (the "License");
104-
you may not use this file except in compliance with the License.
105-
You may obtain a copy of the License at
88+
Development
10689

107-
http://www.apache.org/licenses/LICENSE-2.0
90+
Local Development
10891

109-
Unless required by applicable law or agreed to in writing, software
110-
distributed under the License is distributed on an "AS IS" BASIS,
111-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
112-
See the License for the specific language governing permissions and
113-
limitations under the License.
92+
1. Install Dependencies
11493

94+
go mod tidy
95+
96+
97+
2. Run the Controller
98+
99+
make run
100+
101+
102+
3. Apply Resources Locally
103+
104+
kubectl apply -f examples/service.yaml
105+
106+
107+
108+
Run Tests
109+
110+
make test
111+
112+
Contributing
113+
114+
Steps to Contribute
115+
116+
1. Fork the repository.
117+
2. Create a feature branch:
118+
119+
git checkout -b feature/my-feature
120+
121+
122+
3. Commit your changes:
123+
124+
git commit -m "Add my feature"
125+
126+
127+
4. Push the branch:
128+
129+
git push origin feature/my-feature
130+
131+
132+
5. Create a pull request in the repository.
133+
134+
Code Standards
135+
136+
• Follow the Go Code Style.
137+
• Write tests for new features.
138+
• Ensure code passes golangci-lint checks.
139+
140+
License
141+
142+
This project is licensed under the Apache License 2.0.
143+
144+
Contact
145+
146+
For questions or issues, please open an issue in the GitHub repository.

0 commit comments

Comments
 (0)