Skip to content

Commit 7a2ccd3

Browse files
DespireCI/CD pipelinejakubhlavacka
authored
fix: deletion of nodes (#1919)
Fixes deletion of nodes in newer version of kubectl (>= 1.33) the `export ETCDCTL_API=3` is no longer needed as the lowest supported kuberenetes version (1.32.x) ships with `etcd version = 3.5.x` and the env has been made as a default since version [`3.4.x`](https://github.com/etcd-io/etcd/blob/cf5a57119f24a7f3f9eb9fa9323055231c9ebd45/CHANGELOG/CHANGELOG-3.4.md?plain=1#L947) Also changed the dumping of the etcd members as a JSON, instead of parsing raw `Stdout` output The issue with the approach in master was that etcd started to print warnings which would be parsed instead of the `Stdout` output, leading to panics in the kuber service. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Adjusted ETCD environment handling to reduce inconsistent etcdctl behavior during cluster node removal. * **Refactor** * Improved ETCD member discovery and removal flow with structured member handling and clearer warnings when nodes aren’t found. * **Chores** * Updated many image tags. * Bumped bundled kubectl installer and streamlined install steps. * Added Docker Buildx setup to CI. * **Configuration** * Enabled installation proxy and upgraded numerous test cluster node types. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: CI/CD pipeline <CI/CD-pipeline@users.noreply.github.com> Co-authored-by: Jakub Hlavacka <jakub.hlavacka@berops.com>
1 parent 2815488 commit 7a2ccd3

56 files changed

Lines changed: 187 additions & 149 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/CI-pipeline.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ jobs:
149149
username: ${{ github.actor }}
150150
password: ${{ secrets.GITHUB_TOKEN }}
151151

152+
# the newer versions of actions-runner (v2.329.x and later) don't have BuildKit
153+
- name: Set up Docker Buildx
154+
uses: docker/setup-buildx-action@v3
155+
152156
# Update autoscaler-adapter manifest in this steps as new kuber would need to contain manifest with the correct image tag
153157
- name: Edit autoscaler-adapter image tag in the manifest
154158
if: ${{ needs.check-changes.outputs.ARRAY_OF_CHANGES != '' && github.event.pull_request.draft == false }}

internal/kubectl/kubectl.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,14 @@ type Kubectl struct {
2727

2828
const (
2929
defaultMaxKubectlRetries = 10
30-
getEtcdPodsCmd = "get pods -n kube-system --no-headers -o custom-columns=\":metadata.name\" | grep etcd"
31-
exportEtcdEnvsCmd = `export ETCDCTL_API=3 &&
30+
31+
getEtcdPodsCmd = "get pods -n kube-system --no-headers -o custom-columns=\":metadata.name\" | grep etcd"
32+
33+
exportEtcdEnvsCmd = `
3234
export ETCDCTL_CACERT=/etc/kubernetes/pki/etcd/ca.crt &&
3335
export ETCDCTL_CERT=/etc/kubernetes/pki/etcd/healthcheck-client.crt &&
3436
export ETCDCTL_KEY=/etc/kubernetes/pki/etcd/healthcheck-client.key`
37+
3538
kubectlTimeout = 3 * 60 // cancel kubectl command after kubectlTimeout seconds
3639
)
3740

manifests/claudie/kustomization.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,18 @@ apiVersion: kustomize.config.k8s.io/v1beta1
5656
kind: Kustomization
5757
images:
5858
- name: ghcr.io/berops/claudie/ansibler
59-
newTag: 4f9e418-3735
59+
newTag: 4a73b29-3766
6060
- name: ghcr.io/berops/claudie/autoscaler-adapter
61-
newTag: 4f9e418-3735
61+
newTag: 4a73b29-3766
6262
- name: ghcr.io/berops/claudie/builder
63-
newTag: 4f9e418-3735
63+
newTag: 4a73b29-3766
6464
- name: ghcr.io/berops/claudie/claudie-operator
65-
newTag: 4f9e418-3735
65+
newTag: 4a73b29-3766
6666
- name: ghcr.io/berops/claudie/kube-eleven
67-
newTag: 4f9e418-3735
67+
newTag: 4a73b29-3766
6868
- name: ghcr.io/berops/claudie/kuber
69-
newTag: 4f9e418-3735
69+
newTag: 4a73b29-3766
7070
- name: ghcr.io/berops/claudie/manager
71-
newTag: 4f9e418-3735
71+
newTag: 4a73b29-3766
7272
- name: ghcr.io/berops/claudie/terraformer
73-
newTag: 4f9e418-3735
73+
newTag: 4a73b29-3766

manifests/testing-framework/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,4 @@ secretGenerator:
9090

9191
images:
9292
- name: ghcr.io/berops/claudie/testing-framework
93-
newTag: 4f9e418-3735
93+
newTag: 4a73b29-3766

manifests/testing-framework/test-sets/autoscaling-1/1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ spec:
4141
autoscaler:
4242
min: 1
4343
max: 5
44-
serverType: e2-small
44+
serverType: e2-medium
4545
image: ubuntu-2404-noble-amd64-v20251001
4646
storageDiskSize: 50
4747
labels:

manifests/testing-framework/test-sets/autoscaling-1/2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
region: europe-west2
4040
zone: europe-west2-a
4141
count: 1
42-
serverType: e2-small
42+
serverType: e2-medium
4343
image: ubuntu-2404-noble-amd64-v20251001
4444
storageDiskSize: 50
4545
labels:

manifests/testing-framework/test-sets/autoscaling-1/3.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ spec:
4141
autoscaler:
4242
min: 1
4343
max: 5
44-
serverType: e2-small
44+
serverType: e2-medium
4545
image: ubuntu-2404-noble-amd64-v20251001
4646
storageDiskSize: 50
4747

manifests/testing-framework/test-sets/autoscaling-2/1.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ spec:
3030
region: eu-north-1
3131
zone: eu-north-1a
3232
count: 1
33-
serverType: t3.small
33+
serverType: t3.medium
3434
#ubuntu
3535
image: ami-08eb150f611ca277f
3636
taints:
@@ -46,7 +46,7 @@ spec:
4646
autoscaler:
4747
min: 1
4848
max: 5
49-
serverType: t3.small
49+
serverType: t3.medium
5050
#ubuntu
5151
image: ami-045a8ab02aadf4f88
5252
storageDiskSize: 50

manifests/testing-framework/test-sets/autoscaling-2/2.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ spec:
3232
region: eu-north-1
3333
zone: eu-north-1a
3434
count: 1
35-
serverType: t3.small
35+
serverType: t3.medium
3636
#ubuntu
3737
image: ami-08eb150f611ca277f
3838
taints:
@@ -48,7 +48,7 @@ spec:
4848
autoscaler:
4949
min: 1
5050
max: 5
51-
serverType: t3.small
51+
serverType: t3.medium
5252
#ubuntu
5353
image: ami-045a8ab02aadf4f88
5454
storageDiskSize: 50

manifests/testing-framework/test-sets/proxy-with-hetzner/1.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ spec:
2121
region: fsn1
2222
zone: fsn1-dc14
2323
count: 1
24-
serverType: cpx11
24+
serverType: cpx22
2525
image: ubuntu-24.04
2626
storageDiskSize: 50
2727
labels:
@@ -34,7 +34,7 @@ spec:
3434
name: hetzner-1
3535
region: fsn1
3636
zone: fsn1-dc14
37-
serverType: cpx11
37+
serverType: cpx22
3838
image: ubuntu-24.04
3939
storageDiskSize: 50
4040
count: 1

0 commit comments

Comments
 (0)