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

Merge pull request #116 from arangodb/fix-prmr-init-container

Fixed expected value for ENGINE file in init container of dbserver.
This commit is contained in:
Ewout Prangsma 2018-04-06 09:10:01 +02:00 committed by GitHub
commit e71f9e9914
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 {