Commit Graph

33 Commits

Author SHA1 Message Date
Peter Rifel bae8150e12
Update more klog v1 references to v2
I missed these in the previous PR. This removes the direct dependency on v1 entirely.
The kubernetes 1.19 upgrade will remove the indirect reference on v1.
2020-08-17 07:44:48 -05:00
John Gardiner Myers d05f9a3eff Don't issue certs for features not enabled 2020-08-16 23:40:43 -07:00
John Gardiner Myers b6947ccaee Use kops-controller to issue kube-router cert 2020-08-16 23:40:38 -07:00
John Gardiner Myers 8e43c1d637 Use kops-controller to issue kube-proxy cert 2020-08-16 23:36:42 -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 9e99f76a6e Address review comments 2020-08-15 10:30:21 -07:00
John Gardiner Myers bec273ebf1 Implement signing of kubelet cert in kops-controller 2020-08-15 10:30:20 -07:00
John Gardiner Myers 9cfa169740 Add server code to kops-controller 2020-08-15 10:30:15 -07:00
John Gardiner Myers cfa262a81a Authenticate from nodeup to kops-controller 2020-08-15 09:50:08 -07:00
John Gardiner Myers 9c01e1f44d Send bootstrap query from nodeup to kops-controller 2020-08-15 09:50:08 -07:00
John Gardiner Myers 00c60ddff6 Add server code to kops-controller 2020-08-15 09:46:30 -07:00
Ciprian Hacman 172031859d ARM64 support - Build multi-arch images 2020-08-10 13:47:07 +03:00
John Gardiner Myers 44fb283e3f Move NodeLabels into the NodeupConfig 2020-06-28 18:52:03 -07:00
Peter Rifel 9eba72c2b4
Add a couple more "area" labels 2020-06-18 07:01:05 -05: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
Peter Rifel afd9aa1a4d Enable stamping on bazel image builds
Currently the images have a timestamp of epoch 0:

```
$ docker inspect kope/kops-controller:1.18.0-alpha.2 -f '{{ .Created }}'
1970-01-01T00:00:00Z
```

The `container_image` bazel rule [0] mentions that `creation_time` has a default value of 0 unless `stamp = True`, so this should be enabled on all container_image rules that are pushed to a docker registry.

[0] https://github.com/bazelbuild/rules_docker#container_image-1
2020-04-02 20:27:14 -05:00
Justin SB 46c8cc6d86 makefile: use more hash helpers when building images
It's cleaner & more consistent.
2020-02-16 13:10:31 -05:00
Justin SB 0cb35638f2
Stop logging to /var/log/kops-controller.log
Writing to a hostPath from a non-root container requires file
ownership changes, which is difficult to roll out today.  See
discussion in #8454

We were primarily using the logfile for e2e diagnostics, so we're
going to look into collecting the information via other means instead.

We also haven't yet shipped this logfile in a released version (though
we have shipped it in beta releases)
2020-02-04 06:41:25 -05:00
John Gardiner Myers 14bc441d8d Run dns-controller and kops-controller as non-root user 2019-12-21 21:28:44 -08:00
Srikanth 7467d1a6a4 Remove ununsed code 2019-11-24 12:56:46 +05:30
Srikanth 7b8eb2bfee Initial work for kops-controller to support digital ocean 2019-11-24 12:56:46 +05:30
Srikanth 90f3ebee57 Initial work 2019-11-24 12:56:23 +05:30
Justin SB c210eb8d15
Move kops-controller to daemonset
We also scale-down the old Deployment to have 0 replicas, to be sure
to stop it.

We can remove it later when we have proper pruning here.
2019-10-14 10:44:49 -04:00
Justin SB d3bad10aa9
Move kops-controller to use a yaml configuration file
This is more in keeping with componentconfig, and lets us add more
options easily in future.
2019-10-13 07:27:52 -07:00
Kubernetes Prow Robot ff1d94c7cb
Merge pull request #7692 from zetaab/kops_ctrl_openstack
Kops controller support for OpenStack
2019-10-11 09:13:41 -07:00
Thomas Jackson 85db3dce27 make apimachinery 2019-10-10 13:13:38 -07:00
Justin SB 49258971fc
Publish kops-controller container dump to S3/GCS
We then `docker load` it when using a KOPS_BASE_URL.

This should simplify the development process (particularly once we
also do this for dns-controller; at that point we won't need a
registry at all).

This should also fix the problems in CI, where the kops-controller
image isn't available.  We've been getting away with testing with the
previous version for dns-controller, which changes pretty slowly.  But
that's not a good idea for kops-controller, which is likely to be more
critical and evolve more rapidly.
2019-09-28 22:43:46 -04:00
Jesse Haka ed8dbc41d0 kops controller support for openstack 2019-09-28 10:06:39 +03:00
Justin SB cdaa7a3a48
Fix boilerplate: headers & packages 2019-09-25 12:48:14 -04:00
Justin SB 3ccc84dcf8
kops-controller container image
Based on distroless for security / stability
2019-09-25 12:04:36 -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