mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
1.1.3 RC2 Fixes (#678)
This commit is contained in:
parent
7c16bb29bc
commit
128f2ed38f
8 changed files with 22 additions and 44 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -5,4 +5,5 @@ bin
|
|||
logs
|
||||
vendor/
|
||||
.idea/
|
||||
deps/
|
||||
deps/
|
||||
.vscode/
|
37
.vscode/settings.json
vendored
37
.vscode/settings.json
vendored
|
@ -1,37 +0,0 @@
|
|||
{
|
||||
"git.ignoreLimitWarning": true,
|
||||
"fileHeaderComment.parameter":{
|
||||
"*":{
|
||||
"commentprefix": "//",
|
||||
"company": "ArangoDB GmbH, Cologne, Germany",
|
||||
"author": "Ewout Prangsma"
|
||||
}
|
||||
},
|
||||
"fileHeaderComment.template":{
|
||||
"*":[
|
||||
"${commentprefix} ",
|
||||
"${commentprefix} DISCLAIMER",
|
||||
"${commentprefix} ",
|
||||
"${commentprefix} Copyright ${year} ArangoDB GmbH, Cologne, Germany",
|
||||
"${commentprefix} ",
|
||||
"${commentprefix} Licensed under the Apache License, Version 2.0 (the \"License\");",
|
||||
"${commentprefix} you may not use this file except in compliance with the License.",
|
||||
"${commentprefix} You may obtain a copy of the License at",
|
||||
"${commentprefix} ",
|
||||
"${commentprefix} http://www.apache.org/licenses/LICENSE-2.0",
|
||||
"${commentprefix} ",
|
||||
"${commentprefix} Unless required by applicable law or agreed to in writing, software",
|
||||
"${commentprefix} distributed under the License is distributed on an \"AS IS\" BASIS,",
|
||||
"${commentprefix} WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
|
||||
"${commentprefix} See the License for the specific language governing permissions and",
|
||||
"${commentprefix} limitations under the License.",
|
||||
"${commentprefix} ",
|
||||
"${commentprefix} Copyright holder is ArangoDB GmbH, Cologne, Germany",
|
||||
"${commentprefix} ",
|
||||
"${commentprefix} Author ${author}",
|
||||
"${commentprefix} ",
|
||||
""
|
||||
]
|
||||
},
|
||||
"go.gopath": "${workspaceRoot}/.gobuild"
|
||||
}
|
|
@ -176,7 +176,7 @@ func (d *Deployment) UpdateMember(member api.MemberStatus) error {
|
|||
return maskAny(err)
|
||||
}
|
||||
if err := d.UpdateStatus(status, lastVersion); err != nil {
|
||||
log.Debug().Err(err).Msg("Updating CR status failed")
|
||||
d.deps.Log.Debug().Err(err).Msg("Updating CR status failed")
|
||||
return maskAny(err)
|
||||
}
|
||||
return nil
|
||||
|
|
|
@ -154,6 +154,13 @@ func (d *Deployment) inspectDeploymentWithError(ctx context.Context, lastInterva
|
|||
}
|
||||
}
|
||||
|
||||
// Cleanup terminated pods on the beginning of loop
|
||||
if x, err := d.resources.CleanupTerminatedPods(cachedStatus); err != nil {
|
||||
return minInspectionInterval, errors.Wrapf(err, "Pod cleanup failed")
|
||||
} else {
|
||||
nextInterval = nextInterval.ReduceTo(x)
|
||||
}
|
||||
|
||||
if err := d.resources.EnsureSecrets(d.deps.Log, cachedStatus); err != nil {
|
||||
return minInspectionInterval, errors.Wrapf(err, "Secret creation failed")
|
||||
}
|
||||
|
|
|
@ -112,11 +112,17 @@ func (a *actionUpgradeMember) CheckProgress(ctx context.Context) (bool, bool, er
|
|||
log = log.With().
|
||||
Str("pod-name", m.PodName).
|
||||
Bool("is-upgrading", isUpgrading).Logger()
|
||||
if !m.Conditions.IsTrue(api.ConditionTypeReady) {
|
||||
// Pod is not yet terminated
|
||||
|
||||
act := actionWaitForMemberUp{
|
||||
actionImpl: a.actionImpl,
|
||||
}
|
||||
|
||||
if ok, _, err := act.CheckProgress(ctx); err != nil {
|
||||
return false, false, maskAny(err)
|
||||
} else if !ok {
|
||||
return false, false, nil
|
||||
}
|
||||
// Pod is now gone, update the member status
|
||||
// Pod is now upgraded, update the member status
|
||||
m.Phase = api.MemberPhaseCreated
|
||||
m.RecentTerminations = nil // Since we're upgrading, we do not care about old terminations.
|
||||
m.CleanoutJobID = ""
|
||||
|
|
|
@ -248,7 +248,7 @@ func podNeedsUpgrading(log zerolog.Logger, status api.MemberStatus, spec api.Dep
|
|||
ToLicense: specLicense,
|
||||
UpgradeNeeded: true,
|
||||
UpgradeAllowed: true,
|
||||
AutoUpgradeNeeded: false,
|
||||
AutoUpgradeNeeded: true,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -217,7 +217,7 @@ func createCARenewalPlan(ctx context.Context,
|
|||
}
|
||||
|
||||
if !k8sutil.IsOwner(apiObject.AsOwner(), caSecret) {
|
||||
log.Warn().Str("secret", spec.TLS.GetCASecretName()).Msg("CA Secret is not owned by Operator, we wont do anything")
|
||||
log.Debug().Str("secret", spec.TLS.GetCASecretName()).Msg("CA Secret is not owned by Operator, we wont do anything")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -217,6 +217,7 @@ func (r *Resources) InspectPods(ctx context.Context, cachedStatus inspector.Insp
|
|||
return maskAny(err)
|
||||
}
|
||||
}
|
||||
fallthrough
|
||||
default:
|
||||
log.Debug().Str("pod-name", podName).Msg("Pod is gone")
|
||||
m.Phase = api.MemberPhaseNone // This is trigger a recreate of the pod.
|
||||
|
|
Loading…
Reference in a new issue