Merge "Use helm toolkit for readiness probes"
This commit is contained in:
commit
3f9d9a1394
@ -15,7 +15,7 @@ apiVersion: v1
|
|||||||
appVersion: v1.0.0
|
appVersion: v1.0.0
|
||||||
description: OpenStack-Helm Nagios
|
description: OpenStack-Helm Nagios
|
||||||
name: nagios
|
name: nagios
|
||||||
version: 0.1.7
|
version: 0.1.8
|
||||||
home: https://www.nagios.org
|
home: https://www.nagios.org
|
||||||
sources:
|
sources:
|
||||||
- https://opendev.org/openstack/openstack-helm-addons
|
- https://opendev.org/openstack/openstack-helm-addons
|
||||||
|
@ -12,6 +12,17 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
|
{{- define "apacheProxyReadinessProbeTemplate" }}
|
||||||
|
tcpSocket:
|
||||||
|
port: {{ tuple "nagios" "internal" "http" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- define "nagiosReadinessProbeTemplate" }}
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /tmp/nagios-readiness.sh
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{- if .Values.manifests.deployment }}
|
{{- if .Values.manifests.deployment }}
|
||||||
{{- $envAll := . }}
|
{{- $envAll := . }}
|
||||||
|
|
||||||
@ -19,6 +30,7 @@ limitations under the License.
|
|||||||
|
|
||||||
{{- $serviceAccountName := "nagios" }}
|
{{- $serviceAccountName := "nagios" }}
|
||||||
{{ tuple $envAll "nagios" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
{{ tuple $envAll "nagios" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
@ -120,17 +132,13 @@ spec:
|
|||||||
{{ tuple $envAll "apache_proxy" | include "helm-toolkit.snippets.image" | indent 10 }}
|
{{ tuple $envAll "apache_proxy" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
{{ tuple $envAll $envAll.Values.pod.resources.apache_proxy | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
{{ tuple $envAll $envAll.Values.pod.resources.apache_proxy | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
{{ dict "envAll" $envAll "application" "monitoring" "container" "apache_proxy" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
|
{{ dict "envAll" $envAll "application" "monitoring" "container" "apache_proxy" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
|
||||||
|
{{ dict "envAll" $envAll "component" "monitoring" "container" "apache_proxy" "type" "readiness" "probeTemplate" (include "apacheProxyReadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
|
||||||
command:
|
command:
|
||||||
- /tmp/apache.sh
|
- /tmp/apache.sh
|
||||||
- start
|
- start
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: {{ tuple "nagios" "internal" "http" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
containerPort: {{ tuple "nagios" "internal" "http" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
readinessProbe:
|
|
||||||
tcpSocket:
|
|
||||||
port: {{ tuple "nagios" "internal" "http" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
|
||||||
initialDelaySeconds: 20
|
|
||||||
periodSeconds: 10
|
|
||||||
env:
|
env:
|
||||||
- name: NAGIOSADMIN_USER
|
- name: NAGIOSADMIN_USER
|
||||||
valueFrom:
|
valueFrom:
|
||||||
@ -157,15 +165,10 @@ spec:
|
|||||||
{{ tuple $envAll "nagios" | include "helm-toolkit.snippets.image" | indent 10 }}
|
{{ tuple $envAll "nagios" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
{{ tuple $envAll $envAll.Values.pod.resources.nagios | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
{{ tuple $envAll $envAll.Values.pod.resources.nagios | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
{{ dict "envAll" $envAll "application" "monitoring" "container" "nagios" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
|
{{ dict "envAll" $envAll "application" "monitoring" "container" "nagios" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
|
||||||
|
{{ dict "envAll" $envAll "component" "monitoring" "container" "nagios" "type" "readiness" "probeTemplate" (include "nagiosReadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
|
||||||
ports:
|
ports:
|
||||||
- name: nagios
|
- name: nagios
|
||||||
containerPort: {{ tuple "nagios" "internal" "nagios" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
containerPort: {{ tuple "nagios" "internal" "nagios" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
readinessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /tmp/nagios-readiness.sh
|
|
||||||
initialDelaySeconds: 60
|
|
||||||
periodSeconds: 30
|
|
||||||
env:
|
env:
|
||||||
{{- if .Values.pod.env }}
|
{{- if .Values.pod.env }}
|
||||||
{{ include "helm-toolkit.utils.to_k8s_env_vars" .Values.pod.env | indent 12 }}
|
{{ include "helm-toolkit.utils.to_k8s_env_vars" .Values.pod.env | indent 12 }}
|
||||||
|
@ -269,6 +269,21 @@ pod:
|
|||||||
# NODE_DOMAIN:
|
# NODE_DOMAIN:
|
||||||
replicas:
|
replicas:
|
||||||
nagios: 1
|
nagios: 1
|
||||||
|
probes:
|
||||||
|
monitoring:
|
||||||
|
nagios:
|
||||||
|
readiness:
|
||||||
|
enabled: true
|
||||||
|
params:
|
||||||
|
initialDelaySeconds: 60
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 10
|
||||||
|
apache_proxy:
|
||||||
|
readiness:
|
||||||
|
enabled: true
|
||||||
|
params:
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 10
|
||||||
resources:
|
resources:
|
||||||
enabled: false
|
enabled: false
|
||||||
nagios:
|
nagios:
|
||||||
|
@ -8,4 +8,5 @@ nagios:
|
|||||||
- 0.1.5 Switch nagios image from xenial to bionic
|
- 0.1.5 Switch nagios image from xenial to bionic
|
||||||
- 0.1.6 Added OCI registry authentication
|
- 0.1.6 Added OCI registry authentication
|
||||||
- 0.1.7 Upgrade osh-selenium image to latest-ubuntu_focal
|
- 0.1.7 Upgrade osh-selenium image to latest-ubuntu_focal
|
||||||
|
- 0.1.8 Use helm toolkit for readiness probes
|
||||||
...
|
...
|
||||||
|
Loading…
Reference in New Issue
Block a user