Commit Graph

3774 Commits

Author SHA1 Message Date
Rohith 404d940a2b Vendoring / Dependencies
Adding the dependecies for the templating
2017-09-08 20:30:21 +01:00
Rohith aaf6143a98 Toolbox Templating
Extending the current implementation of toolbox template to include multiple files and snippets. Note, i've removed the requirements for defaults as I think people should be forced to specifically pass them.

- fixing the vetting iseues to the method YamlToJson -> YAMLToJSON
- adding a safety check to ensure templates don't reference an unknown value
- extending the unit test to ensure the above works on main and snippets
- include the ability to specify multiple configuration files, useful for common.yaml and prod.yaml etc

Requested Changes - Toolbox Templating

Added the requested changes

- moved the templater into it's own package rather than using base util
- moved to using the sprig library for additional template function
- @note: i couldn't find a native way in sprig to do snippets, also the i've overloaded the indent as it appears to do the indent on all lines rather than on the newline, meaning i'd have to shift my first line back by the indent to get it to work, which seems ugly
2017-09-08 20:30:21 +01:00
Kubernetes Submit Queue e9e41c7f16 Merge pull request #3332 from alrs/makefile-clean
Automatic merge from submit-queue

Makefile clean

I'm interested in tightening up the kops Makefile.

This first step adds a "clean" recipe for deleting the .build directory and any files generated by go-bindatatool.

The two files generated by go-bindatatool get their own  recipes, so now make can keep track of when they have been built and will not need to regenerate.
2017-09-06 16:58:46 -07:00
Lars Lehtonen 63fc774ba9
Makefile clean marked as PHONY
Makefile move gobindata-tool dependency off individual bindata.go targets and on to the existing kops-gobindata target
2017-09-06 15:22:26 -07:00
Kubernetes Submit Queue 08410fdca9 Merge pull request #3314 from Pharb/fix_3313_ebs_optimization
Automatic merge from submit-queue

Check actual EbsOptimized status during cluster update

Fixes #3313.

It seems like the actual EbsOptimized state of the LaunchConfiguration is not read during `kops update cluster` and always trigges a modification of instance-groups that have `rootVolumeOptimization: true`.

If any meaningful test can be created for this, please let me know.
2017-09-06 12:13:46 -07:00
Kubernetes Submit Queue 31e7fbf082 Merge pull request #3286 from justinsb/keyset_object
Automatic merge from submit-queue

Create Keyset API type

A Keyset holds a set of keypairs or other secret cluster material.

It is a set to support rotation of keys.

This will allow us to store secrets on kops-server (and also is a step towards
separating where we manage secrets from how we communicate them to running
clusters, which will allow bare-metal or KMS)

Starting with just the API objects.
2017-09-06 11:36:14 -07:00
Kubernetes Submit Queue 05cf84dc3d Merge pull request #3299 from justinsb/extract_userdata
Automatic merge from submit-queue

Extract UserData from CloudFormation output during testing
2017-09-06 10:05:39 -07:00
Kubernetes Submit Queue 57cfd598d6 Merge pull request #3338 from justinsb/fix_gce_address_bug
Automatic merge from submit-queue

Fix RenderGCE issue on Address
2017-09-06 08:48:45 -07:00
Kubernetes Submit Queue 26ca2947a0 Merge pull request #3331 from andrewsykim/refactor-resource-tracker
Automatic merge from submit-queue

refactor resource tracker to be usable across packages

Puts ResourceTracker into its own package `pkg/resources/tracker` so it can be called from different packges without hitting import cycle e.g. `pkg/reources/digitalocean/resource.go`. This is so that we can group cloud specific code into their own packages (`pkg/resources/aws/`. `pkg/resources/gce/`, etc) rather than dump all the resource code from all clouds into `pkg/resources`
2017-09-06 05:49:15 -07:00
Justin Santa Barbara 8b168f5419 Fix RenderGCE issue on Address
Fix regression in #3292
2017-09-04 16:41:12 -04:00
Lars Lehtonen 7092411cb7
Makefile individual recipes for ${BINDATA_TARGETS} 2017-09-02 17:51:49 -07:00
Lars Lehtonen 475e877e80
Makefile clean 2017-09-02 17:35:31 -07:00
andrewsykim d9fa618de6 refactor resource tracker to be usable across packages 2017-09-02 17:37:21 -04:00
Kubernetes Submit Queue bd3daf41df Merge pull request #3324 from BlueMonday/master
Automatic merge from submit-queue

Fix broken link in aws.md

aws.md linked to advanced_create.md which was deleted in
https://github.com/kubernetes/kops/pull/2725. Its contents were added to
high_availability.md. Update the link to point to the relevant section in
high_availability.md.
2017-09-02 10:23:09 -07:00
Justin Santa Barbara 022529c470 Bump version to 1.7.1-beta.2
This also will let master work again without a custom nodeup (nodeup
changes)
2017-09-02 11:14:51 -04:00
Steven Santos Erenst a7d2907a52 Fix broken link in aws.md
aws.md linked to advanced_create.md which was deleted in
https://github.com/kubernetes/kops/pull/2725. Its contents were added to
high_availability.md. Update the link to point to the relevant section in
high_availability.md.

Signed-off-by: Steven Santos Erenst <stevenerenst@gmail.com>
2017-08-31 18:27:07 -07:00
Kubernetes Submit Queue 2fd0ddb484 Merge pull request #3318 from BradErz/fixes-#3317
Automatic merge from submit-queue

Fixes #3317 allowing to spawn flannel on all nodes in the cluster
2017-08-30 10:23:59 -07:00
Bradley cf1a907d0e Fixes #3317 allowing to spawn flannel on all nodes in the cluster 2017-08-30 14:58:01 +01:00
Kubernetes Submit Queue 155650eb82 Merge pull request #2504 from reactiveops/flag-watch-ingress
Automatic merge from submit-queue

Adds DNSControllerSpec and WatchIngress flag

This PR is in reference to #2496, #2468 and the issues referenced in there relating to use of the watch-ingress flag. 

This PR attempts to rectify this situation and gives users who want it, the option to turn on watch-ingress without forcing it on them. Also spits out a warning to the logs about potential side effects.

Includes notes in `docs/cluster_spec.md` to explain.
2017-08-29 23:31:57 -07:00
Kubernetes Submit Queue 47ed9e43ee Merge pull request #3307 from justinsb/misc_warnings
Automatic merge from submit-queue

Misc go vet fixes
2017-08-29 22:59:40 -07:00
Patrick Harböck 8db87d20cd Check actual EbsOptimized status during cluster update 2017-08-30 00:30:00 +02:00
Kubernetes Submit Queue 0e48620975 Merge pull request #3302 from gambol99/kubelet_options
Automatic merge from submit-queue

Additional Kubelet Options

This PR add additional options to the kubelet spec allowing users to set the --runtime-request-timeout and -volume-stats-agg-period

In related to issue https://github.com/kubernetes/kops/issues/3265
2017-08-29 14:32:55 -07:00
Kubernetes Submit Queue 6610153df9 Merge pull request #3303 from gambol99/kubelet_readonly
Automatic merge from submit-queue

Kubelet Readonly Port

The current implementation does not permit the user to specify the kubelet read-only port (which unset defaults to 10255). For security reasons we need this port switched off i.e. 0. This PR retains the default behavior but adds the readOnlyPort as an option for those whom need to override.

```shell
   podInfraContainerImage: gcr.io/google_containers/pause-amd64:3.0
   podManifestPath: /etc/kubernetes/manifests
+  readOnlyPort: 0
   registerSchedulable: false
   requireKubeconfig: true
```
And tested on the box
```shell
core@ip-10-250-34-23 ~ $ egrep -o 'read-only-port=[0-9]+' /etc/sysconfig/kubelet 
read-only-port=0
```
2017-08-29 13:59:04 -07:00
Kubernetes Submit Queue 39d8a7d700 Merge pull request #3306 from krishna-mk/patch-1
Automatic merge from submit-queue

Update aws.md pointing links to the k8s slack directly

pointing links to the k8s slack directly, single click enter to slack.
2017-08-29 08:10:46 -07:00
Kubernetes Submit Queue 2c0cc2050a Merge pull request #3301 from justinsb/baremetal_2
Automatic merge from submit-queue

baremetal: relax validation on subnets & networking
2017-08-29 07:35:28 -07:00
Justin Santa Barbara 69e3d760f4 Misc go vet fixes 2017-08-29 09:55:40 -04:00
Justin Santa Barbara e793562ee6 Extract UserData from CloudFormation output during testing
This gives us some sanity, so we can peek inside the base64 blob
2017-08-29 09:47:11 -04:00
Krishna m-Kumar 30a23fcdcd Update aws.md
pointing links to the k8s slack directly.
2017-08-29 15:21:21 +05:30
Rohith bf5e154225 Additional Kubelet Options
In related to issue https://github.com/kubernetes/kops/issues/3265
2017-08-29 08:44:25 +01:00
Eric Hole 673cdf6b5f Fixes merge conflicts 2017-08-28 19:10:21 -07:00
Rohith 9bbe569f3c Kubelet Readonly Port
The current implementaton does not permit the user to specify the kubelet read-only port (which unset defaults to 10255). Note security reasons we need this port switched off i.e. 0. This PR retains the default behaviour but adds the readOnlyPort as an options for those whom need to override.

   podInfraContainerImage: gcr.io/google_containers/pause-amd64:3.0
   podManifestPath: /etc/kubernetes/manifests
+  readOnlyPort: 0
   registerSchedulable: false
   requireKubeconfig: true
2017-08-28 20:53:36 +01:00
Justin Santa Barbara df8bbb2ff6 baremetal: relax validation on subnets & networking
For baremetal, we don't require that subnets or the network CIDR is
specified.
2017-08-28 11:31:52 -04:00
Kubernetes Submit Queue 327235a22c Merge pull request #3288 from justinsb/refactor_pki
Automatic merge from submit-queue

Refactor PKI classes into their own package
2017-08-28 07:01:27 -07:00
Kubernetes Submit Queue 7daf916349 Merge pull request #3280 from justinsb/missed_err_handling_aws_session
Automatic merge from submit-queue

Add missed error handling on session.NewSession
2017-08-28 06:26:38 -07:00
Kubernetes Submit Queue 1cba2a2346 Merge pull request #3292 from chrislovecnm/gce-change-to-interface
Automatic merge from submit-queue

Implementing GCE as an interface - modelling aws cloud provider

GCE and other cloud providers are structs instead of an interface.  AWS cloud provider implements an interface.  This PR refactors `GCECloud` as an interface, and creates `gceCloudImplementation`.

- [x] Need to e2e test
2017-08-28 05:54:57 -07:00
Kubernetes Submit Queue 307df97408 Merge pull request #3198 from blakebarnett/bdb/add_user_to_kubelet_systemd_unit
Automatic merge from submit-queue

Fixes reading /root/.docker/config.json on debian

Debian and probably others apparently don't automatically default to using the root account if it's not specified.

ref: https://github.com/kubernetes/kubernetes/issues/45487#issuecomment-312042754
2017-08-28 05:06:58 -07:00
Justin Santa Barbara 1ac08b5cf1 Add missed error handling on session.NewSession 2017-08-28 07:52:11 -04:00
Kubernetes Submit Queue f123138665 Merge pull request #3281 from justinsb/aws_session_always_verbose
Automatic merge from submit-queue

AWS: Always use verbose errors
2017-08-28 04:32:16 -07:00
Kubernetes Submit Queue 0c7268435e Merge pull request #3285 from justinsb/fix_space_in_rollingupdatecluster_help
Automatic merge from submit-queue

Fix space in rolling-update cluster help
2017-08-28 03:04:20 -07:00
Kubernetes Submit Queue 1aef760d86 Merge pull request #3272 from KashifSaadat/canal-custom-endpoint-to-host-action
Automatic merge from submit-queue

Allow user defined endpoint to host action for Canal

Adds ability to define `Networking.Canal.DefaultEndpointToHostAction` in the Cluster Spec. This allows you to customise the behaviour of traffic routing from a pod to the host (after calico iptables chains have been processed). `ACCEPT` is the default value and is left as-is.

`If you want to allow some or all traffic from endpoint to host, set this parameter to “RETURN” or “ACCEPT”. Use “RETURN” if you have your own rules in the iptables “INPUT” chain; Calico will insert its rules at the top of that chain, then “RETURN” packets to the “INPUT” chain once it has completed processing workload endpoint egress policy.`
2017-08-28 02:31:00 -07:00
Kubernetes Submit Queue fdce8b4b7b Merge pull request #3186 from KashifSaadat/limit-master-ec2-policy
Automatic merge from submit-queue

Limit the IAM EC2 policy for the master nodes

Related to: https://github.com/kubernetes/kops/pull/3158

The EC2 policy for the master nodes are quite open currently, allowing them to create/delete/modify resources that are not associated with the cluster the node originates from. I've come up with a potential solution using condition keys to validate that the `ec2:ResourceTag/KubernetesCluster` matches the cluster name.
2017-08-28 02:00:46 -07:00
chrislovecnm 0779fb6fc4 Implementing GCE as an inteface modelling aws cloud provider 2017-08-27 22:19:25 -06:00
Kubernetes Submit Queue 90edd15bed Merge pull request #3289 from justinsb/initializer_admission_controller
Automatic merge from submit-queue

Add Initializers admission controller
2017-08-27 20:07:58 -07:00
Justin Santa Barbara 4d52a7c9e6 Add Initializers admission controller
Also sync up Admission controllers with current default sets for 1.7 &
1.8
2017-08-27 20:53:57 -04:00
Justin Santa Barbara a16c8b1500 Refactor PKI classes into their own package
This will support generation of keys on the node.
2017-08-27 08:14:55 -04:00
Kubernetes Submit Queue 1e5cf2db52 Merge pull request #3270 from gambol99/secrets
Automatic merge from submit-queue

Kops Secrets on Nodes

The current implementation permits nodes access to /secrets/* though the nodes themselve do [not](https://github.com/gambol99/kops/blob/secrets/nodeup/pkg/model/secrets.go#L77-L79) require access. This PR changed the ACL on the iam policy to deny access for nodes to /secrets/*

- removed the /secrets from node iam policy
- ordered the list alphabetically 

one @question ... when would [this](https://github.com/gambol99/kops/blob/secrets/nodeup/pkg/model/secrets.go#L61-L74) be used? ... and given you can managed dockerconfig in k8s is this needed ...
2017-08-26 18:11:24 -07:00
Kubernetes Submit Queue 908722ac94 Merge pull request #3284 from georgebuckerfield/refactor-apiserver-templates
Automatic merge from submit-queue

Refactor apiserver templates

Fixes #3247 by moving the apiserver configuration out of template files and into code.
2017-08-26 17:39:19 -07:00
Kubernetes Submit Queue 8f23d570ee Merge pull request #3279 from justinsb/golang19
Automatic merge from submit-queue

Add go1.9 target to travis
2017-08-26 17:06:10 -07:00
Kubernetes Submit Queue f087cd200c Merge pull request #3283 from justinsb/update_go_ini
Automatic merge from submit-queue

Update go-ini dep to v1.28.2
2017-08-26 16:32:03 -07:00
Kubernetes Submit Queue 847f6defee Merge pull request #3277 from alrs/kops-command-fixes
Automatic merge from submit-queue

Kops command fixes

TrimSuffix() on defaultStateStore doesn't actually do anything, and there is an unused answer variable in the tests.
2017-08-26 14:40:02 -07:00