|
| 1 | +## v0.5.0 - 2020-10-27 |
| 2 | + |
| 3 | +We're happy to announce the release of Lokomotive v0.5.0 (Eurostar). |
| 4 | + |
| 5 | +This release packs new features, bug fixes, code optimizations, platform updates and security hardening. |
| 6 | + |
| 7 | +### Changes in v0.5.0 |
| 8 | + |
| 9 | +#### Kubernetes updates |
| 10 | + |
| 11 | +- Update Kubernetes to |
| 12 | + [`v1.19.3`](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.19.md#v1193) |
| 13 | + ([#1030](https://github.com/kinvolk/lokomotive/pull/1030)). |
| 14 | + |
| 15 | +#### Platform updates |
| 16 | + |
| 17 | +##### AKS |
| 18 | + |
| 19 | +- Update Kubernetes to `1.18.8` |
| 20 | + ([#1071](https://github.com/kinvolk/lokomotive/pull/1071)). |
| 21 | + |
| 22 | +##### Baremetal |
| 23 | + |
| 24 | +- Expose CNI MTU on the baremetal platform |
| 25 | + ([#977](https://github.com/kinvolk/lokomotive/pull/977)). |
| 26 | + |
| 27 | +#### New components |
| 28 | + |
| 29 | +- Component web-ui |
| 30 | + ([#981](https://github.com/kinvolk/lokomotive/pull/981)), |
| 31 | + ([#1100](https://github.com/kinvolk/lokomotive/pull/1100)) |
| 32 | + from [headlamp](https://github.com/kinvolk/headlamp). |
| 33 | +- Component inspektor-gadget |
| 34 | + ([#1076](https://github.com/kinvolk/lokomotive/pull/1076)) |
| 35 | + from [inspektor-gadget](https://github.com/kinvolk/inspektor-gadget/). |
| 36 | + |
| 37 | +#### Component updates |
| 38 | + |
| 39 | +- Update Velero component for Packet (OpenEBS and restic plugin support) |
| 40 | + ([#881](https://github.com/kinvolk/lokomotive/pull/881)). |
| 41 | +- istio-operator: Update to 1.7.3 |
| 42 | + ([#1086](https://github.com/kinvolk/lokomotive/pull/1086)). |
| 43 | +- prometheus-operator: Update grafana, kube-state-metrics and node_exporter |
| 44 | + ([#963](https://github.com/kinvolk/lokomotive/pull/963)). |
| 45 | +- cert-manager: Update to 1.0.3 |
| 46 | + ([#1114](https://github.com/kinvolk/lokomotive/pull/1114)). |
| 47 | + |
| 48 | +#### Terraform updates |
| 49 | + |
| 50 | +- Update to Terraform 0.13 |
| 51 | + ([#824](https://github.com/kinvolk/lokomotive/pull/824)). |
| 52 | + |
| 53 | +#### Features |
| 54 | + |
| 55 | +- Support in-cluster pod traffic encryption |
| 56 | + ([#911](https://github.com/kinvolk/lokomotive/pull/911)). |
| 57 | +- AWS, Packet, Baremetal: use Docker instead of rkt for host containers |
| 58 | + ([#946](https://github.com/kinvolk/lokomotive/pull/946)). |
| 59 | +- Change labels and taints format from string to structured |
| 60 | + ([#1042](https://github.com/kinvolk/lokomotive/pull/1042)). |
| 61 | +- prometheus-operator: Add external_url |
| 62 | + ([#964](https://github.com/kinvolk/lokomotive/pull/964)). |
| 63 | + |
| 64 | +#### Docs |
| 65 | + |
| 66 | +- Concepts: add document for admission webhook |
| 67 | + ([#943](https://github.com/kinvolk/lokomotive/pull/943)). |
| 68 | +- Coding style guide |
| 69 | + ([#953](https://github.com/kinvolk/lokomotive/pull/953)). |
| 70 | +- MetalLB: Clarify address_pools knob |
| 71 | + ([#996](https://github.com/kinvolk/lokomotive/pull/996)). |
| 72 | +- How to guide on backing up and restoring rook-ceph volumes with Velero |
| 73 | + ([#1048](https://github.com/kinvolk/lokomotive/pull/1048)). |
| 74 | + |
| 75 | +#### Bug fixes |
| 76 | + |
| 77 | +- bootkube: feed output using local rather than local_file content |
| 78 | + ([#1021](https://github.com/kinvolk/lokomotive/pull/1021)). |
| 79 | +- Dex: fix pod reload on config change |
| 80 | + ([#1040](https://github.com/kinvolk/lokomotive/pull/1040)). |
| 81 | +- MetalLB: Add missing autodiscovery labels |
| 82 | + ([#990](https://github.com/kinvolk/lokomotive/pull/990)). |
| 83 | +- Gangway: add a ServiceAccount |
| 84 | + ([#1104](https://github.com/kinvolk/lokomotive/pull/1104)). |
| 85 | +- If there is more than one component installed in single namespace, `lokoctl` will now |
| 86 | + refuse to remove then namespace while running `lokoctl component --delete` with `--delete-namespace` flag ([#1093](https://github.com/kinvolk/lokomotive/pull/1093)). |
| 87 | + |
| 88 | +#### Development |
| 89 | + |
| 90 | +- Fix error capitalization |
| 91 | + ([#979](https://github.com/kinvolk/lokomotive/pull/979)). |
| 92 | +- pkg/terraform: unexport functions not used outside of package |
| 93 | + ([#984](https://github.com/kinvolk/lokomotive/pull/984)). |
| 94 | +- pkg/components: remove unused List() function |
| 95 | + ([#982](https://github.com/kinvolk/lokomotive/pull/982)). |
| 96 | +- docs/rook-ceph-storage: Use correct apply command |
| 97 | + ([#1026](https://github.com/kinvolk/lokomotive/pull/1026)). |
| 98 | +- pkg/asssets/assets_generate: Fix copyright |
| 99 | + ([#1020](https://github.com/kinvolk/lokomotive/pull/1020)). |
| 100 | +- Cleanup Terraform providers before Terraform 0.13 upgrades |
| 101 | + ([#860](https://github.com/kinvolk/lokomotive/pull/860)). |
| 102 | +- kubelet e2e: Enable the disruptive test |
| 103 | + ([#1012](https://github.com/kinvolk/lokomotive/pull/1012)). |
| 104 | +- .golangci.yml: Re-enable linters |
| 105 | + ([#1029](https://github.com/kinvolk/lokomotive/pull/1029)). |
| 106 | +- Fix scripts/find-updates.sh |
| 107 | + ([#1034](https://github.com/kinvolk/lokomotive/pull/1034)), |
| 108 | + ([#1068](https://github.com/kinvolk/lokomotive/pull/1068)), |
| 109 | + ([#1080](https://github.com/kinvolk/lokomotive/pull/1080)). |
| 110 | +- pkg/terraform: improvements |
| 111 | + ([#1027](https://github.com/kinvolk/lokomotive/pull/1027)). |
| 112 | +- cli/cmd: cleanups part 1 |
| 113 | + ([#1013](https://github.com/kinvolk/lokomotive/pull/1013)). |
| 114 | +- test/components/kubernetes: remove kubelet pod when testing node labels |
| 115 | + ([#1052](https://github.com/kinvolk/lokomotive/pull/1052)). |
| 116 | +- Remove usage of template_file |
| 117 | + ([#1046](https://github.com/kinvolk/lokomotive/pull/1046)). |
| 118 | +- test: de-duplicate value timeout and retryInterval |
| 119 | + ([#1049](https://github.com/kinvolk/lokomotive/pull/1049)). |
| 120 | +- Packet: Read BGP peer address from metadata service |
| 121 | + ([#1010](https://github.com/kinvolk/lokomotive/pull/1010)). |
| 122 | +- pkg/assets: cleanup exported API |
| 123 | + ([#936](https://github.com/kinvolk/lokomotive/pull/936)). |
| 124 | +- Cobra updated to v1.1.1 |
| 125 | + ([#1082](https://github.com/kinvolk/lokomotive/pull/1082)), |
| 126 | + ([#1091](https://github.com/kinvolk/lokomotive/pull/1091)). |
| 127 | +- cli/cmd: cleanups part 2 |
| 128 | + ([#1015](https://github.com/kinvolk/lokomotive/pull/1015)). |
| 129 | +- Add github actions |
| 130 | + ([#1074](https://github.com/kinvolk/lokomotive/pull/1074)). |
| 131 | +- Makefile: use latest Go when building in Docker |
| 132 | + ([#1083](https://github.com/kinvolk/lokomotive/pull/1083)). |
| 133 | +- cli/cmd: cleanups part 3 |
| 134 | + ([#1018](https://github.com/kinvolk/lokomotive/pull/1018)). |
| 135 | +- Add new CI config for Packet based FLUO testing |
| 136 | + ([#1110](https://github.com/kinvolk/lokomotive/pull/1110)). |
| 137 | + |
| 138 | +### Updating from v0.4.1 |
| 139 | + |
| 140 | +#### Configuration syntax changes |
| 141 | + |
| 142 | +There have been some minor changes to the configurations of worker nodes. |
| 143 | + |
| 144 | +The data type of `labels` and `taints` has been changed from `string` to `map(string)` for the AWS and Packet platforms. |
| 145 | + |
| 146 | +##### Old: |
| 147 | + |
| 148 | +```hcl |
| 149 | +labels = "testing=true" |
| 150 | +
|
| 151 | +taints = "nodeType=storage:NoSchedule" |
| 152 | +``` |
| 153 | + |
| 154 | +##### New: |
| 155 | + |
| 156 | +```hcl |
| 157 | +labels = { |
| 158 | + "testing" = "true" |
| 159 | +} |
| 160 | +
|
| 161 | +taints = { |
| 162 | + "nodeType" = "storage:NoSchedule" |
| 163 | +} |
| 164 | +``` |
| 165 | + |
| 166 | +This release also changes the default `cluster.oidc.client_id` value from `gangway` to `clusterauth`. |
| 167 | + |
| 168 | +This setting must match `gangway.client_id` and `dex.static_client.id`. |
| 169 | + |
| 170 | +If you use default settings for oidc you'll need to add `client_id = "gangway"` or change the `static_client.id` and `client_id` parameters for dex and gangway to `clusterauth` respectively. |
| 171 | + |
| 172 | +##### Old: |
| 173 | + |
| 174 | +```hcl |
| 175 | +packet { |
| 176 | + oidc { |
| 177 | + client_id = "gangway" |
| 178 | + } |
| 179 | +} |
| 180 | +``` |
| 181 | + |
| 182 | +##### New: |
| 183 | + |
| 184 | +```hcl |
| 185 | +packet { |
| 186 | + oidc { |
| 187 | + client_id = "clusterauth" |
| 188 | + } |
| 189 | +} |
| 190 | +``` |
| 191 | + |
| 192 | +#### Cluster update steps |
| 193 | + |
| 194 | +Ensure your cluster is in a healthy state by running `lokoctl cluster apply` using the `v0.4.1` version. |
| 195 | + |
| 196 | +Updating multiple versions at a time is not supported so, if your cluster is older, update to `v0.4.1` and only then proceed with the update to `v0.5.0`. |
| 197 | + |
| 198 | +Due to [Terraform](https://github.com/kinvolk/lokomotive/pull/824) and [Kubernetes](https://github.com/kinvolk/lokomotive/pull/1030) updates to v0.13+ and v1.19.3 respectively. |
| 199 | + |
| 200 | +Some manual steps need to be performed when updating. In your cluster configuration directory, follow these steps: |
| 201 | + |
| 202 | +1. Update local Terraform binary to version v0.13.X. You can follow [this guide](https://learn.hashicorp.com/tutorials/terraform/install-cli) to do that. |
| 203 | + |
| 204 | +2. Starting from your cluster directory, export your platform name and assets directory name used in your platform configuration. It will be used in next steps: |
| 205 | + ```sh |
| 206 | + export PLATFORM="packet" && export ASSETS_DIR="assets" |
| 207 | + ``` |
| 208 | + |
| 209 | +3. Remove old asset files: |
| 210 | + ```sh |
| 211 | + rm -f $ASSETS_DIR/terraform-modules/$PLATFORM/flatcar-linux/kubernetes/require.tf \ |
| 212 | + $ASSETS_DIR/terraform-modules/$PLATFORM/flatcar-linux/kubernetes/workers/require.tf \ |
| 213 | + $ASSETS_DIR/terraform-modules/dns/route53/require.tf |
| 214 | + ``` |
| 215 | + |
| 216 | +4. Go to the `terraform` directory: |
| 217 | + ```sh |
| 218 | + cd $ASSETS_DIR/terraform |
| 219 | + ``` |
| 220 | + |
| 221 | +5. Replace the old providers: |
| 222 | + ```sh |
| 223 | + terraform state replace-provider -auto-approve registry.terraform.io/-/ct registry.terraform.io/poseidon/ct && \ |
| 224 | + terraform state replace-provider -auto-approve registry.terraform.io/-/template registry.terraform.io/hashicorp/template |
| 225 | + ``` |
| 226 | + |
| 227 | +6. Return to original directory and use kubeconfig generated by lokomotive: |
| 228 | + |
| 229 | + ```sh |
| 230 | + cd - && export KUBECONFIG=$ASSETS_DIR/cluster-assets/auth/kubeconfig |
| 231 | + ``` |
| 232 | + |
| 233 | +7. `FelixConfiguration` has been moved to calico charts. To avoid firewall interruption, label and annotate it so that it can be managed by Helm while updating: |
| 234 | + ```sh |
| 235 | + kubectl label FelixConfiguration default app.kubernetes.io/managed-by=Helm --overwrite=true && \ |
| 236 | + kubectl annotate FelixConfiguration default meta.helm.sh/release-name=calico --overwrite=true && \ |
| 237 | + kubectl annotate FelixConfiguration default meta.helm.sh/release-namespace=kube-system --overwrite=true |
| 238 | + ``` |
| 239 | + |
| 240 | +Finally, run the following: |
| 241 | + |
| 242 | +```sh |
| 243 | +lokoctl cluster apply --skip-components -v |
| 244 | +``` |
| 245 | + |
| 246 | +**NOTE:** On clusters with a single controller node, you need to delete the old `kube-apiserver` ReplicaSet during cluster update. |
| 247 | + |
| 248 | +When lokoctl prints that `kube-apiserver` is being updated, run the following command: |
| 249 | + ```sh |
| 250 | + kubectl delete rs -n kube-system $(kubectl get rs -n kube-system -l k8s-app=kube-apiserver --no-headers=true --sort-by=metadata.creationTimestamp | tac | tail -n +2 | awk '{print $1}') || true |
| 251 | + ``` |
| 252 | + |
| 253 | +**NOTE:** When this gets executed the update process will get interrupted. Re-run `lokoctl cluster apply --skip-components -v` to proceed. |
| 254 | + |
| 255 | +The update process typically takes about 10 minutes. |
| 256 | +After the update, running `lokoctl health` should result in an output similar to the following: |
| 257 | + |
| 258 | +```sh |
| 259 | +Node Ready Reason Message |
| 260 | + |
| 261 | +lokomotive-controller-0 True KubeletReady kubelet is posting ready status |
| 262 | +lokomotive-1-worker-0 True KubeletReady kubelet is posting ready status |
| 263 | +lokomotive-1-worker-1 True KubeletReady kubelet is posting ready status |
| 264 | +lokomotive-1-worker-2 True KubeletReady kubelet is posting ready status |
| 265 | +Name Status Message Error |
| 266 | + |
| 267 | +etcd-0 True {"health":"true"} |
| 268 | +``` |
| 269 | + |
| 270 | +#### Updating native kubelets and etcd (optional) |
| 271 | + |
| 272 | +- Manually update etcd following the steps mentioned in the doc |
| 273 | + [here](https://github.com/kinvolk/lokomotive/blob/v0.5.0/docs/how-to-guides/upgrade-etcd.md). |
| 274 | +- Manually update the kubelet running on the nodes, by following the steps mentioned in the doc |
| 275 | + [here](https://github.com/kinvolk/lokomotive/blob/v0.5.0/docs/how-to-guides/upgrade-bootstrap-kubelet.md). |
| 276 | + |
| 277 | +#### Updating cert-manager |
| 278 | + |
| 279 | +Run the following command: |
| 280 | + |
| 281 | +```sh |
| 282 | +until lokoctl component render-manifest cert-manager | kubectl apply -f -; do sleep 1; done |
| 283 | +``` |
| 284 | + |
| 285 | +Now it is safe to update: |
| 286 | + |
| 287 | +```sh |
| 288 | +lokoctl component apply cert-manager |
| 289 | +``` |
| 290 | + |
| 291 | +#### Updating prometheus-operator |
| 292 | + |
| 293 | +Due to [a bug](https://github.com/kinvolk/lokomotive/issues/1128), the valid seccomp profiles in the `prometheus-operator-admission` PodSecurityPolicy don't get updated automatically. |
| 294 | + |
| 295 | +Delete `psp prometheus-operator-admission` so it gets created with the right seccomp profiles: |
| 296 | + |
| 297 | +```sh |
| 298 | +kubectl delete psp prometheus-operator-admission |
| 299 | +``` |
| 300 | + |
| 301 | +Now it is safe to update: |
| 302 | + |
| 303 | +```sh |
| 304 | +lokoctl component apply prometheus-operator |
| 305 | +``` |
| 306 | + |
| 307 | +#### Updating other components |
| 308 | + |
| 309 | +Other components are safe to update by running the following command: |
| 310 | + |
| 311 | +```sh |
| 312 | +lokoctl component apply <component name> |
| 313 | +``` |
| 314 | + |
1 | 315 | ## v0.4.1 - 2020-09-15 |
2 | 316 |
|
3 | 317 | This is a patch release which includes mainly bug fixes. |
|
0 commit comments