-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For * APT based * YUM based * Flatcar Signed-off-by: Artiom Diomin <[email protected]>
- Loading branch information
Showing
5 changed files
with
702 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Unnatended Upgrades | ||
|
||
This addon will automate upgrading system packages of the distro of your choice. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: unnatended-upgrades-install | ||
namespace: kube-system | ||
spec: | ||
selector: | ||
matchLabels: | ||
name: unnatended-upgrades-install | ||
updateStrategy: | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
labels: | ||
name: unnatended-upgrades-install | ||
spec: | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: v1.machine-controller.kubermatic.io/operating-system | ||
operator: In | ||
values: | ||
- ubuntu | ||
- matchExpressions: | ||
- key: v1.kubeone.io/operating-system | ||
operator: In | ||
values: | ||
- ubuntu | ||
- debian | ||
tolerations: | ||
- key: node-role.kubernetes.io/master | ||
effect: NoSchedule | ||
hostPID: true | ||
containers: | ||
- name: "unnatended-upgrades-install" | ||
image: "alpine:3.12.4" | ||
securityContext: | ||
privileged: true | ||
command: | ||
- | | ||
#!/bin/sh | ||
set -xeuo pipefail | ||
apk add --no-cache bash util-linux | ||
EXEC=(nsenter -t 1 -m -u -i -n -p --) | ||
"${EXEC[@]}" bash -c "${STARTUP_SCRIPT}" | ||
sleep inf | ||
env: | ||
- name: STARTUP_SCRIPT | ||
value: | | ||
#!/usr/bin/env bash | ||
set -xeuo pipefail | ||
export DEBIAN_FRONTEND=noninteractive | ||
apt-get update | ||
apt-get install -y --no-install-recommends \ | ||
apt-utils \ | ||
unattended-upgrades |
Oops, something went wrong.