diff --git a/build/charts/antrea/templates/simulator/statefulset.yaml b/build/charts/antrea/templates/simulator/statefulset.yaml index 54b90541d30..68f7e9874c3 100644 --- a/build/charts/antrea/templates/simulator/statefulset.yaml +++ b/build/charts/antrea/templates/simulator/statefulset.yaml @@ -43,6 +43,9 @@ spec: - name: logs-volume hostPath: path: /var/log + - name: containerd + hostPath: + path: /run/containerd containers: - name: simulator image: antrea/antrea-ubuntu-simulator:latest @@ -68,29 +71,24 @@ spec: - name: logs-volume mountPath: /var/log - name: hollow-kubelet - image: projects.registry.vmware.com/antrea/kubemark:v1.18.4 + image: projects.registry.vmware.com/antrea/kubemark:v1.29.0 ports: - containerPort: 4194 - containerPort: 10250 - containerPort: 10255 env: - - name: CONTENT_TYPE - valueFrom: - configMapKeyRef: - name: node-configmap - key: content.type - name: NODE_NAME valueFrom: fieldRef: fieldPath: metadata.name command: [ + "/go-runner", + "-log-file=/var/log/kubelet-$(NODE_NAME).log", "/kubemark", "--morph=kubelet", "--name=$(NODE_NAME)", "--kubeconfig=/kubeconfig/admin.conf", - "$(CONTENT_TYPE)", "--v=2", - "--log-file=/var/log/kubelet-$(NODE_NAME).log", "--node-labels=antrea/instance=simulator", ] volumeMounts: @@ -99,6 +97,8 @@ spec: readOnly: true - name: logs-volume mountPath: /var/log + - name: containerd + mountPath: /run/containerd resources: requests: cpu: 20m @@ -106,27 +106,21 @@ spec: securityContext: privileged: true - name: hollow-proxy - image: projects.registry.vmware.com/antrea/kubemark:v1.18.4 + image: projects.registry.vmware.com/antrea/kubemark:v1.29.0 env: - - name: CONTENT_TYPE - valueFrom: - configMapKeyRef: - name: node-configmap - key: content.type - name: NODE_NAME valueFrom: fieldRef: fieldPath: metadata.name command: [ + "/go-runner", + "-log-file=/var/log/kubeproxy-$(NODE_NAME).log", "/kubemark", "--morph=proxy", "--name=$(NODE_NAME)", "--use-real-proxier=false", "--kubeconfig=/kubeconfig/admin.conf", - "$(CONTENT_TYPE)", - "--alsologtostderr", "--v=2", - "--log-file=/var/log/kubelet-$(NODE_NAME).log" ] volumeMounts: - name: kubeconfig-volume diff --git a/docs/antrea-agent-simulator.md b/docs/antrea-agent-simulator.md index 23f6d21c916..7c6d2b9b7d0 100644 --- a/docs/antrea-agent-simulator.md +++ b/docs/antrea-agent-simulator.md @@ -6,18 +6,18 @@ cluster. ## Build the images - ```bash +```bash make build-scale-simulator - ``` +``` ## Create the yaml file This demo uses 1 simulator, this command will create a yaml file build/yamls/antrea-scale.yml - ```bash +```bash make manifest-scale - ``` +``` The above yaml will create one simulated Node/Pod, to change the number of instances, you can modify `spec.replicas` of the StatefulSet @@ -30,24 +30,18 @@ after deploying it. To prevent Pods from being scheduled on the simulated Node(s), you can use the following taint. - ```bash +```bash kubectl taint -l 'antrea/instance=simulator' node mocknode=true:NoExecute - ``` +``` ## Create secret for kubemark - ```bash -kubectl create secret generic kubeconfig --type=Opaque --namespace=kube-system --from-file= - ``` +```bash +kubectl create secret generic kubeconfig --type=Opaque --namespace=kube-system --from-file=admin.conf= +``` ## Apply the yaml file - ```bash +```bash kubectl apply -f build/yamls/antrea-scale.yml - ``` - -check the simulated Node: - - ```bash -kubectl get nodes -l 'antrea/instance=simulator' - ``` +``` \ No newline at end of file diff --git a/docs/maintainers/build-kubemark.md b/docs/maintainers/build-kubemark.md index 45ba8f7dd38..8c16bea6d2a 100644 --- a/docs/maintainers/build-kubemark.md +++ b/docs/maintainers/build-kubemark.md @@ -5,9 +5,9 @@ This documentation simply describes how to build the kubemark image used in ```bash cd $KUBERNETES_PATH -git checkout v1.18.4 +git checkout v1.29.0 make WHAT=cmd/kubemark KUBE_BUILD_PLATFORMS=linux/amd64 -cp ./_output/local/go/bin/linux_amd64/kubemark cluster/images/kubemark +cp ./_output/local/bin/linux/amd64/kubemark cluster/images/kubemark cd cluster/images/kubemark -docker build -t antrea/kubemark:v1.18.4 . +docker build -t antrea/kubemark:v1.29.0 . ```