Skip to content

Commit

Permalink
Merge branch 'release-1.12' into release-1-12-6-chart-3-2-8
Browse files Browse the repository at this point in the history
  • Loading branch information
realshuting authored Nov 5, 2024
2 parents 3e501ef + 4e3bde5 commit 698cbef
Show file tree
Hide file tree
Showing 15 changed files with 651 additions and 97 deletions.
300 changes: 241 additions & 59 deletions .github/workflows/load-testing.yml

Large diffs are not rendered by default.

17 changes: 16 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ REPO_CLEANUP := $(REGISTRY)/$(REPO)/$(CLEANUP_IMAGE)
REPO_REPORTS := $(REGISTRY)/$(REPO)/$(REPORTS_IMAGE)
REPO_BACKGROUND := $(REGISTRY)/$(REPO)/$(BACKGROUND_IMAGE)
USE_CONFIG ?= standard
INSTALL_VERSION ?= 3.2.6

#########
# TOOLS #
Expand Down Expand Up @@ -997,7 +998,17 @@ kind-install-kyverno: $(HELM) ## Install kyverno helm chart
--set crds.migration.image.registry=$(LOCAL_REGISTRY) \
--set crds.migration.image.repository=$(LOCAL_CLI_REPO) \
--set crds.migration.image.tag=$(GIT_SHA) \
$(foreach CONFIG,$(subst $(COMMA), ,$(USE_CONFIG)),--values ./scripts/config/$(CONFIG)/kyverno.yaml)
$(foreach CONFIG,$(subst $(COMMA), ,$(USE_CONFIG)),--values ./scripts/config/$(CONFIG)/kyverno.yaml) \
$(EXPLICIT_INSTALL_SETTINGS)

.PHONY: kind-install-kyverno-from-repo
kind-install-kyverno-from-repo: $(HELM) ## Install Kyverno Helm Chart from the Kyverno repo
@echo Install kyverno chart... >&2
@$(HELM) upgrade --install kyverno --namespace kyverno --create-namespace --wait \
--repo https://kyverno.github.io/kyverno/ kyverno \
--version $(INSTALL_VERSION) \
$(foreach CONFIG,$(subst $(COMMA), ,$(USE_CONFIG)),--values ./scripts/config/$(CONFIG)/kyverno.yaml) \
$(EXPLICIT_INSTALL_SETTINGS)

.PHONY: kind-install-goldilocks
kind-install-goldilocks: $(HELM) ## Install goldilocks helm chart
Expand Down Expand Up @@ -1029,6 +1040,10 @@ kind-deploy-reporter: $(HELM) ## Deploy policy-reporter helm chart
--values ./scripts/config/standard/kyverno-reporter.yaml
@kubectl port-forward -n policy-reporter services/policy-reporter-ui 8082:8080

.PHONY: kind-admission-controller-image-name
kind-admission-controller-image-name: ## Print admission controller image name
@echo -n $(LOCAL_REGISTRY)/$(LOCAL_KYVERNO_REPO):$(GIT_SHA)

###########
# ROLLOUT #
###########
Expand Down
4 changes: 1 addition & 3 deletions charts/kyverno/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ annotations:
# valid kinds are: added, changed, deprecated, removed, fixed and security
artifacthub.io/changes: |
- kind: added
description: Add a key to preserve configmap settings during upgrade
- kind: added
description: Make admission reports breaker threshold configurable
description: Added customLabels to the pods label metadata of the cronjobs
dependencies:
- name: grafana
version: 3.2.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ spec:
annotations:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.cleanupJobs.admissionReports.podLabels }}
labels:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- include "kyverno.cleanup.labels" . | nindent 12 }}
{{- with .Values.cleanupJobs.admissionReports.podLabels }}
{{- tpl (toYaml .) $ | nindent 12 }}
{{- end }}
spec:
serviceAccountName: {{ template "kyverno.name" . }}-cleanup-jobs
{{- with .Values.cleanupJobs.admissionReports.podSecurityContext }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ spec:
annotations:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.cleanupJobs.clusterAdmissionReports.podLabels }}
labels:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- include "kyverno.cleanup.labels" . | nindent 12 }}
{{- with .Values.cleanupJobs.clusterAdmissionReports.podLabels }}
{{- tpl (toYaml .) $ | nindent 12 }}
{{- end }}
spec:
serviceAccountName: {{ template "kyverno.name" . }}-cleanup-jobs
{{- with .Values.cleanupJobs.clusterAdmissionReports.podSecurityContext }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ spec:
annotations:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.cleanupJobs.clusterEphemeralReports.podLabels }}
labels:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- include "kyverno.cleanup.labels" . | nindent 12 }}
{{- with .Values.cleanupJobs.clusterEphemeralReports.podLabels }}
{{- tpl (toYaml .) $ | nindent 12 }}
{{- end }}
spec:
serviceAccountName: {{ template "kyverno.name" . }}-cleanup-jobs
{{- with .Values.cleanupJobs.clusterEphemeralReports.podSecurityContext }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ spec:
annotations:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.cleanupJobs.ephemeralReports.podLabels }}
labels:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- include "kyverno.cleanup.labels" . | nindent 12 }}
{{- with .Values.cleanupJobs.ephemeralReports.podLabels }}
{{- tpl (toYaml .) $ | nindent 12 }}
{{- end }}
spec:
serviceAccountName: {{ template "kyverno.name" . }}-cleanup-jobs
{{- with .Values.cleanupJobs.ephemeralReports.podSecurityContext }}
Expand Down
7 changes: 4 additions & 3 deletions charts/kyverno/templates/cleanup/cleanup-update-requests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ spec:
annotations:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.cleanupJobs.updateRequests.podLabels }}
labels:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- include "kyverno.cleanup.labels" . | nindent 12 }}
{{- with .Values.cleanupJobs.updateRequests.podLabels }}
{{- tpl (toYaml .) $ | nindent 12 }}
{{- end }}
spec:
serviceAccountName: {{ template "kyverno.name" . }}-cleanup-jobs
{{- with .Values.cleanupJobs.updateRequests.podSecurityContext }}
Expand Down
20 changes: 20 additions & 0 deletions config/install-latest-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49410,6 +49410,11 @@ spec:
backoffLimit: 3
template:
metadata:
labels:
app.kubernetes.io/component: cleanup
app.kubernetes.io/instance: kyverno
app.kubernetes.io/part-of: kyverno
app.kubernetes.io/version: latest
spec:
serviceAccountName: kyverno-cleanup-jobs
containers:
Expand Down Expand Up @@ -49460,6 +49465,11 @@ spec:
backoffLimit: 3
template:
metadata:
labels:
app.kubernetes.io/component: cleanup
app.kubernetes.io/instance: kyverno
app.kubernetes.io/part-of: kyverno
app.kubernetes.io/version: latest
spec:
serviceAccountName: kyverno-cleanup-jobs
containers:
Expand Down Expand Up @@ -49510,6 +49520,11 @@ spec:
backoffLimit: 3
template:
metadata:
labels:
app.kubernetes.io/component: cleanup
app.kubernetes.io/instance: kyverno
app.kubernetes.io/part-of: kyverno
app.kubernetes.io/version: latest
spec:
serviceAccountName: kyverno-cleanup-jobs
containers:
Expand Down Expand Up @@ -49560,6 +49575,11 @@ spec:
backoffLimit: 3
template:
metadata:
labels:
app.kubernetes.io/component: cleanup
app.kubernetes.io/instance: kyverno
app.kubernetes.io/part-of: kyverno
app.kubernetes.io/version: latest
spec:
serviceAccountName: kyverno-cleanup-jobs
containers:
Expand Down
67 changes: 67 additions & 0 deletions scripts/config/standard-with-profiling/kyverno.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
features:
policyExceptions:
enabled: true
omitEvents:
eventTypes: []

admissionController:
extraArgs:
v: 4
rbac:
clusterRole:
extraResources:
- apiGroups:
- "*"
resources:
- secrets
verbs:
- create
- update
- patch
- delete
- get
- list
profiling:
enabled: true
serviceType: NodePort
nodePort: 30950

backgroundController:
extraArgs:
v: 4
rbac:
clusterRole:
extraResources:
- apiGroups:
- "*"
resources:
- configmaps
- networkpolicies
- resourcequotas
- secrets
- roles
- rolebindings
- limitranges
- namespaces
- nodes
- nodes/status
- pods
verbs:
- create
- update
- patch
- delete
- get
- list

cleanupController:
rbac:
clusterRole:
extraResources:
- apiGroups:
- ""
resources:
- pods
verbs:
- list
- delete
19 changes: 0 additions & 19 deletions scripts/config/stress-with-profiling/kyverno.yaml

This file was deleted.

79 changes: 79 additions & 0 deletions test/load/k6/pull_request-matrix.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
[
{
"name": "kyverno-pss",
"scenario": "",
"replicas": 1,
"cpu_request": "100m",
"memory_request": "128Mi",
"memory_limit": "384Mi",
"concurrent_connections": 10,
"total_iterations": 1000,
"extra_options": "--no-teardown"
},
{
"name": "kyverno-pss",
"scenario": "",
"replicas": 1,
"cpu_request": "100m",
"memory_request": "128Mi",
"memory_limit": "384Mi",
"concurrent_connections": 20,
"total_iterations": 5000,
"extra_options": "--no-teardown"
},
{
"name": "kyverno-pss",
"scenario": "",
"replicas": 1,
"cpu_request": "100m",
"memory_request": "128Mi",
"memory_limit": "384Mi",
"concurrent_connections": 50,
"total_iterations": 10000,
"extra_options": "--no-teardown"
},
{
"name": "kyverno-pss",
"scenario": "",
"replicas": 3,
"cpu_request": "100m",
"memory_request": "128Mi",
"memory_limit": "384Mi",
"concurrent_connections": 10,
"total_iterations": 1000,
"extra_options": "--no-teardown"
},
{
"name": "kyverno-pss",
"scenario": "",
"replicas": 3,
"cpu_request": "100m",
"memory_request": "128Mi",
"memory_limit": "384Mi",
"concurrent_connections": 20,
"total_iterations": 5000,
"extra_options": "--no-teardown"
},
{
"name": "kyverno-pss",
"scenario": "",
"replicas": 3,
"cpu_request": "100m",
"memory_request": "128Mi",
"memory_limit": "384Mi",
"concurrent_connections": 50,
"total_iterations": 10000,
"extra_options": "--no-teardown"
},
{
"name": "kyverno-generate",
"scenario": "",
"replicas": 1,
"cpu_request": "100m",
"memory_request": "128Mi",
"memory_limit": "384Mi",
"concurrent_connections": 10,
"total_iterations": 1000,
"extra_options": ""
}
]
Loading

0 comments on commit 698cbef

Please sign in to comment.