From ea6129c2bceee8c7f5e8792e63ef0c1687ed8aad Mon Sep 17 00:00:00 2001 From: yatharthranjan Date: Tue, 24 Sep 2024 14:04:14 +0100 Subject: [PATCH] add ory-commons --- Makefile | 7 ++++++ external/ory-commons/.helmignore | 23 +++++++++++++++++++ external/ory-commons/Chart.yaml | 25 +++++++++++++++++++++ external/ory-commons/templates/_helpers.tpl | 12 ++++++++++ 4 files changed, 67 insertions(+) create mode 100644 external/ory-commons/.helmignore create mode 100644 external/ory-commons/Chart.yaml create mode 100644 external/ory-commons/templates/_helpers.tpl diff --git a/Makefile b/Makefile index 7d566a4c..4f8e75f6 100644 --- a/Makefile +++ b/Makefile @@ -82,6 +82,13 @@ update-hydra: @helm pull -d external --untar $(patsubst update-%,%,$@)/$(patsubst update-%,%,$@) @echo "" +update-ory-commons: + @echo "Updating Hydra" + @rm -rf external/$(patsubst update-%,%,$@) + @helm repo add $(patsubst update-%,%,$@) https://k8s.ory.sh/helm/charts + @helm pull -d external --untar $(patsubst update-%,%,$@)/$(patsubst update-%,%,$@) + @echo "" + update-minio: @echo "Updating minio" @helm repo add bitnami https://charts.bitnami.com/bitnami diff --git a/external/ory-commons/.helmignore b/external/ory-commons/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/external/ory-commons/.helmignore @@ -0,0 +1,23 @@ +# 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 +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/external/ory-commons/Chart.yaml b/external/ory-commons/Chart.yaml new file mode 100644 index 00000000..e1cdd216 --- /dev/null +++ b/external/ory-commons/Chart.yaml @@ -0,0 +1,25 @@ +apiVersion: v2 +name: ory-commons +description: | + Collection of helper function for the Ory Helm environment + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: library + +# 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 + +# 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 +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "0.0.0" diff --git a/external/ory-commons/templates/_helpers.tpl b/external/ory-commons/templates/_helpers.tpl new file mode 100644 index 00000000..531b34c4 --- /dev/null +++ b/external/ory-commons/templates/_helpers.tpl @@ -0,0 +1,12 @@ +{{/* +Check if list contains object +*/}} +{{- define "ory.extraEnvContainsEnvName" -}} + {{- $extraEnvs := index . 0 -}} + {{- $envName := index . 1 -}} + {{- range $k, $v := $extraEnvs -}} + {{- if eq $v.name $envName -}} + found + {{- end -}} + {{- end -}} +{{- end -}}