-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
93 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Deploy lifecycle-manager E2E | ||
description: Applies E2E test-specific patches to the lifecycle-manager kustomize and deploys it. | ||
inputs: | ||
klm_version_tag: | ||
description: The version tag for the KLM image. For example, PR-123. | ||
required: true | ||
klm_image_repo: | ||
description: The repository for the KLM image. For example, dev. | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Patch purge finalizer flags | ||
if: ${{ matrix.e2e-test == 'purge-controller' || matrix.e2e-test == 'purge-metrics'}} | ||
working-directory: lifecycle-manager | ||
shell: bash | ||
run: | | ||
pushd config/watcher_local_test | ||
echo \ | ||
"- op: add | ||
path: /spec/template/spec/containers/0/args/- | ||
value: --enable-purge-finalizer=true | ||
- op: add | ||
path: /spec/template/spec/containers/0/args/- | ||
value: --purge-finalizer-timeout=5s" >> purge_finalizer.yaml | ||
cat purge_finalizer.yaml | ||
kustomize edit add patch --path purge_finalizer.yaml --kind Deployment | ||
popd | ||
- name: Patch metrics cleanup interval | ||
if : ${{ matrix.e2e-test == 'kyma-metrics' }} | ||
working-directory: lifecycle-manager | ||
shell: bash | ||
run: | | ||
pushd config/watcher_local_test | ||
echo \ | ||
"- op: add | ||
path: /spec/template/spec/containers/0/args/- | ||
value: --metrics-cleanup-interval=1" >> metrics_cleanup.yaml | ||
cat metrics_cleanup.yaml | ||
kustomize edit add patch --path metrics_cleanup.yaml --kind Deployment | ||
popd | ||
- name: Patch self signed certificate lifetime | ||
if: ${{matrix.e2e-test == 'self-signed-certificate-rotation'}} | ||
working-directory: lifecycle-manager | ||
shell: bash | ||
run: | | ||
pushd config/watcher_local_test | ||
echo \ | ||
"- op: add | ||
path: /spec/template/spec/containers/0/args/- | ||
value: --self-signed-cert-duration=1h | ||
- op: add | ||
path: /spec/template/spec/containers/0/args/- | ||
value: --self-signed-cert-renew-before=59m | ||
- op: add | ||
path: /spec/template/spec/containers/0/args/- | ||
value: --self-signed-cert-renew-buffer=1m" >> self-signed-cert.yaml | ||
cat self-signed-cert.yaml | ||
kustomize edit add patch --path self-signed-cert.yaml --kind Deployment | ||
popd | ||
- name: Patch CA certificate renewBefore | ||
if: ${{matrix.e2e-test == 'ca-certificate-rotation'}} | ||
working-directory: lifecycle-manager | ||
shell: bash | ||
run: | | ||
pushd config/watcher_local_test | ||
echo \ | ||
"- op: replace | ||
path: /spec/renewBefore | ||
value: 59m | ||
- op: replace | ||
path: /spec/duration | ||
value: 1h">> certificate_renewal.yaml | ||
cat certificate_renewal.yaml | ||
kustomize edit add patch --path certificate_renewal.yaml --kind Certificate --group cert-manager.io --version v1 --name watcher-serving-cert | ||
popd | ||
- name: Deploy LM local testing kustomize | ||
uses: ./lifecycle-manager/.github/actions/deploy-lifecycle-manager | ||
with: | ||
klm_version_tag: ${{ inputs.klm_version_tag }} | ||
klm_image_repo: ${{ inputs.klm_image_repo }} | ||
- name: Expose Metrics Endpoint | ||
working-directory: lifecycle-manager | ||
if: ${{ matrix.e2e-test == 'kyma-metrics' || | ||
matrix.e2e-test == 'purge-metrics' || | ||
matrix.e2e-test == 'self-signed-certificate-rotation' || | ||
matrix.e2e-test == 'mandatory-module-metrics' | ||
}} | ||
shell: bash | ||
run: | | ||
kubectl patch svc klm-metrics-service -p '{"spec": {"type": "LoadBalancer"}}' -n kcp-system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters