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
| `min-diff-memory-limit-value` | `minDiffMemoryLimitValue` | Value for minimum memory limit difference calculation. Accepts any numeric value. | Any numeric value | `"0"` |
489
489
490
-
#### 8. Container-Specific Configurations
490
+
#### 8. Direct Resource Specifications
491
491
492
-
The ResourcesConfig CRD allows you to specify container-specific configurations using the `containerConfigs` field. This is a map where the keys are container names and the values are objects containing any of the resource configuration fields.
| `request-cpu` | `requestCpu` | Direct CPU request value. Takes precedence over VPA recommendations. | Any valid CPU value | `""` |
495
+
| `request-memory` | `requestMemory` | Direct memory request value. Takes precedence over VPA recommendations. | Any valid memory value | `""` |
496
+
| `limit-cpu` | `limitCpu` | Direct CPU limit value. Takes precedence over VPA recommendations. | Any valid CPU value | `""` |
497
+
| `limit-memory` | `limitMemory` | Direct memory limit value. Takes precedence over VPA recommendations. | Any valid memory value | `""` |
498
+
| N/A | `request.cpu` | Kubernetes-native style CPU request. Takes precedence over VPA recommendations. | Any valid CPU value | `""` |
499
+
| N/A | `request.memory` | Kubernetes-native style memory request. Takes precedence over VPA recommendations. | Any valid memory value | `""` |
500
+
| N/A | `limit.cpu` | Kubernetes-native style CPU limit. Takes precedence over VPA recommendations. | Any valid CPU value | `""` |
501
+
| N/A | `limit.memory` | Kubernetes-native style memory limit. Takes precedence over VPA recommendations. | Any valid memory value | `""` |
502
+
503
+
#### 9. Container-Specific Configurations
504
+
505
+
The ResourcesConfig CRD allows you to specify container-specific configurations using the `containerConfigs` field. This is a map where the keys are container names and the values are objects containing any of the resource configuration fields, including direct resource specifications.
493
506
494
507
### Example Usage
495
508
496
-
#### Complete ResourcesConfig Example:
509
+
#### Complete ResourcesConfig Example (Using VPA Recommendations):
497
510
498
511
```yaml
499
512
apiVersion: oblik.socialgouv.io/v1
@@ -541,6 +554,66 @@ spec:
541
554
maxRequestMemory: "256Mi"
542
555
```
543
556
557
+
#### Direct Resource Specifications (Flat Style):
558
+
559
+
```yaml
560
+
apiVersion: oblik.socialgouv.io/v1
561
+
kind: ResourcesConfig
562
+
metadata:
563
+
name: web-app-resources
564
+
namespace: default
565
+
spec:
566
+
targetRef:
567
+
kind: Deployment
568
+
name: web-app
569
+
570
+
# Direct resource specifications (flat style)
571
+
requestCpu: "100m"
572
+
requestMemory: "128Mi"
573
+
limitCpu: "200m"
574
+
limitMemory: "256Mi"
575
+
576
+
# Container-specific settings
577
+
containerConfigs:
578
+
nginx:
579
+
requestCpu: "50m"
580
+
requestMemory: "64Mi"
581
+
limitCpu: "100m"
582
+
limitMemory: "128Mi"
583
+
```
584
+
585
+
#### Direct Resource Specifications (Kubernetes-Native Style):
586
+
587
+
```yaml
588
+
apiVersion: oblik.socialgouv.io/v1
589
+
kind: ResourcesConfig
590
+
metadata:
591
+
name: web-app-resources
592
+
namespace: default
593
+
spec:
594
+
targetRef:
595
+
kind: Deployment
596
+
name: web-app
597
+
598
+
# Kubernetes-native style resource specifications
599
+
request:
600
+
cpu: "100m"
601
+
memory: "128Mi"
602
+
limit:
603
+
cpu: "200m"
604
+
memory: "256Mi"
605
+
606
+
# Container-specific settings
607
+
containerConfigs:
608
+
nginx:
609
+
request:
610
+
cpu: "50m"
611
+
memory: "64Mi"
612
+
limit:
613
+
cpu: "100m"
614
+
memory: "128Mi"
615
+
```
616
+
544
617
#### Comparison: Annotations vs. ResourcesConfig
545
618
546
619
The same configuration using annotations would look like:
0 commit comments