-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
3,269 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v2 | ||
appVersion: "v0.13.0-4" | ||
description: A Helm chart for ORY Kratos's example ui for Kubernetes | ||
name: kratos-selfservice-ui-node | ||
version: 0.43.1 | ||
type: application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# 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) | ||
|
||
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 | `""` | | | ||
| 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 | `""` | | | ||
| ingress.enabled | bool | `false` | | | ||
| 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.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"` | | | ||
| 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
1. Get the application URL by running these commands: | ||
{{- if .Values.ingress.enabled }} | ||
{{- range $host := .Values.ingress.hosts }} | ||
{{- range .paths }} | ||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} | ||
{{- 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_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}') | ||
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}") | ||
echo "Visit http://127.0.0.1:8080 to use your application" | ||
kubectl port-forward $POD_NAME 8080:80 | ||
{{- end }} |
56 changes: 56 additions & 0 deletions
56
external/kratos-selfservice-ui-node/templates/_helpers.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "kratos-selfservice-ui-node.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
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" -}} | ||
{{- if .Values.fullnameOverride -}} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- if contains $name .Release.Name -}} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "kratos-selfservice-ui-node.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" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create a secret name which can be overridden. | ||
*/}} | ||
{{- define "kratos-selfservice-ui-node.secretname" -}} | ||
{{- if .Values.secret.nameOverride -}} | ||
{{- .Values.secret.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{ include "kratos-selfservice-ui-node.fullname" . }} | ||
{{- end -}} | ||
{{- end -}} |
123 changes: 123 additions & 0 deletions
123
external/kratos-selfservice-ui-node/templates/deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "kratos-selfservice-ui-node.fullname" . }} | ||
{{- if .Release.Namespace }} | ||
namespace: {{ .Release.Namespace }} | ||
{{- end }} | ||
labels: | ||
{{- include "kratos-selfservice-ui-node.labels" . | nindent 4 }} | ||
{{- with .Values.deployment.labels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
annotations: | ||
{{- with .Values.deployment.annotations }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ include "kratos-selfservice-ui-node.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "kratos-selfservice-ui-node.labels" . | nindent 8 }} | ||
{{- with .Values.deployment.labels }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
annotations: | ||
{{- with .Values.deployment.annotations }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
automountServiceAccountToken: {{ .Values.deployment.automountServiceAccountToken }} | ||
{{- with .Values.deployment.extraVolumes }} | ||
volumes: | ||
{{- toYaml . | nindent 6 }} | ||
{{- end }} | ||
terminationGracePeriodSeconds: {{ .Values.deployment.terminationGracePeriodSeconds }} | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
env: | ||
- name: KRATOS_PUBLIC_URL | ||
value: {{ .Values.kratosPublicUrl | quote }} | ||
- name: KRATOS_BROWSER_URL | ||
value: {{ .Values.kratosBrowserUrl | 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" . }} | ||
key: secretsCookie | ||
- name: CSRF_COOKIE_SECRET | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ include "kratos-selfservice-ui-node.secretname" . }} | ||
key: secretsCSRFCookie | ||
- name: CSRF_COOKIE_NAME | ||
value: {{ .Values.config.csrfCookieName | quote }} | ||
{{- if .Values.deployment.extraEnv }} | ||
{{- toYaml .Values.deployment.extraEnv | nindent 10 }} | ||
{{- end }} | ||
{{- with .Values.deployment.extraVolumeMounts }} | ||
volumeMounts: | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
ports: | ||
- name: http | ||
containerPort: 3000 | ||
protocol: TCP | ||
livenessProbe: | ||
httpGet: | ||
path: {{ .Values.basePath }}/health/alive | ||
port: http | ||
readinessProbe: | ||
httpGet: | ||
path: {{ .Values.basePath }}/health/ready | ||
port: http | ||
resources: | ||
{{- toYaml .Values.deployment.resources | nindent 12 }} | ||
{{- if .Values.securityContext }} | ||
securityContext: | ||
{{- toYaml .Values.securityContext | nindent 12 }} | ||
{{- end }} | ||
{{- with .Values.deployment.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.deployment.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.deployment.topologySpreadConstraints }} | ||
topologySpreadConstraints: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.deployment.dnsConfig }} | ||
dnsConfig: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
securityContext: | ||
{{- toYaml .Values.podSecurityContext | nindent 8 }} |
Oops, something went wrong.