Skip to content

improve tests for generate-tenant-resources-admission ClusterPolicy #6130

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
21 changes: 10 additions & 11 deletions .github/workflows/chainsaw-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ jobs:
- name: Create k8s Kind Cluster
uses: helm/kind-action@v1

- uses: actions/checkout@v4

- name: Install Dependencies
shell: bash
run: |
kustomize build components/kyverno/chainsaw | \
kubectl apply -f - --server-side

- name: Install Cosign
uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0

Expand All @@ -40,21 +48,12 @@ jobs:
with:
verify: true

- uses: actions/checkout@v4

- name: Install Dependencies
shell: bash
run: |
kustomize build components/kyverno/chainsaw | \
kubectl apply -f - --server-side

- name: Wait for kyverno ready
shell: bash
run: |
set -e
kubectl rollout status \
--namespace kyverno \
deployment \
kubectl rollout status deployment \
--namespace konflux-kyverno \
--selector '!job-name' \
--timeout=300s

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,16 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: appstudio-pipelines-runner
rules:
- apiGroups:
- autoscaling
resources:
- horizontalpodautoscalers
- horizontalpodautoscalers/status
verbs:
- get
- list
- watch
- patch
- update
- create
13 changes: 13 additions & 0 deletions components/kyverno/chainsaw/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: konflux-kyverno
resources:
- https://github.com/kyverno/kyverno/raw/main/config/install-latest-testing.yaml

patches:
- target:
kind: Deployment
name: kyverno-admission-controller
patch: |-
- op: add
path: /spec/template/spec/containers/0/args/-
value: --reportsServiceAccountName=system:serviceaccount:konflux-kyverno:kyverno-reports-controller
- op: add
path: /spec/template/spec/containers/0/args/-
value: --backgroundServiceAccountName=system:serviceaccount:konflux-kyverno:kyverno-background-controller
5 changes: 4 additions & 1 deletion hack/chainsaw/chainsaw-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ kustomize build components/kyverno/chainsaw | \
kubectl apply -f - --server-side

## wait for kyverno to rollout
kubectl rollout status --namespace kyverno deployment --selector '!job-name' --timeout=300s
kubectl rollout status deployment \
--namespace konflux-kyverno \
--selector '!job-name' \
--timeout=300s