Add Cilium deployment to deploy-env role

Change-Id: I7cec2d3ff09ec3f85992162bbdb8c351660f7de8
This commit is contained in:
Vladimir Kozhukalov 2024-07-01 15:45:21 -05:00
parent 8b67f87999
commit bc45596483
6 changed files with 82 additions and 7 deletions

View File

@ -14,11 +14,15 @@ kube_version_repo: "v1.29"
# the list of k8s package versions are available here
# https://pkgs.k8s.io/core:/stable:/{{ kube_version_repo }}/deb/Packages
kube_version: "1.29.5-1.1"
calico_setup: true
calico_version: "v3.27.0"
calico_manifest_url: "https://raw.githubusercontent.com/projectcalico/calico/{{ calico_version }}/manifests/calico.yaml"
helm_version: "v3.6.3"
crictl_version: "v1.26.1"
cilium_setup: false
cilium_version: "1.15.6"
kubectl:
user: zuul
group: zuul

View File

@ -0,0 +1,22 @@
---
- name: Download Cilium
shell: |
CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/main/stable.txt)
CLI_ARCH=amd64
curl -L --fail --remote-name-all https://github.com/cilium/cilium-cli/releases/download/${CILIUM_CLI_VERSION}/cilium-linux-${CLI_ARCH}.tar.gz{,.sha256sum}
sha256sum --check cilium-linux-${CLI_ARCH}.tar.gz.sha256sum
tar xzvfC cilium-linux-${CLI_ARCH}.tar.gz /usr/local/bin
rm cilium-linux-${CLI_ARCH}.tar.gz{,.sha256sum}
args:
executable: /bin/bash
chdir: /tmp
when: inventory_hostname in (groups['primary'] | default([]))
- name: Deploy Cilium
become: false
shell: |
cilium install --version {{ cilium_version }}
args:
executable: /bin/bash
when: inventory_hostname in (groups['primary'] | default([]))
...

View File

@ -51,6 +51,12 @@
- name: Include K8s Calico tasks
include_tasks:
file: calico.yaml
when: calico_setup
- name: Include Cilium tasks
include_tasks:
file: cilium.yaml
when: cilium_setup
- name: Include coredns resolver tasks
include_tasks:

View File

@ -14,19 +14,25 @@
set -xe
: ${OSH_INFRA_EXTRA_HELM_ARGS_MARIADB:="$(helm osh get-values-overrides -c mariadb ${FEATURES})"}
: ${OSH_INFRA_HELM_REPO:="../openstack-helm-infra"}
: ${OSH_INFRA_PATH:="../openstack-helm-infra"}
: ${OSH_INFRA_EXTRA_HELM_ARGS_MARIADB:="$(helm osh get-values-overrides ${DOWNLOAD_OVERRIDES:-} -p ${OSH_INFRA_PATH} -c mariadb ${FEATURES})"}
: ${NAMESPACE:="osh-infra"}
: ${RUN_HELM_TESTS:="yes"}
#NOTE: Deploy command
helm upgrade --install mariadb ./mariadb \
--namespace=osh-infra \
--namespace=${NAMESPACE} \
--set monitoring.prometheus.enabled=true \
${OSH_INFRA_EXTRA_HELM_ARGS:=} \
${OSH_INFRA_EXTRA_HELM_ARGS} \
${OSH_INFRA_EXTRA_HELM_ARGS_MARIADB}
#NOTE: Wait for deploy
helm osh wait-for-pods osh-infra
# Delete the test pod if it still exists
kubectl delete pods -l application=mariadb,release_group=mariadb,component=test --namespace=osh-infra --ignore-not-found
#NOTE: Validate the deployment
helm test mariadb --namespace osh-infra
if [ "x${RUN_HELM_TESTS}" != "xno" ]; then
# Delete the test pod if it still exists
kubectl delete pods -l application=mariadb,release_group=mariadb,component=test --namespace=${NAMESPACE} --ignore-not-found
#NOTE: Validate the deployment
helm test mariadb --namespace ${NAMESPACE}
fi

View File

@ -102,7 +102,10 @@
ceph_osd_data_device: /dev/loop100
kube_version_repo: "v1.29"
kube_version: "1.29.5-1.1"
calico_setup: true
calico_version: "v3.27.0"
cilium_setup: false
cilium_version: "1.15.6"
helm_version: "v3.6.3"
yq_version: "v4.6.0"
crictl_version: "v1.26.1"
@ -263,6 +266,39 @@
- ^memcached/.*
- ^openvswitch/.*
- job:
name: openstack-helm-infra-keystone-cilium-2024-1-ubuntu_jammy
parent: openstack-helm-infra-deploy
nodeset: openstack-helm-3nodes-ubuntu_jammy
files:
- ^helm-toolkit/.*
- ^roles/.*
- ^rabbitmq/.*
- ^mariadb/.*
- ^memcached/.*
vars:
osh_params:
openstack_release: "2024.1"
container_distro_name: ubuntu
container_distro_version: jammy
calico_setup: false
cilium_setup: true
gate_scripts:
- ./tools/deployment/common/prepare-k8s.sh
- ./tools/deployment/common/prepare-charts.sh
- ./tools/deployment/common/ingress.sh
- ./tools/deployment/ceph/ceph-rook.sh
- ./tools/deployment/ceph/ceph-adapter-rook.sh
- ./tools/deployment/common/setup-client.sh
- |
export NAMESPACE=openstack
export OSH_INFRA_EXTRA_HELM_ARGS="--set pod.replicas.server=1 ${OSH_INFRA_EXTRA_HELM_ARGS}"
export RUN_HELM_TESTS=no
./tools/deployment/db/mariadb.sh
- ./tools/deployment/common/rabbitmq.sh
- ./tools/deployment/common/memcached.sh
- ./tools/deployment/openstack/keystone.sh
- job:
name: openstack-helm-infra-cinder-2023-1-ubuntu_focal
description: |

View File

@ -32,6 +32,7 @@
- openstack-helm-infra-cinder-2024-1-ubuntu_jammy
- openstack-helm-infra-tls-2024-1-ubuntu_jammy
- openstack-helm-infra-compute-kit-dpdk-2023-2-ubuntu_jammy
- openstack-helm-infra-keystone-cilium-2024-1-ubuntu_jammy
gate:
jobs:
- openstack-helm-lint