Skip to content

Commit

Permalink
ci: install metrics server in talos
Browse files Browse the repository at this point in the history
Signed-off-by: Yang Chiu <[email protected]>
  • Loading branch information
yangchiu committed Dec 6, 2024
1 parent e405244 commit 3d04f5a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pipelines/e2e/scripts/longhorn-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ source pipelines/utilities/install_csi_snapshotter.sh
source pipelines/utilities/create_aws_secret.sh
source pipelines/utilities/create_harvester_secret.sh
source pipelines/utilities/install_backupstores.sh
source pipelines/utilities/install_metrics_server.sh
source pipelines/utilities/create_longhorn_namespace.sh
source pipelines/utilities/longhorn_manifest.sh
source pipelines/utilities/longhorn_ui.sh
Expand Down Expand Up @@ -60,6 +61,10 @@ main(){
longhornctl_check
fi

if [[ "${DISTRO}" == "talos" ]]; then
install_metrics_server
fi

generate_longhorn_yaml_manifest
install_longhorn_by_manifest

Expand Down
4 changes: 4 additions & 0 deletions pipelines/utilities/install_metrics_server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
install_metrics_server(){
kubectl apply -f "https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml"
kubectl patch deployment metrics-server -n kube-system --type='json' -p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--kubelet-insecure-tls"}]'
}
5 changes: 5 additions & 0 deletions test_framework/scripts/longhorn-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -x
source test_framework/scripts/kubeconfig.sh
source pipelines/utilities/longhorn_manifest.sh
source pipelines/utilities/longhorn_ui.sh
source pipelines/utilities/install_metrics_server.sh

# create and clean tmpdir
TMPDIR="/tmp/longhorn"
Expand Down Expand Up @@ -568,6 +569,10 @@ main(){
longhornctl_check
fi

if [[ "${DISTRO}" == "talos" ]]; then
install_metrics_server
fi

if [[ "${AIR_GAP_INSTALLATION}" == true ]]; then
if [[ "${LONGHORN_INSTALL_METHOD}" == "manifest-file" ]]; then
create_registry_secret
Expand Down

0 comments on commit 3d04f5a

Please sign in to comment.