-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add kyverno-authz-server chart (#145)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
- Loading branch information
1 parent
883b291
commit f379a7d
Showing
25 changed files
with
564 additions
and
115 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.helmignore | ||
ci/ | ||
README.md.gotmpl |
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,6 @@ | ||
dependencies: | ||
- name: kyverno-lib | ||
repository: file://../kyverno-lib | ||
version: 0.0.0 | ||
digest: sha256:74ae1b7230d94ccd45ed668b489009ead0c031c8240e8b76cd05a31f95e679c2 | ||
generated: "2024-10-25T21:56:51.136355+02:00" |
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,31 @@ | ||
apiVersion: v2 | ||
name: kyverno-authz-server | ||
description: Kyverno policies based authorization plugin for Envoy ❤️ | ||
icon: https://github.com/kyverno/kyverno/raw/main/img/logo.png | ||
home: https://kyverno.github.io/kyverno-envoy-plugin | ||
|
||
type: application | ||
version: 0.0.0 | ||
appVersion: latest | ||
kubeVersion: ">=1.25.0-0" | ||
|
||
keywords: | ||
- kubernetes | ||
- kyverno | ||
- authz | ||
- policy | ||
- envoy | ||
- istio | ||
- security | ||
|
||
sources: | ||
- https://github.com/kyverno/kyverno-envoy-plugin | ||
|
||
maintainers: | ||
- name: Kyverno | ||
url: https://kyverno.io/ | ||
|
||
dependencies: | ||
- name: kyverno-lib | ||
version: 0.0.0 | ||
repository: file://../kyverno-lib |
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 @@ | ||
Chart version: {{ .Chart.Version }} |
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,31 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
|
||
{{- define "kyverno-authz-server.name" -}} | ||
{{ template "kyverno.lib.names.name" . }} | ||
{{- end -}} | ||
|
||
{{- define "kyverno-authz-server.labels" -}} | ||
{{- template "kyverno.lib.labels.merge" (list | ||
(include "kyverno.lib.labels.common" .) | ||
(include "kyverno-authz-server.labels.selector" .) | ||
) -}} | ||
{{- end -}} | ||
|
||
{{- define "kyverno-authz-server.labels.selector" -}} | ||
{{- template "kyverno.lib.labels.merge" (list | ||
(include "kyverno.lib.labels.common.selector" .) | ||
(include "kyverno.lib.labels.component" "authz-server") | ||
) -}} | ||
{{- end -}} | ||
|
||
{{- define "kyverno-authz-server.service-account.name" -}} | ||
{{- if .Values.rbac.create -}} | ||
{{- default (include "kyverno-authz-server.name" .) .Values.rbac.serviceAccount.name -}} | ||
{{- else -}} | ||
{{- required "A service account name is required when `rbac.create` is set to `false`" .Values.rbac.serviceAccount.name -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- define "kyverno-authz-server.image" -}} | ||
{{- printf "%s/%s:%s" .registry .repository (default "latest" .tag) -}} | ||
{{- end -}} |
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,111 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "kyverno-authz-server.name" . }} | ||
namespace: {{ template "kyverno.lib.namespace" . }} | ||
labels: | ||
{{- include "kyverno-authz-server.labels" . | nindent 4 }} | ||
{{- with .Values.deployment.annotations }} | ||
annotations: | ||
{{- tpl (toYaml .) $ | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- with .Values.deployment.replicas }} | ||
replicas: {{ . }} | ||
{{- end }} | ||
revisionHistoryLimit: {{ .Values.deployment.revisionHistoryLimit }} | ||
{{- with .Values.deployment.updateStrategy }} | ||
strategy: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
selector: | ||
matchLabels: | ||
{{- include "kyverno-authz-server.labels.selector" . | nindent 6 }} | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "kyverno-authz-server.labels" . | nindent 8 }} | ||
{{- with .Values.pod.labels }} | ||
{{- tpl (toYaml .) $ | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.pod.annotations }} | ||
annotations: {{ tpl (toYaml .) $ | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
{{- with .Values.pod.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- tpl (toYaml .) $ | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.pod.securityContext }} | ||
securityContext: | ||
{{- tpl (toYaml .) $ | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.pod.nodeSelector }} | ||
nodeSelector: | ||
{{- tpl (toYaml .) $ | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.pod.tolerations }} | ||
tolerations: | ||
{{- tpl (toYaml .) $ | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.pod.topologySpreadConstraints }} | ||
topologySpreadConstraints: | ||
{{- tpl (toYaml .) $ | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.pod.priorityClassName }} | ||
priorityClassName: {{ . | quote }} | ||
{{- end }} | ||
{{- with .Values.pod.hostNetwork }} | ||
hostNetwork: {{ . }} | ||
{{- end }} | ||
{{- with .Values.pod.dnsPolicy }} | ||
dnsPolicy: {{ . }} | ||
{{- end }} | ||
affinity: | ||
{{- with .Values.pod.antiAffinity }} | ||
podAntiAffinity: | ||
{{- tpl (toYaml .) $ | nindent 10 }} | ||
{{- end }} | ||
{{- with .Values.pod.affinity }} | ||
podAffinity: | ||
{{- tpl (toYaml .) $ | nindent 10 }} | ||
{{- end }} | ||
{{- with .Values.pod.nodeAffinity }} | ||
nodeAffinity: | ||
{{- tpl (toYaml .) $ | nindent 10 }} | ||
{{- end }} | ||
serviceAccountName: {{ template "kyverno-authz-server.service-account.name" . }} | ||
containers: | ||
{{- with .Values.containers.server }} | ||
- name: server | ||
image: {{ include "kyverno-authz-server.image" .image }} | ||
imagePullPolicy: {{ .image.pullPolicy }} | ||
{{- with .resources }} | ||
resources: | ||
{{- tpl (toYaml .) $ | nindent 12 }} | ||
{{- end }} | ||
{{- with .securityContext }} | ||
securityContext: | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
{{- with .startupProbe }} | ||
startupProbe: | ||
{{- tpl (toYaml .) $ | nindent 12 }} | ||
{{- end }} | ||
{{- with .livenessProbe }} | ||
livenessProbe: | ||
{{- tpl (toYaml .) $ | nindent 12 }} | ||
{{- end }} | ||
{{- with .readinessProbe }} | ||
readinessProbe: | ||
{{- tpl (toYaml .) $ | nindent 12 }} | ||
{{- end }} | ||
{{- with .ports }} | ||
ports: | ||
{{- tpl (toYaml .) $ | nindent 12 }} | ||
{{- end }} | ||
{{- with .args }} | ||
args: | ||
{{- tpl (toYaml .) $ | nindent 12 }} | ||
{{- end }} | ||
{{- end }} |
13 changes: 13 additions & 0 deletions
13
charts/kyverno-authz-server/templates/service-account.yaml
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,13 @@ | ||
{{- if .Values.rbac.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ template "kyverno-authz-server.service-account.name" . }} | ||
namespace: {{ template "kyverno.lib.namespace" . }} | ||
labels: | ||
{{- include "kyverno-authz-server.labels" . | nindent 4 }} | ||
{{- with .Values.rbac.serviceAccount.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end -}} |
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,31 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "kyverno-authz-server.name" . }} | ||
namespace: {{ template "kyverno.lib.namespace" . }} | ||
labels: | ||
{{- include "kyverno-authz-server.labels" . | nindent 4 }} | ||
{{- with .Values.service.annotations }} | ||
annotations: | ||
{{- tpl (toYaml .) $ | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
type: {{ .Values.service.type }} | ||
ports: | ||
- name: http | ||
port: {{ .Values.service.port }} | ||
protocol: TCP | ||
appProtocol: http | ||
targetPort: http | ||
{{- if and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort)) }} | ||
nodePort: {{ .Values.service.nodePort }} | ||
{{- end }} | ||
- name: grpc | ||
port: {{ .Values.service.port }} | ||
protocol: TCP | ||
targetPort: grpc | ||
{{- if and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort)) }} | ||
nodePort: {{ .Values.service.nodePort }} | ||
{{- end }} | ||
selector: | ||
{{- include "kyverno-authz-server.labels.selector" . | nindent 4 }} |
Oops, something went wrong.