Skip to content

Commit

Permalink
Order the env vars converted from annotations (#164)
Browse files Browse the repository at this point in the history
This fixes a bug when spec.annotations has multiple annotations. Each
annotation is converted to an environment variable in the server container.
Prior to this fix, if you had multiple annotations defined the StatefulSet we
generate each reconcile cycle could change. This causes the statefulset
controller to go into a rolling upgrade -- update pod, wait for it to be ready,
update next pod, etc.

The StatefulSet wasn't really changing though. It was just the order that we
declared the environment variables. The fix is to sort the environment
variables so that the order is consistent. That way the StatefulSet we generate
doesn't change if the annotations didn't change.
  • Loading branch information
spilchen authored Mar 2, 2022
1 parent 1acbc98 commit 5cb4db2
Show file tree
Hide file tree
Showing 13 changed files with 84 additions and 13 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The file is generated by [Changie](https://github.com/miniscruff/changie).


## 1.3.1 - 2022-03-02
### Fixed
* [#164](https://github.com/vertica/vertica-kubernetes/issues/164) Order the environment variables that were converted from annotations. Prior to this fix, it was quite easy to get the statefulset controller to go into a repeated rolling upgrade. The order ensures the statefulset doesn't appear to change between reconcile cycles.
* [#161](https://github.com/vertica/vertica-kubernetes/issues/161) Tolerate slashes being at the end of the communal endpoint url

## 1.3.0 - 2022-02-18
### Added
* [#146](https://github.com/vertica/vertica-kubernetes/issues/146) All annotations in the CR will be converted to environment variables in the containers.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# To re-generate a bundle for another specific version without changing the standard setup, you can:
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= 1.3.0
VERSION ?= 1.3.1

# VLOGGER_VERSION defines the version to use for the Vertica logger image
# (see docker-vlogger). This version is separate from VERSION above in
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To deploy the operator and a Kubernetes cluster in a local test environment that
Vertica extends the Kubernetes API with its [Custom Resource Definition](https://www.vertica.com/docs/latest/HTML/Content/Authoring/Containers/Kubernetes/ContainerizedVerticaWithK8s.htm). Install the `CustomResourceDefinition` with a YAML manifest:

```shell
kubectl apply -f https://github.com/vertica/vertica-kubernetes/releases/download/v1.3.0/verticadbs.vertica.com-crd.yaml
kubectl apply -f https://github.com/vertica/vertica-kubernetes/releases/download/v1.3.1/verticadbs.vertica.com-crd.yaml
```

# Installing the VerticaDB Operator
Expand Down
4 changes: 4 additions & 0 deletions changes/1.3.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## 1.3.1 - 2022-03-02
### Fixed
* [#164](https://github.com/vertica/vertica-kubernetes/issues/164) Order the environment variables that were converted from annotations. Prior to this fix, it was quite easy to get the statefulset controller to go into a repeated rolling upgrade. The order ensures the statefulset doesn't appear to change between reconcile cycles.
* [#161](https://github.com/vertica/vertica-kubernetes/issues/161) Tolerate slashes being at the end of the communal endpoint url
5 changes: 0 additions & 5 deletions changes/unreleased/Fixed-20220224-164528.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ spec:
* Service management and health monitoring for pods
* Load balancing for internal and external traffic
For a brief overview on how to create a cluster, see the [Vertica GitHub repository](https://github.com/vertica/vertica-kubernetes). For an in-depth look at Vertica on Kubernetes, see the [Vertica documentation](https://www.vertica.com/docs/11.0.x/HTML/Content/Authoring/Containers/ContainerizedVertica.htm).
For a brief overview on how to create a cluster, see the [Vertica GitHub repository](https://github.com/vertica/vertica-kubernetes). For an in-depth look at Vertica on Kubernetes, see the [Vertica documentation](https://www.vertica.com/docs/latest/HTML/Content/Authoring/Containers/ContainerizedVertica.htm).
displayName: VerticaDB Operator
icon:
- base64data: iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAcAmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAA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qexuN4JTNcKuNBdfgIlkIH3trv8M8bNp+ZPc7y2xSl6sSguyk8gBA5KVvJ4vTqlWd7o4B4vfrEoLiqDQIBqjX9vdVi379yG686jPqs3hoZpZfBXQQSaQFayIqLD9akNNm5XZcS+06gcAkPX+pVWh5b9X1XhvuM+q5qciiIPKolAAEsgT/os76cQ/0yTw8kSFoviorIIBEgLXvvIYdvnZ1R4sNvnhY1OkDRX2IwrbDpAleDk0S+WQJ9tctjfmauY1OVsVB6BEjAEL7W6//uRn1VNduK9zUmhTC6aAlWC7iMez7XYjBqqsW+/F/unmEqNyiRQAzKCP7zngAh7XHQqbvlCpRIoAUtw4JgPUub1c3SlRmUSCGEhHqByyYNK3ETOMwwSWCA0KnqBVDykBgwv9yzOYwzXgXYG/zuMgSANdP4XoMySW3NegSAAAAAASUVORK5CYII=
Expand All @@ -525,7 +525,7 @@ spec:
- vertica
links:
- name: Documentation
url: https://www.vertica.com/docs/11.0.x/HTML/Content/Authoring/Containers/ContainerizedVertica.htm
url: https://www.vertica.com/docs/latest/HTML/Content/Authoring/Containers/ContainerizedVertica.htm
- name: Vertica Container Images
url: https://hub.docker.com/u/vertica
maintainers:
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/verticadb-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ name: verticadb-operator
description: An operator that can deploy and manage Vertica clusters
type: application
# Versions follow Semantic Versioning (https://semver.org/)
version: 1.3.0
version: 1.3.1
2 changes: 1 addition & 1 deletion helm-charts/verticadb-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


image:
name: vertica/verticadb-operator:1.3.0
name: vertica/verticadb-operator:1.3.1

webhook:
# The webhook requires a TLS certficate to work. By default we rely on
Expand Down
8 changes: 8 additions & 0 deletions pkg/controllers/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"fmt"
"path/filepath"
"regexp"
"sort"
"strings"

vapi "github.com/vertica/vertica-kubernetes/api/v1beta1"
Expand Down Expand Up @@ -401,6 +402,13 @@ func translateAnnotationsToEnvVars(vdb *vapi.VerticaDB) []corev1.EnvVar {
Value: v,
})
}
// We must always sort the list of envVars. Failure to do this could cause
// the statefulset controller to think the container that has the envVars
// has changed. But in reality, the containers are identical except for the
// order of the vars.
sort.Slice(envVars, func(i, j int) bool {
return envVars[i].Name < envVars[j].Name
})
return envVars
}

Expand Down
43 changes: 43 additions & 0 deletions pkg/controllers/builder_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
(c) Copyright [2021-2022] Micro Focus or one of its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package controllers

import (
"reflect"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
vapi "github.com/vertica/vertica-kubernetes/api/v1beta1"
)

var _ = Describe("builder", func() {
It("should generate identical k8s containers each time", func() {
vdb := vapi.MakeVDB()
vdb.Spec.Annotations = map[string]string{
"key1": "val1",
"key2": "val2",
"vertica.com/gitRef": "abcd123",
"1_not_valid_env_var_name": "blah",
}

baseContainer := makeServerContainer(vdb, &vdb.Spec.Subclusters[0])
const MaxLoopIteratons = 100
for i := 1; i < MaxLoopIteratons; i++ {
c := makeServerContainer(vdb, &vdb.Spec.Subclusters[0])
Expect(reflect.DeepEqual(c, baseContainer)).Should(BeTrue())
}
})
})
5 changes: 3 additions & 2 deletions pkg/controllers/labels_annotations.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ const (
OperatorVersionLabel = "app.kubernetes.io/version"
OperatorName = "verticadb-operator" // The name of the operator

CurOperatorVersion = "1.3.0" // The version number of the operator
CurOperatorVersion = "1.3.1" // The version number of the operator
OperatorVersion100 = "1.0.0"
OperatorVersion110 = "1.1.0"
OperatorVersion120 = "1.2.0"
OperatorVersion130 = CurOperatorVersion
OperatorVersion130 = "1.3.0"
OperatorVersion131 = CurOperatorVersion
)

// makeSubclusterLabels returns the labels added for the subcluster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ spec:
licenseSecret: ce-license
annotations:
vertica.com/git-ref: 1fab313k
TZ: CET
usage: e2e
testcase-name: v-ks-1-update-strategy
Loading

0 comments on commit 5cb4db2

Please sign in to comment.