Skip to content

Commit

Permalink
Merge pull request #196 from qiffang/configurable-sourcerange
Browse files Browse the repository at this point in the history
Network: use the shoot iprange to replace hardcode
  • Loading branch information
prashanth26 authored Nov 11, 2020
2 parents 74debaf + 9c213df commit c489add
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion charts/internal/gcp-infra/templates/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,11 @@ resource "google_compute_subnetwork" "subnetwork-internal" {
resource "google_compute_firewall" "rule-allow-internal-access" {
name = "{{ required "clusterName is required" .Values.clusterName }}-allow-internal-access"
network = {{ required "vpc.name is required" .Values.vpc.name }}
source_ranges = ["10.0.0.0/8"]
{{ if .Values.networks.internal -}}
source_ranges = ["{{ required "networks.workers is required" .Values.networks.workers }}", "{{ required "networks.internal is required" .Values.networks.internal }}"]
{{ else -}}
source_ranges = ["{{ required "networks.workers is required" .Values.networks.workers }}"]
{{ end -}}

allow {
protocol = "icmp"
Expand Down

0 comments on commit c489add

Please sign in to comment.