1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-14 11:57:59 +00:00

Add githubaccesstoken CRD to kustomization.yaml (#3446)

* Add githubaccesstoken CRD to kustomization.yaml

Signed-off-by: Tiago de Freitas Lima <tiago.lima@nubank.com.br>

* Update crd.generate script to update resources list from kustomization.yaml file

Signed-off-by: Tiago de Freitas Lima <tiago.lima@nubank.com.br>

---------

Signed-off-by: Tiago de Freitas Lima <tiago.lima@nubank.com.br>
This commit is contained in:
Tiago de Freitas Lima 2024-05-06 19:50:37 -03:00 committed by GitHub
parent 6d08e679be
commit e474043a7c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View file

@ -11,4 +11,7 @@ resources:
- generators.external-secrets.io_ecrauthorizationtokens.yaml
- generators.external-secrets.io_fakes.yaml
- generators.external-secrets.io_gcraccesstokens.yaml
- generators.external-secrets.io_githubaccesstokens.yaml
- generators.external-secrets.io_passwords.yaml
- generators.external-secrets.io_vaultdynamicsecrets.yaml
- generators.external-secrets.io_webhooks.yaml

View file

@ -15,6 +15,11 @@ go run sigs.k8s.io/controller-tools/cmd/controller-gen crd \
paths="./apis/..." \
output:crd:artifacts:config="${CRD_DIR}/bases"
## Update resources list from kustomization.yaml
ls "${CRD_DIR}"/bases | grep -v "kustomization.yaml" | jq -R -s -c 'split("\n")[:-1]' | yq -p=json - > kustomize-files.yaml
yq -i '.resources = (load("kustomize-files.yaml"))' "${CRD_DIR}"/bases/kustomization.yaml
rm kustomize-files.yaml
# Remove extra header lines in generated CRDs
# This is needed for building the helm chart
for f in "${CRD_DIR}"/bases/*.yaml; do