Skip to content

Commit

Permalink
Allow kube-proxy traffic
Browse files Browse the repository at this point in the history
  • Loading branch information
mnaser committed May 30, 2024
1 parent 3e90676 commit f7b781d
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 0 deletions.
Empty file.
Empty file.
Empty file.
18 changes: 18 additions & 0 deletions magnum_cluster_api/files/run/kubeadm/configure-kube-proxy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

# SPDX-License-Identifier: Apache-2.0

set -o pipefail
set -o errexit
set -o nounset

if grep -q "KubeProxyConfiguration" /run/kubeadm/kubeadm.yaml; then
exit 0
fi

cat <<EOF >> /run/kubeadm/kubeadm.yaml
---
apiVersion: kubeproxy.config.k8s.io/v1alpha1
kind: KubeProxyConfiguration
metricsBindAddress: "0.0.0.0:10249"
EOF
13 changes: 13 additions & 0 deletions magnum_cluster_api/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# under the License.

import glob
import importlib.resources
import json
import os
import textwrap
Expand Down Expand Up @@ -640,6 +641,18 @@ def get_object(self) -> objects.KubeadmControlPlaneTemplate:
),
"encoding": "base64",
},
{
"path": "/run/kubeadm/configure-kube-proxy.sh",
"permissions": "0755",
"content": base64.encode_as_text(
importlib.resources.files(
"magnum_cluster_api.files.run.kubeadm"
)
.joinpath("configure-kube-proxy.sh")
.read_text()
),
"encoding": "base64",
},
],
"initConfiguration": {
"nodeRegistration": {
Expand Down

0 comments on commit f7b781d

Please sign in to comment.