File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,16 @@ import (
14
14
15
15
func DefaultServiceAccount (component string ) RenderFunc {
16
16
return func (cfg * RenderContext ) ([]runtime.Object , error ) {
17
+ pullSecrets := make ([]corev1.LocalObjectReference , 0 )
18
+
19
+ if len (cfg .Config .ImagePullSecrets ) > 0 {
20
+ for _ , i := range cfg .Config .ImagePullSecrets {
21
+ pullSecrets = append (pullSecrets , corev1.LocalObjectReference {
22
+ Name : i .Name ,
23
+ })
24
+ }
25
+ }
26
+
17
27
return []runtime.Object {
18
28
& corev1.ServiceAccount {
19
29
TypeMeta : TypeMetaServiceAccount ,
@@ -23,6 +33,7 @@ func DefaultServiceAccount(component string) RenderFunc {
23
33
Labels : DefaultLabels (component ),
24
34
},
25
35
AutomountServiceAccountToken : pointer .Bool (true ),
36
+ ImagePullSecrets : pullSecrets ,
26
37
},
27
38
}, nil
28
39
}
You can’t perform that action at this time.
0 commit comments