-
Notifications
You must be signed in to change notification settings - Fork 157
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
user-cluster tool #2350
user-cluster tool #2350
Conversation
labels: | ||
user: << Optional UserID to see cluster in UI>> | ||
worker-name: "" | ||
spec: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not look right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please elaborate what do you mean
|
||
### Example AWS Node spec | ||
|
||
spec: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please add the rest of the object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's complete object (used by kubermatic http api) github.com/kubermatic/kubermatic/api/pkg/api/v1.Node
|
||
### Example AWS Cluster spec | ||
|
||
apiVersion: kubermatic.k8s.io/v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please highlight both code blocks as yaml?
kubermatic/kubermatic user-cluster | ||
|
||
## Flags | ||
TBD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please document the current flags or remove this section
# Automate creation of kubermatic managed clusters | ||
|
||
## What is this | ||
It's a tool to automate creating of custom resources for kubermatic managed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove line break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why? it's 80-th column text-wrap
) | ||
|
||
const ( | ||
generateName = "auto-cluster" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the user should be able to configure this by himself (new flag?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a reason why. That tool is for CI. It creates those "automatic user clusters".
} | ||
|
||
for i := 0; i < ctl.runOpts.Nodes; i++ { | ||
template.Name = fmt.Sprintf("%s%s", generateName, rand.String(5)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use template.GenerateName
as a base when generating the machine name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we put a project-specific tool into the main kubermatic/kubermatic repo?
And why don't we leverage our API?
First of all, although
That'd mean to start whole new project, generating api-client out of swagger spec, wrapping everything in nice CLI, dealing with (non-existing yet Service Accounts). That's not an objective for this tool. What we need here is to:
|
We already have the testrunner for that and don't need another tool
Is there a time constraint on this? UI folks apparently already found a way to get tokens for usage in scripts in their testing. It should be pretty easy after that |
Please point me to one
As always, like, previous week :) |
Can you still check in with the api team how difficult that would be? I don't think this will take an incredible amount of time |
@alvaroaleman those are incomparable. |
Yes I know they are not the same but for our tests which you stated an example on which we ourselves need the code you add here we do not need this code because we already have the
We specifically do not want a general-purpose tool that does not use the api |
@alvaroaleman I'm not sure I follow where this leads
so which changes are you requesting exactly? |
This tool to use our API instead of directly working on CRDs |
what's the problem to work directly on CRDs? |
The crds are an implementation detail of ours and not an API we want to expose. We want and do change them without notifying external parties |
I would argue that CRDs are a public API and should not be changed without notifying external parties, and if they are changed backwards compatibility should be kept in mind and CRDs should be versioned correctly. |
No, neither kubermatic cluster crd nor the machine crd are public apis. The first one is only used internally and should not be used externally, the second one is declared alpha by upstream which means they do incompatible changes to it and the pace at which we do or do not adapt upstream changes is a call we make. CRD versioning is currently not possible, it got merged two days ago into kubernetes master and will maybe land in 1.13. Right now it is possible to specify more than one version but all of them must be identical because there is no conversion. We may decide to pick up crd versioning for Kubermatic but even then, the kubermatic crd is not a public api. Our API is the public api. |
And we don't have anything to work with it besides swagger file, right? |
Yes. You can generate a client from the swagger thought, @glower already did that at some point |
@kron4eg, @alvaroaleman my thoughts on this:
To reach this, using the CRDs is for me the easiest and most flexible way. If the CRDs are not part of an API the whole clusterAPI project sounds weird for me. |
What this PR does / why we need it:
Syncier asked for CI tool to automate creation of user-clusters