deploy/helm/health_checks/nccl_healthcheck/templates/nccl_healthcheck.yaml [17:51]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{- $check_time := default (printf "%s" (now | unixEpoch)) .Values.job.check_time -}}
{{- $base_name := default "chs-hc" .Values.job.base_name -}}
{{- $unique_suffix := printf "%s-%s" $guid $check_time -}}
{{- $extra_info := printf "%s" .Values.health_check.name }}
{{- $unique_name := printf "%s-%s-%s" $base_name $extra_info $unique_suffix | replace "_" "-"  }}
{{- $unique_svc_name := printf "%s-%s-headless-svc-%s" $base_name $extra_info $unique_suffix | replace "_" "-"  }}
{{- $expiry_time := int (sub  $check_time (mul .Values.health_check.env.HEALTH_VALIDITY_HOURS 60 60)) -}}
---
apiVersion: v1
kind: Service
metadata:
  name: {{ $unique_svc_name }}
spec:
  clusterIP: None  #  clusterIP must be None to create a headless service
  selector:
    job-name: {{ $unique_name }}  # must match Job name
---
apiVersion: batch/v1
kind: Job
metadata:
  name: {{ $unique_name }}
  labels:
    app-name: {{ .Values.health_check.name }}
spec:
  completions: {{ .Values.health_check.env.NHOSTS }}
  parallelism: {{ .Values.health_check.env.NHOSTS }}
  completionMode: Indexed
  template:
    metadata:
      labels:
        app-name: {{ .Values.health_check.name }}
    spec:
      tolerations:
      - operator: "Exists"
      serviceAccountName: {{ $unique_name }}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



deploy/helm/health_checks/tinymax_healthcheck/templates/tinymax_healthcheck.yaml [17:51]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{- $check_time := default (printf "%s" (now | unixEpoch)) .Values.job.check_time -}}
{{- $base_name := default "chs-hc" .Values.job.base_name -}}
{{- $unique_suffix := printf "%s-%s" $guid $check_time -}}
{{- $extra_info := printf "%s" .Values.health_check.name }}
{{- $unique_name := printf "%s-%s-%s" $base_name $extra_info $unique_suffix | replace "_" "-"  }}
{{- $unique_svc_name := printf "%s-%s-headless-svc-%s" $base_name $extra_info $unique_suffix | replace "_" "-"  }}
{{- $expiry_time := int (sub  $check_time (mul .Values.health_check.env.HEALTH_VALIDITY_HOURS 60 60)) -}}
---
apiVersion: v1
kind: Service
metadata:
  name: {{ $unique_svc_name }}
spec:
  clusterIP: None  #  clusterIP must be None to create a headless service
  selector:
    job-name: {{ $unique_name }}  # must match Job name
---
apiVersion: batch/v1
kind: Job
metadata:
  name: {{ $unique_name }}
  labels:
    app-name: {{ .Values.health_check.name }}
spec:
  completions: {{ .Values.health_check.env.NHOSTS }}
  parallelism: {{ .Values.health_check.env.NHOSTS }}
  completionMode: Indexed
  template:
    metadata:
      labels:
        app-name: {{ .Values.health_check.name }}
    spec:
      tolerations:
      - operator: "Exists"
      serviceAccountName: {{ $unique_name }}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



