Runtime: Add Kubernetes ServiceAccounts & Remove imagePullSecrets

This commit is contained in:
Ben Toogood
2020-04-27 14:13:51 +01:00
parent 434997e676
commit 494e0b5060
9 changed files with 84 additions and 91 deletions

View File

@@ -38,12 +38,6 @@ func newService(s *runtime.Service, c runtime.CreateOptions) *service {
kdeploy.Spec.Template.Metadata.Annotations = make(map[string]string)
}
// set the image pull secrets
kdeploy.Spec.Template.PodSpec.ImagePullSecrets = make([]client.ImagePullSecret, len(c.ImagePullSecrets))
for i, s := range c.ImagePullSecrets {
kdeploy.Spec.Template.PodSpec.ImagePullSecrets[i] = client.ImagePullSecret{Name: s}
}
// create if non existent
if s.Metadata == nil {
s.Metadata = make(map[string]string)