Commit Graph

101 Commits

Author SHA1 Message Date
Jesse Haka 4a95f30129 Fix ingress status for loadbalancers that does not have publicname 2022-12-27 16:02:49 +02:00
Ciprian Hacman 0c88d881a2 openstack: Stop passing cluster tags 2022-12-22 08:08:19 +02:00
Ciprian Hacman d9d78df5e7 openstack: Refactor DNS client initialization 2022-12-22 07:41:25 +02:00
Ole Markus With 00e484663b OpenStack: allow no lbclient when checking for vipacl 2022-12-08 18:46:18 +01:00
Ole Markus With 7ec40d9c88 Refactor building openstack load balancer client 2022-12-08 10:08:38 +01:00
John Gardiner Myers 235aa61594 v1alpha3: move networking fields under networking 2022-12-02 19:19:59 -08:00
John Gardiner Myers d39ba74bd7 Change the control-plane IG role to "ControlPlane" in v1alpha3 API 2022-11-22 17:05:29 -08:00
John Gardiner Myers 5fca16aa30 v1alpha3: Move API-related settings under API 2022-11-19 10:27:12 -08:00
Ciprian Hacman d29812fc6e Replace fi.Bool/Float*/Int*/StringValue() with fi.ValueOf 2022-11-19 03:45:23 +02:00
Ciprian Hacman 8f79c9bd68 Replace fi.Bool/Float*/Int*/String() with fi.PtrTo() 2022-11-19 03:45:22 +02:00
John Gardiner Myers 64be690211 Update TopologySpec for v1alpha3 API 2022-11-06 09:10:38 -08:00
Ciprian Hacman 85026145a1 Always infer gossip DNS from cluster name 2022-10-02 12:54:37 +03:00
Gene Kuo 17d2f081b6 Fix kops update for OpenStack with LB
In the last PR to support OVN provider for LB, listener will refer to
load balancer provider for ACL settings. While currently get listener
API returns empty Pools, which will cause nil pointer dereference when
referring Pool.Loadbalancer.Provider.

This commit fix this issue by getting pool information with
DefaultPoolID when Pools is empty. As I added GetPool function, the
origin GetPool function is renamed to GetPoolMember.
2022-05-25 23:32:54 +09:00
John Gardiner Myers aff5f587f3 Move Openstack settings to cloudProvider.openstack 2022-04-07 10:04:19 -07:00
ederst f97d86e197 Pick the right OS server group when creating cloud groups
This fixes an issue where kops picks the last server group found on
OpenStack instead of the right one when getting the cloud groups.

For example, lets assume that kops created those server groups and they are returned in the order as shown here by the OpenStack API:

```
cluster-name-bastion
cluster-name-cp-0
cluster-name-worker
````

Now kops looks for nodes associated with the IG "bastion" and the
expected behavior would be that it ends up using "cluster-name-bastion".
However, it will actually end up  associating the cloud group with the
last server group, which is in this case "cluster-name-worker" due to
the reference switching to the last item when the loop is done.

In the worst case this could lead to kops deleting the wrong instances
when deleting an IG.

Not using the server group as a "by reference" argument when building
the cloud group fixes this behavior.
2022-04-06 00:10:44 +02:00
Jesse Haka 6b32f79c18 OpenStack - Add loadbalancer pool monitor to API LB 2022-01-18 12:10:47 +02:00
Jesse Haka b88d110f58 Drain OpenStack loadbalancers 2021-12-31 13:16:02 +02:00
Ciprian Hacman ea7df00719 Run hack/update-gofmt.sh 2021-12-01 22:39:50 +02:00
Jesse Haka 508a590116 fix tests 2021-11-16 20:11:18 +02:00
Jesse Haka 5896479b8f fix parse semver 2021-08-31 13:56:08 +03:00
Michael Wagner 99330549e4 feat(openstack): enrich ports with more metadata
The overall goal is to get rid of the specific port names and replace
them with hashed ones. This in turn allows us to introduce rolling
updates for Openstack in a later stage.
2021-08-09 08:49:12 +02:00
Peter Rifel ce821a614f
In-line openstack loadbalancer feature detection
This was our only reliance on cloud-provider-openstack which depends on k8s.io/kubernetes.

With the logic in-lined, kops no longer has any indirect dependencies of k/k
2021-08-06 08:19:53 -04:00
John Gardiner Myers dd605fdbc3 Subsume StatusStore into fi.Cloud 2021-05-15 17:39:32 -07:00
Otto Sulin 24dcd840bb Fix OpenStack delete functions
This PR introduces two fixes:
1) Add missing RetryWithBackoff to DeleteInstanceWithID
2) Fix broken retry logic in all other delete functions. In the current implementation, as the first Delete request will almost certainly return nil, the function will return true and the retry will not try again, resulting in assets not getting deleted from OpenStack

Also, the current writeBackoff is pretty aggressive and I introduced a bit less hasty deleteBackoff.

The change has been tested with OpenStack. I verified that all APIs we are hitting will eventually return the 404 (type) we are looking for.
2021-02-17 11:02:12 +02:00
Jesse Haka 41d04d8d4b add user agent to openstack api requests 2021-02-04 23:04:06 +02:00
Jesse Haka 185ccba246 Use random instance names in OpenStack 2021-01-12 14:52:39 +02:00
Jesse Haka 46de9f145e update gophercloud dependency 2021-01-11 14:48:22 +02:00
Jesse Haka e3bbe25bc9 Reset deviceID status if needed 2020-11-06 11:07:30 +02:00
Ole Markus With e9cc96baab Fully support kops get instances on openstack 2020-09-01 09:43:26 +02:00
Ole Markus With ef25dda399 Migrate floating IP deletion to neutron 2020-08-24 06:44:29 +02:00
Ole Markus With bac632b9d1 Migrate floating IP getter to neutron 2020-08-24 06:44:29 +02:00
Ole Markus With 36fb150105 Migrate floating IP to server association to neutron 2020-08-24 06:44:27 +02:00
Ole Markus With 8c70787bab Upgrade gophercloud to v1.11.0
Update upup/pkg/fi/cloudup/openstacktasks/instance.go

Co-authored-by: Peter Rifel <rifelpet@users.noreply.github.com>
2020-08-23 16:45:00 +02: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
Ole Markus With b63ef4f06a Add retry to fetching IP ingress status
It takes some seconds for the node to be created and the (fixed) ip, so we need to retry this operation.
Also need to increase the number of retries quite a bit in order to wait long enough.
2020-08-04 08:22:00 +02:00
Ole Markus With 3c0d0cf690 Add fixedip to local kubeconfig if there is no loadbalancer and master topology is private 2020-08-04 08:22:00 +02:00
Peter Rifel 39ed56522c
Refactor openstackCloud to be mockable, add openstack.MockCloud
This is the first step towards an openstack implementation of cloudmock, allowing us to have openstack integration tests.
2020-07-28 23:29:41 -05:00
Ole Markus With e32e03b07e Bump the wait time for OS write ops 2020-07-12 21:08:13 +02:00
Ole Markus With b508696cf2 Make Instance task depend on floating ip
Originally, floating ips depended on instances, but this causes a dependency cycle now that bootstrap scripts require all IPs for the API cert.
This also requires using networking API for creating floating ips instead of compute so that we can name (and later tag) the floating IPs, which is necessary to know which floating IP belongs to which instance prior to association
2020-07-12 21:08:13 +02:00
Jesse Haka bdaeb6df36 upgrade to cinder v3 to use api 2020-05-11 08:06:13 +03:00
tanjunchen f01e8e4cdd upup/pkg/fi/cloudup/ staticcheck 2019-12-31 16:15:28 +08:00
Justin SB 802b1add43
Refactor: Add Region() method to fi.Cloud
This enables us to simply the apply logic.
2019-12-22 13:40:38 -05:00
Michael Wagner ebc117b7b8 chore(openstack): use different mechanism to get fip association 2019-12-18 11:01:19 +01:00
Michael Wagner e7b02a2472 fix(openstack): identify cluster ips correctly 2019-12-18 10:28:17 +01:00
Jesse Haka 5e3b94ae17 use existing network and subnet 2019-10-27 08:21:25 +02:00
Teodor Todorov fac5969001
Allow OS instances to boot from volume 2019-09-23 18:04:25 +01:00
Jesse Haka c0759525fc Use without external router 2019-09-21 11:21:21 +03:00
Jesse Haka 9f2f3ccf25 clean security groups 2019-09-12 18:05:03 +03:00
mikesplain 9e55b8230a Update copyright notices
Also cleans some white spaces
2019-09-09 14:47:51 -04:00
Jesse Haka daac327372 remove default insecure from openstack 2019-09-06 10:56:33 +03:00