Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

charts/osm: add pod disruption budgets for control plane #3466

Merged
merged 1 commit into from
May 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion charts/osm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,13 @@ The following table lists the configurable parameters of the osm chart and their
| OpenServiceMesh.image.registry | string | `"openservicemesh"` | Container image registry |
| OpenServiceMesh.image.tag | string | `"v0.8.4"` | Container image tag |
| OpenServiceMesh.imagePullSecrets | list | `[]` | `osm-controller` image pull secret |
| OpenServiceMesh.injector.podLabels | object | `{}` | |
| OpenServiceMesh.injector.enablePodDisruptionBudget | bool | `false` | Enable Pod Disruption Budget |
| OpenServiceMesh.injector.podLabels | object | `{}` | Sidecar injector's pod labels |
| OpenServiceMesh.injector.replicaCount | int | `1` | Sidecar injector's replica count |
| OpenServiceMesh.injector.resource | object | `{"limits":{"cpu":"0.5","memory":"64M"},"requests":{"cpu":"0.3","memory":"64M"}}` | Sidecar injector's container resource parameters |
| OpenServiceMesh.maxDataPlaneConnections | int | `0` | Sets the max data plane connections allowed for an instance of osm-controller, set to 0 to not enforce limits |
| OpenServiceMesh.meshName | string | `"osm"` | Identifier for the instance of a service mesh within a cluster |
| OpenServiceMesh.osmController.enablePodDisruptionBudget | bool | `false` | Enable Pod Disruption Budget |
| OpenServiceMesh.osmController.podLabels | object | `{}` | OSM controller's pod labels |
| OpenServiceMesh.osmController.replicaCount | int | `1` | OSM controller's replica count |
| OpenServiceMesh.osmController.resource | object | `{"limits":{"cpu":"1.5","memory":"512M"},"requests":{"cpu":"0.5","memory":"128M"}}` | OSM controller's container resource parameters |
Expand Down
14 changes: 14 additions & 0 deletions charts/osm/templates/osm-controller-pod-disruption-budget.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if .Values.OpenServiceMesh.osmController.enablePodDisruptionBudget }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: osm-controller-pdb
namespace: {{ include "osm.namespace" . }}
labels:
app: osm-controller
spec:
minAvailable: 1
selector:
matchLabels:
app: osm-controller
{{- end }}
14 changes: 14 additions & 0 deletions charts/osm/templates/osm-injector-pod-disruption-budget.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if .Values.OpenServiceMesh.injector.enablePodDisruptionBudget }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: osm-injector-pdb
namespace: {{ include "osm.namespace" . }}
labels:
app: osm-injector
spec:
minAvailable: 1
selector:
matchLabels:
app: osm-injector
{{- end }}
18 changes: 18 additions & 0 deletions charts/osm/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,15 @@
"title": "The podLabels schema",
"description": "Labels for the osmController pod.",
"default": {}
},
"enablePodDisruptionBudget": {
"$id": "#/properties/OpenServiceMesh/properties/osmController/properties/enablePodDisruptionBudget",
"type": "boolean",
"title": "The enablePodDisruptionBudget schema",
"description": "Indicates whether Pod Disruption Budget should be enabled or not.",
"examples": [
false
]
}
},
"additionalProperties": false
Expand Down Expand Up @@ -588,6 +597,15 @@
"title": "The podLabels schema",
"description": "Labels for the osm-injector pod.",
"default": {}
},
"enablePodDisruptionBudget": {
"$id": "#/properties/OpenServiceMesh/properties/injector/properties/enablePodDisruptionBudget",
"type": "boolean",
"title": "The enablePodDisruptionBudget schema",
"description": "Indicates whether Pod Disruption Budget should be enabled or not.",
"examples": [
false
]
}
},
"additionalProperties": false
Expand Down
5 changes: 5 additions & 0 deletions charts/osm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ OpenServiceMesh:
memory: "128M"
# -- OSM controller's pod labels
podLabels: {}
# -- Enable Pod Disruption Budget
enablePodDisruptionBudget: false

#
# -- Prometheus parameters
Expand Down Expand Up @@ -204,7 +206,10 @@ OpenServiceMesh:
requests:
cpu: "0.3"
memory: "64M"
# -- Sidecar injector's pod labels
podLabels: {}
# -- Enable Pod Disruption Budget
enablePodDisruptionBudget: false

# -- Run init container in privileged mode
enablePrivilegedInitContainer: false
Expand Down