agent

command
v0.3.11-rc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

README

NHN-ROR-Agent

K8s agent for NHN-Ror to report from clusters inside Privat Sky.

Prerequisites

  1. Golang 1.20.x or newer GoDev
  2. OCI image builder (docker, podman, etc)

Connect to cluster

  • Locally ror-agent uses the %userprofile%/.kube/config as default to connect to the cluster.
Create test cluster with k3d (https://k3d.io)
k3d cluster create k8s --api-port 65001 -p "10081:80@loadbalancer" --agents 2

Spinning up a cluster in docker-desktop, with a loadbalancer and 2 agents. More info

Get started, and run it

  • Open repo root in your favorite IDE (VS Code, VS, Rider, etc)
  • Open a terminal
  • go to <repo root>/src/clients/ror-agent
  • go get (install dependencies)
  • go build -o agent -> results in a executable file (win: agent.exe, unix: agent)
  • run agent

Debug in Visual Studio Code

  • Open <repo root> as workspace/folder in VS Code
  • Open terminal, go to <repo root>/src/clients/ror-agent, and run go get
  • Go to the debug button on the sidebar in VS Code
  • Start Debug Ror-agent configuration
  • Set your breakpoints in the code

Health endpoint

Go to health endpoint: https://localhost:8090/health to check health

Trigger add/update/delete ingress changes

  • Open terminal
  • Go to <repo root>\testdata
  • Apply test ingress manifest
    • kubectl apply -f avi-ingress-external.yaml

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
The package implements clients for the ror-agent
The package implements clients for the ror-agent
authservice
authservice implements authorization helpers for the agent
authservice implements authorization helpers for the agent
resourceupdatev2
package: resourceupdatev2 Path: cmd/agent/services/resourceupdatev2/resourceupdate.go
package: resourceupdatev2 Path: cmd/agent/services/resourceupdatev2/resourceupdate.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL