From 2ba40588d3b3b44ac3c0fa4ff9ae9e9fd3336cc9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Julian=20T=C3=B6lle?= <julian.toelle@hetzner-cloud.de>
Date: Mon, 8 Jul 2024 11:49:49 +0200
Subject: [PATCH] feat(helm,manifests): only specify container args instead of
 command (#691)

The container image already has the entrypoint defined. It makes no
sense to duplicate this in the deployment manifests.

The hardcoded entrypoint has stopped us from introducing ko for building
container images before, as ko uses another entrypoint and has no option
for configuring it.
---
 chart/templates/deployment.yaml | 3 +--
 deploy/ccm-networks.yaml        | 3 +--
 deploy/ccm.yaml                 | 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml
index ee6ad901..16ccfa7f 100644
--- a/chart/templates/deployment.yaml
+++ b/chart/templates/deployment.yaml
@@ -62,8 +62,7 @@ spec:
       {{- end }}
       containers:
         - name: hcloud-cloud-controller-manager
-          command:
-            - "/bin/hcloud-cloud-controller-manager"
+          args:
             {{- range $key, $value := $.Values.args }}
             {{- if not (eq $value nil) }}
             - "--{{ $key }}{{ if $value }}={{ $value }}{{ end }}"
diff --git a/deploy/ccm-networks.yaml b/deploy/ccm-networks.yaml
index 134f0a1f..56e58efb 100644
--- a/deploy/ccm-networks.yaml
+++ b/deploy/ccm-networks.yaml
@@ -60,8 +60,7 @@ spec:
       hostNetwork: true
       containers:
         - name: hcloud-cloud-controller-manager
-          command:
-            - "/bin/hcloud-cloud-controller-manager"
+          args:
             - "--allow-untagged-cloud"
             - "--cloud-provider=hcloud"
             - "--route-reconciliation-period=30s"
diff --git a/deploy/ccm.yaml b/deploy/ccm.yaml
index 0372bbb3..6d06ee73 100644
--- a/deploy/ccm.yaml
+++ b/deploy/ccm.yaml
@@ -59,8 +59,7 @@ spec:
           effect: "NoExecute"
       containers:
         - name: hcloud-cloud-controller-manager
-          command:
-            - "/bin/hcloud-cloud-controller-manager"
+          args:
             - "--allow-untagged-cloud"
             - "--cloud-provider=hcloud"
             - "--route-reconciliation-period=30s"
-- 
GitLab