The StreamNativeCloudConnection
resource defines a connection to the StreamNative Cloud API server. It allows you to configure authentication and connection details for interacting with StreamNative Cloud services.
Field | Description | Required |
---|---|---|
server |
The URL of the API server | Yes |
auth.credentialsRef |
Reference to the service account credentials secret | Yes |
logs.serviceUrl |
URL of the logging service. Required if logs configuration is specified. | No* |
organization |
The organization to use in the API server. If not specified, the connection name will be used | No |
*Note: If logs
configuration is specified, serviceUrl
becomes required.
Field | Description |
---|---|
conditions |
List of status conditions for the connection |
observedGeneration |
The last observed generation of the resource |
lastConnectedTime |
Timestamp of the last successful connection to the API server |
The service account credentials secret should contain a credentials.json
file with the following structure:
{
"type": "sn_service_account",
"client_id": "<client-id>",
"client_secret": "<client-secret>",
"client_email": "<client-email>",
"issuer_url": "<issuer-url>"
}
- Create a service account credentials secret:
apiVersion: v1
kind: Secret
metadata:
name: test-credentials
namespace: default
type: Opaque
data:
credentials.json: |
{
"type": "sn_service_account",
"client_secret": "client_secret",
"client_email": "client-email",
"issuer_url": "issuer_url",
"client_id": "client-id"
}
- Create a StreamNativeCloudConnection resource:
apiVersion: resource.streamnative.io/v1alpha1
kind: StreamNativeCloudConnection
metadata:
name: test-connection
namespace: default
spec:
server: https://api.streamnative.dev
auth:
credentialsRef:
name: test-credentials
organization: org
- Apply the YAML files:
kubectl apply -f credentials.yaml
kubectl apply -f connection.yaml
- Check the connection status:
kubectl get streamnativecloudconnection test-connection
The connection is ready when the Ready condition is True:
NAME READY AGE
test-connection True 1m
You can update the connection by modifying the YAML file and reapplying it. Most fields can be updated, including:
- Server URL
- Organization
- Credentials reference
After applying changes, verify the status to ensure the connection is working properly.
To delete a StreamNativeCloudConnection resource:
kubectl delete streamnativecloudconnection test-connection
Note that deleting the connection will affect any resources that depend on it, such as ComputeWorkspaces or ComputeFlinkDeployments.