Skip to content

Commit

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

var Node_1_24 = `
variant: flatcar
version: 1.0.0
passwd:
users:
- name: core
{{- if .Gardenlinux }}
shell: /bin/bash
groups:
- sudo
{{- end }}
- name: core
password_hash: {{ .LoginPassword }}
{{- if .LoginPublicKey }}
ssh_authorized_keys:
Expand All @@ -21,7 +14,7 @@ passwd:
systemd:
units:
- name: ccloud-metadata-hostname.service
enabled: true
enable: true
contents: |
[Unit]
Description=Workaround for coreos-metadata hostname bug
Expand All @@ -34,25 +27,23 @@ systemd:
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
{{- if .Flatcar }}
- name: containerd.service
enabled: true
enable: 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
enabled: true
enable: true
dropins:
- name: 20-docker-opts.conf
contents: |
[Service]
Environment="DOCKER_OPTS=--iptables=false --bridge=none"
- name: kubelet.service
enabled: true
enable: true
contents: |
[Unit]
Description=Kubelet
Expand Down Expand Up @@ -90,7 +81,7 @@ systemd:
WantedBy=multi-user.target
- name: updatecertificates.service
command: start
enabled: true
enable: true
contents: |
[Unit]
Description=Update the certificates w/ self-signed root CAs
Expand All @@ -104,20 +95,6 @@ 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 @@ -176,7 +153,6 @@ storage:
- path: /etc/systemd/resolved.conf
filesystem: root
mode: 0644
overwrite: true
contents:
inline: |
[Resolve]
Expand Down Expand Up @@ -353,14 +329,12 @@ 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: 6 additions & 32 deletions pkg/templates/node_1.26.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,9 @@
package templates

var Node_1_26 = `
variant: flatcar
version: 1.0.0
passwd:
users:
- name: core
{{- if .Gardenlinux }}
shell: /bin/bash
groups:
- sudo
{{- end }}
- name: core
password_hash: {{ .LoginPassword }}
{{- if .LoginPublicKey }}
ssh_authorized_keys:
Expand All @@ -21,7 +14,7 @@ passwd:
systemd:
units:
- name: ccloud-metadata-hostname.service
enabled: true
enable: true
contents: |
[Unit]
Description=Workaround for coreos-metadata hostname bug
Expand All @@ -34,25 +27,23 @@ systemd:
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
{{- if .Flatcar }}
- name: containerd.service
enabled: true
enable: 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
enabled: true
enable: true
dropins:
- name: 20-docker-opts.conf
contents: |
[Service]
Environment="DOCKER_OPTS=--iptables=false --bridge=none"
- name: kubelet.service
enabled: true
enable: true
contents: |
[Unit]
Description=Kubelet
Expand Down Expand Up @@ -90,7 +81,7 @@ systemd:
WantedBy=multi-user.target
- name: updatecertificates.service
command: start
enabled: true
enable: true
contents: |
[Unit]
Description=Update the certificates w/ self-signed root CAs
Expand All @@ -104,20 +95,6 @@ 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 @@ -176,7 +153,6 @@ storage:
- path: /etc/systemd/resolved.conf
filesystem: root
mode: 0644
overwrite: true
contents:
inline: |
[Resolve]
Expand Down Expand Up @@ -348,14 +324,12 @@ 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 6cce709

Please sign in to comment.