ror-agent

module
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: Apache-2.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

Directories

Path Synopsis
cmd
internal
checks/initialchecks
TODO: This internal package is copied from ror, should determine if its common and should be moved to ror/pkg
TODO: This internal package is copied from ror, should determine if its common and should be moved to ror/pkg
clients/clients
The package implements clients for the ror-agent
The package implements clients for the ror-agent
clients/rorapiclient
TODO: This internal package is copied from ror, should determine if its common and should be moved to ror/pkg
TODO: This internal package is copied from ror, should determine if its common and should be moved to ror/pkg
kubernetes/k8smodels
TODO: This internal package is copied from ror, should determine if its common and should be moved to ror/pkg
TODO: This internal package is copied from ror, should determine if its common and should be moved to ror/pkg
kubernetes/nodeservice
TODO: This internal package is copied from ror, should determine if its common and should be moved to ror/pkg
TODO: This internal package is copied from ror, should determine if its common and should be moved to ror/pkg
kubernetes/operator/initialize
TODO: This internal package is copied from ror, should determine if its common and should be moved to ror/pkg
TODO: This internal package is copied from ror, should determine if its common and should be moved to ror/pkg
models/rorResources
THIS FILE IS GENERATED, DO NOT EDIT ref: build/generator/main.go
THIS FILE IS GENERATED, DO NOT EDIT ref: build/generator/main.go
services/authservice
authservice implements authorization helpers for the agent
authservice implements authorization helpers for the agent
services/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