-
Notifications
You must be signed in to change notification settings - Fork 75
Beta dev #118
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
Merged
Merged
Beta dev #118
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…eviewed. Also, changed int to int32, so it matches DeploymentSpec.
…dated CRDs and the CR example for now.
…rts, persistent volume claim and deployment).
…d solving some problems found while testing
sroettger
reviewed
Jul 24, 2020
gree-gorey
reviewed
Jul 24, 2020
sirdarckcat
reviewed
Jul 24, 2020
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.
Thanks! Maybe for future code reviews we can do them in 3 rounds? Rather than all at once
…it will be implemented next
gree-gorey
reviewed
Jul 27, 2020
gree-gorey
reviewed
Jul 28, 2020
kctf-operator/deploy/crds/kctf.dev_v1alpha1_challenge_cr_example_5.yaml
Outdated
Show resolved
Hide resolved
gree-gorey
approved these changes
Jul 29, 2020
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.
LGTM
sroettger
approved these changes
Jul 29, 2020
sirdarckcat
approved these changes
Jul 29, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi! I made the PR.
So, again, just to remind, the files that I edited are:
This one is responsible for generating the CRDs.
There we have what the operator does every time a CR is applied - the reconcile function. So, the main file is challenge_controller.go, which contains the reconcile function itself. It basically stayed the same way as the boilerplate code, but I added the calls of these functions, which are contained in the others files: SetDefaultValues, deploymentForChallenge, serviceForChallenge and CheckConfigurations.
The other files were created so that the code stays more organised. The challenge_default has functions that return default values that can't be set by kubebuilder. The challenge_deployment contains the deployment. The challenge_service contains the service. Finally, the challenge_check is always called by the reconcile function (which is different from the deployment/service creation, which aren't called every time), which checks the configurations and make changes if necessary.
There are still some things to be done, and, thus, I left some TODOs in these places, so you can know if I didn't put something important or I simply didn't do it yet.