Compare commits
10 commits
a1f31f84fe
...
573f8c082c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
573f8c082c | ||
|
|
fa9e0f3f4d | ||
|
|
344e79c73c | ||
|
|
8b63fe702c | ||
|
|
126920d48d | ||
|
|
20ef47ccc7 | ||
|
|
32806ea7b1 | ||
|
|
8fdedbcd93 | ||
|
|
948efe60c7 | ||
|
|
54cd382650 |
3 changed files with 26 additions and 11 deletions
|
|
@ -7,5 +7,5 @@ icon: https://raw.githubusercontent.com/waylon/k8s-basic/master/helm-chart/logo.
|
|||
name: k8s-basic
|
||||
description: A helm chart for basic container deployment
|
||||
type: application
|
||||
version: 1.0.0
|
||||
version: 1.0.2
|
||||
appVersion: "1.0"
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ spec:
|
|||
metadata:
|
||||
labels:
|
||||
service: {{ .Values.name }}
|
||||
annotations:
|
||||
diun.enable: "true"
|
||||
spec:
|
||||
securityContext:
|
||||
{{ toYaml .Values.podSecurityContext | indent 8 }}
|
||||
|
|
|
|||
|
|
@ -11,20 +11,15 @@ spec:
|
|||
service: {{ .Values.name }}
|
||||
policyTypes:
|
||||
- Ingress
|
||||
- Egress
|
||||
ingress:
|
||||
- from:
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
name: kube-system
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: traefik
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: {{ .Values.port }}
|
||||
egress:
|
||||
- {}
|
||||
kubernetes.io/metadata.name: kube-system
|
||||
# ports:
|
||||
# - protocol: TCP
|
||||
# port: {{ .Values.port }}
|
||||
# egress:
|
||||
# TODO, optionally add egress restriction.
|
||||
# - to:
|
||||
# - namespaceSelector: {}
|
||||
|
|
@ -34,3 +29,21 @@ spec:
|
|||
# port: 53
|
||||
# - protocol: UDP
|
||||
# port: 53
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: default-network-dns-policy
|
||||
namespace: {{ .Values.namespace | default .Values.name }}
|
||||
spec:
|
||||
ingress:
|
||||
- ports:
|
||||
- port: 53
|
||||
protocol: TCP
|
||||
- port: 53
|
||||
protocol: UDP
|
||||
podSelector:
|
||||
matchLabels:
|
||||
k8s-app: kube-dns
|
||||
policyTypes:
|
||||
- Ingress
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue