### GET /q/health/ready Source: https://github.com/opendatahub-io/architecture-context/blob/main/architecture/rhoai-3.4/trustyai-explainability.md Readiness probe endpoint. ```APIDOC ## GET /q/health/ready ### Description Readiness probe endpoint. ### Method GET ### Endpoint /q/health/ready ### Parameters None ### Response #### Success Response (200) - **status** (string) - Health status (e.g., UP). #### Response Example ```json { "status": "UP" } ``` ``` -------------------------------- ### GET /readyz Source: https://github.com/opendatahub-io/architecture-context/blob/main/architecture/rhoai-3.4/feast.md Readiness probe for the Feast Operator manager. ```APIDOC ## GET /readyz ### Description Returns the readiness status of the Feast Operator manager. ### Method GET ### Endpoint /readyz ### Response #### Success Response (200) - **status** (string) - "ok" #### Response Example { "status": "ok" } ``` -------------------------------- ### GET /info/inference/ids/{model} Source: https://github.com/opendatahub-io/architecture-context/blob/main/architecture/rhoai-3.4/trustyai-explainability.md Get inference IDs for a specific model. ```APIDOC ## GET /info/inference/ids/{model} ### Description Get inference IDs for a specific model. ### Method GET ### Endpoint /info/inference/ids/{model} ### Parameters #### Path Parameters - **model** (string) - Required - The name of the model. #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **inference_ids** (array) - A list of inference IDs for the specified model. #### Response Example ```json { "inference_ids": ["id1", "id2"] } ``` ``` -------------------------------- ### API Server Main Application Logic (Go) Source: https://github.com/opendatahub-io/architecture-context/blob/main/architecture/rhoai-3.4/batch-gateway.md The main.go file for the API server initializes the application, sets up configuration, and starts the HTTP server. It serves as the entry point for the API server component. ```go package main import ( "context" "flag" "os" "os/signal" "syscall" "github.com/go-logr/logr" "github.com/opendatahub-io/architecture-context/internal/apiserver/config" "github.com/opendatahub-io/architecture-context/internal/apiserver/server" "github.com/opendatahub-io/architecture-context/internal/util/tls" ) var ( configPath = flag.String("config", "/etc/config/config.yaml", "Path to configuration file.") ) func main() { log := logr.Discard() cfg, err := config.LoadConfig(*configPath) if err != nil { log.Error(err, "Failed to load configuration") os.Exit(1) } ctx, cancel := context.WithCancel(context.Background()) defer cancel() // Setup signal catching sgo := make(chan os.Signal, 1) s// SIGINT (Ctrl+C) and SIGTERM (kill) ssignal.Notify(sgo, syscall.SIGINT, syscall.SIGTERM) // Initialize TLS if enabled tlsConfig, err := tls.LoadTLSConfig(cfg.TLS) if err != nil { log.Error(err, "Failed to load TLS configuration") os.Exit(1) } // Initialize the API server apiServer, err := server.NewServer(ctx, log, cfg, tslConfig) if err != nil { log.Error(err, "Failed to create API server") os.Exit(1) } // Start the API server in a goroutine go func() { log.Info("Starting API server on port ", cfg.Server.Port) if err := apiServer.ListenAndServe(); err != nil { log.Error(err, "API server failed") cancel() } }() // Wait for termination signal s<-sgo log.Info("Shutting down API server...") apiServer.Shutdown(ctx) } ``` -------------------------------- ### EPP Entry Point (cmd/epp/main.go) Source: https://github.com/opendatahub-io/architecture-context/blob/main/architecture/rhoai-3.4/llm-d-inference-scheduler.md The main entry point for the EPP (presumably an inference engine or processing component). It initializes and starts the EPP service. ```go package main import ( "context" "log" "os" "github.com/opendatahub-io/architecture-context/pkg/common" "github.com/opendatahub-io/architecture-context/pkg/epp" ) func main() { ctx := context.Background() // Initialize EPP service eppService, err := epp.NewEPPService(ctx) if err != nil { log.Fatalf("failed to create EPP service: %v", err) } // Start EPP service if err := eppService.Run(ctx); err != nil { log.Fatalf("EPP service failed: %v", err) os.Exit(1) } } ``` -------------------------------- ### GET /api/v1/evaluations/jobs Source: https://github.com/opendatahub-io/architecture-context/blob/main/architecture/rhoai-3.4/diagrams/eval-hub-security-network.txt Retrieves a list of evaluation jobs. This operation requires permissions to get evaluations. ```APIDOC ## GET /api/v1/evaluations/jobs ### Description Retrieves a list of evaluation jobs. This operation requires permissions to get evaluations. ### Method GET ### Endpoint /api/v1/evaluations/jobs ### Parameters #### Query Parameters None ### Request Example ```json {} ``` ### Response #### Success Response (200) (Details of the success response are not provided in the source text, but would typically include a list of evaluation jobs) #### Response Example ```json [ { "job_id": "job-1", "status": "completed" }, { "job_id": "job-2", "status": "running" } ] ``` ### RBAC Mapping - API Group: trustyai.opendatahub.io, Resource: evaluations, Verb: get ``` -------------------------------- ### GET /api/v1/evaluations/providers/{id} Source: https://github.com/opendatahub-io/architecture-context/blob/main/architecture/rhoai-3.4/eval-hub.md Retrieves a specific evaluation provider. Use this endpoint to get details of a particular provider. ```APIDOC ## GET /api/v1/evaluations/providers/{id} ### Description Retrieves a specific evaluation provider. Use this endpoint to get details of a particular provider. ### Method GET ### Endpoint /api/v1/evaluations/providers/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the evaluation provider. #### Query Parameters None ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) (Response details not specified in the provided text) #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Discover and analyze platform components via CLI Source: https://github.com/opendatahub-io/architecture-context/blob/main/ARCHITECTURE-DIAGRAM-PROPOSAL.md A command-line interface pattern for discovering platform components, cloning repositories, and triggering the aggregation process. It automates the workflow from repository discovery to final report generation. ```bash /discover-platform-components --distribution=rhoai --version=3.3 --output-dir=~/rhoai-3.3-analysis ``` -------------------------------- ### GET /api/v1/evaluations/collections/{id} Source: https://github.com/opendatahub-io/architecture-context/blob/main/architecture/rhoai-3.4/eval-hub.md Retrieves a specific benchmark collection. Use this endpoint to get details of a particular collection. ```APIDOC ## GET /api/v1/evaluations/collections/{id} ### Description Retrieves a specific benchmark collection. Use this endpoint to get details of a particular collection. ### Method GET ### Endpoint /api/v1/evaluations/collections/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the benchmark collection. #### Query Parameters None ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) (Response details not specified in the provided text) #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Controller Logic for Managing Gateway API Resources Source: https://github.com/opendatahub-io/architecture-context/blob/main/architecture/rhoai-3.4/prompts/openvino_model_server.md This example demonstrates controller logic focused on managing Gateway API resources. It shows imports for Gateway API types and potentially the creation or reconciliation of `Gateway`, `HTTPRoute`, `GRPCRoute`, or `TLSRoute` resources. This is central to modern ingress management in Kubernetes. ```go // Importing Gateway API types import ( gatewayv1 "gateway.networking.k8s.io/v1" // or gatewayv1beta1 "gateway.networking.k8s.io/v1beta1" ) // Controller reconciliation loop for Gateway API resources func (r *GatewayReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { // ... logic to manage Gateway, HTTPRoute, GRPCRoute, TLSRoute ... gateway := &gatewayv1.Gateway{} httpRoute := &gatewayv1.HTTPRoute{} // ... reconcile these resources ... return ctrl.Result{}, nil } ``` -------------------------------- ### GET /readyz Source: https://github.com/opendatahub-io/architecture-context/blob/main/architecture/rhoai-3.4/workload-variant-autoscaler.md Readiness probe endpoint to verify the controller is initialized and ready to process requests. ```APIDOC ## GET /readyz ### Description Readiness probe that checks if the controller has completed its bootstrap sequence, including ConfigMap loading. ### Method GET ### Endpoint /readyz ### Response #### Success Response (200) - **Body** (string) - "ok" ``` -------------------------------- ### Kubernetes Network Policy Example Source: https://github.com/opendatahub-io/architecture-context/blob/main/architecture/rhoai-3.4/rhods-operator.md Defines a Kubernetes NetworkPolicy to control network traffic to and from pods. This example specifically targets the kube-auth-proxy and restricts ingress and egress traffic, enhancing security. ```yaml apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: kube-auth-proxy namespace: {{ .Release.Namespace }} spec: podSelector: matchLabels: app: kube-auth-proxy policyTypes: - Ingress - Egress ingress: - from: - podSelector: matchLabels: app: "" ports: - protocol: TCP port: 8080 egress: - to: - ipBlock: cidr: 10.0.0.0/8 - to: - ipBlock: cidr: 172.16.0.0/12 - to: - ipBlock: cidr: 192.168.0.0/16 ``` -------------------------------- ### Automate platform architecture documentation workflow Source: https://github.com/opendatahub-io/architecture-context/blob/main/ARCHITECTURE-DIAGRAM-PROPOSAL.md A shell-based workflow for cloning multiple component repositories, generating individual architecture summaries, and aggregating them into a single platform-level architecture document. ```bash mkdir ~/rhoai-3.3-analysis cd ~/rhoai-3.3-analysis gh-org-clone --org red-hat-data-services \ --output-dir ./repos \ --branch release-3.3 \ --repos kserve,odh-dashboard,data-science-pipelines,training-operator,model-registry cd repos/kserve /repo-to-architecture-summary --distribution=rhoai --version=3.3 cd ../odh-dashboard /repo-to-architecture-summary --distribution=rhoai --version=3.3 cd ~/rhoai-3.3-analysis /aggregate-platform-architecture --distribution=rhoai --version=3.3 --repos-dir=./repos cat platform-architecture/rhoai-3.3-PLATFORM.md ``` -------------------------------- ### Install Mermaid CLI Source: https://github.com/opendatahub-io/architecture-context/blob/main/architecture/rhoai-3.4/diagrams/distributed-workloads-README.md Installs the Mermaid CLI globally using npm. This is a prerequisite for manually regenerating Mermaid diagrams into various image formats. ```bash npm install -g @mermaid-js/mermaid-cli ``` -------------------------------- ### Fetch Version-Specific Repositories and Generate Documentation Source: https://github.com/opendatahub-io/architecture-context/blob/main/ARCHITECTURE-DIAGRAM-PROPOSAL.md Automates the cloning of specific repository versions and running component agents to generate architecture summaries. This supports historical documentation and version-specific release tracking. ```bash # Clone all opendatahub-io repos at v3.0 tag gh-org-clone --org opendatahub-io \ --output-dir ./repos/odh-v3.0 \ --tag v3.0 \ --include-archived=false # Clone all red-hat-data-services repos at release-3.3 branch gh-org-clone --org red-hat-data-services \ --output-dir ./repos/rhoai-3.3 \ --branch release-3.3 \ --include-archived=false # Run component agents on version-specific repos ./component-agent.sh --repo-dir ./repos/rhoai-3.3/kserve \ --output ./summaries/rhoai-3.3/kserve.md # Aggregate for specific version ./platform-agent.sh --summaries-dir ./summaries/rhoai-3.3 \ --version 3.3 \ --distribution rhoai \ --output ./platform/rhoai-3.3-architecture.md ``` -------------------------------- ### GET /q/health/live Source: https://github.com/opendatahub-io/architecture-context/blob/main/architecture/rhoai-3.4/trustyai-explainability.md Liveness probe endpoint. ```APIDOC ## GET /q/health/live ### Description Liveness probe endpoint. ### Method GET ### Endpoint /q/health/live ### Parameters None ### Response #### Success Response (200) - **status** (string) - Health status (e.g., UP). #### Response Example ```json { "status": "UP" } ``` ``` -------------------------------- ### Prepare opendatahub-operator Repository Source: https://github.com/opendatahub-io/architecture-context/blob/main/architecture/rhoai-3.4/prompts/kserve.md Executes the 'get-manifests' make target for the opendatahub-operator repository. This clones kustomize manifests into the './opt/' directory, which are crucial for analyzing actual deployment configurations. ```bash make get-manifests ``` -------------------------------- ### Configure Environment and Execute Generation Pipeline Source: https://context7.com/opendatahub-io/architecture-context/llms.txt This snippet demonstrates how to initialize the environment variables from the template and run the architecture generation script. It supports both Anthropic and Vertex AI backends and requires the uv package manager to sync dependencies and execute the main Python application. ```bash # Setup environment cp .env.example .env # Required for Anthropic API ANTHROPIC_API_KEY=sk-ant-api03-... # Alternative: Vertex AI credentials GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json VERTEX_AI_PROJECT=your-gcp-project VERTEX_AI_LOCATION=us-central1 # Run with uv uv sync uv run python main.py all --platform=rhoai --branch=rhoai-3.4 --model=opus ``` -------------------------------- ### GET /q/metrics Source: https://github.com/opendatahub-io/architecture-context/blob/main/architecture/rhoai-3.4/trustyai-explainability.md Exposes Prometheus metrics (Micrometer). ```APIDOC ## GET /q/metrics ### Description Exposes Prometheus metrics (Micrometer). ### Method GET ### Endpoint /q/metrics ### Parameters None ### Response #### Success Response (200) - **metrics** (string) - Prometheus formatted metrics. #### Response Example ```text # HELP http_server_requests_seconds # TYPE http_server_requests_seconds histogram http_server_requests_seconds_bucket{exception="None",method="GET",uri="/info",status="200",le="0.005"} 0 ... ``` ``` -------------------------------- ### Generate Product Architecture Summary (Shell) Source: https://github.com/opendatahub-io/architecture-context/blob/main/ARCHITECTURE-DIAGRAM-PROPOSAL.md Shell script to generate a simplified architecture summary for product documentation. It takes distribution, version, and output format as input, producing an output file. ```shell #!/bin/bash ./platform-agent.sh --distribution rhoai --version 3.3 \ --output-format product-docs \ --output ./output/rhoai-3.3-product-arch.md ``` -------------------------------- ### GET /metrics/all/requests Source: https://github.com/opendatahub-io/architecture-context/blob/main/architecture/rhoai-3.4/trustyai-explainability.md List all scheduled metric requests. ```APIDOC ## GET /metrics/all/requests ### Description List all scheduled metric requests. ### Method GET ### Endpoint /metrics/all/requests ### Parameters None ### Response #### Success Response (200) - **scheduled_requests** (array) - A list of scheduled metric requests. #### Response Example ```json { "scheduled_requests": [ { "id": "req1", "metric_type": "fairness", "status": "scheduled" } ] } ``` ``` -------------------------------- ### Operator Entrypoint Script (entrypoint.sh) Source: https://github.com/opendatahub-io/architecture-context/blob/main/architecture/rhoai-3.4/spark-operator.md This shell script serves as the entrypoint for the operator. It likely performs initial setup or configuration before executing the main operator process. ```shell #!/bin/bash set -e # Start the controller manager exec /usr/local/bin/manager "$@" ``` -------------------------------- ### GET /q/metrics Source: https://github.com/opendatahub-io/architecture-context/blob/main/architecture/rhoai-3.4/trustyai-service-operator.md Endpoint for Prometheus metrics scraping. ```APIDOC ## GET /q/metrics ### Description Exposes service metrics in Prometheus format for monitoring and scraping. ### Method GET ### Endpoint /q/metrics ### Response #### Success Response (200) - **metrics** (text/plain) - Prometheus formatted metrics data. ``` -------------------------------- ### GET /api/status Source: https://github.com/opendatahub-io/architecture-context/blob/main/architecture/rhoai-3.4/odh-dashboard.md Checks the user authentication status. ```APIDOC ## GET /api/status ### Description Checks the user authentication status. ### Method GET ### Endpoint /api/status ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **authenticated** (boolean) - Indicates if the user is authenticated. #### Response Example { "authenticated": true } ```