configmap

package
v1.7.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildLastModifiedByRevision added in v1.7.6

func BuildLastModifiedByRevision(ctx context.Context, c client.Client) (map[string]time.Time, error)

BuildLastModifiedByRevision lists istio-sidecar-injector ConfigMaps in istio-system, parses each, and returns revision -> LastModified for pod skip logic.

func Filter added in v1.7.5

func Filter() func(client.Object) bool

Filter returns a predicate function that filters ConfigMaps to only those in istio-system with name equal to or prefixed with istio-sidecar-injector.

func GetConfigMapLastModified

func GetConfigMapLastModified(cm *corev1.ConfigMap) time.Time

GetConfigMapLastModified returns the latest modification time of the ConfigMap. Uses metadata.managedFields timestamps when available; falls back to creationTimestamp.

func ReconcileRequest added in v1.7.5

func ReconcileRequest() ctrl.Request

ReconcileRequest returns a reconcile.Request that triggers a ConfigMap change reconciliation when istio-sidecar-injector* ConfigMaps in istio-system change. Used by the ConfigMap watch.

func ReconcileRequestName added in v1.7.5

func ReconcileRequestName() string

ReconcileRequestName returns the request name used for ConfigMap reconcile triggers. Used by the controller to identify ConfigMap-triggered requests.

Types

type IstioValues

type IstioValues struct {
	Revision string
	Hub      string
	Tag      string
	Image    string // global.proxy.image, e.g. "proxyv2"
}

IstioValues represents the extracted values from the Istio sidecar injector ConfigMap.

func ParseConfigMapValues

func ParseConfigMapValues(cm *corev1.ConfigMap) (*IstioValues, error)

ParseConfigMapValues extracts hub, tag, global.proxy.image, and revision from the ConfigMap's values JSON. Revision is taken from the values JSON (top-level or global) or the ConfigMap label istio.io/rev. Returns an error if the values key is missing or the JSON cannot be parsed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL