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

chore: add version labels for all internal charts #350

Merged
merged 7 commits into from
Dec 2, 2024
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
4 changes: 2 additions & 2 deletions charts/daemonset-app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apiVersion: v2
name: daemonset-app
description: Default DaemonSet Helm Chart
type: application
version: 0.16.0
version: 0.16.1
appVersion: latest
maintainers:
- name: diranged
email: [email protected]
dependencies:
- name: nd-common
version: 0.3.1
version: 0.3.6
repository: file://../nd-common
4 changes: 2 additions & 2 deletions charts/daemonset-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Default DaemonSet Helm Chart

![Version: 0.16.0](https://img.shields.io/badge/Version-0.16.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
![Version: 0.16.1](https://img.shields.io/badge/Version-0.16.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)

[statefulsets]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/
[hpa]: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
Expand Down Expand Up @@ -264,7 +264,7 @@ secretsEngine: sealed

| Repository | Name | Version |
|------------|------|---------|
| file://../nd-common | nd-common | 0.3.1 |
| file://../nd-common | nd-common | 0.3.6 |

## Values

Expand Down
16 changes: 16 additions & 0 deletions charts/daemonset-app/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{/*
This function generates an extended set of labels by combining the base labels
from the "nd-common.labels" template with additional custom labels.

The additional labels include:
- helm.chart/name: Specifies the name of the chart (hardcoded as "daemonset-app").
- helm.chart/version: Includes the chart version dynamically from .Chart.Version.
*/}}
{{- define "nd-common.extendedLabels" -}}
saansh45 marked this conversation as resolved.
Show resolved Hide resolved
{{- $baseLabels := include "nd-common.labels" . | fromYaml -}}
{{- $extendedLabels := merge $baseLabels (dict
"helm.chart/name" "daemonset-app"
saansh45 marked this conversation as resolved.
Show resolved Hide resolved
"helm.chart/version" .Chart.Version
) -}}
{{- $extendedLabels | toYaml -}}
{{- end -}}
4 changes: 2 additions & 2 deletions charts/daemonset-app/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: DaemonSet
metadata:
name: {{ include "nd-common.fullname" . }}
labels:
{{- include "nd-common.labels" . | nindent 4 }}
{{- include "nd-common.extendedLabels" . | nindent 4 }}
spec:
{{- with .Values.minReadySeconds }}
minReadySeconds: {{ . }}
Expand All @@ -30,7 +30,7 @@ spec:
{{- end }}
{{- end }}
labels:
{{- include "nd-common.labels" . | nindent 8 }}
{{- include "nd-common.extendedLabels" . | nindent 8 }}
{{- include "nd-common.istioLabels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- tpl (toYaml .) $ | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/daemonset-app/templates/prometheusrules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kind: PrometheusRule
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-rules
labels:
{{- include "nd-common.labels" . | nindent 4 }}
{{- include "nd-common.extendedLabels" . | nindent 4 }}
spec:
groups:
- name: {{ .Release.Namespace }}.{{ .Release.Name }}.{{ .Chart.Name }}.PodRules
Expand Down
2 changes: 1 addition & 1 deletion charts/daemonset-app/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: ServiceAccount
metadata:
name: {{ include "nd-common.serviceAccountName" . }}
labels:
{{- include "nd-common.labels" . | nindent 4 }}
{{- include "nd-common.extendedLabels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/rollout-app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: rollout-app
description: Argo Rollout-based Application Helm Chart
type: application
version: 1.4.3
version: 1.4.4
appVersion: latest
maintainers:
- name: diranged
Expand Down
2 changes: 1 addition & 1 deletion charts/rollout-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Argo Rollout-based Application Helm Chart

![Version: 1.4.3](https://img.shields.io/badge/Version-1.4.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
![Version: 1.4.4](https://img.shields.io/badge/Version-1.4.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)

[analysistemplate]: https://argoproj.github.io/argo-rollouts/features/analysis/?query=AnalysisTemplate#background-analysis
[argo_rollouts]: https://argoproj.github.io/argo-rollouts/
Expand Down
17 changes: 17 additions & 0 deletions charts/rollout-app/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,20 @@ Again, we do not use all of the values, we only use the values that make sense.
name: {{ $port.name }}
{{- end }}
{{- end -}}

{{/*
This function generates an extended set of labels by combining the base labels
from the "nd-common.labels" template with additional custom labels.

The additional labels include:
- helm.chart/name: Specifies the name of the chart (hardcoded as "rollout-app").
- helm.chart/version: Includes the chart version dynamically from .Chart.Version.
*/}}
{{- define "nd-common.extendedLabels" -}}
{{- $baseLabels := include "nd-common.labels" . | fromYaml -}}
{{- $extendedLabels := merge $baseLabels (dict
"helm.chart/name" "rollout-app"
"helm.chart/version" .Chart.Version
) -}}
{{- $extendedLabels | toYaml -}}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/rollout-app/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: HorizontalPodAutoscaler
metadata:
name: {{ include "nd-common.fullname" . }}
labels:
{{- include "nd-common.labels" . | nindent 4 }}
{{- include "nd-common.extendedLabels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: argoproj.io/v1alpha1
Expand Down
2 changes: 1 addition & 1 deletion charts/rollout-app/templates/ingress/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "nd-common.labels" . | nindent 4 }}
{{- include "nd-common.extendedLabels" . | nindent 4 }}
annotations:
{{- with .Values.ingress.annotations }}
{{- toYaml . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/rollout-app/templates/ingress/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: NetworkPolicy
metadata:
name: {{ include "nd-common.fullname" . }}-ingress-access
labels:
{{- include "nd-common.labels" . | nindent 4 }}
{{- include "nd-common.extendedLabels" . | nindent 4 }}
spec:
policyTypes: [Ingress]
podSelector:
Expand Down
2 changes: 1 addition & 1 deletion charts/rollout-app/templates/istio/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: NetworkPolicy
metadata:
name: {{ include "nd-common.fullname" . }}-ingressgateway-access
labels:
{{- include "nd-common.labels" . | nindent 4 }}
{{- include "nd-common.extendedLabels" . | nindent 4 }}
spec:
policyTypes: [Ingress]
podSelector:
Expand Down
2 changes: 1 addition & 1 deletion charts/rollout-app/templates/istio/virtualservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ kind: VirtualService
metadata:
name: {{ include "nd-common.fullname" $ }}
labels:
{{- include "nd-common.labels" . | nindent 4 }}
{{- include "nd-common.extendedLabels" . | nindent 4 }}
{{- with .Values.virtualService.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/rollout-app/templates/poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: PodDisruptionBudget
metadata:
name: {{ template "nd-common.fullname" . }}
labels:
{{- include "nd-common.labels" . | nindent 4 }}
{{- include "nd-common.extendedLabels" . | nindent 4 }}
spec:
selector:
matchLabels:
Expand Down
2 changes: 1 addition & 1 deletion charts/rollout-app/templates/prometheusrules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kind: PrometheusRule
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-rules
labels:
{{- include "nd-common.labels" . | nindent 4 }}
{{- include "nd-common.extendedLabels" . | nindent 4 }}
spec:
groups:
- name: {{ .Release.Namespace }}.{{ .Release.Name }}.{{ .Chart.Name }}.PodRules
Expand Down
4 changes: 2 additions & 2 deletions charts/rollout-app/templates/rollout.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Rollout
metadata:
name: {{ include "nd-common.fullname" . }}
labels:
{{- include "nd-common.labels" . | nindent 4 }}
{{- include "nd-common.extendedLabels" . | nindent 4 }}
spec:
{{- with .Values.minReadySeconds }}
minReadySeconds: {{ . }}
Expand Down Expand Up @@ -140,7 +140,7 @@ spec:
{{- end }}
{{- end }}
labels:
{{- include "nd-common.labels" . | nindent 8 }}
{{- include "nd-common.extendedLabels" . | nindent 8 }}
{{- include "nd-common.istioLabels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- tpl (toYaml .) $ | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/rollout-app/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: ServiceAccount
metadata:
name: {{ include "nd-common.serviceAccountName" . }}
labels:
{{- include "nd-common.labels" . | nindent 4 }}
{{- include "nd-common.extendedLabels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
6 changes: 3 additions & 3 deletions charts/rollout-app/templates/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ kind: Service
metadata:
name: {{ include "nd-common.fullname" . }}
labels:
{{- include "nd-common.labels" . | nindent 4 }}
{{- include "nd-common.extendedLabels" . | nindent 4 }}
annotations:
{{/*
This is only used for type=LoadBalancer Services which run in AWS.
Expand Down Expand Up @@ -40,7 +40,7 @@ kind: Service
metadata:
name: {{ include "nd-common.fullname" . }}-preview
labels:
{{- include "nd-common.labels" . | nindent 4 }}
{{- include "nd-common.extendedLabels" . | nindent 4 }}
annotations:
{{/*
This is only used for type=LoadBalancer Services which run in AWS.
Expand Down Expand Up @@ -73,7 +73,7 @@ kind: Service
metadata:
name: {{ include "nd-common.fullname" . }}-canary
labels:
{{- include "nd-common.labels" . | nindent 4 }}
{{- include "nd-common.extendedLabels" . | nindent 4 }}
annotations:
{{/*
This is only used for type=LoadBalancer Services which run in AWS.
Expand Down
2 changes: 1 addition & 1 deletion charts/simple-app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: simple-app
description: Default Microservice Helm Chart
type: application
version: 1.12.3
version: 1.12.4
appVersion: latest
maintainers:
- name: diranged
Expand Down
2 changes: 1 addition & 1 deletion charts/simple-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Default Microservice Helm Chart

![Version: 1.12.3](https://img.shields.io/badge/Version-1.12.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
![Version: 1.12.4](https://img.shields.io/badge/Version-1.12.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)

[deployments]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
[hpa]: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
Expand Down
17 changes: 17 additions & 0 deletions charts/simple-app/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,20 @@ setting.
{{- .Values.proxySidecar.image.repository }}:{{ $tag }}
{{- end }}
{{- end }}

{{/*
This function generates an extended set of labels by combining the base labels
from the "nd-common.labels" template with additional custom labels.

The additional labels include:
- helm.chart/name: Specifies the name of the chart (hardcoded as "simple-app").
- helm.chart/version: Includes the chart version dynamically from .Chart.Version.
*/}}
{{- define "nd-common.extendedLabels" -}}
{{- $baseLabels := include "nd-common.labels" . | fromYaml -}}
{{- $extendedLabels := merge $baseLabels (dict
"helm.chart/name" "simple-app"
"helm.chart/version" .Chart.Version
) -}}
{{- $extendedLabels | toYaml -}}
{{- end -}}
8 changes: 4 additions & 4 deletions charts/simple-app/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ kind: Deployment
metadata:
name: {{ $fullName }}
labels:
{{- include "nd-common.labels" $ | nindent 4 }}
{{- include "nd-common.extendedLabels" $ | nindent 4 }}
{{- with $deploymentZoneLabel }}
{{ . }}
{{- end }}
Expand Down Expand Up @@ -105,7 +105,7 @@ spec:
{{- end }}
{{- end }}
labels:
{{- include "nd-common.labels" $ | nindent 8 }}
{{- include "nd-common.extendedLabels" $ | nindent 8 }}
{{- include "nd-common.istioLabels" $ | nindent 8 }}
{{- with $.Values.podLabels }}
{{- tpl (toYaml .) $ | nindent 8 }}
Expand Down Expand Up @@ -315,7 +315,7 @@ kind: HorizontalPodAutoscaler
metadata:
name: {{ $fullName }}
labels:
{{- include "nd-common.labels" $ | nindent 4 }}
{{- include "nd-common.extendedLabels" $ | nindent 4 }}
{{- with $deploymentZoneLabel }}
{{ . }}
{{- end }}
Expand Down Expand Up @@ -369,7 +369,7 @@ kind: PodDisruptionBudget
metadata:
name: {{ $fullName }}
labels:
{{- include "nd-common.labels" $ | nindent 4 }}
{{- include "nd-common.extendedLabels" $ | nindent 4 }}
{{- with $deploymentZoneLabel }}
{{ . }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/simple-app/templates/ingress/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "nd-common.labels" . | nindent 4 }}
{{- include "nd-common.extendedLabels" . | nindent 4 }}
annotations:
{{- with .Values.ingress.annotations }}
{{- toYaml . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/simple-app/templates/ingress/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: NetworkPolicy
metadata:
name: {{ include "nd-common.fullname" . }}-ingress-access
labels:
{{- include "nd-common.labels" . | nindent 4 }}
{{- include "nd-common.extendedLabels" . | nindent 4 }}
spec:
policyTypes: [Ingress]
podSelector:
Expand Down
2 changes: 1 addition & 1 deletion charts/simple-app/templates/istio/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: NetworkPolicy
metadata:
name: {{ include "nd-common.fullname" . }}-ingressgateway-access
labels:
{{- include "nd-common.labels" . | nindent 4 }}
{{- include "nd-common.extendedLabels" . | nindent 4 }}
spec:
policyTypes: [Ingress]
podSelector:
Expand Down
2 changes: 1 addition & 1 deletion charts/simple-app/templates/istio/virtualservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ kind: VirtualService
metadata:
name: {{ include "nd-common.fullname" . }}
labels:
{{- include "nd-common.labels" . | nindent 4 }}
{{- include "nd-common.extendedLabels" . | nindent 4 }}
{{- with .Values.virtualService.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/simple-app/templates/prometheusrules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kind: PrometheusRule
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-rules
labels:
{{- include "nd-common.labels" . | nindent 4 }}
{{- include "nd-common.extendedLabels" . | nindent 4 }}
spec:
groups:
- name: {{ .Release.Namespace }}.{{ .Release.Name }}.{{ .Chart.Name }}.PodRules
Expand Down
2 changes: 1 addition & 1 deletion charts/simple-app/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: ServiceAccount
metadata:
name: {{ include "nd-common.serviceAccountName" . }}
labels:
{{- include "nd-common.labels" . | nindent 4 }}
{{- include "nd-common.extendedLabels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/stateful-app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: stateful-app
description: Default StatefulSet Helm Chart
type: application
version: 1.4.3
version: 1.4.4
appVersion: latest
maintainers:
- name: diranged
Expand Down
2 changes: 1 addition & 1 deletion charts/stateful-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Default StatefulSet Helm Chart

![Version: 1.4.3](https://img.shields.io/badge/Version-1.4.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
![Version: 1.4.4](https://img.shields.io/badge/Version-1.4.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)

[statefulsets]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/
[hpa]: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
Expand Down
Loading
Loading