From e4d9455820916e35e6564f8ca8c5073f0bdbee8a Mon Sep 17 00:00:00 2001
From: hbc <me@hbc.rocks>
Date: Tue, 11 May 2021 17:37:25 +0800
Subject: [PATCH] cfg: add `/etc/default/kubeletconfig.json` for AKS (#865)

* cfg: add `/etc/default/kubeletconfig.json`

* fix(cfg): search kubeletconfig.json first

* feat: mount `/etc/default` from host for AKS cluster

Co-authored-by: Yoav Rotem <yoavrotems97@gmail.com>
---
 cfg/config.yaml | 1 +
 job-aks.yaml    | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/cfg/config.yaml b/cfg/config.yaml
index d4a64b3..2391435 100644
--- a/cfg/config.yaml
+++ b/cfg/config.yaml
@@ -147,6 +147,7 @@ node:
       - "/etc/kubernetes/kubelet/kubelet-config.json"
       - "/home/kubernetes/kubelet-config.yaml"
       - "/home/kubernetes/kubelet-config.yml"
+      - "/etc/default/kubeletconfig.json"
       - "/etc/default/kubelet"
       - "/var/lib/kubelet/kubeconfig"
       - "/var/snap/kubelet/current/args"
diff --git a/job-aks.yaml b/job-aks.yaml
index 56b6e50..766ae55 100644
--- a/job-aks.yaml
+++ b/job-aks.yaml
@@ -18,6 +18,9 @@ spec:
             - name: etc-systemd
               mountPath: /etc/systemd
               readOnly: true
+            - name: etc-default
+              mountPath: /etc/default
+              readOnly: true
             - name: etc-kubernetes
               mountPath: /etc/kubernetes
               readOnly: true
@@ -29,6 +32,9 @@ spec:
         - name: etc-systemd
           hostPath:
             path: "/etc/systemd"
+        - name: etc-default
+          hostPath:
+            path: "/etc/default"
         - name: etc-kubernetes
           hostPath:
             path: "/etc/kubernetes"
-- 
GitLab