Giter VIP home page Giter VIP logo

Comments (5)

onedr0p avatar onedr0p commented on May 31, 2024

I could see this being useful for rendering out custom resources. For example, you could create a helm chart that only applies ClusterIssuers from cert-manager.

Take a HelmRelease for cert-manager for example:

---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: cert-manager
  namespace: cert-manager
spec:
  interval: 15m
  chart:
    spec:
      chart: cert-manager
      version: v1.10.0
      sourceRef:
        kind: HelmRepository
        name: jetstack-charts
        namespace: flux-system
  install:
    createNamespace: true
    remediation:
      retries: 5
  upgrade:
    remediation:
      retries: 5
  values:
    installCRDs: true

You could then apply the ClusterIssuer CR in a HelmRelease that depends on the cert-manager helm release:

---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: &app cert-manager-issuers
  namespace: default
spec:
  interval: 15m
  chart:
    spec:
      chart: app-template
      version: 0.2.2
      sourceRef:
        kind: HelmRepository
        name: bjw-s-charts
        namespace: flux-system
  install:
    createNamespace: true
    remediation:
      retries: 5
  upgrade:
    remediation:
      retries: 5
  dependsOn:
    - name: cert-manager
      namespace: cert-manager
  values:
    customResources:
      - apiVersion: cert-manager.io/v1
        kind: ClusterIssuer
        metadata:
          name: letsencrypt-production
        spec:
          acme:
            server: https://acme-v02.api.letsencrypt.org/directory
            email: "${SECRET_EMAIL}"
            privateKeySecretRef:
              name: letsencrypt-production
            solvers:
              - dns01:
                  cloudflare:
                    email: "${SECRET_EMAIL}"
                    apiKeySecretRef:
                      name: cloudflare-token-secret
                      key: cloudflare-token
                selector:
                  dnsZones:
                    - "${SECRET_PUBLIC_DOMAIN}"

I know this is absolutely insane idea and breaks a lot of rules in the current library chart 🤣

from helm-charts.

onedr0p avatar onedr0p commented on May 31, 2024

@gclawes can you give a better example of what you mean by some deployments require an extra manifests? @bjw-s and I believe this might be out of the scope of the common library but I think we'd be open to PRs.

from helm-charts.

gclawes avatar gclawes commented on May 31, 2024

I linked to the templates for radarr in the original issue: https://github.com/k8s-at-home/charts/tree/master/charts/stable/radarr/templates

This has a PrometheusRule and ServiceMonitor in addition to the rendered common template. If I were to deploy radarr with bjw-s/app-template, it would be useful to be able to deploy these custom resources like this in the same helm release as the man app, rather than managing them in a separate release.

Unfortunately I'm currently restricted from making PRs due to work, I wish I could contribute one here.

from helm-charts.

bjw-s avatar bjw-s commented on May 31, 2024

While the technical implementation could be relatively straightforward I'm going to vote against implementing this. It feels like quite the anti-pattern. Resources not supported by the library chart should be deployed as sidecar manifests.

from helm-charts.

onedr0p avatar onedr0p commented on May 31, 2024

There's also the serviceMonitor option incoming for the next version, I don't think we would go so far as to add prometheusRule value though since that would look pretty ugly on the deployment side. Due to the LoC that CR can be a raw manifest.

from helm-charts.

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.