Skip to content
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

Add ConfigMapSyncer controller and rukpak-ca configmap #483

Closed
wants to merge 1 commit into from

Conversation

joelanford
Copy link
Member

@joelanford joelanford commented Aug 8, 2022

The ConfigMapSyncer syncs secret data to configmaps based on injection
annotations present in configmaps in watched namespaces.

We include a rukpak-ca configmap with these annotations present so
that cluster administrators can share rukpak-ca trust without
exposing the CA key that's present in the rukpak-ca secret.

Closes #475

Signed-off-by: Joe Lanford joe.lanford@gmail.com

@openshift-ci openshift-ci bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Aug 8, 2022
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 20, 2022
@tylerslaton tylerslaton added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Sep 7, 2022
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 13, 2022
@joelanford joelanford force-pushed the ca-syncer branch 4 times, most recently from af4a480 to 0a8ea0e Compare September 15, 2022 14:01
@joelanford
Copy link
Member Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 15, 2022
@joelanford joelanford marked this pull request as ready for review September 15, 2022 14:03
@joelanford joelanford requested a review from a team as a code owner September 15, 2022 14:03
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 15, 2022
@joelanford
Copy link
Member Author

The controller-runtime multi-namespace cache builder PR has not merged yet, so I've refactored this PR to:

  1. Not require that PR
  2. Include a TODO comment to update our repo if/when that PR merges

@joelanford joelanford force-pushed the ca-syncer branch 2 times, most recently from e4b633a to fd8a0d9 Compare September 23, 2022 13:21
@joelanford joelanford force-pushed the ca-syncer branch 3 times, most recently from 13c8cbc to 1e91478 Compare October 28, 2022 17:37
The ConfigMapSyncer syncs secret data to configmaps based on injection
annotations present in configmaps in watched namespaces.

We include a rukpak-ca configmap with these annotations present so
that cluster administrators can share rukpak-ca trust without
exposing the CA key that's present in the rukpak-ca secret.

This commit also updates the rukpakctl binary to use the configmap
rather than the secret to load the rukpak CA. This is helpful for rukpak
users that might have access to read configmaps but not secrets in the
rukpak system namespace.

Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
@joelanford
Copy link
Member Author

This PR is two steps forward, but one step back:

  1. Two steps forward
    • we're using configmaps instead of secrets in rukpakctl, so cluster admins don't have to give secret read permission to rukpakctl users.
    • we're making the build of rukpakctl more flexible so that its defaults can be reconfigured if vendors deploy rukpak with a different configuration.
  2. One step back:
    • The ConfigMapSyncer (and the e2e test that accompanies it) solves an upstream problem we have using cert-manager to manage rukpak secrets. But rukpak doesn't directly depend on cert-manager, it depends on having certs in the right places. Other deployments of rukpak might use different certificate managers that don't share assumptions made by the ConfigMapSyncer (e.g. the CA bundle might not be in a secret in the rukpak system namespace).

Therefore
/hold
The step back is giving me some pause, and I think we should discuss how to handle it. Two thoughts:

  1. Put the ConfigMapSyncer in a separate controller that rukpak distros can simply decide not to include.
  2. Leave the ConfigMapSyncer in the core controller, but make it possible to disable it somehow (flag at runtime, build flag that straight up removes the code?)

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 28, 2022
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 14, 2023
@openshift-merge-robot
Copy link

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.

@joelanford joelanford closed this May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rukpak clients should be able to get CA cert without getting access to CA key
3 participants