Commit Graph

57 Commits

Author SHA1 Message Date
John Gardiner Myers 4179fcce58 Use NodeupConfig for KubernetesVersion 2023-01-03 22:16:20 -08:00
John Gardiner Myers 005ec38972 Remove code for no-longer-supported k8s 1.21 2022-12-24 21:44:50 -08:00
John Gardiner Myers 7c3e32369a Refactor Context into separate cloudup and nodeup types 2022-12-17 17:42:46 -08:00
John Gardiner Myers 235aa61594 v1alpha3: move networking fields under networking 2022-12-02 19:19:59 -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
AkiraFukushima 2ced5ce287
Disable some flags in kube-controller-manager and kube-scheduler when logging-format is not text
Disable these flags because these are not accepted.
* --logtostderr
* --alsologtostderr
* --log-file
2022-08-12 01:11:57 +09:00
justinsb 9bb1d3e114 Configuration file for kube-scheduler
We generate a kube-scheduler configuration file in the kops CLI, and
nodeup will use it if provided (instead of generating one).

We put the configuration file into the fileAssets.

Users can provide a kube-scheduler configuration in additional
objects, and this will be used as the base configuration (we add the
kubeconfig path).

Issue #13352

Co-authored-by: Ciprian Hacman <ciprian@hakman.dev>
2022-08-03 09:51:05 -04:00
Peter Rifel 827326b860
Only rewrite to k8s.gcr.io until k8s 1.25
1.25 is when official images have been migrated to registry.k8s.io, so we only need to rewrite until 1.25
2022-06-06 20:20:42 -05:00
Ciprian Hacman 759172c3f0 Use k8s.gcr.io for k8s side-loaded images
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2022-03-23 12:15:57 +02:00
Vivek Jain 503b73747d
Append policy config map arguments only if UsePolicyConfigmap is true (#13308)
* check if UsePolicyConfigMap flag is true

* use suggested changes

Co-authored-by: Ciprian Hacman <ciprian@hakman.dev>

Co-authored-by: Ciprian Hacman <ciprian@hakman.dev>
2022-03-02 20:44:48 -08:00
justinsb 45ad8b50ae Enhance AddHostPathMapping to support a fluent style
This allows for the helper to be used in more places.
2021-12-31 13:26:12 -05:00
Ole Markus With 4a1e43526f Kube components log to stdout 2021-12-27 14:59:06 +01:00
John Gardiner Myers c5e1dea184 Remove code for no-longer-supported k8s version 2021-12-11 16:30:51 -08:00
Ciprian Hacman 1f5a814d3a Replace Handler with ProbeHandler for container probes 2021-12-03 22:57:43 +02:00
Ciprian Hacman ea7df00719 Run hack/update-gofmt.sh 2021-12-01 22:39:50 +02:00
Peter Rifel db639664a1
Replace klog flags with go-runner in k8s 1.23
These flags have been deprecated, see https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components
2021-10-06 08:10:20 -05:00
Ciprian Hacman 71a0bcf353 Add kubescheduler.config.k8s.io/v1beta2 for k8s 1.22+ 2021-10-05 10:27:02 +03:00
Ole Markus With 29771b73c1 Use TLS for kubescheduler health check as of k8s 1.23 2021-09-16 07:46:16 +02:00
John Gardiner Myers be8933b577 Remove code for unsupported features 2021-08-28 13:49:55 -07:00
John Gardiner Myers 3a53fdb139 Provision TLS server certs for controller-manager and scheduler 2021-07-22 20:59:58 -07:00
John Gardiner Myers cfd1582b0d Use kubeconfig for authentication and authorization as well 2021-07-21 19:24:06 -07:00
John Gardiner Myers d3469d6ec2 Remove code for no-longer-supported k8s versions 2021-05-07 23:40:03 -07:00
Ole Markus With 91a6777e60 Replace gopkg yaml with k8s-sigs yaml 2021-01-22 14:28:05 +01:00
John Gardiner Myers 2ac17bee69 Remove code for no-longer-supported k8s releases 2020-10-29 16:45:53 -07:00
Ciprian Hacman 70a3a2e978 ARM64 support - Update side-loading for multi-arch 2020-06-19 04:42:11 +03:00
Justin SB bf11a65bd3 Try wrapping pkix.Name 2020-06-09 20:24:09 -07:00
John Gardiner Myers b0694300df Issue kube-scheduler cert in nodeup 2020-06-09 20:23:33 -07:00
Ciprian Hacman cb6542488a Use kubescheduler.config.k8s.io/v1beta1 for Kubernetes 1.19 2020-05-29 08:43:54 +03:00
Ciprian Hacman 5cf71cc746 Use kubescheduler.config.k8s.io/v1alpha2 for Kubernetes 1.18 2020-04-09 09:12:24 +03:00
Roberto Rodriguez Alcala 504ac7545a Fixes regression in e2e tests 2020-01-28 22:26:38 -08:00
Roberto Rodriguez Alcala 03af6b80b5 Adds test and fixes incorrect flag 2020-01-27 11:46:12 -08:00
Roberto Rodriguez Alcala 1298d541cc Updates based on feedback 2020-01-25 12:32:40 -08:00
Roberto Rodriguez Alcala 447b46d109 Fix for copyright and ran update-bazel.sh 2020-01-23 20:11:41 -08:00
Roberto Rodriguez Alcala 7a017396ba Fixes incorrect tag name and copyright year 2020-01-23 19:58:45 -08:00
Roberto Rodriguez Alcala a9f3db63fc Support additional kube-scheduler config parameters via config file
Mentioned in #6942

This change allows using the --config flag and a generated configfile to set
options that were not previously supported and the use via flags is deprecated.
(https://kubernetes.io/docs/reference/command-line-tools-reference/kube-scheduler/)

I thought that it might be better to have them in a config file to ensure
support in newer kubernetes versions.

It also makes it easy to add more.
2020-01-23 19:13:31 -08:00
vvbogdanov87 b654bc923f Fix scheduler policy configmap args 2020-01-21 11:59:22 +08:00
mikesplain 9e55b8230a Update copyright notices
Also cleans some white spaces
2019-09-09 14:47:51 -04:00
Ripta Pasay a31a6b60ca Add maxPersistentVolumes to support the KUBE_MAX_PD_VOLS scheduler setting 2019-07-30 11:44:45 -07:00
Kubernetes Prow Robot dd6b0314fc
Merge pull request #6897 from vainu-arto/set-priority-for-static-pods
Set priority for static pods
2019-07-12 00:41:07 -07:00
Kashif Saadat 2b61ace49c goimports update 2019-07-03 16:43:20 +01:00
Austin Moore 67d9f5f190
Move getProxyEnvVars into a util package 2019-06-05 15:59:19 -04:00
Justin SB fe487df586
Use klog logging from 1.15
klog can now support logging both to a file and to streams, so we get the output both in docker & logfiles.

A few gotchas:

* The output previously was all on stdout, now it on stderr.  That is more correct
* If something writes to stdout or stderr outside of klog, it will no longer end up in the logfile.
* There's some oddities still to be ironed out about the flag syntax https://github.com/kubernetes/klog/issues/60
2019-05-10 00:17:30 -04:00
Arto Jantunen 48974521e1 Set priority classes for static pods
For the master pods (apiserver, controller manager, scheduler) this is
unlikely to ever matter (the masters aren't expected to run out of
resources and need to evict things) but evictions of kube-proxy from worker
nodes are easy to trigger in clusters with PodPriority enabled. Since these
are static pods the configuration is also somewhat difficult to change.
2019-05-09 16:03:08 +03:00
Derek Lemon -T (delemon - AEROTEK INC at Cisco) 4f0169bb79 codegen 2019-01-16 09:30:40 -07:00
Justin SB 26bd75aecb
Bulk spelling fixes
Experimenting with my own spelling checker, these are the typos it caught.
2018-12-20 17:43:56 -05:00
Rohith c9db958696 - cleanup up elements, imports and comments 2018-06-20 09:26:31 +01:00
Rohith 4531384649 This PR attempts to solve two issues
a) The current implementation use's a static kubelet which doesn't not conform to the Node authorization mode (i.e. system:nodes:<nodename>)
b) As present the kubeconfig is static and reused across all the masters and nodes

The PR firstly introduces the ability for users to use bootstrap tokens and secondly when enabled ensure the kubelets for the masters as have unique usernames.  Note, this PR does not attempt to address the distribution of the bootstrap tokens themselves, that's for cluster admins. One solution for this would be a daemonset on the masters running on hostNetwork and reuse dns-controller to annotated the pods and give as the DNS

Notes:
- the master node do not use bootstrap tokens, instead given they have access to the ca anyhow, we generate certificates for each.
- when bootstrap token is not enabled the behaviour will stay the same; i.e. a kubelet configuration brought down from the store.
- when bootstrap tokens are enabled, the Nodes sit in a timeout loop waiting for the configuration to appear (by third party).
- given the nodeup docker and manifests builders are executed before the kubelet builder, the assumption here is a unit file kicks of a custom container to bootstrap the rest.
- the current firewalls on between the master and nodes are fairly open so no need to open ports between the two
- much of the work was ported from @justinsb PR [here](https://github.com/kubernetes/kops/pull/4134/)
- we add a very presumptuous server and client certificates for use with an authorizer (node-bootstrap-internal.dns_zone)

I do have an additional PR which performs the entire thing. The process being a node_authorizer which runs on the master nodes via a daemonset, the service implements a series of authorizers (i.e. alwaysallow, aws, gce etc). For aws, the process is similar to how vault authorizes nodes [here](https://www.vaultproject.io/docs/auth/aws.html). Nodeup no then calls out to the node_authorizer on bootstrap and provisions the kubelet.
2018-06-11 09:56:32 +01:00
Leon Waldman 1fa6bfb612 Fix kubeScheduler.usePolicyConfigMap - missing namespace flag 2018-03-19 19:42:27 -03:00
Kashif Saadat ac25853cd5 - Add etcdClusterSpec Image & Version in bootstrap data for Master nodes
- Reuse execWithTee fn for ETCD Command (tee & mkfifo in different path for newer image versions)
2018-02-10 12:14:36 +00:00