Skip to content

Commit

Permalink
Merge pull request #465 from redhatrises/update_sdk
Browse files Browse the repository at this point in the history
feat: update to operator-sdk version 1.33.0
  • Loading branch information
redhatrises authored Dec 21, 2023
2 parents 3d95849 + d492017 commit 94d9650
Show file tree
Hide file tree
Showing 28 changed files with 159 additions and 83 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
go-version: [1.19.x]
go-version: [1.20.x]

runs-on: ${{ matrix.os }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
go-version: [1.19.x]
go-version: [1.20.x]

runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
go-version: [1.19.x]
go-version: [1.20.x]

runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/operator-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: [1.20.x]

- uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/operator-metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
go-version: [1.19.x]
go-version: [1.20.x]

runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [1.18.x]
go-version: [1.20.x]

steps:
- name: Install qemu dependency
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ endif

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

# Image URL to use all building/pushing image targets
IMG ?= controller:latest
Expand Down Expand Up @@ -259,7 +259,7 @@ endif

.PHONY: bundle
bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metadata, then validate generated files.
$(OPERATOR_SDK) generate kustomize manifests --interactive=false -q --apis-dir api
$(OPERATOR_SDK) generate kustomize manifests -q --apis-dir api
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
$(OPERATOR_SDK) bundle validate ./bundle
Expand Down
4 changes: 2 additions & 2 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# More info: https://book.kubebuilder.io/reference/project-config.html
componentConfig: true
domain: crowdstrike.com
multigroup: true
layout:
- go.kubebuilder.io/v4-alpha
- go.kubebuilder.io/v4
multigroup: true
plugins:
manifests.sdk.operatorframework.io/v2: {}
scorecard.sdk.operatorframework.io/v2: {}
Expand Down
4 changes: 2 additions & 2 deletions bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=falcon-operator
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.30.0
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.33.0
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v4-alpha
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v4

# Labels for testing.
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1
Expand Down
8 changes: 4 additions & 4 deletions bundle/manifests/falcon-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ metadata:
capabilities: Basic Install
categories: Security,Monitoring
containerImage: quay.io/crowdstrike/falcon-operator
createdAt: "2023-11-03T15:07:51Z"
createdAt: "2023-12-21T21:26:46Z"
description: Falcon Operator installs CrowdStrike Falcon Sensors on the cluster
operatorframework.io/suggested-namespace: falcon-operator
operators.operatorframework.io/builder: operator-sdk-v1.30.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4-alpha
operators.operatorframework.io/builder: operator-sdk-v1.33.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
repository: https://github.com/CrowdStrike/falcon-operator
support: Community Only
name: falcon-operator.v0.9.1
Expand Down Expand Up @@ -1053,7 +1053,7 @@ spec:
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=0
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.14.1
name: kube-rbac-proxy
ports:
- containerPort: 8443
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,9 @@ spec:
- effect: NoSchedule
key: node-role.kubernetes.io/control-plane
operator: Exists
- effect: NoSchedule
key: node-role.kubernetes.io/infra
operator: Exists
description: Specifies tolerations for custom taints. Defaults
to allowing scheduling on all nodes.
items:
Expand Down
4 changes: 2 additions & 2 deletions bundle/metadata/annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ annotations:
operators.operatorframework.io.bundle.metadata.v1: metadata/
operators.operatorframework.io.bundle.package.v1: falcon-operator
operators.operatorframework.io.bundle.channels.v1: alpha
operators.operatorframework.io.metrics.builder: operator-sdk-v1.30.0
operators.operatorframework.io.metrics.builder: operator-sdk-v1.33.0
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v4-alpha
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v4

# Annotations for testing.
operators.operatorframework.io.test.mediatype.v1: scorecard+v1
Expand Down
12 changes: 6 additions & 6 deletions bundle/tests/scorecard/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ stages:
- entrypoint:
- scorecard-test
- basic-check-spec
image: quay.io/operator-framework/scorecard-test:v1.30.0
image: quay.io/operator-framework/scorecard-test:v1.33.0
labels:
suite: basic
test: basic-check-spec-test
Expand All @@ -18,7 +18,7 @@ stages:
- entrypoint:
- scorecard-test
- olm-bundle-validation
image: quay.io/operator-framework/scorecard-test:v1.30.0
image: quay.io/operator-framework/scorecard-test:v1.33.0
labels:
suite: olm
test: olm-bundle-validation-test
Expand All @@ -28,7 +28,7 @@ stages:
- entrypoint:
- scorecard-test
- olm-crds-have-validation
image: quay.io/operator-framework/scorecard-test:v1.30.0
image: quay.io/operator-framework/scorecard-test:v1.33.0
labels:
suite: olm
test: olm-crds-have-validation-test
Expand All @@ -38,7 +38,7 @@ stages:
- entrypoint:
- scorecard-test
- olm-crds-have-resources
image: quay.io/operator-framework/scorecard-test:v1.30.0
image: quay.io/operator-framework/scorecard-test:v1.33.0
labels:
suite: olm
test: olm-crds-have-resources-test
Expand All @@ -48,7 +48,7 @@ stages:
- entrypoint:
- scorecard-test
- olm-spec-descriptors
image: quay.io/operator-framework/scorecard-test:v1.30.0
image: quay.io/operator-framework/scorecard-test:v1.33.0
labels:
suite: olm
test: olm-spec-descriptors-test
Expand All @@ -58,7 +58,7 @@ stages:
- entrypoint:
- scorecard-test
- olm-status-descriptors
image: quay.io/operator-framework/scorecard-test:v1.30.0
image: quay.io/operator-framework/scorecard-test:v1.33.0
labels:
suite: olm
test: olm-status-descriptors-test
Expand Down
2 changes: 0 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"

imagev1 "github.com/openshift/api/image/v1"
securityv1 "github.com/openshift/api/security/v1"
arv1 "k8s.io/api/admissionregistration/v1"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
Expand All @@ -52,7 +51,6 @@ var (
func init() {
utilruntime.Must(clientgoscheme.AddToScheme(scheme))
utilruntime.Must(imagev1.AddToScheme(scheme))
utilruntime.Must(securityv1.AddToScheme(scheme))

utilruntime.Must(falconv1alpha1.AddToScheme(scheme))
// +kubebuilder:scaffold:scheme
Expand Down
16 changes: 8 additions & 8 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
# since it depends on service name and namespace that are out of this kustomize package.
# It should be run by config/default
resources:
- bases/falcon.crowdstrike.com_falconadmissions.yaml
- bases/falcon.crowdstrike.com_falconcontainers.yaml
- bases/falcon.crowdstrike.com_falconnodesensors.yaml
- bases/falcon.crowdstrike.com_falconadmissions.yaml
#+kubebuilder:scaffold:crdkustomizeresource

patchesStrategicMerge:
patches:
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
# patches here are for enabling the conversion webhook for each CRD
#- patches/webhook_in_falconcontainers.yaml
#- patches/webhook_in_falconnodesensors.yaml
#- patches/webhook_in_falconadmissions.yaml
#- path: patches/webhook_in_falconadmissions.yaml
#- path: patches/webhook_in_falconcontainers.yaml
#- path: patches/webhook_in_falconnodesensors.yaml
#+kubebuilder:scaffold:crdkustomizewebhookpatch

# [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix.
# patches here are for enabling the CA injection for each CRD
#- patches/cainjection_in_falconcontainers.yaml
#- patches/cainjection_in_falconnodesensors.yaml
#- patches/cainjection_in_falconadmissions.yaml
#- path: patches/cainjection_in_falconadmissions.yaml
#- path: patches/cainjection_in_falconcontainers.yaml
#- path: patches/cainjection_in_falconnodesensors.yaml
#+kubebuilder:scaffold:crdkustomizecainjectionpatch

# the following config is for teaching kustomize how to do kustomization for CRDs.
Expand Down
2 changes: 1 addition & 1 deletion config/crd/patches/cainjection_in_falconadmissions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME
name: falconadmissions.falcon.crowdstrike.com
2 changes: 1 addition & 1 deletion config/crd/patches/cainjection_in_falconcontainers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME
name: falconcontainers.falcon.crowdstrike.com
2 changes: 1 addition & 1 deletion config/crd/patches/cainjection_in_falconnodesensors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME
name: falconnodesensors.falcon.crowdstrike.com
Loading

0 comments on commit 94d9650

Please sign in to comment.