emberstack / kubernetes-reflector

Custom Kubernetes controller that can be used to replicate secrets, configmaps and certificates.
MIT License
1.11k stars 96 forks source link

Fresh Deployment Fails to Start Reflector Pod #434

Closed j0sh3rs closed 7 months ago

j0sh3rs commented 7 months ago

Issue: Attempting to deploy a fresh instance of reflector (Having never used it before), into its own namespace, with the below configs, results in a pod CrashLoop.

Pod Error:

$ k logs -f -n reflector reflector-7f8f8dff88-drz8f 
Failed to create CoreCLR, HRESULT: 0x8007000E

Flux HelmRelease configuration:

apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
  name: reflector
  namespace: reflector
spec:
  interval: 1h
  driftDetection:
    mode: enabled
  chart:
    spec:
      chart: reflector
      version: 7.1.262
      sourceRef:
        kind: HelmRepository
        namespace: flux-system
        name: emberstack-charts
      interval: 1h
  maxHistory: 2
  install:
    createNamespace: true
    remediation:
      retries: 3
  upgrade:
    cleanupOnFail: true
    remediation:
      retries: 3
  uninstall:
    keepHistory: false
  values:
    securityContext:
      readOnlyRootFilesystem: true
j0sh3rs commented 7 months ago

Apparently this was an issue with having the readOnlyRootFilesystem enabled. Perhaps the CLR needs to be stood up first, and then the pods migrated to RORFs. Either way, issue is resolved on my end!