Skip to content

Commit

Permalink
Misc chart enhancements and appVersion v1.1.1 (#103)
Browse files Browse the repository at this point in the history
- appVersion v1.1.1
- Allow setting a different namespace for the ServiceMonitor than the
one the app runs in
- Allow setting the DNS config for the pods
- Allow setting the topologySpreadConstraints
- Allow setting the priorityClassName
- Allow not setting the number of replicas for the Deployment in case
you set your own HPA or something
  • Loading branch information
mtougeron authored Dec 3, 2024
1 parent fcee384 commit faf40c4
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 4 deletions.
6 changes: 4 additions & 2 deletions charts/k8s-pvc-tagger/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ maintainers:
keywords:
- kubernetes
- aws
- eks
- pvc
- gcp
- aws-ebs
- aws-efs
- persistent-volumes
sources:
- https://github.com/mtougeron/k8s-pvc-tagger

version: 2.2.1
appVersion: v1.1.0
version: 2.2.2
appVersion: v1.1.1
20 changes: 18 additions & 2 deletions charts/k8s-pvc-tagger/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@ metadata:
labels:
{{- include "k8s-pvc-tagger.labels" . | nindent 4 }}
spec:
{{- if .Values.replicaCount }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "k8s-pvc-tagger.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
labels:
{{- include "k8s-pvc-tagger.selectorLabels" . | nindent 8 }}
{{- with .Values.podLabels }}
Expand Down Expand Up @@ -96,6 +98,13 @@ spec:
{{- toYaml .Values.volumeMounts | nindent 12 }}
{{- end }}
hostNetwork: {{ .Values.hostNetwork }}
{{- if .Values.dnsPolicy }}
dnsPolicy: {{ .Values.dnsPolicy }}
{{- end }}
{{- if .Values.dnsConfig }}
dnsConfig:
{{- toYaml .Values.dnsConfig | nindent 8 }}
{{- end }}
{{- if .Values.volumes }}
volumes:
# Extra volume(s)
Expand All @@ -113,3 +122,10 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
1 change: 1 addition & 0 deletions charts/k8s-pvc-tagger/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "k8s-pvc-tagger.fullname" . }}
namespace: {{ .Values.serviceMonitorNamespace | default .Release.Namespace }}
labels:
{{- include "k8s-pvc-tagger.labels" . | nindent 4 }}
{{- with .Values.serviceMonitorLabels }}
Expand Down
8 changes: 8 additions & 0 deletions charts/k8s-pvc-tagger/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,18 @@ watchNamespace: ""

serviceMonitor: false
serviceMonitorLabels: {}
serviceMonitorNamespace: ""

debug: false

extraEnvs: {}
extraArgs: {}

podLabels: {}

dnsPolicy: ""
dnsConfig: {}

topologySpreadConstraints: []

priorityClassName: ""

0 comments on commit faf40c4

Please sign in to comment.