Merge "[ceph-rgw] Use Helm toolkit functions for Ceph RGW probes"

This commit is contained in:
Zuul 2023-08-25 19:56:59 +00:00 committed by Gerrit Code Review
commit aa862218fb
4 changed files with 38 additions and 14 deletions

View File

@ -15,6 +15,6 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Ceph RadosGW
name: ceph-rgw
version: 0.1.27
version: 0.1.28
home: https://github.com/ceph/ceph
...

View File

@ -12,6 +12,28 @@ See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- define "readinessProbeTemplate" }}
{{- $object_store_name := "object_store" }}
{{- if .Values.conf.rgw_s3.enabled }}
{{ $object_store_name = "ceph_object_store" }}
{{- end }}
httpGet:
path: /
port: {{ tuple $object_store_name "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
scheme: {{ tuple $object_store_name "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
{{- end }}
{{- define "livenessProbeTemplate" }}
{{- $object_store_name := "object_store" }}
{{- if .Values.conf.rgw_s3.enabled }}
{{ $object_store_name = "ceph_object_store" }}
{{- end }}
httpGet:
path: /
port: {{ tuple $object_store_name "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
scheme: {{ tuple $object_store_name "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
{{- end }}
{{- if and .Values.manifests.deployment_rgw ( and .Values.deployment.ceph .Values.conf.features.rgw ) }}
{{- $envAll := . }}
@ -195,19 +217,8 @@ spec:
- /tmp/rgw-start.sh
ports:
- containerPort: {{ tuple $object_store_name "internal" "api" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
livenessProbe:
httpGet:
path: /
port: {{ tuple $object_store_name "internal" "api" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
scheme: {{ tuple $object_store_name "internal" "api" $envAll | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
initialDelaySeconds: 120
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /
port: {{ tuple $object_store_name "internal" "api" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
scheme: {{ tuple $object_store_name "internal" "api" $envAll | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
timeoutSeconds: 5
{{ dict "envAll" . "component" "api" "container" "ceph-rgw" "type" "liveness" "probeTemplate" (include "livenessProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }}
{{ dict "envAll" . "component" "api" "container" "ceph-rgw" "type" "readiness" "probeTemplate" (include "readinessProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }}
volumeMounts:
- name: pod-tmp
mountPath: /tmp

View File

@ -239,6 +239,18 @@ pod:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
probes:
api:
ceph-rgw:
readiness:
enabled: true
params:
timeoutSeconds: 5
liveness:
enabled: true
params:
initialDelaySeconds: 120
timeoutSeconds: 5
network_policy:
rgw:

View File

@ -28,4 +28,5 @@ ceph-rgw:
- 0.1.25 Update all Ceph images to Focal
- 0.1.26 Replace node-role.kubernetes.io/master with control-plane
- 0.1.27 Update Ceph to 17.2.6
- 0.1.28 Use Helm toolkit functions for Ceph probes
...