Skip to content

Commit

Permalink
[VDEVOPS-000]: Update resources management
Browse files Browse the repository at this point in the history
Signed-off-by: adobrodey <[email protected]>
  • Loading branch information
ADobrodey committed Apr 18, 2024
1 parent c9186f9 commit 32e28ee
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 84 deletions.
2 changes: 1 addition & 1 deletion stable/deployment/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: deployment
version: 1.8.0
version: 1.8.1
description: Typical microservice chart. Supports Ingress controller, horizontal-scalable containers
type: application
dependencies:
Expand Down
8 changes: 1 addition & 7 deletions stable/deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ Typical microservice chart. Supports Ingress controller, horizontal-scalable con
| `sidecarContainers` | Configuration for the init container | `[]` |
| `datadogIntegration` | Enable datadog related integration for tracing | `false` |
| `githubActionsIntegration` | Allow github runners to create resources in namespace | `false` |
| `resources` | Container resource requests and limits | `{}` |

### Image for the deployment

Expand Down Expand Up @@ -235,13 +236,6 @@ Typical microservice chart. Supports Ingress controller, horizontal-scalable con
| `metrics.rules.enabled` | Create PrometheusRules object | `false` |
| `metrics.rules.spec` | Configuration for the application alerting | `[]` |

### Container resource requests and limits

| Name | Description | Value |
| -------------------- | ---------------------------------------- | ----- |
| `resources.limits` | The resources limits for the container | `{}` |
| `resources.requests` | The requests resources for the container | `{}` |

### Lifecycle configuration

| Name | Description | Value |
Expand Down
20 changes: 5 additions & 15 deletions stable/deployment/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@
"description": "Allow github runners to create resources in namespace",
"default": false
},
"resources": {
"type": "object",
"description": "Container resource requests and limits",
"default": {}
},
"image": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -643,21 +648,6 @@
}
}
},
"resources": {
"type": "object",
"properties": {
"limits": {
"type": "object",
"description": "The resources limits for the container",
"default": {}
},
"requests": {
"type": "object",
"description": "The requests resources for the container",
"default": {}
}
}
},
"lifecycle": {
"type": "object",
"properties": {
Expand Down
31 changes: 13 additions & 18 deletions stable/deployment/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ topologySpreadConstraintPreset: soft
##
topologySpreadConstraints: {}
## @param resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge).
## This is ignored if server.resources is set (server.resources is recommended for production).
## This is ignored if resources is set (resources is recommended for production).
## More information: https://github.com/vinivia/kubernetes-helm-charts/blob/main/global/k8s-common/templates/_resources.tpl#L9
##
resourcesPreset: "nano"
Expand Down Expand Up @@ -224,6 +224,18 @@ datadogIntegration: false
## E.g.
## githubActionsIntegration: true
githubActionsIntegration: false
## @param resources Container resource requests and limits
## ref: https://kubernetes.io/docs/user-guide/compute-resources/
##
## E.g.
## resources:
## requests:
## cpu: 10m
## memory: 50Mi
## limits:
## cpu: 50m
## memory: 50Mi
resources: {}
## @section Image for the deployment
##
image:
Expand Down Expand Up @@ -560,23 +572,6 @@ metrics:
## resolved for this cloud to continue to maintain state.
##
spec: [ ]
## @section Container resource requests and limits
## ref: https://kubernetes.io/docs/user-guide/compute-resources/
resources:
## @param resources.limits The resources limits for the container
## E.g.
## limits:
## cpu: 50m
## memory: 50Mi
##
limits: { }
## @param resources.requests The requests resources for the container
## E.g.
## requests:
## cpu: 10m
## memory: 50Mi
##
requests: { }
## @section Lifecycle configuration
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/
lifecycle:
Expand Down
2 changes: 1 addition & 1 deletion stable/statefulset/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: statefulset
version: 1.8.0
version: 1.8.1
description: Typical StateFul Set application
type: application
dependencies:
Expand Down
10 changes: 2 additions & 8 deletions stable/statefulset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ Typical StateFul Set application
| `tolerations` | Tolerations for pod assignment | `[]` |
| `podAffinityPreset` | Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). | `nano` |
| `resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). | `none` |
| `resources` | Container resource requests and limits | `{}` |
| `nodeAffinityPreset` | Node affinity preset | |
| `nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `nodeAffinityPreset.key` | Node label key to match Ignored if `affinity` is set. | `""` |
Expand Down Expand Up @@ -221,13 +222,6 @@ Typical StateFul Set application
| `metrics.rules.enabled` | Create PrometheusRules object | `false` |
| `metrics.rules.spec` | Configuration for the application alerting | `[]` |

### Container resource requests and limits

| Name | Description | Value |
| -------------------- | ---------------------------------------- | ----- |
| `resources.limits` | The resources limits for the container | `{}` |
| `resources.requests` | The requests resources for the container | `{}` |

### Lifecycle configuration

| Name | Description | Value |
Expand Down
22 changes: 6 additions & 16 deletions stable/statefulset/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,12 @@
"resourcesPreset": {
"type": "string",
"description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge).",
"default": "nano"
"default": "none"
},
"resources": {
"type": "object",
"description": "Container resource requests and limits",
"default": {}
},
"nodeAffinityPreset": {
"type": "object",
Expand Down Expand Up @@ -644,21 +649,6 @@
}
}
},
"resources": {
"type": "object",
"properties": {
"limits": {
"type": "object",
"description": "The resources limits for the container",
"default": {}
},
"requests": {
"type": "object",
"description": "The requests resources for the container",
"default": {}
}
}
},
"lifecycle": {
"type": "object",
"properties": {
Expand Down
31 changes: 13 additions & 18 deletions stable/statefulset/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,19 @@ podAntiAffinityPreset: soft
## This is ignored if server.resources is set (server.resources is recommended for production).
## More information: https://github.com/vinivia/kubernetes-helm-charts/blob/main/global/k8s-common/templates/_resources.tpl#L9
##
resourcesPreset: "nano"
resourcesPreset: "none"
## @param resources Container resource requests and limits
## ref: https://kubernetes.io/docs/user-guide/compute-resources/
##
## E.g.
## resources:
## requests:
## cpu: 10m
## memory: 50Mi
## limits:
## cpu: 50m
## memory: 50Mi
resources: {}
## @extra nodeAffinityPreset Node affinity preset
## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
##
Expand Down Expand Up @@ -537,23 +549,6 @@ metrics:
## resolved for this cloud to continue to maintain state.
##
spec: []
## @section Container resource requests and limits
## ref: https://kubernetes.io/docs/user-guide/compute-resources/
resources:
## @param resources.limits The resources limits for the container
## E.g.
## limits:
## cpu: 50m
## memory: 50Mi
##
limits: {}
## @param resources.requests The requests resources for the container
## E.g.
## requests:
## cpu: 10m
## memory: 50Mi
##
requests: {}
## @section Lifecycle configuration
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/
lifecycle:
Expand Down

0 comments on commit 32e28ee

Please sign in to comment.