Sign inSign up

manojparamsetti/prism-go

By manojparamsetti

•Updated about 2 months ago

Kubernetes HTTP request broadcaster that securely routes requests to healthy, selected pods.

Image
Networking
Integration & delivery
0

152

manojparamsetti/prism-go repository overview

⁠Prism-Go

Prism-Go broadcasts authenticated HTTP requests to healthy Kubernetes pods selected by a BroadCaster custom resource.

It validates each request against the resource’s allowed paths and methods, then sends it only to matching, ready pods in the same namespace. Prism-Go uses Kubernetes RBAC to watch resources and manage their token Secrets.

⁠Install with Helm
git clone https://github.com/Manoj-Paramsetti/PrismGo.git
cd PrismGo
helm upgrade --install prism ./helm/prism \
  --namespace prism \
  --create-namespace

The chart uses docker.io/manojparamsetti/prism-go:1.0.0 by default. It also supports linux/amd64 and linux/arm64.

⁠Configure a BroadCaster
apiVersion: prism.app/v1
kind: BroadCaster
metadata:
  name: example
  namespace: default
spec:
  allowedPaths:
    - /api/.*
  podSelectors:
    - app=example
  methods:
    - GET
    - POST
  service:
    port: 80
    appProtocol: http
  timeout: 10

Apply it with kubectl apply -f broadcaster.yaml. The selected pods must be in the same namespace as the BroadCaster.

⁠Send a request

Retrieve the generated token:

TOKEN=$(kubectl get secret example-prism-token -n default \
  -o jsonpath='{.data.token}' | base64 --decode)

Forward the Prism service locally:

kubectl port-forward -n prism service/prism 8080:8080

Send a request with the resource identity and token:

curl -i http://localhost:8080/api/items \
  -H 'X-Prismgo-Namespace: default' \
  -H 'X-Prismgo-Name: example' \
  -H "X-Prismgo-Token: ${TOKEN}"

See the project README⁠ and CRD guide⁠ for details.

To publish this on Docker Hub, open the repository’s Overview tab, choose Edit, paste the Markdown, and save. Docker Hub documents this process here⁠.

Tag summary

Content type

Image

Digest

sha256:054b086ce…

Size

24.2 MB

Last updated

about 2 months ago

docker pull manojparamsetti/prism-go