mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
[Feature] Remove ImagePullSecrets Reference from Container (#1629)
This commit is contained in:
parent
0fc7878654
commit
39638b11d4
10 changed files with 32 additions and 153 deletions
|
@ -10,6 +10,7 @@
|
|||
- (Feature) Expose Force CRD Install option
|
||||
- (Maintenance) Move Container utils functions
|
||||
- (Feature) ArangoProfile Selectors
|
||||
- (Bugfix) Remove ImagePullSecrets Reference from Container
|
||||
|
||||
## [1.2.39](https://github.com/arangodb/kube-arangodb/tree/1.2.39) (2024-03-11)
|
||||
- (Feature) Extract Scheduler API
|
||||
|
|
|
@ -193,7 +193,7 @@ Default Value: `false`
|
|||
|
||||
### .spec.deployment.prediction.image
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L37)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L35)</sup>
|
||||
|
||||
Image define image details
|
||||
|
||||
|
@ -201,7 +201,7 @@ Image define image details
|
|||
|
||||
### .spec.deployment.prediction.imagePullPolicy
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L41)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L39)</sup>
|
||||
|
||||
ImagePullPolicy define Image pull policy
|
||||
|
||||
|
@ -209,14 +209,6 @@ Default Value: `IfNotPresent`
|
|||
|
||||
***
|
||||
|
||||
### .spec.deployment.prediction.imagePullSecrets
|
||||
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L44)</sup>
|
||||
|
||||
ImagePullSecrets define Secrets used to pull Image from registry
|
||||
|
||||
***
|
||||
|
||||
### .spec.deployment.prediction.lifecycle
|
||||
|
||||
Type: `core.Lifecycle` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/lifecycle.go#L35)</sup>
|
||||
|
@ -391,7 +383,7 @@ Default Value: `false`
|
|||
|
||||
### .spec.deployment.project.image
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L37)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L35)</sup>
|
||||
|
||||
Image define image details
|
||||
|
||||
|
@ -399,7 +391,7 @@ Image define image details
|
|||
|
||||
### .spec.deployment.project.imagePullPolicy
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L41)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L39)</sup>
|
||||
|
||||
ImagePullPolicy define Image pull policy
|
||||
|
||||
|
@ -407,14 +399,6 @@ Default Value: `IfNotPresent`
|
|||
|
||||
***
|
||||
|
||||
### .spec.deployment.project.imagePullSecrets
|
||||
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L44)</sup>
|
||||
|
||||
ImagePullSecrets define Secrets used to pull Image from registry
|
||||
|
||||
***
|
||||
|
||||
### .spec.deployment.project.lifecycle
|
||||
|
||||
Type: `core.Lifecycle` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/lifecycle.go#L35)</sup>
|
||||
|
@ -662,7 +646,7 @@ Default Value: `false`
|
|||
|
||||
### .spec.deployment.training.image
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L37)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L35)</sup>
|
||||
|
||||
Image define image details
|
||||
|
||||
|
@ -670,7 +654,7 @@ Image define image details
|
|||
|
||||
### .spec.deployment.training.imagePullPolicy
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L41)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L39)</sup>
|
||||
|
||||
ImagePullPolicy define Image pull policy
|
||||
|
||||
|
@ -678,14 +662,6 @@ Default Value: `IfNotPresent`
|
|||
|
||||
***
|
||||
|
||||
### .spec.deployment.training.imagePullSecrets
|
||||
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L44)</sup>
|
||||
|
||||
ImagePullSecrets define Secrets used to pull Image from registry
|
||||
|
||||
***
|
||||
|
||||
### .spec.deployment.training.lifecycle
|
||||
|
||||
Type: `core.Lifecycle` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/lifecycle.go#L35)</sup>
|
||||
|
@ -924,7 +900,7 @@ Default Value: `false`
|
|||
|
||||
### .spec.init.image
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L37)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L35)</sup>
|
||||
|
||||
Image define image details
|
||||
|
||||
|
@ -932,7 +908,7 @@ Image define image details
|
|||
|
||||
### .spec.init.imagePullPolicy
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L41)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L39)</sup>
|
||||
|
||||
ImagePullPolicy define Image pull policy
|
||||
|
||||
|
@ -942,7 +918,7 @@ Default Value: `IfNotPresent`
|
|||
|
||||
### .spec.init.imagePullSecrets
|
||||
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L44)</sup>
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/pod/resources/image.go#L36)</sup>
|
||||
|
||||
ImagePullSecrets define Secrets used to pull Image from registry
|
||||
|
||||
|
@ -1270,7 +1246,7 @@ Default Value: `false`
|
|||
|
||||
### .spec.jobsTemplates.featurization.cpu.image
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L37)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L35)</sup>
|
||||
|
||||
Image define image details
|
||||
|
||||
|
@ -1278,7 +1254,7 @@ Image define image details
|
|||
|
||||
### .spec.jobsTemplates.featurization.cpu.imagePullPolicy
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L41)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L39)</sup>
|
||||
|
||||
ImagePullPolicy define Image pull policy
|
||||
|
||||
|
@ -1288,7 +1264,7 @@ Default Value: `IfNotPresent`
|
|||
|
||||
### .spec.jobsTemplates.featurization.cpu.imagePullSecrets
|
||||
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L44)</sup>
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/pod/resources/image.go#L36)</sup>
|
||||
|
||||
ImagePullSecrets define Secrets used to pull Image from registry
|
||||
|
||||
|
@ -1616,7 +1592,7 @@ Default Value: `false`
|
|||
|
||||
### .spec.jobsTemplates.featurization.gpu.image
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L37)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L35)</sup>
|
||||
|
||||
Image define image details
|
||||
|
||||
|
@ -1624,7 +1600,7 @@ Image define image details
|
|||
|
||||
### .spec.jobsTemplates.featurization.gpu.imagePullPolicy
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L41)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L39)</sup>
|
||||
|
||||
ImagePullPolicy define Image pull policy
|
||||
|
||||
|
@ -1634,7 +1610,7 @@ Default Value: `IfNotPresent`
|
|||
|
||||
### .spec.jobsTemplates.featurization.gpu.imagePullSecrets
|
||||
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L44)</sup>
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/pod/resources/image.go#L36)</sup>
|
||||
|
||||
ImagePullSecrets define Secrets used to pull Image from registry
|
||||
|
||||
|
@ -1962,7 +1938,7 @@ Default Value: `false`
|
|||
|
||||
### .spec.jobsTemplates.prediction.cpu.image
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L37)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L35)</sup>
|
||||
|
||||
Image define image details
|
||||
|
||||
|
@ -1970,7 +1946,7 @@ Image define image details
|
|||
|
||||
### .spec.jobsTemplates.prediction.cpu.imagePullPolicy
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L41)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L39)</sup>
|
||||
|
||||
ImagePullPolicy define Image pull policy
|
||||
|
||||
|
@ -1980,7 +1956,7 @@ Default Value: `IfNotPresent`
|
|||
|
||||
### .spec.jobsTemplates.prediction.cpu.imagePullSecrets
|
||||
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L44)</sup>
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/pod/resources/image.go#L36)</sup>
|
||||
|
||||
ImagePullSecrets define Secrets used to pull Image from registry
|
||||
|
||||
|
@ -2308,7 +2284,7 @@ Default Value: `false`
|
|||
|
||||
### .spec.jobsTemplates.prediction.gpu.image
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L37)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L35)</sup>
|
||||
|
||||
Image define image details
|
||||
|
||||
|
@ -2316,7 +2292,7 @@ Image define image details
|
|||
|
||||
### .spec.jobsTemplates.prediction.gpu.imagePullPolicy
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L41)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L39)</sup>
|
||||
|
||||
ImagePullPolicy define Image pull policy
|
||||
|
||||
|
@ -2326,7 +2302,7 @@ Default Value: `IfNotPresent`
|
|||
|
||||
### .spec.jobsTemplates.prediction.gpu.imagePullSecrets
|
||||
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L44)</sup>
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/pod/resources/image.go#L36)</sup>
|
||||
|
||||
ImagePullSecrets define Secrets used to pull Image from registry
|
||||
|
||||
|
@ -2654,7 +2630,7 @@ Default Value: `false`
|
|||
|
||||
### .spec.jobsTemplates.training.cpu.image
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L37)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L35)</sup>
|
||||
|
||||
Image define image details
|
||||
|
||||
|
@ -2662,7 +2638,7 @@ Image define image details
|
|||
|
||||
### .spec.jobsTemplates.training.cpu.imagePullPolicy
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L41)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L39)</sup>
|
||||
|
||||
ImagePullPolicy define Image pull policy
|
||||
|
||||
|
@ -2672,7 +2648,7 @@ Default Value: `IfNotPresent`
|
|||
|
||||
### .spec.jobsTemplates.training.cpu.imagePullSecrets
|
||||
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L44)</sup>
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/pod/resources/image.go#L36)</sup>
|
||||
|
||||
ImagePullSecrets define Secrets used to pull Image from registry
|
||||
|
||||
|
@ -3000,7 +2976,7 @@ Default Value: `false`
|
|||
|
||||
### .spec.jobsTemplates.training.gpu.image
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L37)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L35)</sup>
|
||||
|
||||
Image define image details
|
||||
|
||||
|
@ -3008,7 +2984,7 @@ Image define image details
|
|||
|
||||
### .spec.jobsTemplates.training.gpu.imagePullPolicy
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L41)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L39)</sup>
|
||||
|
||||
ImagePullPolicy define Image pull policy
|
||||
|
||||
|
@ -3018,7 +2994,7 @@ Default Value: `IfNotPresent`
|
|||
|
||||
### .spec.jobsTemplates.training.gpu.imagePullSecrets
|
||||
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L44)</sup>
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/pod/resources/image.go#L36)</sup>
|
||||
|
||||
ImagePullSecrets define Secrets used to pull Image from registry
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ Links:
|
|||
|
||||
### .spec.mode.sidecar.image
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L37)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L35)</sup>
|
||||
|
||||
Image define image details
|
||||
|
||||
|
@ -180,7 +180,7 @@ Image define image details
|
|||
|
||||
### .spec.mode.sidecar.imagePullPolicy
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L41)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L39)</sup>
|
||||
|
||||
ImagePullPolicy define Image pull policy
|
||||
|
||||
|
@ -188,14 +188,6 @@ Default Value: `IfNotPresent`
|
|||
|
||||
***
|
||||
|
||||
### .spec.mode.sidecar.imagePullSecrets
|
||||
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L44)</sup>
|
||||
|
||||
ImagePullSecrets define Secrets used to pull Image from registry
|
||||
|
||||
***
|
||||
|
||||
### .spec.mode.sidecar.lifecycle
|
||||
|
||||
Type: `core.Lifecycle` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/lifecycle.go#L35)</sup>
|
||||
|
|
|
@ -104,7 +104,7 @@ Links:
|
|||
|
||||
### .spec.template.container.containers.\<string\>.image
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L37)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L35)</sup>
|
||||
|
||||
Image define image details
|
||||
|
||||
|
@ -112,7 +112,7 @@ Image define image details
|
|||
|
||||
### .spec.template.container.containers.\<string\>.imagePullPolicy
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L41)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L39)</sup>
|
||||
|
||||
ImagePullPolicy define Image pull policy
|
||||
|
||||
|
@ -120,14 +120,6 @@ Default Value: `IfNotPresent`
|
|||
|
||||
***
|
||||
|
||||
### .spec.template.container.containers.\<string\>.imagePullSecrets
|
||||
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L44)</sup>
|
||||
|
||||
ImagePullSecrets define Secrets used to pull Image from registry
|
||||
|
||||
***
|
||||
|
||||
### .spec.template.container.containers.\<string\>.lifecycle
|
||||
|
||||
Type: `core.Lifecycle` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.39/pkg/apis/scheduler/v1alpha1/container/resources/lifecycle.go#L35)</sup>
|
||||
|
|
|
@ -28,8 +28,6 @@ import (
|
|||
"github.com/arangodb/kube-arangodb/pkg/util"
|
||||
)
|
||||
|
||||
type ImagePullSecrets []string
|
||||
|
||||
var _ interfaces.Container[Image] = &Image{}
|
||||
|
||||
type Image struct {
|
||||
|
@ -39,9 +37,6 @@ type Image struct {
|
|||
// ImagePullPolicy define Image pull policy
|
||||
// +doc/default: IfNotPresent
|
||||
ImagePullPolicy *core.PullPolicy `json:"imagePullPolicy,omitempty"`
|
||||
|
||||
// ImagePullSecrets define Secrets used to pull Image from registry
|
||||
ImagePullSecrets ImagePullSecrets `json:"imagePullSecrets,omitempty"`
|
||||
}
|
||||
|
||||
func (i *Image) Apply(pod *core.PodTemplateSpec, container *core.Container) error {
|
||||
|
@ -52,16 +47,6 @@ func (i *Image) Apply(pod *core.PodTemplateSpec, container *core.Container) erro
|
|||
container.Image = util.WithDefault(i.Image)
|
||||
container.ImagePullPolicy = util.WithDefault(i.ImagePullPolicy)
|
||||
|
||||
for _, secret := range i.ImagePullSecrets {
|
||||
if hasImagePullSecret(pod.Spec.ImagePullSecrets, secret) {
|
||||
continue
|
||||
}
|
||||
|
||||
pod.Spec.ImagePullSecrets = append(pod.Spec.ImagePullSecrets, core.LocalObjectReference{
|
||||
Name: secret,
|
||||
})
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -93,16 +78,5 @@ func (i *Image) Validate() error {
|
|||
return shared.WithErrors(
|
||||
shared.PrefixResourceErrors("image", shared.ValidateRequired(i.Image, shared.ValidateImage)),
|
||||
shared.PrefixResourceErrors("imagePullPolicy", shared.ValidateOptional(i.ImagePullPolicy, shared.ValidatePullPolicy)),
|
||||
shared.PrefixResourceErrors("pullSecrets", shared.ValidateList(i.ImagePullSecrets, shared.ValidateResourceName)),
|
||||
)
|
||||
}
|
||||
|
||||
func hasImagePullSecret(secrets []core.LocalObjectReference, secret string) bool {
|
||||
for _, sec := range secrets {
|
||||
if sec.Name == secret {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
|
|
@ -92,29 +92,18 @@ func Test_Image(t *testing.T) {
|
|||
applyImage(t, &core.PodTemplateSpec{}, &core.Container{}, &Image{
|
||||
Image: util.NewType("image"),
|
||||
ImagePullPolicy: util.NewType(core.PullAlways),
|
||||
ImagePullSecrets: []string{
|
||||
"secret",
|
||||
},
|
||||
})(func(t *testing.T, pod *core.PodTemplateSpec, container *core.Container) {
|
||||
require.EqualValues(t, "image", container.Image)
|
||||
require.EqualValues(t, core.PullAlways, container.ImagePullPolicy)
|
||||
require.Len(t, pod.Spec.ImagePullSecrets, 1)
|
||||
require.Equal(t, "secret", pod.Spec.ImagePullSecrets[0].Name)
|
||||
})
|
||||
})
|
||||
t.Run("With PS2", func(t *testing.T) {
|
||||
applyImage(t, &core.PodTemplateSpec{}, &core.Container{}, &Image{
|
||||
Image: util.NewType("image"),
|
||||
ImagePullPolicy: util.NewType(core.PullAlways),
|
||||
ImagePullSecrets: []string{
|
||||
"secret",
|
||||
"secret",
|
||||
},
|
||||
})(func(t *testing.T, pod *core.PodTemplateSpec, container *core.Container) {
|
||||
require.EqualValues(t, "image", container.Image)
|
||||
require.EqualValues(t, core.PullAlways, container.ImagePullPolicy)
|
||||
require.Len(t, pod.Spec.ImagePullSecrets, 1)
|
||||
require.Equal(t, "secret", pod.Spec.ImagePullSecrets[0].Name)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
@ -98,11 +98,6 @@ func (in *Image) DeepCopyInto(out *Image) {
|
|||
*out = new(v1.PullPolicy)
|
||||
**out = **in
|
||||
}
|
||||
if in.ImagePullSecrets != nil {
|
||||
in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
|
||||
*out = make(ImagePullSecrets, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -116,26 +111,6 @@ func (in *Image) DeepCopy() *Image {
|
|||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in ImagePullSecrets) DeepCopyInto(out *ImagePullSecrets) {
|
||||
{
|
||||
in := &in
|
||||
*out = make(ImagePullSecrets, len(*in))
|
||||
copy(*out, *in)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePullSecrets.
|
||||
func (in ImagePullSecrets) DeepCopy() ImagePullSecrets {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ImagePullSecrets)
|
||||
in.DeepCopyInto(out)
|
||||
return *out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Lifecycle) DeepCopyInto(out *Lifecycle) {
|
||||
*out = *in
|
||||
|
|
|
@ -522,10 +522,6 @@ v1alpha1:
|
|||
type: string
|
||||
imagePullPolicy:
|
||||
type: string
|
||||
imagePullSecrets:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
lifecycle:
|
||||
properties:
|
||||
postStart:
|
||||
|
@ -1017,10 +1013,6 @@ v1alpha1:
|
|||
type: string
|
||||
imagePullPolicy:
|
||||
type: string
|
||||
imagePullSecrets:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
lifecycle:
|
||||
properties:
|
||||
postStart:
|
||||
|
@ -1550,10 +1542,6 @@ v1alpha1:
|
|||
type: string
|
||||
imagePullPolicy:
|
||||
type: string
|
||||
imagePullSecrets:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
lifecycle:
|
||||
properties:
|
||||
postStart:
|
||||
|
|
|
@ -151,10 +151,6 @@ v1alpha1:
|
|||
type: string
|
||||
imagePullPolicy:
|
||||
type: string
|
||||
imagePullSecrets:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
lifecycle:
|
||||
properties:
|
||||
postStart:
|
||||
|
|
|
@ -202,10 +202,6 @@ v1alpha1:
|
|||
type: string
|
||||
imagePullPolicy:
|
||||
type: string
|
||||
imagePullSecrets:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
lifecycle:
|
||||
properties:
|
||||
postStart:
|
||||
|
|
Loading…
Reference in a new issue