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

[DigitalOcean] Fix DO Tag issue #11102

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

srikiz
Copy link
Contributor

@srikiz srikiz commented Mar 21, 2021

We add tags to the droplets in order to match the correct volume that needs to be attached. The volumes for etcd-main and etcd-events are also tagged and the etcd-manager does this mapping.

Due to this change, this was breaking DO droplets to volume matching logic and the new clusters wasn't coming up.

FYI - @rifelpet @timoreimann

I can work on a better logic going further, but would need this change to go in so I can continue to test the e2e tests.

Please let me know your thoughts, thanks !

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 21, 2021
@k8s-ci-robot k8s-ci-robot added the area/provider/digitalocean Issues or PRs related to digitalocean provider label Mar 21, 2021
@rifelpet
Copy link
Member

Ah, nice find! I believe we only prepend etcd- if the etcd member name starts with a digit. Should we add that same logic here as well?

cc @hakman

@hakman
Copy link
Member

hakman commented Mar 23, 2021

@rifelpet @srikiz We should keep the logic somehow, otherwise it will match only some of the cases.

@srikiz
Copy link
Contributor Author

srikiz commented Mar 23, 2021

@hakman @rifelpet - In the case of DO, we don't actually have an availability zone. All the master droplets will be deployed in the same region. (example for torento region is tor1). So for a master count of 3, etcd-cluster names that gets into the trim function would be master-1-tor1-1, master-1-tor1-2, master-1-tor1-3. And the output would be "etcd-1", "etcd-2", "etcd-3". Previously the output was always "1" or "2" or "3" based on the number of masters.

For the test case examples as mentioned here it always results in the below output based on the above scenario. So I think it's very safe to assume the name as "etcd-1" or "etcd-2" etc. in DO case.

		{
			Input:  []string{"us-test-1a-1", "us-test-1a-2", "us-test-1a-3"},
			Output: []string{"etcd-1", "etcd-2", "etcd-3"},
		},

Please let me know if this helps..
FYI - @timoreimann

@hakman
Copy link
Member

hakman commented Mar 23, 2021

@srikiz Can it be a single master droplet? How does it look then?

@srikiz
Copy link
Contributor Author

srikiz commented Mar 23, 2021

@hakman - for a single master cluster it looks like below.
`
etcdClusters:

  • cpuRequest: 200m
    etcdMembers:
    • instanceGroup: master-tor1-1
      name: etcd-1
      memoryRequest: 100Mi
      name: main
  • cpuRequest: 100m
    etcdMembers:
    • instanceGroup: master-tor1-1
      name: etcd-1
      memoryRequest: 100Mi
      name: events
      `

For a multi-master cluster, it looks as below -
`etcdClusters:

  • cpuRequest: 200m
    etcdMembers:
    • instanceGroup: master-tor1-1
      name: etcd-1
    • instanceGroup: master-tor1-2
      name: etcd-2
    • instanceGroup: master-tor1-3
      name: etcd-3
      memoryRequest: 100Mi
      name: main
  • cpuRequest: 100m
    etcdMembers:
    • instanceGroup: master-tor1-1
      name: etcd-1
    • instanceGroup: master-tor1-2
      name: etcd-2
    • instanceGroup: master-tor1-3
      name: etcd-3
      memoryRequest: 100Mi
      name: events`

@hakman
Copy link
Member

hakman commented Mar 23, 2021

Then I think the change should be ok. What do you think @rifelpet ?

Copy link
Member

@rifelpet rifelpet left a comment

Choose a reason for hiding this comment

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

agreed. lets give it a shot 👍🏻

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 23, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rifelpet

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 23, 2021
@k8s-ci-robot k8s-ci-robot merged commit 1bf4fd7 into kubernetes:master Mar 23, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.21 milestone Mar 23, 2021
k8s-ci-robot added a commit that referenced this pull request Mar 24, 2021
…-upstream-release-1.20

Automated cherry pick of #11102: Fix DO Tag issue
@srikiz srikiz deleted the Fix-DO-Tag-Index-Match-Issue branch October 25, 2021 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/digitalocean Issues or PRs related to digitalocean provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants