redpanda-data / redpanda-operator

37 stars 9 forks source link

Struggling with kustomize and no flux... #271

Open BryanDollery opened 4 days ago

BryanDollery commented 4 days ago

I'm trying something undocumented :)

I want to deploy rp etc. with the operator, but I want to drive everything with kustomize and I really do not want flux in the middle of everything either.

I'm stuck on an error. I have the operator running, but after I've applied my first RedPanda object, during reconciliation, I get ArtifactFailed: HelmRepository 'bus/operator is not ready. I have got the redpanda charts repo registered with helm as 'operator'. I'm deploying all the rp resources to the 'bus' namespace. I have specified the name of the repo as 'operator' in my kustomization file, but I don't know why it's prepending the bus name to the helm repo reference, or even if that's what's breaking it. For all I know, this could be a red herring and it might not be possible to make it work without flux (I have seen an approved pr for a UseFulx flag, and maybe that's part of the solution? I don't know).

In case it helps, here's the configuration I'm using:

kustomization.yaml

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

metadata:
  name: platform-bus

namespace: bus

resources:
  - namespace.yaml
  - https://github.com/redpanda-data/redpanda-operator//src/go/k8s/config/crd?ref=v2.2.3-24.2.4
  - redpanda-role.yaml # cluster.redpanda.com.user access???
  - server.yaml

helmCharts:
  - name: operator
    namespace: bus
    version: 0.4.28
    repo: https://charts.redpanda.com
    releaseName: smooth
    valuesFile: rp-operator-values.yaml
    includeCRDs: true

server.yaml

apiVersion: cluster.redpanda.com/v1alpha2
kind: Redpanda

metadata:
  name: robot-bus
  namespace: bus

spec:
  chartRef:
    helmRepositoryName: operator
    chartVersion: 5.9.7
    timeout: 1m0s

  clusterSpec:
    external:
      enabled: false
      domain: robot.ent

    serviceAccount:
      create: true

    tls:
      enabled: false

    rbac:
      enabled: true

    logging:
      logLevel: debug

    console:
      enabled: true

    statefulset:
      replicas: 1
      initContainers:
        setDataDirOwnership:
          enabled: true

rp-operator-values.yaml

# nameOverride: ""
# fullnameOverride: ""

logLevel: "info"
scope: Namespace

additionalCmdFlags: 
  - "--enable-helm-controllers=false"

image:
  repository: docker.redpanda.com/redpandadata/redpanda-operator
  tag: v2.2.5-24.2.7
  pullPolicy: IfNotPresent

monitoring:
  enabled: false
  deployPrometheusKubeStack: false

rbac:
  create: true
  createAdditionalControllerCRs: true
  createRPKBundleCRs: true

resources:
  limits:
    cpu: 50m
    memory: 30Mi

  requests:
    cpu: 25m
    memory: 25Mi

serviceAccount:
  create: true
chrisseto commented 1 day ago

Hey @BryanDollery! It is not currently possible to run the redpanda operator without having the flux controllers installed. We're in the middle of making this possible via the UseFlux flag that you've seen but it's not yet ready. We're aiming to have this available for users by the end of October.

BryanDollery commented 10 hours ago

Hey @BryanDollery! It is not currently possible to run the redpanda operator without having the flux controllers installed. We're in the middle of making this possible via the UseFlux flag that you've seen but it's not yet ready. We're aiming to have this available for users by the end of October.

Thanks @chrisseto - is this on a specific branch? I might be able to provide some feedback if I can test it pre-release.

chrisseto commented 6 hours ago

Thank you for volunteering but we're not aiming to provide a usable pre-release form of this functionality.