An open API service indexing awesome lists of open source software.

https://github.com/khulnasoft/kubernetes-monitor


https://github.com/khulnasoft/kubernetes-monitor

Last synced: 7 months ago
JSON representation

Awesome Lists containing this project

README

          

# Setup for OpenShift 4 tests #

## Cluster and Operator setup ##

### Set up a local OpenShift 4 cluster using CodeReady Containers ###

Install the OpenShift CLI tool:

```shell
brew install openshift-cli
```

Download CodeReady Containers: [https://cloud.redhat.com/openshift/install/crc/installer-provisioned](https://cloud.redhat.com/openshift/install/crc/installer-provisioned). To authenticate to Red Hat, search in 1Password: `k3wfyid3zlu2ce2tzrwyd27gky`.

Install CRC as noted in the above website:

> Download and extract the CodeReady Containers archive for your operating system and place the binary in your $PATH. Run the crc setup command to set up your host operating system for the CodeReady Containers virtual machine.
>
> Once `crc setup` is run, then run `crc start`. Provide the image pull secrets by copying it from [https://cloud.redhat.com/openshift/install/crc/installer-provisioned](https://cloud.redhat.com/openshift/install/crc/installer-provisioned) (click on Copy pull secret).

Follow the instructions from `crc start` to see how to login to the cluster. If you need to see the login credentials, run `crc console --credentials`.

---

## Required environment variables ##

Use `crc console --credentials` to view your local OpenShift credentials.
See `/private/etc/hosts` for the cluster URL.

For testing against the OpenShift integration tests cluster (as used on merged PRs in CI/CD) see ":key: OpenShift Test Cluster - Runtime".

Using the above credentials set the following environment variables:

- DOCKERHUB_USER (search in 1Password: mn5qer7ry5f5fiabvnhuwmzmsi)
- DOCKERHUB_PASSWORD (search in 1Password: mn5qer7ry5f5fiabvnhuwmzmsi)
- OPENSHIFT4_USER (crc console --credentials)
- OPENSHIFT4_PASSWORD (crc console --credentials)
- OPENSHIFT4_CLUSTER_URL (crc console --credentials)

Optionally set KUBERNETES_MONITOR_IMAGE_TAG to a released kubernetes-monitor tag. Alternatively the tests will build the whole kubernetes-monitor image (WARNING: this is very slow!).

## Running tests ##

Double-check that the required environment variables are set and that your OpenShift VM is running.

Finally, run:

```shell
npm run test:integration:openshift4:operator
```