You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add configurable service endpoint path for RestateDeployment
- Add optional service_path field to RestateSpec for custom endpoint paths
- Update controller logic to use validated service path when registering with Restate
- Default behavior unchanged: services register at root path '/' if not specified
- Add path validation ensuring paths start with '/' and don't end with '/' (except root)
- Update CRD schema and documentation with examples
- Add comprehensive unit tests for path validation and endpoint construction
Co-Authored-By: sketch <hello@sketch.dev>
Change-ID: s114ac83524847582k
(cherry picked from commit 53adb341dd10fb201a7dfe4327180403e9b28138)
| `imagePullPolicy` | `string` | Image pull policy. One of `Always`, `Never`, `IfNotPresent`. Defaults to `Always` if `:latest` tag is specified, or `IfNotPresent` otherwise. |
108
-
| `resources` | `object` | Compute Resources for the Restate container. e.g., `requests` and `limits` for `cpu` and `memory`. |
109
-
| `env` | `array` | List of environment variables to set in the container. |
110
-
| `affinity` | `object` | Standard Kubernetes affinity rules. |
111
-
| `nodeSelector` | `object` | Standard Kubernetes node selector. |
112
-
| `tolerations` | `array` | Standard Kubernetes tolerations. |
113
-
| `dnsPolicy` | `string` | Pod DNS policy. |
114
-
| `dnsConfig` | `object` | Pod DNS configuration. |
| `imagePullPolicy` | `string` | Image pull policy. One of `Always`, `Never`, `IfNotPresent`. Defaults to `Always` if `:latest` tag is specified, or `IfNotPresent` otherwise. |
108
+
| `resources` | `object` | Compute Resources for the Restate container. e.g., `requests` and `limits` for `cpu` and `memory`. |
109
+
| `env` | `array` | List of environment variables to set in the container. |
110
+
| `affinity` | `object` | Standard Kubernetes affinity rules. |
111
+
| `nodeSelector` | `object` | Standard Kubernetes node selector. |
112
+
| `tolerations` | `array` | Standard Kubernetes tolerations. |
113
+
| `dnsPolicy` | `string` | Pod DNS policy. |
114
+
| `dnsConfig` | `object` | Pod DNS configuration. |
| `storageRequestBytes` | `integer` | **Required**. Amount of storage to request in volume claims. Can be increased but not decreased. |
123
-
| `storageClassName` | `string` | The name of the `StorageClass` for the volume claims. This field is immutable. |
123
+
| `storageClassName` | `string` | The name of the `StorageClass` for the volume claims. This field is immutable. |
124
124
125
125
---
126
126
127
127
#### `spec.security`
128
128
129
-
| Field | Type | Description |
130
-
|---|---|---|
131
-
| `disableNetworkPolicies` | `boolean` | If `true`, the operator will not create any network policies. Defaults to `false`. |
132
-
| `allowOperatorAccessToAdmin` | `boolean` | If `true`, adds a rule to allow the operator to access the admin API. Needed for `RestateDeployment`. Defaults to `true`. |
133
-
| `networkPeers` | `object` | Defines network peers to allow inbound access to `admin`, `ingress`, and `metrics` ports. |
134
-
| `networkEgressRules` | `array` | Custom egress rules for outbound traffic from the cluster. |
135
-
| `serviceAccountAnnotations` | `object` | Annotations to add to the `ServiceAccount`. |
136
-
| `serviceAnnotations`| `object` | Annotations to add to the `Service`. |
137
-
| `awsPodIdentityAssociationRoleArn` | `string` | **Use this to grant your Restate cluster fine-grained access to other AWS resources (like S3) without managing static credentials.** Creates a `PodIdentityAssociation` to grant the cluster an IAM role. Requires the ACK EKS controller. |
138
-
| `awsPodSecurityGroups` | `array` | **Use this to isolate your Restate cluster within specific AWS Security Groups for enhanced network control and auditing.** Creates a `SecurityGroupPolicy` to place pods into these security groups. Requires the Security Groups for Pods CRD. |
139
-
| `requestSigningPrivateKey` | `object` | Configures a private key to sign outbound requests from this cluster. Can be sourced from a `secret` or a CSI `secretProvider`. See details below. |
| `disableNetworkPolicies` | `boolean` | If `true`, the operator will not create any network policies. Defaults to `false`. |
132
+
| `allowOperatorAccessToAdmin` | `boolean` | If `true`, adds a rule to allow the operator to access the admin API. Needed for `RestateDeployment`. Defaults to `true`. |
133
+
| `networkPeers` | `object` | Defines network peers to allow inbound access to `admin`, `ingress`, and `metrics` ports. |
134
+
| `networkEgressRules` | `array` | Custom egress rules for outbound traffic from the cluster. |
135
+
| `serviceAccountAnnotations` | `object` | Annotations to add to the `ServiceAccount`. |
136
+
| `serviceAnnotations`| `object` | Annotations to add to the `Service`. |
137
+
| `awsPodIdentityAssociationRoleArn` | `string` | **Use this to grant your Restate cluster fine-grained access to other AWS resources (like S3) without managing static credentials.** Creates a `PodIdentityAssociation` to grant the cluster an IAM role. Requires the ACK EKS controller. |
138
+
| `awsPodSecurityGroups` | `array` | **Use this to isolate your Restate cluster within specific AWS Security Groups for enhanced network control and auditing.** Creates a `SecurityGroupPolicy` to place pods into these security groups. Requires the Security Groups for Pods CRD. |
139
+
| `requestSigningPrivateKey` | `object` | Configures a private key to sign outbound requests from this cluster. Can be sourced from a `secret` or a CSI `secretProvider`. See details below. |
140
140
141
141
---
142
142
143
143
#### `spec.security.requestSigningPrivateKey`
144
144
145
-
| Field | Type | Description |
146
-
|---|---|---|
147
-
| `version` | `string` | **Required**. The version of Restate request signing. Currently, only "v1" is accepted. |
148
-
| `secret` | `object` | A Kubernetes Secret source for the private key. |
149
-
| `secretProvider` | `object` | A CSI secret provider source for the private key. |
| `minReadySeconds` | `integer` | Minimum seconds a new pod should be ready before it's considered available. Defaults to 0. |
339
+
| `revisionHistoryLimit`| `integer` | Number of old ReplicaSets to retain for rollbacks. Defaults to 10. |
337
340
338
341
---
339
342
340
343
#### `spec.selector`
341
344
342
345
This is a standard Kubernetes [label selector](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors). It must match the labels of the pod template.
343
346
344
-
| Field | Type | Description |
345
-
|---|---|---|
346
-
| `matchLabels` | `object` | A map of key-value pairs. |
347
-
| `matchExpressions` | `array` | A list of label selector requirements. |
| `register` | `object` | **Required**. The location of the Restate Admin API to register this deployment against. See details below. |
369
+
| `service_path` | `string` | Optional path to append to the service endpoint when registering with Restate. If not provided, the service will be registered at the root path "/". Path must start with "/" and should not end with "/". |
366
370
367
371
The `register` field must specify exactly one of `cluster`, `service`, or `url`.
368
372
369
-
| Field | Type | Description |
370
-
|---|---|---|
371
-
| `cluster` | `string` | The name of a `RestateCluster` CRD object in the same Kubernetes cluster. |
Copy file name to clipboardExpand all lines: crd/restatedeployments.yaml
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@ metadata:
5
5
spec:
6
6
group: restate.dev
7
7
names:
8
+
categories: []
8
9
kind: RestateDeployment
9
10
plural: restatedeployments
10
11
shortNames:
@@ -104,6 +105,10 @@ spec:
104
105
description: A url of the restate admin endpoint against which to register the deployment Exactly one of `cluster`, `service` or `url` must be specified
105
106
type: string
106
107
type: object
108
+
service_path:
109
+
description: Optional path to append to the service endpoint when registering with Restate. If not provided, the service will be registered at the root path "/". Path must start with "/" and should not end with "/".
0 commit comments