cinder: unhardcode readiness/liveness probe params
This patch adds ability to set readiness and liveness probes parameters of cinder-api via chart values instead of having them hardcoded in the deployment manifest. Change-Id: I7b9abda6424096484fe23f7240c3777b5e82d86a
This commit is contained in:
@@ -12,6 +12,20 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/}}
|
||||
|
||||
{{- define "cinderApiLivenessProbeTemplate" }}
|
||||
httpGet:
|
||||
scheme: {{ tuple "volume" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
|
||||
path: {{ tuple "volume" "healthcheck" "internal" . | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }}
|
||||
port: {{ tuple "volume" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "cinderApiReadinessProbeTemplate" }}
|
||||
httpGet:
|
||||
scheme: {{ tuple "volume" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
|
||||
path: {{ tuple "volume" "healthcheck" "internal" . | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }}
|
||||
port: {{ tuple "volume" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.manifests.deployment_api }}
|
||||
{{- $envAll := . }}
|
||||
|
||||
@@ -97,22 +111,8 @@ spec:
|
||||
ports:
|
||||
- name: c-api
|
||||
containerPort: {{ tuple "volume" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
scheme: {{ tuple "volume" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
|
||||
path: /
|
||||
port: {{ tuple "volume" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
initialDelaySeconds: 30
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
scheme: {{ tuple "volume" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
|
||||
path: /
|
||||
port: {{ tuple "volume" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
initialDelaySeconds: 5
|
||||
failureThreshold: 3
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
{{ dict "envAll" $envAll "component" "api" "container" "cinder-api" "type" "readiness" "probeTemplate" (include "cinderApiReadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
|
||||
{{ dict "envAll" $envAll "component" "api" "container" "cinder-api" "type" "liveness" "probeTemplate" (include "cinderApiLivenessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
|
||||
volumeMounts:
|
||||
- name: pod-tmp
|
||||
mountPath: /tmp
|
||||
|
@@ -76,6 +76,21 @@ jobs:
|
||||
failed: 1
|
||||
|
||||
pod:
|
||||
probes:
|
||||
api:
|
||||
cinder-api:
|
||||
liveness:
|
||||
enabled: True
|
||||
params:
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
failureThreshold: 3
|
||||
successThreshold: 1
|
||||
readiness:
|
||||
enabled: True
|
||||
params:
|
||||
initialDelaySeconds: 30
|
||||
security_context:
|
||||
volume_usage_audit:
|
||||
pod:
|
||||
@@ -437,6 +452,7 @@ conf:
|
||||
composite:osapi_volume:
|
||||
use: call:cinder.api:root_app_factory
|
||||
/: apiversions
|
||||
/healthcheck: healthcheck
|
||||
/v1: openstack_volume_api_v1
|
||||
/v2: openstack_volume_api_v2
|
||||
/v3: openstack_volume_api_v3
|
||||
@@ -476,6 +492,10 @@ conf:
|
||||
paste.app_factory: cinder.api.v2.router:APIRouter.factory
|
||||
app:apiv3:
|
||||
paste.app_factory: cinder.api.v3.router:APIRouter.factory
|
||||
app:healthcheck:
|
||||
paste.app_factory: oslo_middleware:Healthcheck.app_factory
|
||||
backends: disable_by_file
|
||||
disable_by_file_path: /etc/cinder/healthcheck_disable
|
||||
pipeline:apiversions:
|
||||
pipeline: cors http_proxy_to_wsgi faultwrap osvolumeversionapp
|
||||
app:osvolumeversionapp:
|
||||
@@ -1304,6 +1324,7 @@ endpoints:
|
||||
# key: null
|
||||
path:
|
||||
default: '/v1/%(tenant_id)s'
|
||||
healthcheck: /healthcheck
|
||||
scheme:
|
||||
default: 'http'
|
||||
port:
|
||||
@@ -1326,6 +1347,7 @@ endpoints:
|
||||
# key: null
|
||||
path:
|
||||
default: '/v2/%(tenant_id)s'
|
||||
healthcheck: /healthcheck
|
||||
scheme:
|
||||
default: 'http'
|
||||
port:
|
||||
@@ -1348,6 +1370,7 @@ endpoints:
|
||||
# key: null
|
||||
path:
|
||||
default: '/v3/%(tenant_id)s'
|
||||
healthcheck: /healthcheck
|
||||
scheme:
|
||||
default: 'http'
|
||||
port:
|
||||
|
5
releasenotes/notes/cinder-a530fe90112c74d1.yaml
Normal file
5
releasenotes/notes/cinder-a530fe90112c74d1.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
cinder:
|
||||
- |
|
||||
Unhardcode readiness/liveness probe parameters for cinder-api
|
||||
...
|
Reference in New Issue
Block a user