Skip to content

Commit

Permalink
Merge pull request #255 from RADAR-base/update-kratos-ui
Browse files Browse the repository at this point in the history
Update kratos ui docker image
  • Loading branch information
yatharthranjan authored Sep 27, 2024
2 parents c667b20 + e56e149 commit de1ab0e
Show file tree
Hide file tree
Showing 12 changed files with 112 additions and 110 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ update-kratos:
@helm pull -d external --untar $(patsubst update-%,%,$@)/$(patsubst update-%,%,$@)
@echo ""

update-kratos-selfservice-ui-node:
@echo "Updating kratos-selfservice-ui-node"
update-radar-self-enrolment-ui:
@echo "Updating radar-self-enrolment-ui"
@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-%,%,$@)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
appVersion: "v0.13.0-4"
appVersion: "0.0.1"
description: A Helm chart for ORY Kratos's example ui for Kubernetes
name: kratos-selfservice-ui-node
version: 0.43.1
name: radar-self-enrolment-ui
version: 0.0.1
type: application
Original file line number Diff line number Diff line change
@@ -1,74 +1,76 @@
# kratos-selfservice-ui-node

![Version: 0.43.1](https://img.shields.io/badge/Version-0.43.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.13.0-4](https://img.shields.io/badge/AppVersion-v0.13.0--4-informational?style=flat-square)

# radar-self-enrolment-ui

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

A Helm chart for ORY Kratos's example ui for Kubernetes

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| basePath | string | `""` | The basePath |
| config.csrfCookieName | string | `""` | |
| config.secrets | object | `{}` | |
| deployment.annotations | object | `{}` | |
| deployment.automountServiceAccountToken | bool | `false` | |
| deployment.dnsConfig | object | `{}` | Configure pod dnsConfig. |
| deployment.extraEnv | list | `[]` | Array of extra envs to be passed to the deployment. Kubernetes format is expected - name: FOO value: BAR |
| deployment.extraVolumeMounts | list | `[]` | |
| deployment.extraVolumes | list | `[]` | If you want to mount external volume For example, mount a secret containing Certificate root CA to verify database TLS connection. |
| deployment.labels | object | `{}` | |
| deployment.nodeSelector | object | `{}` | Node labels for pod assignment. |
| deployment.resources | object | `{}` | |
| deployment.terminationGracePeriodSeconds | int | `60` | |
| deployment.tolerations | list | `[]` | Configure node tolerations. |
| deployment.topologySpreadConstraints | list | `[]` | Configure pod topologySpreadConstraints. |
| fullnameOverride | string | `""` | |
| replicaCount | int | `1` | Number of replicas in deployment |
| revisionHistoryLimit | int | `5` | Number of revisions kept in history |
| image.repository | string | `"ghcr.io/radar-base/radar-self-enrolment-ui"` | |
| image.tag | string | `"dev"` | Image version |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"oryd/kratos-selfservice-ui-node"` | |
| image.tag | string | `"v0.13.0-20"` | ORY KRATOS VERSION |
| imagePullSecrets | list | `[]` | |
| ingress.annotations | object | `{}` | |
| ingress.className | string | `""` | |
| nameOverride | string | `""` | |
| fullnameOverride | string | `""` | |
| config.csrfCookieName | string | `""` | |
| config.secrets | object | `{}` | |
| service.type | string | `"ClusterIP"` | |
| service.loadBalancerIP | string | `""` | The load balancer IP |
| service.nodePort | string | `""` | |
| service.port | int | `80` | |
| service.name | string | `"http"` | The service port name. Useful to set a custom service port name if it must follow a scheme (e.g. Istio) |
| secret.enabled | bool | `true` | switch to false to prevent creating the secret |
| secret.nameOverride | string | `""` | Provide custom name of existing secret, or custom name of secret to be created |
| secret.secretAnnotations | object | `{"helm.sh/hook":"pre-install, pre-upgrade","helm.sh/hook-delete-policy":"before-hook-creation","helm.sh/hook-weight":0,"helm.sh/resource-policy":"keep"}` | Annotations to be added to secret. Annotations are added only when secret is being created. Existing secret will not be modified. |
| secret.hashSumEnabled | bool | `true` | switch to false to prevent checksum annotations being maintained and propogated to the pods |
| ingress.enabled | bool | `false` | |
| ingress.className | string | `""` | |
| ingress.annotations | object | `{}` | |
| ingress.hosts[0].host | string | `"chart-example.local"` | |
| ingress.hosts[0].paths[0].path | string | `"/"` | |
| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
| ingress.tls | list | `[]` | |
| jwksUrl | string | `"http://oathkeeper-api"` | The jwksUrl |
| kratosAdminUrl | string | `"http://kratos-admin"` | Set this to ORY Kratos's Admin URL |
| kratosBrowserUrl | string | `"http://kratos-browserui"` | Set this to ORY Kratos's public URL accessible from the outside world. |
| kratosPublicUrl | string | `"http://kratos-public"` | Set this to ORY Kratos's public URL |
| nameOverride | string | `""` | |
| podSecurityContext.fsGroup | int | `10000` | |
| podSecurityContext.fsGroupChangePolicy | string | `"OnRootMismatch"` | |
| podSecurityContext.runAsGroup | int | `10000` | |
| podSecurityContext.runAsNonRoot | bool | `true` | |
| podSecurityContext.runAsUser | int | `10000` | |
| podSecurityContext.seccompProfile.type | string | `"RuntimeDefault"` | |
| projectName | string | `"SecureApp"` | |
| replicaCount | int | `1` | Number of replicas in deployment |
| revisionHistoryLimit | int | `5` | Number of revisions kept in history |
| secret.enabled | bool | `true` | switch to false to prevent creating the secret |
| secret.hashSumEnabled | bool | `true` | switch to false to prevent checksum annotations being maintained and propogated to the pods |
| secret.nameOverride | string | `""` | Provide custom name of existing secret, or custom name of secret to be created |
| secret.secretAnnotations | object | `{"helm.sh/hook":"pre-install, pre-upgrade","helm.sh/hook-delete-policy":"before-hook-creation","helm.sh/hook-weight":"0","helm.sh/resource-policy":"keep"}` | Annotations to be added to secret. Annotations are added only when secret is being created. Existing secret will not be modified. |
| securityContext.allowPrivilegeEscalation | bool | `false` | |
| securityContext.capabilities.drop[0] | string | `"ALL"` | |
| securityContext.privileged | bool | `false` | |
| securityContext.readOnlyRootFilesystem | bool | `false` | |
| securityContext.runAsGroup | int | `10000` | |
| securityContext.runAsNonRoot | bool | `true` | |
| securityContext.runAsUser | int | `10000` | |
| securityContext.seLinuxOptions.level | string | `"s0:c123,c456"` | |
| securityContext.runAsGroup | int | `10000` | |
| securityContext.allowPrivilegeEscalation | bool | `false` | |
| securityContext.privileged | bool | `false` | |
| securityContext.seccompProfile.type | string | `"RuntimeDefault"` | |
| service.loadBalancerIP | string | `""` | The load balancer IP |
| service.name | string | `"http"` | The service port name. Useful to set a custom service port name if it must follow a scheme (e.g. Istio) |
| service.nodePort | string | `""` | |
| service.port | int | `80` | |
| service.type | string | `"ClusterIP"` | |
| securityContext.seLinuxOptions.level | string | `"s0:c123,c456"` | |
| podSecurityContext.fsGroupChangePolicy | string | `"OnRootMismatch"` | |
| podSecurityContext.runAsNonRoot | bool | `true` | |
| podSecurityContext.runAsUser | int | `10000` | |
| podSecurityContext.fsGroup | int | `10000` | |
| podSecurityContext.runAsGroup | int | `10000` | |
| podSecurityContext.seccompProfile.type | string | `"RuntimeDefault"` | |
| deployment.resources | object | `{}` | |
| deployment.extraEnv | list | `[]` | Array of extra envs to be passed to the deployment. Kubernetes format is expected - name: FOO value: BAR |
| deployment.extraVolumes | list | `[]` | If you want to mount external volume For example, mount a secret containing Certificate root CA to verify database TLS connection. |
| deployment.extraVolumeMounts | list | `[]` | |
| deployment.nodeSelector | object | `{}` | Node labels for pod assignment. |
| deployment.tolerations | list | `[]` | Configure node tolerations. |
| deployment.topologySpreadConstraints | list | `[]` | Configure pod topologySpreadConstraints. |
| deployment.dnsConfig | object | `{}` | Configure pod dnsConfig. |
| deployment.labels | object | `{}` | |
| deployment.annotations | object | `{}` | |
| deployment.automountServiceAccountToken | bool | `false` | |
| deployment.terminationGracePeriodSeconds | int | `60` | |
| affinity | object | `{}` | |
| kratosPublicUrl | string | `"http://kratos:4433"` | Set this to ORY Kratos's public URL |
| hydraAdminUrl | string | `"http://hydra:4445"` | Set this to ORY Hydra's Admin URL |
| hydraPublicUrl | string | `"http://hydra:4444"` | Set this to ORY Hydra's public URL |
| basePath | string | `""` | The basePath |
| jwksUrl | string | `"http://hydra:4445/admin/keys/hydra.jwt.access-token"` | The jwksUrl |
| projectName | string | `"SecureApp"` | |
| test.busybox | object | `{"repository":"busybox","tag":1}` | use a busybox image from another repository |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3)
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "kratos-selfservice-ui-node.fullname" . }})
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "radar-self-enrolment-ui.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "kratos-selfservice-ui-node.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "kratos-selfservice-ui-node.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "radar-self-enrolment-ui.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "radar-self-enrolment-ui.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "kratos-selfservice-ui-node.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "radar-self-enrolment-ui.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "kratos-selfservice-ui-node.name" -}}
{{- define "radar-self-enrolment-ui.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

Expand All @@ -11,7 +11,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "kratos-selfservice-ui-node.fullname" -}}
{{- define "radar-self-enrolment-ui.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
Expand All @@ -27,16 +27,16 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "kratos-selfservice-ui-node.chart" -}}
{{- define "radar-self-enrolment-ui.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Common labels
*/}}
{{- define "kratos-selfservice-ui-node.labels" -}}
app.kubernetes.io/name: {{ include "kratos-selfservice-ui-node.name" . }}
helm.sh/chart: {{ include "kratos-selfservice-ui-node.chart" . }}
{{- define "radar-self-enrolment-ui.labels" -}}
app.kubernetes.io/name: {{ include "radar-self-enrolment-ui.name" . }}
helm.sh/chart: {{ include "radar-self-enrolment-ui.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
Expand All @@ -47,10 +47,10 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Create a secret name which can be overridden.
*/}}
{{- define "kratos-selfservice-ui-node.secretname" -}}
{{- define "radar-self-enrolment-ui.secretname" -}}
{{- if .Values.secret.nameOverride -}}
{{- .Values.secret.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{ include "kratos-selfservice-ui-node.fullname" . }}
{{ include "radar-self-enrolment-ui.fullname" . }}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "kratos-selfservice-ui-node.fullname" . }}
name: {{ include "radar-self-enrolment-ui.fullname" . }}
{{- if .Release.Namespace }}
namespace: {{ .Release.Namespace }}
{{- end }}
labels:
{{- include "kratos-selfservice-ui-node.labels" . | nindent 4 }}
{{- include "radar-self-enrolment-ui.labels" . | nindent 4 }}
{{- with .Values.deployment.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
Expand All @@ -19,12 +19,12 @@ spec:
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "kratos-selfservice-ui-node.name" . }}
app.kubernetes.io/name: {{ include "radar-self-enrolment-ui.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
{{- include "kratos-selfservice-ui-node.labels" . | nindent 8 }}
{{- include "radar-self-enrolment-ui.labels" . | nindent 8 }}
{{- with .Values.deployment.labels }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand All @@ -48,29 +48,29 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: KRATOS_PUBLIC_URL
- name: ORY_SDK_URL
value: {{ .Values.kratosPublicUrl | quote }}
- name: KRATOS_BROWSER_URL
value: {{ .Values.kratosBrowserUrl | quote }}
- name: HYDRA_ADMIN_URL
value: {{ .Values.hydraAdminUrl | quote }}
- name: HYDRA_PUBLIC_URL
value: {{ .Values.hydraPublicUrl | quote }}
- name: PROJECT_NAME
value: {{ .Values.projectName | quote }}
- name: BASE_PATH
value: {{ .Values.basePath | quote }}
- name: JWKS_URL
value: {{ .Values.jwksUrl | quote }}
- name: KRATOS_ADMIN_URL
value: {{ .Values.kratosAdminUrl | quote }}
- name: SECURITY_MODE
value: {{ .Values.securityMode | quote }}
- name: COOKIE_SECRET
valueFrom:
secretKeyRef:
name: {{ include "kratos-selfservice-ui-node.secretname" . }}
name: {{ include "radar-self-enrolment-ui.secretname" . }}
key: secretsCookie
- name: CSRF_COOKIE_SECRET
valueFrom:
secretKeyRef:
name: {{ include "kratos-selfservice-ui-node.secretname" . }}
name: {{ include "radar-self-enrolment-ui.secretname" . }}
key: secretsCSRFCookie
- name: CSRF_COOKIE_NAME
value: {{ .Values.config.csrfCookieName | quote }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "kratos-selfservice-ui-node.fullname" . -}}
{{- $fullName := include "radar-self-enrolment-ui.fullname" . -}}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else -}}
Expand All @@ -12,7 +12,7 @@ metadata:
namespace: {{ .Release.Namespace }}
{{- end }}
labels:
{{- include "kratos-selfservice-ui-node.labels" . | nindent 4 }}
{{- include "radar-self-enrolment-ui.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "kratos-selfservice-ui-node.secretname" . }}
name: {{ include "radar-self-enrolment-ui.secretname" . }}
{{- if .Release.Namespace }}
namespace: {{ .Release.Namespace }}
{{- end }}
labels:
{{- include "kratos-selfservice-ui-node.labels" . | nindent 4 }}
{{- include "radar-self-enrolment-ui.labels" . | nindent 4 }}
annotations:
{{- with .Values.secret.secretAnnotations }}
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "kratos-selfservice-ui-node.fullname" . }}
name: {{ include "radar-self-enrolment-ui.fullname" . }}
labels:
{{ include "kratos-selfservice-ui-node.labels" . | indent 4 }}
{{ include "radar-self-enrolment-ui.labels" . | indent 4 }}
spec:
type: {{ .Values.service.type }}
{{- if eq .Values.service.type "LoadBalancer" }}
Expand All @@ -22,5 +22,5 @@ spec:
{{- end }}
{{- end }}
selector:
app.kubernetes.io/name: {{ include "kratos-selfservice-ui-node.name" . }}
app.kubernetes.io/name: {{ include "radar-self-enrolment-ui.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "kratos-selfservice-ui-node.fullname" . }}-test-connection"
name: "{{ include "radar-self-enrolment-ui.fullname" . }}-test-connection"
{{- if .Release.Namespace }}
namespace: {{ .Release.Namespace }}
{{- end }}
labels:
{{ include "kratos-selfservice-ui-node.labels" . | indent 4 }}
{{ include "radar-self-enrolment-ui.labels" . | indent 4 }}
annotations:
"helm.sh/hook": test-success
spec:
containers:
- name: wget
image: "{{ .Values.test.busybox.repository }}:{{ .Values.test.busybox.tag }}"
command: ['wget']
args: ['{{ include "kratos-selfservice-ui-node.fullname" . }}:{{ .Values.service.port }}{{ .Values.basePath }}/health/ready']
args: ['{{ include "radar-self-enrolment-ui.fullname" . }}:{{ .Values.service.port }}{{ .Values.basePath }}/health/ready']
restartPolicy: Never
Loading

0 comments on commit de1ab0e

Please sign in to comment.