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

feat: add default db server #4

Merged
merged 2 commits into from
Jun 5, 2024
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
4 changes: 2 additions & 2 deletions helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
{{- end -}}

{{- define "app.version" -}}
{{ .Values.image.tag }}
{{ .Values.app.image.tag }}
{{- end -}}

{{- define "app.labels.common" -}}
version: {{ .Chart.Version | replace "+" "_" }}
adminer: {{ .Values.image.tag | quote }}
adminer: {{ .Values.app.image.tag | quote }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/name: {{ template "app.fullname" $ }}
Expand Down
14 changes: 14 additions & 0 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@ spec:
imagePullSecrets:
- name: {{ .Values.imagePullSecrets }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{- .Values.nodeSelector | toYaml | trim | nindent 8 }}
{{- else if .Values.global.nodeSelector }}
nodeSelector:
{{- .Values.global.nodeSelector | toYaml | trim | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- .Values.tolerations | toYaml | trim | nindent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{- .Values.global.tolerations | toYaml | trim | nindent 8 }}
{{- end }}
containers:
- name: {{ include "app.fullname" . }}
image: {{ .Values.app.image.registry }}/{{ .Values.app.image.repository }}:{{ .Values.app.image.tag }}
Expand Down
26 changes: 24 additions & 2 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,21 @@ global:
# global host name
default_url:

# node selector for the pods
nodeSelector:

# tolerations for the pods
tolerations:

# Name of the instance, default {{ .Release.Name }}-{{ .Values.name | default .Chart.Name }}
name: adminer

# node selector for the pods
nodeSelector:

# tolerations for the pods
tolerations:

# service
service:
port: 8080
Expand All @@ -17,6 +29,16 @@ pod:

imagePullPolicy: IfNotPresent

app:
# Application image
image:
# Docker registry
registry: "ghcr.io"
# Docker repository (application name)
repository: "change-me"
# Docker image tag (application version)
tag: "main"

# Route
routing:
# Enable or disable route
Expand All @@ -42,7 +64,7 @@ routing:
# database configuration
db:
# default server
server:
server: postgresql

# Replicas
replicas: 1
Expand All @@ -55,6 +77,6 @@ traefik:
middleware:
auth:
# enable or disabel traefik middleware
enabled: true
enabled: false
# user:password hash
users: