mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
[Bugfix] Ensure proper ArangoDeployment Spec usage in ArangoSync (#1232)
This commit is contained in:
parent
51622c8826
commit
d5b5e0096f
5 changed files with 13 additions and 10 deletions
|
@ -4,6 +4,7 @@
|
|||
- (Bugfix) Fix deployment creation on ARM64
|
||||
- (DebugPackage) Add Agency Dump & State
|
||||
- (Bugfix) Fix After leaked GoRoutines
|
||||
- (Bugfix) Ensure proper ArangoDeployment Spec usage in ArangoSync
|
||||
|
||||
## [1.2.23](https://github.com/arangodb/kube-arangodb/tree/1.2.23) (2023-01-12)
|
||||
- (Bugfix) Remove PDBs if group count is 0
|
||||
|
|
|
@ -57,7 +57,7 @@ func agencyDump(logger zerolog.Logger, files chan<- shared.File) error {
|
|||
}
|
||||
|
||||
for _, deployment := range deployments {
|
||||
if !deployment.Spec.Mode.HasAgents() {
|
||||
if !deployment.GetAcceptedSpec().Mode.HasAgents() {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany
|
||||
// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -141,7 +141,7 @@ func (d *Deployment) IsSyncEnabled() bool {
|
|||
d.currentObjectLock.RLock()
|
||||
defer d.currentObjectLock.RUnlock()
|
||||
|
||||
if d.currentObject.Spec.Sync.IsEnabled() {
|
||||
if d.currentObject.GetAcceptedSpec().Sync.IsEnabled() {
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany
|
||||
// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -142,13 +142,15 @@ func (h *handler) prepareK8sJob(job *appsApi.ArangoJob) (*batch.Job, error) {
|
|||
return &k8sJob, err
|
||||
}
|
||||
|
||||
if deployment.Spec.TLS.IsSecure() {
|
||||
spec := deployment.GetAcceptedSpec()
|
||||
|
||||
if spec.TLS.IsSecure() {
|
||||
k8sJob.Spec.Template.Spec.Volumes = []core.Volume{
|
||||
{
|
||||
Name: shared.TlsKeyfileVolumeName,
|
||||
VolumeSource: core.VolumeSource{
|
||||
Secret: &core.SecretVolumeSource{
|
||||
SecretName: deployment.Spec.TLS.GetCASecretName(),
|
||||
SecretName: spec.TLS.GetCASecretName(),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -162,7 +164,7 @@ func (h *handler) prepareK8sJob(job *appsApi.ArangoJob) (*batch.Job, error) {
|
|||
}
|
||||
|
||||
initContainer := k8sutil.ArangodWaiterInitContainer(api.ServerGroupReservedInitContainerNameWait, deployment.Name, executable,
|
||||
h.operator.Image(), deployment.Spec.TLS.IsSecure(), &core.SecurityContext{})
|
||||
h.operator.Image(), spec.TLS.IsSecure(), &core.SecurityContext{})
|
||||
|
||||
k8sJob.Spec.Template.Spec.InitContainers = append(k8sJob.Spec.Template.Spec.InitContainers, initContainer)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany
|
||||
// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -114,7 +114,7 @@ func (dr *DeploymentReplication) createArangoSyncEndpoint(epSpec api.EndpointSpe
|
|||
dr.log.Err(err).Str("deployment", deploymentName).Debug("Failed to get deployment")
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
dnsName := k8sutil.CreateSyncMasterClientServiceDNSNameWithDomain(depl, depl.Spec.ClusterDomain)
|
||||
dnsName := k8sutil.CreateSyncMasterClientServiceDNSNameWithDomain(depl, depl.GetAcceptedSpec().ClusterDomain)
|
||||
return client.Endpoint{"https://" + net.JoinHostPort(dnsName, strconv.Itoa(shared.ArangoSyncMasterPort))}, nil
|
||||
}
|
||||
return client.Endpoint(epSpec.MasterEndpoint), nil
|
||||
|
@ -176,7 +176,7 @@ func (dr *DeploymentReplication) getEndpointSecretNames(epSpec api.EndpointSpec)
|
|||
dr.log.Err(err).Str("deployment", deploymentName).Debug("Failed to get deployment")
|
||||
return "", "", "", "", errors.WithStack(err)
|
||||
}
|
||||
return clientAuthCertKeyfileSecretName, userSecretName, depl.Spec.Sync.Authentication.GetJWTSecretName(), depl.Spec.Sync.TLS.GetCASecretName(), nil
|
||||
return clientAuthCertKeyfileSecretName, userSecretName, depl.GetAcceptedSpec().Sync.Authentication.GetJWTSecretName(), depl.GetAcceptedSpec().Sync.TLS.GetCASecretName(), nil
|
||||
}
|
||||
return clientAuthCertKeyfileSecretName, userSecretName, "", epSpec.TLS.GetCASecretName(), nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue