charts/hip-groups

Chart hip-groups 0.1.0 · apiVersion v3 · archive hip-groups-0.1.0.tgz (1.2 KB) · sha256 bf37c35e80bb2a8c9fe01a5aaf8c0b1d489c900bcbe2953a077c367e0dfcf7a4

HIP-0025 "Template examples" (database, queue -> app) plus the three unsequenced cases

Source: charts/hip-groups 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-groups-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-groups, byte for byte.

hip-groups/Chart.yaml · 147 B

apiVersion: v3
name: hip-groups
description: HIP-0025 "Template examples" (database, queue -> app) plus the three unsequenced cases
version: 0.1.0

hip-groups/templates/_workload.tpl · 847 B

{{- /* slow-ready Deployment: (dict "root" $ "name" "x" "group" "g" "deps" (list ...)) */ -}}
{{- define "e2e.workload" -}}
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ .name }}
  annotations:
    {{- with .group }}
    helm.sh/resource-group: {{ . }}
    {{- end }}
    {{- with .deps }}
    helm.sh/depends-on/resource-groups: {{ toJson . | quote }}
    {{- end }}
spec:
  replicas: 1
  selector:
    matchLabels: {app: {{ .name }}}
  template:
    metadata:
      labels: {app: {{ .name }}}
    spec:
      terminationGracePeriodSeconds: 0
      containers:
        - name: web
          image: {{ .root.Values.image }}
          imagePullPolicy: IfNotPresent
          readinessProbe:
            httpGet: {path: /, port: 80}
            initialDelaySeconds: {{ .root.Values.readyDelay }}
            periodSeconds: 1
{{- end -}}

hip-groups/templates/groups.yaml · 562 B

# HIP-0025 "Template examples": database and queue have no mutual dependency and
# deploy together; app waits for both. The dependency list is deliberately in the
# opposite order to the HIP text ("The order in which they are listed does not
# affect deployment sequencing").
{{ include "e2e.workload" (dict "root" $ "name" "db-service" "group" "database") }}
---
{{ include "e2e.workload" (dict "root" $ "name" "queue-processor" "group" "queue") }}
---
{{ include "e2e.workload" (dict "root" $ "name" "my-app" "group" "app" "deps" (list "queue" "database")) }}

hip-groups/templates/unsequenced.yaml · 658 B

# The three "Unsequenced Resources" cases: deployed after every sequenced group.
apiVersion: v1
kind: ConfigMap
metadata:
  name: loose            # lacks annotations
data: {case: no-annotations}
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: orphan           # depends on a group that does not exist -> warning
  annotations:
    helm.sh/resource-group: orphan
    helm.sh/depends-on/resource-groups: '["no-such-group"]'
data: {case: missing-dependency}
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: lonely           # isolated group: no edges in or out -> warning
  annotations:
    helm.sh/resource-group: lonely
data: {case: isolated-group}

hip-groups/values.yaml · 195 B

image: nginx:1.27-alpine
# Seconds before a workload reports Ready. Long enough that an implementation
# which does not wait for readiness applies the next group visibly too early.
readyDelay: 3