Merge pull request #1091 from paulfantom/default-containers

jsonnet: add default container annotation for KSM and blackbox exporter
This commit is contained in:
Kemal Akkoyun 2021-04-22 11:19:14 +02:00 committed by GitHub
commit 31189e3a18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 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,

View File

@ -17,6 +17,8 @@ spec:
app.kubernetes.io/part-of: kube-prometheus
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: blackbox-exporter
labels:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: blackbox-exporter

View File

@ -17,6 +17,8 @@ spec:
app.kubernetes.io/part-of: kube-prometheus
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: kube-state-metrics
labels:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: kube-state-metrics