k8s: expand chart sugar — probes, hpa/pdb, multi-port, ingress class, label scheme#3
Merged
Conversation
… label scheme Cover the gaps a real upstream chart (podinfo) needs when converted to (hexol k8s), staying clear of Helm-lifecycle features. Workload/deployment sugar: - liveness/readiness/startup probes via a `probe` sub-spec (httpGet/tcp/exec) - `strategy` sub-spec (RollingUpdate/Recreate + maxSurge/maxUnavailable) - multiple container ports via a `ports` list of `port` tuples - `empty-dir` scratch volumes alongside cm/sec/pvc/hostPath refs - pod-template `annotations` - `termination-grace-period` New builders: - `hpa` (autoscaling/v2 HorizontalPodAutoscaler): min/max replicas + CPU/memory - `pdb` (policy/v1 PodDisruptionBudget): minAvailable/maxUnavailable - multi-port `service` (`ports` list; single-port form unchanged) - `ingress` ingressClassName + repeated `host-rule` for multiple hosts/paths Label scheme: `current-label-key` parameter (default `app`) + `with-label-key` scope, so charts selecting on app.kubernetes.io/name interop; default unchanged. Examples + tests updated; existing tests/examples untouched in behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Expands
(hexol k8s)to cover the sugar gaps found converting the podinfo Helm chart to hexol, without pulling in any Helm-lifecycle machinery.New/expanded sugar:
probes, deploymentstrategy(RollingUpdate/Recreate + maxSurge/maxUnavailable), multiple containerports,empty-dirvolumes, pod-templateannotations,termination-grace-period.hpa(autoscaling/v2) with min/max replicas + CPU/memory target utilization.pdb(policy/v1) with minAvailable/maxUnavailable.service(list ofporttuples; single-port form unchanged).ingressingressClassName+ repeatedhost-rulefor multiple hosts/paths.current-label-key(defaultapp) +with-label-keyscope so charts selecting onapp.kubernetes.io/nameinterop; default unchanged.Why
A real upstream chart (podinfo) uses all of the above; the previous k8s vocab only had single-port workloads/services, single-host ingress, a hardcoded
applabel, and no probes/hpa/pdb/strategy — so a faithful conversion wasn't possible.Intentionally skipped (Helm lifecycle)
Hooks, subcharts/dependencies, and
.Release/.Chart/.Capabilitiesbuiltins — out of scope for a declarative resource library.Tests
make test,make test-examples, andhexol render/render -o yamlonexamples/kubernetes.scmall pass; existing tests/examples unchanged in behavior.