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

Add changes for deploying specific controller #186

Merged
merged 6 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from 5 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
2 changes: 1 addition & 1 deletion charts/nirmata/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
type: application
name: kyverno
version: 3.0.8
appVersion: v1.10.5-n4k.nirmata.1
appVersion: v1.10.5-n4k-test-3
icon: https://github.com/kyverno/kyverno/raw/main/img/logo.png
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sync with build later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes Parikshit, thanks!

description: Kubernetes Native Policy Management
keywords:
Expand Down
8 changes: 8 additions & 0 deletions charts/nirmata/templates/cleanup-controller/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ metadata:
labels:
{{- include "kyverno.cleanup-controller.labels" . | nindent 4 }}
rules:
- apiGroups:
- '*'
resources:
- '*'
verbs:
- get
- list
- watch
- apiGroups:
- admissionregistration.k8s.io
resources:
Expand Down
1 change: 1 addition & 0 deletions charts/nirmata/templates/crds/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{{- template "kyverno.labels.merge" (list
(include "kyverno.labels.common" .)
(include "kyverno.crds.matchLabels" .)
(toYaml .Values.customLabels)
) -}}
{{- end -}}

Expand Down
35 changes: 35 additions & 0 deletions charts/nirmata/templates/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,10 @@ spec:
storage: true
subresources: {}
---
{{- if and (eq .Values.reportsController.enabled true) (eq .Values.crds.backgroundscanreports false) }}
{{- fail "CRD backgroundscanreports disabled while reportsController enabled" }}
{{- end }}
{{- if .Values.crds.backgroundscanreports }}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -641,7 +645,13 @@ spec:
served: true
storage: true
subresources: {}
{{- end }}
---
{{- if and (eq .Values.cleanupController.enabled true) (eq .Values.crds.cleanuppolicies false) }}
{{- fail "CRD cleanuppolicies disabled while cleanupController enabled" }}
{{- end }}

{{- if .Values.crds.cleanuppolicies }}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -1755,6 +1765,7 @@ spec:
storage: true
subresources:
status: {}
{{- end }}
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -2094,6 +2105,11 @@ spec:
storage: true
subresources: {}
---
{{- if and (eq .Values.reportsController.enabled true) (eq .Values.crds.clusterbackgroundscanreports false) }}
{{- fail "CRD backgroundscanreports disabled while reportsController enabled" }}
{{- end }}

{{- if .Values.crds.clusterbackgroundscanreports }}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -2398,7 +2414,13 @@ spec:
served: true
storage: true
subresources: {}
{{- end }}
---
{{- if and (eq .Values.cleanupController.enabled true) (eq .Values.crds.clustercleanuppolicies false) }}
{{- fail "CRD clustercleanuppolicies disabled while cleanupController enabled" }}
{{- end }}

{{- if .Values.crds.clustercleanuppolicies }}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -3512,6 +3534,7 @@ spec:
storage: true
subresources:
status: {}
{{- end }}
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -33021,6 +33044,11 @@ spec:
subresources:
status: {}
---
{{- if and (eq .Values.reportsController.enabled true) (eq .Values.crds.clusterpolicyreports false) }}
{{- fail "CRD clusterpolicyreports disabled while reportsController enabled" }}
{{- end }}

{{- if .Values.crds.clusterpolicyreports }}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -33387,7 +33415,13 @@ spec:
served: true
storage: true
subresources: {}
{{- end }}
---
{{- if and (eq .Values.reportsController.enabled true) (eq .Values.crds.clusterpolicyreports false) }}
{{- fail "CRD clusterpolicyreports disabled while reportsController enabled" }}
{{- end }}

{{- if .Values.crds.clusterpolicyreports }}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -33754,3 +33788,4 @@ spec:
storage: true
subresources: {}
{{- end }}
{{- end }}
15 changes: 12 additions & 3 deletions charts/nirmata/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ apiVersionOverride:
# CRDs configuration
crds:

backgroundscanreports: true

cleanuppolicies: true

clusterbackgroundscanreports: true

clustercleanuppolicies: true

clusterpolicyreports: true

policyreports: true

# -- Whether to have Helm install the Kyverno CRDs, if the CRDs are not installed by Helm, they must be added before policies can be created
install: true

Expand Down Expand Up @@ -891,7 +903,6 @@ backgroundController:
# -- Overrides features defined at the root level
featuresOverride: {}

# -- Enable background controller.
enabled: true

rbac:
Expand Down Expand Up @@ -1110,7 +1121,6 @@ cleanupController:
# -- Overrides features defined at the root level
featuresOverride: {}

# -- Enable cleanup controller.
enabled: true

rbac:
Expand Down Expand Up @@ -1382,7 +1392,6 @@ reportsController:
# -- Overrides features defined at the root level
featuresOverride: {}

# -- Enable reports controller.
enabled: true

rbac:
Expand Down
Loading