Commit Graph
4 Commits
Author SHA1 Message Date
Rowan Ruselerandkfox1111 b0aa3e4266 Fix duplicate port names in controller-manager containers (#751)
* Fix duplicate port names in controller-manager containers

Multiple controller-manager containers were using the same "heathz" port
name, causing Kubernetes warnings about duplicate ports in the
StatefulSet. This also affected the prometheus port "prom-cm".

Changes:
* Renamed healthz port to hp-cm (health port - controller manager)
* Renamed prom-cm to pm-cm for consistency
* Addedd {{ .portSuffix }} variable to differentiate external controller
  ports
* Implemented port suffix logic

The suffix logic handles cluster names by:
1. Names <9 chars: use full name as suffic
  * e.g.: child01 -> -child01
2. Names with trailing numbers: preserve the number format users chose
  * Detects 1-2 digit numbers with optional hyphen
  * Truncates base name to fit within 15 chars
  * e.g.: verlongcluster-01 -> -verylo-01
3. Names without numbers: use SHA-256 hash for uniqueness
  * Trunactes name to 5 chars and appends 3-char hash
  * e.g.: verlongclustername -> -veryl-a3f

The logic separates container suffix (full name) from port suffix
(truncated) so container names remain descriptive while port names stay
compliant.

Fixes #525 #655

Signed-off-by: Rowan Ruseler <[email protected]>

* Add optional port name overrides for ext. controller

The auto-generated port name suffixes for external controller manager
can collide when cluster names are similar, as the 3-character has
provides only 4,096 possibilities. With the optional healthPortName and
prometheusPortName fields to cluster configuration, allows users to
explicity set port names when automatica generation creates collisions.

Signed-off-by: Rowan Ruseler <[email protected]>

* Fix portSuffix generation

Changed from "and" to "or", so portSuffic is calculated when either
healthPortName or prometheusPortName is unset.

Signed-off-by: Rowan Ruseler <[email protected]>

---------

Signed-off-by: Rowan Ruseler <[email protected]>
Co-authored-by: kfox1111 <[email protected]>
2026-02-23 15:20:25 +01:00
Rowan Ruselerandkfox1111 e849a1fbd6 Add configurable hostNetwork parameter for spire-agent (#749)
* Add configurable hostNetwork parameter for spire-agent

Adds `hostNetwork` as a configurable parameter in the spire-agent chart.
We can now explicitly control whether the spire-agent daemonset uses
host networking.

Changes:
* Updated daemonset template
* Changed `dnsPolicy` logic to follow the computed `hostNetwork` instead
  of kubelet mode directly
* Updated documentation

Behaviour:
If you leave `hostNetwork` empty (the default), it behaves like PR #705:
* automatically disables when using hostname or hostip kubelet modes
* automatically enables for localhost

If you set it explicitly to `true` or `false`, that overrides the
automatic behaviour. When `hostNetwork` is enabled and you haven't set a
custom `dnsPolicy`, it defaults to `ClusterFirstWithHostNet`.

Fixes #704

Signed-off-by: Rowan Ruseler <[email protected]>

* Fix merge conflict, different default value for fsGroupFix.image.tag

Signed-off-by: Rowan Ruseler <[email protected]>

---------

Signed-off-by: Rowan Ruseler <[email protected]>
Co-authored-by: kfox1111 <[email protected]>
2026-02-14 00:57:20 +00:00
Rowan Ruseler 75ffbd06f5 Add imagePullSecrets support to helm hook jobs (#741)
* Add imagePullSecrets support to helm hook jobs

Hook jobs lacked imagePullSecrets configuration on their pod specs,
causing image pull failures in environments using private registries
with authentication

* spire-server: post-install, pre-upgrade, post-upgrade, pre-delete
  hooks
* spire-oidc-discovery-provider: pre-delete hook
* spike-nexus: bootstrap hook
* spire: global imagePullSecrets

Fixes #649

Signed-off-by: Rowan Ruseler <[email protected]>

* Document global.imagePullSecrets parameter

Signed-off-by: Rowan Ruseler <[email protected]>

* Replaced non functioning 'or' with 'coalesce'

Signed-off-by: Rowan Ruseler <[email protected]>

---------

Signed-off-by: Rowan Ruseler <[email protected]>
2026-02-11 15:16:16 -08:00
Rowan Ruselerandkfox1111 141c8865a3 Add pobLabels support to csi and oidc (#744)
spiffe-csi-driver and spiffe-oidc-discovery provider are now brought in
line with spire-server and spire-agent, which already support podLabels.

Changes:
* Add podLabels parameter

Fixes #719

Signed-off-by: Rowan Ruseler <[email protected]>
Co-authored-by: kfox1111 <[email protected]>
2026-02-10 15:03:54 -08:00