aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2024-09-09 14:29:17 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2024-09-09 14:29:17 +0200
commit2e48e71af3560382c63a9f5f1bf8b58131cb1b9b (patch)
tree603e28b8bb2c8733481c6cfb5bfd078392e139ed
parentc4de3877ca0ff53820fb8019f1cea067969f16ad (diff)
Prepare Functest Kubernetes v1.31
Change-Id: If85b8bd47c2d9794a87042719ebe3bc7272c6b41 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r--.gitreview1
-rw-r--r--README.md28
-rw-r--r--ansible/site.cntt.yml3
-rw-r--r--ansible/site.gate.yml6
-rw-r--r--ansible/site.yml3
-rw-r--r--build.sh70
-rw-r--r--docker/benchmarking/Dockerfile6
-rw-r--r--docker/cnf/Dockerfile5
-rw-r--r--docker/core/Dockerfile4
-rw-r--r--docker/healthcheck/Dockerfile5
-rw-r--r--docker/security/Dockerfile2
-rw-r--r--docker/smoke/Dockerfile2
-rwxr-xr-xelements/functest-kubernetes/install.d/16-functest-kubernetes10
-rw-r--r--functest_kubernetes/security/kube-bench-master.yaml2
-rw-r--r--functest_kubernetes/security/kube-bench-node.yaml2
-rw-r--r--functest_kubernetes/security/kube-hunter.yaml2
-rw-r--r--tox.ini18
17 files changed, 87 insertions, 82 deletions
diff --git a/.gitreview b/.gitreview
index 84c0d555..9dd413a9 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,3 +2,4 @@
host=gerrit.opnfv.org
port=29418
project=functest-kubernetes.git
+defaultbranch=stable/v1.31
diff --git a/README.md b/README.md
index b950d8aa..850d1ab1 100644
--- a/README.md
+++ b/README.md
@@ -15,17 +15,13 @@ and testing (vIMS, vRouter and vEPC) to ensure that the platforms meet Network
Functions Virtualization requirements. Raspberry PI is also supported to verify
datacenters as the lowest cost (50 euros hardware and software included).
-| Functest releases | Kubernetes releases |
-|-------------------|-------------------------------|
-| v1.22 | v1.22 |
-| v1.23 | v1.23 |
-| v1.24 | v1.24 |
-| v1.25 | v1.25 |
-| v1.26 | v1.26 |
-| v1.27 | v1.27 |
-| v1.28 | v1.28 |
-| v1.29 | v1.29 |
-| **Master** | **v1.30.0-alpha.0 (rolling)** |
+| Functest releases | Kubernetes releases |
+|-------------------|---------------------|
+| v1.28 | v1.28 |
+| v1.29 | v1.29 |
+| v1.30 | v1.30 |
+| v1.31 | v1.31 |
+| **Master** | **latest** |
## Prepare your environment
@@ -39,7 +35,7 @@ DEPLOY_SCENARIO=k8s-XXX
```bash
sudo docker run --env-file env \
-v $(pwd)/config:/home/xtesting/.kube/config \
- opnfv/functest-kubernetes-healthcheck
+ opnfv/functest-kubernetes-healthcheck:v1.31
```
```
@@ -56,7 +52,7 @@ sudo docker run --env-file env \
```bash
sudo docker run --env-file env \
-v $(pwd)/config:/home/xtesting/.kube/config \
- opnfv/functest-kubernetes-smoke
+ opnfv/functest-kubernetes-smoke:v1.31
```
```
@@ -86,7 +82,7 @@ sudo docker run --env-file env \
```bash
sudo docker run --env-file env \
-v $(pwd)/config:/home/xtesting/.kube/config \
- opnfv/functest-kubernetes-security
+ opnfv/functest-kubernetes-security:v1.31
```
```
@@ -104,7 +100,7 @@ sudo docker run --env-file env \
```bash
sudo docker run --env-file env \
-v $(pwd)/config:/home/xtesting/.kube/config \
- opnfv/functest-kubernetes-benchmarking
+ opnfv/functest-kubernetes-benchmarking:v1.31
```
```
@@ -121,7 +117,7 @@ sudo docker run --env-file env \
```bash
sudo docker run --env-file env \
-v $(pwd)/config:/home/xtesting/.kube/config \
- opnfv/functest-kubernetes-cnf
+ opnfv/functest-kubernetes-cnf:v1.31
```
```
diff --git a/ansible/site.cntt.yml b/ansible/site.cntt.yml
index f9bbef36..97d52368 100644
--- a/ansible/site.cntt.yml
+++ b/ansible/site.cntt.yml
@@ -4,6 +4,9 @@
- role: collivier.xtesting
project: functest-kubernetes
db_project: functest
+ docker_tags:
+ - v1.31:
+ branch: stable/v1.31
suites:
- container: functest-kubernetes-healthcheck
tests:
diff --git a/ansible/site.gate.yml b/ansible/site.gate.yml
index 3ac80e3b..11ad2a0e 100644
--- a/ansible/site.gate.yml
+++ b/ansible/site.gate.yml
@@ -8,9 +8,9 @@
gerrit_project: functest-kubernetes
git_url: https://gerrit.opnfv.org/gerrit/functest-kubernetes
docker_tags:
- - latest:
- branch: master
- dependency: '3.16'
+ - v1.31:
+ branch: stable/v1.31
+ dependency: '3.20'
builds:
dependency:
repo: _
diff --git a/ansible/site.yml b/ansible/site.yml
index 7c8ddd7c..d1e4ccd7 100644
--- a/ansible/site.yml
+++ b/ansible/site.yml
@@ -4,6 +4,9 @@
- role: collivier.xtesting
project: functest-kubernetes
db_project: functest
+ docker_tags:
+ - v1.31:
+ branch: stable/v1.31
suites:
- container: functest-kubernetes-healthcheck
tests:
diff --git a/build.sh b/build.sh
index 4db163de..e96aebe7 100644
--- a/build.sh
+++ b/build.sh
@@ -15,75 +15,75 @@ arm64_dirs=${arm64_dirs-${amd64_dirs}}
build_opts=(--pull=true --no-cache --force-rm=true)
find . -name Dockerfile -exec sed -i \
- -e "s|opnfv/functest-kubernetes-core|\
-${repo}/functest-kubernetes-core:amd64-latest|g" {} +
+ -e "s|opnfv/functest-kubernetes-core:v1.31|\
+${repo}/functest-kubernetes-core:amd64-v1.31|g" {} +
find . -name Dockerfile -exec sed -i \
- -e "s|opnfv/functest-kubernetes-healthcheck|\
-${repo}/functest-kubernetes-healthcheck:amd64-latest|g" {} +
+ -e "s|opnfv/functest-kubernetes-healthcheck:v1.31|\
+${repo}/functest-kubernetes-healthcheck:amd64-v1.31|g" {} +
find . -name Dockerfile -exec sed -i \
- -e "s|opnfv/functest-kubernetes-smoke|\
-${repo}/functest-kubernetes-smoke:amd64-latest|g" {} +
+ -e "s|opnfv/functest-kubernetes-smoke:v1.31|\
+${repo}/functest-kubernetes-smoke:amd64-v1.31|g" {} +
for dir in ${amd64_dirs}; do
(cd "${dir}" &&
docker build "${build_opts[@]}" \
- -t "${repo}/functest-kubernetes-${dir##**/}:amd64-latest" .)
- docker push "${repo}/functest-kubernetes-${dir##**/}:amd64-latest"
+ -t "${repo}/functest-kubernetes-${dir##**/}:amd64-v1.31" .)
+ docker push "${repo}/functest-kubernetes-${dir##**/}:amd64-v1.31"
[ "${dir}" != "docker/core" ] &&
(docker rmi \
- "${repo}/functest-kubernetes-${dir##**/}:amd64-latest" || true)
+ "${repo}/functest-kubernetes-${dir##**/}:amd64-v1.31" || true)
done
[ ! -z "${amd64_dirs}" ] &&
(docker rmi \
- "${repo}/functest-kubernetes-core:amd64-latest" \
- alpine:3.16 || true)
+ "${repo}/functest-kubernetes-core:amd64-v1.31" \
+ alpine:3.20 || true)
find . -name Dockerfile -exec git checkout {} +
find . -name Dockerfile -exec sed -i \
- -e "s|alpine:3.16|arm64v8/alpine:3.16|g" {} +
+ -e "s|alpine:3.20|arm64v8/alpine:3.20|g" {} +
find . -name Dockerfile -exec sed -i \
- -e "s|opnfv/functest-kubernetes-core|\
-${repo}/functest-kubernetes-core:arm64-latest|g" {} +
+ -e "s|opnfv/functest-kubernetes-core:v1.31|\
+${repo}/functest-kubernetes-core:arm64-v1.31|g" {} +
find . -name Dockerfile -exec sed -i \
- -e "s|opnfv/functest-kubernetes-healthcheck|\
-${repo}/functest-kubernetes-healthcheck:arm64-latest|g" {} +
+ -e "s|opnfv/functest-kubernetes-healthcheck:v1.31|\
+${repo}/functest-kubernetes-healthcheck:arm64-v1.31|g" {} +
find . -name Dockerfile -exec sed -i \
- -e "s|opnfv/functest-kubernetes-smoke|\
-${repo}/functest-kubernetes-smoke:arm64-latest|g" {} +
+ -e "s|opnfv/functest-kubernetes-smoke:v1.31|\
+${repo}/functest-kubernetes-smoke:arm64-v1.31|g" {} +
for dir in ${arm64_dirs}; do
(cd "${dir}" && docker build "${build_opts[@]}" \
- -t "${repo}/functest-kubernetes-${dir##**/}:arm64-latest" .)
- docker push "${repo}/functest-kubernetes-${dir##**/}:arm64-latest"
+ -t "${repo}/functest-kubernetes-${dir##**/}:arm64-v1.31" .)
+ docker push "${repo}/functest-kubernetes-${dir##**/}:arm64-v1.31"
[ "${dir}" != "docker/core" ] &&
(docker rmi \
- "${repo}/functest-kubernetes-${dir##**/}:arm64-latest" || true)
+ "${repo}/functest-kubernetes-${dir##**/}:arm64-v1.31" || true)
done
[ ! -z "${arm64_dirs}" ] &&
- (docker rmi "${repo}/functest-kubernetes-core:arm64-latest" \
- arm64v8/alpine:3.16 || true)
+ (docker rmi "${repo}/functest-kubernetes-core:arm64-v1.31" \
+ arm64v8/alpine:3.20 || true)
find . -name Dockerfile -exec git checkout {} +
find . -name Dockerfile -exec sed -i \
- -e "s|alpine:3.16|arm32v7/alpine:3.16|g" {} +
+ -e "s|alpine:3.20|arm32v7/alpine:3.20|g" {} +
find . -name Dockerfile -exec sed -i \
- -e "s|opnfv/functest-kubernetes-core|\
-${repo}/functest-kubernetes-core:arm-latest|g" {} +
+ -e "s|opnfv/functest-kubernetes-core:v1.31|\
+${repo}/functest-kubernetes-core:arm-v1.31|g" {} +
find . -name Dockerfile -exec sed -i \
- -e "s|opnfv/functest-kubernetes-healthcheck|\
-${repo}/functest-kubernetes-healthcheck:arm-latest|g" {} +
+ -e "s|opnfv/functest-kubernetes-healthcheck:v1.31|\
+${repo}/functest-kubernetes-healthcheck:arm-v1.31|g" {} +
find . -name Dockerfile -exec sed -i \
- -e "s|opnfv/functest-kubernetes-smoke|\
-${repo}/functest-kubernetes-smoke:arm-latest|g" {} +
+ -e "s|opnfv/functest-kubernetes-smoke:v1.31|\
+${repo}/functest-kubernetes-smoke:arm-v1.31|g" {} +
for dir in ${arm_dirs}; do
(cd "${dir}" && docker build "${build_opts[@]}" \
- -t "${repo}/functest-kubernetes-${dir##**/}:arm-latest" .)
- docker push "${repo}/functest-kubernetes-${dir##**/}:arm-latest"
+ -t "${repo}/functest-kubernetes-${dir##**/}:arm-v1.31" .)
+ docker push "${repo}/functest-kubernetes-${dir##**/}:arm-v1.31"
[ "${dir}" != "docker/core" ] &&
(docker rmi \
- "${repo}/functest-kubernetes-${dir##**/}:arm-latest" || true)
+ "${repo}/functest-kubernetes-${dir##**/}:arm-v1.31" || true)
done
[ ! -z "${arm_dirs}" ] &&
- (docker rmi "${repo}/functest-kubernetes-core:arm-latest" \
- arm32v7/alpine:3.16 || true)
+ (docker rmi "${repo}/functest-kubernetes-core:arm-v1.31" \
+ arm32v7/alpine:3.20 || true)
find . -name Dockerfile -exec git checkout {} +
exit $?
diff --git a/docker/benchmarking/Dockerfile b/docker/benchmarking/Dockerfile
index d958b565..db3a7bff 100644
--- a/docker/benchmarking/Dockerfile
+++ b/docker/benchmarking/Dockerfile
@@ -1,7 +1,7 @@
-FROM opnfv/functest-kubernetes-smoke
+FROM opnfv/functest-kubernetes-smoke:v1.31
-ARG NETPERF_TAG=master
-ARG PLOTPERF_TAG=master
+ARG NETPERF_TAG=1104ce23f6c1758796e88f3c23b050099074cf81
+ARG PLOTPERF_TAG=2455313f4b9581795a8f642243acaad472d91804
USER root
COPY plotperf.py.patch /tmp/plotperf.py.patch
diff --git a/docker/cnf/Dockerfile b/docker/cnf/Dockerfile
index 8c2e6e0a..04b04f6d 100644
--- a/docker/cnf/Dockerfile
+++ b/docker/cnf/Dockerfile
@@ -1,11 +1,12 @@
-FROM opnfv/functest-kubernetes-core
+FROM opnfv/functest-kubernetes-core:v1.31
+ARG K8S_TAG=1.31
ARG CNF_TESTSUITE_TAG=v1.0.0
ARG HELM_TAG=v3.3.1
USER root
RUN apk --no-cache add --update wget curl libc6-compat ncurses && \
- tag=$(curl -s https://storage.googleapis.com/kubernetes-release/release/latest-1.30.txt) && \
+ tag=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable-$K8S_TAG.txt) && \
case $(uname -m) in armv7l) arch=arm;; aarch64) arch=arm64;; x86_64) arch=amd64;; esac && \
curl https://storage.googleapis.com/kubernetes-release/release/$tag/bin/linux/$arch/kubectl \
--output /usr/local/bin/kubectl && \
diff --git a/docker/core/Dockerfile b/docker/core/Dockerfile
index 8ebd2c51..ecbf22bc 100644
--- a/docker/core/Dockerfile
+++ b/docker/core/Dockerfile
@@ -1,7 +1,7 @@
FROM alpine:3.20
-ARG BRANCH=master
-ARG OPENSTACK_TAG=master
+ARG BRANCH=stable/v1.31
+ARG OPENSTACK_TAG=stable/2024.1
COPY Try-a-quick-fix-vs-asynchronuous-issues.patch /tmp/Try-a-quick-fix-vs-asynchronuous-issues.patch
COPY Switch-to-threading.Thread-for-Rally-tasks.patch /tmp/Switch-to-threading.Thread-for-Rally-tasks.patch
diff --git a/docker/healthcheck/Dockerfile b/docker/healthcheck/Dockerfile
index b8970d98..eef5e11f 100644
--- a/docker/healthcheck/Dockerfile
+++ b/docker/healthcheck/Dockerfile
@@ -1,8 +1,9 @@
-FROM opnfv/functest-kubernetes-core
+FROM opnfv/functest-kubernetes-core:v1.31
+ARG K8S_TAG=1.31
USER root
RUN apk --no-cache add --update curl libc6-compat && \
- tag=$(curl -s https://storage.googleapis.com/kubernetes-release/release/latest-1.30.txt) && \
+ tag=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable-$K8S_TAG.txt) && \
case $(uname -m) in armv7l) arch=arm;; aarch64) arch=arm64;; x86_64) arch=amd64;; esac && \
curl https://storage.googleapis.com/kubernetes-release/release/$tag/bin/linux/$arch/kubectl \
-s --output /usr/local/bin/kubectl && \
diff --git a/docker/security/Dockerfile b/docker/security/Dockerfile
index 5ecdc9bd..0b8e8607 100644
--- a/docker/security/Dockerfile
+++ b/docker/security/Dockerfile
@@ -1,3 +1,3 @@
-FROM opnfv/functest-kubernetes-core
+FROM opnfv/functest-kubernetes-core:v1.31
COPY testcases.yaml /etc/xtesting/testcases.yaml
diff --git a/docker/smoke/Dockerfile b/docker/smoke/Dockerfile
index 1ae498dc..437b965f 100644
--- a/docker/smoke/Dockerfile
+++ b/docker/smoke/Dockerfile
@@ -1,4 +1,4 @@
-FROM opnfv/functest-kubernetes-healthcheck
+FROM opnfv/functest-kubernetes-healthcheck:v1.31
COPY testcases.yaml /etc/xtesting/testcases.yaml
CMD ["run_tests", "-t", "all"]
diff --git a/elements/functest-kubernetes/install.d/16-functest-kubernetes b/elements/functest-kubernetes/install.d/16-functest-kubernetes
index e2144e76..da56df1c 100755
--- a/elements/functest-kubernetes/install.d/16-functest-kubernetes
+++ b/elements/functest-kubernetes/install.d/16-functest-kubernetes
@@ -1,11 +1,11 @@
#!/bin/bash
download-frozen-image-v2.sh /data/docker/functest-kubernetes \
- opnfv/functest-kubernetes-healthcheck:latest \
- opnfv/functest-kubernetes-smoke:latest \
- opnfv/functest-kubernetes-benchmarking:latest \
- opnfv/functest-kubernetes-security:latest \
- opnfv/functest-kubernetes-cnf:latest
+ opnfv/functest-kubernetes-healthcheck:v1.31 \
+ opnfv/functest-kubernetes-smoke:v1.31 \
+ opnfv/functest-kubernetes-benchmarking:v1.31 \
+ opnfv/functest-kubernetes-security:v1.31 \
+ opnfv/functest-kubernetes-cnf:v1.31
git clone https://git.opnfv.org/functest-kubernetes /home/debian/functest-kubernetes
chown -R 1000:1000 /home/debian/functest-kubernetes
diff --git a/functest_kubernetes/security/kube-bench-master.yaml b/functest_kubernetes/security/kube-bench-master.yaml
index ccfc842b..b901bc51 100644
--- a/functest_kubernetes/security/kube-bench-master.yaml
+++ b/functest_kubernetes/security/kube-bench-master.yaml
@@ -26,7 +26,7 @@ spec:
effect: NoSchedule
containers:
- name: kube-bench
- image: {{ dockerhub_repo }}/aquasec/kube-bench:latest
+ image: {{ dockerhub_repo }}/aquasec/kube-bench:v0.6.10
command: ["kube-bench", "run", "--targets", "master", "--json"]
volumeMounts:
- name: var-lib-etcd
diff --git a/functest_kubernetes/security/kube-bench-node.yaml b/functest_kubernetes/security/kube-bench-node.yaml
index 03d428ad..43746a0b 100644
--- a/functest_kubernetes/security/kube-bench-node.yaml
+++ b/functest_kubernetes/security/kube-bench-node.yaml
@@ -9,7 +9,7 @@ spec:
hostPID: true
containers:
- name: kube-bench
- image: {{ dockerhub_repo }}/aquasec/kube-bench:latest
+ image: {{ dockerhub_repo }}/aquasec/kube-bench:v0.6.10
command: ["kube-bench", "run", "--targets", "node", "--json"]
volumeMounts:
- name: var-lib-etcd
diff --git a/functest_kubernetes/security/kube-hunter.yaml b/functest_kubernetes/security/kube-hunter.yaml
index 0b58cab7..d1169618 100644
--- a/functest_kubernetes/security/kube-hunter.yaml
+++ b/functest_kubernetes/security/kube-hunter.yaml
@@ -7,7 +7,7 @@ spec:
spec:
containers:
- name: kube-hunter
- image: {{ dockerhub_repo }}/aquasec/kube-hunter:latest
+ image: {{ dockerhub_repo }}/aquasec/kube-hunter:0.6.8
command: ["kube-hunter"]
args: ["--pod", "--report", "json", "--statistics"]
restartPolicy: Never
diff --git a/tox.ini b/tox.ini
index 1e002aba..2e53fa77 100644
--- a/tox.ini
+++ b/tox.ini
@@ -4,8 +4,8 @@ envlist = pep8,pylint,yamllint,bashate,py310,bandit,perm
[testenv]
usedevelop = True
deps =
- -chttps://git.opnfv.org/functest/plain/upper-constraints.txt
- -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
+ -c{toxinidir}/upper-constraints.txt
+ -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/2024.1/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
install_command = pip install --use-deprecated=legacy-resolver {opts} {packages}
@@ -17,32 +17,32 @@ commands =
functest_kubernetes
[testenv:pep8]
-basepython = python3.10
+basepython = python3.12
commands = flake8
[testenv:pylint]
-basepython = python3.10
+basepython = python3.12
commands = pylint \
--ignore-imports=y --min-similarity-lines=10 \
--disable=locally-disabled,wrong-import-order --reports=n functest_kubernetes
[testenv:yamllint]
-basepython = python3.10
+basepython = python3.12
files =.travis.yml docker
commands =
yamllint {[testenv:yamllint]files}
[testenv:bandit]
-basepython = python3.10
+basepython = python3.12
commands = bandit -r functest_kubernetes -x tests -n 5 -ll
[testenv:bashate]
-basepython = python3.10
+basepython = python3.12
files =build.sh functest_kubernetes/ci/download_images.sh
commands = bashate -e E005,E006,E042,E043 {[testenv:bashate]files}
[testenv:perm]
-basepython = python3.10
+basepython = python3.12
allowlist_externals = bash
path=. -not -path './.tox/*' -not -path './.git/*' -not -path './doc/pres/reveal.js/*' -not -path './elements/functest-kubernetes/install.d/*'
commands =
@@ -53,6 +53,6 @@ commands =
find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"
[testenv:pre-commit]
-basepython = python3.10
+basepython = python3.12
commands =
pre-commit run --all-files --show-diff-on-failure