Skip to content

Instantly share code, notes, and snippets.


Jonathan Keam jkeam

View GitHub Profile
jkeam /
Created Sep 23, 2021
Deploying OpenShift with Internal Registry

Deploying OpenShift App From Internal Registry

This describes the steps on how to push an image to your local OpenShift cluster; specifically the internal registry; and then deploy that.


  1. You are logged into the cluster
  2. You have the image to push to the cluster on your local computer
docker pull
jkeam /
Created Aug 25, 2021
Creating a basic pipeline in OpenShift 4.7 using OpenShift Pipelines 1.4
oc new-project pipelines-tutorial
oc create -f
oc create -f
oc create -f
tkn pipeline start build-and-deploy \
-w name=shared-workspace,volumeClaimTemplateFile= \
-p deployment-name=pipelines-vote-api \
-p git-url= \
jkeam / tekton-workspace-pvc.yaml
Last active Aug 25, 2021
Tekton Workspace PVC
View tekton-workspace-pvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
name: source-pvc
- ReadWriteOnce
storage: 2G
jkeam / test_write.js
Last active Aug 16, 2021
Test write only
View test_write.js
(function(program, execJS) { execJS(program) })(function(global, process, module, exports, require, console, setTimeout, setInterval, clearTimeout, clearInterval, setImmediate, clearImmediate) { (function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["sourceMap"] = factory();
root["sourceMap"] = factory();
})(this, function() {
jkeam / crw_devfile.yaml
Last active Jul 13, 2021
CodeReady Workspaces Devfile
View crw_devfile.yaml
apiVersion: 1.0.0
name: spring-petclinic
- name: spring-petclinic
location: ''
startPoint: master
type: git
jkeam /
Created Jun 22, 2021
OpenShift group and role binding.

OpenShift Roles

This document details how to give a set of users access to a specific set of namespaces within OpenShift. These namespaces are any that do not include the word openshift in it. The approach we are going to take is to create a Group that has admin access to the namespaces just described. Then we can add whatever user we want to this group.

There are a few basic groups that come pre-created when you install OpenShift. For this, we'll use the local admin (local means specific to a namespace and not cluster wide). From the docs for admin: A project manager. If used in a local binding, an admin has rights to view any resource in the project and modify any resource in the project except for quota. Docs

For the following instructions below, we will be assuming that the user jon exists and wants access to the group named superteam. This group will have admin

jkeam /
Last active May 12, 2021
OpenShift ACM and OpenShift GitOps

OpenShift ACM and OpenShift GitOps


  1. Install GitOps via Operator on hub cluster
  2. Install ACM via Operator on hub cluster
  3. Attach/Create cluster to manage, say we name the cluster dev
  4. Sign into your hub cluster using the oc cli
  5. Turn on integration
jkeam /
Last active May 12, 2021
OpenShift GitOps with SpringBoot Petclinic App

OpenShift GitOps

Steps to install GitOps in OpenShift with SpringBoot Petclinic application.


  1. OpenShift 4.7
  2. oc logged in as cluster-admin


jkeam /
Last active Apr 30, 2021
Compliance Operator Script

Compliance Operator Demo Script


  1. Use right project
oc project openshift-compliance
  1. See all profiles
cat ~/.kube/config | yq e '.clusters.[].name' - | while read -r line; do oc config unset contexts.$line; done
cat ~/.kube/config | yq e '.contexts.[].name' - | while read -r line; do oc config unset contexts.$line; done
cat ~/.kube/config | yq e '.users.[].name' - | while read -r line; do oc config unset contexts.$line; done
echo 'done'