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

Add Operator Lifecycle Manager #30

Merged
merged 2 commits into from
Oct 7, 2023
Merged
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
9 changes: 9 additions & 0 deletions Earthfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
VERSION 0.7
FROM alpine

kustomize-build:
# renovate: datasource=docker depName=registry.k8s.io/kustomize/kustomize versioning=docker
ARG KUSTOMIZE_VERSION=v5.1.1
FROM registry.k8s.io/kustomize/kustomize:$KUSTOMIZE_VERSION
COPY kustomization kustomization
RUN ls
RUN find kustomization/components/ -mindepth 1 -maxdepth 1 -type d -print | xargs -r -n1 kustomize build > /dev/null

renovate-validate:
# renovate: datasource=docker depName=renovate/renovate versioning=docker
ARG RENOVATE_VERSION=37
Expand All @@ -10,6 +18,7 @@ renovate-validate:
RUN renovate-config-validator

validate:
BUILD +kustomize-build
BUILD +renovate-validate

prettier-lint:
Expand Down
22 changes: 22 additions & 0 deletions kustomization/components/operator-lifecycle-manager/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Operator Lifecycle Manager Component

This will deploy the
[Operator Lifecycle Manager](https://github.com/operator-framework/operator-lifecycle-manager)
and its CRDs.

## Example Usage

```yaml
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

components:
- https://raw.githubusercontent.com/marinatedconcrete/config/main/kustomization/components/operator-lifecycle-manager
patches:
# A number of operators do not work in the baseline pod-security profile, alas.
- target:
kind: Namespace
name: operators
path: patches/downgrade_pod-security.yml
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

resources:
# renovate: datasource=github-releases
- https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.25.0/crds.yaml
# renovate: datasource=github-releases
- https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.25.0/olm.yaml
Comment on lines +6 to +9
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we want to version here and not in the downstream repos?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could publish releases in this repository when we do version bumps here so we can version downstream too. I think we'll need to play with it a bit to figure things out, but this is a good start.