Skip to content

Commit 74becb9

Browse files
authored
Merge pull request #77 from tdussmann/chore/update-cert-manager-with-helm
chore: Update cert-manager with helm
2 parents fb321f7 + a3e9f44 commit 74becb9

2 files changed

Lines changed: 36 additions & 6 deletions

File tree

setup/setup-canary.sh

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,14 @@ if ! grep -q 'dm_crypt' /etc/modules; then
114114
echo "dm_crypt" | sudo tee -a /etc/modules
115115
fi
116116

117-
# Installation of k3s
118-
#curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--node-ip=192.168.1.2 --advertise-address=192.168.1.2 --node-external-ip=188.245.236.232 --flannel-iface=enp7s0" INSTALL_K3S_VERSION="v1.31.3+k3s1" sh -
117+
# Installation of helm
118+
sudo apt-get install apt-transport-https gpg --yes
119+
curl -fsSL https://packages.buildkite.com/helm-linux/helm-debian/gpgkey | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg >/dev/null
120+
echo "deb [signed-by=/usr/share/keyrings/helm.gpg] https://packages.buildkite.com/helm-linux/helm-debian/any/ any main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
121+
sudo apt-get update
122+
sudo apt-get install helm
119123

124+
# Installation of k3s
120125
echo "Installing k3s with --flannel-iface=$selected_iface"
121126
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--flannel-iface=$selected_iface" INSTALL_K3S_VERSION="$K3S_VERSION" sh -
122127
# Todo: Check for Ready node, takes ~30 seconds
@@ -131,11 +136,22 @@ echo "Waiting for Longhorn to start..."
131136
wait_until_all_pods_running
132137

133138
# Installation of Cert-Manager
134-
sudo kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.16.1/cert-manager.yaml
139+
140+
# Installation of Cert-Manager
141+
sudo helm --kubeconfig /etc/rancher/k3s/k3s.yaml install \
142+
cert-manager oci://quay.io/jetstack/charts/cert-manager \
143+
--version v1.18.6 \
144+
--namespace cert-manager \
145+
--create-namespace \
146+
--set crds.enabled=true
147+
135148
echo "Waiting for Cert-Manager to start..."
136149
wait_until_all_pods_running
137150
sudo kubectl -n cert-manager get pod
138151

152+
# Use this for manually upgrading cert-manager using helm:
153+
# helm upgrade --reset-then-reuse-values --version <version> <release_name> oci://quay.io/jetstack/charts/cert-manager
154+
139155
# Checking installation of Longhorn
140156
sudo curl -sSfL "https://raw.githubusercontent.com/longhorn/longhorn/${LONGHORN_VERSION}/scripts/environment_check.sh" | sudo bash
141157

setup/setup.sh

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,14 @@ if ! grep -q 'dm_crypt' /etc/modules; then
115115
echo "dm_crypt" | sudo tee -a /etc/modules
116116
fi
117117

118-
# Installation of k3s
119-
#curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--node-ip=192.168.1.2 --advertise-address=192.168.1.2 --node-external-ip=188.245.236.232 --flannel-iface=enp7s0" INSTALL_K3S_VERSION="v1.31.3+k3s1" sh -
118+
# Installation of helm
119+
sudo apt-get install apt-transport-https gpg --yes
120+
curl -fsSL https://packages.buildkite.com/helm-linux/helm-debian/gpgkey | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg >/dev/null
121+
echo "deb [signed-by=/usr/share/keyrings/helm.gpg] https://packages.buildkite.com/helm-linux/helm-debian/any/ any main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
122+
sudo apt-get update
123+
sudo apt-get install helm
120124

125+
# Installation of k3s
121126
echo "Installing k3s with --flannel-iface=$selected_iface"
122127
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--flannel-iface=$selected_iface" INSTALL_K3S_VERSION="$K3S_VERSION" sh -
123128
# Todo: Check for Ready node, takes ~30 seconds
@@ -132,11 +137,20 @@ echo "Waiting for Longhorn to start..."
132137
wait_until_all_pods_running
133138

134139
# Installation of Cert-Manager
135-
sudo kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.16.1/cert-manager.yaml
140+
sudo helm --kubeconfig /etc/rancher/k3s/k3s.yaml install \
141+
cert-manager oci://quay.io/jetstack/charts/cert-manager \
142+
--version v1.18.6 \
143+
--namespace cert-manager \
144+
--create-namespace \
145+
--set crds.enabled=true
146+
136147
echo "Waiting for Cert-Manager to start..."
137148
wait_until_all_pods_running
138149
sudo kubectl -n cert-manager get pod
139150

151+
# Use this for manually upgrading cert-manager using helm:
152+
# helm upgrade --reset-then-reuse-values --version <version> <release_name> oci://quay.io/jetstack/charts/cert-manager
153+
140154
# Use this for checking installation of Longhorn
141155
# sudo curl -sSfL https://raw.githubusercontent.com/longhorn/longhorn/v1.7.2/scripts/environment_check.sh | sudo bash
142156

0 commit comments

Comments
 (0)