From 6f2abbf79cbf551d2d7736465f6a0070634bbd69 Mon Sep 17 00:00:00 2001
From: Frank Ritchie <12985912+fritchie@users.noreply.github.com>
Date: Thu, 8 Apr 2021 10:32:56 -0400
Subject: [PATCH] Move cilium kvstore settings to configmap (#7462)

This PR is to move the cilium kvstore options to the configmap
rather than specifying them in the deployment as args. This
is not technically necessary but keeping all the options in
one place is probably not a bad idea.

Tested with cilium 1.9.5.
---
 roles/network_plugin/cilium/templates/cilium-config.yml.j2 | 5 +++++
 roles/network_plugin/cilium/templates/cilium-deploy.yml.j2 | 2 --
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/roles/network_plugin/cilium/templates/cilium-config.yml.j2 b/roles/network_plugin/cilium/templates/cilium-config.yml.j2
index 7df18b3f2..0c8a9b480 100644
--- a/roles/network_plugin/cilium/templates/cilium-config.yml.j2
+++ b/roles/network_plugin/cilium/templates/cilium-config.yml.j2
@@ -25,6 +25,11 @@ data:
     key-file: "{{ cilium_cert_dir }}/key.pem"
     cert-file: "{{ cilium_cert_dir }}/cert.crt"
 
+  # kvstore
+  # https://docs.cilium.io/en/latest/cmdref/kvstore/
+  kvstore: etcd
+  kvstore-opt: '{"etcd.config": "/var/lib/etcd-config/etcd.config"}'
+
   # If you want metrics enabled in all of your Cilium agents, set the port for
   # which the Cilium agents will have their metrics exposed.
   # This option deprecates the "prometheus-serve-addr" in the
diff --git a/roles/network_plugin/cilium/templates/cilium-deploy.yml.j2 b/roles/network_plugin/cilium/templates/cilium-deploy.yml.j2
index baae001c0..38d72b390 100644
--- a/roles/network_plugin/cilium/templates/cilium-deploy.yml.j2
+++ b/roles/network_plugin/cilium/templates/cilium-deploy.yml.j2
@@ -45,8 +45,6 @@ spec:
         - args:
             - --debug=$(CILIUM_DEBUG)
             - --config-dir=/tmp/cilium/config-map
-            - --kvstore=etcd
-            - --kvstore-opt=etcd.config=/var/lib/etcd-config/etcd.config
           command:
             - cilium-operator
           env:
-- 
GitLab