mirror of
https://github.com/prometheus-operator/kube-prometheus.git
synced 2025-10-29 15:11:02 +01:00
disable injecting unnecessary variables allowing access to k8s API
This commit is contained in:
parent
f51e9b14e9
commit
3429bc77a4
@ -121,6 +121,7 @@ function(params) {
|
|||||||
apiVersion: 'v1',
|
apiVersion: 'v1',
|
||||||
kind: 'ServiceAccount',
|
kind: 'ServiceAccount',
|
||||||
metadata: am._metadata,
|
metadata: am._metadata,
|
||||||
|
automountServiceAccountToken: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
service: {
|
service: {
|
||||||
|
|||||||
@ -115,6 +115,7 @@ function(params) {
|
|||||||
apiVersion: 'v1',
|
apiVersion: 'v1',
|
||||||
kind: 'ServiceAccount',
|
kind: 'ServiceAccount',
|
||||||
metadata: bb._metadata,
|
metadata: bb._metadata,
|
||||||
|
automountServiceAccountToken: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
clusterRole: {
|
clusterRole: {
|
||||||
@ -238,6 +239,7 @@ function(params) {
|
|||||||
spec: {
|
spec: {
|
||||||
containers: [blackboxExporter, reloader, kubeRbacProxy],
|
containers: [blackboxExporter, reloader, kubeRbacProxy],
|
||||||
nodeSelector: { 'kubernetes.io/os': 'linux' },
|
nodeSelector: { 'kubernetes.io/os': 'linux' },
|
||||||
|
automountServiceAccountToken: true,
|
||||||
serviceAccountName: 'blackbox-exporter',
|
serviceAccountName: 'blackbox-exporter',
|
||||||
volumes: [{
|
volumes: [{
|
||||||
name: 'config',
|
name: 'config',
|
||||||
|
|||||||
@ -88,10 +88,12 @@ function(params)
|
|||||||
// 'allowPrivilegeEscalation: false' can be deleted when https://github.com/brancz/kubernetes-grafana/pull/128 gets merged.
|
// 'allowPrivilegeEscalation: false' can be deleted when https://github.com/brancz/kubernetes-grafana/pull/128 gets merged.
|
||||||
// 'readOnlyRootFilesystem: true' can be deleted when https://github.com/brancz/kubernetes-grafana/pull/129 gets merged.
|
// 'readOnlyRootFilesystem: true' can be deleted when https://github.com/brancz/kubernetes-grafana/pull/129 gets merged.
|
||||||
// 'capabilities: { drop: ['ALL'] }' can be deleted when https://github.com/brancz/kubernetes-grafana/pull/130 gets merged.
|
// 'capabilities: { drop: ['ALL'] }' can be deleted when https://github.com/brancz/kubernetes-grafana/pull/130 gets merged.
|
||||||
|
// FIXME(paulfantom): `automountServiceAccountToken` can be removed after porting to brancz/kuberentes-grafana
|
||||||
deployment+: {
|
deployment+: {
|
||||||
spec+: {
|
spec+: {
|
||||||
template+: {
|
template+: {
|
||||||
spec+: {
|
spec+: {
|
||||||
|
automountServiceAccountToken: false,
|
||||||
containers: std.map(function(c) c {
|
containers: std.map(function(c) c {
|
||||||
securityContext+: {
|
securityContext+: {
|
||||||
allowPrivilegeEscalation: false,
|
allowPrivilegeEscalation: false,
|
||||||
|
|||||||
@ -129,6 +129,7 @@ function(params) (import 'github.com/kubernetes/kube-state-metrics/jsonnet/kube-
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
spec+: {
|
spec+: {
|
||||||
|
automountServiceAccountToken: true,
|
||||||
containers: std.map(function(c) c {
|
containers: std.map(function(c) c {
|
||||||
ports:: null,
|
ports:: null,
|
||||||
livenessProbe:: null,
|
livenessProbe:: null,
|
||||||
|
|||||||
@ -114,6 +114,7 @@ function(params) {
|
|||||||
apiVersion: 'v1',
|
apiVersion: 'v1',
|
||||||
kind: 'ServiceAccount',
|
kind: 'ServiceAccount',
|
||||||
metadata: ne._metadata,
|
metadata: ne._metadata,
|
||||||
|
automountServiceAccountToken: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
service: {
|
service: {
|
||||||
@ -240,6 +241,7 @@ function(params) {
|
|||||||
{ name: 'sys', hostPath: { path: '/sys' } },
|
{ name: 'sys', hostPath: { path: '/sys' } },
|
||||||
{ name: 'root', hostPath: { path: '/' } },
|
{ name: 'root', hostPath: { path: '/' } },
|
||||||
],
|
],
|
||||||
|
automountServiceAccountToken: true,
|
||||||
serviceAccountName: ne._config.name,
|
serviceAccountName: ne._config.name,
|
||||||
securityContext: {
|
securityContext: {
|
||||||
runAsUser: 65534,
|
runAsUser: 65534,
|
||||||
|
|||||||
@ -253,6 +253,7 @@ function(params) {
|
|||||||
spec: {
|
spec: {
|
||||||
containers: [c],
|
containers: [c],
|
||||||
serviceAccountName: $.serviceAccount.metadata.name,
|
serviceAccountName: $.serviceAccount.metadata.name,
|
||||||
|
automountServiceAccountToken: true,
|
||||||
nodeSelector: { 'kubernetes.io/os': 'linux' },
|
nodeSelector: { 'kubernetes.io/os': 'linux' },
|
||||||
volumes: [
|
volumes: [
|
||||||
{ name: 'tmpfs', emptyDir: {} },
|
{ name: 'tmpfs', emptyDir: {} },
|
||||||
@ -268,6 +269,7 @@ function(params) {
|
|||||||
apiVersion: 'v1',
|
apiVersion: 'v1',
|
||||||
kind: 'ServiceAccount',
|
kind: 'ServiceAccount',
|
||||||
metadata: pa._metadata,
|
metadata: pa._metadata,
|
||||||
|
automountServiceAccountToken: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
clusterRole: {
|
clusterRole: {
|
||||||
|
|||||||
@ -131,6 +131,7 @@ function(params)
|
|||||||
spec+: {
|
spec+: {
|
||||||
template+: {
|
template+: {
|
||||||
spec+: {
|
spec+: {
|
||||||
|
automountServiceAccountToken: true,
|
||||||
containers: std.map(function(c) c {
|
containers: std.map(function(c) c {
|
||||||
securityContext+: {
|
securityContext+: {
|
||||||
capabilities: { drop: ['ALL'] },
|
capabilities: { drop: ['ALL'] },
|
||||||
|
|||||||
@ -98,6 +98,7 @@ function(params) {
|
|||||||
apiVersion: 'v1',
|
apiVersion: 'v1',
|
||||||
kind: 'ServiceAccount',
|
kind: 'ServiceAccount',
|
||||||
metadata: p._metadata,
|
metadata: p._metadata,
|
||||||
|
automountServiceAccountToken: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
service: {
|
service: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user