Skip to content

Commit 78eb106

Browse files
committed
update Chart.yaml details for redis and fork bitnami common chart helper template files
Signed-off-by: Jan Larwig <[email protected]>
1 parent ff26f6d commit 78eb106

23 files changed

+1765
-37
lines changed

helm/redis/Chart.lock

Lines changed: 0 additions & 6 deletions
This file was deleted.

helm/redis/Chart.yaml

Lines changed: 15 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,25 @@
1-
# Copyright Broadcom, Inc. All Rights Reserved.
2-
# SPDX-License-Identifier: APACHE-2.0
3-
4-
annotations:
5-
category: Database
6-
images: |
7-
- name: kubectl
8-
image: docker.io/rancher/kubectl:1.33.3
9-
- name: os-shell
10-
image: docker.io/debian:12
11-
- name: redis
12-
image: docker.io/redis:8.0.3-bookworm
13-
- name: redis-exporter
14-
image: docker.io/oliver006/redis_exporter:v1.74.0
15-
licenses: Apache-2.0
16-
tanzuCategory: service
17-
apiVersion: v2
1+
name: redis
2+
version: 21.2.13
183
appVersion: 8.0.3
19-
dependencies:
20-
- name: common
21-
repository: oci://registry-1.docker.io/bitnamicharts
22-
tags:
23-
- bitnami-common
24-
version: 2.x.x
4+
apiVersion: v2
5+
home: https://github.com/oauth2-proxy/manifests/tree/main/helm/redis
256
description:
267
Redis(R) is an open source, advanced key-value store. It is often referred
278
to as a data structure server since keys can contain strings, hashes, lists, sets
289
and sorted sets.
29-
home: https://bitnami.com
30-
icon: https://dyltqmyl993wv.cloudfront.net/assets/stacks/redis/img/redis-stack-220x234.png
3110
keywords:
3211
- redis
3312
- keyvalue
3413
- database
35-
maintainers:
36-
- name: Broadcom, Inc. All Rights Reserved.
37-
url: https://github.com/bitnami/charts
38-
name: redis
3914
sources:
40-
- https://github.com/bitnami/charts/tree/main/bitnami/redis
41-
version: 21.2.13
15+
- https://github.com/oauth2-proxy/manifests/tree/main/helm/redis
16+
maintainers:
17+
- name: OAuth2-Proxy Maintainers
18+
url: https://github.com/oauth2-proxy
19+
annotations:
20+
artifacthub.io/changes: |
21+
- kind: changed
22+
description: Initial release of forked Redis chart under OAuth2-Proxy org
23+
links:
24+
- name: Github PR
25+
url: https://github.com/oauth2-proxy/manifests/pull/330
Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
{{/*
2+
Copyright Broadcom, Inc. All Rights Reserved.
3+
SPDX-License-Identifier: APACHE-2.0
4+
*/}}
5+
6+
{{/* vim: set filetype=mustache: */}}
7+
8+
{{/*
9+
Return a soft nodeAffinity definition
10+
{{ include "common.affinities.nodes.soft" (dict "key" "FOO" "values" (list "BAR" "BAZ")) -}}
11+
*/}}
12+
{{- define "common.affinities.nodes.soft" -}}
13+
preferredDuringSchedulingIgnoredDuringExecution:
14+
- preference:
15+
matchExpressions:
16+
- key: {{ .key }}
17+
operator: In
18+
values:
19+
{{- range .values }}
20+
- {{ . | quote }}
21+
{{- end }}
22+
weight: 1
23+
{{- end -}}
24+
25+
{{/*
26+
Return a hard nodeAffinity definition
27+
{{ include "common.affinities.nodes.hard" (dict "key" "FOO" "values" (list "BAR" "BAZ")) -}}
28+
*/}}
29+
{{- define "common.affinities.nodes.hard" -}}
30+
requiredDuringSchedulingIgnoredDuringExecution:
31+
nodeSelectorTerms:
32+
- matchExpressions:
33+
- key: {{ .key }}
34+
operator: In
35+
values:
36+
{{- range .values }}
37+
- {{ . | quote }}
38+
{{- end }}
39+
{{- end -}}
40+
41+
{{/*
42+
Return a nodeAffinity definition
43+
{{ include "common.affinities.nodes" (dict "type" "soft" "key" "FOO" "values" (list "BAR" "BAZ")) -}}
44+
*/}}
45+
{{- define "common.affinities.nodes" -}}
46+
{{- if eq .type "soft" }}
47+
{{- include "common.affinities.nodes.soft" . -}}
48+
{{- else if eq .type "hard" }}
49+
{{- include "common.affinities.nodes.hard" . -}}
50+
{{- end -}}
51+
{{- end -}}
52+
53+
{{/*
54+
Return a topologyKey definition
55+
{{ include "common.affinities.topologyKey" (dict "topologyKey" "BAR") -}}
56+
*/}}
57+
{{- define "common.affinities.topologyKey" -}}
58+
{{ .topologyKey | default "kubernetes.io/hostname" -}}
59+
{{- end -}}
60+
61+
{{/*
62+
Return a soft podAffinity/podAntiAffinity definition
63+
{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "extraPodAffinityTerms" .Values.extraPodAffinityTerms "extraNamespaces" (list "namespace1" "namespace2") "context" $) -}}
64+
*/}}
65+
{{- define "common.affinities.pods.soft" -}}
66+
{{- $component := default "" .component -}}
67+
{{- $customLabels := default (dict) .customLabels -}}
68+
{{- $extraMatchLabels := default (dict) .extraMatchLabels -}}
69+
{{- $extraPodAffinityTerms := default (list) .extraPodAffinityTerms -}}
70+
{{- $extraNamespaces := default (list) .extraNamespaces -}}
71+
preferredDuringSchedulingIgnoredDuringExecution:
72+
- podAffinityTerm:
73+
labelSelector:
74+
matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 10 }}
75+
{{- if not (empty $component) }}
76+
{{ printf "app.kubernetes.io/component: %s" $component }}
77+
{{- end }}
78+
{{- range $key, $value := $extraMatchLabels }}
79+
{{ $key }}: {{ $value | quote }}
80+
{{- end }}
81+
{{- if $extraNamespaces }}
82+
namespaces:
83+
- {{ .context.Release.Namespace }}
84+
{{- with $extraNamespaces }}
85+
{{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }}
86+
{{- end }}
87+
{{- end }}
88+
topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }}
89+
weight: 1
90+
{{- range $extraPodAffinityTerms }}
91+
- podAffinityTerm:
92+
labelSelector:
93+
matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" $.context )) | nindent 10 }}
94+
{{- if not (empty $component) }}
95+
{{ printf "app.kubernetes.io/component: %s" $component }}
96+
{{- end }}
97+
{{- range $key, $value := .extraMatchLabels }}
98+
{{ $key }}: {{ $value | quote }}
99+
{{- end }}
100+
{{- if .namespaces }}
101+
namespaces:
102+
- {{ $.context.Release.Namespace }}
103+
{{- with .namespaces }}
104+
{{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }}
105+
{{- end }}
106+
{{- end }}
107+
topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }}
108+
weight: {{ .weight | default 1 -}}
109+
{{- end -}}
110+
{{- end -}}
111+
112+
{{/*
113+
Return a hard podAffinity/podAntiAffinity definition
114+
{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "extraPodAffinityTerms" .Values.extraPodAffinityTerms "extraNamespaces" (list "namespace1" "namespace2") "context" $) -}}
115+
*/}}
116+
{{- define "common.affinities.pods.hard" -}}
117+
{{- $component := default "" .component -}}
118+
{{- $customLabels := default (dict) .customLabels -}}
119+
{{- $extraMatchLabels := default (dict) .extraMatchLabels -}}
120+
{{- $extraPodAffinityTerms := default (list) .extraPodAffinityTerms -}}
121+
{{- $extraNamespaces := default (list) .extraNamespaces -}}
122+
requiredDuringSchedulingIgnoredDuringExecution:
123+
- labelSelector:
124+
matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 8 }}
125+
{{- if not (empty $component) }}
126+
{{ printf "app.kubernetes.io/component: %s" $component }}
127+
{{- end }}
128+
{{- range $key, $value := $extraMatchLabels }}
129+
{{ $key }}: {{ $value | quote }}
130+
{{- end }}
131+
{{- if $extraNamespaces }}
132+
namespaces:
133+
- {{ .context.Release.Namespace }}
134+
{{- with $extraNamespaces }}
135+
{{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 6 }}
136+
{{- end }}
137+
{{- end }}
138+
topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }}
139+
{{- range $extraPodAffinityTerms }}
140+
- labelSelector:
141+
matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" $.context )) | nindent 8 }}
142+
{{- if not (empty $component) }}
143+
{{ printf "app.kubernetes.io/component: %s" $component }}
144+
{{- end }}
145+
{{- range $key, $value := .extraMatchLabels }}
146+
{{ $key }}: {{ $value | quote }}
147+
{{- end }}
148+
{{- if .namespaces }}
149+
namespaces:
150+
- {{ $.context.Release.Namespace }}
151+
{{- with .namespaces }}
152+
{{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 6 }}
153+
{{- end }}
154+
{{- end }}
155+
topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }}
156+
{{- end -}}
157+
{{- end -}}
158+
159+
{{/*
160+
Return a podAffinity/podAntiAffinity definition
161+
{{ include "common.affinities.pods" (dict "type" "soft" "key" "FOO" "values" (list "BAR" "BAZ")) -}}
162+
*/}}
163+
{{- define "common.affinities.pods" -}}
164+
{{- if eq .type "soft" }}
165+
{{- include "common.affinities.pods.soft" . -}}
166+
{{- else if eq .type "hard" }}
167+
{{- include "common.affinities.pods.hard" . -}}
168+
{{- end -}}
169+
{{- end -}}

0 commit comments

Comments
 (0)