Simple App for Kubernetes / OpenShift / OKD to test several things
  • Python 60.5%
  • Go Template 34.2%
  • Shell 5.3%
Find a file
2024-04-16 13:56:58 +02:00
helm add kustomize helm 2023-01-05 11:06:28 +01:00
kustomize add no cookies to ingress 2024-04-16 10:02:09 +02:00
.gitignore add ignorelist 2024-04-16 13:56:58 +02:00
docker-entrypoint.sh use apt-get and small patch for entrypoint 2022-06-24 08:28:54 +02:00
Dockerfile.pingpong sync to work 2022-06-16 20:16:32 +02:00
Dockerfile.pingsaml fix new bugs ;-) 2022-06-24 08:34:09 +02:00
flask.tar.gz Initial 2021-05-26 10:06:22 +02:00
LICENSE Initial 2021-05-26 10:06:22 +02:00
pingpong.py add host to output 2022-12-11 12:34:31 +01:00
pingsaml.py Merge branch 'flask-saml2-fork' 2022-06-23 17:05:36 +02:00
Readme.md helm example added! 2022-12-11 19:10:36 +01:00

The PingPong Test Application

This is an application to see the following features in an OKD / OpenShift Cluster:

  • automatic docker build from an external repo (this!)
  • deployment with kustomize (runs also in ArgoCD)
  • horizontal scaled applications with dynamic load distribution (try reload in your browser, ...)

This app can act as template for your own first OKD / OpenShift playground.

build

oc login -u myuser api.myfamouscluster.net:6443
oc project myproject
oc apply -k kustomize/build/
oc start-build pingpong-app --follow
oc start-build pingsaml-app --follow

run

oc apply -k ./kustomize/pingpong-template  

or use ArgoCD ;-)

use helm

Go in directory helm.

  • Create helm package: helm package pingpong

  • Make an index: helm repo index . --merge index.yaml

  • Install (after editing helm/values.yaml):

    cd helm
    helm install myfamous-release pingpong --values values.yaml
    

SAML example config

For the second SAML example (pingsaml) you have to config your variables in ./kustomize/pingsaml-template:

  • import keycloak-import.json in your KeyCloak instance as starting point
  • setting your variables in kustomization.yaml to the correct values
  • convert the client-certificate and the realm cert from KeyCloak:
    • in KeyCloak: Clients -> https://YourClient -> Keys -> Export -> PKCS12 -> Download (you have to set to temp passwords)
    • import this PKCS#12 file and generate the 3 PEM files: clientcert.pem, clientkey.pem and idpcert.pem
    • I'm using XCA (https://hohnstaedt.de/xca/) for this, it's absolutely great!
  • deploy your app with oc apply -k ./kustomize/pingsaml-template
  • it should work now ;-)

peter pflaeging peter@pflaeging.net