Skip to content

yuva19102003/podman-openshift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ OpenShift Go Monolith - Complete Lab Project

A production-ready monolithic Go application demonstrating OpenShift deployment with ConfigMaps, Secrets, Persistent Volumes, and Tekton CI/CD pipelines.

OpenShift Go Kubernetes Podman

πŸ“‹ Table of Contents

🎯 Overview

This project demonstrates a complete OpenShift deployment workflow for a Go-based monolithic application. It showcases:

  • Container-native development with Podman/Docker
  • OpenShift best practices for configuration management
  • Persistent storage for application data
  • Health checks and readiness probes
  • Tekton CI/CD integration
  • Security with non-root containers and secrets management

The application provides a web dashboard for monitoring system stats, writing data to persistent volumes, and demonstrating OpenShift's configuration injection capabilities.

✨ Features

Application Features

  • 🎨 Modern Web Dashboard - Interactive UI with real-time statistics
  • πŸ“Š Application Info API - Environment and configuration details
  • πŸ’Ύ Volume Write Operations - Persistent data storage demonstration
  • ❀️ Health Checks - Liveness and readiness probes
  • πŸ“ˆ Statistics API - Runtime metrics (uptime, requests, memory)
  • πŸ”’ Security - Non-root container execution (UID 1001)

OpenShift Integration

  • βš™οΈ ConfigMaps - Environment variables and configuration files
  • πŸ” Secrets - Sensitive data management
  • πŸ’Ώ Persistent Volumes - Data persistence across pod restarts
  • 🌐 Routes - External HTTPS access with TLS termination
  • πŸ”„ Tekton Pipelines - Automated CI/CD workflows
  • πŸ“¦ Multi-stage Builds - Optimized container images

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     OpenShift Cluster                        β”‚
β”‚                                                              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚              Namespace: romanyuvan-dev              β”‚    β”‚
β”‚  β”‚                                                      β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚    β”‚
β”‚  β”‚  β”‚            Route (TLS Edge)                   β”‚  β”‚    β”‚
β”‚  β”‚  β”‚  podman-openshift.apps.cluster.example.com   β”‚  β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚    β”‚
β”‚  β”‚                     β”‚                               β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚    β”‚
β”‚  β”‚  β”‚         Service: podman-openshift            β”‚  β”‚    β”‚
β”‚  β”‚  β”‚              Port: 80 β†’ 8080                 β”‚  β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚    β”‚
β”‚  β”‚                     β”‚                               β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚    β”‚
β”‚  β”‚  β”‚      Deployment: podman-openshift            β”‚  β”‚    β”‚
β”‚  β”‚  β”‚                                               β”‚  β”‚    β”‚
β”‚  β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚  β”‚    β”‚
β”‚  β”‚  β”‚  β”‚         Pod (UID 1001)               β”‚    β”‚  β”‚    β”‚
β”‚  β”‚  β”‚  β”‚                                       β”‚    β”‚  β”‚    β”‚
β”‚  β”‚  β”‚  β”‚  Container: podman-openshift         β”‚    β”‚  β”‚    β”‚
β”‚  β”‚  β”‚  β”‚  Image: image-registry:5000/...      β”‚    β”‚  β”‚    β”‚
β”‚  β”‚  β”‚  β”‚  Port: 8080                          β”‚    β”‚  β”‚    β”‚
β”‚  β”‚  β”‚  β”‚                                       β”‚    β”‚  β”‚    β”‚
β”‚  β”‚  β”‚  β”‚  Volume Mounts:                      β”‚    β”‚  β”‚    β”‚
β”‚  β”‚  β”‚  β”‚  β€’ /app/data ← PVC (app-storage)     β”‚    β”‚  β”‚    β”‚
β”‚  β”‚  β”‚  β”‚  β€’ /app/config.json ← ConfigMap      β”‚    β”‚  β”‚    β”‚
β”‚  β”‚  β”‚  β”‚  β€’ /app/.env ← ConfigMap             β”‚    β”‚  β”‚    β”‚
β”‚  β”‚  β”‚  β”‚                                       β”‚    β”‚  β”‚    β”‚
β”‚  β”‚  β”‚  β”‚  Environment:                         β”‚    β”‚  β”‚    β”‚
β”‚  β”‚  β”‚  β”‚  β€’ APP_NAME ← ConfigMap              β”‚    β”‚  β”‚    β”‚
β”‚  β”‚  β”‚  β”‚  β€’ APP_ENV ← ConfigMap               β”‚    β”‚  β”‚    β”‚
β”‚  β”‚  β”‚  β”‚  β€’ DB_USER ← Secret                  β”‚    β”‚  β”‚    β”‚
β”‚  β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚  β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚    β”‚
β”‚  β”‚                                                      β”‚    β”‚
β”‚  β”‚  Configuration Resources:                           β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚    β”‚
β”‚  β”‚  β”‚ ConfigMap: go-monolith-config              β”‚    β”‚    β”‚
β”‚  β”‚  β”‚ ConfigMap: go-monolith-env-file            β”‚    β”‚    β”‚
β”‚  β”‚  β”‚ ConfigMap: go-monolith-json-config         β”‚    β”‚    β”‚
β”‚  β”‚  β”‚ Secret: go-monolith-secrets                β”‚    β”‚    β”‚
β”‚  β”‚  β”‚ PVC: app-storage (1Gi)                     β”‚    β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                                                              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚         Tekton Pipeline (CI/CD)                     β”‚    β”‚
β”‚  β”‚  β€’ Git Clone β†’ Build β†’ Push β†’ Deploy               β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“¦ Prerequisites

Local Development

  • Go 1.23+
  • Podman or Docker
  • Git

OpenShift Deployment

  • OpenShift 4.x cluster access
  • oc CLI tool installed and configured
  • Namespace/project created (e.g., romanyuvan-dev)
  • Registry access for pushing images

Optional

  • Tekton Pipelines Operator installed
  • Tekton CLI (tkn) for pipeline management

πŸ“ Project Structure

podman-openshift/
β”œβ”€β”€ .tekton/
β”‚   └── push.yaml                    # Tekton pipeline configuration
β”œβ”€β”€ openshift-config/
β”‚   β”œβ”€β”€ configmap.yaml               # Environment variables
β”‚   β”œβ”€β”€ configmap-env.yaml           # .env file as ConfigMap
β”‚   β”œβ”€β”€ configmap-json.yaml          # config.json as ConfigMap
β”‚   β”œβ”€β”€ secret.yaml                  # Sensitive data
β”‚   β”œβ”€β”€ pvc.yaml                     # Persistent Volume Claim
β”‚   β”œβ”€β”€ deployment.yaml              # Application deployment
β”‚   β”œβ”€β”€ service.yaml                 # Kubernetes service
β”‚   β”œβ”€β”€ route.yaml                   # OpenShift route
β”‚   └── README.md                    # Deployment documentation
β”œβ”€β”€ openshift-go-monolith/
β”‚   β”œβ”€β”€ main.go                      # Go application code
β”‚   β”œβ”€β”€ Containerfile                # Multi-stage container build
β”‚   β”œβ”€β”€ go.mod                       # Go dependencies
β”‚   β”œβ”€β”€ go.sum                       # Dependency checksums
β”‚   β”œβ”€β”€ .env                         # Local environment variables
β”‚   β”œβ”€β”€ config.json                  # Local configuration
β”‚   β”œβ”€β”€ DEPLOYMENT.md                # Detailed deployment guide
β”‚   β”œβ”€β”€ static/
β”‚   β”‚   └── index.html               # Web dashboard UI
β”‚   └── data/
β”‚       └── log/                     # Persistent data directory
β”œβ”€β”€ screenshots/                     # Project screenshots
└── README.md                        # This file

πŸš€ Quick Start

1. Clone the Repository

git clone <repository-url>
cd podman-openshift

2. Local Development

cd openshift-go-monolith

# Install dependencies
go mod download

# Run locally
go run main.go

# Access the dashboard
# Open browser: http://localhost:8080

3. Build Container Image

# Using Podman
podman build -t podman-openshift:latest -f Containerfile .

# Using Docker
docker build -t podman-openshift:latest -f Containerfile .

4. Run Container Locally

# Using Podman
podman run -p 8080:8080 \
  -v $(pwd)/data:/app/data \
  -e APP_NAME="Local Dev" \
  -e APP_ENV="development" \
  podman-openshift:latest

# Using Docker
docker run -p 8080:8080 \
  -v $(pwd)/data:/app/data \
  -e APP_NAME="Local Dev" \
  -e APP_ENV="development" \
  podman-openshift:latest

πŸ’» Local Development

Running the Application

cd openshift-go-monolith

# Set environment variables (optional)
export APP_NAME="My Local App"
export APP_ENV="development"
export DB_USER="local_user"

# Run the application
go run main.go

Testing Endpoints

# Health check
curl http://localhost:8080/health

# Application info
curl http://localhost:8080/api/info

# Statistics
curl http://localhost:8080/api/stats

# Write data to volume
curl -X POST http://localhost:8080/api/write

Development Features

  • Hot reload: Use air or similar tools for auto-restart
  • Logging: Detailed logs with timestamps and log levels
  • Data persistence: Logs stored in data/log/ directory

☁️ OpenShift Deployment

Step 1: Login to OpenShift

oc login --server=https://api.cluster.example.com:6443
oc project romanyuvan-dev

Step 2: Build and Push Image

cd openshift-go-monolith

# Build the image
podman build -t podman-openshift:latest -f Containerfile .

# Tag for OpenShift internal registry
podman tag podman-openshift:latest \
  image-registry.openshift-image-registry.svc:5000/romanyuvan-dev/podman-openshift:latest

# Login to OpenShift registry
podman login -u $(oc whoami) -p $(oc whoami -t) \
  default-route-openshift-image-registry.apps.cluster.example.com

# Push to registry
podman push image-registry.openshift-image-registry.svc:5000/romanyuvan-dev/podman-openshift:latest

Step 3: Deploy Configuration Resources

cd ../openshift-config

# Create ConfigMaps and Secrets
oc apply -f secret.yaml
oc apply -f configmap.yaml
oc apply -f configmap-env.yaml
oc apply -f configmap-json.yaml

# Create Persistent Volume Claim
oc apply -f pvc.yaml

Step 4: Deploy Application

# Deploy the application
oc apply -f deployment.yaml
oc apply -f service.yaml
oc apply -f route.yaml

# Wait for deployment
oc rollout status deployment/podman-openshift

Step 5: Access the Application

# Get the route URL
oc get route podman-openshift -o jsonpath='{.spec.host}'

# Access in browser
echo "https://$(oc get route podman-openshift -o jsonpath='{.spec.host}')"

Deployment Success Successfully deployed application in OpenShift

Quick Deploy (All Resources)

cd openshift-config
oc apply -f .

πŸ”„ CI/CD Pipeline

Tekton Pipeline Setup

The project includes a Tekton pipeline configuration for automated builds and deployments.

Tekton Pipeline Tekton CI/CD pipeline configuration

Pipeline Features

  • Triggered on push to master branch
  • Git repository cloning
  • Automated build and test
  • Keeps last 5 pipeline runs

Pipeline Configuration

# .tekton/push.yaml
- Trigger: Push to master branch
- Tasks:
  1. fetch-repository: Clone Git repository
  2. noop-task: Placeholder for build/test tasks

View Pipeline Runs

# List pipeline runs
tkn pipelinerun list

# View logs
tkn pipelinerun logs -f <pipelinerun-name>

# Describe pipeline run
oc describe pipelinerun <pipelinerun-name>

Pipeline Run Details Pipeline execution with task details

Build Logs Build and deployment logs from pipeline

Customize Pipeline

Edit .tekton/push.yaml to add:

  • Build tasks
  • Test execution
  • Image building and pushing
  • Deployment automation

πŸ”Œ API Endpoints

Web Dashboard Interactive web dashboard with real-time monitoring

GET /

Web dashboard interface

Response: HTML page with interactive controls

GET /api/info

Application information and configuration

Response:

{
  "app_name": "OpenShift Go Monolith",
  "environment": "production",
  "db_user": "app_user",
  "version": "1.1.0",
  "hostname": "podman-openshift-xxx-yyy",
  "timestamp": "2026-03-05T10:30:00Z"
}

App Info API Application information endpoint response

POST /api/write

Write data to persistent volume

Response:

βœ“ Data written to volume successfully

πŸ“ File: 20260305-103000-log.txt
πŸ”’ Operation: #1
⏰ Timestamp: 2026-03-05T10:30:00Z
πŸ“ Size: 1234 bytes

πŸ“‚ Log directory: ./data/log

Write Operation Successful write operation to persistent volume

GET /api/stats

Application runtime statistics

Response:

{
  "uptime": "2h30m15s",
  "total_requests": 142,
  "write_operations": 5,
  "go_version": "go1.23",
  "goroutines": 8,
  "memory_alloc_mb": 12,
  "server_time": "2026-03-05T10:30:00Z"
}

Statistics API Runtime statistics and performance metrics

GET /health

Health check endpoint for probes

Response: OK (200 status)

Health Check Health check endpoint validation

βš™οΈ Configuration Management

ConfigMap Configuration ConfigMaps managing application configuration

Environment Variables (ConfigMap)

# configmap.yaml
APP_NAME: "OpenShift Go Monolith"
APP_ENV: "production"

Secrets

# secret.yaml
DB_USER: "app_user"  # Base64 encoded in actual secret

Secrets Management Secure secrets management in OpenShift

Configuration Files

.env File (ConfigMap)

APP_NAME=OpenShift Go Monolith
APP_ENV=production
DB_USER=app_user

config.json (ConfigMap)

{
  "application": {
    "name": "OpenShift Go Monolith",
    "environment": "production"
  },
  "database": {
    "user": "app_user"
  }
}

Volume Mounts

  • /app/data - Persistent Volume (1Gi)
  • /app/config.json - ConfigMap mount
  • /app/.env - ConfigMap mount

Volume Mounts Volume mounts in the running container

PVC Storage Persistent Volume Claim for data storage

πŸ“Š Monitoring & Troubleshooting

Monitoring Dashboard Application monitoring and metrics dashboard

View Logs

# Stream logs
oc logs -f deployment/podman-openshift

# View last 100 lines
oc logs deployment/podman-openshift --tail=100

# View logs from specific pod
oc logs <pod-name>

Pod Logs Application logs from running pod

Check Pod Status

# Get pods
oc get pods -l app=podman-openshift

# Describe pod
oc describe pod <pod-name>

# Get events
oc get events --sort-by='.lastTimestamp'

Pod Details Detailed pod information and status

Debug Container

# Execute shell in container
oc exec -it deployment/podman-openshift -- /bin/sh

# Check mounted files
oc exec deployment/podman-openshift -- ls -la /app
oc exec deployment/podman-openshift -- cat /app/config.json
oc exec deployment/podman-openshift -- cat /app/.env

# Check data directory
oc exec deployment/podman-openshift -- ls -la /app/data/log

# Check environment variables
oc exec deployment/podman-openshift -- env | grep APP

Health Checks

# Test health endpoint
oc exec deployment/podman-openshift -- wget -O- http://localhost:8080/health

# Check readiness
oc get pods -l app=podman-openshift -o jsonpath='{.items[0].status.conditions[?(@.type=="Ready")].status}'

Resource Usage

# Get resource usage
oc adm top pods -l app=podman-openshift

# Describe deployment
oc describe deployment podman-openshift

Resource Usage CPU and memory resource consumption

Common Issues

Pod Not Starting

# Check events
oc describe pod <pod-name>

# Check image pull
oc get events | grep -i pull

# Verify image exists
oc get imagestream

Volume Mount Issues

# Check PVC status
oc get pvc app-storage

# Check volume mounts
oc describe pod <pod-name> | grep -A 10 "Mounts:"

Configuration Not Loading

# Verify ConfigMaps exist
oc get configmap | grep go-monolith

# Check ConfigMap content
oc get configmap go-monolith-config -o yaml

# Verify Secret exists
oc get secret go-monolith-secrets

Environment Variables Environment variables loaded in the container

Restart Deployment

# Rollout restart
oc rollout restart deployment/podman-openshift

# Scale down and up
oc scale deployment/podman-openshift --replicas=0
oc scale deployment/podman-openshift --replicas=1

πŸ–ΌοΈ Screenshots

Application Dashboard

Application Dashboard Interactive web dashboard with real-time monitoring

Application Details Application information and configuration details

OpenShift Resources

Deployments

Deployment Deployment configuration and status

Deployment Details Detailed deployment information and image registry

Pods

Pods Running pods and container status

Pod Details Detailed pod information and logs

ConfigMaps

ConfigMaps ConfigMaps for application configuration

ConfigMap Details ConfigMap content and environment variables

Secrets

Secrets Secrets management for sensitive data

Persistent Volume Claims

PVC Persistent Volume Claim for data storage

Services

Service Kubernetes Service configuration

Routes

Routes OpenShift Route for external access

Tekton CI/CD Pipeline

Pipeline Runs

Pipeline Runs List of Tekton pipeline runs

Pipeline Run Details Detailed pipeline execution information

Pipeline Logs

Pipeline Logs Pipeline execution logs

Pipeline Logs Details Detailed build and deployment logs

Pipeline Metrics

Pipeline Metrics Pipeline performance metrics and monitoring

Pipeline Details Pipeline configuration and task details

Terminal Outputs

All Resources Output

Terminal All Output Complete terminal output showing all resources

Terminal All Output 2 Additional terminal output with statistics

Pods Output

Terminal Pods Output Terminal output for pod operations

Terminal Pods Output 2 Detailed pod status and resource usage

PVC Output

Terminal PVC Output Terminal output for PVC operations and volume mounts

Service Output

Terminal Service Output Terminal output for service operations

πŸ”’ Security Considerations

  • βœ… Non-root container (UID 1001)
  • βœ… Arbitrary UID support for OpenShift
  • βœ… Secrets for sensitive data
  • βœ… TLS termination at route level
  • βœ… Resource limits configured
  • βœ… Health checks for reliability
  • βœ… Read-only ConfigMap mounts
  • βœ… Minimal base image (Alpine)

πŸ› οΈ Customization

Update Application Configuration

# Edit ConfigMap
oc edit configmap go-monolith-config

# Restart to apply changes
oc rollout restart deployment/podman-openshift

Scale Application

# Scale to 3 replicas
oc scale deployment/podman-openshift --replicas=3

# Autoscaling
oc autoscale deployment/podman-openshift --min=2 --max=5 --cpu-percent=80

Update Image

# Build new version
podman build -t podman-openshift:v2 -f Containerfile .

# Push to registry
podman push image-registry.openshift-image-registry.svc:5000/romanyuvan-dev/podman-openshift:v2

# Update deployment
oc set image deployment/podman-openshift podman-openshift=image-registry.openshift-image-registry.svc:5000/romanyuvan-dev/podman-openshift:v2

Image Registry OpenShift internal container image registry

🧹 Cleanup

Remove All Resources

cd openshift-config

# Delete all resources
oc delete -f .

# Or individually
oc delete route podman-openshift
oc delete service podman-openshift
oc delete deployment podman-openshift
oc delete pvc app-storage
oc delete configmap go-monolith-config go-monolith-env-file go-monolith-json-config
oc delete secret go-monolith-secrets

Delete Project

oc delete project romanyuvan-dev

πŸ“š Additional Resources

🀝 Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

πŸ“„ License

This project is provided as-is for educational and demonstration purposes.

πŸ‘€ Author

Created for OpenShift lab demonstrations and learning purposes.


Version: 1.1.0
Last Updated: March 2026
Status: Production Ready βœ…

About

Production-ready Go application demonstrating OpenShift deployment with ConfigMaps, Secrets, Persistent Volumes, and Tekton CI/CD. Features interactive web dashboard with RESTful APIs for monitoring and data operations. Includes Kubernetes manifests, multi-stage container builds, and complete deployment documentation with 24 screenshots.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors