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

chore: use templated values in install action and security workflow #2366

Merged
merged 5 commits into from
Nov 6, 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
14 changes: 6 additions & 8 deletions .github/actions/deploy-klt-on-cluster/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,13 @@ runs:
if [ "${{ inputs.scheduling-gates }}" == "gates_on" ]; then
echo " schedulingGatesEnabled: true" >> values.yaml
fi

export TAG=${{ inputs.runtime_tag }}
envsubst < values.yaml > tmp.yaml

echo "installing with values.yaml file:"
cat values.yaml
cat tmp.yaml

helm install -n keptn-lifecycle-toolkit-system --create-namespace keptn ../../../chart \
--values ./values.yaml \
--set lifecycleOperator.scheduler.image.tag=${{ inputs.runtime_tag }} \
--set lifecycleOperator.lifecycleOperator.image.tag=${{ inputs.runtime_tag }} \
--set lifecycleOperator.lifecycleOperator.env.functionRunnerImage=localhost:5000/keptn/deno-runtime:${{ inputs.runtime_tag }} \
--set lifecycleOperator.lifecycleOperator.env.pythonRunnerImage=localhost:5000/keptn/python-runtime:${{ inputs.runtime_tag }} \
--set certManager.image.tag=${{ inputs.runtime_tag }} \
--set metricsOperator.image.tag=${{ inputs.runtime_tag }} \
--values ./tmp.yaml \
--debug --wait --timeout 1m
12 changes: 11 additions & 1 deletion .github/actions/deploy-klt-on-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,24 @@ global:

certManager:
imagePullPolicy: Never

image:
tag: $TAG
metricsOperator:
imagePullPolicy: Never
env:
enableKeptnAnalysis: "true"
image:
tag: $TAG

lifecycleOperator:
lifecycleOperator:
imagePullPolicy: Never
image:
tag: $TAG
env:
functionRunnerImage: localhost:5000/keptn/deno-runtime:$TAG
pythonRunnerImage: localhost:5000/keptn/python-runtime:$TAG
scheduler:
imagePullPolicy: Never
image:
tag: $TAG
13 changes: 5 additions & 8 deletions .github/workflows/security-scans.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,14 @@ jobs:
- name: Generate manifests
run: |
# Fetch tag of the images
TAG=$(ls tag/)
export TAG=$(ls tag/)
echo "$TAG"
mkdir scans
envsubst < .github/actions/deploy-klt-on-cluster/values.yaml > tmp.yaml
echo "used values.yaml file:"
cat tmp.yaml

helm template keptn-test --namespace helmtests -f .github/actions/deploy-klt-on-cluster/values.yaml ./chart \
--set lifecycleOperator.lifecycleOperator.image.tag=$TAG \
--set lifecycleOperator.scheduler.image.tag=$TAG \
--set lifecycleOperator.lifecycleOperator.env.functionRunnerImage=localhost:5000/keptn/deno-runtime:$TAG \
--set lifecycleOperator.lifecycleOperator.env.pythonRunnerImage=localhost:5000/keptn/python-runtime:$TAG \
--set certManager.image.tag=$TAG \
--set metricsOperator.image.tag=$TAG > ./scans/result.yaml
helm template keptn-test --namespace helmtests -f tmp.yaml ./chart > ./scans/result.yaml

- name: KICS Scan
if: matrix.tool == 'kics'
Expand Down
Loading