-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
1,920 additions
and
333 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package v1alpha1 | ||
|
||
import "strings" | ||
|
||
const ( | ||
Force = "force" | ||
Normal = "normal" | ||
Off = "off" | ||
) | ||
|
||
// FalconAdvanced configures various options that go against industry practices or are otherwise not recommended for use. | ||
// Adjusting these settings may result in incorrect or undesirable behavior. Proceed at your own risk. | ||
// For more information, please see https://github.com/CrowdStrike/falcon-operator/blob/main/docs/ADVANCED.md. | ||
type FalconAdvanced struct { | ||
// UpdatePolicy is the name of a sensor update policy configured and enabled in Falcon UI. It is ignored when Image and/or Version are set. | ||
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Falcon Sensor Update Policy",order=1 | ||
UpdatePolicy *string `json:"updatePolicy,omitempty"` | ||
|
||
// AutoUpdate determines whether to install new versions of the sensor as they become available. Defaults to "off" and is ignored if FalconAPI is not set. | ||
// Setting this to "force" causes the reconciler to run on every polling cycle, even if a new sensor version is not available. | ||
// Setting it to "normal" only reconciles when a new version is detected. | ||
// +kubebuilder:validation:Enum=off;normal;force | ||
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Falcon Sensor Automatic Updates",order=2 | ||
AutoUpdate *string `json:"autoUpdate,omitempty"` | ||
} | ||
|
||
func (advanced FalconAdvanced) GetUpdatePolicy() string { | ||
if advanced.UpdatePolicy == nil { | ||
return "" | ||
} | ||
|
||
return strings.TrimSpace(*advanced.UpdatePolicy) | ||
} | ||
|
||
func (advanced FalconAdvanced) HasUpdatePolicy() bool { | ||
return advanced.GetUpdatePolicy() != "" | ||
} | ||
|
||
func (advanced FalconAdvanced) IsAutoUpdating() bool { | ||
if advanced.AutoUpdate == nil { | ||
return false | ||
} | ||
|
||
return *advanced.AutoUpdate != "off" | ||
} | ||
|
||
func (advanced FalconAdvanced) IsAutoUpdatingForced() bool { | ||
if advanced.AutoUpdate == nil { | ||
return false | ||
} | ||
|
||
return *advanced.AutoUpdate == "force" | ||
} |
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
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
Oops, something went wrong.