Commit Graph

33 Commits

Author SHA1 Message Date
upodroid f3bc523b17 fix nlb firewall rules, operations and alias network subnets 2024-01-20 13:41:16 +00:00
justinsb 4557f9b655 gce ipv6: we can use network tags with ipv6 addresses
These work with IPv6, and this means we don't need to set up the (more
fragile) CIDR based rules.
2023-09-23 08:39:30 -04:00
Kubernetes Prow Robot 114ac311c1
Merge pull request #15332 from hakman/gce_internal_lb
gce: Update logic for internal LB
2023-07-09 14:11:04 -07:00
Ciprian Hacman 4656743c22 gce: Add support for bastions 2023-07-08 18:19:40 +03:00
Ciprian Hacman 04a4e02920 gce: Update logic for internal LB 2023-07-08 04:34:43 +03:00
justinsb ca67b1ca1e Refactor: rename IsGossip -> UsesLegacyGossip
We want to be able to use "dns=none" (without peer-to-peer gossip)
even for clusters that have the k8s.local extension.  These were
previously called "gossip clusters", but really that is an
implementation; what actually matters to users is that they don't rely
on writing records into a DNS zone (such as Route53).
2023-05-22 21:50:16 -04:00
justinsb b835184ea4 gce: fix icmpv6 in firewalls
IPv6 in firewalls must use icmpv6, not icmp.  Remap in our ipv6
generator for simplicity.
2023-04-25 20:59:47 -04:00
Justin SB f20e08cab9 GCE FirewallRule: Use an explicit field for ipv4 vs ipv6
We were previously relying on the name, but the name was "fooled" by
cluster names like ipv6.example.com
2023-03-31 09:33:29 -04:00
John Gardiner Myers 7c3e32369a Refactor Context into separate cloudup and nodeup types 2022-12-17 17:42:46 -08:00
Kubernetes Prow Robot e5a835d287
Merge pull request #14706 from johngmyers/v1alpha3-networking
v1alpha3: move networking fields under networking
2022-12-05 21:34:38 -08:00
Ciprian Hacman 71d0dfdc21 gce: Allow metrics-server to access kubelet API 2022-12-05 00:20:09 +02:00
John Gardiner Myers 235aa61594 v1alpha3: move networking fields under networking 2022-12-02 19:19:59 -08:00
Ciprian Hacman 21e0110dc2 gce: Allow Cilium to connect to its etcd cluster 2022-11-24 21:03:16 +02:00
John Gardiner Myers d39ba74bd7 Change the control-plane IG role to "ControlPlane" in v1alpha3 API 2022-11-22 17:05:29 -08:00
Ciprian Hacman dc98c74428 Move Gossip check to cluster struct 2022-10-21 09:48:07 +03:00
justinsb 8e6f73857d gce: memberlist needs TCP also
The memberlist gossip protocol exchange happens over TCP and UDP, so
we need to open both protocols.
2022-10-01 17:03:49 -04:00
Nat Henderson 9b08c4bb51 Enable internal load balancers when running on GCP
* Add ILBs, broadly following the AWS model.  The following new
capabilities are added for clusters in GCP:
  * Cluster's spec.api.loadBalancer can be set to 'type: internal' on
    GCP.
    * Therefore, GCP can now create:
        * regional backend services
        * regional (non-legacy) healthchecks
        * firewall rules with "internal" load-balancing scheme
        * firewall rules with dot-notation-specified IP addresses
  * Cluster's spec.api.loadBalancer's 'subnets' field functions
    as in the AWS model.

A few incidental changes are included, either because this change
touched the relevant code or because my use case happened to trigger the
issues that are fixed here.

* Cluster's spec.networkID field can be prefixed by project to use
  GCP's common cross-project networking model.
    * The presumption is that all specified subnets belong to this
      network and therefore this project.

* Add missing operation wait on forwarding rule creation.

* Some Terraform output improvements:
    * Permit no-ACL files in GCS buckets in Terraform output.
    * Enable marginally better cross-resource reference in Terraform outputs
    * Add project to network + subnetwork literals in Terraform output.
    * Add terraform output to backend services and health checks.

Testing:
  * Add mocks for backend services and health checks.
  * Add minimal integration test - copied from gce_private and ilb added.
  * Add update cluster goldens.

Co-authored-by: Travis Reid <travis_reid@apple.com>
2022-04-25 13:31:47 -07:00
Peter Rifel 0e59715e15
Trim GCE firewall rule names to their max length 2022-04-18 18:40:39 -05:00
Ciprian Hacman ea7df00719 Run hack/update-gofmt.sh 2021-12-01 22:39:50 +02:00
justinsb caff7e36ad gce: open node->master ports for calico and cilium
We're taking the opportunity to pursue a locked-down model, but this
means we need to open ports explicitly.
2021-10-25 08:31:21 -04:00
justinsb 0611e4f638 gce: open kops-controller port from nodes
This is now needed in our nodeup bootstrap with vTPM on GCE.

Also remove the cadvisor port, it is no longer running on the control-plane nodes.
2021-10-24 13:47:16 -04:00
justinsb e2f7895700 GCE: When using calico, need to open up ipip protocol
We need to open up the ipip protocol, which wasn't previously enabled.

Future work could construct the firewall rules in a common library,
and then adapt them to the various clouds.
2021-09-21 21:20:24 -04:00
justinsb 3e83b771d6 GCE: For IPAlias or Custom Routes, we must recognize source by CIDR
SourceTags are not recognized when using IPAlias or custom routes (aka
kubenet), so we must recognize by CIDR instead.
2021-09-21 08:20:17 -04:00
justinsb 76f816f483 GCE: Always have IPv6 rules in "ipv6 mode"
If we don't specify some SourceRanges, it defaults to 0.0.0.0/0, which
is IPv4 and confusing.
2021-09-20 09:26:28 -04:00
Justin SB 0722124e8e Initial IPv6 support for GCE
Supporting IPv6 values where they can be set by the user, and ensuring
that IPv4 and IPv6 firewall rules are split because on GCP they cannot
be in the same rule.
2021-08-21 20:09:31 -04:00
John Gardiner Myers 7c9e7e9286 Make Lifecycle field non-pointer 2021-06-02 23:02:16 -07:00
Peter Rifel 4d9f0128a3
Upgrade to klog2
This splits up the kubernetes 1.19 PR to make it easier to keep up to date until we get it sorted out.
2020-08-16 20:56:48 -05:00
mikesplain 9e55b8230a Update copyright notices
Also cleans some white spaces
2019-09-09 14:47:51 -04:00
Justin SB 62f7c26f98
Support "gce" networking mode, which uses ip aliases 2019-07-19 07:54:13 -04:00
Justin SB 3e33ac7682
Change code from glog to klog
We don't call klog.InitFlags yet, because that will cause a flag
redefinition error until we get everyone to stop using glog.  That
will happen when we update to k8s 1.13.
2019-05-06 12:54:51 -04:00
Justin Santa Barbara 3dfe48e5ae Wiring up lifecycle 2017-07-15 22:03:54 -04:00
Justin Santa Barbara 3d14d07616 Support cloud-config on GCE 2017-02-28 20:08:03 -05:00
Justin Santa Barbara 645f330dad Re-enable GCE support
We move everything to the models.  We feature-flag it, because we
probably want to change the names etc, and we aren't going to be able to
offer smooth upgrades until that is done.
2017-02-28 20:08:03 -05:00