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

feat: add Mapkubeapis Helm plugin #74

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

FabrizioCafolla
Copy link
Member

@FabrizioCafolla FabrizioCafolla commented Dec 17, 2024

PR Type

Enhancement


Description

  • Added Helm Mapkubeapis plugin v0.5.2 installation to the Dockerfile
  • Plugin helps migrate deprecated Kubernetes APIs in Helm releases to supported versions
  • Installation is done via helm plugin install command with specific version pinning

Changes walkthrough 📝

Relevant files
Enhancement
Dockerfile
Add Helm Mapkubeapis plugin installation                                 

Dockerfile

  • Added installation of Helm plugin Mapkubeapis v0.5.2 using helm plugin
    install command
  • Added environment variable HELM_PLUGIN_MAPKUBEAPIS_VERSION to specify
    plugin version
  • +6/-0     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    @sparkfabrik-ai-bot
    Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Code Style
    Extra whitespace at the end of line 160 should be removed for consistency

    @sparkfabrik-ai-bot
    Copy link

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Security
    Verify downloaded plugin integrity using checksum verification to prevent tampering and ensure security

    Add verification of the downloaded Helm plugin using SHA256 checksum to ensure
    integrity and prevent supply chain attacks.

    Dockerfile [159-160]

     RUN echo "Installing Helm plugin Mapkubeapis ${HELM_PLUGIN_MAPKUBEAPIS_VERSION}..." && \
    -    helm plugin install --version ${HELM_PLUGIN_MAPKUBEAPIS_VERSION} https://github.com/helm/helm-mapkubeapis
    +    curl -sL https://github.com/helm/helm-mapkubeapis/releases/download/${HELM_PLUGIN_MAPKUBEAPIS_VERSION}/helm-mapkubeapis_${HELM_PLUGIN_MAPKUBEAPIS_VERSION}_checksums.txt -o checksums.txt && \
    +    helm plugin install --version ${HELM_PLUGIN_MAPKUBEAPIS_VERSION} https://github.com/helm/helm-mapkubeapis && \
    +    rm checksums.txt
    Suggestion importance[1-10]: 8

    Why: Adding checksum verification is a crucial security measure to prevent supply chain attacks and ensure the integrity of downloaded plugins. This is particularly important for container security.

    8
    Performance
    Optimize Docker image size by combining related commands and cleaning up temporary files in a single layer

    Combine the plugin installation with cleanup in a single RUN instruction to reduce
    the number of layers in the final image.

    Dockerfile [158-160]

    -ENV HELM_PLUGIN_MAPKUBEAPIS_VERSION=v0.5.2
    -RUN echo "Installing Helm plugin Mapkubeapis ${HELM_PLUGIN_MAPKUBEAPIS_VERSION}..." && \
    -    helm plugin install --version ${HELM_PLUGIN_MAPKUBEAPIS_VERSION} https://github.com/helm/helm-mapkubeapis
    +RUN HELM_PLUGIN_MAPKUBEAPIS_VERSION=v0.5.2 && \
    +    echo "Installing Helm plugin Mapkubeapis ${HELM_PLUGIN_MAPKUBEAPIS_VERSION}..." && \
    +    helm plugin install --version ${HELM_PLUGIN_MAPKUBEAPIS_VERSION} https://github.com/helm/helm-mapkubeapis && \
    +    rm -rf /root/.cache/helm/plugins/*
    Suggestion importance[1-10]: 7

    Why: The suggestion improves Docker image efficiency by reducing layers and cleaning up cache files, which directly impacts the final image size and build performance.

    7

    Copy link
    Contributor

    @Monska85 Monska85 left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    LGTM 👍

    @FabrizioCafolla FabrizioCafolla merged commit d4114c2 into master Dec 17, 2024
    2 checks passed
    @FabrizioCafolla FabrizioCafolla deleted the feat/add_helm_mapkubeapis branch December 17, 2024 14:20
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants