Add sidecar profile (#192)

This change adds a new SidecarProfile resource which allows configuring
client sidecar injection into pods. It replaces the older annotation
based solution. This removes any pod specific configuration from the
setup key and puts it all in this side car configuration.

Fixes #188

Signed-off-by: Philip Laine <philip.laine@gmail.com>
This commit is contained in:
Philip Laine
2026-04-23 19:17:53 +02:00
committed by GitHub
parent 876a0e1eb3
commit 9838f0dccc
14 changed files with 1447 additions and 29 deletions
@@ -0,0 +1,35 @@
// Code generated by controller-gen. DO NOT EDIT.
package v1alpha1
import (
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// SidecarProfileStatusApplyConfiguration represents a declarative configuration of the SidecarProfileStatus type for use
// with apply.
//
// SidecarProfileStatus defines the observed state of SidecarProfile.
type SidecarProfileStatusApplyConfiguration struct {
// Conditions holds the conditions for the SidecarProfile.
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
}
// SidecarProfileStatusApplyConfiguration constructs a declarative configuration of the SidecarProfileStatus type for use with
// apply.
func SidecarProfileStatus() *SidecarProfileStatusApplyConfiguration {
return &SidecarProfileStatusApplyConfiguration{}
}
// WithConditions adds the given value to the Conditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Conditions field.
func (b *SidecarProfileStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *SidecarProfileStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithConditions")
}
b.Conditions = append(b.Conditions, *values[i])
}
return b
}