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

View file

@ -6,6 +6,20 @@
/mutate--v1-pod /mutate--v1-pod
{{- end -}} {{- 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" -}} {{- define "k8s-ycl.selfSignedIssuer" -}}
{{ printf "%s-webhook-selfsign" (include "bjw-s.common.lib.chart.names.fullname" .) }} {{ printf "%s-webhook-selfsign" (include "bjw-s.common.lib.chart.names.fullname" .) }}
{{- end -}} {{- end -}}

View file

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

View file

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

View file

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