Documentation
¶
Overview ¶
Package crds carries the CRDs this build expects the cluster to have, and checks at startup that it does.
Helm installs a chart's crds/ directory once and never touches it again on upgrade. That is documented Helm behaviour rather than a bug, but it means `helm upgrade hecate` ships a new controller against the old API — and the API server *prunes* fields it does not recognise rather than rejecting them. The object stores without them, kubectl reports success, and the controller reads a zero value. Nothing anywhere says why (#117).
So the controller refuses to run against an API older than itself. A failed rollout naming the one command that fixes it is worth a great deal more than a Beacon that has quietly stopped honouring one of its fields.
The YAML here is a copy of charts/hecate/crds, made by `make generate`, because go:embed cannot reach outside its own package. `make check` fails if the two drift.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶
Check reports whether the cluster's CRDs declare everything this build needs.
One-directional on purpose: it asks whether the cluster is *missing* anything, not whether the two are identical. A cluster running CRDs newer than this binary is fine — the extra fields are simply unread — and failing on that would make every rollback an outage. It also means a cosmetic regeneration (a controller-gen bump rewording descriptions) cannot fail the check, which matters when the consequence is a controller that will not boot.
Types ¶
type MissingError ¶
type MissingError struct{ Names []string }
MissingError is a CRD that is not installed at all.
func (*MissingError) Error ¶
func (e *MissingError) Error() string