@@ -19,17 +19,18 @@ import (
1919//nolint:tagalign
2020type TransformerConfig struct {
2121 // if any fields are added, update the DeepCopy implementation
22- NamePrefix types.FsSlice `json:"namePrefix,omitempty" yaml:"namePrefix,omitempty"`
23- NameSuffix types.FsSlice `json:"nameSuffix,omitempty" yaml:"nameSuffix,omitempty"`
24- NameSpace types.FsSlice `json:"namespace,omitempty" yaml:"namespace,omitempty"`
25- CommonLabels types.FsSlice `json:"commonLabels,omitempty" yaml:"commonLabels,omitempty"`
26- Labels types.FsSlice `json:"labels,omitempty" yaml:"labels,omitempty"`
27- TemplateLabels types.FsSlice `json:"templateLabels,omitempty" yaml:"templateLabels,omitempty"`
28- CommonAnnotations types.FsSlice `json:"commonAnnotations,omitempty" yaml:"commonAnnotations,omitempty"`
29- NameReference nbrSlice `json:"nameReference,omitempty" yaml:"nameReference,omitempty"`
30- VarReference types.FsSlice `json:"varReference,omitempty" yaml:"varReference,omitempty"`
31- Images types.FsSlice `json:"images,omitempty" yaml:"images,omitempty"`
32- Replicas types.FsSlice `json:"replicas,omitempty" yaml:"replicas,omitempty"`
22+ NamePrefix types.FsSlice `json:"namePrefix,omitempty" yaml:"namePrefix,omitempty"`
23+ NameSuffix types.FsSlice `json:"nameSuffix,omitempty" yaml:"nameSuffix,omitempty"`
24+ NameSpace types.FsSlice `json:"namespace,omitempty" yaml:"namespace,omitempty"`
25+ CommonLabels types.FsSlice `json:"commonLabels,omitempty" yaml:"commonLabels,omitempty"`
26+ Labels types.FsSlice `json:"labels,omitempty" yaml:"labels,omitempty"`
27+ TemplateLabels types.FsSlice `json:"templateLabels,omitempty" yaml:"templateLabels,omitempty"`
28+ VolumeClaimTemplateLabels types.FsSlice `json:"volumeClaimTemplateLabels,omitempty" yaml:"volumeClaimTemplateLabels,omitempty"`
29+ CommonAnnotations types.FsSlice `json:"commonAnnotations,omitempty" yaml:"commonAnnotations,omitempty"`
30+ NameReference nbrSlice `json:"nameReference,omitempty" yaml:"nameReference,omitempty"`
31+ VarReference types.FsSlice `json:"varReference,omitempty" yaml:"varReference,omitempty"`
32+ Images types.FsSlice `json:"images,omitempty" yaml:"images,omitempty"`
33+ Replicas types.FsSlice `json:"replicas,omitempty" yaml:"replicas,omitempty"`
3334}
3435
3536// MakeEmptyConfig returns an empty TransformerConfig object
@@ -40,17 +41,18 @@ func MakeEmptyConfig() *TransformerConfig {
4041// DeepCopy returns a new copy of TransformerConfig
4142func (t * TransformerConfig ) DeepCopy () * TransformerConfig {
4243 return & TransformerConfig {
43- NamePrefix : t .NamePrefix .DeepCopy (),
44- NameSuffix : t .NameSuffix .DeepCopy (),
45- NameSpace : t .NameSpace .DeepCopy (),
46- CommonLabels : t .CommonLabels .DeepCopy (),
47- Labels : t .Labels .DeepCopy (),
48- TemplateLabels : t .TemplateLabels .DeepCopy (),
49- CommonAnnotations : t .CommonAnnotations .DeepCopy (),
50- NameReference : t .NameReference .DeepCopy (),
51- VarReference : t .VarReference .DeepCopy (),
52- Images : t .Images .DeepCopy (),
53- Replicas : t .Replicas .DeepCopy (),
44+ NamePrefix : t .NamePrefix .DeepCopy (),
45+ NameSuffix : t .NameSuffix .DeepCopy (),
46+ NameSpace : t .NameSpace .DeepCopy (),
47+ CommonLabels : t .CommonLabels .DeepCopy (),
48+ Labels : t .Labels .DeepCopy (),
49+ TemplateLabels : t .TemplateLabels .DeepCopy (),
50+ VolumeClaimTemplateLabels : t .VolumeClaimTemplateLabels .DeepCopy (),
51+ CommonAnnotations : t .CommonAnnotations .DeepCopy (),
52+ NameReference : t .NameReference .DeepCopy (),
53+ VarReference : t .VarReference .DeepCopy (),
54+ Images : t .Images .DeepCopy (),
55+ Replicas : t .Replicas .DeepCopy (),
5456 }
5557}
5658
@@ -100,6 +102,7 @@ func (t *TransformerConfig) sortFields() {
100102 sort .Sort (t .CommonLabels )
101103 sort .Sort (t .Labels )
102104 sort .Sort (t .TemplateLabels )
105+ sort .Sort (t .VolumeClaimTemplateLabels )
103106 sort .Sort (t .CommonAnnotations )
104107 sort .Sort (t .NameReference )
105108 sort .Sort (t .VarReference )
@@ -181,6 +184,10 @@ func (t *TransformerConfig) Merge(input *TransformerConfig) (
181184 if err != nil {
182185 return nil , errors .WrapPrefixf (err , "failed to merge TemplateLabels fieldSpec" )
183186 }
187+ merged .VolumeClaimTemplateLabels , err = t .VolumeClaimTemplateLabels .MergeAll (input .VolumeClaimTemplateLabels )
188+ if err != nil {
189+ return nil , errors .WrapPrefixf (err , "failed to merge VolumeClaimTemplateLabels fieldSpec" )
190+ }
184191 merged .VarReference , err = t .VarReference .MergeAll (input .VarReference )
185192 if err != nil {
186193 return nil , errors .WrapPrefixf (err , "failed to merge VarReference fieldSpec" )
0 commit comments