Skip to content

Commit

Permalink
replace {{ .Release.Namespace }} with include alloy.namespace .
Browse files Browse the repository at this point in the history
  • Loading branch information
shinebayar-g committed Nov 16, 2024
1 parent 7050483 commit 5ce4e72
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "alloy.fullname" . }}-cluster
namespace: {{ .Release.Namespace }}
namespace: {{ include "alloy.namespace" . }}
labels:
{{- include "alloy.labels" . | nindent 4 }}
app.kubernetes.io/component: networking
Expand Down
2 changes: 1 addition & 1 deletion operations/helm/charts/alloy/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "alloy.fullname" . }}
namespace: {{ .Release.Namespace }}
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,7 +3,7 @@ apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "alloy.fullname" . }}
namespace: {{ .Release.Namespace }}
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,7 +3,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "alloy.fullname" . }}
namespace: {{ .Release.Namespace }}
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,7 +6,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "alloy.fullname" . }}
namespace: {{ .Release.Namespace }}
namespace: {{ include "alloy.namespace" . }}
labels:
{{- include "alloy.labels" . | nindent 4 }}
{{- with .Values.controller.extraAnnotations }}
Expand Down
2 changes: 1 addition & 1 deletion operations/helm/charts/alloy/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "alloy.fullname" . }}
namespace: {{ .Release.Namespace }}
namespace: {{ include "alloy.namespace" . }}
labels:
{{- include "alloy.labels" . | nindent 4 }}
app.kubernetes.io/component: availability
Expand Down
2 changes: 1 addition & 1 deletion operations/helm/charts/alloy/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ apiVersion: {{ include "alloy.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ $fullName }}
namespace: {{ .Release.Namespace }}
namespace: {{ include "alloy.namespace" . }}
labels:
{{- include "alloy.labels" . | nindent 4 }}
app.kubernetes.io/component: networking
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 }}
2 changes: 1 addition & 1 deletion operations/helm/charts/alloy/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "alloy.fullname" . }}
namespace: {{ .Release.Namespace }}
namespace: {{ include "alloy.namespace" . }}
labels:
{{- include "alloy.labels" . | nindent 4 }}
app.kubernetes.io/component: networking
Expand Down
2 changes: 1 addition & 1 deletion operations/helm/charts/alloy/templates/serviceaccount.yaml
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
2 changes: 1 addition & 1 deletion operations/helm/charts/alloy/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "alloy.fullname" . }}
namespace: {{ .Release.Namespace }}
namespace: {{ include "alloy.namespace" . }}
labels:
{{- include "alloy.labels" . | nindent 4 }}
app.kubernetes.io/component: metrics
Expand Down
33 changes: 20 additions & 13 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 All @@ -10,7 +13,7 @@ fullnameOverride: null
global:
image:
# -- Global image registry to use if it needs to be overriden for some specific use cases (e.g local registries, custom images, ...)
registry: ""
registry: ''

# -- Optional set of global image pull secrets.
pullSecrets: []
Expand Down Expand Up @@ -42,14 +45,14 @@ alloy:
enabled: false

# -- Name for the Alloy cluster. Used for differentiating between clusters.
name: ""
name: ''

# -- Name for the port used for clustering, useful if running inside an Istio Mesh
portName: http

# -- Minimum stability level of components and behavior to enable. Must be
# one of "experimental", "public-preview", or "generally-available".
stabilityLevel: "generally-available"
stabilityLevel: 'generally-available'

# -- Path to where Grafana Alloy stores data (for example, the Write-Ahead Log).
# By default, data is lost between reboots.
Expand Down Expand Up @@ -113,7 +116,8 @@ alloy:
resources: {}

# -- Set lifecycle hooks for the Grafana Alloy container.
lifecycle: {}
lifecycle:
{}
# preStop:
# exec:
# command:
Expand All @@ -122,7 +126,7 @@ alloy:

image:
# -- Grafana Alloy image registry (defaults to docker.io)
registry: "docker.io"
registry: 'docker.io'
# -- Grafana Alloy image repository.
repository: grafana/alloy
# -- (string) Grafana Alloy image tag. When empty, the Chart's appVersion is
Expand Down Expand Up @@ -156,20 +160,20 @@ configReloader:
enabled: true
image:
# -- Config reloader image registry (defaults to docker.io)
registry: "ghcr.io"
registry: 'ghcr.io'
# -- Repository to get config reloader image from.
repository: jimmidyson/configmap-reload
# -- Tag of image to use for config reloading.
tag: v0.12.0
# -- SHA256 digest of image to use for config reloading (either in format "sha256:XYZ" or "XYZ"). When set, will override `configReloader.image.tag`
digest: ""
digest: ''
# -- Override the args passed to the container.
customArgs: []
# -- Resource requests and limits to apply to the config reloader container.
resources:
requests:
cpu: "1m"
memory: "5Mi"
cpu: '1m'
memory: '5Mi'
# -- Security context to apply to the Grafana configReloader container.
securityContext: {}

Expand Down Expand Up @@ -250,7 +254,8 @@ controller:

scaleDown:
# -- List of policies to determine the scale-down behavior.
policies: []
policies:
[]
# - type: Pods
# value: 4
# periodSeconds: 60
Expand All @@ -261,7 +266,8 @@ controller:

scaleUp:
# -- List of policies to determine the scale-up behavior.
policies: []
policies:
[]
# - type: Pods
# value: 4
# periodSeconds: 60
Expand Down Expand Up @@ -299,15 +305,16 @@ service:
clusterIP: ''
# -- Value for internal traffic policy. 'Cluster' or 'Local'
internalTrafficPolicy: Cluster
annotations: {}
annotations:
{}
# cloud.google.com/load-balancer-type: Internal

serviceMonitor:
enabled: false
# -- Additional labels for the service monitor.
additionalLabels: {}
# -- Scrape interval. If not set, the Prometheus default scrape interval is used.
interval: ""
interval: ''
# -- MetricRelabelConfigs to apply to samples after scraping, but before ingestion.
# ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig
metricRelabelings: []
Expand Down

0 comments on commit 5ce4e72

Please sign in to comment.