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

refactor(k8s): add v prefix for Go packages #7839

Merged
merged 4 commits into from
Nov 25, 2024

Conversation

afdesk
Copy link
Contributor

@afdesk afdesk commented Oct 31, 2024

Description

This PR continues addressing inconsistencies in version display by ensuring the prefix v is consistently applied (and preserved) for Kubernetes packages. Since these packages are Go modules, the v prefix aligns with the standard convention for Go module versioning.

Test steps:

$ kind delete cluster && kind create cluster
$ trivy k8s -f cyclonedx

CycloneDX before:

    {
      "ref": "fd4bf58c-96b6-4e52-b306-8b5f155128ba",
      "dependsOn": [
        "pkg:golang/github.com%2Fcontainerd%[email protected]",
        "pkg:k8s/k8s.io%[email protected]"
      ]
    },
    {
      "ref": "pkg:k8s/go.etcd.io%2Fetcd%[email protected]",
      "dependsOn": [
        "pkg:oci/etcd@sha256%3A27e3830e1402783674d8b594038967deea9d51f0d91b34c93c8f39d2f68af7da?repository_url=registry.k8s.io%2Fetcd"
      ]
    },

    {
      "ref": "pkg:k8s/k8s.io%[email protected]",
      "dependsOn": [
        "024ac545-acf4-46bc-8feb-a24ea1a04883",
        "e66f13ac-b42f-468b-b120-6e7210d1d61c",
        "ea90103a-d9f5-45c6-9a41-123faa7ec294",
        "pkg:k8s/go.etcd.io%2Fetcd%[email protected]",
        "pkg:k8s/k8s.io%2Fapiserver",
        "pkg:k8s/k8s.io%2Fcontroller-manager",
        "pkg:k8s/k8s.io%2Fkube-proxy",
        "pkg:k8s/k8s.io%2Fkube-scheduler",
        "pkg:k8s/kindnet@20241023-a345ebe4"
      ]
    },

CycloneDX after:

    {
      "ref": "589922f5-6624-45f4-96f4-b3669a106ba1",
      "dependsOn": [
        "pkg:golang/github.com%2Fcontainerd%[email protected]",
        "pkg:k8s/k8s.io%[email protected]"
      ]
    },
    {
      "ref": "pkg:k8s/go.etcd.io%2Fetcd%[email protected]",
      "dependsOn": [
        "pkg:oci/etcd@sha256%3A27e3830e1402783674d8b594038967deea9d51f0d91b34c93c8f39d2f68af7da?repository_url=registry.k8s.io%2Fetcd"
      ]
    },
{
      "ref": "pkg:k8s/k8s.io%[email protected]",
      "dependsOn": [
        "38b8687c-6bda-4138-a115-07292db23b67",
        "bb9085be-f357-4a66-9a2d-9e55ac23c62e",
        "e445c06b-70f4-43fc-a52c-661fd3b518b6",
        "pkg:k8s/go.etcd.io%2Fetcd%[email protected]",
        "pkg:k8s/k8s.io%2Fapiserver",
        "pkg:k8s/k8s.io%2Fcontroller-manager",
        "pkg:k8s/k8s.io%2Fkube-proxy",
        "pkg:k8s/k8s.io%2Fkube-scheduler",
        "pkg:k8s/kindnet@v20241023-a345ebe4"
      ]
    },

Related issues

Related PRs

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

@afdesk afdesk requested a review from simar7 November 25, 2024 19:25
@afdesk afdesk marked this pull request as ready for review November 25, 2024 19:39
@simar7 simar7 added this pull request to the merge queue Nov 25, 2024
Merged via the queue into aquasecurity:main with commit 44c7fdd Nov 25, 2024
17 checks passed
@afdesk afdesk deleted the fix/k8s/v-prefix branch November 26, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor(k8s): add v prefix for Go packages
2 participants