charts/hip-readiness-basic

Chart hip-readiness-basic 0.1.0 · apiVersion v3 · archive hip-readiness-basic-0.1.0.tgz (1022 B) · sha256 2534a8588e3d9ccf9834f1757ed48ede56dcd930bd7478e784352ce53d2172f7

HIP-0025 PR3 readiness annotations - Probe with configurable expressions

Source: charts/hip-readiness-basic in the harness commit.

Tests that read this chart

Inspect or install it

Upstream Helm cannot install a chart v3 yet. Use a helm binary of a tier: clone the repository and run make build TIERS=combined. Some charts must fail; the tests above show the expected result. All charts of the run are also a Helm chart repository.

export HELM_EXPERIMENTAL_CHART_V3=1
helm=.bin/helm-combined
chart=https://caretak3r.github.io/helm-hip-0025-e2e/20261102-005819-128778/charts/hip-readiness-basic-0.1.0.tgz

$helm show all $chart
$helm pull $chart --untar
$helm install r $chart --wait=ordered -n demo --create-namespace

Files

The 5 files in the archive: the files that helm loads from charts/hip-readiness-basic, byte for byte.

hip-readiness-basic/Chart.yaml · 142 B

apiVersion: v3
name: hip-readiness-basic
description: HIP-0025 PR3 readiness annotations - Probe with configurable expressions
version: 0.1.0

hip-readiness-basic/templates/_workload.tpl · 656 B

{{- /* slow-ready Deployment: (dict "root" $ "name" "x") */ -}}
{{- define "e2e.workload.basic" -}}
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ .name }}
spec:
  replicas: 1
  selector:
    matchLabels: {app: {{ .name }}}
  template:
    metadata:
      labels: {app: {{ .name }}}
    spec:
      terminationGracePeriodSeconds: 0
      containers:
        - name: web
          image: {{ .root.Values.deployment.image }}
          imagePullPolicy: IfNotPresent
          readinessProbe:
            httpGet: {path: /, port: 80}
            initialDelaySeconds: {{ .root.Values.deployment.readyDelay }}
            periodSeconds: 1
{{- end -}}

hip-readiness-basic/templates/deployment.yaml · 130 B

{{- if .Values.deployment.enabled }}
{{ include "e2e.workload.basic" (dict "root" $ "name" .Values.deployment.name) }}
{{- end }}

hip-readiness-basic/templates/probe.yaml · 1.2 KB

{{- if .Values.probes }}
{{- range .Values.probes }}
---
apiVersion: readiness.hip0025.example/v1
kind: Probe
metadata:
  name: {{ .name }}
  {{- if or .successExpressions .failureExpressions }}
  annotations:
    {{- if .successExpressions }}
    helm.sh/readiness-success: {{ toJson .successExpressions | quote }}
    {{- end }}
    {{- if .failureExpressions }}
    helm.sh/readiness-failure: {{ toJson .failureExpressions | quote }}
    {{- end }}
  {{- end }}
spec:
  target: {{ .name }}
status: {}
{{- end }}
{{- else if or .Values.probe.successExpressions .Values.probe.failureExpressions .Values.probe.name }}
apiVersion: readiness.hip0025.example/v1
kind: Probe
metadata:
  name: {{ .Values.probe.name }}
  {{- if .Values.probe.successExpressions }}
  annotations:
    helm.sh/readiness-success: {{ toJson .Values.probe.successExpressions | quote }}
    {{- if .Values.probe.failureExpressions }}
    helm.sh/readiness-failure: {{ toJson .Values.probe.failureExpressions | quote }}
    {{- end }}
  {{- else if .Values.probe.failureExpressions }}
  annotations:
    helm.sh/readiness-failure: {{ toJson .Values.probe.failureExpressions | quote }}
  {{- end }}
spec:
  target: test
status: {}
{{- end }}

hip-readiness-basic/values.yaml · 341 B

probes: []
# probes:
#   - name: probe1
#     successExpressions: ['"{.phase} == Ready"']
#     failureExpressions: ['"{.phase} == Failed"']

# Legacy single-probe support (deprecated)
probe:
  name: probe
  successExpressions: []
  failureExpressions: []

deployment:
  enabled: false
  name: app
  image: nginx:1.27-alpine
  readyDelay: 3