Commit Graph

32 Commits

Author SHA1 Message Date
justinsb 05f8618306 metal: simple IPAM for IPv6 2025-07-26 20:01:12 -04:00
Peter Rifel 7581394f66
Give each controller unique names 2024-09-05 21:57:01 -05:00
justinsb 839914a0d0 refactor: support multiple podCIDRs in the node patch
Breaking down the metal support into bite-sized chunks.
2024-07-30 15:52:08 -04:00
Peter Rifel 1cab9aaa16
Migrate kops-controller to aws-sdk-go-v2 2024-03-24 18:07:16 -05:00
justinsb 0096451a83 Cleanup a few places where we used Warningf with %w
Fixing up a few places where we used the wrong marker.
2023-09-18 11:02:18 -04:00
John Gardiner Myers 76cb3924c4 Legacy control-plane node labels are no longer used 2023-09-04 20:23:08 -07:00
Kubernetes Prow Robot 5d08bc3b0a
Merge pull request #15640 from johngmyers/vfscontext
Refactor out references to global vfs.Context
2023-07-17 09:15:19 -07:00
Kubernetes Prow Robot 76eda9b9f4
Merge pull request #15650 from justinsb/prune_node_labels
Support removal of managed node labels
2023-07-16 21:49:07 -07:00
justinsb 7a5c43ef8d Fix comment on patchNodePodCIDRs
Cleanup; no change in behavior.
2023-07-16 22:59:06 -04:00
justinsb 5fd533c96a Support removal of managed node labels
kops-controller manages a few node-role node-labels.  We
now remove any extra managed labels that land on the node.

This means we will now actively remove the extra node label if we
previously erroneously applied to a control-plane node; previous code
changes stopped applying it.
2023-07-16 22:41:22 -04:00
John Gardiner Myers e04fc1314f Use NewVFSContext in kops-controller 2023-07-15 15:48:56 -07:00
justinsb edeb4d4869 kops-controller: load objects with version conversion
If we deserialize the yaml, we don't go through the version-conversion
logic.  That logic maps from Master -> ControlPlane, so without that
logic we see unexpected values in the "string enums".
2023-07-15 17:34:50 -04:00
Justin SB cf9134489c kops-controller: create IPAM controller for GCE
We observe the IPv6 CIDRs assigned to nodes, and reflect them into the node.

Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>
2023-07-05 12:34:55 -04:00
justinsb 36a763c88f node labeling: don't ignore unknown roles
We were silently ignoring unknown roles, which makes it hard to know
when our expectations aren't met.  It looks like the rename of the
role from "Master" to "ControlPlane" may have caused some drift
against our expectations also.
2023-06-18 19:40:56 -04:00
Ciprian Hacman b3a07ee83e Use short service name with discovery labels 2022-12-26 13:21:43 +02:00
Ole Markus With 7375bbb487 kops-controller: increase verbosity level on logs in gossip controller 2022-12-08 20:18:31 +01:00
Ciprian Hacman 8f79c9bd68 Replace fi.Bool/Float*/Int*/String() with fi.PtrTo() 2022-11-19 03:45:22 +02:00
Ole Markus With ce2e877aeb Remove bazel files from vendor 2022-04-12 13:29:03 +02:00
Ciprian Hacman ea7df00719 Run hack/update-gofmt.sh 2021-12-01 22:39:50 +02:00
justinsb 6133250046 gossip: support resolution of k8s.local names from pods
We add the hosts plugin to CoreDNS, and we populate a ConfigMap from
kops-controller (when in gossip mode).

This enables resolution of the internal apiserver DNS name from Pods,
even when gossip mode (k8s.local) is in use.  This should fix the
failing e2e tests which are assuming that the name in the JWT token is
resolvable from inside the cluster.

This is also a possible step towards a simpler gossip mode, now that
we have a central controller.
2021-11-19 11:02:15 -05:00
Ole Markus With 88bd1953ce Have kops-controller assign instance ipv6 prefix to node 2021-09-16 19:25:19 +02:00
John Gardiner Myers 53695fc183 Put versioned API of cluster into state store 2021-06-16 19:33:46 -07:00
Barry Melbourne 659bfa0daf Update Controller Runtime Go module to v0.8.2 2021-02-25 20:34:12 +00:00
John Gardiner Myers 7069aaabf6 Take node labels from cloud tags on AWS 2020-09-10 20:59:24 -07:00
John Gardiner Myers 24ff622d8e Rename NodeReconciler to LegacyNodeReconciler 2020-09-10 20:42:56 -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
John Gardiner Myers 44fb283e3f Move NodeLabels into the NodeupConfig 2020-06-28 18:52:03 -07:00
Panagiotis Atmatzidis 31acabf8cd
Add EC2 instance lifecycle label to nodes
When using a "mixed instance policy"[1] instance group spot and onDemand nodes are part of the same
ASG. The ASG handles the percentage of spot vs onDemand instances. There are no annotations, EC2 tags or labels to identify which
instances are onDemand vs spot. There is a field called `InstanceLifecycle` accessible through `EC2.DescribeInstances`.

The field `InstanceLifecycle` is available only in `spot` and
`scheduled` AWS EC2 instance types.

This PR introduces a new label to be attached on AWS EC2 spot nodes.

The label is:

```
node-role.kubernetes.io/spot-worker: "true"
```

or

```
node-role.kubernetes.io/scheduled-worker: "true"
```

[^1]: https://github.com/kubernetes/kops/blob/master/docs/instance_groups.md#mixedinstancepolicy-aws-only
2020-05-15 09:33:37 +03:00
Justin Santa Barbara 31bb16d4d1 Add context.Context to most signatures
The client-go signature for most methods adds a context.Context
object, and also makes Options mandatory.  Feed through a
context.Context through many of our methods (but use context.TODO to
stop it getting totally out of hand!)
2020-04-11 14:44:17 -04:00
Justin SB cdaa7a3a48
Fix boilerplate: headers & packages 2019-09-25 12:48:14 -04:00
Justin SB 728e582360
Fill out kops controller functionality
k8s 1.16 requires that we move label setting away from the kubelet, to
a central controller.  kops-controller is that controller.
2019-09-25 12:04:34 -04:00
Justin SB 0fa65236aa
Scaffolded kops-controller with kubebuilder 2 2019-09-25 10:45:59 -04:00