mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
OAS-10003 Gateway custom image (#1707)
This commit is contained in:
parent
88c5df2078
commit
8264471502
9 changed files with 71 additions and 3 deletions
|
@ -17,6 +17,7 @@
|
|||
- (Feature) Integration Service Authentication
|
||||
- (Improvement) Better panic handling
|
||||
- (Feature) PongV1 Integration Service
|
||||
- (Feature) Custom Gateway image
|
||||
|
||||
## [1.2.42](https://github.com/arangodb/kube-arangodb/tree/1.2.42) (2024-07-23)
|
||||
- (Maintenance) Go 1.22.4 & Kubernetes 1.29.6 libraries
|
||||
|
|
|
@ -3045,7 +3045,21 @@ Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.
|
|||
|
||||
### .spec.gateway.enabled
|
||||
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/deployment_spec_gateway.go#L24)</sup>
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/deployment_spec_gateway.go#L29)</sup>
|
||||
|
||||
Enabled setting enables/disables support for gateway in the cluster.
|
||||
When enabled, the cluster will contain a number of `gateway` servers.
|
||||
|
||||
Default Value: `false`
|
||||
|
||||
***
|
||||
|
||||
### .spec.gateway.image
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/deployment_spec_gateway.go#L33)</sup>
|
||||
|
||||
Image is the image to use for the gateway.
|
||||
By default, the image is determined by the operator.
|
||||
|
||||
***
|
||||
|
||||
|
|
|
@ -195,5 +195,4 @@ spec:
|
|||
WaitForMemberUp: 30m0s
|
||||
|
||||
```
|
||||
|
||||
[END_INJECT]: # (actionsModYaml)
|
||||
|
|
|
@ -20,10 +20,20 @@
|
|||
|
||||
package v1
|
||||
|
||||
import "github.com/arangodb/kube-arangodb/pkg/util"
|
||||
|
||||
type DeploymentSpecGateway struct {
|
||||
// Enabled setting enables/disables support for gateway in the cluster.
|
||||
// When enabled, the cluster will contain a number of `gateway` servers.
|
||||
// +doc/default: false
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
|
||||
// Image is the image to use for the gateway.
|
||||
// By default, the image is determined by the operator.
|
||||
Image *string `json:"image"`
|
||||
}
|
||||
|
||||
// IsEnabled returns whether the gateway is enabled.
|
||||
func (d *DeploymentSpecGateway) IsEnabled() bool {
|
||||
if d == nil || d.Enabled == nil {
|
||||
return false
|
||||
|
@ -32,6 +42,12 @@ func (d *DeploymentSpecGateway) IsEnabled() bool {
|
|||
return *d.Enabled
|
||||
}
|
||||
|
||||
// Validate the given spec
|
||||
func (d *DeploymentSpecGateway) Validate() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetImage returns the image to use for the gateway.
|
||||
func (d *DeploymentSpecGateway) GetImage() string {
|
||||
return util.TypeOrDefault[string](d.Image)
|
||||
}
|
||||
|
|
5
pkg/apis/deployment/v1/zz_generated.deepcopy.go
generated
5
pkg/apis/deployment/v1/zz_generated.deepcopy.go
generated
|
@ -1179,6 +1179,11 @@ func (in *DeploymentSpecGateway) DeepCopyInto(out *DeploymentSpecGateway) {
|
|||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.Image != nil {
|
||||
in, out := &in.Image, &out.Image
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -20,8 +20,11 @@
|
|||
|
||||
package v2alpha1
|
||||
|
||||
import "github.com/arangodb/kube-arangodb/pkg/util"
|
||||
|
||||
type DeploymentSpecGateway struct {
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
Image *string `json:"image"`
|
||||
}
|
||||
|
||||
func (d *DeploymentSpecGateway) IsEnabled() bool {
|
||||
|
@ -35,3 +38,7 @@ func (d *DeploymentSpecGateway) IsEnabled() bool {
|
|||
func (d *DeploymentSpecGateway) Validate() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *DeploymentSpecGateway) GetImage() string {
|
||||
return util.TypeOrDefault[string](d.Image)
|
||||
}
|
||||
|
|
|
@ -1179,6 +1179,11 @@ func (in *DeploymentSpecGateway) DeepCopyInto(out *DeploymentSpecGateway) {
|
|||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.Image != nil {
|
||||
in, out := &in.Image, &out.Image
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -6568,7 +6568,15 @@ v1:
|
|||
description: Gateway defined main Gateway configuration.
|
||||
properties:
|
||||
enabled:
|
||||
description: |-
|
||||
Enabled setting enables/disables support for gateway in the cluster.
|
||||
When enabled, the cluster will contain a number of `gateway` servers.
|
||||
type: boolean
|
||||
image:
|
||||
description: |-
|
||||
Image is the image to use for the gateway.
|
||||
By default, the image is determined by the operator.
|
||||
type: string
|
||||
type: object
|
||||
gateways:
|
||||
description: Gateways contain specification for Gateway pods running in deployment mode `Single` or `Cluster`.
|
||||
|
@ -22587,7 +22595,15 @@ v1alpha:
|
|||
description: Gateway defined main Gateway configuration.
|
||||
properties:
|
||||
enabled:
|
||||
description: |-
|
||||
Enabled setting enables/disables support for gateway in the cluster.
|
||||
When enabled, the cluster will contain a number of `gateway` servers.
|
||||
type: boolean
|
||||
image:
|
||||
description: |-
|
||||
Image is the image to use for the gateway.
|
||||
By default, the image is determined by the operator.
|
||||
type: string
|
||||
type: object
|
||||
gateways:
|
||||
description: Gateways contain specification for Gateway pods running in deployment mode `Single` or `Cluster`.
|
||||
|
@ -38607,6 +38623,8 @@ v2alpha1:
|
|||
properties:
|
||||
enabled:
|
||||
type: boolean
|
||||
image:
|
||||
type: string
|
||||
type: object
|
||||
gateways:
|
||||
description: Gateways contain specification for Gateway pods running in deployment mode `Single` or `Cluster`.
|
||||
|
|
|
@ -390,6 +390,9 @@ func (r *Resources) RenderPodForMember(ctx context.Context, acs sutil.ACS, spec
|
|||
}
|
||||
case api.ServerGroupTypeGateway:
|
||||
imageInfo.Image = r.context.GetOperatorImage()
|
||||
if spec.Gateway.GetImage() != "" {
|
||||
imageInfo.Image = spec.Gateway.GetImage()
|
||||
}
|
||||
|
||||
podCreator = &MemberGatewayPod{
|
||||
podName: podName,
|
||||
|
|
Loading…
Reference in a new issue