Skip to content

Conversation

@aliciafmachado
Copy link
Contributor

Hi! I made the PR.

So, again, just to remind, the files that I edited are:

  1. kctf-operator/pkg/apis/kctf/v1alpha1/challenge_types.go

This one is responsible for generating the CRDs.

  1. The whole folder: kctf-operator/pkg/controller/challenge/.

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.

Copy link
Member

@sirdarckcat sirdarckcat left a 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

Copy link
Collaborator

@gree-gorey gree-gorey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sirdarckcat sirdarckcat self-requested a review July 29, 2020 17:01
@aliciafmachado aliciafmachado merged commit 12f319b into beta Jul 29, 2020
@aliciafmachado aliciafmachado deleted the beta-dev branch July 29, 2020 17:22
@aliciafmachado aliciafmachado restored the beta-dev branch July 29, 2020 17:22
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.

5 participants