File tree Expand file tree Collapse file tree 3 files changed +33
-5
lines changed
pkg/apis/scheduler/v1beta1/pod/resources Expand file tree Collapse file tree 3 files changed +33
-5
lines changed Original file line number Diff line number Diff line change 55- (Bugfix) (Platform) Fix LM CLI Option
66- (Bugfix) (Platform) Fix topology for Gateways
77- (Feature) (Platform) Dump CLI switch to Services
8+ - (Feature) (Platform) Fix ImagePullSecrets Merge
89
910## [ 1.3.2] ( https://github.com/arangodb/kube-arangodb/tree/1.3.2 ) (2025-11-20)
1011- (Bugfix) (Platform) Increase memory limit for Inventory
Original file line number Diff line number Diff line change 11//
22// DISCLAIMER
33//
4- // Copyright 2024 ArangoDB GmbH, Cologne, Germany
4+ // Copyright 2024-2025 ArangoDB GmbH, Cologne, Germany
55//
66// Licensed under the Apache License, Version 2.0 (the "License");
77// you may not use this file except in compliance with the License.
@@ -59,11 +59,19 @@ func (i *Image) With(other *Image) *Image {
5959 return nil
6060 }
6161
62- if other == nil {
63- return i .DeepCopy ()
62+ if i == nil || other == nil {
63+ if i != nil {
64+ return i .DeepCopy ()
65+ }
66+
67+ return other .DeepCopy ()
6468 }
6569
66- return other .DeepCopy ()
70+ z := i .DeepCopy ()
71+
72+ z .ImagePullSecrets = append (z .ImagePullSecrets , other .ImagePullSecrets ... )
73+
74+ return z
6775}
6876
6977func (i * Image ) Validate () error {
Original file line number Diff line number Diff line change 11//
22// DISCLAIMER
33//
4- // Copyright 2024 ArangoDB GmbH, Cologne, Germany
4+ // Copyright 2024-2025 ArangoDB GmbH, Cologne, Germany
55//
66// Licensed under the Apache License, Version 2.0 (the "License");
77// you may not use this file except in compliance with the License.
@@ -85,4 +85,23 @@ func Test_Image(t *testing.T) {
8585 require .Equal (t , "secret" , pod .Spec .ImagePullSecrets [0 ].Name )
8686 })
8787 })
88+ t .Run ("With Merge" , func (t * testing.T ) {
89+ applyImage (t , & core.PodTemplateSpec {}, & Image {
90+ ImagePullSecrets : []string {
91+ "secret" ,
92+ },
93+ }, & Image {
94+ ImagePullSecrets : []string {
95+ "secret2" ,
96+ },
97+ }, & Image {
98+ ImagePullSecrets : []string {
99+ "secret" ,
100+ },
101+ })(func (t * testing.T , pod * core.PodTemplateSpec ) {
102+ require .Len (t , pod .Spec .ImagePullSecrets , 2 )
103+ require .Equal (t , "secret" , pod .Spec .ImagePullSecrets [0 ].Name )
104+ require .Equal (t , "secret2" , pod .Spec .ImagePullSecrets [1 ].Name )
105+ })
106+ })
88107}
You can’t perform that action at this time.
0 commit comments