Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
3 changes: 2 additions & 1 deletion cloud/helm-chart/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
<tpl>SCRIPT_STYLE</tpl>
</mapping>
<excludes>
<exclude>src/main/helm/artifacthub-repo.yml</exclude>
<exclude>src/main/helm/zilla/artifacthub-repo.yml</exclude>
<exclude>src/main/helm/zilla/templates/NOTES.txt</exclude>
</excludes>
</configuration>
</plugin>
Expand Down
30 changes: 0 additions & 30 deletions cloud/helm-chart/src/main/helm/templates/NOTES.txt

This file was deleted.

64 changes: 0 additions & 64 deletions cloud/helm-chart/src/main/helm/values.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ keywords:
- streaming-api
maintainers:
- name: Aklivity
email: inquiry@aklivity.io
email: inquiry@aklivity.io
22 changes: 22 additions & 0 deletions cloud/helm-chart/src/main/helm/zilla/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "zilla.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "zilla.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "zilla.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
Comment thread
attilakreiner marked this conversation as resolved.
Outdated
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "zilla.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "helm.name" -}}
{{- define "zilla.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

Expand All @@ -25,7 +25,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "helm.fullname" -}}
{{- define "zilla.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand All @@ -41,16 +41,16 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "helm.chart" -}}
{{- define "zilla.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "helm.labels" -}}
helm.sh/chart: {{ include "helm.chart" . }}
{{ include "helm.selectorLabels" . }}
{{- define "zilla.labels" -}}
helm.sh/chart: {{ include "zilla.chart" . }}
{{ include "zilla.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -60,14 +60,25 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "helm.selectorLabels" -}}
app.kubernetes.io/name: {{ include "helm.name" . }}
{{- define "zilla.selectorLabels" -}}
app.kubernetes.io/name: {{ include "zilla.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "zilla.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "zilla.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Check if we have a service port defined
*/}}
{{- define "helm.isServicePortDefined" -}}
{{- define "zilla.isServicePortDefined" -}}
{{- default false (gt (len .Values.service.ports) 0) }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: zilla
name: {{ include "zilla.fullname" . }}
data:
zilla.yaml: |
{{ index .Values "zilla.yaml" | indent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "helm.fullname" . }}
name: {{ include "zilla.fullname" . }}
labels:
{{- include "helm.labels" . | nindent 4 }}
{{- include "zilla.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "helm.selectorLabels" . | nindent 6 }}
{{- include "zilla.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "helm.selectorLabels" . | nindent 8 }}
{{- include "zilla.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand All @@ -52,20 +52,52 @@ spec:
env:
- name: ZILLA_VERSION
value: "{{ .Values.image.tag | default .Chart.AppVersion }}"
{{- range $env := .Values.env }}
- name: {{ $env.name }}
value: {{ $env.value }}
{{- end }}
{{- if .Values.extraEnv }}
{{- toYaml .Values.extraEnv | nindent 12 }}
{{- end }}
{{- range $key, $value := .Values.envValueFrom }}
- name: {{ $key | quote }}
valueFrom:
{{- tpl (toYaml $value) $ | nindent 10 }}
{{- end }}
{{- range $key, $value := .Values.env }}
- name: "{{ tpl $key $ }}"
value: "{{ tpl (print $value) $ }}"
{{- end }}
{{- if or .Values.envFromSecret (or .Values.envRenderSecret .Values.envFromSecrets) .Values.envFromConfigMaps }}
envFrom:
{{- if .Values.envFromSecret }}
- secretRef:
name: {{ tpl .Values.envFromSecret . }}
{{- end }}
{{- if .Values.envRenderSecret }}
- secretRef:
name: {{ include "grafana.fullname" . }}-env
{{- end }}
{{- range .Values.envFromSecrets }}
- secretRef:
name: {{ tpl .name $ }}
optional: {{ .optional | default false }}
{{- if .prefix }}
prefix: {{ tpl .prefix $ }}
{{- end }}
{{- end }}
{{- range .Values.envFromConfigMaps }}
- configMapRef:
name: {{ tpl .name $ }}
optional: {{ .optional | default false }}
{{- if .prefix }}
prefix: {{ tpl .prefix $ }}
{{- end }}
{{- end }}
{{- end }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
{{- range $port := .Values.service.ports }}
- name: {{ $port.name }}
containerPort: {{ $port.port }}
protocol: TCP
- name: {{ $port.name }}
containerPort: {{ $port.port }}
protocol: TCP
{{- end}}
{{- if .Values.livenessProbePort }}
livenessProbe:
Expand All @@ -81,7 +113,7 @@ spec:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
{{- if index .Values "zilla.yaml" }}
- name: zilla
- name: {{ include "zilla.fullname" . }}
mountPath: {{ .Values.configPath }}
{{- end }}
{{- $configPath := .Values.configPath }}
Expand Down Expand Up @@ -111,9 +143,9 @@ spec:
{{- end }}
volumes:
{{- if index .Values "zilla.yaml" }}
- name: zilla
- name: {{ include "zilla.fullname" . }}
configMap:
name: zilla
name: {{ include "zilla.fullname" . }}
{{- end }}
{{- range $name, $_ := .Values.configMaps }}
- name: {{ $name }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "helm.fullname" . }}
name: {{ include "zilla.fullname" . }}
labels:
{{- include "helm.labels" . | nindent 4 }}
{{- include "zilla.labels" . | nindent 4 }}
spec:
behavior:
{{- toYaml .Values.autoscaling.behavior | nindent 4 }}
Expand All @@ -30,5 +30,5 @@ spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "helm.fullname" . }}
{{- end }}
name: {{ include "zilla.fullname" . }}
{{- end }}
Loading