Commit Graph

850 Commits (1dfd6ab0c11d95ef5d5352509c90fdab5ce4ed29)

Author SHA1 Message Date
Deyuan Deng 53e17f0fa5 Move Node.ExternalID to CloudNodes() 2015-03-03 19:37:46 -05:00
derekwaynecarr 8150649cf3 nodecontroller sync cloud was not setting external id in all code paths 2015-03-03 16:39:06 -05:00
Brendan Burns 843fa71f2b Merge pull request #4938 from tkulczynski/opfix
Fix waiting for GCE Operations
2015-03-02 10:47:46 -08:00
Tomek Kulczynski c4e786c701 Fix waiting for GCE Operations 2015-03-02 13:34:37 +01:00
Jerzy Szczepkowski e0548c3c03 Node controller supports disabling node probes.
Node controller supports disabling sending node probes and updating node statuses. Controlled by --sync_node_status flag. Resolves #4565.
2015-02-27 08:21:04 +01:00
Brendan Burns a862c37b29 Merge pull request #4383 from simon3z/instances-id
cloudprovider: add instance id to NodeSpec
2015-02-26 14:13:49 -08:00
Brendan Burns 7665b2668f Merge pull request #4770 from gmarek/client4
Add waiting for GCE operations to finish before proceeding in various functions.
2015-02-26 13:05:11 -08:00
Federico Simoncelli b942b1cb71 vagrant: report the nodes external id
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-02-26 20:52:13 +00:00
Federico Simoncelli bfb93a1928 openstack: report the nodes external id
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-02-26 20:52:13 +00:00
Federico Simoncelli ad6091be99 gce: report the nodes external id
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-02-26 20:52:13 +00:00
Federico Simoncelli 6b16f80dc1 aws: report the nodes external id
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-02-26 20:52:12 +00:00
Federico Simoncelli 1fc56aa023 ovirt: report the nodes external id
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-02-26 20:52:12 +00:00
Federico Simoncelli a450da4fd0 cloudprovider: add instance id to NodeSpec
Sometimes for external applications it is important to identify the
cloud instance of the nodes. Until this patch there was no contract
that the node name returned by List was also the unique identifier of
the cloud instance. This new API ensures that an external application
can reliably retrieve the relevant instance id of the nodes.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-02-26 20:52:12 +00:00
Federico Simoncelli 8844c06574 ovirt: fetch instance ip address from rest-api
This patch adds the support for returning the ip address of the instances
when reported by the guest-agent and from the rest-api.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-02-26 20:52:12 +00:00
Deyuan Deng d47fd48e55 Fix delete pod namespace; include error message when failed deleting pods 2015-02-25 20:03:22 -05:00
gmarek 0be5aa52e6 Apply comments 2015-02-25 08:06:45 +01:00
Justin Santa Barbara e457286983 Fix typo: registrying -> registering 2015-02-24 16:21:14 -08:00
gmarek 9996654c4c Add waiting for GCE operations to finish before proceeding in various
functions.
2015-02-24 14:32:21 +01:00
Mike Danese 5267127af1 api: rename conditionkind -> conditiontype 2015-02-23 22:13:21 -08:00
Tim Hockin 003c0986b4 Merge pull request #4478 from thommay/rackspace_cloud_base
Basic Rackspace cloud support
2015-02-17 13:41:31 -08:00
Thom May 8357e1521a Basic Rackspace cloud support
This enables all but Load Balancer support for the Rackspace public
cloud platform.
2015-02-17 10:59:40 +00:00
Salvatore Dario Minonne bc868b97b8 Fix typos in vagrant.go 2015-02-14 06:20:03 +01:00
Federico Simoncelli 45bc19beb5 ovirt: fix IPAddress lookup implementation
The ovirt instance is reported using its hostname. The IPAddress
implementation should lookup the ip (instead of parsing it as if
it was already an address).

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-02-11 17:47:26 -05:00
Deyuan Deng 4c6f6e0efc Refactor RegisterRetryCount, improve tests 2015-02-09 17:55:28 -05:00
Deyuan Deng 55b9944cfe Remove pods from failed node 2015-02-09 17:50:24 -05:00
Ravi Sankar Penta 3a5ef05f64 Make periodic sync nodes from cloud provider optional.
--sync_nodes=false gives user flexibility to add/remove nodes in the
cluster using REST api/kubectl cli and at the same time can use
cloud provider for other resources like persistent disks, etc.
2015-02-09 13:42:44 -08:00
Deyuan Deng 91b43a4b16 Merge pull request #4165 from smarterclayton/ignore_already_exists_errors_on_create_node
NodeController should tolerate when nodes already exist
2015-02-09 11:01:17 -05:00
Clayton Coleman 8c1206ca2d NodeController should tolerate when nodes already exist
During startup, if nodes have already been defined the controller
does not need to create them, just needs to keep them up to date.
When defining a static list, the controller would loop and fail
repeatedly if the node existed.

I don't know if we need to update the node during registration,
as long as the sync loop checks it later.
2015-02-08 21:44:08 -05:00
Deyuan Deng 08721e0a00 Populate node statu transition timestamp and reason 2015-02-06 18:42:41 -05:00
Mike Danese 14bfec92f2 rename probe.Status to probe.Result. 2015-02-05 15:49:58 -08:00
Deyuan Deng de51527a28 Lower case node names before registering 2015-02-03 18:07:12 -05:00
Deyuan Deng 53d44a6f5f Move hostip to sync status 2015-01-30 16:03:30 -05:00
Deyuan Deng c793c4f0ab Sync node status from node controller to master. 2015-01-29 23:17:15 -05:00
Victor Marmol 41bc0b301d Using metadata library for GCE metadata fetch.
Fixes #3343.
2015-01-28 09:20:25 -08:00
Fumitoshi Ukai 54f498acd5 cloudprovider/gce: use golang.org/x/oauth2
code.google.com/p/goauth2 is deprecated.
use golang.org/x/oauth2 instead.

hooks/prepare-commit-msg ignore Godeps
for sh's boilerplate check.
2015-01-16 12:17:52 +09:00
Deyuan Deng 0e13a24864 Post hostip for static machines 2015-01-09 19:38:10 -05:00
Deyuan Deng a2651bfcc7 Rename minioncontroller to nodecontroller 2015-01-08 14:52:10 -05:00
Daniel Smith 2050131b9a ParseOrDie -> MustParse; stop returning pointer 2015-01-07 15:21:35 -08:00
Daniel Smith 35f54addca Update more packages, tests, binaries for quantity
make etcd registry pass test
fix kubelet config for quantity
fix openstack for quantity
fix controller for quantity
fix last tests for quantity
wire into binaries
fix controller manager
fix build for 32 bit systems
2015-01-07 15:21:35 -08:00
Daniel Smith 7f49ba0dcf Put quantity into packages
kubelet, GCE, validation, client
2015-01-07 15:21:34 -08:00
Rohit Jnagal 62ecd5f3ff Fix few vet errors.
There are quite a few 'composite literal uses unkeyed fields' errors that I have kept out of this patch.
And there's a couple where vet just seems confused. These are the easiest ones.
2015-01-07 08:40:16 +00:00
Brendan Burns 1d58958db8 Fix the build. 2014-12-23 10:28:26 -08:00
Brendan Burns c7d3b12d43 Merge pull request #2051 from anguslees/openstack-provider
Openstack provider
2014-12-23 09:33:19 -08:00
Mike Foley c4e94efe16 Sticky Session Implementation
- Added process to cleanup stale session affinity records
- Automatically set cloud provided load balancer for sticky session if the service requires it - Note, this only works on GCE right now.
- Changed sessionAffinityMap a map to pointers instead of structs to improve performance
- Commented out cookie and protocol from sessionAffinityDetail to avoid confusion as it is not yet implemented.
2014-12-18 18:46:10 -05:00
Brendan Burns 1dcb025559 Handle PD already being attached to the machine. 2014-12-11 13:00:26 -08:00
Clayton Coleman d1d7505272 Rename client Minions->Nodes, select the correct path for v1beta3
Replaces the client public interface but leaves old references to "minions"
for a later refactor.  Selects the path "nodes" for v1beta3 and "minions"
for older versions.
2014-12-10 12:08:19 -05:00
Clayton Coleman 19379b5a38 Internal rename api.Minion -> api.Node 2014-12-10 12:08:18 -05:00
Deyuan Deng 2ecea9ce7b Query hostIP for instances 2014-12-05 23:26:33 -05:00
Richard Larocque 51efd38e75 Print SyncCloud errors
This small change would have saved me a lot of time while investigating
issue #2746.
2014-12-05 11:50:21 -08:00
Angus Lees a00f73c360 Add additional logging to openstack cloud provider
Turned out to be invaluable while debugging issues - I expect it will be
for others too.

Conflicts:
	pkg/cloudprovider/openstack/openstack.go
2014-11-26 16:41:11 +11:00
Angus Lees 5499981ad3 Implement TCPLoadBalancer OpenStack cloud provider
Also add a trivial implementation of Zones() too.

This only supports a single region/zone currently (the region where
kubernetes is running).
2014-11-26 16:40:35 +11:00
Angus Lees f184eebc9b Update openstack provider to gophercloud v1.0 API 2014-11-26 16:08:43 +11:00
Deyuan Deng a4e7604266 Merge pull request #2478 from smarterclayton/refactor_minion_to_match_v1beta3
Move the internal minion representation to match v1beta3
2014-11-20 21:37:43 -05:00
Clayton Coleman 156000ef6d Move the internal minion representation to match v1beta3
Moves to 'Spec' and 'Status' internally and removes duplicate
fields.  Moves Capacity into Spec and drops use of NodeResources
2014-11-20 20:53:08 -05:00
Tim Hockin ea960711ff Clean up error logs.
Use %v for errors, tidy some messages, make error messages start lowe-case
(as per go guidelines).  Just accumulated nits.
2014-11-21 09:45:26 +08:00
Deyuan Deng 762e9a0f57 Create a backgroud task to register static list of machines. 2014-11-20 20:22:32 -05:00
Brendan Burns 2aa52d043b Add external services v2 support. 2014-11-14 11:32:54 -08:00
Brendan Burns d3e48c9525 Add the container API to our dependencies.
Update google-api-go-client
2014-11-14 10:38:22 -08:00
Brendan Burns aabf1c3573 Add a clusters interface and GCE implementation. 2014-11-14 10:38:03 -08:00
Clayton Coleman 6d31c2bf8a util.EncodeJSON proven harmful, remove it everywhere
People were misusing EncodeJSON in tests when they should be using
runtime.EncodeOrDie(testapi.Codec(), obj).  Removing the potential
for cutting self on sharp objects.
2014-11-13 10:38:13 -05:00
Deyuan Deng 019b7fc74c Separate minion controller from master. 2014-10-30 20:24:15 -04:00
Clayton Coleman 644eb70085 Refactor tests to split ObjectMeta from TypeMeta 2014-10-24 11:22:21 -04:00
Clayton Coleman bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Clayton Coleman 6ae611aedd Write BoundPods to etcd instead of ContainerManifestList
Rename ManifestFactory -> BoundPodFactory and change the general structure
of the call to focus on BoundPod.
2014-10-16 19:29:08 -04:00
Daniel Smith 595d4b4abd Merge pull request #1676 from anguslees/openstack-provider
Add OpenStack cloud provider
2014-10-15 12:05:33 -07:00
Angus Lees fffa0527d4 Implement Instances interface for OpenStack cloud provider 2014-10-15 14:09:27 +11:00
Angus Lees a90d503fce Read user/pass from config and authenticate to OpenStack 2014-10-15 14:09:27 +11:00
Angus Lees a8ab55b413 Add skeleton for new OpenStack cloud provider 2014-10-15 13:52:12 +11:00
Deyuan Deng 2bd88d4544 Remove OnceAndForever util, create a Run() method on MinionController. 2014-10-14 18:47:42 -04:00
Deyuan Deng ec46e94dc2 Create MinionController to sync minions from cloudprovider (pkg cloudprovider/controller). 2014-10-14 18:45:25 -04:00
Tim Hockin d84816aaec Merge pull request #1709 from erictune/move_line
Fix format specifiers in Printf-type functions.
2014-10-09 20:40:35 -07:00
Eric Tune 800284164a Fix format specifiers in Printf-type functions. 2014-10-09 17:06:32 -07:00
Danny Jones 4ec25f3b81 Adds support for attaching GCEPersitentDisks
Adds GCEPersistentDisk volume struct
Adds gce-utils to attach disk to kubelet's VM.
Updates config to give compute-rw to every minion.
Adds GCEPersistentDisk to API
Adds ability to mount attached disks
Generalizes PD and adds tests.
PD now uses an pluggable API interface.
Unit Tests more cleanly separates TearDown and SetUp
Modify boilerplate hook to omit build tags
Adds Mounter interface; mount is now built by OS
TearDown() for PD now detaches disk on final refcount
Un-generalized PD; GCE calls moved to cloudprovider

Address comments.
2014-10-08 20:03:59 -07:00
Brendan Burns 1551b48347 Add a resource fit scheduler predicate. Set sensible defaults. 2014-10-03 15:09:59 -07:00
Clayton Coleman 4e56dafecc Introduce some default log verbosity control
Move a lot of common error logging into better buckets:

glog.Errorf() - Always an error
glog.Warningf() - Something unexpected, but probably not an error
glog.V(0) - Generally useful for this to ALWAYS be visible
            to an operator
            * Programmer errors
            * Logging extra info about a panic
            * CLI argument handling
glog.V(1) - A reasonable default log level if you don't want
            verbosity
            * Information about config (listening on X, watching Y)
            * Errors that repeat frequently that relate to conditions
              that can be corrected (pod detected as unhealthy)
glog.V(2) - Useful steady state information about the service
            * Logging HTTP requests and their exit code
            * System state changing (killing pod)
            * Controller state change events (starting pods)
            * Scheduler log messages
glog.V(3) - Extended information about changes
            * More info about system state changes
glog.V(4) - Debug level verbosity (for now)
            * Logging in particularly thorny parts of code where
              you may want to come back later and check it
2014-09-25 16:30:14 -04:00
Daniel Smith bb0cd95a83 fix non-gofmt'd things 2014-09-24 14:27:10 -07:00
Dawn Chen bdfd5045f3 Refactory a little bit. 2014-09-24 09:41:30 -07:00
Dawn Chen 4796120f70 Debugging to fix e2e testing issue 2014-09-23 17:35:50 -07:00
Ragnar Dahlén b548465adf Initial impl. of cloud provider interface for AWS 2014-09-11 22:28:56 +01:00
derekwaynecarr 0c20fffa06 No DNS in vagrant cross minions, need explicit IP as host 2014-09-11 13:38:50 -04:00
Federico Simoncelli 320fd528e2 Add support for oVirt cloud provider
This patch adds the initial support for the oVirt cloud provider.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2014-09-11 13:08:46 +00:00
Federico Simoncelli 6add1993c9 Support configurations for cloudproviders
Cloud providers may need specific configurations to run properly (e.g.
authentication parameters, uri, etc.).

This patch adds the simplest implementation for passing configurations
to cloudproviders: a new apiserver -cloud_config flag to specify the
path to an arbitrary configuration file.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2014-09-08 21:46:53 +00:00
derekwaynecarr 7f75aae8ab Improve vagrant hostname support across cluster 2014-09-05 16:39:39 -04:00
Vojtech Vitek (V-Teq) 42c656501c Add several missing pkg Godoc files
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-09-02 13:41:11 +02:00
Vojtech Vitek (V-Teq) 59f58cd043 Unify Godoc formatting, fix various typos
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-09-02 13:41:03 +02:00
Tim Hockin f7d54390f9 Make cloud providers be plugins 2014-08-20 20:16:41 -07:00
Tim Hockin eb9f3394c5 Move VagrantCloud into its own pkg 2014-08-20 20:16:41 -07:00
Tim Hockin b23bef26eb Move GCECloud into its own pkg 2014-08-20 20:16:41 -07:00
Tim Hockin 95e0be9a63 Move FakeCloud into its own pkg 2014-08-20 20:16:41 -07:00
derekwaynecarr 8df21b84a1 Add vagrant cloudprovider 2014-08-18 14:30:31 -04:00
Brendan Burns c27ab18481 Don't use zone for regional load balancers. 2014-08-05 11:38:33 -07:00
Brendan Burns 1d8407cf7d Don't hard code load balancer zone. 2014-08-05 11:38:33 -07:00
Brendan Burns c717b872a3 Don't hard code load balancer zone. 2014-07-28 15:54:16 -07:00
Yuki Sonoda (Yugui) 820b67e41f Fixes golint errors in pkg/cloudprovider 2014-07-10 20:46:56 +09:00
Brendan Burns d5516e4cdc Activate gce minion list. 2014-07-01 11:33:58 -07:00
Brendan Burns 93019b8563 Add a minion registry that is backed by a cloud provider. 2014-06-26 13:00:07 -07:00
Brendan Burns 420b2fdd57 Add support for populating host ip address. 2014-06-18 14:57:50 -07:00
Brendan Burns 57869958bc Add IP look up if the Cloud Provider is not null
Add Instance info to the Cloud Provider interface
2014-06-18 14:27:43 -07:00
Brendan Burns 31427d2d6f Add a fake cloud impl.
Update the service registry with unit tests.
2014-06-18 14:22:41 -07:00
Brendan Burns 2759b2367f Add load balancing support to services. 2014-06-17 12:37:39 -07:00