-
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.
Merge pull request #625 from gpontejos/falcondeployment-crd
New: Add FalconDeployment CR
- Loading branch information
Showing
42 changed files
with
16,335 additions
and
1,267 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
package v1alpha1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! | ||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. | ||
|
||
// FalconDeploymentSpec defines the desired state of FalconDeployment | ||
// +k8s:openapi-gen=true | ||
type FalconDeploymentSpec struct { | ||
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster | ||
// Important: Run "make" to regenerate code after modifying this file | ||
|
||
// FalconAPI configures connection from your local Falcon operator to CrowdStrike Falcon platform. | ||
// | ||
// When configured, it will pull the sensor from registry.crowdstrike.com and deploy the appropriate sensor to the cluster. | ||
// | ||
// If using the API is not desired, the sensor can be manually configured. | ||
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Falcon Platform API Configuration",order=2 | ||
FalconAPI *FalconAPI `json:"falcon_api"` | ||
|
||
// Registry configures container image registry to which registry image will be pushed. | ||
// +kubebuilder:default:={"type": "crowdstrike"} | ||
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Registry Configuration for FalconAdmission, FalconImageanalyzer, and FalconContainer",order=3 | ||
Registry RegistrySpec `json:"registry,omitempty"` | ||
|
||
// Determines if Falcon Admission Controller is deployed | ||
// +kubebuilder:default:=true | ||
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Deploy Falcon Admission Controller",order=4 | ||
DeployAdmissionController *bool `json:"deployAdmissionController,omitempty"` | ||
|
||
// Determines if Falcon Node Sensor is deployed | ||
// +kubebuilder:default:=true | ||
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Deploy Falcon Node Sensor",order=5 | ||
DeployNodeSensor *bool `json:"deployNodeSensor,omitempty"` | ||
|
||
// Determines if Falcon Node Sensor is deployed | ||
// +kubebuilder:default:=true | ||
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Deploy Falcon Image Analyzer",order=6 | ||
DeployImageAnalyzer *bool `json:"deployImageAnalyzer,omitempty"` | ||
|
||
// Determines if Falcon Container Sensor is deployed | ||
// +kubebuilder:default:=false | ||
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Deploy Falcon Container Sensor",order=7 | ||
DeployContainerSensor *bool `json:"deployContainerSensor,omitempty"` | ||
|
||
// Falcon Admission Controller Configuration | ||
// +kubebuilder:default:={} | ||
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Falcon Admission Controller Configuration",order=8 | ||
FalconAdmission FalconAdmissionSpec `json:"falconAdmission,omitempty"` | ||
|
||
// Falcon Admission Controller Configuration | ||
// +kubebuilder:default:={} | ||
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Falcon Node Sensor Configuration",order=9 | ||
FalconNodeSensor FalconNodeSensorSpec `json:"falconNodeSensor,omitempty"` | ||
|
||
// Falcon Image Analyzer Configuration | ||
// +kubebuilder:default:={} | ||
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Falcon Image Analyzer Configuration",order=10 | ||
FalconImageAnalyzer FalconImageAnalyzerSpec `json:"falconImageAnalyzer,omitempty"` | ||
|
||
// Falcon Container Sensor Configuration | ||
// +kubebuilder:default:={} | ||
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Falcon Container Sensor Configuration",order=11 | ||
FalconContainerSensor FalconContainerSpec `json:"falconContainerSensor,omitempty"` | ||
} | ||
|
||
// FalconDeploymentStatus defines the observed state of FalconDeployment | ||
type FalconDeploymentStatus struct { | ||
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster | ||
// Important: Run "make" to regenerate code after modifying this file | ||
|
||
// Version of the CrowdStrike Falcon Sensor | ||
Sensor *string `json:"sensor,omitempty"` | ||
|
||
// Version of the CrowdStrike Falcon Operator | ||
Version string `json:"version,omitempty"` | ||
|
||
// +optional | ||
Conditions []metav1.Condition `json:"conditions,omitempty"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
//+kubebuilder:subresource:status | ||
//+kubebuilder:resource:scope=Cluster | ||
//+kubebuilder:printcolumn:name="Operator Version",type="string",JSONPath=".status.version",description="Version of the Operator" | ||
//+kubebuilder:printcolumn:name="Falcon Sensor",type="string",JSONPath=".status.sensor",description="Version of the Falcon Container" | ||
|
||
// FalconDeployment is the Schema for the falcondeployments API | ||
type FalconDeployment struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec FalconDeploymentSpec `json:"spec,omitempty"` | ||
Status FalconDeploymentStatus `json:"status,omitempty"` | ||
} | ||
|
||
// +kubebuilder:object:root=true | ||
|
||
// FalconDeploymentList contains a list of FalconDeployment | ||
type FalconDeploymentList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []FalconDeployment `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&FalconDeployment{}, &FalconDeploymentList{}) | ||
} |
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
27 changes: 27 additions & 0 deletions
27
...perator-falcon-FalconDeployment-editor-role_rbac.authorization.k8s.io_v1_clusterrole.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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/managed-by: kustomize | ||
app.kubernetes.io/name: falcon-operator | ||
name: falcon-operator-falcon-FalconDeployment-editor-role | ||
rules: | ||
- apiGroups: | ||
- falcon.crowdstrike.com | ||
resources: | ||
- falcondeployments | ||
verbs: | ||
- create | ||
- delete | ||
- get | ||
- list | ||
- patch | ||
- update | ||
- watch | ||
- apiGroups: | ||
- falcon.crowdstrike.com | ||
resources: | ||
- falcondeployments/status | ||
verbs: | ||
- get |
23 changes: 23 additions & 0 deletions
23
...perator-falcon-FalconDeployment-viewer-role_rbac.authorization.k8s.io_v1_clusterrole.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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/managed-by: kustomize | ||
app.kubernetes.io/name: falcon-operator | ||
name: falcon-operator-falcon-FalconDeployment-viewer-role | ||
rules: | ||
- apiGroups: | ||
- falcon.crowdstrike.com | ||
resources: | ||
- falcondeployments | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- falcon.crowdstrike.com | ||
resources: | ||
- falcondeployments/status | ||
verbs: | ||
- get |
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.