Add resource limits for upgrade and delete hook batch jobs (#366)
* Add resource limits for upgrade and delete hook batch jobs Signed-off-by: aniket patel <[email protected]> * Fix value of resource Signed-off-by: aniket patel <[email protected]> * Fix resource limit in server template Signed-off-by: aniket patel <[email protected]> * Incorperate feedback Signed-off-by: Kevin Fox <[email protected]> * Fix up doc comment Signed-off-by: Kevin Fox <[email protected]> --------- Signed-off-by: aniket patel <[email protected]> Signed-off-by: Kevin Fox <[email protected]> Co-authored-by: aniket patel <[email protected]>
This commit is contained in:
@@ -258,7 +258,9 @@ Now you can interact with the Spire agent socket from your own application. The
|
|||||||
| `global.spire.ingressControllerType` | Specify what type of ingress controller you're using to add the necessary annotations accordingly. If blank, autodetection is attempted. If other, no annotations will be added. Must be one of [ingress-nginx, openshift, other, ""]. | `""` |
|
| `global.spire.ingressControllerType` | Specify what type of ingress controller you're using to add the necessary annotations accordingly. If blank, autodetection is attempted. If other, no annotations will be added. Must be one of [ingress-nginx, openshift, other, ""]. | `""` |
|
||||||
| `global.spire.tools.kubectl.tag` | Set to force the tag to use for all kubectl instances | `""` |
|
| `global.spire.tools.kubectl.tag` | Set to force the tag to use for all kubectl instances | `""` |
|
||||||
| `global.installAndUpgradeHooks.enabled` | Enable Helm hooks to autofix common install/upgrade issues (should be disabled when using `helm template`) | `true` |
|
| `global.installAndUpgradeHooks.enabled` | Enable Helm hooks to autofix common install/upgrade issues (should be disabled when using `helm template`) | `true` |
|
||||||
|
| `global.installAndUpgradeHooks.resources` | Resource requests and limits for installAndUpgradeHooks | `{}` |
|
||||||
| `global.deleteHooks.enabled` | Enable Helm hooks to autofix common delete issues (should be disabled when using `helm template`) | `true` |
|
| `global.deleteHooks.enabled` | Enable Helm hooks to autofix common delete issues (should be disabled when using `helm template`) | `true` |
|
||||||
|
| `global.deleteHooks.resources` | Resource requests and limits for deleteHooks | `{}` |
|
||||||
|
|
||||||
### Spire server parameters
|
### Spire server parameters
|
||||||
|
|
||||||
|
|||||||
@@ -72,4 +72,8 @@ spec:
|
|||||||
- deployment
|
- deployment
|
||||||
- {{ include "spiffe-oidc-discovery-provider.fullname" . }}
|
- {{ include "spiffe-oidc-discovery-provider.fullname" . }}
|
||||||
- --wait
|
- --wait
|
||||||
|
{{- with (((.Values).global).deleteHooks).resources }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -85,6 +85,10 @@ spec:
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
{{- with (((.Values).global).installAndUpgradeHooks).resources }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -85,6 +85,10 @@ spec:
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
{{- with (((.Values).global).installAndUpgradeHooks).resources }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -77,6 +77,10 @@ spec:
|
|||||||
- {{ include "spire-server.kind" . }}
|
- {{ include "spire-server.kind" . }}
|
||||||
- {{ include "spire-server.fullname" . }}
|
- {{ include "spire-server.fullname" . }}
|
||||||
- --wait
|
- --wait
|
||||||
|
{{- with (((.Values).global).deleteHooks).resources }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
- name: pre-delete-check
|
- name: pre-delete-check
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- include "spire-lib.securitycontext" . | nindent 10 }}
|
{{- include "spire-lib.securitycontext" . | nindent 10 }}
|
||||||
@@ -89,6 +93,10 @@ spec:
|
|||||||
- app.kubernetes.io/instance={{ include "spire-server.name" . }},app.kubernetes.io/name={{ .Release.Name }},app.kubernetes.io/component=server
|
- app.kubernetes.io/instance={{ include "spire-server.name" . }},app.kubernetes.io/name={{ .Release.Name }},app.kubernetes.io/component=server
|
||||||
- -n
|
- -n
|
||||||
- {{ include "spire-server.namespace" . }}
|
- {{ include "spire-server.namespace" . }}
|
||||||
|
{{- with (((.Values).global).deleteHooks).resources }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -85,6 +85,10 @@ spec:
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
{{- with (((.Values).global).installAndUpgradeHooks).resources }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -89,9 +89,33 @@ global:
|
|||||||
installAndUpgradeHooks:
|
installAndUpgradeHooks:
|
||||||
## @param global.installAndUpgradeHooks.enabled Enable Helm hooks to autofix common install/upgrade issues (should be disabled when using `helm template`)
|
## @param global.installAndUpgradeHooks.enabled Enable Helm hooks to autofix common install/upgrade issues (should be disabled when using `helm template`)
|
||||||
enabled: true
|
enabled: true
|
||||||
|
## @param global.installAndUpgradeHooks.resources [object] Resource requests and limits for installAndUpgradeHooks
|
||||||
|
resources: {}
|
||||||
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
|
# choice for the user. This also increases chances charts run on environments with little
|
||||||
|
# resources, such as Minikube. If you do want to specify resources, copy the following
|
||||||
|
# to your values file and edit as needed.
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
deleteHooks:
|
deleteHooks:
|
||||||
## @param global.deleteHooks.enabled Enable Helm hooks to autofix common delete issues (should be disabled when using `helm template`)
|
## @param global.deleteHooks.enabled Enable Helm hooks to autofix common delete issues (should be disabled when using `helm template`)
|
||||||
enabled: true
|
enabled: true
|
||||||
|
## @param global.deleteHooks.resources [object] Resource requests and limits for deleteHooks
|
||||||
|
resources: {}
|
||||||
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
|
# choice for the user. This also increases chances charts run on environments with little
|
||||||
|
# resources, such as Minikube. If you do want to specify resources, copy the following
|
||||||
|
# to your values file and edit as needed.
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
|
||||||
# telemetry:
|
# telemetry:
|
||||||
# prometheus:
|
# prometheus:
|
||||||
|
|||||||
Reference in New Issue
Block a user