Skip to content

Commit 2f36711

Browse files
authored
Merge pull request #79 from superstreamlabs/staging
0.4.5
2 parents e51ca36 + c833579 commit 2f36711

File tree

9 files changed

+92
-25
lines changed

9 files changed

+92
-25
lines changed

charts/superstream/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type: application
2525
# This is the chart version. This version number should be incremented each time you make changes
2626
# to the chart and its templates, including the app version.
2727
# Versions are expected to follow Semantic Versioning (https://semver.org/)
28-
version: 0.4.4
28+
version: 0.4.5
2929
# This is the version number of the application being deployed. This version number should be
3030
# incremented each time you make changes to the application. Versions are not expected to
3131
# follow Semantic Versioning. They should reflect the version the application is using.

charts/superstream/charts/telegraf/templates/_helpers.tpl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
{{/* vim: set filetype=mustache: */}}
2+
3+
{{/*
4+
Print the image
5+
*/}}
6+
{{- define "telegraf.image" }}
7+
{{- $image := printf "%s:%s" .repo .tag }}
8+
{{- if or .registry .global.image.registry }}
9+
{{- $image = printf "%s/%s" (.registry | default .global.image.registry) $image }}
10+
{{- end -}}
11+
image: {{ $image }}
12+
{{- if or .pullPolicy .global.image.pullPolicy }}
13+
imagePullPolicy: {{ .pullPolicy | default .global.image.pullPolicy }}
14+
{{- end }}
15+
{{- end }}
16+
17+
218
{{/*
319
Expand the name of the chart.
420
*/}}

charts/superstream/charts/telegraf/templates/deployment.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ spec:
3939
securityContext:
4040
{{ toYaml .Values.containerSecurityContext | indent 10 }}
4141
{{- end }}
42-
image: "{{ .Values.image.repo }}:{{ .Values.image.tag }}"
43-
imagePullPolicy: {{ default "" .Values.image.pullPolicy | quote }}
42+
#image: "{{ .Values.image.repo }}:{{ .Values.image.tag }}"
43+
#imagePullPolicy: {{ default "" .Values.image.pullPolicy | quote }}
44+
{{ include "telegraf.image" (merge (pick $.Values "global") .Values.image) | nindent 8 }}
4445
resources:
4546
{{ toYaml .Values.resources | indent 10 }}
4647
{{- if .Values.args }}
@@ -100,9 +101,11 @@ spec:
100101
path: /
101102
port: {{ trimPrefix "http://:" .service_address | int64 }}
102103
{{- end }}
103-
{{- if .Values.imagePullSecrets }}
104+
{{- with .Values.global.image.pullSecretNames }}
104105
imagePullSecrets:
105-
{{ toYaml .Values.imagePullSecrets | indent 8 }}
106+
{{- range . }}
107+
- name: {{ . | quote }}
108+
{{- end }}
106109
{{- end }}
107110
{{- with .Values.nodeSelector }}
108111
nodeSelector:

charts/superstream/charts/telegraf/values.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,28 @@
11
## Default values.yaml for Telegraf
22
## This is a YAML-formatted file.
33
## ref: https://hub.docker.com/r/library/telegraf/tags/
4+
################################################################################
5+
# Global options
6+
################################################################################
7+
global:
8+
image:
9+
# global image pull policy to use for all container images in the chart
10+
# can be overridden by individual image pullPolicy
11+
pullPolicy:
12+
# global list of secret names to use as image pull secrets for all pod specs in the chart
13+
# secrets must exist in the same namespace
14+
# https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
15+
pullSecretNames: []
16+
# global registry to use for all container images in the chart
17+
# can be overridden by individual image registry
18+
registry:
419

520
replicaCount: 1
621
image:
7-
repo: "docker.io/library/telegraf"
22+
repo: "library/telegraf"
823
tag: "1.30-alpine"
924
pullPolicy: IfNotPresent
25+
registry:
1026
podAnnotations: {}
1127
podLabels: {}
1228
imagePullSecrets: []

charts/superstream/templates/_helpers.tpl

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
Expand the name of the chart.
33
*/}}
44
{{- define "superstream.name" -}}
5-
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
5+
{{- default .Chart.Name .Values.superstreamEngine.nameOverride | trunc 63 | trimSuffix "-" }}
66
{{- end }}
77

88
{{- define "superstream.namespace" -}}
9-
{{- default .Release.Namespace .Values.namespaceOverride | trunc 63 | trimSuffix "-" -}}
9+
{{- default .Release.Namespace .Values.superstreamEngine.namespaceOverride | trunc 63 | trimSuffix "-" -}}
1010
{{- end -}}
1111

1212
{{/*
@@ -15,10 +15,10 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
1515
If release name contains chart name it will be used as a full name.
1616
*/}}
1717
{{- define "superstream.fullname" -}}
18-
{{- if .Values.fullnameOverride }}
19-
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
18+
{{- if .Values.superstreamEngine.fullnameOverride }}
19+
{{- .Values.superstreamEngine.fullnameOverride | trunc 63 | trimSuffix "-" }}
2020
{{- else }}
21-
{{- $name := default .Chart.Name .Values.nameOverride }}
21+
{{- $name := default .Chart.Name .Values.superstreamEngine.nameOverride }}
2222
{{- if contains $name .Release.Name }}
2323
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
2424
{{- else }}
@@ -76,3 +76,18 @@ Create the name of the service account to use
7676
{{- default "default" .Values.superstreamEngine.serviceAccount.name }}
7777
{{- end }}
7878
{{- end }}
79+
80+
81+
{{/*
82+
Print the image
83+
*/}}
84+
{{- define "superstream.image" }}
85+
{{- $image := printf "%s:%s" .repository .tag }}
86+
{{- if or .registry .global.image.registry }}
87+
{{- $image = printf "%s/%s" (.registry | default .global.image.registry) $image }}
88+
{{- end -}}
89+
image: {{ $image }}
90+
{{- if or .pullPolicy .global.image.pullPolicy }}
91+
imagePullPolicy: {{ .pullPolicy | default .global.image.pullPolicy }}
92+
{{- end }}
93+
{{- end }}

charts/superstream/templates/deployment-data-plane.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ spec:
1818
{{- toYaml . | nindent 8 }}
1919
{{- end }}
2020
labels:
21-
{{- if .Values.superstreamEngine.releaseDate -}}
22-
releaseDate: {{ .Values.superstreamEngine.releaseDate }}
23-
{{- end -}}
21+
{{- if .Values.superstreamEngine.releaseDate }}
22+
releaseDate: "{{ .Values.superstreamEngine.releaseDate }}"
23+
{{- end }}
2424
{{- include "superstream.labels" . | nindent 8 }}
2525
{{- include "superstream.selectorLabels" . | nindent 8 }}-data-plane
2626
spec:
@@ -40,19 +40,20 @@ spec:
4040
sleep 2
4141
done
4242
43-
{{- with .Values.superstreamEngine.imagePullSecrets }}
43+
{{- with .Values.global.image.pullSecretNames }}
4444
imagePullSecrets:
45-
{{- toYaml . | nindent 8 }}
45+
{{- range . }}
46+
- name: {{ . | quote }}
47+
{{- end }}
4648
{{- end }}
4749
serviceAccountName: {{ include "superstream.serviceAccountName" . }}
4850
securityContext:
4951
{{- toYaml .Values.superstreamEngine.podSecurityContext | nindent 8 }}
5052
containers:
5153
- name: {{ .Chart.Name }}-data-plane
54+
{{ include "superstream.image" (merge (pick $.Values "global") .Values.superstreamEngine.image) | nindent 10 }}
5255
securityContext:
5356
{{- toYaml .Values.superstreamEngine.securityContext | nindent 12 }}
54-
image: "{{ .Values.superstreamEngine.image.repository }}:{{ .Values.superstreamEngine.image.tag | default .Chart.AppVersion }}"
55-
imagePullPolicy: {{ .Values.superstreamEngine.image.pullPolicy }}
5657
ports:
5758
- name: data-plane
5859
containerPort: {{ .Values.superstreamEngine.service.port }}

charts/superstream/templates/deployment-syslog.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,17 @@ spec:
2020
labels:
2121
{{- include "superstream.selectorLabels" . | nindent 8 }}-syslog
2222
spec:
23-
{{- with .Values.syslog.imagePullSecrets }}
23+
{{- with .Values.global.image.pullSecretNames }}
2424
imagePullSecrets:
25-
{{- toYaml . | nindent 8 }}
25+
{{- range . }}
26+
- name: {{ . | quote }}
27+
{{- end }}
2628
{{- end }}
2729
securityContext:
2830
fsGroup: 911
2931
containers:
3032
- name: syslog-ng
31-
image: "{{ .Values.syslog.image.repository }}:{{ .Values.syslog.image.tag }}"
33+
{{ include "superstream.image" (merge (pick $.Values "global") .Values.syslog.image) | nindent 8 }}
3234
ports:
3335
- name: syslog
3436
containerPort: {{ .Values.syslog.service.port }}

charts/superstream/values.yaml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ global:
66
superstreamAccountId: "" # Provide the account ID associated with the deployment, which could be used for identifying resources or configurations tied to a specific account.
77
superstreamActivationToken: "" # Enter the activation token required for services or resources that need an initial token for activation or authentication.
88
skipLocalAuthentication: true
9+
10+
image:
11+
# global image pull policy to use for all container images in the chart
12+
# can be overridden by individual image pullPolicy
13+
pullPolicy:
14+
# global list of secret names to use as image pull secrets for all pod specs in the chart
15+
# secrets must exist in the same namespace
16+
# https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
17+
pullSecretNames: []
18+
# global registry to use for all container images in the chart
19+
# can be overridden by individual image registry
20+
registry:
921
############################################################
1022
# NATS config
1123
############################################################
@@ -33,10 +45,11 @@ superstreamEngine:
3345
pullPolicy: Always
3446
# Overrides the image tag whose default is the chart appVersion.
3547
tag: "latest"
48+
registry:
3649
imagePullSecrets: []
3750
# Overrides for Helm's default naming conventions
3851
nameOverride: ""
39-
fullnameOverride: ""
52+
fullnameOverride: "superstream"
4053
# ConfigMap settings for mounting or referencing within the deployment
4154
# Init container configuration
4255
initContainers:
@@ -113,8 +126,8 @@ superstreamEngine:
113126
cpu: '8'
114127
memory: 8Gi
115128
requests:
116-
cpu: 500m
117-
memory: 1Gi
129+
cpu: '2'
130+
memory: 2Gi
118131
# Autoscaling configuration for dynamically adjusting the number of pod replicas
119132
autoscaling:
120133
enabled: true
@@ -143,6 +156,7 @@ syslog:
143156
repository: linuxserver/syslog-ng
144157
pullPolicy: IfNotPresent
145158
tag: "4.5.0" # Use a specific version to ensure consistency across deployments
159+
registry:
146160
imagePullSecrets: []
147161
service:
148162
type: ClusterIP

version.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.4.4
1+
0.4.5

0 commit comments

Comments
 (0)