-
Notifications
You must be signed in to change notification settings - Fork 104
This PR adds support for having helm chart of foundationDB #59
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
Conversation
|
Sorry for the delay. Apple's on holiday from the 24th through the 1st, so I haven't been looking at PRs. I'll try to take a look at this when I get back next week. |
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 local_cluster file is designed for local development, so I don't think we want to use it as part of a helm chart. Most of the things that are defined in this sample are things that aren't as likely to be good fits for real clusters. In general, I'm not sure how much value there is having a helm chart for the CRD, rather than just having the customization go through the CRD.
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.
Hi @brownleej
It totally depends on us, is we want to get the CR,which in our case is a FoundationDBCluster, created as part of helm or not. By in my experience some database use this approach where they install the operator through one helm installation and actual database (CR) through another.
What I suggest is to install the CR using second helm deployment and improve that for real use. WDYT
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 think we should leave the creation of FDB clusters out of this PR, and focus it on deploying the operator itself.
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.
Will this file updated automatically when we make changes to the CRD?
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 am also not an expert here but I think we will have to make the changes manually.
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.
In all the other places we use it, we generate the CRD from the code. Is there a reason we can't do that with Helm? I'd rather not introduce any way for things to get out of sync if we can avoid it.
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.
Is it the best practice to create a namespace when deploying things through Helm, or is this an artifact of the defaults from kubebuilder?
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.
If we talk specifically this namespace creation its not required.
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.
OK, then let's leave the namespace out. I think it's better to give people the flexibility to run the operator in whatever namespace makes sense for them.
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.
Are we doing anything with this webhook secret? I think it came from the defaults in kubebuilder, but we don't have any webhooks right now. We may add some in the future, though.
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 agree, I just tried to make helm chart of whatever was already present, if we dont use this, I think it can be removed.
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 fdb-certs secret is part of the local development environment, but I don't think we want it in the helm chart.
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.
if you see the statefulset that gets created for the operator, manifest of that statefulset has this secret mounted, so I just made that more manageable but having the name in the values.yaml file, but it was already in the statefulset's manifest.
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.
We should base this on the latest sample deployment YAML (https://github.com/FoundationDB/fdb-kubernetes-operator/blob/master/config/samples/deployment.yaml) after the Kubebuilder 2 upgrade.
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 shouldn't be necessary outside of local development environments.
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.
a comment above addresses this.
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 think it's better to use a role rather than a cluster role, to support using the operator in environments where the person running the operator doesn't have cluster-wide access.
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 agree, we should have role in place of ClusterRole here.
|
Hi @brownleej |
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 think we should leave the creation of FDB clusters out of this PR, and focus it on deploying the operator itself.
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.
OK, then let's leave the namespace out. I think it's better to give people the flexibility to run the operator in whatever namespace makes sense for them.
|
Hi @brownleej |
2. after installing the operator you will hvae to create the cluster cr in the samenamespace where you deployed the operatgor
176691c to
a4f9222
Compare
|
Hi @brownleej |
|
What problem does the instance chart solve? |
Hi @brownleej |
|
What is the advantage of creating the cluster through Helm rather than directly? |
Hi @brownleej, |
|
Hi @brownleej |
|
I see you've removed the instance chart; I had missed that before. That clears up my biggest area of concern. There are still some open questions and suggestions in the PR that I would like to see resolved. A lot of that comes down to bringing this in line with other things that have changed since you opened the PR, such as moving to a deployment rather than a statefulset for the operator and removing defaults that Kubebuilder added that we're not using now. I also have a question about how the CRD in the helm chart gets defined. |
1. Change statefulset to deployment 2. remove unnecessary resources 3. improve helm install success message
|
Hi @brownleej, |
|
@viveksinghggits What are your thoughts on generating the CRD in the helm chart from the code so it automatically updates? |
|
Hey @brownleej, Update |
|
Why can't we have a step in the Makefile that updates the copy of the CRD in the Helm chart? |
|
Hi @brownleej, if we are including Makfile in between, we are not actually resolving the problem that we are trying to resolve by introducing Helm installation. On the other note, can you please explain what do you actually mean by update the copy of CRD, because in that also we will have to have the CRD somewhere right? |
|
What I mean is that when the CRD changes, like when we add a new field, we should update the copy in the helm chart in addition to updating the copy in |
|
Hey @brownleej, |
|
I suspect it will be a problem, since it means removing the CRD from the standard location in config/crd. |
|
Hey @brownleej, We will have to discuss about two things now, how do we host this helm chart, one option I know id github pages. |
brownleej
left a comment
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 looks good. I think the best course is to merge this in as it is and file smaller-scoped issues for the things we don't have in this PR. |
|
Hey @brownleej, |
Fixes #49
To test the chart please follow below commands
Once we have have the operator running we can go ahead and create the foundation db instance using below command
and you will have foundationDB pod running in the
fdb-testnamespace with double redundancy mode.Note
we will have to push the operator image to a public repository so that the image name can be used in the
values.yamlforfdb-operatorchart.