kubernetes_calico_version: "3.30.3"
kubernetes_calico_resources:
- - https://raw.githubusercontent.com/projectcalico/calico/v{{ kubernetes_calico_version }}/manifests/tigera-operator.yaml
- - https://raw.githubusercontent.com/projectcalico/calico/v{{ kubernetes_calico_version }}/manifests/operator-crds.yaml
+ tigera-operator.yaml: https://raw.githubusercontent.com/projectcalico/calico/v{{ kubernetes_calico_version }}/manifests/tigera-operator.yaml
+ operator-crds.yaml: https://raw.githubusercontent.com/projectcalico/calico/v{{ kubernetes_calico_version }}/manifests/operator-crds.yaml
-calico_vpp_state: "present"
\ No newline at end of file
+calico_vpp_state: "present"
+
+calico_corelist_workers: "2,3,4,5,98,99,100,101"
+calico_uplink_interfaces:
+ - interfaceName: "enp56s0np0"
+ vppDriver: "avf"
+ rx: 8
+ rxMode: "polling"
+ - interfaceName: "enp58s0np0"
+ vppDriver: "avf"
+ rx: 8
+ rxMode: "polling"
\ No newline at end of file
- name: download calico manifest to the cluster
ansible.builtin.get_url:
- url: "https://raw.githubusercontent.com/projectcalico/calico/v3.30.3/manifests/{{ item }}"
- dest: /tmp/{{ item }}
- mode: '0664'
- loop:
- - "operator-crds.yaml"
- - "tigera-operator.yaml"
- when: >
- calico_sut is defined
+ url: "{{ item.value }}"
+ dest: "/tmp/{{ item.key }}"
+ mode: "0664"
+ loop: "{{ kubernetes_calico_resources | dict2items }}"
+ when:
+ - calico_sut is defined
tags:
- kubernetes-calico-install
- name: apply calico manifest to the cluster
kubernetes.core.k8s:
state: present
- src: "/tmp/{{ item }}"
+ src: "/tmp/{{ item.key }}"
+ loop: "{{ kubernetes_calico_resources | dict2items }}"
+ when:
+ - calico_sut is defined
+ tags:
+ - kubernetes-calico-install
+
+- name: upload calico vpp manifest to the cluster
+ ansible.builtin.template:
+ dest: "/tmp/{{ item }}"
+ src: "{{ item }}.j2"
loop:
- - "operator-crds.yaml"
- - "tigera-operator.yaml"
- when: >
- calico_sut is defined
+ - "calico-vpp.yaml"
+ when:
+ - calico_sut is defined
tags:
- kubernetes-calico-install
- name: apply calico vpp manifest to the cluster
kubernetes.core.k8s:
state: "{{ calico_vpp_state }}"
- template: "calico-vpp.yaml.j2"
- when: >
- calico_sut is defined
+ src: "/tmp/{{ item }}"
+ loop:
+ - "calico-vpp.yaml"
+ when:
+ - calico_sut is defined
tags:
- kubernetes-calico-install
label_selectors:
- k8s-app=calico-vpp-node
register: pod_list
+ when: calico_sut is defined
tags:
- kubernetes-info
calico_pod_name: "{{ item[0]['metadata']['name'] }}"
loop:
- "{{ pod_list['resources'] }}"
+ when:
+ - calico_sut is defined
+ - pod_list['resources'] | length > 0
tags:
- kubernetes-info
container: vpp
command: vppctl sh version
register: command_status
- when: >
- calico_pod_name is defined
+ when:
+ - calico_pod_name is defined
+ - calico_sut is defined
+ - calico_vpp_state == "present"
tags:
- kubernetes-info
-- name: Check last command status
- debug:
- msg: "{{ command_status.stdout }}"
\ No newline at end of file
+- name: check last command status
+ ansible.builtin.debug:
+ msg: "{{ command_status.stdout }}"
+ when:
+ - calico_pod_name is defined
+ - calico_sut is defined
+ - calico_vpp_state == "present"
+ tags:
+ - kubernetes-info
\ No newline at end of file
api-trace { on }
cpu {
main-core 1
- corelist-workers 2,3,4,5,98,99,100,101
+ corelist-workers {{ calico_corelist_workers }}
}
socksvr {
socket-name /var/run/vpp/vpp-api.sock
"vppHostTapSpec": {
"rx": 1, "tx":1, "rxqsz": 1024, "txqsz": 1024, "isl3": false
},
- "uplinkInterfaces": [
- {
- "interfaceName": "enp56s0np0",
- "vppDriver": "avf",
- "rx": 8,
- "rxMode": "polling"
- },
- {
- "interfaceName": "enp58s0np0",
- "vppDriver": "avf",
- "rx": 8,
- "rxMode": "polling"
- }
- ]
+ "uplinkInterfaces": {{ calico_uplink_interfaces | to_nice_json(indent=2) }}
}
SERVICE_PREFIX: 10.96.0.0/12
kind: ConfigMap