Skip to content

Commit

Permalink
Updated README.md and CONTRIBUTING.md (#832)
Browse files Browse the repository at this point in the history
* Updated README.md and CONTRIBUTING.md

Signed-off-by: Nathaniel Graham <[email protected]>

* updated docs to explicitly mention podman

Signed-off-by: Nathaniel Graham <[email protected]>

* added +

Signed-off-by: Nathaniel Graham <[email protected]>

* updated MCE pause and ignoreOCPVersion in docs

Signed-off-by: Nathaniel Graham <[email protected]>

* updated other deprecated annotations in docs

Signed-off-by: Nathaniel Graham <[email protected]>

---------

Signed-off-by: Nathaniel Graham <[email protected]>
  • Loading branch information
ngraham20 authored Jul 16, 2024
1 parent eabe526 commit 9aa8040
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 22 deletions.
13 changes: 8 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,20 @@ associated unit and function tests.

After your PR is ready to commit, please run following commands to check your code.

```shell
make test ## Run unit tests
```bash
make test # Run unit tests
```

## Build images

Make sure your code build passed.

```shell
make manifests ## Regenerate manifests if necessary
make docker-build ## Ensure build succeeds
```bash
make manifests # Regenerate manifests if necessary

make docker-build # Ensure build succeeds
# or
make podman-build
```

Now, you can follow the [README](./README.md) to work with the stolostron/backplane-operator repository.
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@ Operator for managing installation of Backplane components

## Prerequisites

- Go v1.22+
- Go v1.22.4+
- kubectl 1.19+
- Operator-sdk v1.17.0+
- Docker
- Docker or Podman
- Connection to an existing Kubernetes cluster

## Installation

Before deploying, the CRDs need to be installed onto the cluster.

```shell
```bash
make install
```

### Outside the Cluster

The operator can be run locally against the configured Kubernetes cluster in ~/.kube/config with the following command:

```shell
```bash
make run
```

Expand All @@ -34,20 +34,22 @@ The operator can also run inside the cluster as a Deployment. To do that first b

1. Build the image:

```shell
```bash
make docker-build IMG=<registry>/<imagename>:<tag>
# or
make podman-build IMG=<registry>/<imagename>:<tag>
```

2. Push the image:

```shell
```bash
make docker-push IMG=<registry>/<imagename>:<tag>
# or
make podman-push IMG=<registry>/<imagename>:<tag>
```

3. Deploy the Operator:

```shell
```bash
make deploy IMG=<registry>/<imagename>:<tag>
```

Rebuild Date: 2024-02-21
8 changes: 4 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ See [Overriding Images](override-images.md ) for details about modifying images

Once installed, the mce operator will monitor changes in the cluster that affect an instance of the mce and reconcile deviations to maintain desired state. To stop the operator from making these changes you can apply an annotation to the mce instance.
```bash
kubectl annotate mce <mce-name> pause=true
kubectl annotate mce <mce-name> installer.multicluster.openshift.io/pause=true
```

Remove or edit this annotation to resume operator reconciliation
```bash
kubectl annotate mce <mce-name> pause- --overwrite
kubectl annotate mce <mce-name> installer.multicluster.openshift.io/pause- --overwrite
```

### Skip OCP Version Requirement
Expand All @@ -22,7 +22,7 @@ The operator defines a minimum version of OCP it can run in to avoid unexpected

1. Set `DISABLE_OCP_MIN_VERSION` as an environment variable. The presence of this variable in the container the operator runs will skip the check.

2. Set `ignoreOCPVersion` annotation in the MCE instance.
2. Set `installer.multicluster.openshift.io/ignore-ocp-version` annotation in the MCE instance.
```bash
kubectl annotate mce <mce-name> ignoreOCPVersion=true
kubectl annotate mce <mce-name> installer.multicluster.openshift.io/ignore-ocp-version=true
```
8 changes: 4 additions & 4 deletions docs/override-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ kind: MultiClusterEngine
metadata:
name: multiclusterengine
annotations:
"imageRepository": "quay.io/stolostron"
"installer.multicluster.openshift.io/image-repository": "quay.io/stolostron"
```
Run the following example to annotate an existing multiclusterengine and overwrite images with `quay.io/stolostron`

```bash
kubectl annotate mce <mce-name> --overwrite imageRepository="quay.io/stolostron"
kubectl annotate mce <mce-name> --overwrite installer.multicluster.openshift.io/image-repository="quay.io/stolostron"
```

## Replace images with Configmap
Expand All @@ -36,12 +36,12 @@ If overriding individual images, the minimum required parameters required to bui

```bash
kubectl create configmap <my-config> --from-file=docs/examples/image-override.json # Override 1 image example
kubectl annotate mce <mce-name> --overwrite imageOverridesCM=<my-config> # Provide the configmap name in an annotation
kubectl annotate mce <mce-name> --overwrite installer.multicluster.openshift.io/image-overrides-configmap=<my-config> # Provide the configmap name in an annotation
```

To remove this annotation to revert back to the original manifest
```bash
kubectl annotate mce <mce-name> imageOverridesCM- --overwrite # Remove annotation
kubectl annotate mce <mce-name> installer.multicluster.openshift.io/image-overrides-configmap- --overwrite # Remove annotation
kubectl delete configmap <my-config> # Delete configmap
```

Expand Down

0 comments on commit 9aa8040

Please sign in to comment.