Skip to content

Commit

Permalink
feat(selfserve-ui): support enable, labels, and annotations for servi…
Browse files Browse the repository at this point in the history
…ce (#701)
  • Loading branch information
bchrobot-mh authored Aug 28, 2024
1 parent 7d9b9bc commit 9a133f6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
3 changes: 3 additions & 0 deletions helm/charts/kratos-selfservice-ui-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ A Helm chart for ORY Kratos's example ui for Kubernetes
| securityContext.runAsUser | int | `10000` | |
| securityContext.seLinuxOptions.level | string | `"s0:c123,c456"` | |
| securityContext.seccompProfile.type | string | `"RuntimeDefault"` | |
| service.annotations | object | `{}` | If you do want to specify annotations, uncomment the following lines, adjust them as necessary, and remove the curly braces after 'annotations:'. |
| service.enabled | bool | `true` | En-/disable the service |
| service.labels | object | `{}` | Provide custom labels. Use the same syntax as for annotations. |
| 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 | `""` | |
Expand Down
12 changes: 11 additions & 1 deletion helm/charts/kratos-selfservice-ui-node/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
{{- if .Values.service.enabled -}}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "kratos-selfservice-ui-node.fullname" . }}
labels:
{{ include "kratos-selfservice-ui-node.labels" . | indent 4 }}
{{- include "kratos-selfservice-ui-node.labels" . | nindent 4 }}
{{- with .Values.service.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- with .Values.service.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
{{- if eq .Values.service.type "LoadBalancer" }}
Expand All @@ -24,3 +33,4 @@ spec:
selector:
app.kubernetes.io/name: {{ include "kratos-selfservice-ui-node.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
8 changes: 8 additions & 0 deletions helm/charts/kratos-selfservice-ui-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,21 @@ config:

## -- Service configuration
service:
enabled: true
type: ClusterIP
# -- The load balancer IP
loadBalancerIP: ""
nodePort: ""
port: 80
# -- The service port name. Useful to set a custom service port name if it must follow a scheme (e.g. Istio)
name: http
# -- Provide custom labels. Use the same syntax as for annotations.
labels: {}
# -- If you do want to specify annotations, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'annotations:'.
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"

## -- Secret configuration
secret:
Expand Down

0 comments on commit 9a133f6

Please sign in to comment.