Skip to content

Commit

Permalink
Added support for Restart within service section of custom systemd co…
Browse files Browse the repository at this point in the history
…nfiguration
  • Loading branch information
glitchcrab committed Oct 1, 2024
1 parent 2f7b8b3 commit 8d1ca21
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added support for `After`, `Requires`, `Wants` and `BindsTo` within unit section of custom systemd configuration
- Added support for passing Helm templating from provider chart values through to systemd unit templates
- Added support for `Before` and `PartOf` within unit section of custom systemd configuration
- Added support for `Restart` within service section of custom systemd configuration

### Changed

Expand Down
4 changes: 4 additions & 0 deletions helm/cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@ Provider-specific properties that can be set by cluster-$provider chart in order
| `providerIntegration.bastion.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.service.execStart` | **ExecStart** - systemd service ExecStart.|**Type:** `array`<br/>|
| `providerIntegration.bastion.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.service.execStart[*]` |**None**|**Type:** `string`<br/>|
| `providerIntegration.bastion.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.service.remainAfterExit` | **RemainAfterExit** - systemd service RemainAfterExit.|**Type:** `string`<br/>|
| `providerIntegration.bastion.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.service.restart` | **Restart** - systemd service Restart.|**Type:** `string`<br/>|
| `providerIntegration.bastion.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.service.type` | **Type** - systemd service Type.|**Type:** `string`<br/>|
| `providerIntegration.bastion.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit` | **Unit** - Configuration of the [Unit] section.|**Type:** `object`<br/>|
| `providerIntegration.bastion.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.after` | **After** - systemd unit After.|**Type:** `array`<br/>|
Expand Down Expand Up @@ -704,6 +705,7 @@ Provider-specific properties that can be set by cluster-$provider chart in order
| `providerIntegration.controlPlane.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.service.execStart` | **ExecStart** - systemd service ExecStart.|**Type:** `array`<br/>|
| `providerIntegration.controlPlane.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.service.execStart[*]` |**None**|**Type:** `string`<br/>|
| `providerIntegration.controlPlane.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.service.remainAfterExit` | **RemainAfterExit** - systemd service RemainAfterExit.|**Type:** `string`<br/>|
| `providerIntegration.controlPlane.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.service.restart` | **Restart** - systemd service Restart.|**Type:** `string`<br/>|
| `providerIntegration.controlPlane.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.service.type` | **Type** - systemd service Type.|**Type:** `string`<br/>|
| `providerIntegration.controlPlane.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit` | **Unit** - Configuration of the [Unit] section.|**Type:** `object`<br/>|
| `providerIntegration.controlPlane.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.after` | **After** - systemd unit After.|**Type:** `array`<br/>|
Expand Down Expand Up @@ -810,6 +812,7 @@ Provider-specific properties that can be set by cluster-$provider chart in order
| `providerIntegration.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.service.execStart` | **ExecStart** - systemd service ExecStart.|**Type:** `array`<br/>|
| `providerIntegration.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.service.execStart[*]` |**None**|**Type:** `string`<br/>|
| `providerIntegration.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.service.remainAfterExit` | **RemainAfterExit** - systemd service RemainAfterExit.|**Type:** `string`<br/>|
| `providerIntegration.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.service.restart` | **Restart** - systemd service Restart.|**Type:** `string`<br/>|
| `providerIntegration.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.service.type` | **Type** - systemd service Type.|**Type:** `string`<br/>|
| `providerIntegration.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit` | **Unit** - Configuration of the [Unit] section.|**Type:** `object`<br/>|
| `providerIntegration.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.after` | **After** - systemd unit After.|**Type:** `array`<br/>|
Expand Down Expand Up @@ -949,6 +952,7 @@ Provider-specific properties that can be set by cluster-$provider chart in order
| `providerIntegration.workers.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.service.execStart` | **ExecStart** - systemd service ExecStart.|**Type:** `array`<br/>|
| `providerIntegration.workers.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.service.execStart[*]` |**None**|**Type:** `string`<br/>|
| `providerIntegration.workers.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.service.remainAfterExit` | **RemainAfterExit** - systemd service RemainAfterExit.|**Type:** `string`<br/>|
| `providerIntegration.workers.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.service.restart` | **Restart** - systemd service Restart.|**Type:** `string`<br/>|
| `providerIntegration.workers.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.service.type` | **Type** - systemd service Type.|**Type:** `string`<br/>|
| `providerIntegration.workers.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit` | **Unit** - Configuration of the [Unit] section.|**Type:** `object`<br/>|
| `providerIntegration.workers.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.after` | **After** - systemd unit After.|**Type:** `array`<br/>|
Expand Down
3 changes: 3 additions & 0 deletions helm/cluster/templates/clusterapi/_helpers_flatcar.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
[Service]
Type={{ .contents.service.type }}
RemainAfterExit={{ .contents.service.remainAfterExit }}
{{- if .contents.service.restart }}
Restart={{ .contents.service.restart }}
{{- end }}
{{- if .contents.service.execStart }}
{{- range $execStart := .contents.service.execStart }}
ExecStart={{ $execStart }}
Expand Down
5 changes: 5 additions & 0 deletions helm/cluster/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,11 @@
"type": "string",
"title": "RemainAfterExit",
"description": "systemd service RemainAfterExit."
},
"restart": {
"type": "string",
"title": "Restart",
"description": "systemd service Restart."
}
}
},
Expand Down

0 comments on commit 8d1ca21

Please sign in to comment.