Documentation ¶
Index ¶
Constants ¶
const ( StableAPIFieldValue = "stable" AlphaAPIFieldValue = "alpha" DefaultEnableAPIFields = StableAPIFieldValue )
const (
DefaultServiceAccountValue = "default"
)
Variables ¶
var ( AllowedPipelineTypes = map[string][]string{ "v1alpha1": {"pipelineruns", "taskruns", "pipelines", "clustertasks", "tasks", "conditions", "runs"}, "v1beta1": {"pipelineruns", "taskruns", "pipelines", "clustertasks", "tasks", "customruns"}, "v1": {"pipelineruns", "taskruns", "pipelines", "tasks"}, } AllowedTriggersTypes = map[string][]string{ "v1alpha1": {"clusterinterceptors", "interceptors"}, "v1beta1": {"clustertriggerbindings", "eventlisteners", "triggerbindings", "triggers", "triggertemplates"}, } )
var Decoder runtime.Decoder
Functions ¶
func EnsureAllowedType ¶
func EnsureAllowedType(rt runtime.RawExtension) error
EnsureAllowedType returns nil if the resourceTemplate has an apiVersion and kind field set to one of the allowed ones.
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 }
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 Defaults ¶
type Defaults struct {
DefaultServiceAccount string
}
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 }
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.