Skip to content

Commit

Permalink
Merge branch 'main' into helm-backoff-limit
Browse files Browse the repository at this point in the history
  • Loading branch information
dbw7 authored Aug 23, 2024
2 parents a803c73 + da4821c commit 809e75b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 16 deletions.
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Improved Kubernetes definition validation
* Allow RKE2 deployments with Calico, Cilium and Multus on aarch64 platforms
* Helm chart installation backOffLimit changed from 1000(default) to 20
* Improved Kubernetes resource installation handling
* Ensure that kernel arguments are applied during firstboot when kexec is used in ISO installations

## API
Expand Down
9 changes: 5 additions & 4 deletions pkg/combustion/templates/k3s-multi-node-installer.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ for file in /opt/eib-k8s/manifests/*; do
output=$(/opt/bin/kubectl create -f "$file" --kubeconfig=/etc/rancher/k3s/k3s.yaml 2>&1)
if [ $? != 0 ]; then
if [[ "$output" != *"AlreadyExists"* ]]; then
failed=true
while IFS= read -r line; do
if [[ "$line" != *"AlreadyExists"* ]]; then
failed=true
fi
done <<< "$output"
fi
echo "$output"
done
Expand All @@ -64,7 +66,6 @@ cat <<- EOF > /etc/systemd/system/kubernetes-resources-install.service
[Unit]
Description=Kubernetes Resources Install
Requires=k3s.service
PartOf=k3s.service
After=k3s.service
ConditionPathExists=/opt/bin/kubectl
ConditionPathExists=/etc/rancher/k3s/k3s.yaml
Expand All @@ -76,7 +77,7 @@ WantedBy=multi-user.target
Type=oneshot
Restart=on-failure
RestartSec=60
ExecStartPre=/bin/sh -c 'until systemctl is-active --quiet k3s.service; do sleep 10; done'
ExecStartPre=/bin/sh -c 'until [ "\$(systemctl show -p SubState --value k3s.service)" = "running" ]; do sleep 10; done'
ExecStart=/opt/eib-k8s/create_manifests.sh
# Disable the service and clean up
ExecStartPost=/bin/sh -c "systemctl disable kubernetes-resources-install.service"
Expand Down
9 changes: 5 additions & 4 deletions pkg/combustion/templates/k3s-single-node-installer.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ for file in /opt/eib-k8s/manifests/*; do
output=$(/opt/bin/kubectl create -f "$file" --kubeconfig=/etc/rancher/k3s/k3s.yaml 2>&1)
if [ $? != 0 ]; then
if [[ "$output" != *"AlreadyExists"* ]]; then
failed=true
while IFS= read -r line; do
if [[ "$line" != *"AlreadyExists"* ]]; then
failed=true
fi
done <<< "$output"
fi
echo "$output"
done
Expand All @@ -38,7 +40,6 @@ cat <<- EOF > /etc/systemd/system/kubernetes-resources-install.service
[Unit]
Description=Kubernetes Resources Install
Requires=k3s.service
PartOf=k3s.service
After=k3s.service
ConditionPathExists=/opt/bin/kubectl
ConditionPathExists=/etc/rancher/k3s/k3s.yaml
Expand All @@ -50,7 +51,7 @@ WantedBy=multi-user.target
Type=oneshot
Restart=on-failure
RestartSec=60
ExecStartPre=/bin/sh -c 'until systemctl is-active --quiet k3s.service; do sleep 10; done'
ExecStartPre=/bin/sh -c 'until [ "\$(systemctl show -p SubState --value k3s.service)" = "running" ]; do sleep 10; done'
ExecStart=/opt/eib-k8s/create_manifests.sh
# Disable the service and clean up
ExecStartPost=/bin/sh -c "systemctl disable kubernetes-resources-install.service"
Expand Down
9 changes: 5 additions & 4 deletions pkg/combustion/templates/rke2-multi-node-installer.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ for file in /opt/eib-k8s/manifests/*; do
output=$(/opt/eib-k8s/kubectl create -f "$file" --kubeconfig /etc/rancher/rke2/rke2.yaml 2>&1)
if [ $? != 0 ]; then
if [[ "$output" != *"AlreadyExists"* ]]; then
failed=true
while IFS= read -r line; do
if [[ "$line" != *"AlreadyExists"* ]]; then
failed=true
fi
done <<< "$output"
fi
echo "$output"
done
Expand All @@ -64,7 +66,6 @@ cat <<- EOF > /etc/systemd/system/kubernetes-resources-install.service
[Unit]
Description=Kubernetes Resources Install
Requires=rke2-server.service
PartOf=rke2-server.service
After=rke2-server.service
ConditionPathExists=/var/lib/rancher/rke2/bin/kubectl
ConditionPathExists=/etc/rancher/rke2/rke2.yaml
Expand All @@ -77,7 +78,7 @@ Type=oneshot
Restart=on-failure
RestartSec=60
# Copy kubectl in order to avoid SELinux permission issues
ExecStartPre=/bin/sh -c 'until systemctl is-active --quiet rke2-server.service; do sleep 10; done'
ExecStartPre=/bin/sh -c 'until [ "\$(systemctl show -p SubState --value rke2-server.service)" = "running" ]; do sleep 10; done'
ExecStartPre=cp /var/lib/rancher/rke2/bin/kubectl /opt/eib-k8s/kubectl
ExecStart=/opt/eib-k8s/create_manifests.sh
# Disable the service and clean up
Expand Down
9 changes: 5 additions & 4 deletions pkg/combustion/templates/rke2-single-node-installer.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ for file in /opt/eib-k8s/manifests/*; do
output=$(/opt/eib-k8s/kubectl create -f "$file" --kubeconfig /etc/rancher/rke2/rke2.yaml 2>&1)
if [ $? != 0 ]; then
if [[ "$output" != *"AlreadyExists"* ]]; then
failed=true
while IFS= read -r line; do
if [[ "$line" != *"AlreadyExists"* ]]; then
failed=true
fi
done <<< "$output"
fi
echo "$output"
done
Expand All @@ -38,7 +40,6 @@ cat <<- EOF > /etc/systemd/system/kubernetes-resources-install.service
[Unit]
Description=Kubernetes Resources Install
Requires=rke2-server.service
PartOf=rke2-server.service
After=rke2-server.service
ConditionPathExists=/var/lib/rancher/rke2/bin/kubectl
ConditionPathExists=/etc/rancher/rke2/rke2.yaml
Expand All @@ -51,7 +52,7 @@ Type=oneshot
Restart=on-failure
RestartSec=60
# Copy kubectl in order to avoid SELinux permission issues
ExecStartPre=/bin/sh -c 'until systemctl is-active --quiet rke2-server.service; do sleep 10; done'
ExecStartPre=/bin/sh -c 'until [ "\$(systemctl show -p SubState --value rke2-server.service)" = "running" ]; do sleep 10; done'
ExecStartPre=cp /var/lib/rancher/rke2/bin/kubectl /opt/eib-k8s/kubectl
ExecStart=/opt/eib-k8s/create_manifests.sh
# Disable the service and clean up
Expand Down

0 comments on commit 809e75b

Please sign in to comment.