-
Notifications
You must be signed in to change notification settings - Fork 8
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
Generate a canonical coordinator resource #141
Merged
Merged
Conversation
This file contains 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
burgerdev
force-pushed
the
burgerdev/namespace-policy
branch
from
February 9, 2024 13:24
e86056a
to
475ea74
Compare
burgerdev
changed the title
genpolicy-msft: relax namespace check in dev
WIP: release with coordinator manifest and policy
Feb 9, 2024
burgerdev
force-pushed
the
burgerdev/namespace-policy
branch
2 times, most recently
from
February 12, 2024 12:48
09940b7
to
c865109
Compare
katexochen
reviewed
Feb 12, 2024
burgerdev
force-pushed
the
burgerdev/namespace-policy
branch
from
February 12, 2024 14:26
c865109
to
08b1273
Compare
burgerdev
changed the title
WIP: release with coordinator manifest and policy
Generate a canonical coordinator resource
Feb 12, 2024
We would like to have a coordinator policy that is portable across namespaces. This is not possible with the upstream rules.rego, because the namespace annotation on the OCI spec is checked against the original namespace in the resource definition, or a default. It turns out that this check is not necessary for our coordinator, though: 1. The namespace check guarantees a specific pattern of the log path. As there's only one container in the VM, we don't care about potential conflicts and only need to ensure that we're not writing into a totally unrelated directory. 2. The namespace check guarantees that the Kubernetes downward API is resolved correctly. We're not using that, so we don't need the check. A minimally invasive change that still addresses (1) is to relax the check so that it only guarantees namespace validity [1]. [1]: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/#namespaces-and-dns
In order to embed a coordinator policy hash on release, we first need to establish what the default coordinator policy should be. This commit adds a nix rule that generates the canonical coordinator k8s resources, which can then be used to obtain a policy hash for inclusion in the CLI. Since the generated resources are then guaranteed to be compatible with the released CLI, we can include the resource definitions in the release and encourage users to take the coordinator from there.
burgerdev
force-pushed
the
burgerdev/namespace-policy
branch
from
February 12, 2024 14:36
08b1273
to
5804032
Compare
katexochen
approved these changes
Feb 14, 2024
malt3
approved these changes
Feb 14, 2024
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.
Sorry for the slow response. LGTM, too.
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.
This PR provides a nix rule that generates a coordinator k8s resource that is portable across namespaces.
Rationale see individual commit messages.