Commit Graph

87 Commits

Author SHA1 Message Date
John Gardiner Myers 2420991954 Determine default API access method by IG subnet type 2023-07-18 22:21:05 -07:00
Kubernetes Prow Robot 4b5519db33
Merge pull request #15664 from justinsb/auth_cache_tests
Add golden-output test for cacheFilePath
2023-07-18 17:12:03 -07:00
Kubernetes Prow Robot e18eaae082
Merge pull request #15663 from johngmyers/vfscontext
More VFSContext refactoring
2023-07-18 14:48:03 -07:00
justinsb 81f35513dc Add golden-output test for cacheFilePath
Just so we can verify that the value looks as we expect it to.  The
actual value doesn't much matter, but it's still helpful for us to be
able to see changes to the value in the PR workflow.
2023-07-18 12:38:45 -04:00
Kubernetes Prow Robot 55c64ca970
Merge pull request #15547 from norseto/auth_cache_filename_fix
Fix long auth helper cache file name
2023-07-18 09:31:09 -07:00
John Gardiner Myers 1358851c7d Get VFSContext from caller in NewAssetBuilder() 2023-07-18 08:49:06 -07:00
John Gardiner Myers 76ed6b9e27 Get VFSContext from caller in ValidateCluster() 2023-07-17 22:20:57 -07:00
John Gardiner Myers 245cd64a3a Get VFSContext from caller in LoadChannel() 2023-07-17 21:45:43 -07:00
Norihiro Seto 7bc1ac648e
Restore sanitizedName with maximum length limitation 2023-07-18 12:44:30 +09:00
Norihiro Seto 00a0deb8e6
Update to use sha224 and base62 text. 2023-07-09 21:52:17 +09:00
Norihiro Seto 969bd8f0b5
fix: update header 2023-06-27 20:48:16 +09:00
Norihiro Seto ce1169cae8
Fix long auth helper cache file name 2023-06-23 20:40:09 +09:00
John Gardiner Myers c051198f85 Pull pki.Keystore out of fi.KeystoreReader 2023-01-02 10:39:24 -08:00
John Gardiner Myers c68be498c6 Refactor NewAssetBuilder to not take a Cluster 2023-01-01 13:37:52 -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 ba59d65bc9 Wire up context from cobra in cmd/kops
Removes a lot of context.TODO() calls.
2022-12-22 17:52:27 -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
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
Ciprian Hacman 8f79c9bd68 Replace fi.Bool/Float*/Int*/String() with fi.PtrTo() 2022-11-19 03:45:22 +02:00
Ole Markus With c7cfcd1af8 User IG without image should be allowed
This is technically a regression. kOps had the behavior where empty image meant use from channel. But this got removed due to strict validation of user input
2022-09-17 17:44:48 +02:00
Ole Markus With 2bb0b16e53 Rename ClientSet to KopsClient in cmd factory interface 2022-07-30 20:41:13 +02:00
Ole Markus With 9eca9c882b Add flag to version showing the kops 'server' version 2022-04-30 15:57:46 +02:00
Ole Markus With ce2e877aeb Remove bazel files from vendor 2022-04-12 13:29:03 +02:00
Ole Markus With aa493a3273 Validate IGs more strictly after defaults have applied
This commit will ensure IGs are validated in clientset prior to write similar to clusters. Also introduces strict flag similar to cluster, which only validate values where we have defaults after defaults have been applied.
2021-12-20 10:03:04 +01:00
Ciprian Hacman ea7df00719 Run hack/update-gofmt.sh 2021-12-01 22:39:50 +02:00
John Gardiner Myers 837176340d Change sense of Cilium DisableMasquerade in v1alpha3 2021-11-25 18:45:13 -08:00
John Gardiner Myers b9ac79ec6e Rename fields in v1alpha3 networking API to fit acronym convention 2021-11-22 08:07:55 -08:00
John Gardiner Myers 18d58f900c Support setting empty maps and structs 2021-11-13 19:10:29 -08:00
Eng Zer Jun 425173ae9f
refactor: move from io/ioutil to io and os packages
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-11-12 15:37:18 +08:00
John Gardiner Myers ebe05e10a5 Remove unused fields cluster APIs 2021-10-03 12:28:20 -07:00
John Gardiner Myers be8933b577 Remove code for unsupported features 2021-08-28 13:49:55 -07:00
John Gardiner Myers abd95d14f4 Implement completion for "kops get clusters" 2021-07-19 14:58:41 -07:00
John Gardiner Myers cac4d2c080 More "kops set" cleanup 2021-07-14 13:09:08 -07:00
John Gardiner Myers be30a61983 Move EditorEnvs to pkg 2021-07-11 23:05:06 -07:00
John Gardiner Myers e3451030ff Implement completion for "kops rolling-update cluster" 2021-07-03 22:57:15 -07:00
John Gardiner Myers 22b8ad2d48 Implement completion for "kops create keypair" 2021-06-28 23:26:47 -07:00
John Gardiner Myers 26a5aa179b Improve completion for kops root command 2021-06-27 21:51:15 -07:00
John Gardiner Myers 76fc012f96 Allow unsetting fields from the command line 2021-06-14 08:52:32 -07:00
John Gardiner Myers 3cf8234d01 Cilium: disable masquerade by default when in ENI IPAM mode 2021-06-13 21:36:56 -07:00
John Gardiner Myers e0915887ed Move asset copying out of apply_cluster 2021-06-05 21:17:50 -07:00
John Gardiner Myers dd605fdbc3 Subsume StatusStore into fi.Cloud 2021-05-15 17:39:32 -07:00
John Gardiner Myers 1dab19f499 Require fi.Cloud to implement kops.StatusStore 2021-05-15 15:54:38 -07:00
bjhaid 88ed9f68bd Add support for configuring Cilium enable-host-reachable-services.
After upgrading Cilium to 1.8 via kops one of our clusters had a total
outage due to cilium reporting errors as below:

```
level=error msg="endpoint regeneration failed" containerID= datapathPolicyRevision=0 desiredPolicyRevision=1 endpointID=592 error="Failed to load tc filter: exit status 1" identity=40147 ipv4= ipv6= k8sPodName=/ subsys=endpoint
```

upon searching Cilium slack we found the below thread:

https://cilium.slack.com/archives/C1MATJ5U5/p1616400216167600

which recommended setting `enable-host-reachable-services` to true will
address the problems. We set the field and it fixed our issues too,
however we observed that kops does not have a means to configure this
hence this PR.

We will like to have this backported after it has been merged.
2021-04-27 12:49:27 -05:00
Bharath Vedartham 49f3ab0703 Throw error if path being set by kops set is not present in struct 2021-01-31 12:00:42 +05:30
Bharath Vedartham 515fbf1c1c set_cluster: Remove unused instanceGroup parameter from setClusterFields 2021-01-30 14:31:49 +05:30
Gabe Jackson 45afe1d968 Switch validation to CrossValidateInstanceGroup 2021-01-25 01:05:07 -05:00
Gabe Jackson e90050f134 Add `set instancegroup` command
This change adds a new command and functionality for updating
instance group configuration via command line arguments. This
behavior mimics the `set cluster` command.
2021-01-15 12:19:26 -05:00
Kenji Kaneda a61caea8d2 Add Azure support
This commit contains all changes required to support Azure
(https://github.com/kubernetes/kops/issues/3957).
2020-12-21 08:27:54 -08:00
Christian Joun e91ed11449
Implement API load balancer class with NLB and ELB support on AWS (#9011)
* refactor TargetLoadBalancer to use DNSTarget interface instead of LoadBalancer

* add LoadBalancerClass fields into api

* make api machinery

* WIP: Implemented API loadbalancer class, allowing NLB and ELB support on AWS for new clusters.

* perform vendoring related tasks and apply fixes identified from hack/

dissallow spotinst + nlb
remove reflection in status_discovery.go
Add precreated additional security groups to the Master nodes in case of NLB
Remove support for attaching individual instances to NLB; only rely on ASG attachments
Don't specify Classic loadbalancer in GCE integration test

* add utility function to the kops model context to make LoadBalancer comparisons simpler

* use DNSTarget interface when locating DNSName of API ELB

* wip: create target group task

* Consolidate TargetGroup tasks

* Use context helper for determining api load balancer type to avoid nil pointers

* Update NLB creation to use target group ARN from separate task rather than creating a TG in-line

* Address staticcheck and bazel failures

* Removing NLB Attachment tasks because they're not used since we switched to defining them as a part of the ASGs

* Address PR review feedback

* Only set LB Class field for AWS clusters, fix nil pointer

* Move target group attributes from NLB task to TG task, removing unused attributes

* Add terraform and cloudformation support for NLBs, listeners, and target groups

* Update integration test for NLB support

* Fix NLB name format to pass terraform validation

* Preserve security group rule names when switching ELB to NLB to reduce destructive terraform changes

* Use elbv2 enums and address some TODOs

* Set healthcheck values in target group

* Find TG tags, fix NLB name detection

* Fix more spurious changes reported by lifecycle integration test

* Fix spotinst validation, more code cleanup

* Address more PR feedback

* ReconcileTargetGroups unit test + more code simplification

* Addressing PR feedback Renaming task 1. awstasks.LoadBalancer -> awstasks.ClassicLoadBalancer

* Addressing PR feedback Renaming task: ELBName() -> CLBName() / LinkToELB() -> LinkToCLB()

* Addressing PR feedback: Various text changes

* fix export of kubecfg

* address TargetGroup should have the same name as the NLB

* should address error when fetching tags due to missing ARN

* Update expected and crds

* Add feature table to NLB docs

* Address more feedback and remove some TODOs that arent applicable anymore

* Update spotinst validation error message

Co-authored-by: Peter Rifel <pgrifel@gmail.com>
2020-11-02 05:28:52 -08:00