Skip to content

Commit

Permalink
Specify antrea-agent as the default container for kubectl cmds
Browse files Browse the repository at this point in the history
Starting with v1.21, Kubernetes supports default container annotation.
Using "kubectl logs/exec/attach/cp" doesn't have to specify "-c
antrea-agent" when troubleshooting.
  • Loading branch information
tnqn committed Apr 9, 2021
1 parent cff53fa commit 3553c11
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build/yamls/antrea-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2895,6 +2895,8 @@ spec:
apiVersion: apps/v1
kind: DaemonSet
metadata:
annotations:
kubectl.kubernetes.io/default-container: antrea-agent
labels:
app: antrea
component: antrea-agent
Expand Down
2 changes: 2 additions & 0 deletions build/yamls/antrea-eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2895,6 +2895,8 @@ spec:
apiVersion: apps/v1
kind: DaemonSet
metadata:
annotations:
kubectl.kubernetes.io/default-container: antrea-agent
labels:
app: antrea
component: antrea-agent
Expand Down
2 changes: 2 additions & 0 deletions build/yamls/antrea-gke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2895,6 +2895,8 @@ spec:
apiVersion: apps/v1
kind: DaemonSet
metadata:
annotations:
kubectl.kubernetes.io/default-container: antrea-agent
labels:
app: antrea
component: antrea-agent
Expand Down
2 changes: 2 additions & 0 deletions build/yamls/antrea-ipsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2909,6 +2909,8 @@ spec:
apiVersion: apps/v1
kind: DaemonSet
metadata:
annotations:
kubectl.kubernetes.io/default-container: antrea-agent
labels:
app: antrea
component: antrea-agent
Expand Down
2 changes: 2 additions & 0 deletions build/yamls/antrea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2900,6 +2900,8 @@ spec:
apiVersion: apps/v1
kind: DaemonSet
metadata:
annotations:
kubectl.kubernetes.io/default-container: antrea-agent
labels:
app: antrea
component: antrea-agent
Expand Down
4 changes: 4 additions & 0 deletions build/yamls/base/agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ apiVersion: apps/v1
kind: DaemonSet
metadata:
name: antrea-agent
annotations:
# Starting with v1.21, Kubernetes supports default container annotation.
# Using "kubectl logs/exec/attach/cp" doesn't have to specify "-c antrea-agent" when troubleshooting.
kubectl.kubernetes.io/default-container: antrea-agent
labels:
component: antrea-agent
spec:
Expand Down

0 comments on commit 3553c11

Please sign in to comment.