Skip to content

Commit

Permalink
Merge pull request #175 from sighupio/develop
Browse files Browse the repository at this point in the history
feat: add compatibility to kubernetes 1.28-1.29
  • Loading branch information
nutellinoit authored Mar 27, 2024
2 parents 50d09bd + 4802f4b commit 8c920df
Show file tree
Hide file tree
Showing 94 changed files with 43,327 additions and 34,156 deletions.
294 changes: 163 additions & 131 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ steps:
- render
commands:
# we use --ignore-deprecations because we don't want the CI to fail when the API has not been removed yet.
- /pluto detect $${KUBERNETES_MANIFESTS} --ignore-deprecations --target-versions=k8s=v1.27.0
- /pluto detect $${KUBERNETES_MANIFESTS} --ignore-deprecations --target-versions=k8s=v1.29.0
environment:
KUBERNETES_MANIFESTS: alertmanager-operated.yml

Expand Down Expand Up @@ -176,16 +176,16 @@ steps:
- tag

---
name: e2e-kubernetes-1.26
name: e2e-kubernetes-1.27
kind: pipeline
type: docker

clone:
depth: 1

depends_on:
- policeman

node:
runner: internal

platform:
os: linux
arch: amd64
Expand All @@ -198,96 +198,73 @@ trigger:
- refs/tags/**

steps:
- name: init
image: quay.io/sighup/e2e-testing-drone-plugin:v1.26.4
- name: create-kind-cluster
image: quay.io/sighup/dind-kind-kubectl-kustomize:0.20.0_1.29.1_3.10.0
pull: always
volumes:
- name: shared
path: /shared
- name: dockersock
path: /var/run/docker.sock
depends_on: [clone]
settings:
action: custom-cluster-126
cluster_version: "1.26.4"
local_kind_config_path: katalog/tests/kind-config.yml
pipeline_id: cluster-126
instance_path: /shared
aws_default_region:
from_secret: aws_region
aws_access_key_id:
from_secret: aws_access_key_id
aws_secret_access_key:
from_secret: aws_secret_access_key
terraform_tf_states_bucket_name:
from_secret: terraform_tf_states_bucket_name
vsphere_server:
from_secret: vsphere_server
vsphere_password:
from_secret: vsphere_password
vsphere_user:
from_secret: vsphere_user
dockerhub_username:
from_secret: dockerhub_username
dockerhub_password:
from_secret: dockerhub_password
environment:
CLUSTER_VERSION: v1.27.3
CLUSTER_NAME: ${DRONE_REPO_NAME}-${DRONE_BUILD_NUMBER}-127
# /drone/src is the default workdir for the pipeline
# using this folder we don't need to mount another
# shared volume between the steps
KUBECONFIG: /drone/src/kubeconfig-127
commands:
# NOTE: kind's `--wait` flag that waits for the control-plane ot be ready
# does not work when disabling the default CNI. It will always go in timeout.
- kind create cluster --name $${CLUSTER_NAME} --image registry.sighup.io/fury/kindest/node:$${CLUSTER_VERSION} --config katalog/tests/kind-config.yml
# save the kubeconfig so we can use it from other steps.
- kind get kubeconfig --name $${CLUSTER_NAME} > $${KUBECONFIG}

- name: e2e
# KUBECTL 1.26.3 - KUSTOMIZE 3.5.3 - HELM 3.1.1 - YQ 4.21.1 - ISTIOCTL 1.9.4 - FURYCTL 0.9.0 - BATS 1.1.0
# KUBECTL 1.27.1 - KUSTOMIZE 3.5.3 - HELM 3.1.1 - YQ 4.21.1 - ISTIOCTL 1.9.4 - FURYCTL 0.9.0 - BATS 1.1.0
image: quay.io/sighup/e2e-testing:1.1.0_0.11.0_3.1.1_1.9.4_1.26.3_3.5.3_4.33.3
pull: always
volumes:
- name: shared
path: /shared
depends_on:
- init
network_mode: host
environment:
CLUSTER_NAME: ${DRONE_REPO_NAME}-${DRONE_BUILD_NUMBER}-127
KUBECONFIG: /drone/src/kubeconfig-127
depends_on: [create-kind-cluster]
commands:
- export KUBECONFIG=/shared/kube/kubeconfig-126
- bats -t katalog/tests/tests.sh
- bats -t katalog/tests/grafana-ldap.sh

- name: destroy
image: quay.io/sighup/e2e-testing-drone-plugin:v1.26.4
- name: delete-kind-cluster
image: quay.io/sighup/dind-kind-kubectl-kustomize:0.20.0_1.29.1_3.10.0
volumes:
- name: dockersock
path: /var/run/docker.sock
pull: always
depends_on: [e2e]
settings:
action: destroy
pipeline_id: cluster-126
aws_default_region:
from_secret: aws_region
aws_access_key_id:
from_secret: aws_access_key_id
aws_secret_access_key:
from_secret: aws_secret_access_key
terraform_tf_states_bucket_name:
from_secret: terraform_tf_states_bucket_name
vsphere_server:
from_secret: vsphere_server
vsphere_password:
from_secret: vsphere_password
vsphere_user:
from_secret: vsphere_user
dockerhub_username:
from_secret: dockerhub_username
dockerhub_password:
from_secret: dockerhub_password
environment:
CLUSTER_NAME: ${DRONE_REPO_NAME}-${DRONE_BUILD_NUMBER}-127
commands:
# does not matter if the command fails
- kind delete cluster --name $${CLUSTER_NAME} || true
when:
status:
- success
- failure

volumes:
- name: shared
temp: {}
- name: dockersock
host:
path: /var/run/docker.sock

---
name: e2e-kubernetes-1.27
name: e2e-kubernetes-1.28
kind: pipeline
type: docker

clone:
depth: 1

depends_on:
- policeman

node:
runner: internal
- e2e-kubernetes-1.27

platform:
os: linux
Expand All @@ -301,95 +278,150 @@ trigger:
- refs/tags/**

steps:
- name: init
image: quay.io/sighup/e2e-testing-drone-plugin:v1.27.1
- name: create-kind-cluster
image: quay.io/sighup/dind-kind-kubectl-kustomize:0.20.0_1.29.1_3.10.0
pull: always
volumes:
- name: shared
path: /shared
- name: dockersock
path: /var/run/docker.sock
depends_on: [clone]
settings:
action: custom-cluster-127
cluster_version: "1.27.1"
local_kind_config_path: katalog/tests/kind-config.yml
pipeline_id: cluster-127
instance_path: /shared
aws_default_region:
from_secret: aws_region
aws_access_key_id:
from_secret: aws_access_key_id
aws_secret_access_key:
from_secret: aws_secret_access_key
terraform_tf_states_bucket_name:
from_secret: terraform_tf_states_bucket_name
vsphere_server:
from_secret: vsphere_server
vsphere_password:
from_secret: vsphere_password
vsphere_user:
from_secret: vsphere_user
dockerhub_username:
from_secret: dockerhub_username
dockerhub_password:
from_secret: dockerhub_password
environment:
CLUSTER_VERSION: v1.28.0
CLUSTER_NAME: ${DRONE_REPO_NAME}-${DRONE_BUILD_NUMBER}-128
# /drone/src is the default workdir for the pipeline
# using this folder we don't need to mount another
# shared volume between the steps
KUBECONFIG: /drone/src/kubeconfig-128
commands:
# NOTE: kind's `--wait` flag that waits for the control-plane ot be ready
# does not work when disabling the default CNI. It will always go in timeout.
- kind create cluster --name $${CLUSTER_NAME} --image registry.sighup.io/fury/kindest/node:$${CLUSTER_VERSION} --config katalog/tests/kind-config.yml
# save the kubeconfig so we can use it from other steps.
- kind get kubeconfig --name $${CLUSTER_NAME} > $${KUBECONFIG}

- name: e2e
# KUBECTL 1.27.1 - KUSTOMIZE 3.5.3 - HELM 3.1.1 - YQ 4.21.1 - ISTIOCTL 1.9.4 - FURYCTL 0.9.0 - BATS 1.1.0
image: quay.io/sighup/e2e-testing:1.1.0_0.11.0_3.12.0_1.9.4_1.27.1_3.5.3_4.33.3
# KUBECTL 1.28.5 - KUSTOMIZE 3.5.3 - HELM 3.1.1 - YQ 4.21.1 - ISTIOCTL 1.9.4 - FURYCTL 0.9.0 - BATS 1.1.0
image: quay.io/sighup/e2e-testing:1.1.0_0.11.0_3.12.0_1.9.4_1.28.5_3.5.3_4.33.3
pull: always
volumes:
- name: shared
path: /shared
depends_on:
- init
network_mode: host
environment:
CLUSTER_NAME: ${DRONE_REPO_NAME}-${DRONE_BUILD_NUMBER}-128
KUBECONFIG: /drone/src/kubeconfig-128
depends_on: [create-kind-cluster]
commands:
- export KUBECONFIG=/shared/kube/kubeconfig-127
- bats -t katalog/tests/tests.sh
- bats -t katalog/tests/grafana-ldap.sh

- name: destroy
image: quay.io/sighup/e2e-testing-drone-plugin:v1.27.1
- name: delete-kind-cluster
image: quay.io/sighup/dind-kind-kubectl-kustomize:0.20.0_1.29.1_3.10.0
volumes:
- name: dockersock
path: /var/run/docker.sock
pull: always
depends_on: [e2e]
settings:
action: destroy
pipeline_id: cluster-127
aws_default_region:
from_secret: aws_region
aws_access_key_id:
from_secret: aws_access_key_id
aws_secret_access_key:
from_secret: aws_secret_access_key
terraform_tf_states_bucket_name:
from_secret: terraform_tf_states_bucket_name
vsphere_server:
from_secret: vsphere_server
vsphere_password:
from_secret: vsphere_password
vsphere_user:
from_secret: vsphere_user
dockerhub_username:
from_secret: dockerhub_username
dockerhub_password:
from_secret: dockerhub_password
environment:
CLUSTER_NAME: ${DRONE_REPO_NAME}-${DRONE_BUILD_NUMBER}-128
commands:
# does not matter if the command fails
- kind delete cluster --name $${CLUSTER_NAME} || true
when:
status:
- success
- failure

volumes:
- name: shared
temp: {}
- name: dockersock
host:
path: /var/run/docker.sock

---
name: e2e-kubernetes-1.29
kind: pipeline
type: docker

clone:
depth: 1

depends_on:
- policeman

platform:
os: linux
arch: amd64

trigger:
ref:
include:
- refs/heads/main
- refs/heads/release-v*
- refs/tags/**

steps:
- name: create-kind-cluster
image: quay.io/sighup/dind-kind-kubectl-kustomize:0.20.0_1.29.1_3.10.0
pull: always
volumes:
- name: dockersock
path: /var/run/docker.sock
depends_on: [clone]
environment:
CLUSTER_VERSION: v1.29.0
CLUSTER_NAME: ${DRONE_REPO_NAME}-${DRONE_BUILD_NUMBER}-129
# /drone/src is the default workdir for the pipeline
# using this folder we don't need to mount another
# shared volume between the steps
KUBECONFIG: /drone/src/kubeconfig-129
commands:
# NOTE: kind's `--wait` flag that waits for the control-plane ot be ready
# does not work when disabling the default CNI. It will always go in timeout.
- kind create cluster --name $${CLUSTER_NAME} --image registry.sighup.io/fury/kindest/node:$${CLUSTER_VERSION} --config katalog/tests/kind-config.yml
# save the kubeconfig so we can use it from other steps.
- kind get kubeconfig --name $${CLUSTER_NAME} > $${KUBECONFIG}

- name: e2e
# KUBECTL 1.29.1 - KUSTOMIZE 3.5.3 - HELM 3.1.1 - YQ 4.21.1 - ISTIOCTL 1.9.4 - FURYCTL 0.9.0 - BATS 1.1.0
image: quay.io/sighup/e2e-testing:1.1.0_0.11.0_3.12.0_1.9.4_1.29.1_3.5.3_4.33.3
pull: always
network_mode: host
environment:
CLUSTER_NAME: ${DRONE_REPO_NAME}-${DRONE_BUILD_NUMBER}-129
KUBECONFIG: /drone/src/kubeconfig-129
depends_on: [create-kind-cluster]
commands:
- bats -t katalog/tests/tests.sh
- bats -t katalog/tests/grafana-ldap.sh

- name: delete-kind-cluster
image: quay.io/sighup/dind-kind-kubectl-kustomize:0.20.0_1.29.1_3.10.0
volumes:
- name: dockersock
path: /var/run/docker.sock
pull: always
depends_on: [e2e]
environment:
CLUSTER_NAME: ${DRONE_REPO_NAME}-${DRONE_BUILD_NUMBER}-129
commands:
# does not matter if the command fails
- kind delete cluster --name $${CLUSTER_NAME} || true
when:
status:
- success
- failure

volumes:
- name: dockersock
host:
path: /var/run/docker.sock

---
name: release
kind: pipeline
type: docker

depends_on:
- e2e-kubernetes-1.26
- e2e-kubernetes-1.27
- e2e-kubernetes-1.28
- e2e-kubernetes-1.29

platform:
os: linux
Expand Down
Loading

0 comments on commit 8c920df

Please sign in to comment.