Skip to content

Commit

Permalink
feat(helm): add MySQL and PostgreSQL ports to NetworkPolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
tongpu committed Aug 11, 2023
1 parent 92165f2 commit 0e0b4df
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
17 changes: 16 additions & 1 deletion v2/charts/azure-service-operator/templates/networkpolicies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,27 @@ spec:
# Required for communication with the Azure API
- port: 443
protocol: TCP
to:
- ipBlock:
cidr: 0.0.0.0/0
# Required for communication with the Kubernetes API
- port: {{ .Values.networkPolicies.kubernetesApiPort }}
protocol: TCP
to:
- ipBlock:
cidr: 0.0.0.0/0
cidr: {{ .Values.networkpolicies.kubernetesApiCIDR }}
# Required for communication with MySQL servers when using MySQL user object
- port: 3306
protocol: TCP
to:
- ipBlock:
cidr: {{ .Values.networkpolicies.mysqlCIDR }}
# Required for communication with PostgreSQL servers when using PostgreSQL user object
- port: 5432
protocol: TCP
to:
- ipBlock:
cidr: {{ .Values.networkpolicies.postgresqlCIDR }}
podSelector:
matchLabels:
control-plane: controller-manager
Expand Down
7 changes: 6 additions & 1 deletion v2/charts/azure-service-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,9 @@ networkPolicies:
enable: true
# TCP port to be configured for talking to the Kubernetes API
kubernetesApiPort: 6443

# Destination CIDR for talking to the Kubernetes API
kubernetesApiCIDR: 0.0.0.0/0
# Destination CIDR for talking to MySQL servers
kubernetesApiCIDR: 0.0.0.0/0
# Destination CIDR for talking to PostgreSQL servers
kubernetesApiCIDR: 0.0.0.0/0

0 comments on commit 0e0b4df

Please sign in to comment.