Commit Graph

69 Commits

Author SHA1 Message Date
Ciprian Hacman 8f703f5509 Fix behaviour for `kops export kubeconfig --internal` 2023-03-17 06:51:26 +02:00
John Gardiner Myers c051198f85 Pull pki.Keystore out of fi.KeystoreReader 2023-01-02 10:39:24 -08:00
justinsb 817c1e63b3 FindKeyset can return nil
We had missed a case in nodeup; add a Context argument to force us to
revisit the codepaths.
2022-12-24 16:12:21 -05:00
justinsb 90cbf75584 Context threading: more wiring
We're aiming to use this for testing immediately and better
logging/tracing in future, but to make the changes manageable breaking
them into a smaller series that don't directly achieve much.
2022-12-22 17:52:22 -05:00
Ciprian Hacman a23282b0f7 Always use load balancer address in kubeconfig 2022-12-16 08:53:22 +02:00
John Gardiner Myers 235aa61594 v1alpha3: move networking fields under networking 2022-12-02 19:19:59 -08:00
John Gardiner Myers 5fca16aa30 v1alpha3: Move API-related settings under API 2022-11-19 10:27:12 -08:00
John Gardiner Myers 8473e8b2e7 Stop making MasterInternalName configurable 2022-11-16 22:06:02 -08:00
John Gardiner Myers 64be690211 Update TopologySpec for v1alpha3 API 2022-11-06 09:10:38 -08:00
Ciprian Hacman 4e5ded6dc3 hetzner: Create cluster without DNS or Gossip 2022-10-27 11:29:37 +03:00
Ciprian Hacman dc98c74428 Move Gossip check to cluster struct 2022-10-21 09:48:07 +03:00
Ciprian Hacman 85026145a1 Always infer gossip DNS from cluster name 2022-10-02 12:54:37 +03:00
Ole Markus With 014f3d3e68 Remove CAS 1.19 2022-06-07 15:47:26 +02:00
Ole Markus With ce2e877aeb Remove bazel files from vendor 2022-04-12 13:29:03 +02:00
Jesse Haka b88d110f58 Drain OpenStack loadbalancers 2021-12-31 13:16:02 +02:00
John Gardiner Myers c5e1dea184 Remove code for no-longer-supported k8s version 2021-12-11 16:30:51 -08:00
justinsb e3ed4bb483 kops auth-plugin: need to clear any existing password / key
Otherwise the password / key is used in preference to the auth plugin,
so these are used even if they have expired.
2021-12-10 08:48:23 -05:00
Ciprian Hacman ea7df00719 Run hack/update-gofmt.sh 2021-12-01 22:39:50 +02:00
John Gardiner Myers be8933b577 Remove code for unsupported features 2021-08-28 13:49:55 -07:00
John Gardiner Myers 5a2aac4cfd Add "all" variants of key rotation commands 2021-07-10 05:51:31 -07:00
John Gardiner Myers f93ac8730a Include multiple CA certs in exported kubeconfigs 2021-06-21 07:36:33 -07:00
John Gardiner Myers 896330be88 Create fi.NewKeyset() 2021-06-20 14:09:46 -07:00
Alexander Block 6ae8d8cc9e Also set haveUserInfo=true in case --user was provided in "kops export kubecfg"
Without setting it to true, --user is completely ignored.
2021-06-16 09:36:47 +02:00
John Gardiner Myers fa77f8b964 Rename fi.Keystore.StoreKeypair to StoreKeyset 2021-06-05 16:38:26 -07:00
John Gardiner Myers 2300d89591 Rename pki.FindKeypair to FindPrimaryKeypair 2021-06-05 16:38:26 -07:00
John Gardiner Myers ed1f6ff79e Refactor StoreKeypair and AddCert 2021-06-05 16:38:25 -07:00
John Gardiner Myers 0364a3af25 Refactor FindKeypair interfaces 2021-06-05 16:38:24 -07:00
Justin Santa Barbara b60a45beba Only update kubeconfig user when we have user info
This preserves existing user configuration.

Issue #11537
2021-05-23 17:16:30 -04:00
John Gardiner Myers dd605fdbc3 Subsume StatusStore into fi.Cloud 2021-05-15 17:39:32 -07:00
Kubernetes Prow Robot e43efbe102
Merge pull request #10157 from rifelpet/acm-nlb
Setup a second NLB listener when an AWS ACM certificate is used
2020-11-10 10:36:41 -08:00
Peter Rifel 30f3d14979
Use the secondary ELB port when exporting kubecfg w/ --admin and sslCertificate 2020-11-06 11:09:37 -06:00
Peter Rifel aebe742291
Remove unused bearer token field from kubeconfig builder
```
$ grep -r KubeBearerToken . | wc -l
0
```
2020-11-06 08:07:55 -06:00
Ole Markus With 6797998ac1 Consolidate all buildMinimalClusters into a generic test cluster builder 2020-09-19 19:55:19 +02: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
John Gardiner Myers a96f7963a6 Pull cert issuance code up into fitasks.Keypair 2020-06-04 10:26:41 -07:00
John Gardiner Myers 8a6d29cd40 Remove support for reading legacy-format keypairs 2020-05-20 13:28:13 -07:00
John Gardiner Myers 704f41dbf1 Use supported kubernetes versions in tests 2020-02-21 22:24:29 -08:00
mikesplain 9e55b8230a Update copyright notices
Also cleans some white spaces
2019-09-09 14:47:51 -04:00
Kashif Saadat 3b9305f002 Canal v3.7.2 for k8s v1.12+ 2019-05-13 14:57:42 +01:00
Justin SB 76d03b3f71
Generated files: glog -> klog 2019-05-06 12:56:03 -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
Srikanth e4cabe7b5f Format GO code 2019-04-26 14:26:20 -05:00