We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58496c3 commit a1901c9Copy full SHA for a1901c9
installer/pkg/common/objects.go
@@ -14,6 +14,16 @@ import (
14
15
func DefaultServiceAccount(component string) RenderFunc {
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
27
return []runtime.Object{
28
&corev1.ServiceAccount{
29
TypeMeta: TypeMetaServiceAccount,
@@ -23,6 +33,7 @@ func DefaultServiceAccount(component string) RenderFunc {
33
Labels: DefaultLabels(component),
34
},
35
AutomountServiceAccountToken: pointer.Bool(true),
36
+ ImagePullSecrets: pullSecrets,
37
38
}, nil
39
}
0 commit comments