Skip to content

Commit

Permalink
Update kubemark to v1.29.0 (#5820)
Browse files Browse the repository at this point in the history
Signed-off-by: Lan Luo <luola@vmware.com>
  • Loading branch information
luolanzone authored Jan 2, 2024
1 parent ffd0b1d commit 48c1646
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 33 deletions.
28 changes: 11 additions & 17 deletions build/charts/antrea/templates/simulator/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -99,34 +97,30 @@ spec:
readOnly: true
- name: logs-volume
mountPath: /var/log
- name: containerd
mountPath: /run/containerd
resources:
requests:
cpu: 20m
memory: 50M
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
Expand Down
22 changes: 11 additions & 11 deletions docs/antrea-agent-simulator.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -30,21 +30,21 @@ 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=<path to kubeconfig file>
```
```bash
kubectl create secret generic kubeconfig --type=Opaque --namespace=kube-system --from-file=admin.conf=<path to kubeconfig file>
```

## Apply the yaml file

```bash
```bash
kubectl apply -f build/yamls/antrea-scale.yml
```
```

check the simulated Node:

Expand Down
10 changes: 5 additions & 5 deletions docs/maintainers/build-kubemark.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
This documentation simply describes how to build the kubemark image used in
[Antrea scale testing](../antrea-agent-simulator.md)

```bash
```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 .
```

0 comments on commit 48c1646

Please sign in to comment.