Skip to content

Commit

Permalink
trying install of engine for adm. cont. (#153)
Browse files Browse the repository at this point in the history
* admission controller ci installs anchore engine to have endpoint
* update test and ci/fake-values for adm. cont
* update anchoreEndpoint with protocol

Signed-off-by: Hung Nguyen <[email protected]>

---------

Signed-off-by: Hung Nguyen <[email protected]>
  • Loading branch information
HN23 authored Oct 24, 2023
1 parent 9a97fcf commit 3814188
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,24 @@ jobs:
DOCKER_USER: ${{ secrets.ANCHORECI_DOCKER_USER }}
DOCKER_PASS: ${{ secrets.ANCHORECI_DOCKER_PASS }}

- name: Check if anchore-engine endpoint is required for admission controller chart
id: engine_required
run: |
if [[ -n $(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep 'anchore-admission-controller') ]]; then
echo "File in the 'stable/anchore-admission-controller' directory was changed. We need an engine deployment"
echo "::set-output name=changed::true"
else
echo "No files in 'stable/anchore-admission-controller' directory were changed. Skipping engine deployment"
echo "::set-output name=changed::false"
fi
shell: bash

- name: Deploy Engine
if: steps.engine_required.outputs.changed == 'true'
run: |
helm install engine anchore/anchore-engine --namespace anchore --wait
kubectl --namespace anchore get pods
- name: Run chart-testing
if: steps.list-changed.outputs.CHANGED == 'true'
run: ct install --config ct-config.yaml
4 changes: 2 additions & 2 deletions stable/anchore-admission-controller/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
name: anchore-admission-controller
version: 0.4.7
appVersion: 0.4.0
version: 0.5.0
appVersion: 0.5.0
description: A kubernetes admission controller for validating and mutating webhooks that operates against Anchore Engine to make access decisions and annotations
home: https://github.com/anchore/kubernetes-admission-controller
maintainers:
Expand Down
1 change: 1 addition & 0 deletions stable/anchore-admission-controller/ci/fake-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ credentials:
password: password1
- username: user2
password: password2
anchoreEndpoint: http://engine-anchore-engine-api:8228
2 changes: 1 addition & 1 deletion stable/anchore-admission-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fullnameOverride: Null
replicaCount: 1
logVerbosity: 3

image: "anchore/kubernetes-admission-controller:v0.4.0"
image: "anchore/kubernetes-admission-controller:v0.5.0"
imagePullPolicy: IfNotPresent
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
imagePullSecrets: []
Expand Down

0 comments on commit 3814188

Please sign in to comment.