diff options
author | makefunstuff <[email protected]> | 2024-06-28 23:45:31 +0200 |
---|---|---|
committer | makefunstuff <[email protected]> | 2024-06-28 23:45:31 +0200 |
commit | d555bdcec06c258bd1fee3735c7d7b5348632885 (patch) | |
tree | 841814aefe7f912f0db00b1577514aa7be891fa8 /tools | |
parent | 0e4d3ba9a0fac385923a994cabb1f1fd191bc71a (diff) | |
download | k3s-lab-d555bdcec06c258bd1fee3735c7d7b5348632885.tar.gz |
explicit network-policy
Diffstat (limited to '')
-rw-r--r-- | tools/elasticsearch/network-policy.yaml | 27 | ||||
-rw-r--r-- | tools/elasticsearch/values.yaml | 20 |
2 files changed, 27 insertions, 20 deletions
diff --git a/tools/elasticsearch/network-policy.yaml b/tools/elasticsearch/network-policy.yaml new file mode 100644 index 0000000..8665861 --- /dev/null +++ b/tools/elasticsearch/network-policy.yaml @@ -0,0 +1,27 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: allow-logstash-and-grafana-to-elasticsearch + namespace: monitoring +spec: + podSelector: + matchLabels: + app.kubernetes.io/name: elasticsearch + policyTypes: + - Ingress + ingress: + - from: + - podSelector: + matchLabels: + app.kubernetes.io/name: logstash + ports: + - protocol: TCP + port: 9200 + - from: + - podSelector: + matchLabels: + app.kubernetes.io/name: grafana + ports: + - protocol: TCP + port: 9200 + diff --git a/tools/elasticsearch/values.yaml b/tools/elasticsearch/values.yaml index e769dc6..c052ff4 100644 --- a/tools/elasticsearch/values.yaml +++ b/tools/elasticsearch/values.yaml @@ -9,26 +9,6 @@ elasticsearch: storage: 10Gi labels: app.kubernetes.io/name: elasticsearch - networkPolicy: - http: - enabled: true - transport: - enabled: true - additionalRules: - - from: - - podSelector: - matchLabels: - app.kubernetes.io/name: logstash - ports: - - protocol: TCP - port: 9200 - - from: - - podSelector: - matchLabels: - app.kubernetes.io/name: grafana - ports: - - protocol: TCP - port: 9200 logstash: enabled: true replicas: 1 |