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

fix: patch dsn generation logic #682

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .deps/helm-docs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1.11.0
version: 1.13.1
url: https://github.com/norwoodj/helm-docs/releases/download/v{{.Version}}/helm-docs_{{.Version}}_{{.Os}}_{{.Architecture}}.tar.gz
mappings:
architecture:
Expand Down
2 changes: 1 addition & 1 deletion .deps/k3d.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version: v5.4.9
version: v5.6.3
url: https://github.com/rancher/k3d/releases/download/{{.Version}}/k3d-{{.Os}}-{{.Architecture}}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ SHELL=/bin/bash -euo pipefail
export PATH := .bin:${PATH}
export PWD := $(shell pwd)
export VERSION=$(shell echo ${RELEASE_VERSION} | sed s/v//g)
export K3SIMAGE := docker.io/rancher/k3s:v1.26.1-k3s1
export K3SIMAGE := docker.io/rancher/k3s:v1.29.4-k3s1

.bin/yq: go.mod
go build -o .bin/yq github.com/mikefarah/yq/v3
Expand Down
8 changes: 8 additions & 0 deletions hacks/manifests/hydra-custom-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
data:
dsn: cG9zdGdyZXM6Ly9wb3N0Z3JlczpvcnlAcG9zdGdyZXNxbC5kZWZhdWx0LnN2Yy5jbHVzdGVyLmxvY2FsL29yeV9rcmF0b3M/c3NsbW9kZT1kaXNhYmxlJm1heF9jb25uX2xpZmV0aW1lPTEwcw==
secretsCookie: Ik9HNVhibXhYYTNkWWVHcGxRWHBRYW5ZeGVFRnVSVUZhIiwiZm9vIGJhciAxMjMgNDU2IGxvcmVtIiwiZm9vIGJhciAxMjMgNDU2IGxvcmVtIDEiLCJmb28gYmFyIDEyMyA0NTYgbG9yZW0gMiIsImZvbyBiYXIgMTIzIDQ1NiBsb3JlbSAzIg==
secretsSystem: Ik9HNVhibXhYYTNkWWVHcGxRWHBRYW5ZeGVFRnVSVUZhIiwiZm9vIGJhciAxMjMgNDU2IGxvcmVtIiwiZm9vIGJhciAxMjMgNDU2IGxvcmVtIDEiLCJmb28gYmFyIDEyMyA0NTYgbG9yZW0gMiIsImZvbyBiYXIgMTIzIDQ1NiBsb3JlbSAzIg==
kind: Secret
metadata:
name: hydra-custom
5 changes: 4 additions & 1 deletion hacks/values/hydra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ hydra:

dev: true
config:
dsn: "postgres://postgres:ory@postgresql.default.svc.cluster.local/ory_kratos?sslmode=disable&max_conn_lifetime=10s"
secrets:
system:
- "OG5XbmxXa3dYeGplQXpQanYxeEFuRUFa"
Expand All @@ -28,6 +27,10 @@ hydra:
- "foo bar 123 456 lorem 2"
- "foo bar 123 456 lorem 3"

secret:
enabled: false
nameOverride: "hydra-custom"

maester:
enabled: false

Expand Down
4 changes: 4 additions & 0 deletions hacks/values/keto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ pdb:
spec:
maxUnavailable: 25%

secret:
enabled: true
nameOverride: "keto-custom"

deployment:
minReadySeconds: 30
autoscaling:
Expand Down
2 changes: 1 addition & 1 deletion helm/charts/example-idp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ A Helm chart for deploying the reference implementation for the User Login and C
| topologySpreadConstraints | list | `[]` | Configure pod topologySpreadConstraints. |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
2 changes: 1 addition & 1 deletion helm/charts/hydra-maester/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ A Helm chart for Kubernetes
| singleNamespaceMode | bool | `false` | Single namespace mode. If enabled the controller will watch for resources only from namespace it is deployed in, ignoring others |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
2 changes: 1 addition & 1 deletion helm/charts/hydra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,4 @@ A Helm chart for deploying ORY Hydra in Kubernetes
| watcher.watchLabelKey | string | `"ory.sh/watcher"` | Label key used for managing applications |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
4 changes: 3 additions & 1 deletion helm/charts/hydra/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ Generate the dsn value
{{- define "hydra.dsn" -}}
{{- if .Values.demo -}}
memory
{{- else if .Values.hydra.config.dsn -}}
{{- else if and .Values.secret.nameOverride (not .Values.secret.enabled) -}}
dsn-loaded-from-env
{{- else if not (empty (.Values.hydra.config.dsn)) -}}
{{- .Values.hydra.config.dsn }}
{{- end -}}
{{- end -}}
Expand Down
2 changes: 1 addition & 1 deletion helm/charts/keto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,4 @@ Access Control Policies as a Server
| watcher.watchLabelKey | string | `"ory.sh/watcher"` | Label key used for managing applications |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
6 changes: 4 additions & 2 deletions helm/charts/keto/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ Create chart name and version as used by the chart label.
Generate the dsn value
*/}}
{{- define "keto.dsn" -}}
{{ if .Values.keto.config.dsn }}
{{- if and .Values.secret.nameOverride (not .Values.secret.enabled) -}}
dsn-loaded-from-env
{{- else if not (empty (.Values.keto.config.dsn)) -}}
{{- .Values.keto.config.dsn }}
{{- end }}
{{- end -}}
{{- end -}}

{{/*
Expand Down
2 changes: 1 addition & 1 deletion helm/charts/kratos-selfservice-ui-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ A Helm chart for ORY Kratos's example ui for Kubernetes
| test.busybox | object | `{"repository":"busybox","tag":1}` | use a busybox image from another repository |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
2 changes: 1 addition & 1 deletion helm/charts/kratos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,4 @@ A ORY Kratos Helm chart for Kubernetes
| watcher.watchLabelKey | string | `"ory.sh/watcher"` | Label key used for managing applications |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
6 changes: 4 additions & 2 deletions helm/charts/kratos/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ Create chart name and version as used by the chart label.
Generate the dsn value
*/}}
{{- define "kratos.dsn" -}}
{{ if .Values.kratos.config.dsn }}
{{- if and .Values.secret.nameOverride (not .Values.secret.enabled) -}}
dsn-loaded-from-env
{{- else if not (empty (.Values.kratos.config.dsn)) -}}
{{- .Values.kratos.config.dsn }}
{{- end }}
{{- end -}}
{{- end -}}

{{/*
Expand Down
2 changes: 1 addition & 1 deletion helm/charts/oathkeeper-maester/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ A Helm chart for deploying ORY Oathkeeper Rule Controller in Kubernetes
| singleNamespaceMode | bool | `false` | Single namespace mode. If enabled the controller will watch for resources only from namespace it is deployed in, ignoring others |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
2 changes: 1 addition & 1 deletion helm/charts/oathkeeper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,4 @@ A Helm chart for deploying ORY Oathkeeper in Kubernetes
| test.labels | object | `{}` | Provide additional labels to the test pod |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
Loading