Documentation ¶
Index ¶
- Constants
- func GetArtifactBucketConfigName() string
- func GetArtifactPVCConfigName() string
- func GetDefaultsConfigName() string
- func GetFeatureFlagsConfigName() string
- func ToContext(ctx context.Context, c *Config) context.Context
- type ArtifactBucket
- type ArtifactPVC
- type Config
- type Defaults
- type FeatureFlags
- type Store
Constants ¶
const ( // bucketLocationKey is the name of the configmap entry that specifies // loction of the bucket. BucketLocationKey = "location" // BucketServiceAccountSecretNameKey is the name of the configmap entry that specifies // the name of the secret that will provide the servie account with bucket access. // This secret must have a key called serviceaccount that will have a value with // the service account with access to the bucket BucketServiceAccountSecretNameKey = "bucket.service.account.secret.name" // BucketServiceAccountSecretKeyKey is the name of the configmap entry that specifies // the secret key that will have a value with the service account json with access // to the bucket BucketServiceAccountSecretKeyKey = "bucket.service.account.secret.key" // DefaultBucketServiceAccountSecretKey defaults to a gcs bucket DefaultBucketServiceFieldName = "GOOGLE_APPLICATION_CREDENTIALS" // bucketServiceAccountFieldName is the name of the configmap entry that specifies // the field name that should be used for the service account. // Valid values: GOOGLE_APPLICATION_CREDENTIALS, BOTO_CONFIG. BucketServiceAccountFieldNameKey = "bucket.service.account.field.name" )
const ( // DefaultPVCSize is the default size of the PVC to create DefaultPVCSize = "5Gi" // PVCSizeKey is the name of the configmap entry that specifies the size of the PVC to create PVCSizeKey = "size" // PVCStorageClassNameKey is the name of the configmap entry that specifies the storage class of the PVC to create PVCStorageClassNameKey = "storageClassName" )
const ( DefaultTimeoutMinutes = 60 NoTimeoutDuration = 0 * time.Minute DefaultManagedByLabelValue = "tekton-pipelines" DefaultCloudEventSinkValue = "" )
const ( DefaultDisableHomeEnvOverwrite = false DefaultDisableWorkingDirOverwrite = false DefaultDisableAffinityAssistant = false DefaultRunningInEnvWithInjectedSidecars = true )
Variables ¶
This section is empty.
Functions ¶
func GetArtifactBucketConfigName ¶ added in v0.15.0
func GetArtifactBucketConfigName() string
GetArtifactBucketConfigName returns the name of the configmap containing all customizations for the storage bucket.
func GetArtifactPVCConfigName ¶ added in v0.15.0
func GetArtifactPVCConfigName() string
GetArtifactPVCConfigName returns the name of the configmap containing all customizations for the storage PVC.
func GetDefaultsConfigName ¶ added in v0.12.0
func GetDefaultsConfigName() string
GetDefaultsConfigName returns the name of the configmap containing all defined defaults.
func GetFeatureFlagsConfigName ¶ added in v0.14.0
func GetFeatureFlagsConfigName() string
GetFeatureFlagsConfigName returns the name of the configmap containing all feature flags.
Types ¶
type ArtifactBucket ¶ added in v0.15.0
type ArtifactBucket struct { Location string ServiceAccountSecretName string ServiceAccountSecretKey string ServiceAccountFieldName string }
ArtifactPVC holds the configurations for the artifacts PVC +k8s:deepcopy-gen=true
func NewArtifactBucketFromConfigMap ¶ added in v0.15.0
func NewArtifactBucketFromConfigMap(config *corev1.ConfigMap) (*ArtifactBucket, error)
NewArtifactBucketFromConfigMap returns a Config for the given configmap
func NewArtifactBucketFromMap ¶ added in v0.15.0
func NewArtifactBucketFromMap(cfgMap map[string]string) (*ArtifactBucket, error)
NewArtifactBucketFromMap returns a Config given a map corresponding to a ConfigMap
func (*ArtifactBucket) DeepCopy ¶ added in v0.15.0
func (in *ArtifactBucket) DeepCopy() *ArtifactBucket
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArtifactBucket.
func (*ArtifactBucket) DeepCopyInto ¶ added in v0.15.0
func (in *ArtifactBucket) DeepCopyInto(out *ArtifactBucket)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ArtifactBucket) Equals ¶ added in v0.15.0
func (cfg *ArtifactBucket) Equals(other *ArtifactBucket) bool
Equals returns true if two Configs are identical
type ArtifactPVC ¶ added in v0.15.0
ArtifactPVC holds the configurations for the artifacts PVC +k8s:deepcopy-gen=true
func NewArtifactPVCFromConfigMap ¶ added in v0.15.0
func NewArtifactPVCFromConfigMap(config *corev1.ConfigMap) (*ArtifactPVC, error)
NewDefaultsFromConfigMap returns a Config for the given configmap
func NewArtifactPVCFromMap ¶ added in v0.15.0
func NewArtifactPVCFromMap(cfgMap map[string]string) (*ArtifactPVC, error)
NewDefaultsFromMap returns a Config given a map corresponding to a ConfigMap
func (*ArtifactPVC) DeepCopy ¶ added in v0.15.0
func (in *ArtifactPVC) DeepCopy() *ArtifactPVC
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArtifactPVC.
func (*ArtifactPVC) DeepCopyInto ¶ added in v0.15.0
func (in *ArtifactPVC) DeepCopyInto(out *ArtifactPVC)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ArtifactPVC) Equals ¶ added in v0.15.0
func (cfg *ArtifactPVC) Equals(other *ArtifactPVC) bool
Equals returns true if two Configs are identical
type Config ¶
type Config struct { Defaults *Defaults FeatureFlags *FeatureFlags ArtifactBucket *ArtifactBucket ArtifactPVC *ArtifactPVC }
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 { DefaultTimeoutMinutes int DefaultServiceAccount string DefaultManagedByLabelValue string DefaultPodTemplate *pod.Template DefaultCloudEventsSink string DefaultTaskRunWorkspaceBinding 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 ¶ added in v0.14.0
type FeatureFlags struct { DisableHomeEnvOverwrite bool DisableWorkingDirOverwrite bool DisableAffinityAssistant bool RunningInEnvWithInjectedSidecars bool }
FeatureFlags holds the features configurations +k8s:deepcopy-gen=true
func NewFeatureFlagsFromConfigMap ¶ added in v0.14.0
func NewFeatureFlagsFromConfigMap(config *corev1.ConfigMap) (*FeatureFlags, error)
NewFeatureFlagsFromConfigMap returns a Config for the given configmap
func NewFeatureFlagsFromMap ¶ added in v0.14.0
func NewFeatureFlagsFromMap(cfgMap map[string]string) (*FeatureFlags, error)
NewFeatureFlagsFromMap returns a Config given a map corresponding to a ConfigMap
func (*FeatureFlags) DeepCopy ¶ added in v0.14.0
func (in *FeatureFlags) DeepCopy() *FeatureFlags
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureFlags.
func (*FeatureFlags) DeepCopyInto ¶ added in v0.14.0
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.