Skip to content
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

[Digital Ocean] Promote to Beta #10312

Merged
merged 7 commits into from
Dec 4, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions docs/getting_started/digitalocean.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Getting Started with kOps on DigitalOcean

**WARNING**: digitalocean support on kOps is currently **alpha** meaning it is in the early stages of development and subject to change, please use with caution.
**WARNING**: digitalocean support on kOps promoted to **beta** currently meaning it is subject to change, so please use with caution.

## Requirements

Expand All @@ -23,9 +23,6 @@ export DIGITALOCEAN_ACCESS_TOKEN=<access-token> # where <access-token> is the a
export S3_ENDPOINT=nyc3.digitaloceanspaces.com # this can also be ams3.digitaloceanspaces.com or sgp1.digitaloceanspaces.com depending on where you created your Spaces bucket
export S3_ACCESS_KEY_ID=<access-key-id> # where <access-key-id> is the Spaces API Access Key for your bucket
export S3_SECRET_ACCESS_KEY=<secret-key> # where <secret-key> is the Spaces API Secret Key for your bucket

# this is required since DigitalOcean support is currently in alpha so it is feature gated
export KOPS_FEATURE_FLAGS="AlphaAllowDO"
```

## Creating a Single Master Cluster
Expand All @@ -46,8 +43,21 @@ kops update cluster my-cluster.example.com --yes
kops create cluster --cloud=digitalocean --name=my-cluster.example.com --image=debian-9-x64 --networking=flannel --zones=ams3 --ssh-public-key=~/.ssh/id_rsa.pub --node-size=c-4
kops update cluster my-cluster.example.com --yes

# to validate a cluster
kops validate cluster my-cluster.example.com

# to delete a cluster
kops delete cluster my-cluster.example.com --yes

# to export kubecfg
* follow steps as mentioned [here](https://kops.sigs.k8s.io/cli/kops_export_kubecfg/#examples).

# to update a cluster
* follow steps as mentioned [here](https://kops.sigs.k8s.io/operations/updates_and_upgrades/#manual-update)

# to install csi driver for DO block storage
* follow steps as mentiond [here](https://github.com/digitalocean/csi-digitalocean#installing-to-kubernetes)

```

## Creating a Multi-Master HA Cluster
Expand All @@ -67,7 +77,7 @@ kops delete cluster dev5.k8s.local --yes

kOps for DigitalOcean currently does not support these features:

* rolling update for instance groups
* kops terraform support for DO

# Next steps

Expand Down
6 changes: 0 additions & 6 deletions upup/pkg/fi/cloudup/apply_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ const (
)

var (
// AlphaAllowDO is a feature flag that gates DigitalOcean support while it is alpha
AlphaAllowDO = featureflag.New("AlphaAllowDO", featureflag.Bool(false))
// AlphaAllowGCE is a feature flag that gates GCE support while it is alpha
AlphaAllowGCE = featureflag.New("AlphaAllowGCE", featureflag.Bool(false))
// AlphaAllowALI is a feature flag that gates aliyun support while it is alpha
Expand Down Expand Up @@ -392,10 +390,6 @@ func (c *ApplyClusterCmd) Run(ctx context.Context) error {

case kops.CloudProviderDO:
{
if !AlphaAllowDO.Enabled() {
return fmt.Errorf("DigitalOcean support is currently (very) alpha and is feature-gated. export KOPS_FEATURE_FLAGS=AlphaAllowDO to enable it")
}

if len(sshPublicKeys) == 0 && (c.Cluster.Spec.SSHKeyName == nil || *c.Cluster.Spec.SSHKeyName == "") {
return fmt.Errorf("SSH public key must be specified when running with DigitalOcean (create with `kops create secret --name %s sshpublickey admin -i ~/.ssh/id_rsa.pub`)", cluster.ObjectMeta.Name)
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1408,4 +1408,4 @@ sigs.k8s.io/yaml
# k8s.io/cli-runtime => k8s.io/cli-runtime v0.20.0-beta.2
# k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.20.0-beta.2
# k8s.io/code-generator => k8s.io/code-generator v0.20.0-beta.2
# github.com/gophercloud/gophercloud => github.com/gophercloud/gophercloud v0.11.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this change should be reverted in order to make the verify-gomod job pass

# github.com/gophercloud/gophercloud => github.com/gophercloud/gophercloud v0.11.0