Skip to content

Commit

Permalink
feat(kubernetes): set default container (#399)
Browse files Browse the repository at this point in the history
* feat(kubernetes): set default container

According to https://github.com/kubernetes/enhancements/blob/master/keps/sig-cli/2227-kubectl-default-container/README.md

* feat(kubernetes): set default container for daemon set
  • Loading branch information
jceb authored Feb 12, 2024
1 parent a227a1a commit a45fd0b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions snippets/kubernetes.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@
" type: RollingUpdate",
" template:",
" metadata:",
" annotations:",
" kubectl.kubernetes.io/default-container: ${1:myjob}",
" labels:",
" app: ${1:myjob}",
" spec:",
Expand Down Expand Up @@ -309,6 +311,8 @@
" name: \"${1:myapp}\"",
" namespace: ${2:default}",
" labels:",
" annotations:",
" kubectl.kubernetes.io/default-container: ${1:myapp}",
" app: \"${1:myapp}\"",
"spec:",
" containers:",
Expand Down Expand Up @@ -387,6 +391,8 @@
" app: ${1:myapp}",
" template:",
" metadata:",
" annotations:",
" kubectl.kubernetes.io/default-container: ${1:myapp}",
" labels:",
" app: ${1:myapp}",
" spec:",
Expand Down Expand Up @@ -434,6 +440,8 @@
" replicas: ${3:3} # by default is 1",
" template:",
" metadata:",
" annotations:",
" kubectl.kubernetes.io/default-container: ${1:myapp}",
" labels:",
" app: ${1:myapp} # has to match .spec.selector.matchLabels",
" spec:",
Expand Down

0 comments on commit a45fd0b

Please sign in to comment.