Mirantis / hmc

Apache License 2.0
10 stars 11 forks source link

Initial implementation for the State Management MVP #213

Closed Kshatrix closed 2 weeks ago

wahabmk commented 3 weeks ago

As defined in #203, the ability to deploy a Helm chart across multiple templates is out of scope. For now, what we need is for the ability to include Helm charts (via Flux HelmRelease CAPI capability) within a template. Therefore, it looks like we do not need to extend the https://github.com/Mirantis/hmc/tree/main/api/v1alpha1 API at the moment to satisfy #203.

As an example, we could add the following YAML to aws-standalone-cp under templates/aws-standalone-cp/templates to deploy nginx:

apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: OCIRepository
metadata:
  name: nginx
  # namespace: default
spec:
  interval: 10m
  url: oci://registry-1.docker.io/bitnamicharts/nginx
  ref:
    semver: "18.1.0"
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: my-nginx
  # namespace: default
spec:
  kubeConfig:
    secretRef:
      name: wali-aws-dev-kubeconfig # Cluster API creates this for the matching Cluster
  interval: 10m
  chartRef:
    kind: OCIRepository
    name: nginx
    # namespace: default
  # values:
  #   replicaCount: 2
  install:
    remediation:
      retries: -1