Platform software control module (shturval-backend)
About the service
| Parameter | Description |
|---|---|
| GUI name | Platform software control module |
| System name (identifier) | shturval-backend |
| Cluster Assignment | Shturval platform software control module (API, business logic). Includes Swagger UI for API documentation. Installed only in the management cluster. |
| Critical | Yes |
| Public repository | — (platform); Swagger UI - swagger-ui |
| Dependencies | shturval-backend-crds, shturval-ingress-controller |
| Namespace | shturval-backend |
The service is included in the Helm chart shturval-backend. This chart also expands the permissions negotiation operator (stp-controller), which produces a bundle for OPA. The authentication and session components are in chart shturval-auth.
Contents
1. Review
Purpose: main software interface for platform management via HTTP API (/api/v1): clusters, groups of nodes and providers (CAP family*), namespace/workload object resources if necessary, terminals and logs, metrics, integration with the authorization loop and external configuration points. The cluster state changes at the request of the operator/API client, and not through CR approval by its own reconcilers within the process.
Features
| Contour | Intended use |
|---|---|
HTTP /api/v1 | Main API; after exceptions for the websocket terminal, JWT middleware is used |
| Provider Management | CRUD and Connection Validation for Platform Views of Infrastructure Providers |
| Life cycle of clusters and CAPI entities | Creating and changing management objects through the appropriate services |
| Bundle of rights OPA | Obtaining and using authorization rules from permissions operator or a static set for docker installer |
| Swagger/client generation | Platform assembly artifacts; for operation it is important to have an agreed version of the scheme with the release |
| Metrics | Separate Prometheus HTTP server (address set by environment) |
Initiation scriptsai
| What’s going on | Who initiates | Observed effect |
|---|---|---|
| API Processing | Operator UI, Client or Automation | Response or websocket stream; changes are possible in Kubernetes according to the handler logic |
| Rights bundle tracking | Process at startup (if not static bundle mode) | Updating the rules for the OPA scheme built into the delivery |
| Cleaning up terminal sessions | Background tasks after the router starts | Maintaining terminal resource sustainability |
| Metrics | Plane kubelet or monitoring | The assembler queries a separate bind address |
| Selecting a Swagger Name | When starting based on a license token | The title of the API documentation may differ depending on the product edition |
Limitations and implications
| Limit | Consequence for the administrator |
|---|---|
| Mandatory Kubernetes operator access to management cluster | Without a valid cluster client configuration, the process should not start |
Silencing the API process on :8080 | In the standard delivery, access from outside is via Envoy/Service; ingress ports do not equal bare Go process directly |
Open CORS (AllowAllOrigins) default | The browser/security policy is determined by the router configuration in the image |
Place in the chain of command
The consumer sends an HTTPS request to the pod backend: the traffic is first processed by Envoy, which proxies it to the local process sh-backend-api on 127.0.0.1:8080. In parallel, the OPA sidecar checks authorization policies against the bundle of rights. The API process itself accesses the Kubernetes API to read and modify objects and to external URLs of partner components: authn-server, session-manager, ldap-cache, etc.
Related Components
| Component | Where it unfolds | Communication with backend |
|---|---|---|
stp-controller | Chart shturval-backend | Generates an OPA bundle to check rights. |
sh-authn | Chart shturval-auth | Provides authorization issuer and login-flow. |
sh-session-manager | Chart shturval-auth | Serves SESSION_LIST_URL and SESSION_DELETE_URL. |
sh-ldap-cache | Chart shturval-auth | Serves backend HTTP requests to the LDAP user and group cache. |
Key Features
| Characteristics | Description |
|---|---|
| Binary name | sh-backend-api |
| HTTP listeningprocess | 0.0.0.0:8080 |
| Metrics address | Variable PROMETHEUS_ADDR, default :9090 |
| Namespace | Same as the namespace of the Helm release; NAMESPACE is taken from metadata.namespace Pod |
| Incoming traffic authentication | JWT middleware in the router stack; authorization provider configuration is set by the environment |
| HTTP/2 in Go server | Configurable outside the application via TLS/proxy layers |
2. Architecture
Workload Components
| Component | Kind/role in Pod | Scope | Description |
|---|---|---|---|
sh-backend-api | container | namespace | Main HTTP server of the platform |
| Envoy sidecar | container | namespace | HTTP(S) terminal point before the API process |
| OPA sidecar | container | namespace | Policy review; uses the current bundle rights |
| Metrics | built-in HTTP process service | — | Separate Gin server at address from PROMETHEUS_ADDR |
The RBAC of a process in a cluster is determined by the manifests chart shturval-backend; The list of rights is not exactly duplicated here.
3. Installation / deployment
Deployment is set by Helm chart shturval-backend. The API, Envoy, OPA, Swagger UI, permissions operator components and related objects (RBAC, Service, Ingress/Envoy configuration) are created in a single release.
Note: Any changes to installation parameters must be made in concert with the platform via ShturvalServicePatch (SSP) (or an equivalent approved mechanism), without manual changes outside of platform control.
4. Diagnostics
Typical checks are as follows (NAMESPACE, DEPLOYMENT, POD substitute according to the actual installation; the Deployment name corresponds to the Helm chart values shturval-backend):
kubectl get deployment -n "${NAMESPACE}"
kubectl get pods -n "${NAMESPACE}" -o wide
kubectl describe pod -n "${NAMESPACE}" "${POD}"
kubectl logs -n "${NAMESPACE}" "${POD}" -c sh-backend-api --tail=200
kubectl logs -n "${NAMESPACE}" "${POD}" -c envoy --tail=200
kubectl logs -n "${NAMESPACE}" "${POD}" -c opa --tail=200
| Symptom | Possible reason | Action |
|---|---|---|
| The process does not start | Invalid or inaccessible platform kubeconfig | Check Secret ServiceAccount and network access to apiserver |
| 401 / client authorization denied | JWT or auth endpoint configuration | Check environment authorization settings |
| OPA blocks authorized user requests | Outdated bundle or bundle observer error | Make sure permissions operator and the bundle service are working |
| API Delays | Overload or delays to Kubernetes API | Check apiserver/etcd load and quotas |
5. Life cycle
Processing path one externalHTTP request types are as follows:
| Step | Member | What the Administrator Observes |
|---|---|---|
| 1 | Ingress / Service / Envoy | Getting the request to the desired service |
| 2 | Gin router | Middleware sequence: recovery, request id, logging, CORS, JWT (except for exceptions for the websocket terminal) |
| 3 | Handler | Business transactions and possible side effects in Kubernetes |
| 4 | Return response | JSON, websocket stream or file |
The section does not contain reconcile, finalizers, or controller-runtime queues for the API process itself.
6. Service parameters
The configuration is set by the environment variables of the process. Variables important for the platform link:
| Variable | Purpose |
|---|---|
AUTH_ENDPOINT | URL / issuer of the authorization subsystem |
NAMESPACE | Working platform namespace |
DOCKER_INSTALLER | Mode of using static bundle rights instead of live file system monitoring |
LOG_LEVEL | Logging level |
PROMETHEUS_ADDR | Prometheus in-process listening address |
SESSION_LIST_URL, SESSION_DELETE_URL | Integration with session-manager |
Series LDAP_CACHE_* | Integration with ldap-cache |
LICENSE_TOKEN | Parsing the license and choosing the edition of strings in a Swagger document |
Where to configure
Services and repositories → Installed services → shturval-backend → Manage. The service runs in the management cluster.