mr-chelyshkin / jb-service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jb-service

Requirements

Commands

task -l # List of available commands with description

Run environment

task minikube/up # run minikube and install all

all-pod

When environment up

Run service:

task minikube/service/app-lookup

# main page is swagger with routes and routes description.

service-main

Run grafana:

task minikube/infra/grafana-lookup

# run grafana in 127.0.0.1:3000, print credentials
# grafana has predefined Dashboard -> General -> kube-state
# grafana has predefined Dashboard -> General -> JB-Service

grafana grafana grafana

Run prometheus:

minikube/infra/prometheus-lookup

prometheus

Run Kibana:

task minikube/infra/kibana-lookup

# run kibana in 127.0.0.1:5601
# in kibana UI should create index pattern for data "service-logs*"
# after, go to "discover" for watch logs

kibana

Check rateLimit (5rps)

I use http_bench.

http_bench http://127.0.0.1:{port} -c 5 -d 30s

rate-limit

JB-Service

This is a simple GoLang service that allows you to manipulate (on a basic level) its state. For instance, there are handles that toggle K8S probes (ok/not ok). The API is described in Swagger, and after the service is launched, the page opens automatically.

FAQ

JB-service image chelyshkin/jb-service was built on arm64 and pushed to dockerHub.
Perhaps it can be problem with amd64.

For resolve issue:

task app/docker/build

# build JB-service image
# this Dockerfile can be build image as amd64/arm64

In ./k8s/service/values.yaml:

image:
  repository: {{ local_image }}
  pullPolicy: Never
  tag: {{ image_tag }}

About


Languages

Language:Python 38.2%Language:Smarty 28.9%Language:Go 14.3%Language:Mustache 12.4%Language:Makefile 4.5%Language:Shell 1.2%Language:Dockerfile 0.6%