diff --git a/_chart_installers.sh b/_chart_installers.sh index 48d25586..056a0502 100755 --- a/_chart_installers.sh +++ b/_chart_installers.sh @@ -36,6 +36,7 @@ function install_helm { kubectl create serviceaccount --namespace "$KRD_TILLER_NAMESPACE" tiller fi if ! kubectl get role/tiller-role -n "$KRD_TILLER_NAMESPACE" --no-headers -o custom-columns=name:.metadata.name; then + # editorconfig-checker-disable cat </dev/null + # editorconfig-checker-disable cat <script.js import http from "k6/http"; import { check, sleep } from "k6"; @@ -139,6 +140,7 @@ function run_external_k6 { }); }; EOF + # editorconfig-checker-enable docker run --name k6 -i loadimpact/k6 run - /dev/null diff --git a/_untested_installers.sh b/_untested_installers.sh index 1b436136..29bee0fc 100755 --- a/_untested_installers.sh +++ b/_untested_installers.sh @@ -312,6 +312,7 @@ function install_kubesphere { kubectl apply -f "https://github.com/kubesphere/ks-installer/releases/download/$kubesphere_version/kubesphere-installer.yaml" kubectl rollout status deployment/ks-installer -n kubesphere-system --timeout=5m + # editorconfig-checker-disable cat <=' "1.19"; then + # editorconfig-checker-disable cat <../config/pdf.yml - name: aio os: @@ -71,8 +72,10 @@ if [[ ${TEST_MULTINODE:-false} == "false" ]]; then - kube-node - qat-node EOL + # editorconfig-checker-enable destroy_vm aio else + # editorconfig-checker-disable cat <../config/pdf.yml - name: controller os: @@ -98,7 +101,9 @@ else - kube-master - etcd EOL + # editorconfig-checker-enable for i in {1..2}; do + # editorconfig-checker-disable cat <>../config/pdf.yml - name: worker0${i} os: @@ -123,6 +128,7 @@ EOL roles: - kube-node EOL + # editorconfig-checker-enable done destroy_vm controller for i in {1..2}; do diff --git a/ci/update_distros.sh b/ci/update_distros.sh index 02d1c478..49713866 100755 --- a/ci/update_distros.sh +++ b/ci/update_distros.sh @@ -58,11 +58,13 @@ function _vagrant_pull { msg+="$name($version, $PROVIDER) box doesn't exist\n" return fi + # editorconfig-checker-disable cat <>.distros_supported.yml $alias: name: $name version: "$version" EOT + # editorconfig-checker-enable } if ! command -v vagrant >/dev/null; then diff --git a/ci/update_versions.sh b/ci/update_versions.sh index 6c228c99..617861c1 100755 --- a/ci/update_versions.sh +++ b/ci/update_versions.sh @@ -158,6 +158,7 @@ sed -i "s/virtink_version:.*/virtink_version: v$(get_version github_release smar sed -i "s/kubesphere_version:.*/kubesphere_version: v$(get_version github_release kubesphere/kubesphere)/g" ./playbooks/krd-vars.yml sed -i "s/metallb_version:.*/metallb_version: v$(get_version github_tag metallb/metallb)/g" ./playbooks/krd-vars.yml +# editorconfig-checker-disable cat <galaxy-requirements.yml --- # SPDX-license-identifier: Apache-2.0 @@ -191,6 +192,7 @@ collections: - name: community.general version: $(get_version ansible_collection community.general) EOT +# editorconfig-checker-enable # Udpate Playbook default versions # NOTE: There is no images released for minor versions https://hub.docker.com/r/nfvpe/sriov-cni/tags diff --git a/tests/_common.sh b/tests/_common.sh index b394cd3f..d1ea07fd 100755 --- a/tests/_common.sh +++ b/tests/_common.sh @@ -19,6 +19,7 @@ function populate_nfd { mkdir -p "/tmp/${nfd_deployment_name}" pushd "/tmp/${nfd_deployment_name}" + # editorconfig-checker-disable cat <"$nfd_deployment_name.yaml" apiVersion: apps/v1 kind: Deployment @@ -53,6 +54,7 @@ spec: operator: Gt values: ["2"] DEPLOYMENT + # editorconfig-checker-enable popd } @@ -65,6 +67,7 @@ function populate_qat { mkdir -p "/tmp/${qat_deployment_name}" pushd "/tmp/${qat_deployment_name}" + # editorconfig-checker-disable cat <"$qat_deployment_name.yaml" apiVersion: apps/v1 kind: Deployment @@ -170,5 +173,6 @@ data: address: 0.0.0.0 port_value: 9001 DEPLOYMENT + # editorconfig-checker-enable popd } diff --git a/tests/gatekeeper.sh b/tests/gatekeeper.sh index a4fd318d..2cba7203 100755 --- a/tests/gatekeeper.sh +++ b/tests/gatekeeper.sh @@ -34,6 +34,7 @@ trap cleanup EXIT # Test info "===== Test started =====" +# editorconfig-checker-disable cat </tmp/restricted.yaml kind: Service apiVersion: v1 @@ -49,6 +50,7 @@ spec: port: 80 targetPort: 8080 EOF +# editorconfig-checker-enable assert_contains "$(kubectl apply -f /tmp/restricted.yaml 2>&1 || :)" "Service type LoadBalancer are restricted" "OPA Gatekeeper didn't restrict the service creation using LoadBalancer type" diff --git a/tests/haproxy.sh b/tests/haproxy.sh index 9a99fc35..c2d86ea6 100755 --- a/tests/haproxy.sh +++ b/tests/haproxy.sh @@ -38,6 +38,7 @@ info "===== Test started =====" info "Ensure HAProxy Ingress Class" kubectl get ingressclasses.networking.k8s.io haproxy +# editorconfig-checker-disable cat </tmp/restricted.yaml +kind: Service +apiVersion: v1 +metadata: + name: lb-service + namespace: opa-test +spec: + type: LoadBalancer + selector: + app: opa-test + ports: + - protocol: TCP + port: 80 + targetPort: 8080 +EOF +# editorconfig-checker-enable + +assert_contains "$(kubectl apply -f /tmp/restricted.yaml 2>&1 || :)" "Service type LoadBalancer are restricted" "OPA Gatekeeper didn't restrict the service creation using LoadBalancer type" + +info "===== Test completed =====" diff --git a/tests/kong.sh b/tests/kong.sh index ac795e48..bd246b5d 100755 --- a/tests/kong.sh +++ b/tests/kong.sh @@ -36,6 +36,7 @@ CURL_PROXY_CMD="curl -s http://${HOST}:${PORT}" # Test info "===== Test started =====" +# editorconfig-checker-disable cat <