-
Notifications
You must be signed in to change notification settings - Fork 56
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
📖 Quickstart #1142
Merged
joelanford
merged 3 commits into
operator-framework:main
from
perdasilva:perdasilva/docs/quistart
Sep 5, 2024
Merged
📖 Quickstart #1142
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
## Getting Started | ||
You’ll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or run against a remote cluster. | ||
|
||
> [!NOTE] | ||
> Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster `kubectl cluster-info` shows). | ||
|
||
### Installation | ||
|
||
> [!CAUTION] | ||
> Operator-Controller depends on [cert-manager](https://cert-manager.io/). Running the following command | ||
> may affect an existing installation of cert-manager and cause cluster instability. | ||
|
||
The latest version of Operator Controller can be installed with the following command: | ||
|
||
```bash | ||
curl -L -s https://github.com/operator-framework/operator-controller/releases/latest/download/install.sh | bash -s | ||
``` | ||
|
||
### Additional setup on Macintosh computers | ||
On Macintosh computers some additional setup is necessary to install and configure compatible tooling. | ||
|
||
#### Install Homebrew and tools | ||
Follow the instructions to [installing Homebrew](https://docs.brew.sh/Installation) and then execute the following to install tools: | ||
|
||
```sh | ||
brew install bash gnu-tar gsed | ||
``` | ||
|
||
#### Configure your shell | ||
Modify your login shell's `PATH` to prefer the new tools over those in the existing environment. This example should work either with `zsh` (in $HOME/.zshrc) or `bash` (in $HOME/.bashrc): | ||
|
||
```sh | ||
for bindir in `find $(brew --prefix)/opt -type d -follow -name gnubin -print` | ||
do | ||
export PATH=$bindir:$PATH | ||
done | ||
``` | ||
|
||
### Running on the cluster | ||
1. Install Instances of Custom Resources: | ||
|
||
```sh | ||
kubectl apply -f config/samples/ | ||
``` | ||
|
||
2. Build and push your image to the location specified by `IMG`: | ||
|
||
```sh | ||
make docker-build docker-push IMG=<some-registry>/operator-controller:tag | ||
``` | ||
|
||
3. Deploy the controller to the cluster with the image specified by `IMG`: | ||
|
||
```sh | ||
make deploy IMG=<some-registry>/operator-controller:tag | ||
``` | ||
|
||
### Uninstall CRDs | ||
To delete the CRDs from the cluster: | ||
|
||
```sh | ||
make uninstall | ||
``` | ||
|
||
### Undeploy controller | ||
To undeploy the controller from the cluster: | ||
|
||
```sh | ||
make undeploy | ||
``` | ||
|
||
## Contributing | ||
|
||
Refer to [CONTRIBUTING.md](./CONTRIBUTING.md) for more information. | ||
|
||
### How it works | ||
This project aims to follow the Kubernetes [Operator pattern](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/). | ||
|
||
It uses [Controllers](https://kubernetes.io/docs/concepts/architecture/controller/) | ||
which provide a reconcile function responsible for synchronizing resources until the desired state is reached on the cluster. | ||
|
||
### Test It Out | ||
|
||
Install the CRDs and the operator-controller into a new [KIND cluster](https://kind.sigs.k8s.io/): | ||
```sh | ||
make run | ||
``` | ||
This will build a local container image of the operator-controller, create a new KIND cluster and then deploy onto that cluster. | ||
This will also deploy the catalogd and cert-manager dependencies. | ||
|
||
### Modifying the API definitions | ||
If you are editing the API definitions, generate the manifests such as CRs or CRDs using: | ||
|
||
```sh | ||
make manifests | ||
``` | ||
|
||
**NOTE:** Run `make help` for more information on all potential `make` targets. | ||
|
||
More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html). |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We install this catalog now as part of the
install.sh
script. Should we call that out?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.
I approved and put in the merge queue, we can iterate if we feel more changes are really necessary.