From 26e22116f2a7562d669256bc1d64e9013a6be346 Mon Sep 17 00:00:00 2001 From: Ben Meier <1651305+astromechza@users.noreply.github.com> Date: Tue, 3 Sep 2024 08:56:56 +0100 Subject: [PATCH] fix: remove default replicas=1 value from workload conversion (#27) * fix: remove default replicas=1 value from workload conversion Signed-off-by: Ben Meier * fix: remove default value of stateful set replicas Signed-off-by: Ben Meier --------- Signed-off-by: Ben Meier --- internal/convert/workloads.go | 2 -- internal/convert/workloads_test.go | 1 - 2 files changed, 3 deletions(-) diff --git a/internal/convert/workloads.go b/internal/convert/workloads.go index 8adcb31..a87dc26 100644 --- a/internal/convert/workloads.go +++ b/internal/convert/workloads.go @@ -209,7 +209,6 @@ func ConvertWorkload(state *project.State, workloadName string) ([]machineryMeta Labels: commonLabels, }, Spec: v1.DeploymentSpec{ - Replicas: internal.Ref(int32(1)), Selector: &machineryMeta.LabelSelector{ MatchLabels: map[string]string{ SelectorLabelInstance: commonLabels[SelectorLabelInstance], @@ -255,7 +254,6 @@ func ConvertWorkload(state *project.State, workloadName string) ([]machineryMeta Labels: commonLabels, }, Spec: v1.StatefulSetSpec{ - Replicas: internal.Ref(int32(1)), Selector: &machineryMeta.LabelSelector{ MatchLabels: map[string]string{ SelectorLabelInstance: commonLabels[SelectorLabelInstance], diff --git a/internal/convert/workloads_test.go b/internal/convert/workloads_test.go index 8572cb4..4f41f1a 100644 --- a/internal/convert/workloads_test.go +++ b/internal/convert/workloads_test.go @@ -173,7 +173,6 @@ metadata: app.kubernetes.io/name: example name: example spec: - replicas: 1 selector: matchLabels: app.kubernetes.io/instance: example-abcdef