from Hacker News

Show HN: GitOps Template for Kubernetes

by pmig on 9/10/24, 4:18 PM with 35 comments

Hello HN, we’re Philip Louis from Glasskube (https://github.com/glasskube/glasskube). We are working on a package manager for Kubernetes to simplify the packaging of complex applications with multiple dependencies, ensuring they are installed and kept up-to-date across multiple Kubernetes clusters.

Nowadays, it is best practice to use Git as a revision control system for your Kubernetes configurations. Update automation workflows like Renovate or Dependabot can create pull requests for new versions of Docker images and Helm charts, but ensuring these new package versions work is still a manual task. By using the central (or a private) Glasskube repository (https://github.com/glasskube/packages) together with our Renovate integration (https://docs.renovatebot.com/modules/manager/glasskube/), you can ensure that new package versions will run through our Minikube-based CI workflows before they get published—similar to how the Homebrew core tap works. We’ve just introduced readiness checks for manifest-based deployments and utilize the flux-helm-controller to wait for a Helm release to succeed.

Dependencies are resolved by our package controller. These dependencies can either be cluster-scoped (installed in the recommended namespace, e.g., operators wird CRDs) or namespace-scoped components of a package (e.g., a database or Redis cache). In such cases, we will prefix resources with the dependent package name to ensure multiple packages can use the same dependencies without naming conflicts (we use Kustomize on a virtual filesystem for this).

Glasskube packages can currently be Helm charts (from an OCI or Helm repository) or manifests, which are mostly built using Kustomize’s overlay approach.

Since neither the overlay approach (using Kustomize) nor Helm’s limited templating functionality will help us and other Kubernetes users scale to more complex packages, we are considering creating a more programmatic approach to package creation, similar to Timoni. Currently, KCL is our frontrunner (https://github.com/glasskube/glasskube/discussions/1018), as it already integrates well with the Kubernetes ecosystem.

We would appreciate if you give our GitOps template a try. It also works work existing Kubernetes clusters if just want to use GitOps for some applications. Just make sure that the argocd and glasskube-system namespaces are not yet in use. See: https://github.com/glasskube/gitops-template/

  • by vanillax on 9/10/24, 5:28 PM

    " It also works work existing Kubernetes clusters if just want to use GitOps for some applications. Just make sure that the argocd and glasskube-system namespaces are not yet in use. See: https://github.com/glasskube/gitops-template/ "

    I assume this statement is for running this? glasskube bootstrap git --url <your-repo> --username <org-or-username> --token <your-token>

    I think I'd like to understand what the argo cd / git ops template is and how its different than argocd autopilot. Maybe some pictures of how argo is deploying apps. Etc.

  • by raffraffraff on 9/10/24, 9:10 PM

    How would I integrate it into existing setup that uses tools like terraform, along with helm?

    See, there's a bunch of stuff that I deploy using terraform (VPC, DNS, EKS) and a bunch of stuff that I deploy with FluxCD. But in between, there's some awkward stuff like the monitoring stack that requires cloudy things and Kube things, and they're tightly coupled.

    Right now I end up going with terraform and the awful helm provider. Many of these helm charts have sub-charts, nested values etc, but thankfully the monitoring stack doesn't change that much. It's still not ideal but it works as a one-shot deployment that sets up buckets, policies, IAM roles for service accounts, more policies for the roles, and finally the helm charts with values from the outputs of those clouds resources.

  • by slederer on 9/10/24, 7:31 PM

    Very interesting, where do you see value:

    a.) in Kubernetes setups that operate the same software stack, with the ongoing updates and regular releases.

    b.) in Kubernetes setups that frequently install new software/diverse software

  • by cianuro_ on 9/10/24, 7:34 PM

    Can’t this be achieved using the app of apps pattern in ArgoCD?
  • by throwawaynorway on 9/11/24, 5:12 AM

    Congrats with the launch.

    How does it compare with OpenShifts operator hub?

  • by iwwr on 9/10/24, 6:40 PM

    Why do you need an in-cluster operator/pod?
  • by rajishx on 9/11/24, 9:38 AM

    pretty interesting :)

    is glasskube a reboot of jenkins-x ?