Skip to content

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 30 Oct 12:48
· 67 commits to main since this release
da2bdf2

The detection rules D011 to D014 (D014, a stuck rollout, from a new Deployment watch), a
richer context for the model (0017) and an optional standby replica, off by default (0019).
Upgrade the image and the chart together, since the new image needs the chart's deployments rule
to become Ready; the fingerprints of D001 and D003 change once, and the default memory limit is
192Mi.

Added

  • Detection rule D011, workload cannot create Pods: a Warning FailedCreate event about a
    ReplicaSet, a Job, a StatefulSet or a DaemonSet (a quota, an admission webhook or Pod Security
    admission refused the Pod), an incident about the Deployment, the CronJob or the controller
    itself, settled like D006 and D007.
  • Detection rule D012, volume claim cannot be provisioned: a Warning ProvisioningFailed event
    about a PersistentVolumeClaim, an incident about the claim. A Pod that waits for that claim is
    still D005, a second incident about its workload.
  • Detection rule D013, autoscaler cannot get metrics: a Warning FailedGetResourceMetric,
    FailedGetContainerResourceMetric, FailedGetPodsMetric, FailedGetObjectMetric,
    FailedGetExternalMetric, FailedComputeMetricsReplicas or FailedGetScale event about a
    HorizontalPodAutoscaler, an incident about the autoscaler.
  • Detection rule D014, rollout does not progress: a Deployment whose Progressing condition is
    False with reason ProgressDeadlineExceeded, not paused and observed at its current
    generation, an incident about the Deployment, with one fingerprint per revision. It yields to an
    explained incident of the same Deployment (a crash loop, a refused Pod), so a stall is explained
    once, and the request carries only the Deployment's replica counts and deadlines (rollout)
    (0018. Explain a Deployment past its progress deadline (D014) from a Deployment watch that is
    on by default, and add nothing for StatefulSets or DaemonSets
    ).
  • kausa run --no-rollouts turns the Deployment watch, and D014, off; the started line gains
    rollouts, and the log deployment watch error.
  • The chart's rollouts value, true by default (a missing value means on): false passes
    --no-rollouts and removes the deployments rule.
  • An optional standby replica: the chart's replicaCount value, 1 by default (a missing value
    or null means 1; anything but 1 or 2 is refused). With 2, two Pods run with
    Recreate, and the chart adds the Lease <fullname>-leader (spec: {}), a Role and
    RoleBinding of that name with get and patch on that one Lease in the release namespace (the
    same in both scopes), a PodDisruptionBudget (maxUnavailable: 1, unhealthyPodEvictionPolicy: AlwaysAllow), a preferred pod anti-affinity while affinity is empty, and a paragraph in
    NOTES.txt. With 1 the chart renders as before, byte for byte (0019. Offer an optional
    standby replica that takes over through a chart-created Lease, elected by kausa's own
    code
    ).
  • kausa run --leader-lease <NAMESPACE>/<NAME>: act only while holding that Lease, as a standby
    otherwise, in every mode; it needs POD_NAME. The started line gains leader_lease, and the
    log standby, leading, leadership lost, lease released, lease release failed and
    lease error.
  • The gauge kausa_leader (1 while the process acts, which is always without
    --leader-lease; 0 as a standby), and the counters kausa_leadership_changes_total{to} and
    kausa_lease_errors_total{call}.
  • /readyz answers 200 with standby on a replica that waits for the Lease.

Changed

  • Requests to the model carry each container's resource requests, each probe's handler, port and
    success threshold, the probe path without its query and fragment for D001 and D006, the image
    pull policy and the number of pull secrets for D002, and an unschedulable Pod's node selector,
    affinity and toleration keys (no values but kubernetes.io/os and kubernetes.io/arch) for
    D005; --dry-run shows them. Resource quantities are checked against the Kubernetes quantity
    grammar. The prompt version is 2, so Explanations store promptVersion "2". No permission,
    flag or chart value changes. A tight --max-input-tokens loses log bytes earlier on D001,
    D003 and D008 (0017. Send the model resource requests, probe handlers, image pull settings
    and an unschedulable Pod's scheduling keys, reduced and
    redacted
    ).
  • R003 redacts more names in event messages: the quoted name after pod, container and
    StorageClass (every name of a list), after a resource qualified by its API group
    (deployments.apps "<name>"), and the quota's name in exceeded quota: <name>. These run as a
    second pass after the pattern of 0.3.0, which is unchanged, so they only add redactions.
  • The request names a PersistentVolumeClaim or a HorizontalPodAutoscaler that an incident is about
    by its kind (persistentvolumeclaim-1, horizontalpodautoscaler-1), not as Object.
  • kausa reads Deployments: the chart grants list and watch on deployments (apps) in the
    ClusterRole and in every Role, while rollouts is on. No get, no write, nothing on
    StatefulSets or DaemonSets.
  • kausa runs three watches, Pods, Warning events and Deployments, on the whole cluster or in each
    listed namespace, and /readyz answers 200 once all of them have listed (3, or 3 × N; 2 and
    2 × N with --no-rollouts). kausa_watch_errors_total gains watch="deployments", and an
    ended Deployment watch stops kausa with the deployment watch ended.
  • Upgrade the chart and the image together: the new image without the deployments rule (the
    previous chart's role, RBAC made outside the chart, a read-only proxy) explains everything else
    but is never Ready; add the rule or use --no-rollouts.
  • The chart's default memory limit is 192Mi (was 128Mi): with 10,000 unschedulable Pods at the
    largest scheduling record kausa peaked at 138.8 MiB (Richer context,
    measured
    ).
  • An Event write (its create, and on a repeat its list and series patch) gives up after 10 seconds
    and logs event write failed with no answer within 10 seconds; it had no timeout. Each list
    and delete of the history sweep is bounded to 10 seconds within the sweep's 30. Both hold with
    or without --leader-lease (0019. Offer an optional standby replica that takes over through a
    chart-created Lease, elected by kausa's own code
    ).

Fixed

  • The fingerprint of a crash loop (D001) or an out-of-memory kill (D003) no longer depends on
    whether kausa saw the container waiting in CrashLoopBackOff or terminated between restarts:
    it hashes the container's name instead of the message. The same failure kept its Explanation and
    Event names only some of the time, after a restart of kausa for example. These fingerprints
    change once on upgrade, so a failure that was already explained gets one new Explanation.

Install

helm install kausa https://github.com/fedeam/kausa/releases/download/v0.4.0/kausa-0.4.0.tgz \
  -n kausa --create-namespace --set rbac.scope=cluster --set dryRun=true

Image: ghcr.io/fedeam/kausa:0.4.0 (ghcr.io/fedeam/kausa@sha256:bc1b21a9877d8702f00bd81cdd945462cfc041c8daff2cae09abf0fbab4080d1), linux/amd64 and linux/arm64.

Verify

With cosign v3 or later and the GitHub CLI:

cosign verify ghcr.io/fedeam/kausa@sha256:bc1b21a9877d8702f00bd81cdd945462cfc041c8daff2cae09abf0fbab4080d1 \
  --certificate-identity https://github.com/fedeam/kausa/.github/workflows/release.yml@refs/tags/v0.4.0 \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com
gh attestation verify oci://ghcr.io/fedeam/kausa@sha256:bc1b21a9877d8702f00bd81cdd945462cfc041c8daff2cae09abf0fbab4080d1 --repo fedeam/kausa
gh attestation verify kausa-0.4.0.tgz --repo fedeam/kausa \
  --bundle kausa-0.4.0.intoto.jsonl
cosign verify-blob SHA256SUMS --bundle SHA256SUMS.sigstore.json \
  --certificate-identity https://github.com/fedeam/kausa/.github/workflows/release.yml@refs/tags/v0.4.0 \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com
sha256sum -c SHA256SUMS