[ceph-rgw] Use Helm toolkit functions for Ceph RGW probes
This change converts the readiness and liveness probes in the Ceph RGW chart to use the functions from the Helm toolkit rather than having hard-coded probe definitions. This allows probe configs to be overridden in values.yaml without rebuilding charts. Change-Id: Ia09d06746ee06f96f61a479b57a110c94e77c615
This commit is contained in:
parent
dc200450ea
commit
c984e2f169
@ -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
|
||||
...
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user