Skip to content

Commit

Permalink
Merge pull request #303 from syself/fix/pipeline
Browse files Browse the repository at this point in the history
🐛 Fix pipeline of e2e test
  • Loading branch information
batistein authored Sep 30, 2022
2 parents 59ae6e9 + ad9089e commit 6beeafd
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 61 deletions.
19 changes: 0 additions & 19 deletions templates/cluster-templates/bases/hcloud-kcp-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,25 +133,6 @@ spec:
- name: key1
secret: 8d7iAcg3/NwN9aijhtEXj5kL2NOHIgokGFjbIBfL6X0=
- identity: {}
- path: /etc/systemd/system/sys-fs-bpf.mount
owner: "root:root"
permissions: "0744"
content: |
[Unit]
Description=Cilium BPF mounts
Documentation=https://docs.cilium.io/
DefaultDependencies=no
Before=local-fs.target umount.target
After=swap.target
[Mount]
What=bpffs
Where=/sys/fs/bpf
Type=bpf
Options=rw,nosuid,nodev,noexec,relatime,mode=700
[Install]
WantedBy=multi-user.target
- path: /etc/sysctl.d/99-cilium.conf
owner: "root:root"
permissions: "0744"
Expand Down
19 changes: 0 additions & 19 deletions templates/cluster-templates/bases/kct-md-0-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,6 @@ spec:
max-pods: "220"
resolv-conf: /etc/kubernetes/resolv.conf
files:
- path: /etc/systemd/system/sys-fs-bpf.mount
owner: "root:root"
permissions: "0744"
content: |
[Unit]
Description=Cilium BPF mounts
Documentation=https://docs.cilium.io/
DefaultDependencies=no
Before=local-fs.target umount.target
After=swap.target
[Mount]
What=bpffs
Where=/sys/fs/bpf
Type=bpf
Options=rw,nosuid,nodev,noexec,relatime,mode=700
[Install]
WantedBy=multi-user.target
- path: /etc/sysctl.d/99-cilium.conf
owner: "root:root"
permissions: "0744"
Expand Down
1 change: 1 addition & 0 deletions test/e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ e2e-cilium-templates:
helm template cilium cilium/cilium --version 1.12.2 \
--namespace kube-system \
-f $(REPO_ROOT)/templates/cilium/cilium.yaml > $(REPO_ROOT)/test/e2e/data/cni/cilium/cilium.yaml
sed -i 's/$${BIN_PATH}/$$BIN_PATH/' $(REPO_ROOT)/test/e2e/data/cni/cilium/cilium.yaml

e2e-ccm-templates:
helm repo add syself https://charts.syself.com
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ import (
const (
RedactLogScriptPath = "REDACT_LOG_SCRIPT"
KubernetesVersion = "KUBERNETES_VERSION"
CiliumPath = "CILIUM"
CiliumResources = "CILIUM_RESOURCES"
CCMPath = "CCM"
CCMResources = "CCM_RESOURCES"
CCMNetworkPath = "CCM_NETWORK"
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/config/hetzner-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,10 @@ variables:
INIT_WITH_INFRASTRUCTURE_PROVIDER_VERSION: ${CAPH_LATEST_VERSION:-}

# Cluster Addons
CNI: "./data/cni/cilium/cilium.yaml"
CILIUM: "./data/cni/cilium/cilium.yaml"
CCM: "./data/ccm/hcloud-ccm.yaml"
CCM_NETWORK: "./data/ccm/hcloud-ccm-network.yaml"
CCM_HETZNER: "./data/ccm/hcloud-ccm-hetzner.yaml"
BIN_PATH: "${BIN_PATH}"

# Conformance testing variables
CONFORMANCE_WORKER_MACHINE_COUNT: 3
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/config/hetzner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,10 @@ variables:
INIT_WITH_INFRASTRUCTURE_PROVIDER_VERSION: ${CAPH_LATEST_VERSION:-}

# Cluster Addons
CNI: "./data/cni/cilium/cilium.yaml"
CILIUM: "./data/cni/cilium/cilium.yaml"
CCM: "./data/ccm/hcloud-ccm.yaml"
CCM_NETWORK: "./data/ccm/hcloud-ccm-network.yaml"
CCM_HETZNER: "./data/ccm/hcloud-ccm-hetzner.yaml"
BIN_PATH: "${BIN_PATH}"

# Conformance testing variables
CONFORMANCE_WORKER_MACHINE_COUNT: 3
Expand Down
24 changes: 12 additions & 12 deletions test/e2e/data/cni/cilium/cilium.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: "${CLUSTER_NAME}-crs-cni"
data: ${CNI_RESOURCES}
data: ${CILIUM_RESOURCES}
binaryData:
---
# ClusterResourceSet object with
Expand Down
11 changes: 5 additions & 6 deletions test/e2e/e2e_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
. "github.com/onsi/gomega"
infrav1 "github.com/syself/cluster-api-provider-hetzner/api/v1beta1"
"k8s.io/apimachinery/pkg/runtime"
capi_e2e "sigs.k8s.io/cluster-api/test/e2e"
"sigs.k8s.io/cluster-api/test/framework"
"sigs.k8s.io/cluster-api/test/framework/bootstrap"
"sigs.k8s.io/cluster-api/test/framework/clusterctl"
Expand Down Expand Up @@ -193,11 +192,11 @@ func createClusterctlLocalRepository(ctx context.Context, config *clusterctl.E2E
RepositoryFolder: repositoryFolder,
}

// Ensuring a CNI file is defined in the config and register a FileTransformation to inject the referenced file as in place of the CNI_RESOURCES envSubst variable.
Expect(config.Variables).To(HaveKey(capi_e2e.CNIPath), "Missing %s variable in the config", capi_e2e.CNIPath)
cniPath := config.GetVariable(capi_e2e.CNIPath)
Expect(cniPath).To(BeAnExistingFile(), "The %s variable should resolve to an existing file", capi_e2e.CNIPath)
createRepositoryInput.RegisterClusterResourceSetConfigMapTransformation(cniPath, capi_e2e.CNIResources)
// Ensuring a CCM file is defined in the config and register a FileTransformation to inject the referenced file as in place of the CCM_RESOURCES envSubst variable.
Expect(config.Variables).To(HaveKey(CiliumPath), "Missing %s variable in the config", CiliumPath)
ciliumPath := config.GetVariable(CiliumPath)
Expect(ciliumPath).To(BeAnExistingFile(), "The %s variable should resolve to an existing file", CiliumPath)
createRepositoryInput.RegisterClusterResourceSetConfigMapTransformation(ciliumPath, CiliumResources)

// Ensuring a CCM file is defined in the config and register a FileTransformation to inject the referenced file as in place of the CCM_RESOURCES envSubst variable.
Expect(config.Variables).To(HaveKey(CCMPath), "Missing %s variable in the config", CCMPath)
Expand Down

0 comments on commit 6beeafd

Please sign in to comment.