Skip to content
Snippets Groups Projects
Commit 049636e5 authored by Nacho Barrientos's avatar Nacho Barrientos
Browse files

Add Makefile to download and patch CRDs

parent 524fba18
No related branches found
No related tags found
No related merge requests found
Pipeline #10988887 passed
......@@ -28,4 +28,5 @@ README.md
*.tmproj
.vscode/
config
tests/
\ No newline at end of file
tests/
Makefile
\ No newline at end of file
Makefile 0 → 100644
.PHONY: fetch_crds all
VERSION ?= 13.0.2
CRDS_PATH = charts/crds/crds
URL = https://github.com/prometheus-community/helm-charts/releases/download/prometheus-operator-crds-$(VERSION)/prometheus-operator-crds-$(VERSION).tgz
fetch_crds:
rm -rf ${CRDS_PATH}/*.yaml
curl -s -L -o - ${URL} | tar -C ${CRDS_PATH} --strip-components=4 -xzf - prometheus-operator-crds/charts/crds/templates
find ${CRDS_PATH} -type f -name '*.yaml' -exec sed -i '/{{- with .Values.annotations }}/d' {} +
find ${CRDS_PATH} -type f -name '*.yaml' -exec sed -i '/{{- toYaml . | nindent 4 }}/d' {} +
find ${CRDS_PATH} -type f -name '*.yaml' -exec sed -i '/{{- end }}/d' {} +
sed -i '/^ annotations:/a \ argocd.argoproj.io/sync-options: ServerSideApply=true' ${CRDS_PATH}/*.yaml
all: fetch_crds
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment