forked from kyverno/kyverno
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: template background controller (kyverno#6157)
* add make targets for background controller Signed-off-by: ShutingZhao <[email protected]> * template background controller Signed-off-by: ShutingZhao <[email protected]> * fix code-gen manifests Signed-off-by: ShutingZhao <[email protected]> * remove unused code Signed-off-by: ShutingZhao <[email protected]> * trim spaces Signed-off-by: ShutingZhao <[email protected]> * Update Makefile Co-authored-by: Charles-Edouard Brétéché <[email protected]> Signed-off-by: shuting <[email protected]> * Update Makefile Signed-off-by: shuting <[email protected]> * fix Signed-off-by: ShutingZhao <[email protected]> * refactor: move resolvers into engine api package (kyverno#6162) Signed-off-by: Charles-Edouard Brétéché <[email protected]> * add rbac Signed-off-by: ShutingZhao <[email protected]> * add more rbac Signed-off-by: ShutingZhao <[email protected]> * add debug info Signed-off-by: ShutingZhao <[email protected]> * add notes to helm install Signed-off-by: ShutingZhao <[email protected]> * fix permissions Signed-off-by: ShutingZhao <[email protected]> --------- Signed-off-by: ShutingZhao <[email protected]> Signed-off-by: shuting <[email protected]> Signed-off-by: Charles-Edouard Brétéché <[email protected]> Co-authored-by: Charles-Edouard Brétéché <[email protected]> Co-authored-by: kyverno-bot <[email protected]> Co-authored-by: Charles-Edouard Brétéché <[email protected]>
- Loading branch information
1 parent
8290112
commit b4c1590
Showing
20 changed files
with
919 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
charts/kyverno/templates/background-controller/_helpers.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
|
||
{{- define "kyverno.background-controller.name" -}} | ||
{{ template "kyverno.name" . }}-background-controller | ||
{{- end -}} | ||
|
||
{{- define "kyverno.background-controller.labels" -}} | ||
{{- template "kyverno.labels.merge" (list | ||
(include "kyverno.labels.common" .) | ||
(include "kyverno.background-controller.matchLabels" .) | ||
) -}} | ||
{{- end -}} | ||
|
||
{{- define "kyverno.background-controller.matchLabels" -}} | ||
{{- template "kyverno.labels.merge" (list | ||
(include "kyverno.matchLabels.common" .) | ||
(include "kyverno.labels.component" "background-controller") | ||
) -}} | ||
{{- end -}} | ||
|
||
{{- define "kyverno.background-controller.image" -}} | ||
{{- if .image.registry -}} | ||
{{ .image.registry }}/{{ required "An image repository is required" .image.repository }}:{{ default .defaultTag .image.tag }} | ||
{{- else -}} | ||
{{ required "An image repository is required" .image.repository }}:{{ default .defaultTag .image.tag }} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- define "kyverno.background-controller.roleName" -}} | ||
{{ .Release.Name }}:background-controller | ||
{{- end -}} | ||
|
||
{{- define "kyverno.background-controller.serviceAccountName" -}} | ||
{{- if .Values.backgroundController.rbac.create -}} | ||
{{ default (include "kyverno.background-controller.name" .) .Values.backgroundController.rbac.serviceAccount.name }} | ||
{{- else -}} | ||
{{ required "A service account name is required when `rbac.create` is set to `false`" .Values.backgroundController.rbac.serviceAccount.name }} | ||
{{- end -}} | ||
{{- end -}} |
Oops, something went wrong.