Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Create a default HNCConfiguration singleton when starting HNC if the singleton does not exist #471

Conversation

sophieliu15
Copy link
Contributor

This PR creates a default HNCConfiguration singleton when starting HNC if the singleton does not exist. The feature is achieved by adding a channel in reconciler watch to trigger the reconciliation at startup. The reconciliation will ensure the default singleton will be created if it does not exist.

Tested: GKE cluster; unit tests.

Design doc: http://bit.ly/hnc-type-configuration
Issue: #411

…singleton does not exist

This PR creates a default HNCConfiguration singleton when starting HNC if the singleton does not exist. The feature is achieved by adding a channel in reconciler watch to trigger the reconciliation at startup. The reconciliation will ensure the default singleton will be created if it does not exist.

Tested: GKE cluster; unit tests.

Design doc: http://bit.ly/hnc-type-configuration
Issue: kubernetes-retired#411
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 28, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @sophieliu15. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 28, 2020
sophieliu15 added a commit to sophieliu15/multi-tenancy that referenced this pull request Feb 28, 2020
This PR adds Conditions in HNCConfiguration.Status to indicate error scenarios. Condition specifies error code and message for a specific error. Currently we support following error code:
    - critSingletonNameInvalid: the specified singleton name is invalid.
    - objectReconcilerCreationFailed: an error exists when creating the object reconciler for a specific type.

This PR includes changes introduced in kubernetes-retired#471

Tested: GKE cluster; unit tests.

Design doc: http://bit.ly/hnc-type-configuration
Issue: kubernetes-retired#411
sophieliu15 added a commit to sophieliu15/multi-tenancy that referenced this pull request Feb 28, 2020
This PR adds Conditions in HNCConfiguration.Status to indicate error scenarios. Condition specifies error code and message for a specific error. Currently we support following error code:
    - critSingletonNameInvalid: the specified singleton name is invalid.
    - objectReconcilerCreationFailed: an error exists when creating the object reconciler for a specific type.

This PR includes changes introduced in kubernetes-retired#471

Tested: GKE cluster; unit tests.

Design doc: http://bit.ly/hnc-type-configuration
Issue: kubernetes-retired#411
@adrianludwin
Copy link
Contributor

/ok-to-test
/lgtm
/approve
/hold
/assign @rjbez17

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 29, 2020
@sophieliu15
Copy link
Contributor Author

Hi @rjbez17

Feel free to take a look at this PR when you have time. Adrian and Yiqi did the first round of the code review. Since I have a chain of PRs for review, it would be great if we can merge this in to reduce the code review burden for subsequent PRs.

Thanks so much for your help!

Sophie

@rjbez17
Copy link

rjbez17 commented Mar 3, 2020

/lgtm
/approve
/hold cancel

@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Mar 3, 2020
@k8s-ci-robot
Copy link
Contributor

@sophieliu15: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adrianludwin, rjbez17, sophieliu15

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [adrianludwin,rjbez17]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sophieliu15
Copy link
Contributor Author

/hold

Holding it since #462 that contained changes in this PR was already merged. We should probably consider close this PR.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 3, 2020
@sophieliu15
Copy link
Contributor Author

Close this PR because the changes are already merged in #462

1 similar comment
@sophieliu15
Copy link
Contributor Author

Close this PR because the changes are already merged in #462

@sophieliu15 sophieliu15 closed this Mar 3, 2020
@sophieliu15 sophieliu15 deleted the default_config_new_4 branch March 6, 2020 19:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants