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 (
1414
1515func DefaultServiceAccount (component string ) RenderFunc {
1616 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+
1727 return []runtime.Object {
1828 & corev1.ServiceAccount {
1929 TypeMeta : TypeMetaServiceAccount ,
@@ -23,6 +33,7 @@ func DefaultServiceAccount(component string) RenderFunc {
2333 Labels : DefaultLabels (component ),
2434 },
2535 AutomountServiceAccountToken : pointer .Bool (true ),
36+ ImagePullSecrets : pullSecrets ,
2637 },
2738 }, nil
2839 }
You can’t perform that action at this time.
0 commit comments