Commit Graph

100 Commits

Author SHA1 Message Date
justinsb 27dd371c08 Refactor: Add context.Context to more VFS methods
This allows for propagation of opentelemetry traces.
2023-10-14 14:31:05 -04: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 32c3b86a40 Separate out a VFSKeystoreReader 2023-01-01 13:44:50 -08:00
justinsb 6c2edaee7e Add Context arg to vfs ReadFile
This is an "action" method, so should take a context.
2023-01-01 09:51:44 -05: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 ae074bbc6b VFS: Add context to CreateFile & WriteFile
As "request" methods, these should have context parameters.
2022-12-23 10:39:52 -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
Steven E. Harris 95f98896c7
promote-keypair: Block items without certificates
Forbid the "kops promote keypair" command from promoting a key pair
item that lacks an associated X.509 certificate.

Along with that prohibition, refuse to store a key set in a VFS whose
primary key pair lacks a certificate. This allows us to continue
storing such key pairs, but we will never allow them to serve as the
primary key pair within the containing key set.
2022-10-17 12:13:45 -04:00
Ciprian Hacman 407ee77041 Trim space around SSH public key 2022-08-24 08:32:01 +03:00
Ciprian Hacman ea7df00719 Run hack/update-gofmt.sh 2021-12-01 22:39:50 +02:00
John Gardiner Myers f4d2cb0437 Rename fields in v1alpha3 keyset API to fit acronym convention 2021-11-22 08:07:55 -08:00
John Gardiner Myers cd1aa1ab53 Simplify FindSSHPublicKeys() interface 2021-07-24 09:01:22 -07:00
John Gardiner Myers cddefc0a1f Simplify DeleteSSHCredential() interface 2021-07-24 09:01:21 -07:00
John Gardiner Myers 4bbed0339a Split out "delete sshpublickey" command 2021-07-24 09:01:21 -07:00
John Gardiner Myers d935a419f8 Simplify AddSSHPublicKey() interface 2021-07-24 08:59:57 -07:00
John Gardiner Myers 9dbf3479d6 Stop writing the certificate-only keyset.yaml 2021-07-11 11:16:11 -07:00
John Gardiner Myers a33a30a859 Refactor out some legacy interfaces 2021-07-10 23:23:12 -07:00
John Gardiner Myers 921d09523e Rename the "ca" keyset to "kubernetes-ca" 2021-07-03 17:33:13 -07:00
John Gardiner Myers 584aa56b6b Retain deleted keypairs 2021-06-24 19:03:29 -07:00
John Gardiner Myers 366210d189 Remove dead code 2021-06-21 21:45:55 -07:00
John Gardiner Myers 002a1f7fd3 Remove 'kops toolbox convert-imported' 2021-06-21 07:34:29 -07:00
John Gardiner Myers 1ed3619362 Improve the output of 'kops get keypairs' 2021-06-20 15:51:09 -07:00
Kubernetes Prow Robot e4eff07c81
Merge pull request #11809 from johngmyers/rotate-5
Include multiple cluster CAs in trust stores
2021-06-20 13:20:51 -07:00
John Gardiner Myers 5cc7a379ce Fix VFSCAStore.ListKeysets() 2021-06-19 16:58:29 -07:00
John Gardiner Myers e0d9259be1 Remove dead code 2021-06-19 10:50:52 -07:00
John Gardiner Myers 04df5afb2e Validate Keyset upon storage
Also treat the map key id as authoratative
2021-06-18 10:20:42 -07:00
John Gardiner Myers bceb901ce4 Fix merge error 2021-06-05 16:38:27 -07:00
John Gardiner Myers 15319ae432 Make serialization of keyset items stable 2021-06-05 16:38:27 -07: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
John Gardiner Myers 927b321e45 Make parsed Keyset type public 2021-06-05 16:38:24 -07:00
John Gardiner Myers b21370d118 Add PrimaryId field to KeysetSpec 2021-06-05 16:00:54 -07:00
John Gardiner Myers 91852b9313 Simplify keyset loading 2021-06-05 16:00:54 -07:00
John Gardiner Myers 30bc1c7b15 Fix upgrade of service-account key 2021-05-03 20:24:12 -07:00
John Gardiner Myers fdc61b4bdb Rename the service account key 2021-04-11 08:11:27 -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
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 2aa655a284 Continue refactoring cert issuance code 2020-06-04 10:26:42 -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 649062a4c1 Remove deprecated CertificatePool method 2020-05-09 22:47:45 -07:00
John Gardiner Myers ae667a94c5 Make funcs private and remove dead code 2020-05-09 22:39:19 -07:00
Ole Markus With 8bb078a4a8 Load the correct certificate before deleting 2020-04-20 21:32:22 +02:00
Kubernetes Prow Robot 11cec04bab
Merge pull request #7792 from tanjunchen/remove-some-unused-code
remove unused functions and simplify return str
2019-12-09 21:15:28 -08:00
feifei.zhang@huawei.com 48ebd260d3 fix golint failures 2019-11-24 16:38:58 +08:00
tanjunchen fa6d0130c8 remove unused functions and simplify return str 2019-10-15 23:54:10 +08: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