Skip to content

Commit

Permalink
Include static version of memcached charts for cortex (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
wurbanski authored Jan 5, 2023
1 parent 080fde6 commit 6ef93dd
Show file tree
Hide file tree
Showing 43 changed files with 3,148 additions and 18 deletions.
18 changes: 9 additions & 9 deletions charts/cortex/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@ dependencies:
repository: https://cortexproject.github.io/cortex-helm-chart
version: 0.7.0
- name: memcached
repository: https://charts.bitnami.com/bitnami
repository: ""
version: 5.15.14
- name: memcached
repository: https://charts.bitnami.com/bitnami
repository: ""
version: 5.15.14
- name: memcached
repository: https://charts.bitnami.com/bitnami
repository: ""
version: 5.15.14
- name: memcached
repository: https://charts.bitnami.com/bitnami
repository: ""
version: 5.15.14
- name: memcached
repository: https://charts.bitnami.com/bitnami
repository: ""
version: 5.15.14
- name: memcached
repository: https://charts.bitnami.com/bitnami
repository: ""
version: 5.15.14
- name: memcached
repository: https://charts.bitnami.com/bitnami
repository: ""
version: 5.15.14
digest: sha256:0531333e3a8bb0f46ce31cbd580f8e731f649437fe1003c1ae88ed46f48b273e
generated: "2022-06-03T10:29:40.596964+05:00"
digest: sha256:05a4335f375df3b84a926f4021a8531c4b621afe159a5e0a8b4837ff6c7e8f82
generated: "2023-01-05T10:55:55.657915344+01:00"
7 changes: 0 additions & 7 deletions charts/cortex/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,31 @@ dependencies:
- alias: memcached
condition: cortex.memcached.enabled
name: memcached
repository: https://charts.bitnami.com/bitnami
version: 5.15.14
- alias: memcached-index-read
condition: cortex.memcached-index-read.enabled
name: memcached
repository: https://charts.bitnami.com/bitnami
version: 5.15.14
- alias: memcached-index-write
condition: cortex.memcached-index-write.enabled
name: memcached
repository: https://charts.bitnami.com/bitnami
version: 5.15.14
- alias: memcached-frontend
condition: cortex.memcached-frontend.enabled
name: memcached
repository: https://charts.bitnami.com/bitnami
version: 5.15.14
- alias: memcached-blocks-index
name: memcached
repository: https://charts.bitnami.com/bitnami
tags:
- blocks-storage-memcached
version: 5.15.14
- alias: memcached-blocks
name: memcached
repository: https://charts.bitnami.com/bitnami
tags:
- blocks-storage-memcached
version: 5.15.14
- alias: memcached-blocks-metadata
name: memcached
repository: https://charts.bitnami.com/bitnami
tags:
- blocks-storage-memcached
version: 5.15.14
21 changes: 21 additions & 0 deletions charts/cortex/charts/memcached/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
6 changes: 6 additions & 0 deletions charts/cortex/charts/memcached/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
version: 1.10.3
digest: sha256:710e8247ae70ea63a2fb2fde4320511ff28c7b5c7a738861427f104a7718bdf4
generated: "2021-12-25T07:44:36.7772147Z"
24 changes: 24 additions & 0 deletions charts/cortex/charts/memcached/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
annotations:
category: Infrastructure
apiVersion: v2
appVersion: 1.6.13
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
tags:
- bitnami-common
version: 1.x.x
description: Chart for Memcached
home: https://github.com/bitnami/charts/tree/master/bitnami/memcached
icon: https://bitnami.com/assets/stacks/memcached/img/memcached-stack-220x234.png
keywords:
- memcached
- cache
maintainers:
- email: [email protected]
name: Bitnami
name: memcached
sources:
- https://github.com/bitnami/bitnami-docker-memcached
- http://memcached.org/
version: 5.15.14
275 changes: 275 additions & 0 deletions charts/cortex/charts/memcached/README.md

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions charts/cortex/charts/memcached/charts/common/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
23 changes: 23 additions & 0 deletions charts/cortex/charts/memcached/charts/common/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
annotations:
category: Infrastructure
apiVersion: v2
appVersion: 1.10.0
description: A Library Helm Chart for grouping common logic between bitnami charts.
This chart is not deployable by itself.
home: https://github.com/bitnami/charts/tree/master/bitnami/common
icon: https://bitnami.com/downloads/logos/bitnami-mark.png
keywords:
- common
- helper
- template
- function
- bitnami
maintainers:
- email: [email protected]
name: Bitnami
name: common
sources:
- https://github.com/bitnami/charts
- https://www.bitnami.com/
type: library
version: 1.10.3
328 changes: 328 additions & 0 deletions charts/cortex/charts/memcached/charts/common/README.md

Large diffs are not rendered by default.

102 changes: 102 additions & 0 deletions charts/cortex/charts/memcached/charts/common/templates/_affinities.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{{/* vim: set filetype=mustache: */}}

{{/*
Return a soft nodeAffinity definition
{{ include "common.affinities.nodes.soft" (dict "key" "FOO" "values" (list "BAR" "BAZ")) -}}
*/}}
{{- define "common.affinities.nodes.soft" -}}
preferredDuringSchedulingIgnoredDuringExecution:
- preference:
matchExpressions:
- key: {{ .key }}
operator: In
values:
{{- range .values }}
- {{ . | quote }}
{{- end }}
weight: 1
{{- end -}}

{{/*
Return a hard nodeAffinity definition
{{ include "common.affinities.nodes.hard" (dict "key" "FOO" "values" (list "BAR" "BAZ")) -}}
*/}}
{{- define "common.affinities.nodes.hard" -}}
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: {{ .key }}
operator: In
values:
{{- range .values }}
- {{ . | quote }}
{{- end }}
{{- end -}}

{{/*
Return a nodeAffinity definition
{{ include "common.affinities.nodes" (dict "type" "soft" "key" "FOO" "values" (list "BAR" "BAZ")) -}}
*/}}
{{- define "common.affinities.nodes" -}}
{{- if eq .type "soft" }}
{{- include "common.affinities.nodes.soft" . -}}
{{- else if eq .type "hard" }}
{{- include "common.affinities.nodes.hard" . -}}
{{- end -}}
{{- end -}}

{{/*
Return a soft podAffinity/podAntiAffinity definition
{{ include "common.affinities.pods.soft" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "context" $) -}}
*/}}
{{- define "common.affinities.pods.soft" -}}
{{- $component := default "" .component -}}
{{- $extraMatchLabels := default (dict) .extraMatchLabels -}}
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 10 }}
{{- if not (empty $component) }}
{{ printf "app.kubernetes.io/component: %s" $component }}
{{- end }}
{{- range $key, $value := $extraMatchLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
namespaces:
- {{ .context.Release.Namespace | quote }}
topologyKey: kubernetes.io/hostname
weight: 1
{{- end -}}

{{/*
Return a hard podAffinity/podAntiAffinity definition
{{ include "common.affinities.pods.hard" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "context" $) -}}
*/}}
{{- define "common.affinities.pods.hard" -}}
{{- $component := default "" .component -}}
{{- $extraMatchLabels := default (dict) .extraMatchLabels -}}
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 8 }}
{{- if not (empty $component) }}
{{ printf "app.kubernetes.io/component: %s" $component }}
{{- end }}
{{- range $key, $value := $extraMatchLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
namespaces:
- {{ .context.Release.Namespace | quote }}
topologyKey: kubernetes.io/hostname
{{- end -}}

{{/*
Return a podAffinity/podAntiAffinity definition
{{ include "common.affinities.pods" (dict "type" "soft" "key" "FOO" "values" (list "BAR" "BAZ")) -}}
*/}}
{{- define "common.affinities.pods" -}}
{{- if eq .type "soft" }}
{{- include "common.affinities.pods.soft" . -}}
{{- else if eq .type "hard" }}
{{- include "common.affinities.pods.hard" . -}}
{{- end -}}
{{- end -}}
Loading

0 comments on commit 6ef93dd

Please sign in to comment.