1
0
Fork 0
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:
Adam Janikowski 2024-03-25 10:38:09 +01:00 committed by GitHub
parent 0fc7878654
commit 39638b11d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 32 additions and 153 deletions

View file

@ -10,6 +10,7 @@
- (Feature) Expose Force CRD Install option - (Feature) Expose Force CRD Install option
- (Maintenance) Move Container utils functions - (Maintenance) Move Container utils functions
- (Feature) ArangoProfile Selectors - (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) ## [1.2.39](https://github.com/arangodb/kube-arangodb/tree/1.2.39) (2024-03-11)
- (Feature) Extract Scheduler API - (Feature) Extract Scheduler API

View file

@ -193,7 +193,7 @@ Default Value: `false`
### .spec.deployment.prediction.image ### .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 Image define image details
@ -201,7 +201,7 @@ Image define image details
### .spec.deployment.prediction.imagePullPolicy ### .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 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 ### .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> 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 ### .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 Image define image details
@ -399,7 +391,7 @@ Image define image details
### .spec.deployment.project.imagePullPolicy ### .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 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 ### .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> 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 ### .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 Image define image details
@ -670,7 +654,7 @@ Image define image details
### .spec.deployment.training.imagePullPolicy ### .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 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 ### .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> 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 ### .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 Image define image details
@ -932,7 +908,7 @@ Image define image details
### .spec.init.imagePullPolicy ### .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 ImagePullPolicy define Image pull policy
@ -942,7 +918,7 @@ Default Value: `IfNotPresent`
### .spec.init.imagePullSecrets ### .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 ImagePullSecrets define Secrets used to pull Image from registry
@ -1270,7 +1246,7 @@ Default Value: `false`
### .spec.jobsTemplates.featurization.cpu.image ### .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 Image define image details
@ -1278,7 +1254,7 @@ Image define image details
### .spec.jobsTemplates.featurization.cpu.imagePullPolicy ### .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 ImagePullPolicy define Image pull policy
@ -1288,7 +1264,7 @@ Default Value: `IfNotPresent`
### .spec.jobsTemplates.featurization.cpu.imagePullSecrets ### .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 ImagePullSecrets define Secrets used to pull Image from registry
@ -1616,7 +1592,7 @@ Default Value: `false`
### .spec.jobsTemplates.featurization.gpu.image ### .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 Image define image details
@ -1624,7 +1600,7 @@ Image define image details
### .spec.jobsTemplates.featurization.gpu.imagePullPolicy ### .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 ImagePullPolicy define Image pull policy
@ -1634,7 +1610,7 @@ Default Value: `IfNotPresent`
### .spec.jobsTemplates.featurization.gpu.imagePullSecrets ### .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 ImagePullSecrets define Secrets used to pull Image from registry
@ -1962,7 +1938,7 @@ Default Value: `false`
### .spec.jobsTemplates.prediction.cpu.image ### .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 Image define image details
@ -1970,7 +1946,7 @@ Image define image details
### .spec.jobsTemplates.prediction.cpu.imagePullPolicy ### .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 ImagePullPolicy define Image pull policy
@ -1980,7 +1956,7 @@ Default Value: `IfNotPresent`
### .spec.jobsTemplates.prediction.cpu.imagePullSecrets ### .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 ImagePullSecrets define Secrets used to pull Image from registry
@ -2308,7 +2284,7 @@ Default Value: `false`
### .spec.jobsTemplates.prediction.gpu.image ### .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 Image define image details
@ -2316,7 +2292,7 @@ Image define image details
### .spec.jobsTemplates.prediction.gpu.imagePullPolicy ### .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 ImagePullPolicy define Image pull policy
@ -2326,7 +2302,7 @@ Default Value: `IfNotPresent`
### .spec.jobsTemplates.prediction.gpu.imagePullSecrets ### .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 ImagePullSecrets define Secrets used to pull Image from registry
@ -2654,7 +2630,7 @@ Default Value: `false`
### .spec.jobsTemplates.training.cpu.image ### .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 Image define image details
@ -2662,7 +2638,7 @@ Image define image details
### .spec.jobsTemplates.training.cpu.imagePullPolicy ### .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 ImagePullPolicy define Image pull policy
@ -2672,7 +2648,7 @@ Default Value: `IfNotPresent`
### .spec.jobsTemplates.training.cpu.imagePullSecrets ### .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 ImagePullSecrets define Secrets used to pull Image from registry
@ -3000,7 +2976,7 @@ Default Value: `false`
### .spec.jobsTemplates.training.gpu.image ### .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 Image define image details
@ -3008,7 +2984,7 @@ Image define image details
### .spec.jobsTemplates.training.gpu.imagePullPolicy ### .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 ImagePullPolicy define Image pull policy
@ -3018,7 +2994,7 @@ Default Value: `IfNotPresent`
### .spec.jobsTemplates.training.gpu.imagePullSecrets ### .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 ImagePullSecrets define Secrets used to pull Image from registry

View file

@ -172,7 +172,7 @@ Links:
### .spec.mode.sidecar.image ### .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 Image define image details
@ -180,7 +180,7 @@ Image define image details
### .spec.mode.sidecar.imagePullPolicy ### .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 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 ### .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> 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>

View file

@ -104,7 +104,7 @@ Links:
### .spec.template.container.containers.\<string\>.image ### .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 Image define image details
@ -112,7 +112,7 @@ Image define image details
### .spec.template.container.containers.\<string\>.imagePullPolicy ### .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 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 ### .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> 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>

View file

@ -28,8 +28,6 @@ import (
"github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util"
) )
type ImagePullSecrets []string
var _ interfaces.Container[Image] = &Image{} var _ interfaces.Container[Image] = &Image{}
type Image struct { type Image struct {
@ -39,9 +37,6 @@ type Image struct {
// ImagePullPolicy define Image pull policy // ImagePullPolicy define Image pull policy
// +doc/default: IfNotPresent // +doc/default: IfNotPresent
ImagePullPolicy *core.PullPolicy `json:"imagePullPolicy,omitempty"` 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 { 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.Image = util.WithDefault(i.Image)
container.ImagePullPolicy = util.WithDefault(i.ImagePullPolicy) 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 return nil
} }
@ -93,16 +78,5 @@ func (i *Image) Validate() error {
return shared.WithErrors( return shared.WithErrors(
shared.PrefixResourceErrors("image", shared.ValidateRequired(i.Image, shared.ValidateImage)), shared.PrefixResourceErrors("image", shared.ValidateRequired(i.Image, shared.ValidateImage)),
shared.PrefixResourceErrors("imagePullPolicy", shared.ValidateOptional(i.ImagePullPolicy, shared.ValidatePullPolicy)), 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
}

View file

@ -92,29 +92,18 @@ func Test_Image(t *testing.T) {
applyImage(t, &core.PodTemplateSpec{}, &core.Container{}, &Image{ applyImage(t, &core.PodTemplateSpec{}, &core.Container{}, &Image{
Image: util.NewType("image"), Image: util.NewType("image"),
ImagePullPolicy: util.NewType(core.PullAlways), ImagePullPolicy: util.NewType(core.PullAlways),
ImagePullSecrets: []string{
"secret",
},
})(func(t *testing.T, pod *core.PodTemplateSpec, container *core.Container) { })(func(t *testing.T, pod *core.PodTemplateSpec, container *core.Container) {
require.EqualValues(t, "image", container.Image) require.EqualValues(t, "image", container.Image)
require.EqualValues(t, core.PullAlways, container.ImagePullPolicy) 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) { t.Run("With PS2", func(t *testing.T) {
applyImage(t, &core.PodTemplateSpec{}, &core.Container{}, &Image{ applyImage(t, &core.PodTemplateSpec{}, &core.Container{}, &Image{
Image: util.NewType("image"), Image: util.NewType("image"),
ImagePullPolicy: util.NewType(core.PullAlways), ImagePullPolicy: util.NewType(core.PullAlways),
ImagePullSecrets: []string{
"secret",
"secret",
},
})(func(t *testing.T, pod *core.PodTemplateSpec, container *core.Container) { })(func(t *testing.T, pod *core.PodTemplateSpec, container *core.Container) {
require.EqualValues(t, "image", container.Image) require.EqualValues(t, "image", container.Image)
require.EqualValues(t, core.PullAlways, container.ImagePullPolicy) require.EqualValues(t, core.PullAlways, container.ImagePullPolicy)
require.Len(t, pod.Spec.ImagePullSecrets, 1)
require.Equal(t, "secret", pod.Spec.ImagePullSecrets[0].Name)
}) })
}) })
} }

View file

@ -98,11 +98,6 @@ func (in *Image) DeepCopyInto(out *Image) {
*out = new(v1.PullPolicy) *out = new(v1.PullPolicy)
**out = **in **out = **in
} }
if in.ImagePullSecrets != nil {
in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
*out = make(ImagePullSecrets, len(*in))
copy(*out, *in)
}
return return
} }
@ -116,26 +111,6 @@ func (in *Image) DeepCopy() *Image {
return out 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. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Lifecycle) DeepCopyInto(out *Lifecycle) { func (in *Lifecycle) DeepCopyInto(out *Lifecycle) {
*out = *in *out = *in

View file

@ -522,10 +522,6 @@ v1alpha1:
type: string type: string
imagePullPolicy: imagePullPolicy:
type: string type: string
imagePullSecrets:
items:
type: string
type: array
lifecycle: lifecycle:
properties: properties:
postStart: postStart:
@ -1017,10 +1013,6 @@ v1alpha1:
type: string type: string
imagePullPolicy: imagePullPolicy:
type: string type: string
imagePullSecrets:
items:
type: string
type: array
lifecycle: lifecycle:
properties: properties:
postStart: postStart:
@ -1550,10 +1542,6 @@ v1alpha1:
type: string type: string
imagePullPolicy: imagePullPolicy:
type: string type: string
imagePullSecrets:
items:
type: string
type: array
lifecycle: lifecycle:
properties: properties:
postStart: postStart:

View file

@ -151,10 +151,6 @@ v1alpha1:
type: string type: string
imagePullPolicy: imagePullPolicy:
type: string type: string
imagePullSecrets:
items:
type: string
type: array
lifecycle: lifecycle:
properties: properties:
postStart: postStart:

View file

@ -202,10 +202,6 @@ v1alpha1:
type: string type: string
imagePullPolicy: imagePullPolicy:
type: string type: string
imagePullSecrets:
items:
type: string
type: array
lifecycle: lifecycle:
properties: properties:
postStart: postStart: