Skip to content

Commit 2e140f0

Browse files
Greg PontejosGreg Pontejos
Greg Pontejos
authored and
Greg Pontejos
committed
Migrate from deprecated kube-proxy to native controller metrics endpoint
1 parent 5cab401 commit 2e140f0

File tree

50 files changed

+2029
-1807
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2029
-1807
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM registry.access.redhat.com/ubi8/go-toolset as builder
2+
FROM registry.access.redhat.com/ubi8/go-toolset:1.22.9-2.1740072407 as builder
33
ARG TARGETOS
44
ARG TARGETARCH
55
ARG VERSION
@@ -31,7 +31,7 @@ RUN GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -tags \
3131

3232
# Use distroless as minimal base image to package the manager binary
3333
# Refer to https://github.com/GoogleContainerTools/distroless for more details
34-
FROM registry.access.redhat.com/ubi8/ubi-micro
34+
FROM registry.access.redhat.com/ubi8-minimal:8.10-1179.1739286367
3535
WORKDIR /
3636
COPY LICENSE licenses/
3737
COPY --from=builder /etc/pki /etc/pki

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ endif
4848

4949
# Set the Operator SDK version to use. By default, what is installed on the system is used.
5050
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
51-
OPERATOR_SDK_VERSION ?= v1.34.1
51+
OPERATOR_SDK_VERSION ?= v1.38.0
5252

5353
# Image URL to use all building/pushing image targets
5454
IMG ?= controller:latest
@@ -220,7 +220,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest
220220

221221
## Tool Versions
222222
KUSTOMIZE_VERSION ?= v5.2.1
223-
CONTROLLER_TOOLS_VERSION ?= v0.14.0
223+
CONTROLLER_TOOLS_VERSION ?= v0.16.5
224224

225225
.PHONY: kustomize
226226
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. If wrong version is installed, it will be removed before downloading.

bundle.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
66
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
77
LABEL operators.operatorframework.io.bundle.package.v1=falcon-operator
88
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
9-
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.34.1
9+
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.38.0
1010
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
1111
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v4
1212

bundle/manifests/falcon-operator-controller-manager-metrics-service_v1_service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
creationTimestamp: null
55
labels:
66
control-plane: controller-manager
7-
crowdstrike.com/component: kube-rbac-proxy
7+
crowdstrike.com/component: metrics
88
crowdstrike.com/created-by: falcon-operator
99
crowdstrike.com/instance: controller-manager-metrics-service
1010
crowdstrike.com/managed-by: kustomize

bundle/manifests/falcon-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: ClusterRole
33
metadata:
44
creationTimestamp: null
55
labels:
6-
crowdstrike.com/component: kube-rbac-proxy
6+
crowdstrike.com/component: metrics
77
crowdstrike.com/created-by: falcon-operator
88
crowdstrike.com/instance: metrics-reader
99
crowdstrike.com/managed-by: kustomize

bundle/manifests/falcon-operator-node-sensor-role_rbac.authorization.k8s.io_v1_clusterrole.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ rules:
2323
- apiGroups:
2424
- ""
2525
resources:
26+
- namespaces
2627
- secrets
2728
- cronjobs
2829
- daemonsets

bundle/manifests/falcon-operator.clusterserviceversion.yaml

Lines changed: 135 additions & 346 deletions
Large diffs are not rendered by default.

bundle/manifests/falcon.crowdstrike.com_falconadmissions.yaml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
controller-gen.kubebuilder.io/version: v0.14.0
5+
controller-gen.kubebuilder.io/version: v0.16.5
66
creationTimestamp: null
77
name: falconadmissions.falcon.crowdstrike.com
88
spec:
@@ -103,10 +103,13 @@ spec:
103103
referenced object inside the same namespace.
104104
properties:
105105
name:
106+
default: ""
106107
description: |-
107108
Name of the referent.
109+
This field is effectively required, but due to backwards compatibility is
110+
allowed to be empty. Instances of this type with an empty value here are
111+
almost certainly wrong.
108112
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
109-
TODO: Add other useful fields. apiVersion, kind, uid?
110113
type: string
111114
type: object
112115
x-kubernetes-map-type: atomic
@@ -134,11 +137,9 @@ spec:
134137
Claims lists the names of resources, defined in spec.resourceClaims,
135138
that are used by this container.
136139
137-
138140
This is an alpha field and requires enabling the
139141
DynamicResourceAllocation feature gate.
140142
141-
142143
This field is immutable. It can only be set for containers.
143144
items:
144145
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
@@ -149,6 +150,12 @@ spec:
149150
the Pod where this field is used. It makes that resource available
150151
inside a container.
151152
type: string
153+
request:
154+
description: |-
155+
Request is the name chosen for a request in the referenced claim.
156+
If empty, everything from the claim is made available, otherwise
157+
only the result of this request.
158+
type: string
152159
required:
153160
- name
154161
type: object
@@ -196,11 +203,9 @@ spec:
196203
Claims lists the names of resources, defined in spec.resourceClaims,
197204
that are used by this container.
198205
199-
200206
This is an alpha field and requires enabling the
201207
DynamicResourceAllocation feature gate.
202208
203-
204209
This field is immutable. It can only be set for containers.
205210
items:
206211
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
@@ -211,6 +216,12 @@ spec:
211216
the Pod where this field is used. It makes that resource available
212217
inside a container.
213218
type: string
219+
request:
220+
description: |-
221+
Request is the name chosen for a request in the referenced claim.
222+
If empty, everything from the claim is made available, otherwise
223+
only the result of this request.
224+
type: string
214225
required:
215226
- name
216227
type: object
@@ -258,11 +269,9 @@ spec:
258269
Claims lists the names of resources, defined in spec.resourceClaims,
259270
that are used by this container.
260271
261-
262272
This is an alpha field and requires enabling the
263273
DynamicResourceAllocation feature gate.
264274
265-
266275
This field is immutable. It can only be set for containers.
267276
items:
268277
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
@@ -273,6 +282,12 @@ spec:
273282
the Pod where this field is used. It makes that resource available
274283
inside a container.
275284
type: string
285+
request:
286+
description: |-
287+
Request is the name chosen for a request in the referenced claim.
288+
If empty, everything from the claim is made available, otherwise
289+
only the result of this request.
290+
type: string
276291
required:
277292
- name
278293
type: object
@@ -457,10 +472,8 @@ spec:
457472
description: |-
458473
FalconAPI configures connection from your local Falcon operator to CrowdStrike Falcon platform.
459474
460-
461475
When configured, it will pull the sensor from registry.crowdstrike.com and deploy the appropriate sensor to the cluster.
462476
463-
464477
If using the API is not desired, the sensor can be manually configured by setting the Image and Version fields.
465478
properties:
466479
cid:
@@ -564,16 +577,8 @@ spec:
564577
properties:
565578
conditions:
566579
items:
567-
description: "Condition contains details for one aspect of the current
568-
state of this API Resource.\n---\nThis struct is intended for
569-
direct use as an array at the field path .status.conditions. For
570-
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
571-
observations of a foo's current state.\n\t // Known .status.conditions.type
572-
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
573-
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
574-
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
575-
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
576-
\ // other fields\n\t}"
580+
description: Condition contains details for one aspect of the current
581+
state of this API Resource.
577582
properties:
578583
lastTransitionTime:
579584
description: |-
@@ -614,12 +619,7 @@ spec:
614619
- Unknown
615620
type: string
616621
type:
617-
description: |-
618-
type of condition in CamelCase or in foo.example.com/CamelCase.
619-
---
620-
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
621-
useful (see .node.status.conditions), the ability to deconflict is important.
622-
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
622+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
623623
maxLength: 316
624624
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
625625
type: string

0 commit comments

Comments
 (0)