Skip to content

Commit

Permalink
Revert "Remove gardlinux support in 1.24/1.26 template"
Browse files Browse the repository at this point in the history
This reverts commit 6cce709.
  • Loading branch information
jknipper committed Sep 12, 2023
1 parent 6cce709 commit e123af9
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 12 deletions.
38 changes: 32 additions & 6 deletions pkg/templates/node_1.24.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@
package templates

var Node_1_24 = `
variant: flatcar
version: 1.0.0
passwd:
users:
- name: core
- name: core
{{- if .Gardenlinux }}
shell: /bin/bash
groups:
- sudo
{{- end }}
password_hash: {{ .LoginPassword }}
{{- if .LoginPublicKey }}
ssh_authorized_keys:
Expand All @@ -14,7 +21,7 @@ passwd:
systemd:
units:
- name: ccloud-metadata-hostname.service
enable: true
enabled: true
contents: |
[Unit]
Description=Workaround for coreos-metadata hostname bug
Expand All @@ -27,23 +34,25 @@ systemd:
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
{{- if .Flatcar }}
- name: containerd.service
enable: true
enabled: true
dropins:
- name: 10-custom-config.conf
contents: |
[Service]
ExecStart=
ExecStart=/usr/bin/env PATH=${TORCX_BINDIR}:${PATH} ${TORCX_BINDIR}/containerd
{{- end }}
- name: docker.service
enable: true
enabled: true
dropins:
- name: 20-docker-opts.conf
contents: |
[Service]
Environment="DOCKER_OPTS=--iptables=false --bridge=none"
- name: kubelet.service
enable: true
enabled: true
contents: |
[Unit]
Description=Kubelet
Expand Down Expand Up @@ -81,7 +90,7 @@ systemd:
WantedBy=multi-user.target
- name: updatecertificates.service
command: start
enable: true
enabled: true
contents: |
[Unit]
Description=Update the certificates w/ self-signed root CAs
Expand All @@ -95,6 +104,20 @@ systemd:
WantedBy=multi-user.target
storage:
files:
{{- if .Gardenlinux }}
- path: /etc/sudoers.d/core
filesystem: root
mode: 0644
contents:
inline: |
core ALL=(ALL) NOPASSWD:ALL
- path: /etc/ssh/sshd_config.d/20-enable-passwords.conf
filesystem: root
mode: 0644
contents:
inline: |
PasswordAuthentication yes
{{- end }}
- path: /etc/crictl.yaml
filesystem: root
mode: 0644
Expand Down Expand Up @@ -153,6 +176,7 @@ storage:
- path: /etc/systemd/resolved.conf
filesystem: root
mode: 0644
overwrite: true
contents:
inline: |
[Resolve]
Expand Down Expand Up @@ -329,12 +353,14 @@ storage:
CSIMigrationOpenStack: true
ExpandCSIVolumes: true
{{- end }}
{{- if .Flatcar }}
- path: /etc/flatcar/update.conf
filesystem: root
mode: 0644
contents:
inline: |-
REBOOT_STRATEGY="off"
{{- end }}
- path: /etc/modules-load.d/br_netfilter.conf
filesystem: root
mode: 0644
Expand Down
38 changes: 32 additions & 6 deletions pkg/templates/node_1.26.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@
package templates

var Node_1_26 = `
variant: flatcar
version: 1.0.0
passwd:
users:
- name: core
- name: core
{{- if .Gardenlinux }}
shell: /bin/bash
groups:
- sudo
{{- end }}
password_hash: {{ .LoginPassword }}
{{- if .LoginPublicKey }}
ssh_authorized_keys:
Expand All @@ -14,7 +21,7 @@ passwd:
systemd:
units:
- name: ccloud-metadata-hostname.service
enable: true
enabled: true
contents: |
[Unit]
Description=Workaround for coreos-metadata hostname bug
Expand All @@ -27,23 +34,25 @@ systemd:
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
{{- if .Flatcar }}
- name: containerd.service
enable: true
enabled: true
dropins:
- name: 10-custom-config.conf
contents: |
[Service]
ExecStart=
ExecStart=/usr/bin/env PATH=${TORCX_BINDIR}:${PATH} ${TORCX_BINDIR}/containerd
{{- end }}
- name: docker.service
enable: true
enabled: true
dropins:
- name: 20-docker-opts.conf
contents: |
[Service]
Environment="DOCKER_OPTS=--iptables=false --bridge=none"
- name: kubelet.service
enable: true
enabled: true
contents: |
[Unit]
Description=Kubelet
Expand Down Expand Up @@ -81,7 +90,7 @@ systemd:
WantedBy=multi-user.target
- name: updatecertificates.service
command: start
enable: true
enabled: true
contents: |
[Unit]
Description=Update the certificates w/ self-signed root CAs
Expand All @@ -95,6 +104,20 @@ systemd:
WantedBy=multi-user.target
storage:
files:
{{- if .Gardenlinux }}
- path: /etc/sudoers.d/core
filesystem: root
mode: 0644
contents:
inline: |
core ALL=(ALL) NOPASSWD:ALL
- path: /etc/ssh/sshd_config.d/20-enable-passwords.conf
filesystem: root
mode: 0644
contents:
inline: |
PasswordAuthentication yes
{{- end }}
- path: /etc/crictl.yaml
filesystem: root
mode: 0644
Expand Down Expand Up @@ -153,6 +176,7 @@ storage:
- path: /etc/systemd/resolved.conf
filesystem: root
mode: 0644
overwrite: true
contents:
inline: |
[Resolve]
Expand Down Expand Up @@ -324,12 +348,14 @@ storage:
nodeLeaseDurationSeconds: 20
cgroupDriver: systemd
featureGates:
{{- if .Flatcar }}
- path: /etc/flatcar/update.conf
filesystem: root
mode: 0644
contents:
inline: |-
REBOOT_STRATEGY="off"
{{- end }}
- path: /etc/modules-load.d/br_netfilter.conf
filesystem: root
mode: 0644
Expand Down

0 comments on commit e123af9

Please sign in to comment.