{"id":28420760,"url":"https://github.com/redhat-developer/app-services-openshift-console-plugin","last_synced_at":"2026-02-15T13:34:47.688Z","repository":{"id":52642208,"uuid":"328732858","full_name":"redhat-developer/app-services-openshift-console-plugin","owner":"redhat-developer","description":"OpenShift UI Console Plugin for RHOAS (Fork of https://github.com/openshift/console)","archived":false,"fork":false,"pushed_at":"2022-11-08T21:41:19.000Z","size":145341,"stargazers_count":1,"open_issues_count":4,"forks_count":3,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-10-06T08:58:43.609Z","etag":null,"topics":["app-services","rhoas"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redhat-developer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-11T16:58:13.000Z","updated_at":"2022-07-01T22:38:49.000Z","dependencies_parsed_at":"2023-01-21T13:45:41.813Z","dependency_job_id":null,"html_url":"https://github.com/redhat-developer/app-services-openshift-console-plugin","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/redhat-developer/app-services-openshift-console-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer%2Fapp-services-openshift-console-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer%2Fapp-services-openshift-console-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer%2Fapp-services-openshift-console-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer%2Fapp-services-openshift-console-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redhat-developer","download_url":"https://codeload.github.com/redhat-developer/app-services-openshift-console-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer%2Fapp-services-openshift-console-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29479922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T11:35:25.641Z","status":"ssl_error","status_checked_at":"2026-02-15T11:34:57.128Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["app-services","rhoas"],"created_at":"2025-06-05T03:49:40.401Z","updated_at":"2026-02-15T13:34:47.660Z","avatar_url":"https://github.com/redhat-developer.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenShift Console\n\nCodename: \"Bridge\"\n\n[quay.io/openshift/origin-console](https://quay.io/repository/openshift/origin-console?tab=tags)\n\nThe console is a more friendly `kubectl` in the form of a single page webapp. It also integrates with other services like monitoring, chargeback, and OLM. Some things that go on behind the scenes include:\n\n- Proxying the Kubernetes API under `/api/kubernetes`\n- Providing additional non-Kubernetes APIs for interacting with the cluster\n- Serving all frontend static assets\n- User Authentication\n\n## Quickstart\n\n### Dependencies:\n\n1. [node.js](https://nodejs.org/) \u003e= 14 \u0026 [yarn](https://yarnpkg.com/en/docs/install) \u003e= 1.20\n2. [go](https://golang.org/) \u003e= 1.13+\n3. [oc](https://mirror.openshift.com/pub/openshift-v4/clients/oc/4.4/) or [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) and an OpenShift or Kubernetes cluster\n4. [jq](https://stedolan.github.io/jq/download/) (for `contrib/environment.sh`)\n5. Google Chrome/Chromium or Firefox for integration tests\n\n### Build everything:\n\nThis project uses uses [Go modules](https://github.com/golang/go/wiki/Modules),\nso you should clone the project outside of your `GOPATH`. To build both the\nfrontend and backend, run:\n\n```\n./build.sh\n```\n\nBackend binaries are output to `./bin`.\n\n### Configure the application\n\nThe following instructions assume you have an existing cluster you can connect\nto. OpenShift 4.x clusters can be installed using the\n[OpenShift Installer](https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/).\nYou can also use [CodeReady Containers](https://github.com/code-ready/crc)\nfor local installs. More information about installing OpenShift can be found at\n\u003chttps://try.openshift.com/\u003e.\n\n#### OpenShift (no authentication)\n\nFor local development, you can disable OAuth and run bridge with an OpenShift\nuser's access token. If you've installed OpenShift 4.0, run the following\ncommands to login as the kubeadmin user and start a local console for\ndevelopment. Make sure to replace `/path/to/install-dir` with the directory you\nused to install OpenShift.\n\n```\noc login -u kubeadmin -p $(cat /path/to/install-dir/auth/kubeadmin-password)\nsource ./contrib/oc-environment.sh\n./bin/bridge\n```\n\nThe console will be running at [localhost:9000](http://localhost:9000).\n\nIf you don't have `kubeadmin` access, you can use any user's API token,\nalthough you will be limited to that user's access and might not be able to run\nthe full integration test suite.\n\n#### OpenShift (with authentication)\n\nIf you need to work on the backend code for authentication or you need to test\ndifferent users, you can set up authentication in your development environment.\nRegistering an OpenShift OAuth client requires administrative privileges for\nthe entire cluster, not just a local project. You must be logged in as a\ncluster admin such as `system:admin` or `kubeadmin`.\n\nTo run bridge locally connected to an OpenShift cluster, create an\n`OAuthClient` resource with a generated secret and read that secret:\n\n```\noc process -f examples/console-oauth-client.yaml | oc apply -f -\noc get oauthclient console-oauth-client -o jsonpath='{.secret}' \u003e examples/console-client-secret\n```\n\nIf the CA bundle of the OpenShift API server is unavailable, fetch the CA\ncertificates from a service account secret. Otherwise copy the CA bundle to\n`examples/ca.crt`:\n\n```\noc get secrets -n default --field-selector type=kubernetes.io/service-account-token -o json | \\\n    jq '.items[0].data.\"ca.crt\"' -r | python -m base64 -d \u003e examples/ca.crt\n# Note: use \"openssl base64\" because the \"base64\" tool is different between mac and linux\n```\n\nFinally run the console and visit [localhost:9000](http://localhost:9000):\n\n```\n./examples/run-bridge.sh\n```\n\n#### Native Kubernetes\n\nIf you have a working `kubectl` on your path, you can run the application with:\n\n```\nexport KUBECONFIG=/path/to/kubeconfig\nsource ./contrib/environment.sh\n./bin/bridge\n```\n\nThe script in `contrib/environment.sh` sets sensible defaults in the environment, and uses `kubectl` to query your cluster for endpoint and authentication information.\n\nTo configure the application to run by hand, (or if `environment.sh` doesn't work for some reason) you can manually provide a Kubernetes bearer token with the following steps.\n\nFirst get the secret ID that has a type of `kubernetes.io/service-account-token` by running:\n\n```\nkubectl get secrets\n```\n\nthen get the secret contents:\n\n```\nkubectl describe secrets/\u003csecret-id-obtained-previously\u003e\n```\n\nUse this token value to set the `BRIDGE_K8S_AUTH_BEARER_TOKEN` environment variable when running Bridge.\n\n## Operator\n\nIn OpenShift 4.x, the console is installed and managed by the\n[console operator](https://github.com/openshift/console-operator/).\n\n## Hacking\n\nSee [CONTRIBUTING](CONTRIBUTING.md) for workflow \u0026 convention details.\n\nSee [STYLEGUIDE](STYLEGUIDE.md) for file format and coding style guide.\n\n### Dev Dependencies\n\ngo 1.13+, nodejs/yarn, kubectl\n\n### Frontend Development\n\nAll frontend code lives in the `frontend/` directory. The frontend uses node, yarn, and webpack to compile dependencies into self contained bundles which are loaded dynamically at run time in the browser. These bundles are not committed to git. Tasks are defined in `package.json` in the `scripts` section and are aliased to `yarn run \u003ccmd\u003e` (in the frontend directory).\n\n#### Install Dependencies\n\nTo install the build tools and dependencies:\n\n```\ncd frontend\nyarn install\n```\n\nYou must run this command once, and every time the dependencies change. `node_modules` are not committed to git.\n\n#### Interactive Development\n\nThe following build task will watch the source code for changes and compile automatically.\nIf you would like to disable hot reloading, set the environment variable `HOT_RELOAD` to `false`.\n\n```\nyarn run dev\n```\n\nIf changes aren't detected, you might need to increase `fs.inotify.max_user_watches`. See \u003chttps://webpack.js.org/configuration/watch/#not-enough-watchers\u003e. If you need to increase your watchers, it's common to see multiple errors beginning with `Error from chokidar`.\n\n### Unit Tests\n\nRun all unit tests:\n\n```\n./test.sh\n```\n\nRun backend tests:\n\n```\n./test-backend.sh\n```\n\nRun frontend tests:\n\n```\n./test-frontend.sh\n```\n\n#### Debugging Unit Tests\n\n1. `cd frontend; yarn run build`\n2. Add `debugger;` statements to any unit test\n3. `yarn debug-test route-pages`\n4. Chrome browser URL: 'chrome://inspect/#devices', click on the 'inspect' link in **Target (v10...)** section.\n5. Launches chrome-dev tools, click Resume button to continue\n6. Will break on any `debugger;` statements\n\n### Integration Tests\n\n#### Cypress\n\nCypress integration tests are implemented in [Cypress.io](https://www.cypress.io/).\n\nLaunch Cypress test runner:\n\n```\ncd frontend\noc login ...\nyarn run test-cypress-console\n```\n\nThis will launch the Cypress Test Runner UI in the `console` package, where you can run one or all cypress tests.\nBy default, it will look for Chrome in the system and use it, but if you want to use Firefox instead, set `BRIDGE_E2E_BROWSER_NAME` environment variable in your shell with the value `firefox`.\n\n##### Execute Cypress in different packages\n\nAn alternate way to execute cypress tests is via [test-cypress.sh](test-cypress.sh) which takes a `-p \u003cpackage\u003e` parameter to allow execution in different packages. It also can run Cypress tests in the Test Runner UI or in `-- headless` mode:\n\n```\nconsole\u003e./test-cypress.sh\nRuns Cypress tests in Test Runner or headless mode\nUsage: test-cypress [-p] \u003cpackage\u003e [-s] \u003cfilemask\u003e [-h true]\n  '-p \u003cpackage\u003e' may be 'console, 'olm' or 'devconsole'\n  '-s \u003cspecmask\u003e' is a file mask for spec test files, such as 'tests/monitoring/*'. Used only in headless mode when '-p' is specified.\n  '-h true' runs Cypress in headless mode. When omitted, launches Cypress Test Runner\nExamples:\n  test-cypress.sh                                       // displays this help text\n  test-cypress.sh -p console                            // opens Cypress Test Runner for console tests\n  test-cypress.sh -p olm                                // opens Cypress Test Runner for OLM tests\n  test-cypress.sh -h true                               // runs all packages in headless mode\n  test-cypress.sh -p olm -h true                        // runs OLM tests in headless mode\n  test-cypress.sh -p console -s 'tests/crud/*' -h true  // runs console CRUD tests in headless mode\n```\n\n[**_More information on Console's Cypress usage_**](frontend/packages/integration-tests-cypress/README.md)\n\n[**_More information on DevConsole's Cypress usage_**](frontend/packages/dev-console/integration-tests/README.md)\n\n#### Protractor\n\nIntegration tests are run in a headless browser driven by [protractor](http://www.protractortest.org/#/).\nRequirements include Chrome or Firefox, a working cluster, kubectl, and bridge itself (see building above).\nBy default, it will look for Chrome in the system and use it, but if you want to use Firefox instead, set `BRIDGE_E2E_BROWSER_NAME` environment variable in your shell with the value `firefox`.\n\nSetup (or any time you change node_modules - `yarn add` or `yarn install`)\n\n```\ncd frontend \u0026\u0026 yarn run webdriver-update\n```\n\nRun integration tests:\n\n```\nyarn run test-protractor\n```\n\nRun integration tests on an OpenShift cluster:\n\n```\nyarn run test-protractor-openshift\n```\n\nThis will include the normal k8s CRUD tests and CRUD tests for OpenShift\nresources.\n\nIf you get Jasmine spec timeout errors during runs perhaps against a busy cluster or over slow network, you can try setting a bigger timeout in milliseconds to `BRIDGE_JASMINE_TIMEOUT` environment variable in your shell before running the tests. Default 120000 (2 minutes).\n\nIf you your local Chrome version doesn't match the Chromedriver version from the console dependencies, override the version with:\n\n```\nyarn run webdriver-update --versions.chrome=77.0.3865.120\n```\n\nFor Fedora, you can use:\n\n```\nyarn run webdriver-update-fedora\n```\n\nFor macOS, you can use:\n\n```\nyarn run webdriver-update-macos\n```\n\n##### Hacking Protractor Tests\n\nTo see what the tests are actually doing, it is posible to run in none `headless` mode by setting the `NO_HEADLESS` environment variable:\n\n```\n$ NO_HEADLESS=true ./test-protractor.sh \u003csuite\u003e\n```\n\nTo use a specific binary version of chrome, it is posible to set the `CHROME_BINARY_PATH` environment variable:\n\n```\n$ CHROME_BINARY_PATH=\"/usr/bin/chromium-browser\" ./test-protractor.sh \u003csuite\u003e\n```\n\nTo avoid skipping remaining portion of tests upon encountering the first failure, `NO_FAILFAST` environment variable can be used:\n\n```\n$ NO_FAILFAST=true ./test-protractor.sh \u003csuite\u003e\n```\n\n##### Debugging Protractor Tests\n\n1. `cd frontend; yarn run build`\n2. Add `debugger;` statements to any e2e test\n3. `yarn run debug-protractor-suite --suite \u003csuite-to-debug\u003e`\n4. Chrome browser URL: 'chrome://inspect/#devices', click on the 'inspect' link in **Target (v10...)** section.\n5. Launches chrome-dev tools, click Resume button to continue\n6. Will break on any `debugger;` statements\n7. Pauses browser when not using `--headless` argument!\n\n#### How the Integration Tests Run in CI\n\nThe end-to-end tests run against pull requests using [ci-operator](https://github.com/openshift/ci-operator/).\nThe tests are defined in [this manifest](https://github.com/openshift/release/blob/master/ci-operator/jobs/openshift/console/openshift-console-master-presubmits.yaml)\nin the [openshift/release](https://github.com/openshift/release) repo and were generated with [ci-operator-prowgen](https://github.com/openshift/ci-operator-prowgen).\n\nCI runs the [test-prow-e2e.sh](test-prow-e2e.sh) script, which runs [test-cypress.sh](test-cypress.sh) and ['test-protractor.sh e2e'](test-protractor.sh), which runs the protractor `e2e` test suite.\n\n##### Cypress in CI\n\nThe CI executes [test-cypress.sh](test-cypress.sh) to run all Cypress tests, in all 'packages' (console, olm, and devconsole), in `-- headless` mode via:\n\n`test-cypress.sh -h true`\n\nFor more information on `test-cypress.sh` usage please see [Execute Cypress in different packages](#execute-cypress-in-different-packages)\n\n##### Protractor in CI\n\n['test-protractor.sh e2e'](test-protractor.sh) runs the protractor `e2e` test suite defined in [protractor.conf.ts](frontend/integration-tests/protractor.conf.ts)\nYou can simulate an e2e run against an existing cluster with the following commands (replace `/path/to/install-dir` with your OpenShift install directory):\n\n```\n$ oc apply -f ./frontend/integration-tests/data/htpasswd-secret.yaml\n$ oc patch oauths cluster --patch \"$(cat ./frontend/integration-tests/data/patch-htpasswd.yaml)\" --type=merge\n$ export BRIDGE_BASE_ADDRESS=\"$(oc get consoles.config.openshift.io cluster -o jsonpath='{.status.consoleURL}')\"\n$ export BRIDGE_KUBEADMIN_PASSWORD=$(cat \"/path/to/install-dir/auth/kubeadmin-password\")\n$ ./test-protractor.sh e2e\n```\n\nIf you don't want to run the entire e2e tests, you can use a different suite from [protractor.conf.ts](frontend/integration-tests/protractor.conf.ts). For instance,\n\n```\n$ ./test-protractor.sh \u003csuite\u003e\n```\n\n### Deploying a Custom Image to an OpenShift Cluster\n\nOnce you have made changes locally, these instructions will allow you to push\nchanges to an OpenShift cluster for others to review. This involves building a\nlocal image, pushing the image to an image registry, then updating the\nOpenShift cluster to pull the new image.\n\n#### Prerequisites\n\n1. Docker v17.05 or higher for multi-stage builds\n2. An image registry like [quay.io](https://quay.io/signin/) or [Docker Hub](https://hub.docker.com/)\n\n#### Steps\n\n1. Create a repository in the image registry of your choice to hold the image.\n2. Build Image `docker build -t \u003cyour-image-name\u003e \u003cpath-to-repository | url\u003e`. For example:\n\n```\ndocker build -t quay.io/myaccount/console:latest .\n```\n\n3. Push image to image registry `docker push \u003cyour-image-name\u003e`. Make sure\n   docker is logged into your image registry! For example:\n\n```\ndocker push quay.io/myaccount/console:latest\n```\n\n4. Put the console operator in unmanaged state:\n\n```\noc patch consoles.operator.openshift.io cluster --patch '{ \"spec\": { \"managementState\": \"Unmanaged\" } }' --type=merge\n```\n\n5. Update the console Deployment with the new image:\n\n```\noc set image deploy console console=quay.io/myaccount/console:latest -n openshift-console\n```\n\n6. Wait for the changes to rollout:\n\n```\noc rollout status -w deploy/console -n openshift-console\n```\n\nYou should now be able to see your development changes on the remote OpenShift cluster!\n\nWhen done, you can put the console operator back in a managed state to remove the custom image:\n\n```\noc patch consoles.operator.openshift.io cluster --patch '{ \"spec\": { \"managementState\": \"Managed\" } }' --type=merge\n```\n\n### Dependency Management\n\nDependencies should be pinned to an exact semver, sha, or git tag (eg, no ^).\n\n#### Backend\n\nWhenever making vendor changes:\n\n1. Finish updating dependencies \u0026 writing changes\n2. Commit everything _except_ `vendor/` (eg, `server: add x feature`)\n3. Make a second commit with only `vendor/` (eg, `vendor: revendor`)\n\nAdding new or updating existing backend dependencies:\n\n1.  Edit the `go.mod` file to the desired version (most likely a git hash)\n2.  Run `go mod tidy \u0026\u0026 go mod vendor`\n3.  Verify update was successful. `go.sum` will have been updated to reflect the changes to `go.mod` and the package will have been updated in `vendor`.\n\n#### Frontend\n\nAdd new frontend dependencies:\n\n```\nyarn add \u003cpackage@version\u003e\n```\n\nUpdate existing frontend dependencies:\n\n```\nyarn upgrade \u003cpackage@version\u003e\n```\n\nTo upgrade yarn itself, download a new yarn release from\n\u003chttps://github.com/yarnpkg/yarn/releases\u003e, replace the release in\n`frontend/.yarn/releases` with the new version, and update `yarn-path` in\n`frontend/.yarnrc`.\n\n#### Supported Browsers\n\nWe support the latest versions of the following browsers:\n\n- Edge\n- Chrome\n- Safari\n- Firefox\n\nIE 11 and earlier is not supported.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-developer%2Fapp-services-openshift-console-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredhat-developer%2Fapp-services-openshift-console-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-developer%2Fapp-services-openshift-console-plugin/lists"}