Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(helm): ensure helm resources have correct namespace #2044

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions operations/helm/charts/alloy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ internal API changes are not present.
Unreleased
----------

### Bug Fixes

- Set resource namespace correctly (@shinebayar-g)

0.10.0 (2024-11-13)
----------

### Enhancements

- Add support for adding hostAliases to the Helm chart. (@duncan485)
Expand Down Expand Up @@ -72,7 +77,6 @@ Unreleased

- Update helm chart to use v1.3.1.


0.6.0 (2024-08-05)
------------------

Expand Down Expand Up @@ -124,7 +128,6 @@ Unreleased

- Update to Grafana Alloy v1.1.0. (@rfratto)


0.2.0 (2024-05-08)
------------------

Expand Down
1 change: 1 addition & 0 deletions operations/helm/charts/alloy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ useful if just using the default DaemonSet isn't sufficient.
| ingress.pathType | string | `"Prefix"` | |
| ingress.tls | list | `[]` | |
| nameOverride | string | `nil` | Overrides the chart's name. Used to change the infix in the resource names. |
| namespaceOverride | string | `nil` | Overrides the chart's namespace. |
| rbac.create | bool | `true` | Whether to create RBAC resources for Alloy. |
| service.annotations | object | `{}` | |
| service.clusterIP | string | `""` | Cluster IP, can be set to None, empty "" or an IP address |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "alloy.fullname" . }}-cluster
namespace: {{ include "alloy.namespace" . }}
labels:
{{- include "alloy.labels" . | nindent 4 }}
app.kubernetes.io/component: networking
Expand Down
1 change: 1 addition & 0 deletions operations/helm/charts/alloy/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "alloy.fullname" . }}
namespace: {{ include "alloy.namespace" . }}
labels:
{{- include "alloy.labels" . | nindent 4 }}
app.kubernetes.io/component: config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "alloy.fullname" . }}
namespace: {{ include "alloy.namespace" . }}
labels:
{{- include "alloy.labels" . | nindent 4 }}
{{- with .Values.controller.extraAnnotations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "alloy.fullname" . }}
namespace: {{ include "alloy.namespace" . }}
labels:
{{- include "alloy.labels" . | nindent 4 }}
{{- with .Values.controller.extraAnnotations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "alloy.fullname" . }}
namespace: {{ include "alloy.namespace" . }}
labels:
{{- include "alloy.labels" . | nindent 4 }}
{{- with .Values.controller.extraAnnotations }}
Expand Down
1 change: 1 addition & 0 deletions operations/helm/charts/alloy/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "alloy.fullname" . }}
namespace: {{ include "alloy.namespace" . }}
labels:
{{- include "alloy.labels" . | nindent 4 }}
app.kubernetes.io/component: availability
Expand Down
4 changes: 2 additions & 2 deletions operations/helm/charts/alloy/templates/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ apiVersion: {{ include "alloy.controller.pdb.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ include "alloy.fullname" . }}
namespace: {{ .Release.Namespace }}
namespace: {{ include "alloy.namespace" . }}
labels:
{{- include "alloy.labels" . | nindent 4 }}
spec:
Expand All @@ -28,4 +28,4 @@ spec:
{{- if .Values.controller.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.controller.podDisruptionBudget.maxUnavailable }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion operations/helm/charts/alloy/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,5 @@ roleRef:
subjects:
- kind: ServiceAccount
name: {{ include "alloy.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
namespace: {{ include "alloy.namespace" . }}
{{- end }}
1 change: 1 addition & 0 deletions operations/helm/charts/alloy/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "alloy.fullname" . }}
namespace: {{ include "alloy.namespace" . }}
labels:
{{- include "alloy.labels" . | nindent 4 }}
app.kubernetes.io/component: networking
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "alloy.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
namespace: {{ include "alloy.namespace" . }}
labels:
{{- include "alloy.labels" . | nindent 4 }}
app.kubernetes.io/component: rbac
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "alloy.fullname" . }}
namespace: {{ include "alloy.namespace" . }}
labels:
{{- include "alloy.labels" . | nindent 4 }}
app.kubernetes.io/component: metrics
Expand Down
3 changes: 3 additions & 0 deletions operations/helm/charts/alloy/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# -- Overrides the chart's name. Used to change the infix in the resource names.
nameOverride: null

# -- Overrides the chart's namespace.
namespaceOverride: null

# -- Overrides the chart's computed fullname. Used to change the full prefix of
# resource names.
fullnameOverride: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: apps/v1
kind: DaemonSet
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: Service
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: Service
metadata:
name: alloy-cluster
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: Service
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: Service
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: Service
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: Service
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: Service
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: apps/v1
kind: DaemonSet
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: Service
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: apps/v1
kind: DaemonSet
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: Service
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: apps/v1
kind: DaemonSet
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: Service
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: Service
metadata:
name: alloy
namespace: default
labels:
helm.sh/chart: alloy
app.kubernetes.io/name: alloy
Expand Down
Loading
Loading