-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Add managedosversion finalizer (#775) * Implement ManagedOSVersion controller and finalizer Signed-off-by: Andrea Mazzotti <[email protected]> * Remove unused ManagedOSVersion Status Signed-off-by: Andrea Mazzotti <[email protected]> * Block reinstall if crds are still pending to be deleted (#784) Signed-off-by: David Cassany <[email protected]> --------- Signed-off-by: Andrea Mazzotti <[email protected]> Signed-off-by: David Cassany <[email protected]>
- Loading branch information
1 parent
d745f7d
commit a916d43
Showing
14 changed files
with
382 additions
and
865 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
19 changes: 15 additions & 4 deletions
19
.obs/chartfile/crds/templates/validate-no-pending-deletions.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
{{- $inventoryCRD := lookup "apiextensions.k8s.io/v1" "CustomResourceDefinition" .Release.Namespace "machineinventories.elemental.cattle.io" -}} | ||
{{- if $inventoryCRD -}} | ||
{{- if $inventoryCRD.metadata.deletionTimestamp -}} | ||
{{- required "CRDs from previous installations are pending to be removed (deletionTimestamp is set). Fully deleting them before (re-)installing is required" "" -}} | ||
{{- $crds := list | ||
"machineinventories.elemental.cattle.io" | ||
"machineinventoryselectors.elemental.cattle.io" | ||
"machineinventoryselectortemplates.elemental.cattle.io" | ||
"machineregistrations.elemental.cattle.io" | ||
"managedosimages.elemental.cattle.io" | ||
"managedosversionchannels.elemental.cattle.io" | ||
"managedosversions.elemental.cattle.io" | ||
"seedimages.elemental.cattle.io" | ||
"metadata.elemental.cattle.io" | ||
-}} | ||
{{- range $index, $crd := $crds -}} | ||
{{- $obj := lookup "apiextensions.k8s.io/v1" "CustomResourceDefinition" $.Release.Namespace $crd -}} | ||
{{- if and $obj $obj.metadata.deletionTimestamp -}} | ||
{{- required "CRDs from previous installations are pending to be removed (deletionTimestamp is set). Fully deleting them before (re-)installing is required" "" -}} | ||
{{- end -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -215,6 +215,7 @@ rules: | |
- managedosversions/status | ||
verbs: | ||
- get | ||
- list | ||
- patch | ||
- update | ||
- apiGroups: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.