Files
Andrei Kvapil a120ce726e DX: Use generic Makefile for packages (#288)
This change is aimed at improving the development experience.

- The option `make delete` has been added.
- Added check for `NAME` and `NAMESPACE` variables
- Now, any package (not just system ones) can include options such as
make show, make diff, make apply.
- Applications from packages/extra require explicit specification of the
`NAMESPACE`.
- Applications from packages/apps require explicit specification of both
`NAME` and `NAMESPACE`.

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-16 10:26:13 +02:00

13 lines
610 B
Makefile

export NAME=kubevirt-cdi-operator
export NAMESPACE=cozy-kubevirt-cdi
include ../../../scripts/package.mk
update:
rm -rf templates
mkdir templates
export VERSION=$$(basename $$(curl -s -w %{redirect_url} https://github.com/kubevirt/containerized-data-importer/releases/latest)) && \
wget https://github.com/kubevirt/containerized-data-importer/releases/download/$$VERSION/cdi-operator.yaml -O templates/cdi-operator.yaml
sed -i 's/namespace: cdi/namespace: cozy-kubevirt-cdi/g' templates/cdi-operator.yaml
awk -i inplace -v RS="---" '!/kind: Namespace/{printf "%s", $$0 RS}' templates/cdi-operator.yaml