Skip to content

Commit

Permalink
Change profile separator to double dash
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuckal777 committed Sep 14, 2021
1 parent 7604dc6 commit b4eeb83
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Check chains be build using boolean expression, e.g. ```transition && !(a || b)`
To attach a maintenance profile to a node, the label ```cloud.sap/maintenance-profile=NAME``` has to be assigned the desired profile name.
If that label is not present on a node the controller will use the ```default``` profile, which does nothing at all.
The default profile can be reconfigured if it is defined within the config file.
Multiple profiles can be assigned to a single node be setting ```cloud.sap/maintenance-profile=NAME1-NAME2-NAME3-...```.
Multiple profiles can be assigned to a single node be setting ```cloud.sap/maintenance-profile=NAME1--NAME2--NAME3--...```.
The operational state can then be left by the checks configured in all listed profiles.
Any progress for the maintenance-required and in-maintenance states can only made using the profile, which initial triggered the whole maintenance workflow.
That way specific maintenance workflows for different causes can be implemented.
Expand Down
2 changes: 1 addition & 1 deletion controllers/node_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ var _ = Describe("The controller", func() {

node.Annotations = make(map[string]string)
node.Labels = make(map[string]string)
node.Labels[ProfileLabelKey] = "block-multi"
node.Labels[ProfileLabelKey] = "block--multi"
node.Labels["transition"] = trueStr
err = k8sClient.Patch(context.Background(), &node, client.MergeFrom(unmodifiedNode))
Expect(err).To(Succeed())
Expand Down
2 changes: 1 addition & 1 deletion state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const Required NodeStateLabel = "maintenance-required"
const InMaintenance NodeStateLabel = "in-maintenance"

// profileSeparator is used to split the maintenance profile label string into multple profile names.
const profileSeparator string = "-"
const profileSeparator string = "--"

// PluginChains is a struct containing a plugin chain of each plugin type.
type PluginChains struct {
Expand Down

0 comments on commit b4eeb83

Please sign in to comment.