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

fix hostnames in kops openstack #6442

Merged
merged 4 commits into from
Feb 18, 2019
Merged

Conversation

zetaab
Copy link
Member

@zetaab zetaab commented Feb 3, 2019

fixes #6441

% openstack server list
+--------------------------------------+-------------------------------+--------+-----------------------------------------+--------+----------+
| ID                                   | Name                          | Status | Networks                                | Image  | Flavor   |
+--------------------------------------+-------------------------------+--------+-----------------------------------------+--------+----------+
| 83df9825-22cd-49c0-8f0e-ff90a7372832 | bastions-1.oma.k8s.local      | ACTIVE | oma.k8s.local=10.1.1.196, 192.168.1.206 | ubuntu | ds1G     |
| a83c3663-a07e-4cca-a8d2-53e4905d1259 | nodes-1.oma.k8s.local         | ACTIVE | oma.k8s.local=10.1.1.156                | ubuntu | m1.small |
| e3845789-1c6c-40ac-bd51-dbfd29df9051 | master-nova-2-1.oma.k8s.local | ACTIVE | oma.k8s.local=10.1.2.218                | ubuntu | m1.small |
| 0ca71cd0-b0fb-41fc-8628-296f3007e5b8 | master-nova-1-1.oma.k8s.local | ACTIVE | oma.k8s.local=10.1.1.12                 | ubuntu | m1.small |
| d4fed7f6-21aa-484a-8e1b-733eadb14060 | master-nova-3-1.oma.k8s.local | ACTIVE | oma.k8s.local=10.1.1.225                | ubuntu | m1.small |
+--------------------------------------+-------------------------------+--------+-----------------------------------------+--------+----------+

Kubernetes: (these will be fixed if openstack cloudprovider will start parsing hostnames correctly)

% kubectl get nodes
NAME                            STATUS     ROLES     AGE       VERSION
master-nova-1-1.oma.k8s.local   Ready      master    48s       v1.11.6
master-nova-2-1.oma.k8s.local   Ready      master    27s       v1.11.6
master-nova-3-1.oma.k8s.local   Ready      master    45s       v1.11.6
nodes-1.oma.k8s.local           NotReady   node      2s        v1.11.6

and hostnames are now in machines like bastions-1, nodes-1, master-nova-2-1 and so on.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 3, 2019
Copy link
Contributor

@chrisz100 chrisz100 left a comment

Choose a reason for hiding this comment

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

/lgtm
/assign @mikesplain @justinsb

As discussed on slack that’s a rather high prio pr as it allows external ccm to function as addon.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 3, 2019
@zetaab
Copy link
Member Author

zetaab commented Feb 5, 2019

/hold

Waiting for kubernetes/cloud-provider-openstack#467

Also I am thinking that could we just replace . with - in hostname.

Then the hostnames in linux should work, and in openstack also. Example: master-nova-1-1.oma.k8s.local -> master-nova-1-1-oma-k8s-local

@chrisz100 what you think? Then that PR to upstream openstack is not needed if we just replace dots

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 5, 2019
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 5, 2019
@zetaab
Copy link
Member Author

zetaab commented Feb 5, 2019

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 5, 2019
@drekle
Copy link
Contributor

drekle commented Feb 7, 2019

Been testing with a variety of helm charts. There are a number which have podAntiAffinity rules which require this PR to work correctly.

@zetaab
Copy link
Member Author

zetaab commented Feb 7, 2019

and this PR is must if we want to get external CCM working. (I am working with that in another PR)

@zetaab
Copy link
Member Author

zetaab commented Feb 16, 2019

/test pull-kops-e2e-kubernetes-aws

@zetaab
Copy link
Member Author

zetaab commented Feb 16, 2019

/sig openstack

@k8s-ci-robot k8s-ci-robot added the area/provider/openstack Issues or PRs related to openstack provider label Feb 16, 2019
@chrisz100
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 18, 2019
@zetaab
Copy link
Member Author

zetaab commented Feb 18, 2019

@dims could you approve if ok?

@dims
Copy link
Member

dims commented Feb 18, 2019

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, zetaab

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 Feb 18, 2019
@k8s-ci-robot k8s-ci-robot merged commit ced14aa into kubernetes:master Feb 18, 2019
Deleter: func(cloud fi.Cloud, r *resources.Resource) error {
return cloud.(openstack.OpenstackCloud).DeleteInstanceWithID(r.ID)
},
val, ok := instance.Metadata["k8s"]
Copy link
Member

Choose a reason for hiding this comment

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

FYI on AWS we use kubernetes.io/cluster/<cluster-name>=shared and kubernetes.io/cluster/<cluster-name>=owned. <cluster-name> can be anything but for kops we use the name of the cluster you create.

We originally had KubernetesCluster=<cluster-name> but this made it hard to have shared resources.

Copy link
Member

Choose a reason for hiding this comment

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

(and it looks like GCP is using kubernetes.io/cluster-id=<cluster-name>, but only in the description field for GCLBs https://github.com/kubernetes/kubernetes/blob/1c557b9ce866d67ec6088f37058e8594b89606ee/pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go#L862

@zetaab zetaab deleted the fixhostnames branch September 21, 2019 07:31
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/openstack Issues or PRs related to openstack 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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hostname is not defined correctly in machines
7 participants