diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 35ab47189..9caa25eed 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. diff --git a/README.md b/README.md index 2089ef9f6..a8631bb8e 100644 --- a/README.md +++ b/README.md @@ -6,17 +6,17 @@ 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 ``` @@ -24,7 +24,7 @@ make install The operator can be run locally against the configured Kubernetes cluster in ~/.kube/config with the following command: -```shell +```bash make run ``` @@ -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=/: + # or + make podman-build IMG=/: ``` 2. Push the image: - ```shell + ```bash make docker-push IMG=/: + # or + make podman-push IMG=/: ``` 3. Deploy the Operator: - ```shell + ```bash make deploy IMG=/: ``` - -Rebuild Date: 2024-02-21 diff --git a/docs/README.md b/docs/README.md index 2cc42b3ca..62b043372 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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 pause=true +kubectl annotate mce installer.multicluster.openshift.io/pause=true ``` Remove or edit this annotation to resume operator reconciliation ```bash -kubectl annotate mce pause- --overwrite +kubectl annotate mce installer.multicluster.openshift.io/pause- --overwrite ``` ### Skip OCP Version Requirement @@ -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 ignoreOCPVersion=true +kubectl annotate mce installer.multicluster.openshift.io/ignore-ocp-version=true ``` \ No newline at end of file diff --git a/docs/override-images.md b/docs/override-images.md index 8c9391ac2..edf544991 100644 --- a/docs/override-images.md +++ b/docs/override-images.md @@ -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 --overwrite imageRepository="quay.io/stolostron" +kubectl annotate mce --overwrite installer.multicluster.openshift.io/image-repository="quay.io/stolostron" ``` ## Replace images with Configmap @@ -36,12 +36,12 @@ If overriding individual images, the minimum required parameters required to bui ```bash kubectl create configmap --from-file=docs/examples/image-override.json # Override 1 image example -kubectl annotate mce --overwrite imageOverridesCM= # Provide the configmap name in an annotation +kubectl annotate mce --overwrite installer.multicluster.openshift.io/image-overrides-configmap= # Provide the configmap name in an annotation ``` To remove this annotation to revert back to the original manifest ```bash -kubectl annotate mce imageOverridesCM- --overwrite # Remove annotation +kubectl annotate mce installer.multicluster.openshift.io/image-overrides-configmap- --overwrite # Remove annotation kubectl delete configmap # Delete configmap ```