Skip to content

Commit

Permalink
support multiple fields for dependency ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
glitchcrab committed Sep 27, 2024
1 parent 68b4d3b commit 2b72e88
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Added support for `Service` section in custom systemd configuration
- Added support for `After` and `BindsTo` within unit section of custom systemd configuration
- Added support for `After`, `Wants` and `BindsTo` within unit section of custom systemd configuration

## [1.4.1] - 2024-09-23

Expand Down
20 changes: 16 additions & 4 deletions helm/cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -576,10 +576,13 @@ Provider-specific properties that can be set by cluster-$provider chart in order
| `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.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:** `string`<br/>|
| `providerIntegration.bastion.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.after` | **After** - systemd unit After.|**Type:** `array`<br/>|
| `providerIntegration.bastion.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.after[*]` |**None**|**Type:** `string`<br/>|
| `providerIntegration.bastion.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.bindsTo` | **BindsTo** - systemd unit BindsTo.|**Type:** `string`<br/>|
| `providerIntegration.bastion.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.defaultDependencies` | **DefaultDependencies** - Flag that indicates if this systemd unit should have the default systemd unit dependencies.|**Type:** `boolean`<br/>|
| `providerIntegration.bastion.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.description` | **Description** - systemd unit description.|**Type:** `string`<br/>|
| `providerIntegration.bastion.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.wants` | **Wants** - systemd unit Wants.|**Type:** `array`<br/>|
| `providerIntegration.bastion.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.wants[*]` |**None**|**Type:** `string`<br/>|
| `providerIntegration.bastion.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].dropins` | **Unit drop-ins** - The list of drop-ins for the unit|**Type:** `array`<br/>|
| `providerIntegration.bastion.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].dropins[*]` | **Unit drop-in**|**Type:** `object`<br/>|
| `providerIntegration.bastion.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].dropins[*].contents` | **Contents** - The contents of the drop-in.|**Type:** `string`<br/>|
Expand Down Expand Up @@ -695,10 +698,13 @@ Provider-specific properties that can be set by cluster-$provider chart in order
| `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.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:** `string`<br/>|
| `providerIntegration.controlPlane.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.after` | **After** - systemd unit After.|**Type:** `array`<br/>|
| `providerIntegration.controlPlane.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.after[*]` |**None**|**Type:** `string`<br/>|
| `providerIntegration.controlPlane.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.bindsTo` | **BindsTo** - systemd unit BindsTo.|**Type:** `string`<br/>|
| `providerIntegration.controlPlane.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.defaultDependencies` | **DefaultDependencies** - Flag that indicates if this systemd unit should have the default systemd unit dependencies.|**Type:** `boolean`<br/>|
| `providerIntegration.controlPlane.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.description` | **Description** - systemd unit description.|**Type:** `string`<br/>|
| `providerIntegration.controlPlane.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.wants` | **Wants** - systemd unit Wants.|**Type:** `array`<br/>|
| `providerIntegration.controlPlane.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.wants[*]` |**None**|**Type:** `string`<br/>|
| `providerIntegration.controlPlane.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].dropins` | **Unit drop-ins** - The list of drop-ins for the unit|**Type:** `array`<br/>|
| `providerIntegration.controlPlane.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].dropins[*]` | **Unit drop-in**|**Type:** `object`<br/>|
| `providerIntegration.controlPlane.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].dropins[*].contents` | **Contents** - The contents of the drop-in.|**Type:** `string`<br/>|
Expand Down Expand Up @@ -791,10 +797,13 @@ Provider-specific properties that can be set by cluster-$provider chart in order
| `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.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:** `string`<br/>|
| `providerIntegration.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.after` | **After** - systemd unit After.|**Type:** `array`<br/>|
| `providerIntegration.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.after[*]` |**None**|**Type:** `string`<br/>|
| `providerIntegration.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.bindsTo` | **BindsTo** - systemd unit BindsTo.|**Type:** `string`<br/>|
| `providerIntegration.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.defaultDependencies` | **DefaultDependencies** - Flag that indicates if this systemd unit should have the default systemd unit dependencies.|**Type:** `boolean`<br/>|
| `providerIntegration.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.description` | **Description** - systemd unit description.|**Type:** `string`<br/>|
| `providerIntegration.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.wants` | **Wants** - systemd unit Wants.|**Type:** `array`<br/>|
| `providerIntegration.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.wants[*]` |**None**|**Type:** `string`<br/>|
| `providerIntegration.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].dropins` | **Unit drop-ins** - The list of drop-ins for the unit|**Type:** `array`<br/>|
| `providerIntegration.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].dropins[*]` | **Unit drop-in**|**Type:** `object`<br/>|
| `providerIntegration.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].dropins[*].contents` | **Contents** - The contents of the drop-in.|**Type:** `string`<br/>|
Expand Down Expand Up @@ -920,10 +929,13 @@ Provider-specific properties that can be set by cluster-$provider chart in order
| `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.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:** `string`<br/>|
| `providerIntegration.workers.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.after` | **After** - systemd unit After.|**Type:** `array`<br/>|
| `providerIntegration.workers.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.after[*]` |**None**|**Type:** `string`<br/>|
| `providerIntegration.workers.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.bindsTo` | **BindsTo** - systemd unit BindsTo.|**Type:** `string`<br/>|
| `providerIntegration.workers.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.defaultDependencies` | **DefaultDependencies** - Flag that indicates if this systemd unit should have the default systemd unit dependencies.|**Type:** `boolean`<br/>|
| `providerIntegration.workers.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.description` | **Description** - systemd unit description.|**Type:** `string`<br/>|
| `providerIntegration.workers.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.wants` | **Wants** - systemd unit Wants.|**Type:** `array`<br/>|
| `providerIntegration.workers.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].contents.unit.wants[*]` |**None**|**Type:** `string`<br/>|
| `providerIntegration.workers.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].dropins` | **Unit drop-ins** - The list of drop-ins for the unit|**Type:** `array`<br/>|
| `providerIntegration.workers.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].dropins[*]` | **Unit drop-in**|**Type:** `object`<br/>|
| `providerIntegration.workers.kubeadmConfig.ignition.containerLinuxConfig.additionalConfig.systemd.units[*].dropins[*].contents` | **Contents** - The contents of the drop-in.|**Type:** `string`<br/>|
Expand Down
9 changes: 8 additions & 1 deletion helm/cluster/templates/clusterapi/_helpers_flatcar.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@
DefaultDependencies={{ if .contents.unit.defaultDependencies }}yes{{ else }}no{{ end }}
{{- end }}
{{- if .contents.unit.after }}
After={{ .contents.unit.after }}
{{- range $after := .contents.install.after }}
After={{ $after }}
{{- end }}
{{- end }}
{{- if .contents.unit.wants }}
{{- range $wants := .contents.install.wants }}
Wants={{ $wants }}
{{- end }}
{{- end }}
{{- if .contents.unit.bindsTo }}
BindsTo={{ .contents.unit.bindsTo }}
Expand Down
15 changes: 13 additions & 2 deletions helm/cluster/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -973,9 +973,12 @@
"description": "systemd unit description."
},
"after": {
"type": "string",
"type": "array",
"title": "After",
"description": "systemd unit After."
"description": "systemd unit After.",
"items": {
"type": "string"
}
},
"bindsTo": {
"type": "string",
Expand All @@ -986,6 +989,14 @@
"type": "boolean",
"title": "DefaultDependencies",
"description": "Flag that indicates if this systemd unit should have the default systemd unit dependencies."
},
"wants": {
"type": "array",
"title": "Wants",
"description": "systemd unit Wants.",
"items": {
"type": "string"
}
}
}
}
Expand Down

0 comments on commit 2b72e88

Please sign in to comment.