Skip to content

Commit

Permalink
chore: update chart version
Browse files Browse the repository at this point in the history
  • Loading branch information
incubator4 committed Jan 24, 2024
1 parent 19ec4e5 commit 647ab05
Show file tree
Hide file tree
Showing 13 changed files with 78 additions and 78 deletions.
2 changes: 1 addition & 1 deletion charts/serving-node/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 0.1.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
6 changes: 3 additions & 3 deletions charts/serving-node/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.hub.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "rss3-node.hub.fullname" . }})
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "serving-node.hub.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.hub.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 "rss3-node.hub.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "rss3-node.hub.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "serving-node.hub.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "serving-node.hub.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.hub.service.port }}
{{- else if contains "ClusterIP" .Values.hub.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ .Values.hub.name }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
Expand Down
62 changes: 31 additions & 31 deletions charts/serving-node/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "rss3-node.name" -}}
{{- define "serving-node.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

Expand All @@ -10,7 +10,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 "rss3-node.fullname" -}}
{{- define "serving-node.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand All @@ -26,16 +26,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 "rss3-node.chart" -}}
{{- define "serving-node.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "rss3-node.labels" -}}
helm.sh/chart: {{ include "rss3-node.chart" .context }}
{{ include "rss3-node.selectorLabels" (dict "context" .context "component" .component "name" .name) }}
{{- define "serving-node.labels" -}}
helm.sh/chart: {{ include "serving-node.chart" .context }}
{{ include "serving-node.selectorLabels" (dict "context" .context "component" .component "name" .name) }}
{{- if .context.Chart.AppVersion }}
app.kubernetes.io/version: {{ .context.Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -45,9 +45,9 @@ app.kubernetes.io/managed-by: {{ .context.Release.Service }}
{{/*
Selector labels
*/}}
{{- define "rss3-node.selectorLabels" -}}
{{- define "serving-node.selectorLabels" -}}
{{- if .name -}}
app.kubernetes.io/name: {{ include "rss3-node.name" .context }}-{{ .name }}
app.kubernetes.io/name: {{ include "serving-node.name" .context }}-{{ .name }}
{{ end -}}
app.kubernetes.io/instance: {{ .context.Release.Name }}
{{- if .component }}
Expand All @@ -58,59 +58,59 @@ app.kubernetes.io/component: {{ .component }}
{{/*
Global config check sum
*/}}
{{- define "rss3-node.globalConfigCheckSum" -}}
{{- define "serving-node.globalConfigCheckSum" -}}
{{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- end }}

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

{{/*
Create rss3-node hub name and version as used by the chart label.
Create serving-node hub name and version as used by the chart label.
*/}}
{{- define "rss3-node.hub.fullname" -}}
{{- printf "%s-%s" (include "rss3-node.fullname" .) .Values.hub.name | trunc 63 | trimSuffix "-" -}}
{{- define "serving-node.hub.fullname" -}}
{{- printf "%s-%s" (include "serving-node.fullname" .) .Values.hub.name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create the name of the Argo CD server service account to use
*/}}
{{- define "rss3-node.hub.ServiceAccountName" -}}
{{- define "serving-node.hub.ServiceAccountName" -}}
{{- if .Values.hub.serviceAccount.create -}}
{{ default (include "rss3-node.hub.fullname" .) .Values.hub.serviceAccount.name }}
{{ default (include "serving-node.hub.fullname" .) .Values.hub.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.hub.serviceAccount.name }}
{{- end -}}
{{- end -}}

{{/*
Create rss3-node indexer fullname
Create serving-node indexer fullname
*/}}
{{- define "rss3-node.indexer.name" -}}
{{- define "serving-node.indexer.name" -}}
{{- printf "%s-%s" .network .worker | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create rss3-node indexer fullname
Create serving-node indexer fullname
*/}}
{{- define "rss3-node.indexer.fullname" -}}
{{- printf "%s-%s" (include "rss3-node.fullname" .context) (include "rss3-node.indexer.name" .) | trunc 63 | trimSuffix "-" -}}
{{- define "serving-node.indexer.fullname" -}}
{{- printf "%s-%s" (include "serving-node.fullname" .context) (include "serving-node.indexer.name" .) | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Indexer labels
*/}}
{{- define "rss3-node.indexer.labels" -}}
helm.sh/chart: {{ include "rss3-node.chart" .context }}
{{ include "rss3-node.indexer.selectorLabels" (dict "context" .context "component" .component "indexer" .indexer) }}
{{- define "serving-node.indexer.labels" -}}
helm.sh/chart: {{ include "serving-node.chart" .context }}
{{ include "serving-node.indexer.selectorLabels" (dict "context" .context "component" .component "indexer" .indexer) }}
{{- if .context.Chart.AppVersion }}
app.kubernetes.io/version: {{ .context.Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -120,19 +120,19 @@ app.kubernetes.io/managed-by: {{ .context.Release.Service }}
{{/*
Selector labels
*/}}
{{- define "rss3-node.indexer.selectorLabels" -}}
app.kubernetes.io/name: {{ include "rss3-node.name" .context }}-{{ include "rss3-node.indexer.name" .indexer }}
{{- define "serving-node.indexer.selectorLabels" -}}
app.kubernetes.io/name: {{ include "serving-node.name" .context }}-{{ include "serving-node.indexer.name" .indexer }}
app.kubernetes.io/instance: {{ .context.Release.Name }}
{{- if .component }}
app.kubernetes.io/component: {{ .component }}
{{- end -}}
{{ include "rss3-node.indexer.commonLabels" .indexer }}
{{ include "serving-node.indexer.commonLabels" .indexer }}
{{- end }}

{{/*
Common indexer labels
*/}}
{{- define "rss3-node.indexer.commonLabels" -}}
{{- define "serving-node.indexer.commonLabels" -}}
{{- if .network }}
node.rss3.io/network: {{ .network }}
{{- end }}
Expand All @@ -142,8 +142,8 @@ node.rss3.io/worker: {{ .worker }}
{{- end }}

{{/*
Create rss3-node hub name and version as used by the chart label.
Create serving-node hub name and version as used by the chart label.
*/}}
{{- define "rss3-node.broadcaster.fullname" -}}
{{- printf "%s-%s" (include "rss3-node.fullname" .) .Values.broadcaster.name | trunc 63 | trimSuffix "-" -}}
{{- define "serving-node.broadcaster.fullname" -}}
{{- printf "%s-%s" (include "serving-node.fullname" .) .Values.broadcaster.name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
16 changes: 8 additions & 8 deletions charts/serving-node/templates/broadcaster/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ metadata:
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
name: {{ template "rss3-node.broadcaster.fullname" .}}
name: {{ template "serving-node.broadcaster.fullname" .}}
labels:
{{- include "rss3-node.labels" (dict "context" . "component" .Values.broadcaster.name "name" .Values.broadcaster.name) | nindent 4 }}
{{- include "serving-node.labels" (dict "context" . "component" .Values.broadcaster.name "name" .Values.broadcaster.name) | nindent 4 }}
spec:
replicas: {{ .Values.broadcaster.replicaCount }}
revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }}
selector:
matchLabels:
{{- include "rss3-node.selectorLabels" (dict "context" . "name" .Values.broadcaster.name) | nindent 6 }}
{{- include "serving-node.selectorLabels" (dict "context" . "name" .Values.broadcaster.name) | nindent 6 }}
template:
metadata:
annotations:
checksum/configmap: {{ include "rss3-node.globalConfigCheckSum" .}}
checksum/configmap: {{ include "serving-node.globalConfigCheckSum" .}}
{{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.broadcaster.podAnnotations) }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "rss3-node.labels" (dict "context" . "component" .Values.broadcaster.name "name" .Values.broadcaster.name) | nindent 8 }}
{{- include "serving-node.labels" (dict "context" . "component" .Values.broadcaster.name "name" .Values.broadcaster.name) | nindent 8 }}
{{- with .Values.broadcaster.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand All @@ -34,7 +34,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "rss3-node.hub.ServiceAccountName" . }}
serviceAccountName: {{ include "serving-node.hub.ServiceAccountName" . }}
securityContext:
{{- toYaml .Values.broadcaster.podSecurityContext | nindent 8 }}
containers:
Expand All @@ -49,14 +49,14 @@ spec:
{{- toYaml .Values.broadcaster.resources | nindent 12 }}
volumeMounts:
- name: config
mountPath: /root/rss3-node/deploy
mountPath: /root/serving-node/deploy
{{- with .Values.broadcaster.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
volumes:
- name: config
configMap:
name: {{ include "rss3-node.fullname" . }}
name: {{ include "serving-node.fullname" . }}
defaultMode: 0644
{{- with .Values.broadcaster.volumes }}
{{- toYaml . | nindent 8 }}
Expand Down
16 changes: 8 additions & 8 deletions charts/serving-node/templates/component/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "rss3-node.indexer.fullname" (merge (dict "context" $) $indexer)}}
name: {{ template "serving-node.indexer.fullname" (merge (dict "context" $) $indexer)}}
labels:
{{- include "rss3-node.indexer.labels" (dict "context" $ "indexer" $indexer "component" "indexer") | nindent 4 }}
{{- include "serving-node.indexer.labels" (dict "context" $ "indexer" $indexer "component" "indexer") | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "rss3-node.indexer.selectorLabels" (dict "context" $ "indexer" $indexer "component" "indexer") | nindent 6 }}
{{- include "serving-node.indexer.selectorLabels" (dict "context" $ "indexer" $indexer "component" "indexer") | nindent 6 }}
template:
metadata:
annotations:
checksum/configmap: {{ include "rss3-node.globalConfigCheckSum" $}}
checksum/configmap: {{ include "serving-node.globalConfigCheckSum" $}}
{{- with $.Values.global.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "rss3-node.indexer.labels" (dict "context" $ "indexer" $indexer "component" "indexer") | nindent 8 }}
{{- include "serving-node.indexer.labels" (dict "context" $ "indexer" $indexer "component" "indexer") | nindent 8 }}
{{- with $.Values.global.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand All @@ -27,7 +27,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "rss3-node.hub.ServiceAccountName" $ }}
serviceAccountName: {{ include "serving-node.hub.ServiceAccountName" $ }}
securityContext:
{{- toYaml $.Values.global.podSecurityContext | nindent 8 }}
containers:
Expand All @@ -45,12 +45,12 @@ spec:
imagePullPolicy: {{ $.Values.global.image.imagePullPolicy }}
volumeMounts:
- name: config
mountPath: /root/rss3-node/deploy
mountPath: /root/serving-node/deploy
resources:
{{- toYaml ($indexer.resources | default $.Values.global.indexerResources ) | nindent 12 }}
volumes:
- name: config
configMap:
name: {{ include "rss3-node.fullname" $ }}
name: {{ include "serving-node.fullname" $ }}
defaultMode: 0644
{{- end }}
4 changes: 2 additions & 2 deletions charts/serving-node/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "rss3-node.fullname" . }}
name: {{ include "serving-node.fullname" . }}
labels:
{{- include "rss3-node.labels" (dict "context" . ) | nindent 4 }}
{{- include "serving-node.labels" (dict "context" . ) | nindent 4 }}
{{- if .Values.configs.annotations }}
annotations:
{{- range $key, $value := .Values.configs.annotations }}
Expand Down
16 changes: 8 additions & 8 deletions charts/serving-node/templates/hub/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@ metadata:
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
name: {{ template "rss3-node.hub.fullname" .}}
name: {{ template "serving-node.hub.fullname" .}}
labels:
{{- include "rss3-node.labels" (dict "context" . "component" .Values.hub.name "name" .Values.hub.name) | nindent 4 }}
{{- include "serving-node.labels" (dict "context" . "component" .Values.hub.name "name" .Values.hub.name) | nindent 4 }}
spec:
{{- if not .Values.hub.autoscaling.enabled }}
replicas: {{ .Values.hub.replicaCount }}
{{- end }}
revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }}
selector:
matchLabels:
{{- include "rss3-node.selectorLabels" (dict "context" . "name" .Values.hub.name) | nindent 6 }}
{{- include "serving-node.selectorLabels" (dict "context" . "name" .Values.hub.name) | nindent 6 }}
template:
metadata:
annotations:
checksum/configmap: {{ include "rss3-node.globalConfigCheckSum" .}}
checksum/configmap: {{ include "serving-node.globalConfigCheckSum" .}}
{{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.hub.podAnnotations) }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "rss3-node.labels" (dict "context" . "component" .Values.hub.name "name" .Values.hub.name) | nindent 8 }}
{{- include "serving-node.labels" (dict "context" . "component" .Values.hub.name "name" .Values.hub.name) | nindent 8 }}
{{- with .Values.hub.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand All @@ -35,7 +35,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "rss3-node.hub.ServiceAccountName" . }}
serviceAccountName: {{ include "serving-node.hub.ServiceAccountName" . }}
securityContext:
{{- toYaml .Values.hub.podSecurityContext | nindent 8 }}
containers:
Expand All @@ -60,14 +60,14 @@ spec:
{{- toYaml .Values.hub.resources | nindent 12 }}
volumeMounts:
- name: config
mountPath: /root/rss3-node/deploy
mountPath: /root/serving-node/deploy
{{- with .Values.hub.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
volumes:
- name: config
configMap:
name: {{ include "rss3-node.fullname" . }}
name: {{ include "serving-node.fullname" . }}
defaultMode: 0644
{{- with .Values.hub.volumes }}
{{- toYaml . | nindent 8 }}
Expand Down
6 changes: 3 additions & 3 deletions charts/serving-node/templates/hub/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "rss3-node.hub.fullname" .}}
name: {{ template "serving-node.hub.fullname" .}}
labels:
{{- include "rss3-node.labels" (dict "context" . "component" .Values.hub.name "name" .Values.hub.name) | nindent 4 }}
{{- include "serving-node.labels" (dict "context" . "component" .Values.hub.name "name" .Values.hub.name) | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "rss3-node.fullname" . }}
name: {{ include "serving-node.fullname" . }}
minReplicas: {{ .Values.hub.autoscaling.minReplicas }}
maxReplicas: {{ .Values.hub.autoscaling.maxReplicas }}
metrics:
Expand Down
Loading

0 comments on commit 647ab05

Please sign in to comment.