8000 feat: CLI - apply: add option to clone from private repo by marevers · Pull Request #13012 · kyverno/kyverno · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: CLI - apply: add option to clone from private repo #13012

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

marevers
Copy link
@marevers marevers commented May 5, 2025

Explanation

Note: Replaces PR #12512 .

Currently, the CLI 'apply' command supports git urls but can only clone from repositories that don't require authentication. Private repositories that do therefore cannot be used.

Related issue

Closes #12510

Milestone of this PR

Documentation (required for features)

My PR contains new or altered behavior to Kyverno.

What type of PR is this

/kind feature

Proposed Changes

With this change it is now possible to provide basic authentication to the apply command which allows for retrieving policies from private repositories.

Checklist

  • I have read the contributing guidelines.
  • I have read the PR documentation guide and followed the process including adding proof manifests to this PR.
  • This is a bug fix and I have added unit tests that prove my fix is effective.
  • This is a feature and I have added CLI tests that are applicable.
  • My PR needs to be cherry picked to a specific release branch which is .
  • My PR contains new or altered behavior to Kyverno and
    • CLI support should be added and my PR doesn't contain that functionality.

Signed-off-by: Martijn Evers <mevers@gk-software.com>
@marevers marevers requested a review from eddycharly as a code owner May 5, 2025 13:54
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label May 5, 2025
Copy link
codecov bot commented May 9, 2025

Codecov Report

Attention: Patch coverage is 62.50000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 15.33%. Comparing base (b634cbd) to head (3cce87c).

Files with missing lines Patch % Lines
pkg/utils/git/git.go 57.14% 2 Missing and 1 partial ⚠️
cmd/cli/kubectl-kyverno/commands/test/load.go 0.00% 2 Missing ⚠️
cmd/cli/kubectl-kyverno/commands/apply/command.go 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13012   +/-   ##
=======================================
  Coverage   15.33%   15.33%           
=======================================
  Files         923      923           
  Lines      100275   100286   +11     
=======================================
+ Hits        15373    15381    +8     
- Misses      83189    83192    +3     
  Partials     1713     1713           
8154

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Support private repositories for CLI apply command
2 participants
0