Skip to content

Commit

Permalink
Use .Release.Namespace to render namespace for the fluent-bit resourc…
Browse files Browse the repository at this point in the history
…es (#368)

define namespace for the k8s resources

Signed-off-by: Praveen <[email protected]>

update test namespace

Signed-off-by: Praveen <[email protected]>

use .Release.Namespace

Signed-off-by: Praveen <[email protected]>

revert to using existing custom namespace for servicemonitor

Signed-off-by: Praveen <[email protected]>

update test to use .Release.Namespace

Signed-off-by: Praveen <[email protected]>

use default namespace if not overwritten using custom values

Signed-off-by: Praveen <[email protected]>

add empty value for testFramework.namespace

Signed-off-by: Praveen <[email protected]>

Update charts/fluent-bit/values.yaml

Co-authored-by: Steve Hipwell <[email protected]>
Signed-off-by: Praveen <[email protected]>

Update charts/fluent-bit/templates/servicemonitor.yaml

Co-authored-by: Steve Hipwell <[email protected]>
Signed-off-by: Praveen <[email protected]>

remove namespace from cluster resources

Signed-off-by: Praveen <[email protected]>

bump version

update changelog
  • Loading branch information
prawinxp authored May 31, 2023
1 parent 300c043 commit 372b02e
Show file tree
Hide file tree
Showing 17 changed files with 18 additions and 11 deletions.
4 changes: 2 additions & 2 deletions charts/fluent-bit/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ keywords:
- logging
- fluent-bit
- fluentd
version: 0.30.2
version: 0.30.3
appVersion: 2.1.4
icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/fluentd/fluentbit/icon/fluentbit-icon-color.svg
home: https://fluentbit.io/
Expand All @@ -23,4 +23,4 @@ maintainers:
annotations:
artifacthub.io/changes: |
- kind: added
description: "Added image reference by digest."
description: "Use .Release.Namespace to render namespace for the fluent-bit resources."
4 changes: 1 addition & 3 deletions charts/fluent-bit/templates/configmap-dashboards.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "fluent-bit.fullname" $ }}-dashboard-{{ trimSuffix ".json" (base $path) }}
{{- with $.Values.dashboards.namespace }}
namespace: {{ . }}
{{- end }}
namespace: {{ default $.Release.Namespace $.Values.dashboards.namespace }}
{{- with $.Values.dashboards.annotations }}
annotations:
{{- toYaml . | nindent 4 -}}
Expand Down
1 change: 1 addition & 0 deletions charts/fluent-bit/templates/configmap-luascripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "fluent-bit.fullname" . }}-luascripts
namespace: {{ .Release.Namespace }}
labels:
{{- include "fluent-bit.labels" . | nindent 4 }}
data:
Expand Down
1 change: 1 addition & 0 deletions charts/fluent-bit/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "fluent-bit.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "fluent-bit.labels" . | nindent 4 }}
data:
Expand Down
1 change: 1 addition & 0 deletions charts/fluent-bit/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "fluent-bit.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "fluent-bit.labels" . | nindent 4 }}
{{- with .Values.labels }}
Expand Down
1 change: 1 addition & 0 deletions charts/fluent-bit/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "fluent-bit.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "fluent-bit.labels" . | nindent 4 }}
{{- with .Values.labels }}
Expand Down
1 change: 1 addition & 0 deletions charts/fluent-bit/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: {{ include "fluent-bit.hpa.apiVersion" . }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "fluent-bit.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "fluent-bit.labels" . | nindent 4 }}
spec:
Expand Down
1 change: 1 addition & 0 deletions charts/fluent-bit/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ apiVersion: {{ include "fluent-bit.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ $fullName }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "fluent-bit.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
Expand Down
1 change: 1 addition & 0 deletions charts/fluent-bit/templates/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: "networking.k8s.io/v1"
kind: "NetworkPolicy"
metadata:
name: {{ include "fluent-bit.fullname" . | quote }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "fluent-bit.labels" . | nindent 4 }}
spec:
Expand Down
1 change: 1 addition & 0 deletions charts/fluent-bit/templates/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: {{ include "fluent-bit.pdb.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ include "fluent-bit.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "fluent-bit.labels" . | nindent 4 }}
{{- with .Values.podDisruptionBudget.annotations }}
Expand Down
4 changes: 1 addition & 3 deletions charts/fluent-bit/templates/prometheusrule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: {{ include "fluent-bit.fullname" . }}
{{- with .Values.prometheusRule.namespace }}
namespace: {{ . }}
{{- end }}
namespace: {{ default $.Release.Namespace .Values.prometheusRule.namespace }}
labels:
{{- include "fluent-bit.labels" . | nindent 4 }}
{{- if .Values.prometheusRule.additionalLabels }}
Expand Down
1 change: 1 addition & 0 deletions charts/fluent-bit/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "fluent-bit.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "fluent-bit.labels" . | nindent 4 }}
{{- with .Values.service.labels }}
Expand Down
1 change: 1 addition & 0 deletions charts/fluent-bit/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "fluent-bit.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "fluent-bit.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
Expand Down
4 changes: 1 addition & 3 deletions charts/fluent-bit/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "fluent-bit.fullname" . }}
{{- with .Values.serviceMonitor.namespace }}
namespace: {{ . }}
{{- end }}
namespace: {{ default .Release.Namespace .Values.serviceMonitor.namespace }}
labels:
{{- include "fluent-bit.labels" . | nindent 4 }}
{{- with .Values.serviceMonitor.selector }}
Expand Down
1 change: 1 addition & 0 deletions charts/fluent-bit/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: Pod
metadata:
name: "{{ include "fluent-bit.fullname" . }}-test-connection"
namespace: {{ default .Release.Namespace .Values.testFramework.namespace }}
labels:
{{- include "fluent-bit.labels" . | nindent 4 }}
annotations:
Expand Down
1 change: 1 addition & 0 deletions charts/fluent-bit/templates/vpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: {{ include "fluent-bit.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "fluent-bit.labels" . | nindent 4 }}
{{- with .Values.autoscaling.vpa.annotations }}
Expand Down
1 change: 1 addition & 0 deletions charts/fluent-bit/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ image:

testFramework:
enabled: true
namespace:
image:
repository: busybox
pullPolicy: Always
Expand Down

0 comments on commit 372b02e

Please sign in to comment.