/miporin

miporin - みぽりん, the tank commander of ikukantai fleet

Primary LanguageGoApache License 2.0Apache-2.0

Miporin - みぽりん

release LICENSE CloudNet2024

Kubernetes Linux Knative Go Prometheus

miporin-chan is the extra-controller of ikukantai Fleet, working alongside and independently of Knative's controller.

1. Motivation

To achieve the goals posed by the ikukantai Fleet, in addition to modifying Knative's source code, we needed a component acts as a controller that exploits the refined code inside Knative. In theory, we can develop additional logic in Knative's controller component. However, that will be more difficult than developing an extra external component for PoC purposes in the Laboratory (yaa, we work in the Laboratory, not Industry).

The name miporin is inspired by the character Nishizumi Miho from the anime Girls und Panzer. Miho is the tank commander, implying miporin's leadership role in the ikukantai fleet (remember that Ooarai High School is located in an aircraft carrier, and, ikukantai is implied to be that ship). miporin is nickname given to Miho by her friends.

2. System Design

3. Installation

3.1. Requirement

  • ikukantai Fleet is deployed, version >= 2.0
  • ko build is installed, version 0.16.0
  • Go is installed, version >= 1.22.4
  • Docker is installed. docker command can be invoked without sudo

3.2. Installation

miporin is deployed in namespace knative-serving

kubectl apply -f config/miporin.yaml

3.3. Development

Firstly, modify image used by deployment/miporin in namespace knative-serving by image named docker.io/bonavadeur/miporin:dev. A new Pod miporin will be raised up due to the previous changes, and this Pod will be failed. Next, build your own image for development environment:

$ kubectl -n knative-serving patch deploy miporin --patch '{"spec":{"template":{"spec":{"containers":[{"name":"miporin","image":"docker.io/bonavadeur/miporin:dev"}]}}}}'
$ chmod +x ./build.sh
$ ./build.sh ful

Change Endpoint IP address to IP of your machine for running miporin by binary:

# file ./config/localdev.yaml
apiVersion: discovery.k8s.io/v1
kind: EndpointSlice
metadata:
  name: miporin-localdev
  namespace: knative-serving
...
endpoints:
  - addresses:
    - "192.168.122.100" # change this to be your IP, example: 192.168.189.22

Some util commands

# grant execute permission to build.sh file
chmod +x ./build.sh
# run code directly by binary
./build.sh local
# run miporin as a container
./build.sh ful
# push miporin image to docker registry
./build.sh push <tag>

4. Author

Đào Hiệp - Bonavadeur - ボナちゃん
The Future Internet Laboratory, Room E711 C7 Building, Hanoi University of Science and Technology, Vietnam.
未来のインターネット研究室, C7 の E 711、ハノイ百科大学、ベトナム。