Commit Graph

44 Commits

Author SHA1 Message Date
John Gardiner Myers c68be498c6 Refactor NewAssetBuilder to not take a Cluster 2023-01-01 13:37:52 -08: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
Ciprian Hacman 8f79c9bd68 Replace fi.Bool/Float*/Int*/String() with fi.PtrTo() 2022-11-19 03:45:22 +02:00
Ole Markus With 16c60a1a0c Change mock region/subnet names to match mockCloud 2022-09-17 13:14:30 +02:00
Ciprian Hacman ea7df00719 Run hack/update-gofmt.sh 2021-12-01 22:39:50 +02:00
Steven E. Harris e39c985ee7 Honor OS update policy at InstanceGroup level too
As with the Cluster-level "spec.updatePolicy" field, add a similar
field at the InstanceGroup level, allowing overriding of the
cluster-level choice in each InstanceGroup.

Introduce a new value for the field ("automatic") as equivalent to the
default value applied when the field is absent. Honoring this new
value allows disabling automatic updates at the cluster level, but
then enabling them again for particular InstanceGroups. Without such a
positive affirmation, it's not possible to override a cluster-level
"external" policy at the InstanceGroup level, as there's no way to
specify positively that you want to recover the default
value. Instead, expressing the explicit "automatic" value is clear and
unambiguous.
2021-03-05 08:53:07 -05:00
Ole Markus With 1d922af364 Pass cloud into populate cluster 2020-09-24 07:22:13 +02:00
Kubernetes Prow Robot d97eb510dc
Merge pull request #9973 from olemarkus/cleanup-cloud
Build cloud outside of PerformAssignments
2020-09-22 23:42:08 -07:00
Ole Markus With 7bc17f4b1f Build cloud outside of PerformAssignments
We tend to build cloud, call some method, and then build cloud over
again. It would be easier to just pass the first one along.

Passing along cloud would also make it easier to mock cloud.
2020-09-23 07:54:28 +02:00
Ole Markus With 6797998ac1 Consolidate all buildMinimalClusters into a generic test cluster builder 2020-09-19 19:55:19 +02:00
Peter Rifel 7d9f0a06cf
Update API slice fields to not use pointers
This is causing problems with the Kubernetes 1.19 code-generator.
A nil entry in these slices wouldn't be valid anyways, so this should have no impact.
2020-08-24 07:46:38 -05: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 898f9fa198 Refactor and improve API validation 2020-06-05 11:43:42 -07:00
Ole Markus With eebb605c9c Remove as much of the classic networking logic as we can 2020-05-22 08:08:58 +02:00
Ole Markus With 74732487d5 Fix various tests that used masters without etcd members 2020-04-30 18:32:28 +02:00
John Gardiner Myers 8844b97fe3 Fix field names in api validation 2020-02-15 14:52:27 -08:00
John Gardiner Myers 8e2fe44391 Return more errors at once during Cluster validation 2020-01-30 22:04:19 -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
Justin Santa Barbara 54c499fe9b Introduce field to specify whether we are using etcd-manager or legacy mode
Splitting this out from the bigger bundle PR
2018-10-01 15:36:24 -07:00
Christian Kampka 1264ef8fce Add cluster spec validation
Since containerRegistry and containerProxy follow mutually exclusive
concepts, we need to ensure that they are not mistakenly used together.
2018-07-06 14:32:29 +02:00
chrislovecnm 1e418c3e13 more goimport updates 2017-11-04 10:03:02 -06:00
Justin Santa Barbara e08dfc6831 Fix tests: create helper function for PopulateClusterSpec 2017-09-24 00:09:09 -04:00
chrislovecnm ee17e6567c starting work on file assets builder 2017-08-18 13:04:12 -06:00
Justin Santa Barbara 9c5d4c2bdc Rework legacy validation to use field error helpers 2017-08-17 07:43:41 -04:00
Justin Santa Barbara 0115ece62d Remap pause image through our AssetBuilder 2017-07-22 00:35:37 -04:00
Justin Santa Barbara cb4641fea3 Code updates 2017-03-16 02:40:50 -04:00
Justin Santa Barbara 9e015285f8 validation: Validate we specify ids for all subnets
Move our validation to the apimachinery style.  And then add a
validation that we specify IDs either for all subnets or no subnets.
2017-01-24 12:38:52 -05:00
Justin Santa Barbara 3e3e2d16ed Move cloud interaction out of cmd/kops, into cloudup
It didn't belong in the "CLI layer"

Arguably we should move most of the create logic out of the CLI layer.
2017-01-20 11:16:02 -05:00
Justin Santa Barbara 1ef2c367c1 Reintroduce subnet assignemnt logic 2016-12-18 21:56:57 -05:00
Justin Santa Barbara fed68310fa Schema v1alpha2
* Zones are now subnets
* Utility subnet is no longer part of Zone
* Bastion InstanceGroup type added instead
* Etcd clusters defined in terms of InstanceGroups, not zones
* AdminAccess split into SSHAccess & APIAccess
* Dropped unused Multizone flag
2016-12-18 21:56:57 -05:00
Justin Santa Barbara c01c2af656 Mark ObjectMeta as a named field
This will work around some apimachinery bugs
(https://github.com/kubernetes/client-go/issues/8)
2016-12-14 22:26:57 -05:00
Justin Santa Barbara 60410eb95b Add unit test for imported cluster name
Fix #684
2016-10-18 21:24:13 -04:00
chrislovecnm 8fa2aac99f fixing more headers 2016-10-15 19:20:56 -06:00
Justin Santa Barbara 5ac44018d4 Move API to pkg/apis/kops
This is a breaking change for people using the API (sorry), but is
hopefully a simple search and replace:

"k8s.io/kops/upup/pkg/api"
 -> api "k8s.io/kops/pkg/apis/kops"

"k8s.io/kops/upup/pkg/api/registry"
 -> "k8s.io/kops/pkg/apis/kops/registry"

This is the "correct" place for it in the k8s API infrastructure - we
are working towards a versioned API here.
2016-10-11 08:52:54 -04:00
Justin Santa Barbara 767c9a6416 Fix tests; don't hit s3 until we need to 2016-10-07 01:38:44 -04:00
Justin Santa Barbara 13870c30c5 Prevent KubernetesVersion 1.4 with classic networking 2016-09-29 23:45:51 -04:00
Justin Santa Barbara 5f8d68ec85 Refactor shared packages into util directory 2016-09-25 18:27:09 -04:00
Justin Santa Barbara bb01cf6ddd Make AWSCloud an interface, mock it out in tests
Beginnings of a mock for the AWSCloud, so that hopefully we aren't
calling out to AWS at all in the tests.  We will likely start mocking
the actual EC2 APIs in future, but this seems a good starting point.

Fix #425
2016-09-24 15:52:52 -04:00
Justin Santa Barbara 38decdfc19 Fix tests broken by schema pointers 2016-09-08 11:54:54 -04:00
Justin Santa Barbara 9c3105b323 Make automatic upgrades optional
We add a `UpdatePolicy` field to the cluster spec

Also document how this feature was added.
2016-09-08 11:18:14 -04:00
Justin Santa Barbara 6aee9528e1 Validate that the cluster name is a valid DNS name
This should help users avoid the common mistake of just specifying the
name, not a fully-qualified domain name.

Fix #46
2016-08-15 01:21:12 -04:00
Justin Santa Barbara 31892fb08d Refactor tests for cleaner separation 2016-07-22 10:19:01 -04:00