Skip to content

Commit ef46f89

Browse files
neunhoefajanikow
authored andcommitted
Rename LocallyAttachedVolumes to NetworkAttachedVolumes. (#447)
1 parent c359f44 commit ef46f89

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

docs/Manual/Deployment/Kubernetes/DeploymentResource.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,20 @@ The encryption key cannot be changed after the cluster has been created.
143143
The secret specified by this setting, must have a data field named 'key' containing
144144
an encryption key that is exactly 32 bytes long.
145145

146+
### `spec.networkAttachedVolumes: bool`
147+
148+
The default of this option is `false`. If set to `true`, and the
149+
deployed ArangoDB version is new enough (>= 3.4.8 for 3.4 and >= 3.5.1
150+
for 3.5), a `ResignLeaderShip` operation
151+
will be triggered when a dbserver pod is evicted (rather than a
152+
`CleanOutServer` operation). Furthermore, the pod will simply be
153+
redeployed on a different node, rather than cleaned and retired and
154+
replaced by a new member. You must only set this option to `true` if
155+
your persistent volumes are "movable" in the sense that they can be
156+
mounted from a different k8s node, like in the case of network attached
157+
volumes. If your persistent volumes are tied to a specific pod, you
158+
must leave this option on `false`.
159+
146160
### `spec.externalAccess.type: string`
147161

148162
This setting specifies the type of `Service` that will be created to provide

pkg/apis/deployment/v1alpha/deployment_spec.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ type DeploymentSpec struct {
5656
DowntimeAllowed *bool `json:"downtimeAllowed,omitempty"`
5757
DisableIPv6 *bool `json:"disableIPv6,omitempty"`
5858

59-
LocallyAttachedVolumes *bool `json:"locallyAttachedVolumes,omitempty"`
59+
NetworkAttachedVolumes *bool `json:"networkAttachedVolumes,omitempty"`
6060

6161
ExternalAccess ExternalAccessSpec `json:"externalAccess"`
6262
RocksDB RocksDBSpec `json:"rocksdb"`
@@ -126,9 +126,9 @@ func (s DeploymentSpec) IsDisableIPv6() bool {
126126
return util.BoolOrDefault(s.DisableIPv6)
127127
}
128128

129-
// IsLocallyAttachedVolumes returns the value of locallyAttachedVolumes, default true
130-
func (s DeploymentSpec) IsLocallyAttachedVolumes() bool {
131-
return util.BoolOrDefault(s.LocallyAttachedVolumes, true)
129+
// IsNetworkAttachedVolumes returns the value of networkAttachedVolumes, default false
130+
func (s DeploymentSpec) IsNetworkAttachedVolumes() bool {
131+
return util.BoolOrDefault(s.NetworkAttachedVolumes, false)
132132
}
133133

134134
// GetListenAddr returns "[::]" or "0.0.0.0" depending on IsDisableIPv6

pkg/apis/deployment/v1alpha/zz_generated.deepcopy.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/deployment/resources/pod_termination.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func (r *Resources) prepareDBServerPodTermination(ctx context.Context, log zerol
157157
log.Warn().Err(err).Msg("Failed to get node for member")
158158
return maskAny(err)
159159
} else if node.Spec.Unschedulable {
160-
if r.context.GetSpec().IsLocallyAttachedVolumes() || !resignJobAvailable {
160+
if !r.context.GetSpec().IsNetworkAttachedVolumes() || !resignJobAvailable {
161161
dbserverDataWillBeGone = true
162162
}
163163
}

0 commit comments

Comments
 (0)