Git Product home page Git Product logo

Comments (4)

dosubot avatar dosubot commented on May 24, 2024 2

🤖

Adding a kubeconform check to the .github/workflows/helm-charts.yaml GitHub action workflow would indeed be beneficial for validating generated manifests in your CI. This would be particularly useful when modifications are made to the helm charts under deployment and docker/sandbox-bundled/manifests.

kubeconform is a tool that validates Kubernetes manifests against the Kubernetes API's schemas. This ensures that the manifests are correctly structured and adhere to the expected specifications of the Kubernetes resources they define. This validation can help catch errors and inconsistencies early in the development process, before the manifests are applied to a Kubernetes cluster.

To integrate kubeconform into your workflow, you would add a new step after the "Build helm chart" step and before the "Publish Helm chart to GHCR" step. This new step would involve installing kubeconform (if not already available in your CI environment), generating the Kubernetes manifests from the Helm chart using helm template, and then running kubeconform against these generated manifests.

Here is an example of how you might add such a step:

      - name: Validate generated manifests with kubeconform
        working-directory: charts
        run: |
          # Install kubeconform
          curl -sL https://github.com/yannh/kubeconform/releases/download/v0.4.12/kubeconform-linux-amd64 -o kubeconform
          chmod +x kubeconform
          
          # Generate Kubernetes manifests from Helm chart
          helm template ${{ matrix.chart }} --output-dir ./manifests
          
          # Validate manifests under 'deployment' and 'docker/sandbox-bundled/manifests'
          ./kubeconform -summary -strict ./manifests/deployment
          ./kubeconform -summary -strict ./manifests/docker/sandbox-bundled/manifests

This example assumes that the generated manifests are placed under ./manifests/deployment and ./manifests/docker/sandbox-bundled/manifests relative to the charts directory. You might need to adjust the paths based on where helm template actually outputs the manifests in your workflow.

Adding this validation step can significantly improve the reliability and correctness of the Kubernetes manifests produced by your Helm charts, catching potential issues early in the CI process.

For more information about kubeconform, you can refer to its GitHub repository. For more details about the current structure of the .github/workflows/helm-charts.yaml GitHub action workflow in the flyte repository, you can refer to the flyte repository.

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

from flyte.

pingsutw avatar pingsutw commented on May 24, 2024 2

@lowc1012 Feel free to open a PR.

from flyte.

lowc1012 avatar lowc1012 commented on May 24, 2024

I'm not sure if we have to check the manifests generated via kustomize

from flyte.

lowc1012 avatar lowc1012 commented on May 24, 2024

#take

from flyte.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.