diff --git a/infrastructure/kustomization.yaml b/infrastructure/kustomization.yaml index ccd7ac76c3473c660735824e6293eeffca0c0bda..9cd9c1444afb3b9a81dc54f59b23bc09c5fe9fb7 100644 --- a/infrastructure/kustomization.yaml +++ b/infrastructure/kustomization.yaml @@ -9,3 +9,4 @@ resources: - prometheus - ingress-nginx - node-features + - system-upgrades diff --git a/infrastructure/system-upgrades/calver-server.yaml b/infrastructure/system-upgrades/calver-server.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6fcc0c16ebf399d8cf29f52990fe52545674bc3f --- /dev/null +++ b/infrastructure/system-upgrades/calver-server.yaml @@ -0,0 +1,41 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: calver + labels: + app: calver +spec: + replicas: 1 + selector: + matchLabels: + app: calver + template: + metadata: + labels: + app: calver + spec: + containers: + - name: calver-server + image: quay.io/shivering-isles/calver-server:v1 + ports: + - containerPort: 8080 + resources: + requests: + cpu: 10m + memory: 64MiB + limits: + cpu: 500m + memory: 128MiB +--- +apiVersion: v1 +kind: Service +metadata: + name: calver +spec: + selector: + app: calver + ports: + - name: http + protocol: TCP + port: 80 + targetPort: 8080 diff --git a/infrastructure/system-upgrades/fedora.yaml b/infrastructure/system-upgrades/fedora.yaml new file mode 100644 index 0000000000000000000000000000000000000000..08b09d5badbb417f8f9675facf6a6d9726989125 --- /dev/null +++ b/infrastructure/system-upgrades/fedora.yaml @@ -0,0 +1,38 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + name: fedora-dnf-upgrade + namespace: system-upgrade +type: Opaque +stringData: + upgrade.sh: | + #!/bin/sh + set -e + set -x + dnf upgrade -y --best +--- +apiVersion: upgrade.cattle.io/v1 +kind: Plan +metadata: + name: fedora-35-latest + namespace: system-upgrade +spec: + concurrency: 1 + nodeSelector: + matchExpressions: + - {key: feature.node.kubernetes.io/system-os_release.ID, operator: In, values: ["fedora"]} + - {key: feature.node.kubernetes.io/system-os_release.VERSION_ID.major, operator: In, values: ["35"]} + serviceAccountName: system-upgrade + secrets: + - name: fedora-dnf-upgrade + path: /host/run/system-upgrade/secrets/fedora + drain: + deleteLocalData: true + ignoreDaemonSets: true + force: false + channel: http://calver/weekly + upgrade: + image: docker.io/library/fedora:35 + command: ["chroot", "/host"] + args: ["sh", "/run/system-upgrade/secrets/fedora/upgrade.sh"] diff --git a/infrastructure/system-upgrades/kustomization.yaml b/infrastructure/system-upgrades/kustomization.yaml new file mode 100644 index 0000000000000000000000000000000000000000..aa21fe819b7ec22083f3fe75589fb73c2c085ba1 --- /dev/null +++ b/infrastructure/system-upgrades/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: system-upgrade +resources: + - https://git.shivering-isles.com/github-mirror/rancher/system-upgrade-controller/-/raw/v0.8.1/manifests/system-upgrade-controller.yaml + - fedora.yaml + - calver-server.yaml