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

Return meta information about the cluster #186

Closed
krisnova opened this issue Dec 19, 2018 · 6 comments
Closed

Return meta information about the cluster #186

krisnova opened this issue Dec 19, 2018 · 6 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@krisnova
Copy link
Contributor

krisnova commented Dec 19, 2018

Right now the call to context.Create only returns a possible error

// Create provisions and starts a kubernetes-in-docker cluster
func (c *Context) Create(cfg *config.Config, retain bool, wait time.Duration) error {
     // ...
}

If you drill down in to the logic contained in the method you find that we eventually reach provisionControlPlane

// provisionControlPlane provisions the control plane node
// and the cluster kubeadm config
func (cc *createContext) provisionControlPlane(
	nodeName string,
) (kubeadmConfigPath string, err error) {
     // ...
}

In the provisionControlPlane method there is valuable information being lost such as the ephemeral port that the container has listening for the API server.

If using KIND to write a unit test, being able to define the port to test on is critical.

Can I please PR a feature that allows for this valuable information to be captured from a calling piece of code?

I think we can do it by adding a new return type to context.Create or caching the information at the package level and pulling from the cache.

Would like to use something like this for TGIK on Friday.

Thanks for the great project!

@BenTheElder
Copy link
Member

Can I please PR a feature that allows for this valuable information to be captured from a calling piece of code?

Definitely! The library use-case is not the most well supported right now, but it's certainly something we want to enable. 😅

Returning a new type in context.Create SGTM.

We'll probably need to rework this a bit when something like #164 merges but we can figure that out then.

Would like to use something like this for TGIK on Friday.

Thanks for the great project!

😄
/kind feature
/priority important-soon
/assign @kris-nova
/assign

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 19, 2018
@k8s-ci-robot k8s-ci-robot added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Dec 19, 2018
@BenTheElder BenTheElder added this to the 2018 Goals milestone Dec 19, 2018
@krisnova
Copy link
Contributor Author

Okay! I opened up #187

It doesn't break any of the method signatures just ends up adding some exported values to both the Context and the createContext

@krisnova
Copy link
Contributor Author

Which sig is responsible for this project? I am trying to find the best slack channel in case anything else comes up.

@alejandrox1
Copy link
Contributor

alejandrox1 commented Dec 19, 2018

I believe kind is a subproject of sig-testing but it has its own channel in slack - "kind"

@BenTheElder
Copy link
Member

Yes, this is a #sig-testing project, but there is a #kind channel now on the Kubernetes slack.

Will take a look at the PR :-)

@BenTheElder
Copy link
Member

Also: I like the approach but we're free to break the signatures etc. for now, all of the APIs / types are "alpha" grade 🙃

Aiming to stop breaking compatibility anywhere roughly by the end of the Kubernetes 1.14 release cycle xref: kind 1.0 milestone

The config format in particular is getting overhauled before then, #147

yankay pushed a commit to yankay/kind that referenced this issue Mar 17, 2022
…de-false

Default value for masqueradeAll flag for iptables
stg-0 pushed a commit to stg-0/kind that referenced this issue Jun 30, 2023
…dation_for_name_extravolumes

added extra volume name validation in azure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

4 participants