jsonnet: add default container annotation for KSM and blackbox

Signed-off-by: paulfantom <pawel@krupa.net.pl>
This commit is contained in:
paulfantom 2021-04-13 13:38:02 +02:00
parent 752d1a7fdc
commit 7b69800686
No known key found for this signature in database
GPG Key ID: 12AE0185401674E7
2 changed files with 11 additions and 1 deletions

View File

@ -218,7 +218,12 @@ function(params) {
replicas: bb._config.replicas,
selector: { matchLabels: bb._config.selectorLabels },
template: {
metadata: { labels: bb._config.commonLabels },
metadata: {
labels: bb._config.commonLabels,
annotations: {
'kubectl.kubernetes.io/default-container': blackboxExporter.name,
},
},
spec: {
containers: [blackboxExporter, reloader, kubeRbacProxy],
nodeSelector: { 'kubernetes.io/os': 'linux' },

View File

@ -109,6 +109,11 @@ function(params) (import 'github.com/kubernetes/kube-state-metrics/jsonnet/kube-
deployment+: {
spec+: {
template+: {
metadata+: {
annotations+: {
'kubectl.kubernetes.io/default-container': 'kube-state-metrics',
},
},
spec+: {
containers: std.map(function(c) c {
ports:: null,