Commit Graph

23 Commits

Author SHA1 Message Date
John Gardiner Myers 0364a3af25 Refactor FindKeypair interfaces 2021-06-05 16:38:24 -07:00
John Gardiner Myers dd605fdbc3 Subsume StatusStore into fi.Cloud 2021-05-15 17:39:32 -07:00
Peter Rifel 30f3d14979
Use the secondary ELB port when exporting kubecfg w/ --admin and sslCertificate 2020-11-06 11:09:37 -06:00
Justin SB 8757a2ce2a kubeconfig generation: add tests for kops plugin
Also slightly simplify the tests and Kubecfg Builder signature by
passing in the ConfigAccess only when needed.
2020-08-30 15:17:36 -04:00
Justin SB 0cda0f5068 Support authentication helper for kubectl
We create a simple exec plugin command which can create and renew
short-lived admin credentials on the fly, essentially leveraging the
security of the underlying cloud credentials.

Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>
2020-08-30 15:16:20 -04:00
Peter Rifel d0b8c654bd
Add --internal flag for export kubecfg that targets the internal dns name
Kops creates an "api.internal.$clustername" dns A record that points to the master IP(s)

This adds a flag that will use that name and force the CA cert to be included.
This is a workaround for client certificate authentication not working on API ELBs with ACM certificates.
The ELB has a TLS listener rather than TCP, so the client certificate is not passed through to the apiserver.
Using --internal will bypass the API ELB so that the client certificate will be passed directly to the apiserver.
This also requires that the masters' security groups allow 443 access from the client which this does not handle automatically.
2020-08-26 21:15:18 -05:00
John Gardiner Myers 7ab0a63571 Put userid in kubecfg cert CommonName 2020-08-18 14:04: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 a45b07c156 Reduce the lifetime of exported kubecfg credentials 2020-07-17 22:39:01 -07:00
Ole Markus With 72fd007acf Don't export admin user by default. Allow specifying existing user when exporting context 2020-06-24 19:54:25 +02:00
ZouYu 2fc52ec6be fix some go-lint warning
Signed-off-by: ZouYu <zouy.fnst@cn.fujitsu.com>
2020-06-09 08:52:50 +08:00
John Gardiner Myers 49ea71dec9 Don't export basic auth credentials if basic auth is disabled 2020-06-05 21:12:37 -07:00
mikesplain 9e55b8230a Update copyright notices
Also cleans some white spaces
2019-09-09 14:47:51 -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
Adam Yang 90013239fd initial implementation 2019-02-19 22:26:59 -05:00
Raffaele Di Fazio b19ee16b09 Fix nilpointer in create_kubecfg.go 2018-07-19 09:41:48 +02:00
Raffaele Di Fazio d477e96c38 Added initial implementation of ACM cert for Kubernetes API ELB 2018-07-06 09:29:54 +02:00
Justin Santa Barbara 45bc6a559d Don't use ELB DNS name for internal ELBs
We introduced some new heuristics in #3941 that meant we would access
private DNS names via the ELB's name, just as we do with gossip names.

But it's also possible to set up a VPN or DirectConnect and access a
private HostedZone directly, and in this case we don't want to use the
ELB DNS Name.  We recognize this case because the ELB can be set to
Internal (and probably should be, for minimal attack surface!)

We'll probably have to introduce a field for this, but hopefully this
heuristic is sufficient to unblock the release.
2018-03-21 20:12:15 -04:00
chrislovecnm c13b952cd3 Updating legacy Keyset to newer Keyset API Objects
Creating the keypair.yaml file if it does not exist.

If the Keypair is not found kops creates a new keyset file.  We are
setting the Keyset Task Format to 'Keypair', which denotes that we do
not have a keypair.yaml file.

This commit enables upgrading from kops 1.8 -> 1.9 while upgrading an
existing cluster.  Clusters built with kops 1.8 do not have the keypair
file, and these code changes allow the creation of that file.
2018-03-09 13:14:25 -07:00
Arto Jantunen 7639487e4f Use ELB hostname in the generated kubeconfig when using private DNS 2017-11-29 15:12:58 +02:00
chrislovecnm 1e418c3e13 more goimport updates 2017-11-04 10:03:02 -06:00
Justin Santa Barbara eddd73549c Use LB IP address for private dns 2017-04-25 01:32:27 -04:00
Justin Santa Barbara 2817e49bd6 Refactor kubeconfig building 2017-03-28 10:10:14 -04:00