Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync OLM manifest with Readme.md && Automate future sync #85

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/operator-metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' {} \;

Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 $@ $^
8 changes: 5 additions & 3 deletions bundle/manifests/falcon-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}
Expand Down Expand Up @@ -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`
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -497,4 +499,4 @@ spec:
provider:
name: CrowdStrike
url: https://crowdStrike.com
version: 0.5.0
version: 0.5.1
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ kind: Kustomization
images:
- name: controller
newName: quay.io/crowdstrike/falcon-operator
newTag: latest
newTag: v0.5.1
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
10 changes: 10 additions & 0 deletions hack/update-manifest.sh
Original file line number Diff line number Diff line change
@@ -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