diff --git a/api/v1/cndr_types.go b/api/v1/cndr_types.go index d036ea22..cc600c56 100644 --- a/api/v1/cndr_types.go +++ b/api/v1/cndr_types.go @@ -17,7 +17,7 @@ type CBContainersCndrSensorSpec struct { Image CBContainersImageSpec `json:"image,omitempty"` // +kubebuilder:default:={requests: {memory: "64Mi", cpu: "30m"}, limits: {memory: "1024Mi", cpu: "500m"}} Resources coreV1.ResourceRequirements `json:"resources,omitempty"` - // +kubebuilder:default:={initialDelaySeconds: 45, timeoutSeconds: 5, periodSeconds: 30, successThreshold: 1, failureThreshold: 3, readinessPath: "/tmp/ready", livenessPath: "/tmp/alive" } + // +kubebuilder:default:={initialDelaySeconds: 240, timeoutSeconds: 1, periodSeconds: 30, successThreshold: 1, failureThreshold: 5, readinessPath: "/tmp/ready", livenessPath: "/tmp/alive" } Probes CBContainersFileProbesSpec `json:"probes,omitempty"` // +kubebuilder:default:={port: 7071} Prometheus CBContainersPrometheusSpec `json:"prometheus,omitempty"` diff --git a/api/v1/zz_generated.deepcopy.go b/api/v1/zz_generated.deepcopy.go index 4a7d3fff..a6c2f3ac 100644 --- a/api/v1/zz_generated.deepcopy.go +++ b/api/v1/zz_generated.deepcopy.go @@ -254,6 +254,7 @@ func (in *CBContainersCndrSensorSpec) DeepCopyInto(out *CBContainersCndrSensorSp } in.Image.DeepCopyInto(&out.Image) in.Resources.DeepCopyInto(&out.Resources) + out.Probes = in.Probes in.Prometheus.DeepCopyInto(&out.Prometheus) if in.VerbosityLevel != nil { in, out := &in.VerbosityLevel, &out.VerbosityLevel diff --git a/charts/cbcontainers-agent/cbcontainers-agent-chart/example-values.yaml b/charts/cbcontainers-agent/cbcontainers-agent-chart/example-values.yaml index cfdef89a..10705908 100644 --- a/charts/cbcontainers-agent/cbcontainers-agent-chart/example-values.yaml +++ b/charts/cbcontainers-agent/cbcontainers-agent-chart/example-values.yaml @@ -205,5 +205,6 @@ components: enabled: false cndr: enabled: true + probes: {} # accessTokenSecretName is the name of the Kubernetes object of type Secret that holds the values of the Company Code companyCodeSecretName: "my-company-code-secret-name" \ No newline at end of file diff --git a/charts/cbcontainers-operator/cbcontainers-operator-chart/templates/operator.yaml b/charts/cbcontainers-operator/cbcontainers-operator-chart/templates/operator.yaml index 4ae158c4..39c9a88f 100644 --- a/charts/cbcontainers-operator/cbcontainers-operator-chart/templates/operator.yaml +++ b/charts/cbcontainers-operator/cbcontainers-operator-chart/templates/operator.yaml @@ -4837,6 +4837,43 @@ spec: type: string default: {} type: object + probes: + default: + failureThreshold: 5 + initialDelaySeconds: 240 + livenessPath: /tmp/alive + periodSeconds: 30 + readinessPath: /tmp/ready + successThreshold: 1 + timeoutSeconds: 1 + properties: + failureThreshold: + default: 3 + format: int32 + type: integer + initialDelaySeconds: + default: 3 + format: int32 + type: integer + livenessPath: + default: /tmp/alive + type: string + periodSeconds: + default: 30 + format: int32 + type: integer + readinessPath: + default: /tmp/ready + type: string + successThreshold: + default: 1 + format: int32 + type: integer + timeoutSeconds: + default: 1 + format: int32 + type: integer + type: object prometheus: default: port: 7071 diff --git a/config/crd/bases/operator.containers.carbonblack.io_cbcontainersagents.yaml b/config/crd/bases/operator.containers.carbonblack.io_cbcontainersagents.yaml index 8536a840..0885e0fb 100644 --- a/config/crd/bases/operator.containers.carbonblack.io_cbcontainersagents.yaml +++ b/config/crd/bases/operator.containers.carbonblack.io_cbcontainersagents.yaml @@ -4827,6 +4827,43 @@ spec: type: string default: {} type: object + probes: + default: + failureThreshold: 5 + initialDelaySeconds: 240 + livenessPath: /tmp/alive + periodSeconds: 30 + readinessPath: /tmp/ready + successThreshold: 1 + timeoutSeconds: 1 + properties: + failureThreshold: + default: 3 + format: int32 + type: integer + initialDelaySeconds: + default: 3 + format: int32 + type: integer + livenessPath: + default: /tmp/alive + type: string + periodSeconds: + default: 30 + format: int32 + type: integer + readinessPath: + default: /tmp/ready + type: string + successThreshold: + default: 1 + format: int32 + type: integer + timeoutSeconds: + default: 1 + format: int32 + type: integer + type: object prometheus: default: port: 7071 diff --git a/config/crd_v1beta1/bases/operator.containers.carbonblack.io_cbcontainersagents.yaml b/config/crd_v1beta1/bases/operator.containers.carbonblack.io_cbcontainersagents.yaml index 27d1607b..9d158013 100644 --- a/config/crd_v1beta1/bases/operator.containers.carbonblack.io_cbcontainersagents.yaml +++ b/config/crd_v1beta1/bases/operator.containers.carbonblack.io_cbcontainersagents.yaml @@ -4472,6 +4472,28 @@ spec: additionalProperties: type: string type: object + probes: + properties: + failureThreshold: + format: int32 + type: integer + initialDelaySeconds: + format: int32 + type: integer + livenessPath: + type: string + periodSeconds: + format: int32 + type: integer + readinessPath: + type: string + successThreshold: + format: int32 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object prometheus: properties: enabled: