Skip to content

baymesh/hexview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HexView

A simple web service that converts hexadecimal IDs to decimal and redirects to a configured URL.

Features

  • Hex to decimal conversion and redirection
  • Configurable target URL via environment variable
  • Prometheus metrics
  • Kubernetes health check endpoint
  • Minimal container image size

Usage

Environment Variables

Endpoints

  • /{hex_id}: Redirects to TARGET_URL_PREFIX + decimal conversion of hex_id
  • /health: Health check endpoint
  • /metrics: Prometheus metrics

Local Development

# Build the container
podman build -t hexview .

# Run the container
podman run -p 8000:8000 hexview

Kubernetes Deployment

The deployment uses images from GitHub Container Registry (ghcr.io), which requires authentication.

GitHub Container Registry Authentication

Production Setup

For production use, create a proper secret with your actual GitHub credentials:

kubectl create secret docker-registry ghcr-secret \
  --docker-server=ghcr.io \
  --docker-username=YOUR_GITHUB_USERNAME \
  --docker-password=YOUR_GITHUB_PAT \
  --docker-email=YOUR_EMAIL

You'll need a GitHub Personal Access Token (PAT) with the appropriate permissions:

  • For public repositories: read:packages scope
  • For private repositories: read:packages and repo scopes

Example Secret

For reference, an example secret is provided in kubernetes/ghcr-secret.yaml, but it should NOT be used in production as it contains placeholder values.

Deployment Order

Apply the Kubernetes resources in this order:

# 1. Apply the GitHub Container Registry secret
kubectl apply -f kubernetes/ghcr-secret.yaml

# 2. Apply deployment, service, and ingress
kubectl apply -f kubernetes/deployment.yaml
kubectl apply -f kubernetes/service.yaml
kubectl apply -f kubernetes/ingress.yaml

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published