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

clusterctl support #50

Merged
merged 1 commit into from
May 14, 2020
Merged

clusterctl support #50

merged 1 commit into from
May 14, 2020

Conversation

deitch
Copy link
Contributor

@deitch deitch commented May 14, 2020

This provides support for clusterctl in two ways.

First, it properly structures it so you can run clusterctl --config=... to initialize the Packet provider. It did work before, but there were elements missing. This completes it so that it works. As part of it, it needed to change some of how the templates are generated to ./out/.

Second, it adds support for the cluster template in the right directories in ./out/. This means that generate-example.sh is no longer relevant, although it uses the same source template. This now is pushed into the correct ./out/ directories, where clusterctl can consume them.

Since clusterctl config cluster does not (yet) support defaults - every env var must be set for it to work - this repurposes generate-example.sh to generate-cluster.sh, which wraps clusterctl but sets defaults for env vars that should support them (as it did before when it was generate-example.sh). Also moved that to ./scripts/ to keep it clean and consistent.

Other things had to be improved to make it work, for example adding the correct Secret to run the manager as part of make release (it isn't needed in managerless, since we run it locally).

All of the docs relating to it have been updated as well, as have Makefile targets.

There are a few things that still do not work or require fixing once this PR is in, but should be handled as separate steps.

  • Our cluster template requires PACKET_API_KEY as part of its template, so that the CCM deployment will work correctly. Cluster templates are not supposed to have secrets. Even though we had it in v1alpha1, and this is a carryover, this requires us to clean it up. We need to find a way to get the secret across from the initializer in the management cluster. I have some ideas; we can follow through later.
  • The actual clusterctl --config= command - both in the README and in make cluster - does not work because it references the URL https://github.com/packethost/cluster-api-provider-packet/releases/latest/`, but we haven't actually released the config file there yet. That will continue to be the case until we cut a release.

@gianarb
Copy link
Contributor

gianarb commented May 14, 2020

We need to find a way to get the secret across from the initializer in the management cluster. I have some ideas; we can follow through later.

we should probably do something like kube2iam ideally https://github.com/jtblin/kube2iam

What about moving what there is in the readme that makes sense as a getting started guide to docs/getting-started.md? This will bring us a bit closer to structured documentation that we may render pretty soon!

Thanks great!

@deitch
Copy link
Contributor Author

deitch commented May 14, 2020

What about moving what there is in the readme

I am up for that. Let's do that as a separate "no code change" PR.

@gianarb gianarb self-requested a review May 14, 2020 08:23
@gianarb gianarb merged commit 198f83f into v1alpha3 May 14, 2020
@deitch deitch deleted the templating branch May 14, 2020 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants