1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

Fixed expected value for ENGINE file in init container of dbserver.

[ci LONG=1] [ci TESTOPTIONS="-test.run ^TestMemberResilienceDBServers$"]
This commit is contained in:
Ewout Prangsma 2018-04-06 08:58:41 +02:00
parent 163845d0f4
commit a884e03d2d
No known key found for this signature in database
GPG key ID: 4DBAD380D93D0698
2 changed files with 10 additions and 2 deletions

View file

@ -23,6 +23,8 @@
package v1alpha
import (
"strings"
"github.com/pkg/errors"
)
@ -47,6 +49,12 @@ func (se StorageEngine) Validate() error {
}
}
// AsArangoArgument returns the value for the given storage engine as it is to be used
// for arangod's --server.storage-engine option.
func (se StorageEngine) AsArangoArgument() string {
return strings.ToLower(string(se))
}
// NewStorageEngine returns a reference to a string with given value.
func NewStorageEngine(input StorageEngine) *StorageEngine {
return &input

View file

@ -92,7 +92,7 @@ func createArangodArgs(apiObject metav1.Object, deplSpec api.DeploymentSpec, gro
// Storage engine
options = append(options,
optionPair{"--server.storage-engine", strings.ToLower(string(deplSpec.GetStorageEngine()))},
optionPair{"--server.storage-engine", deplSpec.GetStorageEngine().AsArangoArgument()},
)
// Logging
@ -366,7 +366,7 @@ func (r *Resources) createPodForMember(spec api.DeploymentSpec, group api.Server
SecretKey: constants.SecretKeyJWT,
}
}
engine := string(spec.GetStorageEngine())
engine := spec.GetStorageEngine().AsArangoArgument()
requireUUID := group == api.ServerGroupDBServers && m.IsInitialized
if err := k8sutil.CreateArangodPod(kubecli, spec.IsDevelopment(), apiObject, role, m.ID, m.PodName, m.PersistentVolumeClaimName, info.ImageID, spec.GetImagePullPolicy(),
engine, requireUUID, args, env, livenessProbe, readinessProbe, tlsKeyfileSecretName, rocksdbEncryptionSecretName); err != nil {