-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1650 from ArthurSens/as/network-policies
Adds NetworkPolicies to all components of Kube-prometheus
- Loading branch information
Showing
24 changed files
with
577 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: Cluster | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
networking: | ||
disableDefaultCNI: true | ||
podSubnet: "10.10.0.0/16" | ||
serviceSubnet: "10.11.0.0/16" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,4 @@ vendor/ | |
crdschemas/ | ||
|
||
developer-workspace/gitpod/_output | ||
kind | ||
developer-workspace/codespaces/kind |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
local kp = (import 'kube-prometheus/main.libsonnet') + | ||
(import 'kube-prometheus/addons/networkpolicies-disabled.libsonnet') + { | ||
values+:: { | ||
common+: { | ||
namespace: 'monitoring', | ||
}, | ||
}, | ||
}; | ||
|
||
{ | ||
['setup/' + resource]: kp[component][resource] | ||
for component in std.objectFields(kp) | ||
for resource in std.filter( | ||
function(resource) | ||
kp[component][resource].kind == 'CustomResourceDefinition' || kp[component][resource].kind == 'Namespace', std.objectFields(kp[component]) | ||
) | ||
} + | ||
{ | ||
[component + '-' + resource]: kp[component][resource] | ||
for component in std.objectFields(kp) | ||
for resource in std.filter( | ||
function(resource) | ||
kp[component][resource].kind != 'CustomResourceDefinition' && kp[component][resource].kind != 'Namespace', std.objectFields(kp[component]) | ||
) | ||
} |
35 changes: 35 additions & 0 deletions
35
jsonnet/kube-prometheus/addons/networkpolicies-disabled.libsonnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Disables creation of NetworkPolicies | ||
|
||
{ | ||
blackboxExporter+: { | ||
networkPolicies:: {}, | ||
}, | ||
|
||
kubeStateMetrics+: { | ||
networkPolicies:: {}, | ||
}, | ||
|
||
nodeExporter+: { | ||
networkPolicies:: {}, | ||
}, | ||
|
||
prometheusAdapter+: { | ||
networkPolicies:: {}, | ||
}, | ||
|
||
alertmanager+: { | ||
networkPolicies:: {}, | ||
}, | ||
|
||
grafana+: { | ||
networkPolicies:: {}, | ||
}, | ||
|
||
prometheus+: { | ||
networkPolicies:: {}, | ||
}, | ||
|
||
prometheusOperator+: { | ||
networkPolicies:: {}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.