|
4 | 4 |
|
5 | 5 | use RenokiCo\PhpK8s\Contracts\InteractsWithK8sCluster; |
6 | 6 | use RenokiCo\PhpK8s\Contracts\Podable; |
| 7 | +use RenokiCo\PhpK8s\Contracts\Scalable; |
7 | 8 | use RenokiCo\PhpK8s\Contracts\Watchable; |
| 9 | +use RenokiCo\PhpK8s\Traits\CanScale; |
8 | 10 | use RenokiCo\PhpK8s\Traits\HasAnnotations; |
9 | 11 | use RenokiCo\PhpK8s\Traits\HasLabels; |
10 | 12 | use RenokiCo\PhpK8s\Traits\HasPods; |
11 | 13 | use RenokiCo\PhpK8s\Traits\HasSelector; |
12 | 14 | use RenokiCo\PhpK8s\Traits\HasSpec; |
13 | 15 | use RenokiCo\PhpK8s\Traits\HasTemplate; |
14 | 16 |
|
15 | | -class K8sStatefulSet extends K8sResource implements InteractsWithK8sCluster, Podable, Watchable |
| 17 | +class K8sStatefulSet extends K8sResource implements InteractsWithK8sCluster, Podable, Scalable, Watchable |
16 | 18 | { |
17 | | - use HasAnnotations, HasLabels, HasPods, HasSelector, HasSpec, HasTemplate; |
| 19 | + use CanScale, HasAnnotations, HasLabels, HasPods, HasSelector, HasSpec, HasTemplate; |
18 | 20 |
|
19 | 21 | /** |
20 | 22 | * The resource Kind parameter. |
@@ -159,6 +161,16 @@ public function resourceWatchPath(): string |
159 | 161 | return "/apis/{$this->getApiVersion()}/watch/namespaces/{$this->getNamespace()}/statefulsets/{$this->getIdentifier()}"; |
160 | 162 | } |
161 | 163 |
|
| 164 | + /** |
| 165 | + * Get the path, prefixed by '/', that points to the resource scale. |
| 166 | + * |
| 167 | + * @return string |
| 168 | + */ |
| 169 | + public function resourceScalePath(): string |
| 170 | + { |
| 171 | + return "/apis/{$this->getApiVersion()}/namespaces/{$this->getNamespace()}/statefulsets/{$this->getIdentifier()}/scale"; |
| 172 | + } |
| 173 | + |
162 | 174 | /** |
163 | 175 | * Get the selector for the pods that are owned by this resource. |
164 | 176 | * |
|
0 commit comments