feat(k8s-ycl): Release v0.2.0

This commit is contained in:
Bernd Schorgers 2023-07-28 09:51:36 +02:00
parent 48a6214766
commit 4e39c50c88
No known key found for this signature in database
GPG key ID: BC5E2BD907F9A8EC
5 changed files with 28 additions and 6 deletions

View file

@ -2,7 +2,7 @@
apiVersion: v2
description: Kubernetes admission controller to remove CPU limits from Pods.
name: k8s-ycl
version: 0.1.0
version: 0.2.0
appVersion: v0.1.0
kubeVersion: ">=1.22.0-0"
sources:
@ -22,9 +22,12 @@ dependencies:
version: 1.5.1
annotations:
artifacthub.io/changes: |-
- kind: changed
- kind: added
description: |
Initial version
Make ignored namespaces configurable
- kind: added
description: |
Added metrics port to Service
artifacthub.io/links: |
- name: "source"
url: "https://github.com/bjw-s/k8s-ycl"

View file

@ -6,6 +6,20 @@
/mutate--v1-pod
{{- end -}}
{{- define "k8s-ycl.ignoredNamespaces" -}}
{{- $ownNamespace := $.Release.Namespace -}}
{{- $ignoredNamespaces := list -}}
{{- if $.Values.webhook.ignoreOwnNamespace -}}
{{- $ignoredNamespaces = append $ignoredNamespaces $ownNamespace -}}
{{- end -}}
{{- with $.Values.webhook.ignoredNamespaces -}}
{{- range . -}}
{{- $ignoredNamespaces = append $ignoredNamespaces . -}}
{{- end -}}
{{- end -}}
{{- $ignoredNamespaces | uniq | toYaml -}}
{{- end -}}
{{- define "k8s-ycl.selfSignedIssuer" -}}
{{ printf "%s-webhook-selfsign" (include "bjw-s.common.lib.chart.names.fullname" .) }}
{{- end -}}

View file

@ -15,9 +15,7 @@ webhooks:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: NotIn
values:
- kube-system
- {{ .Release.Namespace | quote }}
values: {{ include "k8s-ycl.ignoredNamespaces" . | nindent 10 }}
clientConfig:
service:
namespace: {{ .Release.Namespace | quote }}

View file

@ -12,6 +12,9 @@ service:
http:
enabled: true
port: 9443
metrics:
enabled: true
port: 8080
probe:
enabled: true
port: 8081

View file

@ -8,3 +8,7 @@ image:
webhook:
path: /mutate--v1-pod
ignoreOwnNamespace: true
ignoredNamespaces:
- kube-system