TPI Storage#
TPI → TSTPI Storages
Defines how to reach a storage server. A TPIStorage configures access to the file server that TPIExport uploads the produced workbook to, and that TPIImport (or TPIImportDryRun) downloads the workbook from. Create your own TPIStorage for a file server you operate (with TLS and appropriate access controls in production).
Storage server#
TPI currently supports only HTTP(S). TPI uses GET to download files, PUT to upload files, and HEAD on the storage root path for the TPIStorage reachability probe. Other methods (POST, PATCH), WebDAV-only flows, multipart uploads, and similar patterns are not used by TPI.
| Item | Import | Export | Probe |
|---|---|---|---|
| Method | GET | PUT | HEAD |
| Body | Raw bytes of the workbook (response) | Raw workbook bytes (request) | - |
| Success | Response status code must be 200 | Any 2xx status is accepted | Any HTTP response counts as reachable, except 401/403, since those indicate authentication failures |
| Failure | Any non-200 status is treated as an error | Any status outside 2xx is treated as an error | Network or transport errors, or HTTP codes 401/403 |
Root path#
The full path of a workbook is the spec.rootPath joined with the spec.path from the TPI or TPIExport workflow. The root path can contain forward slashes as allowed by the CRD. The full path must resolve to a single file object on the storage server. The directory on the storage server that backs spec.rootPath must exist and be writable by the process that serves PUT (for example, nginx under its configured user/group). Otherwise exports can fail with 500.
Authentication#
TPIStorage supports two authentication mechanisms that can be used independently or combined: HTTP Basic authentication (application layer) and mutual TLS (transport layer).
HTTP Basic#
For HTTP Basic authentication, use a Kubernetes Basic authentication Secret in the same namespace as the TPIStorage, and set spec.http.basicAuthSecret to that Secret’s name. The EDA UI does not create this Secret — create it in the cluster yourself (for example with kubectl, oc, GitOps, or a manifest).
Example for creating the Secret with kubectl:
kubectl create secret generic tpi-storage-basic-auth \
-n <NAMESPACE> \
--type=kubernetes.io/basic-auth \
--from-literal=username=myusername \
--from-literal=password=mypassword
If basicAuthSecret is unset, the client sends no Authorization header. If the server still requires Basic authentication, requests fail with 401.
Mutual TLS (mTLS)#
For mTLS (TLS client authentication over HTTPS), reference a Kubernetes Secret in the same namespace as the TPIStorage from spec.http.https.clientTlsSecret. Enable spec.http.https on the TPIStorage. The EDA UI does not create this Secret — create it yourself (for example kubectl, oc, GitOps, or a manifest).
TPI requires the same data layout as a TLS Secret: tls.crt, tls.key, and optional ca.crt. That matches kubectl create secret tls and typical cert-manager Certificate-backed Secrets. When ca.crt is set, PEM-encoded CA certificate(s) are merged into the pool used to verify the server certificate (in addition to the system trust store), unless spec.http.https.skipVerify is true.
Example for creating the Secret with kubectl:
kubectl create secret generic tpi-storage-mtls \
-n <NAMESPACE> \
--type=kubernetes.io/tls \
--from-file=tls.crt=client.pem \
--from-file=tls.key=client-key.pem \
--from-file=ca.crt=ca-chain.pem
Omit --from-file=ca.crt=... if you rely only on the system trust store (and skipVerify is false). When you do not need ca.crt, the Secret can be created with kubectl:
kubectl create secret tls tpi-storage-mtls \
-n <NAMESPACE> \
--cert=client.pem \
--key=client-key.pem
If spec.http.https.clientTlsSecret is unset, the client does not present a client certificate. If https is unset, connections use plain HTTP and mTLS does not apply.
Dependencies#
The TPIStorage resource has no dependencies on other EDA resources.
Referenced resources#
A TPIStorage optionally references Kubernetes Secret resources in the same namespace:
spec.http.basicAuthSecret-- for HTTP Basic authentication (see HTTP Basic)spec.http.https.clientTlsSecret-- for TLS client authentication (see Mutual TLS (mTLS))
Examples#
Custom Resource Definition#
To browse the Custom Resource Definition go to crd.eda.dev.
TPIStorage
SPEC
TPIStorageSpec defines the desired state of TPIStorage
-
Interval at which the controller re-checks storage reachability.
default: "10m"format: duration -
HTTP protocol configuration
-
Name of a Kubernetes Basic Authentication Secret in the same namespace.
-
Hostname of the HTTP server
-
Use HTTPS
-
Name of a Secret in the same namespace for TLS client authentication (mTLS). When set, the Secret must use Kubernetes TLS Secret data keys: PEM-encoded "tls.crt" and "tls.key", and may include optional "ca.crt" for PEM-encoded CA certificate(s) used when verifying the server certificate (in addition to the system trust store unless skipVerify is true).
-
Skip HTTPS certificate verification
default: false
-
-
Port on the HTTP server to connect to
default: 80range: 1 to 65535
-
-
Protocol to interact with TPI Storage.
default: "HTTP"enum: "HTTP" -
Root path on TPI Storage.
default: ""
STATUS
TPIStorageStatus defines the observed state of TPIStorage
-
Status conditions
-
Condition contains details for one aspect of the current state of this API Resource.
-
lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format: date-time -
message is a human readable message indicating details about the transition. This may be an empty string.
-
observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
format: int64range: >= 0 -
reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
-
status of the condition, one of True, False, Unknown.
enum: "True", "False", "Unknown" -
type of condition in CamelCase or in foo.example.com/CamelCase.
-
-
-
Whether the storage endpoint is reachable