Based on Openshift Console dynamic plugin, this plugin implement the console elements for GitOps.
In one terminal window, run:
yarn install
yarn run start
In another terminal window, run:
oc login
(requires oc and an OpenShift cluster)- Create a route to expose the backend service,
cluster-route.yaml
and runoc apply -f cluster-route.yaml
kind: Route
apiVersion: route.openshift.io/v1
metadata:
name: cluster
namespace: openshift-gitops
spec:
to:
kind: Service
name: cluster
port:
targetPort: 8080
tls:
termination: reencrypt
insecureEdgeTerminationPolicy: Allow
yarn run start-console
(requires Docker or podman 3.2.0+)
This will run the OpenShift console in a container connected to the cluster you've logged into. The plugin HTTP server runs on port 9001 with CORS enabled. Navigate to http://localhost:9000/envdynamic to see the running plugin.
If you are using podman on a Mac with Apple silicon, yarn run start-console
might fail since it runs an amd64 image. You can work around the problem with
qemu-user-static by running
these commands:
podman machine ssh
sudo -i
rpm-ostree install qemu-user-static
systemctl reboot
In plugin directory, run
yarn install
yarn run start
In your local console/
directory
- Sign into a new cluster and run the
oc login
command - Create a route to expose the backend service,
cluster-route.yaml
and runoc apply -f cluster-route.yaml
kind: Route
apiVersion: route.openshift.io/v1
metadata:
name: cluster
namespace: openshift-gitops
spec:
to:
kind: Service
name: cluster
port:
targetPort: 8080
tls:
termination: reencrypt
insecureEdgeTerminationPolicy: Allow
- Set up the environment and run console with
gitops-plugin
source ./contrib/oc-environment.sh
./bin/bridge -plugins gitops-plugin=http://localhost:9001/