Use HTTP probe instead of TCP probe

Strictly speaking, open socket doesn't mean working API.
We experienced API stopped responding and the socket was still
open so API was unhealthy actually but kubernetes did not restart.

HTTP probe will fix this issue.

Change-Id: I95bb3ad3123d8a4a784d260477f037fa5506d290
This commit is contained in:
okozachenko 2022-08-18 22:52:06 +10:00
parent e945ebcf61
commit f3ed56cc18
42 changed files with 107 additions and 42 deletions

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Barbican
name: barbican
version: 0.2.16
version: 0.2.17
home: https://docs.openstack.org/barbican/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Barbican/OpenStack_Project_Barbican_vertical.png
sources:

View File

@ -74,7 +74,9 @@ spec:
- name: b-api
containerPort: {{ tuple "key_manager" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
readinessProbe:
tcpSocket:
httpGet:
scheme: HTTP
path: /
port: {{ tuple "key_manager" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
volumeMounts:
- name: pod-tmp

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Cinder
name: cinder
version: 0.2.27
version: 0.2.28
home: https://docs.openstack.org/cinder/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Cinder/OpenStack_Project_Cinder_vertical.png
sources:

View File

@ -95,10 +95,14 @@ spec:
- name: c-api
containerPort: {{ tuple "volumev3" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
readinessProbe:
tcpSocket:
httpGet:
scheme: {{ tuple "volumev3" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
path: /
port: {{ tuple "volumev3" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
livenessProbe:
tcpSocket:
httpGet:
scheme: {{ tuple "volumev3" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
path: /
port: {{ tuple "volumev3" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
initialDelaySeconds: 30
failureThreshold: 3

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Designate
name: designate
version: 0.2.6
version: 0.2.7
home: https://docs.openstack.org/designate/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Designate/OpenStack_Project_Designate_vertical.jpg
sources:

View File

@ -67,7 +67,9 @@ spec:
- name: dns-api
containerPort: {{ tuple "dns" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
readinessProbe:
tcpSocket:
httpGet:
scheme: {{ tuple "dns" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
path: /
port: {{ tuple "dns" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
volumeMounts:
- name: designate-bin

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Glance
name: glance
version: 0.3.10
version: 0.3.11
home: https://docs.openstack.org/glance/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Glance/OpenStack_Project_Glance_vertical.png
sources:

View File

@ -172,10 +172,14 @@ spec:
- name: g-api
containerPort: {{ tuple "image" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
readinessProbe:
tcpSocket:
httpGet:
scheme: HTTP
path: /
port: {{ tuple "image" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
livenessProbe:
tcpSocket:
httpGet:
scheme: HTTP
path: /
port: {{ tuple "image" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{- end }}
volumeMounts:

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Heat
name: heat
version: 0.2.16
version: 0.2.17
home: https://docs.openstack.org/heat/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Heat/OpenStack_Project_Heat_vertical.png
sources:

View File

@ -80,10 +80,14 @@ spec:
- name: h-api
containerPort: {{ tuple "orchestration" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
readinessProbe:
tcpSocket:
httpGet:
scheme: {{ tuple "orchestration" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
path: /
port: {{ tuple "orchestration" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
livenessProbe:
tcpSocket:
httpGet:
scheme: {{ tuple "orchestration" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
path: /
port: {{ tuple "orchestration" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
initialDelaySeconds: 30
volumeMounts:

View File

@ -80,10 +80,14 @@ spec:
- name: h-cfn
containerPort: {{ tuple "cloudformation" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
readinessProbe:
tcpSocket:
httpGet:
scheme: {{ tuple "cloudformation" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
path: /
port: {{ tuple "cloudformation" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
livenessProbe:
tcpSocket:
httpGet:
scheme: {{ tuple "cloudformation" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
path: /
port: {{ tuple "cloudformation" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
initialDelaySeconds: 30
volumeMounts:

View File

@ -74,7 +74,9 @@ spec:
- name: h-cwh
containerPort: {{ tuple "cloudwatch" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
readinessProbe:
tcpSocket:
httpGet:
scheme: {{ tuple "cloudwatch" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
path: /
port: {{ tuple "cloudwatch" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
volumeMounts:
- name: pod-tmp

View File

@ -152,6 +152,7 @@ endpoints:
kind: ClusterIssuer
scheme:
default: https
service: https
port:
api:
public: 443
@ -165,6 +166,7 @@ endpoints:
kind: ClusterIssuer
scheme:
default: https
service: https
port:
api:
public: 443

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Ironic
name: ironic
version: 0.2.6
version: 0.2.7
home: https://docs.openstack.org/ironic/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Ironic/OpenStack_Project_Ironic_vertical.png
sources:

View File

@ -114,7 +114,9 @@ spec:
ports:
- containerPort: {{ tuple "baremetal" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
readinessProbe:
tcpSocket:
httpGet:
scheme: {{ tuple "baremetal" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
path: /
port: {{ tuple "baremetal" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
volumeMounts:
- name: pod-tmp

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Masakari
name: masakari
version: 0.1.5
version: 0.1.6
home: https://docs.openstack.org/developer/masakari
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Masakari/OpenStack_Project_masakari_vertical.png
sources:

View File

@ -13,12 +13,16 @@ limitations under the License.
*/}}
{{- define "masakariApiLivenessProbeTemplate" }}
tcpSocket:
httpGet:
scheme: {{ tuple "instance_ha" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
path: /
port: {{ tuple "instance_ha" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{- end }}
{{- define "masakariApiReadinessProbeTemplate" }}
tcpSocket:
httpGet:
scheme: HTTP
path: /
port: {{ tuple "instance_ha" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{- end }}

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Mistral
name: mistral
version: 0.2.5
version: 0.2.6
home: https://docs.openstack.org/mistral/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Mistral/OpenStack_Project_Mistral_vertical.png
sources:

View File

@ -71,7 +71,9 @@ spec:
- name: w-api
containerPort: {{ tuple "workflowv2" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
readinessProbe:
tcpSocket:
httpGet:
scheme: {{ tuple "workflowv2" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
path: /
port: {{ tuple "workflowv2" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
volumeMounts:
- name: pod-tmp

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Neutron
name: neutron
version: 0.2.25
version: 0.2.26
home: https://docs.openstack.org/neutron/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Neutron/OpenStack_Project_Neutron_vertical.png
sources:

View File

@ -21,7 +21,9 @@ exec:
- "import requests; requests.get('http://127.0.0.1:{{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}')"
initialDelaySeconds: 30
{{- else }}
tcpSocket:
httpGet:
scheme: {{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
path: /
port: {{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{- end }}
{{- end }}
@ -34,7 +36,9 @@ exec:
- "import requests; requests.get('http://127.0.0.1:{{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}')"
initialDelaySeconds: 30
{{- else }}
tcpSocket:
httpGet:
scheme: {{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
path: /
port: {{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{- end }}
{{- end }}
@ -120,7 +124,9 @@ spec:
- name: SHORTNAME
value: {{ tuple "network" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" | quote }}
readinessProbe:
tcpSocket:
httpGet:
scheme: HTTPS
path: /
port: {{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
command:
- /tmp/nginx.sh

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Nova
name: nova
version: 0.2.45
version: 0.2.46
home: https://docs.openstack.org/nova/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Nova/OpenStack_Project_Nova_vertical.png
sources:

View File

@ -13,12 +13,16 @@ limitations under the License.
*/}}
{{- define "novaApiMetadataLivenessProbeTemplate" }}
tcpSocket:
httpGet:
scheme: {{ tuple "compute_metadata" "service" "metadata" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
path: /
port: {{ .Values.network.metadata.port }}
{{- end }}
{{- define "novaApiMetadataReadinessProbeTemplate" }}
tcpSocket:
httpGet:
scheme: {{ tuple "compute_metadata" "service" "metadata" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
path: /
port: {{ .Values.network.metadata.port }}
{{- end }}

View File

@ -13,12 +13,16 @@ limitations under the License.
*/}}
{{- define "novaApiOsapiLivenessProbeTemplate" }}
tcpSocket:
httpGet:
scheme: {{ tuple "compute" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
path: /
port: {{ tuple "compute" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{- end }}
{{- define "novaApiOsapiReadinessProbeTemplate" }}
tcpSocket:
httpGet:
scheme: {{ tuple "compute" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
path: /
port: {{ tuple "compute" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{- end }}

View File

@ -24,7 +24,7 @@ conf:
ThreadLimit 720
</IfModule>
wsgi_nova_api: |
{{- $portInt := tuple "compute" "internal" "api" $ | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{- $portInt := tuple "compute" "service" "api" $ | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
Listen {{ $portInt }}
<VirtualHost *:{{ $portInt }}>
ServerName {{ printf "%s.%s.svc.%s" "nova-api" .Release.Namespace .Values.endpoints.cluster_domain_suffix }}
@ -50,7 +50,7 @@ conf:
SSLHonorCipherOrder on
</VirtualHost>
wsgi_nova_metadata: |
{{- $portInt := tuple "compute_metadata" "internal" "metadata" $ | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{- $portInt := tuple "compute_metadata" "service" "metadata" $ | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
Listen {{ $portInt }}
<VirtualHost *:{{ $portInt }}>
ServerName {{ printf "%s.%s.svc.%s" "nova-metadata" .Release.Namespace .Values.endpoints.cluster_domain_suffix }}
@ -135,6 +135,7 @@ endpoints:
kind: ClusterIssuer
scheme:
default: 'https'
service: 'https'
port:
api:
public: 443

View File

@ -16,7 +16,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Octavia
name: octavia
version: 0.2.6
version: 0.2.7
home: https://docs.openstack.org/octavia/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Octavia/OpenStack_Project_Octavia_vertical.png
sources:

View File

@ -72,7 +72,9 @@ spec:
- name: o-api
containerPort: {{ tuple "load_balancer" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
readinessProbe:
tcpSocket:
httpGet:
scheme: {{ tuple "load_balancer" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
path: /
port: {{ tuple "load_balancer" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
volumeMounts:
- name: pod-etc-octavia

View File

@ -16,7 +16,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Placement
name: placement
version: 0.2.11
version: 0.2.12
home: https://docs.openstack.org/placement/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Placement/OpenStack_Project_Placement_vertical.png
sources:

View File

@ -77,13 +77,16 @@ spec:
- name: p-api
containerPort: {{ tuple "placement" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
readinessProbe:
# NOTE(portdirect): use tcpSocket check as HTTP will return 401
tcpSocket:
httpGet:
scheme: {{ tuple "placement" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
path: /
port: {{ tuple "placement" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
initialDelaySeconds: 15
periodSeconds: 10
livenessProbe:
tcpSocket:
httpGet:
scheme: {{ tuple "placement" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
path: /
port: {{ tuple "placement" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
initialDelaySeconds: 50
periodSeconds: 10

View File

@ -13,13 +13,13 @@ conf:
keystone_authtoken:
cafile: /etc/placement/certs/ca.crt
wsgi_placement: |
Listen 0.0.0.0:{{ tuple "placement" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
Listen 0.0.0.0:{{ tuple "placement" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
CustomLog /dev/stdout combined env=!forwarded
CustomLog /dev/stdout proxy env=forwarded
<VirtualHost *:{{ tuple "placement" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}>
<VirtualHost *:{{ tuple "placement" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}>
ServerName {{ printf "%s.%s.svc.%s" "placement-api" .Release.Namespace .Values.endpoints.cluster_domain_suffix }}
WSGIDaemonProcess placement-api processes=4 threads=1 user=placement group=placement display-name=%{GROUP}
WSGIProcessGroup placement-api
@ -71,6 +71,7 @@ endpoints:
kind: ClusterIssuer
scheme:
default: https
service: https
port:
api:
public: 443

View File

@ -20,4 +20,5 @@ barbican:
- 0.2.14 Add Xena and Yoga values overrides
- 0.2.15 Added OCI registry authentication
- 0.2.16 Distinguish between port number of internal endpoint and binding port number
- 0.2.17 Use HTTP probe instead of TCP probe
...

View File

@ -44,4 +44,5 @@ cinder:
- 0.2.25 Remove volumes unrelated with ceph backend from conditional volume list in cinder-volume deployment
- 0.2.26 Distinguish between port number of internal endpoint and binding port number
- 0.2.27 Support TLS endpoints
- 0.2.28 Use HTTP probe instead of TCP probe
...

View File

@ -10,4 +10,5 @@ designate:
- 0.2.4 Update default image values to Wallaby
- 0.2.5 Migrated PodDisruptionBudget resource to policy/v1 API version
- 0.2.6 Added OCI registry authentication
- 0.2.7 Use HTTP probe instead of TCP probe
...

View File

@ -31,4 +31,5 @@ glance:
- 0.3.8 Added OCI registry authentication
- 0.3.9 Support TLS endpoints
- 0.3.10 Distinguish between port number of internal endpoint and binding port number
- 0.3.11 Use HTTP probe instead of TCP probe
...

View File

@ -23,4 +23,5 @@ heat:
- 0.2.14 Added OCI registry authentication
- 0.2.15 Distinguish between port number of internal endpoint and binding port number
- 0.2.16 Support TLS endpoints
- 0.2.17 Use HTTP probe instead of TCP probe
...

View File

@ -10,4 +10,5 @@ ironic:
- 0.2.4 Update defaults to W release
- 0.2.5 Migrated PodDisruptionBudget resource to policy/v1 API version
- 0.2.6 Added OCI registry authentication
- 0.2.7 Use HTTP probe instead of TCP probe
...

View File

@ -6,4 +6,5 @@ masakari:
- 0.1.3 Mount sudoers file for masakari hostmonitors
- 0.1.4 Migrated PodDisruptionBudget resource to policy/v1 API version
- 0.1.5 Added OCI registry authentication
- 0.1.6 Use HTTP probe instead of TCP probe
...

View File

@ -9,4 +9,5 @@ mistral:
- 0.2.3 Update default imaage values to Wallaby
- 0.2.4 Migrated PodDisruptionBudget resource to policy/v1 API version
- 0.2.5 Added OCI registry authentication
- 0.2.6 Use HTTP probe instead of TCP probe
...

View File

@ -39,4 +39,5 @@ neutron:
- 0.2.23 Add neutron_netns_cleanup_cron release image override, so that the respective release image is used
- 0.2.24 Added OCI registry authentication
- 0.2.25 Support TLS endpoints
- 0.2.26 Use HTTP probe instead of TCP probe
...

View File

@ -66,4 +66,5 @@ nova:
- 0.2.43 Added OCI registry authentication
- 0.2.44 Distinguish between port number of internal endpoint and binding port number
- 0.2.45 Support TLS endpoints for metadata-api
- 0.2.46 Use HTTP probe instead of TCP probe
...

View File

@ -10,4 +10,5 @@ octavia:
- 0.2.4 Fix transport_url
- 0.2.5 Migrated PodDisruptionBudget resource to policy/v1 API version
- 0.2.6 Added OCI registry authentication
- 0.2.7 Use HTTP probe instead of TCP probe
...

View File

@ -20,4 +20,5 @@ placement:
- 0.2.9 Add Xena and Yoga values overrides
- 0.2.10 Added OCI registry authentication
- 0.2.11 Distinguish between port number of internal endpoint and binding port number
- 0.2.12 Use HTTP probe instead of TCP probe
...