tryretool / retool-helm

MIT License
45 stars 57 forks source link

support 1 replica api backend with jobs runner #131

Closed avimoondra closed 8 months ago

avimoondra commented 9 months ago

Support 1 replica api backend with 1 jobs runner pod. Previously replicaCount of 2 was required to separate jobs runner from api backend, which resulted in 2 api backends -- forcing the overall capacity to have this separation of services across pods.

--set jobRunner.enabled=true --set replicaCount=1

$ helm template -f ~/retool-helm/charts/retool/values.yaml foo ~/retool-helm/charts/retool --set config.encryptionKey="foo" --set image.tag="5.6.10" --set jobRunner.enabled=true --set replicaCount=1  --debug | rg replicas -C 7
install.go:192: [debug] Original chart version: ""
install.go:209: [debug] CHART PATH: /Users/avimoondra/retool-helm/charts/retool

  name: foo-retool
  labels:
    helm.sh/chart: retool-6.0.7
    app.kubernetes.io/name: retool
    app.kubernetes.io/instance: foo
    app.kubernetes.io/managed-by: Helm
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: retool
      app.kubernetes.io/instance: foo
  revisionHistoryLimit: 3
  template:
    metadata:
--
  name: foo-retool-jobs-runner
  labels:
    helm.sh/chart: retool-6.0.7
    app.kubernetes.io/name: retool
    app.kubernetes.io/instance: foo
    app.kubernetes.io/managed-by: Helm
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: retool-jobs-runner
      app.kubernetes.io/instance: foo
  revisionHistoryLimit: 3
  template:
    metadata:
--

--set jobRunner.enabled=true --set replicaCount=2

$ helm template -f ~/retool-helm/charts/retool/values.yaml foo ~/retool-helm/charts/retool --set config.encryptionKey="foo" --set image.tag="5.6.10" --set jobRunner.enabled=true --set replicaCount=2  --debug  | rg replicas -C 7

install.go:192: [debug] Original chart version: ""
install.go:209: [debug] CHART PATH: /Users/avimoondra/retool-helm/charts/retool

  name: foo-retool
  labels:
    helm.sh/chart: retool-6.0.7
    app.kubernetes.io/name: retool
    app.kubernetes.io/instance: foo
    app.kubernetes.io/managed-by: Helm
spec:
  replicas: 2
  selector:
    matchLabels:
      app.kubernetes.io/name: retool
      app.kubernetes.io/instance: foo
  revisionHistoryLimit: 3
  template:
    metadata:
--
  name: foo-retool-jobs-runner
  labels:
    helm.sh/chart: retool-6.0.7
    app.kubernetes.io/name: retool
    app.kubernetes.io/instance: foo
    app.kubernetes.io/managed-by: Helm
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: retool-jobs-runner
      app.kubernetes.io/instance: foo
  revisionHistoryLimit: 3
  template:
    metadata:
--

--set replicaCount=2

$ helm template -f ~/retool-helm/charts/retool/values.yaml foo ~/retool-helm/charts/retool --set config.encryptionKey="foo" --set image.tag="5.6.10" --set replicaCount=2  --debug | rg replicas -C 7

install.go:192: [debug] Original chart version: ""
install.go:209: [debug] CHART PATH: /Users/avimoondra/retool-helm/charts/retool

  name: foo-retool
  labels:
    helm.sh/chart: retool-6.0.7
    app.kubernetes.io/name: retool
    app.kubernetes.io/instance: foo
    app.kubernetes.io/managed-by: Helm
spec:
  replicas: 2
  selector:
    matchLabels:
      app.kubernetes.io/name: retool
      app.kubernetes.io/instance: foo
  revisionHistoryLimit: 3
  template:
    metadata:
--
  name: foo-retool-jobs-runner
  labels:
    helm.sh/chart: retool-6.0.7
    app.kubernetes.io/name: retool
    app.kubernetes.io/instance: foo
    app.kubernetes.io/managed-by: Helm
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: retool-jobs-runner
      app.kubernetes.io/instance: foo
  revisionHistoryLimit: 3
  template:
    metadata:
--

--set replicaCount=1

$helm template -f ~/retool-helm/charts/retool/values.yaml foo ~/retool-helm/charts/retool --set config.encryptionKey="foo" --set image.tag="5.6.10" --set replicaCount=1  --debug | rg replicas -C 7

install.go:192: [debug] Original chart version: ""
install.go:209: [debug] CHART PATH: /Users/avimoondra/retool-helm/charts/retool

  name: foo-retool
  labels:
    helm.sh/chart: retool-6.0.7
    app.kubernetes.io/name: retool
    app.kubernetes.io/instance: foo
    app.kubernetes.io/managed-by: Helm
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: retool
      app.kubernetes.io/instance: foo
  revisionHistoryLimit: 3
  template:
    metadata:
--