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

genpolicy sync upstream [2/3] #172

Merged
merged 3 commits into from
Apr 9, 2024
Merged

Commits on Apr 9, 2024

  1. genpolicy: allow separate paths for rules and settings files

    Using custom input paths with -i is counter-intuitive. Simplify path handling with explicit flags for rules.rego and genpolicy-settings.json.
    
    Fixes: kata-containers#8568
    
    Signed-Off-By: Malte Poll <1780588+malt3@users.noreply.github.com>
    malt3 authored and Redent0r committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    c608826 View commit details
    Browse the repository at this point in the history
  2. genpolicy: support non-default namespace name

    Allow users to specify in genpolicy-settings.json a default cluster
    namespace other than "default". For example, Kata CI uses as default
    namespace: "kata-containers-k8s-tests".
    
    Fixes: kata-containers#8976
    
    Signed-off-by: Dan Mihai <dmihai@microsoft.com>
    danmihai1 authored and Redent0r committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    97fac86 View commit details
    Browse the repository at this point in the history
  3. genpolicy: ignore empty YAML as input

    Kata CI's pod-sandbox-vcpus-allocation.yaml ends with "---", so the
    empty YAML document following that line should be ignored.
    
    To test this fix:
    
    genpolicy -u -y pod-sandbox-vcpus-allocation.yaml
    
    Fixes: kata-containers#8895
    
    Signed-off-by: Dan Mihai <dmihai@microsoft.com>
    danmihai1 authored and Redent0r committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    2b3408d View commit details
    Browse the repository at this point in the history