ci: cns writes cilium conflist for PR tests (#1917)
* cns writes cilium conflist for PR test clusters * update volume mounts * fix configmap args * conflist mount * updating conflist file path
This commit is contained in:
Родитель
fec45f9e18
Коммит
08d3fb1f26
|
@ -24,5 +24,8 @@ data:
|
|||
"ChannelMode": "CRD",
|
||||
"InitializeFromCNI": false,
|
||||
"ManageEndpointState": true,
|
||||
"ProgramSNATIPTables" : true
|
||||
"ProgramSNATIPTables" : true,
|
||||
"EnableCNIConflistGeneration": true,
|
||||
"CNIConflistFilepath": "/etc/cni/net.d/05-cilium.conflist",
|
||||
"CNIConflistScenario": "cilium"
|
||||
}
|
||||
|
|
|
@ -65,6 +65,8 @@ spec:
|
|||
mountPath: /var/run/azure-vnet.json
|
||||
- name: xtables-lock
|
||||
mountPath: /run/xtables.lock
|
||||
- name: cni-conflist
|
||||
mountPath: /etc/cni/net.d
|
||||
ports:
|
||||
- containerPort: 10090
|
||||
env:
|
||||
|
|
|
@ -24,5 +24,8 @@ data:
|
|||
"ChannelMode": "CRD",
|
||||
"InitializeFromCNI": false,
|
||||
"ManageEndpointState": true,
|
||||
"ProgramSNATIPTables" : false
|
||||
"ProgramSNATIPTables" : false,
|
||||
"EnableCNIConflistGeneration": true,
|
||||
"CNIConflistFilepath": "/etc/cni/net.d/05-cilium.conflist",
|
||||
"CNIConflistScenario": "cilium"
|
||||
}
|
||||
|
|
|
@ -135,7 +135,7 @@ func installCNSDaemonset(ctx context.Context, clientset *kubernetes.Clientset, l
|
|||
if installBool2 := os.Getenv(envInstallAzilium); installBool2 != "" {
|
||||
if aziliumScenario, err := strconv.ParseBool(installBool2); err == nil && aziliumScenario == true {
|
||||
log.Printf("Env %v set to true, deploy azure-ipam and cilium-cni", envInstallAzilium)
|
||||
cns.Spec.Template.Spec.InitContainers[0].Args = []string{"deploy", "azure-ipam", "-o", "/opt/cni/bin/azure-ipam", "azilium.conflist", "-o", "/etc/cni/net.d/05-cilium.conflist"}
|
||||
cns.Spec.Template.Spec.InitContainers[0].Args = []string{"deploy", "azure-ipam", "-o", "/opt/cni/bin/azure-ipam"}
|
||||
}
|
||||
// setup the CNS ciliumconfigmap
|
||||
if err := mustSetupConfigMap(ctx, clientset, cnsCiliumConfigMapPath); err != nil {
|
||||
|
@ -148,7 +148,7 @@ func installCNSDaemonset(ctx context.Context, clientset *kubernetes.Clientset, l
|
|||
if installBool3 := os.Getenv(envInstallOverlay); installBool3 != "" {
|
||||
if overlayScenario, err := strconv.ParseBool(installBool3); err == nil && overlayScenario == true {
|
||||
log.Printf("Env %v set to true, deploy azure-ipam and cilium-cni", envInstallOverlay)
|
||||
cns.Spec.Template.Spec.InitContainers[0].Args = []string{"deploy", "azure-ipam", "-o", "/opt/cni/bin/azure-ipam", "azilium.conflist", "-o", "/etc/cni/net.d/05-cilium.conflist"}
|
||||
cns.Spec.Template.Spec.InitContainers[0].Args = []string{"deploy", "azure-ipam", "-o", "/opt/cni/bin/azure-ipam"}
|
||||
}
|
||||
// setup the CNS ciliumconfigmap
|
||||
if err := mustSetupConfigMap(ctx, clientset, cnsOverlayConfigMapPath); err != nil {
|
||||
|
|
Загрузка…
Ссылка в новой задаче