diff --git a/.prow.yaml b/.prow.yaml index ce16dd16..313ce7a3 100644 --- a/.prow.yaml +++ b/.prow.yaml @@ -332,7 +332,7 @@ presubmits: path: id_rsa - key: id_rsa.pub path: id_rsa.pub - - name: e2e-kubeadm-fedora-40 + - name: e2e-kubeadm-fedora-38 annotations: labels: run_if_changed: '^e2e/' @@ -348,8 +348,8 @@ presubmits: args: - "-c" - | - set -eE; cd "$(git rev-parse --show-toplevel)/e2e/terraform"; trap 'terraform destroy -target module.gcp-fedora-34 -auto-approve' EXIT; - terraform init && timeout 120m terraform apply -target module.gcp-fedora-40 -var="fail_fast=true" -var="mgmt_cluster_type=kubeadm" -auto-approve + set -eE; cd "$(git rev-parse --show-toplevel)/e2e/terraform"; trap 'terraform destroy -target module.gcp-fedora-38 -auto-approve' EXIT; + terraform init && timeout 120m terraform apply -target module.gcp-fedora-38 -var="fail_fast=true" -var="mgmt_cluster_type=kubeadm" -auto-approve volumeMounts: - name: satoken mountPath: "/etc/satoken" diff --git a/e2e/provision/init.sh b/e2e/provision/init.sh index c1cb689f..1d137d0f 100755 --- a/e2e/provision/init.sh +++ b/e2e/provision/init.sh @@ -87,7 +87,6 @@ if [ ${MGMT_CLUSTER_TYPE} == "kubeadm" ]; then fi export ANSIBLE_CMD_EXTRA_VAR_LIST='{ "nephio_catalog_repo_uri": "'${NEPHIO_CATALOG_REPO_URI}'", "k8s": { "context" : "'${K8S_CONTEXT}'", "version" : "'$K8S_VERSION'" } }' - if [ ${K8S_CONTEXT} == "kind-kind" ]; then export ANSIBLE_TAG=all else diff --git a/e2e/provision/playbooks/deploy_kubeadm_k8s.yml b/e2e/provision/playbooks/deploy_kubeadm_k8s.yml index 96573aab..10b9bdad 100644 --- a/e2e/provision/playbooks/deploy_kubeadm_k8s.yml +++ b/e2e/provision/playbooks/deploy_kubeadm_k8s.yml @@ -2,6 +2,19 @@ - name: Deploy k8s using kubeadm on host hosts: all pre_tasks: + - name: Sysctl settings updates + become: true + ansible.posix.sysctl: + reload: true + sysctl_file: /etc/sysctl.conf + name: "{{ item.name }}" + value: "{{ item.value }}" + state: present + with_items: + - {name: fs.inotify.max_user_watches, value: 524288} + - {name: fs.inotify.max_user_instances, value: 512} + - {name: kernel.keys.maxkeys, value: 500000} + - {name: kernel.keys.maxbytes, value: 1000000} - name: Install Docker Engine needed for kpt functions become: true block: diff --git a/e2e/provision/playbooks/roles/kubeadm/tasks/main.yml b/e2e/provision/playbooks/roles/kubeadm/tasks/main.yml index 3f2362a5..53f73f44 100644 --- a/e2e/provision/playbooks/roles/kubeadm/tasks/main.yml +++ b/e2e/provision/playbooks/roles/kubeadm/tasks/main.yml @@ -207,14 +207,3 @@ ansible.builtin.shell: kubectl taint node $(hostname) node-role.kubernetes.io/control-plane- register: my_output changed_when: my_output.rc != 0 -<<<<<<< HEAD - -- name: Wait for deployments to complete - ansible.builtin.include_tasks: wait-deployments.yml - loop: "{{ kube-system + kube-flannel + local-path-storage }}" - loop_control: - loop_var: namespace - vars: - context: "{{ k8s.context }}" -======= ->>>>>>> 4a828c2 (add support for installing nonKIND cluster via kubeadm (previously PR #46) (#296)) diff --git a/e2e/provision/playbooks/roles/kubeadm/tasks/wait-deployments.yml b/e2e/provision/playbooks/roles/kubeadm/tasks/wait-deployments.yml deleted file mode 100644 index 4d9e5e02..00000000 --- a/e2e/provision/playbooks/roles/kubeadm/tasks/wait-deployments.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2024 The Nephio Authors. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -- name: "Get deployment resources in namespace {{ namespace }}" - kubernetes.core.k8s_info: - context: "{{ context }}" - api_version: v1 - kind: Deployment - namespace: "{{ namespace }}" - register: deployment_list - -- name: "Print deployment resources in namespace {{ namespace }}" - ansible.builtin.debug: - var: deployment_list.resources - -- name: "Wait for deployments in namespace {{ namespace }}" - kubernetes.core.k8s: - context: "{{ context }}" - definition: - apiVersion: apps/v1 - kind: Deployment - metadata: - name: "{{ resource.metadata.name }}" - namespace: "{{ resource.metadata.namespace }}" - wait: true - wait_condition: - type: Available - reason: MinimumReplicasAvailable - loop: "{{ deployment_list.resources }}" - loop_control: - loop_var: resource diff --git a/e2e/terraform/main.tf b/e2e/terraform/main.tf index a3527d91..7fbda01f 100644 --- a/e2e/terraform/main.tf +++ b/e2e/terraform/main.tf @@ -22,9 +22,9 @@ module "gcp-fedora-34" { nephio_mgmt_cluster_type = var.mgmt_cluster_type } -module "gcp-fedora-40" { +module "gcp-fedora-38" { source = ".//modules/gcp" - vmimage = "fedora-cloud/fedora-cloud-40" + vmimage = "fedora-cloud/fedora-cloud-38" ansible_user = "fedora" nephio_e2e_type = var.e2e_type nephio_e2e_fail_fast = var.fail_fast