1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-15 17:51:03 +00:00

Rename LocallyAttachedVolumes to NetworkAttachedVolumes. (#447)

This commit is contained in:
Max Neunhöffer 2019-09-23 09:03:09 +02:00 committed by Adam Janikowski
parent c359f44114
commit ef46f8920e
4 changed files with 21 additions and 7 deletions

View file

@ -143,6 +143,20 @@ The encryption key cannot be changed after the cluster has been created.
The secret specified by this setting, must have a data field named 'key' containing
an encryption key that is exactly 32 bytes long.
### `spec.networkAttachedVolumes: bool`
The default of this option is `false`. If set to `true`, and the
deployed ArangoDB version is new enough (>= 3.4.8 for 3.4 and >= 3.5.1
for 3.5), a `ResignLeaderShip` operation
will be triggered when a dbserver pod is evicted (rather than a
`CleanOutServer` operation). Furthermore, the pod will simply be
redeployed on a different node, rather than cleaned and retired and
replaced by a new member. You must only set this option to `true` if
your persistent volumes are "movable" in the sense that they can be
mounted from a different k8s node, like in the case of network attached
volumes. If your persistent volumes are tied to a specific pod, you
must leave this option on `false`.
### `spec.externalAccess.type: string`
This setting specifies the type of `Service` that will be created to provide

View file

@ -56,7 +56,7 @@ type DeploymentSpec struct {
DowntimeAllowed *bool `json:"downtimeAllowed,omitempty"`
DisableIPv6 *bool `json:"disableIPv6,omitempty"`
LocallyAttachedVolumes *bool `json:"locallyAttachedVolumes,omitempty"`
NetworkAttachedVolumes *bool `json:"networkAttachedVolumes,omitempty"`
ExternalAccess ExternalAccessSpec `json:"externalAccess"`
RocksDB RocksDBSpec `json:"rocksdb"`
@ -126,9 +126,9 @@ func (s DeploymentSpec) IsDisableIPv6() bool {
return util.BoolOrDefault(s.DisableIPv6)
}
// IsLocallyAttachedVolumes returns the value of locallyAttachedVolumes, default true
func (s DeploymentSpec) IsLocallyAttachedVolumes() bool {
return util.BoolOrDefault(s.LocallyAttachedVolumes, true)
// IsNetworkAttachedVolumes returns the value of networkAttachedVolumes, default false
func (s DeploymentSpec) IsNetworkAttachedVolumes() bool {
return util.BoolOrDefault(s.NetworkAttachedVolumes, false)
}
// GetListenAddr returns "[::]" or "0.0.0.0" depending on IsDisableIPv6

View file

@ -272,8 +272,8 @@ func (in *DeploymentSpec) DeepCopyInto(out *DeploymentSpec) {
*out = new(bool)
**out = **in
}
if in.LocallyAttachedVolumes != nil {
in, out := &in.LocallyAttachedVolumes, &out.LocallyAttachedVolumes
if in.NetworkAttachedVolumes != nil {
in, out := &in.NetworkAttachedVolumes, &out.NetworkAttachedVolumes
*out = new(bool)
**out = **in
}

View file

@ -157,7 +157,7 @@ func (r *Resources) prepareDBServerPodTermination(ctx context.Context, log zerol
log.Warn().Err(err).Msg("Failed to get node for member")
return maskAny(err)
} else if node.Spec.Unschedulable {
if r.context.GetSpec().IsLocallyAttachedVolumes() || !resignJobAvailable {
if !r.context.GetSpec().IsNetworkAttachedVolumes() || !resignJobAvailable {
dbserverDataWillBeGone = true
}
}