diff --git a/.github/workflows/operator-metadata.yml b/.github/workflows/operator-metadata.yml index c1e20e24..a9248068 100644 --- a/.github/workflows/operator-metadata.yml +++ b/.github/workflows/operator-metadata.yml @@ -39,7 +39,7 @@ jobs: run: | export PATH=$HOME/go/bin:$PATH make manifests generate - make bundle + touch README.md ; make bundle rm deploy/falcon-operator.yaml && make deploy/falcon-operator.yaml find ./bundle* -type f -exec sed -i -e 's/operator-sdk-v1.16.0+git/operator-sdk-v1.17.0/g' {} \; diff --git a/Makefile b/Makefile index bf876a24..45c13cd7 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # To re-generate a bundle for another specific version without changing the standard setup, you can: # - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2) # - use environment variables to overwrite this value (e.g export VERSION=0.0.2) -VERSION ?= 0.5.0 +VERSION ?= 0.5.1 # CHANNELS define the bundle channels used in the bundle. # Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable") @@ -169,7 +169,9 @@ rm -rf $$TMP_DIR ;\ endef .PHONY: bundle -bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metadata, then validate generated files. + +## Generate bundle manifests and metadata, then validate generated files. +bundle: manifests kustomize operator-sdk config/manifests/bases/falcon-operator.clusterserviceversion.yaml operator-sdk generate kustomize manifests -q cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG) $(KUSTOMIZE) build config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS) @@ -248,3 +250,6 @@ deploy/parts/crd-falconnodesensors.yaml: bundle/manifests/falcon.crowdstrike.com deploy/falcon-operator.yaml: deploy/parts/crd-falconcontainers.yaml deploy/parts/crd-falconnodesensors.yaml deploy/parts/ns.yaml deploy/parts/role.yaml deploy/parts/service_account.yaml deploy/parts/role_binding.yaml deploy/parts/operator.yaml cat $^ > $@ + +config/manifests/bases/falcon-operator.clusterserviceversion.yaml: README.md + hack/update-manifest.sh $@ $^ diff --git a/bundle/manifests/falcon-operator.clusterserviceversion.yaml b/bundle/manifests/falcon-operator.clusterserviceversion.yaml index b00f85b0..5c92a120 100644 --- a/bundle/manifests/falcon-operator.clusterserviceversion.yaml +++ b/bundle/manifests/falcon-operator.clusterserviceversion.yaml @@ -52,7 +52,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/CrowdStrike/falcon-operator support: Community Only - name: falcon-operator.v0.5.0 + name: falcon-operator.v0.5.1 namespace: placeholder spec: apiservicedefinitions: {} @@ -83,6 +83,8 @@ spec: | [FalconContainer](https://github.com/CrowdStrike/falcon-operator/tree/main/docs/container) | Manages installation of Falcon Container Sensor on the cluster | | [FalconNodeSensor](https://github.com/CrowdStrike/falcon-operator/tree/main/docs/node) | Manages installation of Falcon Linux Sensor on the cluster nodes | + Additional information can be found in [FAQ document](https://github.com/CrowdStrike/falcon-operator/tree/main/docs/faq.md) + ## Installation Steps Installation steps differ based on Operator Life-cycle Manager (OLM) availability. You can determine whether your cluster is using OLM by running: `kubectl get crd catalogsources.operators.coreos.com` @@ -404,7 +406,7 @@ spec: fieldPath: metadata.name - name: OPERATOR_NAME value: falcon-operator - image: quay.io/crowdstrike/falcon-operator:latest + image: quay.io/crowdstrike/falcon-operator:v0.5.1 imagePullPolicy: IfNotPresent livenessProbe: httpGet: @@ -497,4 +499,4 @@ spec: provider: name: CrowdStrike url: https://crowdStrike.com - version: 0.5.0 + version: 0.5.1 diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index ba6efc9d..c3d7d80a 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -13,4 +13,4 @@ kind: Kustomization images: - name: controller newName: quay.io/crowdstrike/falcon-operator - newTag: latest + newTag: v0.5.1 diff --git a/config/manifests/bases/falcon-operator.clusterserviceversion.yaml b/config/manifests/bases/falcon-operator.clusterserviceversion.yaml index 68855afd..83b69eaf 100644 --- a/config/manifests/bases/falcon-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/falcon-operator.clusterserviceversion.yaml @@ -42,6 +42,8 @@ spec: | [FalconContainer](https://github.com/CrowdStrike/falcon-operator/tree/main/docs/container) | Manages installation of Falcon Container Sensor on the cluster | | [FalconNodeSensor](https://github.com/CrowdStrike/falcon-operator/tree/main/docs/node) | Manages installation of Falcon Linux Sensor on the cluster nodes | + Additional information can be found in [FAQ document](https://github.com/CrowdStrike/falcon-operator/tree/main/docs/faq.md) + ## Installation Steps Installation steps differ based on Operator Life-cycle Manager (OLM) availability. You can determine whether your cluster is using OLM by running: `kubectl get crd catalogsources.operators.coreos.com` diff --git a/hack/update-manifest.sh b/hack/update-manifest.sh new file mode 100755 index 00000000..30bbd044 --- /dev/null +++ b/hack/update-manifest.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -e -o pipefail + +readme="${2}" +last_banner_line=$(cat $readme | grep --line-number '\[!\[' | tail -n 1 | sed 's/:.*$//g') +let "first_readme_line=last_banner_line+1" +export content="$(tail -n +${first_readme_line} ${readme} | sed 's/(docs\//(https:\/\/github.com\/CrowdStrike\/falcon-operator\/tree\/main\/docs\//g' )" +yq -i e '.spec.description=strenv(content)' "${1}" +operator-sdk generate kustomize manifests -q