Documentation
¶
Index ¶
Constants ¶
const ( DefaultRunAsUserKey = "default-run-as-user" DefaultRunAsGroupKey = "default-run-as-group" DefaultFSGroupKey = "default-fs-group" DefaultServiceAccountValue = "default" )
const ( StableAPIFieldValue = "stable" AlphaAPIFieldValue = "alpha" DefaultEnableAPIFields = StableAPIFieldValue )
Variables ¶
This section is empty.
Functions ¶
func GetCoreInterceptorsConfigName ¶ added in v0.35.1
func GetCoreInterceptorsConfigName() string
GetCoreInterceptorsConfigName returns the name of the configmap containing core interceptor configuration.
func GetDefaultsConfigName ¶
func GetDefaultsConfigName() string
GetDefaultsConfigName returns the name of the configmap containing all defined defaults.
func GetFeatureFlagsConfigName ¶
func GetFeatureFlagsConfigName() string
GetFeatureFlagsConfigName returns the name of the configmap containing all feature flags.
Types ¶
type Config ¶
type Config struct {
Defaults *Defaults
FeatureFlags *FeatureFlags
CoreInterceptors *CoreInterceptorsConfig
}
Config holds the collection of configurations that we attach to contexts. +k8s:deepcopy-gen=false
func FromContext ¶
FromContext extracts a Config from the provided context.
func FromContextOrDefaults ¶
FromContextOrDefaults is like FromContext, but when no Config is attached it returns a Config populated with the defaults for each of the Config fields.
type CoreInterceptorsConfig ¶ added in v0.35.1
type CoreInterceptorsConfig struct {
EnterpriseHostAllowlist []string
}
CoreInterceptorsConfig holds configuration for the core interceptors service. +k8s:deepcopy-gen=true
func NewCoreInterceptorsFromConfigMap ¶ added in v0.35.1
func NewCoreInterceptorsFromConfigMap(config *corev1.ConfigMap) (*CoreInterceptorsConfig, error)
NewCoreInterceptorsFromConfigMap returns a CoreInterceptors for the given configmap
func NewCoreInterceptorsFromMap ¶ added in v0.35.1
func NewCoreInterceptorsFromMap(cfgMap map[string]string) (*CoreInterceptorsConfig, error)
NewCoreInterceptorsFromMap returns a CoreInterceptors given a map corresponding to a ConfigMap
func (*CoreInterceptorsConfig) DeepCopy ¶ added in v0.35.1
func (in *CoreInterceptorsConfig) DeepCopy() *CoreInterceptorsConfig
DeepCopy returns a deep copy of CoreInterceptors.
func (*CoreInterceptorsConfig) DeepCopyInto ¶ added in v0.35.1
func (in *CoreInterceptorsConfig) DeepCopyInto(out *CoreInterceptorsConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoreInterceptorsConfig) HostInEnterpriseHostAllowList ¶ added in v0.35.1
func (in *CoreInterceptorsConfig) HostInEnterpriseHostAllowList(host string) bool
type Defaults ¶
type Defaults struct {
DefaultServiceAccount string
DefaultRunAsUser int64
DefaultRunAsGroup int64
DefaultFSGroup int64
DefaultRunAsNonRoot bool
// These three fields are used to decide whether to configure
// runAsUser, runAsGroup and fsGroup within a Security Context Constraint (SCC).
IsDefaultRunAsUserEmpty bool
IsDefaultRunAsGroupEmpty bool
IsDefaultFsGroupEmpty bool
}
Defaults holds the default configurations +k8s:deepcopy-gen=true
func NewDefaultsFromConfigMap ¶
NewDefaultsFromConfigMap returns a Config for the given configmap
func NewDefaultsFromMap ¶
NewDefaultsFromMap returns a Config given a map corresponding to a ConfigMap
func (*Defaults) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Defaults.
func (*Defaults) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FeatureFlags ¶
type FeatureFlags struct {
// EnableAPIFields determines which gated features are enabled.
// Acceptable values are "stable" or "alpha". Defaults to "stable"
EnableAPIFields string
// LabelsExclusionPattern determines the regex pattern to use to exclude
// labels being propagated to resources created by the EventListener
LabelsExclusionPattern string
// UseEnterpriseHostAllowlist determines if the GitHub core interceptor
// validates the X-Github-Enterprise-Host header against the
// setting `github.enterprise-host-allowlist`.
// It is strongly encouraged to be enabled for security, and will be removed
// and always enforced in a later version
InterceptorsGitHubUseEnterpriseHostAllowlist bool
}
FeatureFlags holds the features configurations +k8s:deepcopy-gen=true
func NewFeatureFlagsFromConfigMap ¶
func NewFeatureFlagsFromConfigMap(config *corev1.ConfigMap) (*FeatureFlags, error)
NewFeatureFlagsFromConfigMap returns a Config for the given configmap
func NewFeatureFlagsFromMap ¶
func NewFeatureFlagsFromMap(cfgMap map[string]string) (*FeatureFlags, error)
NewFeatureFlagsFromMap returns a Config given a map corresponding to a ConfigMap
func (*FeatureFlags) DeepCopy ¶
func (in *FeatureFlags) DeepCopy() *FeatureFlags
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureFlags.
func (*FeatureFlags) DeepCopyInto ¶
func (in *FeatureFlags) DeepCopyInto(out *FeatureFlags)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Store ¶
type Store struct {
*configmap.UntypedStore
}
Store is a typed wrapper around configmap.Untyped store to handle our configmaps. +k8s:deepcopy-gen=false
func NewStore ¶
NewStore creates a new store of Configs and optionally calls functions when ConfigMaps are updated.