-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create cluster requirements for DigitalOcean #3248
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
Copyright 2016 The Kubernetes Authors. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package resources | ||
|
||
func (c *ClusterResources) listResourcesDO() (map[string]*ResourceTracker, error) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is temporary, only to get cluster state creation working, going to work on a refactor to make this work better |
||
return nil, nil | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
KubeAPIServer: | ||
CloudProvider: external | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are trying to move this logic to https://github.com/kubernetes/kops/blob/master/pkg/model/components/apiserver.go There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noted. It was really difficult trying to figure out who to change the CloudProvider flag for kube-apiserver, I'll follow up with this in another PR There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Created an issue to clean this up for all clouds #3253 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -335,7 +335,6 @@ func (c *ApplyClusterCmd) Run() error { | |
return fmt.Errorf("DigitalOcean support is currently (very) alpha and is feature-gated. export KOPS_FEATURE_FLAGS=AlphaAllowDO to enable it") | ||
} | ||
|
||
// this is a no-op for now, add tasks to this list as more DO support is added | ||
l.AddTypes(map[string]interface{}{ | ||
"volume": &dotasks.Volume{}, | ||
}) | ||
|
@@ -649,7 +648,8 @@ func (c *ApplyClusterCmd) Run() error { | |
BootstrapScript: bootstrapScriptBuilder, | ||
Lifecycle: clusterLifecycle, | ||
}) | ||
|
||
case kops.CloudProviderDO: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might be good to have a |
||
// DigitalOcean tasks will go here | ||
case kops.CloudProviderGCE: | ||
{ | ||
gceModelContext := &gcemodel.GCEModelContext{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,6 +66,10 @@ func buildCloudupTags(cluster *api.Cluster) (sets.String, error) { | |
{ | ||
tags.Insert("_aws") | ||
} | ||
case "digitalocean": | ||
{ | ||
tags.Insert("_do") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hopefully we'll be rid of these tags soon, but I agree that for now we should add them - more logically coherent to be consistent with the other providers, doesn't create a lot more work |
||
} | ||
case "vsphere": | ||
{ | ||
tags.Insert("_vsphere") | ||
|
@@ -147,6 +151,9 @@ func buildNodeupTags(role api.InstanceGroupRole, cluster *api.Cluster, clusterTa | |
if clusterTags.Has("_aws") { | ||
tags.Insert("_aws") | ||
} | ||
if clusterTags.Has("_do") { | ||
tags.Insert("_do") | ||
} | ||
|
||
return tags, nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably a good idea to check for a length limit as well - that's the other one that is pretty common. We have this code for ELBs: https://github.com/kubernetes/kops/blob/master/pkg/model/context.go#L75-L91 .